@remotion/promo-pages 4.0.373 → 4.0.375
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 +805 -682
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +805 -682
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +768 -479
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +550 -446
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +560 -456
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +551 -447
- package/dist/design.js +768 -479
- package/dist/homepage/Pricing.js +550 -446
- package/dist/tailwind.css +9 -0
- package/dist/template-modal-content.js +560 -456
- package/dist/templates.js +551 -447
- package/package.json +12 -12
package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js
CHANGED
|
@@ -25,7 +25,7 @@ import { createContext as createContext2, useContext } from "react";
|
|
|
25
25
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
26
26
|
import {
|
|
27
27
|
forwardRef as forwardRef2,
|
|
28
|
-
useContext as
|
|
28
|
+
useContext as useContext13,
|
|
29
29
|
useEffect as useEffect3,
|
|
30
30
|
useMemo as useMemo10,
|
|
31
31
|
useState as useState6
|
|
@@ -36,7 +36,7 @@ import { createContext as createContext3 } from "react";
|
|
|
36
36
|
import React3, { useCallback, useMemo as useMemo22, useState } from "react";
|
|
37
37
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
38
38
|
import {
|
|
39
|
-
createContext as
|
|
39
|
+
createContext as createContext10,
|
|
40
40
|
useLayoutEffect,
|
|
41
41
|
useMemo as useMemo7,
|
|
42
42
|
useRef as useRef2,
|
|
@@ -66,14 +66,16 @@ import React5, {
|
|
|
66
66
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
67
67
|
import { createContext as createContext6, useContext as useContext3, useEffect, useRef, useState as useState3 } from "react";
|
|
68
68
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
69
|
-
import { createContext as
|
|
69
|
+
import { createContext as createContext9, useCallback as useCallback4, useContext as useContext8 } from "react";
|
|
70
|
+
import { createContext as createContext8 } from "react";
|
|
71
|
+
import * as React6 from "react";
|
|
70
72
|
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
71
|
-
import { useContext as useContext9 } from "react";
|
|
72
|
-
import { createContext as createContext10 } from "react";
|
|
73
|
-
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
74
|
-
import { useContext as useContext8, useMemo as useMemo8 } from "react";
|
|
75
|
-
import { useContext as useContext11, useMemo as useMemo9 } from "react";
|
|
76
73
|
import { useContext as useContext10 } from "react";
|
|
74
|
+
import { createContext as createContext11 } from "react";
|
|
75
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
76
|
+
import { useContext as useContext9, useMemo as useMemo8 } from "react";
|
|
77
|
+
import { useContext as useContext12, useMemo as useMemo9 } from "react";
|
|
78
|
+
import { useContext as useContext11 } from "react";
|
|
77
79
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
78
80
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
79
81
|
import {
|
|
@@ -84,12 +86,12 @@ import {
|
|
|
84
86
|
useRef as useRef4,
|
|
85
87
|
useState as useState7
|
|
86
88
|
} from "react";
|
|
87
|
-
import
|
|
89
|
+
import React11, { useCallback as useCallback5, useImperativeHandle as useImperativeHandle3, useRef as useRef3 } from "react";
|
|
88
90
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
89
91
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
90
|
-
import { useContext as
|
|
92
|
+
import { useContext as useContext14, useEffect as useEffect5, useState as useState9 } from "react";
|
|
91
93
|
import {
|
|
92
|
-
createContext as
|
|
94
|
+
createContext as createContext12,
|
|
93
95
|
useCallback as useCallback6,
|
|
94
96
|
useLayoutEffect as useLayoutEffect3,
|
|
95
97
|
useMemo as useMemo11,
|
|
@@ -97,12 +99,12 @@ import {
|
|
|
97
99
|
} from "react";
|
|
98
100
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
99
101
|
import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext27 } from "react";
|
|
100
|
-
import
|
|
102
|
+
import React12, { createContext as createContext13, useMemo as useMemo12 } from "react";
|
|
101
103
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
102
|
-
import { useContext as
|
|
103
|
-
import { createContext as
|
|
104
|
+
import { useContext as useContext15 } from "react";
|
|
105
|
+
import { createContext as createContext14, useEffect as useEffect6, useState as useState10 } from "react";
|
|
104
106
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
105
|
-
import { createContext as
|
|
107
|
+
import { createContext as createContext15, useMemo as useMemo13, useReducer } from "react";
|
|
106
108
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
107
109
|
import {
|
|
108
110
|
forwardRef as forwardRef4,
|
|
@@ -113,8 +115,6 @@ import {
|
|
|
113
115
|
useRef as useRef12,
|
|
114
116
|
useState as useState15
|
|
115
117
|
} from "react";
|
|
116
|
-
import { createContext as createContext15 } from "react";
|
|
117
|
-
import * as React14 from "react";
|
|
118
118
|
import { useContext as useContext17, useLayoutEffect as useLayoutEffect4, useRef as useRef7 } from "react";
|
|
119
119
|
import React15, {
|
|
120
120
|
createContext as createContext16,
|
|
@@ -328,7 +328,7 @@ function validateFps(fps, location, isGif) {
|
|
|
328
328
|
throw new TypeError(`The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif`);
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function cancelRenderInternal(scope, err) {
|
|
332
332
|
let error;
|
|
333
333
|
if (isErrorLike(err)) {
|
|
334
334
|
error = err;
|
|
@@ -340,9 +340,14 @@ function cancelRender(err) {
|
|
|
340
340
|
} else {
|
|
341
341
|
error = Error("Rendering was cancelled");
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
if (scope) {
|
|
344
|
+
scope.remotion_cancelledError = error.stack;
|
|
345
|
+
}
|
|
344
346
|
throw error;
|
|
345
347
|
}
|
|
348
|
+
function cancelRender(err) {
|
|
349
|
+
return cancelRenderInternal(typeof window !== "undefined" ? window : undefined, err);
|
|
350
|
+
}
|
|
346
351
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
347
352
|
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
348
353
|
let result = input;
|
|
@@ -748,7 +753,7 @@ var __defProp2, __export2 = (target, all) => {
|
|
|
748
753
|
});
|
|
749
754
|
}, useIsPlayer = () => {
|
|
750
755
|
return useContext(IsPlayerContext);
|
|
751
|
-
}, VERSION = "4.0.
|
|
756
|
+
}, VERSION = "4.0.375", checkMultipleRemotionVersions = () => {
|
|
752
757
|
if (typeof globalThis === "undefined") {
|
|
753
758
|
return;
|
|
754
759
|
}
|
|
@@ -1041,6 +1046,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1041
1046
|
if (override) {
|
|
1042
1047
|
return override;
|
|
1043
1048
|
}
|
|
1049
|
+
if (typeof window === "undefined" || typeof window.remotion_inputProps === "undefined") {
|
|
1050
|
+
throw new Error("Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.");
|
|
1051
|
+
}
|
|
1044
1052
|
const param = window.remotion_inputProps;
|
|
1045
1053
|
if (!param) {
|
|
1046
1054
|
return {};
|
|
@@ -1198,7 +1206,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1198
1206
|
}
|
|
1199
1207
|
}, ResolveCompositionContext, resolveCompositionsRef, needsResolution = (composition) => {
|
|
1200
1208
|
return Boolean(composition.calculateMetadata);
|
|
1201
|
-
}, PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally",
|
|
1209
|
+
}, PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally", ResolveCompositionConfigInStudio = ({ children }) => {
|
|
1202
1210
|
const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState4(null);
|
|
1203
1211
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext4(CompositionManager);
|
|
1204
1212
|
const { fastRefreshes, manualRefreshes } = useContext4(NonceContext);
|
|
@@ -1494,7 +1502,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1494
1502
|
props: {
|
|
1495
1503
|
...composition.defaultProps ?? {},
|
|
1496
1504
|
...selectedEditorProps ?? {},
|
|
1497
|
-
...typeof window === "undefined" || env.isPlayer ? {} : getInputProps() ?? {}
|
|
1505
|
+
...typeof window === "undefined" || env.isPlayer || !window.remotion_inputProps ? {} : getInputProps() ?? {}
|
|
1498
1506
|
},
|
|
1499
1507
|
defaultCodec: null,
|
|
1500
1508
|
defaultOutName: null,
|
|
@@ -1504,6 +1512,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1504
1512
|
}
|
|
1505
1513
|
};
|
|
1506
1514
|
}
|
|
1515
|
+
if (!context) {
|
|
1516
|
+
return null;
|
|
1517
|
+
}
|
|
1507
1518
|
if (!context[composition.id]) {
|
|
1508
1519
|
return null;
|
|
1509
1520
|
}
|
|
@@ -1634,8 +1645,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1634
1645
|
}
|
|
1635
1646
|
}, error = (options, ...args) => {
|
|
1636
1647
|
return console.error(...transformArgs({ args, logLevel: "error", tag: options.tag }));
|
|
1637
|
-
}, Log, handles, DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:", DELAY_RENDER_RETRIES_LEFT = "Retries left: ", DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.", DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after", defaultTimeout = 30000, delayRenderInternal = (
|
|
1638
|
-
|
|
1648
|
+
}, Log, handles, DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:", DELAY_RENDER_RETRIES_LEFT = "Retries left: ", DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.", DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after", defaultTimeout = 30000, delayRenderInternal = ({
|
|
1649
|
+
scope,
|
|
1650
|
+
environment,
|
|
1651
|
+
label,
|
|
1652
|
+
options
|
|
1653
|
+
}) => {
|
|
1654
|
+
if (typeof label !== "string" && label !== null) {
|
|
1639
1655
|
throw new Error("The label parameter of delayRender() must be a string or undefined, got: " + JSON.stringify(label));
|
|
1640
1656
|
}
|
|
1641
1657
|
const handle = Math.random();
|
|
@@ -1658,7 +1674,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1658
1674
|
DELAY_RENDER_CALLSTACK_TOKEN,
|
|
1659
1675
|
called
|
|
1660
1676
|
].filter(truthy2).join(" ");
|
|
1661
|
-
|
|
1677
|
+
cancelRenderInternal(scope, Error(message));
|
|
1662
1678
|
}, timeoutToUse)
|
|
1663
1679
|
};
|
|
1664
1680
|
}
|
|
@@ -1667,7 +1683,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1667
1683
|
scope.remotion_renderReady = false;
|
|
1668
1684
|
}
|
|
1669
1685
|
return handle;
|
|
1670
|
-
}, continueRenderInternal = (
|
|
1686
|
+
}, continueRenderInternal = ({
|
|
1687
|
+
scope,
|
|
1688
|
+
handle,
|
|
1689
|
+
environment,
|
|
1690
|
+
logLevel
|
|
1691
|
+
}) => {
|
|
1671
1692
|
if (typeof handle === "undefined") {
|
|
1672
1693
|
throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");
|
|
1673
1694
|
}
|
|
@@ -1687,7 +1708,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1687
1708
|
DELAY_RENDER_CLEAR_TOKEN,
|
|
1688
1709
|
`${Date.now() - startTime}ms`
|
|
1689
1710
|
].filter(truthy2).join(" ");
|
|
1690
|
-
Log.verbose({ logLevel
|
|
1711
|
+
Log.verbose({ logLevel, tag: "delayRender()" }, message);
|
|
1691
1712
|
delete scope.remotion_delayRenderTimeouts[handle];
|
|
1692
1713
|
}
|
|
1693
1714
|
return false;
|
|
@@ -1697,16 +1718,42 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1697
1718
|
if (handles.length === 0 && typeof scope !== "undefined") {
|
|
1698
1719
|
scope.remotion_renderReady = true;
|
|
1699
1720
|
}
|
|
1721
|
+
}, LogLevelContext, useLogLevel = () => {
|
|
1722
|
+
const { logLevel } = React6.useContext(LogLevelContext);
|
|
1723
|
+
if (logLevel === null) {
|
|
1724
|
+
throw new Error("useLogLevel must be used within a LogLevelProvider");
|
|
1725
|
+
}
|
|
1726
|
+
return logLevel;
|
|
1727
|
+
}, useMountTime = () => {
|
|
1728
|
+
const { mountTime } = React6.useContext(LogLevelContext);
|
|
1729
|
+
if (mountTime === null) {
|
|
1730
|
+
throw new Error("useMountTime must be used within a LogLevelProvider");
|
|
1731
|
+
}
|
|
1732
|
+
return mountTime;
|
|
1700
1733
|
}, DelayRenderContextType, useDelayRender = () => {
|
|
1701
1734
|
const environment = useRemotionEnvironment();
|
|
1702
|
-
const scope =
|
|
1735
|
+
const scope = useContext8(DelayRenderContextType);
|
|
1736
|
+
const logLevel = useLogLevel();
|
|
1703
1737
|
const delayRender2 = useCallback4((label, options) => {
|
|
1704
|
-
return delayRenderInternal(
|
|
1738
|
+
return delayRenderInternal({
|
|
1739
|
+
scope: scope ?? (typeof window !== "undefined" ? window : undefined),
|
|
1740
|
+
environment,
|
|
1741
|
+
label: label ?? null,
|
|
1742
|
+
options: options ?? {}
|
|
1743
|
+
});
|
|
1705
1744
|
}, [environment, scope]);
|
|
1706
1745
|
const continueRender2 = useCallback4((handle) => {
|
|
1707
|
-
continueRenderInternal(
|
|
1708
|
-
|
|
1709
|
-
|
|
1746
|
+
continueRenderInternal({
|
|
1747
|
+
scope: scope ?? (typeof window !== "undefined" ? window : undefined),
|
|
1748
|
+
handle,
|
|
1749
|
+
environment,
|
|
1750
|
+
logLevel
|
|
1751
|
+
});
|
|
1752
|
+
}, [environment, logLevel, scope]);
|
|
1753
|
+
const cancelRender2 = useCallback4((err) => {
|
|
1754
|
+
return cancelRenderInternal(scope ?? (typeof window !== "undefined" ? window : undefined), err);
|
|
1755
|
+
}, [scope]);
|
|
1756
|
+
return { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 };
|
|
1710
1757
|
}, SetTimelineContext, TimelineContext, TimelineContextProvider = ({ children, frameState }) => {
|
|
1711
1758
|
const [playing, setPlaying] = useState5(false);
|
|
1712
1759
|
const imperativePlaying = useRef2(false);
|
|
@@ -1772,7 +1819,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1772
1819
|
children
|
|
1773
1820
|
});
|
|
1774
1821
|
}, useUnsafeVideoConfig = () => {
|
|
1775
|
-
const context =
|
|
1822
|
+
const context = useContext9(SequenceContext);
|
|
1776
1823
|
const ctxWidth = context?.width ?? null;
|
|
1777
1824
|
const ctxHeight = context?.height ?? null;
|
|
1778
1825
|
const ctxDuration = context?.durationInFrames ?? null;
|
|
@@ -1812,7 +1859,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1812
1859
|
}, [ctxDuration, ctxHeight, ctxWidth, video]);
|
|
1813
1860
|
}, useVideoConfig = () => {
|
|
1814
1861
|
const videoConfig = useUnsafeVideoConfig();
|
|
1815
|
-
const context =
|
|
1862
|
+
const context = useContext10(CanUseRemotionHooks);
|
|
1816
1863
|
const isPlayer = useIsPlayer();
|
|
1817
1864
|
if (!videoConfig) {
|
|
1818
1865
|
if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
|
|
@@ -1829,7 +1876,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1829
1876
|
}
|
|
1830
1877
|
return videoConfig;
|
|
1831
1878
|
}, useCurrentFrame = () => {
|
|
1832
|
-
const canUseRemotionHooks =
|
|
1879
|
+
const canUseRemotionHooks = useContext11(CanUseRemotionHooks);
|
|
1833
1880
|
const env = useRemotionEnvironment();
|
|
1834
1881
|
if (!canUseRemotionHooks) {
|
|
1835
1882
|
if (env.isPlayer) {
|
|
@@ -1838,7 +1885,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1838
1885
|
throw new Error(`useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions`);
|
|
1839
1886
|
}
|
|
1840
1887
|
const frame = useTimelinePosition();
|
|
1841
|
-
const context =
|
|
1888
|
+
const context = useContext11(SequenceContext);
|
|
1842
1889
|
const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
|
|
1843
1890
|
return frame - contextOffset;
|
|
1844
1891
|
}, Freeze = ({
|
|
@@ -1868,8 +1915,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1868
1915
|
return active(frame);
|
|
1869
1916
|
}
|
|
1870
1917
|
}, [active, frame]);
|
|
1871
|
-
const timelineContext =
|
|
1872
|
-
const sequenceContext =
|
|
1918
|
+
const timelineContext = useContext12(TimelineContext);
|
|
1919
|
+
const sequenceContext = useContext12(SequenceContext);
|
|
1873
1920
|
const relativeFrom = sequenceContext?.relativeFrom ?? 0;
|
|
1874
1921
|
const timelineValue = useMemo9(() => {
|
|
1875
1922
|
if (!isActive) {
|
|
@@ -1922,8 +1969,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1922
1969
|
}, ref) => {
|
|
1923
1970
|
const { layout = "absolute-fill" } = other;
|
|
1924
1971
|
const [id] = useState6(() => String(Math.random()));
|
|
1925
|
-
const parentSequence =
|
|
1926
|
-
const { rootId } =
|
|
1972
|
+
const parentSequence = useContext13(SequenceContext);
|
|
1973
|
+
const { rootId } = useContext13(TimelineContext);
|
|
1927
1974
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
1928
1975
|
const nonce = useNonce();
|
|
1929
1976
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
@@ -1948,8 +1995,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1948
1995
|
const videoConfig = useVideoConfig();
|
|
1949
1996
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
1950
1997
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
1951
|
-
const { registerSequence, unregisterSequence } =
|
|
1952
|
-
const { hidden } =
|
|
1998
|
+
const { registerSequence, unregisterSequence } = useContext13(SequenceManager);
|
|
1999
|
+
const { hidden } = useContext13(SequenceVisibilityToggleContext);
|
|
1953
2000
|
const premounting = useMemo10(() => {
|
|
1954
2001
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
1955
2002
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
@@ -2413,7 +2460,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2413
2460
|
children
|
|
2414
2461
|
});
|
|
2415
2462
|
}, ArtifactThumbnail, Artifact = ({ filename, content, downloadBehavior }) => {
|
|
2416
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
2463
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext14(RenderAssetManager);
|
|
2417
2464
|
const env = useRemotionEnvironment();
|
|
2418
2465
|
const frame = useCurrentFrame();
|
|
2419
2466
|
const [id] = useState9(() => {
|
|
@@ -2491,7 +2538,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2491
2538
|
const actualDuration = duration / playbackRate;
|
|
2492
2539
|
return Math.floor(actualDuration);
|
|
2493
2540
|
}, LoopContext, useLoop = () => {
|
|
2494
|
-
return
|
|
2541
|
+
return React12.useContext(LoopContext);
|
|
2495
2542
|
}, Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {
|
|
2496
2543
|
const currentFrame = useCurrentFrame();
|
|
2497
2544
|
const { durationInFrames: compDuration } = useVideoConfig();
|
|
@@ -2579,7 +2626,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2579
2626
|
}
|
|
2580
2627
|
return src.slice(0, hashIndex);
|
|
2581
2628
|
}, usePreload = (src) => {
|
|
2582
|
-
const preloads2 =
|
|
2629
|
+
const preloads2 = useContext15(PreloadContext);
|
|
2583
2630
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
2584
2631
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
2585
2632
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -2875,18 +2922,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2875
2922
|
return "anonymous";
|
|
2876
2923
|
}
|
|
2877
2924
|
return;
|
|
2878
|
-
}, LogLevelContext, useLogLevel = () => {
|
|
2879
|
-
const { logLevel } = React14.useContext(LogLevelContext);
|
|
2880
|
-
if (logLevel === null) {
|
|
2881
|
-
throw new Error("useLogLevel must be used within a LogLevelProvider");
|
|
2882
|
-
}
|
|
2883
|
-
return logLevel;
|
|
2884
|
-
}, useMountTime = () => {
|
|
2885
|
-
const { mountTime } = React14.useContext(LogLevelContext);
|
|
2886
|
-
if (mountTime === null) {
|
|
2887
|
-
throw new Error("useMountTime must be used within a LogLevelProvider");
|
|
2888
|
-
}
|
|
2889
|
-
return mountTime;
|
|
2890
2925
|
}, playAndHandleNotAllowedError = ({
|
|
2891
2926
|
mediaRef,
|
|
2892
2927
|
mediaType,
|
|
@@ -5393,14 +5428,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5393
5428
|
children: /* @__PURE__ */ jsx28(PrefetchProvider, {
|
|
5394
5429
|
children: /* @__PURE__ */ jsx28(SequenceManagerProvider, {
|
|
5395
5430
|
children: /* @__PURE__ */ jsx28(RenderAssetManagerProvider, {
|
|
5396
|
-
children: /* @__PURE__ */ jsx28(
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
children: /* @__PURE__ */ jsx28(
|
|
5401
|
-
children
|
|
5402
|
-
children
|
|
5403
|
-
})
|
|
5431
|
+
children: /* @__PURE__ */ jsx28(SharedAudioContextProvider, {
|
|
5432
|
+
numberOfAudioTags,
|
|
5433
|
+
audioLatencyHint,
|
|
5434
|
+
children: /* @__PURE__ */ jsx28(DurationsContextProvider, {
|
|
5435
|
+
children: /* @__PURE__ */ jsx28(BufferingProvider, {
|
|
5436
|
+
children
|
|
5404
5437
|
})
|
|
5405
5438
|
})
|
|
5406
5439
|
})
|
|
@@ -6823,8 +6856,12 @@ var init_esm = __esm(() => {
|
|
|
6823
6856
|
window.remotion_delayRenderTimeouts = {};
|
|
6824
6857
|
}
|
|
6825
6858
|
}
|
|
6826
|
-
|
|
6827
|
-
|
|
6859
|
+
LogLevelContext = createContext8({
|
|
6860
|
+
logLevel: "info",
|
|
6861
|
+
mountTime: 0
|
|
6862
|
+
});
|
|
6863
|
+
DelayRenderContextType = createContext9(null);
|
|
6864
|
+
SetTimelineContext = createContext10({
|
|
6828
6865
|
setFrame: () => {
|
|
6829
6866
|
throw new Error("default");
|
|
6830
6867
|
},
|
|
@@ -6832,7 +6869,7 @@ var init_esm = __esm(() => {
|
|
|
6832
6869
|
throw new Error("default");
|
|
6833
6870
|
}
|
|
6834
6871
|
});
|
|
6835
|
-
TimelineContext =
|
|
6872
|
+
TimelineContext = createContext10({
|
|
6836
6873
|
frame: {},
|
|
6837
6874
|
playing: false,
|
|
6838
6875
|
playbackRate: 1,
|
|
@@ -6845,11 +6882,11 @@ var init_esm = __esm(() => {
|
|
|
6845
6882
|
},
|
|
6846
6883
|
audioAndVideoTags: { current: [] }
|
|
6847
6884
|
});
|
|
6848
|
-
CanUseRemotionHooks =
|
|
6885
|
+
CanUseRemotionHooks = createContext11(false);
|
|
6849
6886
|
RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);
|
|
6850
6887
|
PremountedPostmountedSequence = forwardRef2(PremountedPostmountedSequenceRefForwardingFunction);
|
|
6851
6888
|
Sequence = forwardRef2(SequenceRefForwardingFunction);
|
|
6852
|
-
Canvas =
|
|
6889
|
+
Canvas = React11.forwardRef(CanvasRefForwardingFunction);
|
|
6853
6890
|
AnimatedImage = forwardRef3(({
|
|
6854
6891
|
src,
|
|
6855
6892
|
width,
|
|
@@ -6957,7 +6994,7 @@ var init_esm = __esm(() => {
|
|
|
6957
6994
|
...props
|
|
6958
6995
|
});
|
|
6959
6996
|
});
|
|
6960
|
-
RenderAssetManager =
|
|
6997
|
+
RenderAssetManager = createContext12({
|
|
6961
6998
|
registerRenderAsset: () => {
|
|
6962
6999
|
return;
|
|
6963
7000
|
},
|
|
@@ -6968,21 +7005,17 @@ var init_esm = __esm(() => {
|
|
|
6968
7005
|
});
|
|
6969
7006
|
ArtifactThumbnail = Symbol("Thumbnail");
|
|
6970
7007
|
Artifact.Thumbnail = ArtifactThumbnail;
|
|
6971
|
-
LoopContext =
|
|
7008
|
+
LoopContext = createContext13(null);
|
|
6972
7009
|
Loop.useLoop = useLoop;
|
|
6973
|
-
PreloadContext =
|
|
7010
|
+
PreloadContext = createContext14({});
|
|
6974
7011
|
preloads = {};
|
|
6975
7012
|
updaters = [];
|
|
6976
|
-
DurationsContext =
|
|
7013
|
+
DurationsContext = createContext15({
|
|
6977
7014
|
durations: {},
|
|
6978
7015
|
setDurations: () => {
|
|
6979
7016
|
throw new Error("context missing");
|
|
6980
7017
|
}
|
|
6981
7018
|
});
|
|
6982
|
-
LogLevelContext = createContext15({
|
|
6983
|
-
logLevel: "info",
|
|
6984
|
-
mountTime: 0
|
|
6985
|
-
});
|
|
6986
7019
|
SharedAudioContext = createContext16(null);
|
|
6987
7020
|
didWarn = {};
|
|
6988
7021
|
BufferingContextReact = React16.createContext(null);
|
|
@@ -7100,7 +7133,7 @@ var init_esm = __esm(() => {
|
|
|
7100
7133
|
resolveVideoConfig,
|
|
7101
7134
|
useResolvedVideoConfig,
|
|
7102
7135
|
resolveCompositionsRef,
|
|
7103
|
-
|
|
7136
|
+
ResolveCompositionConfigInStudio,
|
|
7104
7137
|
REMOTION_STUDIO_CONTAINER_ELEMENT,
|
|
7105
7138
|
RenderAssetManager,
|
|
7106
7139
|
persistCurrentFrame,
|
|
@@ -7201,7 +7234,7 @@ var init_esm = __esm(() => {
|
|
|
7201
7234
|
});
|
|
7202
7235
|
|
|
7203
7236
|
// ../design/dist/esm/index.mjs
|
|
7204
|
-
import { useCallback as useCallback18, useRef as
|
|
7237
|
+
import { useCallback as useCallback18, useRef as useRef22, useState as useState22 } from "react";
|
|
7205
7238
|
|
|
7206
7239
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
7207
7240
|
function r(e) {
|
|
@@ -8542,7 +8575,7 @@ var getDefaultConfig = () => {
|
|
|
8542
8575
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
8543
8576
|
|
|
8544
8577
|
// ../design/dist/esm/index.mjs
|
|
8545
|
-
import
|
|
8578
|
+
import React7, { useEffect as useEffect23, useMemo as useMemo33, useState as useState21 } from "react";
|
|
8546
8579
|
|
|
8547
8580
|
// ../paths/dist/esm/index.mjs
|
|
8548
8581
|
var cutLInstruction = ({
|
|
@@ -12683,65 +12716,69 @@ var extrudeAndTransformElement = (options) => {
|
|
|
12683
12716
|
init_esm();
|
|
12684
12717
|
import { jsx as jsx37, Fragment } from "react/jsx-runtime";
|
|
12685
12718
|
import { jsx as jsx210, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
12719
|
+
import { useEffect as useEffect24, useMemo as useMemo210, useRef as useRef18 } from "react";
|
|
12686
12720
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
12687
|
-
import
|
|
12688
|
-
import
|
|
12721
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12722
|
+
import React42 from "react";
|
|
12689
12723
|
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
12690
|
-
import { jsx as jsx63
|
|
12691
|
-
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
12692
|
-
import
|
|
12693
|
-
import * as ReactDOM4 from "react-dom";
|
|
12694
|
-
import React7 from "react";
|
|
12695
|
-
import * as React42 from "react";
|
|
12724
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
12725
|
+
import { jsx as jsx73, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
12726
|
+
import React52 from "react";
|
|
12696
12727
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
12697
|
-
import
|
|
12728
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
12729
|
+
import * as React34 from "react";
|
|
12730
|
+
import * as ReactDOM4 from "react-dom";
|
|
12731
|
+
import React9 from "react";
|
|
12698
12732
|
import * as React62 from "react";
|
|
12699
|
-
import { Fragment as Fragment2, jsx as jsx93 } from "react/jsx-runtime";
|
|
12700
12733
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
12734
|
+
import * as React72 from "react";
|
|
12701
12735
|
import * as React8 from "react";
|
|
12702
|
-
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
12703
|
-
import * as React12 from "react";
|
|
12704
|
-
import * as React9 from "react";
|
|
12705
|
-
import * as ReactDOM from "react-dom";
|
|
12736
|
+
import { Fragment as Fragment2, jsx as jsx112 } from "react/jsx-runtime";
|
|
12706
12737
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
12707
|
-
import * as
|
|
12708
|
-
import * as React112 from "react";
|
|
12738
|
+
import * as React10 from "react";
|
|
12709
12739
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
12710
|
-
import * as
|
|
12711
|
-
import * as
|
|
12740
|
+
import * as React14 from "react";
|
|
12741
|
+
import * as React112 from "react";
|
|
12742
|
+
import * as ReactDOM from "react-dom";
|
|
12712
12743
|
import { jsx as jsx142 } from "react/jsx-runtime";
|
|
12713
|
-
import * as
|
|
12744
|
+
import * as React122 from "react";
|
|
12745
|
+
import * as React13 from "react";
|
|
12746
|
+
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
12714
12747
|
import * as React152 from "react";
|
|
12715
|
-
import * as
|
|
12716
|
-
import
|
|
12717
|
-
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect72 } from "react";
|
|
12718
|
-
import * as ReactDOM2 from "react-dom";
|
|
12748
|
+
import * as React162 from "react";
|
|
12749
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
12719
12750
|
import * as React18 from "react";
|
|
12720
|
-
import
|
|
12751
|
+
import * as React172 from "react";
|
|
12752
|
+
import * as React22 from "react";
|
|
12721
12753
|
import * as React19 from "react";
|
|
12722
|
-
import {
|
|
12723
|
-
import * as
|
|
12724
|
-
import
|
|
12754
|
+
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
12755
|
+
import * as ReactDOM2 from "react-dom";
|
|
12756
|
+
import * as React20 from "react";
|
|
12725
12757
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
12726
|
-
import * as
|
|
12758
|
+
import * as React212 from "react";
|
|
12759
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
12727
12760
|
import * as React23 from "react";
|
|
12761
|
+
import ReactDOM3 from "react-dom";
|
|
12762
|
+
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
12728
12763
|
import * as React24 from "react";
|
|
12729
|
-
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
12730
|
-
import * as React312 from "react";
|
|
12731
|
-
import * as React272 from "react";
|
|
12732
|
-
import { useState as useState112 } from "react";
|
|
12733
12764
|
import * as React252 from "react";
|
|
12734
12765
|
import * as React26 from "react";
|
|
12735
|
-
import
|
|
12766
|
+
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
12767
|
+
import * as React332 from "react";
|
|
12736
12768
|
import * as React29 from "react";
|
|
12769
|
+
import { useState as useState112 } from "react";
|
|
12770
|
+
import * as React272 from "react";
|
|
12737
12771
|
import * as React28 from "react";
|
|
12738
|
-
import
|
|
12772
|
+
import * as React322 from "react";
|
|
12773
|
+
import * as React312 from "react";
|
|
12774
|
+
import * as React30 from "react";
|
|
12775
|
+
import { Fragment as Fragment52, jsx as jsx212, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
12739
12776
|
import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
|
|
12740
12777
|
import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
|
|
12741
|
-
import * as
|
|
12742
|
-
import { jsx as
|
|
12743
|
-
import { jsx as
|
|
12744
|
-
import { jsx as
|
|
12778
|
+
import * as React352 from "react";
|
|
12779
|
+
import { jsx as jsx223, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
12780
|
+
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
12781
|
+
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
12745
12782
|
function cn(...inputs) {
|
|
12746
12783
|
return twMerge(clsx(inputs));
|
|
12747
12784
|
}
|
|
@@ -12760,7 +12797,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
12760
12797
|
return childNode;
|
|
12761
12798
|
};
|
|
12762
12799
|
var useHoverTransforms = (ref, disabled) => {
|
|
12763
|
-
const [state, setState] =
|
|
12800
|
+
const [state, setState] = React7.useState({
|
|
12764
12801
|
progress: 0,
|
|
12765
12802
|
isActive: false
|
|
12766
12803
|
});
|
|
@@ -12772,7 +12809,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
12772
12809
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
12773
12810
|
}
|
|
12774
12811
|
}, [disabled, eventTarget]);
|
|
12775
|
-
|
|
12812
|
+
React7.useEffect(() => {
|
|
12776
12813
|
const element = ref.current;
|
|
12777
12814
|
if (!element)
|
|
12778
12815
|
return;
|
|
@@ -12847,8 +12884,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
12847
12884
|
return state;
|
|
12848
12885
|
};
|
|
12849
12886
|
var useClickTransforms = (ref) => {
|
|
12850
|
-
const [hoverProgress, setHoverProgress] =
|
|
12851
|
-
|
|
12887
|
+
const [hoverProgress, setHoverProgress] = React7.useState(0);
|
|
12888
|
+
React7.useEffect(() => {
|
|
12852
12889
|
const element = getChildNodeFrom(ref.current);
|
|
12853
12890
|
if (!element) {
|
|
12854
12891
|
return;
|
|
@@ -12971,6 +13008,7 @@ var Outer = ({
|
|
|
12971
13008
|
const depth = depthFromHover;
|
|
12972
13009
|
const frontFace = reduceMatrices([
|
|
12973
13010
|
translateZ(-depth / 2 + depthFromClick),
|
|
13011
|
+
translateZ(1.1),
|
|
12974
13012
|
transformation
|
|
12975
13013
|
]);
|
|
12976
13014
|
const centerOriented = reduceMatrices([
|
|
@@ -13021,10 +13059,56 @@ var Outer = ({
|
|
|
13021
13059
|
]
|
|
13022
13060
|
});
|
|
13023
13061
|
};
|
|
13024
|
-
var
|
|
13062
|
+
var viewBox = 100;
|
|
13063
|
+
var lines = 8;
|
|
13064
|
+
var translated2 = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
|
|
13065
|
+
var Spinner = ({ size, duration }) => {
|
|
13066
|
+
const style = useMemo210(() => {
|
|
13067
|
+
return {
|
|
13068
|
+
width: size,
|
|
13069
|
+
height: size
|
|
13070
|
+
};
|
|
13071
|
+
}, [size]);
|
|
13072
|
+
const pathsRef = useRef18([]);
|
|
13073
|
+
useEffect24(() => {
|
|
13074
|
+
const animate = () => {
|
|
13075
|
+
const now = performance.now();
|
|
13076
|
+
for (let index = 0;index < lines; index++) {
|
|
13077
|
+
const path = pathsRef.current[index];
|
|
13078
|
+
if (!path)
|
|
13079
|
+
continue;
|
|
13080
|
+
const progress = (now / 1000 - index * (duration / lines)) % duration / duration;
|
|
13081
|
+
const opacity = 1 - 0.85 * progress;
|
|
13082
|
+
path.style.opacity = opacity.toString();
|
|
13083
|
+
}
|
|
13084
|
+
requestAnimationFrame(animate);
|
|
13085
|
+
};
|
|
13086
|
+
const id = requestAnimationFrame(animate);
|
|
13087
|
+
return () => {
|
|
13088
|
+
cancelAnimationFrame(id);
|
|
13089
|
+
};
|
|
13090
|
+
}, [duration]);
|
|
13091
|
+
return /* @__PURE__ */ jsx38("svg", {
|
|
13092
|
+
style,
|
|
13093
|
+
viewBox: `0 0 ${viewBox} ${viewBox}`,
|
|
13094
|
+
children: new Array(lines).fill(true).map((_, index) => {
|
|
13095
|
+
return /* @__PURE__ */ jsx38("path", {
|
|
13096
|
+
ref: (el) => pathsRef.current[index] = el,
|
|
13097
|
+
style: {
|
|
13098
|
+
rotate: `${index * Math.PI * 2 / lines}rad`,
|
|
13099
|
+
transformOrigin: "center center",
|
|
13100
|
+
opacity: 1
|
|
13101
|
+
},
|
|
13102
|
+
d: translated2,
|
|
13103
|
+
fill: "currentColor"
|
|
13104
|
+
}, index);
|
|
13105
|
+
})
|
|
13106
|
+
});
|
|
13107
|
+
};
|
|
13108
|
+
var Button = ({ children, className, disabled, depth, loading, ...buttonProps }) => {
|
|
13025
13109
|
const [dimensions, setDimensions] = useState22(null);
|
|
13026
|
-
const ref =
|
|
13027
|
-
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled));
|
|
13110
|
+
const ref = useRef22(null);
|
|
13111
|
+
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
13028
13112
|
const onPointerEnter = useCallback18((e) => {
|
|
13029
13113
|
if (e.pointerType !== "mouse") {
|
|
13030
13114
|
return;
|
|
@@ -13059,18 +13143,30 @@ var Button = ({ children, className, disabled, depth, ...buttonProps }) => {
|
|
|
13059
13143
|
};
|
|
13060
13144
|
});
|
|
13061
13145
|
}, []);
|
|
13062
|
-
const content = /* @__PURE__ */
|
|
13146
|
+
const content = /* @__PURE__ */ jsxs23("button", {
|
|
13063
13147
|
type: "button",
|
|
13064
|
-
disabled,
|
|
13065
|
-
className: cn("text-text", "flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex", "flex-row", "items-center", "disabled:cursor-default", "disabled:
|
|
13148
|
+
disabled: disabled || loading,
|
|
13149
|
+
className: cn("text-text", "flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex", "flex-row", "items-center", "disabled:cursor-default", "disabled:opacity-50", "relative", "overflow-hidden", className),
|
|
13066
13150
|
...buttonProps,
|
|
13067
|
-
children
|
|
13151
|
+
children: [
|
|
13152
|
+
/* @__PURE__ */ jsx43("div", {
|
|
13153
|
+
className: cn(loading && "invisible", "inline-flex"),
|
|
13154
|
+
children
|
|
13155
|
+
}),
|
|
13156
|
+
loading ? /* @__PURE__ */ jsx43("div", {
|
|
13157
|
+
className: cn("absolute w-full h-full flex inset-0 items-center justify-center text-inherit bg-inherit"),
|
|
13158
|
+
children: /* @__PURE__ */ jsx43(Spinner, {
|
|
13159
|
+
size: 20,
|
|
13160
|
+
duration: 1
|
|
13161
|
+
})
|
|
13162
|
+
}) : null
|
|
13163
|
+
]
|
|
13068
13164
|
});
|
|
13069
|
-
return /* @__PURE__ */
|
|
13165
|
+
return /* @__PURE__ */ jsx43("div", {
|
|
13070
13166
|
ref,
|
|
13071
13167
|
className: "contents",
|
|
13072
13168
|
onPointerEnter,
|
|
13073
|
-
children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */
|
|
13169
|
+
children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */ jsx43(Outer, {
|
|
13074
13170
|
parentRef: ref,
|
|
13075
13171
|
width: dimensions.width,
|
|
13076
13172
|
height: dimensions.height,
|
|
@@ -13081,8 +13177,8 @@ var Button = ({ children, className, disabled, depth, ...buttonProps }) => {
|
|
|
13081
13177
|
}) : content
|
|
13082
13178
|
});
|
|
13083
13179
|
};
|
|
13084
|
-
var Card =
|
|
13085
|
-
return /* @__PURE__ */
|
|
13180
|
+
var Card = React42.forwardRef(({ children, className, ...rest }, ref) => {
|
|
13181
|
+
return /* @__PURE__ */ jsx53("div", {
|
|
13086
13182
|
ref,
|
|
13087
13183
|
className: cn("rounded-lg border-2 border-black bg-card-bg text-text border-b-4", className),
|
|
13088
13184
|
...rest,
|
|
@@ -13092,18 +13188,18 @@ var Card = React34.forwardRef(({ children, className, ...rest }, ref) => {
|
|
|
13092
13188
|
Card.displayName = "Card";
|
|
13093
13189
|
var d = "M143.056 81.4934C147.25 77.2994 147.25 70.4506 143.056 66.2566C138.862 62.0627 132.013 62.0627 127.819 66.2566L86.1875 107.888L69.1809 90.8816C64.9869 86.6877 58.1381 86.6877 53.9441 90.8816C49.7502 95.0756 49.7502 101.924 53.9441 106.118L78.5691 130.743C82.7631 134.937 89.6119 134.937 93.8059 130.743L143.056 81.4934Z";
|
|
13094
13190
|
var CheckIcon = (props) => {
|
|
13095
|
-
return /* @__PURE__ */
|
|
13191
|
+
return /* @__PURE__ */ jsx63("svg", {
|
|
13096
13192
|
...props,
|
|
13097
13193
|
viewBox: "50.79867500000001 63.11117499999997 95.40282500000015 70.77732499999999",
|
|
13098
13194
|
fill: "none",
|
|
13099
13195
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13100
|
-
children: /* @__PURE__ */
|
|
13196
|
+
children: /* @__PURE__ */ jsx63("path", {
|
|
13101
13197
|
d,
|
|
13102
13198
|
fill: "currentcolor"
|
|
13103
13199
|
})
|
|
13104
13200
|
});
|
|
13105
13201
|
};
|
|
13106
|
-
var Triangle = ({ rotated: rotated2 }) => /* @__PURE__ */
|
|
13202
|
+
var Triangle = ({ rotated: rotated2 }) => /* @__PURE__ */ jsx73("svg", {
|
|
13107
13203
|
width: "12px",
|
|
13108
13204
|
height: "7px",
|
|
13109
13205
|
viewBox: "0 0 12 7",
|
|
@@ -13111,7 +13207,7 @@ var Triangle = ({ rotated: rotated2 }) => /* @__PURE__ */ jsx63("svg", {
|
|
|
13111
13207
|
style: {
|
|
13112
13208
|
transform: rotated2 ? "rotate(180deg)" : "rotate(0deg)"
|
|
13113
13209
|
},
|
|
13114
|
-
children: /* @__PURE__ */
|
|
13210
|
+
children: /* @__PURE__ */ jsx73("path", {
|
|
13115
13211
|
className: "fill-text",
|
|
13116
13212
|
d: "M7.17096 0.475588C6.73198 0.0764969 6.01906 0.0764969 5.58007 0.475588L1.08483 4.56228C0.761737 4.85601 0.666915 5.29341 0.84251 5.67654C1.01811 6.05966 1.42549 6.3087 1.88203 6.3087H10.8725C11.3255 6.3087 11.7364 6.05966 11.912 5.67654C12.0876 5.29341 11.9893 4.85601 11.6697 4.56228L7.17448 0.475588H7.17096Z"
|
|
13117
13213
|
})
|
|
@@ -13146,11 +13242,11 @@ var Counter = ({
|
|
|
13146
13242
|
const increment = () => {
|
|
13147
13243
|
setCount(count + step);
|
|
13148
13244
|
};
|
|
13149
|
-
return /* @__PURE__ */
|
|
13245
|
+
return /* @__PURE__ */ jsxs32(Card, {
|
|
13150
13246
|
style: container2,
|
|
13151
13247
|
className: cn("w-[140px] flex flex-row overflow-hidden"),
|
|
13152
13248
|
children: [
|
|
13153
|
-
/* @__PURE__ */
|
|
13249
|
+
/* @__PURE__ */ jsx73("input", {
|
|
13154
13250
|
className: "fontbrand text-2xl font-medium min-w-[80px] border-0 text-end outline-0 text-text overflow-hidden flex-1 px-0 py-0 pr-2 w-full h-full tabular-nums",
|
|
13155
13251
|
type: "number",
|
|
13156
13252
|
onClick: (e) => e.currentTarget.select(),
|
|
@@ -13170,28 +13266,28 @@ var Counter = ({
|
|
|
13170
13266
|
}
|
|
13171
13267
|
}
|
|
13172
13268
|
}),
|
|
13173
|
-
/* @__PURE__ */
|
|
13269
|
+
/* @__PURE__ */ jsxs32("div", {
|
|
13174
13270
|
className: "flex flex-col h-full",
|
|
13175
13271
|
children: [
|
|
13176
|
-
/* @__PURE__ */
|
|
13272
|
+
/* @__PURE__ */ jsx73("button", {
|
|
13177
13273
|
type: "button",
|
|
13178
13274
|
className: "border-0 flex-1 p-0 pt-[5px] bg-transparent",
|
|
13179
13275
|
style: {
|
|
13180
13276
|
...buttonContainer
|
|
13181
13277
|
},
|
|
13182
13278
|
onClick: increment,
|
|
13183
|
-
children: /* @__PURE__ */
|
|
13279
|
+
children: /* @__PURE__ */ jsx73(Triangle, {
|
|
13184
13280
|
rotated: false
|
|
13185
13281
|
})
|
|
13186
13282
|
}),
|
|
13187
|
-
/* @__PURE__ */
|
|
13283
|
+
/* @__PURE__ */ jsx73("button", {
|
|
13188
13284
|
type: "button",
|
|
13189
13285
|
className: "border-0 flex-1 p-0 bg-transparent pb-[5px] pl-[1px]",
|
|
13190
13286
|
style: {
|
|
13191
13287
|
...buttonContainer
|
|
13192
13288
|
},
|
|
13193
13289
|
onClick: decrement,
|
|
13194
|
-
children: /* @__PURE__ */
|
|
13290
|
+
children: /* @__PURE__ */ jsx73(Triangle, {
|
|
13195
13291
|
rotated: true
|
|
13196
13292
|
})
|
|
13197
13293
|
})
|
|
@@ -13200,12 +13296,20 @@ var Counter = ({
|
|
|
13200
13296
|
]
|
|
13201
13297
|
});
|
|
13202
13298
|
};
|
|
13299
|
+
var Input = React52.forwardRef(({ className, ...props }, ref) => {
|
|
13300
|
+
return /* @__PURE__ */ jsx83("input", {
|
|
13301
|
+
ref,
|
|
13302
|
+
className: cn("w-full dark:bg-[#121212] rounded-lg border-2 border-b-4 border-black outline-none h-14 px-3 fontbrand text-lg box-border", className),
|
|
13303
|
+
...props
|
|
13304
|
+
});
|
|
13305
|
+
});
|
|
13306
|
+
Input.displayName = "Input";
|
|
13203
13307
|
var PlanePaperIcon = (props) => {
|
|
13204
|
-
return /* @__PURE__ */
|
|
13308
|
+
return /* @__PURE__ */ jsx93("svg", {
|
|
13205
13309
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13206
13310
|
...props,
|
|
13207
13311
|
viewBox: "0 0 576 512",
|
|
13208
|
-
children: /* @__PURE__ */
|
|
13312
|
+
children: /* @__PURE__ */ jsx93("path", {
|
|
13209
13313
|
fill: "currentcolor",
|
|
13210
13314
|
d: "M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"
|
|
13211
13315
|
})
|
|
@@ -13225,18 +13329,18 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
13225
13329
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
13226
13330
|
let defaultContexts = [];
|
|
13227
13331
|
function createContext32(rootComponentName, defaultContext) {
|
|
13228
|
-
const BaseContext =
|
|
13332
|
+
const BaseContext = React62.createContext(defaultContext);
|
|
13229
13333
|
const index = defaultContexts.length;
|
|
13230
13334
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
13231
13335
|
function Provider(props) {
|
|
13232
13336
|
const { scope, children, ...context } = props;
|
|
13233
13337
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
13234
|
-
const value =
|
|
13235
|
-
return /* @__PURE__ */
|
|
13338
|
+
const value = React62.useMemo(() => context, Object.values(context));
|
|
13339
|
+
return /* @__PURE__ */ jsx103(Context.Provider, { value, children });
|
|
13236
13340
|
}
|
|
13237
13341
|
function useContext210(consumerName, scope) {
|
|
13238
13342
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
13239
|
-
const context =
|
|
13343
|
+
const context = React62.useContext(Context);
|
|
13240
13344
|
if (context)
|
|
13241
13345
|
return context;
|
|
13242
13346
|
if (defaultContext !== undefined)
|
|
@@ -13248,11 +13352,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
13248
13352
|
}
|
|
13249
13353
|
const createScope = () => {
|
|
13250
13354
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
13251
|
-
return
|
|
13355
|
+
return React62.createContext(defaultContext);
|
|
13252
13356
|
});
|
|
13253
13357
|
return function useScope(scope) {
|
|
13254
13358
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
13255
|
-
return
|
|
13359
|
+
return React62.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
13256
13360
|
};
|
|
13257
13361
|
};
|
|
13258
13362
|
createScope.scopeName = scopeName;
|
|
@@ -13273,7 +13377,7 @@ function composeContextScopes(...scopes) {
|
|
|
13273
13377
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
13274
13378
|
return { ...nextScopes2, ...currentScope };
|
|
13275
13379
|
}, {});
|
|
13276
|
-
return
|
|
13380
|
+
return React62.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
13277
13381
|
};
|
|
13278
13382
|
};
|
|
13279
13383
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -13290,45 +13394,45 @@ function composeRefs(...refs) {
|
|
|
13290
13394
|
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
13291
13395
|
}
|
|
13292
13396
|
function useComposedRefs(...refs) {
|
|
13293
|
-
return
|
|
13397
|
+
return React72.useCallback(composeRefs(...refs), refs);
|
|
13294
13398
|
}
|
|
13295
|
-
var Slot =
|
|
13399
|
+
var Slot = React8.forwardRef((props, forwardedRef) => {
|
|
13296
13400
|
const { children, ...slotProps } = props;
|
|
13297
|
-
const childrenArray =
|
|
13401
|
+
const childrenArray = React8.Children.toArray(children);
|
|
13298
13402
|
const slottable = childrenArray.find(isSlottable);
|
|
13299
13403
|
if (slottable) {
|
|
13300
13404
|
const newElement = slottable.props.children;
|
|
13301
13405
|
const newChildren = childrenArray.map((child) => {
|
|
13302
13406
|
if (child === slottable) {
|
|
13303
|
-
if (
|
|
13304
|
-
return
|
|
13305
|
-
return
|
|
13407
|
+
if (React8.Children.count(newElement) > 1)
|
|
13408
|
+
return React8.Children.only(null);
|
|
13409
|
+
return React8.isValidElement(newElement) ? newElement.props.children : null;
|
|
13306
13410
|
} else {
|
|
13307
13411
|
return child;
|
|
13308
13412
|
}
|
|
13309
13413
|
});
|
|
13310
|
-
return /* @__PURE__ */
|
|
13414
|
+
return /* @__PURE__ */ jsx112(SlotClone, { ...slotProps, ref: forwardedRef, children: React8.isValidElement(newElement) ? React8.cloneElement(newElement, undefined, newChildren) : null });
|
|
13311
13415
|
}
|
|
13312
|
-
return /* @__PURE__ */
|
|
13416
|
+
return /* @__PURE__ */ jsx112(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
13313
13417
|
});
|
|
13314
13418
|
Slot.displayName = "Slot";
|
|
13315
|
-
var SlotClone =
|
|
13419
|
+
var SlotClone = React8.forwardRef((props, forwardedRef) => {
|
|
13316
13420
|
const { children, ...slotProps } = props;
|
|
13317
|
-
if (
|
|
13421
|
+
if (React8.isValidElement(children)) {
|
|
13318
13422
|
const childrenRef = getElementRef(children);
|
|
13319
|
-
return
|
|
13423
|
+
return React8.cloneElement(children, {
|
|
13320
13424
|
...mergeProps(slotProps, children.props),
|
|
13321
13425
|
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
13322
13426
|
});
|
|
13323
13427
|
}
|
|
13324
|
-
return
|
|
13428
|
+
return React8.Children.count(children) > 1 ? React8.Children.only(null) : null;
|
|
13325
13429
|
});
|
|
13326
13430
|
SlotClone.displayName = "SlotClone";
|
|
13327
13431
|
var Slottable = ({ children }) => {
|
|
13328
|
-
return /* @__PURE__ */
|
|
13432
|
+
return /* @__PURE__ */ jsx112(Fragment2, { children });
|
|
13329
13433
|
};
|
|
13330
13434
|
function isSlottable(child) {
|
|
13331
|
-
return
|
|
13435
|
+
return React8.isValidElement(child) && child.type === Slottable;
|
|
13332
13436
|
}
|
|
13333
13437
|
function mergeProps(slotProps, childProps) {
|
|
13334
13438
|
const overrideProps = { ...childProps };
|
|
@@ -13372,36 +13476,36 @@ function createCollection(name) {
|
|
|
13372
13476
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
13373
13477
|
const CollectionProvider = (props) => {
|
|
13374
13478
|
const { scope, children } = props;
|
|
13375
|
-
const ref =
|
|
13376
|
-
const itemMap =
|
|
13377
|
-
return /* @__PURE__ */
|
|
13479
|
+
const ref = React9.useRef(null);
|
|
13480
|
+
const itemMap = React9.useRef(/* @__PURE__ */ new Map).current;
|
|
13481
|
+
return /* @__PURE__ */ jsx122(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
13378
13482
|
};
|
|
13379
13483
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
13380
13484
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
13381
|
-
const CollectionSlot =
|
|
13485
|
+
const CollectionSlot = React9.forwardRef((props, forwardedRef) => {
|
|
13382
13486
|
const { scope, children } = props;
|
|
13383
13487
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
13384
13488
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
13385
|
-
return /* @__PURE__ */
|
|
13489
|
+
return /* @__PURE__ */ jsx122(Slot, { ref: composedRefs, children });
|
|
13386
13490
|
});
|
|
13387
13491
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
13388
13492
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
13389
13493
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
13390
|
-
const CollectionItemSlot =
|
|
13494
|
+
const CollectionItemSlot = React9.forwardRef((props, forwardedRef) => {
|
|
13391
13495
|
const { scope, children, ...itemData } = props;
|
|
13392
|
-
const ref =
|
|
13496
|
+
const ref = React9.useRef(null);
|
|
13393
13497
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
13394
13498
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
13395
|
-
|
|
13499
|
+
React9.useEffect(() => {
|
|
13396
13500
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
13397
13501
|
return () => void context.itemMap.delete(ref);
|
|
13398
13502
|
});
|
|
13399
|
-
return /* @__PURE__ */
|
|
13503
|
+
return /* @__PURE__ */ jsx122(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
13400
13504
|
});
|
|
13401
13505
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
13402
13506
|
function useCollection(scope) {
|
|
13403
13507
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
13404
|
-
const getItems =
|
|
13508
|
+
const getItems = React9.useCallback(() => {
|
|
13405
13509
|
const collectionNode = context.collectionRef.current;
|
|
13406
13510
|
if (!collectionNode)
|
|
13407
13511
|
return [];
|
|
@@ -13418,9 +13522,9 @@ function createCollection(name) {
|
|
|
13418
13522
|
createCollectionScope
|
|
13419
13523
|
];
|
|
13420
13524
|
}
|
|
13421
|
-
var DirectionContext =
|
|
13525
|
+
var DirectionContext = React10.createContext(undefined);
|
|
13422
13526
|
function useDirection(localDir) {
|
|
13423
|
-
const globalDir =
|
|
13527
|
+
const globalDir = React10.useContext(DirectionContext);
|
|
13424
13528
|
return localDir || globalDir || "ltr";
|
|
13425
13529
|
}
|
|
13426
13530
|
var NODES = [
|
|
@@ -13442,13 +13546,13 @@ var NODES = [
|
|
|
13442
13546
|
"ul"
|
|
13443
13547
|
];
|
|
13444
13548
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
13445
|
-
const Node2 =
|
|
13549
|
+
const Node2 = React112.forwardRef((props, forwardedRef) => {
|
|
13446
13550
|
const { asChild, ...primitiveProps } = props;
|
|
13447
13551
|
const Comp = asChild ? Slot : node;
|
|
13448
13552
|
if (typeof window !== "undefined") {
|
|
13449
13553
|
window[Symbol.for("radix-ui")] = true;
|
|
13450
13554
|
}
|
|
13451
|
-
return /* @__PURE__ */
|
|
13555
|
+
return /* @__PURE__ */ jsx142(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
13452
13556
|
});
|
|
13453
13557
|
Node2.displayName = `Primitive.${node}`;
|
|
13454
13558
|
return { ...primitive, [node]: Node2 };
|
|
@@ -13458,15 +13562,15 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
13458
13562
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
13459
13563
|
}
|
|
13460
13564
|
function useCallbackRef(callback) {
|
|
13461
|
-
const callbackRef =
|
|
13462
|
-
|
|
13565
|
+
const callbackRef = React122.useRef(callback);
|
|
13566
|
+
React122.useEffect(() => {
|
|
13463
13567
|
callbackRef.current = callback;
|
|
13464
13568
|
});
|
|
13465
|
-
return
|
|
13569
|
+
return React122.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
13466
13570
|
}
|
|
13467
13571
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
13468
13572
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
13469
|
-
|
|
13573
|
+
React13.useEffect(() => {
|
|
13470
13574
|
const handleKeyDown = (event) => {
|
|
13471
13575
|
if (event.key === "Escape") {
|
|
13472
13576
|
onEscapeKeyDown(event);
|
|
@@ -13481,12 +13585,12 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
|
13481
13585
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
13482
13586
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
13483
13587
|
var originalBodyPointerEvents;
|
|
13484
|
-
var DismissableLayerContext =
|
|
13588
|
+
var DismissableLayerContext = React14.createContext({
|
|
13485
13589
|
layers: /* @__PURE__ */ new Set,
|
|
13486
13590
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set,
|
|
13487
13591
|
branches: /* @__PURE__ */ new Set
|
|
13488
13592
|
});
|
|
13489
|
-
var DismissableLayer =
|
|
13593
|
+
var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
13490
13594
|
const {
|
|
13491
13595
|
disableOutsidePointerEvents = false,
|
|
13492
13596
|
onEscapeKeyDown,
|
|
@@ -13496,10 +13600,10 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
|
|
|
13496
13600
|
onDismiss,
|
|
13497
13601
|
...layerProps
|
|
13498
13602
|
} = props;
|
|
13499
|
-
const context =
|
|
13500
|
-
const [node, setNode] =
|
|
13603
|
+
const context = React14.useContext(DismissableLayerContext);
|
|
13604
|
+
const [node, setNode] = React14.useState(null);
|
|
13501
13605
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
13502
|
-
const [, force] =
|
|
13606
|
+
const [, force] = React14.useState({});
|
|
13503
13607
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
13504
13608
|
const layers = Array.from(context.layers);
|
|
13505
13609
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -13537,7 +13641,7 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
|
|
|
13537
13641
|
onDismiss();
|
|
13538
13642
|
}
|
|
13539
13643
|
}, ownerDocument);
|
|
13540
|
-
|
|
13644
|
+
React14.useEffect(() => {
|
|
13541
13645
|
if (!node)
|
|
13542
13646
|
return;
|
|
13543
13647
|
if (disableOutsidePointerEvents) {
|
|
@@ -13555,7 +13659,7 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
|
|
|
13555
13659
|
}
|
|
13556
13660
|
};
|
|
13557
13661
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
13558
|
-
|
|
13662
|
+
React14.useEffect(() => {
|
|
13559
13663
|
return () => {
|
|
13560
13664
|
if (!node)
|
|
13561
13665
|
return;
|
|
@@ -13564,12 +13668,12 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
|
|
|
13564
13668
|
dispatchUpdate();
|
|
13565
13669
|
};
|
|
13566
13670
|
}, [node, context]);
|
|
13567
|
-
|
|
13671
|
+
React14.useEffect(() => {
|
|
13568
13672
|
const handleUpdate = () => force({});
|
|
13569
13673
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
13570
13674
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
13571
13675
|
}, []);
|
|
13572
|
-
return /* @__PURE__ */
|
|
13676
|
+
return /* @__PURE__ */ jsx152(Primitive.div, {
|
|
13573
13677
|
...layerProps,
|
|
13574
13678
|
ref: composedRefs,
|
|
13575
13679
|
style: {
|
|
@@ -13583,11 +13687,11 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
|
|
|
13583
13687
|
});
|
|
13584
13688
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
13585
13689
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
13586
|
-
var DismissableLayerBranch =
|
|
13587
|
-
const context =
|
|
13588
|
-
const ref =
|
|
13690
|
+
var DismissableLayerBranch = React14.forwardRef((props, forwardedRef) => {
|
|
13691
|
+
const context = React14.useContext(DismissableLayerContext);
|
|
13692
|
+
const ref = React14.useRef(null);
|
|
13589
13693
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
13590
|
-
|
|
13694
|
+
React14.useEffect(() => {
|
|
13591
13695
|
const node = ref.current;
|
|
13592
13696
|
if (node) {
|
|
13593
13697
|
context.branches.add(node);
|
|
@@ -13596,14 +13700,14 @@ var DismissableLayerBranch = React12.forwardRef((props, forwardedRef) => {
|
|
|
13596
13700
|
};
|
|
13597
13701
|
}
|
|
13598
13702
|
}, [context.branches]);
|
|
13599
|
-
return /* @__PURE__ */
|
|
13703
|
+
return /* @__PURE__ */ jsx152(Primitive.div, { ...props, ref: composedRefs });
|
|
13600
13704
|
});
|
|
13601
13705
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
13602
13706
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
13603
13707
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
13604
|
-
const isPointerInsideReactTreeRef =
|
|
13605
|
-
const handleClickRef =
|
|
13606
|
-
|
|
13708
|
+
const isPointerInsideReactTreeRef = React14.useRef(false);
|
|
13709
|
+
const handleClickRef = React14.useRef(() => {});
|
|
13710
|
+
React14.useEffect(() => {
|
|
13607
13711
|
const handlePointerDown = (event) => {
|
|
13608
13712
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
13609
13713
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -13638,8 +13742,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
13638
13742
|
}
|
|
13639
13743
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
13640
13744
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
13641
|
-
const isFocusInsideReactTreeRef =
|
|
13642
|
-
|
|
13745
|
+
const isFocusInsideReactTreeRef = React14.useRef(false);
|
|
13746
|
+
React14.useEffect(() => {
|
|
13643
13747
|
const handleFocus = (event) => {
|
|
13644
13748
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
13645
13749
|
const eventDetail = { originalEvent: event };
|
|
@@ -13673,7 +13777,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
13673
13777
|
}
|
|
13674
13778
|
var count = 0;
|
|
13675
13779
|
function useFocusGuards() {
|
|
13676
|
-
|
|
13780
|
+
React152.useEffect(() => {
|
|
13677
13781
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
13678
13782
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
13679
13783
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -13697,7 +13801,7 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
|
13697
13801
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
13698
13802
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
13699
13803
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
13700
|
-
var FocusScope =
|
|
13804
|
+
var FocusScope = React162.forwardRef((props, forwardedRef) => {
|
|
13701
13805
|
const {
|
|
13702
13806
|
loop = false,
|
|
13703
13807
|
trapped = false,
|
|
@@ -13705,12 +13809,12 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
|
|
|
13705
13809
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
13706
13810
|
...scopeProps
|
|
13707
13811
|
} = props;
|
|
13708
|
-
const [container22, setContainer] =
|
|
13812
|
+
const [container22, setContainer] = React162.useState(null);
|
|
13709
13813
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
13710
13814
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
13711
|
-
const lastFocusedElementRef =
|
|
13815
|
+
const lastFocusedElementRef = React162.useRef(null);
|
|
13712
13816
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
13713
|
-
const focusScope =
|
|
13817
|
+
const focusScope = React162.useRef({
|
|
13714
13818
|
paused: false,
|
|
13715
13819
|
pause() {
|
|
13716
13820
|
this.paused = true;
|
|
@@ -13719,7 +13823,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
|
|
|
13719
13823
|
this.paused = false;
|
|
13720
13824
|
}
|
|
13721
13825
|
}).current;
|
|
13722
|
-
|
|
13826
|
+
React162.useEffect(() => {
|
|
13723
13827
|
if (trapped) {
|
|
13724
13828
|
let handleFocusIn2 = function(event) {
|
|
13725
13829
|
if (focusScope.paused || !container22)
|
|
@@ -13761,7 +13865,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
|
|
|
13761
13865
|
};
|
|
13762
13866
|
}
|
|
13763
13867
|
}, [trapped, container22, focusScope.paused]);
|
|
13764
|
-
|
|
13868
|
+
React162.useEffect(() => {
|
|
13765
13869
|
if (container22) {
|
|
13766
13870
|
focusScopesStack.add(focusScope);
|
|
13767
13871
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -13792,7 +13896,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
|
|
|
13792
13896
|
};
|
|
13793
13897
|
}
|
|
13794
13898
|
}, [container22, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
13795
|
-
const handleKeyDown =
|
|
13899
|
+
const handleKeyDown = React162.useCallback((event) => {
|
|
13796
13900
|
if (!loop && !trapped)
|
|
13797
13901
|
return;
|
|
13798
13902
|
if (focusScope.paused)
|
|
@@ -13819,7 +13923,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
|
|
|
13819
13923
|
}
|
|
13820
13924
|
}
|
|
13821
13925
|
}, [loop, trapped, focusScope.paused]);
|
|
13822
|
-
return /* @__PURE__ */
|
|
13926
|
+
return /* @__PURE__ */ jsx162(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
13823
13927
|
});
|
|
13824
13928
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
13825
13929
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -13908,13 +14012,13 @@ function arrayRemove(array, item) {
|
|
|
13908
14012
|
function removeLinks(items) {
|
|
13909
14013
|
return items.filter((item) => item.tagName !== "A");
|
|
13910
14014
|
}
|
|
13911
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
13912
|
-
var useReactId =
|
|
14015
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React172.useLayoutEffect : () => {};
|
|
14016
|
+
var useReactId = React18["useId".toString()] || (() => {
|
|
13913
14017
|
return;
|
|
13914
14018
|
});
|
|
13915
14019
|
var count2 = 0;
|
|
13916
14020
|
function useId(deterministicId) {
|
|
13917
|
-
const [id, setId] =
|
|
14021
|
+
const [id, setId] = React18.useState(useReactId());
|
|
13918
14022
|
useLayoutEffect22(() => {
|
|
13919
14023
|
if (!deterministicId)
|
|
13920
14024
|
setId((reactId) => reactId ?? String(count2++));
|
|
@@ -15432,7 +15536,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
15432
15536
|
platform: platformWithCache
|
|
15433
15537
|
});
|
|
15434
15538
|
};
|
|
15435
|
-
var index = typeof document !== "undefined" ? useLayoutEffect32 :
|
|
15539
|
+
var index = typeof document !== "undefined" ? useLayoutEffect32 : useEffect82;
|
|
15436
15540
|
function deepEqual(a, b) {
|
|
15437
15541
|
if (a === b) {
|
|
15438
15542
|
return true;
|
|
@@ -15493,7 +15597,7 @@ function roundByDPR(element, value) {
|
|
|
15493
15597
|
return Math.round(value * dpr) / dpr;
|
|
15494
15598
|
}
|
|
15495
15599
|
function useLatestRef(value) {
|
|
15496
|
-
const ref =
|
|
15600
|
+
const ref = React19.useRef(value);
|
|
15497
15601
|
index(() => {
|
|
15498
15602
|
ref.current = value;
|
|
15499
15603
|
});
|
|
@@ -15516,7 +15620,7 @@ function useFloating(options) {
|
|
|
15516
15620
|
whileElementsMounted,
|
|
15517
15621
|
open
|
|
15518
15622
|
} = options;
|
|
15519
|
-
const [data, setData] =
|
|
15623
|
+
const [data, setData] = React19.useState({
|
|
15520
15624
|
x: 0,
|
|
15521
15625
|
y: 0,
|
|
15522
15626
|
strategy,
|
|
@@ -15524,19 +15628,19 @@ function useFloating(options) {
|
|
|
15524
15628
|
middlewareData: {},
|
|
15525
15629
|
isPositioned: false
|
|
15526
15630
|
});
|
|
15527
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
15631
|
+
const [latestMiddleware, setLatestMiddleware] = React19.useState(middleware);
|
|
15528
15632
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
15529
15633
|
setLatestMiddleware(middleware);
|
|
15530
15634
|
}
|
|
15531
|
-
const [_reference, _setReference] =
|
|
15532
|
-
const [_floating, _setFloating] =
|
|
15533
|
-
const setReference =
|
|
15635
|
+
const [_reference, _setReference] = React19.useState(null);
|
|
15636
|
+
const [_floating, _setFloating] = React19.useState(null);
|
|
15637
|
+
const setReference = React19.useCallback((node) => {
|
|
15534
15638
|
if (node !== referenceRef.current) {
|
|
15535
15639
|
referenceRef.current = node;
|
|
15536
15640
|
_setReference(node);
|
|
15537
15641
|
}
|
|
15538
15642
|
}, []);
|
|
15539
|
-
const setFloating =
|
|
15643
|
+
const setFloating = React19.useCallback((node) => {
|
|
15540
15644
|
if (node !== floatingRef.current) {
|
|
15541
15645
|
floatingRef.current = node;
|
|
15542
15646
|
_setFloating(node);
|
|
@@ -15544,13 +15648,13 @@ function useFloating(options) {
|
|
|
15544
15648
|
}, []);
|
|
15545
15649
|
const referenceEl = externalReference || _reference;
|
|
15546
15650
|
const floatingEl = externalFloating || _floating;
|
|
15547
|
-
const referenceRef =
|
|
15548
|
-
const floatingRef =
|
|
15549
|
-
const dataRef =
|
|
15651
|
+
const referenceRef = React19.useRef(null);
|
|
15652
|
+
const floatingRef = React19.useRef(null);
|
|
15653
|
+
const dataRef = React19.useRef(data);
|
|
15550
15654
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
15551
15655
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
15552
15656
|
const platformRef = useLatestRef(platform2);
|
|
15553
|
-
const update =
|
|
15657
|
+
const update = React19.useCallback(() => {
|
|
15554
15658
|
if (!referenceRef.current || !floatingRef.current) {
|
|
15555
15659
|
return;
|
|
15556
15660
|
}
|
|
@@ -15584,7 +15688,7 @@ function useFloating(options) {
|
|
|
15584
15688
|
}));
|
|
15585
15689
|
}
|
|
15586
15690
|
}, [open]);
|
|
15587
|
-
const isMountedRef =
|
|
15691
|
+
const isMountedRef = React19.useRef(false);
|
|
15588
15692
|
index(() => {
|
|
15589
15693
|
isMountedRef.current = true;
|
|
15590
15694
|
return () => {
|
|
@@ -15603,17 +15707,17 @@ function useFloating(options) {
|
|
|
15603
15707
|
update();
|
|
15604
15708
|
}
|
|
15605
15709
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
15606
|
-
const refs =
|
|
15710
|
+
const refs = React19.useMemo(() => ({
|
|
15607
15711
|
reference: referenceRef,
|
|
15608
15712
|
floating: floatingRef,
|
|
15609
15713
|
setReference,
|
|
15610
15714
|
setFloating
|
|
15611
15715
|
}), [setReference, setFloating]);
|
|
15612
|
-
const elements =
|
|
15716
|
+
const elements = React19.useMemo(() => ({
|
|
15613
15717
|
reference: referenceEl,
|
|
15614
15718
|
floating: floatingEl
|
|
15615
15719
|
}), [referenceEl, floatingEl]);
|
|
15616
|
-
const floatingStyles =
|
|
15720
|
+
const floatingStyles = React19.useMemo(() => {
|
|
15617
15721
|
const initialStyles = {
|
|
15618
15722
|
position: strategy,
|
|
15619
15723
|
left: 0,
|
|
@@ -15639,7 +15743,7 @@ function useFloating(options) {
|
|
|
15639
15743
|
top: y
|
|
15640
15744
|
};
|
|
15641
15745
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
15642
|
-
return
|
|
15746
|
+
return React19.useMemo(() => ({
|
|
15643
15747
|
...data,
|
|
15644
15748
|
update,
|
|
15645
15749
|
refs,
|
|
@@ -15707,22 +15811,22 @@ var arrow3 = (options, deps) => ({
|
|
|
15707
15811
|
options: [options, deps]
|
|
15708
15812
|
});
|
|
15709
15813
|
var NAME = "Arrow";
|
|
15710
|
-
var Arrow =
|
|
15814
|
+
var Arrow = React20.forwardRef((props, forwardedRef) => {
|
|
15711
15815
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
15712
|
-
return /* @__PURE__ */
|
|
15816
|
+
return /* @__PURE__ */ jsx172(Primitive.svg, {
|
|
15713
15817
|
...arrowProps,
|
|
15714
15818
|
ref: forwardedRef,
|
|
15715
15819
|
width,
|
|
15716
15820
|
height,
|
|
15717
15821
|
viewBox: "0 0 30 10",
|
|
15718
15822
|
preserveAspectRatio: "none",
|
|
15719
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
15823
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx172("polygon", { points: "0,0 30,0 15,10" })
|
|
15720
15824
|
});
|
|
15721
15825
|
});
|
|
15722
15826
|
Arrow.displayName = NAME;
|
|
15723
15827
|
var Root2 = Arrow;
|
|
15724
15828
|
function useSize(element) {
|
|
15725
|
-
const [size4, setSize] =
|
|
15829
|
+
const [size4, setSize] = React212.useState(undefined);
|
|
15726
15830
|
useLayoutEffect22(() => {
|
|
15727
15831
|
if (element) {
|
|
15728
15832
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -15760,25 +15864,25 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
15760
15864
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
15761
15865
|
var Popper = (props) => {
|
|
15762
15866
|
const { __scopePopper, children } = props;
|
|
15763
|
-
const [anchor, setAnchor] =
|
|
15764
|
-
return /* @__PURE__ */
|
|
15867
|
+
const [anchor, setAnchor] = React22.useState(null);
|
|
15868
|
+
return /* @__PURE__ */ jsx182(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
15765
15869
|
};
|
|
15766
15870
|
Popper.displayName = POPPER_NAME;
|
|
15767
15871
|
var ANCHOR_NAME = "PopperAnchor";
|
|
15768
|
-
var PopperAnchor =
|
|
15872
|
+
var PopperAnchor = React22.forwardRef((props, forwardedRef) => {
|
|
15769
15873
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
15770
15874
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
15771
|
-
const ref =
|
|
15875
|
+
const ref = React22.useRef(null);
|
|
15772
15876
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
15773
|
-
|
|
15877
|
+
React22.useEffect(() => {
|
|
15774
15878
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
15775
15879
|
});
|
|
15776
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
15880
|
+
return virtualRef ? null : /* @__PURE__ */ jsx182(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
15777
15881
|
});
|
|
15778
15882
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
15779
15883
|
var CONTENT_NAME = "PopperContent";
|
|
15780
15884
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
15781
|
-
var PopperContent =
|
|
15885
|
+
var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
15782
15886
|
const {
|
|
15783
15887
|
__scopePopper,
|
|
15784
15888
|
side = "bottom",
|
|
@@ -15796,9 +15900,9 @@ var PopperContent = React20.forwardRef((props, forwardedRef) => {
|
|
|
15796
15900
|
...contentProps
|
|
15797
15901
|
} = props;
|
|
15798
15902
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
15799
|
-
const [content, setContent] =
|
|
15903
|
+
const [content, setContent] = React22.useState(null);
|
|
15800
15904
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
15801
|
-
const [arrow4, setArrow] =
|
|
15905
|
+
const [arrow4, setArrow] = React22.useState(null);
|
|
15802
15906
|
const arrowSize = useSize(arrow4);
|
|
15803
15907
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
15804
15908
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -15858,12 +15962,12 @@ var PopperContent = React20.forwardRef((props, forwardedRef) => {
|
|
|
15858
15962
|
const arrowX = middlewareData.arrow?.x;
|
|
15859
15963
|
const arrowY = middlewareData.arrow?.y;
|
|
15860
15964
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
15861
|
-
const [contentZIndex, setContentZIndex] =
|
|
15965
|
+
const [contentZIndex, setContentZIndex] = React22.useState();
|
|
15862
15966
|
useLayoutEffect22(() => {
|
|
15863
15967
|
if (content)
|
|
15864
15968
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
15865
15969
|
}, [content]);
|
|
15866
|
-
return /* @__PURE__ */
|
|
15970
|
+
return /* @__PURE__ */ jsx182("div", {
|
|
15867
15971
|
ref: refs.setFloating,
|
|
15868
15972
|
"data-radix-popper-content-wrapper": "",
|
|
15869
15973
|
style: {
|
|
@@ -15881,14 +15985,14 @@ var PopperContent = React20.forwardRef((props, forwardedRef) => {
|
|
|
15881
15985
|
}
|
|
15882
15986
|
},
|
|
15883
15987
|
dir: props.dir,
|
|
15884
|
-
children: /* @__PURE__ */
|
|
15988
|
+
children: /* @__PURE__ */ jsx182(PopperContentProvider, {
|
|
15885
15989
|
scope: __scopePopper,
|
|
15886
15990
|
placedSide,
|
|
15887
15991
|
onArrowChange: setArrow,
|
|
15888
15992
|
arrowX,
|
|
15889
15993
|
arrowY,
|
|
15890
15994
|
shouldHideArrow: cannotCenterArrow,
|
|
15891
|
-
children: /* @__PURE__ */
|
|
15995
|
+
children: /* @__PURE__ */ jsx182(Primitive.div, {
|
|
15892
15996
|
"data-side": placedSide,
|
|
15893
15997
|
"data-align": placedAlign,
|
|
15894
15998
|
...contentProps,
|
|
@@ -15909,11 +16013,11 @@ var OPPOSITE_SIDE = {
|
|
|
15909
16013
|
bottom: "top",
|
|
15910
16014
|
left: "right"
|
|
15911
16015
|
};
|
|
15912
|
-
var PopperArrow =
|
|
16016
|
+
var PopperArrow = React22.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
15913
16017
|
const { __scopePopper, ...arrowProps } = props;
|
|
15914
16018
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
15915
16019
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
15916
|
-
return /* @__PURE__ */
|
|
16020
|
+
return /* @__PURE__ */ jsx182("span", {
|
|
15917
16021
|
ref: contentContext.onArrowChange,
|
|
15918
16022
|
style: {
|
|
15919
16023
|
position: "absolute",
|
|
@@ -15934,7 +16038,7 @@ var PopperArrow = React20.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
15934
16038
|
}[contentContext.placedSide],
|
|
15935
16039
|
visibility: contentContext.shouldHideArrow ? "hidden" : undefined
|
|
15936
16040
|
},
|
|
15937
|
-
children: /* @__PURE__ */
|
|
16041
|
+
children: /* @__PURE__ */ jsx182(Root2, {
|
|
15938
16042
|
...arrowProps,
|
|
15939
16043
|
ref: forwardedRef,
|
|
15940
16044
|
style: {
|
|
@@ -15988,12 +16092,12 @@ var Anchor = PopperAnchor;
|
|
|
15988
16092
|
var Content = PopperContent;
|
|
15989
16093
|
var Arrow2 = PopperArrow;
|
|
15990
16094
|
var PORTAL_NAME = "Portal";
|
|
15991
|
-
var Portal =
|
|
16095
|
+
var Portal = React23.forwardRef((props, forwardedRef) => {
|
|
15992
16096
|
const { container: containerProp, ...portalProps } = props;
|
|
15993
|
-
const [mounted, setMounted] =
|
|
16097
|
+
const [mounted, setMounted] = React23.useState(false);
|
|
15994
16098
|
useLayoutEffect22(() => setMounted(true), []);
|
|
15995
16099
|
const container22 = containerProp || mounted && globalThis?.document?.body;
|
|
15996
|
-
return container22 ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
16100
|
+
return container22 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx192(Primitive.div, { ...portalProps, ref: forwardedRef }), container22) : null;
|
|
15997
16101
|
});
|
|
15998
16102
|
Portal.displayName = PORTAL_NAME;
|
|
15999
16103
|
function useControllableState({
|
|
@@ -16005,7 +16109,7 @@ function useControllableState({
|
|
|
16005
16109
|
const isControlled = prop !== undefined;
|
|
16006
16110
|
const value = isControlled ? prop : uncontrolledProp;
|
|
16007
16111
|
const handleChange = useCallbackRef(onChange);
|
|
16008
|
-
const setValue =
|
|
16112
|
+
const setValue = React24.useCallback((nextValue) => {
|
|
16009
16113
|
if (isControlled) {
|
|
16010
16114
|
const setter = nextValue;
|
|
16011
16115
|
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
@@ -16021,11 +16125,11 @@ function useUncontrolledState({
|
|
|
16021
16125
|
defaultProp,
|
|
16022
16126
|
onChange
|
|
16023
16127
|
}) {
|
|
16024
|
-
const uncontrolledState =
|
|
16128
|
+
const uncontrolledState = React24.useState(defaultProp);
|
|
16025
16129
|
const [value] = uncontrolledState;
|
|
16026
|
-
const prevValueRef =
|
|
16130
|
+
const prevValueRef = React24.useRef(value);
|
|
16027
16131
|
const handleChange = useCallbackRef(onChange);
|
|
16028
|
-
|
|
16132
|
+
React24.useEffect(() => {
|
|
16029
16133
|
if (prevValueRef.current !== value) {
|
|
16030
16134
|
handleChange(value);
|
|
16031
16135
|
prevValueRef.current = value;
|
|
@@ -16034,8 +16138,8 @@ function useUncontrolledState({
|
|
|
16034
16138
|
return uncontrolledState;
|
|
16035
16139
|
}
|
|
16036
16140
|
function usePrevious(value) {
|
|
16037
|
-
const ref =
|
|
16038
|
-
return
|
|
16141
|
+
const ref = React252.useRef({ value, previous: value });
|
|
16142
|
+
return React252.useMemo(() => {
|
|
16039
16143
|
if (ref.current.value !== value) {
|
|
16040
16144
|
ref.current.previous = ref.current.value;
|
|
16041
16145
|
ref.current.value = value;
|
|
@@ -16044,8 +16148,8 @@ function usePrevious(value) {
|
|
|
16044
16148
|
}, [value]);
|
|
16045
16149
|
}
|
|
16046
16150
|
var NAME2 = "VisuallyHidden";
|
|
16047
|
-
var VisuallyHidden =
|
|
16048
|
-
return /* @__PURE__ */
|
|
16151
|
+
var VisuallyHidden = React26.forwardRef((props, forwardedRef) => {
|
|
16152
|
+
return /* @__PURE__ */ jsx202(Primitive.span, {
|
|
16049
16153
|
...props,
|
|
16050
16154
|
ref: forwardedRef,
|
|
16051
16155
|
style: {
|
|
@@ -16252,7 +16356,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
16252
16356
|
ref.callback = callback;
|
|
16253
16357
|
return ref.facade;
|
|
16254
16358
|
}
|
|
16255
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
16359
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React272.useLayoutEffect : React272.useEffect;
|
|
16256
16360
|
var currentValues = new WeakMap;
|
|
16257
16361
|
function useMergeRefs(refs, defaultValue) {
|
|
16258
16362
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -16374,7 +16478,7 @@ var SideCar = function(_a) {
|
|
|
16374
16478
|
if (!Target) {
|
|
16375
16479
|
throw new Error("Sidecar medium not found");
|
|
16376
16480
|
}
|
|
16377
|
-
return
|
|
16481
|
+
return React28.createElement(Target, __assign({}, rest));
|
|
16378
16482
|
};
|
|
16379
16483
|
SideCar.isSideCarExport = true;
|
|
16380
16484
|
function exportSidecar(medium, exported) {
|
|
@@ -16385,9 +16489,9 @@ var effectCar = createSidecarMedium();
|
|
|
16385
16489
|
var nothing = function() {
|
|
16386
16490
|
return;
|
|
16387
16491
|
};
|
|
16388
|
-
var RemoveScroll =
|
|
16389
|
-
var ref =
|
|
16390
|
-
var _a =
|
|
16492
|
+
var RemoveScroll = React29.forwardRef(function(props, parentRef) {
|
|
16493
|
+
var ref = React29.useRef(null);
|
|
16494
|
+
var _a = React29.useState({
|
|
16391
16495
|
onScrollCapture: nothing,
|
|
16392
16496
|
onWheelCapture: nothing,
|
|
16393
16497
|
onTouchMoveCapture: nothing
|
|
@@ -16396,7 +16500,7 @@ var RemoveScroll = React272.forwardRef(function(props, parentRef) {
|
|
|
16396
16500
|
var SideCar2 = sideCar;
|
|
16397
16501
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
16398
16502
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
16399
|
-
return
|
|
16503
|
+
return React29.createElement(React29.Fragment, null, enabled && React29.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), forwardProps ? React29.cloneElement(React29.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React29.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children));
|
|
16400
16504
|
});
|
|
16401
16505
|
RemoveScroll.defaultProps = {
|
|
16402
16506
|
enabled: true,
|
|
@@ -16464,7 +16568,7 @@ var stylesheetSingleton = function() {
|
|
|
16464
16568
|
var styleHookSingleton = function() {
|
|
16465
16569
|
var sheet = stylesheetSingleton();
|
|
16466
16570
|
return function(styles, isDynamic) {
|
|
16467
|
-
|
|
16571
|
+
React30.useEffect(function() {
|
|
16468
16572
|
sheet.add(styles);
|
|
16469
16573
|
return function() {
|
|
16470
16574
|
sheet.remove();
|
|
@@ -16569,7 +16673,7 @@ var getCurrentUseCounter = function() {
|
|
|
16569
16673
|
return isFinite(counter) ? counter : 0;
|
|
16570
16674
|
};
|
|
16571
16675
|
var useLockAttribute = function() {
|
|
16572
|
-
|
|
16676
|
+
React312.useEffect(function() {
|
|
16573
16677
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
16574
16678
|
return function() {
|
|
16575
16679
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -16584,10 +16688,10 @@ var useLockAttribute = function() {
|
|
|
16584
16688
|
var RemoveScrollBar = function(_a) {
|
|
16585
16689
|
var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
|
|
16586
16690
|
useLockAttribute();
|
|
16587
|
-
var gap =
|
|
16691
|
+
var gap = React312.useMemo(function() {
|
|
16588
16692
|
return getGapWidth(gapMode);
|
|
16589
16693
|
}, [gapMode]);
|
|
16590
|
-
return
|
|
16694
|
+
return React312.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
16591
16695
|
};
|
|
16592
16696
|
var passiveSupported = false;
|
|
16593
16697
|
if (typeof window !== "undefined") {
|
|
@@ -16714,16 +16818,16 @@ var generateStyle = function(id) {
|
|
|
16714
16818
|
var idCounter = 0;
|
|
16715
16819
|
var lockStack = [];
|
|
16716
16820
|
function RemoveScrollSideCar(props) {
|
|
16717
|
-
var shouldPreventQueue =
|
|
16718
|
-
var touchStartRef =
|
|
16719
|
-
var activeAxis =
|
|
16720
|
-
var id =
|
|
16721
|
-
var Style2 =
|
|
16722
|
-
var lastProps =
|
|
16723
|
-
|
|
16821
|
+
var shouldPreventQueue = React322.useRef([]);
|
|
16822
|
+
var touchStartRef = React322.useRef([0, 0]);
|
|
16823
|
+
var activeAxis = React322.useRef();
|
|
16824
|
+
var id = React322.useState(idCounter++)[0];
|
|
16825
|
+
var Style2 = React322.useState(styleSingleton)[0];
|
|
16826
|
+
var lastProps = React322.useRef(props);
|
|
16827
|
+
React322.useEffect(function() {
|
|
16724
16828
|
lastProps.current = props;
|
|
16725
16829
|
}, [props]);
|
|
16726
|
-
|
|
16830
|
+
React322.useEffect(function() {
|
|
16727
16831
|
if (props.inert) {
|
|
16728
16832
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
16729
16833
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -16739,7 +16843,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16739
16843
|
}
|
|
16740
16844
|
return;
|
|
16741
16845
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
16742
|
-
var shouldCancelEvent =
|
|
16846
|
+
var shouldCancelEvent = React322.useCallback(function(event, parent) {
|
|
16743
16847
|
if ("touches" in event && event.touches.length === 2) {
|
|
16744
16848
|
return !lastProps.current.allowPinchZoom;
|
|
16745
16849
|
}
|
|
@@ -16775,7 +16879,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16775
16879
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
16776
16880
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
16777
16881
|
}, []);
|
|
16778
|
-
var shouldPrevent =
|
|
16882
|
+
var shouldPrevent = React322.useCallback(function(_event) {
|
|
16779
16883
|
var event = _event;
|
|
16780
16884
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
16781
16885
|
return;
|
|
@@ -16802,7 +16906,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16802
16906
|
}
|
|
16803
16907
|
}
|
|
16804
16908
|
}, []);
|
|
16805
|
-
var shouldCancel =
|
|
16909
|
+
var shouldCancel = React322.useCallback(function(name, delta, target, should) {
|
|
16806
16910
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
16807
16911
|
shouldPreventQueue.current.push(event);
|
|
16808
16912
|
setTimeout(function() {
|
|
@@ -16811,17 +16915,17 @@ function RemoveScrollSideCar(props) {
|
|
|
16811
16915
|
});
|
|
16812
16916
|
}, 1);
|
|
16813
16917
|
}, []);
|
|
16814
|
-
var scrollTouchStart =
|
|
16918
|
+
var scrollTouchStart = React322.useCallback(function(event) {
|
|
16815
16919
|
touchStartRef.current = getTouchXY(event);
|
|
16816
16920
|
activeAxis.current = undefined;
|
|
16817
16921
|
}, []);
|
|
16818
|
-
var scrollWheel =
|
|
16922
|
+
var scrollWheel = React322.useCallback(function(event) {
|
|
16819
16923
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
16820
16924
|
}, []);
|
|
16821
|
-
var scrollTouchMove =
|
|
16925
|
+
var scrollTouchMove = React322.useCallback(function(event) {
|
|
16822
16926
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
16823
16927
|
}, []);
|
|
16824
|
-
|
|
16928
|
+
React322.useEffect(function() {
|
|
16825
16929
|
lockStack.push(Style2);
|
|
16826
16930
|
props.setCallbacks({
|
|
16827
16931
|
onScrollCapture: scrollWheel,
|
|
@@ -16841,7 +16945,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16841
16945
|
};
|
|
16842
16946
|
}, []);
|
|
16843
16947
|
var { removeScrollBar, inert } = props;
|
|
16844
|
-
return
|
|
16948
|
+
return React322.createElement(React322.Fragment, null, inert ? React322.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React322.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
|
|
16845
16949
|
}
|
|
16846
16950
|
function getOutermostShadowParent(node) {
|
|
16847
16951
|
var shadowParent = null;
|
|
@@ -16855,8 +16959,8 @@ function getOutermostShadowParent(node) {
|
|
|
16855
16959
|
return shadowParent;
|
|
16856
16960
|
}
|
|
16857
16961
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
16858
|
-
var ReactRemoveScroll =
|
|
16859
|
-
return
|
|
16962
|
+
var ReactRemoveScroll = React332.forwardRef(function(props, ref) {
|
|
16963
|
+
return React332.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
16860
16964
|
});
|
|
16861
16965
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
16862
16966
|
var Combination_default = ReactRemoveScroll;
|
|
@@ -16888,9 +16992,9 @@ var Select = (props) => {
|
|
|
16888
16992
|
required
|
|
16889
16993
|
} = props;
|
|
16890
16994
|
const popperScope = usePopperScope(__scopeSelect);
|
|
16891
|
-
const [trigger, setTrigger] =
|
|
16892
|
-
const [valueNode, setValueNode] =
|
|
16893
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
16995
|
+
const [trigger, setTrigger] = React34.useState(null);
|
|
16996
|
+
const [valueNode, setValueNode] = React34.useState(null);
|
|
16997
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React34.useState(false);
|
|
16894
16998
|
const direction = useDirection(dir);
|
|
16895
16999
|
const [open = false, setOpen] = useControllableState({
|
|
16896
17000
|
prop: openProp,
|
|
@@ -16902,11 +17006,11 @@ var Select = (props) => {
|
|
|
16902
17006
|
defaultProp: defaultValue,
|
|
16903
17007
|
onChange: onValueChange
|
|
16904
17008
|
});
|
|
16905
|
-
const triggerPointerDownPosRef =
|
|
17009
|
+
const triggerPointerDownPosRef = React34.useRef(null);
|
|
16906
17010
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
16907
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
17011
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React34.useState(/* @__PURE__ */ new Set);
|
|
16908
17012
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
16909
|
-
return /* @__PURE__ */
|
|
17013
|
+
return /* @__PURE__ */ jsx212(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
16910
17014
|
required,
|
|
16911
17015
|
scope: __scopeSelect,
|
|
16912
17016
|
trigger,
|
|
@@ -16924,12 +17028,12 @@ var Select = (props) => {
|
|
|
16924
17028
|
triggerPointerDownPosRef,
|
|
16925
17029
|
disabled,
|
|
16926
17030
|
children: [
|
|
16927
|
-
/* @__PURE__ */
|
|
17031
|
+
/* @__PURE__ */ jsx212(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx212(SelectNativeOptionsProvider, {
|
|
16928
17032
|
scope: props.__scopeSelect,
|
|
16929
|
-
onNativeOptionAdd:
|
|
17033
|
+
onNativeOptionAdd: React34.useCallback((option) => {
|
|
16930
17034
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
16931
17035
|
}, []),
|
|
16932
|
-
onNativeOptionRemove:
|
|
17036
|
+
onNativeOptionRemove: React34.useCallback((option) => {
|
|
16933
17037
|
setNativeOptionsSet((prev) => {
|
|
16934
17038
|
const optionsSet = new Set(prev);
|
|
16935
17039
|
optionsSet.delete(option);
|
|
@@ -16938,7 +17042,7 @@ var Select = (props) => {
|
|
|
16938
17042
|
}, []),
|
|
16939
17043
|
children
|
|
16940
17044
|
}) }),
|
|
16941
|
-
isFormControl ? /* @__PURE__ */
|
|
17045
|
+
isFormControl ? /* @__PURE__ */ jsxs4(BubbleSelect, {
|
|
16942
17046
|
"aria-hidden": true,
|
|
16943
17047
|
required,
|
|
16944
17048
|
tabIndex: -1,
|
|
@@ -16948,7 +17052,7 @@ var Select = (props) => {
|
|
|
16948
17052
|
onChange: (event) => setValue(event.target.value),
|
|
16949
17053
|
disabled,
|
|
16950
17054
|
children: [
|
|
16951
|
-
value === undefined ? /* @__PURE__ */
|
|
17055
|
+
value === undefined ? /* @__PURE__ */ jsx212("option", { value: "" }) : null,
|
|
16952
17056
|
Array.from(nativeOptionsSet)
|
|
16953
17057
|
]
|
|
16954
17058
|
}, nativeSelectKey) : null
|
|
@@ -16957,7 +17061,7 @@ var Select = (props) => {
|
|
|
16957
17061
|
};
|
|
16958
17062
|
Select.displayName = SELECT_NAME;
|
|
16959
17063
|
var TRIGGER_NAME = "SelectTrigger";
|
|
16960
|
-
var SelectTrigger =
|
|
17064
|
+
var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
16961
17065
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
16962
17066
|
const popperScope = usePopperScope(__scopeSelect);
|
|
16963
17067
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -16978,7 +17082,7 @@ var SelectTrigger = React322.forwardRef((props, forwardedRef) => {
|
|
|
16978
17082
|
resetTypeahead();
|
|
16979
17083
|
}
|
|
16980
17084
|
};
|
|
16981
|
-
return /* @__PURE__ */
|
|
17085
|
+
return /* @__PURE__ */ jsx212(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx212(Primitive.button, {
|
|
16982
17086
|
type: "button",
|
|
16983
17087
|
role: "combobox",
|
|
16984
17088
|
"aria-controls": context.contentId,
|
|
@@ -17025,7 +17129,7 @@ var SelectTrigger = React322.forwardRef((props, forwardedRef) => {
|
|
|
17025
17129
|
});
|
|
17026
17130
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
17027
17131
|
var VALUE_NAME = "SelectValue";
|
|
17028
|
-
var SelectValue =
|
|
17132
|
+
var SelectValue = React34.forwardRef((props, forwardedRef) => {
|
|
17029
17133
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
17030
17134
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
17031
17135
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -17034,43 +17138,43 @@ var SelectValue = React322.forwardRef((props, forwardedRef) => {
|
|
|
17034
17138
|
useLayoutEffect22(() => {
|
|
17035
17139
|
onValueNodeHasChildrenChange(hasChildren);
|
|
17036
17140
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
17037
|
-
return /* @__PURE__ */
|
|
17141
|
+
return /* @__PURE__ */ jsx212(Primitive.span, {
|
|
17038
17142
|
...valueProps,
|
|
17039
17143
|
ref: composedRefs,
|
|
17040
17144
|
style: { pointerEvents: "none" },
|
|
17041
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */
|
|
17145
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx212(Fragment52, { children: placeholder }) : children
|
|
17042
17146
|
});
|
|
17043
17147
|
});
|
|
17044
17148
|
SelectValue.displayName = VALUE_NAME;
|
|
17045
17149
|
var ICON_NAME = "SelectIcon";
|
|
17046
|
-
var SelectIcon =
|
|
17150
|
+
var SelectIcon = React34.forwardRef((props, forwardedRef) => {
|
|
17047
17151
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
17048
|
-
return /* @__PURE__ */
|
|
17152
|
+
return /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
17049
17153
|
});
|
|
17050
17154
|
SelectIcon.displayName = ICON_NAME;
|
|
17051
17155
|
var PORTAL_NAME2 = "SelectPortal";
|
|
17052
17156
|
var SelectPortal = (props) => {
|
|
17053
|
-
return /* @__PURE__ */
|
|
17157
|
+
return /* @__PURE__ */ jsx212(Portal, { asChild: true, ...props });
|
|
17054
17158
|
};
|
|
17055
17159
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
17056
17160
|
var CONTENT_NAME2 = "SelectContent";
|
|
17057
|
-
var SelectContent =
|
|
17161
|
+
var SelectContent = React34.forwardRef((props, forwardedRef) => {
|
|
17058
17162
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
17059
|
-
const [fragment, setFragment] =
|
|
17163
|
+
const [fragment, setFragment] = React34.useState();
|
|
17060
17164
|
useLayoutEffect22(() => {
|
|
17061
17165
|
setFragment(new DocumentFragment);
|
|
17062
17166
|
}, []);
|
|
17063
17167
|
if (!context.open) {
|
|
17064
17168
|
const frag = fragment;
|
|
17065
|
-
return frag ? ReactDOM4.createPortal(/* @__PURE__ */
|
|
17169
|
+
return frag ? ReactDOM4.createPortal(/* @__PURE__ */ jsx212(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx212(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx212("div", { children: props.children }) }) }), frag) : null;
|
|
17066
17170
|
}
|
|
17067
|
-
return /* @__PURE__ */
|
|
17171
|
+
return /* @__PURE__ */ jsx212(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
17068
17172
|
});
|
|
17069
17173
|
SelectContent.displayName = CONTENT_NAME2;
|
|
17070
17174
|
var CONTENT_MARGIN = 10;
|
|
17071
17175
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
17072
17176
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
17073
|
-
var SelectContentImpl =
|
|
17177
|
+
var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
17074
17178
|
const {
|
|
17075
17179
|
__scopeSelect,
|
|
17076
17180
|
position = "item-aligned",
|
|
@@ -17090,20 +17194,20 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17090
17194
|
...contentProps
|
|
17091
17195
|
} = props;
|
|
17092
17196
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17093
|
-
const [content, setContent] =
|
|
17094
|
-
const [viewport, setViewport] =
|
|
17197
|
+
const [content, setContent] = React34.useState(null);
|
|
17198
|
+
const [viewport, setViewport] = React34.useState(null);
|
|
17095
17199
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17096
|
-
const [selectedItem, setSelectedItem] =
|
|
17097
|
-
const [selectedItemText, setSelectedItemText] =
|
|
17200
|
+
const [selectedItem, setSelectedItem] = React34.useState(null);
|
|
17201
|
+
const [selectedItemText, setSelectedItemText] = React34.useState(null);
|
|
17098
17202
|
const getItems = useCollection(__scopeSelect);
|
|
17099
|
-
const [isPositioned, setIsPositioned] =
|
|
17100
|
-
const firstValidItemFoundRef =
|
|
17101
|
-
|
|
17203
|
+
const [isPositioned, setIsPositioned] = React34.useState(false);
|
|
17204
|
+
const firstValidItemFoundRef = React34.useRef(false);
|
|
17205
|
+
React34.useEffect(() => {
|
|
17102
17206
|
if (content)
|
|
17103
17207
|
return hideOthers(content);
|
|
17104
17208
|
}, [content]);
|
|
17105
17209
|
useFocusGuards();
|
|
17106
|
-
const focusFirst2 =
|
|
17210
|
+
const focusFirst2 = React34.useCallback((candidates) => {
|
|
17107
17211
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
17108
17212
|
const [lastItem] = restItems.slice(-1);
|
|
17109
17213
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -17120,14 +17224,14 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17120
17224
|
return;
|
|
17121
17225
|
}
|
|
17122
17226
|
}, [getItems, viewport]);
|
|
17123
|
-
const focusSelectedItem =
|
|
17124
|
-
|
|
17227
|
+
const focusSelectedItem = React34.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
17228
|
+
React34.useEffect(() => {
|
|
17125
17229
|
if (isPositioned) {
|
|
17126
17230
|
focusSelectedItem();
|
|
17127
17231
|
}
|
|
17128
17232
|
}, [isPositioned, focusSelectedItem]);
|
|
17129
17233
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
17130
|
-
|
|
17234
|
+
React34.useEffect(() => {
|
|
17131
17235
|
if (content) {
|
|
17132
17236
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
17133
17237
|
const handlePointerMove = (event) => {
|
|
@@ -17157,7 +17261,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17157
17261
|
};
|
|
17158
17262
|
}
|
|
17159
17263
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
17160
|
-
|
|
17264
|
+
React34.useEffect(() => {
|
|
17161
17265
|
const close = () => onOpenChange(false);
|
|
17162
17266
|
window.addEventListener("blur", close);
|
|
17163
17267
|
window.addEventListener("resize", close);
|
|
@@ -17174,7 +17278,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17174
17278
|
setTimeout(() => nextItem.ref.current.focus());
|
|
17175
17279
|
}
|
|
17176
17280
|
});
|
|
17177
|
-
const itemRefCallback =
|
|
17281
|
+
const itemRefCallback = React34.useCallback((node, value, disabled) => {
|
|
17178
17282
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17179
17283
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17180
17284
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17183,8 +17287,8 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17183
17287
|
firstValidItemFoundRef.current = true;
|
|
17184
17288
|
}
|
|
17185
17289
|
}, [context.value]);
|
|
17186
|
-
const handleItemLeave =
|
|
17187
|
-
const itemTextRefCallback =
|
|
17290
|
+
const handleItemLeave = React34.useCallback(() => content?.focus(), [content]);
|
|
17291
|
+
const itemTextRefCallback = React34.useCallback((node, value, disabled) => {
|
|
17188
17292
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17189
17293
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17190
17294
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17204,7 +17308,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17204
17308
|
hideWhenDetached,
|
|
17205
17309
|
avoidCollisions
|
|
17206
17310
|
} : {};
|
|
17207
|
-
return /* @__PURE__ */
|
|
17311
|
+
return /* @__PURE__ */ jsx212(SelectContentProvider, {
|
|
17208
17312
|
scope: __scopeSelect,
|
|
17209
17313
|
content,
|
|
17210
17314
|
viewport,
|
|
@@ -17218,7 +17322,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17218
17322
|
position,
|
|
17219
17323
|
isPositioned,
|
|
17220
17324
|
searchRef,
|
|
17221
|
-
children: /* @__PURE__ */
|
|
17325
|
+
children: /* @__PURE__ */ jsx212(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx212(FocusScope, {
|
|
17222
17326
|
asChild: true,
|
|
17223
17327
|
trapped: context.open,
|
|
17224
17328
|
onMountAutoFocus: (event) => {
|
|
@@ -17228,14 +17332,14 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17228
17332
|
context.trigger?.focus({ preventScroll: true });
|
|
17229
17333
|
event.preventDefault();
|
|
17230
17334
|
}),
|
|
17231
|
-
children: /* @__PURE__ */
|
|
17335
|
+
children: /* @__PURE__ */ jsx212(DismissableLayer, {
|
|
17232
17336
|
asChild: true,
|
|
17233
17337
|
disableOutsidePointerEvents: true,
|
|
17234
17338
|
onEscapeKeyDown,
|
|
17235
17339
|
onPointerDownOutside,
|
|
17236
17340
|
onFocusOutside: (event) => event.preventDefault(),
|
|
17237
17341
|
onDismiss: () => context.onOpenChange(false),
|
|
17238
|
-
children: /* @__PURE__ */
|
|
17342
|
+
children: /* @__PURE__ */ jsx212(SelectPosition, {
|
|
17239
17343
|
role: "listbox",
|
|
17240
17344
|
id: context.contentId,
|
|
17241
17345
|
"data-state": context.open ? "open" : "closed",
|
|
@@ -17279,18 +17383,18 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17279
17383
|
});
|
|
17280
17384
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
17281
17385
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
17282
|
-
var SelectItemAlignedPosition =
|
|
17386
|
+
var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
17283
17387
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
17284
17388
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17285
17389
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
17286
|
-
const [contentWrapper, setContentWrapper] =
|
|
17287
|
-
const [content, setContent] =
|
|
17390
|
+
const [contentWrapper, setContentWrapper] = React34.useState(null);
|
|
17391
|
+
const [content, setContent] = React34.useState(null);
|
|
17288
17392
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17289
17393
|
const getItems = useCollection(__scopeSelect);
|
|
17290
|
-
const shouldExpandOnScrollRef =
|
|
17291
|
-
const shouldRepositionRef =
|
|
17394
|
+
const shouldExpandOnScrollRef = React34.useRef(false);
|
|
17395
|
+
const shouldRepositionRef = React34.useRef(true);
|
|
17292
17396
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
17293
|
-
const position =
|
|
17397
|
+
const position = React34.useCallback(() => {
|
|
17294
17398
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
17295
17399
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
17296
17400
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -17371,24 +17475,24 @@ var SelectItemAlignedPosition = React322.forwardRef((props, forwardedRef) => {
|
|
|
17371
17475
|
onPlaced
|
|
17372
17476
|
]);
|
|
17373
17477
|
useLayoutEffect22(() => position(), [position]);
|
|
17374
|
-
const [contentZIndex, setContentZIndex] =
|
|
17478
|
+
const [contentZIndex, setContentZIndex] = React34.useState();
|
|
17375
17479
|
useLayoutEffect22(() => {
|
|
17376
17480
|
if (content)
|
|
17377
17481
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
17378
17482
|
}, [content]);
|
|
17379
|
-
const handleScrollButtonChange =
|
|
17483
|
+
const handleScrollButtonChange = React34.useCallback((node) => {
|
|
17380
17484
|
if (node && shouldRepositionRef.current === true) {
|
|
17381
17485
|
position();
|
|
17382
17486
|
focusSelectedItem?.();
|
|
17383
17487
|
shouldRepositionRef.current = false;
|
|
17384
17488
|
}
|
|
17385
17489
|
}, [position, focusSelectedItem]);
|
|
17386
|
-
return /* @__PURE__ */
|
|
17490
|
+
return /* @__PURE__ */ jsx212(SelectViewportProvider, {
|
|
17387
17491
|
scope: __scopeSelect,
|
|
17388
17492
|
contentWrapper,
|
|
17389
17493
|
shouldExpandOnScrollRef,
|
|
17390
17494
|
onScrollButtonChange: handleScrollButtonChange,
|
|
17391
|
-
children: /* @__PURE__ */
|
|
17495
|
+
children: /* @__PURE__ */ jsx212("div", {
|
|
17392
17496
|
ref: setContentWrapper,
|
|
17393
17497
|
style: {
|
|
17394
17498
|
display: "flex",
|
|
@@ -17396,7 +17500,7 @@ var SelectItemAlignedPosition = React322.forwardRef((props, forwardedRef) => {
|
|
|
17396
17500
|
position: "fixed",
|
|
17397
17501
|
zIndex: contentZIndex
|
|
17398
17502
|
},
|
|
17399
|
-
children: /* @__PURE__ */
|
|
17503
|
+
children: /* @__PURE__ */ jsx212(Primitive.div, {
|
|
17400
17504
|
...popperProps,
|
|
17401
17505
|
ref: composedRefs,
|
|
17402
17506
|
style: {
|
|
@@ -17410,7 +17514,7 @@ var SelectItemAlignedPosition = React322.forwardRef((props, forwardedRef) => {
|
|
|
17410
17514
|
});
|
|
17411
17515
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
17412
17516
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
17413
|
-
var SelectPopperPosition =
|
|
17517
|
+
var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
17414
17518
|
const {
|
|
17415
17519
|
__scopeSelect,
|
|
17416
17520
|
align = "start",
|
|
@@ -17418,7 +17522,7 @@ var SelectPopperPosition = React322.forwardRef((props, forwardedRef) => {
|
|
|
17418
17522
|
...popperProps
|
|
17419
17523
|
} = props;
|
|
17420
17524
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17421
|
-
return /* @__PURE__ */
|
|
17525
|
+
return /* @__PURE__ */ jsx212(Content, {
|
|
17422
17526
|
...popperScope,
|
|
17423
17527
|
...popperProps,
|
|
17424
17528
|
ref: forwardedRef,
|
|
@@ -17440,20 +17544,20 @@ var SelectPopperPosition = React322.forwardRef((props, forwardedRef) => {
|
|
|
17440
17544
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
17441
17545
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
17442
17546
|
var VIEWPORT_NAME = "SelectViewport";
|
|
17443
|
-
var SelectViewport =
|
|
17547
|
+
var SelectViewport = React34.forwardRef((props, forwardedRef) => {
|
|
17444
17548
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
17445
17549
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
17446
17550
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
17447
17551
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
17448
|
-
const prevScrollTopRef =
|
|
17449
|
-
return /* @__PURE__ */
|
|
17450
|
-
/* @__PURE__ */
|
|
17552
|
+
const prevScrollTopRef = React34.useRef(0);
|
|
17553
|
+
return /* @__PURE__ */ jsxs4(Fragment52, { children: [
|
|
17554
|
+
/* @__PURE__ */ jsx212("style", {
|
|
17451
17555
|
dangerouslySetInnerHTML: {
|
|
17452
17556
|
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
|
17453
17557
|
},
|
|
17454
17558
|
nonce
|
|
17455
17559
|
}),
|
|
17456
|
-
/* @__PURE__ */
|
|
17560
|
+
/* @__PURE__ */ jsx212(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx212(Primitive.div, {
|
|
17457
17561
|
"data-radix-select-viewport": "",
|
|
17458
17562
|
role: "presentation",
|
|
17459
17563
|
...viewportProps,
|
|
@@ -17494,22 +17598,22 @@ var SelectViewport = React322.forwardRef((props, forwardedRef) => {
|
|
|
17494
17598
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
17495
17599
|
var GROUP_NAME = "SelectGroup";
|
|
17496
17600
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
17497
|
-
var SelectGroup =
|
|
17601
|
+
var SelectGroup = React34.forwardRef((props, forwardedRef) => {
|
|
17498
17602
|
const { __scopeSelect, ...groupProps } = props;
|
|
17499
17603
|
const groupId = useId();
|
|
17500
|
-
return /* @__PURE__ */
|
|
17604
|
+
return /* @__PURE__ */ jsx212(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx212(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
17501
17605
|
});
|
|
17502
17606
|
SelectGroup.displayName = GROUP_NAME;
|
|
17503
17607
|
var LABEL_NAME = "SelectLabel";
|
|
17504
|
-
var SelectLabel =
|
|
17608
|
+
var SelectLabel = React34.forwardRef((props, forwardedRef) => {
|
|
17505
17609
|
const { __scopeSelect, ...labelProps } = props;
|
|
17506
17610
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
17507
|
-
return /* @__PURE__ */
|
|
17611
|
+
return /* @__PURE__ */ jsx212(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
17508
17612
|
});
|
|
17509
17613
|
SelectLabel.displayName = LABEL_NAME;
|
|
17510
17614
|
var ITEM_NAME = "SelectItem";
|
|
17511
17615
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
17512
|
-
var SelectItem =
|
|
17616
|
+
var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
17513
17617
|
const {
|
|
17514
17618
|
__scopeSelect,
|
|
17515
17619
|
value,
|
|
@@ -17520,8 +17624,8 @@ var SelectItem = React322.forwardRef((props, forwardedRef) => {
|
|
|
17520
17624
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
17521
17625
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
17522
17626
|
const isSelected = context.value === value;
|
|
17523
|
-
const [textValue, setTextValue] =
|
|
17524
|
-
const [isFocused, setIsFocused] =
|
|
17627
|
+
const [textValue, setTextValue] = React34.useState(textValueProp ?? "");
|
|
17628
|
+
const [isFocused, setIsFocused] = React34.useState(false);
|
|
17525
17629
|
const composedRefs = useComposedRefs(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
17526
17630
|
const textId = useId();
|
|
17527
17631
|
const handleSelect = () => {
|
|
@@ -17533,21 +17637,21 @@ var SelectItem = React322.forwardRef((props, forwardedRef) => {
|
|
|
17533
17637
|
if (value === "") {
|
|
17534
17638
|
throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
17535
17639
|
}
|
|
17536
|
-
return /* @__PURE__ */
|
|
17640
|
+
return /* @__PURE__ */ jsx212(SelectItemContextProvider, {
|
|
17537
17641
|
scope: __scopeSelect,
|
|
17538
17642
|
value,
|
|
17539
17643
|
disabled,
|
|
17540
17644
|
textId,
|
|
17541
17645
|
isSelected,
|
|
17542
|
-
onItemTextChange:
|
|
17646
|
+
onItemTextChange: React34.useCallback((node) => {
|
|
17543
17647
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
17544
17648
|
}, []),
|
|
17545
|
-
children: /* @__PURE__ */
|
|
17649
|
+
children: /* @__PURE__ */ jsx212(Collection.ItemSlot, {
|
|
17546
17650
|
scope: __scopeSelect,
|
|
17547
17651
|
value,
|
|
17548
17652
|
disabled,
|
|
17549
17653
|
textValue,
|
|
17550
|
-
children: /* @__PURE__ */
|
|
17654
|
+
children: /* @__PURE__ */ jsx212(Primitive.div, {
|
|
17551
17655
|
role: "option",
|
|
17552
17656
|
"aria-labelledby": textId,
|
|
17553
17657
|
"data-highlighted": isFocused ? "" : undefined,
|
|
@@ -17588,39 +17692,39 @@ var SelectItem = React322.forwardRef((props, forwardedRef) => {
|
|
|
17588
17692
|
});
|
|
17589
17693
|
SelectItem.displayName = ITEM_NAME;
|
|
17590
17694
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
17591
|
-
var SelectItemText =
|
|
17695
|
+
var SelectItemText = React34.forwardRef((props, forwardedRef) => {
|
|
17592
17696
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
17593
17697
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17594
17698
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17595
17699
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17596
17700
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17597
|
-
const [itemTextNode, setItemTextNode] =
|
|
17701
|
+
const [itemTextNode, setItemTextNode] = React34.useState(null);
|
|
17598
17702
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
17599
17703
|
const textContent = itemTextNode?.textContent;
|
|
17600
|
-
const nativeOption =
|
|
17704
|
+
const nativeOption = React34.useMemo(() => /* @__PURE__ */ jsx212("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
17601
17705
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
17602
17706
|
useLayoutEffect22(() => {
|
|
17603
17707
|
onNativeOptionAdd(nativeOption);
|
|
17604
17708
|
return () => onNativeOptionRemove(nativeOption);
|
|
17605
17709
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
17606
|
-
return /* @__PURE__ */
|
|
17607
|
-
/* @__PURE__ */
|
|
17710
|
+
return /* @__PURE__ */ jsxs4(Fragment52, { children: [
|
|
17711
|
+
/* @__PURE__ */ jsx212(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
17608
17712
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
17609
17713
|
] });
|
|
17610
17714
|
});
|
|
17611
17715
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
17612
17716
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
17613
|
-
var SelectItemIndicator =
|
|
17717
|
+
var SelectItemIndicator = React34.forwardRef((props, forwardedRef) => {
|
|
17614
17718
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
17615
17719
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
17616
|
-
return itemContext.isSelected ? /* @__PURE__ */
|
|
17720
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
17617
17721
|
});
|
|
17618
17722
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
17619
17723
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
17620
|
-
var SelectScrollUpButton =
|
|
17724
|
+
var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
17621
17725
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
17622
17726
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
17623
|
-
const [canScrollUp, setCanScrollUp] =
|
|
17727
|
+
const [canScrollUp, setCanScrollUp] = React34.useState(false);
|
|
17624
17728
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
17625
17729
|
useLayoutEffect22(() => {
|
|
17626
17730
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -17635,7 +17739,7 @@ var SelectScrollUpButton = React322.forwardRef((props, forwardedRef) => {
|
|
|
17635
17739
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
17636
17740
|
}
|
|
17637
17741
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
17638
|
-
return canScrollUp ? /* @__PURE__ */
|
|
17742
|
+
return canScrollUp ? /* @__PURE__ */ jsx212(SelectScrollButtonImpl, {
|
|
17639
17743
|
...props,
|
|
17640
17744
|
ref: composedRefs,
|
|
17641
17745
|
onAutoScroll: () => {
|
|
@@ -17648,10 +17752,10 @@ var SelectScrollUpButton = React322.forwardRef((props, forwardedRef) => {
|
|
|
17648
17752
|
});
|
|
17649
17753
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
17650
17754
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
17651
|
-
var SelectScrollDownButton =
|
|
17755
|
+
var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
17652
17756
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
17653
17757
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
17654
|
-
const [canScrollDown, setCanScrollDown] =
|
|
17758
|
+
const [canScrollDown, setCanScrollDown] = React34.useState(false);
|
|
17655
17759
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
17656
17760
|
useLayoutEffect22(() => {
|
|
17657
17761
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -17667,7 +17771,7 @@ var SelectScrollDownButton = React322.forwardRef((props, forwardedRef) => {
|
|
|
17667
17771
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
17668
17772
|
}
|
|
17669
17773
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
17670
|
-
return canScrollDown ? /* @__PURE__ */
|
|
17774
|
+
return canScrollDown ? /* @__PURE__ */ jsx212(SelectScrollButtonImpl, {
|
|
17671
17775
|
...props,
|
|
17672
17776
|
ref: composedRefs,
|
|
17673
17777
|
onAutoScroll: () => {
|
|
@@ -17679,25 +17783,25 @@ var SelectScrollDownButton = React322.forwardRef((props, forwardedRef) => {
|
|
|
17679
17783
|
}) : null;
|
|
17680
17784
|
});
|
|
17681
17785
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
17682
|
-
var SelectScrollButtonImpl =
|
|
17786
|
+
var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
|
|
17683
17787
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
17684
17788
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
17685
|
-
const autoScrollTimerRef =
|
|
17789
|
+
const autoScrollTimerRef = React34.useRef(null);
|
|
17686
17790
|
const getItems = useCollection(__scopeSelect);
|
|
17687
|
-
const clearAutoScrollTimer =
|
|
17791
|
+
const clearAutoScrollTimer = React34.useCallback(() => {
|
|
17688
17792
|
if (autoScrollTimerRef.current !== null) {
|
|
17689
17793
|
window.clearInterval(autoScrollTimerRef.current);
|
|
17690
17794
|
autoScrollTimerRef.current = null;
|
|
17691
17795
|
}
|
|
17692
17796
|
}, []);
|
|
17693
|
-
|
|
17797
|
+
React34.useEffect(() => {
|
|
17694
17798
|
return () => clearAutoScrollTimer();
|
|
17695
17799
|
}, [clearAutoScrollTimer]);
|
|
17696
17800
|
useLayoutEffect22(() => {
|
|
17697
17801
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
17698
17802
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
17699
17803
|
}, [getItems]);
|
|
17700
|
-
return /* @__PURE__ */
|
|
17804
|
+
return /* @__PURE__ */ jsx212(Primitive.div, {
|
|
17701
17805
|
"aria-hidden": true,
|
|
17702
17806
|
...scrollIndicatorProps,
|
|
17703
17807
|
ref: forwardedRef,
|
|
@@ -17719,29 +17823,29 @@ var SelectScrollButtonImpl = React322.forwardRef((props, forwardedRef) => {
|
|
|
17719
17823
|
});
|
|
17720
17824
|
});
|
|
17721
17825
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
17722
|
-
var SelectSeparator =
|
|
17826
|
+
var SelectSeparator = React34.forwardRef((props, forwardedRef) => {
|
|
17723
17827
|
const { __scopeSelect, ...separatorProps } = props;
|
|
17724
|
-
return /* @__PURE__ */
|
|
17828
|
+
return /* @__PURE__ */ jsx212(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
17725
17829
|
});
|
|
17726
17830
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
17727
17831
|
var ARROW_NAME2 = "SelectArrow";
|
|
17728
|
-
var SelectArrow =
|
|
17832
|
+
var SelectArrow = React34.forwardRef((props, forwardedRef) => {
|
|
17729
17833
|
const { __scopeSelect, ...arrowProps } = props;
|
|
17730
17834
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17731
17835
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
17732
17836
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
17733
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */
|
|
17837
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx212(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
17734
17838
|
});
|
|
17735
17839
|
SelectArrow.displayName = ARROW_NAME2;
|
|
17736
17840
|
function shouldShowPlaceholder(value) {
|
|
17737
17841
|
return value === "" || value === undefined;
|
|
17738
17842
|
}
|
|
17739
|
-
var BubbleSelect =
|
|
17843
|
+
var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
|
|
17740
17844
|
const { value, ...selectProps } = props;
|
|
17741
|
-
const ref =
|
|
17845
|
+
const ref = React34.useRef(null);
|
|
17742
17846
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
17743
17847
|
const prevValue = usePrevious(value);
|
|
17744
|
-
|
|
17848
|
+
React34.useEffect(() => {
|
|
17745
17849
|
const select = ref.current;
|
|
17746
17850
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
17747
17851
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -17752,14 +17856,14 @@ var BubbleSelect = React322.forwardRef((props, forwardedRef) => {
|
|
|
17752
17856
|
select.dispatchEvent(event);
|
|
17753
17857
|
}
|
|
17754
17858
|
}, [prevValue, value]);
|
|
17755
|
-
return /* @__PURE__ */
|
|
17859
|
+
return /* @__PURE__ */ jsx212(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx212("select", { ...selectProps, ref: composedRefs, defaultValue: value }) });
|
|
17756
17860
|
});
|
|
17757
17861
|
BubbleSelect.displayName = "BubbleSelect";
|
|
17758
17862
|
function useTypeaheadSearch(onSearchChange) {
|
|
17759
17863
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
17760
|
-
const searchRef =
|
|
17761
|
-
const timerRef =
|
|
17762
|
-
const handleTypeaheadSearch =
|
|
17864
|
+
const searchRef = React34.useRef("");
|
|
17865
|
+
const timerRef = React34.useRef(0);
|
|
17866
|
+
const handleTypeaheadSearch = React34.useCallback((key) => {
|
|
17763
17867
|
const search = searchRef.current + key;
|
|
17764
17868
|
handleSearchChange(search);
|
|
17765
17869
|
(function updateSearch(value) {
|
|
@@ -17769,11 +17873,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
17769
17873
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
17770
17874
|
})(search);
|
|
17771
17875
|
}, [handleSearchChange]);
|
|
17772
|
-
const resetTypeahead =
|
|
17876
|
+
const resetTypeahead = React34.useCallback(() => {
|
|
17773
17877
|
searchRef.current = "";
|
|
17774
17878
|
window.clearTimeout(timerRef.current);
|
|
17775
17879
|
}, []);
|
|
17776
|
-
|
|
17880
|
+
React34.useEffect(() => {
|
|
17777
17881
|
return () => window.clearTimeout(timerRef.current);
|
|
17778
17882
|
}, []);
|
|
17779
17883
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -17862,104 +17966,104 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
17862
17966
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
17863
17967
|
var Select2 = Root222;
|
|
17864
17968
|
var SelectValue2 = Value;
|
|
17865
|
-
var SelectTrigger2 =
|
|
17969
|
+
var SelectTrigger2 = React352.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
17866
17970
|
ref,
|
|
17867
17971
|
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),
|
|
17868
17972
|
...props,
|
|
17869
17973
|
children: [
|
|
17870
17974
|
children,
|
|
17871
|
-
/* @__PURE__ */
|
|
17975
|
+
/* @__PURE__ */ jsx223(Icon, {
|
|
17872
17976
|
asChild: true,
|
|
17873
|
-
children: /* @__PURE__ */
|
|
17977
|
+
children: /* @__PURE__ */ jsx223(ChevronDown, {
|
|
17874
17978
|
className: "h-4 w-4 opacity-50"
|
|
17875
17979
|
})
|
|
17876
17980
|
})
|
|
17877
17981
|
]
|
|
17878
17982
|
}));
|
|
17879
17983
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
17880
|
-
var SelectScrollUpButton2 =
|
|
17984
|
+
var SelectScrollUpButton2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollUpButton, {
|
|
17881
17985
|
ref,
|
|
17882
17986
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
17883
17987
|
...props,
|
|
17884
|
-
children: /* @__PURE__ */
|
|
17988
|
+
children: /* @__PURE__ */ jsx223(ChevronUp, {
|
|
17885
17989
|
className: "h-4 w-4"
|
|
17886
17990
|
})
|
|
17887
17991
|
}));
|
|
17888
17992
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
17889
|
-
var SelectScrollDownButton2 =
|
|
17993
|
+
var SelectScrollDownButton2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollDownButton, {
|
|
17890
17994
|
ref,
|
|
17891
17995
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
17892
17996
|
...props,
|
|
17893
|
-
children: /* @__PURE__ */
|
|
17997
|
+
children: /* @__PURE__ */ jsx223(ChevronDown, {
|
|
17894
17998
|
className: "h-4 w-4"
|
|
17895
17999
|
})
|
|
17896
18000
|
}));
|
|
17897
18001
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
17898
|
-
var SelectContent2 =
|
|
17899
|
-
children: /* @__PURE__ */
|
|
18002
|
+
var SelectContent2 = React352.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx223(Portal2, {
|
|
18003
|
+
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
17900
18004
|
ref,
|
|
17901
18005
|
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),
|
|
17902
18006
|
position,
|
|
17903
18007
|
...props,
|
|
17904
18008
|
children: [
|
|
17905
|
-
/* @__PURE__ */
|
|
17906
|
-
/* @__PURE__ */
|
|
18009
|
+
/* @__PURE__ */ jsx223(SelectScrollUpButton2, {}),
|
|
18010
|
+
/* @__PURE__ */ jsx223(Viewport, {
|
|
17907
18011
|
className: cn("p-1", position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),
|
|
17908
18012
|
children
|
|
17909
18013
|
}),
|
|
17910
|
-
/* @__PURE__ */
|
|
18014
|
+
/* @__PURE__ */ jsx223(SelectScrollDownButton2, {})
|
|
17911
18015
|
]
|
|
17912
18016
|
})
|
|
17913
18017
|
}));
|
|
17914
18018
|
SelectContent2.displayName = Content2.displayName;
|
|
17915
|
-
var SelectLabel2 =
|
|
18019
|
+
var SelectLabel2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Label, {
|
|
17916
18020
|
ref,
|
|
17917
18021
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
17918
18022
|
...props
|
|
17919
18023
|
}));
|
|
17920
18024
|
SelectLabel2.displayName = Label.displayName;
|
|
17921
|
-
var SelectItem2 =
|
|
18025
|
+
var SelectItem2 = React352.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
17922
18026
|
ref,
|
|
17923
18027
|
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),
|
|
17924
18028
|
...props,
|
|
17925
18029
|
children: [
|
|
17926
|
-
/* @__PURE__ */
|
|
18030
|
+
/* @__PURE__ */ jsx223("span", {
|
|
17927
18031
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
17928
|
-
children: /* @__PURE__ */
|
|
17929
|
-
children: /* @__PURE__ */
|
|
18032
|
+
children: /* @__PURE__ */ jsx223(ItemIndicator, {
|
|
18033
|
+
children: /* @__PURE__ */ jsx223(Check, {
|
|
17930
18034
|
className: "h-4 w-4"
|
|
17931
18035
|
})
|
|
17932
18036
|
})
|
|
17933
18037
|
}),
|
|
17934
|
-
/* @__PURE__ */
|
|
18038
|
+
/* @__PURE__ */ jsx223(ItemText, {
|
|
17935
18039
|
children
|
|
17936
18040
|
})
|
|
17937
18041
|
]
|
|
17938
18042
|
}));
|
|
17939
18043
|
SelectItem2.displayName = Item.displayName;
|
|
17940
|
-
var SelectSeparator2 =
|
|
18044
|
+
var SelectSeparator2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Separator, {
|
|
17941
18045
|
ref,
|
|
17942
18046
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
17943
18047
|
...props
|
|
17944
18048
|
}));
|
|
17945
18049
|
SelectSeparator2.displayName = Separator.displayName;
|
|
17946
18050
|
var Switch = ({ active, onToggle }) => {
|
|
17947
|
-
return /* @__PURE__ */
|
|
18051
|
+
return /* @__PURE__ */ jsx232("div", {
|
|
17948
18052
|
"data-active": active,
|
|
17949
18053
|
className: "h-8 transition-all rounded-full w-14 border-2 border-b-4 bg-gray-200 p-[2px] cursor-pointer data-[active=true]:bg-brand border-black relative",
|
|
17950
18054
|
onClick: onToggle,
|
|
17951
|
-
children: /* @__PURE__ */
|
|
18055
|
+
children: /* @__PURE__ */ jsx232("div", {
|
|
17952
18056
|
"data-active": active,
|
|
17953
18057
|
className: "h-4 w-4 box-content left-[4px] top-[3px] transition-all rounded-full bg-white border-2 border-black absolute data-[active=true]:left-[calc(100%-24px)]"
|
|
17954
18058
|
})
|
|
17955
18059
|
});
|
|
17956
18060
|
};
|
|
17957
18061
|
var Triangle2 = (props) => {
|
|
17958
|
-
return /* @__PURE__ */
|
|
18062
|
+
return /* @__PURE__ */ jsx242("svg", {
|
|
17959
18063
|
viewBox: "0 0 127 131",
|
|
17960
18064
|
fill: "none",
|
|
17961
18065
|
...props,
|
|
17962
|
-
children: /* @__PURE__ */
|
|
18066
|
+
children: /* @__PURE__ */ jsx242("path", {
|
|
17963
18067
|
d: "M28.5644 0.011261C25.8196 0.159241 23.6077 0.591782 21.3786 1.43413C20.2669 1.84959 18.4446 2.75455 17.4418 3.38062C13.2472 5.993 10.0496 9.9201 8.38209 14.4903C8.04973 15.3953 7.15007 18.2809 6.5713 20.2672C2.71476 33.5453 0.525761 48.0643 0.0558711 63.4312C-0.0186237 65.8785 -0.0186237 71.7066 0.0558711 74.1141C0.371041 84.3018 1.35093 93.4992 3.12735 102.879C3.84937 106.675 5.00691 111.774 5.67736 114.091C7.04692 118.798 9.84334 122.805 13.8202 125.741C16.4848 127.711 19.5105 129.031 22.8627 129.68C24.4787 129.993 26.6104 130.135 28.1805 130.033C30.3523 129.89 34.6616 129.316 38.1628 128.695C53.9442 125.901 68.5223 120.898 81.7422 113.738C90.1143 109.202 97.2715 104.29 104.177 98.3312C111.059 92.4007 116.927 86.0206 122.09 78.8608C123.287 77.2045 123.889 76.237 124.491 75.019C126.038 71.8773 126.766 68.7527 126.76 65.2582C126.76 62.0027 126.141 59.1114 124.806 56.1518C124.164 54.7233 123.551 53.6988 122.176 51.7523C117.11 44.5868 111.489 38.3433 104.635 32.2762C94.011 22.8739 81.3927 15.1619 67.3017 9.45339C64.2474 8.21835 61.239 7.13128 57.6174 5.95315C49.9502 3.46598 40.4607 1.30891 32.4324 0.233231C31.1718 0.0624847 29.4584 -0.0342712 28.5644 0.011261Z",
|
|
17964
18068
|
fill: "currentcolor"
|
|
17965
18069
|
})
|
|
@@ -19334,7 +19438,7 @@ var useMobileLayout = () => {
|
|
|
19334
19438
|
};
|
|
19335
19439
|
|
|
19336
19440
|
// src/components/BackButton.tsx
|
|
19337
|
-
import { jsx as jsx39, jsxs as
|
|
19441
|
+
import { jsx as jsx39, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
19338
19442
|
var BackButton = ({ color, text, link }) => {
|
|
19339
19443
|
return /* @__PURE__ */ jsx39("a", {
|
|
19340
19444
|
href: link,
|
|
@@ -19346,7 +19450,7 @@ var BackButton = ({ color, text, link }) => {
|
|
|
19346
19450
|
},
|
|
19347
19451
|
children: /* @__PURE__ */ jsx39(Button, {
|
|
19348
19452
|
className: "px-4 rounded-full text-sm h-10",
|
|
19349
|
-
children: /* @__PURE__ */
|
|
19453
|
+
children: /* @__PURE__ */ jsxs6("div", {
|
|
19350
19454
|
className: "flex row items-center justify-center px-4",
|
|
19351
19455
|
children: [
|
|
19352
19456
|
/* @__PURE__ */ jsx39("svg", {
|
|
@@ -19390,15 +19494,15 @@ var CommandCopyButton = ({ copied, customSvg }) => {
|
|
|
19390
19494
|
|
|
19391
19495
|
// src/components/homepage/MuxVideo.tsx
|
|
19392
19496
|
import Hls2 from "hls.js";
|
|
19393
|
-
import { forwardRef as forwardRef27, useEffect as useEffect39, useImperativeHandle as useImperativeHandle11, useRef as
|
|
19497
|
+
import { forwardRef as forwardRef27, useEffect as useEffect39, useImperativeHandle as useImperativeHandle11, useRef as useRef33 } from "react";
|
|
19394
19498
|
|
|
19395
19499
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
19396
19500
|
import Hls from "hls.js";
|
|
19397
19501
|
import"plyr/dist/plyr.css";
|
|
19398
|
-
import { forwardRef as forwardRef26, useCallback as useCallback27, useEffect as useEffect38, useRef as
|
|
19502
|
+
import { forwardRef as forwardRef26, useCallback as useCallback27, useEffect as useEffect38, useRef as useRef32, useState as useState35 } from "react";
|
|
19399
19503
|
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
19400
19504
|
var useCombinedRefs = function(...refs) {
|
|
19401
|
-
const targetRef =
|
|
19505
|
+
const targetRef = useRef32(null);
|
|
19402
19506
|
useEffect38(() => {
|
|
19403
19507
|
refs.forEach((ref) => {
|
|
19404
19508
|
if (!ref)
|
|
@@ -19413,9 +19517,9 @@ var useCombinedRefs = function(...refs) {
|
|
|
19413
19517
|
return targetRef;
|
|
19414
19518
|
};
|
|
19415
19519
|
var VideoPlayerWithControls = forwardRef26(({ playbackId, poster, currentTime, onLoaded, onError, onSize, autoPlay }, ref) => {
|
|
19416
|
-
const videoRef =
|
|
19520
|
+
const videoRef = useRef32(null);
|
|
19417
19521
|
const metaRef = useCombinedRefs(ref, videoRef);
|
|
19418
|
-
const playerRef =
|
|
19522
|
+
const playerRef = useRef32(null);
|
|
19419
19523
|
const [playerInitTime] = useState35(Date.now());
|
|
19420
19524
|
const videoError = useCallback27((event) => onError(event), [onError]);
|
|
19421
19525
|
const onImageLoad = useCallback27((event) => {
|
|
@@ -19500,7 +19604,7 @@ var getVideoToPlayUrl = (muxId) => {
|
|
|
19500
19604
|
return `https://stream.mux.com/${muxId}.m3u8`;
|
|
19501
19605
|
};
|
|
19502
19606
|
var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
19503
|
-
const videoRef =
|
|
19607
|
+
const videoRef = useRef33(null);
|
|
19504
19608
|
const vidUrl = getVideoToPlayUrl(muxId);
|
|
19505
19609
|
useImperativeHandle11(ref, () => videoRef.current, []);
|
|
19506
19610
|
useEffect39(() => {
|
|
@@ -19531,9 +19635,9 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
|
19531
19635
|
var MuxVideo = forwardRef27(MuxVideoForward);
|
|
19532
19636
|
|
|
19533
19637
|
// src/components/icons/tailwind.tsx
|
|
19534
|
-
import { jsx as jsx46, jsxs as
|
|
19638
|
+
import { jsx as jsx46, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
19535
19639
|
var Tailwind = (props) => {
|
|
19536
|
-
return /* @__PURE__ */
|
|
19640
|
+
return /* @__PURE__ */ jsxs8("svg", {
|
|
19537
19641
|
viewBox: "0 0 51 31",
|
|
19538
19642
|
fill: "none",
|
|
19539
19643
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -19552,7 +19656,7 @@ var Tailwind = (props) => {
|
|
|
19552
19656
|
};
|
|
19553
19657
|
|
|
19554
19658
|
// src/components/template-modal-content.tsx
|
|
19555
|
-
import { jsx as jsx47, jsxs as
|
|
19659
|
+
import { jsx as jsx47, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
19556
19660
|
var RESERVED_FOR_SIDEBAR = 350;
|
|
19557
19661
|
var GithubIcon = () => {
|
|
19558
19662
|
return /* @__PURE__ */ jsx47("svg", {
|
|
@@ -19614,7 +19718,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19614
19718
|
const npmCommand = `npx create-video@latest --${template.cliId}`;
|
|
19615
19719
|
const pnpmCommand = `pnpm create video --${template.cliId}`;
|
|
19616
19720
|
const bunCommand = `bun create video --${template.cliId}`;
|
|
19617
|
-
return /* @__PURE__ */
|
|
19721
|
+
return /* @__PURE__ */ jsxs9("div", {
|
|
19618
19722
|
children: [
|
|
19619
19723
|
/* @__PURE__ */ jsx47(BackButton, {
|
|
19620
19724
|
link: "/templates",
|
|
@@ -19625,10 +19729,10 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19625
19729
|
className: "mt-0",
|
|
19626
19730
|
children: template.shortName
|
|
19627
19731
|
}),
|
|
19628
|
-
/* @__PURE__ */
|
|
19732
|
+
/* @__PURE__ */ jsxs9(Card, {
|
|
19629
19733
|
className: "mb-7 overflow-hidden w-full",
|
|
19630
19734
|
children: [
|
|
19631
|
-
/* @__PURE__ */
|
|
19735
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
19632
19736
|
className: `mb-0 flex overflow-auto ${mobileLayout ? "flex-col h-full left-0 top-0" : "flex-row"} w-full border-b-2 border-black`,
|
|
19633
19737
|
children: [
|
|
19634
19738
|
/* @__PURE__ */ jsx47("div", {
|
|
@@ -19656,7 +19760,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19656
19760
|
className: "w-full h-auto border border-[var(--ifm-color-emphasis-300)]"
|
|
19657
19761
|
})
|
|
19658
19762
|
}),
|
|
19659
|
-
/* @__PURE__ */
|
|
19763
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
19660
19764
|
className: `overflow-auto ${mobileLayout ? "w-full" : ""} p-5 font-brand`,
|
|
19661
19765
|
style: {
|
|
19662
19766
|
width: mobileLayout ? "100%" : RESERVED_FOR_SIDEBAR
|
|
@@ -19664,14 +19768,14 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19664
19768
|
children: [
|
|
19665
19769
|
/* @__PURE__ */ jsx47("div", {
|
|
19666
19770
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
19667
|
-
children: /* @__PURE__ */
|
|
19771
|
+
children: /* @__PURE__ */ jsxs9("a", {
|
|
19668
19772
|
className: "text-inherit inline-flex flex-row items-center cursor-pointer select-none",
|
|
19669
19773
|
onPointerDown: () => copyCommand(npmCommand),
|
|
19670
19774
|
children: [
|
|
19671
19775
|
/* @__PURE__ */ jsx47("div", {
|
|
19672
19776
|
className: "w-6 h-9 mr-3 inline-flex items-center justify-center",
|
|
19673
19777
|
children: /* @__PURE__ */ jsx47(CommandCopyButton, {
|
|
19674
|
-
customSvg: /* @__PURE__ */
|
|
19778
|
+
customSvg: /* @__PURE__ */ jsxs9("svg", {
|
|
19675
19779
|
viewBox: "0 0 2500 2500",
|
|
19676
19780
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19677
19781
|
className: "h-5",
|
|
@@ -19698,7 +19802,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19698
19802
|
}),
|
|
19699
19803
|
/* @__PURE__ */ jsx47("div", {
|
|
19700
19804
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
19701
|
-
children: /* @__PURE__ */
|
|
19805
|
+
children: /* @__PURE__ */ jsxs9("a", {
|
|
19702
19806
|
target: "_blank",
|
|
19703
19807
|
className: "text-inherit inline-flex flex-row items-center cursor-pointer select-none",
|
|
19704
19808
|
onPointerDown: () => copyCommand(bunCommand),
|
|
@@ -19706,7 +19810,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19706
19810
|
/* @__PURE__ */ jsx47("div", {
|
|
19707
19811
|
className: "w-6 h-9 mr-3 inline-flex items-center justify-center",
|
|
19708
19812
|
children: /* @__PURE__ */ jsx47(CommandCopyButton, {
|
|
19709
|
-
customSvg: /* @__PURE__ */
|
|
19813
|
+
customSvg: /* @__PURE__ */ jsxs9("svg", {
|
|
19710
19814
|
id: "Bun",
|
|
19711
19815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19712
19816
|
viewBox: "0 0 80 70",
|
|
@@ -19716,7 +19820,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19716
19820
|
id: "Shadow",
|
|
19717
19821
|
d: "M71.09,20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46,26.46,0,0,1,75.5,35.7c0,16.57-16.82,30.05-37.5,30.05-11.58,0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55,65.3,30.14,69.75,42,69.75c20.68,0,37.5-13.48,37.5-30C79.5,32.69,76.46,26,71.09,20.74Z"
|
|
19718
19822
|
}),
|
|
19719
|
-
/* @__PURE__ */
|
|
19823
|
+
/* @__PURE__ */ jsxs9("g", {
|
|
19720
19824
|
id: "Body",
|
|
19721
19825
|
children: [
|
|
19722
19826
|
/* @__PURE__ */ jsx47("path", {
|
|
@@ -19747,7 +19851,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19747
19851
|
})
|
|
19748
19852
|
]
|
|
19749
19853
|
}),
|
|
19750
|
-
/* @__PURE__ */
|
|
19854
|
+
/* @__PURE__ */ jsxs9("g", {
|
|
19751
19855
|
id: "Mouth",
|
|
19752
19856
|
children: [
|
|
19753
19857
|
/* @__PURE__ */ jsx47("g", {
|
|
@@ -19758,7 +19862,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19758
19862
|
style: { fill: "#b71422" }
|
|
19759
19863
|
})
|
|
19760
19864
|
}),
|
|
19761
|
-
/* @__PURE__ */
|
|
19865
|
+
/* @__PURE__ */ jsxs9("g", {
|
|
19762
19866
|
id: "Tongue",
|
|
19763
19867
|
children: [
|
|
19764
19868
|
/* @__PURE__ */ jsx47("path", {
|
|
@@ -19781,7 +19885,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19781
19885
|
})
|
|
19782
19886
|
]
|
|
19783
19887
|
}),
|
|
19784
|
-
/* @__PURE__ */
|
|
19888
|
+
/* @__PURE__ */ jsxs9("g", {
|
|
19785
19889
|
id: "Face",
|
|
19786
19890
|
children: [
|
|
19787
19891
|
/* @__PURE__ */ jsx47("ellipse", {
|
|
@@ -19828,14 +19932,14 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19828
19932
|
}),
|
|
19829
19933
|
/* @__PURE__ */ jsx47("div", {
|
|
19830
19934
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
19831
|
-
children: /* @__PURE__ */
|
|
19935
|
+
children: /* @__PURE__ */ jsxs9("a", {
|
|
19832
19936
|
className: "text-inherit inline-flex flex-row items-center cursor-pointer select-none",
|
|
19833
19937
|
onPointerDown: () => copyCommand(pnpmCommand),
|
|
19834
19938
|
children: [
|
|
19835
19939
|
/* @__PURE__ */ jsx47("div", {
|
|
19836
19940
|
className: "w-6 h-9 mr-3 inline-flex items-center justify-center",
|
|
19837
19941
|
children: /* @__PURE__ */ jsx47(CommandCopyButton, {
|
|
19838
|
-
customSvg: /* @__PURE__ */
|
|
19942
|
+
customSvg: /* @__PURE__ */ jsxs9("svg", {
|
|
19839
19943
|
version: "1.1",
|
|
19840
19944
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19841
19945
|
preserveAspectRatio: "xMidYMid meet",
|
|
@@ -19844,7 +19948,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19844
19948
|
height: "160",
|
|
19845
19949
|
className: "h-5",
|
|
19846
19950
|
children: [
|
|
19847
|
-
/* @__PURE__ */
|
|
19951
|
+
/* @__PURE__ */ jsxs9("defs", {
|
|
19848
19952
|
children: [
|
|
19849
19953
|
/* @__PURE__ */ jsx47("path", {
|
|
19850
19954
|
d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
|
|
@@ -19880,7 +19984,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19880
19984
|
})
|
|
19881
19985
|
]
|
|
19882
19986
|
}),
|
|
19883
|
-
/* @__PURE__ */
|
|
19987
|
+
/* @__PURE__ */ jsxs9("g", {
|
|
19884
19988
|
children: [
|
|
19885
19989
|
/* @__PURE__ */ jsx47("g", {
|
|
19886
19990
|
children: /* @__PURE__ */ jsx47("use", {
|
|
@@ -19962,7 +20066,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19962
20066
|
}),
|
|
19963
20067
|
/* @__PURE__ */ jsx47("div", {
|
|
19964
20068
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
19965
|
-
children: /* @__PURE__ */
|
|
20069
|
+
children: /* @__PURE__ */ jsxs9("a", {
|
|
19966
20070
|
target: "_blank",
|
|
19967
20071
|
className: "text-inherit inline-flex flex-row items-center cursor-pointer select-none",
|
|
19968
20072
|
href: `https://github.com/${template.org}/${template.repoName}/generate`,
|
|
@@ -19978,7 +20082,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19978
20082
|
}),
|
|
19979
20083
|
/* @__PURE__ */ jsx47("div", {
|
|
19980
20084
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
19981
|
-
children: /* @__PURE__ */
|
|
20085
|
+
children: /* @__PURE__ */ jsxs9("a", {
|
|
19982
20086
|
target: "_blank",
|
|
19983
20087
|
className: "text-inherit inline-flex flex-row items-center cursor-pointer select-none",
|
|
19984
20088
|
href: `https://github.com/${template.org}/${template.repoName}`,
|
|
@@ -19996,7 +20100,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
19996
20100
|
target: "_blank",
|
|
19997
20101
|
className: "text-inherit inline-flex flex-row items-center cursor-pointer select-none",
|
|
19998
20102
|
href: template.previewURL,
|
|
19999
|
-
children: /* @__PURE__ */
|
|
20103
|
+
children: /* @__PURE__ */ jsxs9("div", {
|
|
20000
20104
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
20001
20105
|
children: [
|
|
20002
20106
|
/* @__PURE__ */ jsx47("div", {
|
|
@@ -20005,7 +20109,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
20005
20109
|
}),
|
|
20006
20110
|
"See Preview",
|
|
20007
20111
|
" ",
|
|
20008
|
-
/* @__PURE__ */
|
|
20112
|
+
/* @__PURE__ */ jsxs9("span", {
|
|
20009
20113
|
className: "whitespace-pre text-[var(--light-text-color)]",
|
|
20010
20114
|
children: [
|
|
20011
20115
|
" ",
|
|
@@ -20019,7 +20123,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
20019
20123
|
target: "_blank",
|
|
20020
20124
|
className: "text-inherit inline-flex flex-row items-center cursor-pointer select-none",
|
|
20021
20125
|
href: `https://stackblitz.com/github/${template.org}/${template.repoName}`,
|
|
20022
|
-
children: /* @__PURE__ */
|
|
20126
|
+
children: /* @__PURE__ */ jsxs9("div", {
|
|
20023
20127
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
20024
20128
|
children: [
|
|
20025
20129
|
/* @__PURE__ */ jsx47("div", {
|
|
@@ -20028,7 +20132,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
20028
20132
|
}),
|
|
20029
20133
|
"Try online",
|
|
20030
20134
|
" ",
|
|
20031
|
-
/* @__PURE__ */
|
|
20135
|
+
/* @__PURE__ */ jsxs9("span", {
|
|
20032
20136
|
className: "whitespace-pre text-[var(--light-text-color)]",
|
|
20033
20137
|
children: [
|
|
20034
20138
|
" ",
|
|
@@ -20038,7 +20142,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
20038
20142
|
]
|
|
20039
20143
|
})
|
|
20040
20144
|
}),
|
|
20041
|
-
template.allowEnableTailwind ? /* @__PURE__ */
|
|
20145
|
+
template.allowEnableTailwind ? /* @__PURE__ */ jsxs9("div", {
|
|
20042
20146
|
className: "flex flex-row items-center pt-1 pb-1 align-middle pr-4",
|
|
20043
20147
|
children: [
|
|
20044
20148
|
/* @__PURE__ */ jsx47("div", {
|
|
@@ -20052,7 +20156,7 @@ var TemplateModalContent = ({ template }) => {
|
|
|
20052
20156
|
})
|
|
20053
20157
|
]
|
|
20054
20158
|
}),
|
|
20055
|
-
/* @__PURE__ */
|
|
20159
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
20056
20160
|
className: cn2("flex flex-row w-full", template.contributedBy !== null && mobileLayout ? "flex-col" : "flex-row"),
|
|
20057
20161
|
children: [
|
|
20058
20162
|
/* @__PURE__ */ jsx47("div", {
|
|
@@ -20064,14 +20168,14 @@ var TemplateModalContent = ({ template }) => {
|
|
|
20064
20168
|
/* @__PURE__ */ jsx47("div", {
|
|
20065
20169
|
style: { width: mobileLayout ? "100%" : RESERVED_FOR_SIDEBAR },
|
|
20066
20170
|
className: cn2(mobileLayout && template.contributedBy === null ? "hidden" : "flex", template.contributedBy !== null && mobileLayout ? "border-t-2 border-black w-full py-4 justify-start px-5" : "pl-5 pr-8 justify-end ", "items-center text-brand dark:text-white gap-2"),
|
|
20067
|
-
children: template.contributedBy ? /* @__PURE__ */
|
|
20171
|
+
children: template.contributedBy ? /* @__PURE__ */ jsxs9("div", {
|
|
20068
20172
|
className: cn2("flex flex-row pt-1 pb-1 pr-4 gap-2 text-text font-brand items-center"),
|
|
20069
20173
|
children: [
|
|
20070
20174
|
/* @__PURE__ */ jsx47("img", {
|
|
20071
20175
|
src: `https://github.com/${template.contributedBy}.png`,
|
|
20072
20176
|
className: "w-6 h-6 rounded-full"
|
|
20073
20177
|
}),
|
|
20074
|
-
/* @__PURE__ */
|
|
20178
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
20075
20179
|
className: "text-text leading-tight",
|
|
20076
20180
|
children: [
|
|
20077
20181
|
"Thanks to",
|