@aurora-is-near/intents-swap-widget 2.27.0 → 2.29.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.
Files changed (112) hide show
  1. package/dist/components/SwapCard.js +1 -1
  2. package/dist/components/WidgetContainer.d.ts +3 -3
  3. package/dist/components/WidgetContainer.js +34 -11
  4. package/dist/components/WidgetContainer.js.map +1 -1
  5. package/dist/{config-8oEZrI4B.js → config-BhslWKGR.js} +977 -961
  6. package/dist/config-BhslWKGR.js.map +1 -0
  7. package/dist/config.d.ts +1 -0
  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/index.js +1 -1
  39. package/dist/features/index.js +1 -1
  40. package/dist/hooks/index.js +1 -1
  41. package/dist/hooks/useAllTokens.js +1 -1
  42. package/dist/hooks/useChains.js +1 -1
  43. package/dist/hooks/useCompatibilityCheck.js +1 -1
  44. package/dist/hooks/useDefaultToken.js +1 -1
  45. package/dist/hooks/useExternalDepositStatus.js +1 -1
  46. package/dist/hooks/useIntentsBalance.js +1 -1
  47. package/dist/hooks/useMakeDepositAddress.js +1 -1
  48. package/dist/hooks/useMakeIntentsTransfer.js +1 -1
  49. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  50. package/dist/hooks/useMakeQuote.js +1 -1
  51. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  52. package/dist/hooks/useMakeTransfer.js +1 -1
  53. package/dist/hooks/useMergedBalance.js +1 -1
  54. package/dist/hooks/useTokenInputPair.js +1 -1
  55. package/dist/hooks/useTokens.js +1 -1
  56. package/dist/hooks/useTokensFiltered.js +1 -1
  57. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/machine/effects/index.js +1 -1
  60. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  61. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  62. package/dist/machine/effects/useMakeQuoteEffect.d.ts +2 -1
  63. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  64. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  65. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  66. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  67. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  68. package/dist/machine/events/index.js +1 -1
  69. package/dist/machine/events/tokenSelect.js +1 -1
  70. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  71. package/dist/machine/index.js +1 -1
  72. package/dist/machine/snap.js +1 -1
  73. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  74. package/dist/machine/subscriptions/index.js +1 -1
  75. package/dist/types/config.d.ts +1 -0
  76. package/dist/types/localisation.d.ts +1 -1
  77. package/dist/utils/intents/signers/near.js +1 -1
  78. package/dist/utils/intents/signers/privy.js +1 -1
  79. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  80. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +27 -27
  81. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js.map +1 -1
  82. package/dist/widgets/WidgetDeposit/index.d.ts +3 -2
  83. package/dist/widgets/WidgetDeposit/index.js +9 -7
  84. package/dist/widgets/WidgetDeposit/index.js.map +1 -1
  85. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +29 -28
  86. package/dist/widgets/WidgetSwap/WidgetSwapContent.js.map +1 -1
  87. package/dist/widgets/WidgetSwap/index.d.ts +3 -2
  88. package/dist/widgets/WidgetSwap/index.js +9 -7
  89. package/dist/widgets/WidgetSwap/index.js.map +1 -1
  90. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +34 -33
  91. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js.map +1 -1
  92. package/dist/widgets/WidgetWithdraw/index.d.ts +3 -2
  93. package/dist/widgets/WidgetWithdraw/index.js +9 -7
  94. package/dist/widgets/WidgetWithdraw/index.js.map +1 -1
  95. package/dist/widgets/types.d.ts +0 -4
  96. package/package.json +1 -1
  97. package/src/components/WidgetContainer.tsx +14 -3
  98. package/src/features/SubmitButton/index.tsx +3 -1
  99. package/src/hooks/useMakeDepositAddress.ts +2 -0
  100. package/src/hooks/useMakeQuote.ts +2 -0
  101. package/src/machine/effects/index.ts +1 -0
  102. package/src/machine/effects/useMakeQuoteEffect.ts +122 -80
  103. package/src/types/config.ts +1 -0
  104. package/src/types/localisation.ts +1 -0
  105. package/src/widgets/WidgetDeposit/WidgetDepositContent.tsx +4 -2
  106. package/src/widgets/WidgetDeposit/index.tsx +7 -2
  107. package/src/widgets/WidgetSwap/WidgetSwapContent.tsx +4 -1
  108. package/src/widgets/WidgetSwap/index.tsx +7 -2
  109. package/src/widgets/WidgetWithdraw/WidgetWithdrawContent.tsx +4 -1
  110. package/src/widgets/WidgetWithdraw/index.tsx +8 -2
  111. package/src/widgets/types.ts +0 -4
  112. package/dist/config-8oEZrI4B.js.map +0 -1
@@ -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-8oEZrI4B.js";
11
+ import { x as h } from "../config-BhslWKGR.js";
12
12
  const A = ({
13
13
  title: f = "Swap",
14
14
  state: s,
@@ -1,8 +1,8 @@
1
1
  import { PropsWithChildren, ReactElement } from 'react';
2
- type WidgetContainerProps = PropsWithChildren<{
2
+ export type WidgetContainerProps = PropsWithChildren<{
3
3
  HeaderComponent?: ReactElement | false | null;
4
4
  FooterComponent?: ReactElement | false | null;
5
5
  isFullPage?: boolean;
6
+ className?: string;
6
7
  }>;
7
- export declare const WidgetContainer: ({ children, HeaderComponent, FooterComponent, isFullPage, }: WidgetContainerProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
8
+ export declare const WidgetContainer: ({ children, HeaderComponent, FooterComponent, isFullPage, className, }: WidgetContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,41 @@
1
- import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
- const x = ({
3
- children: f,
1
+ import { jsxs as m, jsx as l } from "react/jsx-runtime";
2
+ import "../constants/chains.js";
3
+ import "viem";
4
+ import "ethers";
5
+ import { cn as s } from "../utils/cn.js";
6
+ const w = ({
7
+ children: c,
4
8
  HeaderComponent: e,
5
9
  FooterComponent: i,
6
- isFullPage: t
10
+ isFullPage: t,
11
+ className: r
7
12
  }) => {
8
- const s = /* @__PURE__ */ c("div", { className: "w-full h-full flex flex-col justify-center items-center relative", children: [
9
- e && /* @__PURE__ */ l("div", { className: "w-full mb-sw-2xl", children: e }),
10
- f,
11
- i && /* @__PURE__ */ l("div", { className: "flex flex-col gap-3 items-center w-full mt-sw-2xl", children: i })
12
- ] });
13
- return t ? /* @__PURE__ */ l("div", { className: "h-full min-h-full w-full min-w-full px-sw-lg mx-auto flex items-center justify-center fixed top-0 left-0 right-0", children: /* @__PURE__ */ l("div", { className: "w-full h-full max-w-[456px] min-w-[270px]", children: s }) }) : s;
13
+ const f = /* @__PURE__ */ m(
14
+ "div",
15
+ {
16
+ className: s(
17
+ "w-full h-full flex flex-col justify-center items-center relative",
18
+ t && r
19
+ ),
20
+ children: [
21
+ e && /* @__PURE__ */ l("div", { className: "w-full mb-sw-2xl", children: e }),
22
+ c,
23
+ i && /* @__PURE__ */ l("div", { className: "flex flex-col gap-3 items-center w-full mt-sw-2xl", children: i })
24
+ ]
25
+ }
26
+ );
27
+ return t ? /* @__PURE__ */ l(
28
+ "div",
29
+ {
30
+ className: s(
31
+ "h-full min-h-full w-full min-w-full px-sw-lg mx-auto flex items-center justify-center fixed top-0 left-0 right-0",
32
+ r
33
+ ),
34
+ children: /* @__PURE__ */ l("div", { className: "w-full h-full max-w-[456px] min-w-[270px]", children: f })
35
+ }
36
+ ) : f;
14
37
  };
15
38
  export {
16
- x as WidgetContainer
39
+ w as WidgetContainer
17
40
  };
18
41
  //# sourceMappingURL=WidgetContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetContainer.js","sources":["../../src/components/WidgetContainer.tsx"],"sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\n\ntype WidgetContainerProps = PropsWithChildren<{\n HeaderComponent?: ReactElement | false | null;\n FooterComponent?: ReactElement | false | null;\n isFullPage?: boolean;\n}>;\n\nexport const WidgetContainer = ({\n children,\n HeaderComponent,\n FooterComponent,\n isFullPage,\n}: WidgetContainerProps) => {\n const jsx = (\n <div className=\"w-full h-full flex flex-col justify-center items-center relative\">\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 className=\"h-full min-h-full w-full min-w-full px-sw-lg mx-auto flex items-center justify-center fixed top-0 left-0 right-0\">\n <div className=\"w-full h-full max-w-[456px] min-w-[270px]\">{jsx}</div>\n </div>\n );\n};\n"],"names":["WidgetContainer","children","HeaderComponent","FooterComponent","isFullPage","jsx","jsxs"],"mappings":";AAQO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AACF,MAA4B;AAC1B,QAAMC,IACJ,gBAAAC,EAAC,OAAA,EAAI,WAAU,oEACZ,UAAA;AAAA,IAAAJ,KACC,gBAAAG,EAAC,OAAA,EAAI,WAAU,oBAAoB,UAAAH,GAAgB;AAAA,IAEpDD;AAAA,IACAE,KACC,gBAAAE,EAAC,OAAA,EAAI,WAAU,qDACZ,UAAAF,EAAA,CACH;AAAA,EAAA,GAEJ;AAGF,SAAKC,IAKH,gBAAAC,EAAC,OAAA,EAAI,WAAU,oHACb,UAAA,gBAAAA,EAAC,SAAI,WAAU,6CAA6C,UAAAA,EAAAA,CAAI,EAAA,CAClE,IANOA;AAQX;"}
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-full w-full min-w-full px-sw-lg mx-auto flex items-center justify-center fixed top-0 left-0 right-0',\n className,\n )}>\n <div className=\"w-full h-full max-w-[456px] min-w-[270px]\">{jsx}</div>\n </div>\n );\n};\n"],"names":["WidgetContainer","children","HeaderComponent","FooterComponent","isFullPage","className","jsx","jsxs","cn"],"mappings":";;;;;AAUO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AACF,MAA4B;AAC1B,QAAMC,IACJ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAJ,KAAcC;AAAA,MAAA;AAAA,MAEf,UAAA;AAAA,QAAAH,KACC,gBAAAI,EAAC,OAAA,EAAI,WAAU,oBAAoB,UAAAJ,GAAgB;AAAA,QAEpDD;AAAA,QACAE,KACC,gBAAAG,EAAC,OAAA,EAAI,WAAU,qDACZ,UAAAH,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKN,SAAKC,IAKH,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAEF,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,6CAA6C,UAAAA,EAAAA,CAAI;AAAA,IAAA;AAAA,EAAA,IAT3DA;AAYX;"}