Skip to content

Commit 97fb5ed

Browse files
✨ feat: Add new Claude icon and Groq
1 parent b39d57c commit 97fb5ed

File tree

22 files changed

+477
-47
lines changed

22 files changed

+477
-47
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4+
npm run sync:md
45
npm run type-check
56
npx --no-install lint-staged

README.md

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -57,49 +57,57 @@ Contributions, corrections & requests can be made on GitHub.
5757

5858
**Supported brands:**
5959

60-
- [x] Anthropic (Claude)
61-
- [x] Automatic1111 (SD Webui)
62-
- [x] AWS
63-
- [x] AWS (Bedrock)
64-
- [x] Baichuan (百川)
65-
- [x] Cloudflare
66-
- [x] Cloudflare (WorkersAI)
67-
- [x] Cohere (Command)
68-
- [x] Fireworks
69-
- [x] Github
70-
- [x] Github (Copilot)
71-
- [x] Google
72-
- [x] Google (Colab)
73-
- [x] Google (DeepMind)
74-
- [x] Google (Gemini)
75-
- [x] Google (Gemma)
76-
- [x] HuggingFace
77-
- [x] Hunyuan (腾讯混元)
78-
- [x] Meta (Llama)
79-
- [x] Microsoft (Azure)
80-
- [x] Microsoft (Bing)
81-
- [x] Microsoft (Copilot)
82-
- [x] Midjourney
83-
- [x] Minimax
84-
- [x] Mistral
85-
- [x] Moonshot (月之暗面)
86-
- [x] Nvidia (ChatWithRTX)
87-
- [x] Ollama
88-
- [x] OpenAI (ChatGPT)
89-
- [x] OpenAI (DALL·E)
90-
- [x] Perplexity
91-
- [x] Pollinations
92-
- [x] Replicate
93-
- [x] Spark (讯飞星火)
94-
- [x] Stability (StableDiffusion)
95-
- [x] Tongyi (通义)
96-
- [x] Wenxin (文心)
97-
- [x] Zhipu (ChatGLM)
98-
- [x] Zhipu (智谱)
99-
- [x] Zhipu (智谱清言)
60+
<!-- ICON LIST -->
61+
62+
- [x] [Zhipu (智谱)](https://icons.lobehub.com/components/zhipu)
63+
- [x] [Cloudflare (WorkersAI)](https://icons.lobehub.com/components/workers-ai)
64+
- [x] [Wenxin (文心)](https://icons.lobehub.com/components/wenxin)
65+
- [x] [Tongyi (通义)](https://icons.lobehub.com/components/tongyi)
66+
- [x] [Stability (StableDiffusion)](https://icons.lobehub.com/components/stability)
67+
- [x] [Spark (讯飞星火)](https://icons.lobehub.com/components/spark)
68+
- [x] [Replicate](https://icons.lobehub.com/components/replicate)
69+
- [x] [Zhipu (智谱清言)](https://icons.lobehub.com/components/qingyan)
70+
- [x] [Pollinations](https://icons.lobehub.com/components/pollinations)
71+
- [x] [Perplexity](https://icons.lobehub.com/components/perplexity)
72+
- [x] [OpenRouter](https://icons.lobehub.com/components/open-router)
73+
- [x] [OpenAI (ChatGPT)](https://icons.lobehub.com/components/open-ai)
74+
- [x] [Ollama](https://icons.lobehub.com/components/ollama)
75+
- [x] [Nvidia (ChatWithRTX)](https://icons.lobehub.com/components/nvidia)
76+
- [x] [Moonshot (月之暗面)](https://icons.lobehub.com/components/moonshot)
77+
- [x] [Mistral](https://icons.lobehub.com/components/mistral)
78+
- [x] [Minimax](https://icons.lobehub.com/components/minimax)
79+
- [x] [Midjourney](https://icons.lobehub.com/components/midjourney)
80+
- [x] [Meta (Llama)](https://icons.lobehub.com/components/meta)
81+
- [x] [LLaVA](https://icons.lobehub.com/components/l-la-va)
82+
- [x] [Hunyuan (腾讯混元)](https://icons.lobehub.com/components/hunyuan)
83+
- [x] [HuggingFace](https://icons.lobehub.com/components/hugging-face)
84+
- [x] [Groq](https://icons.lobehub.com/components/groq)
85+
- [x] [Google](https://icons.lobehub.com/components/google)
86+
- [x] [Github (Copilot)](https://icons.lobehub.com/components/github-copilot)
87+
- [x] [Github](https://icons.lobehub.com/components/github)
88+
- [x] [Google (Gemma)](https://icons.lobehub.com/components/gemma)
89+
- [x] [Google (Gemini)](https://icons.lobehub.com/components/gemini)
90+
- [x] [Fireworks](https://icons.lobehub.com/components/fireworks)
91+
- [x] [Google (DeepMind)](https://icons.lobehub.com/components/deep-mind)
92+
- [x] [OpenAI (DALL·E)](https://icons.lobehub.com/components/dalle)
93+
- [x] [Microsoft (Copilot)](https://icons.lobehub.com/components/copilot)
94+
- [x] [Google (Colab)](https://icons.lobehub.com/components/colab)
95+
- [x] [Cohere (Command)](https://icons.lobehub.com/components/cohere)
96+
- [x] [Cloudflare](https://icons.lobehub.com/components/cloudflare)
97+
- [x] [Anthropic (Claude)](https://icons.lobehub.com/components/claude)
98+
- [x] [Zhipu (ChatGLM)](https://icons.lobehub.com/components/chat-glm)
99+
- [x] [Microsoft (Bing)](https://icons.lobehub.com/components/bing)
100+
- [x] [AWS (Bedrock)](https://icons.lobehub.com/components/bedrock)
101+
- [x] [Baichuan (百川)](https://icons.lobehub.com/components/baichuan)
102+
- [x] [Microsoft (Azure)](https://icons.lobehub.com/components/azure)
103+
- [x] [AWS](https://icons.lobehub.com/components/aws)
104+
- [x] [Automatic1111 (SD Webui)](https://icons.lobehub.com/components/automatic)
105+
- [x] [Anthropic](https://icons.lobehub.com/components/anthropic)
106+
107+
<!-- ICON LIST -->
100108

101109
> \[!TIP]\
102-
> More brands are being added, and `PR` is welcome at the same time.
110+
> More brands are being added, and `PR` welcome.
103111
104112
<div align="right">
105113

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"release": "semantic-release",
4646
"setup": "dumi setup",
4747
"start": "npm run dev",
48+
"sync:md": "tsx ./scripts/genMdList.ts",
4849
"test": "vitest --passWithNoTests",
4950
"test:coverage": "vitest run --coverage --passWithNoTests",
5051
"test:update": "vitest -u",
@@ -78,12 +79,13 @@
7879
"@lobehub/lint": "latest",
7980
"@lobehub/ui": "^1",
8081
"@testing-library/react": "^14",
82+
"@types/lodash-es": "^4",
8183
"@types/pangu": "^4",
8284
"@types/query-string": "^6",
83-
"@types/react": "18.2.40",
85+
"@types/react": "18",
8486
"@types/react-dom": "^18",
8587
"@vitest/coverage-v8": "latest",
86-
"antd": "^5.14.1",
88+
"antd": "^5",
8789
"antd-style": "^3",
8890
"babel-plugin-antd-style": "latest",
8991
"commitlint": "^18",
@@ -92,10 +94,13 @@
9294
"dumi": "^2",
9395
"dumi-theme-lobehub": "latest",
9496
"eslint": "^8",
95-
"father": "4.3.1",
97+
"father": "4",
98+
"front-matter": "^4",
99+
"glob": "^10",
96100
"husky": "^8",
97101
"jsdom": "^23",
98102
"lint-staged": "^15",
103+
"lodash-es": "^4",
99104
"lucide-react": "latest",
100105
"prettier": "^3",
101106
"react": "^18",
@@ -105,6 +110,7 @@
105110
"semantic-release": "^21",
106111
"stylelint": "^15",
107112
"svgo-browser": "^1",
113+
"tsx": "^4",
108114
"typescript": "^5",
109115
"vitest": "latest"
110116
},

scripts/genMdList.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import fm from 'front-matter';
2+
import { globSync } from 'glob';
3+
import { kebabCase } from 'lodash-es';
4+
import { readFileSync, writeFileSync } from 'node:fs';
5+
import { resolve } from 'node:path';
6+
7+
const ROOT_PATH = resolve(__dirname, '..');
8+
9+
const BASE_URL = 'https://icons.lobehub.com/components/';
10+
11+
const updateReadme = (split: string, md: string, content: string): string => {
12+
const mds = md.split(split);
13+
mds[1] = [' ', content, ' '].join('\n\n');
14+
return mds.join(split);
15+
};
16+
const run = () => {
17+
const mds = globSync(resolve(ROOT_PATH, './src/**/index.md'));
18+
const metas = mds
19+
.map((md) => {
20+
const meta: any = fm(readFileSync(md, 'utf8')).attributes;
21+
const paths = md.split('/');
22+
if (meta.group !== 'Icons') return false;
23+
return {
24+
...meta,
25+
path: paths.at(-2),
26+
};
27+
})
28+
.filter(Boolean);
29+
30+
const contents = metas.map((meta) => `- [x] [${meta.title}](${BASE_URL}${kebabCase(meta.path)})`);
31+
32+
const readmePath = resolve(ROOT_PATH, 'README.md');
33+
34+
const readme = readFileSync(readmePath, 'utf8');
35+
36+
const newReadme = updateReadme('<!-- ICON LIST -->', readme, contents.join('\n'));
37+
38+
writeFileSync(readmePath, newReadme, 'utf8');
39+
40+
console.log(`Add ${contents.length} icons to README`);
41+
};
42+
43+
run();

src/Anthropic/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
nav: Components
33
group: Icons
4-
title: Anthropic (Claude)
4+
title: Anthropic
55
atomId: Anthropic
66
description: https://anthropic.com
77
---

src/Claude/components/Avatar.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { memo } from 'react';
2+
3+
import IconAvatar, { type IconAvatarProps } from '@/IconAvatar';
4+
5+
import { COLOR_PRIMARY, TITLE } from '../style';
6+
import Mono from './Mono';
7+
8+
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
9+
10+
const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
11+
return (
12+
<IconAvatar Icon={Mono} aria-label={TITLE} background={background || COLOR_PRIMARY} {...rest} />
13+
);
14+
});
15+
16+
export default Avatar;

src/Claude/components/Color.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
import { TITLE } from '../style';
6+
7+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
8+
return (
9+
<svg
10+
height={size}
11+
ref={ref}
12+
style={{ flex: 'none', lineHeight: 1, ...style }}
13+
viewBox="0 0 24 24"
14+
width={size}
15+
xmlns="http://www.w3.org/2000/svg"
16+
{...rest}
17+
>
18+
<title>{TITLE}</title>
19+
<path
20+
d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"
21+
fill="#D97757"
22+
fillRule="nonzero"
23+
></path>
24+
</svg>
25+
);
26+
});
27+
28+
export default Icon;

src/Claude/components/Combine.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { memo } from 'react';
2+
3+
import IconCombine, { type IconCombineProps } from '@/IconCombine';
4+
5+
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
6+
import Color from './Color';
7+
import Mono from './Mono';
8+
import Text from './Text';
9+
10+
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
11+
type?: 'color' | 'mono';
12+
}
13+
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
14+
const Icon = type === 'color' ? Color : Mono;
15+
16+
return (
17+
<IconCombine
18+
Icon={Icon}
19+
Text={Text}
20+
aria-label={TITLE}
21+
spaceMultiple={SPACE_MULTIPLE}
22+
textMultiple={TEXT_MULTIPLE}
23+
{...rest}
24+
/>
25+
);
26+
});
27+
28+
export default Combine;

src/Claude/components/Mono.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
import { TITLE } from '../style';
6+
7+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
8+
return (
9+
<svg
10+
fill="currentColor"
11+
fillRule="evenodd"
12+
height={size}
13+
ref={ref}
14+
style={{ flex: 'none', lineHeight: 1, ...style }}
15+
viewBox="0 0 24 24"
16+
width={size}
17+
xmlns="http://www.w3.org/2000/svg"
18+
{...rest}
19+
>
20+
<title>{TITLE}</title>
21+
<path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path>
22+
</svg>
23+
);
24+
});
25+
26+
export default Icon;

src/Claude/components/Text.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
import { TITLE } from '../style';
6+
7+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
8+
return (
9+
<svg
10+
fill="currentColor"
11+
fillRule="evenodd"
12+
height={size}
13+
ref={ref}
14+
style={{ flex: 'none', lineHeight: 1, width: 'fit-content', ...style }}
15+
viewBox="0 0 97 24"
16+
xmlns="http://www.w3.org/2000/svg"
17+
{...rest}
18+
>
19+
<title>{TITLE}</title>
20+
<path d="M13.623 20.222c-3.417 0-5.753-1.901-6.855-4.827a12.992 12.992 0 01-.838-4.772c0-4.907 2.206-8.315 7.08-8.315 3.275 0 5.297 1.425 6.448 4.826h1.402l-.19-4.69C18.709 1.18 16.258.543 13.276.543c-4.2 0-7.775 1.874-9.763 5.254a11.357 11.357 0 00-1.511 5.872c0 3.753 1.777 7.08 5.113 8.926a11.95 11.95 0 005.943 1.398c3.254 0 5.835-.617 8.122-1.697l.593-5.172h-1.43c-.858 2.362-1.88 3.78-3.574 4.534-.831.373-1.88.564-3.146.564zm14.74-17.914L28.499 0h-.967L23.23 1.29v.699l1.907.882v16.142c0 1.1-.565 1.344-2.043 1.528v1.18h7.319v-1.18c-1.484-.184-2.042-.428-2.042-1.528V2.315l-.007-.007zm29.104 19.685h.565l4.95-.937v-1.208l-.695-.054c-1.157-.109-1.457-.346-1.457-1.29V9.897l.137-2.763h-.783l-4.678.672v1.181l.457.082c1.266.183 1.64.536 1.64 1.419v7.67c-1.212.937-2.369 1.527-3.744 1.527-1.525 0-2.471-.774-2.471-2.58V9.905l.136-2.763h-.804l-4.684.672v1.181l.484.082c1.266.183 1.64.536 1.64 1.418v7.08c0 3 1.703 4.426 4.412 4.426 2.07 0 3.765-1.1 5.038-2.627L57.474 22l-.007-.007zm-13.602-9.55c0-3.836-2.043-5.309-5.733-5.309-3.254 0-5.616 1.344-5.616 3.57 0 .666.238 1.175.721 1.528l2.478-.326c-.109-.746-.163-1.201-.163-1.391 0-1.263.674-1.901 2.042-1.901 2.022 0 3.044 1.419 3.044 3.7v.746l-5.106 1.527c-1.702.462-2.67.863-3.316 1.8a3.386 3.386 0 00-.476 1.9c0 2.172 1.497 3.706 4.057 3.706 1.852 0 3.493-.835 4.922-2.416.51 1.581 1.294 2.416 2.69 2.416 1.13 0 2.15-.455 3.063-1.344l-.272-.937a4.363 4.363 0 01-1.178.163c-.783 0-1.157-.617-1.157-1.826v-5.607zm-6.536 7.378c-1.396 0-2.26-.808-2.26-2.226 0-.964.456-1.528 1.43-1.854l4.139-1.31v3.965c-1.321.997-2.097 1.425-3.31 1.425zm43.095 1.235v-1.208l-.701-.054c-1.158-.109-1.45-.346-1.45-1.29V2.308L78.409 0h-.974l-4.302 1.29v.699l1.906.882V8.18a6.024 6.024 0 00-3.656-1.046c-4.276 0-7.612 3.245-7.612 8.098 0 3.998 2.397 6.761 6.346 6.761 2.042 0 3.819-.99 4.922-2.525l-.136 2.525h.571l4.95-.937zm-8.96-12.313c2.043 0 3.575 1.181 3.575 3.353v6.11a4.91 4.91 0 01-3.547 1.425c-2.928 0-4.412-2.308-4.412-5.39 0-3.462 1.695-5.498 4.385-5.498zm19.424 3.055c-.381-1.792-1.484-2.81-3.016-2.81-2.288 0-3.874 1.717-3.874 4.18 0 3.646 1.934 6.008 5.059 6.008a5.858 5.858 0 005.03-2.953l.913.245c-.408 3.163-3.281 5.525-6.808 5.525-4.14 0-6.992-3.054-6.992-7.399 0-4.378 3.098-7.46 7.237-7.46 3.09 0 5.27 1.853 5.97 5.07l-10.783 3.3V14.05l7.264-2.247v-.006z"></path>
21+
</svg>
22+
);
23+
});
24+
25+
export default Icon;

0 commit comments

Comments
 (0)