@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.cjs +52 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +52 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2288,18 +2288,30 @@ function StepProgress({ phase }) {
|
|
|
2288
2288
|
return /* @__PURE__ */ jsxRuntime.jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotStyle });
|
|
2289
2289
|
}
|
|
2290
2290
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle3, children: [
|
|
2291
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2292
|
-
|
|
2291
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: sectionStyle("flex-end"), children: [
|
|
2292
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: labelStyle(tokens.text), children: "Link" }),
|
|
2293
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: dotStyle(tokens.accent) })
|
|
2294
|
+
] }),
|
|
2293
2295
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: lineStyle(tokens.textMuted) }),
|
|
2294
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2295
|
-
|
|
2296
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: sectionStyle("flex-start"), children: [
|
|
2297
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: dotStyle(tokens.textMuted) }),
|
|
2298
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: labelStyle(tokens.textMuted), children: "Deposit" })
|
|
2299
|
+
] })
|
|
2296
2300
|
] });
|
|
2297
2301
|
}
|
|
2298
2302
|
var containerStyle3 = {
|
|
2299
2303
|
display: "flex",
|
|
2300
2304
|
alignItems: "center",
|
|
2301
|
-
gap: 6
|
|
2305
|
+
gap: 6,
|
|
2306
|
+
width: "100%"
|
|
2302
2307
|
};
|
|
2308
|
+
var sectionStyle = (justify) => ({
|
|
2309
|
+
flex: 1,
|
|
2310
|
+
display: "flex",
|
|
2311
|
+
alignItems: "center",
|
|
2312
|
+
justifyContent: justify,
|
|
2313
|
+
gap: 6
|
|
2314
|
+
});
|
|
2303
2315
|
var dotStyle = (color) => ({
|
|
2304
2316
|
width: 8,
|
|
2305
2317
|
height: 8,
|
|
@@ -2456,19 +2468,16 @@ var badgeStyle = (color) => ({
|
|
|
2456
2468
|
});
|
|
2457
2469
|
function PoweredByFooter() {
|
|
2458
2470
|
const { tokens } = useSwypeConfig();
|
|
2459
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
2460
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
] }),
|
|
2470
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: pillStyle(tokens.textMuted, tokens.border), children: "Beta Version" })
|
|
2471
|
-
] });
|
|
2471
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: containerStyle5(tokens.textMuted), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
|
|
2472
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2473
|
+
"path",
|
|
2474
|
+
{
|
|
2475
|
+
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",
|
|
2476
|
+
fill: "currentColor"
|
|
2477
|
+
}
|
|
2478
|
+
) }),
|
|
2479
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Powered by Blink" })
|
|
2480
|
+
] }) });
|
|
2472
2481
|
}
|
|
2473
2482
|
var containerStyle5 = (color) => ({
|
|
2474
2483
|
display: "flex",
|
|
@@ -2485,14 +2494,6 @@ var rowStyle = {
|
|
|
2485
2494
|
alignItems: "center",
|
|
2486
2495
|
gap: 6
|
|
2487
2496
|
};
|
|
2488
|
-
var pillStyle = (color, border) => ({
|
|
2489
|
-
fontSize: "0.65rem",
|
|
2490
|
-
fontWeight: 600,
|
|
2491
|
-
padding: "2px 8px",
|
|
2492
|
-
borderRadius: 999,
|
|
2493
|
-
border: `1px solid ${border}`,
|
|
2494
|
-
color
|
|
2495
|
-
});
|
|
2496
2497
|
function PrimaryButton({ children, onClick, disabled, loading, icon }) {
|
|
2497
2498
|
const { tokens } = useSwypeConfig();
|
|
2498
2499
|
const isDisabled = disabled || loading;
|
|
@@ -2512,7 +2513,7 @@ function PrimaryButton({ children, onClick, disabled, loading, icon }) {
|
|
|
2512
2513
|
}
|
|
2513
2514
|
var buttonStyle = (tokens, disabled) => ({
|
|
2514
2515
|
width: "100%",
|
|
2515
|
-
padding: "
|
|
2516
|
+
padding: "18px 24px",
|
|
2516
2517
|
background: `linear-gradient(180deg, ${tokens.accent}, ${tokens.accentHover})`,
|
|
2517
2518
|
color: tokens.accentText,
|
|
2518
2519
|
border: "none",
|
|
@@ -2523,7 +2524,7 @@ var buttonStyle = (tokens, disabled) => ({
|
|
|
2523
2524
|
opacity: disabled ? 0.5 : 1,
|
|
2524
2525
|
transition: "filter 0.15s ease, transform 0.15s ease",
|
|
2525
2526
|
fontFamily: "inherit",
|
|
2526
|
-
boxShadow: "0
|
|
2527
|
+
boxShadow: "0 6px 20px rgba(178, 255, 147, 0.25)",
|
|
2527
2528
|
display: "flex",
|
|
2528
2529
|
alignItems: "center",
|
|
2529
2530
|
justifyContent: "center",
|
|
@@ -3101,6 +3102,7 @@ function PasskeyScreen({
|
|
|
3101
3102
|
/* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack, onLogout }),
|
|
3102
3103
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle4, children: [
|
|
3103
3104
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
|
|
3105
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "This enables secure one-tap deposits on this device" }),
|
|
3104
3106
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle2(tokens), children: error })
|
|
3105
3107
|
] })
|
|
3106
3108
|
]
|
|
@@ -3122,6 +3124,12 @@ var headingStyle3 = (color) => ({
|
|
|
3122
3124
|
color,
|
|
3123
3125
|
margin: "24px 0 8px"
|
|
3124
3126
|
});
|
|
3127
|
+
var subtitleStyle2 = (color) => ({
|
|
3128
|
+
fontSize: "0.86rem",
|
|
3129
|
+
color,
|
|
3130
|
+
margin: "0 0 20px",
|
|
3131
|
+
lineHeight: 1.5
|
|
3132
|
+
});
|
|
3125
3133
|
var errorBannerStyle2 = (tokens) => ({
|
|
3126
3134
|
background: tokens.errorBg,
|
|
3127
3135
|
border: `1px solid ${tokens.error}66`,
|
|
@@ -3259,7 +3267,7 @@ function WalletPickerScreen({
|
|
|
3259
3267
|
/* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { title: "Set up Swype", onBack, onLogout }),
|
|
3260
3268
|
hasPending && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3261
3269
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle4(tokens.text), children: "Continue where you left off" }),
|
|
3262
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style:
|
|
3270
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle3(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
|
|
3263
3271
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: pendingListStyle, children: pendingConnections.map((acct) => {
|
|
3264
3272
|
const wallet = acct.wallets[0];
|
|
3265
3273
|
const address = wallet ? truncateAddress(wallet.name) : void 0;
|
|
@@ -3363,7 +3371,7 @@ var headingStyle4 = (color) => ({
|
|
|
3363
3371
|
color,
|
|
3364
3372
|
margin: "8px 0 4px"
|
|
3365
3373
|
});
|
|
3366
|
-
var
|
|
3374
|
+
var subtitleStyle3 = (color) => ({
|
|
3367
3375
|
fontSize: "0.88rem",
|
|
3368
3376
|
color,
|
|
3369
3377
|
margin: "0 0 24px"
|
|
@@ -3765,7 +3773,7 @@ function SetupStatusScreen({
|
|
|
3765
3773
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle5, children: [
|
|
3766
3774
|
/* @__PURE__ */ jsxRuntime.jsx("img", { src: SWYPE_MASCOT, alt: "Swype", style: mascotStyle2 }),
|
|
3767
3775
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle6(tokens.text), children: "Done!" }),
|
|
3768
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style:
|
|
3776
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle4(tokens.textSecondary), children: "Return to the app to try one-tap deposits." })
|
|
3769
3777
|
] })
|
|
3770
3778
|
] });
|
|
3771
3779
|
}
|
|
@@ -3804,7 +3812,7 @@ var headingStyle6 = (color) => ({
|
|
|
3804
3812
|
color,
|
|
3805
3813
|
margin: "20px 0 8px"
|
|
3806
3814
|
});
|
|
3807
|
-
var
|
|
3815
|
+
var subtitleStyle4 = (color) => ({
|
|
3808
3816
|
fontSize: "0.9rem",
|
|
3809
3817
|
color,
|
|
3810
3818
|
margin: "0 0 28px",
|
|
@@ -4381,14 +4389,14 @@ function SuccessScreen({
|
|
|
4381
4389
|
amount.toFixed(2),
|
|
4382
4390
|
" deposited"
|
|
4383
4391
|
] }),
|
|
4384
|
-
merchantName && /* @__PURE__ */ jsxRuntime.jsxs("p", { style:
|
|
4392
|
+
merchantName && /* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle5(tokens.textSecondary), children: [
|
|
4385
4393
|
"to ",
|
|
4386
4394
|
merchantName
|
|
4387
4395
|
] })
|
|
4388
4396
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4389
4397
|
/* @__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 }) }) }),
|
|
4390
4398
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle7(tokens.text), children: "Transfer failed" }),
|
|
4391
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("p", { style:
|
|
4399
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle5(tokens.error), children: error })
|
|
4392
4400
|
] }),
|
|
4393
4401
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: summaryCardStyle(tokens), children: [
|
|
4394
4402
|
sourceName && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: summaryRowStyle, children: [
|
|
@@ -4434,7 +4442,7 @@ var headingStyle7 = (color) => ({
|
|
|
4434
4442
|
color,
|
|
4435
4443
|
margin: "20px 0 4px"
|
|
4436
4444
|
});
|
|
4437
|
-
var
|
|
4445
|
+
var subtitleStyle5 = (color) => ({
|
|
4438
4446
|
fontSize: "0.9rem",
|
|
4439
4447
|
color,
|
|
4440
4448
|
margin: "0 0 20px"
|
|
@@ -4542,7 +4550,7 @@ function SelectSourceScreen({
|
|
|
4542
4550
|
onLogout
|
|
4543
4551
|
}
|
|
4544
4552
|
),
|
|
4545
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style:
|
|
4553
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle6(tokens.textMuted), children: "Choose which chain and token to pay from." }),
|
|
4546
4554
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle3(tokens.textSecondary), children: "Chain" }),
|
|
4547
4555
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: optionListStyle, children: choices.map((chain) => {
|
|
4548
4556
|
const isSelected = chain.chainName === selectedChainName;
|
|
@@ -4599,7 +4607,7 @@ function SelectSourceScreen({
|
|
|
4599
4607
|
}
|
|
4600
4608
|
);
|
|
4601
4609
|
}
|
|
4602
|
-
var
|
|
4610
|
+
var subtitleStyle6 = (color) => ({
|
|
4603
4611
|
fontSize: "0.85rem",
|
|
4604
4612
|
color,
|
|
4605
4613
|
margin: "0 0 20px",
|
|
@@ -4715,7 +4723,7 @@ function AdvancedSourceScreen({
|
|
|
4715
4723
|
}
|
|
4716
4724
|
),
|
|
4717
4725
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle8(tokens.text), children: "Set up One-Tap deposits" }),
|
|
4718
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style:
|
|
4726
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
|
|
4719
4727
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle4(tokens.textSecondary), children: "Select tokens to approve" }),
|
|
4720
4728
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: chainListStyle, children: choices.map((chain) => {
|
|
4721
4729
|
const isExpanded = expandedChain === chain.chainName;
|
|
@@ -4785,7 +4793,7 @@ var headingStyle8 = (color) => ({
|
|
|
4785
4793
|
color,
|
|
4786
4794
|
margin: "8px 0 4px"
|
|
4787
4795
|
});
|
|
4788
|
-
var
|
|
4796
|
+
var subtitleStyle7 = (color) => ({
|
|
4789
4797
|
fontSize: "0.86rem",
|
|
4790
4798
|
color,
|
|
4791
4799
|
margin: "0 0 20px",
|
|
@@ -5019,7 +5027,7 @@ function OpenWalletScreen({
|
|
|
5019
5027
|
displayName,
|
|
5020
5028
|
"..."
|
|
5021
5029
|
] }),
|
|
5022
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style:
|
|
5030
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: "Approve the connection in your wallet extension." }),
|
|
5023
5031
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: waitingBadgeStyle(tokens), children: [
|
|
5024
5032
|
/* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 14 }),
|
|
5025
5033
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Waiting for authorization..." })
|
|
@@ -5048,7 +5056,7 @@ function OpenWalletScreen({
|
|
|
5048
5056
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle8, children: [
|
|
5049
5057
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 32 }) }),
|
|
5050
5058
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
|
|
5051
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style:
|
|
5059
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
|
|
5052
5060
|
!loading && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: waitingBadgeStyle(tokens), children: [
|
|
5053
5061
|
/* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 14 }),
|
|
5054
5062
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Waiting for authorization..." })
|
|
@@ -5095,7 +5103,7 @@ var headingStyle10 = (color) => ({
|
|
|
5095
5103
|
color,
|
|
5096
5104
|
margin: "20px 0 8px"
|
|
5097
5105
|
});
|
|
5098
|
-
var
|
|
5106
|
+
var subtitleStyle8 = (color) => ({
|
|
5099
5107
|
fontSize: "0.9rem",
|
|
5100
5108
|
color,
|
|
5101
5109
|
margin: "0 0 24px",
|
|
@@ -5147,7 +5155,7 @@ function ConfirmSignScreen({
|
|
|
5147
5155
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle9, children: [
|
|
5148
5156
|
logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 48 }),
|
|
5149
5157
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
|
|
5150
|
-
/* @__PURE__ */ jsxRuntime.jsxs("p", { style:
|
|
5158
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { style: subtitleStyle9(tokens.textSecondary), children: [
|
|
5151
5159
|
displayName,
|
|
5152
5160
|
" approved the connection. Tap below to confirm your payment."
|
|
5153
5161
|
] }),
|
|
@@ -5182,7 +5190,7 @@ var headingStyle11 = (color) => ({
|
|
|
5182
5190
|
color,
|
|
5183
5191
|
margin: "20px 0 8px"
|
|
5184
5192
|
});
|
|
5185
|
-
var
|
|
5193
|
+
var subtitleStyle9 = (color) => ({
|
|
5186
5194
|
fontSize: "0.9rem",
|
|
5187
5195
|
color,
|
|
5188
5196
|
margin: "0 0 24px",
|