@aurora-is-near/intents-swap-widget 2.32.0 → 2.33.0
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/SwapCard.js +1 -1
- package/dist/components/WidgetContainer.js +21 -17
- package/dist/components/WidgetContainer.js.map +1 -1
- package/dist/{config-BF-tUydA.js → config-Y2oQmq_z.js} +175 -173
- package/dist/{config-BF-tUydA.js.map → config-Y2oQmq_z.js.map} +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.js +5 -4
- package/dist/config.js.map +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 +10 -9
- 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/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/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.js +1 -1
- package/dist/hooks/useIntentsBalance.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/useTheme.d.ts +1 -0
- package/dist/hooks/useTheme.js +7 -0
- package/dist/hooks/useTheme.js.map +1 -0
- 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/index.js +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/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.d.ts +9 -0
- package/dist/theme.js +11 -0
- package/dist/theme.js.map +1 -0
- package/dist/types/theme.d.ts +3 -0
- package/dist/types/theme.js +2 -0
- package/dist/types/theme.js.map +1 -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 +4 -3
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js.map +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js +15 -14
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js.map +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +4 -3
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WidgetContainer.tsx +10 -2
- package/src/config.tsx +7 -1
- package/src/hooks/useTheme.ts +8 -0
- package/src/theme.tsx +17 -0
- package/src/types/theme.ts +3 -0
|
@@ -8,7 +8,7 @@ import "../constants/chains.js";
|
|
|
8
8
|
import "viem";
|
|
9
9
|
import "ethers";
|
|
10
10
|
import { cn as N } from "../utils/cn.js";
|
|
11
|
-
import { x as h } from "../config-
|
|
11
|
+
import { x as h } from "../config-Y2oQmq_z.js";
|
|
12
12
|
const A = ({
|
|
13
13
|
title: f = "Swap",
|
|
14
14
|
state: s,
|
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import "../constants/chains.js";
|
|
3
3
|
import "viem";
|
|
4
4
|
import "ethers";
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
5
|
+
import { cn as i } from "../utils/cn.js";
|
|
6
|
+
import { useTheme as o } from "../hooks/useTheme.js";
|
|
7
|
+
const x = "#24262d", v = ({
|
|
7
8
|
children: c,
|
|
8
9
|
HeaderComponent: e,
|
|
9
|
-
FooterComponent:
|
|
10
|
-
isFullPage:
|
|
11
|
-
className:
|
|
10
|
+
FooterComponent: s,
|
|
11
|
+
isFullPage: m,
|
|
12
|
+
className: t
|
|
12
13
|
}) => {
|
|
13
|
-
const f = /* @__PURE__ */
|
|
14
|
+
const f = o(), r = /* @__PURE__ */ n(
|
|
14
15
|
"div",
|
|
15
16
|
{
|
|
16
|
-
className:
|
|
17
|
+
className: i(
|
|
17
18
|
"w-full h-full flex flex-col justify-center items-center relative",
|
|
18
|
-
|
|
19
|
+
m && t
|
|
19
20
|
),
|
|
20
21
|
children: [
|
|
21
22
|
e && /* @__PURE__ */ l("div", { className: "w-full mb-sw-2xl", children: e }),
|
|
22
23
|
c,
|
|
23
|
-
|
|
24
|
+
s && /* @__PURE__ */ l("div", { className: "flex flex-col gap-3 items-center w-full mt-sw-2xl", children: s })
|
|
24
25
|
]
|
|
25
26
|
}
|
|
26
27
|
);
|
|
27
|
-
return
|
|
28
|
+
return m ? /* @__PURE__ */ l(
|
|
28
29
|
"div",
|
|
29
30
|
{
|
|
30
|
-
className:
|
|
31
|
-
"h-full min-h-
|
|
32
|
-
|
|
31
|
+
className: i(
|
|
32
|
+
"sm:h-full min-h-screen w-full min-w-full px-sw-lg py-sw-xl sm:py-auto mx-auto sm:flex sm:items-center sm:justify-center sm:fixed sm:top-0 sm:left-0 sm:right-0",
|
|
33
|
+
t
|
|
33
34
|
),
|
|
34
|
-
|
|
35
|
+
style: {
|
|
36
|
+
backgroundColor: f?.backgroundColor ?? x
|
|
37
|
+
},
|
|
38
|
+
children: /* @__PURE__ */ l("div", { className: "w-full h-full max-w-[456px] min-w-[270px]", children: r })
|
|
35
39
|
}
|
|
36
|
-
) :
|
|
40
|
+
) : r;
|
|
37
41
|
};
|
|
38
42
|
export {
|
|
39
|
-
|
|
43
|
+
v as WidgetContainer
|
|
40
44
|
};
|
|
41
45
|
//# sourceMappingURL=WidgetContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetContainer.js","sources":["../../src/components/WidgetContainer.tsx"],"sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { cn } from '../utils';\n\nexport type WidgetContainerProps = PropsWithChildren<{\n HeaderComponent?: ReactElement | false | null;\n FooterComponent?: ReactElement | false | null;\n isFullPage?: boolean;\n className?: string;\n}>;\n\nexport const WidgetContainer = ({\n children,\n HeaderComponent,\n FooterComponent,\n isFullPage,\n className,\n}: WidgetContainerProps) => {\n const jsx = (\n <div\n className={cn(\n 'w-full h-full flex flex-col justify-center items-center relative',\n isFullPage && className,\n )}>\n {HeaderComponent && (\n <div className=\"w-full mb-sw-2xl\">{HeaderComponent}</div>\n )}\n {children}\n {FooterComponent && (\n <div className=\"flex flex-col gap-3 items-center w-full mt-sw-2xl\">\n {FooterComponent}\n </div>\n )}\n </div>\n );\n\n if (!isFullPage) {\n return jsx;\n }\n\n return (\n <div\n className={cn(\n 'h-full min-h-
|
|
1
|
+
{"version":3,"file":"WidgetContainer.js","sources":["../../src/components/WidgetContainer.tsx"],"sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { cn } from '../utils';\nimport { useTheme } from '../hooks/useTheme';\n\nconst DEFAULT_BACKGROUND_COLOR = '#24262d';\n\nexport type WidgetContainerProps = PropsWithChildren<{\n HeaderComponent?: ReactElement | false | null;\n FooterComponent?: ReactElement | false | null;\n isFullPage?: boolean;\n className?: string;\n}>;\n\nexport const WidgetContainer = ({\n children,\n HeaderComponent,\n FooterComponent,\n isFullPage,\n className,\n}: WidgetContainerProps) => {\n const theme = useTheme();\n\n const jsx = (\n <div\n className={cn(\n 'w-full h-full flex flex-col justify-center items-center relative',\n isFullPage && className,\n )}>\n {HeaderComponent && (\n <div className=\"w-full mb-sw-2xl\">{HeaderComponent}</div>\n )}\n {children}\n {FooterComponent && (\n <div className=\"flex flex-col gap-3 items-center w-full mt-sw-2xl\">\n {FooterComponent}\n </div>\n )}\n </div>\n );\n\n if (!isFullPage) {\n return jsx;\n }\n\n return (\n <div\n className={cn(\n 'sm:h-full min-h-screen w-full min-w-full px-sw-lg py-sw-xl sm:py-auto mx-auto sm:flex sm:items-center sm:justify-center sm:fixed sm:top-0 sm:left-0 sm:right-0',\n className,\n )}\n style={{\n backgroundColor: theme?.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,\n }}>\n <div className=\"w-full h-full max-w-[456px] min-w-[270px]\">{jsx}</div>\n </div>\n );\n};\n"],"names":["DEFAULT_BACKGROUND_COLOR","WidgetContainer","children","HeaderComponent","FooterComponent","isFullPage","className","theme","useTheme","jsx","jsxs","cn"],"mappings":";;;;;;AAIA,MAAMA,IAA2B,WASpBC,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AACF,MAA4B;AAC1B,QAAMC,IAAQC,EAAA,GAERC,IACJ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAN,KAAcC;AAAA,MAAA;AAAA,MAEf,UAAA;AAAA,QAAAH,KACC,gBAAAM,EAAC,OAAA,EAAI,WAAU,oBAAoB,UAAAN,GAAgB;AAAA,QAEpDD;AAAA,QACAE,KACC,gBAAAK,EAAC,OAAA,EAAI,WAAU,qDACZ,UAAAL,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKN,SAAKC,IAKH,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,iBAAiBC,GAAO,mBAAmBP;AAAA,MAAA;AAAA,MAE7C,UAAA,gBAAAS,EAAC,OAAA,EAAI,WAAU,6CAA6C,UAAAA,EAAAA,CAAI;AAAA,IAAA;AAAA,EAAA,IAZ3DA;AAeX;"}
|