@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.
- package/es/A/index.js +2 -2
- package/es/ActionIcon/index.d.ts +5 -2
- package/es/ActionIcon/index.js +25 -19
- package/es/ActionIconGroup/index.js +47 -45
- package/es/Alert/index.js +50 -43
- package/es/Avatar/index.js +12 -10
- package/es/Burger/index.js +35 -30
- package/es/CodeEditor/index.js +43 -38
- package/es/Collapse/index.js +3 -3
- package/es/ColorScales/ScaleRow.js +43 -39
- package/es/ColorScales/index.js +59 -57
- package/es/ConfigProvider/index.js +5 -3
- package/es/ContextMenu/index.js +3 -2
- package/es/CopyButton/index.js +4 -3
- package/es/DraggablePanel/components/DraggablePanelBody.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.js +3 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.js +9 -5
- package/es/DraggablePanel/index.js +32 -25
- package/es/EditableText/index.js +16 -13
- package/es/EmojiPicker/AvatarUploader.js +71 -60
- package/es/EmojiPicker/index.js +110 -101
- package/es/EmptyCard/index.js +31 -23
- package/es/FileTypeIcon/index.js +55 -44
- package/es/FluentEmoji/index.js +6 -4
- package/es/Footer/index.js +10 -8
- package/es/Form/components/FormDivider.js +2 -2
- package/es/Form/components/FormFlatGroup.js +9 -4
- package/es/Form/components/FormFooter.js +6 -3
- package/es/Form/components/FormGroup.js +21 -15
- package/es/Form/components/FormItem.js +17 -10
- package/es/Form/components/FormTitle.js +23 -15
- package/es/Form/index.js +30 -26
- package/es/FormModal/index.js +34 -30
- package/es/Grid/index.js +6 -3
- package/es/Header/index.js +65 -49
- package/es/Highlighter/FullFeatured.js +51 -41
- package/es/Highlighter/SyntaxHighlighter/index.js +30 -19
- package/es/Highlighter/index.js +29 -19
- package/es/Icon/icons/DiscordIcon.js +3 -2
- package/es/Icon/index.js +16 -13
- package/es/Image/ImageGallery.js +5 -3
- package/es/Image/Preview.js +5 -3
- package/es/Image/index.js +38 -34
- package/es/Image/usePreview.js +37 -33
- package/es/Img/index.js +2 -2
- package/es/Input/index.js +3 -3
- package/es/Layout/index.js +63 -35
- package/es/List/ListItem/index.js +67 -53
- package/es/Markdown/CodeBlock.js +16 -10
- package/es/Markdown/Typography.js +6 -3
- package/es/Markdown/index.js +22 -18
- package/es/MaterialFileTypeIcon/index.js +20 -17
- package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
- package/es/Mermaid/FullFeatured.js +45 -35
- package/es/Mermaid/index.js +26 -17
- package/es/Mermaid/useMermaid.d.ts +1 -2
- package/es/Mermaid/useMermaid.js +5 -3
- package/es/Modal/index.js +60 -48
- package/es/SearchBar/index.js +51 -47
- package/es/SelectWithImg/index.js +40 -34
- package/es/SideNav/index.js +22 -15
- package/es/SliderWithInput/index.js +38 -35
- package/es/Snippet/index.js +15 -10
- package/es/SortableList/DragHandle.js +3 -3
- package/es/SortableList/SortableItem.js +19 -16
- package/es/SortableList/SortableOverlay.js +5 -3
- package/es/SortableList/index.js +23 -15
- package/es/Swatches/index.js +20 -18
- package/es/TabsNav/index.js +3 -2
- package/es/Tag/index.js +12 -7
- package/es/ThemeProvider/Meta.js +58 -53
- package/es/ThemeProvider/index.js +23 -17
- package/es/ThemeSwitch/index.js +19 -15
- package/es/Toc/TocMobile.js +52 -47
- package/es/Toc/index.js +13 -8
- package/es/Tooltip/index.js +6 -3
- package/es/Video/index.js +47 -41
- package/es/awesome/AuroraBackground/index.js +18 -11
- package/es/awesome/Features/Item.js +45 -37
- package/es/awesome/Features/index.js +4 -5
- package/es/awesome/GaussianBackground/index.js +13 -8
- package/es/awesome/Giscus/index.js +15 -13
- package/es/awesome/GradientButton/index.js +9 -5
- package/es/awesome/GridBackground/Grid.js +61 -49
- package/es/awesome/GridBackground/GridShowcase.js +28 -24
- package/es/awesome/GridBackground/index.js +33 -27
- package/es/awesome/Hero/index.js +74 -63
- package/es/awesome/Spline/ParentSize.js +8 -7
- package/es/awesome/Spline/index.js +13 -10
- package/es/awesome/Spotlight/index.js +3 -2
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +8 -5
- package/es/awesome/SpotlightCard/index.js +12 -9
- package/es/brand/BrandLoading/index.js +3 -2
- package/es/brand/LobeChat/index.js +38 -29
- package/es/brand/LobeChatText/index.js +13 -8
- package/es/brand/LobeHub/index.js +38 -29
- package/es/brand/LobeHubText/index.js +9 -4
- package/es/brand/Logo3d/index.js +3 -2
- package/es/brand/LogoFlat/index.js +49 -44
- package/es/brand/LogoMono/index.js +53 -48
- package/es/brand/LogoThree/Loading.js +11 -9
- package/es/brand/LogoThree/LogoSpline.js +12 -10
- package/es/brand/LogoThree/index.js +25 -23
- package/es/brand/components/Divider.js +6 -4
- package/es/chat/BackBottom/index.js +6 -4
- package/es/chat/ChatHeader/ChatHeaderTitle.js +31 -22
- package/es/chat/ChatHeader/index.js +42 -35
- package/es/chat/ChatInputArea/ChatInputActionBar.js +21 -16
- package/es/chat/ChatInputArea/ChatInputArea.js +23 -19
- package/es/chat/ChatInputArea/ChatInputAreaInner.js +3 -2
- package/es/chat/ChatInputArea/SendButton.js +51 -36
- package/es/chat/ChatItem/components/Actions.js +5 -3
- package/es/chat/ChatItem/components/Avatar.js +21 -17
- package/es/chat/ChatItem/components/BorderSpacing.js +2 -1
- package/es/chat/ChatItem/components/ErrorContent.js +11 -9
- package/es/chat/ChatItem/components/Loading.js +12 -10
- package/es/chat/ChatItem/components/MessageContent.js +10 -6
- package/es/chat/ChatItem/components/Title.js +8 -3
- package/es/chat/ChatItem/index.js +53 -47
- package/es/chat/ChatList/ActionsBar.js +3 -2
- package/es/chat/ChatList/HistoryDivider.js +11 -6
- package/es/chat/ChatList/Item.js +12 -14
- package/es/chat/ChatList/index.js +29 -25
- package/es/chat/EditableMessage/index.js +32 -26
- package/es/chat/EditableMessageList/index.js +76 -72
- package/es/chat/MessageInput/index.js +43 -35
- package/es/chat/MessageModal/index.js +51 -41
- package/es/chat/TokenTag/index.js +11 -7
- package/es/components/ControlInput.js +22 -18
- package/es/hooks/useHighlight.d.ts +1 -1
- package/es/mdx/Callout/index.js +19 -13
- package/es/mdx/Cards/Card.js +59 -46
- package/es/mdx/Cards/index.js +6 -3
- package/es/mdx/FileTree/File.js +11 -5
- package/es/mdx/FileTree/Folder.js +22 -13
- package/es/mdx/FileTree/index.js +6 -3
- package/es/mdx/Mdx/index.js +9 -7
- package/es/mdx/Steps/index.js +6 -3
- package/es/mdx/Tabs/Tab.js +8 -3
- package/es/mdx/Tabs/index.js +21 -17
- package/es/mdx/mdxComponents/CodeBlock.js +14 -9
- package/es/mdx/mdxComponents/Image.js +2 -2
- package/es/mdx/mdxComponents/Link.js +3 -2
- package/es/mdx/mdxComponents/Pre.js +14 -7
- package/es/mdx/mdxComponents/Video.js +2 -2
- package/es/mobile/MobileChatInputArea/SendButton.js +4 -3
- package/es/mobile/MobileChatInputArea/index.js +79 -69
- package/es/mobile/MobileNavBar/MobileNavBarTitle.js +37 -26
- package/es/mobile/MobileNavBar/index.js +48 -41
- package/es/mobile/MobileSafeArea/index.js +3 -2
- package/es/mobile/MobileTabBar/index.js +35 -29
- package/es/storybook/StoryBook/index.js +26 -19
- package/package.json +21 -22
package/es/mdx/FileTree/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
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__*/
|
|
24
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
24
25
|
className: cx(styles.container, className)
|
|
25
|
-
}, rest),
|
|
26
|
+
}, rest), {}, {
|
|
27
|
+
children: children
|
|
28
|
+
}));
|
|
26
29
|
};
|
|
27
30
|
export default FileTree;
|
package/es/mdx/Mdx/index.js
CHANGED
|
@@ -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__*/
|
|
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__*/
|
|
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__*/
|
|
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__*/
|
|
141
|
+
return /*#__PURE__*/_jsx(Typography, _objectSpread(_objectSpread({
|
|
142
142
|
className: cx(enableLatex && styles.latex, isChatMode && styles.chat, className),
|
|
143
143
|
style: style
|
|
144
|
-
}, rest),
|
|
145
|
-
|
|
144
|
+
}, rest), {}, {
|
|
145
|
+
children: /*#__PURE__*/_jsx(MDXContent, {
|
|
146
|
+
components: memoComponents
|
|
147
|
+
})
|
|
146
148
|
}));
|
|
147
149
|
});
|
|
148
150
|
export default Mdx;
|
package/es/mdx/Steps/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
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__*/
|
|
24
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
24
25
|
className: cx(styles.container, className)
|
|
25
|
-
}, rest),
|
|
26
|
+
}, rest), {}, {
|
|
27
|
+
children: children
|
|
28
|
+
}));
|
|
26
29
|
};
|
|
27
30
|
export default Steps;
|
package/es/mdx/Tabs/Tab.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
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__*/
|
|
23
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
23
24
|
className: cx(styles.body, className)
|
|
24
|
-
}, rest),
|
|
25
|
+
}, rest), {}, {
|
|
26
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
27
|
+
children: children
|
|
28
|
+
})
|
|
29
|
+
}));
|
|
25
30
|
};
|
|
26
31
|
export default Tab;
|
package/es/mdx/Tabs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
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__*/
|
|
45
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
44
46
|
className: cx(styles.container, className)
|
|
45
|
-
}, rest),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
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__*/
|
|
33
|
+
if (enableMermaid && code.lang === 'mermaid') return /*#__PURE__*/_jsx(PreMermaid, _objectSpread(_objectSpread({
|
|
33
34
|
fullFeatured: fullFeatured
|
|
34
|
-
}, mermaid),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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__*/
|
|
28
|
+
return /*#__PURE__*/_jsx(LobeImage, _objectSpread({
|
|
29
29
|
alt: alt,
|
|
30
30
|
height: size.height,
|
|
31
31
|
preview: {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
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__*/
|
|
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
|
|
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__*/
|
|
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),
|
|
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__*/
|
|
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),
|
|
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__*/
|
|
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),
|
|
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__*/
|
|
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
|
|
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__*/
|
|
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__*/
|
|
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__*/
|
|
63
|
+
return expand ? /*#__PURE__*/_jsxs(Flexbox, {
|
|
62
64
|
className: styles.inner,
|
|
63
|
-
gap: 8
|
|
64
|
-
}, /*#__PURE__*/React.createElement(Flexbox, {
|
|
65
65
|
gap: 8,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
76
|
+
horizontal: true,
|
|
77
|
+
children: [r.textAreaLeftAddons, children, r.textAreaRightAddons]
|
|
78
|
+
});
|
|
74
79
|
}, [expand, loading]);
|
|
75
80
|
var showAddons = !expand && !isFocused;
|
|
76
|
-
return /*#__PURE__*/
|
|
81
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
77
82
|
className: cx(styles.container, expand && styles.expand, className),
|
|
78
83
|
gap: 12,
|
|
79
|
-
style: style
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
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;
|