@swype-org/react-sdk 0.1.333 → 0.1.339

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
@@ -4045,7 +4045,7 @@ function WalletPickerScreen({
4045
4045
  },
4046
4046
  loading: connecting || preparing,
4047
4047
  disabled: preparing,
4048
- children: preparing ? "Preparing..." : `Open ${selectedProvider.name} to Link`
4048
+ children: preparing ? "Preparing..." : `Open ${selectedProvider.name} to Deposit`
4049
4049
  }
4050
4050
  ),
4051
4051
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
@@ -4919,8 +4919,7 @@ function isPreciseMoneyNonPositive(fee) {
4919
4919
  return Number.isFinite(n) && n <= 0;
4920
4920
  }
4921
4921
  function formatNonPositiveFeeDisplay(fee) {
4922
- if (fee.currency === "USD") return "Under $0.01";
4923
- return `Less than 0.01 ${fee.currency}`;
4922
+ return "< $0.01";
4924
4923
  }
4925
4924
  function formatPreciseMoneyForDisplay(fee) {
4926
4925
  const raw = fee.value.trim();
@@ -5102,7 +5101,7 @@ function DepositScreen({
5102
5101
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: feeRowContainerStyle, "aria-live": "polite", children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: feeRowLabelStyle(tokens.textMuted), children: "Getting fee estimate\u2026" }) });
5103
5102
  }
5104
5103
  if (quoteFee) {
5105
- const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay(quoteFee) : formatPreciseMoneyForDisplay(quoteFee);
5104
+ const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay() : formatPreciseMoneyForDisplay(quoteFee);
5106
5105
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: feeRowContainerStyle, "aria-live": "polite", children: [
5107
5106
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: feeRowLabelStyle(tokens.textMuted), children: "Fee estimate: " }),
5108
5107
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: feeRowAmountStyle(tokens.textSecondary), children: feeText })
@@ -5543,6 +5542,25 @@ var feeRowAmountStyle = (color) => ({
5543
5542
  color,
5544
5543
  fontVariantNumeric: "tabular-nums"
5545
5544
  });
5545
+
5546
+ // src/deviceBiometricUnlockText.ts
5547
+ var FALLBACK = "Biometric verification";
5548
+ function getDeviceBiometricUnlockText() {
5549
+ const ua = typeof navigator !== "undefined" && typeof navigator.userAgent === "string" ? navigator.userAgent : "";
5550
+ if (/iPhone|iPad|iPod/i.test(ua)) {
5551
+ return "Face ID or Touch ID";
5552
+ }
5553
+ if (/Android/i.test(ua)) {
5554
+ return "Fingerprint or face unlock";
5555
+ }
5556
+ if (/Windows NT/i.test(ua)) {
5557
+ return "Windows Hello";
5558
+ }
5559
+ if (/Macintosh|Mac OS X/i.test(ua)) {
5560
+ return "Touch ID";
5561
+ }
5562
+ return FALLBACK;
5563
+ }
5546
5564
  function SuccessScreen({
5547
5565
  amount,
5548
5566
  currency: _currency,
@@ -5564,9 +5582,9 @@ function SuccessScreen({
5564
5582
  {
5565
5583
  footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5566
5584
  isGuestDepositSuccess ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5567
- /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onPreauthorize, children: "Set up one tap" }),
5568
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onDone, style: skipButtonStyle(tokens.textMuted), children: "Return to app" })
5569
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onDone, children: succeeded ? "Done" : "Try again" }),
5585
+ /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onPreauthorize, children: "Setup" }),
5586
+ onDone && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onDone, style: skipButtonStyle(tokens.textMuted), children: "Return to app" })
5587
+ ] }) : onDone ? /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onDone, children: succeeded ? "Done" : "Try again" }) : null,
5570
5588
  onManageAccount && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onManageAccount, style: manageStyle(tokens.textMuted), children: "Manage Blink account \u2192" }),
5571
5589
  /* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
5572
5590
  ] }),
@@ -5574,13 +5592,17 @@ function SuccessScreen({
5574
5592
  /* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onLogout }),
5575
5593
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: screenContentStyle, children: [
5576
5594
  isGuestDepositSuccess ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyleCompact, children: [
5577
- /* @__PURE__ */ jsxRuntime.jsxs("h2", { style: headingStyle7(tokens.text), children: [
5578
- "$",
5579
- amount.toFixed(2),
5580
- " deposited"
5595
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle7(tokens.text), children: "Success" }),
5596
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: headingStyle7(tokens.text), children: [
5597
+ "Make next time ",
5598
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
5599
+ " faster \u2014 and free"
5581
5600
  ] }),
5582
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { ...subtitleStyle7(tokens.text), fontWeight: 600, margin: "0 0 8px" }, children: "Next time, do it in one tap" }),
5583
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Set up one tap for this wallet and skip the extra steps." })
5601
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle7(tokens.textSecondary), children: [
5602
+ "Future deposits are just ",
5603
+ getDeviceBiometricUnlockText(),
5604
+ " and go."
5605
+ ] })
5584
5606
  ] }) : succeeded ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyleCompact, children: [
5585
5607
  /* @__PURE__ */ jsxRuntime.jsxs("h2", { style: headingStyle7(tokens.text), children: [
5586
5608
  "$",
@@ -6740,7 +6762,7 @@ function GuestTokenPickerScreen({
6740
6762
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: feeRowContainerStyle2, "aria-live": "polite", children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: feeRowLabelStyle2(t.textMuted), children: "Getting fee estimate\u2026" }) });
6741
6763
  }
6742
6764
  if (quoteFee) {
6743
- const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay(quoteFee) : formatPreciseMoneyForDisplay(quoteFee);
6765
+ const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay() : formatPreciseMoneyForDisplay(quoteFee);
6744
6766
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: feeRowContainerStyle2, "aria-live": "polite", children: [
6745
6767
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: feeRowLabelStyle2(t.textMuted), children: "Fee estimate: " }),
6746
6768
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: feeRowAmountStyle2(t.textSecondary), children: feeText })
@@ -11260,6 +11282,7 @@ exports.darkTheme = darkTheme;
11260
11282
  exports.deviceHasPasskey = deviceHasPasskey;
11261
11283
  exports.findDevicePasskey = findDevicePasskey;
11262
11284
  exports.findDevicePasskeyViaPopup = findDevicePasskeyViaPopup;
11285
+ exports.getDeviceBiometricUnlockText = getDeviceBiometricUnlockText;
11263
11286
  exports.getTheme = getTheme;
11264
11287
  exports.guestEntryMatchingRecommended = guestEntryMatchingRecommended;
11265
11288
  exports.isAuthorizationSessionCancelled = isAuthorizationSessionCancelled;