@lobehub/ui 1.159.0 → 1.161.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 (154) hide show
  1. package/es/A/index.js +2 -2
  2. package/es/ActionIcon/index.d.ts +5 -2
  3. package/es/ActionIcon/index.js +25 -19
  4. package/es/ActionIconGroup/index.js +47 -45
  5. package/es/Alert/index.js +50 -43
  6. package/es/Avatar/index.js +12 -10
  7. package/es/Burger/index.js +35 -30
  8. package/es/CodeEditor/index.js +43 -38
  9. package/es/Collapse/index.js +3 -3
  10. package/es/ColorScales/ScaleRow.js +43 -39
  11. package/es/ColorScales/index.js +59 -57
  12. package/es/ConfigProvider/index.js +5 -3
  13. package/es/ContextMenu/index.js +3 -2
  14. package/es/CopyButton/index.js +4 -3
  15. package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
  16. package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
  17. package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
  18. package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
  19. package/es/DraggablePanel/index.js +32 -25
  20. package/es/EditableText/index.js +16 -13
  21. package/es/EmojiPicker/AvatarUploader.js +71 -60
  22. package/es/EmojiPicker/index.js +110 -101
  23. package/es/EmptyCard/index.js +31 -23
  24. package/es/FileTypeIcon/index.js +55 -44
  25. package/es/FluentEmoji/index.js +6 -4
  26. package/es/Footer/index.js +10 -8
  27. package/es/Form/components/FormDivider.js +2 -2
  28. package/es/Form/components/FormFlatGroup.js +9 -4
  29. package/es/Form/components/FormFooter.js +6 -3
  30. package/es/Form/components/FormGroup.js +21 -15
  31. package/es/Form/components/FormItem.js +17 -10
  32. package/es/Form/components/FormTitle.js +23 -15
  33. package/es/Form/index.js +30 -26
  34. package/es/FormModal/index.js +34 -30
  35. package/es/Grid/index.js +6 -3
  36. package/es/Header/index.js +65 -49
  37. package/es/Highlighter/FullFeatured.js +51 -41
  38. package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
  39. package/es/Highlighter/index.js +29 -19
  40. package/es/Icon/icons/DiscordIcon.js +3 -2
  41. package/es/Icon/index.js +16 -13
  42. package/es/Image/ImageGallery.js +5 -3
  43. package/es/Image/Preview.js +5 -3
  44. package/es/Image/index.js +38 -34
  45. package/es/Image/usePreview.js +37 -33
  46. package/es/Img/index.js +2 -2
  47. package/es/Input/index.js +3 -3
  48. package/es/Layout/index.js +63 -35
  49. package/es/List/ListItem/index.js +67 -53
  50. package/es/Markdown/CodeBlock.js +16 -10
  51. package/es/Markdown/Typography.js +6 -3
  52. package/es/Markdown/index.js +22 -18
  53. package/es/MaterialFileTypeIcon/index.js +20 -17
  54. package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
  55. package/es/Mermaid/FullFeatured.js +45 -35
  56. package/es/Mermaid/index.js +26 -17
  57. package/es/Mermaid/useMermaid.d.ts +1 -2
  58. package/es/Mermaid/useMermaid.js +5 -3
  59. package/es/Modal/index.js +60 -48
  60. package/es/SearchBar/index.js +51 -47
  61. package/es/SelectWithImg/index.js +40 -34
  62. package/es/SideNav/index.js +22 -15
  63. package/es/SliderWithInput/index.js +38 -35
  64. package/es/Snippet/index.js +15 -10
  65. package/es/SortableList/DragHandle.js +3 -3
  66. package/es/SortableList/SortableItem.js +19 -16
  67. package/es/SortableList/SortableOverlay.js +5 -3
  68. package/es/SortableList/index.js +23 -15
  69. package/es/Swatches/index.js +20 -18
  70. package/es/TabsNav/index.js +3 -2
  71. package/es/Tag/index.js +12 -7
  72. package/es/ThemeProvider/Meta.js +58 -53
  73. package/es/ThemeProvider/index.js +23 -17
  74. package/es/ThemeSwitch/index.js +19 -15
  75. package/es/Toc/TocMobile.js +52 -47
  76. package/es/Toc/index.js +13 -8
  77. package/es/Tooltip/index.js +6 -3
  78. package/es/Video/index.js +47 -41
  79. package/es/awesome/AuroraBackground/index.js +18 -11
  80. package/es/awesome/Features/Item.js +45 -37
  81. package/es/awesome/Features/index.js +4 -5
  82. package/es/awesome/GaussianBackground/index.js +13 -8
  83. package/es/awesome/Giscus/index.js +15 -13
  84. package/es/awesome/GradientButton/index.js +9 -5
  85. package/es/awesome/GridBackground/Grid.js +61 -49
  86. package/es/awesome/GridBackground/GridShowcase.js +28 -24
  87. package/es/awesome/GridBackground/index.js +33 -27
  88. package/es/awesome/Hero/index.js +74 -63
  89. package/es/awesome/Spline/ParentSize.js +8 -7
  90. package/es/awesome/Spline/index.js +13 -10
  91. package/es/awesome/Spotlight/index.js +3 -2
  92. package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
  93. package/es/awesome/SpotlightCard/index.js +12 -9
  94. package/es/brand/BrandLoading/index.js +3 -2
  95. package/es/brand/LobeChat/index.js +38 -29
  96. package/es/brand/LobeChatText/index.js +13 -8
  97. package/es/brand/LobeHub/index.js +38 -29
  98. package/es/brand/LobeHubText/index.js +9 -4
  99. package/es/brand/Logo3d/index.js +3 -2
  100. package/es/brand/LogoFlat/index.js +49 -44
  101. package/es/brand/LogoMono/index.js +53 -48
  102. package/es/brand/LogoThree/Loading.js +11 -9
  103. package/es/brand/LogoThree/LogoSpline.js +12 -10
  104. package/es/brand/LogoThree/index.js +25 -23
  105. package/es/brand/components/Divider.js +6 -4
  106. package/es/chat/BackBottom/index.js +6 -4
  107. package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
  108. package/es/chat/ChatHeader/index.js +42 -35
  109. package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
  110. package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
  111. package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
  112. package/es/chat/ChatInputArea/SendButton.js +51 -36
  113. package/es/chat/ChatItem/components/Actions.js +5 -3
  114. package/es/chat/ChatItem/components/Avatar.js +21 -17
  115. package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
  116. package/es/chat/ChatItem/components/ErrorContent.js +11 -9
  117. package/es/chat/ChatItem/components/Loading.js +12 -10
  118. package/es/chat/ChatItem/components/MessageContent.js +10 -6
  119. package/es/chat/ChatItem/components/Title.js +8 -3
  120. package/es/chat/ChatItem/index.js +53 -47
  121. package/es/chat/ChatList/ActionsBar.js +3 -2
  122. package/es/chat/ChatList/HistoryDivider.js +11 -6
  123. package/es/chat/ChatList/Item.js +12 -14
  124. package/es/chat/ChatList/index.js +29 -25
  125. package/es/chat/EditableMessage/index.js +32 -26
  126. package/es/chat/EditableMessageList/index.js +76 -72
  127. package/es/chat/MessageInput/index.js +43 -35
  128. package/es/chat/MessageModal/index.js +51 -41
  129. package/es/chat/TokenTag/index.js +11 -7
  130. package/es/components/ControlInput.js +22 -18
  131. package/es/hooks/useHighlight.d.ts +1 -1
  132. package/es/mdx/Callout/index.js +19 -13
  133. package/es/mdx/Cards/Card.js +59 -46
  134. package/es/mdx/Cards/index.js +6 -3
  135. package/es/mdx/FileTree/File.js +11 -5
  136. package/es/mdx/FileTree/Folder.js +22 -13
  137. package/es/mdx/FileTree/index.js +6 -3
  138. package/es/mdx/Mdx/index.js +9 -7
  139. package/es/mdx/Steps/index.js +6 -3
  140. package/es/mdx/Tabs/Tab.js +8 -3
  141. package/es/mdx/Tabs/index.js +21 -17
  142. package/es/mdx/mdxComponents/CodeBlock.js +14 -9
  143. package/es/mdx/mdxComponents/Image.js +2 -2
  144. package/es/mdx/mdxComponents/Link.js +3 -2
  145. package/es/mdx/mdxComponents/Pre.js +14 -7
  146. package/es/mdx/mdxComponents/Video.js +2 -2
  147. package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
  148. package/es/mobile/MobileChatInputArea/index.js +79 -69
  149. package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
  150. package/es/mobile/MobileNavBar/index.js +48 -41
  151. package/es/mobile/MobileSafeArea/index.js +3 -2
  152. package/es/mobile/MobileTabBar/index.js +35 -29
  153. package/es/storybook/StoryBook/index.js +26 -19
  154. package/package.json +21 -22
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
6
  var _excluded = ["children", "className"];
7
7
  var _templateObject;
8
8
  import { createStyles } from 'antd-style';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  var useStyles = createStyles(function (_ref) {
10
11
  var css = _ref.css,
11
12
  token = _ref.token;
@@ -20,8 +21,10 @@ var FileTree = function FileTree(_ref2) {
20
21
  var _useStyles = useStyles(),
21
22
  cx = _useStyles.cx,
22
23
  styles = _useStyles.styles;
23
- return /*#__PURE__*/React.createElement("div", _extends({
24
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
24
25
  className: cx(styles.container, className)
25
- }, rest), children);
26
+ }, rest), {}, {
27
+ children: children
28
+ }));
26
29
  };
27
30
  export default FileTree;
@@ -2,7 +2,6 @@
2
2
 
3
3
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
4
4
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
- import _extends from "@babel/runtime/helpers/esm/extends";
6
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
6
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
8
7
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
@@ -21,6 +20,7 @@ import { useStyles } from "../../Markdown/style";
21
20
  import { escapeBrackets, escapeMhchem, fixMarkdownBold } from "../../Markdown/utils";
22
21
  import mdxComponents from "../mdxComponents";
23
22
  import CodeBlock from "../mdxComponents/CodeBlock";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
24
  var runtime = process.env.NODE_ENV === 'production' ? jsxRuntime : jsxDevRuntime;
25
25
  var Mdx = /*#__PURE__*/memo(function (_ref) {
26
26
  var children = _ref.children,
@@ -77,7 +77,7 @@ var Mdx = /*#__PURE__*/memo(function (_ref) {
77
77
  var list = {};
78
78
  Object.entries(_objectSpread(_objectSpread({}, mdxComponents), {}, {
79
79
  pre: function pre(props) {
80
- return /*#__PURE__*/React.createElement(CodeBlock, _extends({}, props, {
80
+ return /*#__PURE__*/_jsx(CodeBlock, _objectSpread(_objectSpread({}, props), {}, {
81
81
  enableMermaid: enableMermaid,
82
82
  fullFeatured: fullFeaturedCodeBlock
83
83
  }));
@@ -87,7 +87,7 @@ var Mdx = /*#__PURE__*/memo(function (_ref) {
87
87
  key = _ref3[0],
88
88
  Render = _ref3[1];
89
89
  list[key] = function (props) {
90
- return /*#__PURE__*/React.createElement(Render, props);
90
+ return /*#__PURE__*/_jsx(Render, _objectSpread({}, props));
91
91
  };
92
92
  });
93
93
  return list;
@@ -119,7 +119,7 @@ var Mdx = /*#__PURE__*/memo(function (_ref) {
119
119
  // @ts-ignore
120
120
  setMDXContent(function () {
121
121
  return function () {
122
- return /*#__PURE__*/React.createElement(Alert, {
122
+ return /*#__PURE__*/_jsx(Alert, {
123
123
  description: String(_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message),
124
124
  message: 'Error compiling MDX',
125
125
  style: {
@@ -138,11 +138,13 @@ var Mdx = /*#__PURE__*/memo(function (_ref) {
138
138
  }))();
139
139
  }, [escapedContent, memoRehypePlugins, memoRemarkPlugins]);
140
140
  if (!MDXContent) return fallback;
141
- return /*#__PURE__*/React.createElement(Typography, _extends({
141
+ return /*#__PURE__*/_jsx(Typography, _objectSpread(_objectSpread({
142
142
  className: cx(enableLatex && styles.latex, isChatMode && styles.chat, className),
143
143
  style: style
144
- }, rest), /*#__PURE__*/React.createElement(MDXContent, {
145
- components: memoComponents
144
+ }, rest), {}, {
145
+ children: /*#__PURE__*/_jsx(MDXContent, {
146
+ components: memoComponents
147
+ })
146
148
  }));
147
149
  });
148
150
  export default Mdx;
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
6
  var _excluded = ["children", "className"];
7
7
  var _templateObject;
8
8
  import { createStyles } from 'antd-style';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  var useStyles = createStyles(function (_ref) {
10
11
  var css = _ref.css,
11
12
  token = _ref.token;
@@ -20,8 +21,10 @@ var Steps = function Steps(_ref2) {
20
21
  var _useStyles = useStyles(),
21
22
  cx = _useStyles.cx,
22
23
  styles = _useStyles.styles;
23
- return /*#__PURE__*/React.createElement("div", _extends({
24
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
24
25
  className: cx(styles.container, className)
25
- }, rest), children);
26
+ }, rest), {}, {
27
+ children: children
28
+ }));
26
29
  };
27
30
  export default Steps;
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
6
  var _excluded = ["children", "className"];
7
7
  var _templateObject;
8
8
  import { createStyles } from 'antd-style';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  var useStyles = createStyles(function (_ref) {
10
11
  var css = _ref.css;
11
12
  return {
@@ -19,8 +20,12 @@ var Tab = function Tab(_ref2) {
19
20
  var _useStyles = useStyles(),
20
21
  cx = _useStyles.cx,
21
22
  styles = _useStyles.styles;
22
- return /*#__PURE__*/React.createElement("div", _extends({
23
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
23
24
  className: cx(styles.body, className)
24
- }, rest), /*#__PURE__*/React.createElement("div", null, children));
25
+ }, rest), {}, {
26
+ children: /*#__PURE__*/_jsx("div", {
27
+ children: children
28
+ })
29
+ }));
25
30
  };
26
31
  export default Tab;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
6
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
@@ -11,6 +11,8 @@ import { createStyles } from 'antd-style';
11
11
  import { useState } from 'react';
12
12
  import { Flexbox } from 'react-layout-kit';
13
13
  import TabsNav from "../../TabsNav";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
16
  var useStyles = createStyles(function (_ref) {
15
17
  var css = _ref.css,
16
18
  token = _ref.token,
@@ -40,22 +42,24 @@ var Tabs = function Tabs(_ref2) {
40
42
  cx = _useStyles.cx,
41
43
  styles = _useStyles.styles;
42
44
  var index = Number(activeIndex);
43
- return /*#__PURE__*/React.createElement(Flexbox, _extends({
45
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
44
46
  className: cx(styles.container, className)
45
- }, rest), /*#__PURE__*/React.createElement(TabsNav, _extends({
46
- activeKey: activeIndex,
47
- className: cx(styles.header, tabNavClassName),
48
- items: items.map(function (item, i) {
49
- return {
50
- key: String(i),
51
- label: item
52
- };
53
- }),
54
- onChange: function onChange(v) {
55
- setActiveIndex(v);
56
- _onChange === null || _onChange === void 0 || _onChange(v);
57
- },
58
- variant: 'compact'
59
- }, tabNavRest)), (children === null || children === void 0 ? void 0 : children[index]) || '');
47
+ }, rest), {}, {
48
+ children: [/*#__PURE__*/_jsx(TabsNav, _objectSpread({
49
+ activeKey: activeIndex,
50
+ className: cx(styles.header, tabNavClassName),
51
+ items: items.map(function (item, i) {
52
+ return {
53
+ key: String(i),
54
+ label: item
55
+ };
56
+ }),
57
+ onChange: function onChange(v) {
58
+ setActiveIndex(v);
59
+ _onChange === null || _onChange === void 0 || _onChange(v);
60
+ },
61
+ variant: 'compact'
62
+ }, tabNavRest)), (children === null || children === void 0 ? void 0 : children[index]) || '']
63
+ }));
60
64
  };
61
65
  export default Tabs;
@@ -1,7 +1,8 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import { Pre, PreMermaid, PreSingleLine } from "../mdxComponents/Pre";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
5
6
  var countLines = function countLines(str) {
6
7
  var regex = /\n/g;
7
8
  var matches = str.match(regex);
@@ -29,16 +30,20 @@ var CodeBlock = function CodeBlock(_ref) {
29
30
  mermaid = _ref.mermaid;
30
31
  var code = useCode(children);
31
32
  if (!code) return;
32
- if (enableMermaid && code.lang === 'mermaid') return /*#__PURE__*/React.createElement(PreMermaid, _extends({
33
+ if (enableMermaid && code.lang === 'mermaid') return /*#__PURE__*/_jsx(PreMermaid, _objectSpread(_objectSpread({
33
34
  fullFeatured: fullFeatured
34
- }, mermaid), code.content);
35
- if (code.isSingleLine) return /*#__PURE__*/React.createElement(PreSingleLine, {
36
- language: code.lang
37
- }, code.content);
38
- return /*#__PURE__*/React.createElement(Pre, {
35
+ }, mermaid), {}, {
36
+ children: code.content
37
+ }));
38
+ if (code.isSingleLine) return /*#__PURE__*/_jsx(PreSingleLine, {
39
+ language: code.lang,
40
+ children: code.content
41
+ });
42
+ return /*#__PURE__*/_jsx(Pre, {
39
43
  allowChangeLanguage: false,
40
44
  fullFeatured: fullFeatured,
41
- language: code.lang
42
- }, code.content);
45
+ language: code.lang,
46
+ children: code.content
47
+ });
43
48
  };
44
49
  export default CodeBlock;
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
5
  var _excluded = ["style", "width", "height", "cover", "inStep", "alt"];
7
6
  import LobeImage from "../../Image";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
8
  var Image = function Image(_ref) {
9
9
  var style = _ref.style,
10
10
  _ref$width = _ref.width,
@@ -25,7 +25,7 @@ var Image = function Image(_ref) {
25
25
  height: height,
26
26
  width: width
27
27
  };
28
- return /*#__PURE__*/React.createElement(LobeImage, _extends({
28
+ return /*#__PURE__*/_jsx(LobeImage, _objectSpread({
29
29
  alt: alt,
30
30
  height: size.height,
31
31
  preview: {
@@ -1,13 +1,14 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["href", "target"];
4
4
  import A from "../../A";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
5
6
  var Link = function Link(_ref) {
6
7
  var href = _ref.href,
7
8
  target = _ref.target,
8
9
  rest = _objectWithoutProperties(_ref, _excluded);
9
10
  var isNewWindow = href === null || href === void 0 ? void 0 : href.startsWith('http');
10
- return /*#__PURE__*/React.createElement(A, _extends({
11
+ return /*#__PURE__*/_jsx(A, _objectSpread({
11
12
  href: href,
12
13
  target: target || isNewWindow ? '_blank' : undefined
13
14
  }, rest));
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
6
  var _excluded = ["fullFeatured", "fileName", "allowChangeLanguage", "language", "children", "className", "style", "icon"],
@@ -12,6 +12,7 @@ import Highlighter from "../../Highlighter";
12
12
  import Mermaid from "../../Mermaid";
13
13
  import Snippet from "../../Snippet";
14
14
  import { FALLBACK_LANG } from "../../hooks/useHighlight";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
15
16
  var useStyles = createStyles(function (_ref) {
16
17
  var css = _ref.css;
17
18
  return {
@@ -32,7 +33,7 @@ export var Pre = function Pre(_ref2) {
32
33
  var _useStyles = useStyles(),
33
34
  styles = _useStyles.styles,
34
35
  cx = _useStyles.cx;
35
- return /*#__PURE__*/React.createElement(Highlighter, _extends({
36
+ return /*#__PURE__*/_jsx(Highlighter, _objectSpread(_objectSpread({
36
37
  allowChangeLanguage: allowChangeLanguage,
37
38
  className: cx(styles.container, className),
38
39
  copyButtonSize: {
@@ -45,7 +46,9 @@ export var Pre = function Pre(_ref2) {
45
46
  language: language,
46
47
  style: style,
47
48
  type: "block"
48
- }, rest), children);
49
+ }, rest), {}, {
50
+ children: children
51
+ }));
49
52
  };
50
53
  export var PreSingleLine = function PreSingleLine(_ref3) {
51
54
  var _ref3$language = _ref3.language,
@@ -57,13 +60,15 @@ export var PreSingleLine = function PreSingleLine(_ref3) {
57
60
  var _useStyles2 = useStyles(),
58
61
  cx = _useStyles2.cx,
59
62
  styles = _useStyles2.styles;
60
- return /*#__PURE__*/React.createElement(Snippet, _extends({
63
+ return /*#__PURE__*/_jsx(Snippet, _objectSpread(_objectSpread({
61
64
  className: cx(styles.container, className),
62
65
  "data-code-type": "highlighter",
63
66
  language: language,
64
67
  style: style,
65
68
  type: 'block'
66
- }, rest), children);
69
+ }, rest), {}, {
70
+ children: children
71
+ }));
67
72
  };
68
73
  export var PreMermaid = function PreMermaid(_ref4) {
69
74
  var fullFeatured = _ref4.fullFeatured,
@@ -74,7 +79,7 @@ export var PreMermaid = function PreMermaid(_ref4) {
74
79
  var _useStyles3 = useStyles(),
75
80
  styles = _useStyles3.styles,
76
81
  cx = _useStyles3.cx;
77
- return /*#__PURE__*/React.createElement(Mermaid, _extends({
82
+ return /*#__PURE__*/_jsx(Mermaid, _objectSpread(_objectSpread({
78
83
  className: cx(styles.container, className),
79
84
  copyButtonSize: {
80
85
  blockSize: 28,
@@ -83,6 +88,8 @@ export var PreMermaid = function PreMermaid(_ref4) {
83
88
  fullFeatured: fullFeatured,
84
89
  style: style,
85
90
  type: "block"
86
- }, rest), children);
91
+ }, rest), {}, {
92
+ children: children
93
+ }));
87
94
  };
88
95
  export default Pre;
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
5
  var _excluded = ["style", "width", "height", "cover", "inStep"];
7
6
  import LobeVideo from "../../Video";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
8
  var Video = function Video(_ref) {
9
9
  var style = _ref.style,
10
10
  _ref$width = _ref.width,
@@ -23,7 +23,7 @@ var Video = function Video(_ref) {
23
23
  height: height,
24
24
  width: width
25
25
  };
26
- return /*#__PURE__*/React.createElement(LobeVideo, _extends({
26
+ return /*#__PURE__*/_jsx(LobeVideo, _objectSpread({
27
27
  height: size.height,
28
28
  preview: false,
29
29
  style: _objectSpread({
@@ -1,4 +1,4 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["loading", "onStop", "onSend"];
4
4
  import { useTheme } from 'antd-style';
@@ -6,6 +6,7 @@ import { Loader2, SendHorizontal } from 'lucide-react';
6
6
  import { readableColor } from 'polished';
7
7
  import { memo } from 'react';
8
8
  import ActionIcon from "../../ActionIcon";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  var MobileChatSendButton = /*#__PURE__*/memo(function (_ref) {
10
11
  var loading = _ref.loading,
11
12
  onStop = _ref.onStop,
@@ -16,13 +17,13 @@ var MobileChatSendButton = /*#__PURE__*/memo(function (_ref) {
16
17
  blockSize: 36,
17
18
  fontSize: 16
18
19
  };
19
- return loading ? /*#__PURE__*/React.createElement(ActionIcon, _extends({
20
+ return loading ? /*#__PURE__*/_jsx(ActionIcon, _objectSpread({
20
21
  active: true,
21
22
  icon: Loader2,
22
23
  onClick: onStop,
23
24
  size: size,
24
25
  spin: true
25
- }, rest)) : /*#__PURE__*/React.createElement(ActionIcon, _extends({
26
+ }, rest)) : /*#__PURE__*/_jsx(ActionIcon, _objectSpread({
26
27
  icon: SendHorizontal,
27
28
  onClick: onSend,
28
29
  size: size,
@@ -12,6 +12,8 @@ import { Flexbox } from 'react-layout-kit';
12
12
  import ActionIcon from "../../ActionIcon";
13
13
  import ChatInputAreaInner from "../../chat/ChatInputArea/ChatInputAreaInner";
14
14
  import MobileSafeArea from "../MobileSafeArea";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
15
17
  var useStyles = createStyles(function (_ref) {
16
18
  var css = _ref.css,
17
19
  token = _ref.token;
@@ -58,83 +60,91 @@ var MobileChatInputArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
58
60
  var InnerContainer = useCallback(function (_ref3) {
59
61
  var children = _ref3.children,
60
62
  r = _objectWithoutProperties(_ref3, _excluded);
61
- return expand ? /*#__PURE__*/React.createElement(Flexbox, {
63
+ return expand ? /*#__PURE__*/_jsxs(Flexbox, {
62
64
  className: styles.inner,
63
- gap: 8
64
- }, /*#__PURE__*/React.createElement(Flexbox, {
65
65
  gap: 8,
66
- horizontal: true,
67
- justify: 'flex-end'
68
- }, r.textAreaLeftAddons, r.textAreaRightAddons), children, r.topAddons, r.bottomAddons) : /*#__PURE__*/React.createElement(Flexbox, {
66
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
67
+ gap: 8,
68
+ horizontal: true,
69
+ justify: 'flex-end',
70
+ children: [r.textAreaLeftAddons, r.textAreaRightAddons]
71
+ }), children, r.topAddons, r.bottomAddons]
72
+ }) : /*#__PURE__*/_jsxs(Flexbox, {
69
73
  align: 'flex-end',
70
74
  className: styles.inner,
71
75
  gap: 8,
72
- horizontal: true
73
- }, r.textAreaLeftAddons, children, r.textAreaRightAddons);
76
+ horizontal: true,
77
+ children: [r.textAreaLeftAddons, children, r.textAreaRightAddons]
78
+ });
74
79
  }, [expand, loading]);
75
80
  var showAddons = !expand && !isFocused;
76
- return /*#__PURE__*/React.createElement(Flexbox, {
81
+ return /*#__PURE__*/_jsxs(Flexbox, {
77
82
  className: cx(styles.container, expand && styles.expand, className),
78
83
  gap: 12,
79
- style: style
80
- }, topAddons && /*#__PURE__*/React.createElement(Flexbox, {
81
- style: showAddons ? {} : {
82
- display: 'none'
83
- }
84
- }, topAddons), /*#__PURE__*/React.createElement(Flexbox, {
85
- className: cx(expand && styles.expand),
86
- ref: containerRef,
87
- style: {
88
- position: 'relative'
89
- }
90
- }, showFullscreen && /*#__PURE__*/React.createElement(ActionIcon, {
91
- active: true,
92
- className: styles.expandButton,
93
- icon: expand ? ChevronDown : ChevronUp,
94
- onClick: function onClick() {
95
- return setExpand === null || setExpand === void 0 ? void 0 : setExpand(!expand);
96
- },
97
- size: {
98
- blockSize: 24,
99
- borderRadius: '50%',
100
- fontSize: 14
101
- },
102
- style: expand ? {
103
- top: 6
104
- } : {}
105
- }), /*#__PURE__*/React.createElement(InnerContainer, {
106
- bottomAddons: bottomAddons,
107
- textAreaLeftAddons: textAreaLeftAddons,
108
- textAreaRightAddons: textAreaRightAddons,
109
- topAddons: topAddons
110
- }, /*#__PURE__*/React.createElement(ChatInputAreaInner, {
111
- autoSize: expand ? false : {
112
- maxRows: 6,
113
- minRows: 0
114
- },
115
- className: cx(expand && styles.expandTextArea),
116
- loading: loading,
117
- onBlur: function onBlur() {
118
- return setIsFocused(false);
119
- },
120
- onFocus: function onFocus() {
121
- return setIsFocused(true);
122
- },
123
- onInput: onInput,
124
- onSend: onSend,
125
- ref: ref,
126
- style: {
127
- height: 36,
128
- paddingBlock: 6
129
- },
130
- type: expand ? 'pure' : 'block',
131
- value: value
132
- }))), bottomAddons && /*#__PURE__*/React.createElement(Flexbox, {
133
- style: showAddons ? {} : {
134
- display: 'none'
135
- }
136
- }, bottomAddons), safeArea && !isFocused && /*#__PURE__*/React.createElement(MobileSafeArea, {
137
- position: 'bottom'
138
- }));
84
+ style: style,
85
+ children: [topAddons && /*#__PURE__*/_jsx(Flexbox, {
86
+ style: showAddons ? {} : {
87
+ display: 'none'
88
+ },
89
+ children: topAddons
90
+ }), /*#__PURE__*/_jsxs(Flexbox, {
91
+ className: cx(expand && styles.expand),
92
+ ref: containerRef,
93
+ style: {
94
+ position: 'relative'
95
+ },
96
+ children: [showFullscreen && /*#__PURE__*/_jsx(ActionIcon, {
97
+ active: true,
98
+ className: styles.expandButton,
99
+ icon: expand ? ChevronDown : ChevronUp,
100
+ onClick: function onClick() {
101
+ return setExpand === null || setExpand === void 0 ? void 0 : setExpand(!expand);
102
+ },
103
+ size: {
104
+ blockSize: 24,
105
+ borderRadius: '50%',
106
+ fontSize: 14
107
+ },
108
+ style: expand ? {
109
+ top: 6
110
+ } : {}
111
+ }), /*#__PURE__*/_jsx(InnerContainer, {
112
+ bottomAddons: bottomAddons,
113
+ textAreaLeftAddons: textAreaLeftAddons,
114
+ textAreaRightAddons: textAreaRightAddons,
115
+ topAddons: topAddons,
116
+ children: /*#__PURE__*/_jsx(ChatInputAreaInner, {
117
+ autoSize: expand ? false : {
118
+ maxRows: 6,
119
+ minRows: 0
120
+ },
121
+ className: cx(expand && styles.expandTextArea),
122
+ loading: loading,
123
+ onBlur: function onBlur() {
124
+ return setIsFocused(false);
125
+ },
126
+ onFocus: function onFocus() {
127
+ return setIsFocused(true);
128
+ },
129
+ onInput: onInput,
130
+ onSend: onSend,
131
+ ref: ref,
132
+ style: {
133
+ height: 36,
134
+ paddingBlock: 6
135
+ },
136
+ type: expand ? 'pure' : 'block',
137
+ value: value
138
+ })
139
+ })]
140
+ }), bottomAddons && /*#__PURE__*/_jsx(Flexbox, {
141
+ style: showAddons ? {} : {
142
+ display: 'none'
143
+ },
144
+ children: bottomAddons
145
+ }), safeArea && !isFocused && /*#__PURE__*/_jsx(MobileSafeArea, {
146
+ position: 'bottom'
147
+ })]
148
+ });
139
149
  });
140
150
  export default MobileChatInputArea;