@donglegeyu/company-ui 2.3.0 → 2.4.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-21T00:26:42.521Z",
2
+ "generatedAt": "2026-11-17T03:06:42.096Z",
3
3
  "count": 66,
4
4
  "categories": [
5
5
  {
@@ -762,7 +762,7 @@ var iconPaths = {
762
762
  category: "system",
763
763
  children: /*#__PURE__*/_jsxs(_Fragment, {
764
764
  children: [/*#__PURE__*/_jsx("g", {
765
- clipPath: "url(#icon-c526dc8b4e0022c)",
765
+ clipPath: "url(#icon-d27f2bfb4e0022c)",
766
766
  children: /*#__PURE__*/_jsx("path", {
767
767
  d: "M10.6963 17.5042C13.3347 14.8657 16.4701 14.9387 19.8781 16.8076L32.62 9.74509L31.8989 4.78683L43.2126 16.1005L38.2656 15.3907L31.1918 28.1214C32.9752 31.7589 33.1337 34.6647 30.4953 37.3032C30.4953 37.3032 26.235 33.0429 22.7171 29.525L6.44305 41.5564L18.4382 25.2461C14.9202 21.7281 10.6963 17.5042 10.6963 17.5042Z",
768
768
  fill: "none",
@@ -772,7 +772,7 @@ var iconPaths = {
772
772
  })
773
773
  }), /*#__PURE__*/_jsx("defs", {
774
774
  children: /*#__PURE__*/_jsx("clipPath", {
775
- id: "icon-c526dc8b4e0022c",
775
+ id: "icon-d27f2bfb4e0022c",
776
776
  children: /*#__PURE__*/_jsx("rect", {
777
777
  width: "48",
778
778
  height: "48",
@@ -789,7 +789,7 @@ var iconPaths = {
789
789
  category: "system",
790
790
  children: /*#__PURE__*/_jsxs(_Fragment, {
791
791
  children: [/*#__PURE__*/_jsx("g", {
792
- clipPath: "url(#icon-b374c06b4e0022c)",
792
+ clipPath: "url(#icon-ac342f6b4e0022c)",
793
793
  children: /*#__PURE__*/_jsx("path", {
794
794
  d: "M10.6963 17.5042C13.3347 14.8657 16.4701 14.9387 19.8781 16.8076L32.62 9.74509L31.8989 4.78683L43.2126 16.1005L38.2656 15.3907L31.1918 28.1214C32.9752 31.7589 33.1337 34.6647 30.4953 37.3032C30.4953 37.3032 26.235 33.0429 22.7171 29.525L6.44305 41.5564L18.4382 25.2461C14.9202 21.7281 10.6963 17.5042 10.6963 17.5042Z",
795
795
  fill: "currentColor",
@@ -799,7 +799,7 @@ var iconPaths = {
799
799
  })
800
800
  }), /*#__PURE__*/_jsx("defs", {
801
801
  children: /*#__PURE__*/_jsx("clipPath", {
802
- id: "icon-b374c06b4e0022c",
802
+ id: "icon-ac342f6b4e0022c",
803
803
  children: /*#__PURE__*/_jsx("rect", {
804
804
  width: "48",
805
805
  height: "48",
@@ -5,8 +5,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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 { getIconDefinition } from "./icons";
8
+ import { getAllIconDefinition } from "./all-icons";
8
9
 
9
- // 未注册图标键的兜底图标,保证任何输入都有可见输出(业务环境无 iconpark sprite,不能依赖 <use> 静默回退)
10
+ // 未注册图标键的兜底图标,保证任何输入都有可见输出
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
11
12
  var FALLBACK_ICON = "folder-open";
12
13
  function toCssSize(size, fallback) {
@@ -14,6 +15,7 @@ function toCssSize(size, fallback) {
14
15
  return typeof size === "number" ? "".concat(size, "px") : size;
15
16
  }
16
17
  export default function SvgIcon(_ref) {
18
+ var _getIconDefinition;
17
19
  var name = _ref.name,
18
20
  href = _ref.href,
19
21
  className = _ref.className,
@@ -26,10 +28,10 @@ export default function SvgIcon(_ref) {
26
28
  ariaLabel = _ref.ariaLabel,
27
29
  onClick = _ref.onClick;
28
30
  var key = name !== null && name !== void 0 ? name : href;
29
- var icon = key ? getIconDefinition(key) : undefined;
31
+ // 查找优先级:精选内置表 → 全量编译表(方案 A:业务环境零网络渲染全量图标)→ href sprite
32
+ var icon = key ? (_getIconDefinition = getIconDefinition(key)) !== null && _getIconDefinition !== void 0 ? _getIconDefinition : getAllIconDefinition(key) : undefined;
30
33
 
31
- // name 未注册:dev 警告并兜底渲染,避免业务环境静默空白
32
- // (href 未注册不警告,IconParkGallery 全量库走 <use> sprite 是合法路径)
34
+ // name 未命中内置与全量表:dev 警告并兜底渲染,避免业务环境静默空白
33
35
  if (!icon && name) {
34
36
  if (process.env.NODE_ENV !== "production") {
35
37
  console.warn("[SvgIcon] \u672A\u6CE8\u518C\u7684\u56FE\u6807 name \"".concat(name, "\"\uFF0C\u5DF2\u56DE\u9000\u4E3A \"").concat(FALLBACK_ICON, "\"\u3002\u8BF7\u4F7F\u7528\u5185\u7F6E\u56FE\u6807\u96C6\uFF08/icon-library \u7CBE\u9009\uFF09\u4E2D\u7684\u952E\u3002"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donglegeyu/company-ui",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",