@lobehub/ui 4.2.0 → 4.2.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 (125) hide show
  1. package/es/Accordion/Accordion.d.mts +2 -2
  2. package/es/Accordion/AccordionItem.d.mts +2 -2
  3. package/es/Accordion/AccordionItem.mjs +161 -93
  4. package/es/Accordion/AccordionItem.mjs.map +1 -1
  5. package/es/Accordion/context.mjs +1 -3
  6. package/es/Accordion/context.mjs.map +1 -1
  7. package/es/Accordion/type.d.mts +17 -0
  8. package/es/ActionIcon/ActionIcon.d.mts +2 -2
  9. package/es/Alert/Alert.d.mts +2 -2
  10. package/es/AutoComplete/Select.d.mts +2 -2
  11. package/es/Avatar/Avatar.mjs +1 -0
  12. package/es/Avatar/Avatar.mjs.map +1 -1
  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/components/FormGroup.d.mts +2 -2
  33. package/es/Form/components/FormItem.d.mts +2 -2
  34. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  35. package/es/FormModal/FormModal.d.mts +2 -2
  36. package/es/GroupAvatar/GroupAvatar.mjs +15 -13
  37. package/es/GroupAvatar/GroupAvatar.mjs.map +1 -1
  38. package/es/GuideCard/GuideCard.d.mts +2 -2
  39. package/es/Header/Header.d.mts +2 -2
  40. package/es/Highlighter/Highlighter.d.mts +2 -2
  41. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  42. package/es/Highlighter/SyntaxHighlighter/index.mjs +7 -0
  43. package/es/Highlighter/SyntaxHighlighter/index.mjs.map +1 -1
  44. package/es/Highlighter/SyntaxHighlighter/style.mjs +17 -1
  45. package/es/Highlighter/SyntaxHighlighter/style.mjs.map +1 -1
  46. package/es/Hotkey/Hotkey.d.mts +2 -2
  47. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  48. package/es/Icon/Icon.d.mts +2 -2
  49. package/es/Icon/components/IconProvider.d.mts +3 -3
  50. package/es/Image/PreviewGroup.d.mts +2 -2
  51. package/es/Input/Input.d.mts +2 -2
  52. package/es/Input/InputNumber.d.mts +2 -2
  53. package/es/Input/InputOPT.d.mts +2 -2
  54. package/es/Input/InputPassword.d.mts +2 -2
  55. package/es/Input/TextArea.d.mts +2 -2
  56. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  57. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  58. package/es/Layout/components/LayoutMain.d.mts +2 -2
  59. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  60. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  61. package/es/Layout/components/LayoutToc.d.mts +2 -2
  62. package/es/List/ListItem/index.d.mts +2 -2
  63. package/es/Markdown/Markdown.d.mts +2 -2
  64. package/es/Markdown/SyntaxMarkdown/style.mjs +9 -8
  65. package/es/Markdown/SyntaxMarkdown/style.mjs.map +1 -1
  66. package/es/Markdown/Typography.d.mts +2 -2
  67. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  68. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  69. package/es/Menu/Menu.d.mts +2 -2
  70. package/es/Mermaid/Mermaid.d.mts +2 -2
  71. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  72. package/es/Modal/Modal.d.mts +2 -2
  73. package/es/MotionProvider/index.d.mts +2 -2
  74. package/es/SearchBar/SearchBar.d.mts +2 -2
  75. package/es/Segmented/Segmented.d.mts +2 -2
  76. package/es/Select/Select.d.mts +2 -2
  77. package/es/SideNav/SideNav.d.mts +2 -2
  78. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  79. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  80. package/es/Toc/Toc.d.mts +2 -2
  81. package/es/Video/index.d.mts +2 -2
  82. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  83. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  84. package/es/awesome/Features/Features.d.mts +2 -2
  85. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  86. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  87. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  88. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  89. package/es/awesome/Hero/Hero.d.mts +2 -2
  90. package/es/awesome/Spline/Spine.d.mts +2 -2
  91. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  92. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  93. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  94. package/es/brand/LobeChat/index.d.mts +2 -2
  95. package/es/brand/LobeHub/index.d.mts +2 -2
  96. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  97. package/es/brand/LogoThree/index.d.mts +2 -2
  98. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  99. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  100. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  101. package/es/chat/ChatList/ChatList.d.mts +2 -2
  102. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  103. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  104. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  105. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  106. package/es/color/ColorScales/index.d.mts +2 -2
  107. package/es/i18n/context.d.mts +2 -2
  108. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  109. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  110. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  111. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  112. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  113. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  114. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  115. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  116. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  117. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  118. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  119. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  120. package/es/mdx/Mdx/index.d.mts +2 -2
  121. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  122. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  123. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  124. package/es/storybook/StoryBook/index.d.mts +2 -2
  125. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react61 from "react";
2
+ import * as react17 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelBody.d.ts
5
5
  type DraggablePanelBodyProps = DivProps;
6
- declare const DraggablePanelBody: react61.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelBody: react17.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { DraggablePanelBody, DraggablePanelBodyProps };
9
9
  //# sourceMappingURL=DraggablePanelBody.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react63 from "react";
2
+ import * as react16 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelContainer.d.ts
5
5
  type DraggablePanelContainerProps = DivProps;
6
- declare const DraggablePanelContainer: react63.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelContainer: react16.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { DraggablePanelContainer, DraggablePanelContainerProps };
9
9
  //# sourceMappingURL=DraggablePanelContainer.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react58 from "react";
2
+ import * as react18 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelFooter.d.ts
5
5
  type DraggablePanelFooterProps = DivProps;
6
- declare const DraggablePanelFooter: react58.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelFooter: react18.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { DraggablePanelFooter, DraggablePanelFooterProps };
9
9
  //# sourceMappingURL=DraggablePanelFooter.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react59 from "react";
2
+ import * as react19 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelHeader.d.ts
5
5
  interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
@@ -9,7 +9,7 @@ interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
9
9
  setPin?: (pin: boolean) => void;
10
10
  title?: string;
11
11
  }
12
- declare const DraggablePanelHeader: react59.NamedExoticComponent<DraggablePanelHeaderProps>;
12
+ declare const DraggablePanelHeader: react19.NamedExoticComponent<DraggablePanelHeaderProps>;
13
13
  //#endregion
14
14
  export { DraggablePanelHeader, DraggablePanelHeaderProps };
15
15
  //# sourceMappingURL=DraggablePanelHeader.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DraggableSideNavProps } from "./type.mjs";
2
- import * as react60 from "react";
2
+ import * as react57 from "react";
3
3
 
4
4
  //#region src/DraggableSideNav/DraggableSideNav.d.ts
5
- declare const DraggableSideNav: react60.NamedExoticComponent<DraggableSideNavProps>;
5
+ declare const DraggableSideNav: react57.NamedExoticComponent<DraggableSideNavProps>;
6
6
  //#endregion
7
7
  export { DraggableSideNav };
8
8
  //# sourceMappingURL=DraggableSideNav.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DrawerProps } from "./type.mjs";
2
- import * as react57 from "react";
2
+ import * as react14 from "react";
3
3
 
4
4
  //#region src/Drawer/Drawer.d.ts
5
- declare const Drawer: react57.NamedExoticComponent<DrawerProps>;
5
+ declare const Drawer: react14.NamedExoticComponent<DrawerProps>;
6
6
  //#endregion
7
7
  export { Drawer };
8
8
  //# sourceMappingURL=Drawer.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DropdownProps } from "./type.mjs";
2
- import * as react52 from "react";
2
+ import * as react15 from "react";
3
3
 
4
4
  //#region src/Dropdown/Dropdown.d.ts
5
- declare const Dropdown: react52.NamedExoticComponent<DropdownProps>;
5
+ declare const Dropdown: react15.NamedExoticComponent<DropdownProps>;
6
6
  //#endregion
7
7
  export { Dropdown };
8
8
  //# sourceMappingURL=Dropdown.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { EditableTextProps } from "./type.mjs";
2
- import * as react3 from "react";
2
+ import * as react13 from "react";
3
3
 
4
4
  //#region src/EditableText/EditableText.d.ts
5
- declare const EditableText: react3.NamedExoticComponent<EditableTextProps>;
5
+ declare const EditableText: react13.NamedExoticComponent<EditableTextProps>;
6
6
  //#endregion
7
7
  export { EditableText };
8
8
  //# sourceMappingURL=EditableText.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { EmojiPickerProps } from "./type.mjs";
2
- import * as react16 from "react";
2
+ import * as react12 from "react";
3
3
 
4
4
  //#region src/EmojiPicker/EmojiPicker.d.ts
5
- declare const EmojiPicker: react16.NamedExoticComponent<EmojiPickerProps>;
5
+ declare const EmojiPicker: react12.NamedExoticComponent<EmojiPickerProps>;
6
6
  //#endregion
7
7
  export { EmojiPicker };
8
8
  //# sourceMappingURL=EmojiPicker.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FlexBasicProps } from "./type.mjs";
2
- import * as react69 from "react";
2
+ import * as react11 from "react";
3
3
 
4
4
  //#region src/Flex/FlexBasic.d.ts
5
- declare const _default: react69.NamedExoticComponent<FlexBasicProps>;
5
+ declare const _default: react11.NamedExoticComponent<FlexBasicProps>;
6
6
  //#endregion
7
7
  export { _default };
8
8
  //# sourceMappingURL=FlexBasic.d.mts.map
@@ -1,10 +1,10 @@
1
- import * as react31 from "react";
1
+ import * as react63 from "react";
2
2
 
3
3
  //#region src/FontLoader/index.d.ts
4
4
  interface FontLoaderProps {
5
5
  url: string;
6
6
  }
7
- declare const FontLoader: react31.NamedExoticComponent<FontLoaderProps>;
7
+ declare const FontLoader: react63.NamedExoticComponent<FontLoaderProps>;
8
8
  //#endregion
9
9
  export { FontLoader, FontLoaderProps };
10
10
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FooterProps } from "./type.mjs";
2
- import * as react2 from "react";
2
+ import * as react10 from "react";
3
3
 
4
4
  //#region src/Footer/Footer.d.ts
5
- declare const Footer: react2.NamedExoticComponent<FooterProps>;
5
+ declare const Footer: react10.NamedExoticComponent<FooterProps>;
6
6
  //#endregion
7
7
  export { Footer };
8
8
  //# sourceMappingURL=Footer.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormGroupProps } from "../type.mjs";
2
- import * as react65 from "react";
2
+ import * as react6 from "react";
3
3
 
4
4
  //#region src/Form/components/FormGroup.d.ts
5
- declare const FormGroup: react65.NamedExoticComponent<FormGroupProps>;
5
+ declare const FormGroup: react6.NamedExoticComponent<FormGroupProps>;
6
6
  //#endregion
7
7
  export { FormGroup };
8
8
  //# sourceMappingURL=FormGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormItemProps } from "../type.mjs";
2
- import * as react64 from "react";
2
+ import * as react8 from "react";
3
3
 
4
4
  //#region src/Form/components/FormItem.d.ts
5
- declare const FormItem: react64.NamedExoticComponent<FormItemProps>;
5
+ declare const FormItem: react8.NamedExoticComponent<FormItemProps>;
6
6
  //#endregion
7
7
  export { FormItem };
8
8
  //# sourceMappingURL=FormItem.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormSubmitFooterProps } from "../type.mjs";
2
- import * as react66 from "react";
2
+ import * as react7 from "react";
3
3
 
4
4
  //#region src/Form/components/FormSubmitFooter.d.ts
5
- declare const FormSubmitFooter: react66.NamedExoticComponent<FormSubmitFooterProps>;
5
+ declare const FormSubmitFooter: react7.NamedExoticComponent<FormSubmitFooterProps>;
6
6
  //#endregion
7
7
  export { FormSubmitFooter };
8
8
  //# sourceMappingURL=FormSubmitFooter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormModalProps } from "./type.mjs";
2
- import * as react68 from "react";
2
+ import * as react9 from "react";
3
3
 
4
4
  //#region src/FormModal/FormModal.d.ts
5
- declare const FormModal: react68.NamedExoticComponent<FormModalProps>;
5
+ declare const FormModal: react9.NamedExoticComponent<FormModalProps>;
6
6
  //#endregion
7
7
  export { FormModal };
8
8
  //# sourceMappingURL=FormModal.d.mts.map
@@ -31,19 +31,21 @@ const GroupAvatar = ({ className, style, avatars = [], size = 32, grid = 2, corn
31
31
  cornerShape
32
32
  ]);
33
33
  const calcAvatars = useMemo(() => avatars?.slice(0, calcSize.gridSize * calcSize.gridSize), [avatars, calcSize.gridSize]);
34
+ const variants = useMemo(() => cva(styles.root, {
35
+ defaultVariants: { cornerShape: "squircle" },
36
+ variants: { cornerShape: {
37
+ circle: styles.circle,
38
+ ios: styles.ios,
39
+ sharp: styles.sharp,
40
+ smooth: styles.smooth,
41
+ square: styles.square,
42
+ squircle: styles.squircle
43
+ } }
44
+ }), [styles]);
45
+ const isSingle = calcAvatars?.length === 1;
34
46
  return /* @__PURE__ */ jsx(Block_default, {
35
47
  align: "center",
36
- className: cx(useMemo(() => cva(styles.root, {
37
- defaultVariants: { cornerShape: "squircle" },
38
- variants: { cornerShape: {
39
- circle: styles.circle,
40
- ios: styles.ios,
41
- sharp: styles.sharp,
42
- smooth: styles.smooth,
43
- square: styles.square,
44
- squircle: styles.squircle
45
- } }
46
- }), [styles])({ cornerShape }), className),
48
+ className: cx(variants({ cornerShape }), className),
47
49
  height: size,
48
50
  justify: "center",
49
51
  style,
@@ -58,12 +60,12 @@ const GroupAvatar = ({ className, style, avatars = [], size = 32, grid = 2, corn
58
60
  if (typeof item === "string") return /* @__PURE__ */ jsx(Avatar_default, {
59
61
  avatar: item,
60
62
  shape: avatarShape,
61
- size: calcSize.avatarSize
63
+ size: isSingle ? size * .8 : calcSize.avatarSize
62
64
  }, index);
63
65
  return /* @__PURE__ */ jsx(Avatar_default, {
64
66
  ...item,
65
67
  shape: avatarShape,
66
- size: calcSize.avatarSize
68
+ size: isSingle ? size * .8 : calcSize.avatarSize
67
69
  }, index);
68
70
  })
69
71
  })
@@ -1 +1 @@
1
- {"version":3,"file":"GroupAvatar.mjs","names":["GroupAvatar: FC<GroupAvatarProps>","Block","Grid","Avatar"],"sources":["../../src/GroupAvatar/GroupAvatar.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { type FC, useMemo } from 'react';\n\nimport Avatar from '@/Avatar';\nimport Block from '@/Block';\nimport Grid from '@/Grid';\n\nimport { useStyles } from './style';\nimport type { GroupAvatarProps } from './type';\n\nconst GroupAvatar: FC<GroupAvatarProps> = ({\n className,\n style,\n avatars = [],\n size = 32,\n grid = 2,\n cornerShape = 'square',\n avatarShape = 'square',\n ...rest\n}) => {\n const { cx, styles } = useStyles();\n\n const calcSize = useMemo(() => {\n const length = avatars.length;\n const isAutoGrid = grid === 'auto';\n const gridSize = isAutoGrid ? (length > 4 ? 3 : 2) : grid;\n const isCircle = cornerShape === 'circle';\n const avatarSize = Math.floor((size / gridSize) * (isCircle ? 0.65 : 0.75));\n const gapSize = Math.floor((size - avatarSize * gridSize) / (isCircle ? 6 : 4));\n\n return {\n avatarSize,\n gapSize,\n gridSize,\n gridWidth: avatarSize * gridSize + gapSize,\n maxItemWidth: avatarSize - 1,\n };\n }, [avatars, grid, size, cornerShape]);\n\n const calcAvatars = useMemo(\n () => avatars?.slice(0, calcSize.gridSize * calcSize.gridSize),\n [avatars, calcSize.gridSize],\n );\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n cornerShape: 'squircle',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n cornerShape: {\n circle: styles.circle,\n ios: styles.ios,\n sharp: styles.sharp,\n smooth: styles.smooth,\n square: styles.square,\n squircle: styles.squircle,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n return (\n <Block\n align={'center'}\n className={cx(variants({ cornerShape }), className)}\n height={size}\n justify={'center'}\n style={style}\n width={size}\n {...rest}\n >\n <Grid\n gap={calcSize.gapSize}\n maxItemWidth={0}\n rows={calcSize.gridSize}\n width={calcSize.gridWidth}\n >\n {calcAvatars.map((item, index) => {\n if (typeof item === 'string')\n return (\n <Avatar avatar={item} key={index} shape={avatarShape} size={calcSize.avatarSize} />\n );\n return <Avatar key={index} {...item} shape={avatarShape} size={calcSize.avatarSize} />;\n })}\n </Grid>\n </Block>\n );\n};\n\nexport default GroupAvatar;\n"],"mappings":";;;;;;;;;;;AAYA,MAAMA,eAAqC,EACzC,WACA,OACA,UAAU,EAAE,EACZ,OAAO,IACP,OAAO,GACP,cAAc,UACd,cAAc,UACd,GAAG,WACC;CACJ,MAAM,EAAE,IAAI,WAAW,WAAW;CAElC,MAAM,WAAW,cAAc;EAC7B,MAAM,SAAS,QAAQ;EAEvB,MAAM,WADa,SAAS,SACG,SAAS,IAAI,IAAI,IAAK;EACrD,MAAM,WAAW,gBAAgB;EACjC,MAAM,aAAa,KAAK,MAAO,OAAO,YAAa,WAAW,MAAO,KAAM;EAC3E,MAAM,UAAU,KAAK,OAAO,OAAO,aAAa,aAAa,WAAW,IAAI,GAAG;AAE/E,SAAO;GACL;GACA;GACA;GACA,WAAW,aAAa,WAAW;GACnC,cAAc,aAAa;GAC5B;IACA;EAAC;EAAS;EAAM;EAAM;EAAY,CAAC;CAEtC,MAAM,cAAc,cACZ,SAAS,MAAM,GAAG,SAAS,WAAW,SAAS,SAAS,EAC9D,CAAC,SAAS,SAAS,SAAS,CAC7B;AAwBD,QACE,oBAACC;EACC,OAAO;EACP,WAAW,GAzBE,cAEb,IAAI,OAAO,MAAM;GACf,iBAAiB,EACf,aAAa,YACd;GAED,UAAU,EACR,aAAa;IACX,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,QAAQ,OAAO;IACf,UAAU,OAAO;IAClB,EACF;GAEF,CAAC,EACJ,CAAC,OAAO,CACT,CAK0B,EAAE,aAAa,CAAC,EAAE,UAAU;EACnD,QAAQ;EACR,SAAS;EACF;EACP,OAAO;EACP,GAAI;YAEJ,oBAACC;GACC,KAAK,SAAS;GACd,cAAc;GACd,MAAM,SAAS;GACf,OAAO,SAAS;aAEf,YAAY,KAAK,MAAM,UAAU;AAChC,QAAI,OAAO,SAAS,SAClB,QACE,oBAACC;KAAO,QAAQ;KAAkB,OAAO;KAAa,MAAM,SAAS;OAA1C,MAAwD;AAEvF,WAAO,oBAACA;KAAmB,GAAI;KAAM,OAAO;KAAa,MAAM,SAAS;OAApD,MAAkE;KACtF;IACG;GACD;;AAIZ,0BAAe"}
1
+ {"version":3,"file":"GroupAvatar.mjs","names":["GroupAvatar: FC<GroupAvatarProps>","Block","Grid","Avatar"],"sources":["../../src/GroupAvatar/GroupAvatar.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { type FC, useMemo } from 'react';\n\nimport Avatar from '@/Avatar';\nimport Block from '@/Block';\nimport Grid from '@/Grid';\n\nimport { useStyles } from './style';\nimport type { GroupAvatarProps } from './type';\n\nconst GroupAvatar: FC<GroupAvatarProps> = ({\n className,\n style,\n avatars = [],\n size = 32,\n grid = 2,\n cornerShape = 'square',\n avatarShape = 'square',\n ...rest\n}) => {\n const { cx, styles } = useStyles();\n\n const calcSize = useMemo(() => {\n const length = avatars.length;\n const isAutoGrid = grid === 'auto';\n const gridSize = isAutoGrid ? (length > 4 ? 3 : 2) : grid;\n const isCircle = cornerShape === 'circle';\n const avatarSize = Math.floor((size / gridSize) * (isCircle ? 0.65 : 0.75));\n const gapSize = Math.floor((size - avatarSize * gridSize) / (isCircle ? 6 : 4));\n\n return {\n avatarSize,\n gapSize,\n gridSize,\n gridWidth: avatarSize * gridSize + gapSize,\n maxItemWidth: avatarSize - 1,\n };\n }, [avatars, grid, size, cornerShape]);\n\n const calcAvatars = useMemo(\n () => avatars?.slice(0, calcSize.gridSize * calcSize.gridSize),\n [avatars, calcSize.gridSize],\n );\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n cornerShape: 'squircle',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n cornerShape: {\n circle: styles.circle,\n ios: styles.ios,\n sharp: styles.sharp,\n smooth: styles.smooth,\n square: styles.square,\n squircle: styles.squircle,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const isSingle = calcAvatars?.length === 1;\n\n return (\n <Block\n align={'center'}\n className={cx(variants({ cornerShape }), className)}\n height={size}\n justify={'center'}\n style={style}\n width={size}\n {...rest}\n >\n <Grid\n gap={calcSize.gapSize}\n maxItemWidth={0}\n rows={calcSize.gridSize}\n width={calcSize.gridWidth}\n >\n {calcAvatars.map((item, index) => {\n if (typeof item === 'string')\n return (\n <Avatar\n avatar={item}\n key={index}\n shape={avatarShape}\n size={isSingle ? size * 0.8 : calcSize.avatarSize}\n />\n );\n return (\n <Avatar\n key={index}\n {...item}\n shape={avatarShape}\n size={isSingle ? size * 0.8 : calcSize.avatarSize}\n />\n );\n })}\n </Grid>\n </Block>\n );\n};\n\nexport default GroupAvatar;\n"],"mappings":";;;;;;;;;;;AAYA,MAAMA,eAAqC,EACzC,WACA,OACA,UAAU,EAAE,EACZ,OAAO,IACP,OAAO,GACP,cAAc,UACd,cAAc,UACd,GAAG,WACC;CACJ,MAAM,EAAE,IAAI,WAAW,WAAW;CAElC,MAAM,WAAW,cAAc;EAC7B,MAAM,SAAS,QAAQ;EAEvB,MAAM,WADa,SAAS,SACG,SAAS,IAAI,IAAI,IAAK;EACrD,MAAM,WAAW,gBAAgB;EACjC,MAAM,aAAa,KAAK,MAAO,OAAO,YAAa,WAAW,MAAO,KAAM;EAC3E,MAAM,UAAU,KAAK,OAAO,OAAO,aAAa,aAAa,WAAW,IAAI,GAAG;AAE/E,SAAO;GACL;GACA;GACA;GACA,WAAW,aAAa,WAAW;GACnC,cAAc,aAAa;GAC5B;IACA;EAAC;EAAS;EAAM;EAAM;EAAY,CAAC;CAEtC,MAAM,cAAc,cACZ,SAAS,MAAM,GAAG,SAAS,WAAW,SAAS,SAAS,EAC9D,CAAC,SAAS,SAAS,SAAS,CAC7B;CAED,MAAM,WAAW,cAEb,IAAI,OAAO,MAAM;EACf,iBAAiB,EACf,aAAa,YACd;EAED,UAAU,EACR,aAAa;GACX,QAAQ,OAAO;GACf,KAAK,OAAO;GACZ,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,QAAQ,OAAO;GACf,UAAU,OAAO;GAClB,EACF;EAEF,CAAC,EACJ,CAAC,OAAO,CACT;CAED,MAAM,WAAW,aAAa,WAAW;AAEzC,QACE,oBAACC;EACC,OAAO;EACP,WAAW,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,UAAU;EACnD,QAAQ;EACR,SAAS;EACF;EACP,OAAO;EACP,GAAI;YAEJ,oBAACC;GACC,KAAK,SAAS;GACd,cAAc;GACd,MAAM,SAAS;GACf,OAAO,SAAS;aAEf,YAAY,KAAK,MAAM,UAAU;AAChC,QAAI,OAAO,SAAS,SAClB,QACE,oBAACC;KACC,QAAQ;KAER,OAAO;KACP,MAAM,WAAW,OAAO,KAAM,SAAS;OAFlC,MAGL;AAEN,WACE,oBAACA;KAEC,GAAI;KACJ,OAAO;KACP,MAAM,WAAW,OAAO,KAAM,SAAS;OAHlC,MAIL;KAEJ;IACG;GACD;;AAIZ,0BAAe"}
@@ -1,8 +1,8 @@
1
1
  import { GuideCardProps } from "./type.mjs";
2
- import * as react128 from "react";
2
+ import * as react114 from "react";
3
3
 
4
4
  //#region src/GuideCard/GuideCard.d.ts
5
- declare const GuideCard: react128.NamedExoticComponent<GuideCardProps>;
5
+ declare const GuideCard: react114.NamedExoticComponent<GuideCardProps>;
6
6
  //#endregion
7
7
  export { GuideCard };
8
8
  //# sourceMappingURL=GuideCard.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HeaderProps } from "./type.mjs";
2
- import * as react25 from "react";
2
+ import * as react5 from "react";
3
3
 
4
4
  //#region src/Header/Header.d.ts
5
- declare const Header: react25.NamedExoticComponent<HeaderProps>;
5
+ declare const Header: react5.NamedExoticComponent<HeaderProps>;
6
6
  //#endregion
7
7
  export { Header };
8
8
  //# sourceMappingURL=Header.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HighlighterProps } from "./type.mjs";
2
- import * as react9 from "react";
2
+ import * as react3 from "react";
3
3
 
4
4
  //#region src/Highlighter/Highlighter.d.ts
5
- declare const Highlighter: react9.NamedExoticComponent<HighlighterProps>;
5
+ declare const Highlighter: react3.NamedExoticComponent<HighlighterProps>;
6
6
  //#endregion
7
7
  export { Highlighter };
8
8
  //# sourceMappingURL=Highlighter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SyntaxHighlighterProps } from "../type.mjs";
2
- import * as react10 from "react";
2
+ import * as react4 from "react";
3
3
 
4
4
  //#region src/Highlighter/SyntaxHighlighter/index.d.ts
5
- declare const SyntaxHighlighter: react10.NamedExoticComponent<SyntaxHighlighterProps>;
5
+ declare const SyntaxHighlighter: react4.NamedExoticComponent<SyntaxHighlighterProps>;
6
6
  //#endregion
7
7
  export { SyntaxHighlighter };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -15,6 +15,7 @@ const SyntaxHighlighter = memo(({ animated, children, className, enableTransform
15
15
  const resolvedTheme = isDefaultTheme ? void 0 : theme;
16
16
  const variants = useMemo(() => cva(styles.root, {
17
17
  defaultVariants: {
18
+ animated: false,
18
19
  shiki: true,
19
20
  showBackground: false,
20
21
  variant: "borderless"
@@ -32,15 +33,21 @@ const SyntaxHighlighter = memo(({ animated, children, className, enableTransform
32
33
  showBackground: {
33
34
  false: styles.noBackground,
34
35
  true: null
36
+ },
37
+ animated: {
38
+ true: styles.animated,
39
+ false: null
35
40
  }
36
41
  }
37
42
  }), [styles]);
38
43
  const shikiClassName = cx(variants({
44
+ animated,
39
45
  shiki: true,
40
46
  showBackground,
41
47
  variant
42
48
  }), className);
43
49
  const fallbackClassName = cx(variants({
50
+ animated,
44
51
  shiki: false,
45
52
  showBackground,
46
53
  variant
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["StreamRenderer","StaticRenderer"],"sources":["../../../src/Highlighter/SyntaxHighlighter/index.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { memo, useMemo } from 'react';\n\nimport type { SyntaxHighlighterProps } from '../type';\nimport StaticRenderer from './StaticRenderer';\nimport StreamRenderer from './StreamRenderer';\nimport { useStyles } from './style';\n\nconst SyntaxHighlighter = memo<SyntaxHighlighterProps>(\n ({\n animated,\n children,\n className,\n enableTransformer,\n language,\n style,\n theme,\n variant = 'borderless',\n }) => {\n const { styles, cx } = useStyles();\n const isDefaultTheme = theme === 'lobe-theme' || !theme;\n const showBackground = !isDefaultTheme && variant === 'filled';\n const resolvedTheme = isDefaultTheme ? undefined : theme;\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n shiki: true,\n showBackground: false,\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n shiki: {\n false: styles.unshiki,\n true: styles.shiki,\n },\n variant: {\n filled: styles.padding,\n outlined: styles.padding,\n borderless: styles.noPadding,\n },\n showBackground: {\n false: styles.noBackground,\n true: null,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const shikiClassName = cx(variants({ shiki: true, showBackground, variant }), className);\n const fallbackClassName = cx(variants({ shiki: false, showBackground, variant }), className);\n\n if (animated) {\n return (\n <StreamRenderer\n className={shikiClassName}\n enableTransformer={enableTransformer}\n fallbackClassName={fallbackClassName}\n language={language}\n style={style}\n theme={resolvedTheme}\n >\n {children}\n </StreamRenderer>\n );\n }\n\n return (\n <StaticRenderer\n className={shikiClassName}\n enableTransformer={enableTransformer}\n fallbackClassName={fallbackClassName}\n language={language}\n style={style}\n theme={resolvedTheme}\n >\n {children}\n </StaticRenderer>\n );\n },\n (prevProps, nextProps) =>\n prevProps.children === nextProps.children && prevProps.language === nextProps.language,\n);\n\nSyntaxHighlighter.displayName = 'SyntaxHighlighter';\n\nexport default SyntaxHighlighter;\n"],"mappings":";;;;;;;;;;AAUA,MAAM,oBAAoB,MACvB,EACC,UACA,UACA,WACA,mBACA,UACA,OACA,OACA,UAAU,mBACN;CACJ,MAAM,EAAE,QAAQ,OAAO,WAAW;CAClC,MAAM,iBAAiB,UAAU,gBAAgB,CAAC;CAClD,MAAM,iBAAiB,CAAC,kBAAkB,YAAY;CACtD,MAAM,gBAAgB,iBAAiB,SAAY;CAEnD,MAAM,WAAW,cAEb,IAAI,OAAO,MAAM;EACf,iBAAiB;GACf,OAAO;GACP,gBAAgB;GAChB,SAAS;GACV;EAED,UAAU;GACR,OAAO;IACL,OAAO,OAAO;IACd,MAAM,OAAO;IACd;GACD,SAAS;IACP,QAAQ,OAAO;IACf,UAAU,OAAO;IACjB,YAAY,OAAO;IACpB;GACD,gBAAgB;IACd,OAAO,OAAO;IACd,MAAM;IACP;GACF;EAEF,CAAC,EACJ,CAAC,OAAO,CACT;CAED,MAAM,iBAAiB,GAAG,SAAS;EAAE,OAAO;EAAM;EAAgB;EAAS,CAAC,EAAE,UAAU;CACxF,MAAM,oBAAoB,GAAG,SAAS;EAAE,OAAO;EAAO;EAAgB;EAAS,CAAC,EAAE,UAAU;AAE5F,KAAI,SACF,QACE,oBAACA;EACC,WAAW;EACQ;EACA;EACT;EACH;EACP,OAAO;EAEN;GACc;AAIrB,QACE,oBAACC;EACC,WAAW;EACQ;EACA;EACT;EACH;EACP,OAAO;EAEN;GACc;IAGpB,WAAW,cACV,UAAU,aAAa,UAAU,YAAY,UAAU,aAAa,UAAU,SACjF;AAED,kBAAkB,cAAc;AAEhC,gCAAe"}
1
+ {"version":3,"file":"index.mjs","names":["StreamRenderer","StaticRenderer"],"sources":["../../../src/Highlighter/SyntaxHighlighter/index.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { memo, useMemo } from 'react';\n\nimport type { SyntaxHighlighterProps } from '../type';\nimport StaticRenderer from './StaticRenderer';\nimport StreamRenderer from './StreamRenderer';\nimport { useStyles } from './style';\n\nconst SyntaxHighlighter = memo<SyntaxHighlighterProps>(\n ({\n animated,\n children,\n className,\n enableTransformer,\n language,\n style,\n theme,\n variant = 'borderless',\n }) => {\n const { styles, cx } = useStyles();\n const isDefaultTheme = theme === 'lobe-theme' || !theme;\n const showBackground = !isDefaultTheme && variant === 'filled';\n const resolvedTheme = isDefaultTheme ? undefined : theme;\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n animated: false,\n shiki: true,\n showBackground: false,\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n shiki: {\n false: styles.unshiki,\n true: styles.shiki,\n },\n variant: {\n filled: styles.padding,\n outlined: styles.padding,\n borderless: styles.noPadding,\n },\n showBackground: {\n false: styles.noBackground,\n true: null,\n },\n animated: {\n true: styles.animated,\n false: null,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const shikiClassName = cx(\n variants({ animated, shiki: true, showBackground, variant }),\n className,\n );\n const fallbackClassName = cx(\n variants({ animated, shiki: false, showBackground, variant }),\n className,\n );\n\n if (animated) {\n return (\n <StreamRenderer\n className={shikiClassName}\n enableTransformer={enableTransformer}\n fallbackClassName={fallbackClassName}\n language={language}\n style={style}\n theme={resolvedTheme}\n >\n {children}\n </StreamRenderer>\n );\n }\n\n return (\n <StaticRenderer\n className={shikiClassName}\n enableTransformer={enableTransformer}\n fallbackClassName={fallbackClassName}\n language={language}\n style={style}\n theme={resolvedTheme}\n >\n {children}\n </StaticRenderer>\n );\n },\n (prevProps, nextProps) =>\n prevProps.children === nextProps.children && prevProps.language === nextProps.language,\n);\n\nSyntaxHighlighter.displayName = 'SyntaxHighlighter';\n\nexport default SyntaxHighlighter;\n"],"mappings":";;;;;;;;;;AAUA,MAAM,oBAAoB,MACvB,EACC,UACA,UACA,WACA,mBACA,UACA,OACA,OACA,UAAU,mBACN;CACJ,MAAM,EAAE,QAAQ,OAAO,WAAW;CAClC,MAAM,iBAAiB,UAAU,gBAAgB,CAAC;CAClD,MAAM,iBAAiB,CAAC,kBAAkB,YAAY;CACtD,MAAM,gBAAgB,iBAAiB,SAAY;CAEnD,MAAM,WAAW,cAEb,IAAI,OAAO,MAAM;EACf,iBAAiB;GACf,UAAU;GACV,OAAO;GACP,gBAAgB;GAChB,SAAS;GACV;EAED,UAAU;GACR,OAAO;IACL,OAAO,OAAO;IACd,MAAM,OAAO;IACd;GACD,SAAS;IACP,QAAQ,OAAO;IACf,UAAU,OAAO;IACjB,YAAY,OAAO;IACpB;GACD,gBAAgB;IACd,OAAO,OAAO;IACd,MAAM;IACP;GACD,UAAU;IACR,MAAM,OAAO;IACb,OAAO;IACR;GACF;EAEF,CAAC,EACJ,CAAC,OAAO,CACT;CAED,MAAM,iBAAiB,GACrB,SAAS;EAAE;EAAU,OAAO;EAAM;EAAgB;EAAS,CAAC,EAC5D,UACD;CACD,MAAM,oBAAoB,GACxB,SAAS;EAAE;EAAU,OAAO;EAAO;EAAgB;EAAS,CAAC,EAC7D,UACD;AAED,KAAI,SACF,QACE,oBAACA;EACC,WAAW;EACQ;EACA;EACT;EACH;EACP,OAAO;EAEN;GACc;AAIrB,QACE,oBAACC;EACC,WAAW;EACQ;EACA;EACT;EACH;EACP,OAAO;EAEN;GACc;IAGpB,WAAW,cACV,UAAU,aAAa,UAAU,YAAY,UAAU,aAAa,UAAU,SACjF;AAED,kBAAkB,cAAc;AAEhC,gCAAe"}
@@ -1,8 +1,24 @@
1
- import { createStyles } from "antd-style";
1
+ import { createStyles, keyframes } from "antd-style";
2
2
 
3
3
  //#region src/Highlighter/SyntaxHighlighter/style.ts
4
+ const fadeIn = keyframes`
5
+ 0% {
6
+ opacity: 0;
7
+ }
8
+ 100% {
9
+ opacity: 1;
10
+ }
11
+ `;
4
12
  const useStyles = createStyles(({ css: css$1, token, cx: cx$1, prefixCls }) => {
5
13
  return {
14
+ animated: css$1`
15
+ .animate-fade-in,
16
+ span.line > span,
17
+ code:not(:has(span.line)) {
18
+ opacity: 1;
19
+ animation: ${fadeIn} 1s ease-in-out;
20
+ }
21
+ `,
6
22
  noBackground: css$1`
7
23
  pre {
8
24
  background: transparent !important;
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":["cx"],"sources":["../../../src/Highlighter/SyntaxHighlighter/style.ts"],"sourcesContent":["import { createStyles } from 'antd-style';\n\nexport const useStyles = createStyles(({ css, token, cx, prefixCls }) => {\n return {\n noBackground: css`\n pre {\n background: transparent !important;\n }\n `,\n\n noPadding: css`\n pre {\n padding: 0;\n }\n `,\n\n padding: css`\n pre {\n padding: 16px;\n }\n `,\n root: css`\n direction: ltr;\n margin: 0;\n padding: 0;\n text-align: start;\n\n pre {\n overflow-x: auto;\n margin: 0;\n padding: 0;\n }\n `,\n shiki: cx(\n `${prefixCls}-highlighter-shiki`,\n css`\n pre {\n code {\n display: block;\n\n .line {\n display: inline-block;\n\n width: calc(100% + 32px);\n margin-block: 0;\n margin-inline: -16px;\n padding-block: 0;\n padding-inline: 16px;\n }\n }\n\n &.has-focused {\n .line:not(.focused) {\n opacity: 0.5;\n }\n }\n\n .highlighted {\n background: ${token.colorFillTertiary};\n\n &.warning {\n background: ${token.colorWarningBg};\n }\n\n &.error {\n background: ${token.colorErrorBg};\n }\n }\n\n .highlighted-word {\n padding-block: 0.1em;\n padding-inline: 0.2em;\n border: 1px solid ${token.colorBorderSecondary};\n border-radius: ${token.borderRadius}px;\n\n background: ${token.colorFillTertiary};\n }\n\n .diff {\n &.remove {\n background: ${token.colorErrorBg};\n\n &::before {\n content: '-';\n\n position: absolute;\n inset-inline-start: 4px;\n\n display: inline-block;\n\n color: ${token.colorErrorText};\n }\n }\n\n &.add {\n background: ${token.colorSuccessBg};\n\n &::before {\n content: '+';\n\n position: absolute;\n inset-inline-start: 4px;\n\n display: inline-block;\n\n color: ${token.colorSuccessText};\n }\n }\n }\n }\n `,\n ),\n unshiki: css`\n color: ${token.colorTextDescription};\n `,\n };\n});\n"],"mappings":";;;AAEA,MAAa,YAAY,cAAc,EAAE,YAAK,OAAO,UAAI,gBAAgB;AACvE,QAAO;EACL,cAAc,KAAG;;;;;EAMjB,WAAW,KAAG;;;;;EAMd,SAAS,KAAG;;;;;EAKZ,MAAM,KAAG;;;;;;;;;;;;EAYT,OAAOA,KACL,GAAG,UAAU,qBACb,KAAG;;;;;;;;;;;;;;;;;;;;;;;0BAuBiB,MAAM,kBAAkB;;;4BAGtB,MAAM,eAAe;;;;4BAIrB,MAAM,aAAa;;;;;;;gCAOf,MAAM,qBAAqB;6BAC9B,MAAM,aAAa;;0BAEtB,MAAM,kBAAkB;;;;;4BAKtB,MAAM,aAAa;;;;;;;;;;yBAUtB,MAAM,eAAe;;;;;4BAKlB,MAAM,eAAe;;;;;;;;;;yBAUxB,MAAM,iBAAiB;;;;;QAM3C;EACD,SAAS,KAAG;eACD,MAAM,qBAAqB;;EAEvC;EACD"}
1
+ {"version":3,"file":"style.mjs","names":["cx"],"sources":["../../../src/Highlighter/SyntaxHighlighter/style.ts"],"sourcesContent":["import { createStyles, keyframes } from 'antd-style';\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n `;\n\nexport const useStyles = createStyles(({ css, token, cx, prefixCls }) => {\n return {\n animated: css`\n .animate-fade-in,\n span.line > span,\n code:not(:has(span.line)) {\n opacity: 1;\n animation: ${fadeIn} 1s ease-in-out;\n }\n `,\n\n noBackground: css`\n pre {\n background: transparent !important;\n }\n `,\n\n noPadding: css`\n pre {\n padding: 0;\n }\n `,\n\n padding: css`\n pre {\n padding: 16px;\n }\n `,\n root: css`\n direction: ltr;\n margin: 0;\n padding: 0;\n text-align: start;\n\n pre {\n overflow-x: auto;\n margin: 0;\n padding: 0;\n }\n `,\n shiki: cx(\n `${prefixCls}-highlighter-shiki`,\n css`\n pre {\n code {\n display: block;\n\n .line {\n display: inline-block;\n\n width: calc(100% + 32px);\n margin-block: 0;\n margin-inline: -16px;\n padding-block: 0;\n padding-inline: 16px;\n }\n }\n\n &.has-focused {\n .line:not(.focused) {\n opacity: 0.5;\n }\n }\n\n .highlighted {\n background: ${token.colorFillTertiary};\n\n &.warning {\n background: ${token.colorWarningBg};\n }\n\n &.error {\n background: ${token.colorErrorBg};\n }\n }\n\n .highlighted-word {\n padding-block: 0.1em;\n padding-inline: 0.2em;\n border: 1px solid ${token.colorBorderSecondary};\n border-radius: ${token.borderRadius}px;\n\n background: ${token.colorFillTertiary};\n }\n\n .diff {\n &.remove {\n background: ${token.colorErrorBg};\n\n &::before {\n content: '-';\n\n position: absolute;\n inset-inline-start: 4px;\n\n display: inline-block;\n\n color: ${token.colorErrorText};\n }\n }\n\n &.add {\n background: ${token.colorSuccessBg};\n\n &::before {\n content: '+';\n\n position: absolute;\n inset-inline-start: 4px;\n\n display: inline-block;\n\n color: ${token.colorSuccessText};\n }\n }\n }\n }\n `,\n ),\n unshiki: css`\n color: ${token.colorTextDescription};\n `,\n };\n});\n"],"mappings":";;;AAEA,MAAM,SAAS,SAAS;;;;;;;;AASxB,MAAa,YAAY,cAAc,EAAE,YAAK,OAAO,UAAI,gBAAgB;AACvE,QAAO;EACL,UAAU,KAAG;;;;;qBAKI,OAAO;;;EAIxB,cAAc,KAAG;;;;;EAMjB,WAAW,KAAG;;;;;EAMd,SAAS,KAAG;;;;;EAKZ,MAAM,KAAG;;;;;;;;;;;;EAYT,OAAOA,KACL,GAAG,UAAU,qBACb,KAAG;;;;;;;;;;;;;;;;;;;;;;;0BAuBiB,MAAM,kBAAkB;;;4BAGtB,MAAM,eAAe;;;;4BAIrB,MAAM,aAAa;;;;;;;gCAOf,MAAM,qBAAqB;6BAC9B,MAAM,aAAa;;0BAEtB,MAAM,kBAAkB;;;;;4BAKtB,MAAM,aAAa;;;;;;;;;;yBAUtB,MAAM,eAAe;;;;;4BAKlB,MAAM,eAAe;;;;;;;;;;yBAUxB,MAAM,iBAAiB;;;;;QAM3C;EACD,SAAS,KAAG;eACD,MAAM,qBAAqB;;EAEvC;EACD"}
@@ -1,8 +1,8 @@
1
1
  import { HotkeyProps } from "./type.mjs";
2
- import * as react15 from "react";
2
+ import * as react26 from "react";
3
3
 
4
4
  //#region src/Hotkey/Hotkey.d.ts
5
- declare const Hotkey: react15.NamedExoticComponent<HotkeyProps>;
5
+ declare const Hotkey: react26.NamedExoticComponent<HotkeyProps>;
6
6
  //#endregion
7
7
  export { Hotkey };
8
8
  //# sourceMappingURL=Hotkey.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HotkeyInputProps } from "./type.mjs";
2
- import * as react62 from "react";
2
+ import * as react66 from "react";
3
3
 
4
4
  //#region src/HotkeyInput/HotkeyInput.d.ts
5
- declare const HotkeyInput: react62.NamedExoticComponent<HotkeyInputProps>;
5
+ declare const HotkeyInput: react66.NamedExoticComponent<HotkeyInputProps>;
6
6
  //#endregion
7
7
  export { HotkeyInput };
8
8
  //# sourceMappingURL=HotkeyInput.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { IconProps } from "./type.mjs";
2
- import * as react56 from "react";
2
+ import * as react1 from "react";
3
3
 
4
4
  //#region src/Icon/Icon.d.ts
5
- declare const Icon: react56.NamedExoticComponent<IconProps>;
5
+ declare const Icon: react1.NamedExoticComponent<IconProps>;
6
6
  //#endregion
7
7
  export { Icon };
8
8
  //# sourceMappingURL=Icon.d.mts.map
@@ -1,11 +1,11 @@
1
1
  import { IconProps } from "../type.mjs";
2
- import * as react54 from "react";
2
+ import * as react0 from "react";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/Icon/components/IconProvider.d.ts
6
6
  type IconContentConfig = Omit<IconProps, 'icon' | 'ref'>;
7
- declare const IconContext: react54.Context<IconContentConfig>;
8
- declare const IconProvider: react54.NamedExoticComponent<{
7
+ declare const IconContext: react0.Context<IconContentConfig>;
8
+ declare const IconProvider: react0.NamedExoticComponent<{
9
9
  children: ReactNode;
10
10
  config?: IconContentConfig;
11
11
  }>;
@@ -1,8 +1,8 @@
1
1
  import { PreviewGroupProps } from "./type.mjs";
2
- import * as react53 from "react";
2
+ import * as react2 from "react";
3
3
 
4
4
  //#region src/Image/PreviewGroup.d.ts
5
- declare const PreviewGroup: react53.NamedExoticComponent<PreviewGroupProps>;
5
+ declare const PreviewGroup: react2.NamedExoticComponent<PreviewGroupProps>;
6
6
  //#endregion
7
7
  export { PreviewGroup };
8
8
  //# sourceMappingURL=PreviewGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputProps } from "./type.mjs";
2
- import * as react133 from "react";
2
+ import * as react115 from "react";
3
3
 
4
4
  //#region src/Input/Input.d.ts
5
- declare const Input: react133.NamedExoticComponent<InputProps>;
5
+ declare const Input: react115.NamedExoticComponent<InputProps>;
6
6
  //#endregion
7
7
  export { Input };
8
8
  //# sourceMappingURL=Input.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputNumberProps } from "./type.mjs";
2
- import * as react132 from "react";
2
+ import * as react116 from "react";
3
3
 
4
4
  //#region src/Input/InputNumber.d.ts
5
- declare const InputNumber: react132.NamedExoticComponent<InputNumberProps>;
5
+ declare const InputNumber: react116.NamedExoticComponent<InputNumberProps>;
6
6
  //#endregion
7
7
  export { InputNumber };
8
8
  //# sourceMappingURL=InputNumber.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputOPTProps } from "./type.mjs";
2
- import * as react129 from "react";
2
+ import * as react117 from "react";
3
3
 
4
4
  //#region src/Input/InputOPT.d.ts
5
- declare const InputOPT: react129.NamedExoticComponent<InputOPTProps>;
5
+ declare const InputOPT: react117.NamedExoticComponent<InputOPTProps>;
6
6
  //#endregion
7
7
  export { InputOPT };
8
8
  //# sourceMappingURL=InputOPT.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { InputPasswordProps } from "./type.mjs";
2
- import * as react130 from "react";
2
+ import * as react118 from "react";
3
3
 
4
4
  //#region src/Input/InputPassword.d.ts
5
- declare const InputPassword: react130.NamedExoticComponent<InputPasswordProps>;
5
+ declare const InputPassword: react118.NamedExoticComponent<InputPasswordProps>;
6
6
  //#endregion
7
7
  export { InputPassword };
8
8
  //# sourceMappingURL=InputPassword.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { TextAreaProps } from "./type.mjs";
2
- import * as react131 from "react";
2
+ import * as react119 from "react";
3
3
 
4
4
  //#region src/Input/TextArea.d.ts
5
- declare const TextArea: react131.NamedExoticComponent<TextAreaProps>;
5
+ declare const TextArea: react119.NamedExoticComponent<TextAreaProps>;
6
6
  //#endregion
7
7
  export { TextArea };
8
8
  //# sourceMappingURL=TextArea.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
2
  import "../../index.mjs";
3
- import * as react46 from "react";
3
+ import * as react51 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutFooter.d.ts
6
- declare const LayoutFooter: react46.NamedExoticComponent<DivProps>;
6
+ declare const LayoutFooter: react51.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { LayoutFooter };
9
9
  //# sourceMappingURL=LayoutFooter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutHeaderProps } from "../type.mjs";
2
- import * as react47 from "react";
2
+ import * as react52 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutHeader.d.ts
5
- declare const LayoutHeader: react47.NamedExoticComponent<LayoutHeaderProps>;
5
+ declare const LayoutHeader: react52.NamedExoticComponent<LayoutHeaderProps>;
6
6
  //#endregion
7
7
  export { LayoutHeader };
8
8
  //# sourceMappingURL=LayoutHeader.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
2
  import "../../index.mjs";
3
- import * as react48 from "react";
3
+ import * as react53 from "react";
4
4
 
5
5
  //#region src/Layout/components/LayoutMain.d.ts
6
- declare const LayoutMain: react48.NamedExoticComponent<DivProps>;
6
+ declare const LayoutMain: react53.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { LayoutMain };
9
9
  //# sourceMappingURL=LayoutMain.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutSidebarProps } from "../type.mjs";
2
- import * as react49 from "react";
2
+ import * as react54 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebar.d.ts
5
- declare const LayoutSidebar: react49.NamedExoticComponent<LayoutSidebarProps>;
5
+ declare const LayoutSidebar: react54.NamedExoticComponent<LayoutSidebarProps>;
6
6
  //#endregion
7
7
  export { LayoutSidebar };
8
8
  //# sourceMappingURL=LayoutSidebar.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutSidebarInnerProps } from "../type.mjs";
2
- import * as react50 from "react";
2
+ import * as react55 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutSidebarInner.d.ts
5
- declare const LayoutSidebarInner: react50.NamedExoticComponent<LayoutSidebarInnerProps>;
5
+ declare const LayoutSidebarInner: react55.NamedExoticComponent<LayoutSidebarInnerProps>;
6
6
  //#endregion
7
7
  export { LayoutSidebarInner };
8
8
  //# sourceMappingURL=LayoutSidebarInner.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { LayoutTocProps } from "../type.mjs";
2
- import * as react51 from "react";
2
+ import * as react56 from "react";
3
3
 
4
4
  //#region src/Layout/components/LayoutToc.d.ts
5
- declare const LayoutToc: react51.NamedExoticComponent<LayoutTocProps>;
5
+ declare const LayoutToc: react56.NamedExoticComponent<LayoutTocProps>;
6
6
  //#endregion
7
7
  export { LayoutToc };
8
8
  //# sourceMappingURL=LayoutToc.d.mts.map