@lobehub/ui 1.158.1 → 1.160.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.js +15 -11
- 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 +3 -2
- 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 +1 -90
|
@@ -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 _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -10,6 +9,9 @@ import { memo, useState } from 'react';
|
|
|
10
9
|
import { Flexbox } from 'react-layout-kit';
|
|
11
10
|
import { TextArea } from "../../Input";
|
|
12
11
|
import { useStyles } from "./style";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
14
16
|
var text = _ref.text,
|
|
15
17
|
_ref$type = _ref.type,
|
|
@@ -36,44 +38,50 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
|
|
|
36
38
|
cx = _useStyles.cx,
|
|
37
39
|
styles = _useStyles.styles;
|
|
38
40
|
var isAutoSize = height === 'auto';
|
|
39
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
40
42
|
gap: 16,
|
|
41
43
|
style: _objectSpread({
|
|
42
44
|
flex: 1,
|
|
43
45
|
width: '100%'
|
|
44
46
|
}, style)
|
|
45
|
-
}, rest),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
47
|
+
}, rest), {}, {
|
|
48
|
+
children: [/*#__PURE__*/_jsx(TextArea, {
|
|
49
|
+
autoSize: isAutoSize,
|
|
50
|
+
className: cx(styles, textareaClassname),
|
|
51
|
+
classNames: classNames,
|
|
52
|
+
onBlur: function onBlur(e) {
|
|
53
|
+
return setValue(e.target.value);
|
|
54
|
+
},
|
|
55
|
+
onChange: function onChange(e) {
|
|
56
|
+
return setValue(e.target.value);
|
|
57
|
+
},
|
|
58
|
+
placeholder: placeholder,
|
|
59
|
+
resize: false,
|
|
60
|
+
style: textareaStyle,
|
|
61
|
+
type: type,
|
|
62
|
+
value: temporaryValue
|
|
63
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
64
|
+
direction: 'horizontal-reverse',
|
|
65
|
+
gap: 8,
|
|
66
|
+
children: renderButtons ? renderButtons(temporaryValue).map(function (buttonProps, index) {
|
|
67
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread({
|
|
68
|
+
size: "small"
|
|
69
|
+
}, buttonProps), index);
|
|
70
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
71
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
72
|
+
onClick: function onClick() {
|
|
73
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(temporaryValue);
|
|
74
|
+
},
|
|
75
|
+
size: editButtonSize,
|
|
76
|
+
type: "primary",
|
|
77
|
+
children: (text === null || text === void 0 ? void 0 : text.confirm) || 'Confirm'
|
|
78
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
79
|
+
onClick: onCancel,
|
|
80
|
+
size: editButtonSize,
|
|
81
|
+
children: (text === null || text === void 0 ? void 0 : text.cancel) || 'Cancel'
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}));
|
|
78
86
|
});
|
|
79
87
|
export default MessageInput;
|
|
@@ -11,6 +11,9 @@ import { TextArea } from "../../Input";
|
|
|
11
11
|
import Markdown from "../../Markdown";
|
|
12
12
|
import Modal from "../../Modal";
|
|
13
13
|
import { useStyles as useTextStyles } from "../MessageInput/style";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
17
|
var MessageModal = /*#__PURE__*/memo(function (_ref) {
|
|
15
18
|
var editing = _ref.editing,
|
|
16
19
|
open = _ref.open,
|
|
@@ -52,23 +55,26 @@ var MessageModal = /*#__PURE__*/memo(function (_ref) {
|
|
|
52
55
|
overflowX: 'hidden',
|
|
53
56
|
overflowY: 'auto'
|
|
54
57
|
};
|
|
55
|
-
var modalFooter = isEdit ? /*#__PURE__*/
|
|
58
|
+
var modalFooter = isEdit ? /*#__PURE__*/_jsxs(Flexbox, {
|
|
56
59
|
direction: 'horizontal-reverse',
|
|
57
|
-
gap: 8
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
gap: 8,
|
|
61
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
62
|
+
onClick: function onClick() {
|
|
63
|
+
setTyping(false);
|
|
64
|
+
onChange === null || onChange === void 0 || onChange(temporaryValue);
|
|
65
|
+
setValue(value);
|
|
66
|
+
},
|
|
67
|
+
type: "primary",
|
|
68
|
+
children: (text === null || text === void 0 ? void 0 : text.confirm) || 'Confirm'
|
|
69
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
70
|
+
onClick: function onClick() {
|
|
71
|
+
setTyping(false);
|
|
72
|
+
setValue(value);
|
|
73
|
+
},
|
|
74
|
+
children: (text === null || text === void 0 ? void 0 : text.cancel) || 'Cancel'
|
|
75
|
+
})]
|
|
76
|
+
}) : footer;
|
|
77
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
72
78
|
allowFullscreen: true,
|
|
73
79
|
cancelText: (text === null || text === void 0 ? void 0 : text.cancel) || 'Cancel',
|
|
74
80
|
destroyOnClose: true,
|
|
@@ -83,30 +89,34 @@ var MessageModal = /*#__PURE__*/memo(function (_ref) {
|
|
|
83
89
|
return setTyping(true);
|
|
84
90
|
},
|
|
85
91
|
open: showModal,
|
|
86
|
-
title: text === null || text === void 0 ? void 0 : text.title
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
92
|
+
title: text === null || text === void 0 ? void 0 : text.title,
|
|
93
|
+
children: isEdit ? /*#__PURE__*/_jsx(TextArea, {
|
|
94
|
+
autoSize: isAutoSize,
|
|
95
|
+
className: textStyles,
|
|
96
|
+
onBlur: function onBlur(e) {
|
|
97
|
+
return setValue(e.target.value);
|
|
98
|
+
},
|
|
99
|
+
onChange: function onChange(e) {
|
|
100
|
+
return setValue(e.target.value);
|
|
101
|
+
},
|
|
102
|
+
placeholder: placeholder,
|
|
103
|
+
resize: false,
|
|
104
|
+
style: {
|
|
105
|
+
flex: mobile ? 1 : undefined,
|
|
106
|
+
height: isAutoSize ? 'unset' : height,
|
|
107
|
+
minHeight: mobile ? 'unset' : '100%'
|
|
108
|
+
},
|
|
109
|
+
type: mobile ? 'pure' : 'block',
|
|
110
|
+
value: temporaryValue
|
|
111
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
112
|
+
children: [extra, /*#__PURE__*/_jsx(Markdown, {
|
|
113
|
+
style: value ? markdownStyle : _objectSpread(_objectSpread({}, markdownStyle), {}, {
|
|
114
|
+
opacity: 0.5
|
|
115
|
+
}),
|
|
116
|
+
variant: 'chat',
|
|
117
|
+
children: String(value || placeholder)
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
});
|
|
111
121
|
});
|
|
112
122
|
export default MessageModal;
|
|
@@ -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 = ["className", "displayMode", "maxValue", "value", "text", "shape", "unoptimized"];
|
|
6
6
|
import { useResponsive } from 'antd-style';
|
|
@@ -9,6 +9,8 @@ import { forwardRef } from 'react';
|
|
|
9
9
|
import { Flexbox } from 'react-layout-kit';
|
|
10
10
|
import FluentEmoji from "../../FluentEmoji";
|
|
11
11
|
import { ICON_SIZE, useStyles } from "./style";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
14
|
var format = function format(number) {
|
|
13
15
|
return numeral(number).format('0,0');
|
|
14
16
|
};
|
|
@@ -45,17 +47,19 @@ var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
45
47
|
}),
|
|
46
48
|
styles = _useStyles.styles,
|
|
47
49
|
cx = _useStyles.cx;
|
|
48
|
-
return /*#__PURE__*/
|
|
50
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
49
51
|
align: 'center',
|
|
50
52
|
className: cx(styles.container, className),
|
|
51
53
|
flex: 'none',
|
|
52
54
|
gap: 4,
|
|
53
55
|
horizontal: true,
|
|
54
56
|
ref: ref
|
|
55
|
-
}, rest),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
}, rest), {}, {
|
|
58
|
+
children: [/*#__PURE__*/_jsx(FluentEmoji, {
|
|
59
|
+
emoji: emoji,
|
|
60
|
+
size: ICON_SIZE,
|
|
61
|
+
unoptimized: unoptimized
|
|
62
|
+
}), valueLeft > 0 ? [mobile ? '' : displayMode === 'remained' ? (text === null || text === void 0 ? void 0 : text.remained) || 'Remained' : (text === null || text === void 0 ? void 0 : text.used) || 'Used', displayMode === 'remained' ? format(valueLeft) : format(value)].join(' ') : (text === null || text === void 0 ? void 0 : text.overload) || 'Overload']
|
|
63
|
+
}));
|
|
60
64
|
});
|
|
61
65
|
export default TokenTag;
|
|
@@ -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 = ["value", "onChange", "onValueChanging", "onChangeEnd"];
|
|
@@ -7,6 +7,8 @@ import { RotateCcw, Save } from 'lucide-react';
|
|
|
7
7
|
import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
8
8
|
import ActionIcon from "../ActionIcon";
|
|
9
9
|
import { Input } from "../Input";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
export var ControlInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
11
13
|
var value = _ref.value,
|
|
12
14
|
onChange = _ref.onChange,
|
|
@@ -25,7 +27,7 @@ export var ControlInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
25
27
|
useEffect(function () {
|
|
26
28
|
if (value !== undefined) setInput(value);
|
|
27
29
|
}, [value]);
|
|
28
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/_jsx(Input, _objectSpread({
|
|
29
31
|
autoFocus: true,
|
|
30
32
|
onBlur: function onBlur() {
|
|
31
33
|
isFocusing.current = false;
|
|
@@ -53,27 +55,29 @@ export var ControlInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
53
55
|
}
|
|
54
56
|
},
|
|
55
57
|
ref: ref,
|
|
56
|
-
suffix: value === input ? /*#__PURE__*/
|
|
58
|
+
suffix: value === input ? /*#__PURE__*/_jsx("span", {}) : /*#__PURE__*/_jsx(ConfigProvider, {
|
|
57
59
|
theme: {
|
|
58
60
|
token: {
|
|
59
61
|
fontSize: 14
|
|
60
62
|
}
|
|
61
|
-
}
|
|
62
|
-
}, /*#__PURE__*/React.createElement(Space, {
|
|
63
|
-
size: 2
|
|
64
|
-
}, /*#__PURE__*/React.createElement(ActionIcon, {
|
|
65
|
-
icon: RotateCcw,
|
|
66
|
-
onClick: function onClick() {
|
|
67
|
-
setInput(value);
|
|
68
63
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
65
|
+
size: 2,
|
|
66
|
+
children: [/*#__PURE__*/_jsx(ActionIcon, {
|
|
67
|
+
icon: RotateCcw,
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
setInput(value);
|
|
70
|
+
},
|
|
71
|
+
size: "small",
|
|
72
|
+
title: "Reset"
|
|
73
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
74
|
+
icon: Save,
|
|
75
|
+
onClick: updateValue,
|
|
76
|
+
size: "small",
|
|
77
|
+
title: "\u2705 Save"
|
|
78
|
+
})]
|
|
79
|
+
})
|
|
80
|
+
}),
|
|
77
81
|
value: input
|
|
78
82
|
}, rest));
|
|
79
83
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const FALLBACK_LANG = "txt";
|
|
2
|
-
export declare const useHighlight: (text: string, lang: string, isDarkMode: boolean) => import("swr/_internal").SWRResponse<string, any, any>;
|
|
2
|
+
export declare const useHighlight: (text: string, lang: string, isDarkMode: boolean) => import("swr/dist/_internal").SWRResponse<string, any, any>;
|
|
3
3
|
export { default as languageMap } from './languageMap';
|
package/es/mdx/Callout/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
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
@@ -11,6 +10,8 @@ import { AlertOctagon, AlertTriangle, Info, Lightbulb, MessageSquareWarning } fr
|
|
|
11
10
|
import { rgba } from 'polished';
|
|
12
11
|
import { Flexbox } from 'react-layout-kit';
|
|
13
12
|
import Icon from "../../Icon";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
var useStyles = createStyles(function (_ref) {
|
|
15
16
|
var css = _ref.css;
|
|
16
17
|
return {
|
|
@@ -55,7 +56,7 @@ var Callout = function Callout(_ref2) {
|
|
|
55
56
|
var selectedType = (typeConfig === null || typeConfig === void 0 ? void 0 : typeConfig[type]) || typeConfig.info;
|
|
56
57
|
var icon = selectedType.icon,
|
|
57
58
|
color = selectedType.color;
|
|
58
|
-
return /*#__PURE__*/
|
|
59
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
59
60
|
align: 'flex-start',
|
|
60
61
|
className: cx(styles.container, className),
|
|
61
62
|
horizontal: true,
|
|
@@ -64,16 +65,21 @@ var Callout = function Callout(_ref2) {
|
|
|
64
65
|
borderColor: rgba(color, 0.5),
|
|
65
66
|
color: color
|
|
66
67
|
}, style)
|
|
67
|
-
}, rest),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
}, rest), {}, {
|
|
69
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
70
|
+
icon: icon,
|
|
71
|
+
size: {
|
|
72
|
+
fontSize: '1.2em'
|
|
73
|
+
},
|
|
74
|
+
style: {
|
|
75
|
+
marginBlock: '0.25em'
|
|
76
|
+
}
|
|
77
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
78
|
+
className: cx(styles.content, type === 'info' && styles.underlineAnchor),
|
|
79
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
80
|
+
children: children
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
83
|
+
}));
|
|
78
84
|
};
|
|
79
85
|
export default Callout;
|
package/es/mdx/Cards/Card.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 = ["tag", "tagColor", "icon", "title", "desc", "href", "iconProps", "className", "image"];
|
|
@@ -11,6 +11,8 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
11
11
|
import A from "../../A";
|
|
12
12
|
import Icon from "../../Icon";
|
|
13
13
|
import Img from "../../Img";
|
|
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
|
cx = _ref.cx,
|
|
@@ -37,50 +39,61 @@ var Card = function Card(_ref2) {
|
|
|
37
39
|
var _useStyles = useStyles(),
|
|
38
40
|
cx = _useStyles.cx,
|
|
39
41
|
styles = _useStyles.styles;
|
|
40
|
-
return /*#__PURE__*/
|
|
41
|
-
href: href
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
42
|
+
return /*#__PURE__*/_jsx(A, {
|
|
43
|
+
href: href,
|
|
44
|
+
children: /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
45
|
+
align: 'flex-start',
|
|
46
|
+
className: cx(styles.card, className)
|
|
47
|
+
}, rest), {}, {
|
|
48
|
+
children: [image && /*#__PURE__*/_jsx(Img, {
|
|
49
|
+
alt: title,
|
|
50
|
+
height: 100,
|
|
51
|
+
src: image,
|
|
52
|
+
style: {
|
|
53
|
+
height: 'auto',
|
|
54
|
+
width: '100%'
|
|
55
|
+
},
|
|
56
|
+
width: 250
|
|
57
|
+
}), tag && /*#__PURE__*/_jsx(Flexbox, {
|
|
58
|
+
align: 'flex-start',
|
|
59
|
+
className: styles.content,
|
|
60
|
+
style: {
|
|
61
|
+
paddingBottom: '0.2em',
|
|
62
|
+
paddingTop: '1.8em'
|
|
63
|
+
},
|
|
64
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
|
65
|
+
bordered: false,
|
|
66
|
+
color: tagColor,
|
|
67
|
+
style: {
|
|
68
|
+
borderRadius: '1em',
|
|
69
|
+
fontSize: '0.8em',
|
|
70
|
+
fontWeight: 500,
|
|
71
|
+
paddingBlock: '0.1em',
|
|
72
|
+
paddingInline: '0.6em'
|
|
73
|
+
},
|
|
74
|
+
children: tag
|
|
75
|
+
})
|
|
76
|
+
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
77
|
+
align: desc ? 'flex-start' : 'center',
|
|
78
|
+
className: styles.content,
|
|
79
|
+
gap: '0.75em',
|
|
80
|
+
horizontal: true,
|
|
81
|
+
children: [!image && icon && /*#__PURE__*/_jsx(Icon, _objectSpread({
|
|
82
|
+
className: styles.icon,
|
|
83
|
+
icon: icon,
|
|
84
|
+
size: {
|
|
85
|
+
fontSize: '1.5em'
|
|
86
|
+
}
|
|
87
|
+
}, iconProps)), /*#__PURE__*/_jsxs(Flexbox, {
|
|
88
|
+
gap: '0.2em',
|
|
89
|
+
children: [/*#__PURE__*/_jsx("h3", {
|
|
90
|
+
children: title
|
|
91
|
+
}), desc && /*#__PURE__*/_jsx("p", {
|
|
92
|
+
children: desc
|
|
93
|
+
})]
|
|
94
|
+
})]
|
|
95
|
+
})]
|
|
96
|
+
}))
|
|
97
|
+
});
|
|
85
98
|
};
|
|
86
99
|
export default Card;
|
package/es/mdx/Cards/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
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
6
6
|
var _excluded = ["children", "className", "maxItemWidth", "rows"];
|
|
7
7
|
var _templateObject;
|
|
8
8
|
import { createStyles } from 'antd-style';
|
|
9
9
|
import Grid from "../../Grid";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
var useStyles = createStyles(function (_ref) {
|
|
11
12
|
var css = _ref.css;
|
|
12
13
|
return {
|
|
@@ -24,10 +25,12 @@ var Cards = function Cards(_ref2) {
|
|
|
24
25
|
var _useStyles = useStyles(),
|
|
25
26
|
cx = _useStyles.cx,
|
|
26
27
|
styles = _useStyles.styles;
|
|
27
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/_jsx(Grid, _objectSpread(_objectSpread({
|
|
28
29
|
className: cx(styles.container, className),
|
|
29
30
|
maxItemWidth: maxItemWidth,
|
|
30
31
|
rows: rows
|
|
31
|
-
}, rest),
|
|
32
|
+
}, rest), {}, {
|
|
33
|
+
children: children
|
|
34
|
+
}));
|
|
32
35
|
};
|
|
33
36
|
export default Cards;
|
package/es/mdx/FileTree/File.js
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
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 = ["name", "icon"];
|
|
6
6
|
import { FileIcon } from 'lucide-react';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
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 File = function File(_ref) {
|
|
10
12
|
var name = _ref.name,
|
|
11
13
|
_ref$icon = _ref.icon,
|
|
12
14
|
icon = _ref$icon === void 0 ? FileIcon : _ref$icon,
|
|
13
15
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
15
17
|
align: 'center',
|
|
16
18
|
gap: 4,
|
|
17
19
|
horizontal: true
|
|
18
|
-
}, rest),
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
}, rest), {}, {
|
|
21
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
22
|
+
icon: icon
|
|
23
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
24
|
+
children: name
|
|
25
|
+
})]
|
|
26
|
+
}));
|
|
21
27
|
};
|
|
22
28
|
export default File;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
6
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
@@ -10,6 +11,8 @@ import { FolderIcon, FolderOpen } from 'lucide-react';
|
|
|
10
11
|
import { useState } from 'react';
|
|
11
12
|
import { Flexbox } from 'react-layout-kit';
|
|
12
13
|
import Icon from "../../Icon";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
16
|
var useStyles = createStyles(function (_ref) {
|
|
14
17
|
var css = _ref.css,
|
|
15
18
|
token = _ref.token;
|
|
@@ -31,18 +34,24 @@ var Folder = function Folder(_ref2) {
|
|
|
31
34
|
setOpen = _useState2[1];
|
|
32
35
|
var _useStyles = useStyles(),
|
|
33
36
|
styles = _useStyles.styles;
|
|
34
|
-
return /*#__PURE__*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({}, rest), {}, {
|
|
38
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
39
|
+
align: 'center',
|
|
40
|
+
className: styles.folder,
|
|
41
|
+
gap: 4,
|
|
42
|
+
horizontal: true,
|
|
43
|
+
onClick: function onClick() {
|
|
44
|
+
return setOpen(!open);
|
|
45
|
+
},
|
|
46
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
47
|
+
icon: open ? FolderOpen : icon
|
|
48
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
49
|
+
children: name
|
|
50
|
+
})]
|
|
51
|
+
}), open && /*#__PURE__*/_jsx(Flexbox, {
|
|
52
|
+
className: styles.folderChildren,
|
|
53
|
+
children: children
|
|
54
|
+
})]
|
|
55
|
+
}));
|
|
47
56
|
};
|
|
48
57
|
export default Folder;
|