@lobehub/icons 1.28.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.
- package/es/Ai21/components/Combine.d.ts +3 -1
- package/es/Ai21/components/Combine.js +6 -2
- package/es/AiMass/style.d.ts +1 -1
- package/es/AiMass/style.js +1 -1
- package/es/Azure/components/Avatar.js +1 -2
- package/es/Azure/components/Color.js +5 -5
- package/es/Azure/components/Mono.js +5 -5
- package/es/Baichuan/components/Avatar.js +2 -2
- package/es/Baichuan/index.d.ts +1 -0
- package/es/Baichuan/index.js +2 -1
- package/es/Google/components/Color.js +12 -16
- package/es/Google/components/Mono.js +7 -1
- package/es/Groq/components/Combine.d.ts +3 -1
- package/es/Groq/components/Combine.js +7 -2
- package/es/IconAvatar/index.js +2 -4
- package/es/ModelIcon/DefaultAvatar.d.ts +4 -0
- package/es/ModelIcon/DefaultAvatar.js +42 -0
- package/es/ModelIcon/DefaultIcon.d.ts +9 -0
- package/es/ModelIcon/DefaultIcon.js +30 -0
- package/es/ModelIcon/const.d.ts +19 -0
- package/es/ModelIcon/const.js +149 -0
- package/es/ModelIcon/index.d.ts +10 -0
- package/es/ModelIcon/index.js +136 -0
- package/es/ModelTag/index.d.ts +8 -0
- package/es/ModelTag/index.js +28 -0
- package/es/Moonshot/components/Combine.d.ts +3 -1
- package/es/Moonshot/components/Combine.js +14 -3
- package/es/OpenRouter/components/Combine.d.ts +3 -1
- package/es/OpenRouter/components/Combine.js +11 -3
- package/es/ProviderCombine/const.d.ts +12 -0
- package/es/ProviderCombine/const.js +212 -0
- package/es/ProviderCombine/index.d.ts +11 -0
- package/es/ProviderCombine/index.js +52 -0
- package/es/ProviderIcon/DefaultAvatar.d.ts +4 -0
- package/es/ProviderIcon/DefaultAvatar.js +42 -0
- package/es/ProviderIcon/DefaultIcon.d.ts +9 -0
- package/es/ProviderIcon/DefaultIcon.js +30 -0
- package/es/ProviderIcon/const.d.ts +44 -0
- package/es/ProviderIcon/const.js +114 -0
- package/es/ProviderIcon/index.d.ts +11 -0
- package/es/ProviderIcon/index.js +136 -0
- package/es/Tongyi/components/Avatar.js +2 -2
- package/es/Tongyi/components/Combine.js +10 -3
- package/es/ZeroOne/components/Combine.d.ts +3 -1
- package/es/ZeroOne/components/Combine.js +8 -3
- package/es/ZeroOne/style.d.ts +1 -1
- package/es/ZeroOne/style.js +1 -1
- package/es/index.d.ts +6 -0
- package/es/index.js +6 -0
- package/package.json +16 -16
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IconCombineProps } from "../../IconCombine";
|
|
3
|
-
export
|
|
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,5 +1,5 @@
|
|
|
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 = ["iconProps"];
|
|
2
|
+
var _excluded = ["type", "iconProps"];
|
|
3
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
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
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; }
|
|
@@ -14,8 +14,12 @@ import Avatar from "./Avatar";
|
|
|
14
14
|
import Text from "./Text";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
var Combine = /*#__PURE__*/memo(function (_ref) {
|
|
17
|
-
var
|
|
17
|
+
var _ref$type = _ref.type,
|
|
18
|
+
type = _ref$type === void 0 ? 'mono' : _ref$type,
|
|
19
|
+
iconProps = _ref.iconProps,
|
|
18
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
if (type === 'mono') return /*#__PURE__*/_jsx(Text, _objectSpread({}, rest));
|
|
19
23
|
return /*#__PURE__*/_jsx(IconCombine, _objectSpread({
|
|
20
24
|
Icon: Avatar,
|
|
21
25
|
Text: Text,
|
package/es/AiMass/style.d.ts
CHANGED
package/es/AiMass/style.js
CHANGED
|
@@ -18,8 +18,7 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
18
18
|
return /*#__PURE__*/_jsx(IconAvatar, _objectSpread({
|
|
19
19
|
Icon: Mono,
|
|
20
20
|
"aria-label": TITLE,
|
|
21
|
-
background: background || COLOR_PRIMARY
|
|
22
|
-
iconMultiple: 0.6
|
|
21
|
+
background: background || COLOR_PRIMARY
|
|
23
22
|
}, rest));
|
|
24
23
|
});
|
|
25
24
|
export default Avatar;
|
|
@@ -23,23 +23,23 @@ var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
23
23
|
flex: 'none',
|
|
24
24
|
lineHeight: 1
|
|
25
25
|
}, style),
|
|
26
|
-
viewBox: "0 0
|
|
26
|
+
viewBox: "0 0 24 24",
|
|
27
27
|
width: size,
|
|
28
28
|
xmlns: "http://www.w3.org/2000/svg"
|
|
29
29
|
}, rest), {}, {
|
|
30
30
|
children: [/*#__PURE__*/_jsx("title", {
|
|
31
31
|
children: TITLE
|
|
32
32
|
}), /*#__PURE__*/_jsx("path", {
|
|
33
|
-
d: "
|
|
33
|
+
d: "M11.49 2H2v9.492h9.492V2h-.002z",
|
|
34
34
|
fill: "#F25022"
|
|
35
35
|
}), /*#__PURE__*/_jsx("path", {
|
|
36
|
-
d: "
|
|
36
|
+
d: "M22 2h-9.492v9.492H22V2z",
|
|
37
37
|
fill: "#7FBA00"
|
|
38
38
|
}), /*#__PURE__*/_jsx("path", {
|
|
39
|
-
d: "
|
|
39
|
+
d: "M11.49 12.508H2V22h9.492v-9.492h-.002z",
|
|
40
40
|
fill: "#00A4EF"
|
|
41
41
|
}), /*#__PURE__*/_jsx("path", {
|
|
42
|
-
d: "
|
|
42
|
+
d: "M22 12.508h-9.492V22H22v-9.492z",
|
|
43
43
|
fill: "#FFB900"
|
|
44
44
|
})]
|
|
45
45
|
}));
|
|
@@ -25,20 +25,20 @@ var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
25
25
|
flex: 'none',
|
|
26
26
|
lineHeight: 1
|
|
27
27
|
}, style),
|
|
28
|
-
viewBox: "0 0
|
|
28
|
+
viewBox: "0 0 24 24",
|
|
29
29
|
width: size,
|
|
30
30
|
xmlns: "http://www.w3.org/2000/svg"
|
|
31
31
|
}, rest), {}, {
|
|
32
32
|
children: [/*#__PURE__*/_jsx("title", {
|
|
33
33
|
children: TITLE
|
|
34
34
|
}), /*#__PURE__*/_jsx("path", {
|
|
35
|
-
d: "
|
|
35
|
+
d: "M11.49 2H2v9.492h9.492V2h-.002z"
|
|
36
36
|
}), /*#__PURE__*/_jsx("path", {
|
|
37
|
-
d: "
|
|
37
|
+
d: "M22 2h-9.492v9.492H22V2z"
|
|
38
38
|
}), /*#__PURE__*/_jsx("path", {
|
|
39
|
-
d: "
|
|
39
|
+
d: "M11.49 12.508H2V22h9.492v-9.492h-.002z"
|
|
40
40
|
}), /*#__PURE__*/_jsx("path", {
|
|
41
|
-
d: "
|
|
41
|
+
d: "M22 12.508h-9.492V22H22v-9.492z"
|
|
42
42
|
})]
|
|
43
43
|
}));
|
|
44
44
|
});
|
|
@@ -9,7 +9,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
9
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
10
|
import { memo } from 'react';
|
|
11
11
|
import IconAvatar from "../../IconAvatar";
|
|
12
|
-
import {
|
|
12
|
+
import { COLOR_PRIMARY, TITLE } from "../style";
|
|
13
13
|
import Mono from "./Mono";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -18,7 +18,7 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
|
18
18
|
return /*#__PURE__*/_jsx(IconAvatar, _objectSpread({
|
|
19
19
|
Icon: Mono,
|
|
20
20
|
"aria-label": TITLE,
|
|
21
|
-
background: background ||
|
|
21
|
+
background: background || COLOR_PRIMARY
|
|
22
22
|
}, rest));
|
|
23
23
|
});
|
|
24
24
|
export default Avatar;
|
package/es/Baichuan/index.d.ts
CHANGED
package/es/Baichuan/index.js
CHANGED
|
@@ -3,12 +3,13 @@ import Color from "./components/Color";
|
|
|
3
3
|
import Combine from "./components/Combine";
|
|
4
4
|
import Mono from "./components/Mono";
|
|
5
5
|
import Text from "./components/Text";
|
|
6
|
-
import { COLOR_PRIMARY, TITLE } from "./style";
|
|
6
|
+
import { COLOR_GRADIENT, COLOR_PRIMARY, TITLE } from "./style";
|
|
7
7
|
var Icons = Mono;
|
|
8
8
|
Icons.Color = Color;
|
|
9
9
|
Icons.Text = Text;
|
|
10
10
|
Icons.Combine = Combine;
|
|
11
11
|
Icons.Avatar = Avatar;
|
|
12
12
|
Icons.colorPrimary = COLOR_PRIMARY;
|
|
13
|
+
Icons.colorGradient = COLOR_GRADIENT;
|
|
13
14
|
Icons.title = TITLE;
|
|
14
15
|
export default Icons;
|
|
@@ -29,22 +29,18 @@ var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
29
|
}, rest), {}, {
|
|
30
30
|
children: [/*#__PURE__*/_jsx("title", {
|
|
31
31
|
children: TITLE
|
|
32
|
-
}), /*#__PURE__*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}), /*#__PURE__*/_jsx("path", {
|
|
45
|
-
d: "M12.245 4.64c2.3 0 3.85.973 4.735 1.787l3.455-3.307C18.313 1.187 15.551 0 12.245 0 7.455 0 3.32 2.693 1.306 6.613l3.96 3.014c.993-2.894 3.74-4.987 6.979-4.987",
|
|
46
|
-
fill: "#EB4335"
|
|
47
|
-
})]
|
|
32
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
33
|
+
d: "M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z",
|
|
34
|
+
fill: "#4285F4"
|
|
35
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
36
|
+
d: "M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z",
|
|
37
|
+
fill: "#34A853"
|
|
38
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
39
|
+
d: "M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z",
|
|
40
|
+
fill: "#FBBC05"
|
|
41
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
42
|
+
d: "M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z",
|
|
43
|
+
fill: "#EB4335"
|
|
48
44
|
})]
|
|
49
45
|
}));
|
|
50
46
|
});
|
|
@@ -32,7 +32,13 @@ var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
32
32
|
children: [/*#__PURE__*/_jsx("title", {
|
|
33
33
|
children: TITLE
|
|
34
34
|
}), /*#__PURE__*/_jsx("path", {
|
|
35
|
-
d: "
|
|
35
|
+
d: "M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z"
|
|
36
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
37
|
+
d: "M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z"
|
|
38
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
39
|
+
d: "M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z"
|
|
40
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
41
|
+
d: "M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z"
|
|
36
42
|
})]
|
|
37
43
|
}));
|
|
38
44
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IconCombineProps } from "../../IconCombine";
|
|
3
|
-
export
|
|
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,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
|
|
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
|
|
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));
|
package/es/IconAvatar/index.js
CHANGED
|
@@ -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 {
|
|
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(
|
|
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,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;
|