@b3dotfun/sdk 0.0.42 → 0.0.43-alpha.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 (121) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -0
  2. package/dist/cjs/anyspend/react/components/AnySpend.js +11 -4
  3. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +43 -3
  4. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +1 -0
  5. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
  6. package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  7. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +5 -3
  8. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +12 -0
  9. package/dist/cjs/anyspend/types/api.d.ts +2 -10
  10. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
  11. package/dist/cjs/global-account/react/components/index.d.ts +8 -7
  12. package/dist/cjs/global-account/react/components/index.js +29 -23
  13. package/dist/cjs/global-account/react/components/ui/dropdown-menu.d.ts +27 -0
  14. package/dist/cjs/global-account/react/components/ui/dropdown-menu.js +100 -0
  15. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +5 -1
  16. package/dist/cjs/shared/constants/currency.d.ts +1 -0
  17. package/dist/cjs/shared/constants/currency.js +5 -0
  18. package/dist/cjs/shared/constants/index.d.ts +1 -0
  19. package/dist/cjs/shared/constants/index.js +15 -0
  20. package/dist/cjs/shared/react/components/CurrencySelector.d.ts +7 -0
  21. package/dist/cjs/shared/react/components/CurrencySelector.js +14 -0
  22. package/dist/cjs/shared/react/components/FormattedCurrency.d.ts +12 -0
  23. package/dist/cjs/shared/react/components/FormattedCurrency.js +60 -0
  24. package/dist/cjs/shared/react/components/index.d.ts +2 -0
  25. package/dist/cjs/shared/react/components/index.js +18 -0
  26. package/dist/cjs/shared/react/hooks/__tests__/useCurrencyConversion.test.d.ts +1 -0
  27. package/dist/cjs/shared/react/hooks/__tests__/useCurrencyConversion.test.js +245 -0
  28. package/dist/cjs/shared/react/hooks/index.d.ts +1 -0
  29. package/dist/cjs/shared/react/hooks/index.js +1 -0
  30. package/dist/cjs/shared/react/hooks/useCurrencyConversion.d.ts +35 -0
  31. package/dist/cjs/shared/react/hooks/useCurrencyConversion.js +200 -0
  32. package/dist/cjs/shared/react/index.d.ts +2 -0
  33. package/dist/cjs/shared/react/index.js +2 -0
  34. package/dist/cjs/shared/react/stores/currencyModalStore.d.ts +7 -0
  35. package/dist/cjs/shared/react/stores/currencyModalStore.js +9 -0
  36. package/dist/cjs/shared/react/stores/currencyStore.d.ts +51 -0
  37. package/dist/cjs/shared/react/stores/currencyStore.js +57 -0
  38. package/dist/cjs/shared/react/stores/index.d.ts +2 -0
  39. package/dist/cjs/shared/react/stores/index.js +18 -0
  40. package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -0
  41. package/dist/esm/anyspend/react/components/AnySpend.js +11 -4
  42. package/dist/esm/anyspend/react/components/AnySpendCustom.js +10 -3
  43. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +1 -0
  44. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
  45. package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  46. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +5 -3
  47. package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +12 -0
  48. package/dist/esm/anyspend/types/api.d.ts +2 -10
  49. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +1 -1
  50. package/dist/esm/global-account/react/components/index.d.ts +8 -7
  51. package/dist/esm/global-account/react/components/index.js +8 -7
  52. package/dist/esm/global-account/react/components/ui/dropdown-menu.d.ts +27 -0
  53. package/dist/esm/global-account/react/components/ui/dropdown-menu.js +60 -0
  54. package/dist/esm/global-account/react/stores/useModalStore.d.ts +5 -1
  55. package/dist/esm/shared/constants/currency.d.ts +1 -0
  56. package/dist/esm/shared/constants/currency.js +2 -0
  57. package/dist/esm/shared/constants/index.d.ts +1 -0
  58. package/dist/esm/shared/constants/index.js +1 -0
  59. package/dist/esm/shared/react/components/CurrencySelector.d.ts +7 -0
  60. package/dist/esm/shared/react/components/CurrencySelector.js +11 -0
  61. package/dist/esm/shared/react/components/FormattedCurrency.d.ts +12 -0
  62. package/dist/esm/shared/react/components/FormattedCurrency.js +57 -0
  63. package/dist/esm/shared/react/components/index.d.ts +2 -0
  64. package/dist/esm/shared/react/components/index.js +2 -0
  65. package/dist/esm/shared/react/hooks/__tests__/useCurrencyConversion.test.d.ts +1 -0
  66. package/dist/esm/shared/react/hooks/__tests__/useCurrencyConversion.test.js +243 -0
  67. package/dist/esm/shared/react/hooks/index.d.ts +1 -0
  68. package/dist/esm/shared/react/hooks/index.js +1 -0
  69. package/dist/esm/shared/react/hooks/useCurrencyConversion.d.ts +35 -0
  70. package/dist/esm/shared/react/hooks/useCurrencyConversion.js +197 -0
  71. package/dist/esm/shared/react/index.d.ts +2 -0
  72. package/dist/esm/shared/react/index.js +2 -0
  73. package/dist/esm/shared/react/stores/currencyModalStore.d.ts +7 -0
  74. package/dist/esm/shared/react/stores/currencyModalStore.js +6 -0
  75. package/dist/esm/shared/react/stores/currencyStore.d.ts +51 -0
  76. package/dist/esm/shared/react/stores/currencyStore.js +54 -0
  77. package/dist/esm/shared/react/stores/index.d.ts +2 -0
  78. package/dist/esm/shared/react/stores/index.js +2 -0
  79. package/dist/styles/index.css +1 -1
  80. package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -0
  81. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +1 -0
  82. package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  83. package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +12 -0
  84. package/dist/types/anyspend/types/api.d.ts +2 -10
  85. package/dist/types/global-account/react/components/index.d.ts +8 -7
  86. package/dist/types/global-account/react/components/ui/dropdown-menu.d.ts +27 -0
  87. package/dist/types/global-account/react/stores/useModalStore.d.ts +5 -1
  88. package/dist/types/shared/constants/currency.d.ts +1 -0
  89. package/dist/types/shared/constants/index.d.ts +1 -0
  90. package/dist/types/shared/react/components/CurrencySelector.d.ts +7 -0
  91. package/dist/types/shared/react/components/FormattedCurrency.d.ts +12 -0
  92. package/dist/types/shared/react/components/index.d.ts +2 -0
  93. package/dist/types/shared/react/hooks/__tests__/useCurrencyConversion.test.d.ts +1 -0
  94. package/dist/types/shared/react/hooks/index.d.ts +1 -0
  95. package/dist/types/shared/react/hooks/useCurrencyConversion.d.ts +35 -0
  96. package/dist/types/shared/react/index.d.ts +2 -0
  97. package/dist/types/shared/react/stores/currencyModalStore.d.ts +7 -0
  98. package/dist/types/shared/react/stores/currencyStore.d.ts +51 -0
  99. package/dist/types/shared/react/stores/index.d.ts +2 -0
  100. package/package.json +29 -3
  101. package/src/anyspend/react/components/AnySpend.tsx +15 -2
  102. package/src/anyspend/react/components/AnySpendCustom.tsx +11 -2
  103. package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
  104. package/src/anyspend/react/components/common/PanelOnramp.tsx +19 -15
  105. package/src/anyspend/types/api.ts +2 -10
  106. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +2 -7
  107. package/src/global-account/react/components/index.ts +19 -12
  108. package/src/global-account/react/components/ui/dropdown-menu.tsx +132 -0
  109. package/src/global-account/react/stores/useModalStore.ts +5 -1
  110. package/src/shared/constants/currency.ts +2 -0
  111. package/src/shared/constants/index.ts +2 -0
  112. package/src/shared/react/components/CurrencySelector.tsx +71 -0
  113. package/src/shared/react/components/FormattedCurrency.tsx +106 -0
  114. package/src/shared/react/components/index.ts +2 -0
  115. package/src/shared/react/hooks/__tests__/useCurrencyConversion.test.ts +308 -0
  116. package/src/shared/react/hooks/index.ts +1 -0
  117. package/src/shared/react/hooks/useCurrencyConversion.ts +211 -0
  118. package/src/shared/react/index.ts +2 -0
  119. package/src/shared/react/stores/currencyModalStore.ts +13 -0
  120. package/src/shared/react/stores/currencyStore.ts +82 -0
  121. package/src/shared/react/stores/index.ts +2 -0
@@ -32,4 +32,5 @@ export declare function AnySpend(props: {
32
32
  preventDefault: () => void;
33
33
  }) => void;
34
34
  onSuccess?: (txHash?: string) => void;
35
+ customUsdInputValues?: string[];
35
36
  }): import("react/jsx-runtime").JSX.Element;
@@ -49,7 +49,7 @@ function AnySpend(props) {
49
49
  const fingerprintConfig = (0, AnySpendFingerprintWrapper_1.getFingerprintConfig)();
50
50
  return ((0, jsx_runtime_1.jsx)(AnySpendFingerprintWrapper_1.AnySpendFingerprintWrapper, { fingerprint: fingerprintConfig, children: (0, jsx_runtime_1.jsx)(AnySpendInner, { ...props }) }));
51
51
  }
52
- function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, mode = "modal", defaultActiveTab = "crypto", loadOrder, hideTransactionHistoryButton, recipientAddress: recipientAddressFromProps, onTokenSelect, onSuccess, }) {
52
+ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, mode = "modal", defaultActiveTab = "crypto", loadOrder, hideTransactionHistoryButton, recipientAddress: recipientAddressFromProps, onTokenSelect, onSuccess, customUsdInputValues, }) {
53
53
  const searchParams = (0, react_2.useSearchParamsSSR)();
54
54
  const router = (0, react_2.useRouter)();
55
55
  // Determine if we're in "buy mode" based on whether destination token props are provided
@@ -57,6 +57,8 @@ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, mode
57
57
  // Add refs to track URL state
58
58
  const initialUrlProcessed = (0, react_4.useRef)(false);
59
59
  const lastUrlUpdate = (0, react_4.useRef)(null);
60
+ // Track if onSuccess has been called for the current order
61
+ const onSuccessCalled = (0, react_4.useRef)(false);
60
62
  const [activeTab, setActiveTab] = (0, react_4.useState)(defaultActiveTab);
61
63
  const [orderId, setOrderId] = (0, react_4.useState)(loadOrder);
62
64
  const { orderAndTransactions: oat, getOrderAndTransactionsError } = (0, react_1.useAnyspendOrderAndTransactions)(orderId);
@@ -394,12 +396,17 @@ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, mode
394
396
  }
395
397
  }, [anyspendQuote, isSrcInputDirty]);
396
398
  (0, react_4.useEffect)(() => {
397
- if (oat?.data?.order.status === "executed") {
399
+ if (oat?.data?.order.status === "executed" && !onSuccessCalled.current) {
398
400
  console.log("Calling onSuccess");
399
401
  const txHash = oat?.data?.executeTx?.txHash;
400
402
  onSuccess?.(txHash);
403
+ onSuccessCalled.current = true;
401
404
  }
402
- }, [oat?.data?.executeTx?.txHash, oat?.data?.order.status, onSuccess]);
405
+ }, [oat?.data?.order.status, oat?.data?.executeTx?.txHash, onSuccess]);
406
+ // Reset flag when orderId changes
407
+ (0, react_4.useEffect)(() => {
408
+ onSuccessCalled.current = false;
409
+ }, [orderId]);
403
410
  const { createOrder, isCreatingOrder } = (0, react_1.useAnyspendCreateOrder)({
404
411
  onSuccess: data => {
405
412
  const orderId = data.data.id;
@@ -674,7 +681,7 @@ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, mode
674
681
  setActivePanel(PanelView.MAIN);
675
682
  setSelectedCryptoPaymentMethod(CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE); // Reset payment method when going back
676
683
  } })) }) }));
677
- const mainView = ((0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-2", children: [isBuyMode && ((0, jsx_runtime_1.jsxs)("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: [selectedDstToken.metadata?.logoURI && ((0, jsx_runtime_1.jsx)("div", { className: "relative", children: (0, jsx_runtime_1.jsx)("img", { src: selectedDstToken.metadata.logoURI, alt: selectedDstToken.symbol, className: "border-as-stroke h-12 w-12 rounded-full border-2 shadow-md" }) })), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("h1", { className: "text-as-primary text-xl font-bold", children: ["Buy ", selectedDstToken.symbol] }) })] })), (0, jsx_runtime_1.jsx)(TabSection_1.TabSection, { activeTab: activeTab, setActiveTab: setActiveTab, setSelectedCryptoPaymentMethod: setSelectedCryptoPaymentMethod, setSelectedFiatPaymentMethod: setSelectedFiatPaymentMethod }), (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: [activeTab === "crypto" ? ((0, jsx_runtime_1.jsx)(CryptoPaySection_1.CryptoPaySection, { selectedSrcChainId: selectedSrcChainId, setSelectedSrcChainId: setSelectedSrcChainId, selectedSrcToken: selectedSrcToken, setSelectedSrcToken: setSelectedSrcToken, srcAmount: srcAmount, setSrcAmount: setSrcAmount, setIsSrcInputDirty: setIsSrcInputDirty, selectedCryptoPaymentMethod: selectedCryptoPaymentMethod, onSelectCryptoPaymentMethod: () => setActivePanel(PanelView.CRYPTO_PAYMENT_METHOD), anyspendQuote: anyspendQuote, onTokenSelect: onTokenSelect })) : ((0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)(PanelOnramp_1.PanelOnramp, { srcAmountOnRamp: srcAmountOnRamp, setSrcAmountOnRamp: setSrcAmountOnRamp, selectedPaymentMethod: selectedFiatPaymentMethod, setActivePanel: setActivePanel, _recipientAddress: recipientAddress, destinationToken: selectedDstToken, destinationChainId: selectedDstChainId, destinationAmount: dstAmount, onDestinationTokenChange: setSelectedDstToken, onDestinationChainChange: setSelectedDstChainId, fiatPaymentMethodIndex: PanelView.FIAT_PAYMENT_METHOD, recipientSelectionPanelIndex: PanelView.RECIPIENT_SELECTION, hideDstToken: isBuyMode, anyspendQuote: anyspendQuote, onShowPointsDetail: () => setActivePanel(PanelView.POINTS_DETAIL) }) })), (0, jsx_runtime_1.jsx)(react_2.Button, { variant: "ghost", className: (0, cn_1.cn)("border-as-stroke bg-as-surface-primary absolute left-1/2 top-1/2 z-10 h-10 w-10 -translate-x-1/2 -translate-y-1/2 rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl", isBuyMode && "top-[calc(50%+56px)] cursor-default", activeTab === "fiat" && "hidden"), onClick: () => {
684
+ const mainView = ((0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-2", children: [isBuyMode && ((0, jsx_runtime_1.jsxs)("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: [selectedDstToken.metadata?.logoURI && ((0, jsx_runtime_1.jsx)("div", { className: "relative", children: (0, jsx_runtime_1.jsx)("img", { src: selectedDstToken.metadata.logoURI, alt: selectedDstToken.symbol, className: "border-as-stroke h-12 w-12 rounded-full border-2 shadow-md" }) })), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("h1", { className: "text-as-primary text-xl font-bold", children: ["Buy ", selectedDstToken.symbol] }) })] })), (0, jsx_runtime_1.jsx)(TabSection_1.TabSection, { activeTab: activeTab, setActiveTab: setActiveTab, setSelectedCryptoPaymentMethod: setSelectedCryptoPaymentMethod, setSelectedFiatPaymentMethod: setSelectedFiatPaymentMethod }), (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: [activeTab === "crypto" ? ((0, jsx_runtime_1.jsx)(CryptoPaySection_1.CryptoPaySection, { selectedSrcChainId: selectedSrcChainId, setSelectedSrcChainId: setSelectedSrcChainId, selectedSrcToken: selectedSrcToken, setSelectedSrcToken: setSelectedSrcToken, srcAmount: srcAmount, setSrcAmount: setSrcAmount, setIsSrcInputDirty: setIsSrcInputDirty, selectedCryptoPaymentMethod: selectedCryptoPaymentMethod, onSelectCryptoPaymentMethod: () => setActivePanel(PanelView.CRYPTO_PAYMENT_METHOD), anyspendQuote: anyspendQuote, onTokenSelect: onTokenSelect })) : ((0, jsx_runtime_1.jsx)(react_3.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)(PanelOnramp_1.PanelOnramp, { srcAmountOnRamp: srcAmountOnRamp, setSrcAmountOnRamp: setSrcAmountOnRamp, selectedPaymentMethod: selectedFiatPaymentMethod, setActivePanel: setActivePanel, _recipientAddress: recipientAddress, destinationToken: selectedDstToken, destinationChainId: selectedDstChainId, destinationAmount: dstAmount, onDestinationTokenChange: setSelectedDstToken, onDestinationChainChange: setSelectedDstChainId, fiatPaymentMethodIndex: PanelView.FIAT_PAYMENT_METHOD, recipientSelectionPanelIndex: PanelView.RECIPIENT_SELECTION, hideDstToken: isBuyMode, anyspendQuote: anyspendQuote, onShowPointsDetail: () => setActivePanel(PanelView.POINTS_DETAIL), customUsdInputValues: customUsdInputValues }) })), (0, jsx_runtime_1.jsx)(react_2.Button, { variant: "ghost", className: (0, cn_1.cn)("border-as-stroke bg-as-surface-primary absolute left-1/2 top-1/2 z-10 h-10 w-10 -translate-x-1/2 -translate-y-1/2 rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl", isBuyMode && "top-[calc(50%+56px)] cursor-default", activeTab === "fiat" && "hidden"), onClick: () => {
678
685
  if (activeTab === "fiat" || isBuyMode) {
679
686
  return;
680
687
  }
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
37
  };
@@ -16,7 +49,7 @@ const simplehash_1 = require("../../../shared/utils/simplehash");
16
49
  const invariant_1 = __importDefault(require("invariant"));
17
50
  const lucide_react_1 = require("lucide-react");
18
51
  const react_3 = require("motion/react");
19
- const react_4 = require("react");
52
+ const react_4 = __importStar(require("react"));
20
53
  const sonner_1 = require("sonner");
21
54
  const chains_1 = require("viem/chains");
22
55
  const FeatureFlagsContext_1 = require("../contexts/FeatureFlagsContext");
@@ -123,6 +156,8 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
123
156
  // Update recipient logic to use custom recipient
124
157
  const recipientAddress = customRecipientAddress || currentWallet.address;
125
158
  const [orderId, setOrderId] = (0, react_4.useState)(loadOrder);
159
+ // Track if onSuccess has been called for the current order
160
+ const onSuccessCalled = react_4.default.useRef(false);
126
161
  const [srcChainId, setSrcChainId] = (0, react_4.useState)(chains_1.base.id);
127
162
  // Get token list for token balance check
128
163
  const chainName = (0, react_4.useMemo)(() => (0, simplehash_1.simpleHashChainToChainName)(srcChainId), [srcChainId]);
@@ -236,12 +271,17 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
236
271
  // Get geo data and onramp options (after quote is available)
237
272
  const { geoData, isOnrampSupported, coinbaseAvailablePaymentMethods, stripeWeb2Support } = (0, react_1.useGeoOnrampOptions)(srcFiatAmount);
238
273
  (0, react_4.useEffect)(() => {
239
- if (oat?.data?.order.status === "executed") {
274
+ if (oat?.data?.order.status === "executed" && !onSuccessCalled.current) {
240
275
  console.log("Calling onSuccess");
241
276
  const txHash = oat?.data?.executeTx?.txHash;
242
277
  onSuccess?.(txHash);
278
+ onSuccessCalled.current = true;
243
279
  }
244
- }, [oat?.data?.executeTx?.txHash, oat?.data?.order.status, onSuccess]);
280
+ }, [oat?.data?.order.status, oat?.data?.executeTx?.txHash, onSuccess]);
281
+ // Reset flag when orderId changes
282
+ (0, react_4.useEffect)(() => {
283
+ onSuccessCalled.current = false;
284
+ }, [orderId]);
245
285
  const { createOrder: createRegularOrder, isCreatingOrder: isCreatingRegularOrder } = (0, react_1.useAnyspendCreateOrder)({
246
286
  onSuccess: data => {
247
287
  setOrderId(data.data.id);
@@ -19,5 +19,6 @@ export interface AnySpendDepositHypeProps {
19
19
  onTokenSelect?: (token: components["schemas"]["Token"], event: {
20
20
  preventDefault: () => void;
21
21
  }) => void;
22
+ customUsdInputValues?: string[];
22
23
  }
23
24
  export declare function AnySpendDepositHype(props: AnySpendDepositHypeProps): import("react/jsx-runtime").JSX.Element;
@@ -35,7 +35,7 @@ function AnySpendDepositHype(props) {
35
35
  const fingerprintConfig = (0, AnySpendFingerprintWrapper_1.getFingerprintConfig)();
36
36
  return ((0, jsx_runtime_1.jsx)(AnySpendFingerprintWrapper_1.AnySpendFingerprintWrapper, { fingerprint: fingerprintConfig, children: (0, jsx_runtime_1.jsx)(AnySpendDepositHypeInner, { ...props }) }));
37
37
  }
38
- function AnySpendDepositHypeInner({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, mainFooter, onTokenSelect, }) {
38
+ function AnySpendDepositHypeInner({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, mainFooter, onTokenSelect, customUsdInputValues, }) {
39
39
  // Use shared flow hook
40
40
  const { activePanel, setActivePanel, orderId, setOrderId, oat, selectedSrcChainId, setSelectedSrcChainId, selectedSrcToken, setSelectedSrcToken, srcAmount, setSrcAmount, dstAmount, setIsSrcInputDirty, selectedCryptoPaymentMethod, setSelectedCryptoPaymentMethod, selectedFiatPaymentMethod, setSelectedFiatPaymentMethod, selectedRecipientAddress, setSelectedRecipientAddress, recipientName, globalAddress, anyspendQuote, isLoadingAnyspendQuote, getAnyspendQuoteError, activeInputAmountInWei, geoData, coinbaseAvailablePaymentMethods, stripeWeb2Support, createOrder, isCreatingOrder, createOnrampOrder, isCreatingOnrampOrder, } = (0, useAnyspendFlow_1.useAnyspendFlow)({
41
41
  paymentType,
@@ -119,7 +119,7 @@ function AnySpendDepositHypeInner({ loadOrder, mode = "modal", recipientAddress,
119
119
  await handleFiatOrder();
120
120
  }
121
121
  };
122
- const mainView = ((0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h1", { className: "text-as-primary text-xl font-bold", children: paymentType === "crypto" ? "Deposit Crypto" : "Fund with Fiat" }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: [paymentType === "crypto" ? ((0, jsx_runtime_1.jsx)(CryptoPaySection_1.CryptoPaySection, { selectedSrcChainId: selectedSrcChainId, setSelectedSrcChainId: setSelectedSrcChainId, selectedSrcToken: selectedSrcToken, setSelectedSrcToken: setSelectedSrcToken, srcAmount: srcAmount, setSrcAmount: setSrcAmount, setIsSrcInputDirty: setIsSrcInputDirty, selectedCryptoPaymentMethod: selectedCryptoPaymentMethod, onSelectCryptoPaymentMethod: () => setActivePanel(useAnyspendFlow_1.PanelView.CRYPTO_PAYMENT_METHOD), anyspendQuote: anyspendQuote, onTokenSelect: onTokenSelect })) : ((0, jsx_runtime_1.jsx)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)(PanelOnramp_1.PanelOnramp, { srcAmountOnRamp: srcAmount, setSrcAmountOnRamp: setSrcAmount, selectedPaymentMethod: selectedFiatPaymentMethod, setActivePanel: setActivePanel, _recipientAddress: recipientAddress, destinationToken: anyspend_1.B3_TOKEN, destinationChainId: chains_1.base.id, dstTokenSymbol: exports.HYPE_TOKEN_DETAILS.SYMBOL, hideDstToken: true, destinationAmount: dstAmount, onDestinationTokenChange: () => { }, onDestinationChainChange: () => { }, fiatPaymentMethodIndex: useAnyspendFlow_1.PanelView.FIAT_PAYMENT_METHOD, recipientSelectionPanelIndex: useAnyspendFlow_1.PanelView.RECIPIENT_SELECTION, anyspendQuote: anyspendQuote, onShowPointsDetail: () => setActivePanel(useAnyspendFlow_1.PanelView.POINTS_DETAIL) }) })), (0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)("relative -my-1 flex h-0 items-center justify-center", paymentType === "fiat" && "hidden"), children: (0, jsx_runtime_1.jsx)(react_1.Button, { variant: "ghost", className: (0, cn_1.cn)("swap-direction-button border-as-stroke bg-as-surface-primary z-10 h-10 w-10 cursor-default rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl"), children: (0, jsx_runtime_1.jsx)("div", { className: "relative flex items-center justify-center transition-opacity", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowDown, { className: "text-as-primary/50 h-5 w-5" }) }) }) }), paymentType === "crypto" && ((0, jsx_runtime_1.jsx)(CryptoReceiveSection_1.CryptoReceiveSection, { isDepositMode: false, isBuyMode: true, selectedRecipientAddress: recipientAddress, recipientName: recipientName || undefined, onSelectRecipient: () => setActivePanel(useAnyspendFlow_1.PanelView.RECIPIENT_SELECTION), dstAmount: dstAmount, dstToken: anyspend_1.B3_TOKEN, dstTokenSymbol: exports.HYPE_TOKEN_DETAILS.SYMBOL, dstTokenLogoURI: exports.HYPE_TOKEN_DETAILS.LOGO_URI, selectedDstChainId: chains_1.base.id, setSelectedDstChainId: () => { }, setSelectedDstToken: () => { }, onChangeDstAmount: value => {
122
+ const mainView = ((0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h1", { className: "text-as-primary text-xl font-bold", children: paymentType === "crypto" ? "Deposit Crypto" : "Fund with Fiat" }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: [paymentType === "crypto" ? ((0, jsx_runtime_1.jsx)(CryptoPaySection_1.CryptoPaySection, { selectedSrcChainId: selectedSrcChainId, setSelectedSrcChainId: setSelectedSrcChainId, selectedSrcToken: selectedSrcToken, setSelectedSrcToken: setSelectedSrcToken, srcAmount: srcAmount, setSrcAmount: setSrcAmount, setIsSrcInputDirty: setIsSrcInputDirty, selectedCryptoPaymentMethod: selectedCryptoPaymentMethod, onSelectCryptoPaymentMethod: () => setActivePanel(useAnyspendFlow_1.PanelView.CRYPTO_PAYMENT_METHOD), anyspendQuote: anyspendQuote, onTokenSelect: onTokenSelect })) : ((0, jsx_runtime_1.jsx)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)(PanelOnramp_1.PanelOnramp, { srcAmountOnRamp: srcAmount, setSrcAmountOnRamp: setSrcAmount, selectedPaymentMethod: selectedFiatPaymentMethod, setActivePanel: setActivePanel, _recipientAddress: recipientAddress, destinationToken: anyspend_1.B3_TOKEN, destinationChainId: chains_1.base.id, dstTokenSymbol: exports.HYPE_TOKEN_DETAILS.SYMBOL, hideDstToken: true, destinationAmount: dstAmount, onDestinationTokenChange: () => { }, onDestinationChainChange: () => { }, fiatPaymentMethodIndex: useAnyspendFlow_1.PanelView.FIAT_PAYMENT_METHOD, recipientSelectionPanelIndex: useAnyspendFlow_1.PanelView.RECIPIENT_SELECTION, anyspendQuote: anyspendQuote, onShowPointsDetail: () => setActivePanel(useAnyspendFlow_1.PanelView.POINTS_DETAIL), customUsdInputValues: customUsdInputValues }) })), (0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)("relative -my-1 flex h-0 items-center justify-center", paymentType === "fiat" && "hidden"), children: (0, jsx_runtime_1.jsx)(react_1.Button, { variant: "ghost", className: (0, cn_1.cn)("swap-direction-button border-as-stroke bg-as-surface-primary z-10 h-10 w-10 cursor-default rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl"), children: (0, jsx_runtime_1.jsx)("div", { className: "relative flex items-center justify-center transition-opacity", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowDown, { className: "text-as-primary/50 h-5 w-5" }) }) }) }), paymentType === "crypto" && ((0, jsx_runtime_1.jsx)(CryptoReceiveSection_1.CryptoReceiveSection, { isDepositMode: false, isBuyMode: true, selectedRecipientAddress: recipientAddress, recipientName: recipientName || undefined, onSelectRecipient: () => setActivePanel(useAnyspendFlow_1.PanelView.RECIPIENT_SELECTION), dstAmount: dstAmount, dstToken: anyspend_1.B3_TOKEN, dstTokenSymbol: exports.HYPE_TOKEN_DETAILS.SYMBOL, dstTokenLogoURI: exports.HYPE_TOKEN_DETAILS.LOGO_URI, selectedDstChainId: chains_1.base.id, setSelectedDstChainId: () => { }, setSelectedDstToken: () => { }, onChangeDstAmount: value => {
123
123
  setIsSrcInputDirty(false);
124
124
  setSrcAmount(value);
125
125
  }, anyspendQuote: anyspendQuote, onShowPointsDetail: () => setActivePanel(useAnyspendFlow_1.PanelView.POINTS_DETAIL) }))] }) }), (0, jsx_runtime_1.jsx)(ErrorSection_1.ErrorSection, { error: getAnyspendQuoteError }), (0, jsx_runtime_1.jsx)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: (0, cn_1.cn)("mt-4 flex w-full max-w-[460px] flex-col gap-2", getAnyspendQuoteError && "mt-0"), children: (0, jsx_runtime_1.jsx)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", disabled: btnInfo.disable, onClick: onMainButtonClick, className: (0, cn_1.cn)("as-main-button relative w-full", btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand"), textClassName: (0, cn_1.cn)(btnInfo.error ? "text-white" : btnInfo.disable ? "text-as-secondary" : "text-white"), children: btnInfo.text }) }), mainFooter ? mainFooter : null] }));
@@ -1,7 +1,7 @@
1
1
  import { components } from "../../../../anyspend/types/api";
2
2
  import { GetQuoteResponse } from "../../../../anyspend/types/api_req_res";
3
3
  import { FiatPaymentMethod } from "./FiatPaymentMethod";
4
- export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, recipientSelectionPanelIndex, dstTokenSymbol, hideDstToken, anyspendQuote, onShowPointsDetail, }: {
4
+ export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, recipientSelectionPanelIndex, dstTokenSymbol, hideDstToken, anyspendQuote, onShowPointsDetail, customUsdInputValues, }: {
5
5
  srcAmountOnRamp: string;
6
6
  setSrcAmountOnRamp: (amount: string) => void;
7
7
  selectedPaymentMethod?: FiatPaymentMethod;
@@ -18,4 +18,5 @@ export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selec
18
18
  hideDstToken?: boolean;
19
19
  anyspendQuote?: GetQuoteResponse;
20
20
  onShowPointsDetail?: () => void;
21
+ customUsdInputValues?: string[];
21
22
  }): import("react/jsx-runtime").JSX.Element;
@@ -14,7 +14,7 @@ const FeatureFlagsContext_1 = require("../../contexts/FeatureFlagsContext");
14
14
  const FiatPaymentMethod_1 = require("./FiatPaymentMethod");
15
15
  const OrderTokenAmountFiat_1 = require("./OrderTokenAmountFiat");
16
16
  const PointsBadge_1 = require("./PointsBadge");
17
- function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, recipientSelectionPanelIndex, dstTokenSymbol, hideDstToken = false, anyspendQuote, onShowPointsDetail, }) {
17
+ function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, recipientSelectionPanelIndex, dstTokenSymbol, hideDstToken = false, anyspendQuote, onShowPointsDetail, customUsdInputValues = ["5", "10", "20", "25"], }) {
18
18
  const featureFlags = (0, FeatureFlagsContext_1.useFeatureFlags)();
19
19
  // Get geo-based onramp options to access fee information
20
20
  const { stripeWeb2Support } = (0, react_1.useGeoOnrampOptions)(srcAmountOnRamp);
@@ -72,9 +72,11 @@ function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMetho
72
72
  const handleQuickAmount = (value) => {
73
73
  setSrcAmountOnRamp(value);
74
74
  };
75
- return ((0, jsx_runtime_1.jsxs)("div", { className: "panel-onramp bg-as-surface-primary flex w-full flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-as-border-secondary bg-as-surface-secondary relative flex w-full flex-col rounded-2xl border p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex h-7 w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry flex items-center text-sm font-bold", children: "Pay" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-1 text-sm", onClick: () => setActivePanel(fiatPaymentMethodIndex), children: selectedPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "C" }) }), "Coinbase Pay"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : selectedPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.STRIPE ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "S" }) }), "Stripe"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Select payment method", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center pb-2 pt-8", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry text-2xl font-bold", children: "$" }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: amountInputRef, type: "text", value: srcAmountOnRamp, onChange: handleAmountChange, placeholder: "5", className: "text-as-primary placeholder:text-as-primary/50 h-auto min-w-[70px] border-0 bg-transparent p-0 px-3 pt-1 text-4xl font-bold focus-visible:ring-0 focus-visible:ring-offset-0", style: {
75
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "panel-onramp bg-as-surface-primary flex w-full flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-as-border-secondary bg-as-surface-secondary relative flex w-full flex-col rounded-2xl border p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex h-7 w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry flex items-center text-sm font-bold", children: "Pay" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-1 text-sm", onClick: () => setActivePanel(fiatPaymentMethodIndex), children: selectedPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "C" }) }), "Coinbase Pay"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : selectedPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.STRIPE ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "S" }) }), "Stripe"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Select payment method", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center pb-2 pt-8", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry text-2xl font-bold", children: "$" }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: amountInputRef, type: "text", value: srcAmountOnRamp, onChange: handleAmountChange, placeholder: "5", className: "text-as-primary placeholder:text-as-primary/50 h-auto min-w-[70px] border-0 bg-transparent p-0 px-1 pt-1 text-4xl font-bold focus-visible:ring-0 focus-visible:ring-offset-0", style: {
76
76
  width: `${Math.max(50, srcAmountOnRamp.length * 34)}px`,
77
- } })] }) }), (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("mx-auto mb-6 inline-grid grid-cols-4 gap-2", hideDstToken && "mb-0"), children: ["5", "10", "20", "25"].map(value => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handleQuickAmount(value), className: `bg-as-surface-secondary border-as-border-secondary hover:border-as-border-secondary h-7 w-14 rounded-lg border text-sm font-medium transition-all duration-200 ${srcAmountOnRamp === value
77
+ } })] }) }), (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("mx-auto mb-6 flex justify-center gap-2", hideDstToken && "mb-0"), children: customUsdInputValues
78
+ .filter(v => !isNaN(Number(v)))
79
+ .map(value => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handleQuickAmount(value), className: `bg-as-surface-secondary border-as-border-secondary hover:border-as-border-secondary h-7 w-14 rounded-lg border text-sm font-medium transition-all duration-200 ${srcAmountOnRamp === value
78
80
  ? "border-as-border-secondary bg-as-surface-secondary"
79
81
  : "bg-as-surface-secondary hover:bg-as-surface-secondary"}`, children: ["$", value] }, value))) }), destinationToken && destinationChainId && !hideDstToken && ((0, jsx_runtime_1.jsx)(OrderTokenAmountFiat_1.OrderTokenAmountFiat, { address: _recipientAddress, context: "to", inputValue: destinationAmount || "0", onChangeInput: () => { }, chainId: destinationChainId, setChainId: onDestinationChainChange || (() => { }), token: destinationToken, setToken: onDestinationTokenChange || (() => { }) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-as-border-secondary bg-as-surface-secondary mt-4 flex w-full flex-col gap-3 rounded-xl border p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry flex items-center text-sm", children: "Recipient" }), _recipientAddress ? ((0, jsx_runtime_1.jsxs)("button", { className: "text-as-tertiarry flex h-7 items-center gap-1 text-sm transition-colors hover:text-blue-700", onClick: () => setActivePanel(recipientSelectionPanelIndex), children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm", children: recipientName ? (0, utils_1.formatUsername)(recipientName) : (0, formatAddress_1.formatAddress)(_recipientAddress) }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16 })] })) : ((0, jsx_runtime_1.jsxs)("button", { className: "text-as-tertiarry flex h-7 items-center gap-1 text-sm transition-colors hover:text-blue-700", onClick: () => setActivePanel(5), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Wallet, { className: "text-as-brand", size: 16 }), "Select recipient", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16 })] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry text-sm", children: "Expected to receive" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-as-primary font-semibold", children: [destinationAmount || "0", " ", dstTokenSymbol || destinationToken?.symbol || ""] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-as-tertiarry text-sm", children: ["on ", destinationChainId ? chain_1.ALL_CHAINS[destinationChainId]?.name : ""] }), destinationToken && destinationChainId && destinationToken.metadata?.logoURI && ((0, jsx_runtime_1.jsx)("img", { src: chain_1.ALL_CHAINS[destinationChainId]?.logoUrl, alt: "Chain", className: "h-4 w-4 rounded-full" }))] })] }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsx)("div", { className: "", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry text-sm", children: (() => {
80
82
  const fee = getFeeFromApi(selectedPaymentMethod || FiatPaymentMethod_1.FiatPaymentMethod.NONE);
@@ -12,6 +12,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
12
12
  errorDetails: string | null;
13
13
  createdAt: number;
14
14
  expiredAt: number;
15
+ filledAt: number | null;
15
16
  creatorAddress: string | null;
16
17
  partnerId: string | null;
17
18
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -34,6 +35,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
34
35
  errorDetails: string | null;
35
36
  createdAt: number;
36
37
  expiredAt: number;
38
+ filledAt: number | null;
37
39
  creatorAddress: string | null;
38
40
  partnerId: string | null;
39
41
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -56,6 +58,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
56
58
  errorDetails: string | null;
57
59
  createdAt: number;
58
60
  expiredAt: number;
61
+ filledAt: number | null;
59
62
  creatorAddress: string | null;
60
63
  partnerId: string | null;
61
64
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -78,6 +81,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
78
81
  errorDetails: string | null;
79
82
  createdAt: number;
80
83
  expiredAt: number;
84
+ filledAt: number | null;
81
85
  creatorAddress: string | null;
82
86
  partnerId: string | null;
83
87
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -100,6 +104,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
100
104
  errorDetails: string | null;
101
105
  createdAt: number;
102
106
  expiredAt: number;
107
+ filledAt: number | null;
103
108
  creatorAddress: string | null;
104
109
  partnerId: string | null;
105
110
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -122,6 +127,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
122
127
  errorDetails: string | null;
123
128
  createdAt: number;
124
129
  expiredAt: number;
130
+ filledAt: number | null;
125
131
  creatorAddress: string | null;
126
132
  partnerId: string | null;
127
133
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -147,6 +153,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
147
153
  errorDetails: string | null;
148
154
  createdAt: number;
149
155
  expiredAt: number;
156
+ filledAt: number | null;
150
157
  creatorAddress: string | null;
151
158
  partnerId: string | null;
152
159
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -169,6 +176,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
169
176
  errorDetails: string | null;
170
177
  createdAt: number;
171
178
  expiredAt: number;
179
+ filledAt: number | null;
172
180
  creatorAddress: string | null;
173
181
  partnerId: string | null;
174
182
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -191,6 +199,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
191
199
  errorDetails: string | null;
192
200
  createdAt: number;
193
201
  expiredAt: number;
202
+ filledAt: number | null;
194
203
  creatorAddress: string | null;
195
204
  partnerId: string | null;
196
205
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -213,6 +222,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
213
222
  errorDetails: string | null;
214
223
  createdAt: number;
215
224
  expiredAt: number;
225
+ filledAt: number | null;
216
226
  creatorAddress: string | null;
217
227
  partnerId: string | null;
218
228
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -235,6 +245,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
235
245
  errorDetails: string | null;
236
246
  createdAt: number;
237
247
  expiredAt: number;
248
+ filledAt: number | null;
238
249
  creatorAddress: string | null;
239
250
  partnerId: string | null;
240
251
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -257,6 +268,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
257
268
  errorDetails: string | null;
258
269
  createdAt: number;
259
270
  expiredAt: number;
271
+ filledAt: number | null;
260
272
  creatorAddress: string | null;
261
273
  partnerId: string | null;
262
274
  onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
@@ -1117,11 +1117,6 @@ export interface components {
1117
1117
  * @example 990000
1118
1118
  */
1119
1119
  actualDstAmount: string | null;
1120
- /**
1121
- * @description Amount in after fee
1122
- * @example 990000
1123
- */
1124
- amountInAfterFee: string | null;
1125
1120
  };
1126
1121
  /** @description HypeDuel-specific payload */
1127
1122
  HypeDuelPayload: {
@@ -1135,11 +1130,6 @@ export interface components {
1135
1130
  * @example 990000
1136
1131
  */
1137
1132
  actualDstAmount: string | null;
1138
- /**
1139
- * @description Amount in after fee
1140
- * @example 990000
1141
- */
1142
- amountInAfterFee: string | null;
1143
1133
  };
1144
1134
  /** @description Custom execution payload */
1145
1135
  CustomPayload: {
@@ -1307,6 +1297,8 @@ export interface components {
1307
1297
  * @example 1752506694679
1308
1298
  */
1309
1299
  expiredAt: number;
1300
+ /** @description Timestamp when the order was filled/executed */
1301
+ filledAt: number | null;
1310
1302
  /**
1311
1303
  * @description Optional creator address
1312
1304
  * @example 0xb34facb90a200251318e8841c05102366f2158cf
@@ -45,7 +45,7 @@ function SignIn(props) {
45
45
  // TODO: Figure out why setting anchor on mobile causes z-index issues where it appears under elements
46
46
  anchor: isMobile ? "top end" : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background", children: [connectedEOAWallet ? ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("border-b3-react-subtle bg-b3-react-background flex cursor-pointer items-center justify-between rounded-xl p-3"), onClick: () => handleSetActiveAccount(connectedEOAWallet?.id), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)("img", { className: "bg-b3-react-primary h-16 w-16 rounded-full opacity-100", src: eoaWalletIcon, alt: connectedEOAWallet?.id }), (0, jsx_runtime_1.jsxs)("div", { className: "ml-4 grow", children: [ensName && (0, jsx_runtime_1.jsx)("div", { children: ensName }), (0, jsx_runtime_1.jsx)("div", { children: (0, utils_1.truncateAddress)(globalAddress) }), (0, jsx_runtime_1.jsx)("div", { children: walletInfo?.name })] })] }), isActiveEOAWallet && (0, jsx_runtime_1.jsx)(Icon_1.default, { className: "fill-b3-react-primary", name: "check" })] })) : (connectedSmartWallet && ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("mb-2 flex cursor-pointer items-center justify-between rounded-xl p-3", isActiveSmartWallet
47
47
  ? "bg-b3-react-background"
48
- : "bg-b3-react-background hover:bg-b3-react-background"), onClick: () => handleSetActiveAccount(connectedSmartWallet?.id), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)("img", { className: "bg-b3-react-primary h-16 w-16 rounded-full opacity-100", src: smartWalletIcon, alt: connectedSmartWallet?.id }), (0, jsx_runtime_1.jsxs)("div", { className: "grow pl-4", children: [ensName && (0, jsx_runtime_1.jsx)("div", { children: ensName }), (0, jsx_runtime_1.jsx)("div", { children: (0, utils_1.truncateAddress)(globalAddress) }), (0, jsx_runtime_1.jsx)("div", { children: "Smart wallet" })] })] }), isActiveSmartWallet && (0, jsx_runtime_1.jsx)(Icon_1.default, { className: "fill-b3-react-primary", name: "check" })] }))), (0, jsx_runtime_1.jsx)("div", { className: "ml-3", children: (0, jsx_runtime_1.jsx)(ManageAccountButton_1.ManageAccountButton, { ...props, className: "w-[calc(100%-12px)]" }) }), (0, jsx_runtime_1.jsx)("button", { className: "mb-2 w-full space-y-1", onClick: onDisconnect, children: (0, jsx_runtime_1.jsxs)("div", { className: "hover:bg-b3-react-background group flex h-12 items-center rounded-xl px-4 transition-colors", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { className: "fill-b3-react-background group-hover:fill-b3-react-primary mr-4 shrink-0 transition-colors", name: "logout" }), (0, jsx_runtime_1.jsx)("div", { className: "text-b3-react-background group-hover:text-b3-react-primary mr-auto transition-colors", children: "Disconnect" })] }) })] }) }) })] })) : ((0, jsx_runtime_1.jsx)(react_1.SignInWithB3, { closeAfterLogin: true, onLoginSuccess: async (globalAccount) => {
48
+ : "bg-b3-react-background hover:bg-b3-react-background"), onClick: () => handleSetActiveAccount(connectedSmartWallet?.id), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)("img", { className: "bg-b3-react-primary h-16 w-16 rounded-full opacity-100", src: smartWalletIcon, alt: connectedSmartWallet?.id }), (0, jsx_runtime_1.jsxs)("div", { className: "grow pl-4", children: [ensName && (0, jsx_runtime_1.jsx)("div", { children: ensName }), (0, jsx_runtime_1.jsx)("div", { children: (0, utils_1.truncateAddress)(globalAddress) }), (0, jsx_runtime_1.jsx)("div", { children: "Smart wallet" })] })] }), isActiveSmartWallet && (0, jsx_runtime_1.jsx)(Icon_1.default, { className: "fill-b3-react-primary", name: "check" })] }))), (0, jsx_runtime_1.jsx)("div", { className: "ml-3", children: (0, jsx_runtime_1.jsx)(ManageAccountButton_1.ManageAccountButton, { ...props, className: "w-[calc(100%-12px)]" }) }), (0, jsx_runtime_1.jsx)("button", { className: "mb-2 w-full space-y-1", onClick: onDisconnect, children: (0, jsx_runtime_1.jsxs)("div", { className: "hover:bg-b3-react-background group flex h-12 items-center rounded-xl px-4 transition-colors", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { className: "fill-b3-react-primary mr-4 shrink-0 transition-colors", name: "logout" }), (0, jsx_runtime_1.jsx)("div", { className: "text-b3-react-primary mr-auto transition-colors", children: "Disconnect" })] }) })] }) }) })] })) : ((0, jsx_runtime_1.jsx)(react_1.SignInWithB3, { closeAfterLogin: true, onLoginSuccess: async (globalAccount) => {
49
49
  console.log("User authenticated with Global Account!", globalAccount);
50
50
  }, ...props })) }) }));
51
51
  }
@@ -4,12 +4,12 @@ export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
4
4
  export { B3Context, type B3ContextType } from "./B3Provider/types";
5
5
  export { useB3 } from "./B3Provider/useB3";
6
6
  export { StyleRoot } from "./StyleRoot";
7
- export { SignInWithB3 } from "./SignInWithB3/SignInWithB3";
8
- export { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow";
9
- export { SignInWithB3Privy } from "./SignInWithB3/SignInWithB3Privy";
10
7
  export { AuthButton } from "./SignInWithB3/components/AuthButton";
11
8
  export { PermissionItem } from "./SignInWithB3/components/PermissionItem";
12
9
  export { WalletRow } from "./SignInWithB3/components/WalletRow";
10
+ export { SignInWithB3 } from "./SignInWithB3/SignInWithB3";
11
+ export { SignInWithB3Flow } from "./SignInWithB3/SignInWithB3Flow";
12
+ export { SignInWithB3Privy } from "./SignInWithB3/SignInWithB3Privy";
13
13
  export { LoginStepContainer } from "./SignInWithB3/steps/LoginStep";
14
14
  export { getConnectOptionsFromStrategy, isWalletType, type AllowedStrategy } from "./SignInWithB3/utils/signInUtils";
15
15
  export { ManageAccount } from "./ManageAccount/ManageAccount";
@@ -24,21 +24,22 @@ export { ClientOnly } from "./custom/ClientOnly";
24
24
  export { CopyToClipboard } from "./custom/CopyToClipboard";
25
25
  export { StaggeredFadeLoader } from "./custom/StaggeredFadeLoader";
26
26
  export { WalletConnectorIcon } from "./custom/WalletConnectorIcon";
27
- export { Loading } from "./ui/Loading";
28
- export { ShinyButton } from "./ui/ShinyButton";
29
- export { TabTrigger, Tabs, TabsContent, TabsList, TabsTransitionWrapper } from "./ui/TabSystem";
30
- export { TabTrigger as TabTriggerPrimitive, TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, } from "./ui/Tabs";
31
27
  export { Badge, badgeVariants } from "./ui/badge";
32
28
  export { Button, buttonVariants } from "./ui/button";
33
29
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "./ui/command";
34
30
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./ui/dialog";
35
31
  export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, } from "./ui/drawer";
32
+ export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "./ui/dropdown-menu";
36
33
  export { GlareCard } from "./ui/glare-card";
37
34
  export { GlareCardRounded } from "./ui/glare-card-rounded";
38
35
  export { Input } from "./ui/input";
36
+ export { Loading } from "./ui/Loading";
39
37
  export { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";
40
38
  export { ScrollArea, ScrollBar } from "./ui/scroll-area";
39
+ export { ShinyButton } from "./ui/ShinyButton";
41
40
  export { Skeleton } from "./ui/skeleton";
41
+ export { TabTrigger as TabTriggerPrimitive, TabsContent as TabsContentPrimitive, TabsList as TabsListPrimitive, Tabs as TabsPrimitive, } from "./ui/Tabs";
42
+ export { TabTrigger, Tabs, TabsContent, TabsList, TabsTransitionWrapper } from "./ui/TabSystem";
42
43
  export { TextLoop } from "./ui/text-loop";
43
44
  export { TextShimmer } from "./ui/text-shimmer";
44
45
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommandItem = exports.CommandInput = exports.CommandGroup = exports.CommandEmpty = exports.CommandDialog = exports.Command = exports.buttonVariants = exports.Button = exports.badgeVariants = exports.Badge = exports.TabsPrimitive = exports.TabsListPrimitive = exports.TabsContentPrimitive = exports.TabTriggerPrimitive = exports.TabsTransitionWrapper = exports.TabsList = exports.TabsContent = exports.Tabs = exports.TabTrigger = exports.ShinyButton = exports.Loading = exports.WalletConnectorIcon = exports.StaggeredFadeLoader = exports.CopyToClipboard = exports.ClientOnly = exports.customButtonVariants = exports.CustomButton = exports.SendERC20Button = exports.SendETHButton = exports.MintButton = exports.AccountAssets = exports.RequestPermissionsButton = exports.RequestPermissions = exports.ManageAccount = exports.isWalletType = exports.getConnectOptionsFromStrategy = exports.LoginStepContainer = exports.WalletRow = exports.PermissionItem = exports.AuthButton = exports.SignInWithB3Privy = exports.SignInWithB3Flow = exports.SignInWithB3 = exports.StyleRoot = exports.useB3 = exports.B3Context = exports.RelayKitProviderWrapper = exports.InnerProvider = exports.B3Provider = exports.B3DynamicModal = void 0;
4
- exports.AnimatedLottie = exports.TransitionPanel = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.TextShimmer = exports.TextLoop = exports.Skeleton = exports.ScrollBar = exports.ScrollArea = exports.PopoverTrigger = exports.PopoverContent = exports.Popover = exports.Input = exports.GlareCardRounded = exports.GlareCard = exports.DrawerTrigger = exports.DrawerTitle = exports.DrawerPortal = exports.DrawerOverlay = exports.DrawerHeader = exports.DrawerFooter = exports.DrawerDescription = exports.DrawerContent = exports.DrawerClose = exports.Drawer = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.CommandShortcut = exports.CommandSeparator = exports.CommandList = void 0;
3
+ exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.CommandShortcut = exports.CommandSeparator = exports.CommandList = exports.CommandItem = exports.CommandInput = exports.CommandGroup = exports.CommandEmpty = exports.CommandDialog = exports.Command = exports.buttonVariants = exports.Button = exports.badgeVariants = exports.Badge = exports.WalletConnectorIcon = exports.StaggeredFadeLoader = exports.CopyToClipboard = exports.ClientOnly = exports.customButtonVariants = exports.CustomButton = exports.SendERC20Button = exports.SendETHButton = exports.MintButton = exports.AccountAssets = exports.RequestPermissionsButton = exports.RequestPermissions = exports.ManageAccount = exports.isWalletType = exports.getConnectOptionsFromStrategy = exports.LoginStepContainer = exports.SignInWithB3Privy = exports.SignInWithB3Flow = exports.SignInWithB3 = exports.WalletRow = exports.PermissionItem = exports.AuthButton = exports.StyleRoot = exports.useB3 = exports.B3Context = exports.RelayKitProviderWrapper = exports.InnerProvider = exports.B3Provider = exports.B3DynamicModal = void 0;
4
+ exports.AnimatedLottie = exports.TransitionPanel = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.TextShimmer = exports.TextLoop = exports.TabsTransitionWrapper = exports.TabsList = exports.TabsContent = exports.Tabs = exports.TabTrigger = exports.TabsPrimitive = exports.TabsListPrimitive = exports.TabsContentPrimitive = exports.TabTriggerPrimitive = exports.Skeleton = exports.ShinyButton = exports.ScrollBar = exports.ScrollArea = exports.PopoverTrigger = exports.PopoverContent = exports.Popover = exports.Loading = exports.Input = exports.GlareCardRounded = exports.GlareCard = exports.DropdownMenuTrigger = exports.DropdownMenuSeparator = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenu = exports.DrawerTrigger = exports.DrawerTitle = exports.DrawerPortal = exports.DrawerOverlay = exports.DrawerHeader = exports.DrawerFooter = exports.DrawerDescription = exports.DrawerContent = exports.DrawerClose = exports.Drawer = exports.DialogTrigger = exports.DialogTitle = void 0;
5
5
  // Core Components
6
6
  var B3DynamicModal_1 = require("./B3DynamicModal");
7
7
  Object.defineProperty(exports, "B3DynamicModal", { enumerable: true, get: function () { return B3DynamicModal_1.B3DynamicModal; } });
@@ -17,18 +17,18 @@ Object.defineProperty(exports, "useB3", { enumerable: true, get: function () { r
17
17
  var StyleRoot_1 = require("./StyleRoot");
18
18
  Object.defineProperty(exports, "StyleRoot", { enumerable: true, get: function () { return StyleRoot_1.StyleRoot; } });
19
19
  // SignInWithB3 Components
20
- var SignInWithB3_1 = require("./SignInWithB3/SignInWithB3");
21
- Object.defineProperty(exports, "SignInWithB3", { enumerable: true, get: function () { return SignInWithB3_1.SignInWithB3; } });
22
- var SignInWithB3Flow_1 = require("./SignInWithB3/SignInWithB3Flow");
23
- Object.defineProperty(exports, "SignInWithB3Flow", { enumerable: true, get: function () { return SignInWithB3Flow_1.SignInWithB3Flow; } });
24
- var SignInWithB3Privy_1 = require("./SignInWithB3/SignInWithB3Privy");
25
- Object.defineProperty(exports, "SignInWithB3Privy", { enumerable: true, get: function () { return SignInWithB3Privy_1.SignInWithB3Privy; } });
26
20
  var AuthButton_1 = require("./SignInWithB3/components/AuthButton");
27
21
  Object.defineProperty(exports, "AuthButton", { enumerable: true, get: function () { return AuthButton_1.AuthButton; } });
28
22
  var PermissionItem_1 = require("./SignInWithB3/components/PermissionItem");
29
23
  Object.defineProperty(exports, "PermissionItem", { enumerable: true, get: function () { return PermissionItem_1.PermissionItem; } });
30
24
  var WalletRow_1 = require("./SignInWithB3/components/WalletRow");
31
25
  Object.defineProperty(exports, "WalletRow", { enumerable: true, get: function () { return WalletRow_1.WalletRow; } });
26
+ var SignInWithB3_1 = require("./SignInWithB3/SignInWithB3");
27
+ Object.defineProperty(exports, "SignInWithB3", { enumerable: true, get: function () { return SignInWithB3_1.SignInWithB3; } });
28
+ var SignInWithB3Flow_1 = require("./SignInWithB3/SignInWithB3Flow");
29
+ Object.defineProperty(exports, "SignInWithB3Flow", { enumerable: true, get: function () { return SignInWithB3Flow_1.SignInWithB3Flow; } });
30
+ var SignInWithB3Privy_1 = require("./SignInWithB3/SignInWithB3Privy");
31
+ Object.defineProperty(exports, "SignInWithB3Privy", { enumerable: true, get: function () { return SignInWithB3Privy_1.SignInWithB3Privy; } });
32
32
  var LoginStep_1 = require("./SignInWithB3/steps/LoginStep");
33
33
  Object.defineProperty(exports, "LoginStepContainer", { enumerable: true, get: function () { return LoginStep_1.LoginStepContainer; } });
34
34
  var signInUtils_1 = require("./SignInWithB3/utils/signInUtils");
@@ -67,21 +67,6 @@ Object.defineProperty(exports, "StaggeredFadeLoader", { enumerable: true, get: f
67
67
  var WalletConnectorIcon_1 = require("./custom/WalletConnectorIcon");
68
68
  Object.defineProperty(exports, "WalletConnectorIcon", { enumerable: true, get: function () { return WalletConnectorIcon_1.WalletConnectorIcon; } });
69
69
  // UI Components
70
- var Loading_1 = require("./ui/Loading");
71
- Object.defineProperty(exports, "Loading", { enumerable: true, get: function () { return Loading_1.Loading; } });
72
- var ShinyButton_1 = require("./ui/ShinyButton");
73
- Object.defineProperty(exports, "ShinyButton", { enumerable: true, get: function () { return ShinyButton_1.ShinyButton; } });
74
- var TabSystem_1 = require("./ui/TabSystem");
75
- Object.defineProperty(exports, "TabTrigger", { enumerable: true, get: function () { return TabSystem_1.TabTrigger; } });
76
- Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return TabSystem_1.Tabs; } });
77
- Object.defineProperty(exports, "TabsContent", { enumerable: true, get: function () { return TabSystem_1.TabsContent; } });
78
- Object.defineProperty(exports, "TabsList", { enumerable: true, get: function () { return TabSystem_1.TabsList; } });
79
- Object.defineProperty(exports, "TabsTransitionWrapper", { enumerable: true, get: function () { return TabSystem_1.TabsTransitionWrapper; } });
80
- var Tabs_1 = require("./ui/Tabs");
81
- Object.defineProperty(exports, "TabTriggerPrimitive", { enumerable: true, get: function () { return Tabs_1.TabTrigger; } });
82
- Object.defineProperty(exports, "TabsContentPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsContent; } });
83
- Object.defineProperty(exports, "TabsListPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsList; } });
84
- Object.defineProperty(exports, "TabsPrimitive", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
85
70
  var badge_1 = require("./ui/badge");
86
71
  Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return badge_1.Badge; } });
87
72
  Object.defineProperty(exports, "badgeVariants", { enumerable: true, get: function () { return badge_1.badgeVariants; } });
@@ -120,12 +105,20 @@ Object.defineProperty(exports, "DrawerOverlay", { enumerable: true, get: functio
120
105
  Object.defineProperty(exports, "DrawerPortal", { enumerable: true, get: function () { return drawer_1.DrawerPortal; } });
121
106
  Object.defineProperty(exports, "DrawerTitle", { enumerable: true, get: function () { return drawer_1.DrawerTitle; } });
122
107
  Object.defineProperty(exports, "DrawerTrigger", { enumerable: true, get: function () { return drawer_1.DrawerTrigger; } });
108
+ var dropdown_menu_1 = require("./ui/dropdown-menu");
109
+ Object.defineProperty(exports, "DropdownMenu", { enumerable: true, get: function () { return dropdown_menu_1.DropdownMenu; } });
110
+ Object.defineProperty(exports, "DropdownMenuContent", { enumerable: true, get: function () { return dropdown_menu_1.DropdownMenuContent; } });
111
+ Object.defineProperty(exports, "DropdownMenuItem", { enumerable: true, get: function () { return dropdown_menu_1.DropdownMenuItem; } });
112
+ Object.defineProperty(exports, "DropdownMenuSeparator", { enumerable: true, get: function () { return dropdown_menu_1.DropdownMenuSeparator; } });
113
+ Object.defineProperty(exports, "DropdownMenuTrigger", { enumerable: true, get: function () { return dropdown_menu_1.DropdownMenuTrigger; } });
123
114
  var glare_card_1 = require("./ui/glare-card");
124
115
  Object.defineProperty(exports, "GlareCard", { enumerable: true, get: function () { return glare_card_1.GlareCard; } });
125
116
  var glare_card_rounded_1 = require("./ui/glare-card-rounded");
126
117
  Object.defineProperty(exports, "GlareCardRounded", { enumerable: true, get: function () { return glare_card_rounded_1.GlareCardRounded; } });
127
118
  var input_1 = require("./ui/input");
128
119
  Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return input_1.Input; } });
120
+ var Loading_1 = require("./ui/Loading");
121
+ Object.defineProperty(exports, "Loading", { enumerable: true, get: function () { return Loading_1.Loading; } });
129
122
  var popover_1 = require("./ui/popover");
130
123
  Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_1.Popover; } });
131
124
  Object.defineProperty(exports, "PopoverContent", { enumerable: true, get: function () { return popover_1.PopoverContent; } });
@@ -133,8 +126,21 @@ Object.defineProperty(exports, "PopoverTrigger", { enumerable: true, get: functi
133
126
  var scroll_area_1 = require("./ui/scroll-area");
134
127
  Object.defineProperty(exports, "ScrollArea", { enumerable: true, get: function () { return scroll_area_1.ScrollArea; } });
135
128
  Object.defineProperty(exports, "ScrollBar", { enumerable: true, get: function () { return scroll_area_1.ScrollBar; } });
129
+ var ShinyButton_1 = require("./ui/ShinyButton");
130
+ Object.defineProperty(exports, "ShinyButton", { enumerable: true, get: function () { return ShinyButton_1.ShinyButton; } });
136
131
  var skeleton_1 = require("./ui/skeleton");
137
132
  Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return skeleton_1.Skeleton; } });
133
+ var Tabs_1 = require("./ui/Tabs");
134
+ Object.defineProperty(exports, "TabTriggerPrimitive", { enumerable: true, get: function () { return Tabs_1.TabTrigger; } });
135
+ Object.defineProperty(exports, "TabsContentPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsContent; } });
136
+ Object.defineProperty(exports, "TabsListPrimitive", { enumerable: true, get: function () { return Tabs_1.TabsList; } });
137
+ Object.defineProperty(exports, "TabsPrimitive", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
138
+ var TabSystem_1 = require("./ui/TabSystem");
139
+ Object.defineProperty(exports, "TabTrigger", { enumerable: true, get: function () { return TabSystem_1.TabTrigger; } });
140
+ Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return TabSystem_1.Tabs; } });
141
+ Object.defineProperty(exports, "TabsContent", { enumerable: true, get: function () { return TabSystem_1.TabsContent; } });
142
+ Object.defineProperty(exports, "TabsList", { enumerable: true, get: function () { return TabSystem_1.TabsList; } });
143
+ Object.defineProperty(exports, "TabsTransitionWrapper", { enumerable: true, get: function () { return TabSystem_1.TabsTransitionWrapper; } });
138
144
  var text_loop_1 = require("./ui/text-loop");
139
145
  Object.defineProperty(exports, "TextLoop", { enumerable: true, get: function () { return text_loop_1.TextLoop; } });
140
146
  var text_shimmer_1 = require("./ui/text-shimmer");
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ interface DropdownMenuProps {
3
+ children: React.ReactNode;
4
+ }
5
+ interface DropdownMenuContentProps {
6
+ children: React.ReactNode;
7
+ align?: "start" | "center" | "end";
8
+ className?: string;
9
+ }
10
+ interface DropdownMenuItemProps {
11
+ children: React.ReactNode;
12
+ onClick?: () => void;
13
+ className?: string;
14
+ }
15
+ interface DropdownMenuSeparatorProps {
16
+ className?: string;
17
+ }
18
+ interface DropdownMenuTriggerProps {
19
+ children: React.ReactNode;
20
+ asChild?: boolean;
21
+ }
22
+ export declare function DropdownMenu({ children }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function DropdownMenuTrigger({ children, asChild }: DropdownMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function DropdownMenuContent({ children, align, className }: DropdownMenuContentProps): import("react/jsx-runtime").JSX.Element | null;
25
+ export declare function DropdownMenuItem({ children, onClick, className }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare function DropdownMenuSeparator({ className }: DropdownMenuSeparatorProps): import("react/jsx-runtime").JSX.Element;
27
+ export {};