@aurora-is-near/intents-swap-widget 3.18.3 → 3.19.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/components/AllNetworksIcon.js +11 -0
- package/dist/components/AllNetworksIcon.js.map +1 -0
- package/dist/components/ChainShortcut.d.ts +15 -0
- package/dist/components/ChainShortcut.js +57 -0
- package/dist/components/ChainShortcut.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +21 -17
- package/dist/components/index.js.map +1 -1
- package/dist/{config-BMvXuF1-.js → config-CpXS2LPZ.js} +914 -899
- package/dist/config-CpXS2LPZ.js.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +2 -2
- 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/ChainItem.d.ts +1 -0
- package/dist/features/ChainsDropdown/ChainItem.js +23 -14
- package/dist/features/ChainsDropdown/ChainItem.js.map +1 -1
- package/dist/features/ChainsDropdown/index.js +61 -94
- package/dist/features/ChainsDropdown/index.js.map +1 -1
- package/dist/features/ChainsSelector/index.d.ts +15 -0
- package/dist/features/ChainsSelector/index.js +108 -0
- package/dist/features/ChainsSelector/index.js.map +1 -0
- package/dist/features/DepositMethodSwitcher.js +1 -1
- package/dist/features/ErrorBoundary.js +1 -1
- package/dist/features/ExternalDeposit.js +4 -3
- package/dist/features/ExternalDeposit.js.map +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/SuccessScreen/useSummaryItemsCount.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 +62 -64
- package/dist/features/TokensModal.js.map +1 -1
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +5 -4
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js.map +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.d.ts +3 -1
- package/dist/hooks/useTokensFiltered.js +1 -1
- package/dist/hooks/useTokensIntentsUnique.js +1 -1
- package/dist/index.js +74 -70
- 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/styles.css +1 -1
- package/dist/theme/ThemeProvider.js +1 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/localisation.d.ts +1 -1
- 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/utils/tokens/sort.d.ts +2 -1
- package/dist/utils/tokens/sort.js +55 -24
- package/dist/utils/tokens/sort.js.map +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +2 -2
- package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js +2 -2
- package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +2 -2
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
- package/package.json +1 -1
- package/src/components/AllNetworksIcon.tsx +8 -0
- package/src/components/ChainShortcut.tsx +67 -0
- package/src/components/index.ts +2 -0
- package/src/config.tsx +13 -0
- package/src/features/ChainsDropdown/ChainItem.tsx +17 -4
- package/src/features/ChainsDropdown/index.tsx +10 -41
- package/src/features/ChainsSelector/index.tsx +113 -0
- package/src/features/TokensList/TokensList.tsx +2 -1
- package/src/features/TokensModal.tsx +29 -29
- package/src/hooks/useMakeIntentsTransfer.ts +1 -1
- package/src/hooks/useTokensFiltered.ts +4 -0
- package/src/types/config.ts +8 -0
- package/src/types/localisation.ts +1 -0
- package/src/utils/tokens/sort.ts +107 -20
- package/dist/config-BMvXuF1-.js.map +0 -1
- package/dist/features/ChainsDropdown/AllNetworksIcon.js +0 -7
- package/dist/features/ChainsDropdown/AllNetworksIcon.js.map +0 -1
- package/src/features/ChainsDropdown/AllNetworksIcon.tsx +0 -7
- /package/dist/{features/ChainsDropdown → components}/AllNetworksIcon.d.ts +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs as x, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
const r = () => /* @__PURE__ */ x("div", { className: "flex flex-wrap gap-y-0 gap-x-[2px] h-[17px] w-[16px]", children: [
|
|
3
|
+
/* @__PURE__ */ s("div", { className: "w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-900" }),
|
|
4
|
+
/* @__PURE__ */ s("div", { className: "w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-600" }),
|
|
5
|
+
/* @__PURE__ */ s("div", { className: "w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-600" }),
|
|
6
|
+
/* @__PURE__ */ s("div", { className: "w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-900" })
|
|
7
|
+
] });
|
|
8
|
+
export {
|
|
9
|
+
r as AllNetworksIcon
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=AllNetworksIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AllNetworksIcon.js","sources":["../../src/components/AllNetworksIcon.tsx"],"sourcesContent":["export const AllNetworksIcon = () => (\n <div className=\"flex flex-wrap gap-y-0 gap-x-[2px] h-[17px] w-[16px]\">\n <div className=\"w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-900\" />\n <div className=\"w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-600\" />\n <div className=\"w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-600\" />\n <div className=\"w-[7px] h-[7px] rounded-[2px] shrink-0 bg-sw-gray-900\" />\n </div>\n);\n"],"names":["AllNetworksIcon","jsxs","jsx"],"mappings":";AAAO,MAAMA,IAAkB,MAC7B,gBAAAC,EAAC,OAAA,EAAI,WAAU,wDACb,UAAA;AAAA,EAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,wDAAA,CAAwD;AAAA,EACvE,gBAAAA,EAAC,OAAA,EAAI,WAAU,wDAAA,CAAwD;AAAA,EACvE,gBAAAA,EAAC,OAAA,EAAI,WAAU,wDAAA,CAAwD;AAAA,EACvE,gBAAAA,EAAC,OAAA,EAAI,WAAU,wDAAA,CAAwD;AAAA,EAAA,CACzE;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Icon } from './Icon';
|
|
3
|
+
type Props = {
|
|
4
|
+
label: string;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
icon: ComponentProps<typeof Icon>['icon'];
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const ChainShortcut: (({ icon, label, isSelected, onClick }: Props) => import("react/jsx-runtime").JSX.Element) & {
|
|
10
|
+
All: ({ isSelected, onClick, }: {
|
|
11
|
+
isSelected: boolean;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { AllNetworksIcon as i } from "./AllNetworksIcon.js";
|
|
3
|
+
import { cn as n } from "../utils/cn.js";
|
|
4
|
+
import { UNKNOWN_ICON as l } from "../icons/index.js";
|
|
5
|
+
import { Icon as c } from "./Icon.js";
|
|
6
|
+
import { useTypedTranslation as m } from "../localisation.js";
|
|
7
|
+
const g = ({ icon: r, label: t, isSelected: s, onClick: a }) => /* @__PURE__ */ o(
|
|
8
|
+
"li",
|
|
9
|
+
{
|
|
10
|
+
onClick: a,
|
|
11
|
+
className: n(
|
|
12
|
+
"w-[36px] h-[36px] p-sw-md rounded-sw-md cursor-pointer items-center justify-center flex transition-colors",
|
|
13
|
+
{
|
|
14
|
+
"bg-sw-gray-50": s,
|
|
15
|
+
"bg-sw-gray-800 hover:bg-sw-gray-700": !s
|
|
16
|
+
}
|
|
17
|
+
),
|
|
18
|
+
children: /* @__PURE__ */ o(
|
|
19
|
+
c,
|
|
20
|
+
{
|
|
21
|
+
size: 20,
|
|
22
|
+
radius: 6,
|
|
23
|
+
label: t,
|
|
24
|
+
icon: r ?? l,
|
|
25
|
+
className: "bg-transparent"
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
), p = ({
|
|
30
|
+
isSelected: r,
|
|
31
|
+
onClick: t
|
|
32
|
+
}) => {
|
|
33
|
+
const { t: s } = m();
|
|
34
|
+
return /* @__PURE__ */ e(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
onClick: t,
|
|
38
|
+
className: n(
|
|
39
|
+
"px-sw-lg gap-sw-sm flex h-[36px] cursor-pointer items-center rounded-sw-md text-sw-label-md transition-colors",
|
|
40
|
+
{
|
|
41
|
+
"bg-sw-gray-50 text-sw-gray-950": r,
|
|
42
|
+
"bg-sw-gray-800 text-sw-gray-50 bg-sw-gray-800 hover:bg-sw-gray-700": !r
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ o(i, {}),
|
|
47
|
+
s("chain.all.label", "All")
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}, y = Object.assign(g, {
|
|
52
|
+
All: p
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
y as ChainShortcut
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=ChainShortcut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainShortcut.js","sources":["../../src/components/ChainShortcut.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { AllNetworksIcon } from './AllNetworksIcon';\n\nimport { cn } from '@/utils/cn';\nimport { UNKNOWN_ICON } from '@/icons';\nimport { Icon } from '@/components/Icon';\nimport { useTypedTranslation } from '@/localisation';\n\ntype Props = {\n label: string;\n isSelected: boolean;\n icon: ComponentProps<typeof Icon>['icon'];\n onClick: () => void;\n};\n\nconst Shortcut = ({ icon, label, isSelected, onClick }: Props) => {\n return (\n <li\n onClick={onClick}\n className={cn(\n 'w-[36px] h-[36px] p-sw-md rounded-sw-md cursor-pointer items-center justify-center flex transition-colors',\n {\n 'bg-sw-gray-50': isSelected,\n 'bg-sw-gray-800 hover:bg-sw-gray-700': !isSelected,\n },\n )}>\n <Icon\n size={20}\n radius={6}\n label={label}\n icon={icon ?? UNKNOWN_ICON}\n className=\"bg-transparent\"\n />\n </li>\n );\n};\n\nconst AllChainsShortcut = ({\n isSelected,\n onClick,\n}: {\n isSelected: boolean;\n onClick: () => void;\n}) => {\n const { t } = useTypedTranslation();\n\n return (\n <div\n onClick={onClick}\n className={cn(\n 'px-sw-lg gap-sw-sm flex h-[36px] cursor-pointer items-center rounded-sw-md text-sw-label-md transition-colors',\n {\n 'bg-sw-gray-50 text-sw-gray-950': isSelected,\n 'bg-sw-gray-800 text-sw-gray-50 bg-sw-gray-800 hover:bg-sw-gray-700':\n !isSelected,\n },\n )}>\n <AllNetworksIcon />\n {t('chain.all.label', 'All')}\n </div>\n );\n};\n\nexport const ChainShortcut = Object.assign(Shortcut, {\n All: AllChainsShortcut,\n});\n"],"names":["Shortcut","icon","label","isSelected","onClick","jsx","cn","Icon","UNKNOWN_ICON","AllChainsShortcut","t","useTypedTranslation","jsxs","AllNetworksIcon","ChainShortcut"],"mappings":";;;;;;AAgBA,MAAMA,IAAW,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,YAAAC,GAAY,SAAAC,QAEzC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACA;AAAA,QACE,iBAAiBH;AAAA,QACjB,uCAAuC,CAACA;AAAA,MAAA;AAAA,IAC1C;AAAA,IAEF,UAAA,gBAAAE;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,OAAAL;AAAA,QACA,MAAMD,KAAQO;AAAA,QACd,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ;AAAA,GAKAC,IAAoB,CAAC;AAAA,EACzB,YAAAN;AAAA,EACA,SAAAC;AACF,MAGM;AACJ,QAAM,EAAE,GAAAM,EAAA,IAAMC,EAAA;AAEd,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAAR;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,UACE,kCAAkCH;AAAA,UAClC,sEACE,CAACA;AAAA,QAAA;AAAA,MACL;AAAA,MAEF,UAAA;AAAA,QAAA,gBAAAE,EAACQ,GAAA,EAAgB;AAAA,QAChBH,EAAE,mBAAmB,KAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGjC,GAEaI,IAAgB,OAAO,OAAOd,GAAU;AAAA,EACnD,KAAKS;AACP,CAAC;"}
|
package/dist/components/index.js
CHANGED
|
@@ -3,39 +3,43 @@ import { Badge as p } from "./Badge.js";
|
|
|
3
3
|
import { Banner as f } from "./Banner.js";
|
|
4
4
|
import { BlockingError as x } from "./BlockingError.js";
|
|
5
5
|
import { Button as i } from "./Button.js";
|
|
6
|
-
import { Card as
|
|
7
|
-
import { CopyButton as
|
|
8
|
-
import { DirectionSwitcher as
|
|
6
|
+
import { Card as a } from "./Card.js";
|
|
7
|
+
import { CopyButton as d } from "./CopyButton.js";
|
|
8
|
+
import { DirectionSwitcher as I } from "./DirectionSwitcher.js";
|
|
9
9
|
import { ErrorMessage as k } from "./ErrorMessage.js";
|
|
10
|
-
import { Hr as
|
|
10
|
+
import { Hr as C } from "./Hr.js";
|
|
11
11
|
import { Icon as S } from "./Icon.js";
|
|
12
|
-
import { Input as
|
|
13
|
-
import { InputAmount as
|
|
14
|
-
import { Notes as
|
|
15
|
-
import { Skeleton as
|
|
12
|
+
import { Input as N } from "./Input.js";
|
|
13
|
+
import { InputAmount as y, MaskedInputAmount as E } from "./InputAmount.js";
|
|
14
|
+
import { Notes as T } from "./Notes.js";
|
|
15
|
+
import { Skeleton as b } from "./Skeleton.js";
|
|
16
16
|
import { TinyNumber as H } from "./TinyNumber.js";
|
|
17
17
|
import { TokenIcon as q } from "./TokenIcon.js";
|
|
18
18
|
import { StatusWidget as z } from "./StatusWidget.js";
|
|
19
19
|
import { WidgetContainer as G } from "./WidgetContainer.js";
|
|
20
20
|
import { CloseButton as K } from "./CloseButton.js";
|
|
21
|
+
import { ChainShortcut as O } from "./ChainShortcut.js";
|
|
22
|
+
import { AllNetworksIcon as Q } from "./AllNetworksIcon.js";
|
|
21
23
|
export {
|
|
22
24
|
t as Accordion,
|
|
25
|
+
Q as AllNetworksIcon,
|
|
23
26
|
p as Badge,
|
|
24
27
|
f as Banner,
|
|
25
28
|
x as BlockingError,
|
|
26
29
|
i as Button,
|
|
27
|
-
|
|
30
|
+
a as Card,
|
|
31
|
+
O as ChainShortcut,
|
|
28
32
|
K as CloseButton,
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
d as CopyButton,
|
|
34
|
+
I as DirectionSwitcher,
|
|
31
35
|
k as ErrorMessage,
|
|
32
|
-
|
|
36
|
+
C as Hr,
|
|
33
37
|
S as Icon,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
N as Input,
|
|
39
|
+
y as InputAmount,
|
|
40
|
+
E as MaskedInputAmount,
|
|
41
|
+
T as Notes,
|
|
42
|
+
b as Skeleton,
|
|
39
43
|
z as StatusWidget,
|
|
40
44
|
H as TinyNumber,
|
|
41
45
|
q as TokenIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|