@swype-org/react-sdk 0.1.40 → 0.1.42
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 +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1477,11 +1477,16 @@ function isMobileUserAgent(userAgent) {
|
|
|
1477
1477
|
function shouldUseWalletConnector(options) {
|
|
1478
1478
|
return options.useWalletConnector ?? !isMobileUserAgent(options.userAgent);
|
|
1479
1479
|
}
|
|
1480
|
+
var FOOTER_CSS = `
|
|
1481
|
+
.swype-screen-footer {
|
|
1482
|
+
padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
|
|
1483
|
+
}`;
|
|
1480
1484
|
function ScreenLayout({ children, footer }) {
|
|
1481
1485
|
const { tokens } = useSwypeConfig();
|
|
1482
1486
|
return /* @__PURE__ */ jsxs("div", { style: containerStyle(tokens.bgCard), children: [
|
|
1483
1487
|
/* @__PURE__ */ jsx("div", { style: bodyStyle, children }),
|
|
1484
|
-
footer && /* @__PURE__ */ jsx("div", { style: footerStyle, children: footer })
|
|
1488
|
+
footer && /* @__PURE__ */ jsx("div", { className: "swype-screen-footer", style: footerStyle, children: footer }),
|
|
1489
|
+
/* @__PURE__ */ jsx("style", { children: FOOTER_CSS })
|
|
1485
1490
|
] });
|
|
1486
1491
|
}
|
|
1487
1492
|
var containerStyle = (bg) => ({
|
|
@@ -1502,7 +1507,7 @@ var bodyStyle = {
|
|
|
1502
1507
|
flexDirection: "column"
|
|
1503
1508
|
};
|
|
1504
1509
|
var footerStyle = {
|
|
1505
|
-
padding: "16px 24px
|
|
1510
|
+
padding: "16px 24px 0",
|
|
1506
1511
|
marginTop: "auto"
|
|
1507
1512
|
};
|
|
1508
1513
|
function ScreenHeader({ title, right, onBack, badge }) {
|
|
@@ -4429,7 +4434,9 @@ function SwypePayment({
|
|
|
4429
4434
|
setMobileFlow(true);
|
|
4430
4435
|
pollingTransferIdRef.current = t.id;
|
|
4431
4436
|
polling.startPolling(t.id);
|
|
4432
|
-
|
|
4437
|
+
if (!isActiveWallet) {
|
|
4438
|
+
window.location.href = t.authorizationSessions[0].uri;
|
|
4439
|
+
}
|
|
4433
4440
|
return;
|
|
4434
4441
|
} else {
|
|
4435
4442
|
await authExecutor.executeSession(t);
|