@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.d.cts
CHANGED
|
@@ -171,11 +171,12 @@ declare const en: {
|
|
|
171
171
|
readonly alreadyExists: "Biometric login is already set up.";
|
|
172
172
|
readonly notSupported: "Your device doesn't support biometric login.";
|
|
173
173
|
readonly prfNotSupported: "Setup failed. Please use your device's biometric (Touch ID, Face ID) directly. Using other devices or apps may not work.";
|
|
174
|
+
readonly 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.";
|
|
174
175
|
readonly generic: "Setup failed. Please try again.";
|
|
175
176
|
};
|
|
176
177
|
readonly compatibility: {
|
|
177
178
|
readonly title: "Browser Update Required";
|
|
178
|
-
readonly inAppBrowser: "
|
|
179
|
+
readonly inAppBrowser: "Passkeys are not supported in in-app browsers. Please open in your device browser (Chrome/Edge on Android, Safari on iOS).";
|
|
179
180
|
readonly outdatedChrome: "Chrome 109 or later is required. Please update your browser.";
|
|
180
181
|
readonly outdatedEdge: "Edge 109 or later is required. Please update your browser.";
|
|
181
182
|
readonly outdatedSafari: "Safari 17.4 or later is required. Please update macOS/iOS.";
|
|
@@ -197,7 +198,7 @@ declare const en: {
|
|
|
197
198
|
readonly linux: "Scan the QR code on screen with your phone camera.";
|
|
198
199
|
readonly default: "Please use this device's biometric.";
|
|
199
200
|
readonly note: "Using other devices or apps may not work.";
|
|
200
|
-
readonly windowsNote: "
|
|
201
|
+
readonly windowsNote: "Complete on your phone or tablet with Google Password Manager for best compatibility.";
|
|
201
202
|
};
|
|
202
203
|
readonly migration: {
|
|
203
204
|
readonly title: "Set up passkey for this site";
|
|
@@ -321,6 +322,16 @@ declare const en: {
|
|
|
321
322
|
readonly default: "Processing...";
|
|
322
323
|
readonly doNotClose: "Please don't close this window";
|
|
323
324
|
};
|
|
325
|
+
readonly result: {
|
|
326
|
+
readonly successTitle: "Payment Complete";
|
|
327
|
+
readonly failureTitle: "Payment Failed";
|
|
328
|
+
readonly successMessage: "Your payment has been processed successfully";
|
|
329
|
+
readonly failureMessage: "Something went wrong. Please try again.";
|
|
330
|
+
readonly amountLabel: "Amount";
|
|
331
|
+
readonly usdValueLabel: "USD Value";
|
|
332
|
+
readonly transactionLabel: "Transaction";
|
|
333
|
+
readonly reportIssue: "Report an issue";
|
|
334
|
+
};
|
|
324
335
|
};
|
|
325
336
|
readonly errors: {
|
|
326
337
|
readonly webauthnNotSupported: "WebAuthn API is not supported";
|
package/dist/index.d.ts
CHANGED
|
@@ -171,11 +171,12 @@ declare const en: {
|
|
|
171
171
|
readonly alreadyExists: "Biometric login is already set up.";
|
|
172
172
|
readonly notSupported: "Your device doesn't support biometric login.";
|
|
173
173
|
readonly prfNotSupported: "Setup failed. Please use your device's biometric (Touch ID, Face ID) directly. Using other devices or apps may not work.";
|
|
174
|
+
readonly 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.";
|
|
174
175
|
readonly generic: "Setup failed. Please try again.";
|
|
175
176
|
};
|
|
176
177
|
readonly compatibility: {
|
|
177
178
|
readonly title: "Browser Update Required";
|
|
178
|
-
readonly inAppBrowser: "
|
|
179
|
+
readonly inAppBrowser: "Passkeys are not supported in in-app browsers. Please open in your device browser (Chrome/Edge on Android, Safari on iOS).";
|
|
179
180
|
readonly outdatedChrome: "Chrome 109 or later is required. Please update your browser.";
|
|
180
181
|
readonly outdatedEdge: "Edge 109 or later is required. Please update your browser.";
|
|
181
182
|
readonly outdatedSafari: "Safari 17.4 or later is required. Please update macOS/iOS.";
|
|
@@ -197,7 +198,7 @@ declare const en: {
|
|
|
197
198
|
readonly linux: "Scan the QR code on screen with your phone camera.";
|
|
198
199
|
readonly default: "Please use this device's biometric.";
|
|
199
200
|
readonly note: "Using other devices or apps may not work.";
|
|
200
|
-
readonly windowsNote: "
|
|
201
|
+
readonly windowsNote: "Complete on your phone or tablet with Google Password Manager for best compatibility.";
|
|
201
202
|
};
|
|
202
203
|
readonly migration: {
|
|
203
204
|
readonly title: "Set up passkey for this site";
|
|
@@ -321,6 +322,16 @@ declare const en: {
|
|
|
321
322
|
readonly default: "Processing...";
|
|
322
323
|
readonly doNotClose: "Please don't close this window";
|
|
323
324
|
};
|
|
325
|
+
readonly result: {
|
|
326
|
+
readonly successTitle: "Payment Complete";
|
|
327
|
+
readonly failureTitle: "Payment Failed";
|
|
328
|
+
readonly successMessage: "Your payment has been processed successfully";
|
|
329
|
+
readonly failureMessage: "Something went wrong. Please try again.";
|
|
330
|
+
readonly amountLabel: "Amount";
|
|
331
|
+
readonly usdValueLabel: "USD Value";
|
|
332
|
+
readonly transactionLabel: "Transaction";
|
|
333
|
+
readonly reportIssue: "Report an issue";
|
|
334
|
+
};
|
|
324
335
|
};
|
|
325
336
|
readonly errors: {
|
|
326
337
|
readonly webauthnNotSupported: "WebAuthn API is not supported";
|
package/dist/index.js
CHANGED
|
@@ -547,11 +547,12 @@ var en = {
|
|
|
547
547
|
alreadyExists: "Biometric login is already set up.",
|
|
548
548
|
notSupported: "Your device doesn't support biometric login.",
|
|
549
549
|
prfNotSupported: "Setup failed. Please use your device's biometric (Touch ID, Face ID) directly. Using other devices or apps may not work.",
|
|
550
|
+
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.`,
|
|
550
551
|
generic: "Setup failed. Please try again."
|
|
551
552
|
},
|
|
552
553
|
compatibility: {
|
|
553
554
|
title: "Browser Update Required",
|
|
554
|
-
inAppBrowser: "
|
|
555
|
+
inAppBrowser: "Passkeys are not supported in in-app browsers. Please open in your device browser (Chrome/Edge on Android, Safari on iOS).",
|
|
555
556
|
outdatedChrome: "Chrome 109 or later is required. Please update your browser.",
|
|
556
557
|
outdatedEdge: "Edge 109 or later is required. Please update your browser.",
|
|
557
558
|
outdatedSafari: "Safari 17.4 or later is required. Please update macOS/iOS.",
|
|
@@ -573,7 +574,7 @@ var en = {
|
|
|
573
574
|
linux: "Scan the QR code on screen with your phone camera.",
|
|
574
575
|
default: "Please use this device's biometric.",
|
|
575
576
|
note: "Using other devices or apps may not work.",
|
|
576
|
-
windowsNote: "
|
|
577
|
+
windowsNote: "Complete on your phone or tablet with Google Password Manager for best compatibility."
|
|
577
578
|
},
|
|
578
579
|
migration: {
|
|
579
580
|
title: "Set up passkey for this site",
|
|
@@ -697,6 +698,16 @@ var en = {
|
|
|
697
698
|
confirming: "Almost done...",
|
|
698
699
|
default: "Processing...",
|
|
699
700
|
doNotClose: "Please don't close this window"
|
|
701
|
+
},
|
|
702
|
+
result: {
|
|
703
|
+
successTitle: "Payment Complete",
|
|
704
|
+
failureTitle: "Payment Failed",
|
|
705
|
+
successMessage: "Your payment has been processed successfully",
|
|
706
|
+
failureMessage: "Something went wrong. Please try again.",
|
|
707
|
+
amountLabel: "Amount",
|
|
708
|
+
usdValueLabel: "USD Value",
|
|
709
|
+
transactionLabel: "Transaction",
|
|
710
|
+
reportIssue: "Report an issue"
|
|
700
711
|
}
|
|
701
712
|
},
|
|
702
713
|
errors: {
|
|
@@ -793,11 +804,12 @@ var ko = {
|
|
|
793
804
|
alreadyExists: "\uC774\uBBF8 \uC0DD\uCCB4 \uB85C\uADF8\uC778\uC774 \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
794
805
|
notSupported: "\uC774 \uAE30\uAE30\uB294 \uC0DD\uCCB4 \uB85C\uADF8\uC778\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
795
806
|
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.",
|
|
807
|
+
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.',
|
|
796
808
|
generic: "\uC124\uC815\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694."
|
|
797
809
|
},
|
|
798
810
|
compatibility: {
|
|
799
811
|
title: "\uBE0C\uB77C\uC6B0\uC800 \uC5C5\uB370\uC774\uD2B8 \uD544\uC694",
|
|
800
|
-
inAppBrowser: "\
|
|
812
|
+
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.",
|
|
801
813
|
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.",
|
|
802
814
|
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.",
|
|
803
815
|
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.",
|
|
@@ -819,7 +831,7 @@ var ko = {
|
|
|
819
831
|
linux: "\uD734\uB300\uD3F0 \uCE74\uBA54\uB77C\uB85C \uD654\uBA74\uC758 QR \uCF54\uB4DC\uB97C \uC2A4\uCE94\uD574\uC8FC\uC138\uC694.",
|
|
820
832
|
default: "\uC774 \uAE30\uAE30\uC758 \uC0DD\uCCB4 \uC778\uC99D\uC744 \uC0AC\uC6A9\uD574\uC8FC\uC138\uC694.",
|
|
821
833
|
note: "\uB2E4\uB978 \uAE30\uAE30\uB098 \uC571 \uC0AC\uC6A9 \uC2DC \uB3D9\uC791\uD558\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
822
|
-
windowsNote: "\
|
|
834
|
+
windowsNote: "\uD734\uB300\uD3F0/\uD0DC\uBE14\uB9BF\uC5D0\uC11C\uB294 Google Password Manager\uB85C \uC9C4\uD589\uD558\uBA74 \uC548\uC815\uC801\uC785\uB2C8\uB2E4."
|
|
823
835
|
},
|
|
824
836
|
migration: {
|
|
825
837
|
title: "\uC774 \uC0AC\uC774\uD2B8\uC6A9 \uD328\uC2A4\uD0A4 \uC124\uC815",
|
|
@@ -968,6 +980,16 @@ var ko = {
|
|
|
968
980
|
confirming: "\uAC70\uC758 \uC644\uB8CC...",
|
|
969
981
|
default: "\uCC98\uB9AC \uC911...",
|
|
970
982
|
doNotClose: "\uCC3D\uC744 \uB2EB\uC9C0 \uB9C8\uC138\uC694"
|
|
983
|
+
},
|
|
984
|
+
result: {
|
|
985
|
+
successTitle: "\uACB0\uC81C \uC644\uB8CC",
|
|
986
|
+
failureTitle: "\uACB0\uC81C \uC2E4\uD328",
|
|
987
|
+
successMessage: "\uACB0\uC81C\uAC00 \uC815\uC0C1\uC801\uC73C\uB85C \uCC98\uB9AC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
988
|
+
failureMessage: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.",
|
|
989
|
+
amountLabel: "\uAE08\uC561",
|
|
990
|
+
usdValueLabel: "USD \uAC00\uCE58",
|
|
991
|
+
transactionLabel: "\uD2B8\uB79C\uC7AD\uC158",
|
|
992
|
+
reportIssue: "\uBB38\uC81C \uC2E0\uACE0\uD558\uAE30"
|
|
971
993
|
}
|
|
972
994
|
},
|
|
973
995
|
errors: {
|
|
@@ -1538,7 +1560,10 @@ function getUserFriendlyError(error, t) {
|
|
|
1538
1560
|
return t("passkey.errors.alreadyExists");
|
|
1539
1561
|
}
|
|
1540
1562
|
if (msg.includes("prf extension not supported") || msg.includes("prf output missing") || msg.includes("prf not supported")) {
|
|
1541
|
-
|
|
1563
|
+
const isWindows = typeof navigator !== "undefined" && /Win/.test(navigator.platform || "");
|
|
1564
|
+
return t(
|
|
1565
|
+
isWindows ? "passkey.errors.prfNotSupportedWindows" : "passkey.errors.prfNotSupported"
|
|
1566
|
+
);
|
|
1542
1567
|
}
|
|
1543
1568
|
if (msg.includes("not supported")) {
|
|
1544
1569
|
return t("passkey.errors.notSupported");
|
|
@@ -6607,8 +6632,14 @@ var PaymentResultView = ({
|
|
|
6607
6632
|
onRetry,
|
|
6608
6633
|
onReport
|
|
6609
6634
|
}) => {
|
|
6635
|
+
const { t } = useI18n();
|
|
6610
6636
|
const isSuccess = payment.status === "CONFIRMED";
|
|
6611
6637
|
payment.status === "FAILED" || !!error;
|
|
6638
|
+
const isInAppBrowserError = error?.code === "INAPP_BROWSER_NOT_SUPPORTED";
|
|
6639
|
+
const handleOpenExternalBrowser = () => {
|
|
6640
|
+
if (typeof window === "undefined") return;
|
|
6641
|
+
window.open(window.location.href, "_system");
|
|
6642
|
+
};
|
|
6612
6643
|
return /* @__PURE__ */ jsxs("div", { className: "volr:space-y-6", children: [
|
|
6613
6644
|
/* @__PURE__ */ jsx("div", { className: "volr:flex volr:justify-center volr:pt-2", children: isSuccess ? /* @__PURE__ */ 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__ */ jsx(
|
|
6614
6645
|
"svg",
|
|
@@ -6646,12 +6677,12 @@ var PaymentResultView = ({
|
|
|
6646
6677
|
}
|
|
6647
6678
|
) }) }),
|
|
6648
6679
|
/* @__PURE__ */ jsxs("div", { className: "volr:text-center volr:space-y-1", children: [
|
|
6649
|
-
/* @__PURE__ */ jsx("h3", { className: "volr:text-lg volr:font-semibold volr:text-slate-900", children: isSuccess ? "
|
|
6650
|
-
/* @__PURE__ */ jsx("p", { className: "volr:text-sm volr:text-slate-500", children: isSuccess ? "
|
|
6680
|
+
/* @__PURE__ */ jsx("h3", { className: "volr:text-lg volr:font-semibold volr:text-slate-900", children: isSuccess ? t("payment.result.successTitle") : t("payment.result.failureTitle") }),
|
|
6681
|
+
/* @__PURE__ */ 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") })
|
|
6651
6682
|
] }),
|
|
6652
6683
|
isSuccess && payment.txHash && /* @__PURE__ */ jsxs("div", { className: "volr:bg-slate-50 volr:rounded-lg volr:p-4 volr:space-y-2", children: [
|
|
6653
6684
|
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-sm", children: [
|
|
6654
|
-
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: "
|
|
6685
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: t("payment.result.amountLabel") }),
|
|
6655
6686
|
/* @__PURE__ */ jsxs("span", { className: "volr:font-medium volr:text-slate-900", children: [
|
|
6656
6687
|
(Number(payment.amount) / Math.pow(10, payment.token.decimals)).toLocaleString(),
|
|
6657
6688
|
" ",
|
|
@@ -6659,14 +6690,14 @@ var PaymentResultView = ({
|
|
|
6659
6690
|
] })
|
|
6660
6691
|
] }),
|
|
6661
6692
|
payment.totalUsd && /* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-sm", children: [
|
|
6662
|
-
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: "
|
|
6693
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: t("payment.result.usdValueLabel") }),
|
|
6663
6694
|
/* @__PURE__ */ jsxs("span", { className: "volr:text-slate-600", children: [
|
|
6664
6695
|
"$",
|
|
6665
6696
|
parseFloat(payment.totalUsd).toFixed(2)
|
|
6666
6697
|
] })
|
|
6667
6698
|
] }),
|
|
6668
6699
|
/* @__PURE__ */ jsxs("div", { className: "volr:flex volr:justify-between volr:text-sm", children: [
|
|
6669
|
-
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: "
|
|
6700
|
+
/* @__PURE__ */ jsx("span", { className: "volr:text-slate-500", children: t("payment.result.transactionLabel") }),
|
|
6670
6701
|
/* @__PURE__ */ jsxs("code", { className: "volr:text-xs volr:text-slate-600 volr:font-mono", children: [
|
|
6671
6702
|
payment.txHash.slice(0, 8),
|
|
6672
6703
|
"...",
|
|
@@ -6674,14 +6705,23 @@ var PaymentResultView = ({
|
|
|
6674
6705
|
] })
|
|
6675
6706
|
] })
|
|
6676
6707
|
] }),
|
|
6677
|
-
/* @__PURE__ */ jsx("div", { className: "volr:space-y-4", children: isSuccess ? /* @__PURE__ */ jsx(Button, { onClick: onDone, className: "volr:w-full", children: "
|
|
6678
|
-
/* @__PURE__ */ jsx(Button, { onClick:
|
|
6708
|
+
/* @__PURE__ */ jsx("div", { className: "volr:space-y-4", children: isSuccess ? /* @__PURE__ */ jsx(Button, { onClick: onDone, className: "volr:w-full", children: t("common.done") }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6709
|
+
isInAppBrowserError && /* @__PURE__ */ jsx(Button, { onClick: handleOpenExternalBrowser, className: "volr:w-full", children: t("passkey.compatibility.openInExternalBrowser") }),
|
|
6710
|
+
/* @__PURE__ */ jsx(
|
|
6711
|
+
Button,
|
|
6712
|
+
{
|
|
6713
|
+
onClick: onRetry,
|
|
6714
|
+
className: "volr:w-full",
|
|
6715
|
+
variant: isInAppBrowserError ? "secondary" : void 0,
|
|
6716
|
+
children: t("common.tryAgain")
|
|
6717
|
+
}
|
|
6718
|
+
),
|
|
6679
6719
|
/* @__PURE__ */ jsx(
|
|
6680
6720
|
"button",
|
|
6681
6721
|
{
|
|
6682
6722
|
onClick: onReport,
|
|
6683
6723
|
className: "volr:w-full volr:text-sm volr:text-slate-400 hover:volr:text-slate-600 volr:transition-colors volr:py-2",
|
|
6684
|
-
children: "
|
|
6724
|
+
children: t("payment.result.reportIssue")
|
|
6685
6725
|
}
|
|
6686
6726
|
)
|
|
6687
6727
|
] }) }),
|