@swype-org/react-sdk 0.1.143 → 0.1.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2250,9 +2250,7 @@ function PoweredByFooter() {
2250
2250
  fill: "currentColor"
2251
2251
  }
2252
2252
  ) }),
2253
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Powered by Swype" }),
2254
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: dotStyle, children: "\xB7" }),
2255
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Non-custodial" })
2253
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Powered by Blink" })
2256
2254
  ] });
2257
2255
  }
2258
2256
  var containerStyle3 = (color) => ({
@@ -2264,7 +2262,6 @@ var containerStyle3 = (color) => ({
2264
2262
  color,
2265
2263
  padding: "12px 0 4px"
2266
2264
  });
2267
- var dotStyle = { opacity: 0.5 };
2268
2265
  function PrimaryButton({ children, onClick, disabled, loading, icon }) {
2269
2266
  const { tokens } = useSwypeConfig();
2270
2267
  const isDisabled = disabled || loading;
@@ -3047,7 +3044,7 @@ function LoginScreen({
3047
3044
  ScreenLayout,
3048
3045
  {
3049
3046
  footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3050
- /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onSubmit, disabled, loading: sending, children: "Continue" }),
3047
+ /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onSubmit, disabled, loading: sending, children: "Next" }),
3051
3048
  onSocialLogin && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3052
3049
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: dividerStyle(tokens), children: [
3053
3050
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: dividerLineStyle(tokens.border) }),
@@ -3065,10 +3062,6 @@ function LoginScreen({
3065
3062
  provider
3066
3063
  )) })
3067
3064
  ] }),
3068
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: walletSectionStyle, children: [
3069
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: walletLabelStyle(tokens.textMuted), children: "Works with" }),
3070
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: walletLogosStyle, children: walletIcons.map(({ key, logo }) => /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: key, style: walletLogoImgStyle }, key)) })
3071
- ] }),
3072
3065
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
3073
3066
  ] }),
3074
3067
  children: [
@@ -3081,8 +3074,7 @@ function LoginScreen({
3081
3074
  ),
3082
3075
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle2, children: [
3083
3076
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: iconBoxStyle(tokens.accent), children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: iconLetterStyle, children: "S" }) }),
3084
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle(tokens.text), children: "One-time setup.\nOne-tap deposits after." }),
3085
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle(tokens.textSecondary), children: "Protected by Face ID." }),
3077
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle(tokens.text), children: "Your Money. Any App. One Tap." }),
3086
3078
  error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorStyle(tokens), children: error }),
3087
3079
  /* @__PURE__ */ jsxRuntime.jsx(
3088
3080
  "input",
@@ -3105,11 +3097,6 @@ function LoginScreen({
3105
3097
  }
3106
3098
  );
3107
3099
  }
3108
- var walletIcons = [
3109
- { key: "metamask", logo: KNOWN_LOGOS["metamask"] },
3110
- { key: "base", logo: KNOWN_LOGOS["base"] },
3111
- { key: "trust wallet", logo: KNOWN_LOGOS["trust wallet"] }
3112
- ];
3113
3100
  function socialLabel(provider) {
3114
3101
  switch (provider) {
3115
3102
  case "google":
@@ -3152,12 +3139,6 @@ var headingStyle = (color) => ({
3152
3139
  margin: "20px 0 8px",
3153
3140
  whiteSpace: "pre-line"
3154
3141
  });
3155
- var subtitleStyle = (color) => ({
3156
- fontSize: "0.84rem",
3157
- color,
3158
- margin: "0 0 24px",
3159
- lineHeight: 1.5
3160
- });
3161
3142
  var inputStyle2 = (tokens) => ({
3162
3143
  width: "100%",
3163
3144
  padding: "15px 16px",
@@ -3212,27 +3193,6 @@ var socialButtonStyle = (tokens) => ({
3212
3193
  fontFamily: "inherit",
3213
3194
  cursor: "pointer"
3214
3195
  });
3215
- var walletSectionStyle = {
3216
- textAlign: "center",
3217
- marginBottom: 8,
3218
- marginTop: 4
3219
- };
3220
- var walletLabelStyle = (color) => ({
3221
- fontSize: "0.78rem",
3222
- color,
3223
- display: "block",
3224
- marginBottom: 10
3225
- });
3226
- var walletLogosStyle = {
3227
- display: "flex",
3228
- justifyContent: "center",
3229
- gap: 16
3230
- };
3231
- var walletLogoImgStyle = {
3232
- width: 24,
3233
- height: 24,
3234
- objectFit: "contain"
3235
- };
3236
3196
  var avatarStyle = (tokens) => ({
3237
3197
  width: 28,
3238
3198
  height: 28,
@@ -3290,40 +3250,38 @@ function OtpVerifyScreen({
3290
3250
  });
3291
3251
  }, 1e3);
3292
3252
  }, [cooldown, onResend]);
3293
- return /* @__PURE__ */ jsxRuntime.jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {}), children: [
3294
- /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
3295
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle3, children: [
3296
- /* @__PURE__ */ jsxRuntime.jsx(IconCircle, { variant: "accent", size: 56, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
3297
- "path",
3298
- {
3299
- d: "M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z",
3300
- fill: tokens.accent
3301
- }
3302
- ) }) }),
3303
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle2(tokens.text), children: "Check your email" }),
3304
- /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle2(tokens.textSecondary), children: [
3305
- "We sent a 6-digit code to",
3306
- "\n",
3307
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: maskedIdentifier })
3308
- ] }),
3309
- error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle(tokens), children: error }),
3310
- /* @__PURE__ */ jsxRuntime.jsx(OtpInput, { value: otpCode, onChange: onOtpChange, disabled: verifying }),
3311
- /* @__PURE__ */ jsxRuntime.jsx(
3312
- "button",
3313
- {
3314
- type: "button",
3315
- onClick: handleResend,
3316
- disabled: cooldown > 0,
3317
- style: resendStyle(tokens.textMuted, cooldown > 0),
3318
- children: cooldown > 0 ? `Resend code in ${cooldown}s` : "Resend code"
3319
- }
3320
- ),
3321
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: actionStyle, children: [
3253
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3254
+ ScreenLayout,
3255
+ {
3256
+ footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3322
3257
  /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onVerify, disabled, loading: verifying, children: "Verify" }),
3323
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle(tokens.textMuted), children: "Didn't get the code? Check your spam folder" })
3324
- ] })
3325
- ] })
3326
- ] });
3258
+ /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
3259
+ ] }),
3260
+ children: [
3261
+ /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
3262
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle3, children: [
3263
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle2(tokens.text), children: "Confirm it is you" }),
3264
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle(tokens.textSecondary), children: [
3265
+ "We sent a 6-digit code to",
3266
+ "\n",
3267
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: maskedIdentifier })
3268
+ ] }),
3269
+ error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle(tokens), children: error }),
3270
+ /* @__PURE__ */ jsxRuntime.jsx(OtpInput, { value: otpCode, onChange: onOtpChange, disabled: verifying }),
3271
+ /* @__PURE__ */ jsxRuntime.jsx(
3272
+ "button",
3273
+ {
3274
+ type: "button",
3275
+ onClick: handleResend,
3276
+ disabled: cooldown > 0,
3277
+ style: resendStyle(tokens.textMuted, cooldown > 0),
3278
+ children: cooldown > 0 ? `Resend code in ${cooldown}s` : "Resend code"
3279
+ }
3280
+ )
3281
+ ] })
3282
+ ]
3283
+ }
3284
+ );
3327
3285
  }
3328
3286
  var contentStyle3 = {
3329
3287
  textAlign: "center",
@@ -3339,7 +3297,7 @@ var headingStyle2 = (color) => ({
3339
3297
  color,
3340
3298
  margin: "20px 0 8px"
3341
3299
  });
3342
- var subtitleStyle2 = (color) => ({
3300
+ var subtitleStyle = (color) => ({
3343
3301
  fontSize: "0.88rem",
3344
3302
  color,
3345
3303
  margin: "0 0 28px",
@@ -3369,16 +3327,6 @@ var resendStyle = (color, disabled) => ({
3369
3327
  padding: 0,
3370
3328
  opacity: disabled ? 0.6 : 1
3371
3329
  });
3372
- var actionStyle = {
3373
- width: "100%",
3374
- marginTop: 32
3375
- };
3376
- var hintStyle = (color) => ({
3377
- textAlign: "center",
3378
- fontSize: "0.78rem",
3379
- color,
3380
- margin: "12px 0 0"
3381
- });
3382
3330
  function PasskeyScreen({
3383
3331
  onCreatePasskey,
3384
3332
  onBack,
@@ -3389,7 +3337,7 @@ function PasskeyScreen({
3389
3337
  }) {
3390
3338
  const { tokens } = useSwypeConfig();
3391
3339
  const handleCreate = popupFallback && onCreatePasskeyViaPopup ? onCreatePasskeyViaPopup : onCreatePasskey;
3392
- const buttonLabel = popupFallback ? "Open passkey window" : "Create or verify passkey";
3340
+ const buttonLabel = popupFallback ? "Open passkey window" : "Verify PassKey";
3393
3341
  return /* @__PURE__ */ jsxRuntime.jsxs(
3394
3342
  ScreenLayout,
3395
3343
  {
@@ -3400,16 +3348,8 @@ function PasskeyScreen({
3400
3348
  children: [
3401
3349
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
3402
3350
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle4, children: [
3403
- /* @__PURE__ */ jsxRuntime.jsx(IconCircle, { variant: "accent", size: 64, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", children: [
3404
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "4", y: "4", width: "16", height: "16", rx: "3", stroke: tokens.accent, strokeWidth: "1.5", strokeDasharray: "3 2" }),
3405
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "9", cy: "10", r: "1", fill: tokens.accent }),
3406
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "15", cy: "10", r: "1", fill: tokens.accent }),
3407
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 14c0 1.5 1.34 2.5 3 2.5s3-1 3-2.5", stroke: tokens.accent, strokeWidth: "1.2", strokeLinecap: "round" })
3408
- ] }) }),
3409
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle3(tokens.text), children: "Create or verify your passkey" }),
3410
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle3(tokens.textSecondary), children: popupFallback ? "Your browser requires a separate window to continue. Tap the button below to continue." : "Use Face ID to sign in instantly \u2014 no passwords, no codes." }),
3411
- error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle2(tokens), children: error }),
3412
- /* @__PURE__ */ jsxRuntime.jsx(InfoBanner, { children: "Your passkey is stored securely on your device. Swype never sees your biometric data." })
3351
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
3352
+ error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle2(tokens), children: error })
3413
3353
  ] })
3414
3354
  ]
3415
3355
  }
@@ -3430,13 +3370,6 @@ var headingStyle3 = (color) => ({
3430
3370
  color,
3431
3371
  margin: "24px 0 8px"
3432
3372
  });
3433
- var subtitleStyle3 = (color) => ({
3434
- fontSize: "0.9rem",
3435
- color,
3436
- margin: "0 0 28px",
3437
- lineHeight: 1.5,
3438
- maxWidth: 280
3439
- });
3440
3373
  var errorBannerStyle2 = (tokens) => ({
3441
3374
  background: tokens.errorBg,
3442
3375
  border: `1px solid ${tokens.error}66`,
@@ -3505,6 +3438,8 @@ function WalletPickerScreen({
3505
3438
  }) {
3506
3439
  const { tokens } = useSwypeConfig();
3507
3440
  const [hoveredId, setHoveredId] = react.useState(null);
3441
+ const [selectedProviderId, setSelectedProviderId] = react.useState(null);
3442
+ const [cryptoExpanded, setCryptoExpanded] = react.useState(false);
3508
3443
  const hasPending = pendingConnections != null && pendingConnections.length > 0;
3509
3444
  const displayProviders = providers.length > 0 ? providers : [
3510
3445
  { id: "metamask", name: "MetaMask" },
@@ -3512,6 +3447,7 @@ function WalletPickerScreen({
3512
3447
  { id: "ora", name: "Ora" },
3513
3448
  { id: "phantom", name: "Phantom" }
3514
3449
  ];
3450
+ const selectedProvider = displayProviders.find((p) => p.id === selectedProviderId);
3515
3451
  if (loading) {
3516
3452
  return /* @__PURE__ */ jsxRuntime.jsxs(ScreenLayout, { children: [
3517
3453
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Set up Swype", onBack }),
@@ -3522,14 +3458,18 @@ function WalletPickerScreen({
3522
3458
  ScreenLayout,
3523
3459
  {
3524
3460
  footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3525
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle2(tokens.textMuted), children: "You'll set your deposit limit in your wallet app." }),
3461
+ selectedProvider && /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { onClick: () => onSelectProvider(selectedProvider.id), children: [
3462
+ "Open ",
3463
+ selectedProvider.name,
3464
+ " to Link"
3465
+ ] }),
3526
3466
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
3527
3467
  ] }),
3528
3468
  children: [
3529
3469
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Set up Swype", onBack }),
3530
3470
  hasPending && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3531
3471
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle4(tokens.text), children: "Continue where you left off" }),
3532
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle4(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
3472
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
3533
3473
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: pendingListStyle, children: pendingConnections.map((acct) => {
3534
3474
  const wallet = acct.wallets[0];
3535
3475
  const address = wallet ? truncateAddress(wallet.name) : void 0;
@@ -3568,21 +3508,41 @@ function WalletPickerScreen({
3568
3508
  }) }),
3569
3509
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: dividerStyle2(tokens.border), children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: dividerTextStyle(tokens.textMuted), children: "Or connect a new wallet" }) })
3570
3510
  ] }),
3571
- !hasPending && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3572
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle4(tokens.text), children: "Where are your stablecoins?" }),
3573
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle4(tokens.textSecondary), children: "Select the wallet you want to deposit from" })
3574
- ] }),
3575
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: gridStyle, children: displayProviders.map((p) => {
3511
+ !hasPending && /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle4(tokens.text), children: "Where is your money?" }),
3512
+ /* @__PURE__ */ jsxRuntime.jsxs(
3513
+ "button",
3514
+ {
3515
+ type: "button",
3516
+ onClick: () => setCryptoExpanded((v) => !v),
3517
+ style: categoryRowStyle(tokens, cryptoExpanded),
3518
+ children: [
3519
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: categoryLabelStyle, children: "Crypto Wallet" }),
3520
+ /* @__PURE__ */ jsxRuntime.jsx(
3521
+ "svg",
3522
+ {
3523
+ width: "18",
3524
+ height: "18",
3525
+ viewBox: "0 0 24 24",
3526
+ fill: "none",
3527
+ style: { transform: cryptoExpanded ? "rotate(180deg)" : "none", transition: "transform 0.2s ease" },
3528
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z", fill: "currentColor" })
3529
+ }
3530
+ )
3531
+ ]
3532
+ }
3533
+ ),
3534
+ cryptoExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { style: gridStyle, children: displayProviders.map((p) => {
3576
3535
  const logoSrc = "logoURI" in p && p.logoURI || KNOWN_LOGOS[p.name.toLowerCase()];
3577
3536
  const emoji = WALLET_EMOJIS[p.name.toLowerCase()] ?? p.name.charAt(0);
3537
+ const isSelected = selectedProviderId === p.id;
3578
3538
  const isHovered = hoveredId === p.id;
3579
3539
  return /* @__PURE__ */ jsxRuntime.jsxs(
3580
3540
  "button",
3581
3541
  {
3582
- onClick: () => onSelectProvider(p.id),
3542
+ onClick: () => setSelectedProviderId(p.id),
3583
3543
  onMouseEnter: () => setHoveredId(p.id),
3584
3544
  onMouseLeave: () => setHoveredId(null),
3585
- style: cardStyle(tokens, isHovered),
3545
+ style: cardStyle(tokens, isHovered, isSelected),
3586
3546
  children: [
3587
3547
  logoSrc ? /* @__PURE__ */ jsxRuntime.jsx(
3588
3548
  "img",
@@ -3597,7 +3557,11 @@ function WalletPickerScreen({
3597
3557
  },
3598
3558
  p.id
3599
3559
  );
3600
- }) })
3560
+ }) }),
3561
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: categoryRowStyle(tokens, false, true), children: [
3562
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: categoryLabelStyle, children: "Bank Account" }),
3563
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: comingSoonBadgeStyle(tokens), children: "Coming Soon" })
3564
+ ] })
3601
3565
  ]
3602
3566
  }
3603
3567
  );
@@ -3609,7 +3573,7 @@ var headingStyle4 = (color) => ({
3609
3573
  color,
3610
3574
  margin: "8px 0 4px"
3611
3575
  });
3612
- var subtitleStyle4 = (color) => ({
3576
+ var subtitleStyle2 = (color) => ({
3613
3577
  fontSize: "0.88rem",
3614
3578
  color,
3615
3579
  margin: "0 0 24px"
@@ -3617,9 +3581,11 @@ var subtitleStyle4 = (color) => ({
3617
3581
  var gridStyle = {
3618
3582
  display: "grid",
3619
3583
  gridTemplateColumns: "1fr 1fr",
3620
- gap: 12
3584
+ gap: 12,
3585
+ marginBottom: 12
3621
3586
  };
3622
- var cardStyle = (tokens, hovered) => ({
3587
+ var SELECTED_GREEN = "#22c55e";
3588
+ var cardStyle = (tokens, hovered, selected) => ({
3623
3589
  display: "flex",
3624
3590
  flexDirection: "column",
3625
3591
  alignItems: "center",
@@ -3627,11 +3593,12 @@ var cardStyle = (tokens, hovered) => ({
3627
3593
  gap: 8,
3628
3594
  padding: "20px 12px",
3629
3595
  background: hovered ? tokens.bgHover : tokens.bgInput,
3630
- border: `1.5px solid ${tokens.border}`,
3596
+ border: selected ? `2px solid ${SELECTED_GREEN}` : `1.5px solid ${tokens.border}`,
3597
+ boxShadow: selected ? `0 0 0 2px ${SELECTED_GREEN}44` : "none",
3631
3598
  borderRadius: 16,
3632
3599
  cursor: "pointer",
3633
3600
  fontFamily: "inherit",
3634
- transition: "background 0.15s ease",
3601
+ transition: "background 0.15s ease, border 0.15s ease, box-shadow 0.15s ease",
3635
3602
  outline: "none"
3636
3603
  });
3637
3604
  var emojiStyle = {
@@ -3649,11 +3616,36 @@ var nameStyle2 = (color) => ({
3649
3616
  fontWeight: 600,
3650
3617
  color
3651
3618
  });
3652
- var hintStyle2 = (color) => ({
3653
- textAlign: "center",
3654
- fontSize: "0.82rem",
3655
- color,
3656
- margin: "0 0 4px"
3619
+ var categoryRowStyle = (tokens, expanded, disabled) => ({
3620
+ display: "flex",
3621
+ alignItems: "center",
3622
+ justifyContent: "space-between",
3623
+ width: "100%",
3624
+ padding: "16px 18px",
3625
+ background: tokens.bgInput,
3626
+ border: `1.5px solid ${tokens.border}`,
3627
+ borderRadius: 14,
3628
+ cursor: disabled ? "default" : "pointer",
3629
+ fontFamily: "inherit",
3630
+ fontSize: "0.95rem",
3631
+ fontWeight: 600,
3632
+ color: disabled ? tokens.textMuted : tokens.text,
3633
+ opacity: disabled ? 0.6 : 1,
3634
+ outline: "none",
3635
+ marginBottom: expanded ? 12 : 12,
3636
+ boxSizing: "border-box"
3637
+ });
3638
+ var categoryLabelStyle = {
3639
+ lineHeight: 1
3640
+ };
3641
+ var comingSoonBadgeStyle = (tokens) => ({
3642
+ fontSize: "0.72rem",
3643
+ fontWeight: 600,
3644
+ color: tokens.textMuted,
3645
+ background: `${tokens.border}88`,
3646
+ padding: "3px 10px",
3647
+ borderRadius: 6,
3648
+ whiteSpace: "nowrap"
3657
3649
  });
3658
3650
  var pendingListStyle = {
3659
3651
  display: "flex",
@@ -3778,15 +3770,14 @@ function SetupScreen({
3778
3770
  onClick: () => onSetupOneTap(limit),
3779
3771
  disabled: loading,
3780
3772
  loading,
3781
- children: "Set up One-Tap"
3773
+ children: "Approve"
3782
3774
  }
3783
3775
  ),
3784
3776
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
3785
3777
  ] }),
3786
3778
  children: [
3787
3779
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Swype Setup", onBack, right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) }),
3788
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle5(tokens.text), children: "Set up One-Tap deposits" }),
3789
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle5(tokens.textSecondary), children: "Set your limit for instant deposits. Like a contactless card \u2014 you choose the max." }),
3780
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle5(tokens.text), children: "Set Spending Limit" }),
3790
3781
  error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle3(tokens), children: error }),
3791
3782
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: balanceRowStyle, children: [
3792
3783
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: balanceLeftStyle, children: [
@@ -3856,14 +3847,6 @@ function SetupScreen({
3856
3847
  ]
3857
3848
  }
3858
3849
  )
3859
- ] }),
3860
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: bannerWrapStyle, children: /* @__PURE__ */ jsxRuntime.jsx(InfoBanner, { children: "Funds stay in your wallet until you deposit. Swype never holds your money." }) }),
3861
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", style: linkStyle(tokens.accent), children: [
3862
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 6 }, children: [
3863
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }),
3864
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 16v-4M12 8h.01", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
3865
- ] }),
3866
- "How does this work?"
3867
3850
  ] })
3868
3851
  ]
3869
3852
  }
@@ -3876,12 +3859,6 @@ var headingStyle5 = (color) => ({
3876
3859
  color,
3877
3860
  margin: "8px 0 4px"
3878
3861
  });
3879
- var subtitleStyle5 = (color) => ({
3880
- fontSize: "0.86rem",
3881
- color,
3882
- margin: "0 0 24px",
3883
- lineHeight: 1.5
3884
- });
3885
3862
  var errorBannerStyle3 = (tokens) => ({
3886
3863
  background: tokens.errorBg,
3887
3864
  border: `1px solid ${tokens.error}66`,
@@ -3985,20 +3962,6 @@ var limitInputStyle = (color) => ({
3985
3962
  fontFamily: "inherit",
3986
3963
  padding: 0
3987
3964
  });
3988
- var bannerWrapStyle = { marginBottom: 16 };
3989
- var linkStyle = (color) => ({
3990
- background: "transparent",
3991
- border: "none",
3992
- color,
3993
- cursor: "pointer",
3994
- fontFamily: "inherit",
3995
- fontSize: "0.82rem",
3996
- fontWeight: 500,
3997
- display: "flex",
3998
- alignItems: "center",
3999
- padding: 0,
4000
- marginBottom: 16
4001
- });
4002
3965
  function SetupStatusScreen({
4003
3966
  complete,
4004
3967
  limit,
@@ -4463,14 +4426,14 @@ function SuccessScreen({
4463
4426
  amount.toFixed(2),
4464
4427
  " deposited"
4465
4428
  ] }),
4466
- merchantName && /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle6(tokens.textSecondary), children: [
4429
+ merchantName && /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle3(tokens.textSecondary), children: [
4467
4430
  "to ",
4468
4431
  merchantName
4469
4432
  ] })
4470
4433
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4471
4434
  /* @__PURE__ */ jsxRuntime.jsx(IconCircle, { variant: "error", size: 64, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z", fill: tokens.error }) }) }),
4472
4435
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle7(tokens.text), children: "Transfer failed" }),
4473
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle6(tokens.error), children: error })
4436
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle3(tokens.error), children: error })
4474
4437
  ] }),
4475
4438
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: summaryCardStyle(tokens), children: [
4476
4439
  sourceName && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: summaryRowStyle, children: [
@@ -4516,7 +4479,7 @@ var headingStyle7 = (color) => ({
4516
4479
  color,
4517
4480
  margin: "20px 0 4px"
4518
4481
  });
4519
- var subtitleStyle6 = (color) => ({
4482
+ var subtitleStyle3 = (color) => ({
4520
4483
  fontSize: "0.9rem",
4521
4484
  color,
4522
4485
  margin: "0 0 20px"
@@ -4624,7 +4587,7 @@ function SelectSourceScreen({
4624
4587
  right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout })
4625
4588
  }
4626
4589
  ),
4627
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle7(tokens.textMuted), children: "Choose which chain and token to pay from." }),
4590
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle4(tokens.textMuted), children: "Choose which chain and token to pay from." }),
4628
4591
  /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle2(tokens.textSecondary), children: "Chain" }),
4629
4592
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: optionListStyle, children: choices.map((chain) => {
4630
4593
  const isSelected = chain.chainName === selectedChainName;
@@ -4681,7 +4644,7 @@ function SelectSourceScreen({
4681
4644
  }
4682
4645
  );
4683
4646
  }
4684
- var subtitleStyle7 = (color) => ({
4647
+ var subtitleStyle4 = (color) => ({
4685
4648
  fontSize: "0.85rem",
4686
4649
  color,
4687
4650
  margin: "0 0 20px",
@@ -4797,7 +4760,7 @@ function AdvancedSourceScreen({
4797
4760
  }
4798
4761
  ),
4799
4762
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle8(tokens.text), children: "Set up One-Tap deposits" }),
4800
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
4763
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle5(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
4801
4764
  /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle3(tokens.textSecondary), children: "Select tokens to approve" }),
4802
4765
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: chainListStyle, children: choices.map((chain) => {
4803
4766
  const isExpanded = expandedChain === chain.chainName;
@@ -4867,7 +4830,7 @@ var headingStyle8 = (color) => ({
4867
4830
  color,
4868
4831
  margin: "8px 0 4px"
4869
4832
  });
4870
- var subtitleStyle8 = (color) => ({
4833
+ var subtitleStyle5 = (color) => ({
4871
4834
  fontSize: "0.86rem",
4872
4835
  color,
4873
4836
  margin: "0 0 20px",
@@ -5099,14 +5062,14 @@ function OpenWalletScreen({
5099
5062
  displayName
5100
5063
  ] }),
5101
5064
  error && onRetryStatus && /* @__PURE__ */ jsxRuntime.jsx(OutlineButton, { onClick: onRetryStatus, children: "Retry status check" }),
5102
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle3(tokens.textMuted), children: loading ? "Preparing authorization..." : error ? "Retry the status check after returning to the browser, or reopen your wallet if needed." : "If your wallet didn't open automatically, tap the button above" })
5065
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle(tokens.textMuted), children: loading ? "Preparing authorization..." : error ? "Retry the status check after returning to the browser, or reopen your wallet if needed." : "If your wallet didn't open automatically, tap the button above" })
5103
5066
  ] }),
5104
5067
  children: [
5105
5068
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack, right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) }),
5106
5069
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle8, children: [
5107
5070
  logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 48 }),
5108
5071
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
5109
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle9(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
5072
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle6(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
5110
5073
  !loading && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: waitingBadgeStyle(tokens), children: [
5111
5074
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 14 }),
5112
5075
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Waiting for authorization..." })
@@ -5143,7 +5106,7 @@ var headingStyle10 = (color) => ({
5143
5106
  color,
5144
5107
  margin: "20px 0 8px"
5145
5108
  });
5146
- var subtitleStyle9 = (color) => ({
5109
+ var subtitleStyle6 = (color) => ({
5147
5110
  fontSize: "0.9rem",
5148
5111
  color,
5149
5112
  margin: "0 0 24px",
@@ -5161,7 +5124,7 @@ var waitingBadgeStyle = (tokens) => ({
5161
5124
  color: tokens.textMuted,
5162
5125
  fontSize: "0.82rem"
5163
5126
  });
5164
- var hintStyle3 = (color) => ({
5127
+ var hintStyle = (color) => ({
5165
5128
  textAlign: "center",
5166
5129
  fontSize: "0.82rem",
5167
5130
  color,
@@ -5183,14 +5146,14 @@ function ConfirmSignScreen({
5183
5146
  footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5184
5147
  /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onSign, disabled: signing, children: signing ? "Confirming..." : "Confirm payment" }),
5185
5148
  error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: errorStyle2(tokens.textMuted), children: error }),
5186
- !error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle4(tokens.textMuted), children: "You may be prompted for biometric verification" })
5149
+ !error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle2(tokens.textMuted), children: "You may be prompted for biometric verification" })
5187
5150
  ] }),
5188
5151
  children: [
5189
5152
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { right: /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { onLogout }) }),
5190
5153
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle9, children: [
5191
5154
  logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 48 }),
5192
5155
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
5193
- /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle10(tokens.textSecondary), children: [
5156
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle7(tokens.textSecondary), children: [
5194
5157
  displayName,
5195
5158
  " approved the connection. Tap below to confirm your payment."
5196
5159
  ] }),
@@ -5225,7 +5188,7 @@ var headingStyle11 = (color) => ({
5225
5188
  color,
5226
5189
  margin: "20px 0 8px"
5227
5190
  });
5228
- var subtitleStyle10 = (color) => ({
5191
+ var subtitleStyle7 = (color) => ({
5229
5192
  fontSize: "0.9rem",
5230
5193
  color,
5231
5194
  margin: "0 0 24px",
@@ -5247,7 +5210,7 @@ var checkmarkStyle = {
5247
5210
  fontWeight: 700,
5248
5211
  fontSize: "0.9rem"
5249
5212
  };
5250
- var hintStyle4 = (color) => ({
5213
+ var hintStyle2 = (color) => ({
5251
5214
  textAlign: "center",
5252
5215
  fontSize: "0.82rem",
5253
5216
  color,
@@ -5322,7 +5285,7 @@ function TokenPickerScreen({
5322
5285
  ] }),
5323
5286
  children: [
5324
5287
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Select Token", onBack }),
5325
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle11(themeTokens.textSecondary), children: "Choose a token to deposit with. Tokens that haven't been authorized yet will require a one-time wallet approval." }),
5288
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle8(themeTokens.textSecondary), children: "Choose a token to deposit with. Tokens that haven't been authorized yet will require a one-time wallet approval." }),
5326
5289
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: chainListStyle2, children: [...chainGroups.entries()].map(([chainName, chainEntries]) => {
5327
5290
  const isExpanded = expandedChain === chainName;
5328
5291
  const chainTotal = chainEntries.reduce((sum, e) => sum + e.balance, 0);
@@ -5378,7 +5341,7 @@ function TokenPickerScreen({
5378
5341
  }
5379
5342
  );
5380
5343
  }
5381
- var subtitleStyle11 = (color) => ({
5344
+ var subtitleStyle8 = (color) => ({
5382
5345
  fontSize: "0.86rem",
5383
5346
  color,
5384
5347
  margin: "0 0 20px",