@lobehub/icons 1.27.0 → 1.29.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.
Files changed (66) hide show
  1. package/README.md +3 -3
  2. package/es/Ai21/components/Combine.d.ts +3 -1
  3. package/es/Ai21/components/Combine.js +6 -2
  4. package/es/AiMass/style.d.ts +1 -1
  5. package/es/AiMass/style.js +1 -1
  6. package/es/Aya/components/Avatar.d.ts +5 -0
  7. package/es/Aya/components/Avatar.js +24 -0
  8. package/es/Aya/components/Color.d.ts +3 -0
  9. package/es/Aya/components/Color.js +38 -0
  10. package/es/Aya/components/Combine.d.ts +7 -0
  11. package/es/Aya/components/Combine.js +30 -0
  12. package/es/Aya/components/Mono.d.ts +3 -0
  13. package/es/Aya/components/Mono.js +39 -0
  14. package/es/Aya/components/Text.d.ts +3 -0
  15. package/es/Aya/components/Text.js +39 -0
  16. package/es/Aya/index.d.ts +15 -0
  17. package/es/Aya/index.js +14 -0
  18. package/es/Aya/style.d.ts +4 -0
  19. package/es/Aya/style.js +4 -0
  20. package/es/Azure/components/Avatar.js +1 -2
  21. package/es/Azure/components/Color.js +5 -5
  22. package/es/Azure/components/Mono.js +5 -5
  23. package/es/Baichuan/components/Avatar.js +2 -2
  24. package/es/Baichuan/index.d.ts +1 -0
  25. package/es/Baichuan/index.js +2 -1
  26. package/es/Claude/components/Text.js +1 -1
  27. package/es/Google/components/Color.js +12 -16
  28. package/es/Google/components/Mono.js +7 -1
  29. package/es/Groq/components/Combine.d.ts +3 -1
  30. package/es/Groq/components/Combine.js +7 -2
  31. package/es/IconAvatar/index.js +2 -4
  32. package/es/ModelIcon/DefaultAvatar.d.ts +4 -0
  33. package/es/ModelIcon/DefaultAvatar.js +42 -0
  34. package/es/ModelIcon/DefaultIcon.d.ts +9 -0
  35. package/es/ModelIcon/DefaultIcon.js +30 -0
  36. package/es/ModelIcon/const.d.ts +19 -0
  37. package/es/ModelIcon/const.js +149 -0
  38. package/es/ModelIcon/index.d.ts +10 -0
  39. package/es/ModelIcon/index.js +136 -0
  40. package/es/ModelTag/index.d.ts +8 -0
  41. package/es/ModelTag/index.js +28 -0
  42. package/es/Moonshot/components/Combine.d.ts +3 -1
  43. package/es/Moonshot/components/Combine.js +14 -3
  44. package/es/OpenRouter/components/Combine.d.ts +3 -1
  45. package/es/OpenRouter/components/Combine.js +11 -3
  46. package/es/ProviderCombine/const.d.ts +12 -0
  47. package/es/ProviderCombine/const.js +212 -0
  48. package/es/ProviderCombine/index.d.ts +11 -0
  49. package/es/ProviderCombine/index.js +52 -0
  50. package/es/ProviderIcon/DefaultAvatar.d.ts +4 -0
  51. package/es/ProviderIcon/DefaultAvatar.js +42 -0
  52. package/es/ProviderIcon/DefaultIcon.d.ts +9 -0
  53. package/es/ProviderIcon/DefaultIcon.js +30 -0
  54. package/es/ProviderIcon/const.d.ts +44 -0
  55. package/es/ProviderIcon/const.js +114 -0
  56. package/es/ProviderIcon/index.d.ts +11 -0
  57. package/es/ProviderIcon/index.js +136 -0
  58. package/es/Tongyi/components/Avatar.js +2 -2
  59. package/es/Tongyi/components/Combine.js +10 -3
  60. package/es/ZeroOne/components/Combine.d.ts +3 -1
  61. package/es/ZeroOne/components/Combine.js +8 -3
  62. package/es/ZeroOne/style.d.ts +1 -1
  63. package/es/ZeroOne/style.js +1 -1
  64. package/es/index.d.ts +7 -0
  65. package/es/index.js +7 -0
  66. package/package.json +17 -17
@@ -1,10 +1,12 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["type"];
2
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
7
  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
- function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
10
  import { memo } from 'react';
9
11
  import IconCombine from "../../IconCombine";
10
12
  import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from "../style";
@@ -12,11 +14,14 @@ import Avatar from "./Avatar";
12
14
  import Text from "./Text";
13
15
  import { jsx as _jsx } from "react/jsx-runtime";
14
16
  var Combine = /*#__PURE__*/memo(function (_ref) {
15
- var rest = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
17
+ var _ref$type = _ref.type,
18
+ type = _ref$type === void 0 ? 'mono' : _ref$type,
19
+ rest = _objectWithoutProperties(_ref, _excluded);
16
20
  return /*#__PURE__*/_jsx(IconCombine, _objectSpread({
17
21
  Icon: Avatar,
18
22
  Text: Text,
19
23
  "aria-label": TITLE,
24
+ showLogo: type === 'color',
20
25
  spaceMultiple: SPACE_MULTIPLE,
21
26
  textMultiple: TEXT_MULTIPLE
22
27
  }, rest));
@@ -5,7 +5,7 @@ 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 { forwardRef } from 'react';
8
- import { Flexbox } from 'react-layout-kit';
8
+ import { Center } from 'react-layout-kit';
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  var IconAvatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
11
11
  var _ref$shape = _ref.shape,
@@ -20,10 +20,8 @@ var IconAvatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
20
20
  Icon = _ref.Icon,
21
21
  iconStyle = _ref.iconStyle,
22
22
  iconClassName = _ref.iconClassName;
23
- return /*#__PURE__*/_jsx(Flexbox, {
24
- align: 'center',
23
+ return /*#__PURE__*/_jsx(Center, {
25
24
  flex: 'none',
26
- justify: 'center',
27
25
  ref: ref,
28
26
  style: _objectSpread({
29
27
  background: background,
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconAvatarProps } from "../IconAvatar";
3
+ declare const DefaultAvatar: import("react").ForwardRefExoticComponent<Omit<IconAvatarProps, "Icon"> & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default DefaultAvatar;
@@ -0,0 +1,42 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
+ import { useTheme } from 'antd-style';
8
+ import { forwardRef } from 'react';
9
+ import { Center } from 'react-layout-kit';
10
+ import DefaultIcon from "./DefaultIcon";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ var DefaultAvatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
13
+ var _ref$shape = _ref.shape,
14
+ shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
15
+ color = _ref.color,
16
+ background = _ref.background,
17
+ size = _ref.size,
18
+ style = _ref.style,
19
+ _ref$iconMultiple = _ref.iconMultiple,
20
+ iconMultiple = _ref$iconMultiple === void 0 ? 0.6 : _ref$iconMultiple,
21
+ iconStyle = _ref.iconStyle,
22
+ iconClassName = _ref.iconClassName;
23
+ var theme = useTheme();
24
+ return /*#__PURE__*/_jsx(Center, {
25
+ flex: 'none',
26
+ ref: ref,
27
+ style: _objectSpread({
28
+ background: background || theme.colorFillSecondary,
29
+ borderRadius: shape === 'circle' ? '50%' : Math.floor(size * 0.1),
30
+ color: color,
31
+ height: size,
32
+ width: size
33
+ }, style),
34
+ children: /*#__PURE__*/_jsx(DefaultIcon, {
35
+ className: iconClassName,
36
+ color: color,
37
+ size: size * iconMultiple,
38
+ style: iconStyle
39
+ })
40
+ });
41
+ });
42
+ export default DefaultAvatar;
@@ -0,0 +1,9 @@
1
+ import { CSSProperties } from 'react';
2
+ interface DefaultIconProps {
3
+ className?: string;
4
+ color?: string;
5
+ size?: number;
6
+ style?: CSSProperties;
7
+ }
8
+ declare const DefaultAvatar: import("react").ForwardRefExoticComponent<DefaultIconProps & import("react").RefAttributes<any>>;
9
+ export default DefaultAvatar;
@@ -0,0 +1,30 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["color", "size"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import { Icon } from '@lobehub/ui';
11
+ import { useTheme } from 'antd-style';
12
+ import { Brain } from 'lucide-react';
13
+ import { forwardRef } from 'react';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ var DefaultAvatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
+ var color = _ref.color,
17
+ _ref$size = _ref.size,
18
+ size = _ref$size === void 0 ? 12 : _ref$size,
19
+ rest = _objectWithoutProperties(_ref, _excluded);
20
+ var theme = useTheme();
21
+ return /*#__PURE__*/_jsx(Icon, _objectSpread({
22
+ color: color || theme.colorTextDescription,
23
+ icon: Brain,
24
+ ref: ref,
25
+ size: {
26
+ fontSize: size
27
+ }
28
+ }, rest));
29
+ });
30
+ export default DefaultAvatar;
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ import type { IconAvatarProps } from "../IconAvatar";
3
+ import type { IconCombineProps } from "../IconCombine";
4
+ import type { IconType } from "../types";
5
+ type ModelIconType = FC<IconType & any> & {
6
+ Avatar: FC<Omit<IconAvatarProps, 'Icon'> & any>;
7
+ Brand?: FC<IconType & any>;
8
+ BrandColor?: FC<IconType & any>;
9
+ Color?: FC<IconType & any>;
10
+ Combine?: FC<Omit<IconCombineProps, 'Icon' | 'Text'> & any>;
11
+ Text?: FC<IconType & any>;
12
+ };
13
+ export interface ModelMapping {
14
+ Icon: ModelIconType;
15
+ keywords: string[];
16
+ props?: any;
17
+ }
18
+ export declare const modelMappings: ModelMapping[];
19
+ export {};
@@ -0,0 +1,149 @@
1
+ import Adobe from "../Adobe";
2
+ import Ai21 from "../Ai21";
3
+ import Ai360 from "../Ai360";
4
+ import AiMass from "../AiMass";
5
+ import Aws from "../Aws";
6
+ import Azure from "../Azure";
7
+ import Baichuan from "../Baichuan";
8
+ import ByteDance from "../ByteDance";
9
+ import ChatGLM from "../ChatGLM";
10
+ import Claude from "../Claude";
11
+ import Cohere from "../Cohere";
12
+ import Dbrx from "../Dbrx";
13
+ import DeepSeek from "../DeepSeek";
14
+ import FishAudio from "../FishAudio";
15
+ import Gemini from "../Gemini";
16
+ import Gemma from "../Gemma";
17
+ import Hunyuan from "../Hunyuan";
18
+ import LLaVA from "../LLaVA";
19
+ import Meta from "../Meta";
20
+ import Minimax from "../Minimax";
21
+ import Mistral from "../Mistral";
22
+ import Moonshot from "../Moonshot";
23
+ import OpenAI from "../OpenAI";
24
+ import OpenChat from "../OpenChat";
25
+ import OpenRouter from "../OpenRouter";
26
+ import Perplexity from "../Perplexity";
27
+ import Rwkv from "../Rwkv";
28
+ import Spark from "../Spark";
29
+ import Stability from "../Stability";
30
+ import Stepfun from "../Stepfun";
31
+ import Tongyi from "../Tongyi";
32
+ import Wenxin from "../Wenxin";
33
+ import Yi from "../Yi";
34
+
35
+ // Define a type for our model mapping
36
+
37
+ // Create a mapping of model keywords to their respective Icon functions
38
+ export var modelMappings = [{
39
+ Icon: OpenAI,
40
+ keywords: ['^gpt-3'],
41
+ props: {
42
+ type: 'gpt3'
43
+ }
44
+ }, {
45
+ Icon: OpenAI,
46
+ keywords: ['^gpt-4'],
47
+ props: {
48
+ type: 'gpt4'
49
+ }
50
+ }, {
51
+ Icon: OpenAI,
52
+ keywords: ['^gpt', 'openai', 'dalle']
53
+ }, {
54
+ Icon: ChatGLM,
55
+ keywords: ['glm', 'chatglm']
56
+ }, {
57
+ Icon: DeepSeek,
58
+ keywords: ['deepseek']
59
+ }, {
60
+ Icon: Claude,
61
+ keywords: ['claude']
62
+ }, {
63
+ Icon: Aws,
64
+ keywords: ['titan']
65
+ }, {
66
+ Icon: Meta,
67
+ keywords: ['llama']
68
+ }, {
69
+ Icon: LLaVA,
70
+ keywords: ['llava']
71
+ }, {
72
+ Icon: Gemini,
73
+ keywords: ['gemini']
74
+ }, {
75
+ Icon: Gemma,
76
+ keywords: ['gemma']
77
+ }, {
78
+ Icon: Moonshot,
79
+ keywords: ['moonshot']
80
+ }, {
81
+ Icon: Tongyi,
82
+ keywords: ['qwen']
83
+ }, {
84
+ Icon: Minimax,
85
+ keywords: ['minmax', 'abab']
86
+ }, {
87
+ Icon: Mistral,
88
+ keywords: ['mistral', 'mixtral']
89
+ }, {
90
+ Icon: Perplexity,
91
+ keywords: ['pplx', 'sonar']
92
+ }, {
93
+ Icon: Yi,
94
+ keywords: ['^yi-']
95
+ }, {
96
+ Icon: OpenRouter,
97
+ keywords: ['^openrouter']
98
+ }, {
99
+ Icon: OpenChat,
100
+ keywords: ['^openchat']
101
+ }, {
102
+ Icon: Cohere,
103
+ keywords: ['command']
104
+ }, {
105
+ Icon: Dbrx,
106
+ keywords: ['dbrx']
107
+ }, {
108
+ Icon: Stepfun,
109
+ keywords: ['step']
110
+ }, {
111
+ Icon: AiMass,
112
+ keywords: ['taichu']
113
+ }, {
114
+ Icon: Ai360,
115
+ keywords: ['360gpt']
116
+ }, {
117
+ Icon: Baichuan,
118
+ keywords: ['baichuan']
119
+ }, {
120
+ Icon: Rwkv,
121
+ keywords: ['rwkv']
122
+ }, {
123
+ Icon: Wenxin,
124
+ keywords: ['ernie']
125
+ }, {
126
+ Icon: Spark,
127
+ keywords: ['spark']
128
+ }, {
129
+ Icon: Hunyuan,
130
+ keywords: ['hunyuan']
131
+ }, {
132
+ Icon: FishAudio,
133
+ keywords: ['^d_', '^g_', '^wd_']
134
+ }, {
135
+ Icon: ByteDance,
136
+ keywords: ['skylark']
137
+ }, {
138
+ Icon: Stability,
139
+ keywords: ['stable-diffusion', 'stable-video', 'stable-cascade', 'sdxl', 'stablelm', '^stable-', '^sd3', '^sd2', '^sd1']
140
+ }, {
141
+ Icon: Azure,
142
+ keywords: ['wizardlm', 'phi3', 'phi-3']
143
+ }, {
144
+ Icon: Adobe,
145
+ keywords: ['firefly']
146
+ }, {
147
+ Icon: Ai21,
148
+ keywords: ['jamba', '^j2-']
149
+ }];
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ export interface ModelIconProps {
3
+ className?: string;
4
+ model?: string;
5
+ size?: number;
6
+ style?: CSSProperties;
7
+ type?: 'avatar' | 'mono' | 'color' | 'combine' | 'combine-color';
8
+ }
9
+ declare const ModelIcon: import("react").ForwardRefExoticComponent<ModelIconProps & import("react").RefAttributes<any>>;
10
+ export default ModelIcon;
@@ -0,0 +1,136 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["model", "size", "type"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
12
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
+ import { forwardRef, useMemo } from 'react';
14
+ import DefaultAvatar from "./DefaultAvatar";
15
+ import DefaultIcon from "./DefaultIcon";
16
+ import { modelMappings } from "./const";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ var ModelIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
19
+ var originModel = _ref.model,
20
+ _ref$size = _ref.size,
21
+ size = _ref$size === void 0 ? 12 : _ref$size,
22
+ _ref$type = _ref.type,
23
+ type = _ref$type === void 0 ? 'avatar' : _ref$type,
24
+ rest = _objectWithoutProperties(_ref, _excluded);
25
+ var Render = useMemo(function () {
26
+ if (!originModel) return;
27
+ var model = originModel.toLowerCase();
28
+ var _iterator = _createForOfIteratorHelper(modelMappings),
29
+ _step;
30
+ try {
31
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
32
+ var item = _step.value;
33
+ if (item.keywords.some(function (keyword) {
34
+ return new RegExp(keyword, 'i').test(model);
35
+ })) {
36
+ return item;
37
+ }
38
+ }
39
+ } catch (err) {
40
+ _iterator.e(err);
41
+ } finally {
42
+ _iterator.f();
43
+ }
44
+ }, [originModel]);
45
+ switch (type) {
46
+ case 'avatar':
47
+ {
48
+ if (!(Render !== null && Render !== void 0 && Render.Icon)) return /*#__PURE__*/_jsx(DefaultAvatar, _objectSpread({
49
+ ref: ref,
50
+ size: size
51
+ }, rest));
52
+ return /*#__PURE__*/_jsx(Render.Icon.Avatar, _objectSpread(_objectSpread({
53
+ ref: ref,
54
+ size: size
55
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest));
56
+ }
57
+ case 'mono':
58
+ {
59
+ if (!(Render !== null && Render !== void 0 && Render.Icon)) return /*#__PURE__*/_jsx(DefaultIcon, _objectSpread({
60
+ ref: ref,
61
+ size: size
62
+ }, rest));
63
+ return /*#__PURE__*/_jsx(Render.Icon, _objectSpread(_objectSpread({
64
+ ref: ref,
65
+ size: size
66
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest));
67
+ }
68
+ case 'color':
69
+ {
70
+ var _Render$Icon;
71
+ if (!(Render !== null && Render !== void 0 && Render.Icon)) return /*#__PURE__*/_jsx(DefaultIcon, _objectSpread({
72
+ ref: ref,
73
+ size: size
74
+ }, rest));
75
+ return (_Render$Icon = Render.Icon) !== null && _Render$Icon !== void 0 && _Render$Icon.Color ? /*#__PURE__*/_jsx(Render.Icon.Color, _objectSpread(_objectSpread({
76
+ ref: ref,
77
+ size: size
78
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest)) : /*#__PURE__*/_jsx(Render.Icon, _objectSpread(_objectSpread({
79
+ ref: ref,
80
+ size: size
81
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest));
82
+ }
83
+ case 'combine':
84
+ {
85
+ var _Render$Icon2, _Render$Icon3, _Render$Icon4;
86
+ if (!(Render !== null && Render !== void 0 && Render.Icon)) return /*#__PURE__*/_jsx(DefaultIcon, _objectSpread({
87
+ ref: ref,
88
+ size: size
89
+ }, rest));
90
+ return (_Render$Icon2 = Render.Icon) !== null && _Render$Icon2 !== void 0 && _Render$Icon2.Combine ? /*#__PURE__*/_jsx(Render.Icon.Combine, _objectSpread(_objectSpread({
91
+ ref: ref,
92
+ size: size
93
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest)) : (_Render$Icon3 = Render.Icon) !== null && _Render$Icon3 !== void 0 && _Render$Icon3.Brand ? /*#__PURE__*/_jsx(Render.Icon.Brand, _objectSpread(_objectSpread({
94
+ ref: ref,
95
+ size: size
96
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest)) : (_Render$Icon4 = Render.Icon) !== null && _Render$Icon4 !== void 0 && _Render$Icon4.Text ? /*#__PURE__*/_jsx(Render.Icon.Text, _objectSpread(_objectSpread({
97
+ ref: ref,
98
+ size: size
99
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest)) : /*#__PURE__*/_jsx(Render.Icon, _objectSpread(_objectSpread({
100
+ ref: ref,
101
+ size: size
102
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest));
103
+ }
104
+ case 'combine-color':
105
+ {
106
+ var _Render$Icon5, _Render$Icon6, _Render$Icon7;
107
+ if (!(Render !== null && Render !== void 0 && Render.Icon)) return /*#__PURE__*/_jsx(DefaultIcon, _objectSpread({
108
+ ref: ref,
109
+ size: size
110
+ }, rest));
111
+ return (_Render$Icon5 = Render.Icon) !== null && _Render$Icon5 !== void 0 && _Render$Icon5.Combine ? /*#__PURE__*/_jsx(Render.Icon.Combine, _objectSpread(_objectSpread({
112
+ ref: ref,
113
+ size: size,
114
+ type: 'color'
115
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest)) : (_Render$Icon6 = Render.Icon) !== null && _Render$Icon6 !== void 0 && _Render$Icon6.BrandColor ? /*#__PURE__*/_jsx(Render.Icon.BrandColor, _objectSpread(_objectSpread({
116
+ ref: ref,
117
+ size: size,
118
+ type: 'color'
119
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest)) : (_Render$Icon7 = Render.Icon) !== null && _Render$Icon7 !== void 0 && _Render$Icon7.Text ? /*#__PURE__*/_jsx(Render.Icon.Text, _objectSpread(_objectSpread({
120
+ ref: ref,
121
+ size: size
122
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest)) : /*#__PURE__*/_jsx(Render.Icon, _objectSpread(_objectSpread({
123
+ ref: ref,
124
+ size: size
125
+ }, (Render === null || Render === void 0 ? void 0 : Render.props) || {}), rest));
126
+ }
127
+ default:
128
+ {
129
+ return /*#__PURE__*/_jsx(DefaultIcon, _objectSpread({
130
+ ref: ref,
131
+ size: size
132
+ }, rest));
133
+ }
134
+ }
135
+ });
136
+ export default ModelIcon;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TagProps } from '@lobehub/ui';
3
+ export interface ModelTagProps extends Omit<TagProps, 'icon' | 'children'> {
4
+ model: string;
5
+ type?: 'color' | 'mono';
6
+ }
7
+ declare const ModelTag: import("react").NamedExoticComponent<ModelTagProps>;
8
+ export default ModelTag;
@@ -0,0 +1,28 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["type", "model"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import { Tag } from '@lobehub/ui';
11
+ import { memo } from 'react';
12
+ import ModelIcon from "../ModelIcon";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ var ModelTag = /*#__PURE__*/memo(function (_ref) {
15
+ var _ref$type = _ref.type,
16
+ type = _ref$type === void 0 ? 'mono' : _ref$type,
17
+ model = _ref.model,
18
+ rest = _objectWithoutProperties(_ref, _excluded);
19
+ return /*#__PURE__*/_jsx(Tag, _objectSpread(_objectSpread({
20
+ icon: /*#__PURE__*/_jsx(ModelIcon, {
21
+ model: model,
22
+ type: type
23
+ })
24
+ }, rest), {}, {
25
+ children: model
26
+ }));
27
+ });
28
+ export default ModelTag;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type IconCombineProps } from "../../IconCombine";
3
- export type CombineProps = Omit<IconCombineProps, 'Icon' | 'Text'>;
3
+ export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
4
+ type?: 'mono' | 'color';
5
+ }
4
6
  declare const Combine: import("react").NamedExoticComponent<CombineProps>;
5
7
  export default Combine;
@@ -1,22 +1,33 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["type", "iconProps"];
2
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
7
  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
- function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import { useThemeMode } from 'antd-style';
8
11
  import { memo } from 'react';
9
12
  import IconCombine from "../../IconCombine";
10
- import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from "../style";
13
+ import { COLOR_PRIMARY, SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from "../style";
11
14
  import Mono from "./Mono";
12
15
  import Text from "./Text";
13
16
  import { jsx as _jsx } from "react/jsx-runtime";
14
17
  var Combine = /*#__PURE__*/memo(function (_ref) {
15
- var rest = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
18
+ var _ref$type = _ref.type,
19
+ type = _ref$type === void 0 ? 'mono' : _ref$type,
20
+ iconProps = _ref.iconProps,
21
+ rest = _objectWithoutProperties(_ref, _excluded);
22
+ var _useThemeMode = useThemeMode(),
23
+ isDarkMode = _useThemeMode.isDarkMode;
16
24
  return /*#__PURE__*/_jsx(IconCombine, _objectSpread({
17
25
  Icon: Mono,
18
26
  Text: Text,
19
27
  "aria-label": TITLE,
28
+ iconProps: _objectSpread({
29
+ color: type === 'color' && !isDarkMode ? COLOR_PRIMARY : undefined
30
+ }, iconProps),
20
31
  spaceMultiple: SPACE_MULTIPLE,
21
32
  textMultiple: TEXT_MULTIPLE
22
33
  }, rest));
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type IconCombineProps } from "../../IconCombine";
3
- export type CombineProps = Omit<IconCombineProps, 'Icon' | 'Text'>;
3
+ export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
4
+ type?: 'mono' | 'color';
5
+ }
4
6
  declare const Combine: import("react").NamedExoticComponent<CombineProps>;
5
7
  export default Combine;
@@ -1,22 +1,30 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["type", "iconProps"];
2
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
7
  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
- function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
10
  import { memo } from 'react';
9
11
  import IconCombine from "../../IconCombine";
10
- import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from "../style";
12
+ import { COLOR_PRIMARY, SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from "../style";
11
13
  import Mono from "./Mono";
12
14
  import Text from "./Text";
13
15
  import { jsx as _jsx } from "react/jsx-runtime";
14
16
  var Combine = /*#__PURE__*/memo(function (_ref) {
15
- var rest = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
17
+ var _ref$type = _ref.type,
18
+ type = _ref$type === void 0 ? 'mono' : _ref$type,
19
+ iconProps = _ref.iconProps,
20
+ rest = _objectWithoutProperties(_ref, _excluded);
16
21
  return /*#__PURE__*/_jsx(IconCombine, _objectSpread({
17
22
  Icon: Mono,
18
23
  Text: Text,
19
24
  "aria-label": TITLE,
25
+ iconProps: _objectSpread({
26
+ color: type === 'color' ? COLOR_PRIMARY : undefined
27
+ }, iconProps),
20
28
  spaceMultiple: SPACE_MULTIPLE,
21
29
  textMultiple: TEXT_MULTIPLE
22
30
  }, rest));
@@ -0,0 +1,12 @@
1
+ import { DivProps } from '@lobehub/ui';
2
+ import { FC } from 'react';
3
+ export interface ProviderMapping {
4
+ Icon: FC<DivProps & {
5
+ size: number;
6
+ type: 'color' | 'mono';
7
+ }>;
8
+ keywords: string[];
9
+ multiple?: number;
10
+ props?: any;
11
+ }
12
+ export declare const providerMappings: ProviderMapping[];