@lobehub/ui 1.157.0 → 1.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.js +11 -15
  3. package/es/ActionIconGroup/index.js +45 -47
  4. package/es/Alert/index.js +43 -50
  5. package/es/Avatar/index.js +10 -12
  6. package/es/Burger/index.js +30 -35
  7. package/es/CodeEditor/index.js +38 -41
  8. package/es/Collapse/index.js +3 -3
  9. package/es/ColorScales/ScaleRow.js +39 -43
  10. package/es/ColorScales/index.js +57 -59
  11. package/es/ConfigProvider/index.js +3 -5
  12. package/es/ContextMenu/index.js +2 -3
  13. package/es/CopyButton/index.js +3 -4
  14. package/es/DraggablePanel/components/DraggablePanelBody.js +2 -3
  15. package/es/DraggablePanel/components/DraggablePanelContainer.js +2 -3
  16. package/es/DraggablePanel/components/DraggablePanelFooter.js +2 -3
  17. package/es/DraggablePanel/components/DraggablePanelHeader.js +5 -9
  18. package/es/DraggablePanel/index.js +28 -35
  19. package/es/EditableText/index.js +13 -16
  20. package/es/EmojiPicker/AvatarUploader.js +60 -71
  21. package/es/EmojiPicker/index.js +101 -110
  22. package/es/EmptyCard/index.js +23 -31
  23. package/es/FileTypeIcon/index.js +44 -55
  24. package/es/FluentEmoji/index.js +4 -6
  25. package/es/Footer/index.js +8 -10
  26. package/es/Form/components/FormDivider.js +2 -2
  27. package/es/Form/components/FormFlatGroup.js +4 -9
  28. package/es/Form/components/FormFooter.js +3 -6
  29. package/es/Form/components/FormGroup.js +15 -21
  30. package/es/Form/components/FormItem.js +10 -17
  31. package/es/Form/components/FormTitle.js +15 -23
  32. package/es/Form/index.js +26 -30
  33. package/es/FormModal/index.js +30 -34
  34. package/es/Grid/index.js +3 -6
  35. package/es/Header/index.js +49 -65
  36. package/es/Highlighter/FullFeatured.js +41 -51
  37. package/es/Highlighter/SyntaxHighlighter/index.js +19 -30
  38. package/es/Highlighter/index.js +23 -32
  39. package/es/Icon/icons/DiscordIcon.js +2 -3
  40. package/es/Icon/index.js +13 -16
  41. package/es/Image/ImageGallery.js +3 -5
  42. package/es/Image/Preview.js +5 -6
  43. package/es/Image/index.js +34 -38
  44. package/es/Image/usePreview.js +33 -37
  45. package/es/Img/index.js +2 -2
  46. package/es/Input/index.js +3 -3
  47. package/es/Layout/index.js +35 -63
  48. package/es/List/ListItem/index.js +53 -67
  49. package/es/Markdown/CodeBlock.js +10 -16
  50. package/es/Markdown/Typography.js +3 -6
  51. package/es/Markdown/index.js +18 -22
  52. package/es/MaterialFileTypeIcon/index.js +17 -20
  53. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  54. package/es/Mermaid/FullFeatured.js +35 -45
  55. package/es/Mermaid/index.js +17 -26
  56. package/es/Mermaid/useMermaid.d.ts +2 -1
  57. package/es/Mermaid/useMermaid.js +3 -5
  58. package/es/Modal/index.js +48 -60
  59. package/es/SearchBar/index.js +48 -52
  60. package/es/SelectWithImg/index.js +34 -40
  61. package/es/SideNav/index.js +15 -22
  62. package/es/SliderWithInput/index.js +35 -38
  63. package/es/Snippet/index.js +11 -15
  64. package/es/SortableList/DragHandle.js +3 -3
  65. package/es/SortableList/SortableItem.js +16 -19
  66. package/es/SortableList/SortableOverlay.js +3 -5
  67. package/es/SortableList/index.js +15 -23
  68. package/es/Swatches/index.js +18 -20
  69. package/es/TabsNav/index.js +2 -3
  70. package/es/Tag/index.js +7 -12
  71. package/es/ThemeProvider/Meta.js +53 -58
  72. package/es/ThemeProvider/index.js +17 -23
  73. package/es/ThemeSwitch/index.js +15 -19
  74. package/es/Toc/TocMobile.js +47 -52
  75. package/es/Toc/index.js +8 -13
  76. package/es/Tooltip/index.js +2 -3
  77. package/es/Video/index.js +41 -47
  78. package/es/awesome/AuroraBackground/index.js +11 -18
  79. package/es/awesome/Features/Item.js +37 -45
  80. package/es/awesome/Features/index.js +5 -4
  81. package/es/awesome/GaussianBackground/index.js +8 -13
  82. package/es/awesome/GaussianBackground/useGaussianBackground.d.ts +1 -1
  83. package/es/awesome/GaussianBackground/useGaussianBackground.js +1 -1
  84. package/es/awesome/Giscus/index.js +13 -15
  85. package/es/awesome/GradientButton/index.js +5 -9
  86. package/es/awesome/GridBackground/Grid.js +49 -61
  87. package/es/awesome/GridBackground/GridShowcase.js +24 -28
  88. package/es/awesome/GridBackground/index.js +27 -33
  89. package/es/awesome/Hero/index.js +63 -74
  90. package/es/awesome/Spline/ParentSize.js +7 -8
  91. package/es/awesome/Spline/index.js +10 -13
  92. package/es/awesome/Spotlight/index.js +3 -4
  93. package/es/awesome/SpotlightCard/SpotlightCardItem.js +5 -8
  94. package/es/awesome/SpotlightCard/index.js +9 -12
  95. package/es/brand/BrandLoading/index.js +2 -3
  96. package/es/brand/LobeChat/index.js +29 -38
  97. package/es/brand/LobeChatText/index.js +8 -13
  98. package/es/brand/LobeHub/index.js +29 -38
  99. package/es/brand/LobeHubText/index.js +4 -9
  100. package/es/brand/Logo3d/index.js +2 -3
  101. package/es/brand/LogoFlat/index.js +44 -49
  102. package/es/brand/LogoMono/index.js +48 -53
  103. package/es/brand/LogoThree/Loading.js +9 -11
  104. package/es/brand/LogoThree/LogoSpline.js +10 -12
  105. package/es/brand/LogoThree/index.js +23 -25
  106. package/es/brand/components/Divider.js +4 -6
  107. package/es/chat/BackBottom/index.js +4 -6
  108. package/es/chat/ChatHeader/ChatHeaderTitle.js +22 -31
  109. package/es/chat/ChatHeader/index.js +35 -42
  110. package/es/chat/ChatInputArea/ChatInputActionBar.js +16 -21
  111. package/es/chat/ChatInputArea/ChatInputArea.d.ts +1 -1
  112. package/es/chat/ChatInputArea/ChatInputArea.js +19 -23
  113. package/es/chat/ChatInputArea/ChatInputAreaInner.d.ts +1 -1
  114. package/es/chat/ChatInputArea/ChatInputAreaInner.js +2 -3
  115. package/es/chat/ChatInputArea/SendButton.js +36 -51
  116. package/es/chat/ChatItem/components/Actions.js +3 -5
  117. package/es/chat/ChatItem/components/Avatar.js +17 -21
  118. package/es/chat/ChatItem/components/BorderSpacing.js +1 -2
  119. package/es/chat/ChatItem/components/ErrorContent.js +9 -11
  120. package/es/chat/ChatItem/components/Loading.js +10 -12
  121. package/es/chat/ChatItem/components/MessageContent.js +6 -10
  122. package/es/chat/ChatItem/components/Title.js +3 -8
  123. package/es/chat/ChatItem/index.js +47 -53
  124. package/es/chat/ChatList/ActionsBar.js +2 -3
  125. package/es/chat/ChatList/HistoryDivider.js +6 -11
  126. package/es/chat/ChatList/Item.js +14 -12
  127. package/es/chat/ChatList/index.js +25 -29
  128. package/es/chat/EditableMessage/index.js +26 -32
  129. package/es/chat/EditableMessageList/index.js +72 -76
  130. package/es/chat/MessageInput/index.js +35 -43
  131. package/es/chat/MessageModal/index.js +41 -51
  132. package/es/chat/TokenTag/index.js +7 -11
  133. package/es/components/ControlInput.js +18 -22
  134. package/es/hooks/useHighlight.d.ts +1 -1
  135. package/es/mdx/Callout/index.js +13 -19
  136. package/es/mdx/Cards/Card.js +46 -59
  137. package/es/mdx/Cards/index.js +3 -6
  138. package/es/mdx/FileTree/File.js +5 -11
  139. package/es/mdx/FileTree/Folder.js +13 -22
  140. package/es/mdx/FileTree/index.js +3 -6
  141. package/es/mdx/Mdx/index.d.ts +1 -0
  142. package/es/mdx/Mdx/index.js +24 -11
  143. package/es/mdx/Steps/index.js +3 -6
  144. package/es/mdx/Tabs/Tab.js +3 -8
  145. package/es/mdx/Tabs/index.js +17 -21
  146. package/es/mdx/mdxComponents/CodeBlock.js +9 -14
  147. package/es/mdx/mdxComponents/Image.js +2 -2
  148. package/es/mdx/mdxComponents/Link.js +2 -3
  149. package/es/mdx/mdxComponents/Pre.js +7 -14
  150. package/es/mdx/mdxComponents/Video.js +2 -2
  151. package/es/mobile/MobileChatInputArea/SendButton.js +3 -4
  152. package/es/mobile/MobileChatInputArea/index.js +69 -79
  153. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +26 -37
  154. package/es/mobile/MobileNavBar/index.js +41 -48
  155. package/es/mobile/MobileSafeArea/index.js +2 -3
  156. package/es/mobile/MobileTabBar/index.js +29 -35
  157. package/es/storybook/StoryBook/index.js +19 -26
  158. package/package.json +41 -45
@@ -1,14 +1,14 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
4
  var _excluded = ["size", "style"];
4
5
  import { memo } from 'react';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
6
  var Divider = /*#__PURE__*/memo(function (_ref) {
7
7
  var _ref$size = _ref.size,
8
8
  size = _ref$size === void 0 ? '1em' : _ref$size,
9
9
  style = _ref.style,
10
10
  rest = _objectWithoutProperties(_ref, _excluded);
11
- return /*#__PURE__*/_jsx("svg", _objectSpread(_objectSpread({
11
+ return /*#__PURE__*/React.createElement("svg", _extends({
12
12
  fill: "none",
13
13
  height: size,
14
14
  shapeRendering: "geometricPrecision",
@@ -21,10 +21,8 @@ var Divider = /*#__PURE__*/memo(function (_ref) {
21
21
  }, style),
22
22
  viewBox: "0 0 24 24",
23
23
  width: size
24
- }, rest), {}, {
25
- children: /*#__PURE__*/_jsx("path", {
26
- d: "M16.88 3.549L7.12 20.451"
27
- })
24
+ }, rest), /*#__PURE__*/React.createElement("path", {
25
+ d: "M16.88 3.549L7.12 20.451"
28
26
  }));
29
27
  });
30
28
  export default Divider;
@@ -7,7 +7,6 @@ import { ListEnd } from 'lucide-react';
7
7
  import { memo, useEffect, useRef, useState } from 'react';
8
8
  import Icon from "../../Icon";
9
9
  import { useStyles } from "./style";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
10
  var BackBottom = /*#__PURE__*/memo(function (_ref) {
12
11
  var _ref$visibilityHeight = _ref.visibilityHeight,
13
12
  visibilityHeight = _ref$visibilityHeight === void 0 ? 240 : _ref$visibilityHeight,
@@ -42,16 +41,15 @@ var BackBottom = /*#__PURE__*/memo(function (_ref) {
42
41
  });
43
42
  onClick === null || onClick === void 0 || onClick(e);
44
43
  };
45
- return /*#__PURE__*/_jsx(Button, {
44
+ return /*#__PURE__*/React.createElement(Button, {
46
45
  className: cx(styles, className),
47
- icon: /*#__PURE__*/_jsx(Icon, {
46
+ icon: /*#__PURE__*/React.createElement(Icon, {
48
47
  icon: ListEnd
49
48
  }),
50
49
  onClick: scrollToBottom,
51
50
  ref: ref,
52
51
  size: 'small',
53
- style: style,
54
- children: text || 'Back to bottom'
55
- });
52
+ style: style
53
+ }, text || 'Back to bottom');
56
54
  });
57
55
  export default BackBottom;
@@ -3,8 +3,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
3
3
  import { createStyles } from 'antd-style';
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
6
  var useStyles = createStyles(function (_ref) {
9
7
  var css = _ref.css,
10
8
  token = _ref.token;
@@ -23,40 +21,33 @@ var ChatHeaderTitle = /*#__PURE__*/memo(function (_ref2) {
23
21
  tag = _ref2.tag;
24
22
  var _useStyles = useStyles(),
25
23
  styles = _useStyles.styles;
26
- var tagContent = tag && /*#__PURE__*/_jsx(Flexbox, {
24
+ var tagContent = tag && /*#__PURE__*/React.createElement(Flexbox, {
27
25
  align: 'center',
28
26
  className: styles.tag,
29
- horizontal: true,
30
- children: tag
31
- });
32
- if (desc) return /*#__PURE__*/_jsxs(Flexbox, {
27
+ horizontal: true
28
+ }, tag);
29
+ if (desc) return /*#__PURE__*/React.createElement(Flexbox, {
33
30
  className: styles.container,
34
- gap: 4,
35
- children: [/*#__PURE__*/_jsxs(Flexbox, {
36
- align: 'center',
37
- className: styles.titleContainer,
38
- gap: 8,
39
- horizontal: true,
40
- children: [/*#__PURE__*/_jsx("div", {
41
- className: styles.titleWithDesc,
42
- children: title
43
- }), tagContent]
44
- }), /*#__PURE__*/_jsx(Flexbox, {
45
- align: 'center',
46
- className: styles.desc,
47
- horizontal: true,
48
- children: desc
49
- })]
50
- });
51
- return /*#__PURE__*/_jsxs(Flexbox, {
31
+ gap: 4
32
+ }, /*#__PURE__*/React.createElement(Flexbox, {
33
+ align: 'center',
34
+ className: styles.titleContainer,
35
+ gap: 8,
36
+ horizontal: true
37
+ }, /*#__PURE__*/React.createElement("div", {
38
+ className: styles.titleWithDesc
39
+ }, title), tagContent), /*#__PURE__*/React.createElement(Flexbox, {
40
+ align: 'center',
41
+ className: styles.desc,
42
+ horizontal: true
43
+ }, desc));
44
+ return /*#__PURE__*/React.createElement(Flexbox, {
52
45
  align: 'center',
53
46
  className: styles.container,
54
47
  gap: 8,
55
- horizontal: true,
56
- children: [/*#__PURE__*/_jsx("div", {
57
- className: styles.title,
58
- children: title
59
- }), tagContent]
60
- });
48
+ horizontal: true
49
+ }, /*#__PURE__*/React.createElement("div", {
50
+ className: styles.title
51
+ }, title), tagContent);
61
52
  });
62
53
  export default ChatHeaderTitle;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["left", "right", "className", "styles", "gaps", "classNames", "showBackButton", "onBackClick", "children", "gap"];
6
6
  import { ChevronLeft } from 'lucide-react';
@@ -8,8 +8,6 @@ import { memo } from 'react';
8
8
  import { Flexbox } from 'react-layout-kit';
9
9
  import ActionIcon from "../../ActionIcon";
10
10
  import { useStyles } from "./style";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
11
  var ChatHeader = /*#__PURE__*/memo(function (_ref) {
14
12
  var left = _ref.left,
15
13
  right = _ref.right,
@@ -26,50 +24,45 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
26
24
  var _useStyles = useStyles(),
27
25
  cx = _useStyles.cx,
28
26
  styles = _useStyles.styles;
29
- return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
27
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
30
28
  align: 'center',
31
29
  className: cx(styles.container, className),
32
30
  distribution: 'space-between',
33
31
  gap: gap,
34
32
  horizontal: true,
35
33
  paddingInline: 16
36
- }, rest), {}, {
37
- children: [/*#__PURE__*/_jsxs(Flexbox, {
38
- align: 'center',
39
- className: cx(styles.left, classNames === null || classNames === void 0 ? void 0 : classNames.left),
40
- gap: (gaps === null || gaps === void 0 ? void 0 : gaps.left) || 12,
41
- horizontal: true,
42
- justify: 'flex-start',
43
- style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.left,
44
- children: [showBackButton && /*#__PURE__*/_jsx(ActionIcon, {
45
- icon: ChevronLeft,
46
- onClick: function onClick() {
47
- return onBackClick === null || onBackClick === void 0 ? void 0 : onBackClick();
48
- },
49
- size: {
50
- fontSize: 24
51
- },
52
- style: {
53
- marginRight: gaps !== null && gaps !== void 0 && gaps.left ? -gaps.left / 2 : -6
54
- }
55
- }), left]
56
- }), children && /*#__PURE__*/_jsx(Flexbox, {
57
- align: 'center',
58
- className: cx(styles.center, classNames === null || classNames === void 0 ? void 0 : classNames.center),
59
- gap: (gaps === null || gaps === void 0 ? void 0 : gaps.center) || 8,
60
- horizontal: true,
61
- justify: 'center',
62
- style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.center,
63
- children: children
64
- }), /*#__PURE__*/_jsx(Flexbox, {
65
- align: 'center',
66
- className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
67
- gap: (gaps === null || gaps === void 0 ? void 0 : gaps.right) || 8,
68
- horizontal: true,
69
- justify: 'flex-end',
70
- style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right,
71
- children: right
72
- })]
73
- }));
34
+ }, rest), /*#__PURE__*/React.createElement(Flexbox, {
35
+ align: 'center',
36
+ className: cx(styles.left, classNames === null || classNames === void 0 ? void 0 : classNames.left),
37
+ gap: (gaps === null || gaps === void 0 ? void 0 : gaps.left) || 12,
38
+ horizontal: true,
39
+ justify: 'flex-start',
40
+ style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.left
41
+ }, showBackButton && /*#__PURE__*/React.createElement(ActionIcon, {
42
+ icon: ChevronLeft,
43
+ onClick: function onClick() {
44
+ return onBackClick === null || onBackClick === void 0 ? void 0 : onBackClick();
45
+ },
46
+ size: {
47
+ fontSize: 24
48
+ },
49
+ style: {
50
+ marginRight: gaps !== null && gaps !== void 0 && gaps.left ? -gaps.left / 2 : -6
51
+ }
52
+ }), left), children && /*#__PURE__*/React.createElement(Flexbox, {
53
+ align: 'center',
54
+ className: cx(styles.center, classNames === null || classNames === void 0 ? void 0 : classNames.center),
55
+ gap: (gaps === null || gaps === void 0 ? void 0 : gaps.center) || 8,
56
+ horizontal: true,
57
+ justify: 'center',
58
+ style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.center
59
+ }, children), /*#__PURE__*/React.createElement(Flexbox, {
60
+ align: 'center',
61
+ className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
62
+ gap: (gaps === null || gaps === void 0 ? void 0 : gaps.right) || 8,
63
+ horizontal: true,
64
+ justify: 'flex-end',
65
+ style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right
66
+ }, right));
74
67
  });
75
68
  export default ChatHeader;
@@ -3,8 +3,6 @@ var _templateObject, _templateObject2, _templateObject3;
3
3
  import { createStyles, useResponsive } from 'antd-style';
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
6
  var useStyles = createStyles(function (_ref) {
9
7
  var css = _ref.css,
10
8
  cx = _ref.cx,
@@ -24,29 +22,26 @@ var ChatInputActionBar = /*#__PURE__*/memo(function (_ref2) {
24
22
  mobile = _useResponsive.mobile;
25
23
  var _useStyles = useStyles(),
26
24
  styles = _useStyles.styles;
27
- return /*#__PURE__*/_jsxs(Flexbox, {
25
+ return /*#__PURE__*/React.createElement(Flexbox, {
28
26
  align: 'center',
29
27
  className: styles.container,
30
28
  flex: 'none',
31
29
  horizontal: true,
32
30
  justify: 'space-between',
33
- padding: padding,
34
- children: [/*#__PURE__*/_jsx(Flexbox, {
35
- align: 'center',
36
- className: styles.left,
37
- flex: 1,
38
- gap: mobile ? 0 : 4,
39
- horizontal: true,
40
- children: leftAddons
41
- }), /*#__PURE__*/_jsx(Flexbox, {
42
- align: 'center',
43
- className: styles.right,
44
- flex: 0,
45
- gap: mobile ? 0 : 4,
46
- horizontal: true,
47
- justify: 'flex-end',
48
- children: rightAddons
49
- })]
50
- });
31
+ padding: padding
32
+ }, /*#__PURE__*/React.createElement(Flexbox, {
33
+ align: 'center',
34
+ className: styles.left,
35
+ flex: 1,
36
+ gap: mobile ? 0 : 4,
37
+ horizontal: true
38
+ }, leftAddons), /*#__PURE__*/React.createElement(Flexbox, {
39
+ align: 'center',
40
+ className: styles.right,
41
+ flex: 0,
42
+ gap: mobile ? 0 : 4,
43
+ horizontal: true,
44
+ justify: 'flex-end'
45
+ }, rightAddons));
51
46
  });
52
47
  export default ChatInputActionBar;
@@ -16,5 +16,5 @@ export interface ChatInputAreaProps extends Omit<ChatInputAreaInnerProps, 'class
16
16
  setExpand?: (expand: boolean) => void;
17
17
  topAddons?: ReactNode;
18
18
  }
19
- declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ChatInputAreaProps & import("react").RefAttributes<TextAreaRef>>>;
19
+ declare const _default: import("react").NamedExoticComponent<ChatInputAreaProps & import("react").RefAttributes<TextAreaRef>>;
20
20
  export default _default;
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
4
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
@@ -7,8 +8,6 @@ import { createStyles } from 'antd-style';
7
8
  import { forwardRef, memo } from 'react';
8
9
  import DraggablePanel from "../../DraggablePanel";
9
10
  import ChatInputAreaInner from "./ChatInputAreaInner";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- import { jsxs as _jsxs } from "react/jsx-runtime";
12
11
  var useStyles = createStyles(function (_ref) {
13
12
  var css = _ref.css;
14
13
  return {
@@ -32,7 +31,7 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
32
31
  rest = _objectWithoutProperties(_ref2, _excluded);
33
32
  var _useStyles = useStyles(),
34
33
  styles = _useStyles.styles;
35
- return /*#__PURE__*/_jsx(DraggablePanel, {
34
+ return /*#__PURE__*/React.createElement(DraggablePanel, {
36
35
  className: className,
37
36
  classNames: classNames,
38
37
  fullscreen: expand,
@@ -47,25 +46,22 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
47
46
  },
48
47
  style: _objectSpread({
49
48
  zIndex: 10
50
- }, style),
51
- children: /*#__PURE__*/_jsxs("section", {
52
- className: styles.container,
53
- style: {
54
- minHeight: heights === null || heights === void 0 ? void 0 : heights.minHeight
55
- },
56
- children: [topAddons, /*#__PURE__*/_jsx("div", {
57
- className: styles.textareaContainer,
58
- children: /*#__PURE__*/_jsx(ChatInputAreaInner, _objectSpread({
59
- className: styles.textarea,
60
- onSend: function onSend() {
61
- _onSend === null || _onSend === void 0 || _onSend();
62
- setExpand === null || setExpand === void 0 || setExpand(false);
63
- },
64
- ref: ref,
65
- type: 'pure'
66
- }, rest))
67
- }), bottomAddons]
68
- })
69
- });
49
+ }, style)
50
+ }, /*#__PURE__*/React.createElement("section", {
51
+ className: styles.container,
52
+ style: {
53
+ minHeight: heights === null || heights === void 0 ? void 0 : heights.minHeight
54
+ }
55
+ }, topAddons, /*#__PURE__*/React.createElement("div", {
56
+ className: styles.textareaContainer
57
+ }, /*#__PURE__*/React.createElement(ChatInputAreaInner, _extends({
58
+ className: styles.textarea,
59
+ onSend: function onSend() {
60
+ _onSend === null || _onSend === void 0 || _onSend();
61
+ setExpand === null || setExpand === void 0 || setExpand(false);
62
+ },
63
+ ref: ref,
64
+ type: 'pure'
65
+ }, rest))), bottomAddons));
70
66
  });
71
67
  export default /*#__PURE__*/memo(ChatInputArea);
@@ -8,5 +8,5 @@ export interface ChatInputAreaInnerProps extends Omit<TextAreaProps, 'onInput'>
8
8
  onSend?: () => void;
9
9
  style?: CSSProperties;
10
10
  }
11
- declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ChatInputAreaInnerProps & import("react").RefAttributes<TextAreaRef>>>;
11
+ declare const _default: import("react").NamedExoticComponent<ChatInputAreaInnerProps & import("react").RefAttributes<TextAreaRef>>;
12
12
  export default _default;
@@ -1,9 +1,8 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["resize", "onCompositionEnd", "onPressEnter", "onCompositionStart", "className", "onInput", "loading", "onSend", "onBlur", "onChange"];
4
4
  import { forwardRef, memo, useRef } from 'react';
5
5
  import { TextArea } from "../../Input";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
6
  var ChatInputAreaInner = /*#__PURE__*/forwardRef(function (_ref, ref) {
8
7
  var _ref$resize = _ref.resize,
9
8
  resize = _ref$resize === void 0 ? false : _ref$resize,
@@ -18,7 +17,7 @@ var ChatInputAreaInner = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
17
  _onChange = _ref.onChange,
19
18
  rest = _objectWithoutProperties(_ref, _excluded);
20
19
  var isChineseInput = useRef(false);
21
- return /*#__PURE__*/_jsx(TextArea, _objectSpread({
20
+ return /*#__PURE__*/React.createElement(TextArea, _extends({
22
21
  className: className,
23
22
  onBlur: function onBlur(e) {
24
23
  onInput === null || onInput === void 0 || onInput(e.target.value);
@@ -4,8 +4,6 @@ import { ArrowBigUp, CornerDownLeft, Loader2 } from 'lucide-react';
4
4
  import { memo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
  import Icon from "../../Icon";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- import { jsxs as _jsxs } from "react/jsx-runtime";
9
7
  var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
10
8
  var className = _ref.className,
11
9
  style = _ref.style,
@@ -16,7 +14,7 @@ var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
16
14
  loading = _ref.loading,
17
15
  onStop = _ref.onStop;
18
16
  var theme = useTheme();
19
- return /*#__PURE__*/_jsxs(Flexbox, {
17
+ return /*#__PURE__*/React.createElement(Flexbox, {
20
18
  align: 'end',
21
19
  className: className,
22
20
  distribution: 'space-between',
@@ -24,53 +22,40 @@ var ChatSendButton = /*#__PURE__*/memo(function (_ref) {
24
22
  gap: 8,
25
23
  horizontal: true,
26
24
  padding: '0 24px',
27
- style: style,
28
- children: [/*#__PURE__*/_jsx(Flexbox, {
29
- align: 'center',
30
- gap: 8,
31
- horizontal: true,
32
- children: leftAddons
33
- }), /*#__PURE__*/_jsxs(Flexbox, {
34
- align: 'center',
35
- gap: 8,
36
- horizontal: true,
37
- children: [/*#__PURE__*/_jsxs(Flexbox, {
38
- gap: 4,
39
- horizontal: true,
40
- style: {
41
- color: theme.colorTextDescription,
42
- fontSize: 12,
43
- marginRight: 12
44
- },
45
- children: [/*#__PURE__*/_jsx(Icon, {
46
- icon: CornerDownLeft
47
- }), /*#__PURE__*/_jsx("span", {
48
- children: (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'
49
- }), /*#__PURE__*/_jsx("span", {
50
- children: "/"
51
- }), /*#__PURE__*/_jsxs(Flexbox, {
52
- horizontal: true,
53
- children: [/*#__PURE__*/_jsx(Icon, {
54
- icon: ArrowBigUp
55
- }), /*#__PURE__*/_jsx(Icon, {
56
- icon: CornerDownLeft
57
- })]
58
- }), /*#__PURE__*/_jsx("span", {
59
- children: (texts === null || texts === void 0 ? void 0 : texts.warp) || 'Warp'
60
- })]
61
- }), rightAddons, loading ? /*#__PURE__*/_jsx(Button, {
62
- icon: loading && /*#__PURE__*/_jsx(Icon, {
63
- icon: Loader2,
64
- spin: true
65
- }),
66
- onClick: onStop,
67
- children: (texts === null || texts === void 0 ? void 0 : texts.stop) || 'Stop'
68
- }) : /*#__PURE__*/_jsx(Button, {
69
- onClick: onSend,
70
- type: 'primary',
71
- children: (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'
72
- })]
73
- })]
74
- });
25
+ style: style
26
+ }, /*#__PURE__*/React.createElement(Flexbox, {
27
+ align: 'center',
28
+ gap: 8,
29
+ horizontal: true
30
+ }, leftAddons), /*#__PURE__*/React.createElement(Flexbox, {
31
+ align: 'center',
32
+ gap: 8,
33
+ horizontal: true
34
+ }, /*#__PURE__*/React.createElement(Flexbox, {
35
+ gap: 4,
36
+ horizontal: true,
37
+ style: {
38
+ color: theme.colorTextDescription,
39
+ fontSize: 12,
40
+ marginRight: 12
41
+ }
42
+ }, /*#__PURE__*/React.createElement(Icon, {
43
+ icon: CornerDownLeft
44
+ }), /*#__PURE__*/React.createElement("span", null, (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send'), /*#__PURE__*/React.createElement("span", null, "/"), /*#__PURE__*/React.createElement(Flexbox, {
45
+ horizontal: true
46
+ }, /*#__PURE__*/React.createElement(Icon, {
47
+ icon: ArrowBigUp
48
+ }), /*#__PURE__*/React.createElement(Icon, {
49
+ icon: CornerDownLeft
50
+ })), /*#__PURE__*/React.createElement("span", null, (texts === null || texts === void 0 ? void 0 : texts.warp) || 'Warp')), rightAddons, loading ? /*#__PURE__*/React.createElement(Button, {
51
+ icon: loading && /*#__PURE__*/React.createElement(Icon, {
52
+ icon: Loader2,
53
+ spin: true
54
+ }),
55
+ onClick: onStop
56
+ }, (texts === null || texts === void 0 ? void 0 : texts.stop) || 'Stop') : /*#__PURE__*/React.createElement(Button, {
57
+ onClick: onSend,
58
+ type: 'primary'
59
+ }, (texts === null || texts === void 0 ? void 0 : texts.send) || 'Send')));
75
60
  });
76
61
  export default ChatSendButton;
@@ -1,7 +1,6 @@
1
1
  import { memo } from 'react';
2
2
  import { Flexbox } from 'react-layout-kit';
3
3
  import { useStyles } from "../style";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
4
  var Actions = /*#__PURE__*/memo(function (_ref) {
6
5
  var actions = _ref.actions,
7
6
  placement = _ref.placement,
@@ -13,11 +12,10 @@ var Actions = /*#__PURE__*/memo(function (_ref) {
13
12
  type: type
14
13
  }),
15
14
  styles = _useStyles.styles;
16
- return /*#__PURE__*/_jsx(Flexbox, {
15
+ return /*#__PURE__*/React.createElement(Flexbox, {
17
16
  align: 'flex-start',
18
17
  className: styles.actions,
19
- role: "menubar",
20
- children: actions
21
- });
18
+ role: "menubar"
19
+ }, actions);
22
20
  });
23
21
  export default Actions;
@@ -3,8 +3,6 @@ import { Flexbox } from 'react-layout-kit';
3
3
  import A from "../../../Avatar";
4
4
  import { useStyles } from "../style";
5
5
  import Loading from "./Loading";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
6
  var Avatar = /*#__PURE__*/memo(function (_ref) {
9
7
  var loading = _ref.loading,
10
8
  avatar = _ref.avatar,
@@ -18,27 +16,25 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
18
16
  avatarSize: size
19
17
  }),
20
18
  styles = _useStyles.styles;
21
- var avatarContent = /*#__PURE__*/_jsxs("div", {
22
- className: styles.avatarContainer,
23
- children: [/*#__PURE__*/_jsx(A, {
24
- animation: loading,
25
- avatar: avatar.avatar,
26
- background: avatar.backgroundColor,
27
- onClick: onClick,
28
- size: size,
29
- title: avatar.title,
30
- unoptimized: unoptimized
31
- }), /*#__PURE__*/_jsx(Loading, {
32
- loading: loading,
33
- placement: placement
34
- })]
35
- });
19
+ var avatarContent = /*#__PURE__*/React.createElement("div", {
20
+ className: styles.avatarContainer
21
+ }, /*#__PURE__*/React.createElement(A, {
22
+ animation: loading,
23
+ avatar: avatar.avatar,
24
+ background: avatar.backgroundColor,
25
+ onClick: onClick,
26
+ size: size,
27
+ title: avatar.title,
28
+ unoptimized: unoptimized
29
+ }), /*#__PURE__*/React.createElement(Loading, {
30
+ loading: loading,
31
+ placement: placement
32
+ }));
36
33
  if (!addon) return avatarContent;
37
- return /*#__PURE__*/_jsxs(Flexbox, {
34
+ return /*#__PURE__*/React.createElement(Flexbox, {
38
35
  align: 'center',
39
36
  className: styles.avatarGroupContainer,
40
- gap: 8,
41
- children: [avatarContent, addon]
42
- });
37
+ gap: 8
38
+ }, avatarContent, addon);
43
39
  });
44
40
  export default Avatar;
@@ -1,9 +1,8 @@
1
1
  import { memo } from 'react';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
2
  var BorderSpacing = /*#__PURE__*/memo(function (_ref) {
4
3
  var borderSpacing = _ref.borderSpacing;
5
4
  if (!borderSpacing) return null;
6
- return /*#__PURE__*/_jsx("div", {
5
+ return /*#__PURE__*/React.createElement("div", {
7
6
  style: {
8
7
  flex: 'none',
9
8
  width: borderSpacing
@@ -1,9 +1,8 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { memo } from 'react';
3
3
  import { Flexbox } from 'react-layout-kit';
4
4
  import Alert from "../../../Alert";
5
5
  import { useStyles } from "../style";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
6
  var ErrorContent = /*#__PURE__*/memo(function (_ref) {
8
7
  var message = _ref.message,
9
8
  error = _ref.error,
@@ -12,14 +11,13 @@ var ErrorContent = /*#__PURE__*/memo(function (_ref) {
12
11
  placement: placement
13
12
  }),
14
13
  styles = _useStyles.styles;
15
- return /*#__PURE__*/_jsx(Flexbox, {
16
- className: styles.errorContainer,
17
- children: /*#__PURE__*/_jsx(Alert, _objectSpread({
18
- closable: false,
19
- extra: message,
20
- showIcon: true,
21
- type: 'error'
22
- }, error))
23
- });
14
+ return /*#__PURE__*/React.createElement(Flexbox, {
15
+ className: styles.errorContainer
16
+ }, /*#__PURE__*/React.createElement(Alert, _extends({
17
+ closable: false,
18
+ extra: message,
19
+ showIcon: true,
20
+ type: 'error'
21
+ }, error)));
24
22
  });
25
23
  export default ErrorContent;