@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.
Files changed (171) hide show
  1. package/README.md +1 -1
  2. package/es/Accordion/Accordion.d.mts +2 -2
  3. package/es/Accordion/AccordionItem.d.mts +2 -2
  4. package/es/Accordion/AccordionItem.mjs +4 -4
  5. package/es/Accordion/AccordionItem.mjs.map +1 -1
  6. package/es/ActionIcon/ActionIcon.d.mts +2 -2
  7. package/es/ActionIcon/components/utils.mjs +1 -1
  8. package/es/ActionIcon/components/utils.mjs.map +1 -1
  9. package/es/Alert/Alert.d.mts +2 -2
  10. package/es/Alert/Alert.mjs +1 -1
  11. package/es/Alert/Alert.mjs.map +1 -1
  12. package/es/AutoComplete/Select.d.mts +2 -2
  13. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  14. package/es/Burger/Burger.d.mts +2 -2
  15. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  16. package/es/Collapse/Collapse.d.mts +2 -2
  17. package/es/ConfigProvider/index.d.mts +2 -2
  18. package/es/CopyButton/CopyButton.d.mts +2 -2
  19. package/es/DatePicker/DatePicker.d.mts +2 -2
  20. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  21. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  22. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  23. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  24. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  25. package/es/Drawer/Drawer.d.mts +2 -2
  26. package/es/Dropdown/Dropdown.d.mts +2 -2
  27. package/es/EditableText/EditableText.d.mts +2 -2
  28. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  29. package/es/Flex/FlexBasic.d.mts +2 -2
  30. package/es/FontLoader/index.d.mts +2 -2
  31. package/es/Footer/Footer.d.mts +2 -2
  32. package/es/Form/Form.mjs +1 -1
  33. package/es/Form/Form.mjs.map +1 -1
  34. package/es/Form/components/FormGroup.d.mts +2 -2
  35. package/es/Form/components/FormGroup.mjs +1 -1
  36. package/es/Form/components/FormGroup.mjs.map +1 -1
  37. package/es/Form/components/FormItem.d.mts +2 -2
  38. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  39. package/es/Form/components/FormSubmitFooter.mjs +3 -3
  40. package/es/Form/components/FormSubmitFooter.mjs.map +1 -1
  41. package/es/Form/components/merge.mjs +1 -1
  42. package/es/Form/components/merge.mjs.map +1 -1
  43. package/es/Form/style.mjs +6 -6
  44. package/es/Form/style.mjs.map +1 -1
  45. package/es/FormModal/FormModal.d.mts +2 -2
  46. package/es/Grid/style.mjs +1 -1
  47. package/es/Grid/style.mjs.map +1 -1
  48. package/es/GuideCard/GuideCard.d.mts +2 -2
  49. package/es/Header/Header.d.mts +2 -2
  50. package/es/Highlighter/Highlighter.d.mts +2 -2
  51. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  52. package/es/Hotkey/Hotkey.d.mts +2 -2
  53. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  54. package/es/HotkeyInput/HotkeyInput.mjs +1 -1
  55. package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
  56. package/es/Icon/Icon.d.mts +2 -2
  57. package/es/Icon/components/IconProvider.d.mts +3 -3
  58. package/es/Icon/components/utils.mjs +1 -1
  59. package/es/Icon/components/utils.mjs.map +1 -1
  60. package/es/Image/PreviewGroup.d.mts +2 -2
  61. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  62. package/es/Input/Input.d.mts +2 -2
  63. package/es/Input/InputOPT.d.mts +2 -2
  64. package/es/Input/InputPassword.d.mts +2 -2
  65. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  66. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  67. package/es/Layout/components/LayoutMain.d.mts +2 -2
  68. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  69. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  70. package/es/Layout/components/LayoutToc.d.mts +2 -2
  71. package/es/List/ListItem/index.d.mts +2 -2
  72. package/es/Markdown/Markdown.d.mts +2 -2
  73. package/es/Markdown/Typography.d.mts +2 -2
  74. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  75. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  76. package/es/Menu/Menu.d.mts +2 -2
  77. package/es/Mermaid/Mermaid.d.mts +2 -2
  78. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  79. package/es/Mermaid/SyntaxMermaid/index.mjs +1 -1
  80. package/es/Mermaid/SyntaxMermaid/index.mjs.map +1 -1
  81. package/es/Modal/Modal.d.mts +2 -2
  82. package/es/MotionProvider/index.d.mts +4 -3
  83. package/es/MotionProvider/index.mjs +2 -2
  84. package/es/MotionProvider/index.mjs.map +1 -1
  85. package/es/SearchBar/SearchBar.d.mts +2 -2
  86. package/es/Segmented/Segmented.d.mts +2 -2
  87. package/es/Select/Select.d.mts +2 -2
  88. package/es/SideNav/SideNav.d.mts +2 -2
  89. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  90. package/es/SliderWithInput/SliderWithInput.mjs +1 -1
  91. package/es/SliderWithInput/SliderWithInput.mjs.map +1 -1
  92. package/es/SortableList/components/DragHandle.d.mts +2 -2
  93. package/es/SortableList/components/SortableItem.d.mts +2 -2
  94. package/es/Tag/utils.mjs +1 -1
  95. package/es/Tag/utils.mjs.map +1 -1
  96. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  97. package/es/ThemeProvider/ThemeProvider.mjs +5 -12
  98. package/es/ThemeProvider/ThemeProvider.mjs.map +1 -1
  99. package/es/ThemeProvider/type.d.mts +0 -4
  100. package/es/Toc/Toc.d.mts +2 -2
  101. package/es/Tooltip/TooltipFloating.mjs +6 -5
  102. package/es/Tooltip/TooltipFloating.mjs.map +1 -1
  103. package/es/Video/index.d.mts +2 -2
  104. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  105. package/es/awesome/Features/Features.d.mts +2 -2
  106. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  107. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  108. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  109. package/es/awesome/GridBackground/GridBackground.mjs +1 -1
  110. package/es/awesome/GridBackground/GridBackground.mjs.map +1 -1
  111. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  112. package/es/awesome/GridBackground/components/Grid.mjs +1 -1
  113. package/es/awesome/GridBackground/components/Grid.mjs.map +1 -1
  114. package/es/awesome/Hero/Hero.d.mts +2 -2
  115. package/es/awesome/Spline/ParentSize.mjs +1 -1
  116. package/es/awesome/Spline/ParentSize.mjs.map +1 -1
  117. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  118. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  119. package/es/awesome/TypewriterEffect/TypewriterEffect.mjs +3 -3
  120. package/es/awesome/TypewriterEffect/TypewriterEffect.mjs.map +1 -1
  121. package/es/brand/BrandLoading/{style-Cof4dJBw.css → style-BpgFy1wc.css} +1 -1
  122. package/es/brand/BrandLoading/{style-Cof4dJBw.css.map → style-BpgFy1wc.css.map} +1 -1
  123. package/es/brand/LobeChat/index.d.mts +2 -2
  124. package/es/brand/LobeHub/index.d.mts +2 -2
  125. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  126. package/es/brand/LogoThree/index.d.mts +2 -2
  127. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  128. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  129. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  130. package/es/chat/ChatList/ChatList.d.mts +2 -2
  131. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  132. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  133. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  134. package/es/color/ColorScales/index.d.mts +2 -2
  135. package/es/i18n/context.d.mts +2 -2
  136. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  137. package/es/icons/lucideExtra/CreateBotIcon.d.mts +2 -2
  138. package/es/icons/lucideExtra/DiscordIcon.d.mts +2 -2
  139. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
  140. package/es/icons/lucideExtra/GroupBotIcon.d.mts +2 -2
  141. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  142. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  143. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  144. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  145. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  146. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  147. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +2 -2
  148. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +2 -2
  149. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  150. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  151. package/es/mdx/Mdx/index.d.mts +2 -2
  152. package/es/mdx/mdxComponents/Citation/index.mjs +1 -1
  153. package/es/mdx/mdxComponents/Citation/index.mjs.map +1 -1
  154. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  155. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  156. package/es/storybook/StoryBook/index.d.mts +2 -2
  157. package/es/styles/theme/customToken.mjs +1 -1
  158. package/es/styles/theme/customToken.mjs.map +1 -1
  159. package/es/styles/theme/generateColorPalette.mjs +1 -1
  160. package/es/styles/theme/generateColorPalette.mjs.map +1 -1
  161. package/package.json +2 -2
  162. package/es/motion/LazyMotion.d.mts +0 -20
  163. package/es/motion/LazyMotion.mjs +0 -20
  164. package/es/motion/LazyMotion.mjs.map +0 -1
  165. package/es/motion/index.d.mts +0 -4
  166. package/es/motion/index.d.ts +0 -1
  167. package/es/motion/index.js +0 -1
  168. package/es/motion/index.mjs +0 -5
  169. package/es/motion/loadFeatures.d.mts +0 -14
  170. package/es/motion/loadFeatures.mjs +0 -6
  171. package/es/motion/loadFeatures.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { TypographyProps } from "../../Markdown/type.mjs";
2
2
  import "../../Markdown/index.mjs";
3
- import * as react46 from "react";
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: react46.NamedExoticComponent<MdxProps>;
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 "lodash-es";
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 'lodash-es';\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
+ {"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 react109 from "react";
2
+ import * as react107 from "react";
3
3
 
4
4
  //#region src/mobile/ChatInputArea/components/ChatSendButton.d.ts
5
- declare const ChatSendButton: react109.NamedExoticComponent<ChatSendButtonProps>;
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 react107 from "react";
2
+ import * as react106 from "react";
3
3
 
4
4
  //#region src/mobile/TabBar/TabBar.d.ts
5
- declare const TabBar: react107.NamedExoticComponent<TabBarProps>;
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 react42 from "react";
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: react42.NamedExoticComponent<StoryBookProps>;
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,5 +1,5 @@
1
1
  import { colorScales } from "../../color/colors/index.mjs";
2
- import { camelCase } from "lodash-es";
2
+ import { camelCase } from "es-toolkit/compat";
3
3
  import { mix } from "polished";
4
4
 
5
5
  //#region src/styles/theme/customToken.ts
@@ -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 'lodash-es';\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
+ {"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,4 +1,4 @@
1
- import { capitalize } from "lodash-es";
1
+ import { capitalize } from "es-toolkit/compat";
2
2
 
3
3
  //#region src/styles/theme/generateColorPalette.ts
4
4
  const generateColorPalette = ({ type, scale, appearance }) => {
@@ -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 'lodash-es';\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"}
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.0",
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
@@ -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"}
@@ -1,4 +0,0 @@
1
- import { LazyMotion, LobeLazyMotionProps } from "./LazyMotion.mjs";
2
- import { loadFeatures } from "./loadFeatures.mjs";
3
- import { AnimatePresence, m } from "motion/react";
4
- export { AnimatePresence, LazyMotion, type LobeLazyMotionProps, loadFeatures, m };
@@ -1 +0,0 @@
1
- export * from './index.d.mts';
@@ -1 +0,0 @@
1
- export * from './index.mjs';
@@ -1,5 +0,0 @@
1
- import { loadFeatures } from "./loadFeatures.mjs";
2
- import { LazyMotion } from "./LazyMotion.mjs";
3
- import { AnimatePresence, m } from "motion/react";
4
-
5
- export { AnimatePresence, LazyMotion, loadFeatures, m };
@@ -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,6 +0,0 @@
1
- //#region src/motion/loadFeatures.ts
2
- const loadFeatures = () => import("motion/react").then((res) => res.domAnimation);
3
-
4
- //#endregion
5
- export { loadFeatures };
6
- //# sourceMappingURL=loadFeatures.mjs.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"}