@thunderid/browser 0.10.1 → 0.11.0

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.
@@ -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;