@b3dotfun/sdk 0.1.69-alpha.1 → 0.1.69-alpha.10

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 (125) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +1 -1
  2. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +1 -1
  3. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +2 -4
  4. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  5. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
  6. package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +1 -2
  7. package/dist/cjs/anyspend/react/components/checkout/KycGate.js +1 -2
  8. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +5 -0
  9. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +37 -6
  10. package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +2 -0
  11. package/dist/cjs/anyspend/react/components/common/StepProgress.js +7 -2
  12. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +4 -6
  13. package/dist/cjs/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  14. package/dist/cjs/anyspend/react/hooks/useKycStatus.js +11 -7
  15. package/dist/cjs/app.shared.js +9 -7
  16. package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -2
  17. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
  18. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +2 -2
  19. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +2 -1
  20. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  21. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  22. package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  23. package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.js +57 -0
  24. package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +12 -29
  25. package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +10 -1
  26. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +96 -15
  27. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  28. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +15 -2
  29. package/dist/cjs/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  30. package/dist/cjs/global-account/react/components/Toast/ToastContext.js +30 -7
  31. package/dist/cjs/global-account/react/hooks/useAuth.js +26 -15
  32. package/dist/cjs/global-account/react/hooks/useAuthentication.js +23 -12
  33. package/dist/cjs/global-account/react/hooks/useConnect.d.ts +2 -2
  34. package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  35. package/dist/cjs/global-account/react/hooks/useTWAuth.js +0 -1
  36. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +10 -1
  37. package/dist/cjs/global-account/react/utils/createWagmiConfig.d.ts +0 -18
  38. package/dist/cjs/global-account/react/utils/createWagmiConfig.js +0 -17
  39. package/dist/cjs/shared/utils/session-duration.d.ts +15 -0
  40. package/dist/cjs/shared/utils/session-duration.js +69 -0
  41. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
  42. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
  43. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +2 -4
  44. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  45. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
  46. package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +2 -3
  47. package/dist/esm/anyspend/react/components/checkout/KycGate.js +2 -3
  48. package/dist/esm/anyspend/react/components/common/OrderDetails.js +6 -1
  49. package/dist/esm/anyspend/react/components/common/OrderStatus.js +34 -3
  50. package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +2 -0
  51. package/dist/esm/anyspend/react/components/common/StepProgress.js +4 -2
  52. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +5 -7
  53. package/dist/esm/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  54. package/dist/esm/anyspend/react/hooks/useKycStatus.js +9 -5
  55. package/dist/esm/app.shared.js +9 -7
  56. package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -2
  57. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
  58. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +2 -2
  59. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +2 -1
  60. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  61. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  62. package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  63. package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.js +52 -0
  64. package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +12 -29
  65. package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +11 -2
  66. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +100 -19
  67. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  68. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +14 -1
  69. package/dist/esm/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  70. package/dist/esm/global-account/react/components/Toast/ToastContext.js +30 -7
  71. package/dist/esm/global-account/react/hooks/useAuth.js +28 -17
  72. package/dist/esm/global-account/react/hooks/useAuthentication.js +24 -13
  73. package/dist/esm/global-account/react/hooks/useConnect.d.ts +2 -2
  74. package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  75. package/dist/esm/global-account/react/hooks/useTWAuth.js +0 -1
  76. package/dist/esm/global-account/react/stores/useModalStore.d.ts +10 -1
  77. package/dist/esm/global-account/react/utils/createWagmiConfig.d.ts +0 -18
  78. package/dist/esm/global-account/react/utils/createWagmiConfig.js +0 -16
  79. package/dist/esm/shared/utils/session-duration.d.ts +15 -0
  80. package/dist/esm/shared/utils/session-duration.js +64 -0
  81. package/dist/styles/index.css +1 -1
  82. package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  83. package/dist/types/anyspend/react/components/common/StepProgress.d.ts +2 -0
  84. package/dist/types/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  85. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
  86. package/dist/types/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  87. package/dist/types/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  88. package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  89. package/dist/types/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  90. package/dist/types/global-account/react/hooks/useConnect.d.ts +2 -2
  91. package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  92. package/dist/types/global-account/react/stores/useModalStore.d.ts +10 -1
  93. package/dist/types/global-account/react/utils/createWagmiConfig.d.ts +0 -18
  94. package/dist/types/shared/utils/session-duration.d.ts +15 -0
  95. package/package.json +2 -1
  96. package/src/anyspend/react/components/AnySpendStakeB3.tsx +2 -2
  97. package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +2 -2
  98. package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +2 -4
  99. package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +13 -3
  100. package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +9 -3
  101. package/src/anyspend/react/components/checkout/KycGate.tsx +8 -3
  102. package/src/anyspend/react/components/common/OrderDetails.tsx +8 -0
  103. package/src/anyspend/react/components/common/OrderStatus.tsx +38 -3
  104. package/src/anyspend/react/components/common/StepProgress.tsx +15 -5
  105. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +5 -7
  106. package/src/anyspend/react/hooks/useKycStatus.ts +8 -5
  107. package/src/app.shared.ts +9 -8
  108. package/src/global-account/react/components/B3DynamicModal.tsx +5 -2
  109. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +2 -1
  110. package/src/global-account/react/components/B3Provider/B3Provider.tsx +7 -1
  111. package/src/global-account/react/components/B3Provider/LocalSDKProvider.tsx +5 -0
  112. package/src/global-account/react/components/ManageAccount/SessionDurationContent.tsx +107 -0
  113. package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +28 -30
  114. package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +21 -2
  115. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +207 -54
  116. package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +19 -3
  117. package/src/global-account/react/components/Toast/ToastContext.tsx +39 -7
  118. package/src/global-account/react/hooks/useAuth.ts +28 -17
  119. package/src/global-account/react/hooks/useAuthentication.ts +24 -13
  120. package/src/global-account/react/hooks/useConnect.tsx +2 -2
  121. package/src/global-account/react/hooks/useTWAuth.tsx +0 -1
  122. package/src/global-account/react/stores/useModalStore.ts +11 -0
  123. package/src/global-account/react/utils/createWagmiConfig.tsx +0 -18
  124. package/src/shared/utils/session-duration.ts +64 -0
  125. package/src/types/torph.d.ts +4 -0
@@ -268,7 +268,7 @@ function AnySpendStakeB3({ loadOrder, mode = "modal", recipientAddress, stakeAmo
268
268
  opacity: hasMounted ? 1 : 0,
269
269
  y: hasMounted ? 0 : 20,
270
270
  filter: hasMounted ? "blur(0px)" : "blur(10px)",
271
- }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-6", children: (0, jsx_runtime_1.jsx)("a", { href: `https://basescan.org/tx/${stakingTxHash}`, target: "_blank", rel: "noopener noreferrer", className: "text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors", children: "View transaction" }) }), (0, jsx_runtime_1.jsx)(react_1.Button, { onClick: () => {
271
+ }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-6", children: (0, jsx_runtime_1.jsx)("a", { href: (0, anyspend_1.getExplorerTxUrl)(chains_1.base.id, stakingTxHash), target: "_blank", rel: "noopener noreferrer", className: "text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors", children: "View transaction" }) }), (0, jsx_runtime_1.jsx)(react_1.Button, { onClick: () => {
272
272
  setB3ModalOpen(false);
273
273
  onSuccess?.();
274
274
  }, className: "bg-as-brand hover:bg-as-brand/90 text-as-primary h-14 w-full rounded-xl text-lg font-medium", children: "Done" })] })] }) }));
@@ -278,7 +278,7 @@ function AnySpendStakeB3ExactIn({ loadOrder, mode = "modal", sourceTokenAddress,
278
278
  opacity: hasMounted ? 1 : 0,
279
279
  y: hasMounted ? 0 : 20,
280
280
  filter: hasMounted ? "blur(0px)" : "blur(10px)",
281
- }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-6", children: (0, jsx_runtime_1.jsx)("a", { href: `https://basescan.org/tx/${stakingTxHash}`, target: "_blank", rel: "noopener noreferrer", className: "text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors", children: "View transaction" }) }), (0, jsx_runtime_1.jsx)(react_1.Button, { onClick: () => {
281
+ }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-6", children: (0, jsx_runtime_1.jsx)("a", { href: (0, anyspend_1.getExplorerTxUrl)(chains_1.base.id, stakingTxHash), target: "_blank", rel: "noopener noreferrer", className: "text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors", children: "View transaction" }) }), (0, jsx_runtime_1.jsx)(react_1.Button, { onClick: () => {
282
282
  setB3ModalOpen(false);
283
283
  onSuccess?.((0, number_1.formatTokenAmount)(BigInt(userStakeAmount), 18) ?? "");
284
284
  }, className: "bg-as-brand hover:bg-as-brand/90 text-as-primary h-14 w-full rounded-xl text-lg font-medium", children: "Done" })] })] }) }));
@@ -56,9 +56,7 @@ function CheckoutPaymentPanel({ recipientAddress, destinationTokenAddress, desti
56
56
  if (activeOrderId) {
57
57
  return ((0, jsx_runtime_1.jsx)(CheckoutOrderStatus_1.CheckoutOrderStatus, { orderId: activeOrderId, themeColor: themeColor, returnUrl: returnUrl, returnLabel: returnLabel, onSuccess: onSuccess, onError: onError, onRetry: handleRetry, showPoints: showPoints, showOrderId: showOrderId, classes: classes }));
58
58
  }
59
- const accordionButtonClass = (active) => (0, cn_1.cn)("anyspend-payment-method-btn flex w-full items-center gap-3 px-4 py-4 text-left transition-colors", active
60
- ? "bg-white dark:bg-neutral-900"
61
- : "bg-white hover:bg-gray-50 dark:bg-neutral-900 dark:hover:bg-neutral-800", classes?.paymentMethodButton);
62
- const expandedPanelClass = (0, cn_1.cn)("anyspend-payment-method-panel border-t border-gray-100 bg-white px-4 py-4 dark:border-neutral-800 dark:bg-neutral-900");
59
+ const accordionButtonClass = (active) => (0, cn_1.cn)("anyspend-payment-method-btn flex w-full items-center gap-3 px-4 py-4 text-left transition-colors", !active && "hover:bg-gray-50 dark:hover:bg-neutral-800", classes?.paymentMethodButton);
60
+ const expandedPanelClass = (0, cn_1.cn)("anyspend-payment-method-panel border-t border-gray-100 px-4 py-4 dark:border-neutral-800");
63
61
  return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("anyspend-payment-panel flex flex-col gap-5", classes?.paymentPanel), children: [(0, jsx_runtime_1.jsx)("h2", { className: (0, cn_1.cn)("anyspend-payment-title text-lg font-semibold text-gray-900 dark:text-gray-100", classes?.paymentTitle), children: "Payment" }), !isFormValid && ((0, jsx_runtime_1.jsx)("p", { className: "text-sm text-amber-600 dark:text-amber-400", children: "Please complete the required fields above before proceeding to payment." })), (0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("anyspend-payment-methods divide-y divide-gray-200 overflow-hidden rounded-xl border border-gray-200 dark:divide-neutral-700 dark:border-neutral-700", !isFormValid && "pointer-events-none opacity-50", classes?.paymentMethodSelector), children: [(0, jsx_runtime_1.jsxs)("div", { className: "anyspend-method-crypto", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setPaymentMethod(paymentMethod === "crypto" ? null : "crypto"), className: accordionButtonClass(paymentMethod === "crypto"), children: [(0, jsx_runtime_1.jsx)(RadioCircle, { selected: paymentMethod === "crypto", themeColor: themeColor }), (0, jsx_runtime_1.jsx)(lucide_react_1.Wallet, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: "Pay with crypto" })] }), (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { initial: false, children: paymentMethod === "crypto" && ((0, jsx_runtime_1.jsx)(react_1.motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: "auto", opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)("div", { className: expandedPanelClass, children: (0, jsx_runtime_1.jsx)(CryptoPayPanel_1.CryptoPayPanel, { recipientAddress: recipientAddress, destinationTokenAddress: destinationTokenAddress, destinationTokenChainId: destinationTokenChainId, totalAmount: totalAmount, buttonText: buttonText, themeColor: themeColor, onOrderCreated: handleOrderCreated, onError: onError, callbackMetadata: callbackMetadata, classes: classes, senderAddress: senderAddress }) }) }, "crypto-panel")) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "anyspend-method-card", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setPaymentMethod(paymentMethod === "card" ? null : "card"), className: accordionButtonClass(paymentMethod === "card"), children: [(0, jsx_runtime_1.jsx)(RadioCircle, { selected: paymentMethod === "card", themeColor: themeColor }), (0, jsx_runtime_1.jsx)(lucide_react_1.CreditCard, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: "Credit or debit card" }), (0, jsx_runtime_1.jsxs)("div", { className: "ml-auto flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(VisaLogo, {}), (0, jsx_runtime_1.jsx)(MastercardLogo, {}), (0, jsx_runtime_1.jsx)(AmexLogo, {})] })] }), (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { initial: false, children: paymentMethod === "card" && ((0, jsx_runtime_1.jsx)(react_1.motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: "auto", opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)("div", { className: expandedPanelClass, children: (0, jsx_runtime_1.jsx)(FiatCheckoutPanel_1.FiatCheckoutPanel, { recipientAddress: recipientAddress, destinationTokenAddress: destinationTokenAddress, destinationTokenChainId: destinationTokenChainId, totalAmount: totalAmount, themeColor: themeColor, onOrderCreated: handleOrderCreated, onError: onError, callbackMetadata: callbackMetadata, classes: classes, feeOnTop: feeOnTop, kycEnabled: kycEnabled }) }) }, "card-panel")) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "anyspend-method-coinbase", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setPaymentMethod(paymentMethod === "coinbase" ? null : "coinbase"), className: accordionButtonClass(paymentMethod === "coinbase"), children: [(0, jsx_runtime_1.jsx)(RadioCircle, { selected: paymentMethod === "coinbase", themeColor: themeColor }), (0, jsx_runtime_1.jsx)(CoinbaseLogo, {}), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: "Coinbase Pay" })] }), (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { initial: false, children: paymentMethod === "coinbase" && ((0, jsx_runtime_1.jsx)(react_1.motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: "auto", opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.2, ease: "easeOut" }, style: { overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)("div", { className: expandedPanelClass, children: (0, jsx_runtime_1.jsx)(CoinbaseCheckoutPanel_1.CoinbaseCheckoutPanel, { recipientAddress: recipientAddress, destinationTokenAddress: destinationTokenAddress, destinationTokenChainId: destinationTokenChainId, totalAmount: totalAmount, themeColor: themeColor, onOrderCreated: handleOrderCreated, onError: onError, callbackMetadata: callbackMetadata, classes: classes }) }) }, "coinbase-panel")) })] })] })] }));
64
62
  }
@@ -1,10 +1,11 @@
1
1
  import type { AnySpendCheckoutClasses } from "./AnySpendCheckout";
2
2
  interface CheckoutSuccessProps {
3
3
  txHash?: string;
4
+ dstChainId?: number;
4
5
  orderId?: string;
5
6
  returnUrl?: string;
6
7
  returnLabel?: string;
7
8
  classes?: AnySpendCheckoutClasses;
8
9
  }
9
- export declare function CheckoutSuccess({ txHash, orderId, returnUrl, returnLabel, classes }: CheckoutSuccessProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function CheckoutSuccess({ txHash, dstChainId, orderId, returnUrl, returnLabel, classes, }: CheckoutSuccessProps): import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -3,12 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.CheckoutSuccess = CheckoutSuccess;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const anyspend_1 = require("../../../../anyspend");
7
+ const chains_1 = require("viem/chains");
6
8
  const cn_1 = require("../../../../shared/utils/cn");
7
9
  const lucide_react_1 = require("lucide-react");
8
10
  const react_1 = require("motion/react");
9
11
  const AnySpendCustomizationContext_1 = require("../context/AnySpendCustomizationContext");
10
12
  const AnimatedCheckmark_1 = require("../icons/AnimatedCheckmark");
11
- function CheckoutSuccess({ txHash, orderId, returnUrl, returnLabel, classes }) {
13
+ function CheckoutSuccess({ txHash, dstChainId, orderId, returnUrl, returnLabel, classes, }) {
12
14
  const { content, slots } = (0, AnySpendCustomizationContext_1.useAnySpendCustomization)();
13
15
  if (slots.successScreen) {
14
16
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: slots.successScreen({
@@ -18,7 +20,7 @@ function CheckoutSuccess({ txHash, orderId, returnUrl, returnLabel, classes }) {
18
20
  : "Your payment has been processed successfully.",
19
21
  txHash,
20
22
  orderId,
21
- explorerUrl: txHash ? `https://explorer.b3.fun/tx/${txHash}` : undefined,
23
+ explorerUrl: txHash ? (0, anyspend_1.getExplorerTxUrl)(dstChainId ?? chains_1.b3.id, txHash) : undefined,
22
24
  onDone: () => {
23
25
  if (returnUrl)
24
26
  window.location.href = returnUrl;
@@ -27,5 +29,5 @@ function CheckoutSuccess({ txHash, orderId, returnUrl, returnLabel, classes }) {
27
29
  returnLabel: content.returnButtonLabel || returnLabel,
28
30
  }) }));
29
31
  }
30
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("anyspend-checkout-success flex flex-col items-center py-8 text-center", classes?.successPanel), children: [(0, jsx_runtime_1.jsx)("div", { className: "anyspend-success-icon mb-4", children: (0, jsx_runtime_1.jsx)(AnimatedCheckmark_1.AnimatedCheckmark, { className: "h-16 w-16" }) }), (0, jsx_runtime_1.jsx)(react_1.motion.h2, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 1.0, ease: "easeOut" }, className: "anyspend-success-title text-xl font-semibold text-gray-900 dark:text-gray-100", children: content.successTitle || "Payment Successful" }), (0, jsx_runtime_1.jsx)(react_1.motion.p, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 1.15, ease: "easeOut" }, className: "anyspend-success-description mt-2 text-sm text-gray-500 dark:text-gray-400", children: content.successDescription || "Your payment has been processed successfully." }), txHash && ((0, jsx_runtime_1.jsxs)(react_1.motion.a, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, delay: 0.5, ease: "easeOut" }, href: `https://explorer.b3.fun/tx/${txHash}`, target: "_blank", rel: "noopener noreferrer", className: "anyspend-success-tx-link mt-4 flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400", children: ["View Transaction", (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "h-3.5 w-3.5" })] })), !txHash && orderId && ((0, jsx_runtime_1.jsxs)(react_1.motion.p, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, delay: 0.5, ease: "easeOut" }, className: "anyspend-success-order-id mt-4 text-xs text-gray-400 dark:text-gray-500", children: ["Order ID: ", orderId] })), returnUrl && ((0, jsx_runtime_1.jsx)(react_1.motion.a, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.6, ease: "easeOut" }, href: returnUrl, className: (0, cn_1.cn)("anyspend-success-return-btn mt-6 inline-flex rounded-xl px-6 py-3 text-sm font-medium transition-colors", classes?.returnButton), style: { backgroundColor: "#111827", color: "#fff" }, children: content.returnButtonLabel || returnLabel || "Return to Store" }))] }));
32
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("anyspend-checkout-success flex flex-col items-center py-8 text-center", classes?.successPanel), children: [(0, jsx_runtime_1.jsx)("div", { className: "anyspend-success-icon mb-4", children: (0, jsx_runtime_1.jsx)(AnimatedCheckmark_1.AnimatedCheckmark, { className: "h-16 w-16" }) }), (0, jsx_runtime_1.jsx)(react_1.motion.h2, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 1.0, ease: "easeOut" }, className: "anyspend-success-title text-xl font-semibold text-gray-900 dark:text-gray-100", children: content.successTitle || "Payment Successful" }), (0, jsx_runtime_1.jsx)(react_1.motion.p, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 1.15, ease: "easeOut" }, className: "anyspend-success-description mt-2 text-sm text-gray-500 dark:text-gray-400", children: content.successDescription || "Your payment has been processed successfully." }), txHash && ((0, jsx_runtime_1.jsxs)(react_1.motion.a, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, delay: 0.5, ease: "easeOut" }, href: (0, anyspend_1.getExplorerTxUrl)(dstChainId ?? chains_1.b3.id, txHash), target: "_blank", rel: "noopener noreferrer", className: "anyspend-success-tx-link mt-4 flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400", children: ["View Transaction", (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "h-3.5 w-3.5" })] })), !txHash && orderId && ((0, jsx_runtime_1.jsxs)(react_1.motion.p, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, delay: 0.5, ease: "easeOut" }, className: "anyspend-success-order-id mt-4 text-xs text-gray-400 dark:text-gray-500", children: ["Order ID: ", orderId] })), returnUrl && ((0, jsx_runtime_1.jsx)(react_1.motion.a, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.6, ease: "easeOut" }, href: returnUrl, className: (0, cn_1.cn)("anyspend-success-return-btn mt-6 inline-flex rounded-xl px-6 py-3 text-sm font-medium transition-colors", classes?.returnButton), style: { backgroundColor: "#111827", color: "#fff" }, children: content.returnButtonLabel || returnLabel || "Return to Store" }))] }));
31
33
  }
@@ -14,13 +14,12 @@ const react_stripe_js_1 = require("@stripe/react-stripe-js");
14
14
  const lucide_react_1 = require("lucide-react");
15
15
  const react_3 = require("motion/react");
16
16
  const react_4 = require("react");
17
- const wagmi_1 = require("wagmi");
18
17
  const KycGate_1 = require("./KycGate");
19
18
  function FiatCheckoutPanel({ recipientAddress, destinationTokenAddress, destinationTokenChainId, totalAmount, themeColor, onSuccess, onOrderCreated, onError, callbackMetadata, classes, feeOnTop, kycEnabled = false, }) {
20
19
  // Stable refs for callback props to avoid re-triggering effects
21
20
  const onErrorRef = (0, react_4.useRef)(onError);
22
21
  onErrorRef.current = onError;
23
- const { address } = (0, wagmi_1.useAccount)();
22
+ const { address } = (0, react_2.useAccountWallet)();
24
23
  const setB3ModalOpen = (0, react_2.useModalStore)(state => state.setB3ModalOpen);
25
24
  const setB3ModalContentType = (0, react_2.useModalStore)(state => state.setB3ModalContentType);
26
25
  const { data: tokenData } = (0, react_2.useTokenData)(destinationTokenChainId, destinationTokenAddress);
@@ -42,10 +42,9 @@ const b3Chain_1 = require("../../../../shared/constants/chains/b3Chain");
42
42
  const lucide_react_1 = require("lucide-react");
43
43
  const react_2 = require("motion/react");
44
44
  const react_3 = require("react");
45
- const wagmi_1 = require("wagmi");
46
45
  const useKycStatus_1 = require("../../hooks/useKycStatus");
47
46
  function KycGate({ themeColor, classes, enabled = false, onStatusResolved }) {
48
- const { address } = (0, wagmi_1.useAccount)();
47
+ const { address } = (0, react_1.useAccountWallet)();
49
48
  const { partnerId } = (0, react_1.useB3Config)();
50
49
  // Gate the status fetch behind explicit user consent so the wallet
51
50
  // signature prompt doesn't fire automatically on tab open.
@@ -140,6 +140,11 @@ function roundTokenAmount(amount) {
140
140
  exports.OrderDetails = (0, react_5.memo)(function OrderDetails({ mode = "modal", order, depositTxs, relayTxs, executeTx, refundTxs, cryptoPaymentMethod, selectedCryptoPaymentMethod, onPaymentMethodChange, onBack, disableUrlParamManagement = false, points, returnToHomeUrl, returnHomeLabel, classes, }) {
141
141
  const router = (0, hooks_1.useRouter)();
142
142
  const searchParams = (0, hooks_1.useSearchParams)();
143
+ const { setHeaderMode } = (0, react_1.useToastContext)();
144
+ (0, react_5.useEffect)(() => {
145
+ setHeaderMode(true);
146
+ return () => setHeaderMode(false);
147
+ }, [setHeaderMode]);
143
148
  // Get theme from B3Provider context
144
149
  const { theme } = (0, react_1.useB3Config)();
145
150
  const colorMode = theme || "light";
@@ -5,7 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const anyspend_1 = require("../../../../anyspend");
6
6
  const react_1 = require("../../../../shared/react");
7
7
  const lucide_react_1 = require("lucide-react");
8
- const react_2 = require("react");
8
+ const react_2 = require("../../../../global-account/react");
9
+ const react_3 = require("react");
9
10
  const AnySpendCustomizationContext_1 = require("../context/AnySpendCustomizationContext");
10
11
  const AnimatedCheckmark_1 = require("../icons/AnimatedCheckmark");
11
12
  const StepProgress_1 = require("./StepProgress");
@@ -17,15 +18,28 @@ function getStepIndex(status) {
17
18
  return 1;
18
19
  return -1;
19
20
  }
20
- exports.OrderStatus = (0, react_2.memo)(function OrderStatus({ order, selectedCryptoPaymentMethod, }) {
21
+ function getToastIcon(type) {
22
+ const iconClass = "h-5 w-5";
23
+ switch (type) {
24
+ case "success":
25
+ return (0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle, { className: `${iconClass} text-green-500` });
26
+ case "error":
27
+ return (0, jsx_runtime_1.jsx)(lucide_react_1.AlertCircle, { className: `${iconClass} text-red-500` });
28
+ case "info":
29
+ return (0, jsx_runtime_1.jsx)(lucide_react_1.Info, { className: `${iconClass} text-blue-500` });
30
+ case "warning":
31
+ return (0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { className: `${iconClass} text-amber-500` });
32
+ }
33
+ }
34
+ exports.OrderStatus = (0, react_3.memo)(function OrderStatus({ order, selectedCryptoPaymentMethod, }) {
21
35
  const { text: defaultText, description: defaultDescription } = (0, anyspend_1.getStatusDisplay)(order);
22
36
  const { content, slots } = (0, AnySpendCustomizationContext_1.useAnySpendCustomization)();
23
37
  const searchParams = (0, react_1.useSearchParams)();
24
38
  const cryptoPaymentMethod = selectedCryptoPaymentMethod || searchParams.get("cryptoPaymentMethod");
25
39
  const currentStepIndex = getStepIndex(order.status);
26
- const prevStepIndexRef = (0, react_2.useRef)(currentStepIndex);
40
+ const prevStepIndexRef = (0, react_3.useRef)(currentStepIndex);
27
41
  const shouldAnimateCheck = currentStepIndex > prevStepIndexRef.current;
28
- (0, react_2.useEffect)(() => {
42
+ (0, react_3.useEffect)(() => {
29
43
  prevStepIndexRef.current = currentStepIndex;
30
44
  }, [currentStepIndex]);
31
45
  // Resolve content overrides based on order status
@@ -61,9 +75,26 @@ exports.OrderStatus = (0, react_2.memo)(function OrderStatus({ order, selectedCr
61
75
  if (content.processingDescription)
62
76
  description = content.processingDescription;
63
77
  }
78
+ const { latestToast } = (0, react_2.useToastContext)();
79
+ // Override subtitle with toast notification when present (title stays unchanged)
80
+ let notificationIcon = undefined;
81
+ if (latestToast && currentStepIndex >= 0) {
82
+ description = latestToast.message;
83
+ notificationIcon = getToastIcon(latestToast.type);
84
+ }
64
85
  const paymentSteps = [
65
- { id: 1, title: text, description: typeof description === "string" ? description : defaultDescription || "" },
66
- { id: 2, title: text, description: typeof description === "string" ? description : defaultDescription || "" },
86
+ {
87
+ id: 1,
88
+ title: text,
89
+ description: typeof description === "string" ? description : defaultDescription || "",
90
+ icon: notificationIcon,
91
+ },
92
+ {
93
+ id: 2,
94
+ title: text,
95
+ description: typeof description === "string" ? description : defaultDescription || "",
96
+ icon: notificationIcon,
97
+ },
67
98
  ];
68
99
  if (currentStepIndex === 0) {
69
100
  if (!(order.status === "scanning_deposit_transaction" && cryptoPaymentMethod === "transfer_crypto")) {
@@ -1,7 +1,9 @@
1
+ import React from "react";
1
2
  export interface Step {
2
3
  id: string | number;
3
4
  title: string;
4
5
  description?: string;
6
+ icon?: React.ReactNode;
5
7
  }
6
8
  export interface StepProgressProps {
7
9
  steps: Step[];
@@ -1,17 +1,22 @@
1
1
  "use strict";
2
2
  "use client";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
3
6
  Object.defineProperty(exports, "__esModule", { value: true });
4
7
  exports.StepProgress = StepProgress;
5
8
  const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const react_1 = __importDefault(require("react"));
6
10
  const framer_motion_1 = require("framer-motion");
11
+ const react_2 = require("torph/react");
7
12
  const AnimatedCheckmark_1 = require("../icons/AnimatedCheckmark");
8
13
  function StepProgress({ steps, currentStepIndex, className = "", animateCompletedSteps = true, }) {
9
14
  const currentStep = steps[currentStepIndex];
10
- return ((0, jsx_runtime_1.jsxs)("div", { className: `flex w-full flex-col items-center gap-4 ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2", children: steps.map((_, index) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center", children: index < currentStepIndex ? (
15
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `flex w-full flex-col items-center gap-4 ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2", children: steps.map((_, index) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center", children: index < currentStepIndex ? (
11
16
  // Completed step - checkmark replaces the whole circle
12
17
  (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { scale: 0.8, opacity: 0 }, animate: { scale: 1, opacity: 1 }, transition: { delay: index * 0.2 }, children: (0, jsx_runtime_1.jsx)(AnimatedCheckmark_1.AnimatedCheckmark, { className: "h-10 w-10", strokeWidth: 2.5, static: !animateCompletedSteps }) })) : ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { scale: 0.8, opacity: 0 }, animate: { scale: 1, opacity: 1 }, transition: { delay: index * 0.2 }, className: `border-as-border-secondary relative flex h-10 w-10 items-center justify-center rounded-full border-[3px]`, children: index === currentStepIndex ? (
13
18
  // Current step - show spinning border and step number
14
19
  (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "border-t-as-primary absolute -inset-0.5 animate-spin rounded-full border-[3px] border-transparent" }), (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary font-semibold", children: index + 1 })] })) : (
15
20
  // Future step - show step number with disabled styling
16
- (0, jsx_runtime_1.jsx)("span", { className: "text-as-content-disabled font-semibold", children: index + 1 })) })) }, index), index < steps.length - 1 && ((0, jsx_runtime_1.jsx)("div", { className: "flex w-8 items-center justify-center gap-1", children: Array.from({ length: 6 }).map((_, dotIndex) => ((0, jsx_runtime_1.jsx)("div", { className: "bg-as-primary/30 h-[2px] w-[2px] rounded-full" }, dotIndex))) }))] }))) }), currentStep && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.3 }, className: "text-center", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-as-primary text-xl font-semibold", children: currentStep.title }), currentStep.description && (0, jsx_runtime_1.jsx)("p", { className: "text-as-tertiary mt-1 text-sm", children: currentStep.description })] }))] }));
21
+ (0, jsx_runtime_1.jsx)("span", { className: "text-as-content-disabled font-semibold", children: index + 1 })) })) }), index < steps.length - 1 && ((0, jsx_runtime_1.jsx)("div", { className: "flex w-8 items-center justify-center gap-1", children: Array.from({ length: 6 }).map((_, dotIndex) => ((0, jsx_runtime_1.jsx)("div", { className: "bg-as-primary/30 h-[2px] w-[2px] rounded-full" }, dotIndex))) }))] }, index))) }), currentStep && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.3 }, className: "text-center", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-as-primary text-xl font-semibold", children: (0, jsx_runtime_1.jsx)(react_2.TextMorph, { children: currentStep.title }) }), currentStep.description && ((0, jsx_runtime_1.jsxs)("p", { className: "text-as-tertiary mt-1 flex items-center justify-center gap-1.5 text-sm", children: [currentStep.icon, (0, jsx_runtime_1.jsx)(react_2.TextMorph, { children: currentStep.description })] }))] }))] }));
17
22
  }
@@ -10,7 +10,6 @@ const react_query_1 = require("@tanstack/react-query");
10
10
  const react_2 = require("react");
11
11
  const viem_1 = require("viem");
12
12
  const chains_1 = require("viem/chains");
13
- const wagmi_1 = require("wagmi");
14
13
  const useKycStatus_1 = require("./useKycStatus");
15
14
  const useValidatedClientReferenceId_1 = require("./useValidatedClientReferenceId");
16
15
  /**
@@ -20,7 +19,7 @@ const useValidatedClientReferenceId_1 = require("./useValidatedClientReferenceId
20
19
  function useAnyspendCreateOnrampOrder({ onSuccess, onError } = {}) {
21
20
  // Get B3 context values
22
21
  const { partnerId } = (0, react_1.useB3Config)();
23
- const { address } = (0, wagmi_1.useAccount)();
22
+ const { address, getHeaders: getWalletAuthHeaders } = (0, useKycStatus_1.useWalletAuthHeaders)();
24
23
  // Get validated client reference ID from B3 context
25
24
  const createValidatedClientReferenceId = (0, useValidatedClientReferenceId_1.useValidatedClientReferenceId)();
26
25
  // Get fingerprint data
@@ -44,12 +43,11 @@ function useAnyspendCreateOnrampOrder({ onSuccess, onError } = {}) {
44
43
  const srcAmountOnRampInWei = (0, viem_1.parseUnits)(srcFiatAmount, constants_1.USDC_BASE.decimals);
45
44
  // For card payments, include wallet auth headers so the backend can verify
46
45
  // KYC by the signing wallet address (may differ from the B3 JWT address).
47
- // Only use already-cached headers never trigger a fresh wallet signature
48
- // here, as that would prompt the user without their explicit consent.
49
- // KycGate pre-caches the headers in the "Continue to Verify" user-gesture.
46
+ // First try cached headers (from KycGate), then sign on-the-fly.
47
+ // The user is already clicking "Continue"/"Pay" so signing here is acceptable.
50
48
  let kycWalletHeaders;
51
49
  if (onramp.vendor === "stripe-web2" && address) {
52
- kycWalletHeaders = (0, useKycStatus_1.getCachedWalletHeaders)(address);
50
+ kycWalletHeaders = (0, useKycStatus_1.getCachedWalletHeaders)(address) || (await getWalletAuthHeaders());
53
51
  }
54
52
  return await anyspend_1.anyspendService.createOrder({
55
53
  recipientAddress: (0, utils_1.normalizeAddress)(recipientAddress),
@@ -24,10 +24,12 @@ interface KycVerifyResponse {
24
24
  export declare function getCachedWalletHeaders(address: string): Record<string, string> | undefined;
25
25
  /**
26
26
  * Returns a function that builds the wallet-signature auth headers.
27
+ * Uses useAccountWallet (thirdweb) instead of wagmi so signing works
28
+ * for all wallet types (social login, EOA, smart wallet, etc.).
27
29
  * Caches signatures for 4 minutes (server allows 5-minute window).
28
30
  */
29
31
  export declare function useWalletAuthHeaders(): {
30
- address: `0x${string}` | undefined;
32
+ address: string | undefined;
31
33
  getHeaders: () => Promise<Record<string, string>>;
32
34
  };
33
35
  export declare function useKycStatus(enabled?: boolean): {
@@ -7,9 +7,9 @@ exports.useKycStatus = useKycStatus;
7
7
  exports.useCreateKycInquiry = useCreateKycInquiry;
8
8
  exports.useVerifyKyc = useVerifyKyc;
9
9
  const constants_1 = require("../../../anyspend/constants");
10
+ const react_1 = require("../../../global-account/react");
10
11
  const react_query_1 = require("@tanstack/react-query");
11
- const react_1 = require("react");
12
- const wagmi_1 = require("wagmi");
12
+ const react_2 = require("react");
13
13
  function buildWalletAuthMessage(walletAddress, timestamp) {
14
14
  return `AnySpend wants to verify your identity for card payments.\n\nThis signature does not trigger a blockchain transaction or cost any gas.\n\nWallet: ${walletAddress.toLowerCase()}\nNonce: ${timestamp}`;
15
15
  }
@@ -27,21 +27,25 @@ function getCachedWalletHeaders(address) {
27
27
  }
28
28
  /**
29
29
  * Returns a function that builds the wallet-signature auth headers.
30
+ * Uses useAccountWallet (thirdweb) instead of wagmi so signing works
31
+ * for all wallet types (social login, EOA, smart wallet, etc.).
30
32
  * Caches signatures for 4 minutes (server allows 5-minute window).
31
33
  */
32
34
  function useWalletAuthHeaders() {
33
- const { address } = (0, wagmi_1.useAccount)();
34
- const { signMessageAsync } = (0, wagmi_1.useSignMessage)();
35
- const getHeaders = (0, react_1.useCallback)(async () => {
35
+ const { address, wallet } = (0, react_1.useAccountWallet)();
36
+ const signMessage = wallet.signMessage;
37
+ const getHeaders = (0, react_2.useCallback)(async () => {
36
38
  if (!address)
37
39
  throw new Error("No wallet connected");
40
+ if (!signMessage)
41
+ throw new Error("Wallet does not support message signing");
38
42
  const walletAddress = address.toLowerCase();
39
43
  const cached = headerCache.get(walletAddress);
40
44
  if (cached && Date.now() < cached.expiresAt)
41
45
  return cached.headers;
42
46
  const timestamp = Math.floor(Date.now() / 1000);
43
47
  const message = buildWalletAuthMessage(walletAddress, timestamp);
44
- const signature = await signMessageAsync({ message });
48
+ const signature = await signMessage({ message });
45
49
  const headers = {
46
50
  "X-Wallet-Address": walletAddress,
47
51
  "X-Wallet-Signature": signature,
@@ -50,7 +54,7 @@ function useWalletAuthHeaders() {
50
54
  // Cache for 4 minutes so repeated fetches don't re-prompt the user
51
55
  headerCache.set(walletAddress, { headers, expiresAt: Date.now() + 4 * 60 * 1000 });
52
56
  return headers;
53
- }, [address, signMessageAsync]);
57
+ }, [address, signMessage]);
54
58
  return { address, getHeaders };
55
59
  }
56
60
  function useKycStatus(enabled = true) {
@@ -7,8 +7,8 @@ exports.clientOptions = exports.MyAuthenticationClient = exports.authenticate =
7
7
  const authentication_client_1 = require("@feathersjs/authentication-client");
8
8
  const js_cookie_1 = __importDefault(require("js-cookie"));
9
9
  const constants_1 = require("./shared/constants");
10
+ const session_duration_1 = require("./shared/utils/session-duration");
10
11
  exports.B3_API_URL = process.env.EXPO_PUBLIC_B3_API || process.env.NEXT_PUBLIC_B3_API || process.env.PUBLIC_B3_API || "https://api.b3.fun";
11
- const DEV_USER_GROUP = 4;
12
12
  const authenticate = async (app, accessToken, identityToken, params) => {
13
13
  const fullToken = `${accessToken}+${identityToken}`;
14
14
  // Do not authenticate if there is no token
@@ -23,12 +23,14 @@ const authenticate = async (app, accessToken, identityToken, params) => {
23
23
  }, {
24
24
  query: params || {},
25
25
  });
26
- // Extend cookie expiration to 30 days for dev users
27
- if (response?.user?.userGroups?.includes(DEV_USER_GROUP)) {
28
- const token = js_cookie_1.default.get(constants_1.B3_AUTH_COOKIE_NAME);
29
- if (token) {
30
- js_cookie_1.default.set(constants_1.B3_AUTH_COOKIE_NAME, token, { expires: 30 });
31
- }
26
+ const token = js_cookie_1.default.get(constants_1.B3_AUTH_COOKIE_NAME);
27
+ if (token) {
28
+ const days = (0, session_duration_1.getSessionDurationDays)(response?.user?.preferences, params?.partnerId);
29
+ js_cookie_1.default.set(constants_1.B3_AUTH_COOKIE_NAME, token, {
30
+ ...(days > 0 ? { expires: days } : {}),
31
+ secure: true,
32
+ sameSite: "Lax",
33
+ });
32
34
  }
33
35
  return response;
34
36
  }
@@ -23,6 +23,7 @@ const LinkAccount_1 = require("./LinkAccount/LinkAccount");
23
23
  const LinkNewAccount_1 = require("./LinkAccount/LinkNewAccount");
24
24
  const ManageAccount_1 = require("./ManageAccount/ManageAccount");
25
25
  const NotificationsContent_1 = __importDefault(require("./ManageAccount/NotificationsContent"));
26
+ const SessionDurationContent_1 = __importDefault(require("./ManageAccount/SessionDurationContent"));
26
27
  const RequestPermissions_1 = require("./RequestPermissions/RequestPermissions");
27
28
  const Send_1 = require("./Send/Send");
28
29
  const SignInWithB3Flow_1 = require("./SignInWithB3/SignInWithB3Flow");
@@ -37,7 +38,7 @@ function B3DynamicModal() {
37
38
  const navigateBack = (0, react_2.useModalStore)(state => state.navigateBack);
38
39
  const { theme } = (0, react_2.useB3Config)();
39
40
  const isMobile = (0, react_2.useIsMobile)();
40
- const { toasts, removeToast } = (0, index_1.useToastContext)();
41
+ const { toasts, removeToast, headerMode } = (0, index_1.useToastContext)();
41
42
  // Define arrays for different modal type groups
42
43
  const fullWidthTypes = [
43
44
  "anySpend",
@@ -146,6 +147,8 @@ function B3DynamicModal() {
146
147
  return (0, jsx_runtime_1.jsx)(Send_1.Send, { ...contentType });
147
148
  case "notifications":
148
149
  return (0, jsx_runtime_1.jsx)(NotificationsContent_1.default, { ...contentType });
150
+ case "sessionDuration":
151
+ return (0, jsx_runtime_1.jsx)(SessionDurationContent_1.default, { partnerId: contentType.partnerId });
149
152
  // Add other modal types here
150
153
  default:
151
154
  return null;
@@ -168,7 +171,7 @@ function B3DynamicModal() {
168
171
  contentType?.type === "send" ||
169
172
  contentType?.type === "avatarEditor" ||
170
173
  contentType?.type === "notifications") &&
171
- "p-0", "mx-auto w-full max-w-md sm:max-w-lg"), hideCloseButton: hideCloseButton, hideGABranding: isAnySpendType, onEscapeKeyDown: !isClosable ? e => e.preventDefault() : undefined, children: [(0, jsx_runtime_1.jsx)(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), (0, jsx_runtime_1.jsx)(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), (0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("b3-modal-content no-scrollbar dark:bg-b3-background flex max-h-[90dvh] flex-col overflow-auto sm:max-h-[80dvh]"), children: [!hideCloseButton && ((0, jsx_runtime_1.jsxs)("button", { onClick: navigateBack, className: "flex items-center gap-2 px-6 py-4 text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white", children: [(0, jsx_runtime_1.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M15.8337 10H4.16699", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M10.0003 15.8334L4.16699 10L10.0003 4.16669", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }), (0, jsx_runtime_1.jsx)("span", { className: "font-inter text-sm font-semibold", children: "Back" })] })), (0, jsx_runtime_1.jsx)("div", { className: "flex-1", children: renderContent() }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: toasts.length > 0 && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { height: 0 }, animate: { height: "auto" }, exit: { height: 0 }, transition: { duration: 0.3, ease: "easeInOut" }, className: "toast-section relative z-10 overflow-hidden bg-white dark:border-neutral-800 dark:bg-neutral-900", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: { duration: 0.2, delay: 0.1 }, className: "p-4 pt-0", children: (0, jsx_runtime_1.jsx)(index_1.ToastContainer, { toasts: toasts, onDismiss: removeToast, theme: theme }) }) })) })] })] }), isOpen && !isAnySpendType && ((0, jsx_runtime_1.jsx)("style", { children: `
174
+ "p-0", "mx-auto w-full max-w-md sm:max-w-lg"), hideCloseButton: hideCloseButton, hideGABranding: isAnySpendType, onEscapeKeyDown: !isClosable ? e => e.preventDefault() : undefined, children: [(0, jsx_runtime_1.jsx)(ModalTitle, { className: "sr-only hidden", children: contentType?.type || "Modal" }), (0, jsx_runtime_1.jsx)(ModalDescription, { className: "sr-only hidden", children: contentType?.type || "Modal Body" }), (0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("b3-modal-content no-scrollbar dark:bg-b3-background flex max-h-[90dvh] flex-col overflow-auto sm:max-h-[80dvh]"), children: [!hideCloseButton && ((0, jsx_runtime_1.jsxs)("button", { onClick: navigateBack, className: "flex items-center gap-2 px-6 py-4 text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white", children: [(0, jsx_runtime_1.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M15.8337 10H4.16699", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M10.0003 15.8334L4.16699 10L10.0003 4.16669", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }), (0, jsx_runtime_1.jsx)("span", { className: "font-inter text-sm font-semibold", children: "Back" })] })), (0, jsx_runtime_1.jsx)("div", { className: "flex-1", children: renderContent() }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: !headerMode && toasts.length > 0 && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { height: 0 }, animate: { height: "auto" }, exit: { height: 0 }, transition: { duration: 0.3, ease: "easeInOut" }, className: "toast-section relative z-10 overflow-hidden bg-white dark:border-neutral-800 dark:bg-neutral-900", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: { duration: 0.2, delay: 0.1 }, className: "p-4 pt-0", children: (0, jsx_runtime_1.jsx)(index_1.ToastContainer, { toasts: toasts, onDismiss: removeToast, theme: theme }) }) })) })] })] }), isOpen && !isAnySpendType && ((0, jsx_runtime_1.jsx)("style", { children: `
172
175
  .modal-inner-content {
173
176
  transition: margin-bottom 0.3s ease-in-out;
174
177
  margin-bottom: ${toasts.length > 0 ? "0px" : "23px"} !important;
@@ -8,7 +8,7 @@ import { ClientType } from "../../../client-manager";
8
8
  /**
9
9
  * Main B3Provider component
10
10
  */
11
- export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, defaultEoaProvider, simDuneApiKey, toaster: _toaster, clientType, rpcUrls, partnerId, stripePublishableKey, onConnect, onLogout, connectors, overrideDefaultConnectors, createClientReferenceId, defaultPermissions, }: {
11
+ export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, defaultEoaProvider, simDuneApiKey, toaster: _toaster, clientType, rpcUrls, partnerId, stripePublishableKey, onConnect, onLogout, connectors, overrideDefaultConnectors, createClientReferenceId, defaultPermissions, disableBSMNTAuthentication, }: {
12
12
  theme: "light" | "dark";
13
13
  children: React.ReactNode;
14
14
  accountOverride?: Account;
@@ -32,4 +32,5 @@ export declare function B3Provider({ theme, children, accountOverride, environme
32
32
  overrideDefaultConnectors?: boolean;
33
33
  createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
34
34
  defaultPermissions?: PermissionsConfig;
35
+ disableBSMNTAuthentication?: boolean;
35
36
  }): import("react/jsx-runtime").JSX.Element;
@@ -26,7 +26,7 @@ const queryClient = new react_query_1.QueryClient();
26
26
  */
27
27
  function B3Provider({ theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, defaultEoaProvider, simDuneApiKey,
28
28
  // deprecated since v0.0.87
29
- toaster: _toaster, clientType = "rest", rpcUrls, partnerId, stripePublishableKey, onConnect, onLogout, connectors, overrideDefaultConnectors = false, createClientReferenceId, defaultPermissions, }) {
29
+ toaster: _toaster, clientType = "rest", rpcUrls, partnerId, stripePublishableKey, onConnect, onLogout, connectors, overrideDefaultConnectors = false, createClientReferenceId, defaultPermissions, disableBSMNTAuthentication = false, }) {
30
30
  // Initialize Google Analytics on mount
31
31
  (0, react_2.useEffect)(() => {
32
32
  (0, analytics_1.loadGA4Script)();
@@ -36,7 +36,7 @@ toaster: _toaster, clientType = "rest", rpcUrls, partnerId, stripePublishableKey
36
36
  (0, client_manager_1.setClientType)(clientType);
37
37
  }, [clientType]);
38
38
  const wagmiConfig = (0, react_2.useMemo)(() => (0, createWagmiConfig_1.createWagmiConfig)({ partnerId, rpcUrls, connectors, overrideDefaultConnectors }), [partnerId, rpcUrls, connectors, overrideDefaultConnectors]);
39
- return ((0, jsx_runtime_1.jsx)(react_3.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: wagmiConfig, reconnectOnMount: false, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_1.TooltipProvider, { children: (0, jsx_runtime_1.jsx)(index_1.ToastProvider, { children: (0, jsx_runtime_1.jsx)(LocalSDKProvider_1.LocalSDKProvider, { onConnectCallback: onConnect, onLogoutCallback: onLogout, children: (0, jsx_runtime_1.jsxs)(B3ConfigProvider_1.B3ConfigProvider, { accountOverride: accountOverride, environment: environment, automaticallySetFirstEoa: !!automaticallySetFirstEoa, theme: theme, clientType: clientType, partnerId: partnerId, stripePublishableKey: stripePublishableKey, createClientReferenceId: createClientReferenceId, defaultPermissions: defaultPermissions, children: [(0, jsx_runtime_1.jsx)(ToastContextConnector, {}), (0, jsx_runtime_1.jsxs)(react_1.RelayKitProviderWrapper, { simDuneApiKey: simDuneApiKey, children: [children, (0, jsx_runtime_1.jsx)(StyleRoot_1.StyleRoot, { id: "b3-root" })] }), (0, jsx_runtime_1.jsx)(AuthenticationProvider_1.default, { partnerId: partnerId, automaticallySetFirstEoa: !!automaticallySetFirstEoa, defaultEoaProvider: defaultEoaProvider })] }) }) }) }) }) }) }));
39
+ return ((0, jsx_runtime_1.jsx)(react_3.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: wagmiConfig, reconnectOnMount: false, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_1.TooltipProvider, { children: (0, jsx_runtime_1.jsx)(index_1.ToastProvider, { children: (0, jsx_runtime_1.jsx)(LocalSDKProvider_1.LocalSDKProvider, { onConnectCallback: onConnect, onLogoutCallback: onLogout, disableBSMNTAuthentication: disableBSMNTAuthentication, children: (0, jsx_runtime_1.jsxs)(B3ConfigProvider_1.B3ConfigProvider, { accountOverride: accountOverride, environment: environment, automaticallySetFirstEoa: !!automaticallySetFirstEoa, theme: theme, clientType: clientType, partnerId: partnerId, stripePublishableKey: stripePublishableKey, createClientReferenceId: createClientReferenceId, defaultPermissions: defaultPermissions, children: [(0, jsx_runtime_1.jsx)(ToastContextConnector, {}), (0, jsx_runtime_1.jsxs)(react_1.RelayKitProviderWrapper, { simDuneApiKey: simDuneApiKey, children: [children, (0, jsx_runtime_1.jsx)(StyleRoot_1.StyleRoot, { id: "b3-root" })] }), (0, jsx_runtime_1.jsx)(AuthenticationProvider_1.default, { partnerId: partnerId, automaticallySetFirstEoa: !!automaticallySetFirstEoa, defaultEoaProvider: defaultEoaProvider })] }) }) }) }) }) }) }));
40
40
  }
41
41
  /**
42
42
  * Component to connect the toast context to the global toast API
@@ -8,6 +8,7 @@ exports.InnerProvider = InnerProvider;
8
8
  const jsx_runtime_1 = require("react/jsx-runtime");
9
9
  const react_query_1 = require("@tanstack/react-query");
10
10
  const react_1 = require("thirdweb/react");
11
+ const react_2 = require("react");
11
12
  const wagmi_1 = require("wagmi");
12
13
  const createWagmiConfig_1 = require("../../utils/createWagmiConfig");
13
14
  const AuthenticationProvider_1 = __importDefault(require("./AuthenticationProvider"));
@@ -25,6 +26,6 @@ function B3Provider({ theme = "light", children, accountOverride, environment, c
25
26
  * Inner provider component for native
26
27
  */
27
28
  function InnerProvider({ children, accountOverride, environment, defaultPermissions, theme = "light", clientType = "socket", partnerId, rpcUrls, }) {
28
- const wagmiConfig = (0, createWagmiConfig_1.createWagmiConfig)({ partnerId, rpcUrls });
29
+ const wagmiConfig = (0, react_2.useMemo)(() => (0, createWagmiConfig_1.createWagmiConfig)({ partnerId, rpcUrls }), [partnerId, rpcUrls]);
29
30
  return ((0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: wagmiConfig, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(B3ConfigProvider_1.B3ConfigProvider, { accountOverride: accountOverride, environment: environment, automaticallySetFirstEoa: false, theme: theme, clientType: clientType, partnerId: partnerId, defaultPermissions: defaultPermissions, children: children }) }) }));
30
31
  }
@@ -6,13 +6,15 @@ import { Wallet } from "thirdweb/wallets";
6
6
  export interface LocalSDKContextType {
7
7
  onConnectCallback?: (wallet: Wallet, b3Jwt: string) => void | Promise<void>;
8
8
  onLogoutCallback?: () => void | Promise<void>;
9
+ disableBSMNTAuthentication?: boolean;
9
10
  }
10
11
  export declare const LocalSDKContext: import("react").Context<LocalSDKContextType>;
11
12
  /**
12
13
  * Local SDK Provider that wraps the app and provides internal SDK state
13
14
  */
14
- export declare function LocalSDKProvider({ children, onConnectCallback, onLogoutCallback, }: {
15
+ export declare function LocalSDKProvider({ children, onConnectCallback, onLogoutCallback, disableBSMNTAuthentication, }: {
15
16
  children: React.ReactNode;
16
17
  onConnectCallback?: (wallet: Wallet, b3Jwt: string) => void | Promise<void>;
17
18
  onLogoutCallback?: () => void | Promise<void>;
19
+ disableBSMNTAuthentication?: boolean;
18
20
  }): import("react/jsx-runtime").JSX.Element;
@@ -7,13 +7,15 @@ const react_1 = require("react");
7
7
  exports.LocalSDKContext = (0, react_1.createContext)({
8
8
  onConnectCallback: undefined,
9
9
  onLogoutCallback: undefined,
10
+ disableBSMNTAuthentication: false,
10
11
  });
11
12
  /**
12
13
  * Local SDK Provider that wraps the app and provides internal SDK state
13
14
  */
14
- function LocalSDKProvider({ children, onConnectCallback, onLogoutCallback, }) {
15
+ function LocalSDKProvider({ children, onConnectCallback, onLogoutCallback, disableBSMNTAuthentication, }) {
15
16
  return ((0, jsx_runtime_1.jsx)(exports.LocalSDKContext.Provider, { value: {
16
17
  onConnectCallback,
17
18
  onLogoutCallback,
19
+ disableBSMNTAuthentication,
18
20
  }, children: children }));
19
21
  }
@@ -0,0 +1,5 @@
1
+ interface SessionDurationContentProps {
2
+ partnerId: string;
3
+ }
4
+ declare const SessionDurationContent: ({ partnerId }: SessionDurationContentProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default SessionDurationContent;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const app_1 = __importDefault(require("../../../../global-account/app"));
8
+ const react_1 = require("../../../../global-account/react");
9
+ const session_duration_1 = require("../../../../shared/utils/session-duration");
10
+ const react_2 = require("react");
11
+ const ModalHeader_1 = __importDefault(require("../ModalHeader/ModalHeader"));
12
+ const DESCRIPTIONS = {
13
+ 0: "Sign out when browser closes",
14
+ 1: "Stay signed in for 1 day",
15
+ 7: "Stay signed in for 7 days",
16
+ 14: "Stay signed in for 2 weeks",
17
+ 30: "Stay signed in for 30 days",
18
+ };
19
+ const SessionDurationContent = ({ partnerId }) => {
20
+ const { user, setUser } = (0, react_1.useAuthentication)(partnerId);
21
+ const navigateBack = (0, react_1.useModalStore)(state => state.navigateBack);
22
+ const [sessionDays, setSessionDays] = (0, react_2.useState)(() => (0, session_duration_1.getSessionDurationDays)(user?.preferences, partnerId));
23
+ const [saving, setSaving] = (0, react_2.useState)(false);
24
+ const handleSelect = async (days) => {
25
+ const previous = sessionDays;
26
+ (0, session_duration_1.setSessionDurationDays)(days, partnerId);
27
+ setSessionDays(days);
28
+ if (user?.userId) {
29
+ setSaving(true);
30
+ try {
31
+ const updated = await app_1.default.service("users").patch(user.userId, {
32
+ preferences: {
33
+ ...user.preferences,
34
+ [partnerId]: {
35
+ ...((user.preferences ?? {})[partnerId] ?? {}),
36
+ sessionDuration: days,
37
+ },
38
+ },
39
+ });
40
+ setUser(updated);
41
+ }
42
+ catch (error) {
43
+ console.error("Failed to save session duration preference:", error);
44
+ // Revert optimistic update so UI stays consistent with server state
45
+ setSessionDays(previous);
46
+ (0, session_duration_1.setSessionDurationDays)(previous, partnerId);
47
+ }
48
+ finally {
49
+ setSaving(false);
50
+ }
51
+ }
52
+ };
53
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex h-[470px] flex-col", children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.default, { showBackButton: true, showCloseButton: false, title: "Stay signed in", handleBack: navigateBack }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-2 p-5", children: session_duration_1.SESSION_DURATION_OPTIONS.map(days => ((0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: () => handleSelect(days), disabled: saving, className: `flex items-center justify-between rounded-xl border px-4 py-3 transition-colors ${sessionDays === days
54
+ ? "border-[#3f3f46] bg-[#f4f4f5] dark:border-white dark:bg-white/10"
55
+ : "border-[#e4e4e7] bg-transparent hover:bg-[#f4f4f5] dark:border-white/10 dark:hover:bg-white/5"}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-start gap-0.5", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-neue-montreal-semibold text-[14px] leading-none tracking-[-0.28px] text-[#3f3f46] dark:text-white", children: session_duration_1.SESSION_DURATION_LABELS[days] }), (0, jsx_runtime_1.jsx)("span", { className: "font-neue-montreal-medium text-[13px] leading-none tracking-[-0.26px] text-[#70707b] dark:text-white/50", children: DESCRIPTIONS[days] })] }), sessionDays === days && ((0, jsx_runtime_1.jsx)("div", { className: "flex size-5 items-center justify-center rounded-full bg-[#3f3f46] dark:bg-white", children: (0, jsx_runtime_1.jsx)("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M1 4L3.5 6.5L9 1", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", className: "dark:stroke-[#3f3f46]" }) }) }))] }, days))) })] }));
56
+ };
57
+ exports.default = SessionDurationContent;