@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/TabsNav/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
|
var _excluded = ["className", "variant"];
|
|
6
6
|
import { Tabs } from 'antd';
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
var TabsNav = /*#__PURE__*/memo(function (_ref) {
|
|
10
11
|
var className = _ref.className,
|
|
11
12
|
variant = _ref.variant,
|
|
@@ -13,7 +14,7 @@ var TabsNav = /*#__PURE__*/memo(function (_ref) {
|
|
|
13
14
|
var _useStyles = useStyles(),
|
|
14
15
|
styles = _useStyles.styles,
|
|
15
16
|
cx = _useStyles.cx;
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/_jsx(Tabs, _objectSpread({
|
|
17
18
|
className: cx(styles.tabs, variant === 'compact' && styles.compact, className)
|
|
18
19
|
}, rest));
|
|
19
20
|
});
|
package/es/Tag/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 _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
6
6
|
var _excluded = ["icon", "children", "size"];
|
|
@@ -9,6 +9,8 @@ import { Tag as AntTag } from 'antd';
|
|
|
9
9
|
import { createStyles } from 'antd-style';
|
|
10
10
|
import { memo } from 'react';
|
|
11
11
|
import { Flexbox } from 'react-layout-kit';
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
var useStyles = createStyles(function (_ref) {
|
|
13
15
|
var cx = _ref.cx,
|
|
14
16
|
css = _ref.css,
|
|
@@ -27,13 +29,16 @@ var Tag = /*#__PURE__*/memo(function (_ref2) {
|
|
|
27
29
|
var _useStyles = useStyles(),
|
|
28
30
|
styles = _useStyles.styles,
|
|
29
31
|
cx = _useStyles.cx;
|
|
30
|
-
return /*#__PURE__*/
|
|
32
|
+
return /*#__PURE__*/_jsx(AntTag, _objectSpread(_objectSpread({
|
|
31
33
|
bordered: false,
|
|
32
34
|
className: cx(styles.tag, size === 'small' && styles.small)
|
|
33
|
-
}, rest),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
}, rest), {}, {
|
|
36
|
+
children: /*#__PURE__*/_jsxs(Flexbox, {
|
|
37
|
+
align: 'center',
|
|
38
|
+
gap: 4,
|
|
39
|
+
horizontal: true,
|
|
40
|
+
children: [icon, children]
|
|
41
|
+
})
|
|
42
|
+
}));
|
|
38
43
|
});
|
|
39
44
|
export default Tag;
|
package/es/ThemeProvider/Meta.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { memo, useCallback } from 'react';
|
|
2
2
|
import { useCdnFn } from "../ConfigProvider";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
6
|
var Meta = /*#__PURE__*/memo(function (_ref) {
|
|
4
7
|
var _ref$title = _ref.title,
|
|
5
8
|
title = _ref$title === void 0 ? 'LobeHub' : _ref$title,
|
|
@@ -14,58 +17,60 @@ var Meta = /*#__PURE__*/memo(function (_ref) {
|
|
|
14
17
|
version: 'latest'
|
|
15
18
|
});
|
|
16
19
|
}, []);
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
20
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
21
|
+
children: [/*#__PURE__*/_jsx("link", {
|
|
22
|
+
href: genAssets('assets/favicon.ico'),
|
|
23
|
+
rel: "shortcut icon"
|
|
24
|
+
}), /*#__PURE__*/_jsx("link", {
|
|
25
|
+
href: genAssets('assets/apple-touch-icon.png'),
|
|
26
|
+
rel: "apple-touch-icon",
|
|
27
|
+
sizes: "180x180"
|
|
28
|
+
}), /*#__PURE__*/_jsx("link", {
|
|
29
|
+
href: genAssets('assets/favicon-32x32.png'),
|
|
30
|
+
rel: "icon",
|
|
31
|
+
sizes: "32x32",
|
|
32
|
+
type: "image/png"
|
|
33
|
+
}), /*#__PURE__*/_jsx("link", {
|
|
34
|
+
href: genAssets('assets/favicon-16x16.png'),
|
|
35
|
+
rel: "icon",
|
|
36
|
+
sizes: "16x16",
|
|
37
|
+
type: "image/png"
|
|
38
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
39
|
+
content: "width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover, user-scalable=no",
|
|
40
|
+
name: "viewport"
|
|
41
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
42
|
+
content: title,
|
|
43
|
+
name: "apple-mobile-web-app-title"
|
|
44
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
45
|
+
content: title,
|
|
46
|
+
name: "application-name"
|
|
47
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
48
|
+
content: description,
|
|
49
|
+
name: "description"
|
|
50
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
51
|
+
content: "#000000",
|
|
52
|
+
name: "msapplication-TileColor"
|
|
53
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
54
|
+
content: "#fff",
|
|
55
|
+
media: "(prefers-color-scheme: light)",
|
|
56
|
+
name: "theme-color"
|
|
57
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
58
|
+
content: "#000",
|
|
59
|
+
media: "(prefers-color-scheme: dark)",
|
|
60
|
+
name: "theme-color"
|
|
61
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
62
|
+
content: "yes",
|
|
63
|
+
name: "apple-mobile-web-app-capable"
|
|
64
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
65
|
+
content: title,
|
|
66
|
+
name: "apple-mobile-web-app-title"
|
|
67
|
+
}), /*#__PURE__*/_jsx("meta", {
|
|
68
|
+
content: "black-translucent",
|
|
69
|
+
name: "apple-mobile-web-app-status-bar-style"
|
|
70
|
+
}), withManifest && /*#__PURE__*/_jsx("link", {
|
|
71
|
+
href: genAssets('assets/site.webmanifest'),
|
|
72
|
+
rel: "manifest"
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
70
75
|
});
|
|
71
76
|
export default Meta;
|
|
@@ -1,6 +1,5 @@
|
|
|
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 = ["children", "customStylish", "customToken", "enableCustomFonts", "enableGlobalStyle", "customFonts", "customTheme", "className", "style", "theme"];
|
|
@@ -13,6 +12,9 @@ import FontLoader from "../FontLoader";
|
|
|
13
12
|
import { lobeCustomStylish, lobeCustomToken } from "../styles";
|
|
14
13
|
import { createLobeAntdTheme } from "../styles/theme/antdTheme";
|
|
15
14
|
import GlobalStyle from "./GlobalStyle";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
18
|
var ThemeProvider = /*#__PURE__*/memo(function (_ref) {
|
|
17
19
|
var children = _ref.children,
|
|
18
20
|
customStylish = _ref.customStylish,
|
|
@@ -58,22 +60,26 @@ var ThemeProvider = /*#__PURE__*/memo(function (_ref) {
|
|
|
58
60
|
});
|
|
59
61
|
return merge(lobeTheme, antdTheme);
|
|
60
62
|
}, [customTheme.primaryColor, customTheme.neutralColor, antdTheme]);
|
|
61
|
-
return /*#__PURE__*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
63
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
64
|
+
children: [enableCustomFonts && (webfontUrls === null || webfontUrls === void 0 ? void 0 : webfontUrls.length) > 0 && webfontUrls.map(function (webfont) {
|
|
65
|
+
return /*#__PURE__*/_jsx(FontLoader, {
|
|
66
|
+
url: webfont
|
|
67
|
+
}, webfont);
|
|
68
|
+
}), /*#__PURE__*/_jsxs(AntdThemeProvider, _objectSpread(_objectSpread({
|
|
69
|
+
customStylish: stylish,
|
|
70
|
+
customToken: token,
|
|
71
|
+
theme: theme
|
|
72
|
+
}, rest), {}, {
|
|
73
|
+
children: [enableGlobalStyle && /*#__PURE__*/_jsx(GlobalStyle, {}), /*#__PURE__*/_jsx(App, {
|
|
74
|
+
className: className,
|
|
75
|
+
style: _objectSpread({
|
|
76
|
+
minHeight: 'inherit',
|
|
77
|
+
width: 'inherit'
|
|
78
|
+
}, style),
|
|
79
|
+
children: children
|
|
80
|
+
})]
|
|
81
|
+
}))]
|
|
82
|
+
});
|
|
77
83
|
});
|
|
78
84
|
ThemeProvider.displayName = 'LobeThemeProvider';
|
|
79
85
|
export default ThemeProvider;
|
package/es/ThemeSwitch/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { memo, useMemo } from 'react';
|
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
import ActionIcon from "../ActionIcon";
|
|
8
8
|
import Icon from "../Icon";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
var icons = {
|
|
10
12
|
auto: Monitor,
|
|
11
13
|
dark: Moon,
|
|
@@ -28,21 +30,21 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
|
|
|
28
30
|
style = _ref.style;
|
|
29
31
|
var items = useMemo(function () {
|
|
30
32
|
return [{
|
|
31
|
-
icon: /*#__PURE__*/
|
|
33
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
32
34
|
icon: icons.auto,
|
|
33
35
|
size: "small"
|
|
34
36
|
}),
|
|
35
37
|
key: 'auto',
|
|
36
38
|
label: labels.auto
|
|
37
39
|
}, {
|
|
38
|
-
icon: /*#__PURE__*/
|
|
40
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
39
41
|
icon: icons.light,
|
|
40
42
|
size: "small"
|
|
41
43
|
}),
|
|
42
44
|
key: 'light',
|
|
43
45
|
label: labels.light
|
|
44
46
|
}, {
|
|
45
|
-
icon: /*#__PURE__*/
|
|
47
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
46
48
|
icon: icons.dark,
|
|
47
49
|
size: "small"
|
|
48
50
|
}),
|
|
@@ -51,16 +53,17 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
|
|
|
51
53
|
}];
|
|
52
54
|
}, [labels]);
|
|
53
55
|
if (type === 'select') {
|
|
54
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/_jsx(Select, {
|
|
55
57
|
className: className,
|
|
56
58
|
defaultValue: themeMode,
|
|
57
59
|
onChange: onThemeSwitch,
|
|
58
60
|
options: items.map(function (item) {
|
|
59
61
|
return {
|
|
60
|
-
label: /*#__PURE__*/
|
|
62
|
+
label: /*#__PURE__*/_jsxs(Flexbox, {
|
|
61
63
|
direction: 'horizontal',
|
|
62
|
-
gap: 8
|
|
63
|
-
|
|
64
|
+
gap: 8,
|
|
65
|
+
children: [item.icon, item.label]
|
|
66
|
+
}),
|
|
64
67
|
value: item.key
|
|
65
68
|
};
|
|
66
69
|
}),
|
|
@@ -73,15 +76,16 @@ var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
|
|
|
73
76
|
return onThemeSwitch(e.key);
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/_jsx(Dropdown, {
|
|
77
80
|
menu: menuProps,
|
|
78
|
-
trigger: ['click']
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
trigger: ['click'],
|
|
82
|
+
children: /*#__PURE__*/_jsx(ActionIcon, {
|
|
83
|
+
className: className,
|
|
84
|
+
icon: icons[themeMode],
|
|
85
|
+
size: size,
|
|
86
|
+
style: style
|
|
87
|
+
})
|
|
88
|
+
});
|
|
85
89
|
}
|
|
86
90
|
});
|
|
87
91
|
export default ThemeSwitch;
|
package/es/Toc/TocMobile.js
CHANGED
|
@@ -5,6 +5,7 @@ import { memo } from 'react';
|
|
|
5
5
|
import useControlledState from 'use-merge-value';
|
|
6
6
|
import ActionIcon from "../ActionIcon";
|
|
7
7
|
import { useStyles } from "./style";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
export var mapItems = function mapItems(items) {
|
|
9
10
|
return items.map(function (item) {
|
|
10
11
|
var _item$children;
|
|
@@ -46,58 +47,62 @@ var TocMobile = /*#__PURE__*/memo(function (_ref) {
|
|
|
46
47
|
var activeAnchor = items.find(function (item) {
|
|
47
48
|
return item.id === activeLink;
|
|
48
49
|
});
|
|
49
|
-
return /*#__PURE__*/
|
|
50
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
50
51
|
theme: {
|
|
51
52
|
token: {
|
|
52
53
|
fontSize: 12,
|
|
53
54
|
sizeStep: 3
|
|
54
55
|
}
|
|
55
|
-
}
|
|
56
|
-
}, /*#__PURE__*/React.createElement("section", {
|
|
57
|
-
className: styles.mobileCtn
|
|
58
|
-
}, /*#__PURE__*/React.createElement(Collapse, {
|
|
59
|
-
bordered: false,
|
|
60
|
-
className: styles.expand,
|
|
61
|
-
expandIcon: function expandIcon(_ref2) {
|
|
62
|
-
var isActive = _ref2.isActive;
|
|
63
|
-
return isActive ? /*#__PURE__*/React.createElement(ActionIcon, {
|
|
64
|
-
icon: PanelTopClose,
|
|
65
|
-
size: {
|
|
66
|
-
blockSize: 24,
|
|
67
|
-
borderRadius: 3,
|
|
68
|
-
fontSize: 16,
|
|
69
|
-
strokeWidth: 1
|
|
70
|
-
}
|
|
71
|
-
}) : /*#__PURE__*/React.createElement(ActionIcon, {
|
|
72
|
-
icon: PanelTopOpen,
|
|
73
|
-
size: {
|
|
74
|
-
blockSize: 24,
|
|
75
|
-
borderRadius: 3,
|
|
76
|
-
fontSize: 16,
|
|
77
|
-
strokeWidth: 1
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
56
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
57
|
+
children: /*#__PURE__*/_jsx("section", {
|
|
58
|
+
className: styles.mobileCtn,
|
|
59
|
+
children: /*#__PURE__*/_jsx(Collapse, {
|
|
60
|
+
bordered: false,
|
|
61
|
+
className: styles.expand,
|
|
62
|
+
expandIcon: function expandIcon(_ref2) {
|
|
63
|
+
var isActive = _ref2.isActive;
|
|
64
|
+
return isActive ? /*#__PURE__*/_jsx(ActionIcon, {
|
|
65
|
+
icon: PanelTopClose,
|
|
66
|
+
size: {
|
|
67
|
+
blockSize: 24,
|
|
68
|
+
borderRadius: 3,
|
|
69
|
+
fontSize: 16,
|
|
70
|
+
strokeWidth: 1
|
|
71
|
+
}
|
|
72
|
+
}) : /*#__PURE__*/_jsx(ActionIcon, {
|
|
73
|
+
icon: PanelTopOpen,
|
|
74
|
+
size: {
|
|
75
|
+
blockSize: 24,
|
|
76
|
+
borderRadius: 3,
|
|
77
|
+
fontSize: 16,
|
|
78
|
+
strokeWidth: 1
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
expandIconPosition: 'end',
|
|
83
|
+
ghost: true,
|
|
84
|
+
children: /*#__PURE__*/_jsx(Collapse.Panel, {
|
|
85
|
+
forceRender: true,
|
|
86
|
+
header: activeAnchor ? activeAnchor.title : 'TOC',
|
|
87
|
+
children: /*#__PURE__*/_jsx(ConfigProvider, {
|
|
88
|
+
theme: {
|
|
89
|
+
token: {
|
|
90
|
+
fontSize: 14,
|
|
91
|
+
sizeStep: 4
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
children: /*#__PURE__*/_jsx(Anchor, {
|
|
95
|
+
getContainer: getContainer,
|
|
96
|
+
items: mapItems(items),
|
|
97
|
+
onChange: function onChange(currentLink) {
|
|
98
|
+
setActiveLink(currentLink.replace('#', ''));
|
|
99
|
+
},
|
|
100
|
+
targetOffset: headerHeight + 48
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
}, 'toc')
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
});
|
|
102
107
|
});
|
|
103
108
|
export default TocMobile;
|
package/es/Toc/index.js
CHANGED
|
@@ -4,6 +4,8 @@ import { Anchor } from 'antd';
|
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { default as TocMobile, mapItems } from "./TocMobile";
|
|
6
6
|
import { useStyles } from "./style";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
9
|
var Toc = /*#__PURE__*/memo(function (_ref) {
|
|
8
10
|
var activeKey = _ref.activeKey,
|
|
9
11
|
items = _ref.items,
|
|
@@ -19,18 +21,21 @@ var Toc = /*#__PURE__*/memo(function (_ref) {
|
|
|
19
21
|
}),
|
|
20
22
|
styles = _useStyles.styles,
|
|
21
23
|
cx = _useStyles.cx;
|
|
22
|
-
if (isMobile) return /*#__PURE__*/
|
|
24
|
+
if (isMobile) return /*#__PURE__*/_jsx(TocMobile, {
|
|
23
25
|
activeKey: activeKey,
|
|
24
26
|
getContainer: getContainer,
|
|
25
27
|
headerHeight: headerHeight,
|
|
26
28
|
items: items
|
|
27
29
|
});
|
|
28
|
-
return /*#__PURE__*/
|
|
29
|
-
className: cx(styles.container, styles.anchor)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
return /*#__PURE__*/_jsxs("section", {
|
|
31
|
+
className: cx(styles.container, styles.anchor),
|
|
32
|
+
children: [/*#__PURE__*/_jsx("h4", {
|
|
33
|
+
children: "Table of Contents"
|
|
34
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
35
|
+
getContainer: getContainer,
|
|
36
|
+
items: mapItems(items),
|
|
37
|
+
targetOffset: headerHeight + 12
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
35
40
|
});
|
|
36
41
|
export default Toc;
|
package/es/Tooltip/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
|
var _excluded = ["className", "arrow"];
|
|
6
6
|
import { Tooltip as AntdTooltip } from 'antd';
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
var Tooltip = /*#__PURE__*/memo(function (_ref) {
|
|
10
11
|
var className = _ref.className,
|
|
11
12
|
_ref$arrow = _ref.arrow,
|
|
@@ -14,9 +15,11 @@ var Tooltip = /*#__PURE__*/memo(function (_ref) {
|
|
|
14
15
|
var _useStyles = useStyles(),
|
|
15
16
|
styles = _useStyles.styles,
|
|
16
17
|
cx = _useStyles.cx;
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/_jsx(AntdTooltip, _objectSpread({
|
|
18
19
|
arrow: arrow,
|
|
19
|
-
|
|
20
|
+
classNames: {
|
|
21
|
+
root: cx(styles.tooltip, className)
|
|
22
|
+
}
|
|
20
23
|
}, rest));
|
|
21
24
|
});
|
|
22
25
|
export default Tooltip;
|
package/es/Video/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
|
var _excluded = ["preload", "src", "style", "classNames", "className", "minSize", "size", "width", "height", "onMouseEnter", "onMouseLeave", "preview", "isLoading", "borderless"];
|
|
@@ -10,6 +10,8 @@ import { memo, useState } from 'react';
|
|
|
10
10
|
import { Flexbox } from 'react-layout-kit';
|
|
11
11
|
import Icon from "../Icon";
|
|
12
12
|
import { useStyles } from "./style";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
var Video = /*#__PURE__*/memo(function (_ref) {
|
|
14
16
|
var _ref$preload = _ref.preload,
|
|
15
17
|
preload = _ref$preload === void 0 ? 'auto' : _ref$preload,
|
|
@@ -53,7 +55,7 @@ var Video = /*#__PURE__*/memo(function (_ref) {
|
|
|
53
55
|
setShowControls(false);
|
|
54
56
|
onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(e);
|
|
55
57
|
};
|
|
56
|
-
if (isLoading) return /*#__PURE__*/
|
|
58
|
+
if (isLoading) return /*#__PURE__*/_jsx(Skeleton.Avatar, {
|
|
57
59
|
active: true,
|
|
58
60
|
style: {
|
|
59
61
|
borderRadius: theme.borderRadius,
|
|
@@ -65,45 +67,49 @@ var Video = /*#__PURE__*/memo(function (_ref) {
|
|
|
65
67
|
width: width
|
|
66
68
|
}
|
|
67
69
|
});
|
|
68
|
-
return /*#__PURE__*/
|
|
70
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
69
71
|
className: cx(styles.videoWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.wrapper),
|
|
70
|
-
style: style
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
72
|
+
style: style,
|
|
73
|
+
children: [preview && !isPlaying && /*#__PURE__*/_jsx(Flexbox, {
|
|
74
|
+
align: 'center',
|
|
75
|
+
className: styles.preview,
|
|
76
|
+
justify: 'center',
|
|
77
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
78
|
+
color: '#fff',
|
|
79
|
+
icon: PlayIcon,
|
|
80
|
+
size: 'normal'
|
|
81
|
+
})
|
|
82
|
+
}), /*#__PURE__*/_jsx("video", _objectSpread(_objectSpread({
|
|
83
|
+
autoPlay: true,
|
|
84
|
+
className: cx(styles.video, classNames === null || classNames === void 0 ? void 0 : classNames.video, className),
|
|
85
|
+
controls: showControls,
|
|
86
|
+
height: height,
|
|
87
|
+
muted: true,
|
|
88
|
+
onEnded: function onEnded() {
|
|
89
|
+
return setIsPlaying(false);
|
|
90
|
+
},
|
|
91
|
+
onMouseEnter: onVideoMouseEnter,
|
|
92
|
+
onMouseLeave: onVideoMouseLeave,
|
|
93
|
+
onPause: function onPause() {
|
|
94
|
+
return setIsPlaying(false);
|
|
95
|
+
},
|
|
96
|
+
onPlay: function onPlay() {
|
|
97
|
+
return setIsPlaying(true);
|
|
98
|
+
},
|
|
99
|
+
onPlaying: function onPlaying() {
|
|
100
|
+
return setIsPlaying(true);
|
|
101
|
+
},
|
|
102
|
+
preload: preload,
|
|
103
|
+
style: {
|
|
104
|
+
height: 'auto',
|
|
105
|
+
width: '100%'
|
|
106
|
+
},
|
|
107
|
+
width: width
|
|
108
|
+
}, rest), {}, {
|
|
109
|
+
children: /*#__PURE__*/_jsx("source", {
|
|
110
|
+
src: src
|
|
111
|
+
})
|
|
112
|
+
}))]
|
|
113
|
+
});
|
|
108
114
|
});
|
|
109
115
|
export default Video;
|