@swype-org/react-sdk 0.1.190 → 0.1.192

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.js CHANGED
@@ -2285,18 +2285,30 @@ function StepProgress({ phase }) {
2285
2285
  return /* @__PURE__ */ jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotStyle });
2286
2286
  }
2287
2287
  return /* @__PURE__ */ jsxs("div", { style: containerStyle3, children: [
2288
- /* @__PURE__ */ jsx("span", { style: dotStyle(tokens.accent) }),
2289
- /* @__PURE__ */ jsx("span", { style: labelStyle(tokens.text), children: "Link" }),
2288
+ /* @__PURE__ */ jsxs("div", { style: sectionStyle("flex-end"), children: [
2289
+ /* @__PURE__ */ jsx("span", { style: labelStyle(tokens.text), children: "Link" }),
2290
+ /* @__PURE__ */ jsx("span", { style: dotStyle(tokens.accent) })
2291
+ ] }),
2290
2292
  /* @__PURE__ */ jsx("span", { style: lineStyle(tokens.textMuted) }),
2291
- /* @__PURE__ */ jsx("span", { style: dotStyle(tokens.textMuted) }),
2292
- /* @__PURE__ */ jsx("span", { style: labelStyle(tokens.textMuted), children: "Deposit" })
2293
+ /* @__PURE__ */ jsxs("div", { style: sectionStyle("flex-start"), children: [
2294
+ /* @__PURE__ */ jsx("span", { style: dotStyle(tokens.textMuted) }),
2295
+ /* @__PURE__ */ jsx("span", { style: labelStyle(tokens.textMuted), children: "Deposit" })
2296
+ ] })
2293
2297
  ] });
2294
2298
  }
2295
2299
  var containerStyle3 = {
2296
2300
  display: "flex",
2297
2301
  alignItems: "center",
2298
- gap: 6
2302
+ gap: 6,
2303
+ width: "100%"
2299
2304
  };
2305
+ var sectionStyle = (justify) => ({
2306
+ flex: 1,
2307
+ display: "flex",
2308
+ alignItems: "center",
2309
+ justifyContent: justify,
2310
+ gap: 6
2311
+ });
2300
2312
  var dotStyle = (color) => ({
2301
2313
  width: 8,
2302
2314
  height: 8,
@@ -2453,19 +2465,16 @@ var badgeStyle = (color) => ({
2453
2465
  });
2454
2466
  function PoweredByFooter() {
2455
2467
  const { tokens } = useSwypeConfig();
2456
- return /* @__PURE__ */ jsxs("div", { style: containerStyle5(tokens.textMuted), children: [
2457
- /* @__PURE__ */ jsxs("div", { style: rowStyle, children: [
2458
- /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
2459
- "path",
2460
- {
2461
- d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM12 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3-9H9V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2z",
2462
- fill: "currentColor"
2463
- }
2464
- ) }),
2465
- /* @__PURE__ */ jsx("span", { children: "Powered by Blink" })
2466
- ] }),
2467
- /* @__PURE__ */ jsx("span", { style: pillStyle(tokens.textMuted, tokens.border), children: "Beta Version" })
2468
- ] });
2468
+ return /* @__PURE__ */ jsx("div", { style: containerStyle5(tokens.textMuted), children: /* @__PURE__ */ jsxs("div", { style: rowStyle, children: [
2469
+ /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
2470
+ "path",
2471
+ {
2472
+ d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM12 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3-9H9V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2z",
2473
+ fill: "currentColor"
2474
+ }
2475
+ ) }),
2476
+ /* @__PURE__ */ jsx("span", { children: "Powered by Blink" })
2477
+ ] }) });
2469
2478
  }
2470
2479
  var containerStyle5 = (color) => ({
2471
2480
  display: "flex",
@@ -2482,14 +2491,6 @@ var rowStyle = {
2482
2491
  alignItems: "center",
2483
2492
  gap: 6
2484
2493
  };
2485
- var pillStyle = (color, border) => ({
2486
- fontSize: "0.65rem",
2487
- fontWeight: 600,
2488
- padding: "2px 8px",
2489
- borderRadius: 999,
2490
- border: `1px solid ${border}`,
2491
- color
2492
- });
2493
2494
  function PrimaryButton({ children, onClick, disabled, loading, icon }) {
2494
2495
  const { tokens } = useSwypeConfig();
2495
2496
  const isDisabled = disabled || loading;
@@ -2509,7 +2510,7 @@ function PrimaryButton({ children, onClick, disabled, loading, icon }) {
2509
2510
  }
2510
2511
  var buttonStyle = (tokens, disabled) => ({
2511
2512
  width: "100%",
2512
- padding: "16px 24px",
2513
+ padding: "18px 24px",
2513
2514
  background: `linear-gradient(180deg, ${tokens.accent}, ${tokens.accentHover})`,
2514
2515
  color: tokens.accentText,
2515
2516
  border: "none",
@@ -2520,7 +2521,7 @@ var buttonStyle = (tokens, disabled) => ({
2520
2521
  opacity: disabled ? 0.5 : 1,
2521
2522
  transition: "filter 0.15s ease, transform 0.15s ease",
2522
2523
  fontFamily: "inherit",
2523
- boxShadow: "0 8px 18px rgba(178, 255, 147, 0.35)",
2524
+ boxShadow: "0 6px 20px rgba(178, 255, 147, 0.25)",
2524
2525
  display: "flex",
2525
2526
  alignItems: "center",
2526
2527
  justifyContent: "center",
@@ -3098,6 +3099,7 @@ function PasskeyScreen({
3098
3099
  /* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
3099
3100
  /* @__PURE__ */ jsxs("div", { style: contentStyle4, children: [
3100
3101
  /* @__PURE__ */ jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
3102
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "This enables secure one-tap deposits on this device" }),
3101
3103
  error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle2(tokens), children: error })
3102
3104
  ] })
3103
3105
  ]
@@ -3119,6 +3121,12 @@ var headingStyle3 = (color) => ({
3119
3121
  color,
3120
3122
  margin: "24px 0 8px"
3121
3123
  });
3124
+ var subtitleStyle2 = (color) => ({
3125
+ fontSize: "0.86rem",
3126
+ color,
3127
+ margin: "0 0 20px",
3128
+ lineHeight: 1.5
3129
+ });
3122
3130
  var errorBannerStyle2 = (tokens) => ({
3123
3131
  background: tokens.errorBg,
3124
3132
  border: `1px solid ${tokens.error}66`,
@@ -3256,7 +3264,7 @@ function WalletPickerScreen({
3256
3264
  /* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack, onLogout }),
3257
3265
  hasPending && /* @__PURE__ */ jsxs(Fragment, { children: [
3258
3266
  /* @__PURE__ */ jsx("h2", { style: headingStyle4(tokens.text), children: "Continue where you left off" }),
3259
- /* @__PURE__ */ jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
3267
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle3(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
3260
3268
  /* @__PURE__ */ jsx("div", { style: pendingListStyle, children: pendingConnections.map((acct) => {
3261
3269
  const wallet = acct.wallets[0];
3262
3270
  const address = wallet ? truncateAddress(wallet.name) : void 0;
@@ -3360,7 +3368,7 @@ var headingStyle4 = (color) => ({
3360
3368
  color,
3361
3369
  margin: "8px 0 4px"
3362
3370
  });
3363
- var subtitleStyle2 = (color) => ({
3371
+ var subtitleStyle3 = (color) => ({
3364
3372
  fontSize: "0.88rem",
3365
3373
  color,
3366
3374
  margin: "0 0 24px"
@@ -3762,7 +3770,7 @@ function SetupStatusScreen({
3762
3770
  /* @__PURE__ */ jsxs("div", { style: contentStyle5, children: [
3763
3771
  /* @__PURE__ */ jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotStyle2 }),
3764
3772
  /* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Done!" }),
3765
- /* @__PURE__ */ jsx("p", { style: subtitleStyle3(tokens.textSecondary), children: "Return to the app to try one-tap deposits." })
3773
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle4(tokens.textSecondary), children: "Return to the app to try one-tap deposits." })
3766
3774
  ] })
3767
3775
  ] });
3768
3776
  }
@@ -3801,7 +3809,7 @@ var headingStyle6 = (color) => ({
3801
3809
  color,
3802
3810
  margin: "20px 0 8px"
3803
3811
  });
3804
- var subtitleStyle3 = (color) => ({
3812
+ var subtitleStyle4 = (color) => ({
3805
3813
  fontSize: "0.9rem",
3806
3814
  color,
3807
3815
  margin: "0 0 28px",
@@ -4378,14 +4386,14 @@ function SuccessScreen({
4378
4386
  amount.toFixed(2),
4379
4387
  " deposited"
4380
4388
  ] }),
4381
- merchantName && /* @__PURE__ */ jsxs("p", { style: subtitleStyle4(tokens.textSecondary), children: [
4389
+ merchantName && /* @__PURE__ */ jsxs("p", { style: subtitleStyle5(tokens.textSecondary), children: [
4382
4390
  "to ",
4383
4391
  merchantName
4384
4392
  ] })
4385
4393
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
4386
4394
  /* @__PURE__ */ jsx(IconCircle, { variant: "error", size: 64, children: /* @__PURE__ */ jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ 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 }) }) }),
4387
4395
  /* @__PURE__ */ jsx("h2", { style: headingStyle7(tokens.text), children: "Transfer failed" }),
4388
- error && /* @__PURE__ */ jsx("p", { style: subtitleStyle4(tokens.error), children: error })
4396
+ error && /* @__PURE__ */ jsx("p", { style: subtitleStyle5(tokens.error), children: error })
4389
4397
  ] }),
4390
4398
  /* @__PURE__ */ jsxs("div", { style: summaryCardStyle(tokens), children: [
4391
4399
  sourceName && /* @__PURE__ */ jsxs("div", { style: summaryRowStyle, children: [
@@ -4431,7 +4439,7 @@ var headingStyle7 = (color) => ({
4431
4439
  color,
4432
4440
  margin: "20px 0 4px"
4433
4441
  });
4434
- var subtitleStyle4 = (color) => ({
4442
+ var subtitleStyle5 = (color) => ({
4435
4443
  fontSize: "0.9rem",
4436
4444
  color,
4437
4445
  margin: "0 0 20px"
@@ -4539,7 +4547,7 @@ function SelectSourceScreen({
4539
4547
  onLogout
4540
4548
  }
4541
4549
  ),
4542
- /* @__PURE__ */ jsx("p", { style: subtitleStyle5(tokens.textMuted), children: "Choose which chain and token to pay from." }),
4550
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle6(tokens.textMuted), children: "Choose which chain and token to pay from." }),
4543
4551
  /* @__PURE__ */ jsx("label", { style: labelStyle3(tokens.textSecondary), children: "Chain" }),
4544
4552
  /* @__PURE__ */ jsx("div", { style: optionListStyle, children: choices.map((chain) => {
4545
4553
  const isSelected = chain.chainName === selectedChainName;
@@ -4596,7 +4604,7 @@ function SelectSourceScreen({
4596
4604
  }
4597
4605
  );
4598
4606
  }
4599
- var subtitleStyle5 = (color) => ({
4607
+ var subtitleStyle6 = (color) => ({
4600
4608
  fontSize: "0.85rem",
4601
4609
  color,
4602
4610
  margin: "0 0 20px",
@@ -4712,7 +4720,7 @@ function AdvancedSourceScreen({
4712
4720
  }
4713
4721
  ),
4714
4722
  /* @__PURE__ */ jsx("h2", { style: headingStyle8(tokens.text), children: "Set up One-Tap deposits" }),
4715
- /* @__PURE__ */ jsx("p", { style: subtitleStyle6(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
4723
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
4716
4724
  /* @__PURE__ */ jsx("label", { style: labelStyle4(tokens.textSecondary), children: "Select tokens to approve" }),
4717
4725
  /* @__PURE__ */ jsx("div", { style: chainListStyle, children: choices.map((chain) => {
4718
4726
  const isExpanded = expandedChain === chain.chainName;
@@ -4782,7 +4790,7 @@ var headingStyle8 = (color) => ({
4782
4790
  color,
4783
4791
  margin: "8px 0 4px"
4784
4792
  });
4785
- var subtitleStyle6 = (color) => ({
4793
+ var subtitleStyle7 = (color) => ({
4786
4794
  fontSize: "0.86rem",
4787
4795
  color,
4788
4796
  margin: "0 0 20px",
@@ -5016,7 +5024,7 @@ function OpenWalletScreen({
5016
5024
  displayName,
5017
5025
  "..."
5018
5026
  ] }),
5019
- /* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Approve the connection in your wallet extension." }),
5027
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: "Approve the connection in your wallet extension." }),
5020
5028
  /* @__PURE__ */ jsxs("div", { style: waitingBadgeStyle(tokens), children: [
5021
5029
  /* @__PURE__ */ jsx(Spinner, { size: 14 }),
5022
5030
  /* @__PURE__ */ jsx("span", { children: "Waiting for authorization..." })
@@ -5045,7 +5053,7 @@ function OpenWalletScreen({
5045
5053
  /* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
5046
5054
  /* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
5047
5055
  /* @__PURE__ */ jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
5048
- /* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
5056
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
5049
5057
  !loading && /* @__PURE__ */ jsxs("div", { style: waitingBadgeStyle(tokens), children: [
5050
5058
  /* @__PURE__ */ jsx(Spinner, { size: 14 }),
5051
5059
  /* @__PURE__ */ jsx("span", { children: "Waiting for authorization..." })
@@ -5092,7 +5100,7 @@ var headingStyle10 = (color) => ({
5092
5100
  color,
5093
5101
  margin: "20px 0 8px"
5094
5102
  });
5095
- var subtitleStyle7 = (color) => ({
5103
+ var subtitleStyle8 = (color) => ({
5096
5104
  fontSize: "0.9rem",
5097
5105
  color,
5098
5106
  margin: "0 0 24px",
@@ -5144,7 +5152,7 @@ function ConfirmSignScreen({
5144
5152
  /* @__PURE__ */ jsxs("div", { style: contentStyle9, children: [
5145
5153
  logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
5146
5154
  /* @__PURE__ */ jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
5147
- /* @__PURE__ */ jsxs("p", { style: subtitleStyle8(tokens.textSecondary), children: [
5155
+ /* @__PURE__ */ jsxs("p", { style: subtitleStyle9(tokens.textSecondary), children: [
5148
5156
  displayName,
5149
5157
  " approved the connection. Tap below to confirm your payment."
5150
5158
  ] }),
@@ -5179,7 +5187,7 @@ var headingStyle11 = (color) => ({
5179
5187
  color,
5180
5188
  margin: "20px 0 8px"
5181
5189
  });
5182
- var subtitleStyle8 = (color) => ({
5190
+ var subtitleStyle9 = (color) => ({
5183
5191
  fontSize: "0.9rem",
5184
5192
  color,
5185
5193
  margin: "0 0 24px",