@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children", "language", "showLanguage", "className", "style", "allowChangeLanguage", "fileName", "icon", "bodyRender", "actionsRender", "copyable", "type", "defalutExpand"];
|
|
@@ -11,6 +11,8 @@ import CopyButton from "../CopyButton";
|
|
|
11
11
|
import { languageMap } from "../hooks/useHighlight";
|
|
12
12
|
import SyntaxHighlighter from "./SyntaxHighlighter";
|
|
13
13
|
import { useStyles } from "./style";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
16
|
var options = languageMap.map(function (item) {
|
|
15
17
|
return {
|
|
16
18
|
label: item,
|
|
@@ -50,7 +52,7 @@ export var HighlighterFullFeatured = /*#__PURE__*/memo(function (_ref) {
|
|
|
50
52
|
fontSize: 14,
|
|
51
53
|
strokeWidth: 2
|
|
52
54
|
};
|
|
53
|
-
var origianlActions = copyable && /*#__PURE__*/
|
|
55
|
+
var origianlActions = copyable && /*#__PURE__*/_jsx(CopyButton, {
|
|
54
56
|
content: children,
|
|
55
57
|
placement: "left",
|
|
56
58
|
size: size
|
|
@@ -61,57 +63,65 @@ export var HighlighterFullFeatured = /*#__PURE__*/memo(function (_ref) {
|
|
|
61
63
|
language: language,
|
|
62
64
|
originalNode: origianlActions
|
|
63
65
|
}) : origianlActions;
|
|
64
|
-
var originalBody = /*#__PURE__*/
|
|
66
|
+
var originalBody = /*#__PURE__*/_jsx(SyntaxHighlighter, {
|
|
65
67
|
language: lang === null || lang === void 0 ? void 0 : lang.toLowerCase(),
|
|
66
68
|
style: expand ? {} : {
|
|
67
69
|
height: 0,
|
|
68
70
|
overflow: 'hidden'
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
+
},
|
|
72
|
+
children: children
|
|
73
|
+
});
|
|
71
74
|
var body = bodyRender ? bodyRender({
|
|
72
75
|
content: children,
|
|
73
76
|
language: language,
|
|
74
77
|
originalNode: originalBody
|
|
75
78
|
}) : originalBody;
|
|
76
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
77
80
|
className: cx(styles.container, className),
|
|
78
81
|
"data-code-type": "highlighter",
|
|
79
82
|
style: style
|
|
80
|
-
}, rest),
|
|
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
|
-
|
|
83
|
+
}, rest), {}, {
|
|
84
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
85
|
+
align: 'center',
|
|
86
|
+
className: styles.header,
|
|
87
|
+
horizontal: true,
|
|
88
|
+
justify: 'space-between',
|
|
89
|
+
children: [/*#__PURE__*/_jsx(ActionIcon, {
|
|
90
|
+
icon: expand ? ChevronDown : ChevronRight,
|
|
91
|
+
onClick: function onClick() {
|
|
92
|
+
return setExpand(!expand);
|
|
93
|
+
},
|
|
94
|
+
size: {
|
|
95
|
+
blockSize: 24,
|
|
96
|
+
fontSize: 14,
|
|
97
|
+
strokeWidth: 3
|
|
98
|
+
}
|
|
99
|
+
}), allowChangeLanguage && !fileName ? showLanguage && /*#__PURE__*/_jsx(Select, {
|
|
100
|
+
className: styles.select,
|
|
101
|
+
onSelect: setLang,
|
|
102
|
+
options: options,
|
|
103
|
+
size: 'small',
|
|
104
|
+
suffixIcon: false,
|
|
105
|
+
value: lang.toLowerCase(),
|
|
106
|
+
variant: 'borderless'
|
|
107
|
+
}) : /*#__PURE__*/_jsxs(Flexbox, {
|
|
108
|
+
align: 'center',
|
|
109
|
+
className: styles.select,
|
|
110
|
+
gap: 2,
|
|
111
|
+
horizontal: true,
|
|
112
|
+
justify: 'center',
|
|
113
|
+
children: [icon, /*#__PURE__*/_jsx("span", {
|
|
114
|
+
children: fileName || lang
|
|
115
|
+
})]
|
|
116
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
117
|
+
align: 'center',
|
|
118
|
+
flex: 'none',
|
|
119
|
+
gap: 4,
|
|
120
|
+
horizontal: true,
|
|
121
|
+
children: actions
|
|
122
|
+
})]
|
|
123
|
+
}), body]
|
|
124
|
+
}));
|
|
115
125
|
});
|
|
116
126
|
export default HighlighterFullFeatured;
|
|
117
127
|
export { default as SyntaxHighlighter } from "./SyntaxHighlighter";
|
|
@@ -5,6 +5,9 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
5
5
|
import Icon from "../../Icon";
|
|
6
6
|
import { useHighlight } from "../../hooks/useHighlight";
|
|
7
7
|
import { useStyles } from "./style";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
11
|
var SyntaxHighlighter = /*#__PURE__*/memo(function (_ref) {
|
|
9
12
|
var children = _ref.children,
|
|
10
13
|
language = _ref.language,
|
|
@@ -18,24 +21,32 @@ var SyntaxHighlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
18
21
|
var _useHighlight = useHighlight(children, language, isDarkMode),
|
|
19
22
|
data = _useHighlight.data,
|
|
20
23
|
isLoading = _useHighlight.isLoading;
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
25
|
+
children: [isLoading || !data ? /*#__PURE__*/_jsx("div", {
|
|
26
|
+
className: cx(styles.unshiki, className),
|
|
27
|
+
style: style,
|
|
28
|
+
children: /*#__PURE__*/_jsx("pre", {
|
|
29
|
+
children: /*#__PURE__*/_jsx("code", {
|
|
30
|
+
children: children
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
}) : /*#__PURE__*/_jsx("div", {
|
|
34
|
+
className: cx(styles.shiki, className),
|
|
35
|
+
dangerouslySetInnerHTML: {
|
|
36
|
+
__html: data
|
|
37
|
+
},
|
|
38
|
+
style: style
|
|
39
|
+
}), isLoading && /*#__PURE__*/_jsx(Flexbox, {
|
|
40
|
+
align: 'center',
|
|
41
|
+
className: styles.loading,
|
|
42
|
+
gap: 8,
|
|
43
|
+
horizontal: true,
|
|
44
|
+
justify: 'center',
|
|
45
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
46
|
+
icon: Loader2,
|
|
47
|
+
spin: true
|
|
48
|
+
})
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
40
51
|
});
|
|
41
52
|
export default SyntaxHighlighter;
|
package/es/Highlighter/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
|
var _excluded = ["fullFeatured", "copyButtonSize", "children", "language", "className", "style", "copyable", "showLanguage", "type", "wrap", "bodyRender", "actionsRender"];
|
|
6
6
|
import { memo } from 'react';
|
|
@@ -10,6 +10,8 @@ import Tag from "../Tag";
|
|
|
10
10
|
import FullFeatured from "./FullFeatured";
|
|
11
11
|
import SyntaxHighlighter from "./SyntaxHighlighter";
|
|
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
|
export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
14
16
|
var fullFeatured = _ref.fullFeatured,
|
|
15
17
|
_ref$copyButtonSize = _ref.copyButtonSize,
|
|
@@ -33,7 +35,7 @@ export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
33
35
|
styles = _useStyles.styles,
|
|
34
36
|
cx = _useStyles.cx;
|
|
35
37
|
var tirmedChildren = children.trim();
|
|
36
|
-
var originalActions = copyable && /*#__PURE__*/
|
|
38
|
+
var originalActions = copyable && /*#__PURE__*/_jsx(CopyButton, {
|
|
37
39
|
content: tirmedChildren,
|
|
38
40
|
placement: "left",
|
|
39
41
|
size: copyButtonSize
|
|
@@ -44,15 +46,16 @@ export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
44
46
|
language: language,
|
|
45
47
|
originalNode: originalActions
|
|
46
48
|
}) : originalActions;
|
|
47
|
-
var originalBody = /*#__PURE__*/
|
|
48
|
-
language: language === null || language === void 0 ? void 0 : language.toLowerCase()
|
|
49
|
-
|
|
49
|
+
var originalBody = /*#__PURE__*/_jsx(SyntaxHighlighter, {
|
|
50
|
+
language: language === null || language === void 0 ? void 0 : language.toLowerCase(),
|
|
51
|
+
children: tirmedChildren
|
|
52
|
+
});
|
|
50
53
|
var body = bodyRender ? bodyRender({
|
|
51
54
|
content: tirmedChildren,
|
|
52
55
|
language: language,
|
|
53
56
|
originalNode: originalBody
|
|
54
57
|
}) : originalBody;
|
|
55
|
-
if (fullFeatured) return /*#__PURE__*/
|
|
58
|
+
if (fullFeatured) return /*#__PURE__*/_jsx(FullFeatured, _objectSpread(_objectSpread({
|
|
56
59
|
actionsRender: actionsRender,
|
|
57
60
|
bodyRender: bodyRender,
|
|
58
61
|
className: className,
|
|
@@ -61,22 +64,29 @@ export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
61
64
|
showLanguage: showLanguage,
|
|
62
65
|
type: type,
|
|
63
66
|
wrap: wrap
|
|
64
|
-
}, rest),
|
|
65
|
-
|
|
67
|
+
}, rest), {}, {
|
|
68
|
+
children: tirmedChildren
|
|
69
|
+
}));
|
|
70
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
66
71
|
className: cx(styles.container, !wrap && styles.nowrap, className),
|
|
67
72
|
"data-code-type": "highlighter",
|
|
68
73
|
style: style
|
|
69
|
-
}, rest),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
}, rest), {}, {
|
|
75
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
76
|
+
align: 'center',
|
|
77
|
+
className: styles.button,
|
|
78
|
+
flex: 'none',
|
|
79
|
+
gap: 4,
|
|
80
|
+
horizontal: true,
|
|
81
|
+
children: actions
|
|
82
|
+
}), showLanguage && language && /*#__PURE__*/_jsx(Tag, {
|
|
83
|
+
className: styles.lang,
|
|
84
|
+
children: language.toLowerCase()
|
|
85
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
86
|
+
className: styles.scroller,
|
|
87
|
+
children: body
|
|
88
|
+
})]
|
|
89
|
+
}));
|
|
80
90
|
});
|
|
81
91
|
export default Highlighter;
|
|
82
92
|
export { default as SyntaxHighlighter } from "./SyntaxHighlighter";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { createLucideIcon } from 'lucide-react';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
var Discord = createLucideIcon('Discord', [['path', {
|
|
4
5
|
d: 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z',
|
|
5
6
|
key: '18tl5t'
|
|
6
7
|
}]]);
|
|
7
8
|
var DiscordIcon = function DiscordIcon(props) {
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/_jsx(Discord, _objectSpread({
|
|
9
10
|
style: {
|
|
10
11
|
overflow: 'visible'
|
|
11
12
|
}
|
package/es/Icon/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
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 = ["icon", "size", "color", "fill", "className", "focusable", "spin", "fillRule", "fillOpacity"],
|
|
6
6
|
_excluded2 = ["fontSize"];
|
|
7
7
|
import { forwardRef, useMemo } from 'react';
|
|
8
8
|
import { calcSize } from "./calcSize";
|
|
9
9
|
import { useStyles } from "./style";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
11
12
|
var icon = _ref.icon,
|
|
12
13
|
size = _ref.size,
|
|
@@ -28,19 +29,21 @@ var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
28
29
|
}, [size]),
|
|
29
30
|
fontSize = _useMemo.fontSize,
|
|
30
31
|
restSize = _objectWithoutProperties(_useMemo, _excluded2);
|
|
31
|
-
return /*#__PURE__*/
|
|
32
|
+
return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({
|
|
32
33
|
className: cx('anticon', spin && styles.spin, className),
|
|
33
34
|
role: "img"
|
|
34
|
-
}, rest),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
}, rest), {}, {
|
|
36
|
+
children: /*#__PURE__*/_jsx(SvgIcon, _objectSpread({
|
|
37
|
+
color: color,
|
|
38
|
+
fill: fill,
|
|
39
|
+
fillOpacity: fillOpacity,
|
|
40
|
+
fillRule: fillRule,
|
|
41
|
+
focusable: focusable,
|
|
42
|
+
height: fontSize,
|
|
43
|
+
ref: ref,
|
|
44
|
+
size: fontSize,
|
|
45
|
+
width: fontSize
|
|
46
|
+
}, restSize))
|
|
47
|
+
}));
|
|
45
48
|
});
|
|
46
49
|
export default Icon;
|
package/es/Image/ImageGallery.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Image } from 'antd';
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import usePreview from "./usePreview";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
var PreviewGroup = Image.PreviewGroup;
|
|
5
6
|
var ImageGallery = /*#__PURE__*/memo(function (_ref) {
|
|
6
7
|
var items = _ref.items,
|
|
@@ -10,9 +11,10 @@ var ImageGallery = /*#__PURE__*/memo(function (_ref) {
|
|
|
10
11
|
preview = _ref.preview;
|
|
11
12
|
var mergePreivew = usePreview(preview);
|
|
12
13
|
if (!enable) return children;
|
|
13
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/_jsx(PreviewGroup, {
|
|
14
15
|
items: items,
|
|
15
|
-
preview: mergePreivew
|
|
16
|
-
|
|
16
|
+
preview: mergePreivew,
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
17
19
|
});
|
|
18
20
|
export default ImageGallery;
|
package/es/Image/Preview.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { memo, useEffect, useRef } from 'react';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
var Preview = /*#__PURE__*/memo(function (_ref) {
|
|
3
4
|
var children = _ref.children,
|
|
4
5
|
visible = _ref.visible;
|
|
@@ -16,8 +17,9 @@ var Preview = /*#__PURE__*/memo(function (_ref) {
|
|
|
16
17
|
ref.current.removeEventListener('wheel', handleDisableZoom);
|
|
17
18
|
}
|
|
18
19
|
}, [visible]);
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
ref: ref
|
|
21
|
-
|
|
20
|
+
return /*#__PURE__*/_jsx("div", {
|
|
21
|
+
ref: ref,
|
|
22
|
+
children: children
|
|
23
|
+
});
|
|
22
24
|
});
|
|
23
25
|
export default Preview;
|
package/es/Image/index.js
CHANGED
|
@@ -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 = ["wrapperClassName", "style", "preview", "isLoading", "minSize", "size", "actions", "alwaysShowActions", "objectFit", "classNames", "onClick", "width", "height", "borderless"];
|
|
@@ -12,6 +11,8 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
12
11
|
import Icon from "../Icon";
|
|
13
12
|
import { useStyles } from "./style";
|
|
14
13
|
import usePreview from "./usePreview";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
16
|
var Image = /*#__PURE__*/memo(function (_ref) {
|
|
16
17
|
var wrapperClassName = _ref.wrapperClassName,
|
|
17
18
|
style = _ref.style,
|
|
@@ -47,39 +48,42 @@ var Image = /*#__PURE__*/memo(function (_ref) {
|
|
|
47
48
|
cx = _useStyles.cx,
|
|
48
49
|
theme = _useStyles.theme;
|
|
49
50
|
var mergePreivew = usePreview(preview);
|
|
50
|
-
if (isLoading) return /*#__PURE__*/
|
|
51
|
-
onClick: onClick
|
|
52
|
-
}, /*#__PURE__*/React.createElement(Skeleton.Avatar, {
|
|
53
|
-
active: true,
|
|
54
|
-
style: {
|
|
55
|
-
borderRadius: theme.borderRadius,
|
|
56
|
-
height: height,
|
|
57
|
-
maxHeight: size,
|
|
58
|
-
maxWidth: size,
|
|
59
|
-
minHeight: minSize,
|
|
60
|
-
minWidth: minSize,
|
|
61
|
-
width: width
|
|
62
|
-
}
|
|
63
|
-
}));
|
|
64
|
-
return /*#__PURE__*/React.createElement(Flexbox, {
|
|
65
|
-
className: cx(styles.imageWrapper, wrapperClassName),
|
|
66
|
-
style: style
|
|
67
|
-
}, actions && /*#__PURE__*/React.createElement("div", {
|
|
68
|
-
className: styles.actions
|
|
69
|
-
}, actions), /*#__PURE__*/React.createElement(AntImage, _extends({
|
|
70
|
-
className: classNames.image,
|
|
71
|
-
fallback: isDarkMode ? 'https://gw.alipayobjects.com/zos/kitchen/nhzBb%24r0Cm/image_off_dark.webp' : 'https://gw.alipayobjects.com/zos/kitchen/QAvkgt30Ys/image_off_light.webp',
|
|
72
|
-
height: height,
|
|
73
|
-
loading: 'lazy',
|
|
51
|
+
if (isLoading) return /*#__PURE__*/_jsx("div", {
|
|
74
52
|
onClick: onClick,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
53
|
+
children: /*#__PURE__*/_jsx(Skeleton.Avatar, {
|
|
54
|
+
active: true,
|
|
55
|
+
style: {
|
|
56
|
+
borderRadius: theme.borderRadius,
|
|
57
|
+
height: height,
|
|
58
|
+
maxHeight: size,
|
|
59
|
+
maxWidth: size,
|
|
60
|
+
minHeight: minSize,
|
|
61
|
+
minWidth: minSize,
|
|
62
|
+
width: width
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
67
|
+
className: cx(styles.imageWrapper, wrapperClassName),
|
|
68
|
+
style: style,
|
|
69
|
+
children: [actions && /*#__PURE__*/_jsx("div", {
|
|
70
|
+
className: styles.actions,
|
|
71
|
+
children: actions
|
|
72
|
+
}), /*#__PURE__*/_jsx(AntImage, _objectSpread({
|
|
73
|
+
className: classNames.image,
|
|
74
|
+
fallback: isDarkMode ? 'https://gw.alipayobjects.com/zos/kitchen/nhzBb%24r0Cm/image_off_dark.webp' : 'https://gw.alipayobjects.com/zos/kitchen/QAvkgt30Ys/image_off_light.webp',
|
|
75
|
+
height: height,
|
|
76
|
+
loading: 'lazy',
|
|
77
|
+
onClick: onClick,
|
|
78
|
+
preview: preview === false ? false : _objectSpread({
|
|
79
|
+
mask: mobile ? false : actions ? /*#__PURE__*/_jsx("div", {}) : /*#__PURE__*/_jsx(Icon, {
|
|
80
|
+
icon: Eye,
|
|
81
|
+
size: 'normal'
|
|
82
|
+
})
|
|
83
|
+
}, mergePreivew),
|
|
84
|
+
width: width,
|
|
85
|
+
wrapperClassName: cx(styles.image, classNames.wrapper)
|
|
86
|
+
}, rest))]
|
|
87
|
+
});
|
|
84
88
|
});
|
|
85
89
|
export default Image;
|
package/es/Image/usePreview.js
CHANGED
|
@@ -9,6 +9,8 @@ import ActionIcon from "../ActionIcon";
|
|
|
9
9
|
import Icon from "../Icon";
|
|
10
10
|
import Preview from "./Preview";
|
|
11
11
|
import { useStyles } from "./style";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
14
|
export var usePreview = function usePreview() {
|
|
13
15
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
14
16
|
_onVisibleChange = _ref.onVisibleChange,
|
|
@@ -27,7 +29,7 @@ export var usePreview = function usePreview() {
|
|
|
27
29
|
var _useStyles = useStyles(),
|
|
28
30
|
styles = _useStyles.styles;
|
|
29
31
|
return _objectSpread({
|
|
30
|
-
closeIcon: /*#__PURE__*/
|
|
32
|
+
closeIcon: /*#__PURE__*/_jsx(Icon, {
|
|
31
33
|
icon: X,
|
|
32
34
|
size: {
|
|
33
35
|
fontSize: 18,
|
|
@@ -35,9 +37,10 @@ export var usePreview = function usePreview() {
|
|
|
35
37
|
}
|
|
36
38
|
}),
|
|
37
39
|
imageRender: function imageRender(node) {
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
-
visible: visible
|
|
40
|
-
|
|
40
|
+
return /*#__PURE__*/_jsx(Preview, {
|
|
41
|
+
visible: visible,
|
|
42
|
+
children: node
|
|
43
|
+
});
|
|
41
44
|
},
|
|
42
45
|
maxScale: maxScale,
|
|
43
46
|
minScale: minScale,
|
|
@@ -59,37 +62,38 @@ export var usePreview = function usePreview() {
|
|
|
59
62
|
onRotateRight = _ref2$actions.onRotateRight,
|
|
60
63
|
onZoomOut = _ref2$actions.onZoomOut,
|
|
61
64
|
onZoomIn = _ref2$actions.onZoomIn;
|
|
62
|
-
return /*#__PURE__*/
|
|
65
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
63
66
|
className: styles.toolbar,
|
|
64
67
|
gap: 4,
|
|
65
|
-
horizontal: true
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
68
|
+
horizontal: true,
|
|
69
|
+
children: [/*#__PURE__*/_jsx(ActionIcon, {
|
|
70
|
+
color: '#fff',
|
|
71
|
+
icon: FlipHorizontal,
|
|
72
|
+
onClick: onFlipX
|
|
73
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
74
|
+
color: '#fff',
|
|
75
|
+
icon: FlipVertical,
|
|
76
|
+
onClick: onFlipY
|
|
77
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
78
|
+
color: '#fff',
|
|
79
|
+
icon: RotateCcw,
|
|
80
|
+
onClick: onRotateLeft
|
|
81
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
82
|
+
color: '#fff',
|
|
83
|
+
icon: RotateCw,
|
|
84
|
+
onClick: onRotateRight
|
|
85
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
86
|
+
color: '#fff',
|
|
87
|
+
disable: scale === minScale,
|
|
88
|
+
icon: ZoomOut,
|
|
89
|
+
onClick: onZoomOut
|
|
90
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
91
|
+
color: '#fff',
|
|
92
|
+
disable: scale === maxScale,
|
|
93
|
+
icon: ZoomIn,
|
|
94
|
+
onClick: onZoomIn
|
|
95
|
+
}), toolbarAddon]
|
|
96
|
+
});
|
|
93
97
|
}
|
|
94
98
|
}, rest);
|
|
95
99
|
};
|
package/es/Img/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
5
|
var _excluded = ["unoptimized"];
|
|
7
6
|
import { createElement, forwardRef, useContext, useMemo } from 'react';
|
|
8
7
|
import { ConfigContext } from "../ConfigProvider";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
var createContainer = function createContainer(as) {
|
|
10
10
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
11
11
|
return /*#__PURE__*/createElement(as, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -21,7 +21,7 @@ var Img = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
21
21
|
var ImgContainer = useMemo(function () {
|
|
22
22
|
return createContainer(render);
|
|
23
23
|
}, [render]);
|
|
24
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/_jsx(ImgContainer, _objectSpread({
|
|
25
25
|
ref: ref,
|
|
26
26
|
unoptimized: unoptimized === undefined ? config === null || config === void 0 ? void 0 : config.imgUnoptimized : unoptimized
|
|
27
27
|
}, res));
|
package/es/Input/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
5
|
var _excluded = ["className", "type"],
|
|
7
6
|
_excluded2 = ["className", "type", "resize", "style"];
|
|
8
7
|
import { Input as AntInput } from 'antd';
|
|
9
8
|
import { forwardRef } from 'react';
|
|
10
9
|
import { useStyles } from "./style";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
export var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
13
|
_ref$type = _ref.type,
|
|
@@ -18,7 +18,7 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
18
18
|
}),
|
|
19
19
|
styles = _useStyles.styles,
|
|
20
20
|
cx = _useStyles.cx;
|
|
21
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/_jsx(AntInput, _objectSpread({
|
|
22
22
|
className: cx(styles.input, className),
|
|
23
23
|
ref: ref,
|
|
24
24
|
variant: type === 'pure' ? 'borderless' : undefined
|
|
@@ -37,7 +37,7 @@ export var TextArea = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
37
37
|
}),
|
|
38
38
|
styles = _useStyles2.styles,
|
|
39
39
|
cx = _useStyles2.cx;
|
|
40
|
-
return /*#__PURE__*/
|
|
40
|
+
return /*#__PURE__*/_jsx(AntInput.TextArea, _objectSpread({
|
|
41
41
|
className: cx(styles.textarea, className),
|
|
42
42
|
ref: ref,
|
|
43
43
|
style: resize ? style : _objectSpread({
|