From 02e68488edd77342957ea99c1b7fa2f213251aad Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Mon, 8 Jul 2024 15:18:32 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20`novita.ai`=20`?= =?UTF-8?q?=E7=B4=AB=E4=B8=9C=E5=A4=AA=E5=88=9D`=20`360=20=E6=99=BA?= =?UTF-8?q?=E8=84=91`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- package.json | 10 ++-- scripts/genMdList.ts | 6 +- src/Ai360/components/Avatar.tsx | 22 ++++++++ src/Ai360/components/Color.tsx | 93 +++++++++++++++++++++++++++++++ src/Ai360/components/Combine.tsx | 28 ++++++++++ src/Ai360/components/Mono.tsx | 33 +++++++++++ src/Ai360/components/Text.tsx | 29 ++++++++++ src/Ai360/index.md | 73 ++++++++++++++++++++++++ src/Ai360/index.ts | 27 +++++++++ src/Ai360/style.ts | 5 ++ src/AiMass/components/Avatar.tsx | 21 +++++++ src/AiMass/components/Color.tsx | 31 +++++++++++ src/AiMass/components/Combine.tsx | 28 ++++++++++ src/AiMass/components/Mono.tsx | 27 +++++++++ src/AiMass/components/Text.tsx | 33 +++++++++++ src/AiMass/index.md | 72 ++++++++++++++++++++++++ src/AiMass/index.ts | 25 +++++++++ src/AiMass/style.ts | 4 ++ src/Novita/components/Avatar.tsx | 23 ++++++++ src/Novita/components/Color.tsx | 37 ++++++++++++ src/Novita/components/Combine.tsx | 28 ++++++++++ src/Novita/components/Mono.tsx | 29 ++++++++++ src/Novita/components/Text.tsx | 40 +++++++++++++ src/Novita/index.md | 73 ++++++++++++++++++++++++ src/Novita/index.ts | 27 +++++++++ src/Novita/style.ts | 5 ++ src/components/Editor/Color.tsx | 4 +- src/components/Editor/Mono.tsx | 4 +- src/components/Editor/Preview.tsx | 4 +- src/components/Editor/Text.tsx | 4 +- src/hooks/useFillId.ts | 31 +++++++---- src/index.ts | 3 + 33 files changed, 856 insertions(+), 29 deletions(-) create mode 100644 src/Ai360/components/Avatar.tsx create mode 100644 src/Ai360/components/Color.tsx create mode 100644 src/Ai360/components/Combine.tsx create mode 100644 src/Ai360/components/Mono.tsx create mode 100644 src/Ai360/components/Text.tsx create mode 100644 src/Ai360/index.md create mode 100644 src/Ai360/index.ts create mode 100644 src/Ai360/style.ts create mode 100644 src/AiMass/components/Avatar.tsx create mode 100644 src/AiMass/components/Color.tsx create mode 100644 src/AiMass/components/Combine.tsx create mode 100644 src/AiMass/components/Mono.tsx create mode 100644 src/AiMass/components/Text.tsx create mode 100644 src/AiMass/index.md create mode 100644 src/AiMass/index.ts create mode 100644 src/AiMass/style.ts create mode 100644 src/Novita/components/Avatar.tsx create mode 100644 src/Novita/components/Color.tsx create mode 100644 src/Novita/components/Combine.tsx create mode 100644 src/Novita/components/Mono.tsx create mode 100644 src/Novita/components/Text.tsx create mode 100644 src/Novita/index.md create mode 100644 src/Novita/index.ts create mode 100644 src/Novita/style.ts diff --git a/README.md b/README.md index 988c455..32c8eaa 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ Contributions, corrections & requests can be made on GitHub. -| Model | Provider | Application | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ✅ [Ai21Labs (Jamba)](https://icons.lobehub.com/components/ai-21)
✅ [Baichuan (百川)](https://icons.lobehub.com/components/baichuan)
✅ [Claude](https://icons.lobehub.com/components/claude)
✅ [Databricks (DBRX)](https://icons.lobehub.com/components/dbrx)
✅ [DeepSeek](https://icons.lobehub.com/components/deep-seek)
✅ [Doubao (豆包)](https://icons.lobehub.com/components/doubao)
✅ [FishAudio (Bert)](https://icons.lobehub.com/components/fish-audio)
✅ [Google (Gemini)](https://icons.lobehub.com/components/gemini)
✅ [Google (Gemma)](https://icons.lobehub.com/components/gemma)
✅ [Grok](https://icons.lobehub.com/components/grok)
✅ [Hunyuan (腾讯混元)](https://icons.lobehub.com/components/hunyuan)
✅ [LLaVA](https://icons.lobehub.com/components/l-la-va)
✅ [Minimax](https://icons.lobehub.com/components/minimax)
✅ [Mistral](https://icons.lobehub.com/components/mistral)
✅ [OpenAI (DALL·E)](https://icons.lobehub.com/components/dalle)
✅ [OpenChat](https://icons.lobehub.com/components/open-chat)
✅ [RWKV](https://icons.lobehub.com/components/rwkv)
✅ [Spark (讯飞星火)](https://icons.lobehub.com/components/spark)
✅ [Stepfun (阶跃星辰)](https://icons.lobehub.com/components/stepfun)
✅ [Tongyi (通义)](https://icons.lobehub.com/components/tongyi)
✅ [Wenxin (文心)](https://icons.lobehub.com/components/wenxin)
✅ [Yi (零一万物)](https://icons.lobehub.com/components/yi)
✅ [Zhipu (ChatGLM)](https://icons.lobehub.com/components/chat-glm) | ✅ [01.AI (零一万物)](https://icons.lobehub.com/components/zero-one)
✅ [Alibaba](https://icons.lobehub.com/components/alibaba)
✅ [AntGroup](https://icons.lobehub.com/components/ant-group)
✅ [Anthropic](https://icons.lobehub.com/components/anthropic)
✅ [AWS](https://icons.lobehub.com/components/aws)
✅ [AWS (Bedrock)](https://icons.lobehub.com/components/bedrock)
✅ [Baidu](https://icons.lobehub.com/components/baidu)
✅ [ByteDance](https://icons.lobehub.com/components/byte-dance)
✅ [Cloudflare](https://icons.lobehub.com/components/cloudflare)
✅ [Cloudflare (WorkersAI)](https://icons.lobehub.com/components/workers-ai)
✅ [Cohere (Command)](https://icons.lobehub.com/components/cohere)
✅ [Fireworks](https://icons.lobehub.com/components/fireworks)
✅ [Google](https://icons.lobehub.com/components/google)
✅ [Google(DeepMind)](https://icons.lobehub.com/components/deep-mind)
✅ [Groq](https://icons.lobehub.com/components/groq)
✅ [HuggingFace](https://icons.lobehub.com/components/hugging-face)
✅ [LM Studio](https://icons.lobehub.com/components/lm-studio)
✅ [LobeHub](https://icons.lobehub.com/components/lobe-hub)
✅ [Meta](https://icons.lobehub.com/components/meta)
✅ [Microsoft (Azure)](https://icons.lobehub.com/components/azure)
✅ [Moonshot (月之暗面)](https://icons.lobehub.com/components/moonshot)
✅ [Ollama](https://icons.lobehub.com/components/ollama)
✅ [OpenAI (ChatGPT)](https://icons.lobehub.com/components/open-ai)
✅ [OpenRouter](https://icons.lobehub.com/components/open-router)
✅ [Perplexity](https://icons.lobehub.com/components/perplexity)
✅ [Replicate](https://icons.lobehub.com/components/replicate)
✅ [SiliconCloud (SiliconFlow)](https://icons.lobehub.com/components/silicon-cloud)
✅ [Stability (StableDiffusion)](https://icons.lobehub.com/components/stability)
✅ [Tencent](https://icons.lobehub.com/components/tencent)
✅ [together.ai](https://icons.lobehub.com/components/together)
✅ [vLLM](https://icons.lobehub.com/components/vllm)
✅ [Zeabur](https://icons.lobehub.com/components/zeabur)
✅ [Zhipu (智谱)](https://icons.lobehub.com/components/zhipu) | ✅ [Adobe](https://icons.lobehub.com/components/adobe)
✅ [Adobe (Firefly)](https://icons.lobehub.com/components/adobe-firefly)
✅ [Automatic1111 (SD Webui)](https://icons.lobehub.com/components/automatic)
✅ [Github](https://icons.lobehub.com/components/github)
✅ [Github Copilot](https://icons.lobehub.com/components/github-copilot)
✅ [Google (Colab)](https://icons.lobehub.com/components/colab)
✅ [Langfuse](https://icons.lobehub.com/components/langfuse)
✅ [Microsoft Copilot](https://icons.lobehub.com/components/copilot)
✅ [Midjourney](https://icons.lobehub.com/components/midjourney)
✅ [Nvidia (ChatWithRTX)](https://icons.lobehub.com/components/nvidia)
✅ [Pollinations](https://icons.lobehub.com/components/pollinations)
✅ [Qingyan (智谱清言)](https://icons.lobehub.com/components/qingyan)
✅ [Suno](https://icons.lobehub.com/components/suno) | +| Model | Provider | Application | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ✅ [Ai21Labs (Jamba)](https://icons.lobehub.com/components/ai-21)
✅ [Baichuan (百川)](https://icons.lobehub.com/components/baichuan)
✅ [Claude](https://icons.lobehub.com/components/claude)
✅ [Databricks (DBRX)](https://icons.lobehub.com/components/dbrx)
✅ [DeepSeek](https://icons.lobehub.com/components/deep-seek)
✅ [Doubao (豆包)](https://icons.lobehub.com/components/doubao)
✅ [FishAudio (Bert)](https://icons.lobehub.com/components/fish-audio)
✅ [Google (Gemini)](https://icons.lobehub.com/components/gemini)
✅ [Google (Gemma)](https://icons.lobehub.com/components/gemma)
✅ [Grok](https://icons.lobehub.com/components/grok)
✅ [Hunyuan (腾讯混元)](https://icons.lobehub.com/components/hunyuan)
✅ [LLaVA](https://icons.lobehub.com/components/l-la-va)
✅ [Minimax](https://icons.lobehub.com/components/minimax)
✅ [Mistral](https://icons.lobehub.com/components/mistral)
✅ [OpenAI (DALL·E)](https://icons.lobehub.com/components/dalle)
✅ [OpenChat](https://icons.lobehub.com/components/open-chat)
✅ [RWKV](https://icons.lobehub.com/components/rwkv)
✅ [Spark (讯飞星火)](https://icons.lobehub.com/components/spark)
✅ [Stepfun (阶跃星辰)](https://icons.lobehub.com/components/stepfun)
✅ [Tongyi (通义)](https://icons.lobehub.com/components/tongyi)
✅ [Wenxin (文心)](https://icons.lobehub.com/components/wenxin)
✅ [Yi (零一万物)](https://icons.lobehub.com/components/yi)
✅ [Zhipu (ChatGLM)](https://icons.lobehub.com/components/chat-glm) | ✅ [01.AI (零一万物)](https://icons.lobehub.com/components/zero-one)
✅ [Ai360 (360 智脑)](https://icons.lobehub.com/components/ai-360)
✅ [AiMass (紫东太初)](https://icons.lobehub.com/components/ai-mass)
✅ [Alibaba](https://icons.lobehub.com/components/alibaba)
✅ [AntGroup](https://icons.lobehub.com/components/ant-group)
✅ [Anthropic](https://icons.lobehub.com/components/anthropic)
✅ [AWS](https://icons.lobehub.com/components/aws)
✅ [AWS (Bedrock)](https://icons.lobehub.com/components/bedrock)
✅ [Baidu](https://icons.lobehub.com/components/baidu)
✅ [ByteDance](https://icons.lobehub.com/components/byte-dance)
✅ [Cloudflare](https://icons.lobehub.com/components/cloudflare)
✅ [Cloudflare (WorkersAI)](https://icons.lobehub.com/components/workers-ai)
✅ [Cohere (Command)](https://icons.lobehub.com/components/cohere)
✅ [Fireworks](https://icons.lobehub.com/components/fireworks)
✅ [Google](https://icons.lobehub.com/components/google)
✅ [Google(DeepMind)](https://icons.lobehub.com/components/deep-mind)
✅ [Groq](https://icons.lobehub.com/components/groq)
✅ [HuggingFace](https://icons.lobehub.com/components/hugging-face)
✅ [LM Studio](https://icons.lobehub.com/components/lm-studio)
✅ [LobeHub](https://icons.lobehub.com/components/lobe-hub)
✅ [Meta](https://icons.lobehub.com/components/meta)
✅ [Microsoft (Azure)](https://icons.lobehub.com/components/azure)
✅ [Moonshot (月之暗面)](https://icons.lobehub.com/components/moonshot)
✅ [Novita](https://icons.lobehub.com/components/novita)
✅ [Ollama](https://icons.lobehub.com/components/ollama)
✅ [OpenAI (ChatGPT)](https://icons.lobehub.com/components/open-ai)
✅ [OpenRouter](https://icons.lobehub.com/components/open-router)
✅ [Perplexity](https://icons.lobehub.com/components/perplexity)
✅ [Replicate](https://icons.lobehub.com/components/replicate)
✅ [SiliconCloud (SiliconFlow)](https://icons.lobehub.com/components/silicon-cloud)
✅ [Stability (StableDiffusion)](https://icons.lobehub.com/components/stability)
✅ [Tencent](https://icons.lobehub.com/components/tencent)
✅ [together.ai](https://icons.lobehub.com/components/together)
✅ [vLLM](https://icons.lobehub.com/components/vllm)
✅ [Zeabur](https://icons.lobehub.com/components/zeabur)
✅ [Zhipu (智谱)](https://icons.lobehub.com/components/zhipu) | ✅ [Adobe](https://icons.lobehub.com/components/adobe)
✅ [Adobe (Firefly)](https://icons.lobehub.com/components/adobe-firefly)
✅ [Automatic1111 (SD Webui)](https://icons.lobehub.com/components/automatic)
✅ [Github](https://icons.lobehub.com/components/github)
✅ [Github Copilot](https://icons.lobehub.com/components/github-copilot)
✅ [Google (Colab)](https://icons.lobehub.com/components/colab)
✅ [Langfuse](https://icons.lobehub.com/components/langfuse)
✅ [Microsoft Copilot](https://icons.lobehub.com/components/copilot)
✅ [Midjourney](https://icons.lobehub.com/components/midjourney)
✅ [Nvidia (ChatWithRTX)](https://icons.lobehub.com/components/nvidia)
✅ [Pollinations](https://icons.lobehub.com/components/pollinations)
✅ [Qingyan (智谱清言)](https://icons.lobehub.com/components/qingyan)
✅ [Suno](https://icons.lobehub.com/components/suno) | diff --git a/package.json b/package.json index 3246666..779db5f 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@commitlint/cli": "^18.6.1", "@lobehub/lint": "latest", - "@lobehub/ui": "^1.146.4", + "@lobehub/ui": "^1.146.5", "@testing-library/react": "^14.3.1", "@types/lodash-es": "^4.17.12", "@types/pangu": "^4.0.2", @@ -81,7 +81,7 @@ "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitest/coverage-v8": "latest", - "antd": "^5.19.0", + "antd": "^5.19.1", "antd-style": "^3.6.2", "babel-plugin-antd-style": "latest", "commitlint": "^18.6.1", @@ -91,7 +91,7 @@ "dumi-theme-lobehub": "latest", "eslint": "^8.57.0", "father": "^4.4.4", - "glob": "^10.4.2", + "glob": "^10.4.3", "gray-matter": "^4.0.3", "husky": "^8.0.3", "jsdom": "^23.2.0", @@ -107,8 +107,8 @@ "semantic-release": "^21.1.2", "stylelint": "^15.11.0", "svgo-browser": "^1.3.8", - "tsx": "^4.16.0", - "typescript": "^5.5.2", + "tsx": "^4.16.2", + "typescript": "^5.5.3", "vitest": "latest" }, "peerDependencies": { diff --git a/scripts/genMdList.ts b/scripts/genMdList.ts index 8ea41c6..3ff51f4 100644 --- a/scripts/genMdList.ts +++ b/scripts/genMdList.ts @@ -9,6 +9,8 @@ const ROOT_PATH = resolve(__dirname, '..'); const BASE_URL = 'https://icons.lobehub.com/components/'; +const fixWindowsPath = (path: string): string => path.replaceAll('\\', '/'); + const updateReadme = (split: string, md: string, content: string): string => { const mds = md.split(split); mds[1] = [' ', content, ' '].join('\n\n'); @@ -30,7 +32,9 @@ const genMd = ( .join('
'); const run = () => { - const mds = globSync(resolve(ROOT_PATH, './src/**/index.md').replace('\\', '/')); + const mds = globSync(fixWindowsPath(resolve(ROOT_PATH, './src/**/index.md'))).map((md) => + fixWindowsPath(md), + ); const metas: any = mds .map((md) => { const { data } = matter(readFileSync(md, 'utf8')); diff --git a/src/Ai360/components/Avatar.tsx b/src/Ai360/components/Avatar.tsx new file mode 100644 index 0000000..cb8b9b9 --- /dev/null +++ b/src/Ai360/components/Avatar.tsx @@ -0,0 +1,22 @@ +import { memo } from 'react'; + +import IconAvatar, { type IconAvatarProps } from '@/IconAvatar'; + +import { COLOR_GRADIENT, TITLE } from '../style'; +import Mono from './Mono'; + +export type AvatarProps = Omit; + +const Avatar = memo(({ background, ...rest }) => { + return ( + + ); +}); + +export default Avatar; diff --git a/src/Ai360/components/Color.tsx b/src/Ai360/components/Color.tsx new file mode 100644 index 0000000..9b8989a --- /dev/null +++ b/src/Ai360/components/Color.tsx @@ -0,0 +1,93 @@ +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, d, e] = useFillIds(TITLE, 5); + return ( + + {TITLE} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Ai360/components/Combine.tsx b/src/Ai360/components/Combine.tsx new file mode 100644 index 0000000..2d4ede6 --- /dev/null +++ b/src/Ai360/components/Combine.tsx @@ -0,0 +1,28 @@ +import { memo } from 'react'; + +import IconCombine, { type IconCombineProps } from '@/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 { + type?: 'color' | 'mono'; +} +const Combine = memo(({ type = 'mono', ...rest }) => { + const Icon = type === 'color' ? Color : Mono; + + return ( + + ); +}); + +export default Combine; diff --git a/src/Ai360/components/Mono.tsx b/src/Ai360/components/Mono.tsx new file mode 100644 index 0000000..5dfc14a --- /dev/null +++ b/src/Ai360/components/Mono.tsx @@ -0,0 +1,33 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + {TITLE} + + + + + + + ); +}); + +export default Icon; diff --git a/src/Ai360/components/Text.tsx b/src/Ai360/components/Text.tsx new file mode 100644 index 0000000..ff3d651 --- /dev/null +++ b/src/Ai360/components/Text.tsx @@ -0,0 +1,29 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + {TITLE} + + + + ); +}); + +export default Icon; diff --git a/src/Ai360/index.md b/src/Ai360/index.md new file mode 100644 index 0000000..50e0133 --- /dev/null +++ b/src/Ai360/index.md @@ -0,0 +1,73 @@ +--- +nav: Components +group: Provider +title: Ai360 (360智脑) +atomId: Ai360 +description: https://ai.360.com/ +--- + +## Icons + +```tsx +import { Ai360 } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Text + +```tsx +import { Ai360 } from '@lobehub/icons'; + +export default () => ; +``` + +## Combine + +```tsx +import { Ai360 } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Avatars + +```tsx +import { Ai360 } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + + +); +``` + +## Colors + +```tsx +import { Ai360 } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +import ColorPreview from '../components/ColorPreview'; + +export default () => ( + + + +); +``` diff --git a/src/Ai360/index.ts b/src/Ai360/index.ts new file mode 100644 index 0000000..096b692 --- /dev/null +++ b/src/Ai360/index.ts @@ -0,0 +1,27 @@ +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_GRADIENT, COLOR_PRIMARY, TITLE } from './style'; + +export type CompoundedIcon = typeof Mono & { + Avatar: typeof Avatar; + Color: typeof Color; + Combine: typeof Combine; + Text: typeof Text; + colorGradient: string; + 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.colorGradient = COLOR_GRADIENT; +Icons.title = TITLE; + +export default Icons; diff --git a/src/Ai360/style.ts b/src/Ai360/style.ts new file mode 100644 index 0000000..403a49f --- /dev/null +++ b/src/Ai360/style.ts @@ -0,0 +1,5 @@ +export const TITLE = '360智脑'; +export const TEXT_MULTIPLE = 0.7; +export const SPACE_MULTIPLE = 0.2; +export const COLOR_PRIMARY = '#006ffb'; +export const COLOR_GRADIENT = 'linear-gradient(to bottom, #12B7FA, #006ffb)'; diff --git a/src/AiMass/components/Avatar.tsx b/src/AiMass/components/Avatar.tsx new file mode 100644 index 0000000..dcc12cb --- /dev/null +++ b/src/AiMass/components/Avatar.tsx @@ -0,0 +1,21 @@ +import { memo } from 'react'; + +import IconAvatar, { type IconAvatarProps } from '@/IconAvatar'; + +import { COLOR_PRIMARY, TITLE } from '../style'; +import Color from './Color'; + +export type AvatarProps = Omit; + +const Avatar = memo(({ background, ...rest }) => { + return ( + + ); +}); + +export default Avatar; diff --git a/src/AiMass/components/Color.tsx b/src/AiMass/components/Color.tsx new file mode 100644 index 0000000..8f15538 --- /dev/null +++ b/src/AiMass/components/Color.tsx @@ -0,0 +1,31 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + {TITLE} + + + + ); +}); + +export default Icon; diff --git a/src/AiMass/components/Combine.tsx b/src/AiMass/components/Combine.tsx new file mode 100644 index 0000000..2d4ede6 --- /dev/null +++ b/src/AiMass/components/Combine.tsx @@ -0,0 +1,28 @@ +import { memo } from 'react'; + +import IconCombine, { type IconCombineProps } from '@/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 { + type?: 'color' | 'mono'; +} +const Combine = memo(({ type = 'mono', ...rest }) => { + const Icon = type === 'color' ? Color : Mono; + + return ( + + ); +}); + +export default Combine; diff --git a/src/AiMass/components/Mono.tsx b/src/AiMass/components/Mono.tsx new file mode 100644 index 0000000..26f9e96 --- /dev/null +++ b/src/AiMass/components/Mono.tsx @@ -0,0 +1,27 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + {TITLE} + + + + ); +}); + +export default Icon; diff --git a/src/AiMass/components/Text.tsx b/src/AiMass/components/Text.tsx new file mode 100644 index 0000000..576a0bd --- /dev/null +++ b/src/AiMass/components/Text.tsx @@ -0,0 +1,33 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + {TITLE} + + + + + + + + ); +}); + +export default Icon; diff --git a/src/AiMass/index.md b/src/AiMass/index.md new file mode 100644 index 0000000..ea9d4f1 --- /dev/null +++ b/src/AiMass/index.md @@ -0,0 +1,72 @@ +--- +nav: Components +group: Provider +title: AiMass (紫东太初) +atomId: AiMass +description: https://ai-maas.wair.ac.cn +--- + +## Icons + +```tsx +import { AiMass } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Text + +```tsx +import { AiMass } from '@lobehub/icons'; + +export default () => ; +``` + +## Combine + +```tsx +import { AiMass } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Avatars + +```tsx +import { AiMass } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Colors + +```tsx +import { AiMass } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +import ColorPreview from '../components/ColorPreview'; + +export default () => ( + + + +); +``` diff --git a/src/AiMass/index.ts b/src/AiMass/index.ts new file mode 100644 index 0000000..92a3b98 --- /dev/null +++ b/src/AiMass/index.ts @@ -0,0 +1,25 @@ +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; diff --git a/src/AiMass/style.ts b/src/AiMass/style.ts new file mode 100644 index 0000000..d1c9361 --- /dev/null +++ b/src/AiMass/style.ts @@ -0,0 +1,4 @@ +export const TITLE = '紫东太初'; +export const TEXT_MULTIPLE = 0.6; +export const SPACE_MULTIPLE = 0.2; +export const COLOR_PRIMARY = '#fff'; diff --git a/src/Novita/components/Avatar.tsx b/src/Novita/components/Avatar.tsx new file mode 100644 index 0000000..e98b2d2 --- /dev/null +++ b/src/Novita/components/Avatar.tsx @@ -0,0 +1,23 @@ +import { memo } from 'react'; + +import IconAvatar, { type IconAvatarProps } from '@/IconAvatar'; + +import { COLOR_GRADIENT, TITLE } from '../style'; +import Mono from './Mono'; + +export type AvatarProps = Omit; + +const Avatar = memo(({ background, ...rest }) => { + return ( + + ); +}); + +export default Avatar; diff --git a/src/Novita/components/Color.tsx b/src/Novita/components/Color.tsx new file mode 100644 index 0000000..5b639e2 --- /dev/null +++ b/src/Novita/components/Color.tsx @@ -0,0 +1,37 @@ +import { forwardRef } from 'react'; + +import { useFillId } from '@/hooks/useFillId'; +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + const { fill, id } = useFillId(TITLE); + return ( + + {TITLE} + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Novita/components/Combine.tsx b/src/Novita/components/Combine.tsx new file mode 100644 index 0000000..2d4ede6 --- /dev/null +++ b/src/Novita/components/Combine.tsx @@ -0,0 +1,28 @@ +import { memo } from 'react'; + +import IconCombine, { type IconCombineProps } from '@/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 { + type?: 'color' | 'mono'; +} +const Combine = memo(({ type = 'mono', ...rest }) => { + const Icon = type === 'color' ? Color : Mono; + + return ( + + ); +}); + +export default Combine; diff --git a/src/Novita/components/Mono.tsx b/src/Novita/components/Mono.tsx new file mode 100644 index 0000000..3614d8c --- /dev/null +++ b/src/Novita/components/Mono.tsx @@ -0,0 +1,29 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + {TITLE} + + + ); +}); + +export default Icon; diff --git a/src/Novita/components/Text.tsx b/src/Novita/components/Text.tsx new file mode 100644 index 0000000..9e98f74 --- /dev/null +++ b/src/Novita/components/Text.tsx @@ -0,0 +1,40 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +import { TITLE } from '../style'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + {TITLE} + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Novita/index.md b/src/Novita/index.md new file mode 100644 index 0000000..2692006 --- /dev/null +++ b/src/Novita/index.md @@ -0,0 +1,73 @@ +--- +nav: Components +group: Provider +title: Novita +atomId: Novita +description: https://novita.ai/ +--- + +## Icons + +```tsx +import { Novita } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Text + +```tsx +import { Novita } from '@lobehub/icons'; + +export default () => ; +``` + +## Combine + +```tsx +import { Novita } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Avatars + +```tsx +import { Novita } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + + +); +``` + +## Colors + +```tsx +import { Novita } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +import ColorPreview from '../components/ColorPreview'; + +export default () => ( + + + +); +``` diff --git a/src/Novita/index.ts b/src/Novita/index.ts new file mode 100644 index 0000000..096b692 --- /dev/null +++ b/src/Novita/index.ts @@ -0,0 +1,27 @@ +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_GRADIENT, COLOR_PRIMARY, TITLE } from './style'; + +export type CompoundedIcon = typeof Mono & { + Avatar: typeof Avatar; + Color: typeof Color; + Combine: typeof Combine; + Text: typeof Text; + colorGradient: string; + 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.colorGradient = COLOR_GRADIENT; +Icons.title = TITLE; + +export default Icons; diff --git a/src/Novita/style.ts b/src/Novita/style.ts new file mode 100644 index 0000000..cfef6cb --- /dev/null +++ b/src/Novita/style.ts @@ -0,0 +1,5 @@ +export const TITLE = 'novita.ai'; +export const TEXT_MULTIPLE = 0.7; +export const SPACE_MULTIPLE = 0.25; +export const COLOR_PRIMARY = '#6847f5'; +export const COLOR_GRADIENT = 'linear-gradient(-45deg, #A717FF, #2622FF)'; diff --git a/src/components/Editor/Color.tsx b/src/components/Editor/Color.tsx index c4b367a..45c0b4f 100644 --- a/src/components/Editor/Color.tsx +++ b/src/components/Editor/Color.tsx @@ -30,9 +30,9 @@ const Preview = memo(({ svg, title, viewbox }) => { return ( -

{title}

+

{title}

- + {`import { forwardRef } from 'react'; import type { IconType } from '@/types'; diff --git a/src/components/Editor/Mono.tsx b/src/components/Editor/Mono.tsx index 411f6d9..be91937 100644 --- a/src/components/Editor/Mono.tsx +++ b/src/components/Editor/Mono.tsx @@ -30,9 +30,9 @@ const Preview = memo(({ svg, title, viewbox }) => { return ( -

{title}

+

{title}

- + {`import { forwardRef } from 'react'; import type { IconType } from '@/types'; diff --git a/src/components/Editor/Preview.tsx b/src/components/Editor/Preview.tsx index 15c0f92..9840556 100644 --- a/src/components/Editor/Preview.tsx +++ b/src/components/Editor/Preview.tsx @@ -35,12 +35,12 @@ const Preview = forwardRef(({ svg, title, precent return ( -

{title}

+

{title}

{precent && {precent}}
{svg} - + {svg} diff --git a/src/components/Editor/Text.tsx b/src/components/Editor/Text.tsx index f03ab1f..74f84e2 100644 --- a/src/components/Editor/Text.tsx +++ b/src/components/Editor/Text.tsx @@ -30,9 +30,9 @@ const Preview = memo(({ svg, title, viewbox }) => { return ( -

{title}

+

{title}

- + {`import { forwardRef } from 'react'; import type { IconType } from '@/types'; diff --git a/src/hooks/useFillId.ts b/src/hooks/useFillId.ts index 3134a85..dcd9d93 100644 --- a/src/hooks/useFillId.ts +++ b/src/hooks/useFillId.ts @@ -1,18 +1,25 @@ +import { useMemo } from 'react'; + export const useFillId = (namespace: string) => { const id = `lobe-icons-${namespace.toLowerCase()}-fill`; - return { - fill: `url(#${id})`, - id, - }; + return useMemo( + () => ({ + fill: `url(#${id})`, + id, + }), + [namespace], + ); }; export const useFillIds = (namespace: string, length: number) => { - const ids = Array.from({ length }, (_, i) => { - const id = `lobe-icons-${namespace.toLowerCase()}-fill-${i}`; - return { - fill: `url(#${id})`, - id, - }; - }); - return ids; + return useMemo(() => { + const ids = Array.from({ length }, (_, i) => { + const id = `lobe-icons-${namespace.toLowerCase()}-fill-${i}`; + return { + fill: `url(#${id})`, + id, + }; + }); + return ids; + }, [namespace]); }; diff --git a/src/index.ts b/src/index.ts index 0715045..c457c2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,8 @@ export { default as Adobe, type CompoundedIcon as AdobeProps } from './Adobe'; export { default as AdobeFirefly, type CompoundedIcon as AdobeFireflyProps } from './AdobeFirefly'; export { default as Ai21, type CompoundedIcon as Ai21Props } from './Ai21'; +export { default as Ai360, type CompoundedIcon as Ai360Props } from './Ai360'; +export { default as AiMass, type CompoundedIcon as AiMassProps } from './AiMass'; export { default as Alibaba, type CompoundedIcon as AlibabaProps } from './Alibaba'; export { default as AntGroup, type CompoundedIcon as AntGroupProps } from './AntGroup'; export { default as Anthropic, type CompoundedIcon as AnthropicProps } from './Anthropic'; @@ -48,6 +50,7 @@ export { default as Midjourney, type CompoundedIcon as MidjourneyProps } from '. export { default as Minimax, type CompoundedIcon as MinimaxProps } from './Minimax'; export { default as Mistral, type CompoundedIcon as MistralProps } from './Mistral'; export { default as Moonshot, type CompoundedIcon as MoonshotProps } from './Moonshot'; +export { default as Novita, type CompoundedIcon as NovitaProps } from './Novita'; export { default as Nvidia, type CompoundedIcon as NvidiaProps } from './Nvidia'; export { default as Ollama, type CompoundedIcon as OllamaProps } from './Ollama'; export { default as OpenAI, type CompoundedIcon as OpenAIProps } from './OpenAI';