@remotion/promo-pages 4.0.490 → 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 +1026 -618
- package/dist/components/Homepage.js +8 -4
- package/dist/components/homepage/CanvasSectionTitle.d.ts +4 -0
- package/dist/components/homepage/CanvasSectionTitle.js +14 -0
- package/dist/components/homepage/CommunityStatsItems.js +1 -1
- package/dist/components/homepage/Demo/Card.d.ts +3 -3
- package/dist/components/homepage/Demo/DisplayedEmoji.js +9 -3
- package/dist/components/homepage/EditorStarterSection.d.ts +3 -0
- package/dist/components/homepage/EditorStarterSection.js +8 -0
- package/dist/components/homepage/Pricing.d.ts +3 -0
- package/dist/components/homepage/Pricing.js +8 -2
- package/dist/components/homepage/WriteInReact.js +1 -2
- package/dist/design.js +520 -359
- package/dist/experts.js +358 -197
- package/dist/homepage/Pricing.js +537 -376
- package/dist/prompts/PromptsGallery.js +517 -356
- package/dist/prompts/PromptsShow.js +523 -362
- package/dist/prompts/PromptsSubmit.js +509 -348
- package/dist/team.js +496 -335
- package/dist/template-modal-content.js +537 -376
- package/dist/templates.js +537 -374
- package/package.json +13 -13
|
@@ -17367,9 +17367,9 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
17367
17367
|
});
|
|
17368
17368
|
|
|
17369
17369
|
// ../design/dist/esm/index.mjs
|
|
17370
|
-
import * as
|
|
17370
|
+
import * as React24 from "react";
|
|
17371
17371
|
import * as React3 from "react";
|
|
17372
|
-
import { Fragment as
|
|
17372
|
+
import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
|
|
17373
17373
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
17374
17374
|
|
|
17375
17375
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -18712,7 +18712,7 @@ var getDefaultConfig = () => {
|
|
|
18712
18712
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
18713
18713
|
|
|
18714
18714
|
// ../design/dist/esm/index.mjs
|
|
18715
|
-
import
|
|
18715
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
18716
18716
|
|
|
18717
18717
|
// ../paths/dist/esm/index.mjs
|
|
18718
18718
|
var cutLInstruction = ({
|
|
@@ -21505,6 +21505,7 @@ import * as React6 from "react";
|
|
|
21505
21505
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
21506
21506
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
21507
21507
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
21508
|
+
import React9 from "react";
|
|
21508
21509
|
import {
|
|
21509
21510
|
forwardRef as forwardRef3,
|
|
21510
21511
|
useCallback as useCallback6,
|
|
@@ -21530,11 +21531,11 @@ import { useContext as useContext13 } from "react";
|
|
|
21530
21531
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
21531
21532
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
21532
21533
|
import { createContext as createContext14 } from "react";
|
|
21533
|
-
import
|
|
21534
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
21534
21535
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
21535
|
-
import
|
|
21536
|
+
import React13, { createContext as createContext15 } from "react";
|
|
21536
21537
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
21537
|
-
import
|
|
21538
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
21538
21539
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
21539
21540
|
import { createContext as createContext16 } from "react";
|
|
21540
21541
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -21546,7 +21547,7 @@ import {
|
|
|
21546
21547
|
useRef as useRef9,
|
|
21547
21548
|
useState as useState6
|
|
21548
21549
|
} from "react";
|
|
21549
|
-
import
|
|
21550
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
21550
21551
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
21551
21552
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
21552
21553
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -21562,7 +21563,7 @@ import {
|
|
|
21562
21563
|
} from "react";
|
|
21563
21564
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
21564
21565
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
21565
|
-
import
|
|
21566
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
21566
21567
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
21567
21568
|
import { useContext as useContext19 } from "react";
|
|
21568
21569
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -21570,7 +21571,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
21570
21571
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
21571
21572
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
21572
21573
|
import { useCallback as useCallback13 } from "react";
|
|
21573
|
-
import
|
|
21574
|
+
import React23, {
|
|
21574
21575
|
forwardRef as forwardRef5,
|
|
21575
21576
|
useContext as useContext28,
|
|
21576
21577
|
useEffect as useEffect14,
|
|
@@ -21580,7 +21581,7 @@ import React22, {
|
|
|
21580
21581
|
useState as useState14
|
|
21581
21582
|
} from "react";
|
|
21582
21583
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
21583
|
-
import
|
|
21584
|
+
import React20, {
|
|
21584
21585
|
createContext as createContext21,
|
|
21585
21586
|
createRef as createRef2,
|
|
21586
21587
|
useCallback as useCallback9,
|
|
@@ -21604,7 +21605,7 @@ import {
|
|
|
21604
21605
|
} from "react";
|
|
21605
21606
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
21606
21607
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
21607
|
-
import
|
|
21608
|
+
import React21, {
|
|
21608
21609
|
useCallback as useCallback10,
|
|
21609
21610
|
useContext as useContext24,
|
|
21610
21611
|
useEffect as useEffect9,
|
|
@@ -21614,7 +21615,7 @@ import React20, {
|
|
|
21614
21615
|
useState as useState12
|
|
21615
21616
|
} from "react";
|
|
21616
21617
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
21617
|
-
import
|
|
21618
|
+
import React22 from "react";
|
|
21618
21619
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
21619
21620
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
21620
21621
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -21672,10 +21673,10 @@ import {
|
|
|
21672
21673
|
useState as useState18
|
|
21673
21674
|
} from "react";
|
|
21674
21675
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
21675
|
-
import
|
|
21676
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
21676
21677
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
21677
21678
|
import { createRef as createRef3 } from "react";
|
|
21678
|
-
import
|
|
21679
|
+
import React31 from "react";
|
|
21679
21680
|
import {
|
|
21680
21681
|
useCallback as useCallback21,
|
|
21681
21682
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -21684,14 +21685,14 @@ import {
|
|
|
21684
21685
|
useState as useState19
|
|
21685
21686
|
} from "react";
|
|
21686
21687
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
21687
|
-
import
|
|
21688
|
+
import React32 from "react";
|
|
21688
21689
|
import { useMemo as useMemo34 } from "react";
|
|
21689
21690
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
21690
21691
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
21691
21692
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
21692
|
-
import
|
|
21693
|
-
import
|
|
21694
|
-
import
|
|
21693
|
+
import React34 from "react";
|
|
21694
|
+
import React35, { createContext as createContext25 } from "react";
|
|
21695
|
+
import React36, { useContext as useContext35 } from "react";
|
|
21695
21696
|
import { useCallback as useCallback24 } from "react";
|
|
21696
21697
|
import {
|
|
21697
21698
|
useCallback as useCallback22,
|
|
@@ -21702,7 +21703,7 @@ import {
|
|
|
21702
21703
|
useState as useState20
|
|
21703
21704
|
} from "react";
|
|
21704
21705
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
21705
|
-
import
|
|
21706
|
+
import React38, {
|
|
21706
21707
|
forwardRef as forwardRef13,
|
|
21707
21708
|
useCallback as useCallback23,
|
|
21708
21709
|
useContext as useContext37,
|
|
@@ -21715,16 +21716,15 @@ import React37, {
|
|
|
21715
21716
|
import { useEffect as useEffect18 } from "react";
|
|
21716
21717
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
21717
21718
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
21718
|
-
import
|
|
21719
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
21719
21720
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
21720
|
-
import {
|
|
21721
|
-
Children,
|
|
21721
|
+
import React42, {
|
|
21722
21722
|
forwardRef as forwardRef14,
|
|
21723
21723
|
useMemo as useMemo38
|
|
21724
21724
|
} from "react";
|
|
21725
|
-
import
|
|
21726
|
-
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
21727
|
-
import
|
|
21725
|
+
import React41 from "react";
|
|
21726
|
+
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
21727
|
+
import React43 from "react";
|
|
21728
21728
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
21729
21729
|
import {
|
|
21730
21730
|
forwardRef as forwardRef15,
|
|
@@ -22802,6 +22802,7 @@ var InnerComposition = ({
|
|
|
22802
22802
|
}
|
|
22803
22803
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
22804
22804
|
const stack = compProps.stack ?? null;
|
|
22805
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
22805
22806
|
useEffect2(() => {
|
|
22806
22807
|
if (!id) {
|
|
22807
22808
|
throw new Error("No id for composition passed.");
|
|
@@ -22819,6 +22820,7 @@ var InnerComposition = ({
|
|
|
22819
22820
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
22820
22821
|
nonce: nonce.get(),
|
|
22821
22822
|
parentFolderName: parentName,
|
|
22823
|
+
componentFromProps,
|
|
22822
22824
|
schema: schema ?? null,
|
|
22823
22825
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
22824
22826
|
stack
|
|
@@ -22837,6 +22839,7 @@ var InnerComposition = ({
|
|
|
22837
22839
|
width,
|
|
22838
22840
|
nonce,
|
|
22839
22841
|
parentName,
|
|
22842
|
+
componentFromProps,
|
|
22840
22843
|
schema,
|
|
22841
22844
|
compProps.calculateMetadata,
|
|
22842
22845
|
stack,
|
|
@@ -22895,11 +22898,30 @@ var Composition = (props) => {
|
|
|
22895
22898
|
});
|
|
22896
22899
|
};
|
|
22897
22900
|
var componentsToAddStacksTo = [];
|
|
22901
|
+
var sequenceComponent = null;
|
|
22898
22902
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
22899
22903
|
var addSequenceStackTraces = (component) => {
|
|
22900
22904
|
componentsToAddStacksTo.push(component);
|
|
22901
22905
|
};
|
|
22902
|
-
var
|
|
22906
|
+
var setSequenceComponent = (component) => {
|
|
22907
|
+
sequenceComponent = component;
|
|
22908
|
+
};
|
|
22909
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
22910
|
+
var getSingleChildComponent = (children) => {
|
|
22911
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
22912
|
+
if (mountedChildren.length !== 1) {
|
|
22913
|
+
return null;
|
|
22914
|
+
}
|
|
22915
|
+
const child = mountedChildren[0];
|
|
22916
|
+
if (!React9.isValidElement(child)) {
|
|
22917
|
+
return null;
|
|
22918
|
+
}
|
|
22919
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
22920
|
+
return null;
|
|
22921
|
+
}
|
|
22922
|
+
return child.type;
|
|
22923
|
+
};
|
|
22924
|
+
var VERSION = "4.0.492";
|
|
22903
22925
|
var checkMultipleRemotionVersions = () => {
|
|
22904
22926
|
if (typeof globalThis === "undefined") {
|
|
22905
22927
|
return;
|
|
@@ -23499,7 +23521,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
23499
23521
|
var PremountContext = createContext14({
|
|
23500
23522
|
premountFramesRemaining: 0
|
|
23501
23523
|
});
|
|
23502
|
-
var SequenceManager =
|
|
23524
|
+
var SequenceManager = React12.createContext({
|
|
23503
23525
|
registerSequence: () => {
|
|
23504
23526
|
throw new Error("SequenceManagerContext not initialized");
|
|
23505
23527
|
},
|
|
@@ -23508,19 +23530,19 @@ var SequenceManager = React11.createContext({
|
|
|
23508
23530
|
},
|
|
23509
23531
|
sequences: []
|
|
23510
23532
|
});
|
|
23511
|
-
var SequenceManagerRefContext =
|
|
23533
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
23512
23534
|
current: []
|
|
23513
23535
|
});
|
|
23514
23536
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
23515
|
-
return `${key.nodePath.join(".")}
|
|
23537
|
+
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
23516
23538
|
};
|
|
23517
|
-
var VisualModePropStatusesContext =
|
|
23539
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
23518
23540
|
propStatuses: {}
|
|
23519
23541
|
});
|
|
23520
|
-
var VisualModePropStatusesRefContext =
|
|
23542
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
23521
23543
|
current: {}
|
|
23522
23544
|
});
|
|
23523
|
-
var VisualModeDragOverridesContext =
|
|
23545
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
23524
23546
|
getDragOverrides: () => {
|
|
23525
23547
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
23526
23548
|
},
|
|
@@ -23528,7 +23550,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
23528
23550
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
23529
23551
|
}
|
|
23530
23552
|
});
|
|
23531
|
-
var VisualModeSettersContext =
|
|
23553
|
+
var VisualModeSettersContext = React12.createContext({
|
|
23532
23554
|
setDragOverrides: () => {
|
|
23533
23555
|
throw new Error("VisualModeSettersContext not initialized");
|
|
23534
23556
|
},
|
|
@@ -23692,7 +23714,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
23692
23714
|
});
|
|
23693
23715
|
};
|
|
23694
23716
|
var useRequireToBeInsideSeries = () => {
|
|
23695
|
-
const isInsideSeries =
|
|
23717
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
23696
23718
|
if (!isInsideSeries) {
|
|
23697
23719
|
throw new Error("This component must be inside a <Series /> component.");
|
|
23698
23720
|
}
|
|
@@ -25761,6 +25783,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
25761
25783
|
shouldResortToDefaultValueIfUndefined: false
|
|
25762
25784
|
});
|
|
25763
25785
|
}
|
|
25786
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
25787
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
25788
|
+
}
|
|
25764
25789
|
if (value === undefined) {
|
|
25765
25790
|
propsToDelete.add(key);
|
|
25766
25791
|
}
|
|
@@ -25859,7 +25884,7 @@ var withInteractivitySchema = ({
|
|
|
25859
25884
|
const Wrapped = forwardRef2((props, ref) => {
|
|
25860
25885
|
const env = useRemotionEnvironment();
|
|
25861
25886
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
25862
|
-
return
|
|
25887
|
+
return React14.createElement(Component, {
|
|
25863
25888
|
...props,
|
|
25864
25889
|
controls: null,
|
|
25865
25890
|
ref
|
|
@@ -25870,7 +25895,7 @@ var withInteractivitySchema = ({
|
|
|
25870
25895
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
25871
25896
|
const frame = useCurrentFrame();
|
|
25872
25897
|
if (props.controls) {
|
|
25873
|
-
return
|
|
25898
|
+
return React14.createElement(Component, {
|
|
25874
25899
|
...props,
|
|
25875
25900
|
ref
|
|
25876
25901
|
});
|
|
@@ -25928,7 +25953,7 @@ var withInteractivitySchema = ({
|
|
|
25928
25953
|
schemaKeys: activeKeys,
|
|
25929
25954
|
propsToDelete
|
|
25930
25955
|
});
|
|
25931
|
-
return
|
|
25956
|
+
return React14.createElement(Component, {
|
|
25932
25957
|
...mergedProps,
|
|
25933
25958
|
controls,
|
|
25934
25959
|
ref
|
|
@@ -25954,6 +25979,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25954
25979
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
25955
25980
|
_remotionInternalStack: stack,
|
|
25956
25981
|
_remotionInternalDocumentationLink: documentationLink,
|
|
25982
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
25957
25983
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
25958
25984
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
25959
25985
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -26100,7 +26126,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26100
26126
|
getStack: () => stackRef.current,
|
|
26101
26127
|
refForOutline: refForOutline ?? null,
|
|
26102
26128
|
isInsideSeries,
|
|
26103
|
-
frozenFrame: registeredFrozenFrame
|
|
26129
|
+
frozenFrame: registeredFrozenFrame,
|
|
26130
|
+
singleChildComponent: singleChildComponent ?? null
|
|
26104
26131
|
});
|
|
26105
26132
|
} else {
|
|
26106
26133
|
registerSequence({
|
|
@@ -26125,11 +26152,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26125
26152
|
src: isMedia.data.src,
|
|
26126
26153
|
getStack: () => stackRef.current,
|
|
26127
26154
|
startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
|
|
26155
|
+
mediaFrameAtSequenceZero,
|
|
26128
26156
|
volume: isMedia.data.volumes,
|
|
26129
26157
|
refForOutline: refForOutline ?? null,
|
|
26130
26158
|
isInsideSeries,
|
|
26131
26159
|
frozenFrame: registeredFrozenFrame,
|
|
26132
|
-
frozenMediaFrame
|
|
26160
|
+
frozenMediaFrame,
|
|
26161
|
+
singleChildComponent: singleChildComponent ?? null
|
|
26133
26162
|
});
|
|
26134
26163
|
}
|
|
26135
26164
|
return () => {
|
|
@@ -26156,7 +26185,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26156
26185
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
26157
26186
|
refForOutline: refForOutline ?? null,
|
|
26158
26187
|
isInsideSeries,
|
|
26159
|
-
frozenFrame: registeredFrozenFrame
|
|
26188
|
+
frozenFrame: registeredFrozenFrame,
|
|
26189
|
+
singleChildComponent: singleChildComponent ?? null
|
|
26160
26190
|
});
|
|
26161
26191
|
return () => {
|
|
26162
26192
|
unregisterSequence(id);
|
|
@@ -26188,7 +26218,9 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26188
26218
|
isInsideSeries,
|
|
26189
26219
|
registeredFrozenFrame,
|
|
26190
26220
|
startMediaFrom,
|
|
26191
|
-
|
|
26221
|
+
mediaFrameAtSequenceZero,
|
|
26222
|
+
frozenMediaFrame,
|
|
26223
|
+
singleChildComponent
|
|
26192
26224
|
]);
|
|
26193
26225
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
26194
26226
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -26690,7 +26722,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
26690
26722
|
...props
|
|
26691
26723
|
});
|
|
26692
26724
|
};
|
|
26693
|
-
var Canvas =
|
|
26725
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
26694
26726
|
var CACHE_SIZE = 5;
|
|
26695
26727
|
var getActualTime = ({
|
|
26696
26728
|
loopBehavior,
|
|
@@ -26851,6 +26883,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
26851
26883
|
return new URL(src, window.origin).href;
|
|
26852
26884
|
};
|
|
26853
26885
|
var animatedImageSchema = {
|
|
26886
|
+
src: {
|
|
26887
|
+
type: "asset",
|
|
26888
|
+
default: undefined,
|
|
26889
|
+
description: "Source",
|
|
26890
|
+
keyframable: false
|
|
26891
|
+
},
|
|
26854
26892
|
...baseSchema,
|
|
26855
26893
|
playbackRate: {
|
|
26856
26894
|
type: "number",
|
|
@@ -27268,7 +27306,7 @@ var calculateMediaDuration = ({
|
|
|
27268
27306
|
};
|
|
27269
27307
|
var LoopContext = createContext18(null);
|
|
27270
27308
|
var useLoop = () => {
|
|
27271
|
-
return
|
|
27309
|
+
return React17.useContext(LoopContext);
|
|
27272
27310
|
};
|
|
27273
27311
|
var Loop = ({
|
|
27274
27312
|
durationInFrames,
|
|
@@ -28119,7 +28157,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28119
28157
|
};
|
|
28120
28158
|
});
|
|
28121
28159
|
}, [audioContext, numberOfAudioTags]);
|
|
28122
|
-
const effectToUse =
|
|
28160
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
28123
28161
|
effectToUse(() => {
|
|
28124
28162
|
return () => {
|
|
28125
28163
|
requestAnimationFrame(() => {
|
|
@@ -28138,7 +28176,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28138
28176
|
return;
|
|
28139
28177
|
}
|
|
28140
28178
|
if (data === undefined) {
|
|
28141
|
-
current.src
|
|
28179
|
+
if (current.src !== EMPTY_AUDIO) {
|
|
28180
|
+
current.src = EMPTY_AUDIO;
|
|
28181
|
+
}
|
|
28142
28182
|
return;
|
|
28143
28183
|
}
|
|
28144
28184
|
if (!data) {
|
|
@@ -28207,7 +28247,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28207
28247
|
if (prevA.id === id) {
|
|
28208
28248
|
const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
|
|
28209
28249
|
if (isTheSame) {
|
|
28210
|
-
return prevA;
|
|
28250
|
+
return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
|
|
28211
28251
|
}
|
|
28212
28252
|
changed = true;
|
|
28213
28253
|
return {
|
|
@@ -28219,7 +28259,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28219
28259
|
audioMounted
|
|
28220
28260
|
};
|
|
28221
28261
|
}
|
|
28222
|
-
return prevA;
|
|
28262
|
+
return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
|
|
28223
28263
|
});
|
|
28224
28264
|
if (changed) {
|
|
28225
28265
|
rerenderAudios();
|
|
@@ -28258,16 +28298,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28258
28298
|
unregisterAudio,
|
|
28259
28299
|
updateAudio
|
|
28260
28300
|
]);
|
|
28301
|
+
const sharedAudioTagElements = useMemo21(() => {
|
|
28302
|
+
return refs.map(({ id, ref }) => {
|
|
28303
|
+
return /* @__PURE__ */ jsx19("audio", {
|
|
28304
|
+
ref,
|
|
28305
|
+
preload: "metadata",
|
|
28306
|
+
src: EMPTY_AUDIO
|
|
28307
|
+
}, id);
|
|
28308
|
+
});
|
|
28309
|
+
}, [refs]);
|
|
28261
28310
|
return /* @__PURE__ */ jsxs2(SharedAudioTagsContext.Provider, {
|
|
28262
28311
|
value: audioTagsValue,
|
|
28263
28312
|
children: [
|
|
28264
|
-
|
|
28265
|
-
return /* @__PURE__ */ jsx19("audio", {
|
|
28266
|
-
ref,
|
|
28267
|
-
preload: "metadata",
|
|
28268
|
-
src: EMPTY_AUDIO
|
|
28269
|
-
}, id);
|
|
28270
|
-
}),
|
|
28313
|
+
sharedAudioTagElements,
|
|
28271
28314
|
children
|
|
28272
28315
|
]
|
|
28273
28316
|
});
|
|
@@ -28284,7 +28327,7 @@ var useSharedAudio = ({
|
|
|
28284
28327
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
28285
28328
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
28286
28329
|
}
|
|
28287
|
-
const el =
|
|
28330
|
+
const el = React20.createRef();
|
|
28288
28331
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
28289
28332
|
audioContext: audioCtx.audioContext,
|
|
28290
28333
|
ref: el
|
|
@@ -28303,7 +28346,7 @@ var useSharedAudio = ({
|
|
|
28303
28346
|
}
|
|
28304
28347
|
};
|
|
28305
28348
|
});
|
|
28306
|
-
const effectToUse =
|
|
28349
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
28307
28350
|
if (typeof document !== "undefined") {
|
|
28308
28351
|
effectToUse(() => {
|
|
28309
28352
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -28728,6 +28771,7 @@ var useMediaInTimeline = ({
|
|
|
28728
28771
|
showInTimeline: true,
|
|
28729
28772
|
nonce: nonce.get(),
|
|
28730
28773
|
startMediaFrom: 0 - startsAt,
|
|
28774
|
+
mediaFrameAtSequenceZero: null,
|
|
28731
28775
|
doesVolumeChange,
|
|
28732
28776
|
loopDisplay,
|
|
28733
28777
|
playbackRate,
|
|
@@ -28854,7 +28898,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28854
28898
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
28855
28899
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
28856
28900
|
};
|
|
28857
|
-
var BufferingContextReact =
|
|
28901
|
+
var BufferingContextReact = React21.createContext(null);
|
|
28858
28902
|
var BufferingProvider = ({ children }) => {
|
|
28859
28903
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
28860
28904
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -29067,7 +29111,7 @@ var getMediaSyncAction = (input) => {
|
|
|
29067
29111
|
return { type: "none" };
|
|
29068
29112
|
};
|
|
29069
29113
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
29070
|
-
const lastUpdate =
|
|
29114
|
+
const lastUpdate = React22.useRef({
|
|
29071
29115
|
time: mediaRef.current?.currentTime ?? 0,
|
|
29072
29116
|
lastUpdate: performance.now()
|
|
29073
29117
|
});
|
|
@@ -29820,7 +29864,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29820
29864
|
volume: userPreferredVolume,
|
|
29821
29865
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
29822
29866
|
});
|
|
29823
|
-
const effectToUse =
|
|
29867
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
29824
29868
|
effectToUse(() => {
|
|
29825
29869
|
return () => {
|
|
29826
29870
|
requestAnimationFrame(() => {
|
|
@@ -30361,16 +30405,16 @@ var isMissingPaintRecordError = (error2) => {
|
|
|
30361
30405
|
return error2 instanceof DOMException && error2.name === "InvalidStateError";
|
|
30362
30406
|
};
|
|
30363
30407
|
var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
|
|
30364
|
-
var
|
|
30365
|
-
|
|
30408
|
+
var resizePaintTarget = ({
|
|
30409
|
+
target,
|
|
30366
30410
|
width,
|
|
30367
30411
|
height
|
|
30368
30412
|
}) => {
|
|
30369
|
-
if (
|
|
30370
|
-
|
|
30413
|
+
if (target.width !== width) {
|
|
30414
|
+
target.width = width;
|
|
30371
30415
|
}
|
|
30372
|
-
if (
|
|
30373
|
-
|
|
30416
|
+
if (target.height !== height) {
|
|
30417
|
+
target.height = height;
|
|
30374
30418
|
}
|
|
30375
30419
|
};
|
|
30376
30420
|
var defaultOnPaint = ({
|
|
@@ -30386,7 +30430,7 @@ var defaultOnPaint = ({
|
|
|
30386
30430
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
30387
30431
|
element.style.transform = transform.toString();
|
|
30388
30432
|
};
|
|
30389
|
-
var HtmlInCanvasAncestorContext = createContext23(
|
|
30433
|
+
var HtmlInCanvasAncestorContext = createContext23(null);
|
|
30390
30434
|
var HtmlInCanvasContent = forwardRef9(({
|
|
30391
30435
|
width,
|
|
30392
30436
|
height,
|
|
@@ -30398,20 +30442,22 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30398
30442
|
controls,
|
|
30399
30443
|
style
|
|
30400
30444
|
}, ref) => {
|
|
30401
|
-
const
|
|
30445
|
+
const ancestor = useContext31(HtmlInCanvasAncestorContext);
|
|
30402
30446
|
assertHtmlInCanvasDimensions(width, height);
|
|
30403
30447
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
30404
30448
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
30405
30449
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
30406
30450
|
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
30407
|
-
const { isRendering } = useRemotionEnvironment();
|
|
30451
|
+
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
30452
|
+
const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
|
|
30453
|
+
const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
|
|
30408
30454
|
if (!isHtmlInCanvasSupported()) {
|
|
30409
30455
|
cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
|
|
30410
30456
|
}
|
|
30411
30457
|
const canvas2dRef = useRef22(null);
|
|
30412
|
-
const
|
|
30458
|
+
const paintTargetRef = useRef22(null);
|
|
30413
30459
|
const divRef = useRef22(null);
|
|
30414
|
-
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
30460
|
+
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
|
|
30415
30461
|
const setLayoutCanvasRef = useCallback16((node) => {
|
|
30416
30462
|
canvas2dRef.current = node;
|
|
30417
30463
|
if (typeof ref === "function") {
|
|
@@ -30434,17 +30480,19 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30434
30480
|
const initializedRef = useRef22(false);
|
|
30435
30481
|
const onInitCleanupRef = useRef22(null);
|
|
30436
30482
|
const unmountedRef = useRef22(false);
|
|
30483
|
+
const ancestorRef = useRef22(ancestor);
|
|
30484
|
+
ancestorRef.current = ancestor;
|
|
30437
30485
|
const onPaintCb = useCallback16(async () => {
|
|
30438
30486
|
const element = divRef.current;
|
|
30439
30487
|
if (!element) {
|
|
30440
30488
|
throw new Error("Canvas or scene element not found");
|
|
30441
30489
|
}
|
|
30442
|
-
const
|
|
30443
|
-
if (!
|
|
30444
|
-
throw new Error("HtmlInCanvas:
|
|
30490
|
+
const paintTarget = paintTargetRef.current;
|
|
30491
|
+
if (!paintTarget) {
|
|
30492
|
+
throw new Error("HtmlInCanvas: paint target is not ready because the canvas is remounting");
|
|
30445
30493
|
}
|
|
30446
|
-
|
|
30447
|
-
|
|
30494
|
+
resizePaintTarget({
|
|
30495
|
+
target: paintTarget,
|
|
30448
30496
|
width: canvasWidth,
|
|
30449
30497
|
height: canvasHeight
|
|
30450
30498
|
});
|
|
@@ -30455,22 +30503,30 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30455
30503
|
}
|
|
30456
30504
|
const handle = delayRender("onPaint");
|
|
30457
30505
|
if (!initializedRef.current) {
|
|
30458
|
-
|
|
30459
|
-
|
|
30460
|
-
|
|
30461
|
-
}
|
|
30462
|
-
|
|
30463
|
-
|
|
30464
|
-
|
|
30506
|
+
const currentOnInit = onInitRef.current;
|
|
30507
|
+
if (!currentOnInit) {
|
|
30508
|
+
initializedRef.current = true;
|
|
30509
|
+
} else {
|
|
30510
|
+
let initImage;
|
|
30511
|
+
try {
|
|
30512
|
+
initImage = placeholderCanvas.captureElementImage(element);
|
|
30513
|
+
} catch (error2) {
|
|
30514
|
+
if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
|
|
30515
|
+
continueRender2(handle);
|
|
30516
|
+
return;
|
|
30517
|
+
}
|
|
30518
|
+
if (isMissingPaintRecordError(error2)) {
|
|
30519
|
+
throw new Error(missingPaintRecordMessage);
|
|
30520
|
+
}
|
|
30465
30521
|
throw error2;
|
|
30466
30522
|
}
|
|
30467
|
-
}
|
|
30468
|
-
if (initImage) {
|
|
30469
30523
|
initializedRef.current = true;
|
|
30470
|
-
|
|
30471
|
-
|
|
30524
|
+
try {
|
|
30525
|
+
if (paintTarget instanceof HTMLCanvasElement) {
|
|
30526
|
+
throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
|
|
30527
|
+
}
|
|
30472
30528
|
const cleanup = await currentOnInit({
|
|
30473
|
-
canvas:
|
|
30529
|
+
canvas: paintTarget,
|
|
30474
30530
|
element,
|
|
30475
30531
|
elementImage: initImage,
|
|
30476
30532
|
pixelDensity: resolvedPixelDensity
|
|
@@ -30483,15 +30539,16 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30483
30539
|
} else {
|
|
30484
30540
|
onInitCleanupRef.current = cleanup;
|
|
30485
30541
|
}
|
|
30542
|
+
} finally {
|
|
30543
|
+
initImage.close();
|
|
30486
30544
|
}
|
|
30487
30545
|
}
|
|
30488
30546
|
}
|
|
30489
|
-
const handler = onPaintRef.current ?? defaultOnPaint;
|
|
30490
30547
|
let elImage;
|
|
30491
30548
|
try {
|
|
30492
30549
|
elImage = placeholderCanvas.captureElementImage(element);
|
|
30493
30550
|
} catch (error2) {
|
|
30494
|
-
if (isMissingPaintRecordError(error2) &&
|
|
30551
|
+
if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
|
|
30495
30552
|
continueRender2(handle);
|
|
30496
30553
|
return;
|
|
30497
30554
|
}
|
|
@@ -30500,20 +30557,41 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30500
30557
|
}
|
|
30501
30558
|
throw error2;
|
|
30502
30559
|
}
|
|
30503
|
-
|
|
30504
|
-
|
|
30505
|
-
|
|
30506
|
-
|
|
30507
|
-
|
|
30508
|
-
|
|
30509
|
-
|
|
30510
|
-
|
|
30511
|
-
|
|
30512
|
-
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
|
|
30516
|
-
|
|
30560
|
+
try {
|
|
30561
|
+
const currentOnPaint = onPaintRef.current;
|
|
30562
|
+
if (currentOnPaint) {
|
|
30563
|
+
if (paintTarget instanceof HTMLCanvasElement) {
|
|
30564
|
+
throw new Error("HtmlInCanvas: onPaint requires an OffscreenCanvas paint target");
|
|
30565
|
+
}
|
|
30566
|
+
const paintResult = currentOnPaint({
|
|
30567
|
+
canvas: paintTarget,
|
|
30568
|
+
element,
|
|
30569
|
+
elementImage: elImage,
|
|
30570
|
+
pixelDensity: resolvedPixelDensity
|
|
30571
|
+
});
|
|
30572
|
+
if (paintResult) {
|
|
30573
|
+
await paintResult;
|
|
30574
|
+
}
|
|
30575
|
+
} else {
|
|
30576
|
+
defaultOnPaint({
|
|
30577
|
+
canvas: paintTarget,
|
|
30578
|
+
element,
|
|
30579
|
+
elementImage: elImage,
|
|
30580
|
+
pixelDensity: resolvedPixelDensity
|
|
30581
|
+
});
|
|
30582
|
+
}
|
|
30583
|
+
await runEffectChain({
|
|
30584
|
+
state: chainState.get(canvasWidth, canvasHeight),
|
|
30585
|
+
source: paintTarget,
|
|
30586
|
+
effects: effectsRef.current,
|
|
30587
|
+
output: paintTarget,
|
|
30588
|
+
width: canvasWidth,
|
|
30589
|
+
height: canvasHeight
|
|
30590
|
+
});
|
|
30591
|
+
} finally {
|
|
30592
|
+
elImage.close();
|
|
30593
|
+
}
|
|
30594
|
+
ancestorRef.current?.requestParentPaint();
|
|
30517
30595
|
continueRender2(handle);
|
|
30518
30596
|
} catch (error2) {
|
|
30519
30597
|
cancelRender2(error2);
|
|
@@ -30525,7 +30603,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30525
30603
|
continueRender2,
|
|
30526
30604
|
cancelRender2,
|
|
30527
30605
|
resolvedPixelDensity,
|
|
30528
|
-
|
|
30606
|
+
canRetryMissingPaintRecord
|
|
30529
30607
|
]);
|
|
30530
30608
|
useLayoutEffect9(() => {
|
|
30531
30609
|
const placeholder = canvas2dRef.current;
|
|
@@ -30533,10 +30611,10 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30533
30611
|
throw new Error("Canvas not found");
|
|
30534
30612
|
}
|
|
30535
30613
|
placeholder.layoutSubtree = true;
|
|
30536
|
-
const
|
|
30537
|
-
|
|
30538
|
-
|
|
30539
|
-
|
|
30614
|
+
const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
|
|
30615
|
+
paintTargetRef.current = paintTarget;
|
|
30616
|
+
resizePaintTarget({
|
|
30617
|
+
target: paintTarget,
|
|
30540
30618
|
width: canvasWidth,
|
|
30541
30619
|
height: canvasHeight
|
|
30542
30620
|
});
|
|
@@ -30545,13 +30623,19 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30545
30623
|
placeholder.addEventListener("paint", onPaintCb);
|
|
30546
30624
|
return () => {
|
|
30547
30625
|
placeholder.removeEventListener("paint", onPaintCb);
|
|
30548
|
-
|
|
30626
|
+
paintTargetRef.current = null;
|
|
30549
30627
|
initializedRef.current = false;
|
|
30550
30628
|
unmountedRef.current = true;
|
|
30551
30629
|
onInitCleanupRef.current?.();
|
|
30552
30630
|
onInitCleanupRef.current = null;
|
|
30553
30631
|
};
|
|
30554
|
-
}, [
|
|
30632
|
+
}, [
|
|
30633
|
+
onPaintCb,
|
|
30634
|
+
cancelRender2,
|
|
30635
|
+
canvasWidth,
|
|
30636
|
+
canvasHeight,
|
|
30637
|
+
usesDirectLayoutCanvas
|
|
30638
|
+
]);
|
|
30555
30639
|
const onPaintChangedRef = useRef22(false);
|
|
30556
30640
|
useLayoutEffect9(() => {
|
|
30557
30641
|
if (!onPaintChangedRef.current) {
|
|
@@ -30590,11 +30674,15 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30590
30674
|
...style ?? {}
|
|
30591
30675
|
};
|
|
30592
30676
|
}, [height, style, width]);
|
|
30593
|
-
|
|
30594
|
-
|
|
30595
|
-
|
|
30677
|
+
const ancestorValue = useMemo30(() => {
|
|
30678
|
+
return {
|
|
30679
|
+
requestParentPaint: () => {
|
|
30680
|
+
canvas2dRef.current?.requestPaint?.();
|
|
30681
|
+
}
|
|
30682
|
+
};
|
|
30683
|
+
}, []);
|
|
30596
30684
|
return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
|
|
30597
|
-
value:
|
|
30685
|
+
value: ancestorValue,
|
|
30598
30686
|
children: /* @__PURE__ */ jsx25("canvas", {
|
|
30599
30687
|
ref: setLayoutCanvasRef,
|
|
30600
30688
|
width: canvasWidth,
|
|
@@ -31322,6 +31410,12 @@ var NativeImgInner = ({
|
|
|
31322
31410
|
};
|
|
31323
31411
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
31324
31412
|
var imgSchema = {
|
|
31413
|
+
src: {
|
|
31414
|
+
type: "asset",
|
|
31415
|
+
default: undefined,
|
|
31416
|
+
description: "Source",
|
|
31417
|
+
keyframable: false
|
|
31418
|
+
},
|
|
31325
31419
|
...baseSchema,
|
|
31326
31420
|
...transformSchema
|
|
31327
31421
|
};
|
|
@@ -31532,7 +31626,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
31532
31626
|
_remotionInternalStack: stack,
|
|
31533
31627
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
31534
31628
|
outlineRef: refForOutline,
|
|
31535
|
-
children:
|
|
31629
|
+
children: React30.createElement(tag, {
|
|
31536
31630
|
...props2,
|
|
31537
31631
|
ref: callbackRef
|
|
31538
31632
|
})
|
|
@@ -31596,7 +31690,7 @@ var Interactive = {
|
|
|
31596
31690
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
31597
31691
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
31598
31692
|
};
|
|
31599
|
-
var compositionsRef =
|
|
31693
|
+
var compositionsRef = React31.createRef();
|
|
31600
31694
|
var CompositionManagerProvider = ({
|
|
31601
31695
|
children,
|
|
31602
31696
|
onlyRenderComposition,
|
|
@@ -31745,7 +31839,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
31745
31839
|
var getPreviewDomElement = () => {
|
|
31746
31840
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
31747
31841
|
};
|
|
31748
|
-
var MaxMediaCacheSizeContext =
|
|
31842
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
31749
31843
|
var Root = null;
|
|
31750
31844
|
var listeners = [];
|
|
31751
31845
|
var getRoot = () => {
|
|
@@ -32018,7 +32112,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
32018
32112
|
};
|
|
32019
32113
|
}
|
|
32020
32114
|
};
|
|
32021
|
-
var SequenceStackTracesUpdateContext =
|
|
32115
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
32022
32116
|
var getEnvVariables = () => {
|
|
32023
32117
|
if (getRemotionEnvironment().isRendering) {
|
|
32024
32118
|
const param = window.remotion_envVariables;
|
|
@@ -32044,7 +32138,7 @@ var setupEnvVariables = () => {
|
|
|
32044
32138
|
window.process.env[key] = env[key];
|
|
32045
32139
|
});
|
|
32046
32140
|
};
|
|
32047
|
-
var CurrentScaleContext =
|
|
32141
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
32048
32142
|
var PreviewSizeContext = createContext25({
|
|
32049
32143
|
setSize: () => {
|
|
32050
32144
|
return;
|
|
@@ -32068,7 +32162,7 @@ var calculateScale = ({
|
|
|
32068
32162
|
}
|
|
32069
32163
|
return Number(previewSize);
|
|
32070
32164
|
};
|
|
32071
|
-
var PixelDensityContext =
|
|
32165
|
+
var PixelDensityContext = React36.createContext(null);
|
|
32072
32166
|
var getOffthreadVideoSource = ({
|
|
32073
32167
|
src,
|
|
32074
32168
|
transparent,
|
|
@@ -32335,7 +32429,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32335
32429
|
ref: videoRef
|
|
32336
32430
|
});
|
|
32337
32431
|
}, [context.audioContext]);
|
|
32338
|
-
const effectToUse =
|
|
32432
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
32339
32433
|
effectToUse(() => {
|
|
32340
32434
|
return () => {
|
|
32341
32435
|
requestAnimationFrame(() => {
|
|
@@ -32711,20 +32805,20 @@ var OffthreadVideo = ({
|
|
|
32711
32805
|
addSequenceStackTraces(OffthreadVideo);
|
|
32712
32806
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
32713
32807
|
function useRemotionContexts() {
|
|
32714
|
-
const compositionManagerCtx =
|
|
32715
|
-
const timelineContext =
|
|
32716
|
-
const setTimelineContext =
|
|
32717
|
-
const sequenceContext =
|
|
32718
|
-
const nonceContext =
|
|
32719
|
-
const canUseRemotionHooksContext =
|
|
32720
|
-
const preloadContext =
|
|
32721
|
-
const resolveCompositionContext =
|
|
32722
|
-
const renderAssetManagerContext =
|
|
32723
|
-
const sequenceManagerContext =
|
|
32724
|
-
const sequenceManagerRefContext =
|
|
32725
|
-
const visualModePropStatusesRefContext =
|
|
32726
|
-
const bufferManagerContext =
|
|
32727
|
-
const logLevelContext =
|
|
32808
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
32809
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
32810
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
32811
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
32812
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
32813
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
32814
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
32815
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
32816
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
32817
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
32818
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
32819
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
32820
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
32821
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
32728
32822
|
return useMemo37(() => ({
|
|
32729
32823
|
compositionManagerCtx,
|
|
32730
32824
|
timelineContext,
|
|
@@ -32898,6 +32992,8 @@ var Internals = {
|
|
|
32898
32992
|
BufferingProvider,
|
|
32899
32993
|
BufferingContextReact,
|
|
32900
32994
|
getComponentsToAddStacksTo,
|
|
32995
|
+
getSequenceComponent,
|
|
32996
|
+
getSingleChildComponent,
|
|
32901
32997
|
CurrentScaleContext,
|
|
32902
32998
|
PixelDensityContext,
|
|
32903
32999
|
PreviewSizeContext,
|
|
@@ -32955,75 +33051,139 @@ var Internals = {
|
|
|
32955
33051
|
fromField
|
|
32956
33052
|
};
|
|
32957
33053
|
var flattenChildren = (children) => {
|
|
32958
|
-
const childrenArray =
|
|
33054
|
+
const childrenArray = React41.Children.toArray(children);
|
|
32959
33055
|
return childrenArray.reduce((flatChildren, child) => {
|
|
32960
|
-
if (child.type ===
|
|
33056
|
+
if (child.type === React41.Fragment) {
|
|
32961
33057
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
32962
33058
|
}
|
|
32963
33059
|
flatChildren.push(child);
|
|
32964
33060
|
return flatChildren;
|
|
32965
33061
|
}, []);
|
|
32966
33062
|
};
|
|
32967
|
-
var
|
|
33063
|
+
var seriesSequenceSchema = {
|
|
33064
|
+
durationInFrames: Interactive.baseSchema.durationInFrames,
|
|
33065
|
+
name: Interactive.sequenceSchema.name,
|
|
33066
|
+
hidden: Interactive.sequenceSchema.hidden,
|
|
33067
|
+
showInTimeline: Interactive.sequenceSchema.showInTimeline,
|
|
33068
|
+
freeze: Interactive.baseSchema.freeze,
|
|
33069
|
+
layout: Interactive.sequenceSchema.layout
|
|
33070
|
+
};
|
|
33071
|
+
var SeriesSequenceInner = forwardRef14(({
|
|
33072
|
+
offset = 0,
|
|
33073
|
+
className = "",
|
|
33074
|
+
stack = null,
|
|
33075
|
+
_remotionInternalRender = null,
|
|
33076
|
+
...props2
|
|
33077
|
+
}, ref) => {
|
|
32968
33078
|
useRequireToBeInsideSeries();
|
|
33079
|
+
if (_remotionInternalRender) {
|
|
33080
|
+
return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
|
|
33081
|
+
}
|
|
32969
33082
|
return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
|
|
32970
|
-
children
|
|
33083
|
+
children: props2.children
|
|
32971
33084
|
});
|
|
32972
|
-
};
|
|
32973
|
-
var SeriesSequence =
|
|
33085
|
+
});
|
|
33086
|
+
var SeriesSequence = Interactive.withSchema({
|
|
33087
|
+
Component: SeriesSequenceInner,
|
|
33088
|
+
componentName: "<Series.Sequence>",
|
|
33089
|
+
componentIdentity: "dev.remotion.remotion.Series.Sequence",
|
|
33090
|
+
schema: seriesSequenceSchema,
|
|
33091
|
+
supportsEffects: false
|
|
33092
|
+
});
|
|
32974
33093
|
var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
|
|
33094
|
+
var validateSeriesSequenceProps = ({
|
|
33095
|
+
durationInFrames,
|
|
33096
|
+
offset: offsetProp,
|
|
33097
|
+
index,
|
|
33098
|
+
childrenLength
|
|
33099
|
+
}) => {
|
|
33100
|
+
const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
|
|
33101
|
+
if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
|
|
33102
|
+
validateDurationInFrames(durationInFrames, {
|
|
33103
|
+
component: `of a <Series.Sequence /> component`,
|
|
33104
|
+
allowFloats: true
|
|
33105
|
+
});
|
|
33106
|
+
}
|
|
33107
|
+
const offset = offsetProp ?? 0;
|
|
33108
|
+
if (Number.isNaN(offset)) {
|
|
33109
|
+
throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
|
|
33110
|
+
}
|
|
33111
|
+
if (!Number.isFinite(offset)) {
|
|
33112
|
+
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33113
|
+
}
|
|
33114
|
+
if (offset % 1 !== 0) {
|
|
33115
|
+
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33116
|
+
}
|
|
33117
|
+
return offset;
|
|
33118
|
+
};
|
|
32975
33119
|
var SeriesInner = (props2) => {
|
|
32976
33120
|
const childrenValue = useMemo38(() => {
|
|
32977
|
-
let startFrame = 0;
|
|
32978
33121
|
const flattenedChildren = flattenChildren(props2.children);
|
|
32979
|
-
|
|
33122
|
+
const renderChildren = (i, startFrame) => {
|
|
33123
|
+
if (i === flattenedChildren.length) {
|
|
33124
|
+
return null;
|
|
33125
|
+
}
|
|
33126
|
+
const child = flattenedChildren[i];
|
|
32980
33127
|
const castedChild = child;
|
|
32981
33128
|
if (typeof castedChild === "string") {
|
|
32982
33129
|
if (castedChild.trim() === "") {
|
|
32983
|
-
return
|
|
33130
|
+
return renderChildren(i + 1, startFrame);
|
|
32984
33131
|
}
|
|
32985
33132
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
|
|
32986
33133
|
}
|
|
32987
33134
|
if (castedChild.type !== SeriesSequence) {
|
|
32988
33135
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
32989
33136
|
}
|
|
32990
|
-
const
|
|
32991
|
-
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
|
|
32995
|
-
|
|
32996
|
-
name,
|
|
32997
|
-
...passedProps
|
|
32998
|
-
} = castedChild.props;
|
|
32999
|
-
if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
|
|
33000
|
-
validateDurationInFrames(durationInFramesProp, {
|
|
33001
|
-
component: `of a <Series.Sequence /> component`,
|
|
33002
|
-
allowFloats: true
|
|
33003
|
-
});
|
|
33004
|
-
}
|
|
33005
|
-
const offset = castedChild.props.offset ?? 0;
|
|
33006
|
-
if (Number.isNaN(offset)) {
|
|
33007
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
|
|
33008
|
-
}
|
|
33009
|
-
if (!Number.isFinite(offset)) {
|
|
33010
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33011
|
-
}
|
|
33012
|
-
if (offset % 1 !== 0) {
|
|
33013
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33014
|
-
}
|
|
33015
|
-
const currentStartFrame = startFrame + offset;
|
|
33016
|
-
startFrame += durationInFramesProp + offset;
|
|
33017
|
-
return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
|
|
33018
|
-
ref: castedChild.ref,
|
|
33019
|
-
name: name || "<Series.Sequence>",
|
|
33020
|
-
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
33021
|
-
from: currentStartFrame,
|
|
33022
|
-
durationInFrames: durationInFramesProp,
|
|
33023
|
-
...passedProps,
|
|
33024
|
-
children: child
|
|
33137
|
+
const castedElement = castedChild;
|
|
33138
|
+
validateSeriesSequenceProps({
|
|
33139
|
+
durationInFrames: castedElement.props.durationInFrames,
|
|
33140
|
+
offset: castedElement.props.offset,
|
|
33141
|
+
index: i,
|
|
33142
|
+
childrenLength: flattenedChildren.length
|
|
33025
33143
|
});
|
|
33026
|
-
|
|
33144
|
+
return React42.cloneElement(castedElement, {
|
|
33145
|
+
_remotionInternalRender: (resolvedProps, ref) => {
|
|
33146
|
+
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
33147
|
+
const {
|
|
33148
|
+
durationInFrames: _durationInFrames,
|
|
33149
|
+
children: sequenceChildren,
|
|
33150
|
+
offset: offsetProp,
|
|
33151
|
+
controls,
|
|
33152
|
+
stack,
|
|
33153
|
+
from: _from,
|
|
33154
|
+
name,
|
|
33155
|
+
...passedProps
|
|
33156
|
+
} = resolvedProps;
|
|
33157
|
+
const offset = validateSeriesSequenceProps({
|
|
33158
|
+
durationInFrames: durationInFramesProp,
|
|
33159
|
+
offset: offsetProp,
|
|
33160
|
+
index: i,
|
|
33161
|
+
childrenLength: flattenedChildren.length
|
|
33162
|
+
});
|
|
33163
|
+
const currentStartFrame = startFrame + offset;
|
|
33164
|
+
const nextStartFrame = startFrame + durationInFramesProp + offset;
|
|
33165
|
+
return /* @__PURE__ */ jsxs3(Fragment, {
|
|
33166
|
+
children: [
|
|
33167
|
+
/* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
|
|
33168
|
+
ref,
|
|
33169
|
+
name: name || "<Series.Sequence>",
|
|
33170
|
+
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
33171
|
+
_remotionInternalStack: stack ?? undefined,
|
|
33172
|
+
controls: controls ?? undefined,
|
|
33173
|
+
from: currentStartFrame,
|
|
33174
|
+
durationInFrames: durationInFramesProp,
|
|
33175
|
+
...passedProps,
|
|
33176
|
+
children: /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
|
|
33177
|
+
children: sequenceChildren
|
|
33178
|
+
})
|
|
33179
|
+
}),
|
|
33180
|
+
renderChildren(i + 1, nextStartFrame)
|
|
33181
|
+
]
|
|
33182
|
+
});
|
|
33183
|
+
}
|
|
33184
|
+
});
|
|
33185
|
+
};
|
|
33186
|
+
return renderChildren(0, 0);
|
|
33027
33187
|
}, [props2.children]);
|
|
33028
33188
|
return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
|
|
33029
33189
|
children: /* @__PURE__ */ jsx37(Sequence, {
|
|
@@ -33139,7 +33299,7 @@ var Still = (props2) => {
|
|
|
33139
33299
|
durationInFrames: 1,
|
|
33140
33300
|
fps: 1
|
|
33141
33301
|
};
|
|
33142
|
-
return
|
|
33302
|
+
return React43.createElement(Composition, newProps);
|
|
33143
33303
|
};
|
|
33144
33304
|
addSequenceStackTraces(Still);
|
|
33145
33305
|
var roundTo6Commas = (num) => {
|
|
@@ -33618,13 +33778,14 @@ var Config = new Proxy(proxyObj, {
|
|
|
33618
33778
|
});
|
|
33619
33779
|
Sequence.displayName = "Sequence";
|
|
33620
33780
|
addSequenceStackTraces(Sequence);
|
|
33781
|
+
setSequenceComponent(Sequence);
|
|
33621
33782
|
addSequenceStackTraces(Composition);
|
|
33622
33783
|
addSequenceStackTraces(Folder);
|
|
33623
33784
|
|
|
33624
33785
|
// ../shapes/dist/esm/index.mjs
|
|
33625
33786
|
import React, { useCallback as useCallback26, useMemo as useMemo40, useRef as useRef29 } from "react";
|
|
33626
33787
|
import { version } from "react-dom";
|
|
33627
|
-
import { jsx as jsx40, jsxs as
|
|
33788
|
+
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
33628
33789
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
33629
33790
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
33630
33791
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
@@ -33826,7 +33987,7 @@ var RenderSvg = ({
|
|
|
33826
33987
|
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
|
|
33827
33988
|
const videoConfig = Internals.useUnsafeVideoConfig();
|
|
33828
33989
|
const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
|
|
33829
|
-
const svg = /* @__PURE__ */
|
|
33990
|
+
const svg = /* @__PURE__ */ jsxs4("svg", {
|
|
33830
33991
|
ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
|
|
33831
33992
|
width,
|
|
33832
33993
|
height,
|
|
@@ -33852,7 +34013,7 @@ var RenderSvg = ({
|
|
|
33852
34013
|
}
|
|
33853
34014
|
const prevX = prevInstruction.x;
|
|
33854
34015
|
const prevY = prevInstruction.y;
|
|
33855
|
-
return /* @__PURE__ */
|
|
34016
|
+
return /* @__PURE__ */ jsxs4(React.Fragment, {
|
|
33856
34017
|
children: [
|
|
33857
34018
|
/* @__PURE__ */ jsx40("path", {
|
|
33858
34019
|
d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
|
|
@@ -36534,7 +36695,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
36534
36695
|
|
|
36535
36696
|
// ../design/dist/esm/index.mjs
|
|
36536
36697
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
36537
|
-
import { jsx as jsx312, jsxs as
|
|
36698
|
+
import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
36538
36699
|
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
|
|
36539
36700
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
36540
36701
|
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -36547,12 +36708,12 @@ import React72 from "react";
|
|
|
36547
36708
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
36548
36709
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
36549
36710
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
36550
|
-
import * as
|
|
36711
|
+
import * as React362 from "react";
|
|
36551
36712
|
import * as ReactDOM4 from "react-dom";
|
|
36552
|
-
import
|
|
36713
|
+
import React11 from "react";
|
|
36553
36714
|
import * as React8 from "react";
|
|
36554
36715
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
36555
|
-
import * as
|
|
36716
|
+
import * as React92 from "react";
|
|
36556
36717
|
import * as React10 from "react";
|
|
36557
36718
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
36558
36719
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -36562,15 +36723,15 @@ import * as React162 from "react";
|
|
|
36562
36723
|
import * as React132 from "react";
|
|
36563
36724
|
import * as ReactDOM from "react-dom";
|
|
36564
36725
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
36565
|
-
import * as
|
|
36566
|
-
import * as
|
|
36726
|
+
import * as React142 from "react";
|
|
36727
|
+
import * as React15 from "react";
|
|
36567
36728
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
36568
|
-
import * as
|
|
36729
|
+
import * as React172 from "react";
|
|
36569
36730
|
import * as React18 from "react";
|
|
36570
36731
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
36571
36732
|
import * as React202 from "react";
|
|
36572
|
-
import * as
|
|
36573
|
-
import * as
|
|
36733
|
+
import * as React19 from "react";
|
|
36734
|
+
import * as React242 from "react";
|
|
36574
36735
|
import * as React212 from "react";
|
|
36575
36736
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
36576
36737
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -36588,30 +36749,30 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
36588
36749
|
import * as React352 from "react";
|
|
36589
36750
|
import * as React312 from "react";
|
|
36590
36751
|
import { useState as useState112 } from "react";
|
|
36591
|
-
import * as
|
|
36752
|
+
import * as React29 from "react";
|
|
36592
36753
|
import * as React302 from "react";
|
|
36593
36754
|
import * as React342 from "react";
|
|
36594
36755
|
import * as React332 from "react";
|
|
36595
36756
|
import * as React322 from "react";
|
|
36596
|
-
import { Fragment as Fragment8, jsx as jsx242, jsxs as
|
|
36757
|
+
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
36597
36758
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
36598
36759
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
36599
|
-
import * as
|
|
36600
|
-
import { jsx as jsx252, jsxs as
|
|
36760
|
+
import * as React37 from "react";
|
|
36761
|
+
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
36601
36762
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
36602
36763
|
import * as React49 from "react";
|
|
36603
|
-
import * as
|
|
36764
|
+
import * as React382 from "react";
|
|
36604
36765
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
36605
36766
|
import * as React47 from "react";
|
|
36606
36767
|
import React402 from "react";
|
|
36607
|
-
import * as
|
|
36608
|
-
import { Fragment as
|
|
36768
|
+
import * as React39 from "react";
|
|
36769
|
+
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
36609
36770
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
36610
36771
|
import React210 from "react";
|
|
36611
36772
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
36612
36773
|
import * as React422 from "react";
|
|
36613
|
-
import * as
|
|
36614
|
-
import * as
|
|
36774
|
+
import * as React412 from "react";
|
|
36775
|
+
import * as React432 from "react";
|
|
36615
36776
|
import * as ReactDOM5 from "react-dom";
|
|
36616
36777
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
36617
36778
|
import * as React44 from "react";
|
|
@@ -36663,7 +36824,7 @@ function useComposedRefs(...refs) {
|
|
|
36663
36824
|
return React3.useCallback(composeRefs(...refs), refs);
|
|
36664
36825
|
}
|
|
36665
36826
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
36666
|
-
var use =
|
|
36827
|
+
var use = React24[" use ".trim().toString()];
|
|
36667
36828
|
function isPromiseLike(value) {
|
|
36668
36829
|
return typeof value === "object" && value !== null && "then" in value;
|
|
36669
36830
|
}
|
|
@@ -36672,25 +36833,25 @@ function isLazyComponent(element) {
|
|
|
36672
36833
|
}
|
|
36673
36834
|
function createSlot(ownerName) {
|
|
36674
36835
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
36675
|
-
const Slot2 =
|
|
36836
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
36676
36837
|
let { children, ...slotProps } = props;
|
|
36677
36838
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
36678
36839
|
children = use(children._payload);
|
|
36679
36840
|
}
|
|
36680
|
-
const childrenArray =
|
|
36841
|
+
const childrenArray = React24.Children.toArray(children);
|
|
36681
36842
|
const slottable = childrenArray.find(isSlottable);
|
|
36682
36843
|
if (slottable) {
|
|
36683
36844
|
const newElement = slottable.props.children;
|
|
36684
36845
|
const newChildren = childrenArray.map((child) => {
|
|
36685
36846
|
if (child === slottable) {
|
|
36686
|
-
if (
|
|
36687
|
-
return
|
|
36688
|
-
return
|
|
36847
|
+
if (React24.Children.count(newElement) > 1)
|
|
36848
|
+
return React24.Children.only(null);
|
|
36849
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
36689
36850
|
} else {
|
|
36690
36851
|
return child;
|
|
36691
36852
|
}
|
|
36692
36853
|
});
|
|
36693
|
-
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
36854
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
36694
36855
|
}
|
|
36695
36856
|
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
36696
36857
|
});
|
|
@@ -36699,20 +36860,20 @@ function createSlot(ownerName) {
|
|
|
36699
36860
|
}
|
|
36700
36861
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
36701
36862
|
function createSlotClone(ownerName) {
|
|
36702
|
-
const SlotClone =
|
|
36863
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
36703
36864
|
let { children, ...slotProps } = props;
|
|
36704
36865
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
36705
36866
|
children = use(children._payload);
|
|
36706
36867
|
}
|
|
36707
|
-
if (
|
|
36868
|
+
if (React24.isValidElement(children)) {
|
|
36708
36869
|
const childrenRef = getElementRef(children);
|
|
36709
36870
|
const props2 = mergeProps(slotProps, children.props);
|
|
36710
|
-
if (children.type !==
|
|
36871
|
+
if (children.type !== React24.Fragment) {
|
|
36711
36872
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
36712
36873
|
}
|
|
36713
|
-
return
|
|
36874
|
+
return React24.cloneElement(children, props2);
|
|
36714
36875
|
}
|
|
36715
|
-
return
|
|
36876
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
36716
36877
|
});
|
|
36717
36878
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
36718
36879
|
return SlotClone;
|
|
@@ -36720,7 +36881,7 @@ function createSlotClone(ownerName) {
|
|
|
36720
36881
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
36721
36882
|
function createSlottable(ownerName) {
|
|
36722
36883
|
const Slottable2 = ({ children }) => {
|
|
36723
|
-
return /* @__PURE__ */ jsx43(
|
|
36884
|
+
return /* @__PURE__ */ jsx43(Fragment22, { children });
|
|
36724
36885
|
};
|
|
36725
36886
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
36726
36887
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -36728,7 +36889,7 @@ function createSlottable(ownerName) {
|
|
|
36728
36889
|
}
|
|
36729
36890
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
36730
36891
|
function isSlottable(child) {
|
|
36731
|
-
return
|
|
36892
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
36732
36893
|
}
|
|
36733
36894
|
function mergeProps(slotProps, childProps) {
|
|
36734
36895
|
const overrideProps = { ...childProps };
|
|
@@ -36785,7 +36946,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
36785
36946
|
return childNode;
|
|
36786
36947
|
};
|
|
36787
36948
|
var useHoverTransforms = (ref, disabled) => {
|
|
36788
|
-
const [state, setState] =
|
|
36949
|
+
const [state, setState] = React33.useState({
|
|
36789
36950
|
progress: 0,
|
|
36790
36951
|
isActive: false
|
|
36791
36952
|
});
|
|
@@ -36797,7 +36958,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
36797
36958
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
36798
36959
|
}
|
|
36799
36960
|
}, [disabled, eventTarget]);
|
|
36800
|
-
|
|
36961
|
+
React33.useEffect(() => {
|
|
36801
36962
|
const element = ref.current;
|
|
36802
36963
|
if (!element)
|
|
36803
36964
|
return;
|
|
@@ -36872,8 +37033,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
36872
37033
|
return state;
|
|
36873
37034
|
};
|
|
36874
37035
|
var useClickTransforms = (ref) => {
|
|
36875
|
-
const [hoverProgress, setHoverProgress] =
|
|
36876
|
-
|
|
37036
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
37037
|
+
React33.useEffect(() => {
|
|
36877
37038
|
const element = getChildNodeFrom(ref.current);
|
|
36878
37039
|
if (!element) {
|
|
36879
37040
|
return;
|
|
@@ -37017,7 +37178,7 @@ var Outer = ({
|
|
|
37017
37178
|
description: "rect",
|
|
37018
37179
|
transformations: centerOriented
|
|
37019
37180
|
});
|
|
37020
|
-
return /* @__PURE__ */
|
|
37181
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
37021
37182
|
className: "relative",
|
|
37022
37183
|
style: { width, height },
|
|
37023
37184
|
children: [
|
|
@@ -37449,7 +37610,7 @@ function composeRefs2(...refs) {
|
|
|
37449
37610
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
37450
37611
|
}
|
|
37451
37612
|
function useComposedRefs2(...refs) {
|
|
37452
|
-
return
|
|
37613
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
37453
37614
|
}
|
|
37454
37615
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
37455
37616
|
const { children, ...slotProps } = props;
|
|
@@ -37531,13 +37692,13 @@ function createCollection(name) {
|
|
|
37531
37692
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
37532
37693
|
const CollectionProvider = (props) => {
|
|
37533
37694
|
const { scope, children } = props;
|
|
37534
|
-
const ref =
|
|
37535
|
-
const itemMap =
|
|
37695
|
+
const ref = React11.useRef(null);
|
|
37696
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
37536
37697
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
37537
37698
|
};
|
|
37538
37699
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
37539
37700
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
37540
|
-
const CollectionSlot =
|
|
37701
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
37541
37702
|
const { scope, children } = props;
|
|
37542
37703
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
37543
37704
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -37546,12 +37707,12 @@ function createCollection(name) {
|
|
|
37546
37707
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
37547
37708
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
37548
37709
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
37549
|
-
const CollectionItemSlot =
|
|
37710
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
37550
37711
|
const { scope, children, ...itemData } = props;
|
|
37551
|
-
const ref =
|
|
37712
|
+
const ref = React11.useRef(null);
|
|
37552
37713
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
37553
37714
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
37554
|
-
|
|
37715
|
+
React11.useEffect(() => {
|
|
37555
37716
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
37556
37717
|
return () => void context.itemMap.delete(ref);
|
|
37557
37718
|
});
|
|
@@ -37560,7 +37721,7 @@ function createCollection(name) {
|
|
|
37560
37721
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
37561
37722
|
function useCollection(scope) {
|
|
37562
37723
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
37563
|
-
const getItems =
|
|
37724
|
+
const getItems = React11.useCallback(() => {
|
|
37564
37725
|
const collectionNode = context.collectionRef.current;
|
|
37565
37726
|
if (!collectionNode)
|
|
37566
37727
|
return [];
|
|
@@ -37617,15 +37778,15 @@ function dispatchDiscreteCustomEvent(target, event2) {
|
|
|
37617
37778
|
ReactDOM.flushSync(() => target.dispatchEvent(event2));
|
|
37618
37779
|
}
|
|
37619
37780
|
function useCallbackRef(callback) {
|
|
37620
|
-
const callbackRef =
|
|
37621
|
-
|
|
37781
|
+
const callbackRef = React142.useRef(callback);
|
|
37782
|
+
React142.useEffect(() => {
|
|
37622
37783
|
callbackRef.current = callback;
|
|
37623
37784
|
});
|
|
37624
|
-
return
|
|
37785
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
37625
37786
|
}
|
|
37626
37787
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
37627
37788
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
37628
|
-
|
|
37789
|
+
React15.useEffect(() => {
|
|
37629
37790
|
const handleKeyDown = (event2) => {
|
|
37630
37791
|
if (event2.key === "Escape") {
|
|
37631
37792
|
onEscapeKeyDown(event2);
|
|
@@ -37832,7 +37993,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
37832
37993
|
}
|
|
37833
37994
|
var count = 0;
|
|
37834
37995
|
function useFocusGuards() {
|
|
37835
|
-
|
|
37996
|
+
React172.useEffect(() => {
|
|
37836
37997
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
37837
37998
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
37838
37999
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -38067,7 +38228,7 @@ function arrayRemove(array, item) {
|
|
|
38067
38228
|
function removeLinks(items) {
|
|
38068
38229
|
return items.filter((item) => item.tagName !== "A");
|
|
38069
38230
|
}
|
|
38070
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
38231
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
38071
38232
|
var useReactId = React202["useId".toString()] || (() => {
|
|
38072
38233
|
return;
|
|
38073
38234
|
});
|
|
@@ -39919,17 +40080,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
39919
40080
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
39920
40081
|
var Popper = (props) => {
|
|
39921
40082
|
const { __scopePopper, children } = props;
|
|
39922
|
-
const [anchor, setAnchor] =
|
|
40083
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
39923
40084
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
39924
40085
|
};
|
|
39925
40086
|
Popper.displayName = POPPER_NAME;
|
|
39926
40087
|
var ANCHOR_NAME = "PopperAnchor";
|
|
39927
|
-
var PopperAnchor =
|
|
40088
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
39928
40089
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
39929
40090
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
39930
|
-
const ref =
|
|
40091
|
+
const ref = React242.useRef(null);
|
|
39931
40092
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
39932
|
-
|
|
40093
|
+
React242.useEffect(() => {
|
|
39933
40094
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
39934
40095
|
});
|
|
39935
40096
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -39937,7 +40098,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
39937
40098
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
39938
40099
|
var CONTENT_NAME = "PopperContent";
|
|
39939
40100
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
39940
|
-
var PopperContent =
|
|
40101
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
39941
40102
|
const {
|
|
39942
40103
|
__scopePopper,
|
|
39943
40104
|
side = "bottom",
|
|
@@ -39955,9 +40116,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
39955
40116
|
...contentProps
|
|
39956
40117
|
} = props;
|
|
39957
40118
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
39958
|
-
const [content, setContent] =
|
|
40119
|
+
const [content, setContent] = React242.useState(null);
|
|
39959
40120
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
39960
|
-
const [arrow4, setArrow] =
|
|
40121
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
39961
40122
|
const arrowSize = useSize(arrow4);
|
|
39962
40123
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
39963
40124
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -40017,7 +40178,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
40017
40178
|
const arrowX = middlewareData.arrow?.x;
|
|
40018
40179
|
const arrowY = middlewareData.arrow?.y;
|
|
40019
40180
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
40020
|
-
const [contentZIndex, setContentZIndex] =
|
|
40181
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
40021
40182
|
useLayoutEffect22(() => {
|
|
40022
40183
|
if (content)
|
|
40023
40184
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -40068,7 +40229,7 @@ var OPPOSITE_SIDE = {
|
|
|
40068
40229
|
bottom: "top",
|
|
40069
40230
|
left: "right"
|
|
40070
40231
|
};
|
|
40071
|
-
var PopperArrow =
|
|
40232
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
40072
40233
|
const { __scopePopper, ...arrowProps } = props;
|
|
40073
40234
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
40074
40235
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -40411,7 +40572,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
40411
40572
|
ref.callback = callback;
|
|
40412
40573
|
return ref.facade;
|
|
40413
40574
|
}
|
|
40414
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
40575
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
40415
40576
|
var currentValues = new WeakMap;
|
|
40416
40577
|
function useMergeRefs(refs, defaultValue) {
|
|
40417
40578
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -41047,9 +41208,9 @@ var Select = (props) => {
|
|
|
41047
41208
|
required
|
|
41048
41209
|
} = props;
|
|
41049
41210
|
const popperScope = usePopperScope(__scopeSelect);
|
|
41050
|
-
const [trigger, setTrigger] =
|
|
41051
|
-
const [valueNode, setValueNode] =
|
|
41052
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
41211
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
41212
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
41213
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
41053
41214
|
const direction = useDirection(dir);
|
|
41054
41215
|
const [open = false, setOpen] = useControllableState({
|
|
41055
41216
|
prop: openProp,
|
|
@@ -41061,11 +41222,11 @@ var Select = (props) => {
|
|
|
41061
41222
|
defaultProp: defaultValue,
|
|
41062
41223
|
onChange: onValueChange
|
|
41063
41224
|
});
|
|
41064
|
-
const triggerPointerDownPosRef =
|
|
41225
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
41065
41226
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
41066
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
41227
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
41067
41228
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
41068
|
-
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */
|
|
41229
|
+
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
41069
41230
|
required,
|
|
41070
41231
|
scope: __scopeSelect,
|
|
41071
41232
|
trigger,
|
|
@@ -41085,10 +41246,10 @@ var Select = (props) => {
|
|
|
41085
41246
|
children: [
|
|
41086
41247
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
41087
41248
|
scope: props.__scopeSelect,
|
|
41088
|
-
onNativeOptionAdd:
|
|
41249
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
41089
41250
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
41090
41251
|
}, []),
|
|
41091
|
-
onNativeOptionRemove:
|
|
41252
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
41092
41253
|
setNativeOptionsSet((prev) => {
|
|
41093
41254
|
const optionsSet = new Set(prev);
|
|
41094
41255
|
optionsSet.delete(option);
|
|
@@ -41097,7 +41258,7 @@ var Select = (props) => {
|
|
|
41097
41258
|
}, []),
|
|
41098
41259
|
children
|
|
41099
41260
|
}) }),
|
|
41100
|
-
isFormControl ? /* @__PURE__ */
|
|
41261
|
+
isFormControl ? /* @__PURE__ */ jsxs42(BubbleSelect, {
|
|
41101
41262
|
"aria-hidden": true,
|
|
41102
41263
|
required,
|
|
41103
41264
|
tabIndex: -1,
|
|
@@ -41116,7 +41277,7 @@ var Select = (props) => {
|
|
|
41116
41277
|
};
|
|
41117
41278
|
Select.displayName = SELECT_NAME;
|
|
41118
41279
|
var TRIGGER_NAME = "SelectTrigger";
|
|
41119
|
-
var SelectTrigger =
|
|
41280
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
41120
41281
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
41121
41282
|
const popperScope = usePopperScope(__scopeSelect);
|
|
41122
41283
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -41184,7 +41345,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
41184
41345
|
});
|
|
41185
41346
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
41186
41347
|
var VALUE_NAME = "SelectValue";
|
|
41187
|
-
var SelectValue =
|
|
41348
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
41188
41349
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
41189
41350
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
41190
41351
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -41202,7 +41363,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
41202
41363
|
});
|
|
41203
41364
|
SelectValue.displayName = VALUE_NAME;
|
|
41204
41365
|
var ICON_NAME = "SelectIcon";
|
|
41205
|
-
var SelectIcon =
|
|
41366
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
41206
41367
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
41207
41368
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
41208
41369
|
});
|
|
@@ -41213,9 +41374,9 @@ var SelectPortal = (props) => {
|
|
|
41213
41374
|
};
|
|
41214
41375
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
41215
41376
|
var CONTENT_NAME2 = "SelectContent";
|
|
41216
|
-
var SelectContent =
|
|
41377
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
41217
41378
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
41218
|
-
const [fragment, setFragment] =
|
|
41379
|
+
const [fragment, setFragment] = React362.useState();
|
|
41219
41380
|
useLayoutEffect22(() => {
|
|
41220
41381
|
setFragment(new DocumentFragment);
|
|
41221
41382
|
}, []);
|
|
@@ -41229,7 +41390,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
41229
41390
|
var CONTENT_MARGIN = 10;
|
|
41230
41391
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
41231
41392
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
41232
|
-
var SelectContentImpl =
|
|
41393
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
41233
41394
|
const {
|
|
41234
41395
|
__scopeSelect,
|
|
41235
41396
|
position = "item-aligned",
|
|
@@ -41249,20 +41410,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41249
41410
|
...contentProps
|
|
41250
41411
|
} = props;
|
|
41251
41412
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
41252
|
-
const [content, setContent] =
|
|
41253
|
-
const [viewport, setViewport] =
|
|
41413
|
+
const [content, setContent] = React362.useState(null);
|
|
41414
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
41254
41415
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
41255
|
-
const [selectedItem, setSelectedItem] =
|
|
41256
|
-
const [selectedItemText, setSelectedItemText] =
|
|
41416
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
41417
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
41257
41418
|
const getItems = useCollection(__scopeSelect);
|
|
41258
|
-
const [isPositioned, setIsPositioned] =
|
|
41259
|
-
const firstValidItemFoundRef =
|
|
41260
|
-
|
|
41419
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
41420
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
41421
|
+
React362.useEffect(() => {
|
|
41261
41422
|
if (content)
|
|
41262
41423
|
return hideOthers(content);
|
|
41263
41424
|
}, [content]);
|
|
41264
41425
|
useFocusGuards();
|
|
41265
|
-
const focusFirst2 =
|
|
41426
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
41266
41427
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
41267
41428
|
const [lastItem] = restItems.slice(-1);
|
|
41268
41429
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -41279,14 +41440,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41279
41440
|
return;
|
|
41280
41441
|
}
|
|
41281
41442
|
}, [getItems, viewport]);
|
|
41282
|
-
const focusSelectedItem =
|
|
41283
|
-
|
|
41443
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
41444
|
+
React362.useEffect(() => {
|
|
41284
41445
|
if (isPositioned) {
|
|
41285
41446
|
focusSelectedItem();
|
|
41286
41447
|
}
|
|
41287
41448
|
}, [isPositioned, focusSelectedItem]);
|
|
41288
41449
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
41289
|
-
|
|
41450
|
+
React362.useEffect(() => {
|
|
41290
41451
|
if (content) {
|
|
41291
41452
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
41292
41453
|
const handlePointerMove = (event2) => {
|
|
@@ -41316,7 +41477,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41316
41477
|
};
|
|
41317
41478
|
}
|
|
41318
41479
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
41319
|
-
|
|
41480
|
+
React362.useEffect(() => {
|
|
41320
41481
|
const close = () => onOpenChange(false);
|
|
41321
41482
|
window.addEventListener("blur", close);
|
|
41322
41483
|
window.addEventListener("resize", close);
|
|
@@ -41333,7 +41494,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41333
41494
|
setTimeout(() => nextItem.ref.current.focus());
|
|
41334
41495
|
}
|
|
41335
41496
|
});
|
|
41336
|
-
const itemRefCallback =
|
|
41497
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
41337
41498
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
41338
41499
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
41339
41500
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -41342,8 +41503,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41342
41503
|
firstValidItemFoundRef.current = true;
|
|
41343
41504
|
}
|
|
41344
41505
|
}, [context.value]);
|
|
41345
|
-
const handleItemLeave =
|
|
41346
|
-
const itemTextRefCallback =
|
|
41506
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
41507
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
41347
41508
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
41348
41509
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
41349
41510
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -41438,18 +41599,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41438
41599
|
});
|
|
41439
41600
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
41440
41601
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
41441
|
-
var SelectItemAlignedPosition =
|
|
41602
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
41442
41603
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
41443
41604
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
41444
41605
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
41445
|
-
const [contentWrapper, setContentWrapper] =
|
|
41446
|
-
const [content, setContent] =
|
|
41606
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
41607
|
+
const [content, setContent] = React362.useState(null);
|
|
41447
41608
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
41448
41609
|
const getItems = useCollection(__scopeSelect);
|
|
41449
|
-
const shouldExpandOnScrollRef =
|
|
41450
|
-
const shouldRepositionRef =
|
|
41610
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
41611
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
41451
41612
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
41452
|
-
const position =
|
|
41613
|
+
const position = React362.useCallback(() => {
|
|
41453
41614
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
41454
41615
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
41455
41616
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -41530,12 +41691,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
41530
41691
|
onPlaced
|
|
41531
41692
|
]);
|
|
41532
41693
|
useLayoutEffect22(() => position(), [position]);
|
|
41533
|
-
const [contentZIndex, setContentZIndex] =
|
|
41694
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
41534
41695
|
useLayoutEffect22(() => {
|
|
41535
41696
|
if (content)
|
|
41536
41697
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
41537
41698
|
}, [content]);
|
|
41538
|
-
const handleScrollButtonChange =
|
|
41699
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
41539
41700
|
if (node && shouldRepositionRef.current === true) {
|
|
41540
41701
|
position();
|
|
41541
41702
|
focusSelectedItem?.();
|
|
@@ -41569,7 +41730,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
41569
41730
|
});
|
|
41570
41731
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
41571
41732
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
41572
|
-
var SelectPopperPosition =
|
|
41733
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
41573
41734
|
const {
|
|
41574
41735
|
__scopeSelect,
|
|
41575
41736
|
align = "start",
|
|
@@ -41599,13 +41760,13 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
41599
41760
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
41600
41761
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
41601
41762
|
var VIEWPORT_NAME = "SelectViewport";
|
|
41602
|
-
var SelectViewport =
|
|
41763
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
41603
41764
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
41604
41765
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
41605
41766
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
41606
41767
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
41607
|
-
const prevScrollTopRef =
|
|
41608
|
-
return /* @__PURE__ */
|
|
41768
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
41769
|
+
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
41609
41770
|
/* @__PURE__ */ jsx242("style", {
|
|
41610
41771
|
dangerouslySetInnerHTML: {
|
|
41611
41772
|
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
|
@@ -41653,14 +41814,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
41653
41814
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
41654
41815
|
var GROUP_NAME = "SelectGroup";
|
|
41655
41816
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
41656
|
-
var SelectGroup =
|
|
41817
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
41657
41818
|
const { __scopeSelect, ...groupProps } = props;
|
|
41658
41819
|
const groupId = useId();
|
|
41659
41820
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
41660
41821
|
});
|
|
41661
41822
|
SelectGroup.displayName = GROUP_NAME;
|
|
41662
41823
|
var LABEL_NAME = "SelectLabel";
|
|
41663
|
-
var SelectLabel =
|
|
41824
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
41664
41825
|
const { __scopeSelect, ...labelProps } = props;
|
|
41665
41826
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
41666
41827
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -41668,7 +41829,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
41668
41829
|
SelectLabel.displayName = LABEL_NAME;
|
|
41669
41830
|
var ITEM_NAME = "SelectItem";
|
|
41670
41831
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
41671
|
-
var SelectItem =
|
|
41832
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
41672
41833
|
const {
|
|
41673
41834
|
__scopeSelect,
|
|
41674
41835
|
value,
|
|
@@ -41679,8 +41840,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
41679
41840
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
41680
41841
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
41681
41842
|
const isSelected = context.value === value;
|
|
41682
|
-
const [textValue, setTextValue] =
|
|
41683
|
-
const [isFocused, setIsFocused] =
|
|
41843
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
41844
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
41684
41845
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
41685
41846
|
const textId = useId();
|
|
41686
41847
|
const handleSelect = () => {
|
|
@@ -41698,7 +41859,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
41698
41859
|
disabled,
|
|
41699
41860
|
textId,
|
|
41700
41861
|
isSelected,
|
|
41701
|
-
onItemTextChange:
|
|
41862
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
41702
41863
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
41703
41864
|
}, []),
|
|
41704
41865
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -41747,39 +41908,39 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
41747
41908
|
});
|
|
41748
41909
|
SelectItem.displayName = ITEM_NAME;
|
|
41749
41910
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
41750
|
-
var SelectItemText =
|
|
41911
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
41751
41912
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
41752
41913
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41753
41914
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41754
41915
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41755
41916
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41756
|
-
const [itemTextNode, setItemTextNode] =
|
|
41917
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
41757
41918
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
41758
41919
|
const textContent = itemTextNode?.textContent;
|
|
41759
|
-
const nativeOption =
|
|
41920
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
41760
41921
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
41761
41922
|
useLayoutEffect22(() => {
|
|
41762
41923
|
onNativeOptionAdd(nativeOption);
|
|
41763
41924
|
return () => onNativeOptionRemove(nativeOption);
|
|
41764
41925
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
41765
|
-
return /* @__PURE__ */
|
|
41926
|
+
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
41766
41927
|
/* @__PURE__ */ jsx242(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
41767
41928
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
41768
41929
|
] });
|
|
41769
41930
|
});
|
|
41770
41931
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
41771
41932
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
41772
|
-
var SelectItemIndicator =
|
|
41933
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
41773
41934
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
41774
41935
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
41775
41936
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
41776
41937
|
});
|
|
41777
41938
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
41778
41939
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
41779
|
-
var SelectScrollUpButton =
|
|
41940
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
41780
41941
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
41781
41942
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
41782
|
-
const [canScrollUp, setCanScrollUp] =
|
|
41943
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
41783
41944
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
41784
41945
|
useLayoutEffect22(() => {
|
|
41785
41946
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -41807,10 +41968,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
41807
41968
|
});
|
|
41808
41969
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
41809
41970
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
41810
|
-
var SelectScrollDownButton =
|
|
41971
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
41811
41972
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
41812
41973
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
41813
|
-
const [canScrollDown, setCanScrollDown] =
|
|
41974
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
41814
41975
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
41815
41976
|
useLayoutEffect22(() => {
|
|
41816
41977
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -41838,18 +41999,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
41838
41999
|
}) : null;
|
|
41839
42000
|
});
|
|
41840
42001
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
41841
|
-
var SelectScrollButtonImpl =
|
|
42002
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
41842
42003
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
41843
42004
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
41844
|
-
const autoScrollTimerRef =
|
|
42005
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
41845
42006
|
const getItems = useCollection(__scopeSelect);
|
|
41846
|
-
const clearAutoScrollTimer =
|
|
42007
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
41847
42008
|
if (autoScrollTimerRef.current !== null) {
|
|
41848
42009
|
window.clearInterval(autoScrollTimerRef.current);
|
|
41849
42010
|
autoScrollTimerRef.current = null;
|
|
41850
42011
|
}
|
|
41851
42012
|
}, []);
|
|
41852
|
-
|
|
42013
|
+
React362.useEffect(() => {
|
|
41853
42014
|
return () => clearAutoScrollTimer();
|
|
41854
42015
|
}, [clearAutoScrollTimer]);
|
|
41855
42016
|
useLayoutEffect22(() => {
|
|
@@ -41878,13 +42039,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41878
42039
|
});
|
|
41879
42040
|
});
|
|
41880
42041
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
41881
|
-
var SelectSeparator =
|
|
42042
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
41882
42043
|
const { __scopeSelect, ...separatorProps } = props;
|
|
41883
42044
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
41884
42045
|
});
|
|
41885
42046
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
41886
42047
|
var ARROW_NAME2 = "SelectArrow";
|
|
41887
|
-
var SelectArrow =
|
|
42048
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
41888
42049
|
const { __scopeSelect, ...arrowProps } = props;
|
|
41889
42050
|
const popperScope = usePopperScope(__scopeSelect);
|
|
41890
42051
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -41895,12 +42056,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
41895
42056
|
function shouldShowPlaceholder(value) {
|
|
41896
42057
|
return value === "" || value === undefined;
|
|
41897
42058
|
}
|
|
41898
|
-
var BubbleSelect =
|
|
42059
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
41899
42060
|
const { value, ...selectProps } = props;
|
|
41900
|
-
const ref =
|
|
42061
|
+
const ref = React362.useRef(null);
|
|
41901
42062
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
41902
42063
|
const prevValue = usePrevious(value);
|
|
41903
|
-
|
|
42064
|
+
React362.useEffect(() => {
|
|
41904
42065
|
const select = ref.current;
|
|
41905
42066
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
41906
42067
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -41916,9 +42077,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
41916
42077
|
BubbleSelect.displayName = "BubbleSelect";
|
|
41917
42078
|
function useTypeaheadSearch(onSearchChange) {
|
|
41918
42079
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
41919
|
-
const searchRef =
|
|
41920
|
-
const timerRef =
|
|
41921
|
-
const handleTypeaheadSearch =
|
|
42080
|
+
const searchRef = React362.useRef("");
|
|
42081
|
+
const timerRef = React362.useRef(0);
|
|
42082
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
41922
42083
|
const search = searchRef.current + key;
|
|
41923
42084
|
handleSearchChange(search);
|
|
41924
42085
|
(function updateSearch(value) {
|
|
@@ -41928,11 +42089,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
41928
42089
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
41929
42090
|
})(search);
|
|
41930
42091
|
}, [handleSearchChange]);
|
|
41931
|
-
const resetTypeahead =
|
|
42092
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
41932
42093
|
searchRef.current = "";
|
|
41933
42094
|
window.clearTimeout(timerRef.current);
|
|
41934
42095
|
}, []);
|
|
41935
|
-
|
|
42096
|
+
React362.useEffect(() => {
|
|
41936
42097
|
return () => window.clearTimeout(timerRef.current);
|
|
41937
42098
|
}, []);
|
|
41938
42099
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -42021,7 +42182,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
42021
42182
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
42022
42183
|
var Select2 = Root222;
|
|
42023
42184
|
var SelectValue2 = Value;
|
|
42024
|
-
var SelectTrigger2 =
|
|
42185
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
42025
42186
|
ref,
|
|
42026
42187
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
42027
42188
|
...props,
|
|
@@ -42036,7 +42197,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
42036
42197
|
]
|
|
42037
42198
|
}));
|
|
42038
42199
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
42039
|
-
var SelectScrollUpButton2 =
|
|
42200
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
42040
42201
|
ref,
|
|
42041
42202
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
42042
42203
|
...props,
|
|
@@ -42045,7 +42206,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
42045
42206
|
})
|
|
42046
42207
|
}));
|
|
42047
42208
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
42048
|
-
var SelectScrollDownButton2 =
|
|
42209
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
42049
42210
|
ref,
|
|
42050
42211
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
42051
42212
|
...props,
|
|
@@ -42054,8 +42215,8 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
42054
42215
|
})
|
|
42055
42216
|
}));
|
|
42056
42217
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
42057
|
-
var SelectContent2 =
|
|
42058
|
-
children: /* @__PURE__ */
|
|
42218
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
42219
|
+
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
42059
42220
|
ref,
|
|
42060
42221
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
42061
42222
|
position,
|
|
@@ -42071,13 +42232,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
42071
42232
|
})
|
|
42072
42233
|
}));
|
|
42073
42234
|
SelectContent2.displayName = Content2.displayName;
|
|
42074
|
-
var SelectLabel2 =
|
|
42235
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
42075
42236
|
ref,
|
|
42076
42237
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
42077
42238
|
...props
|
|
42078
42239
|
}));
|
|
42079
42240
|
SelectLabel2.displayName = Label.displayName;
|
|
42080
|
-
var SelectItem2 =
|
|
42241
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
42081
42242
|
ref,
|
|
42082
42243
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
42083
42244
|
...props,
|
|
@@ -42096,7 +42257,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
42096
42257
|
]
|
|
42097
42258
|
}));
|
|
42098
42259
|
SelectItem2.displayName = Item.displayName;
|
|
42099
|
-
var SelectSeparator2 =
|
|
42260
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
42100
42261
|
ref,
|
|
42101
42262
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
42102
42263
|
...props
|
|
@@ -42129,19 +42290,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
42129
42290
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
42130
42291
|
let defaultContexts = [];
|
|
42131
42292
|
function createContext32(rootComponentName, defaultContext) {
|
|
42132
|
-
const BaseContext =
|
|
42293
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
42133
42294
|
const index2 = defaultContexts.length;
|
|
42134
42295
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
42135
42296
|
const Provider = (props) => {
|
|
42136
42297
|
const { scope, children, ...context } = props;
|
|
42137
42298
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
42138
|
-
const value =
|
|
42299
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
42139
42300
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
42140
42301
|
};
|
|
42141
42302
|
Provider.displayName = rootComponentName + "Provider";
|
|
42142
42303
|
function useContext222(consumerName, scope) {
|
|
42143
42304
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
42144
|
-
const context =
|
|
42305
|
+
const context = React382.useContext(Context);
|
|
42145
42306
|
if (context)
|
|
42146
42307
|
return context;
|
|
42147
42308
|
if (defaultContext !== undefined)
|
|
@@ -42152,11 +42313,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
42152
42313
|
}
|
|
42153
42314
|
const createScope = () => {
|
|
42154
42315
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
42155
|
-
return
|
|
42316
|
+
return React382.createContext(defaultContext);
|
|
42156
42317
|
});
|
|
42157
42318
|
return function useScope(scope) {
|
|
42158
42319
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
42159
|
-
return
|
|
42320
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
42160
42321
|
};
|
|
42161
42322
|
};
|
|
42162
42323
|
createScope.scopeName = scopeName;
|
|
@@ -42177,7 +42338,7 @@ function composeContextScopes2(...scopes) {
|
|
|
42177
42338
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
42178
42339
|
return { ...nextScopes2, ...currentScope };
|
|
42179
42340
|
}, {});
|
|
42180
|
-
return
|
|
42341
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
42181
42342
|
};
|
|
42182
42343
|
};
|
|
42183
42344
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -42185,22 +42346,22 @@ function composeContextScopes2(...scopes) {
|
|
|
42185
42346
|
}
|
|
42186
42347
|
function createSlot2(ownerName) {
|
|
42187
42348
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
42188
|
-
const Slot22 =
|
|
42349
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
42189
42350
|
const { children, ...slotProps } = props;
|
|
42190
|
-
const childrenArray =
|
|
42351
|
+
const childrenArray = React39.Children.toArray(children);
|
|
42191
42352
|
const slottable = childrenArray.find(isSlottable3);
|
|
42192
42353
|
if (slottable) {
|
|
42193
42354
|
const newElement = slottable.props.children;
|
|
42194
42355
|
const newChildren = childrenArray.map((child) => {
|
|
42195
42356
|
if (child === slottable) {
|
|
42196
|
-
if (
|
|
42197
|
-
return
|
|
42198
|
-
return
|
|
42357
|
+
if (React39.Children.count(newElement) > 1)
|
|
42358
|
+
return React39.Children.only(null);
|
|
42359
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
42199
42360
|
} else {
|
|
42200
42361
|
return child;
|
|
42201
42362
|
}
|
|
42202
42363
|
});
|
|
42203
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
42364
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
42204
42365
|
}
|
|
42205
42366
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
42206
42367
|
});
|
|
@@ -42208,24 +42369,24 @@ function createSlot2(ownerName) {
|
|
|
42208
42369
|
return Slot22;
|
|
42209
42370
|
}
|
|
42210
42371
|
function createSlotClone2(ownerName) {
|
|
42211
|
-
const SlotClone2 =
|
|
42372
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
42212
42373
|
const { children, ...slotProps } = props;
|
|
42213
|
-
if (
|
|
42374
|
+
if (React39.isValidElement(children)) {
|
|
42214
42375
|
const childrenRef = getElementRef3(children);
|
|
42215
42376
|
const props2 = mergeProps3(slotProps, children.props);
|
|
42216
|
-
if (children.type !==
|
|
42377
|
+
if (children.type !== React39.Fragment) {
|
|
42217
42378
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
42218
42379
|
}
|
|
42219
|
-
return
|
|
42380
|
+
return React39.cloneElement(children, props2);
|
|
42220
42381
|
}
|
|
42221
|
-
return
|
|
42382
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
42222
42383
|
});
|
|
42223
42384
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
42224
42385
|
return SlotClone2;
|
|
42225
42386
|
}
|
|
42226
42387
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
42227
42388
|
function isSlottable3(child) {
|
|
42228
|
-
return
|
|
42389
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
42229
42390
|
}
|
|
42230
42391
|
function mergeProps3(slotProps, childProps) {
|
|
42231
42392
|
const overrideProps = { ...childProps };
|
|
@@ -42619,7 +42780,7 @@ function toSafeIndex(array, index2) {
|
|
|
42619
42780
|
function toSafeInteger(number) {
|
|
42620
42781
|
return number !== number || number === 0 ? 0 : Math.trunc(number);
|
|
42621
42782
|
}
|
|
42622
|
-
var useLayoutEffect222 = globalThis?.document ?
|
|
42783
|
+
var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
|
|
42623
42784
|
var useReactId2 = React422[" useId ".trim().toString()] || (() => {
|
|
42624
42785
|
return;
|
|
42625
42786
|
});
|
|
@@ -42653,7 +42814,7 @@ var NODES2 = [
|
|
|
42653
42814
|
];
|
|
42654
42815
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
42655
42816
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
42656
|
-
const Node2 =
|
|
42817
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
42657
42818
|
const { asChild, ...primitiveProps } = props;
|
|
42658
42819
|
const Comp = asChild ? Slot3 : node;
|
|
42659
42820
|
if (typeof window !== "undefined") {
|
|
@@ -43254,7 +43415,7 @@ var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
|
|
|
43254
43415
|
};
|
|
43255
43416
|
|
|
43256
43417
|
// src/components/prompts/CopyPromptButton.tsx
|
|
43257
|
-
import { jsx as jsx46, jsxs as
|
|
43418
|
+
import { jsx as jsx46, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
43258
43419
|
var CopyPromptButton = ({ prompt }) => {
|
|
43259
43420
|
const [copied, setCopied] = useState40(false);
|
|
43260
43421
|
const onCopy = useCallback38(() => {
|
|
@@ -43267,7 +43428,7 @@ var CopyPromptButton = ({ prompt }) => {
|
|
|
43267
43428
|
onClick: onCopy,
|
|
43268
43429
|
style: { width: 160 },
|
|
43269
43430
|
depth: 0.6,
|
|
43270
|
-
children: /* @__PURE__ */
|
|
43431
|
+
children: /* @__PURE__ */ jsxs7("div", {
|
|
43271
43432
|
className: "flex items-center flex-row flex-1 w-[130px]",
|
|
43272
43433
|
children: [
|
|
43273
43434
|
/* @__PURE__ */ jsx46(ClipboardIcon, {
|
|
@@ -43392,7 +43553,7 @@ var useHeartAnimation = () => {
|
|
|
43392
43553
|
};
|
|
43393
43554
|
|
|
43394
43555
|
// src/components/prompts/LikeButton.tsx
|
|
43395
|
-
import { jsx as jsx47, jsxs as
|
|
43556
|
+
import { jsx as jsx47, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
43396
43557
|
var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
43397
43558
|
const [liked, setLiked] = useState42(false);
|
|
43398
43559
|
const [likeCount, setLikeCount] = useState42(initialLikeCount);
|
|
@@ -43430,7 +43591,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
|
43430
43591
|
className: `font-brand rounded-full flex items-center ${liked ? "bg-brand text-white" : ""}`,
|
|
43431
43592
|
onClick,
|
|
43432
43593
|
style: { width: 90 },
|
|
43433
|
-
children: /* @__PURE__ */
|
|
43594
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
43434
43595
|
className: "flex items-center flex-row flex-1 w-[40px] justify-center",
|
|
43435
43596
|
children: [
|
|
43436
43597
|
/* @__PURE__ */ jsx47(Heart, {
|
|
@@ -45922,14 +46083,14 @@ import"react-dom";
|
|
|
45922
46083
|
|
|
45923
46084
|
// src/components/prompts/MuxPlayer.tsx
|
|
45924
46085
|
import { useCallback as useCallback42 } from "react";
|
|
45925
|
-
import { jsx as jsx48, jsxs as
|
|
46086
|
+
import { jsx as jsx48, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
45926
46087
|
var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
45927
46088
|
const onProviderChange = useCallback42((provider2, _e) => {
|
|
45928
46089
|
if (isHLSProvider(provider2)) {
|
|
45929
46090
|
provider2.library = () => import("hls.js");
|
|
45930
46091
|
}
|
|
45931
46092
|
}, []);
|
|
45932
|
-
return /* @__PURE__ */
|
|
46093
|
+
return /* @__PURE__ */ jsxs9(MediaPlayer2, {
|
|
45933
46094
|
src: `https://stream.mux.com/${playbackId}.m3u8`,
|
|
45934
46095
|
crossOrigin: true,
|
|
45935
46096
|
playsInline: true,
|
|
@@ -45955,7 +46116,7 @@ var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
|
45955
46116
|
};
|
|
45956
46117
|
|
|
45957
46118
|
// src/components/prompts/NewBackButton.tsx
|
|
45958
|
-
import { jsx as jsx49, jsxs as
|
|
46119
|
+
import { jsx as jsx49, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
45959
46120
|
var NewBackButton = ({ text, link }) => {
|
|
45960
46121
|
return /* @__PURE__ */ jsx49("div", {
|
|
45961
46122
|
className: "justify-center items-center font-medium mb-4 block text-text",
|
|
@@ -45966,7 +46127,7 @@ var NewBackButton = ({ text, link }) => {
|
|
|
45966
46127
|
children: /* @__PURE__ */ jsx49(Button, {
|
|
45967
46128
|
href: link,
|
|
45968
46129
|
className: "px-8 rounded-full text-sm h-10",
|
|
45969
|
-
children: /* @__PURE__ */
|
|
46130
|
+
children: /* @__PURE__ */ jsxs10("div", {
|
|
45970
46131
|
className: "flex row items-center justify-start font-normal",
|
|
45971
46132
|
children: [
|
|
45972
46133
|
/* @__PURE__ */ jsx49("svg", {
|
|
@@ -46000,14 +46161,14 @@ var Page = ({ children, className, onDrop, onDragOver }) => {
|
|
|
46000
46161
|
};
|
|
46001
46162
|
|
|
46002
46163
|
// src/components/prompts/PromptsShow.tsx
|
|
46003
|
-
import { jsx as jsx51, jsxs as
|
|
46164
|
+
import { jsx as jsx51, jsxs as jsxs11, Fragment as Fragment13 } from "react/jsx-runtime";
|
|
46004
46165
|
var PromptsShowPage = ({ promptSubmission }) => {
|
|
46005
46166
|
const avatarUrl = getAvatarUrl(promptSubmission);
|
|
46006
46167
|
const authorName = getAuthorName(promptSubmission);
|
|
46007
46168
|
const authorLink = promptSubmission.githubUsername ? `https://github.com/${promptSubmission.githubUsername}` : promptSubmission.xUsername ? `https://x.com/${promptSubmission.xUsername}` : null;
|
|
46008
46169
|
return /* @__PURE__ */ jsx51(Page, {
|
|
46009
46170
|
className: "flex-col",
|
|
46010
|
-
children: /* @__PURE__ */
|
|
46171
|
+
children: /* @__PURE__ */ jsxs11("div", {
|
|
46011
46172
|
className: "m-auto max-w-[800px] w-full px-4 py-12",
|
|
46012
46173
|
children: [
|
|
46013
46174
|
/* @__PURE__ */ jsx51(NewBackButton, {
|
|
@@ -46021,9 +46182,9 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46021
46182
|
className: "text-2xl font-brand font-black",
|
|
46022
46183
|
children: promptSubmission.title
|
|
46023
46184
|
}),
|
|
46024
|
-
/* @__PURE__ */
|
|
46185
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46025
46186
|
children: [
|
|
46026
|
-
/* @__PURE__ */
|
|
46187
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46027
46188
|
className: "flex items-center gap-3 mt-4 mb-4",
|
|
46028
46189
|
children: [
|
|
46029
46190
|
avatarUrl && /* @__PURE__ */ jsx51("img", {
|
|
@@ -46033,9 +46194,9 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46033
46194
|
className: "rounded-full",
|
|
46034
46195
|
alt: authorName ? `${authorName}'s avatar` : "Author avatar"
|
|
46035
46196
|
}),
|
|
46036
|
-
/* @__PURE__ */
|
|
46197
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46037
46198
|
children: [
|
|
46038
|
-
/* @__PURE__ */
|
|
46199
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46039
46200
|
className: "text-sm font-brand",
|
|
46040
46201
|
children: [
|
|
46041
46202
|
"Prompted by",
|
|
@@ -46061,14 +46222,14 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46061
46222
|
})
|
|
46062
46223
|
]
|
|
46063
46224
|
}),
|
|
46064
|
-
/* @__PURE__ */
|
|
46225
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46065
46226
|
children: [
|
|
46066
46227
|
/* @__PURE__ */ jsx51(MuxPlayer, {
|
|
46067
46228
|
playbackId: promptSubmission.muxPlaybackId,
|
|
46068
46229
|
title: promptSubmission.title,
|
|
46069
46230
|
rounded: false
|
|
46070
46231
|
}),
|
|
46071
|
-
promptSubmission.toolUsed && /* @__PURE__ */
|
|
46232
|
+
promptSubmission.toolUsed && /* @__PURE__ */ jsxs11(Fragment13, {
|
|
46072
46233
|
children: [
|
|
46073
46234
|
/* @__PURE__ */ jsx51("h2", {
|
|
46074
46235
|
className: "font-brand font-bold mt-6 mb-2",
|
|
@@ -46080,7 +46241,7 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46080
46241
|
})
|
|
46081
46242
|
]
|
|
46082
46243
|
}),
|
|
46083
|
-
promptSubmission.modelUsed && /* @__PURE__ */
|
|
46244
|
+
promptSubmission.modelUsed && /* @__PURE__ */ jsxs11(Fragment13, {
|
|
46084
46245
|
children: [
|
|
46085
46246
|
/* @__PURE__ */ jsx51("h2", {
|
|
46086
46247
|
className: "font-brand font-bold mt-6 mb-2",
|
|
@@ -46101,7 +46262,7 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46101
46262
|
style: { backgroundColor: "#272A36" },
|
|
46102
46263
|
children: promptSubmission.prompt
|
|
46103
46264
|
}),
|
|
46104
|
-
/* @__PURE__ */
|
|
46265
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46105
46266
|
className: "mt-6 flex items-center gap-2",
|
|
46106
46267
|
children: [
|
|
46107
46268
|
/* @__PURE__ */ jsx51(LikeButton, {
|