✨ feat: Add Xinference, Coqui

This commit is contained in:
canisminor1990
2025-03-25 13:18:04 +08:00
parent 8969e4fee2
commit d94fd65be8
28 changed files with 679 additions and 16 deletions
+4
View File
@@ -0,0 +1,4 @@
# https://vectorizer.ai
VECTORIZE_URL="https://xxx"
VECTORIZE_SECRET_ACCESS_KEY="xxxx"
+2 -2
View File
@@ -43,5 +43,5 @@ test-output
# misc
# add other ignore file below
bun.lockb
*.patch
.env
*.patch
+8 -6
View File
@@ -57,7 +57,8 @@
"test": "vitest --passWithNoTests",
"test:coverage": "vitest run --coverage --passWithNoTests",
"test:update": "vitest -u",
"type-check": "tsc --noEmit"
"type-check": "tsc --noEmit",
"vectorizer": "tsx scripts/vectorizer/index.ts"
},
"lint-staged": {
"*.md": [
@@ -79,31 +80,32 @@
]
},
"dependencies": {
"@lobehub/ui": "^1.165.6",
"@lobehub/ui": "^1.168.7",
"antd-style": "^3.7.1",
"lucide-react": "^0.469.0",
"polished": "^4.3.1",
"react-layout-kit": "^1.9.1"
},
"devDependencies": {
"@babel/runtime": "^7.26.10",
"@babel/runtime": "^7.27.0",
"@commitlint/cli": "^19.8.0",
"@lobehub/lint": "^1.25.7",
"@testing-library/react": "^16.2.0",
"@types/lodash-es": "^4.17.12",
"@types/pangu": "^4.0.2",
"@types/react": "^19.0.11",
"@types/react": "^19.0.12",
"@types/react-dom": "^19.0.4",
"@vitest/coverage-v8": "^3.0.9",
"ajv": "^8.17.1",
"babel-plugin-antd-style": "^1.0.4",
"clean-package": "^2.2.0",
"commitlint": "^19.8.0",
"consola": "^3.4.1",
"consola": "^3.4.2",
"cross-env": "^7.0.3",
"dotenv": "^16.4.7",
"dpdm": "^3.14.0",
"dumi": "^2.4.18",
"dumi-theme-lobehub": "^1.15.0",
"dumi-theme-lobehub": "^1.15.1",
"eslint": "^8.57.1",
"father": "^4.5.2",
"glob": "^11.0.1",
+1 -1
View File
@@ -1,4 +1,4 @@
import consola from 'consola';
import { consola } from 'consola';
import { markdownTable } from 'markdown-table';
import { readFileSync, writeFileSync } from 'node:fs';
import { resolve } from 'node:path';
+1 -1
View File
@@ -1,4 +1,4 @@
import consola from 'consola';
import { consola } from 'consola';
import { readFileSync, readdirSync, writeFileSync } from 'node:fs';
import { resolve } from 'node:path';
import pMap from 'p-map';
+67
View File
@@ -0,0 +1,67 @@
import { consola } from 'consola';
import dotenv from 'dotenv';
import { promises as fs } from 'node:fs';
import { resolve } from 'node:path';
dotenv.config();
const rootPath = resolve(process.cwd(), 'temp');
const pngPath = resolve(rootPath, 'logo.png');
const svgPath = resolve(rootPath, 'logo.svg');
const apiUrl = process.env.VECTORIZE_URL;
const secretAccessKey = process.env.VECTORIZE_SECRET_ACCESS_KEY;
const convertPngToSvg = async () => {
if (!apiUrl || !secretAccessKey) {
consola.error('Please provide VECTORIZE_URL and VECTORIZE_SECRET_ACCESS_KEY in .env file');
return;
}
try {
// 设置文件路径
console.info(`Reading PNG file from: ${pngPath}`);
// 读取PNG文件
const fileBuffer = await fs.readFile(pngPath);
// 创建FormData对象
const formData = new FormData();
const file = new File([fileBuffer], 'logo.png', { type: 'image/png' });
formData.append('image', file);
console.log('Sending request to vectorize API...');
// 发送请求
const response = await fetch(apiUrl, {
body: formData,
headers: {
Authorization: `Bearer ${secretAccessKey}`,
},
method: 'POST',
});
if (!response.ok) {
throw new Error(
`API request failed with status ${response.status}: ${await response.text()}`,
);
}
// 解析响应
const responseData = await response.text();
// 保存SVG文件
await fs.writeFile(svgPath, responseData);
consola.log(`Successfully converted logo.png to logo.svg at: ${svgPath}`);
} catch (error) {
consola.error('Error:', error);
}
};
// 执行转换
const run = () => {
convertPngToSvg();
};
run();
+25
View File
@@ -0,0 +1,25 @@
'use client';
import { memo } from 'react';
import IconAvatar, { type IconAvatarProps } from '@/features/IconAvatar';
import { COLOR_PRIMARY, TITLE } from '../style';
import Mono from './Mono';
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
return (
<IconAvatar
Icon={Mono}
aria-label={TITLE}
background={background || COLOR_PRIMARY}
color={'#5EAE91'}
iconMultiple={0.7}
{...rest}
/>
);
});
export default Avatar;
+33
View File
@@ -0,0 +1,33 @@
'use client';
import { forwardRef } from 'react';
import type { IconType } from '@/types';
import { TITLE } from '../style';
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<title>{TITLE}</title>
<path
d="M6.014 0c1.75.242 3.099 1.083 4.047 2.522.159.24.306.574.416.778a.077.077 0 00.074.04c.975-.09 1.936-.09 2.882 0a.076.076 0 00.074-.04c.136-.25.294-.603.495-.893.95-1.37 2.273-2.171 3.966-2.407h1.15c.552.103.899.178 1.04.224 1.177.386 2.117 1.07 2.82 2.053a5.374 5.374 0 011.02 3.331c-.026 1.193-.437 2.295-1.234 3.306a.113.113 0 00-.01.126 9.426 9.426 0 011.165 3.35c.043.29.067.623.072.996.007.522.003.856-.011 1.002-.474 4.821-4.392 8.249-8.916 9.274-.657.149-1.376.259-2.157.33H11.09a49.973 49.973 0 01-1.117-.143 12.903 12.903 0 01-2.076-.465c-2.745-.858-5.214-2.641-6.659-5.149-.56-.972-.927-1.95-1.1-2.934a38.037 38.037 0 01-.138-.93v-1.456a9.735 9.735 0 011.239-3.89.103.103 0 00-.01-.117 5.254 5.254 0 01-1.12-2.35C.075 6.383.038 6.208 0 6.03V4.875c.091-.602.222-1.103.392-1.502C1.076 1.765 2.487.51 4.229.131c.212-.046.425-.09.639-.131h1.146zm3.78 5.445a4.344 4.344 0 10-8.687 0 4.344 4.344 0 008.688 0zm13.092 0a4.344 4.344 0 10-8.688 0 4.344 4.344 0 008.688 0zm-10.894 12.55c.165 0 .323-.002.473-.006a31.64 31.64 0 002.6-.183c1.218-.137 2.42-.39 3.604-.759 1.383-.431 3.435-1.327 4.064-2.735.128-.285.175-.651.142-1.097-.099-1.291-.423-2.42-.973-3.39a.036.036 0 00-.039-.017.037.037 0 00-.014.007c-1.017.717-2.076 1.084-3.177 1.1-1.16.018-2.2-.277-3.116-.887-1.41-.938-2.23-2.27-2.458-3.999-.07-.523-.025-.973.058-1.531a.058.058 0 00-.012-.046.06.06 0 00-.042-.023c-.239-.026-.608-.04-1.107-.04-.498 0-.867.014-1.105.04a.062.062 0 00-.042.022.06.06 0 00-.012.046c.082.558.127 1.008.057 1.531-.23 1.728-1.05 3.06-2.46 3.997-.918.609-1.957.904-3.118.886-1.1-.017-2.16-.385-3.176-1.103a.037.037 0 00-.03-.006.036.036 0 00-.023.017c-.55.968-.875 2.097-.974 3.388-.035.446.012.812.14 1.098.628 1.409 2.68 2.305 4.062 2.738 1.185.37 2.386.624 3.604.761.849.097 1.715.158 2.6.185.15.004.308.007.474.007zm.003 4.888c.847 0 1.576-.066 2.473-.239 3.482-.672 6.561-2.855 7.907-6.184a.019.019 0 00-.017-.025c-.004 0-.008.002-.01.004-.43.328-.898.619-1.405.87-1.801.897-3.863 1.387-5.877 1.615-.993.113-2.038.18-3.07.18s-2.076-.067-3.069-.18c-2.014-.23-4.076-.718-5.877-1.615a8.55 8.55 0 01-1.404-.872.02.02 0 00-.011-.003.019.019 0 00-.017.013.019.019 0 000 .012c1.345 3.329 4.424 5.512 7.906 6.184.897.174 1.626.24 2.472.24z"
fill="#5EAE91"
/>
<path
d="M5.998 9.24a3.243 3.243 0 100-6.486 3.243 3.243 0 000 6.486zM17.995 9.24a3.243 3.243 0 100-6.486 3.243 3.243 0 000 6.486zM9.228 15.699a.934.934 0 100-1.867.934.934 0 000 1.867zM14.765 15.7a.935.935 0 100-1.87.935.935 0 000 1.87z"
fill="#5EAE91"
/>
</svg>
);
});
export default Icon;
+30
View File
@@ -0,0 +1,30 @@
'use client';
import { memo } from 'react';
import IconCombine, { type IconCombineProps } from '@/features/IconCombine';
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
import Color from './Color';
import Mono from './Mono';
import Text from './Text';
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
type?: 'color' | 'mono';
}
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
const Icon = type === 'color' ? Color : Mono;
return (
<IconCombine
Icon={Icon}
Text={Text}
aria-label={TITLE}
spaceMultiple={SPACE_MULTIPLE}
textMultiple={TEXT_MULTIPLE}
{...rest}
/>
);
});
export default Combine;
+29
View File
@@ -0,0 +1,29 @@
'use client';
import { forwardRef } from 'react';
import type { IconType } from '@/types';
import { TITLE } from '../style';
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<title>{TITLE}</title>
<path d="M6.014 0c1.75.242 3.099 1.083 4.047 2.522.159.24.306.574.416.778a.077.077 0 00.074.04c.975-.09 1.936-.09 2.882 0a.076.076 0 00.074-.04c.136-.25.294-.603.495-.893.95-1.37 2.273-2.171 3.966-2.407h1.15c.552.103.899.178 1.04.224 1.177.386 2.117 1.07 2.82 2.053a5.374 5.374 0 011.02 3.331c-.026 1.193-.437 2.295-1.234 3.306a.113.113 0 00-.01.126 9.426 9.426 0 011.165 3.35c.043.29.067.623.072.996.007.522.003.856-.011 1.002-.474 4.821-4.392 8.249-8.916 9.274-.657.149-1.376.259-2.157.33H11.09a49.973 49.973 0 01-1.117-.143 12.903 12.903 0 01-2.076-.465c-2.745-.858-5.214-2.641-6.659-5.149-.56-.972-.927-1.95-1.1-2.934a38.037 38.037 0 01-.138-.93v-1.456a9.735 9.735 0 011.239-3.89.103.103 0 00-.01-.117 5.254 5.254 0 01-1.12-2.35C.075 6.383.038 6.208 0 6.03V4.875c.091-.602.222-1.103.392-1.502C1.076 1.765 2.487.51 4.229.131c.212-.046.425-.09.639-.131h1.146zm3.78 5.445a4.344 4.344 0 10-8.687 0 4.344 4.344 0 008.688 0zm13.092 0a4.344 4.344 0 10-8.688 0 4.344 4.344 0 008.688 0zm-10.894 12.55c.165 0 .323-.002.473-.006a31.64 31.64 0 002.6-.183c1.218-.137 2.42-.39 3.604-.759 1.383-.431 3.435-1.327 4.064-2.735.128-.285.175-.651.142-1.097-.099-1.291-.423-2.42-.973-3.39a.036.036 0 00-.039-.017.037.037 0 00-.014.007c-1.017.717-2.076 1.084-3.177 1.1-1.16.018-2.2-.277-3.116-.887-1.41-.938-2.23-2.27-2.458-3.999-.07-.523-.025-.973.058-1.531a.058.058 0 00-.012-.046.06.06 0 00-.042-.023c-.239-.026-.608-.04-1.107-.04-.498 0-.867.014-1.105.04a.062.062 0 00-.042.022.06.06 0 00-.012.046c.082.558.127 1.008.057 1.531-.23 1.728-1.05 3.06-2.46 3.997-.918.609-1.957.904-3.118.886-1.1-.017-2.16-.385-3.176-1.103a.037.037 0 00-.03-.006.036.036 0 00-.023.017c-.55.968-.875 2.097-.974 3.388-.035.446.012.812.14 1.098.628 1.409 2.68 2.305 4.062 2.738 1.185.37 2.386.624 3.604.761.849.097 1.715.158 2.6.185.15.004.308.007.474.007zm.003 4.888c.847 0 1.576-.066 2.473-.239 3.482-.672 6.561-2.855 7.907-6.184a.019.019 0 00-.017-.025c-.004 0-.008.002-.01.004-.43.328-.898.619-1.405.87-1.801.897-3.863 1.387-5.877 1.615-.993.113-2.038.18-3.07.18s-2.076-.067-3.069-.18c-2.014-.23-4.076-.718-5.877-1.615a8.55 8.55 0 01-1.404-.872.02.02 0 00-.011-.003.019.019 0 00-.017.013.019.019 0 000 .012c1.345 3.329 4.424 5.512 7.906 6.184.897.174 1.626.24 2.472.24z" />
<path d="M5.998 9.24a3.243 3.243 0 100-6.486 3.243 3.243 0 000 6.486zM17.995 9.24a3.243 3.243 0 100-6.486 3.243 3.243 0 000 6.486zM9.228 15.699a.934.934 0 100-1.867.934.934 0 000 1.867zM14.765 15.7a.935.935 0 100-1.87.935.935 0 000 1.87z" />
</svg>
);
});
export default Icon;
+32
View File
@@ -0,0 +1,32 @@
'use client';
import { forwardRef } from 'react';
import type { IconType } from '@/types';
import { TITLE } from '../style';
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 79 24"
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<title>{TITLE}</title>
<path d="M76.804 1.826L75.167.193a.66.66 0 00-.936.004L72.537 1.91a.667.667 0 00.003.941l1.637 1.633a.66.66 0 00.936-.004l1.695-1.713a.667.667 0 00-.004-.941zM14.804 8.866c-.414.023-.758-.09-1.03-.337-2.674-2.423-6.965-.797-7.215 2.865-.16 2.323 1.618 4.383 3.961 4.537.97.063 1.846-.152 2.626-.645.152-.097.307-.237.463-.378.207-.188.416-.378.626-.47.528-.229.871.001 1.275.4.828.818 1.353 1.351 1.574 1.602.254.288.345.618.274.99-.048.24-.255.515-.622.827-1.54 1.307-3.255 2.043-5.144 2.209a8.854 8.854 0 01-3.267-.342c-3.378-.982-5.863-3.96-6.267-7.46-.455-3.954 1.817-7.701 5.457-9.18 1.42-.579 2.928-.766 4.522-.563 1.586.202 3.059.837 4.418 1.904.513.403.81.762.889 1.076.114.45-.046.872-.48 1.267-.64.582-1.09 1-1.353 1.255-.166.162-.364.3-.594.414a.283.283 0 01-.113.03z" />
<path
clipRule="evenodd"
d="M31.52 18.038a8.817 8.817 0 00.13-12.455 8.783 8.783 0 00-12.432-.13 8.816 8.816 0 00-.13 12.455 8.783 8.783 0 0012.432.13zm-3.096-9.361a4.35 4.35 0 010 6.14 4.312 4.312 0 01-6.112 0 4.351 4.351 0 010-6.14 4.313 4.313 0 016.112 0zM48.41 19.444a.015.015 0 00-.009-.006h-.006a.014.014 0 00-.006.002c-2.133 1.16-4.321 1.457-6.563.892-3.478-.876-6.049-3.76-6.56-7.306-.542-3.77 1.462-7.455 4.862-9.122 4.983-2.443 11.124.375 12.41 5.814.302 1.275.282 2.393.25 3.842-.006.312-.01 3.53-.011 9.655 0 .309-.141.782-.51.784-1.848.002-2.967.001-3.356-.002a.305.305 0 01-.16-.049c-.21-.132-.314-.357-.316-.673-.01-1.962-.01-3.183.002-3.664a.405.405 0 00-.028-.167zm-.099-7.635a4.358 4.358 0 00-1.266-3.07 4.321 4.321 0 00-3.056-1.27 4.312 4.312 0 00-3.056 1.27 4.35 4.35 0 000 6.14 4.312 4.312 0 007.05-1.409 4.357 4.357 0 00.328-1.66z"
/>
<path d="M57.413 5.108c.147.02.357.154.63.405l1.509 1.391c.382.357.581.927.336 1.392a.484.484 0 01-.108.138 4.047 4.047 0 00-1.356 2.408 4.335 4.335 0 004.171 5.09c1.27.032 2.5-.517 3.34-1.467 1.294-1.462 1.43-3.53.403-5.204-.075-.124-.266-.358-.573-.703-.463-.52-.468-1.057-.015-1.61.143-.175.64-.719 1.494-1.63.42-.45.903-.506 1.45-.17a.41.41 0 01.093.079c.103.117.204.23.304.339.288.318.556.614.782.947 1.447 2.131 1.924 4.425 1.429 6.882-.981 4.865-5.975 8.008-10.836 6.71-3.397-.907-5.903-3.64-6.472-7.143-.441-2.722.473-5.54 2.395-7.5a1.15 1.15 0 011.024-.354zM73.418 5.44h2.508c.412 0 .746.335.746.749v13.007c0 .413-.334.749-.746.749h-2.508a.747.747 0 01-.746-.75V6.19c0-.414.334-.75.746-.75z" />
</svg>
);
});
export default Icon;
+77
View File
@@ -0,0 +1,77 @@
---
nav: Components
group: Application
title: Coqui
atomId: Coqui
description: https://github.com/coqui-ai/TTS
---
## Icons
```tsx
import { Coqui } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
export default () => (
<Flexbox gap={16} horizontal>
<Coqui size={64} />
<Coqui.Color size={64} />
</Flexbox>
);
```
## Text
```tsx
import { Coqui } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
export default () => (
<Flexbox gap={16} align={'flex-start'}>
<Coqui.Text size={48} />
</Flexbox>
);
```
## Combine
```tsx
import { Coqui } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
export default () => (
<Flexbox gap={16} align={'flex-start'}>
<Coqui.Combine size={64} />
<Coqui.Combine size={64} type={'color'} />
</Flexbox>
);
```
## Avatars
```tsx
import { Coqui } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
export default () => (
<Flexbox gap={16} horizontal>
<Coqui.Avatar size={64} />
<Coqui.Avatar size={64} shape={'square'} />
</Flexbox>
);
```
## Colors
```tsx
import { Coqui } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
import ColorPreview from '../components/ColorPreview';
export default () => (
<Flexbox gap={16} horizontal>
<ColorPreview color={Coqui.colorPrimary} />
</Flexbox>
);
```
+27
View File
@@ -0,0 +1,27 @@
'use client';
import Avatar from './components/Avatar';
import Color from './components/Color';
import Combine from './components/Combine';
import Mono from './components/Mono';
import Text from './components/Text';
import { COLOR_PRIMARY, TITLE } from './style';
export type CompoundedIcon = typeof Mono & {
Avatar: typeof Avatar;
Color: typeof Color;
Combine: typeof Combine;
Text: typeof Text;
colorPrimary: string;
title: string;
};
const Icons = Mono as CompoundedIcon;
Icons.Color = Color;
Icons.Text = Text;
Icons.Combine = Combine;
Icons.Avatar = Avatar;
Icons.colorPrimary = COLOR_PRIMARY;
Icons.title = TITLE;
export default Icons;
+4
View File
@@ -0,0 +1,4 @@
export const TITLE = 'Coqui';
export const TEXT_MULTIPLE = 0.8;
export const SPACE_MULTIPLE = 0.2;
export const COLOR_PRIMARY = '#03363D';
+26
View File
@@ -0,0 +1,26 @@
'use client';
import { memo } from 'react';
import IconAvatar, { type IconAvatarProps } from '@/features/IconAvatar';
import { COLOR_PRIMARY, TITLE } from '../style';
import Mono from './Mono';
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
const Avatar = memo<AvatarProps>(({ background, size, ...rest }) => {
return (
<IconAvatar
Icon={Mono}
aria-label={TITLE}
background={background || COLOR_PRIMARY}
color={'#fff'}
iconMultiple={0.65}
size={size}
{...rest}
/>
);
});
export default Avatar;
+74
View File
@@ -0,0 +1,74 @@
'use client';
import { forwardRef } from 'react';
import { useFillIds } from '@/hooks/useFillId';
import type { IconType } from '@/types';
import { TITLE } from '../style';
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
const [a, b, c] = useFillIds(TITLE, 3);
return (
<svg
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<title>{TITLE}</title>
<path
d="M5.223 9.692c.652 1.795 1.925 3.376 3.396 4.573 1.482 1.229 3.254 2.17 5.122 2.653a9.99 9.99 0 002.033.302c1.302.05 2.713-.206 3.758-1.04 1.297-1.036 1.651-2.625 1.318-4.21-.209-.993-.641-1.93-1.205-2.787a10.284 10.284 0 00-.366-.525.008.008 0 01.005-.007h.004c.002 0 .004 0 .006.002l.394.405a17.227 17.227 0 012.484 3.262c.579.993 1.023 2.046 1.255 3.144.369 1.747.07 3.546-1.306 4.777-.724.648-1.655 1.041-2.59 1.235-1.297.267-2.649.228-3.965.007-.669-.112-1.315-.26-1.937-.443-2.576-.756-5.012-2.051-7.143-3.677a20.968 20.968 0 01-3.484-3.296C1.949 12.813 1.046 11.396.487 9.853.12 8.845-.087 7.725.035 6.663c.267-2.306 1.98-3.654 4.174-4.06 1.265-.234 2.594-.186 3.879.037a17.71 17.71 0 013.978 1.192v.004a.006.006 0 01-.004.004h-.004a8.907 8.907 0 00-2.869-.29c-.807.048-1.666.263-2.357.656-1.034.588-1.67 1.463-1.907 2.625a4.567 4.567 0 00-.069 1.1c.025.58.163 1.198.367 1.761z"
fill={a.fill}
/>
<path
d="M18.02 7.235a.05.05 0 01-.007.03c-.461.916-.923 1.832-1.386 2.747-.424.837-.745 1.437-.965 1.8a17.877 17.877 0 01-2.98 3.707.027.027 0 01-.03.005 12.678 12.678 0 01-4.205-2.777c-.14-.14-.28-.288-.42-.447a.024.024 0 01-.005-.013c0-.005 0-.01.003-.014a17.718 17.718 0 011.68-2.379 18.27 18.27 0 012.7-2.606c.408-.32 1.39-1.094 2.95-2.323L21.652.002a.008.008 0 01.01 0 .01.01 0 01.004.005.01.01 0 010 .006l-3.648 7.222z"
fill={b.fill}
/>
<path
d="M2.027 24c.002 0 .004 0 .005-.002l5.843-4.58a.02.02 0 00.008-.017.02.02 0 00-.01-.016 26.743 26.743 0 01-2.584-1.842h-.006a.014.014 0 00-.005.002.012.012 0 00-.004.005L2.02 23.987a.01.01 0 000 .006c0 .002 0 .004.002.005a.009.009 0 00.006.002z"
fill={c.fill}
/>
<defs>
<linearGradient
gradientUnits="userSpaceOnUse"
id={a.id}
x1=".478"
x2="22.985"
y1="3.451"
y2="19.698"
>
<stop stopColor="#6F11F4" />
<stop offset="1" stopColor="#AA66F1" />
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
id={b.id}
x1="21.676"
x2="2.034"
y1=".006"
y2="23.987"
>
<stop stopColor="#F52C77" />
<stop offset="1" stopColor="#E9A45F" stopOpacity=".996" />
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
id={c.id}
x1="21.676"
x2="2.034"
y1=".006"
y2="23.987"
>
<stop stopColor="#F52C77" />
<stop offset="1" stopColor="#E9A45F" stopOpacity=".996" />
</linearGradient>
</defs>
</svg>
);
});
export default Icon;
+30
View File
@@ -0,0 +1,30 @@
'use client';
import { memo } from 'react';
import IconCombine, { type IconCombineProps } from '@/features/IconCombine';
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
import Color from './Color';
import Mono from './Mono';
import Text from './Text';
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
type?: 'color' | 'mono';
}
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
const Icon = type === 'color' ? Color : Mono;
return (
<IconCombine
Icon={Icon}
Text={Text}
aria-label={TITLE}
spaceMultiple={SPACE_MULTIPLE}
textMultiple={TEXT_MULTIPLE}
{...rest}
/>
);
});
export default Combine;
+30
View File
@@ -0,0 +1,30 @@
'use client';
import { forwardRef } from 'react';
import type { IconType } from '@/types';
import { TITLE } from '../style';
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<title>{TITLE}</title>
<path d="M5.223 9.692c.652 1.795 1.925 3.376 3.396 4.573 1.482 1.229 3.254 2.17 5.122 2.653a9.99 9.99 0 002.033.302c1.302.05 2.713-.206 3.758-1.04 1.297-1.036 1.651-2.625 1.318-4.21-.209-.993-.641-1.93-1.205-2.787a10.284 10.284 0 00-.366-.525.008.008 0 01.005-.007h.004c.002 0 .004 0 .006.002l.394.405a17.227 17.227 0 012.484 3.262c.579.993 1.023 2.046 1.255 3.144.369 1.747.07 3.546-1.306 4.777-.724.648-1.655 1.041-2.59 1.235-1.297.267-2.649.228-3.965.007-.669-.112-1.315-.26-1.937-.443-2.576-.756-5.012-2.051-7.143-3.677a20.968 20.968 0 01-3.484-3.296C1.949 12.813 1.046 11.396.487 9.853.12 8.845-.087 7.725.035 6.663c.267-2.306 1.98-3.654 4.174-4.06 1.265-.234 2.594-.186 3.879.037a17.71 17.71 0 013.978 1.192v.004a.006.006 0 01-.004.004h-.004a8.907 8.907 0 00-2.869-.29c-.807.048-1.666.263-2.357.656-1.034.588-1.67 1.463-1.907 2.625a4.567 4.567 0 00-.069 1.1c.025.58.163 1.198.367 1.761z" />
<path d="M18.02 7.235a.05.05 0 01-.007.03c-.461.916-.923 1.832-1.386 2.747-.424.837-.745 1.437-.965 1.8a17.877 17.877 0 01-2.98 3.707.027.027 0 01-.03.005 12.678 12.678 0 01-4.205-2.777c-.14-.14-.28-.288-.42-.447a.024.024 0 01-.005-.013c0-.005 0-.01.003-.014a17.718 17.718 0 011.68-2.379 18.27 18.27 0 012.7-2.606c.408-.32 1.39-1.094 2.95-2.323L21.652.002a.008.008 0 01.01 0 .01.01 0 01.004.005.01.01 0 010 .006l-3.648 7.222z" />
<path d="M2.027 24c.002 0 .004 0 .005-.002l5.843-4.58a.02.02 0 00.008-.017.02.02 0 00-.01-.016 26.743 26.743 0 01-2.584-1.842h-.006a.014.014 0 00-.005.002.012.012 0 00-.004.005L2.02 23.987a.01.01 0 000 .006c0 .002 0 .004.002.005a.009.009 0 00.006.002z" />
</svg>
);
});
export default Icon;
File diff suppressed because one or more lines are too long
+72
View File
@@ -0,0 +1,72 @@
---
nav: Components
group: Provider
title: Xinference
atomId: Xinference
description: https://github.com/xorbitsai/inference
---
## Icons
```tsx
import { Xinference } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
export default () => (
<Flexbox gap={16} horizontal>
<Xinference size={64} />
<Xinference.Color size={64} />
</Flexbox>
);
```
## Text
```tsx
import { Xinference } from '@lobehub/icons';
export default () => <Xinference.Text size={48} />;
```
## Combine
```tsx
import { Xinference } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
export default () => (
<Flexbox gap={16} align={'flex-start'}>
<Xinference.Combine size={64} />
<Xinference.Combine size={64} type={'color'} />
</Flexbox>
);
```
## Avatars
```tsx
import { Xinference } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
export default () => (
<Flexbox gap={16} horizontal>
<Xinference.Avatar size={64} />
<Xinference.Avatar size={64} shape={'square'} />
</Flexbox>
);
```
## Colors
```tsx
import { Xinference } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';
import ColorPreview from '../components/ColorPreview';
export default () => (
<Flexbox gap={16} horizontal>
<ColorPreview color={Xinference.colorPrimary} />
</Flexbox>
);
```
+27
View File
@@ -0,0 +1,27 @@
'use client';
import Avatar from './components/Avatar';
import Color from './components/Color';
import Combine from './components/Combine';
import Mono from './components/Mono';
import Text from './components/Text';
import { COLOR_PRIMARY, TITLE } from './style';
export type CompoundedIcon = typeof Mono & {
Avatar: typeof Avatar;
Color: typeof Color;
Combine: typeof Combine;
Text: typeof Text;
colorPrimary: string;
title: string;
};
const Icons = Mono as CompoundedIcon;
Icons.Color = Color;
Icons.Text = Text;
Icons.Combine = Combine;
Icons.Avatar = Avatar;
Icons.colorPrimary = COLOR_PRIMARY;
Icons.title = TITLE;
export default Icons;
+4
View File
@@ -0,0 +1,4 @@
export const TITLE = 'Xinference';
export const TEXT_MULTIPLE = 0.7;
export const SPACE_MULTIPLE = 0.3;
export const COLOR_PRIMARY = '#781ff5';
+2 -2
View File
@@ -6,7 +6,6 @@ import Ai360 from '@/Ai360';
import AiMass from '@/AiMass';
import Aws from '@/Aws';
import Aya from '@/Aya';
import Azure from '@/Azure';
import Baichuan from '@/Baichuan';
import ByteDance from '@/ByteDance';
import ChatGLM from '@/ChatGLM';
@@ -30,6 +29,7 @@ import InternLM from '@/InternLM';
import Jina from '@/Jina';
import LLaVA from '@/LLaVA';
import Meta from '@/Meta';
import Microsoft from '@/Microsoft';
import Minimax from '@/Minimax';
import Mistral from '@/Mistral';
import Moonshot from '@/Moonshot';
@@ -127,7 +127,7 @@ export const modelMappings: ModelMapping[] = [
},
{ Icon: Flux, keywords: ['flux'] },
{ Icon: Suno, keywords: ['suno'] },
{ Icon: Azure, keywords: ['wizardlm', 'phi3', 'phi-3', 'phi-2'] },
{ Icon: Microsoft, keywords: ['wizardlm', 'phi3', '^/phi-', '^phi-'] },
{ Icon: Adobe, keywords: ['firefly'] },
{ Icon: Ai21, keywords: ['jamba', '^j2-', 'ai21'] },
{ Icon: Upstage, keywords: ['^solar-', '/solar'] },
+5 -3
View File
@@ -57,6 +57,7 @@ import Volcengine from '@/Volcengine';
import Wenxin from '@/Wenxin';
import WorkersAI from '@/WorkersAI';
import XAI from '@/XAI';
import Xinference from '@/Xinference';
import ZeroOne from '@/ZeroOne';
import Zhipu from '@/Zhipu';
import type { IconType } from '@/types';
@@ -209,8 +210,9 @@ export const providerMappings: ProviderMapping[] = [
{ Icon: Jina, keywords: [ModelProvider.Jina] },
{ Icon: AzureAI, keywords: [ModelProvider.AzureAI] },
{ Icon: Volcengine, keywords: [ModelProvider.Volcengine] },
{ Icon: SambaNova, combineMultiple: 0.85, keywords: [ModelProvider.SambaNova] },
{ Icon: SambaNova, combineMultiple: 0.8, keywords: [ModelProvider.SambaNova] },
{ Icon: Cohere, keywords: [ModelProvider.Cohere] },
{ Icon: Search1API, keywords: [ModelProvider.Search1API] },
{ Icon: Infinigence, keywords: [ModelProvider.InfiniAI] },
{ Icon: Search1API, combineMultiple: 0.9, keywords: [ModelProvider.Search1API] },
{ Icon: Infinigence, combineMultiple: 0.8, keywords: [ModelProvider.InfiniAI] },
{ Icon: Xinference, combineMultiple: 0.85, keywords: [ModelProvider.Xinference] },
];
+1
View File
@@ -50,6 +50,7 @@ export enum ModelProvider {
Volcengine = 'volcengine',
Wenxin = 'wenxin',
XAI = 'xai',
Xinference = 'xinference',
ZeroOne = 'zeroone',
ZhiPu = 'zhipu',
}
+2
View File
@@ -35,6 +35,7 @@ export { default as Colab, type CompoundedIcon as ColabProps } from './Colab';
export { default as ComfyUI, type CompoundedIcon as ComfyUIProps } from './ComfyUI';
export { default as CommandA, type CompoundedIcon as CommandAProps } from './CommandA';
export { default as Copilot, type CompoundedIcon as CopilotProps } from './Copilot';
export { default as Coqui, type CompoundedIcon as CoquiProps } from './Coqui';
export { default as Coze, type CompoundedIcon as CozeProps } from './Coze';
export { default as CrewAI, type CompoundedIcon as CrewAIrops } from './CrewAI';
export { default as Cursor, type CompoundedIcon as CursorProps } from './Cursor';
@@ -170,6 +171,7 @@ export { default as Volcengine, type CompoundedIcon as VolcengineProps } from '.
export { default as Wenxin, type CompoundedIcon as WenxinProps } from './Wenxin';
export { default as WorkersAI, type CompoundedIcon as WorkersAIProps } from './WorkersAI';
export { default as XAI, type CompoundedIcon as XAIProps } from './XAI';
export { default as Xinference, type CompoundedIcon as XinferenceProps } from './Xinference';
export { default as Xuanyuan, type CompoundedIcon as XuanyuanProps } from './Xuanyuan';
export { default as Yandex, type CompoundedIcon as YandexProps } from './Yandex';
export { default as Yi, type CompoundedIcon as YiProps } from './Yi';
+38
View File
@@ -731,6 +731,25 @@ const toc: IconToc[] = [
},
title: 'Copilot',
},
{
color: '#03363D',
desc: 'https://github.com/coqui-ai/TTS',
docsUrl: 'coqui',
fullTitle: 'Coqui',
group: 'application',
id: 'Coqui',
param: {
hasAvatar: true,
hasBrand: false,
hasBrandColor: false,
hasColor: true,
hasCombine: true,
hasText: true,
hasTextCn: false,
hasTextColor: false,
},
title: 'Coqui',
},
{
color: '#4D53E8',
desc: 'https://coze.com',
@@ -3260,6 +3279,25 @@ const toc: IconToc[] = [
},
title: 'Grok',
},
{
color: '#781ff5',
desc: 'https://github.com/xorbitsai/inference',
docsUrl: 'xinference',
fullTitle: 'Xinference',
group: 'provider',
id: 'Xinference',
param: {
hasAvatar: true,
hasBrand: false,
hasBrandColor: false,
hasColor: true,
hasCombine: true,
hasText: true,
hasTextCn: false,
hasTextColor: false,
},
title: 'Xinference',
},
{
color: '#fff',
desc: 'https://github.com/Duxiaoman-DI/XuanYuan',
+1 -1
View File
@@ -20,5 +20,5 @@
"@lobehub/icons/*": ["src/*"]
}
},
"include": ["src", "docs", "tests", ".dumirc.ts", ".fatherrc.ts"]
"include": ["src", "docs", "tests", ".dumirc.ts", ".fatherrc.ts", "scripts"]
}