@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.d.cts CHANGED
@@ -838,6 +838,17 @@ declare function guestEntryMatchingRecommended(balances: GuestBalanceOptionInput
838
838
  tokenAddress: string;
839
839
  }): GuestTokenEntry | null;
840
840
 
841
+ /**
842
+ * Best-effort UI label for device biometrics (Face ID, Touch ID, Windows Hello, etc.).
843
+ * The web platform does not expose the exact modality; this uses coarse `userAgent`
844
+ * detection only — synchronous so it can run during render with no effects.
845
+ */
846
+ /**
847
+ * Returns short copy for passkey / biometric prompts based on the current environment.
848
+ * Does not call WebAuthn (no async); suitable for direct use in render.
849
+ */
850
+ declare function getDeviceBiometricUnlockText(): string;
851
+
841
852
  interface ScreenLayoutProps {
842
853
  children: ReactNode;
843
854
  /** Content pinned to the bottom of the screen (buttons, footer) */
@@ -1180,7 +1191,7 @@ interface SuccessScreenProps {
1180
1191
  merchantName?: string;
1181
1192
  sourceName?: string;
1182
1193
  remainingLimit?: number | null;
1183
- onDone: () => void;
1194
+ onDone?: () => void;
1184
1195
  onLogout?: () => void;
1185
1196
  onIncreaseLimits?: () => void;
1186
1197
  onManageAccount?: () => void;
@@ -1330,4 +1341,4 @@ declare const BLINK_LOGO: string;
1330
1341
  /** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
1331
1342
  declare const BLINK_MASCOT: string;
1332
1343
 
1333
- export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
1344
+ export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getDeviceBiometricUnlockText, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
package/dist/index.d.ts CHANGED
@@ -838,6 +838,17 @@ declare function guestEntryMatchingRecommended(balances: GuestBalanceOptionInput
838
838
  tokenAddress: string;
839
839
  }): GuestTokenEntry | null;
840
840
 
841
+ /**
842
+ * Best-effort UI label for device biometrics (Face ID, Touch ID, Windows Hello, etc.).
843
+ * The web platform does not expose the exact modality; this uses coarse `userAgent`
844
+ * detection only — synchronous so it can run during render with no effects.
845
+ */
846
+ /**
847
+ * Returns short copy for passkey / biometric prompts based on the current environment.
848
+ * Does not call WebAuthn (no async); suitable for direct use in render.
849
+ */
850
+ declare function getDeviceBiometricUnlockText(): string;
851
+
841
852
  interface ScreenLayoutProps {
842
853
  children: ReactNode;
843
854
  /** Content pinned to the bottom of the screen (buttons, footer) */
@@ -1180,7 +1191,7 @@ interface SuccessScreenProps {
1180
1191
  merchantName?: string;
1181
1192
  sourceName?: string;
1182
1193
  remainingLimit?: number | null;
1183
- onDone: () => void;
1194
+ onDone?: () => void;
1184
1195
  onLogout?: () => void;
1185
1196
  onIncreaseLimits?: () => void;
1186
1197
  onManageAccount?: () => void;
@@ -1330,4 +1341,4 @@ declare const BLINK_LOGO: string;
1330
1341
  /** @deprecated Use BLINK_LOGO instead. Kept for backward compatibility. */
1331
1342
  declare const BLINK_MASCOT: string;
1332
1343
 
1333
- export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
1344
+ export { type Account, type ActionExecutionResult, type AdvancedSettings, AdvancedSourceScreen, type Amount, type AuthorizationAction, type AuthorizationSession, AuthorizationSessionCancelledError, type AuthorizationSessionDetail, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, type BlinkPaymentProps, BlinkProvider, type BlinkProviderProps, type Chain, ConfirmSignScreen, DepositScreen, type Destination, type ErrorResponse, type FlowPhase, FlowPhaseProvider, type GuestBalanceOptionInput, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, type GuestTokenEntry, GuestTokenPickerScreen, type GuestTransferFee, IconCircle, InfoBanner, type ListResponse, LoginScreen, type MerchantAuthorization, type MerchantPublicKey, type MobileFlowState, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, type PaymentPhase, PoweredByFooter, type PreciseMoney, PrimaryButton, type Provider, ScreenHeader, ScreenLayout, type ScreenName, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, type SetupTokenOption, type SourceOption, type SourceSelection, type SourceType, Spinner, type StepItem, StepList, SuccessScreen, type ThemeMode, type ThemeTokens, type TokenBalance, TokenPickerScreen, type Transfer, type TransferDestination, type TransferPhase, TransferStatusScreen, type UserConfig, VerifyPasskeyScreen, type Wallet, WalletPickerScreen, type WalletSource, type WalletToken, api as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getDeviceBiometricUnlockText, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
package/dist/index.js CHANGED
@@ -4042,7 +4042,7 @@ function WalletPickerScreen({
4042
4042
  },
4043
4043
  loading: connecting || preparing,
4044
4044
  disabled: preparing,
4045
- children: preparing ? "Preparing..." : `Open ${selectedProvider.name} to Link`
4045
+ children: preparing ? "Preparing..." : `Open ${selectedProvider.name} to Deposit`
4046
4046
  }
4047
4047
  ),
4048
4048
  /* @__PURE__ */ jsx(PoweredByFooter, {})
@@ -4916,8 +4916,7 @@ function isPreciseMoneyNonPositive(fee) {
4916
4916
  return Number.isFinite(n) && n <= 0;
4917
4917
  }
4918
4918
  function formatNonPositiveFeeDisplay(fee) {
4919
- if (fee.currency === "USD") return "Under $0.01";
4920
- return `Less than 0.01 ${fee.currency}`;
4919
+ return "< $0.01";
4921
4920
  }
4922
4921
  function formatPreciseMoneyForDisplay(fee) {
4923
4922
  const raw = fee.value.trim();
@@ -5099,7 +5098,7 @@ function DepositScreen({
5099
5098
  return /* @__PURE__ */ jsx("div", { style: feeRowContainerStyle, "aria-live": "polite", children: /* @__PURE__ */ jsx("span", { style: feeRowLabelStyle(tokens.textMuted), children: "Getting fee estimate\u2026" }) });
5100
5099
  }
5101
5100
  if (quoteFee) {
5102
- const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay(quoteFee) : formatPreciseMoneyForDisplay(quoteFee);
5101
+ const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay() : formatPreciseMoneyForDisplay(quoteFee);
5103
5102
  return /* @__PURE__ */ jsxs("div", { style: feeRowContainerStyle, "aria-live": "polite", children: [
5104
5103
  /* @__PURE__ */ jsx("span", { style: feeRowLabelStyle(tokens.textMuted), children: "Fee estimate: " }),
5105
5104
  /* @__PURE__ */ jsx("span", { style: feeRowAmountStyle(tokens.textSecondary), children: feeText })
@@ -5540,6 +5539,25 @@ var feeRowAmountStyle = (color) => ({
5540
5539
  color,
5541
5540
  fontVariantNumeric: "tabular-nums"
5542
5541
  });
5542
+
5543
+ // src/deviceBiometricUnlockText.ts
5544
+ var FALLBACK = "Biometric verification";
5545
+ function getDeviceBiometricUnlockText() {
5546
+ const ua = typeof navigator !== "undefined" && typeof navigator.userAgent === "string" ? navigator.userAgent : "";
5547
+ if (/iPhone|iPad|iPod/i.test(ua)) {
5548
+ return "Face ID or Touch ID";
5549
+ }
5550
+ if (/Android/i.test(ua)) {
5551
+ return "Fingerprint or face unlock";
5552
+ }
5553
+ if (/Windows NT/i.test(ua)) {
5554
+ return "Windows Hello";
5555
+ }
5556
+ if (/Macintosh|Mac OS X/i.test(ua)) {
5557
+ return "Touch ID";
5558
+ }
5559
+ return FALLBACK;
5560
+ }
5543
5561
  function SuccessScreen({
5544
5562
  amount,
5545
5563
  currency: _currency,
@@ -5561,9 +5579,9 @@ function SuccessScreen({
5561
5579
  {
5562
5580
  footer: /* @__PURE__ */ jsxs(Fragment, { children: [
5563
5581
  isGuestDepositSuccess ? /* @__PURE__ */ jsxs(Fragment, { children: [
5564
- /* @__PURE__ */ jsx(PrimaryButton, { onClick: onPreauthorize, children: "Set up one tap" }),
5565
- /* @__PURE__ */ jsx("button", { type: "button", onClick: onDone, style: skipButtonStyle(tokens.textMuted), children: "Return to app" })
5566
- ] }) : /* @__PURE__ */ jsx(PrimaryButton, { onClick: onDone, children: succeeded ? "Done" : "Try again" }),
5582
+ /* @__PURE__ */ jsx(PrimaryButton, { onClick: onPreauthorize, children: "Setup" }),
5583
+ onDone && /* @__PURE__ */ jsx("button", { type: "button", onClick: onDone, style: skipButtonStyle(tokens.textMuted), children: "Return to app" })
5584
+ ] }) : onDone ? /* @__PURE__ */ jsx(PrimaryButton, { onClick: onDone, children: succeeded ? "Done" : "Try again" }) : null,
5567
5585
  onManageAccount && /* @__PURE__ */ jsx("button", { type: "button", onClick: onManageAccount, style: manageStyle(tokens.textMuted), children: "Manage Blink account \u2192" }),
5568
5586
  /* @__PURE__ */ jsx(PoweredByFooter, {})
5569
5587
  ] }),
@@ -5571,13 +5589,17 @@ function SuccessScreen({
5571
5589
  /* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
5572
5590
  /* @__PURE__ */ jsxs("div", { style: screenContentStyle, children: [
5573
5591
  isGuestDepositSuccess ? /* @__PURE__ */ jsxs("div", { style: contentStyleCompact, children: [
5574
- /* @__PURE__ */ jsxs("h2", { style: headingStyle7(tokens.text), children: [
5575
- "$",
5576
- amount.toFixed(2),
5577
- " deposited"
5592
+ /* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.text), children: "Success" }),
5593
+ /* @__PURE__ */ jsxs("p", { style: headingStyle7(tokens.text), children: [
5594
+ "Make next time ",
5595
+ /* @__PURE__ */ jsx("br", {}),
5596
+ " faster \u2014 and free"
5578
5597
  ] }),
5579
- /* @__PURE__ */ jsx("p", { style: { ...subtitleStyle7(tokens.text), fontWeight: 600, margin: "0 0 8px" }, children: "Next time, do it in one tap" }),
5580
- /* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Set up one tap for this wallet and skip the extra steps." })
5598
+ /* @__PURE__ */ jsxs("p", { style: subtitleStyle7(tokens.textSecondary), children: [
5599
+ "Future deposits are just ",
5600
+ getDeviceBiometricUnlockText(),
5601
+ " and go."
5602
+ ] })
5581
5603
  ] }) : succeeded ? /* @__PURE__ */ jsxs("div", { style: contentStyleCompact, children: [
5582
5604
  /* @__PURE__ */ jsxs("h2", { style: headingStyle7(tokens.text), children: [
5583
5605
  "$",
@@ -6737,7 +6759,7 @@ function GuestTokenPickerScreen({
6737
6759
  return /* @__PURE__ */ jsx("div", { style: feeRowContainerStyle2, "aria-live": "polite", children: /* @__PURE__ */ jsx("span", { style: feeRowLabelStyle2(t.textMuted), children: "Getting fee estimate\u2026" }) });
6738
6760
  }
6739
6761
  if (quoteFee) {
6740
- const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay(quoteFee) : formatPreciseMoneyForDisplay(quoteFee);
6762
+ const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay() : formatPreciseMoneyForDisplay(quoteFee);
6741
6763
  return /* @__PURE__ */ jsxs("div", { style: feeRowContainerStyle2, "aria-live": "polite", children: [
6742
6764
  /* @__PURE__ */ jsx("span", { style: feeRowLabelStyle2(t.textMuted), children: "Fee estimate: " }),
6743
6765
  /* @__PURE__ */ jsx("span", { style: feeRowAmountStyle2(t.textSecondary), children: feeText })
@@ -11213,6 +11235,6 @@ function BlinkPaymentInner({
11213
11235
  );
11214
11236
  }
11215
11237
 
11216
- export { AdvancedSourceScreen, AuthorizationSessionCancelledError, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, BlinkProvider, ConfirmSignScreen, DepositScreen, FlowPhaseProvider, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, GuestTokenPickerScreen, IconCircle, InfoBanner, LoginScreen, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, PoweredByFooter, PrimaryButton, ScreenHeader, ScreenLayout, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, Spinner, StepList, SuccessScreen, TokenPickerScreen, TransferStatusScreen, VerifyPasskeyScreen, WalletPickerScreen, api_exports as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
11238
+ export { AdvancedSourceScreen, AuthorizationSessionCancelledError, BLINK_LOGO, BLINK_MASCOT, BlinkLoadingScreen, BlinkPayment, BlinkProvider, ConfirmSignScreen, DepositScreen, FlowPhaseProvider, GuestPreauthLinkingScreen, GuestPreauthSetupCompleteScreen, GuestTokenPickerScreen, IconCircle, InfoBanner, LoginScreen, OpenWalletScreen, OtpVerifyScreen, OutlineButton, PasskeyIframeBlockedError, PasskeyScreen, PoweredByFooter, PrimaryButton, ScreenHeader, ScreenLayout, SelectSourceScreen, SettingsMenu, SetupScreen, SetupStatusScreen, Spinner, StepList, SuccessScreen, TokenPickerScreen, TransferStatusScreen, VerifyPasskeyScreen, WalletPickerScreen, api_exports as blinkApi, buildPasskeyPopupOptions, createPasskeyCredential, createPasskeyViaPopup, darkTheme, deviceHasPasskey, findDevicePasskey, findDevicePasskeyViaPopup, getDeviceBiometricUnlockText, getTheme, guestEntryMatchingRecommended, isAuthorizationSessionCancelled, isUserDismissedAuthorizationError, lightTheme, mapGuestPickerEntries, resolvePasskeyRpId, screenForPhase, useAuthorizationExecutor, useBlinkConfig, useBlinkDepositAmount, useTransferPolling, useTransferSigning };
11217
11239
  //# sourceMappingURL=index.js.map
11218
11240
  //# sourceMappingURL=index.js.map