@lobehub/ui 1.157.1 → 1.158.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 +11 -15
- package/es/ActionIconGroup/index.js +45 -47
- package/es/Alert/index.js +43 -50
- package/es/Avatar/index.js +10 -12
- package/es/Burger/index.js +30 -35
- package/es/CodeEditor/index.js +38 -41
- package/es/Collapse/index.js +3 -3
- package/es/ColorScales/ScaleRow.js +39 -43
- package/es/ColorScales/index.js +57 -59
- package/es/ConfigProvider/index.js +3 -5
- package/es/ContextMenu/index.js +2 -3
- package/es/CopyButton/index.js +3 -4
- package/es/DraggablePanel/components/DraggablePanelBody.js +2 -3
- package/es/DraggablePanel/components/DraggablePanelContainer.js +2 -3
- package/es/DraggablePanel/components/DraggablePanelFooter.js +2 -3
- package/es/DraggablePanel/components/DraggablePanelHeader.js +5 -9
- package/es/DraggablePanel/index.js +28 -35
- package/es/EditableText/index.js +13 -16
- package/es/EmojiPicker/AvatarUploader.js +60 -71
- package/es/EmojiPicker/index.js +101 -110
- package/es/EmptyCard/index.js +23 -31
- package/es/FileTypeIcon/index.js +44 -55
- package/es/FluentEmoji/index.js +4 -6
- package/es/Footer/index.js +8 -10
- package/es/Form/components/FormDivider.js +2 -2
- package/es/Form/components/FormFlatGroup.js +4 -9
- package/es/Form/components/FormFooter.js +3 -6
- package/es/Form/components/FormGroup.js +15 -21
- package/es/Form/components/FormItem.js +10 -17
- package/es/Form/components/FormTitle.js +15 -23
- package/es/Form/index.js +26 -30
- package/es/FormModal/index.js +30 -34
- package/es/Grid/index.js +3 -6
- package/es/Header/index.js +49 -65
- package/es/Highlighter/FullFeatured.js +41 -51
- package/es/Highlighter/SyntaxHighlighter/index.js +19 -30
- package/es/Highlighter/index.js +19 -29
- package/es/Icon/icons/DiscordIcon.js +2 -3
- package/es/Icon/index.js +13 -16
- package/es/Image/ImageGallery.js +3 -5
- package/es/Image/Preview.js +5 -6
- package/es/Image/index.js +34 -38
- package/es/Image/usePreview.js +33 -37
- package/es/Img/index.js +2 -2
- package/es/Input/index.js +3 -3
- package/es/Layout/index.js +35 -63
- package/es/List/ListItem/index.js +53 -67
- package/es/Markdown/CodeBlock.js +10 -16
- package/es/Markdown/Typography.js +3 -6
- package/es/Markdown/index.js +18 -22
- package/es/MaterialFileTypeIcon/index.js +17 -20
- package/es/MaterialFileTypeIcon/utils.d.ts +2 -2
- package/es/Mermaid/FullFeatured.js +35 -45
- package/es/Mermaid/index.js +17 -26
- package/es/Mermaid/useMermaid.d.ts +2 -1
- package/es/Mermaid/useMermaid.js +3 -5
- package/es/Modal/index.js +48 -60
- package/es/SearchBar/index.js +48 -52
- package/es/SelectWithImg/index.js +34 -40
- package/es/SideNav/index.js +15 -22
- package/es/SliderWithInput/index.js +35 -38
- package/es/Snippet/index.js +10 -15
- package/es/SortableList/DragHandle.js +3 -3
- package/es/SortableList/SortableItem.js +16 -19
- package/es/SortableList/SortableOverlay.js +3 -5
- package/es/SortableList/index.js +15 -23
- package/es/Swatches/index.js +18 -20
- package/es/TabsNav/index.js +2 -3
- package/es/Tag/index.js +7 -12
- package/es/ThemeProvider/Meta.js +53 -58
- package/es/ThemeProvider/index.js +17 -23
- package/es/ThemeSwitch/index.js +15 -19
- package/es/Toc/TocMobile.js +47 -52
- package/es/Toc/index.js +8 -13
- package/es/Tooltip/index.js +2 -3
- package/es/Video/index.js +41 -47
- package/es/awesome/AuroraBackground/index.js +11 -18
- package/es/awesome/Features/Item.js +37 -45
- package/es/awesome/Features/index.js +5 -4
- package/es/awesome/GaussianBackground/index.js +8 -13
- package/es/awesome/GaussianBackground/useGaussianBackground.d.ts +1 -1
- package/es/awesome/GaussianBackground/useGaussianBackground.js +1 -1
- package/es/awesome/Giscus/index.js +13 -15
- package/es/awesome/GradientButton/index.js +5 -9
- package/es/awesome/GridBackground/Grid.js +49 -61
- package/es/awesome/GridBackground/GridShowcase.js +24 -28
- package/es/awesome/GridBackground/index.js +27 -33
- package/es/awesome/Hero/index.js +63 -74
- package/es/awesome/Spline/ParentSize.js +7 -8
- package/es/awesome/Spline/index.js +10 -13
- package/es/awesome/Spotlight/index.js +3 -4
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +5 -8
- package/es/awesome/SpotlightCard/index.js +9 -12
- package/es/brand/BrandLoading/index.js +2 -3
- package/es/brand/LobeChat/index.js +29 -38
- package/es/brand/LobeChatText/index.js +8 -13
- package/es/brand/LobeHub/index.js +29 -38
- package/es/brand/LobeHubText/index.js +4 -9
- package/es/brand/Logo3d/index.js +2 -3
- package/es/brand/LogoFlat/index.js +44 -49
- package/es/brand/LogoMono/index.js +48 -53
- package/es/brand/LogoThree/Loading.js +9 -11
- package/es/brand/LogoThree/LogoSpline.js +10 -12
- package/es/brand/LogoThree/index.js +23 -25
- package/es/brand/components/Divider.js +4 -6
- package/es/chat/BackBottom/index.js +4 -6
- package/es/chat/ChatHeader/ChatHeaderTitle.js +22 -31
- package/es/chat/ChatHeader/index.js +35 -42
- package/es/chat/ChatInputArea/ChatInputActionBar.js +16 -21
- package/es/chat/ChatInputArea/ChatInputArea.d.ts +1 -1
- package/es/chat/ChatInputArea/ChatInputArea.js +19 -23
- package/es/chat/ChatInputArea/ChatInputAreaInner.d.ts +1 -1
- package/es/chat/ChatInputArea/ChatInputAreaInner.js +2 -3
- package/es/chat/ChatInputArea/SendButton.js +36 -51
- package/es/chat/ChatItem/components/Actions.js +3 -5
- package/es/chat/ChatItem/components/Avatar.js +17 -21
- package/es/chat/ChatItem/components/BorderSpacing.js +1 -2
- package/es/chat/ChatItem/components/ErrorContent.js +9 -11
- package/es/chat/ChatItem/components/Loading.js +10 -12
- package/es/chat/ChatItem/components/MessageContent.js +6 -10
- package/es/chat/ChatItem/components/Title.js +3 -8
- package/es/chat/ChatItem/index.js +47 -53
- package/es/chat/ChatList/ActionsBar.js +2 -3
- package/es/chat/ChatList/HistoryDivider.js +6 -11
- package/es/chat/ChatList/Item.js +14 -12
- package/es/chat/ChatList/index.js +25 -29
- package/es/chat/EditableMessage/index.js +26 -32
- package/es/chat/EditableMessageList/index.js +72 -76
- package/es/chat/MessageInput/index.js +35 -43
- package/es/chat/MessageModal/index.js +41 -51
- package/es/chat/TokenTag/index.js +7 -11
- package/es/components/ControlInput.js +18 -22
- package/es/hooks/useHighlight.d.ts +1 -1
- package/es/mdx/Callout/index.js +13 -19
- package/es/mdx/Cards/Card.js +46 -59
- package/es/mdx/Cards/index.js +3 -6
- package/es/mdx/FileTree/File.js +5 -11
- package/es/mdx/FileTree/Folder.js +13 -22
- package/es/mdx/FileTree/index.js +3 -6
- package/es/mdx/Mdx/index.js +7 -9
- package/es/mdx/Steps/index.js +3 -6
- package/es/mdx/Tabs/Tab.js +3 -8
- package/es/mdx/Tabs/index.js +17 -21
- package/es/mdx/mdxComponents/CodeBlock.js +9 -14
- package/es/mdx/mdxComponents/Image.js +2 -2
- package/es/mdx/mdxComponents/Link.js +2 -3
- package/es/mdx/mdxComponents/Pre.js +7 -14
- package/es/mdx/mdxComponents/Video.js +2 -2
- package/es/mobile/MobileChatInputArea/SendButton.js +3 -4
- package/es/mobile/MobileChatInputArea/index.js +69 -79
- package/es/mobile/MobileNavBar/MobileNavBarTitle.js +26 -37
- package/es/mobile/MobileNavBar/index.js +41 -48
- package/es/mobile/MobileSafeArea/index.js +2 -3
- package/es/mobile/MobileTabBar/index.js +29 -35
- package/es/storybook/StoryBook/index.js +19 -26
- package/package.json +41 -45
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
6
5
|
var _excluded = ["children"];
|
|
@@ -8,8 +7,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
8
7
|
import { createStyles, keyframes } from 'antd-style';
|
|
9
8
|
import { memo } from 'react';
|
|
10
9
|
import { Flexbox } from 'react-layout-kit';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
10
|
var useStyles = createStyles(function (_ref) {
|
|
14
11
|
var isDarkMode = _ref.isDarkMode,
|
|
15
12
|
css = _ref.css,
|
|
@@ -28,20 +25,16 @@ var AuroraBackground = /*#__PURE__*/memo(function (_ref2) {
|
|
|
28
25
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
29
26
|
var _useStyles = useStyles(),
|
|
30
27
|
styles = _useStyles.styles;
|
|
31
|
-
return /*#__PURE__*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
width: '100%',
|
|
43
|
-
children: children
|
|
44
|
-
})]
|
|
45
|
-
}));
|
|
28
|
+
return /*#__PURE__*/React.createElement(Flexbox, rest, /*#__PURE__*/React.createElement(Flexbox, {
|
|
29
|
+
className: styles.wrapper
|
|
30
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: styles.bg
|
|
32
|
+
})), /*#__PURE__*/React.createElement(Flexbox, {
|
|
33
|
+
flex: 1,
|
|
34
|
+
style: {
|
|
35
|
+
zIndex: 1
|
|
36
|
+
},
|
|
37
|
+
width: '100%'
|
|
38
|
+
}, children));
|
|
46
39
|
});
|
|
47
40
|
export default AuroraBackground;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["style", "className", "row", "column", "description", "image", "title", "link", "icon", "imageStyle", "openExternal"];
|
|
@@ -9,23 +10,21 @@ import Img from "../../Img";
|
|
|
9
10
|
import { useStyles } from "./style";
|
|
10
11
|
|
|
11
12
|
// @ts-ignore
|
|
12
|
-
|
|
13
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
|
|
14
14
|
var Image = /*#__PURE__*/memo(function (_ref) {
|
|
15
15
|
var image = _ref.image,
|
|
16
16
|
className = _ref.className,
|
|
17
17
|
title = _ref.title,
|
|
18
18
|
style = _ref.style;
|
|
19
|
-
return image.startsWith('http') ? /*#__PURE__*/
|
|
19
|
+
return image.startsWith('http') ? /*#__PURE__*/React.createElement(Img, {
|
|
20
20
|
alt: title,
|
|
21
21
|
className: className,
|
|
22
22
|
src: image,
|
|
23
23
|
style: style
|
|
24
|
-
}) : /*#__PURE__*/
|
|
24
|
+
}) : /*#__PURE__*/React.createElement(Center, {
|
|
25
25
|
className: className,
|
|
26
|
-
style: style
|
|
27
|
-
|
|
28
|
-
});
|
|
26
|
+
style: style
|
|
27
|
+
}, image);
|
|
29
28
|
});
|
|
30
29
|
var Item = /*#__PURE__*/memo(function (_ref2) {
|
|
31
30
|
var style = _ref2.style,
|
|
@@ -47,48 +46,41 @@ var Item = /*#__PURE__*/memo(function (_ref2) {
|
|
|
47
46
|
}),
|
|
48
47
|
styles = _useStyles.styles,
|
|
49
48
|
cx = _useStyles.cx;
|
|
50
|
-
return /*#__PURE__*/
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
51
50
|
className: cx(styles.container, className),
|
|
52
51
|
style: _objectSpread({
|
|
53
52
|
gridColumn: "span ".concat(column || 1),
|
|
54
53
|
gridRow: "span ".concat(rowNumber)
|
|
55
54
|
}, style)
|
|
56
|
-
}, rest),
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
rel: "noreferrer",
|
|
87
|
-
target: openExternal ? '_blank' : undefined,
|
|
88
|
-
children: "Read More"
|
|
89
|
-
})
|
|
90
|
-
})]
|
|
91
|
-
})
|
|
92
|
-
}));
|
|
55
|
+
}, rest), /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: styles.cell
|
|
57
|
+
}, image || icon && /*#__PURE__*/React.createElement(Center, {
|
|
58
|
+
className: styles.imgContainer,
|
|
59
|
+
style: imageStyle
|
|
60
|
+
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
+
className: styles.img,
|
|
62
|
+
icon: icon
|
|
63
|
+
}), image && /*#__PURE__*/React.createElement(Image, {
|
|
64
|
+
className: styles.img,
|
|
65
|
+
image: image,
|
|
66
|
+
title: title
|
|
67
|
+
})), title && /*#__PURE__*/React.createElement(Flexbox, {
|
|
68
|
+
align: 'center',
|
|
69
|
+
as: 'h3',
|
|
70
|
+
className: styles.title,
|
|
71
|
+
gap: 8,
|
|
72
|
+
horizontal: true
|
|
73
|
+
}, title), description && /*#__PURE__*/React.createElement("p", {
|
|
74
|
+
className: styles.desc,
|
|
75
|
+
dangerouslySetInnerHTML: {
|
|
76
|
+
__html: description
|
|
77
|
+
}
|
|
78
|
+
}), link && /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
className: styles.link
|
|
80
|
+
}, /*#__PURE__*/React.createElement(A, {
|
|
81
|
+
href: link,
|
|
82
|
+
rel: "noreferrer",
|
|
83
|
+
target: openExternal ? '_blank' : undefined
|
|
84
|
+
}, "Read More"))));
|
|
93
85
|
});
|
|
94
86
|
export default Item;
|
|
@@ -1,12 +1,12 @@
|
|
|
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";
|
|
4
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
6
|
var _excluded = ["items", "className", "itemClassName", "itemStyle", "maxWidth", "style"];
|
|
6
7
|
import { memo } from 'react';
|
|
7
8
|
import SpotlightCard from "../SpotlightCard";
|
|
8
9
|
import { default as Item } from "./Item";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
var Features = /*#__PURE__*/memo(function (_ref) {
|
|
11
11
|
var items = _ref.items,
|
|
12
12
|
className = _ref.className,
|
|
@@ -17,14 +17,15 @@ var Features = /*#__PURE__*/memo(function (_ref) {
|
|
|
17
17
|
style = _ref.style,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
if (!(items !== null && items !== void 0 && items.length)) return;
|
|
20
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/React.createElement(SpotlightCard, _extends({
|
|
21
21
|
className: className,
|
|
22
22
|
items: items,
|
|
23
23
|
renderItem: function renderItem(item) {
|
|
24
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement(Item, _extends({
|
|
25
25
|
className: itemClassName,
|
|
26
|
+
key: item.title,
|
|
26
27
|
style: itemStyle
|
|
27
|
-
}, item)
|
|
28
|
+
}, item));
|
|
28
29
|
},
|
|
29
30
|
style: _objectSpread({
|
|
30
31
|
maxWidth: maxWidth
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["layers", "options", "className", "children", "classNames", "style"];
|
|
6
6
|
import { memo, useEffect, useRef } from 'react';
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
9
|
import { useGaussianBackground } from "./useGaussianBackground";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
10
|
var DEFAULT_OPTIONS = {
|
|
13
11
|
blurRadius: 16,
|
|
14
12
|
fpsCap: 60,
|
|
@@ -32,17 +30,14 @@ var GaussianBackground = /*#__PURE__*/memo(function (_ref) {
|
|
|
32
30
|
if (!run) return;
|
|
33
31
|
run(layers, options);
|
|
34
32
|
}, [run, options, layers]);
|
|
35
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
36
34
|
className: cx(styles.container, className),
|
|
37
35
|
style: style
|
|
38
|
-
}, rest),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
children: children
|
|
45
|
-
})]
|
|
46
|
-
}));
|
|
36
|
+
}, rest), /*#__PURE__*/React.createElement("canvas", {
|
|
37
|
+
className: cx(styles.canvas, classNames === null || classNames === void 0 ? void 0 : classNames.canvas),
|
|
38
|
+
ref: ref
|
|
39
|
+
}), /*#__PURE__*/React.createElement(Flexbox, {
|
|
40
|
+
className: cx(styles.content, classNames === null || classNames === void 0 ? void 0 : classNames.content)
|
|
41
|
+
}, children));
|
|
47
42
|
});
|
|
48
43
|
export default GaussianBackground;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { ColorLayer } from './vendor/gaussianBackground';
|
|
3
|
-
export declare const useGaussianBackground: (ref: RefObject<HTMLCanvasElement>) => (layers: ColorLayer[], options?: {
|
|
3
|
+
export declare const useGaussianBackground: (ref: RefObject<HTMLCanvasElement | null>) => (layers: ColorLayer[], options?: {
|
|
4
4
|
blurRadius?: number;
|
|
5
5
|
fpsCap?: number;
|
|
6
6
|
scale?: number;
|
|
@@ -7,7 +7,7 @@ export var useGaussianBackground = function useGaussianBackground(ref) {
|
|
|
7
7
|
client = _useState2[0],
|
|
8
8
|
setClient = _useState2[1];
|
|
9
9
|
useEffect(function () {
|
|
10
|
-
if (!ref.current) return;
|
|
10
|
+
if (!(ref !== null && ref !== void 0 && ref.current)) return;
|
|
11
11
|
setClient(new GaussianBackgroundClient(ref.current));
|
|
12
12
|
}, []);
|
|
13
13
|
var handleRun = useCallback(function (layers, options) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["style", "className", "reactionsEnabled", "mapping", "lang", "inputPosition", "id", "loading", "emitMetadata"];
|
|
6
6
|
import GiscusComponent from '@giscus/react';
|
|
7
7
|
import { useTheme, useThemeMode } from 'antd-style';
|
|
8
8
|
import { memo, useMemo } from 'react';
|
|
9
9
|
import { formatLang, genStyles } from "./style";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
10
|
var Giscus = /*#__PURE__*/memo(function (_ref) {
|
|
12
11
|
var style = _ref.style,
|
|
13
12
|
className = _ref.className,
|
|
@@ -32,19 +31,18 @@ var Giscus = /*#__PURE__*/memo(function (_ref) {
|
|
|
32
31
|
var giscusTheme = useMemo(function () {
|
|
33
32
|
return btoa(genStyles(token, isDarkMode).styles);
|
|
34
33
|
}, [isDarkMode, token]);
|
|
35
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
35
|
className: className,
|
|
37
|
-
style: style
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
36
|
+
style: style
|
|
37
|
+
}, /*#__PURE__*/React.createElement(GiscusComponent, _extends({
|
|
38
|
+
emitMetadata: emitMetadata,
|
|
39
|
+
id: id,
|
|
40
|
+
inputPosition: inputPosition,
|
|
41
|
+
lang: formatLang(lang),
|
|
42
|
+
loading: loading,
|
|
43
|
+
mapping: mapping,
|
|
44
|
+
reactionsEnabled: reactionsEnabled,
|
|
45
|
+
theme: "data:text/css;base64,".concat(giscusTheme)
|
|
46
|
+
}, rest)));
|
|
49
47
|
});
|
|
50
48
|
export default Giscus;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["glow", "children", "className", "size"];
|
|
6
6
|
import { Button } from 'antd';
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
9
|
var GradientButton = /*#__PURE__*/memo(function (_ref) {
|
|
12
10
|
var _ref$glow = _ref.glow,
|
|
13
11
|
glow = _ref$glow === void 0 ? true : _ref$glow,
|
|
@@ -19,13 +17,11 @@ var GradientButton = /*#__PURE__*/memo(function (_ref) {
|
|
|
19
17
|
var _useStyles = useStyles(size),
|
|
20
18
|
styles = _useStyles.styles,
|
|
21
19
|
cx = _useStyles.cx;
|
|
22
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
23
21
|
className: cx(styles.button, className),
|
|
24
22
|
size: size
|
|
25
|
-
}, rest),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}), children]
|
|
29
|
-
}));
|
|
23
|
+
}, rest), glow && /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: styles.glow
|
|
25
|
+
}), children);
|
|
30
26
|
});
|
|
31
27
|
export default GradientButton;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
2
|
var _excluded = ["color", "strokeWidth", "linePick"];
|
|
4
3
|
import { isUndefined } from 'lodash-es';
|
|
5
4
|
import { memo, useCallback } from 'react';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
5
|
var Line = /*#__PURE__*/function (Line) {
|
|
10
6
|
Line[Line["l7"] = 0] = "l7";
|
|
11
7
|
Line[Line["l6"] = 1] = "l6";
|
|
@@ -35,63 +31,55 @@ var Grid = /*#__PURE__*/memo(function (_ref) {
|
|
|
35
31
|
var showLine = useCallback(function (l) {
|
|
36
32
|
return isUnpick || linePick === l;
|
|
37
33
|
}, [linePick]);
|
|
38
|
-
var vLine = /*#__PURE__*/
|
|
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
|
-
d: "M3726 420v-60.343c0-21.82-14.15-41.12-34.959-47.684L2702 0h0"
|
|
69
|
-
})]
|
|
70
|
-
});
|
|
71
|
-
var hLine = isUnpick && /*#__PURE__*/_jsxs(_Fragment, {
|
|
72
|
-
children: [/*#__PURE__*/_jsx("path", {
|
|
73
|
-
d: "M2835 42H892"
|
|
74
|
-
}), /*#__PURE__*/_jsx("path", {
|
|
75
|
-
d: "M595 136h2538"
|
|
76
|
-
}), /*#__PURE__*/_jsx("path", {
|
|
77
|
-
d: "M237 249h3254"
|
|
78
|
-
})]
|
|
79
|
-
});
|
|
80
|
-
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
81
|
-
children: /*#__PURE__*/_jsx("svg", {
|
|
82
|
-
style: {
|
|
83
|
-
width: '100%'
|
|
84
|
-
},
|
|
85
|
-
viewBox: "0 0 3728 422",
|
|
86
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
87
|
-
children: /*#__PURE__*/_jsxs("g", {
|
|
88
|
-
fill: "none",
|
|
89
|
-
fillRule: "evenodd",
|
|
90
|
-
stroke: color,
|
|
91
|
-
strokeWidth: strokeWidth,
|
|
92
|
-
children: [vLine, hLine]
|
|
93
|
-
})
|
|
94
|
-
})
|
|
34
|
+
var vLine = /*#__PURE__*/React.createElement(React.Fragment, null, showLine(Line.l7) && /*#__PURE__*/React.createElement("path", {
|
|
35
|
+
d: "M2 420v-60.343c0-21.82 14.15-41.12 34.959-47.684L1026 0h0"
|
|
36
|
+
}), showLine(Line.l6) && /*#__PURE__*/React.createElement("path", {
|
|
37
|
+
d: "M268 420v-62.077c0-20.977 13.094-39.724 32.789-46.944L1149 0h0"
|
|
38
|
+
}), showLine(Line.l5) && /*#__PURE__*/React.createElement("path", {
|
|
39
|
+
d: "M534 420v-64.358a50 50 0 0129.884-45.775L1269 0h0"
|
|
40
|
+
}), showLine(Line.l4) && /*#__PURE__*/React.createElement("path", {
|
|
41
|
+
d: "M800 420v-67.395a50 50 0 0125.958-43.84L1389 0h0"
|
|
42
|
+
}), showLine(Line.l3) && /*#__PURE__*/React.createElement("path", {
|
|
43
|
+
d: "M1066 420v-71.645a50 50 0 0120.456-40.337L1507 0h0"
|
|
44
|
+
}), showLine(Line.l2) && /*#__PURE__*/React.createElement("path", {
|
|
45
|
+
d: "M1332 420v-77.506a50 50 0 0113.194-33.843L1629 0h0"
|
|
46
|
+
}), showLine(Line.l1) && /*#__PURE__*/React.createElement("path", {
|
|
47
|
+
d: "M1598 420v-86.225a50 50 0 014.438-20.594L1744 0h0"
|
|
48
|
+
}), showLine(Line.center) && /*#__PURE__*/React.createElement("path", {
|
|
49
|
+
d: "M1864 420V0h0"
|
|
50
|
+
}), showLine(Line.r1) && /*#__PURE__*/React.createElement("path", {
|
|
51
|
+
d: "M2130 420v-86.225a50 50 0 00-4.438-20.594L1984 0h0"
|
|
52
|
+
}), showLine(Line.r2) && /*#__PURE__*/React.createElement("path", {
|
|
53
|
+
d: "M2396 420v-77.506a50 50 0 00-13.194-33.843L2099 0h0"
|
|
54
|
+
}), showLine(Line.r3) && /*#__PURE__*/React.createElement("path", {
|
|
55
|
+
d: "M2662 420v-71.645a50 50 0 00-20.456-40.337L2221 0h0"
|
|
56
|
+
}), showLine(Line.r4) && /*#__PURE__*/React.createElement("path", {
|
|
57
|
+
d: "M2928 420v-67.395a50 50 0 00-25.958-43.84L2339 0h0"
|
|
58
|
+
}), showLine(Line.r5) && /*#__PURE__*/React.createElement("path", {
|
|
59
|
+
d: "M3194 420v-64.358a50 50 0 00-29.884-45.775L2459 0h0"
|
|
60
|
+
}), showLine(Line.r6) && /*#__PURE__*/React.createElement("path", {
|
|
61
|
+
d: "M3460 420v-62.077c0-20.977-13.094-39.724-32.789-46.944L2579 0h0"
|
|
62
|
+
}), showLine(Line.r7) && /*#__PURE__*/React.createElement("path", {
|
|
63
|
+
d: "M3726 420v-60.343c0-21.82-14.15-41.12-34.959-47.684L2702 0h0"
|
|
95
64
|
}));
|
|
65
|
+
var hLine = isUnpick && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
|
|
66
|
+
d: "M2835 42H892"
|
|
67
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
68
|
+
d: "M595 136h2538"
|
|
69
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
70
|
+
d: "M237 249h3254"
|
|
71
|
+
}));
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", rest, /*#__PURE__*/React.createElement("svg", {
|
|
73
|
+
style: {
|
|
74
|
+
width: '100%'
|
|
75
|
+
},
|
|
76
|
+
viewBox: "0 0 3728 422",
|
|
77
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
78
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
79
|
+
fill: "none",
|
|
80
|
+
fillRule: "evenodd",
|
|
81
|
+
stroke: color,
|
|
82
|
+
strokeWidth: strokeWidth
|
|
83
|
+
}, vLine, hLine)));
|
|
96
84
|
});
|
|
97
85
|
export default Grid;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
6
|
var _excluded = ["style", "children", "backgroundColor", "innerProps"];
|
|
@@ -8,8 +9,6 @@ import { rgba } from 'polished';
|
|
|
8
9
|
import { memo } from 'react';
|
|
9
10
|
import { Flexbox } from 'react-layout-kit';
|
|
10
11
|
import GridBackground from "./index";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
var GridShowcase = /*#__PURE__*/memo(function (_ref) {
|
|
14
13
|
var style = _ref.style,
|
|
15
14
|
children = _ref.children,
|
|
@@ -18,35 +17,32 @@ var GridShowcase = /*#__PURE__*/memo(function (_ref) {
|
|
|
18
17
|
innerProps = _ref.innerProps,
|
|
19
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
19
|
var theme = useTheme();
|
|
21
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/React.createElement(Flexbox, _extends({
|
|
22
21
|
style: _objectSpread({
|
|
23
22
|
position: 'relative'
|
|
24
23
|
}, style)
|
|
25
|
-
}, rest),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
zIndex: 0
|
|
48
|
-
}
|
|
49
|
-
})]
|
|
24
|
+
}, rest), /*#__PURE__*/React.createElement(GridBackground, {
|
|
25
|
+
animation: true,
|
|
26
|
+
colorBack: rgba(theme.colorText, 0.12),
|
|
27
|
+
colorFront: rgba(theme.colorText, 0.6),
|
|
28
|
+
flip: true
|
|
29
|
+
}), /*#__PURE__*/React.createElement(Flexbox, _extends({
|
|
30
|
+
align: 'center'
|
|
31
|
+
}, innerProps, {
|
|
32
|
+
style: _objectSpread({
|
|
33
|
+
zIndex: 4
|
|
34
|
+
}, innerProps === null || innerProps === void 0 ? void 0 : innerProps.style)
|
|
35
|
+
}), children), /*#__PURE__*/React.createElement(GridBackground, {
|
|
36
|
+
animation: true,
|
|
37
|
+
backgroundColor: backgroundColor,
|
|
38
|
+
colorBack: rgba(theme.colorText, 0.24),
|
|
39
|
+
colorFront: theme.colorText,
|
|
40
|
+
random: true,
|
|
41
|
+
reverse: true,
|
|
42
|
+
showBackground: true,
|
|
43
|
+
style: {
|
|
44
|
+
zIndex: 0
|
|
45
|
+
}
|
|
50
46
|
}));
|
|
51
47
|
});
|
|
52
48
|
export default GridShowcase;
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
7
|
var _excluded = ["flip", "reverse", "showBackground", "backgroundColor", "random", "animationDuration", "className", "colorFront", "colorBack", "strokeWidth", "style", "animation"];
|
|
@@ -9,9 +10,6 @@ import { shuffle } from 'lodash-es';
|
|
|
9
10
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
11
|
import Grid from "./Grid";
|
|
11
12
|
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";
|
|
15
13
|
var initialGroup = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
|
|
16
14
|
var GridBackground = /*#__PURE__*/memo(function (_ref) {
|
|
17
15
|
var flip = _ref.flip,
|
|
@@ -52,45 +50,41 @@ var GridBackground = /*#__PURE__*/memo(function (_ref) {
|
|
|
52
50
|
setGroup(random ? shuffle(initialGroup) : undefined);
|
|
53
51
|
}, [random]);
|
|
54
52
|
var HighlightGrid = useCallback(function () {
|
|
55
|
-
if (!group) return /*#__PURE__*/
|
|
53
|
+
if (!group) return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
56
54
|
style: {
|
|
57
55
|
'--duration': "".concat(animationDuration, "s")
|
|
58
56
|
}
|
|
59
57
|
}, gridProps));
|
|
60
|
-
return /*#__PURE__*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
58
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, group.map(function (item, index) {
|
|
59
|
+
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
60
|
+
key: item,
|
|
61
|
+
linePick: item,
|
|
62
|
+
style: {
|
|
63
|
+
'--delay': "".concat(index + Math.random(), "s"),
|
|
64
|
+
'--duration': "".concat(animationDuration, "s")
|
|
65
|
+
}
|
|
66
|
+
}, gridProps));
|
|
67
|
+
}));
|
|
71
68
|
}, [group, animationDuration, gridProps]);
|
|
72
|
-
return /*#__PURE__*/
|
|
69
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
73
70
|
className: cx(styles.container, className),
|
|
74
71
|
ref: ref,
|
|
75
72
|
style: flip ? _objectSpread({
|
|
76
73
|
transform: 'scaleY(-1)'
|
|
77
74
|
}, style) : style
|
|
78
|
-
}, rest),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
})
|
|
93
|
-
})]
|
|
94
|
-
}));
|
|
75
|
+
}, rest), /*#__PURE__*/React.createElement(Grid, {
|
|
76
|
+
color: colorBack || theme.colorBorder,
|
|
77
|
+
strokeWidth: strokeWidth,
|
|
78
|
+
style: {
|
|
79
|
+
zIndex: 2
|
|
80
|
+
}
|
|
81
|
+
}), animation && /*#__PURE__*/React.createElement(HighlightGrid, null), showBackground && /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: styles.backgroundContainer,
|
|
83
|
+
style: size ? {
|
|
84
|
+
fontSize: size.width / 80
|
|
85
|
+
} : {}
|
|
86
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
className: styles.background
|
|
88
|
+
})));
|
|
95
89
|
});
|
|
96
90
|
export default GridBackground;
|