@aurora-is-near/intents-swap-widget 3.17.3 → 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.
Files changed (102) hide show
  1. package/dist/chains.d.ts +5 -0
  2. package/dist/chains.js +15 -0
  3. package/dist/chains.js.map +1 -0
  4. package/dist/components/WidgetContainer.js +20 -17
  5. package/dist/components/WidgetContainer.js.map +1 -1
  6. package/dist/{config-VpsP2eLV.js → config-DJObWR7Z.js} +622 -613
  7. package/dist/{config-VpsP2eLV.js.map → config-DJObWR7Z.js.map} +1 -1
  8. package/dist/config.js +1 -1
  9. package/dist/errors.js +1 -1
  10. package/dist/ext/alchemy/index.js +1 -1
  11. package/dist/ext/index.js +1 -1
  12. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  13. package/dist/features/BalanceRpcLoader/index.js +1 -1
  14. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  15. package/dist/features/ChainsDropdown/index.js +1 -1
  16. package/dist/features/DepositMethodSwitcher.js +1 -1
  17. package/dist/features/ErrorBoundary.js +1 -1
  18. package/dist/features/ExternalDeposit.js +1 -1
  19. package/dist/features/SendAddress/index.js +1 -1
  20. package/dist/features/SendAddress/useNotification.js +1 -1
  21. package/dist/features/SubmitButton/index.js +1 -1
  22. package/dist/features/SuccessScreen/index.js +1 -1
  23. package/dist/features/SwapDirectionSwitcher.js +1 -1
  24. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  25. package/dist/features/SwapQuote/index.js +1 -1
  26. package/dist/features/TokenInput/TokenInput.js +1 -1
  27. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  28. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  29. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  30. package/dist/features/TokenInput/WalletBalance.js +1 -1
  31. package/dist/features/TokenInput/hooks/index.js +1 -1
  32. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  33. package/dist/features/TokenInput/index.js +1 -1
  34. package/dist/features/TokensList/TokenItem.js +1 -1
  35. package/dist/features/TokensList/TokensList.js +1 -1
  36. package/dist/features/TokensList/index.js +1 -1
  37. package/dist/features/TokensModal.js +1 -1
  38. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
  39. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  40. package/dist/features/index.js +1 -1
  41. package/dist/hooks/index.js +1 -1
  42. package/dist/hooks/useAllTokens.js +1 -1
  43. package/dist/hooks/useChains.js +1 -1
  44. package/dist/hooks/useCompatibilityCheck.js +1 -1
  45. package/dist/hooks/useDefaultToken.js +1 -1
  46. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  47. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  48. package/dist/hooks/useIntentsBalance.js +1 -1
  49. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  50. package/dist/hooks/useMakeDepositAddress.js +1 -1
  51. package/dist/hooks/useMakeIntentsTransfer.js +1 -1
  52. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  53. package/dist/hooks/useMakeQuote.js +1 -1
  54. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  55. package/dist/hooks/useMakeTransfer.js +1 -1
  56. package/dist/hooks/useMergedBalance.js +1 -1
  57. package/dist/hooks/useSwitchChain.js +1 -1
  58. package/dist/hooks/useTheme.js +1 -1
  59. package/dist/hooks/useTokenInputPair.js +1 -1
  60. package/dist/hooks/useTokens.js +1 -1
  61. package/dist/hooks/useTokensFiltered.js +1 -1
  62. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  63. package/dist/icons/index.d.ts +2 -1
  64. package/dist/icons/index.js.map +1 -1
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.js +87 -85
  67. package/dist/index.js.map +1 -1
  68. package/dist/machine/effects/index.js +1 -1
  69. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  70. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  71. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  72. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  73. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  74. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  75. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  76. package/dist/machine/events/index.js +1 -1
  77. package/dist/machine/events/tokenSelect.js +1 -1
  78. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  79. package/dist/machine/events/validateInputs.js +1 -1
  80. package/dist/machine/index.js +1 -1
  81. package/dist/machine/snap.js +1 -1
  82. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  83. package/dist/machine/subscriptions/index.js +1 -1
  84. package/dist/theme/ThemeProvider.js +1 -1
  85. package/dist/types/theme.d.ts +3 -0
  86. package/dist/utils/intents/signers/near.js +1 -1
  87. package/dist/utils/intents/signers/privy.js +1 -1
  88. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  89. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
  90. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  91. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
  92. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  93. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
  94. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  95. package/package.json +2 -26
  96. package/src/chains.ts +14 -0
  97. package/src/components/WidgetContainer.tsx +7 -3
  98. package/src/icons/index.tsx +5 -1
  99. package/src/index.ts +1 -0
  100. package/src/theme/ThemeProvider.tsx +32 -5
  101. package/src/types/theme.ts +3 -0
  102. package/src/widgets/WidgetDeposit/WidgetDeposit.test.tsx +1 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { WidgetConfigProvider } from './config';
2
2
  export { DEFAULT_RPCS } from './rpcs';
3
+ export { CHAINS } from './chains';
3
4
  export * from './components';
4
5
  export * from './features';
5
6
  export * from './hooks';
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 l, e as S, d as k, u as T, f as g, g as h, h as B, j as C, i as E, k as M, a as I, c as W, l as w, n as D, m as A, b as v } from "./config-VpsP2eLV.js";
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 { Accordion as L } from "./components/Accordion.js";
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 N } from "./components/BlockingError.js";
7
- import { Button as j } from "./components/Button.js";
8
- import { Card as _ } from "./components/Card.js";
9
- import { CopyButton as G } from "./components/CopyButton.js";
10
- import { DirectionSwitcher as O } from "./components/DirectionSwitcher.js";
11
- import { ErrorMessage as X } from "./components/ErrorMessage.js";
12
- import { Hr as Z } from "./components/Hr.js";
13
- import { Icon as ee } from "./components/Icon.js";
14
- import { Input as oe } from "./components/Input.js";
15
- import { InputAmount as se, MaskedInputAmount as ae } from "./components/InputAmount.js";
16
- import { Notes as pe } from "./components/Notes.js";
17
- import { Skeleton as me } from "./components/Skeleton.js";
18
- import { TinyNumber as ue } from "./components/TinyNumber.js";
19
- import { TokenIcon as de } from "./components/TokenIcon.js";
20
- import { StatusWidget as le } from "./components/StatusWidget.js";
21
- import { WidgetContainer as ke } from "./components/WidgetContainer.js";
22
- import { CloseButton as ge } from "./components/CloseButton.js";
23
- import { ChainsDropdown as Be } from "./features/ChainsDropdown/index.js";
24
- import { SendAddress as Ee } from "./features/SendAddress/index.js";
25
- import { SuccessScreen as Ie } from "./features/SuccessScreen/index.js";
26
- import { TokensModal as we } from "./features/TokensModal.js";
27
- import { SwapDirectionSwitcher as Ae } from "./features/SwapDirectionSwitcher.js";
28
- import { ExternalDeposit as ye } from "./features/ExternalDeposit.js";
29
- import { DepositMethodSwitcher as Qe } from "./features/DepositMethodSwitcher.js";
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 He } from "./hooks/useMakeSolanaTransfer.js";
33
- import { useTokenInputPair as Ue } from "./hooks/useTokenInputPair.js";
34
- import { useWalletBalance as Ke } from "./hooks/useWalletBalance.js";
35
- import { useExternalDepositStatus as ze } from "./hooks/useExternalDepositStatus/index.js";
36
- import { useIsCompatibilityCheckRequired as Je } from "./hooks/useIsCompatibilityCheckRequired.js";
37
- import { useToggleTheme as Ve } from "./hooks/useToggleTheme.js";
38
- import { useHandleKeyDown as Ye } from "./hooks/useHandleKeyDown.js";
39
- import { guardStates as $e } from "./machine/guards/index.js";
40
- import { machine as rr, moveTo as or } from "./machine/machine.js";
41
- import { fireEvent as sr } from "./machine/events/utils/fireEvent.js";
42
- import { WidgetSwap as nr } from "./widgets/WidgetSwap/index.js";
43
- import { WidgetDeposit as fr } from "./widgets/WidgetDeposit/index.js";
44
- import { WidgetWithdraw as ir } from "./widgets/WidgetWithdraw/index.js";
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
- L as Accordion,
47
+ N as Accordion,
47
48
  R as Badge,
48
49
  o as BalanceRpcLoader,
49
50
  F as Banner,
50
- N as BlockingError,
51
- j as Button,
52
- _ as Card,
53
- Be as ChainsDropdown,
54
- ge as CloseButton,
55
- G as CopyButton,
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
- Qe as DepositMethodSwitcher,
58
- O as DirectionSwitcher,
59
- X as ErrorMessage,
60
- ye as ExternalDeposit,
61
- Z as Hr,
62
- ee as Icon,
63
- oe as Input,
64
- se as InputAmount,
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
- ae as MaskedInputAmount,
67
- pe as Notes,
68
+ pe as MaskedInputAmount,
69
+ me as Notes,
68
70
  s as QuoteError,
69
- Ee as SendAddress,
70
- me as Skeleton,
71
- le as StatusWidget,
71
+ Me as SendAddress,
72
+ ue as Skeleton,
73
+ ke as StatusWidget,
72
74
  a as SubmitButton,
73
- Ie as SuccessScreen,
74
- Ae as SwapDirectionSwitcher,
75
+ we as SuccessScreen,
76
+ ye as SwapDirectionSwitcher,
75
77
  n as SwapQuote,
76
- ue as TinyNumber,
77
- de as TokenIcon,
78
+ de as TinyNumber,
79
+ Se as TokenIcon,
78
80
  p as TokenInput,
79
81
  f as TokenInputBase,
80
82
  m as TokensList,
81
- we as TokensModal,
83
+ Ae as TokensModal,
82
84
  i as TransferError,
83
85
  Pe as WalletCompatibilityCheck,
84
86
  u as WidgetConfigProvider,
85
- ke as WidgetContainer,
86
- fr as WidgetDeposit,
87
+ ge as WidgetContainer,
88
+ ir as WidgetDeposit,
87
89
  x as WidgetError,
88
- nr as WidgetSwap,
89
- ir as WidgetWithdraw,
90
- sr as fireEvent,
91
- $e as guardStates,
90
+ fr as WidgetSwap,
91
+ xr as WidgetWithdraw,
92
+ nr as fireEvent,
93
+ rr as guardStates,
92
94
  d as isWidgetError,
93
- rr as machine,
94
- or as moveTo,
95
+ tr as machine,
96
+ sr as moveTo,
95
97
  c as registerStoreEvents,
96
- l as useAlchemyBalanceIntegration,
97
- S as useAllTokens,
98
+ S as useAlchemyBalanceIntegration,
99
+ l as useAllTokens,
98
100
  k as useChains,
99
101
  T as useComputedSnapshot,
100
- ze as useExternalDepositStatus,
101
- Ye as useHandleKeyDown,
102
+ Je as useExternalDepositStatus,
103
+ $e as useHandleKeyDown,
102
104
  g as useIntentsBalance,
103
- Je as useIsCompatibilityCheckRequired,
105
+ Ve as useIsCompatibilityCheckRequired,
104
106
  qe as useMakeEvmTransfer,
105
107
  h as useMakeIntentsTransfer,
106
- B as useMakeQuote,
107
- C as useMakeQuoteTransfer,
108
- He as useMakeSolanaTransfer,
108
+ C as useMakeQuote,
109
+ B as useMakeQuoteTransfer,
110
+ Ue as useMakeSolanaTransfer,
109
111
  E as useMakeTransfer,
110
- M as useMergedBalance,
111
- I as useSafeSnapshot,
112
+ I as useMergedBalance,
113
+ M as useSafeSnapshot,
112
114
  W as useStoreSideEffects,
113
115
  w as useSwitchChain,
114
- Ve as useToggleTheme,
115
- Ue as useTokenInputPair,
116
+ Ye as useToggleTheme,
117
+ Ke as useTokenInputPair,
116
118
  D as useTokens,
117
119
  A as useTokensFiltered,
118
120
  v as useUnsafeSnapshot,
119
- Ke as useWalletBalance
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,6 +1,6 @@
1
1
  import "lodash.once";
2
2
  import "react";
3
- import { r as i, c as m } from "../../config-VpsP2eLV.js";
3
+ import { r as i, c as m } from "../../config-DJObWR7Z.js";
4
4
  import "../../logger.js";
5
5
  export {
6
6
  i as registerStoreEvents,
@@ -1,4 +1,4 @@
1
- import { U as c } from "../../config-VpsP2eLV.js";
1
+ import { U as c } from "../../config-DJObWR7Z.js";
2
2
  export {
3
3
  c as useAlchemyBalanceEffect
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "@tanstack/react-query";
3
- import { F as a } from "../../config-VpsP2eLV.js";
3
+ import { F as a } from "../../config-DJObWR7Z.js";
4
4
  import "../guards/index.js";
5
5
  import "../machine.js";
6
6
  export {
@@ -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-VpsP2eLV.js";
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-VpsP2eLV.js";
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,5 +1,5 @@
1
1
  import "react";
2
- import { G as a } from "../../config-VpsP2eLV.js";
2
+ import { G as a } from "../../config-DJObWR7Z.js";
3
3
  import "../../utils/intents/getTokenBalanceKey.js";
4
4
  import "ethers";
5
5
  import "../machine.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { H as i } from "../../config-VpsP2eLV.js";
2
+ import { H as i } from "../../config-DJObWR7Z.js";
3
3
  import "ethers";
4
4
  import "../machine.js";
5
5
  import "../events/utils/fireEvent.js";
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../../hooks/useWalletAddressForToken.js";
3
- import { I as f } from "../../config-VpsP2eLV.js";
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-VpsP2eLV.js";
6
+ import { _ as b } from "../../config-DJObWR7Z.js";
7
7
  import "./tokenSetAmount.js";
8
8
  import "./quoteSetStatus.js";
9
9
  import "./depositTypeSet.js";
@@ -1,6 +1,6 @@
1
1
  import "valtio";
2
2
  import "./tokenSelectRotate.js";
3
- import { Z as p } from "../../config-VpsP2eLV.js";
3
+ import { Z as p } from "../../config-DJObWR7Z.js";
4
4
  import "../../utils/notReachable.js";
5
5
  export {
6
6
  p as tokenSelect
@@ -1,4 +1,4 @@
1
- import { O as m } from "../../config-VpsP2eLV.js";
1
+ import { O as m } from "../../config-DJObWR7Z.js";
2
2
  import "ethers";
3
3
  import "../machine.js";
4
4
  import "../guards/checks/isDryQuote.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-VpsP2eLV.js";
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";
@@ -1,4 +1,4 @@
1
- import { r as o, u as t, a as r, c as a, b as f } from "../config-VpsP2eLV.js";
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";
@@ -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-VpsP2eLV.js";
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";
@@ -1,5 +1,5 @@
1
1
  import "valtio";
2
- import { V as o } from "../../../config-VpsP2eLV.js";
2
+ import { V as o } from "../../../config-DJObWR7Z.js";
3
3
  export {
4
4
  o as isSendAddressAsConnected
5
5
  };
@@ -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-VpsP2eLV.js";
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";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "./createColorPalette.js";
4
- import { C as i, ad as p } from "../config-VpsP2eLV.js";
4
+ import { C as i, ad as p } from "../config-DJObWR7Z.js";
5
5
  export {
6
6
  i as ThemeContext,
7
7
  p as ThemeProvider
@@ -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>;
@@ -1,6 +1,6 @@
1
1
  import "../../../index-DEq3oXQF.js";
2
2
  import "@defuse-protocol/intents-sdk";
3
- import { a2 as o } from "../../../config-VpsP2eLV.js";
3
+ import { a2 as o } from "../../../config-DJObWR7Z.js";
4
4
  export {
5
5
  o as createNearWalletSigner
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import "@defuse-protocol/internal-utils";
2
- import { a1 as i } from "../../../config-VpsP2eLV.js";
2
+ import { a1 as i } from "../../../config-DJObWR7Z.js";
3
3
  export {
4
4
  i as IntentSignerPrivy
5
5
  };
@@ -2,7 +2,7 @@ import "../../index-DEq3oXQF.js";
2
2
  import "zod";
3
3
  import "./decodeQueryResult.js";
4
4
  import "./rpc.js";
5
- import { $ as m } from "../../config-VpsP2eLV.js";
5
+ import { $ as m } from "../../config-DJObWR7Z.js";
6
6
  export {
7
7
  m as getNearNep141StorageBalance
8
8
  };
@@ -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-VpsP2eLV.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-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-VpsP2eLV.js";
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-VpsP2eLV.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-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-VpsP2eLV.js";
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-VpsP2eLV.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-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-VpsP2eLV.js";
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.17.3",
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.0",
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 DEFAULT_BACKGROUND_COLOR = '#24262d';
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={{ transform: isFullPage ? 'translateY(15dvh)' : 'none' }}
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: theme?.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,
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>
@@ -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<Chains, React.ReactElement> = {
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
@@ -2,6 +2,7 @@ import './tailwind.css'; // import so CSS is emitted in dist
2
2
 
3
3
  export { WidgetConfigProvider } from './config';
4
4
  export { DEFAULT_RPCS } from './rpcs';
5
+ export { CHAINS } from './chains';
5
6
 
6
7
  export * from './components';
7
8
  export * from './features';