@yldm-tech/ai-logo 1.3.1 → 1.4.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.
@@ -1,8 +1,8 @@
1
+ import { Center } from "../../primitives/index.mjs";
1
2
  import DefaultAvatar$1 from "./DefaultIcon.mjs";
2
3
  import { memo } from "react";
3
- import { Center } from "@lobehub/ui";
4
- import { cssVar } from "antd-style";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { cssVar } from "antd-style";
6
6
  //#region src/features/AgentIcon/DefaultAvatar.tsx
7
7
  const DefaultAvatar = memo(({ shape = "circle", color, background, size, style, iconMultiple = .6, iconStyle, iconClassName }) => {
8
8
  return /* @__PURE__ */ jsx(Center, {
@@ -1,7 +1,7 @@
1
+ import { Icon } from "../../primitives/index.mjs";
1
2
  import { memo } from "react";
2
- import { Icon } from "@lobehub/ui";
3
- import { cssVar } from "antd-style";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { cssVar } from "antd-style";
5
5
  import { Bot } from "lucide-react";
6
6
  //#region src/features/AgentIcon/DefaultIcon.tsx
7
7
  const DefaultAvatar = memo(({ color, size = 12, ...rest }) => {
@@ -1,6 +1,6 @@
1
+ import { CenterProps } from "../../primitives/index.mjs";
1
2
  import { IconType } from "../../types/index.mjs";
2
3
  import { CSSProperties } from "react";
3
- import { CenterProps } from "@lobehub/ui";
4
4
  //#region src/features/IconAvatar/index.d.ts
5
5
  export interface IconAvatarProps extends Omit<CenterProps, "children"> {
6
6
  Icon?: IconType;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
+ import { Center } from "../../primitives/index.mjs";
2
3
  import { getAvatarShadow } from "./util.mjs";
3
4
  import { memo } from "react";
4
- import { Center } from "@lobehub/ui";
5
- import { useThemeMode } from "antd-style";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { useThemeMode } from "antd-style";
7
7
  //#region src/features/IconAvatar/index.tsx
8
8
  const IconAvatar = memo(({ shape = "circle", color = "#fff", background, size, style, iconMultiple = .75, Icon, iconStyle, iconClassName, ...rest }) => {
9
9
  const { isDarkMode } = useThemeMode();
@@ -1,7 +1,7 @@
1
+ import { FlexboxProps } from "../../primitives/index.mjs";
1
2
  import { IconType } from "../../types/index.mjs";
2
3
  import IconAvatar, { IconAvatarProps } from "../IconAvatar/index.mjs";
3
4
  import { CSSProperties } from "react";
4
- import { FlexboxProps } from "@lobehub/ui";
5
5
  //#region src/features/IconCombine/index.d.ts
6
6
  export interface IconCombineProps extends FlexboxProps {
7
7
  Icon?: IconType | typeof IconAvatar;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
+ import { Flexbox } from "../../primitives/index.mjs";
2
3
  import { memo } from "react";
3
- import { Flexbox } from "@lobehub/ui";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/features/IconCombine/index.tsx
6
6
  const IconCombine = memo(({ Icon, style, Text, color, size = 24, spaceMultiple = 1, textMultiple = 1, extra, extraStyle, showText = true, showLogo = true, extraClassName, iconProps, inverse, ...rest }) => {
@@ -1,8 +1,8 @@
1
+ import { Center } from "../../primitives/index.mjs";
1
2
  import DefaultAvatar$1 from "./DefaultIcon.mjs";
2
3
  import { memo } from "react";
3
- import { Center } from "@lobehub/ui";
4
- import { cssVar } from "antd-style";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { cssVar } from "antd-style";
6
6
  //#region src/features/ModelIcon/DefaultAvatar.tsx
7
7
  const DefaultAvatar = memo(({ shape = "circle", color, background, size, style, iconMultiple = .6, iconStyle, iconClassName }) => {
8
8
  return /* @__PURE__ */ jsx(Center, {
@@ -1,7 +1,7 @@
1
+ import { Icon } from "../../primitives/index.mjs";
1
2
  import { memo } from "react";
2
- import { Icon } from "@lobehub/ui";
3
- import { cssVar } from "antd-style";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { cssVar } from "antd-style";
5
5
  import { Brain } from "lucide-react";
6
6
  //#region src/features/ModelIcon/DefaultIcon.tsx
7
7
  const DefaultAvatar = memo(({ color, size = 12, ...rest }) => {
@@ -1,4 +1,4 @@
1
- import { TagProps } from "@lobehub/ui";
1
+ import { TagProps } from "antd";
2
2
  //#region src/features/ModelTag/index.d.ts
3
3
  export interface ModelTagProps extends Omit<TagProps, "icon" | "children"> {
4
4
  model: string;
@@ -1,7 +1,7 @@
1
1
  import ModelIcon from "../ModelIcon/index.mjs";
2
2
  import { memo } from "react";
3
- import { Tag } from "@lobehub/ui";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { Tag } from "antd";
5
5
  //#region src/features/ModelTag/index.tsx
6
6
  const ModelTag = memo(({ type = "mono", model, ...rest }) => /* @__PURE__ */ jsx(Tag, {
7
7
  icon: /* @__PURE__ */ jsx(ModelIcon, {
@@ -1,5 +1,5 @@
1
+ import { Flexbox } from "../../primitives/index.mjs";
1
2
  import { memo } from "react";
2
- import { Flexbox } from "@lobehub/ui";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Divider } from "antd";
5
5
  //#region src/features/ProviderCombine/Combine.tsx
@@ -1,5 +1,5 @@
1
+ import { FlexboxProps } from "../../primitives/index.mjs";
1
2
  import { ModelProviderKey } from "../providerEnum.mjs";
2
- import { FlexboxProps } from "@lobehub/ui";
3
3
  //#region src/features/ProviderCombine/index.d.ts
4
4
  export interface ProviderCombineProps extends Omit<FlexboxProps, "children" | "horizontal" | "height" | "width" | "align" | "justify"> {
5
5
  provider?: ModelProviderKey | string;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
+ import { Flexbox } from "../../primitives/index.mjs";
2
3
  import DefaultIcon from "../ProviderIcon/DefaultIcon.mjs";
3
4
  import { providerMappings } from "../providerConfig.mjs";
4
5
  import { memo, useMemo } from "react";
5
- import { Flexbox } from "@lobehub/ui";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/features/ProviderCombine/index.tsx
8
8
  const ProviderCombine = memo(({ provider: originProvider, size = 12, type = "color", ...rest }) => {
@@ -1,8 +1,8 @@
1
+ import { Center } from "../../primitives/index.mjs";
1
2
  import DefaultIcon from "./DefaultIcon.mjs";
2
3
  import { memo } from "react";
3
- import { Center } from "@lobehub/ui";
4
- import { cssVar } from "antd-style";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { cssVar } from "antd-style";
6
6
  //#region src/features/ProviderIcon/DefaultAvatar.tsx
7
7
  const DefaultAvatar = memo(({ shape = "circle", color, background, size, style, iconMultiple = .6, iconStyle, iconClassName }) => {
8
8
  return /* @__PURE__ */ jsx(Center, {
@@ -1,13 +1,13 @@
1
+ import { Icon } from "../../primitives/index.mjs";
1
2
  import { memo } from "react";
2
- import { Icon } from "@lobehub/ui";
3
- import { cssVar } from "antd-style";
4
3
  import { jsx } from "react/jsx-runtime";
5
- import { ProviderIcon } from "@lobehub/ui/icons";
4
+ import { cssVar } from "antd-style";
5
+ import { Box } from "lucide-react";
6
6
  //#region src/features/ProviderIcon/DefaultIcon.tsx
7
7
  const DefaultIcon = memo(({ color, size = 12, ...rest }) => {
8
8
  return /* @__PURE__ */ jsx(Icon, {
9
9
  color: color || cssVar.colorTextDescription,
10
- icon: ProviderIcon,
10
+ icon: Box,
11
11
  size,
12
12
  ...rest
13
13
  });
@@ -1,8 +1,8 @@
1
+ import { DivProps } from "../primitives/index.mjs";
1
2
  import { IconType } from "../types/index.mjs";
2
3
  import { IconAvatarProps } from "./IconAvatar/index.mjs";
3
4
  import { IconCombineProps } from "./IconCombine/index.mjs";
4
5
  import { FC } from "react";
5
- import { DivProps } from "@lobehub/ui";
6
6
  //#region src/features/providerConfig.d.ts
7
7
  type ProviderIconType = FC<IconType & any> & {
8
8
  Avatar: FC<Omit<IconAvatarProps, "Icon"> & any>;
@@ -0,0 +1,16 @@
1
+ import { CSSProperties, HTMLAttributes } from "react";
2
+ //#region src/primitives/index.d.ts
3
+ export type DivProps = HTMLAttributes<HTMLDivElement>;
4
+ export interface FlexboxProps extends DivProps {
5
+ align?: CSSProperties["alignItems"];
6
+ flex?: CSSProperties["flex"];
7
+ gap?: CSSProperties["gap"];
8
+ height?: CSSProperties["height"];
9
+ /** Lay children out in a row. Defaults to a column, matching the API this replaces. */
10
+ horizontal?: boolean;
11
+ justify?: CSSProperties["justifyContent"];
12
+ padding?: CSSProperties["padding"];
13
+ width?: CSSProperties["width"];
14
+ }
15
+ export type CenterProps = FlexboxProps;
16
+ //#endregion
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { forwardRef } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/primitives/index.tsx
5
+ /**
6
+ * Local stand-ins for the handful of primitives this package used to take from
7
+ * @lobehub/ui. They exist so the published package has no peer dependency on a
8
+ * component library — installing it used to pull @lobehub/ui in transitively,
9
+ * which meant a consumer wanting six icons got a whole UI kit with them.
10
+ *
11
+ * Only the props the features actually pass are supported. This is deliberately
12
+ * not a general-purpose layout library.
13
+ */
14
+ const Flexbox = forwardRef(({ align, flex, gap, height, horizontal, justify, padding, style, width, ...rest }, ref) => /* @__PURE__ */ jsx("div", {
15
+ ref,
16
+ style: {
17
+ alignItems: align,
18
+ display: "flex",
19
+ flex,
20
+ flexDirection: horizontal ? "row" : "column",
21
+ gap,
22
+ height,
23
+ justifyContent: justify,
24
+ padding,
25
+ width,
26
+ ...style
27
+ },
28
+ ...rest
29
+ }));
30
+ Flexbox.displayName = "Flexbox";
31
+ const Center = forwardRef(({ align = "center", justify = "center", ...rest }, ref) => /* @__PURE__ */ jsx(Flexbox, {
32
+ align,
33
+ justify,
34
+ ref,
35
+ ...rest
36
+ }));
37
+ Center.displayName = "Center";
38
+ /**
39
+ * Renders an icon component at a given size and colour inside a square box, so
40
+ * the glyph sits on the text baseline the way the surrounding layout expects.
41
+ */
42
+ const Icon = forwardRef(({ color, icon: Component, size = 16, style, ...rest }, ref) => /* @__PURE__ */ jsx("span", {
43
+ ref,
44
+ style: {
45
+ alignItems: "center",
46
+ display: "inline-flex",
47
+ flex: "none",
48
+ height: "1em",
49
+ justifyContent: "center",
50
+ lineHeight: 1,
51
+ width: "1em",
52
+ ...style
53
+ },
54
+ ...rest,
55
+ children: /* @__PURE__ */ jsx(Component, {
56
+ color,
57
+ size
58
+ })
59
+ }));
60
+ Icon.displayName = "Icon";
61
+ //#endregion
62
+ export { Center, Flexbox, Icon };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yldm-tech/ai-logo",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Popular AI / LLM Model Brand SVG Logo and Icon Collection",
5
5
  "keywords": [
6
6
  "ai icons",
@@ -42,7 +42,6 @@
42
42
  "polished": "^4.3.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "@lobehub/ui": "^5.0.0",
46
45
  "antd": "^6.1.1",
47
46
  "react": "^19.0.0",
48
47
  "react-dom": "^19.0.0"