@lobehub/ui 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/es/Accordion/Accordion.d.mts +2 -2
- package/es/Accordion/AccordionItem.d.mts +2 -2
- package/es/Accordion/AccordionItem.mjs +4 -4
- package/es/Accordion/AccordionItem.mjs.map +1 -1
- package/es/ActionIcon/ActionIcon.d.mts +2 -2
- package/es/ActionIcon/components/utils.mjs +1 -1
- package/es/ActionIcon/components/utils.mjs.map +1 -1
- package/es/Alert/Alert.d.mts +2 -2
- package/es/Alert/Alert.mjs +1 -1
- package/es/Alert/Alert.mjs.map +1 -1
- package/es/AutoComplete/Select.d.mts +2 -2
- package/es/Avatar/AvatarGroup/index.d.mts +2 -2
- package/es/Burger/Burger.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.d.mts +2 -2
- package/es/Collapse/Collapse.d.mts +2 -2
- package/es/ConfigProvider/index.d.mts +2 -2
- package/es/CopyButton/CopyButton.d.mts +2 -2
- package/es/DatePicker/DatePicker.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
- package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
- package/es/Drawer/Drawer.d.mts +2 -2
- package/es/Dropdown/Dropdown.d.mts +2 -2
- package/es/EditableText/EditableText.d.mts +2 -2
- package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
- package/es/Flex/FlexBasic.d.mts +2 -2
- package/es/FontLoader/index.d.mts +2 -2
- package/es/Footer/Footer.d.mts +2 -2
- package/es/Form/Form.mjs +1 -1
- package/es/Form/Form.mjs.map +1 -1
- package/es/Form/components/FormGroup.d.mts +2 -2
- package/es/Form/components/FormGroup.mjs +1 -1
- package/es/Form/components/FormGroup.mjs.map +1 -1
- package/es/Form/components/FormItem.d.mts +2 -2
- package/es/Form/components/FormSubmitFooter.d.mts +2 -2
- package/es/Form/components/FormSubmitFooter.mjs +3 -3
- package/es/Form/components/FormSubmitFooter.mjs.map +1 -1
- package/es/Form/components/merge.mjs +1 -1
- package/es/Form/components/merge.mjs.map +1 -1
- package/es/Form/style.mjs +6 -6
- package/es/Form/style.mjs.map +1 -1
- package/es/FormModal/FormModal.d.mts +2 -2
- package/es/Grid/style.mjs +1 -1
- package/es/Grid/style.mjs.map +1 -1
- package/es/GuideCard/GuideCard.d.mts +2 -2
- package/es/Header/Header.d.mts +2 -2
- package/es/Highlighter/Highlighter.d.mts +2 -2
- package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
- package/es/Hotkey/Hotkey.d.mts +2 -2
- package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
- package/es/HotkeyInput/HotkeyInput.mjs +1 -1
- package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
- package/es/Icon/Icon.d.mts +2 -2
- package/es/Icon/components/IconProvider.d.mts +3 -3
- package/es/Icon/components/utils.mjs +1 -1
- package/es/Icon/components/utils.mjs.map +1 -1
- package/es/Image/PreviewGroup.d.mts +2 -2
- package/es/ImageSelect/ImageSelect.d.mts +2 -2
- package/es/Input/Input.d.mts +2 -2
- package/es/Input/InputOPT.d.mts +2 -2
- package/es/Input/InputPassword.d.mts +2 -2
- package/es/Layout/components/LayoutFooter.d.mts +2 -2
- package/es/Layout/components/LayoutHeader.d.mts +2 -2
- package/es/Layout/components/LayoutMain.d.mts +2 -2
- package/es/Layout/components/LayoutSidebar.d.mts +2 -2
- package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
- package/es/Layout/components/LayoutToc.d.mts +2 -2
- package/es/List/ListItem/index.d.mts +2 -2
- package/es/Markdown/Markdown.d.mts +2 -2
- package/es/Markdown/Typography.d.mts +2 -2
- package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
- package/es/MaskShadow/MaskShadow.d.mts +2 -2
- package/es/Menu/Menu.d.mts +2 -2
- package/es/Mermaid/Mermaid.d.mts +2 -2
- package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
- package/es/Mermaid/SyntaxMermaid/index.mjs +1 -1
- package/es/Mermaid/SyntaxMermaid/index.mjs.map +1 -1
- package/es/Modal/Modal.d.mts +2 -2
- package/es/MotionProvider/index.d.mts +4 -3
- package/es/MotionProvider/index.mjs +2 -2
- package/es/MotionProvider/index.mjs.map +1 -1
- package/es/SearchBar/SearchBar.d.mts +2 -2
- package/es/Segmented/Segmented.d.mts +2 -2
- package/es/Select/Select.d.mts +2 -2
- package/es/SideNav/SideNav.d.mts +2 -2
- package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
- package/es/SliderWithInput/SliderWithInput.mjs +1 -1
- package/es/SliderWithInput/SliderWithInput.mjs.map +1 -1
- package/es/SortableList/components/DragHandle.d.mts +2 -2
- package/es/SortableList/components/SortableItem.d.mts +2 -2
- package/es/Tag/utils.mjs +1 -1
- package/es/Tag/utils.mjs.map +1 -1
- package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
- package/es/ThemeProvider/ThemeProvider.mjs +5 -12
- package/es/ThemeProvider/ThemeProvider.mjs.map +1 -1
- package/es/ThemeProvider/type.d.mts +0 -4
- package/es/Toc/Toc.d.mts +2 -2
- package/es/Tooltip/TooltipFloating.mjs +6 -5
- package/es/Tooltip/TooltipFloating.mjs.map +1 -1
- package/es/Video/index.d.mts +2 -2
- package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
- package/es/awesome/Features/Features.d.mts +2 -2
- package/es/awesome/Giscus/Giscus.d.mts +2 -2
- package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
- package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
- package/es/awesome/GridBackground/GridBackground.mjs +1 -1
- package/es/awesome/GridBackground/GridBackground.mjs.map +1 -1
- package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
- package/es/awesome/GridBackground/components/Grid.mjs +1 -1
- package/es/awesome/GridBackground/components/Grid.mjs.map +1 -1
- package/es/awesome/Hero/Hero.d.mts +2 -2
- package/es/awesome/Spline/ParentSize.mjs +1 -1
- package/es/awesome/Spline/ParentSize.mjs.map +1 -1
- package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
- package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
- package/es/awesome/TypewriterEffect/TypewriterEffect.mjs +3 -3
- package/es/awesome/TypewriterEffect/TypewriterEffect.mjs.map +1 -1
- package/es/brand/BrandLoading/{style-Cof4dJBw.css → style-BpgFy1wc.css} +1 -1
- package/es/brand/BrandLoading/{style-Cof4dJBw.css.map → style-BpgFy1wc.css.map} +1 -1
- package/es/brand/LobeChat/index.d.mts +2 -2
- package/es/brand/LobeHub/index.d.mts +2 -2
- package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
- package/es/brand/LogoThree/index.d.mts +2 -2
- package/es/chat/BackBottom/BackBottom.d.mts +2 -2
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
- package/es/chat/ChatItem/ChatItem.d.mts +2 -2
- package/es/chat/ChatList/ChatList.d.mts +2 -2
- package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
- package/es/chat/MessageInput/MessageInput.d.mts +2 -2
- package/es/chat/MessageModal/MessageModal.d.mts +2 -2
- package/es/color/ColorScales/index.d.mts +2 -2
- package/es/i18n/context.d.mts +2 -2
- package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
- package/es/icons/lucideExtra/CreateBotIcon.d.mts +2 -2
- package/es/icons/lucideExtra/DiscordIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GroupBotIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +2 -2
- package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +2 -2
- package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
- package/es/mdx/Mdx/index.d.mts +2 -2
- package/es/mdx/mdxComponents/Citation/index.mjs +1 -1
- package/es/mdx/mdxComponents/Citation/index.mjs.map +1 -1
- package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
- package/es/mobile/TabBar/TabBar.d.mts +2 -2
- package/es/storybook/StoryBook/index.d.mts +2 -2
- package/es/styles/theme/customToken.mjs +1 -1
- package/es/styles/theme/customToken.mjs.map +1 -1
- package/es/styles/theme/generateColorPalette.mjs +1 -1
- package/es/styles/theme/generateColorPalette.mjs.map +1 -1
- package/package.json +2 -2
- package/es/motion/LazyMotion.d.mts +0 -20
- package/es/motion/LazyMotion.mjs +0 -20
- package/es/motion/LazyMotion.mjs.map +0 -1
- package/es/motion/index.d.mts +0 -4
- package/es/motion/index.d.ts +0 -1
- package/es/motion/index.js +0 -1
- package/es/motion/index.mjs +0 -5
- package/es/motion/loadFeatures.d.mts +0 -14
- package/es/motion/loadFeatures.mjs +0 -6
- package/es/motion/loadFeatures.mjs.map +0 -1
package/es/mdx/Mdx/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TypographyProps } from "../../Markdown/type.mjs";
|
|
2
2
|
import "../../Markdown/index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react69 from "react";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import { Pluggable } from "unified";
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ interface MdxProps extends Omit<TypographyProps, 'children'> {
|
|
|
18
18
|
remarkPlugins?: Pluggable[];
|
|
19
19
|
variant?: 'normal' | 'chat';
|
|
20
20
|
}
|
|
21
|
-
declare const Mdx:
|
|
21
|
+
declare const Mdx: react69.NamedExoticComponent<MdxProps>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Mdx, MdxProps };
|
|
24
24
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import PopoverPanel_default from "./PopoverPanel.mjs";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { createStyles } from "antd-style";
|
|
6
|
-
import { isEmpty } from "
|
|
6
|
+
import { isEmpty } from "es-toolkit/compat";
|
|
7
7
|
|
|
8
8
|
//#region src/mdx/mdxComponents/Citation/index.tsx
|
|
9
9
|
const useStyles = createStyles(({ css: css$1 }) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Citation: FC<CitationProps>","PopoverPanel","cx"],"sources":["../../../../src/mdx/mdxComponents/Citation/index.tsx"],"sourcesContent":["'use client';\n\nimport { createStyles } from 'antd-style';\nimport { isEmpty } from '
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Citation: FC<CitationProps>","PopoverPanel","cx"],"sources":["../../../../src/mdx/mdxComponents/Citation/index.tsx"],"sourcesContent":["'use client';\n\nimport { createStyles } from 'antd-style';\nimport { isEmpty } from 'es-toolkit/compat';\nimport type { FC, ReactNode } from 'react';\n\nimport PopoverPanel from '@/mdx/mdxComponents/Citation/PopoverPanel';\nimport { CitationItem } from '@/types/citation';\n\nconst useStyles = createStyles(({ css }) => ({\n container: css`\n display: inline-flex;\n line-height: var(--lobe-markdown-line-height);\n vertical-align: baseline;\n\n a {\n color: inherit;\n }\n `,\n supContainer: css`\n vertical-align: super;\n `,\n}));\n\ninterface CitationProps {\n children?: ReactNode;\n citationDetail?: CitationItem;\n citations?: string[];\n href?: string;\n id: string;\n inSup?: boolean;\n}\n\nconst Citation: FC<CitationProps> = ({ children, href, inSup, id, citationDetail }) => {\n const { styles, cx } = useStyles();\n const usePopover = !isEmpty(citationDetail);\n const url = citationDetail?.url || href;\n\n // [^1] 格式类型\n if (inSup) {\n return (\n <PopoverPanel {...citationDetail} usePopover={usePopover}>\n <span className={styles.container}>\n <a\n aria-describedby=\"footnote-label\"\n data-footnote-ref=\"true\"\n href={url}\n id={id}\n rel=\"noreferrer\"\n target={citationDetail?.url ? '_blank' : undefined}\n >\n {children}\n </a>\n </span>\n </PopoverPanel>\n );\n }\n\n return (\n <PopoverPanel {...citationDetail} usePopover={usePopover}>\n <sup className={cx(styles.container, styles.supContainer)}>\n {url ? (\n <a\n aria-describedby=\"footnote-label\"\n data-footnote-ref={true}\n href={url}\n rel=\"noreferrer\"\n target={'_blank'}\n >\n {children}\n </a>\n ) : (\n <span aria-describedby=\"footnote-label\" data-footnote-ref={true}>\n {children}\n </span>\n )}\n </sup>\n </PopoverPanel>\n );\n};\n\nCitation.displayName = 'MdxCitation';\n\nexport default Citation;\n"],"mappings":";;;;;;;;AASA,MAAM,YAAY,cAAc,EAAE,kBAAW;CAC3C,WAAW,KAAG;;;;;;;;;CASd,cAAc,KAAG;;;CAGlB,EAAE;AAWH,MAAMA,YAA+B,EAAE,UAAU,MAAM,OAAO,IAAI,qBAAqB;CACrF,MAAM,EAAE,QAAQ,aAAO,WAAW;CAClC,MAAM,aAAa,CAAC,QAAQ,eAAe;CAC3C,MAAM,MAAM,gBAAgB,OAAO;AAGnC,KAAI,MACF,QACE,oBAACC;EAAa,GAAI;EAA4B;YAC5C,oBAAC;GAAK,WAAW,OAAO;aACtB,oBAAC;IACC,oBAAiB;IACjB,qBAAkB;IAClB,MAAM;IACF;IACJ,KAAI;IACJ,QAAQ,gBAAgB,MAAM,WAAW;IAExC;KACC;IACC;GACM;AAInB,QACE,oBAACA;EAAa,GAAI;EAA4B;YAC5C,oBAAC;GAAI,WAAWC,KAAG,OAAO,WAAW,OAAO,aAAa;aACtD,MACC,oBAAC;IACC,oBAAiB;IACjB,qBAAmB;IACnB,MAAM;IACN,KAAI;IACJ,QAAQ;IAEP;KACC,GAEJ,oBAAC;IAAK,oBAAiB;IAAiB,qBAAmB;IACxD;KACI;IAEL;GACO;;AAInB,SAAS,cAAc;AAEvB,uBAAe"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChatSendButtonProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react107 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/ChatInputArea/components/ChatSendButton.d.ts
|
|
5
|
-
declare const ChatSendButton:
|
|
5
|
+
declare const ChatSendButton: react107.NamedExoticComponent<ChatSendButtonProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ChatSendButton };
|
|
8
8
|
//# sourceMappingURL=ChatSendButton.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TabBarProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react106 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/TabBar/TabBar.d.ts
|
|
5
|
-
declare const TabBar:
|
|
5
|
+
declare const TabBar: react106.NamedExoticComponent<TabBarProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TabBar };
|
|
8
8
|
//# sourceMappingURL=TabBar.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlexboxProps } from "../../Flex/type.mjs";
|
|
2
2
|
import "../../Flex/index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react1 from "react";
|
|
4
4
|
import { Ref } from "react";
|
|
5
5
|
import { useControls, useCreateStore } from "leva";
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ interface StoryBookProps extends FlexboxProps {
|
|
|
10
10
|
noPadding?: boolean;
|
|
11
11
|
ref?: Ref<HTMLDivElement>;
|
|
12
12
|
}
|
|
13
|
-
declare const StoryBook:
|
|
13
|
+
declare const StoryBook: react1.NamedExoticComponent<StoryBookProps>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { StoryBook, StoryBookProps, useControls, useCreateStore };
|
|
16
16
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customToken.mjs","names":["colorStepPalette: { [key: string]: string }","generateCustomToken: GetCustomToken<LobeCustomToken>","colorCustomToken: any"],"sources":["../../../src/styles/theme/customToken.ts"],"sourcesContent":["import { GetCustomToken } from 'antd-style';\nimport { AliasToken } from 'antd/es/theme/interface';\nimport { camelCase } from '
|
|
1
|
+
{"version":3,"file":"customToken.mjs","names":["colorStepPalette: { [key: string]: string }","generateCustomToken: GetCustomToken<LobeCustomToken>","colorCustomToken: any"],"sources":["../../../src/styles/theme/customToken.ts"],"sourcesContent":["import { GetCustomToken } from 'antd-style';\nimport { AliasToken } from 'antd/es/theme/interface';\nimport { camelCase } from 'es-toolkit/compat';\nimport { mix } from 'polished';\n\nimport { colorScales } from '@/color/colors';\nimport type { ColorScaleItem } from '@/color/types';\nimport type { LobeCustomToken } from '@/types/customToken';\n\nconst generateColorPalette = ({\n name,\n scale,\n appearance,\n}: {\n appearance: 'light' | 'dark';\n name: string;\n scale: ColorScaleItem;\n}) => {\n const isDarkMode = appearance === 'dark';\n return {\n [`${name}Fill`]: scale[`${appearance}A`][isDarkMode ? 3 : 4],\n [`${name}FillSecondary`]: scale[`${appearance}A`][isDarkMode ? 2 : 3],\n [`${name}FillTertiary`]: scale[`${appearance}A`][isDarkMode ? 1 : 2],\n [`${name}FillQuaternary`]: scale[`${appearance}A`][isDarkMode ? 0 : 1],\n [`${name}Bg`]: scale[`${appearance}A`][1],\n [`${name}BgHover`]: scale[`${appearance}A`][2],\n [`${name}Border`]: scale[appearance][4],\n [`${name}BorderSecondary`]: scale[appearance][3],\n [`${name}BorderHover`]: scale[appearance][isDarkMode ? 5 : 3],\n [`${name}Hover`]: scale[appearance][isDarkMode ? 10 : 8],\n [`${name}`]: scale[appearance][9],\n [`${name}Active`]: scale[appearance][isDarkMode ? 7 : 10],\n [`${name}TextHover`]: scale[`${appearance}A`][isDarkMode ? 10 : 8],\n [`${name}Text`]: scale[`${appearance}A`][9],\n [`${name}TextActive`]: scale[`${appearance}A`][isDarkMode ? 7 : 10],\n };\n};\n\nconst generateCustomColorPalette = ({\n name,\n scale,\n appearance,\n}: {\n appearance: 'light' | 'dark';\n name: string;\n scale: ColorScaleItem;\n}): Partial<AliasToken> => {\n const colorStepPalette: { [key: string]: string } = {};\n\n for (const [index, color] of scale[appearance].entries()) {\n if (index === 0 || index === 12) continue;\n\n colorStepPalette[`${name}${index}`] = color;\n }\n for (const [index, color] of scale[`${appearance}A`].entries()) {\n if (index === 0 || index === 12) continue;\n\n colorStepPalette[`${name}${index}A`] = color;\n }\n\n return {\n ...colorStepPalette,\n ...generateColorPalette({ appearance, name, scale }),\n };\n};\n\nexport const generateCustomToken: GetCustomToken<LobeCustomToken> = ({ isDarkMode, token }) => {\n let colorCustomToken: any = {};\n\n for (const [type, scale] of Object.entries(colorScales)) {\n colorCustomToken = {\n ...colorCustomToken,\n ...generateCustomColorPalette({\n appearance: isDarkMode ? 'dark' : 'light',\n name: camelCase(type),\n scale,\n }),\n };\n }\n\n return {\n ...colorCustomToken,\n colorBgContainerSecondary: mix(0.5, token.colorBgLayout, token.colorBgContainer),\n };\n};\n"],"mappings":";;;;;AASA,MAAM,wBAAwB,EAC5B,MACA,OACA,iBAKI;CACJ,MAAM,aAAa,eAAe;AAClC,QAAO;GACJ,GAAG,KAAK,QAAQ,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GACzD,GAAG,KAAK,iBAAiB,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GAClE,GAAG,KAAK,gBAAgB,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GACjE,GAAG,KAAK,kBAAkB,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GACnE,GAAG,KAAK,MAAM,MAAM,GAAG,WAAW,IAAI;GACtC,GAAG,KAAK,WAAW,MAAM,GAAG,WAAW,IAAI;GAC3C,GAAG,KAAK,UAAU,MAAM,YAAY;GACpC,GAAG,KAAK,mBAAmB,MAAM,YAAY;GAC7C,GAAG,KAAK,eAAe,MAAM,YAAY,aAAa,IAAI;GAC1D,GAAG,KAAK,SAAS,MAAM,YAAY,aAAa,KAAK;GACrD,GAAG,SAAS,MAAM,YAAY;GAC9B,GAAG,KAAK,UAAU,MAAM,YAAY,aAAa,IAAI;GACrD,GAAG,KAAK,aAAa,MAAM,GAAG,WAAW,IAAI,aAAa,KAAK;GAC/D,GAAG,KAAK,QAAQ,MAAM,GAAG,WAAW,IAAI;GACxC,GAAG,KAAK,cAAc,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;EACjE;;AAGH,MAAM,8BAA8B,EAClC,MACA,OACA,iBAKyB;CACzB,MAAMA,mBAA8C,EAAE;AAEtD,MAAK,MAAM,CAAC,OAAO,UAAU,MAAM,YAAY,SAAS,EAAE;AACxD,MAAI,UAAU,KAAK,UAAU,GAAI;AAEjC,mBAAiB,GAAG,OAAO,WAAW;;AAExC,MAAK,MAAM,CAAC,OAAO,UAAU,MAAM,GAAG,WAAW,IAAI,SAAS,EAAE;AAC9D,MAAI,UAAU,KAAK,UAAU,GAAI;AAEjC,mBAAiB,GAAG,OAAO,MAAM,MAAM;;AAGzC,QAAO;EACL,GAAG;EACH,GAAG,qBAAqB;GAAE;GAAY;GAAM;GAAO,CAAC;EACrD;;AAGH,MAAaC,uBAAwD,EAAE,YAAY,YAAY;CAC7F,IAAIC,mBAAwB,EAAE;AAE9B,MAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,YAAY,CACrD,oBAAmB;EACjB,GAAG;EACH,GAAG,2BAA2B;GAC5B,YAAY,aAAa,SAAS;GAClC,MAAM,UAAU,KAAK;GACrB;GACD,CAAC;EACH;AAGH,QAAO;EACL,GAAG;EACH,2BAA2B,IAAI,IAAK,MAAM,eAAe,MAAM,iBAAiB;EACjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateColorPalette.mjs","names":[],"sources":["../../../src/styles/theme/generateColorPalette.ts"],"sourcesContent":["import { AliasToken } from 'antd/es/theme/interface';\nimport { capitalize } from '
|
|
1
|
+
{"version":3,"file":"generateColorPalette.mjs","names":[],"sources":["../../../src/styles/theme/generateColorPalette.ts"],"sourcesContent":["import { AliasToken } from 'antd/es/theme/interface';\nimport { capitalize } from 'es-toolkit/compat';\n\nimport type { ColorScaleItem } from '@/color/types';\n\nexport const generateColorPalette = ({\n type,\n scale,\n appearance,\n}: {\n appearance: 'light' | 'dark';\n scale: ColorScaleItem;\n type: 'Primary' | 'Success' | 'Warning' | 'Error' | 'Info' | string;\n}): Partial<AliasToken> => {\n const name = capitalize(type);\n const isDarkMode = appearance === 'dark';\n return {\n [`color${name}Fill`]: scale[`${appearance}A`][isDarkMode ? 3 : 4],\n [`color${name}FillSecondary`]: scale[`${appearance}A`][isDarkMode ? 2 : 3],\n [`color${name}FillTertiary`]: scale[`${appearance}A`][isDarkMode ? 1 : 2],\n [`color${name}FillQuaternary`]: scale[`${appearance}A`][isDarkMode ? 0 : 1],\n [`color${name}Bg`]: scale[appearance][1],\n [`color${name}BgHover`]: scale[appearance][2],\n [`color${name}Border`]: scale[appearance][4],\n [`color${name}BorderHover`]: scale[appearance][isDarkMode ? 5 : 3],\n [`color${name}Hover`]: scale[appearance][isDarkMode ? 10 : 8],\n [`color${name}`]: scale[appearance][9],\n [`color${name}Active`]: scale[appearance][isDarkMode ? 7 : 10],\n [`color${name}TextHover`]: scale[appearance][isDarkMode ? 10 : 8],\n [`color${name}Text`]: scale[appearance][9],\n [`color${name}TextActive`]: scale[appearance][isDarkMode ? 7 : 10],\n };\n};\n\nexport const generateColorNeutralPalette = ({\n scale,\n appearance,\n}: {\n appearance: 'light' | 'dark';\n scale: ColorScaleItem;\n}): Partial<AliasToken> => {\n return {\n colorBgContainer: appearance === 'dark' ? scale[appearance][1] : scale[appearance][0],\n colorBgElevated: appearance === 'dark' ? scale[appearance][2] : scale[appearance][0],\n colorBgLayout: appearance === 'dark' ? scale[appearance][0] : scale[appearance][1],\n colorBgMask: scale.lightA[8],\n colorBgSpotlight: scale[appearance][4],\n colorBorder: scale[appearance][3],\n colorBorderSecondary: scale[appearance][2],\n colorFill: scale[`${appearance}A`][3],\n colorFillQuaternary: scale[`${appearance}A`][0],\n colorFillSecondary: scale[`${appearance}A`][2],\n colorFillTertiary: scale[`${appearance}A`][1],\n colorText: scale[appearance][12],\n colorTextQuaternary: scale[appearance][6],\n colorTextSecondary: scale[appearance][10],\n colorTextTertiary: scale[appearance][8],\n };\n};\n"],"mappings":";;;AAKA,MAAa,wBAAwB,EACnC,MACA,OACA,iBAKyB;CACzB,MAAM,OAAO,WAAW,KAAK;CAC7B,MAAM,aAAa,eAAe;AAClC,QAAO;GACJ,QAAQ,KAAK,QAAQ,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GAC9D,QAAQ,KAAK,iBAAiB,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GACvE,QAAQ,KAAK,gBAAgB,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GACtE,QAAQ,KAAK,kBAAkB,MAAM,GAAG,WAAW,IAAI,aAAa,IAAI;GACxE,QAAQ,KAAK,MAAM,MAAM,YAAY;GACrC,QAAQ,KAAK,WAAW,MAAM,YAAY;GAC1C,QAAQ,KAAK,UAAU,MAAM,YAAY;GACzC,QAAQ,KAAK,eAAe,MAAM,YAAY,aAAa,IAAI;GAC/D,QAAQ,KAAK,SAAS,MAAM,YAAY,aAAa,KAAK;GAC1D,QAAQ,SAAS,MAAM,YAAY;GACnC,QAAQ,KAAK,UAAU,MAAM,YAAY,aAAa,IAAI;GAC1D,QAAQ,KAAK,aAAa,MAAM,YAAY,aAAa,KAAK;GAC9D,QAAQ,KAAK,QAAQ,MAAM,YAAY;GACvC,QAAQ,KAAK,cAAc,MAAM,YAAY,aAAa,IAAI;EAChE;;AAGH,MAAa,+BAA+B,EAC1C,OACA,iBAIyB;AACzB,QAAO;EACL,kBAAkB,eAAe,SAAS,MAAM,YAAY,KAAK,MAAM,YAAY;EACnF,iBAAiB,eAAe,SAAS,MAAM,YAAY,KAAK,MAAM,YAAY;EAClF,eAAe,eAAe,SAAS,MAAM,YAAY,KAAK,MAAM,YAAY;EAChF,aAAa,MAAM,OAAO;EAC1B,kBAAkB,MAAM,YAAY;EACpC,aAAa,MAAM,YAAY;EAC/B,sBAAsB,MAAM,YAAY;EACxC,WAAW,MAAM,GAAG,WAAW,IAAI;EACnC,qBAAqB,MAAM,GAAG,WAAW,IAAI;EAC7C,oBAAoB,MAAM,GAAG,WAAW,IAAI;EAC5C,mBAAmB,MAAM,GAAG,WAAW,IAAI;EAC3C,WAAW,MAAM,YAAY;EAC7B,qBAAqB,MAAM,YAAY;EACvC,oBAAoB,MAAM,YAAY;EACtC,mBAAmB,MAAM,YAAY;EACtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -122,11 +122,11 @@
|
|
|
122
122
|
"class-variance-authority": "^0.7.1",
|
|
123
123
|
"dayjs": "^1.11.19",
|
|
124
124
|
"emoji-mart": "^5.6.0",
|
|
125
|
+
"es-toolkit": "^1.32.0",
|
|
125
126
|
"fast-deep-equal": "^3.1.3",
|
|
126
127
|
"immer": "^11.0.1",
|
|
127
128
|
"katex": "^0.16.27",
|
|
128
129
|
"leva": "^0.10.1",
|
|
129
|
-
"lodash-es": "^4.17.22",
|
|
130
130
|
"lucide-react": "^0.562.0",
|
|
131
131
|
"marked": "^17.0.1",
|
|
132
132
|
"mermaid": "^11.12.2",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as react43 from "react";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import { LazyMotion } from "motion/react";
|
|
4
|
-
|
|
5
|
-
//#region src/motion/LazyMotion.d.ts
|
|
6
|
-
type MotionLazyMotionProps = ComponentProps<typeof LazyMotion>;
|
|
7
|
-
type LobeLazyMotionProps = Omit<MotionLazyMotionProps, 'features'> & {
|
|
8
|
-
/**
|
|
9
|
-
* Optional override for Motion features.
|
|
10
|
-
* Defaults to the shared lazy-loaded `loadFeatures`.
|
|
11
|
-
*/
|
|
12
|
-
features?: MotionLazyMotionProps['features'];
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* A project-wide `LazyMotion` wrapper that provides a shared default `features` loader.
|
|
16
|
-
*/
|
|
17
|
-
declare const LazyMotion$1: react43.NamedExoticComponent<LobeLazyMotionProps>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { LazyMotion$1 as LazyMotion, LobeLazyMotionProps };
|
|
20
|
-
//# sourceMappingURL=LazyMotion.d.mts.map
|
package/es/motion/LazyMotion.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { loadFeatures } from "./loadFeatures.mjs";
|
|
4
|
-
import { memo } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { LazyMotion } from "motion/react";
|
|
7
|
-
|
|
8
|
-
//#region src/motion/LazyMotion.tsx
|
|
9
|
-
/**
|
|
10
|
-
* A project-wide `LazyMotion` wrapper that provides a shared default `features` loader.
|
|
11
|
-
*/
|
|
12
|
-
const LazyMotion$1 = memo(({ features, ...props }) => /* @__PURE__ */ jsx(LazyMotion, {
|
|
13
|
-
features: features ?? loadFeatures,
|
|
14
|
-
...props
|
|
15
|
-
}));
|
|
16
|
-
LazyMotion$1.displayName = "LazyMotion";
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { LazyMotion$1 as LazyMotion };
|
|
20
|
-
//# sourceMappingURL=LazyMotion.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LazyMotion.mjs","names":["LazyMotion","MotionLazyMotion"],"sources":["../../src/motion/LazyMotion.tsx"],"sourcesContent":["'use client';\n\nimport { LazyMotion as MotionLazyMotion } from 'motion/react';\nimport { memo } from 'react';\nimport type { ComponentProps } from 'react';\n\nimport { loadFeatures } from './loadFeatures';\n\ntype MotionLazyMotionProps = ComponentProps<typeof MotionLazyMotion>;\n\nexport type LobeLazyMotionProps = Omit<MotionLazyMotionProps, 'features'> & {\n /**\n * Optional override for Motion features.\n * Defaults to the shared lazy-loaded `loadFeatures`.\n */\n features?: MotionLazyMotionProps['features'];\n};\n\n/**\n * A project-wide `LazyMotion` wrapper that provides a shared default `features` loader.\n */\nexport const LazyMotion = memo<LobeLazyMotionProps>(({ features, ...props }) => (\n <MotionLazyMotion features={features ?? loadFeatures} {...props} />\n));\n\nLazyMotion.displayName = 'LazyMotion';\n"],"mappings":";;;;;;;;;;;AAqBA,MAAaA,eAAa,MAA2B,EAAE,UAAU,GAAG,YAClE,oBAACC;CAAiB,UAAU,YAAY;CAAc,GAAI;EAAS,CACnE;AAEF,aAAW,cAAc"}
|
package/es/motion/index.d.mts
DELETED
package/es/motion/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './index.d.mts';
|
package/es/motion/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './index.mjs';
|
package/es/motion/index.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
2
|
-
import { LazyMotion } from "motion/react";
|
|
3
|
-
|
|
4
|
-
//#region src/motion/loadFeatures.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Shared lazy-loaded Motion features bundle.
|
|
8
|
-
* Using a dynamic import keeps the initial bundle lighter and avoids repeating this logic across components.
|
|
9
|
-
*/
|
|
10
|
-
type MotionLazyMotionProps = ComponentProps<typeof LazyMotion>;
|
|
11
|
-
declare const loadFeatures: MotionLazyMotionProps['features'];
|
|
12
|
-
//#endregion
|
|
13
|
-
export { loadFeatures };
|
|
14
|
-
//# sourceMappingURL=loadFeatures.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadFeatures.mjs","names":["loadFeatures: MotionLazyMotionProps['features']"],"sources":["../../src/motion/loadFeatures.ts"],"sourcesContent":["import { LazyMotion as MotionLazyMotion } from 'motion/react';\nimport type { ComponentProps } from 'react';\n\n/**\n * Shared lazy-loaded Motion features bundle.\n * Using a dynamic import keeps the initial bundle lighter and avoids repeating this logic across components.\n */\ntype MotionLazyMotionProps = ComponentProps<typeof MotionLazyMotion>;\n\nexport const loadFeatures: MotionLazyMotionProps['features'] = () =>\n import('motion/react').then((res) => (res as any).domAnimation);\n"],"mappings":";AASA,MAAaA,qBACX,OAAO,gBAAgB,MAAM,QAAS,IAAY,aAAa"}
|