@volr/react-ui 0.1.132 → 0.1.134
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 +53 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +53 -13
- package/dist/index.js.map +1 -1
- package/package.json +3 -12
package/dist/index.cjs
CHANGED
|
@@ -552,11 +552,12 @@ var en = {
|
|
|
552
552
|
alreadyExists: "Biometric login is already set up.",
|
|
553
553
|
notSupported: "Your device doesn't support biometric login.",
|
|
554
554
|
prfNotSupported: "Setup failed. Please use your device's biometric (Touch ID, Face ID) directly. Using other devices or apps may not work.",
|
|
555
|
+
prfNotSupportedWindows: `Setup failed. The selected passkey provider doesn't support PRF. In the passkey picker, choose "Use a phone or tablet" and complete with Google Password Manager on the device.`,
|
|
555
556
|
generic: "Setup failed. Please try again."
|
|
556
557
|
},
|
|
557
558
|
compatibility: {
|
|
558
559
|
title: "Browser Update Required",
|
|
559
|
-
inAppBrowser: "
|
|
560
|
+
inAppBrowser: "Passkeys are not supported in in-app browsers. Please open in your device browser (Chrome/Edge on Android, Safari on iOS).",
|
|
560
561
|
outdatedChrome: "Chrome 109 or later is required. Please update your browser.",
|
|
561
562
|
outdatedEdge: "Edge 109 or later is required. Please update your browser.",
|
|
562
563
|
outdatedSafari: "Safari 17.4 or later is required. Please update macOS/iOS.",
|
|
@@ -578,7 +579,7 @@ var en = {
|
|
|
578
579
|
linux: "Scan the QR code on screen with your phone camera.",
|
|
579
580
|
default: "Please use this device's biometric.",
|
|
580
581
|
note: "Using other devices or apps may not work.",
|
|
581
|
-
windowsNote: "
|
|
582
|
+
windowsNote: "Complete on your phone or tablet with Google Password Manager for best compatibility."
|
|
582
583
|
},
|
|
583
584
|
migration: {
|
|
584
585
|
title: "Set up passkey for this site",
|
|
@@ -702,6 +703,16 @@ var en = {
|
|
|
702
703
|
confirming: "Almost done...",
|
|
703
704
|
default: "Processing...",
|
|
704
705
|
doNotClose: "Please don't close this window"
|
|
706
|
+
},
|
|
707
|
+
result: {
|
|
708
|
+
successTitle: "Payment Complete",
|
|
709
|
+
failureTitle: "Payment Failed",
|
|
710
|
+
successMessage: "Your payment has been processed successfully",
|
|
711
|
+
failureMessage: "Something went wrong. Please try again.",
|
|
712
|
+
amountLabel: "Amount",
|
|
713
|
+
usdValueLabel: "USD Value",
|
|
714
|
+
transactionLabel: "Transaction",
|
|
715
|
+
reportIssue: "Report an issue"
|
|
705
716
|
}
|
|
706
717
|
},
|
|
707
718
|
errors: {
|
|
@@ -798,11 +809,12 @@ var ko = {
|
|
|
798
809
|
alreadyExists: "\uC774\uBBF8 \uC0DD\uCCB4 \uB85C\uADF8\uC778\uC774 \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
799
810
|
notSupported: "\uC774 \uAE30\uAE30\uB294 \uC0DD\uCCB4 \uB85C\uADF8\uC778\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
800
811
|
prfNotSupported: "\uC124\uC815\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC774 \uAE30\uAE30\uC758 \uC0DD\uCCB4 \uC778\uC99D(Touch ID, Face ID)\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574\uC8FC\uC138\uC694. \uB2E4\uB978 \uAE30\uAE30\uB098 \uC571 \uC0AC\uC6A9 \uC2DC \uB3D9\uC791\uD558\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
812
|
+
prfNotSupportedWindows: '\uC124\uC815\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC120\uD0DD\uD55C \uD328\uC2A4\uD0A4 \uC81C\uACF5\uC790\uAC00 PRF\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD328\uC2A4\uD0A4 \uC120\uD0DD \uD654\uBA74\uC5D0\uC11C "\uD734\uB300\uD3F0/\uD0DC\uBE14\uB9BF \uC0AC\uC6A9"\uC744 \uC120\uD0DD\uD558\uACE0, \uD734\uB300\uD3F0/\uD0DC\uBE14\uB9BF\uC5D0\uC11C\uB294 Google Password Manager\uB85C \uC9C4\uD589\uD574\uC8FC\uC138\uC694.',
|
|
801
813
|
generic: "\uC124\uC815\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694."
|
|
802
814
|
},
|
|
803
815
|
compatibility: {
|
|
804
816
|
title: "\uBE0C\uB77C\uC6B0\uC800 \uC5C5\uB370\uC774\uD2B8 \uD544\uC694",
|
|
805
|
-
inAppBrowser: "\
|
|
817
|
+
inAppBrowser: "\uC571 \uB0B4 \uBE0C\uB77C\uC6B0\uC800\uC5D0\uC11C\uB294 \uD328\uC2A4\uD0A4 \uB85C\uADF8\uC778\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 \uBE0C\uB77C\uC6B0\uC800(\uC548\uB4DC\uB85C\uC774\uB4DC: Chrome/Edge, iOS: Safari)\uC5D0\uC11C \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.",
|
|
806
818
|
outdatedChrome: "Chrome 109 \uC774\uC0C1 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uB97C \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694.",
|
|
807
819
|
outdatedEdge: "Edge 109 \uC774\uC0C1 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800\uB97C \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694.",
|
|
808
820
|
outdatedSafari: "Safari 17.4 \uC774\uC0C1 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. macOS/iOS\uB97C \uC5C5\uB370\uC774\uD2B8\uD574\uC8FC\uC138\uC694.",
|
|
@@ -824,7 +836,7 @@ var ko = {
|
|
|
824
836
|
linux: "\uD734\uB300\uD3F0 \uCE74\uBA54\uB77C\uB85C \uD654\uBA74\uC758 QR \uCF54\uB4DC\uB97C \uC2A4\uCE94\uD574\uC8FC\uC138\uC694.",
|
|
825
837
|
default: "\uC774 \uAE30\uAE30\uC758 \uC0DD\uCCB4 \uC778\uC99D\uC744 \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694.",
|
|
826
838
|
note: "\uB2E4\uB978 \uAE30\uAE30\uB098 \uC571 \uC0AC\uC6A9 \uC2DC \uB3D9\uC791\uD558\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
827
|
-
windowsNote: "\
|
|
839
|
+
windowsNote: "\uD734\uB300\uD3F0/\uD0DC\uBE14\uB9BF\uC5D0\uC11C\uB294 Google Password Manager\uB85C \uC9C4\uD589\uD558\uBA74 \uC548\uC815\uC801\uC785\uB2C8\uB2E4."
|
|
828
840
|
},
|
|
829
841
|
migration: {
|
|
830
842
|
title: "\uC774 \uC0AC\uC774\uD2B8\uC6A9 \uD328\uC2A4\uD0A4 \uC124\uC815",
|
|
@@ -973,6 +985,16 @@ var ko = {
|
|
|
973
985
|
confirming: "\uAC70\uC758 \uC644\uB8CC...",
|
|
974
986
|
default: "\uCC98\uB9AC \uC911...",
|
|
975
987
|
doNotClose: "\uCC3D\uC744 \uB2EB\uC9C0 \uB9C8\uC138\uC694"
|
|
988
|
+
},
|
|
989
|
+
result: {
|
|
990
|
+
successTitle: "\uACB0\uC81C \uC644\uB8CC",
|
|
991
|
+
failureTitle: "\uACB0\uC81C \uC2E4\uD328",
|
|
992
|
+
successMessage: "\uACB0\uC81C\uAC00 \uC815\uC0C1\uC801\uC73C\uB85C \uCC98\uB9AC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
993
|
+
failureMessage: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.",
|
|
994
|
+
amountLabel: "\uAE08\uC561",
|
|
995
|
+
usdValueLabel: "USD \uAC00\uCE58",
|
|
996
|
+
transactionLabel: "\uD2B8\uB79C\uC7AD\uC158",
|
|
997
|
+
reportIssue: "\uBB38\uC81C \uC2E0\uACE0\uD558\uAE30"
|
|
976
998
|
}
|
|
977
999
|
},
|
|
978
1000
|
errors: {
|
|
@@ -1543,7 +1565,10 @@ function getUserFriendlyError(error, t) {
|
|
|
1543
1565
|
return t("passkey.errors.alreadyExists");
|
|
1544
1566
|
}
|
|
1545
1567
|
if (msg.includes("prf extension not supported") || msg.includes("prf output missing") || msg.includes("prf not supported")) {
|
|
1546
|
-
|
|
1568
|
+
const isWindows = typeof navigator !== "undefined" && /Win/.test(navigator.platform || "");
|
|
1569
|
+
return t(
|
|
1570
|
+
isWindows ? "passkey.errors.prfNotSupportedWindows" : "passkey.errors.prfNotSupported"
|
|
1571
|
+
);
|
|
1547
1572
|
}
|
|
1548
1573
|
if (msg.includes("not supported")) {
|
|
1549
1574
|
return t("passkey.errors.notSupported");
|
|
@@ -6612,8 +6637,14 @@ var PaymentResultView = ({
|
|
|
6612
6637
|
onRetry,
|
|
6613
6638
|
onReport
|
|
6614
6639
|
}) => {
|
|
6640
|
+
const { t } = useI18n();
|
|
6615
6641
|
const isSuccess = payment.status === "CONFIRMED";
|
|
6616
6642
|
payment.status === "FAILED" || !!error;
|
|
6643
|
+
const isInAppBrowserError = error?.code === "INAPP_BROWSER_NOT_SUPPORTED";
|
|
6644
|
+
const handleOpenExternalBrowser = () => {
|
|
6645
|
+
if (typeof window === "undefined") return;
|
|
6646
|
+
window.open(window.location.href, "_system");
|
|
6647
|
+
};
|
|
6617
6648
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:space-y-6", children: [
|
|
6618
6649
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:flex volr:justify-center volr:pt-2", children: isSuccess ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:w-14 volr:h-14 volr:rounded-full volr:bg-green-50 volr:flex volr:items-center volr:justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6619
6650
|
"svg",
|
|
@@ -6651,12 +6682,12 @@ var PaymentResultView = ({
|
|
|
6651
6682
|
}
|
|
6652
6683
|
) }) }),
|
|
6653
6684
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:text-center volr:space-y-1", children: [
|
|
6654
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "volr:text-lg volr:font-semibold volr:text-slate-900", children: isSuccess ? "
|
|
6655
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-500", children: isSuccess ? "
|
|
6685
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "volr:text-lg volr:font-semibold volr:text-slate-900", children: isSuccess ? t("payment.result.successTitle") : t("payment.result.failureTitle") }),
|
|
6686
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-500", children: isSuccess ? t("payment.result.successMessage") : isInAppBrowserError ? t("passkey.compatibility.inAppBrowser") : error?.message || t("payment.result.failureMessage") })
|
|
6656
6687
|
] }),
|
|
6657
6688
|
isSuccess && payment.txHash && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:bg-slate-50 volr:rounded-lg volr:p-4 volr:space-y-2", children: [
|
|
6658
6689
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:justify-between volr:text-sm", children: [
|
|
6659
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-slate-500", children: "
|
|
6690
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-slate-500", children: t("payment.result.amountLabel") }),
|
|
6660
6691
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "volr:font-medium volr:text-slate-900", children: [
|
|
6661
6692
|
(Number(payment.amount) / Math.pow(10, payment.token.decimals)).toLocaleString(),
|
|
6662
6693
|
" ",
|
|
@@ -6664,14 +6695,14 @@ var PaymentResultView = ({
|
|
|
6664
6695
|
] })
|
|
6665
6696
|
] }),
|
|
6666
6697
|
payment.totalUsd && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:justify-between volr:text-sm", children: [
|
|
6667
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-slate-500", children: "
|
|
6698
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-slate-500", children: t("payment.result.usdValueLabel") }),
|
|
6668
6699
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "volr:text-slate-600", children: [
|
|
6669
6700
|
"$",
|
|
6670
6701
|
parseFloat(payment.totalUsd).toFixed(2)
|
|
6671
6702
|
] })
|
|
6672
6703
|
] }),
|
|
6673
6704
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:justify-between volr:text-sm", children: [
|
|
6674
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-slate-500", children: "
|
|
6705
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-slate-500", children: t("payment.result.transactionLabel") }),
|
|
6675
6706
|
/* @__PURE__ */ jsxRuntime.jsxs("code", { className: "volr:text-xs volr:text-slate-600 volr:font-mono", children: [
|
|
6676
6707
|
payment.txHash.slice(0, 8),
|
|
6677
6708
|
"...",
|
|
@@ -6679,14 +6710,23 @@ var PaymentResultView = ({
|
|
|
6679
6710
|
] })
|
|
6680
6711
|
] })
|
|
6681
6712
|
] }),
|
|
6682
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:space-y-4", children: isSuccess ? /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onDone, className: "volr:w-full", children: "
|
|
6683
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick:
|
|
6713
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:space-y-4", children: isSuccess ? /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onDone, className: "volr:w-full", children: t("common.done") }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6714
|
+
isInAppBrowserError && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: handleOpenExternalBrowser, className: "volr:w-full", children: t("passkey.compatibility.openInExternalBrowser") }),
|
|
6715
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6716
|
+
Button,
|
|
6717
|
+
{
|
|
6718
|
+
onClick: onRetry,
|
|
6719
|
+
className: "volr:w-full",
|
|
6720
|
+
variant: isInAppBrowserError ? "secondary" : void 0,
|
|
6721
|
+
children: t("common.tryAgain")
|
|
6722
|
+
}
|
|
6723
|
+
),
|
|
6684
6724
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6685
6725
|
"button",
|
|
6686
6726
|
{
|
|
6687
6727
|
onClick: onReport,
|
|
6688
6728
|
className: "volr:w-full volr:text-sm volr:text-slate-400 hover:volr:text-slate-600 volr:transition-colors volr:py-2",
|
|
6689
|
-
children: "
|
|
6729
|
+
children: t("payment.result.reportIssue")
|
|
6690
6730
|
}
|
|
6691
6731
|
)
|
|
6692
6732
|
] }) }),
|