@swype-org/react-sdk 0.2.224 → 0.2.226

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
@@ -10951,10 +10951,7 @@ function DepositOptionsScreen({
10951
10951
  name: "Connect Wallet",
10952
10952
  icon: /* @__PURE__ */ jsx(WalletIcon, { color: tokens.text }),
10953
10953
  onClick: onFromWallet,
10954
- right: /* @__PURE__ */ jsxs("span", { style: badgeWithArrowStyle, children: [
10955
- /* @__PURE__ */ jsx(RecommendedBadge, { tokens }),
10956
- /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M9 6l6 6-6 6", stroke: tokens.textMuted, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
10957
- ] })
10954
+ right: /* @__PURE__ */ jsx("span", { style: badgeWithArrowStyle, children: /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M9 6l6 6-6 6", stroke: tokens.textMuted, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
10958
10955
  }
10959
10956
  ),
10960
10957
  /* @__PURE__ */ jsx(
@@ -10987,9 +10984,6 @@ function DepositTypeToggle({ tokens }) {
10987
10984
  function ComingSoonBadge({ tokens }) {
10988
10985
  return /* @__PURE__ */ jsx("span", { style: comingSoonBadgeStyle(tokens.bgRecessed, tokens.textMuted), children: "Coming soon" });
10989
10986
  }
10990
- function RecommendedBadge({ tokens }) {
10991
- return /* @__PURE__ */ jsx("span", { style: recommendedBadgeStyle(tokens.successBg, tokens.success), children: "Recommended" });
10992
- }
10993
10987
  function WalletIcon({ color }) {
10994
10988
  return /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
10995
10989
  /* @__PURE__ */ jsx(
@@ -11150,19 +11144,6 @@ var badgeWithArrowStyle = {
11150
11144
  display: "flex",
11151
11145
  alignItems: "center"
11152
11146
  };
11153
- var recommendedBadgeStyle = (bg, color) => ({
11154
- display: "inline-flex",
11155
- alignItems: "center",
11156
- justifyContent: "center",
11157
- background: bg,
11158
- color,
11159
- fontSize: 10,
11160
- fontWeight: 500,
11161
- lineHeight: 1,
11162
- padding: "4px 8px",
11163
- borderRadius: 8,
11164
- whiteSpace: "nowrap"
11165
- });
11166
11147
  var linkIconImageStyle = (color) => ({
11167
11148
  width: 24,
11168
11149
  height: 24,
@@ -11294,7 +11275,7 @@ function AmountTooLowScreen({
11294
11275
  }
11295
11276
  );
11296
11277
  }
11297
- var DEFAULT_PRESETS = [50, 100, 200, 500];
11278
+ var DEFAULT_PRESETS = [5, 25, 100, 250];
11298
11279
  function EnterAmountScreen({
11299
11280
  value,
11300
11281
  onDigit,
@@ -11871,7 +11852,7 @@ function PasskeyPopupWelcomeScreen({
11871
11852
  ) }),
11872
11853
  /* @__PURE__ */ jsx("h2", { style: headingStyle5(tokens.text), children: "Try the better way\nto deposit" }),
11873
11854
  /* @__PURE__ */ jsx("p", { style: subtitleStyle3(tokens.textSecondary), children: "From your wallet, to any app, in one tap." }),
11874
- error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle3(tokens), children: error })
11855
+ error && false
11875
11856
  ] })
11876
11857
  ]
11877
11858
  }
@@ -11927,17 +11908,6 @@ var footerButtonStyle = {
11927
11908
  paddingTop: 48,
11928
11909
  paddingBottom: 36
11929
11910
  };
11930
- var errorBannerStyle3 = (tokens) => ({
11931
- background: tokens.errorBg,
11932
- border: `1px solid ${tokens.error}66`,
11933
- borderRadius: 16,
11934
- padding: "11px 14px",
11935
- color: tokens.error,
11936
- fontSize: "0.84rem",
11937
- lineHeight: 1.5,
11938
- width: "100%",
11939
- textAlign: "left"
11940
- });
11941
11911
  function PasskeyReadyScreen({
11942
11912
  onLinkWallet,
11943
11913
  onBack,
@@ -12041,7 +12011,7 @@ function VerifyPasskeyScreen({
12041
12011
  ] }) }),
12042
12012
  /* @__PURE__ */ jsx("h2", { style: headingStyle7(tokens.text), children: "Verify your passkey" }),
12043
12013
  /* @__PURE__ */ jsx("p", { style: subtitleStyle5(tokens.textSecondary), children: subtitle }),
12044
- error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle4(tokens), children: error }),
12014
+ error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle3(tokens), children: error }),
12045
12015
  /* @__PURE__ */ jsx(InfoBanner, { children: "Your passkey is stored securely on your device. Blink never sees your biometric data." })
12046
12016
  ] })
12047
12017
  ]
@@ -12070,7 +12040,7 @@ var subtitleStyle5 = (color) => ({
12070
12040
  lineHeight: 1.5,
12071
12041
  maxWidth: 280
12072
12042
  });
12073
- var errorBannerStyle4 = (tokens) => ({
12043
+ var errorBannerStyle3 = (tokens) => ({
12074
12044
  background: tokens.errorBg,
12075
12045
  border: `1px solid ${tokens.error}66`,
12076
12046
  borderRadius: 16,
@@ -12424,7 +12394,7 @@ function WalletPickerScreen({
12424
12394
  }
12425
12395
  ),
12426
12396
  /* @__PURE__ */ jsx("h1", { style: titleStyle3(tokens.text), children: "Link wallet" }),
12427
- error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle5(tokens), children: error }),
12397
+ error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle4(tokens), children: error }),
12428
12398
  /* @__PURE__ */ jsx("div", { style: sheetStackStyle, children: /* @__PURE__ */ jsx("div", { style: cardStyle2(tokens.bgCardTranslucent), children: showOtherWallets ? /* @__PURE__ */ jsx(
12429
12399
  OtherWalletsPanel,
12430
12400
  {
@@ -12735,7 +12705,7 @@ var loadingWrapperStyle = {
12735
12705
  alignItems: "center",
12736
12706
  justifyContent: "center"
12737
12707
  };
12738
- var errorBannerStyle5 = (tokens) => ({
12708
+ var errorBannerStyle4 = (tokens) => ({
12739
12709
  background: tokens.errorBg,
12740
12710
  border: `1px solid ${tokens.error}66`,
12741
12711
  borderRadius: 16,
@@ -12892,7 +12862,7 @@ function SetupScreen({
12892
12862
  ),
12893
12863
  /* @__PURE__ */ jsx("h2", { style: headingStyle8(tokens.text), children: "Next time deposit\nUSDC in one tap" }),
12894
12864
  /* @__PURE__ */ jsx("p", { style: subtitleStyle6(tokens.textSecondary), children: "Set a cap for passkey deposits.\nYou always stay in control." }),
12895
- error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle6(tokens), children: error }),
12865
+ error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle5(tokens), children: error }),
12896
12866
  /* @__PURE__ */ jsx("div", { style: chipsRowStyle, children: PRESETS.map(({ label, value }) => {
12897
12867
  const active = selectedPreset === value;
12898
12868
  return /* @__PURE__ */ jsx(
@@ -12982,7 +12952,7 @@ var chipStyle = (themeTokens, active) => ({
12982
12952
  color: active ? themeTokens.accentText : themeTokens.text,
12983
12953
  whiteSpace: "nowrap"
12984
12954
  });
12985
- var errorBannerStyle6 = (themeTokens) => ({
12955
+ var errorBannerStyle5 = (themeTokens) => ({
12986
12956
  background: themeTokens.errorBg,
12987
12957
  border: `1px solid ${themeTokens.error}66`,
12988
12958
  borderRadius: 16,
@@ -12993,217 +12963,6 @@ var errorBannerStyle6 = (themeTokens) => ({
12993
12963
  width: "100%",
12994
12964
  textAlign: "left"
12995
12965
  });
12996
- function ManualTransferPasskeyScreen({
12997
- onCreatePasskey,
12998
- loading = false,
12999
- error,
13000
- onBack,
13001
- onClose
13002
- }) {
13003
- const { tokens } = useBlinkConfig();
13004
- return /* @__PURE__ */ jsxs("div", { style: containerStyle8(tokens), children: [
13005
- onBack && /* @__PURE__ */ jsx(
13006
- "button",
13007
- {
13008
- type: "button",
13009
- onClick: onBack,
13010
- "aria-label": "Go back",
13011
- style: { ...navButtonStyle(tokens.bgRecessed, tokens.text), left: 16 },
13012
- children: /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
13013
- "path",
13014
- {
13015
- d: "M15 18l-6-6 6-6",
13016
- stroke: "currentColor",
13017
- strokeWidth: "2",
13018
- strokeLinecap: "round",
13019
- strokeLinejoin: "round"
13020
- }
13021
- ) })
13022
- }
13023
- ),
13024
- onClose && /* @__PURE__ */ jsx(
13025
- "button",
13026
- {
13027
- type: "button",
13028
- onClick: onClose,
13029
- "aria-label": "Close",
13030
- style: { ...navButtonStyle(tokens.bgRecessed, tokens.text), right: 16 },
13031
- children: /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
13032
- "path",
13033
- {
13034
- d: "M6 6l12 12M18 6L6 18",
13035
- stroke: "currentColor",
13036
- strokeWidth: "2",
13037
- strokeLinecap: "round",
13038
- strokeLinejoin: "round"
13039
- }
13040
- ) })
13041
- }
13042
- ),
13043
- /* @__PURE__ */ jsxs("div", { style: contentStyle11, children: [
13044
- /* @__PURE__ */ jsxs("div", { style: heroStyle, children: [
13045
- /* @__PURE__ */ jsx(
13046
- "img",
13047
- {
13048
- src: FACE_ID_ILLUSTRATION,
13049
- alt: "",
13050
- "aria-hidden": "true",
13051
- style: illustrationStyle4
13052
- }
13053
- ),
13054
- /* @__PURE__ */ jsxs("div", { style: copyStackStyle, children: [
13055
- /* @__PURE__ */ jsx("h2", { style: headingStyle9(tokens.text), children: "Next time deposit USDC\nin one tap" }),
13056
- /* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.text), children: "Set up once and never bother\nwith QR codes again" }),
13057
- error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle7(tokens), children: error })
13058
- ] })
13059
- ] }),
13060
- /* @__PURE__ */ jsxs(
13061
- "button",
13062
- {
13063
- type: "button",
13064
- onClick: onCreatePasskey,
13065
- disabled: loading,
13066
- style: ctaStyle(tokens, loading),
13067
- children: [
13068
- !loading && /* @__PURE__ */ jsx(
13069
- "img",
13070
- {
13071
- src: BLINK_QR_LOGO,
13072
- alt: "",
13073
- "aria-hidden": "true",
13074
- style: ctaIconStyle
13075
- }
13076
- ),
13077
- "Create Blink Passkey"
13078
- ]
13079
- }
13080
- )
13081
- ] })
13082
- ] });
13083
- }
13084
- var containerStyle8 = (tokens) => ({
13085
- position: "relative",
13086
- display: "flex",
13087
- flexDirection: "column",
13088
- width: "100%",
13089
- maxWidth: 420,
13090
- height: "100%",
13091
- margin: "0 auto",
13092
- overflow: "hidden",
13093
- borderRadius: tokens.radiusLg,
13094
- background: tokens.bgCard,
13095
- backdropFilter: "blur(16px)",
13096
- WebkitBackdropFilter: "blur(16px)",
13097
- fontFamily: tokens.fontFamily,
13098
- boxSizing: "border-box"
13099
- });
13100
- var contentStyle11 = {
13101
- flex: 1,
13102
- minHeight: 0,
13103
- display: "flex",
13104
- flexDirection: "column",
13105
- justifyContent: "space-between",
13106
- alignItems: "center",
13107
- padding: "80px 32px 32px",
13108
- gap: 32,
13109
- boxSizing: "border-box"
13110
- };
13111
- var heroStyle = {
13112
- flex: 1,
13113
- minHeight: 0,
13114
- display: "flex",
13115
- flexDirection: "column",
13116
- justifyContent: "center",
13117
- alignItems: "center",
13118
- gap: 32,
13119
- width: "100%"
13120
- };
13121
- var illustrationStyle4 = {
13122
- width: 200,
13123
- height: 200,
13124
- objectFit: "contain",
13125
- display: "block"
13126
- };
13127
- var copyStackStyle = {
13128
- display: "flex",
13129
- flexDirection: "column",
13130
- alignItems: "center",
13131
- gap: 16,
13132
- width: "100%",
13133
- textAlign: "center"
13134
- };
13135
- var headingStyle9 = (color) => ({
13136
- margin: 0,
13137
- color,
13138
- fontSize: 24,
13139
- fontWeight: 700,
13140
- lineHeight: 1,
13141
- letterSpacing: 0,
13142
- whiteSpace: "pre-line"
13143
- });
13144
- var subtitleStyle7 = (color) => ({
13145
- margin: 0,
13146
- color,
13147
- fontSize: 16,
13148
- fontWeight: 400,
13149
- lineHeight: 1.25,
13150
- whiteSpace: "pre-line"
13151
- });
13152
- var ctaStyle = (tokens, disabled) => ({
13153
- display: "flex",
13154
- alignItems: "center",
13155
- justifyContent: "center",
13156
- gap: 8,
13157
- width: "100%",
13158
- height: 56,
13159
- padding: "4px 24px",
13160
- border: "none",
13161
- borderRadius: 36,
13162
- background: `linear-gradient(180deg, ${tokens.accent}, ${tokens.accentHover})`,
13163
- color: tokens.accentText,
13164
- fontSize: 20,
13165
- fontWeight: 700,
13166
- fontFamily: "inherit",
13167
- cursor: disabled ? "default" : "pointer",
13168
- opacity: disabled ? 0.5 : 1,
13169
- transition: "opacity 0.15s ease",
13170
- boxSizing: "border-box"
13171
- });
13172
- var ctaIconStyle = {
13173
- width: 32,
13174
- height: 32,
13175
- objectFit: "contain",
13176
- display: "block",
13177
- borderRadius: 8
13178
- };
13179
- var navButtonStyle = (bg, color) => ({
13180
- position: "absolute",
13181
- top: 16,
13182
- zIndex: 1,
13183
- width: 44,
13184
- height: 44,
13185
- border: "none",
13186
- borderRadius: 40,
13187
- background: bg,
13188
- color,
13189
- display: "flex",
13190
- alignItems: "center",
13191
- justifyContent: "center",
13192
- cursor: "pointer",
13193
- padding: 0
13194
- });
13195
- var errorBannerStyle7 = (tokens) => ({
13196
- width: "100%",
13197
- borderRadius: 16,
13198
- padding: "11px 14px",
13199
- background: tokens.errorBg,
13200
- border: `1px solid ${tokens.error}66`,
13201
- color: tokens.error,
13202
- fontSize: "0.84rem",
13203
- lineHeight: 1.5,
13204
- textAlign: "left",
13205
- boxSizing: "border-box"
13206
- });
13207
12966
  function SetupSelectDepositSourceScreen({
13208
12967
  tokenOptions,
13209
12968
  selectedTokenSymbol,
@@ -14384,7 +14143,7 @@ function SelectSourceScreen({
14384
14143
  /* @__PURE__ */ jsxs("div", { style: optionContentStyle, children: [
14385
14144
  /* @__PURE__ */ jsxs("span", { style: optionNameStyle(tokens.text), children: [
14386
14145
  chain.chainName,
14387
- isRecommended && /* @__PURE__ */ jsx("span", { style: recommendedBadgeStyle2(tokens.textMuted), children: " recommended" })
14146
+ isRecommended && /* @__PURE__ */ jsx("span", { style: recommendedBadgeStyle(tokens.textMuted), children: " recommended" })
14388
14147
  ] }),
14389
14148
  /* @__PURE__ */ jsxs("span", { style: optionBalanceStyle(tokens.textMuted), children: [
14390
14149
  "$",
@@ -14480,7 +14239,7 @@ var optionNameStyle = (color) => ({
14480
14239
  fontWeight: 600,
14481
14240
  color
14482
14241
  });
14483
- var recommendedBadgeStyle2 = (color) => ({
14242
+ var recommendedBadgeStyle = (color) => ({
14484
14243
  fontSize: "0.7rem",
14485
14244
  fontWeight: 500,
14486
14245
  color,
@@ -14780,7 +14539,7 @@ function TransferStatusLayout({
14780
14539
  onLogout && /* @__PURE__ */ jsx("div", { style: menuOverlayStyle, children: /* @__PURE__ */ jsx(SettingsMenu, { onLogout }) }),
14781
14540
  /* @__PURE__ */ jsxs("div", { style: contentStyle16, children: [
14782
14541
  /* @__PURE__ */ jsx("h2", { style: headingStyle13(tokens.text), children: heading }),
14783
- visibleError && /* @__PURE__ */ jsx("div", { style: errorBannerStyle8(tokens), children: visibleError }),
14542
+ visibleError && /* @__PURE__ */ jsx("div", { style: errorBannerStyle7(tokens), children: visibleError }),
14784
14543
  children
14785
14544
  ] })
14786
14545
  ] })
@@ -14881,7 +14640,7 @@ var headingStyle13 = (color) => ({
14881
14640
  margin: 0,
14882
14641
  textAlign: "center"
14883
14642
  });
14884
- var errorBannerStyle8 = (tokens) => ({
14643
+ var errorBannerStyle7 = (tokens) => ({
14885
14644
  background: tokens.errorBg,
14886
14645
  border: `1px solid ${tokens.error}66`,
14887
14646
  borderRadius: 16,
@@ -15867,7 +15626,7 @@ function GuestTokenPickerScreen({
15867
15626
  /* @__PURE__ */ jsx(ScreenHeader, { onBack }),
15868
15627
  /* @__PURE__ */ jsxs("div", { style: contentStyle20, children: [
15869
15628
  /* @__PURE__ */ jsx("h2", { style: headingStyle16(tokens.text), children: title }),
15870
- error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle9(tokens), children: error }),
15629
+ error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle8(tokens), children: error }),
15871
15630
  entries2.length === 0 ? /* @__PURE__ */ jsx("p", { style: subtitleStyle13(tokens.textMuted), children: emptyMessage ?? "No tokens available." }) : /* @__PURE__ */ jsxs(Fragment, { children: [
15872
15631
  /* @__PURE__ */ jsx("label", { style: labelStyle7(tokens.textSecondary), children: "Token" }),
15873
15632
  /* @__PURE__ */ jsx(
@@ -16039,7 +15798,7 @@ var presetButtonStyle = (themeTokens, active) => ({
16039
15798
  background: active ? `${themeTokens.accent}22` : "transparent",
16040
15799
  color: themeTokens.text
16041
15800
  });
16042
- var errorBannerStyle9 = (themeTokens) => ({
15801
+ var errorBannerStyle8 = (themeTokens) => ({
16043
15802
  background: themeTokens.errorBg,
16044
15803
  border: `1px solid ${themeTokens.error}66`,
16045
15804
  borderRadius: 12,
@@ -16140,7 +15899,7 @@ function ManualTransferFlow({
16140
15899
  );
16141
15900
  } else if (screen === "deposit-complete") {
16142
15901
  const transferAmount = Number(session?.deliveredAmountUsd ?? session?.minAmountUsd ?? 0);
16143
- screenContent = passkeyCreated ? /* @__PURE__ */ jsx(
15902
+ screenContent = /* @__PURE__ */ jsx(
16144
15903
  SuccessScreen,
16145
15904
  {
16146
15905
  amount: transferAmount,
@@ -16149,16 +15908,7 @@ function ManualTransferFlow({
16149
15908
  onDone: onDismiss,
16150
15909
  onLogout
16151
15910
  }
16152
- ) : /* @__PURE__ */ jsx(
16153
- ManualTransferPasskeyScreen,
16154
- {
16155
- onCreatePasskey: onCreatePasskey ?? (() => void 0),
16156
- loading: createPasskeyLoading,
16157
- error: createPasskeyError,
16158
- onBack,
16159
- onClose: onDismiss ?? onLogout
16160
- }
16161
- );
15911
+ ) ;
16162
15912
  } else if (screen === "deposit-failed") {
16163
15913
  screenContent = /* @__PURE__ */ jsx(
16164
15914
  BlinkErrorScreen,