@lobehub/icons 1.33.5 → 1.33.6

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.
@@ -6,6 +6,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { forwardRef } from 'react';
8
8
  import { Center } from 'react-layout-kit';
9
+ import { roundToEven } from "./util";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  var IconAvatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
11
12
  var _ref$shape = _ref.shape,
@@ -32,7 +33,7 @@ var IconAvatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
32
33
  }, style),
33
34
  children: Icon && /*#__PURE__*/_jsx(Icon, {
34
35
  className: iconClassName,
35
- size: size * iconMultiple,
36
+ size: roundToEven(size * iconMultiple),
36
37
  style: iconStyle
37
38
  })
38
39
  });
@@ -0,0 +1 @@
1
+ export declare const roundToEven: (number: number) => number;
@@ -0,0 +1,8 @@
1
+ export var roundToEven = function roundToEven(number) {
2
+ var rounded = Math.round(number);
3
+ var diff = Math.abs(number - rounded);
4
+ if (diff === 0.5) {
5
+ return rounded % 2 === 0 ? rounded : rounded - 1;
6
+ }
7
+ return rounded;
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/icons",
3
- "version": "1.33.5",
3
+ "version": "1.33.6",
4
4
  "description": "Popular AI / LLM Model Brand SVG Logo and Icon Collection",
5
5
  "keywords": [
6
6
  "lobehub",