@aurora-is-near/intents-swap-widget 3.18.0 → 3.18.1
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/chains.d.ts +5 -0
- package/dist/chains.js +15 -0
- package/dist/chains.js.map +1 -0
- package/dist/components/WidgetContainer.js +20 -17
- package/dist/components/WidgetContainer.js.map +1 -1
- package/dist/{config-BJ5jppn5.js → config-DJObWR7Z.js} +622 -613
- package/dist/{config-BJ5jppn5.js.map → config-DJObWR7Z.js.map} +1 -1
- package/dist/config.js +1 -1
- package/dist/errors.js +1 -1
- package/dist/ext/alchemy/index.js +1 -1
- package/dist/ext/index.js +1 -1
- package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
- package/dist/features/BalanceRpcLoader/index.js +1 -1
- package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
- package/dist/features/ChainsDropdown/index.js +1 -1
- package/dist/features/DepositMethodSwitcher.js +1 -1
- package/dist/features/ErrorBoundary.js +1 -1
- package/dist/features/ExternalDeposit.js +1 -1
- package/dist/features/SendAddress/index.js +1 -1
- package/dist/features/SendAddress/useNotification.js +1 -1
- package/dist/features/SubmitButton/index.js +1 -1
- package/dist/features/SuccessScreen/index.js +1 -1
- package/dist/features/SwapDirectionSwitcher.js +1 -1
- package/dist/features/SwapQuote/SwapQuote.js +1 -1
- package/dist/features/SwapQuote/index.js +1 -1
- package/dist/features/TokenInput/TokenInput.js +1 -1
- package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
- package/dist/features/TokenInput/TokenInputSource.js +1 -1
- package/dist/features/TokenInput/TokenInputTarget.js +1 -1
- package/dist/features/TokenInput/WalletBalance.js +1 -1
- package/dist/features/TokenInput/hooks/index.js +1 -1
- package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
- package/dist/features/TokenInput/index.js +1 -1
- package/dist/features/TokensList/TokenItem.js +1 -1
- package/dist/features/TokensList/TokensList.js +1 -1
- package/dist/features/TokensList/index.js +1 -1
- package/dist/features/TokensModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/index.js +1 -1
- package/dist/features/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useAllTokens.js +1 -1
- package/dist/hooks/useChains.js +1 -1
- package/dist/hooks/useCompatibilityCheck.js +1 -1
- package/dist/hooks/useDefaultToken.js +1 -1
- package/dist/hooks/useExternalDepositStatus/index.js +1 -1
- package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
- package/dist/hooks/useIntentsBalance.js +1 -1
- package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
- package/dist/hooks/useMakeDepositAddress.js +1 -1
- package/dist/hooks/useMakeIntentsTransfer.js +1 -1
- package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
- package/dist/hooks/useMakeQuote.js +1 -1
- package/dist/hooks/useMakeQuoteTransfer.js +1 -1
- package/dist/hooks/useMakeTransfer.js +1 -1
- package/dist/hooks/useMergedBalance.js +1 -1
- package/dist/hooks/useSwitchChain.js +1 -1
- package/dist/hooks/useTheme.js +1 -1
- package/dist/hooks/useTokenInputPair.js +1 -1
- package/dist/hooks/useTokens.js +1 -1
- package/dist/hooks/useTokensFiltered.js +1 -1
- package/dist/hooks/useTokensIntentsUnique.js +1 -1
- package/dist/icons/index.d.ts +2 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +87 -85
- package/dist/index.js.map +1 -1
- package/dist/machine/effects/index.js +1 -1
- package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
- package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
- package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
- package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
- package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
- package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
- package/dist/machine/effects/useWalletConnEffect.js +1 -1
- package/dist/machine/events/index.js +1 -1
- package/dist/machine/events/tokenSelect.js +1 -1
- package/dist/machine/events/validateInputAndMoveTo.js +1 -1
- package/dist/machine/events/validateInputs.js +1 -1
- package/dist/machine/index.js +1 -1
- package/dist/machine/snap.js +1 -1
- package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
- package/dist/machine/subscriptions/index.js +1 -1
- package/dist/theme/ThemeProvider.js +1 -1
- package/dist/types/theme.d.ts +3 -0
- package/dist/utils/intents/signers/near.js +1 -1
- package/dist/utils/intents/signers/privy.js +1 -1
- package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
- package/package.json +2 -26
- package/src/chains.ts +14 -0
- package/src/components/WidgetContainer.tsx +7 -3
- package/src/icons/index.tsx +5 -1
- package/src/index.ts +1 -0
- package/src/theme/ThemeProvider.tsx +32 -5
- package/src/types/theme.ts +3 -0
- package/src/widgets/WidgetDeposit/WidgetDeposit.test.tsx +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,121 +1,123 @@
|
|
|
1
|
-
import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as
|
|
1
|
+
import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as S, e as l, d as k, u as T, f as g, g as h, h as C, j as B, i as E, k as I, a as M, c as W, l as w, n as D, m as A, b as v } from "./config-DJObWR7Z.js";
|
|
2
2
|
import { DEFAULT_RPCS as b } from "./rpcs.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CHAINS as H } from "./chains.js";
|
|
4
|
+
import { Accordion as N } from "./components/Accordion.js";
|
|
4
5
|
import { Badge as R } from "./components/Badge.js";
|
|
5
6
|
import { Banner as F } from "./components/Banner.js";
|
|
6
|
-
import { BlockingError as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Card as
|
|
9
|
-
import { CopyButton as
|
|
10
|
-
import { DirectionSwitcher as
|
|
11
|
-
import { ErrorMessage as
|
|
12
|
-
import { Hr as
|
|
13
|
-
import { Icon as
|
|
14
|
-
import { Input as
|
|
15
|
-
import { InputAmount as
|
|
16
|
-
import { Notes as
|
|
17
|
-
import { Skeleton as
|
|
18
|
-
import { TinyNumber as
|
|
19
|
-
import { TokenIcon as
|
|
20
|
-
import { StatusWidget as
|
|
21
|
-
import { WidgetContainer as
|
|
22
|
-
import { CloseButton as
|
|
23
|
-
import { ChainsDropdown as
|
|
24
|
-
import { SendAddress as
|
|
25
|
-
import { SuccessScreen as
|
|
26
|
-
import { TokensModal as
|
|
27
|
-
import { SwapDirectionSwitcher as
|
|
28
|
-
import { ExternalDeposit as
|
|
29
|
-
import { DepositMethodSwitcher as
|
|
7
|
+
import { BlockingError as j } from "./components/BlockingError.js";
|
|
8
|
+
import { Button as _ } from "./components/Button.js";
|
|
9
|
+
import { Card as G } from "./components/Card.js";
|
|
10
|
+
import { CopyButton as O } from "./components/CopyButton.js";
|
|
11
|
+
import { DirectionSwitcher as X } from "./components/DirectionSwitcher.js";
|
|
12
|
+
import { ErrorMessage as Z } from "./components/ErrorMessage.js";
|
|
13
|
+
import { Hr as ee } from "./components/Hr.js";
|
|
14
|
+
import { Icon as oe } from "./components/Icon.js";
|
|
15
|
+
import { Input as se } from "./components/Input.js";
|
|
16
|
+
import { InputAmount as ne, MaskedInputAmount as pe } from "./components/InputAmount.js";
|
|
17
|
+
import { Notes as me } from "./components/Notes.js";
|
|
18
|
+
import { Skeleton as ue } from "./components/Skeleton.js";
|
|
19
|
+
import { TinyNumber as de } from "./components/TinyNumber.js";
|
|
20
|
+
import { TokenIcon as Se } from "./components/TokenIcon.js";
|
|
21
|
+
import { StatusWidget as ke } from "./components/StatusWidget.js";
|
|
22
|
+
import { WidgetContainer as ge } from "./components/WidgetContainer.js";
|
|
23
|
+
import { CloseButton as Ce } from "./components/CloseButton.js";
|
|
24
|
+
import { ChainsDropdown as Ee } from "./features/ChainsDropdown/index.js";
|
|
25
|
+
import { SendAddress as Me } from "./features/SendAddress/index.js";
|
|
26
|
+
import { SuccessScreen as we } from "./features/SuccessScreen/index.js";
|
|
27
|
+
import { TokensModal as Ae } from "./features/TokensModal.js";
|
|
28
|
+
import { SwapDirectionSwitcher as ye } from "./features/SwapDirectionSwitcher.js";
|
|
29
|
+
import { ExternalDeposit as Qe } from "./features/ExternalDeposit.js";
|
|
30
|
+
import { DepositMethodSwitcher as Le } from "./features/DepositMethodSwitcher.js";
|
|
30
31
|
import { WalletCompatibilityCheck as Pe } from "./features/WalletCompatibilityCheck/index.js";
|
|
31
32
|
import { useMakeEvmTransfer as qe } from "./hooks/useMakeEvmTransfer.js";
|
|
32
|
-
import { useMakeSolanaTransfer as
|
|
33
|
-
import { useTokenInputPair as
|
|
34
|
-
import { useWalletBalance as
|
|
35
|
-
import { useExternalDepositStatus as
|
|
36
|
-
import { useIsCompatibilityCheckRequired as
|
|
37
|
-
import { useToggleTheme as
|
|
38
|
-
import { useHandleKeyDown as
|
|
39
|
-
import { guardStates as
|
|
40
|
-
import { machine as
|
|
41
|
-
import { fireEvent as
|
|
42
|
-
import { WidgetSwap as
|
|
43
|
-
import { WidgetDeposit as
|
|
44
|
-
import { WidgetWithdraw as
|
|
33
|
+
import { useMakeSolanaTransfer as Ue } from "./hooks/useMakeSolanaTransfer.js";
|
|
34
|
+
import { useTokenInputPair as Ke } from "./hooks/useTokenInputPair.js";
|
|
35
|
+
import { useWalletBalance as ze } from "./hooks/useWalletBalance.js";
|
|
36
|
+
import { useExternalDepositStatus as Je } from "./hooks/useExternalDepositStatus/index.js";
|
|
37
|
+
import { useIsCompatibilityCheckRequired as Ve } from "./hooks/useIsCompatibilityCheckRequired.js";
|
|
38
|
+
import { useToggleTheme as Ye } from "./hooks/useToggleTheme.js";
|
|
39
|
+
import { useHandleKeyDown as $e } from "./hooks/useHandleKeyDown.js";
|
|
40
|
+
import { guardStates as rr } from "./machine/guards/index.js";
|
|
41
|
+
import { machine as tr, moveTo as sr } from "./machine/machine.js";
|
|
42
|
+
import { fireEvent as nr } from "./machine/events/utils/fireEvent.js";
|
|
43
|
+
import { WidgetSwap as fr } from "./widgets/WidgetSwap/index.js";
|
|
44
|
+
import { WidgetDeposit as ir } from "./widgets/WidgetDeposit/index.js";
|
|
45
|
+
import { WidgetWithdraw as xr } from "./widgets/WidgetWithdraw/index.js";
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
N as Accordion,
|
|
47
48
|
R as Badge,
|
|
48
49
|
o as BalanceRpcLoader,
|
|
49
50
|
F as Banner,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
j as BlockingError,
|
|
52
|
+
_ as Button,
|
|
53
|
+
H as CHAINS,
|
|
54
|
+
G as Card,
|
|
55
|
+
Ee as ChainsDropdown,
|
|
56
|
+
Ce as CloseButton,
|
|
57
|
+
O as CopyButton,
|
|
56
58
|
b as DEFAULT_RPCS,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
Le as DepositMethodSwitcher,
|
|
60
|
+
X as DirectionSwitcher,
|
|
61
|
+
Z as ErrorMessage,
|
|
62
|
+
Qe as ExternalDeposit,
|
|
63
|
+
ee as Hr,
|
|
64
|
+
oe as Icon,
|
|
65
|
+
se as Input,
|
|
66
|
+
ne as InputAmount,
|
|
65
67
|
t as MachineError,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
pe as MaskedInputAmount,
|
|
69
|
+
me as Notes,
|
|
68
70
|
s as QuoteError,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
Me as SendAddress,
|
|
72
|
+
ue as Skeleton,
|
|
73
|
+
ke as StatusWidget,
|
|
72
74
|
a as SubmitButton,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
we as SuccessScreen,
|
|
76
|
+
ye as SwapDirectionSwitcher,
|
|
75
77
|
n as SwapQuote,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
de as TinyNumber,
|
|
79
|
+
Se as TokenIcon,
|
|
78
80
|
p as TokenInput,
|
|
79
81
|
f as TokenInputBase,
|
|
80
82
|
m as TokensList,
|
|
81
|
-
|
|
83
|
+
Ae as TokensModal,
|
|
82
84
|
i as TransferError,
|
|
83
85
|
Pe as WalletCompatibilityCheck,
|
|
84
86
|
u as WidgetConfigProvider,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
ge as WidgetContainer,
|
|
88
|
+
ir as WidgetDeposit,
|
|
87
89
|
x as WidgetError,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
fr as WidgetSwap,
|
|
91
|
+
xr as WidgetWithdraw,
|
|
92
|
+
nr as fireEvent,
|
|
93
|
+
rr as guardStates,
|
|
92
94
|
d as isWidgetError,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
tr as machine,
|
|
96
|
+
sr as moveTo,
|
|
95
97
|
c as registerStoreEvents,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
S as useAlchemyBalanceIntegration,
|
|
99
|
+
l as useAllTokens,
|
|
98
100
|
k as useChains,
|
|
99
101
|
T as useComputedSnapshot,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
Je as useExternalDepositStatus,
|
|
103
|
+
$e as useHandleKeyDown,
|
|
102
104
|
g as useIntentsBalance,
|
|
103
|
-
|
|
105
|
+
Ve as useIsCompatibilityCheckRequired,
|
|
104
106
|
qe as useMakeEvmTransfer,
|
|
105
107
|
h as useMakeIntentsTransfer,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
C as useMakeQuote,
|
|
109
|
+
B as useMakeQuoteTransfer,
|
|
110
|
+
Ue as useMakeSolanaTransfer,
|
|
109
111
|
E as useMakeTransfer,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
I as useMergedBalance,
|
|
113
|
+
M as useSafeSnapshot,
|
|
112
114
|
W as useStoreSideEffects,
|
|
113
115
|
w as useSwitchChain,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
Ye as useToggleTheme,
|
|
117
|
+
Ke as useTokenInputPair,
|
|
116
118
|
D as useTokens,
|
|
117
119
|
A as useTokensFiltered,
|
|
118
120
|
v as useUnsafeSnapshot,
|
|
119
|
-
|
|
121
|
+
ze as useWalletBalance
|
|
120
122
|
};
|
|
121
123
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "../../logger.js";
|
|
3
3
|
import "../guards/checks/isDryQuote.js";
|
|
4
|
-
import { P as a } from "../../config-
|
|
4
|
+
import { P as a } from "../../config-DJObWR7Z.js";
|
|
5
5
|
import "../guards/index.js";
|
|
6
6
|
import "../machine.js";
|
|
7
7
|
import "../events/utils/fireEvent.js";
|
|
@@ -2,7 +2,7 @@ import "react";
|
|
|
2
2
|
import "../../utils/solana/isSolanaAddress.js";
|
|
3
3
|
import "../../utils/evm/isEvmAddress.js";
|
|
4
4
|
import "../../utils/near/isNearAddress.js";
|
|
5
|
-
import { R as l } from "../../config-
|
|
5
|
+
import { R as l } from "../../config-DJObWR7Z.js";
|
|
6
6
|
import "../../utils/tokens/getMainTokenByChain.js";
|
|
7
7
|
import "../../utils/tokens/getDefaultIntentsToken.js";
|
|
8
8
|
import "../../utils/tokens/getTokenWithHighBalance.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "../../hooks/useWalletAddressForToken.js";
|
|
3
|
-
import { I as f } from "../../config-
|
|
3
|
+
import { I as f } from "../../config-DJObWR7Z.js";
|
|
4
4
|
import "../guards/index.js";
|
|
5
5
|
import "../machine.js";
|
|
6
6
|
import "../events/utils/fireEvent.js";
|
|
@@ -3,7 +3,7 @@ import "./tokenSelectRotate.js";
|
|
|
3
3
|
import "./errorSet.js";
|
|
4
4
|
import "./quoteSet.js";
|
|
5
5
|
import "./addressSet.js";
|
|
6
|
-
import { _ as b } from "../../config-
|
|
6
|
+
import { _ as b } from "../../config-DJObWR7Z.js";
|
|
7
7
|
import "./tokenSetAmount.js";
|
|
8
8
|
import "./quoteSetStatus.js";
|
|
9
9
|
import "./depositTypeSet.js";
|
|
@@ -3,7 +3,7 @@ import "../../utils/near/checkNearAccountExists.js";
|
|
|
3
3
|
import "../../utils/checkers/isNotEmptyAmount.js";
|
|
4
4
|
import "../../utils/checkers/isValidBigint.js";
|
|
5
5
|
import "../../utils/near/isNearAddress.js";
|
|
6
|
-
import { K as I, L as d, N as u } from "../../config-
|
|
6
|
+
import { K as I, L as d, N as u } from "../../config-DJObWR7Z.js";
|
|
7
7
|
import "../guards/index.js";
|
|
8
8
|
import "../machine.js";
|
|
9
9
|
import "../guards/checks/isBalanceSufficient.js";
|
package/dist/machine/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as o, u as t, a as r, c as a, b as f } from "../config-
|
|
1
|
+
import { r as o, u as t, a as r, c as a, b as f } from "../config-DJObWR7Z.js";
|
|
2
2
|
import { guardStates as S } from "./guards/index.js";
|
|
3
3
|
import { machine as n, moveTo as u } from "./machine.js";
|
|
4
4
|
import { fireEvent as i } from "./events/utils/fireEvent.js";
|
package/dist/machine/snap.js
CHANGED
|
@@ -2,7 +2,7 @@ import "valtio";
|
|
|
2
2
|
import "derive-valtio";
|
|
3
3
|
import "./computed/getIsNativeNearDeposit.js";
|
|
4
4
|
import "./computed/getIsDirectTokenOnNearDeposit.js";
|
|
5
|
-
import { u as h, a as b, b as d } from "../config-
|
|
5
|
+
import { u as h, a as b, b as d } from "../config-DJObWR7Z.js";
|
|
6
6
|
import "./machine.js";
|
|
7
7
|
import "./guards/index.js";
|
|
8
8
|
import "./computed/getUsdTradeDelta.js";
|
|
@@ -5,7 +5,7 @@ import "./checkers/isOnlyErrorChanged.js";
|
|
|
5
5
|
import "./checkers/isValidInitialState.js";
|
|
6
6
|
import "./checkers/isWalletDisconnected.js";
|
|
7
7
|
import "./checkers/isSendAddressForbidden.js";
|
|
8
|
-
import { X as g, Y as u } from "../../config-
|
|
8
|
+
import { X as g, Y as u } from "../../config-DJObWR7Z.js";
|
|
9
9
|
import "./checkers/isAmountChangedFromQuote.js";
|
|
10
10
|
import "ethers";
|
|
11
11
|
import "../machine.js";
|
package/dist/types/theme.d.ts
CHANGED
|
@@ -5,5 +5,8 @@ export type Theme = {
|
|
|
5
5
|
backgroundColor?: HexColor;
|
|
6
6
|
primaryColor?: HexColor;
|
|
7
7
|
surfaceColor?: HexColor;
|
|
8
|
+
successColor?: HexColor;
|
|
9
|
+
warningColor?: HexColor;
|
|
10
|
+
errorColor?: HexColor;
|
|
8
11
|
};
|
|
9
12
|
export type ColorPalette = Record<50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950, string>;
|
|
@@ -3,7 +3,7 @@ import { useState as y, useEffect as l, useCallback as B } from "react";
|
|
|
3
3
|
import { useTokenModal as R } from "../../hooks/useTokenModal.js";
|
|
4
4
|
import { useTypedTranslation as A } from "../../localisation.js";
|
|
5
5
|
import { WidgetDepositSkeleton as b } from "./WidgetDepositSkeleton.js";
|
|
6
|
-
import { b as F, u as q, y as j, n as N, c as O, p as Q, o as U, S as K } from "../../config-
|
|
6
|
+
import { b as F, u as q, y as j, n as N, c as O, p as Q, o as U, S as K } from "../../config-DJObWR7Z.js";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
8
|
import "@headlessui/react";
|
|
9
9
|
import "framer-motion";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import a from "clsx";
|
|
3
3
|
import { SkeletonBox as s } from "../../components/SkeletonBox.js";
|
|
4
|
-
import { y as i } from "../../config-
|
|
4
|
+
import { y as i } from "../../config-DJObWR7Z.js";
|
|
5
5
|
const p = () => {
|
|
6
6
|
const { hideTokenInputHeadings: l } = i();
|
|
7
7
|
return /* @__PURE__ */ o("div", { className: "w-full gap-sw-xl relative flex flex-col", children: [
|
|
@@ -3,7 +3,7 @@ import { useState as b, useEffect as y } from "react";
|
|
|
3
3
|
import { useTokenModal as R } from "../../hooks/useTokenModal.js";
|
|
4
4
|
import { WidgetSwapSkeleton as S } from "./WidgetSwapSkeleton.js";
|
|
5
5
|
import { useTypedTranslation as D } from "../../localisation.js";
|
|
6
|
-
import { b as N, u as O, y as Q, n as j, c as q, p as w, o as F, S as U } from "../../config-
|
|
6
|
+
import { b as N, u as O, y as Q, n as j, c as q, p as w, o as F, S as U } from "../../config-DJObWR7Z.js";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
8
|
import "@headlessui/react";
|
|
9
9
|
import "framer-motion";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import o from "clsx";
|
|
3
3
|
import { SkeletonBox as s } from "../../components/SkeletonBox.js";
|
|
4
|
-
import { y as i } from "../../config-
|
|
4
|
+
import { y as i } from "../../config-DJObWR7Z.js";
|
|
5
5
|
const m = () => {
|
|
6
6
|
const { hideTokenInputHeadings: e } = i();
|
|
7
7
|
return /* @__PURE__ */ a("div", { className: "w-full gap-sw-lg relative flex flex-col", children: [
|
|
@@ -3,7 +3,7 @@ import { useState as w, useEffect as b } from "react";
|
|
|
3
3
|
import { useTokenModal as B } from "../../hooks/useTokenModal.js";
|
|
4
4
|
import { WidgetWithdrawSkeleton as y } from "./WidgetWithdrawSkeleton.js";
|
|
5
5
|
import { useTypedTranslation as D } from "../../localisation.js";
|
|
6
|
-
import { b as N, u as O, y as Q, n as j, c as q, p as S, o as F, S as U } from "../../config-
|
|
6
|
+
import { b as N, u as O, y as Q, n as j, c as q, p as S, o as F, S as U } from "../../config-DJObWR7Z.js";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
8
|
import "@headlessui/react";
|
|
9
9
|
import "framer-motion";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import o from "clsx";
|
|
3
3
|
import { SkeletonBox as l } from "../../components/SkeletonBox.js";
|
|
4
|
-
import { y as x } from "../../config-
|
|
4
|
+
import { y as x } from "../../config-DJObWR7Z.js";
|
|
5
5
|
const p = () => {
|
|
6
6
|
const { hideTokenInputHeadings: s } = x();
|
|
7
7
|
return /* @__PURE__ */ a("div", { className: "w-full gap-sw-xl relative flex flex-col", children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurora-is-near/intents-swap-widget",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.1",
|
|
4
4
|
"description": "Provides components and hooks to build your own Intents swap widget",
|
|
5
5
|
"author": "Maksim Vashchuk",
|
|
6
6
|
"license": "MIT",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"near-api-js": "^6.2.5",
|
|
87
87
|
"proxy-memoize": "^3.0.1",
|
|
88
88
|
"qrcode.react": "^4.2.0",
|
|
89
|
-
"qs": "^6.14.
|
|
89
|
+
"qs": "^6.14.1",
|
|
90
90
|
"react-error-boundary": "^6.0.0",
|
|
91
91
|
"react-helmet-async": "^2.0.5",
|
|
92
92
|
"react-i18next": "^15.7.3",
|
|
@@ -100,29 +100,5 @@
|
|
|
100
100
|
"viem": "^2.38.3",
|
|
101
101
|
"virtua": "^0.41.5",
|
|
102
102
|
"zod": "^3.25.51"
|
|
103
|
-
},
|
|
104
|
-
"devDependencies": {
|
|
105
|
-
"@jest/globals": "^30.2.0",
|
|
106
|
-
"@swc/core": "^1.15.2",
|
|
107
|
-
"@swc/jest": "^0.2.39",
|
|
108
|
-
"@testing-library/dom": "^10.4.1",
|
|
109
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
110
|
-
"@testing-library/react": "^16.3.0",
|
|
111
|
-
"@testing-library/user-event": "^14.6.1",
|
|
112
|
-
"@types/browser-or-node": "^1.3.2",
|
|
113
|
-
"@types/jest": "^30.0.0",
|
|
114
|
-
"@types/jest-image-snapshot": "^6.4.0",
|
|
115
|
-
"@types/puppeteer": "^7.0.4",
|
|
116
|
-
"glob": "^10.5.0",
|
|
117
|
-
"is-ci": "^4.1.0",
|
|
118
|
-
"jest-environment-jsdom": "^30.2.0",
|
|
119
|
-
"jest-image-snapshot": "^6.5.1",
|
|
120
|
-
"jest-puppeteer": "^11.0.0",
|
|
121
|
-
"jest-react-hooks-shallow": "^1.5.1",
|
|
122
|
-
"jest-transform-stub": "^2.0.0",
|
|
123
|
-
"jest-transformer-svg": "^2.1.0",
|
|
124
|
-
"puppeteer": "^24.31.0",
|
|
125
|
-
"ts-jest": "^29.4.5",
|
|
126
|
-
"vite-plugin-static-copy": "^3.1.4"
|
|
127
103
|
}
|
|
128
104
|
}
|
package/src/chains.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cloneElement } from 'react';
|
|
2
|
+
import { CHAINS_LIST } from './constants';
|
|
3
|
+
import { CHAIN_ICONS } from './icons';
|
|
4
|
+
|
|
5
|
+
export const CHAINS = Object.values(CHAINS_LIST).map((chain) => {
|
|
6
|
+
return {
|
|
7
|
+
id: chain.id,
|
|
8
|
+
label: chain.label,
|
|
9
|
+
icon: cloneElement(CHAIN_ICONS[chain.id], {
|
|
10
|
+
width: '100%',
|
|
11
|
+
height: '100%',
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
});
|
|
@@ -2,7 +2,7 @@ import { PropsWithChildren, ReactElement } from 'react';
|
|
|
2
2
|
import { cn } from '../utils';
|
|
3
3
|
import { useTheme } from '../hooks/useTheme';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const DEFAULT_FULL_PAGE_BACKGROUND_COLOR = '#24262d';
|
|
6
6
|
|
|
7
7
|
export type WidgetContainerProps = PropsWithChildren<{
|
|
8
8
|
HeaderComponent?: ReactElement | false | null;
|
|
@@ -22,7 +22,10 @@ export const WidgetContainer = ({
|
|
|
22
22
|
|
|
23
23
|
const jsx = (
|
|
24
24
|
<div
|
|
25
|
-
style={{
|
|
25
|
+
style={{
|
|
26
|
+
transform: isFullPage ? 'translateY(15dvh)' : 'none',
|
|
27
|
+
backgroundColor: theme?.backgroundColor,
|
|
28
|
+
}}
|
|
26
29
|
className={cn(
|
|
27
30
|
'w-full h-fit flex flex-col justify-center items-center relative',
|
|
28
31
|
className,
|
|
@@ -53,7 +56,8 @@ export const WidgetContainer = ({
|
|
|
53
56
|
className,
|
|
54
57
|
)}
|
|
55
58
|
style={{
|
|
56
|
-
backgroundColor:
|
|
59
|
+
backgroundColor:
|
|
60
|
+
theme?.backgroundColor ?? DEFAULT_FULL_PAGE_BACKGROUND_COLOR,
|
|
57
61
|
}}>
|
|
58
62
|
<div className="w-full h-fit max-w-[456px] min-w-[270px]">{jsx}</div>
|
|
59
63
|
</div>
|
package/src/icons/index.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/extensions */
|
|
2
|
+
import { ReactElement, SVGAttributes } from 'react';
|
|
2
3
|
import AbgIcon from './abg.svg';
|
|
3
4
|
import ArbIcon from './arb.svg';
|
|
4
5
|
import AsterIcon from './aster.svg';
|
|
@@ -44,7 +45,10 @@ import type { Chains } from '@/types/chain';
|
|
|
44
45
|
|
|
45
46
|
export const UNKNOWN_ICON: React.ReactElement = <UnknownIcon />;
|
|
46
47
|
|
|
47
|
-
export const CHAIN_ICONS: Record<
|
|
48
|
+
export const CHAIN_ICONS: Record<
|
|
49
|
+
Chains,
|
|
50
|
+
ReactElement<SVGAttributes<SVGElement>>
|
|
51
|
+
> = {
|
|
48
52
|
arb: <ArbIcon />,
|
|
49
53
|
avax: <AvaxIcon />,
|
|
50
54
|
base: <BaseIcon />,
|
package/src/index.ts
CHANGED