@thunderid/browser 0.10.1 → 0.11.1
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/cjs/index.cjs +33 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/dist/theme/normalizeBorderRadius.d.ts +39 -0
- package/dist/theme/normalizeBorderRadius.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -3292,7 +3292,7 @@ const handleWebAuthnAuthentication = async (challengeData) => {
|
|
|
3292
3292
|
case "NotSupportedError": throw new __thunderid_javascript.ThunderIDRuntimeError("Passkey authentication is not supported on this device or browser. Please use a different authentication method.", "browser-webauthn-not-supported", "browser", "WebAuthn is not supported on the current device or browser configuration.");
|
|
3293
3293
|
case "NetworkError": throw new __thunderid_javascript.ThunderIDRuntimeError("Network error during passkey authentication. Please check your connection and try again.", "browser-webauthn-network-error", "browser", "A network error occurred while communicating with the authenticator.");
|
|
3294
3294
|
case "UnknownError": throw new __thunderid_javascript.ThunderIDRuntimeError("An unknown error occurred during passkey authentication. Please try again or use a different authentication method.", "browser-webauthn-unknown-error", "browser", "An unidentified error occurred during the WebAuthn authentication process.");
|
|
3295
|
-
default: throw new __thunderid_javascript.ThunderIDRuntimeError(
|
|
3295
|
+
default: throw new __thunderid_javascript.ThunderIDRuntimeError("Passkey authentication failed. Please try again.", "browser-webauthn-general-error", "browser", `WebAuthn authentication failed with error: ${error.name}: ${error.message}`);
|
|
3296
3296
|
}
|
|
3297
3297
|
throw new __thunderid_javascript.ThunderIDRuntimeError("Passkey authentication failed due to an unexpected error.", "browser-webauthn-unexpected-error", "browser", "An unexpected error occurred during WebAuthn authentication.");
|
|
3298
3298
|
}
|
|
@@ -3993,6 +3993,37 @@ const getActiveTheme = (mode, config = {}) => {
|
|
|
3993
3993
|
};
|
|
3994
3994
|
var getActiveTheme_default = getActiveTheme;
|
|
3995
3995
|
|
|
3996
|
+
//#endregion
|
|
3997
|
+
//#region src/theme/normalizeBorderRadius.ts
|
|
3998
|
+
/**
|
|
3999
|
+
* Normalizes a raw `shape.borderRadius` value into per-size tokens suitable
|
|
4000
|
+
* for `ThemeConfig.borderRadius`.
|
|
4001
|
+
*
|
|
4002
|
+
* - Object with `small`/`medium`/`large` → used directly.
|
|
4003
|
+
* - Bare number or numeric string (e.g. `8` or `"8"`) → appended with `px` and applied uniformly.
|
|
4004
|
+
* - Pixel string (e.g. `"8px"`) → used as-is and applied uniformly.
|
|
4005
|
+
*/
|
|
4006
|
+
const normalizeBorderRadius = (raw) => {
|
|
4007
|
+
if (raw === void 0) return void 0;
|
|
4008
|
+
if (typeof raw === "object") {
|
|
4009
|
+
const { small, medium, large } = raw;
|
|
4010
|
+
if (small === void 0 && medium === void 0 && large === void 0) return void 0;
|
|
4011
|
+
return {
|
|
4012
|
+
...large !== void 0 && { large },
|
|
4013
|
+
...medium !== void 0 && { medium },
|
|
4014
|
+
...small !== void 0 && { small }
|
|
4015
|
+
};
|
|
4016
|
+
}
|
|
4017
|
+
const trimmed = String(raw).trim();
|
|
4018
|
+
const radiusStr = typeof raw === "number" ? `${raw}px` : /^\d+(\.\d+)?$/.test(trimmed) ? `${trimmed}px` : trimmed;
|
|
4019
|
+
return {
|
|
4020
|
+
large: radiusStr,
|
|
4021
|
+
medium: radiusStr,
|
|
4022
|
+
small: radiusStr
|
|
4023
|
+
};
|
|
4024
|
+
};
|
|
4025
|
+
var normalizeBorderRadius_default = normalizeBorderRadius;
|
|
4026
|
+
|
|
3996
4027
|
//#endregion
|
|
3997
4028
|
exports.ACCESS_TOKEN_INVALID = ACCESS_TOKEN_INVALID;
|
|
3998
4029
|
exports.ANONYMOUS_ANIMAL_ICONS = ANONYMOUS_ANIMAL_ICONS;
|
|
@@ -4042,6 +4073,7 @@ exports.hasCalledForThisInstanceInUrl = hasCalledForThisInstanceInUrl_default;
|
|
|
4042
4073
|
exports.http = http_default;
|
|
4043
4074
|
exports.isAvatarUri = isAvatarUri_default;
|
|
4044
4075
|
exports.navigate = navigate_default;
|
|
4076
|
+
exports.normalizeBorderRadius = normalizeBorderRadius_default;
|
|
4045
4077
|
exports.pickAnonymousAvatarName = pickAnonymousAvatarName_default;
|
|
4046
4078
|
exports.pickAnonymousEntityName = pickAnonymousEntityName_default;
|
|
4047
4079
|
exports.resolveEmojiUrisInHtml = resolveEmojiUrisInHtml_default;
|