@lobehub/ui 1.26.0 → 1.26.2
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/ActionIcon/index.d.ts +1 -1
- package/es/ActionIcon/index.js +30 -18
- package/es/Avatar/index.js +11 -11
- package/es/Chat/store/initialState.d.ts +3 -3
- package/es/Chat/store/initialState.js +4 -4
- package/es/Chat/store/messageReducer.js +71 -49
- package/es/Chat/store/selectors.d.ts +3 -3
- package/es/Chat/store/selectors.js +3 -3
- package/es/Chat/store/store.d.ts +1 -1
- package/es/Chat/store/store.js +110 -110
- package/es/Chat/types.d.ts +1 -1
- package/es/Chat/utils/fetch.d.ts +1 -1
- package/es/Chat/utils/fetch.js +4 -4
- package/es/ChatInputArea/index.js +2 -1
- package/es/ChatInputArea/style.d.ts +3 -3
- package/es/ChatInputArea/style.js +5 -5
- package/es/ChatItem/index.js +12 -10
- package/es/ChatItem/style.d.ts +3 -3
- package/es/ChatItem/style.js +7 -7
- package/es/ChatList/ActionsBar.d.ts +1 -1
- package/es/ChatList/ActionsBar.js +12 -11
- package/es/ChatList/index.d.ts +1 -1
- package/es/ChatList/index.js +1 -1
- package/es/ColorScales/ScaleRow.js +20 -14
- package/es/ColorScales/index.js +6 -4
- package/es/ColorScales/style.d.ts +2 -2
- package/es/ColorScales/style.js +7 -7
- package/es/ContextMenu/MenuItem/index.js +14 -14
- package/es/ContextMenu/MenuItem/style.d.ts +2 -2
- package/es/ContextMenu/MenuItem/style.js +5 -5
- package/es/ContextMenu/index.js +42 -42
- package/es/ContextMenu/style.d.ts +1 -1
- package/es/ContextMenu/style.js +2 -2
- package/es/Conversation/App.js +2 -2
- package/es/Conversation/ChatList/MessageItem/Content.js +15 -15
- package/es/Conversation/ChatList/MessageItem/Toolbar.js +3 -3
- package/es/Conversation/ChatList/MessageItem/index.js +14 -14
- package/es/Conversation/ChatList/index.js +5 -5
- package/es/Conversation/InputArea/ActionBar.d.ts +2 -2
- package/es/Conversation/InputArea/ActionBar.js +2 -2
- package/es/Conversation/InputArea/index.d.ts +2 -2
- package/es/Conversation/InputArea/index.js +10 -12
- package/es/Conversation/StoreUpdater.js +1 -1
- package/es/Conversation/index.js +2 -2
- package/es/CopyButton/index.d.ts +4 -2
- package/es/CopyButton/index.js +4 -3
- package/es/DraggablePanel/index.d.ts +2 -2
- package/es/DraggablePanel/index.js +50 -42
- package/es/DraggablePanel/style.d.ts +9 -9
- package/es/DraggablePanel/style.js +17 -17
- package/es/DraggablePanel/utils.js +12 -4
- package/es/EditableMessage/index.js +4 -4
- package/es/EditableMessageList/index.js +20 -19
- package/es/EditableText/index.js +1 -1
- package/es/Features/Item.js +5 -5
- package/es/Features/Item.style.d.ts +2 -2
- package/es/Features/Item.style.js +4 -4
- package/es/Features/index.js +3 -3
- package/es/Features/style.js +2 -2
- package/es/FontLoader/index.d.ts +6 -0
- package/es/FontLoader/index.js +16 -0
- package/es/Footer/index.js +2 -2
- package/es/GradientButton/style.d.ts +1 -1
- package/es/GradientButton/style.js +2 -2
- package/es/Header/index.js +2 -2
- package/es/Header/style.d.ts +1 -1
- package/es/Header/style.js +2 -2
- package/es/Hero/style.d.ts +3 -3
- package/es/Hero/style.js +14 -13
- package/es/Highlighter/SyntaxHighlighter/Prism.js +7 -7
- package/es/Highlighter/SyntaxHighlighter/index.js +1 -1
- package/es/Highlighter/SyntaxHighlighter/style.d.ts +2 -2
- package/es/Highlighter/SyntaxHighlighter/style.js +2 -2
- package/es/Highlighter/index.d.ts +1 -2
- package/es/Highlighter/index.js +4 -3
- package/es/Highlighter/style.d.ts +1 -1
- package/es/Highlighter/style.js +2 -2
- package/es/Highlighter/theme.js +22 -22
- package/es/Icon/index.js +24 -16
- package/es/Input/index.js +4 -4
- package/es/Layout/index.js +1 -1
- package/es/Layout/style.d.ts +5 -5
- package/es/Layout/style.js +7 -7
- package/es/List/ListItem/index.d.ts +1 -1
- package/es/List/ListItem/index.js +21 -42
- package/es/List/ListItem/style.d.ts +9 -0
- package/es/List/ListItem/style.js +21 -0
- package/es/List/index.d.ts +1 -1
- package/es/Logo/index.d.ts +2 -2
- package/es/Logo/index.js +48 -38
- package/es/Logo/style.d.ts +1 -1
- package/es/Logo/style.js +2 -2
- package/es/Markdown/CodeBlock.d.ts +1 -1
- package/es/Markdown/CodeBlock.js +7 -7
- package/es/Markdown/index.js +3 -3
- package/es/Markdown/style.d.ts +1 -1
- package/es/Markdown/style.js +2 -2
- package/es/MessageInput/index.d.ts +1 -1
- package/es/MessageInput/index.js +5 -5
- package/es/MessageModal/index.js +8 -6
- package/es/MessageModal/style.d.ts +1 -1
- package/es/MessageModal/style.js +2 -2
- package/es/SearchBar/index.d.ts +1 -1
- package/es/SearchBar/index.js +13 -11
- package/es/SearchBar/style.d.ts +2 -2
- package/es/SearchBar/style.js +3 -3
- package/es/Snippet/index.js +5 -3
- package/es/Spotlight/index.js +13 -13
- package/es/Spotlight/style.js +1 -1
- package/es/StroyBook/index.d.ts +1 -2
- package/es/StroyBook/index.js +3 -3
- package/es/StroyBook/style.d.ts +1 -1
- package/es/StroyBook/style.js +2 -2
- package/es/Swatches/index.d.ts +1 -1
- package/es/Swatches/index.js +9 -9
- package/es/ThemeProvider/index.d.ts +2 -2
- package/es/ThemeProvider/index.js +3 -4
- package/es/ThemeSwitch/index.js +8 -8
- package/es/Toc/TocMobile.d.ts +4 -4
- package/es/Toc/TocMobile.js +15 -15
- package/es/Toc/style.d.ts +2 -2
- package/es/Toc/style.js +3 -3
- package/es/TokenTag/style.js +12 -7
- package/es/components/ControlInput.d.ts +1 -1
- package/es/components/ControlInput.js +7 -6
- package/es/hooks/useHighlight.js +14 -14
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/styles/algorithms/generateColorPalette.js +10 -10
- package/es/styles/algorithms/generateCustomStylish.js +5 -5
- package/es/styles/algorithms/generateCustomToken.js +42 -17
- package/es/styles/algorithms/generateTheme.js +4 -4
- package/es/styles/colors.js +65 -65
- package/es/styles/theme/base.js +2 -2
- package/es/styles/theme/dark.js +16 -16
- package/es/styles/theme/light.js +16 -16
- package/es/types/llm.d.ts +1 -1
- package/package.json +3 -3
package/es/Hero/style.js
CHANGED
|
@@ -2,26 +2,27 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref) {
|
|
5
|
-
var
|
|
5
|
+
var cx = _ref.cx,
|
|
6
|
+
css = _ref.css,
|
|
6
7
|
responsive = _ref.responsive,
|
|
7
8
|
token = _ref.token,
|
|
8
9
|
stylish = _ref.stylish;
|
|
9
10
|
return {
|
|
10
|
-
|
|
11
|
-
title: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n z-index: 10;\n margin: 0;\n font-size: 100px;\n\n ", "\n\n b {\n ", "\n position: relative;\n z-index: 5;\n background-clip: text;\n\n -webkit-text-fill-color: transparent;\n }\n "])), responsive({
|
|
12
|
-
mobile: {
|
|
13
|
-
fontSize: 72,
|
|
14
|
-
flexDirection: 'column',
|
|
15
|
-
display: 'flex',
|
|
16
|
-
lineHeight: 1.2
|
|
17
|
-
}
|
|
18
|
-
}), stylish.gradientAnimation),
|
|
19
|
-
desc: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: 0;\n font-size: ", "px;\n color: ", ";\n text-align: center;\n\n ", " {\n margin: 24px 16px;\n font-size: ", "px;\n }\n "])), token.fontSizeHeading3, token.colorTextSecondary, responsive.mobile, token.fontSizeHeading5),
|
|
20
|
-
actions: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", "\n "])), responsive({
|
|
11
|
+
actions: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-top: 24px;\n\n button {\n padding-inline: 32px !important;\n font-weight: 500;\n }\n\n ", "\n "])), responsive({
|
|
21
12
|
mobile: {
|
|
22
13
|
marginTop: 24
|
|
23
14
|
}
|
|
24
15
|
})),
|
|
25
|
-
canvas: css(
|
|
16
|
+
canvas: cx(stylish.gradientAnimation, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 10;\n top: -250px;\n left: 50%;\n transform: translateX(-50%) scale(1.5);\n\n width: 600px;\n height: 400px;\n\n opacity: 0.2;\n filter: blur(100px);\n\n ", " {\n width: 200px;\n height: 300px;\n }\n "])), responsive.mobile)),
|
|
17
|
+
container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n box-sizing: border-box;\n text-align: center;\n "]))),
|
|
18
|
+
desc: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 0;\n font-size: ", "px;\n color: ", ";\n text-align: center;\n\n ", " {\n margin: 24px 16px;\n font-size: ", "px;\n }\n "])), token.fontSizeHeading3, token.colorTextSecondary, responsive.mobile, token.fontSizeHeading5),
|
|
19
|
+
title: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n z-index: 10;\n margin: 0;\n font-size: 100px;\n\n ", "\n\n b {\n ", "\n position: relative;\n z-index: 5;\n background-clip: text;\n\n -webkit-text-fill-color: transparent;\n }\n "])), responsive({
|
|
20
|
+
mobile: {
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
fontSize: 72,
|
|
24
|
+
lineHeight: 1.2
|
|
25
|
+
}
|
|
26
|
+
}), stylish.gradientAnimation)
|
|
26
27
|
};
|
|
27
28
|
});
|
|
@@ -21,18 +21,18 @@ export var Prism = /*#__PURE__*/memo(function (_ref) {
|
|
|
21
21
|
return /*#__PURE__*/_jsx("pre", {
|
|
22
22
|
className: className,
|
|
23
23
|
style: style,
|
|
24
|
-
children: tokens.map(function (line,
|
|
24
|
+
children: tokens.map(function (line, index) {
|
|
25
25
|
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, getLineProps({
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
key: index,
|
|
27
|
+
line: line
|
|
28
28
|
})), {}, {
|
|
29
29
|
children: line.map(function (token, key) {
|
|
30
30
|
return /*#__PURE__*/_jsx("span", _objectSpread({}, getTokenProps({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})),
|
|
31
|
+
key: key,
|
|
32
|
+
token: token
|
|
33
|
+
})), index);
|
|
34
34
|
})
|
|
35
|
-
}),
|
|
35
|
+
}), index);
|
|
36
36
|
})
|
|
37
37
|
});
|
|
38
38
|
}
|
|
@@ -4,8 +4,8 @@ import { Loader2 } from 'lucide-react';
|
|
|
4
4
|
import { memo, useEffect } from 'react';
|
|
5
5
|
import { Center } from 'react-layout-kit';
|
|
6
6
|
import { shallow } from 'zustand/shallow';
|
|
7
|
+
import Icon from "../../Icon";
|
|
7
8
|
import { useHighlight } from "../../hooks/useHighlight";
|
|
8
|
-
import { Icon } from "../..";
|
|
9
9
|
import { useStyles } from "./style";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -9,8 +9,8 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
9
9
|
stylish = _ref.stylish;
|
|
10
10
|
var prefix = "".concat(prefixCls, "-highlighter");
|
|
11
11
|
return {
|
|
12
|
-
|
|
12
|
+
loading: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n height: 34px;\n padding: 0 8px;\n\n font-family: ", ";\n color: ", ";\n\n border-radius: ", ";\n "])), token.fontFamilyCode, token.colorTextTertiary, token.borderRadius)),
|
|
13
13
|
prism: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pre {\n overflow-x: scroll;\n font-family: ", " !important;\n }\n "])), token.fontFamilyCode),
|
|
14
|
-
|
|
14
|
+
shiki: cx("".concat(prefix, "-shiki"), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .shiki {\n overflow-x: scroll;\n background: none !important;\n }\n "]))))
|
|
15
15
|
};
|
|
16
16
|
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DivProps } from "../types";
|
|
3
|
-
import SyntaxHighlighter, { type SyntaxHighlighterProps } from './SyntaxHighlighter';
|
|
4
|
-
export { SyntaxHighlighter, SyntaxHighlighterProps };
|
|
5
3
|
export interface HighlighterProps extends DivProps {
|
|
6
4
|
/**
|
|
7
5
|
* @description The code content to be highlighted
|
|
@@ -39,3 +37,4 @@ export interface HighlighterProps extends DivProps {
|
|
|
39
37
|
}
|
|
40
38
|
export declare const Highlighter: import("react").NamedExoticComponent<HighlighterProps>;
|
|
41
39
|
export default Highlighter;
|
|
40
|
+
export { default as SyntaxHighlighter, type SyntaxHighlighterProps } from './SyntaxHighlighter';
|
package/es/Highlighter/index.js
CHANGED
|
@@ -4,12 +4,12 @@ var _excluded = ["children", "language", "className", "style", "theme", "copyabl
|
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import { memo } from 'react';
|
|
7
|
-
import
|
|
7
|
+
import CopyButton from "../CopyButton";
|
|
8
|
+
import Spotlight from "../Spotlight";
|
|
8
9
|
import SyntaxHighlighter from "./SyntaxHighlighter";
|
|
9
10
|
import { useStyles } from "./style";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
export { SyntaxHighlighter };
|
|
13
13
|
export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
14
14
|
var children = _ref.children,
|
|
15
15
|
language = _ref.language,
|
|
@@ -49,4 +49,5 @@ export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
49
49
|
})]
|
|
50
50
|
}));
|
|
51
51
|
});
|
|
52
|
-
export default Highlighter;
|
|
52
|
+
export default Highlighter;
|
|
53
|
+
export { default as SyntaxHighlighter } from "./SyntaxHighlighter";
|
package/es/Highlighter/style.js
CHANGED
|
@@ -11,8 +11,8 @@ export var useStyles = createStyles(function (_ref, type) {
|
|
|
11
11
|
var langHoverCls = "".concat(prefix, "-hover-lang");
|
|
12
12
|
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n\n &:hover {\n background-color: ", ";\n }\n "])), type === 'block' ? token.colorFillTertiary : 'transparent', type === 'block' ? 'transparent' : token.colorBorder, type === 'block' ? token.colorFillTertiary : token.colorFillQuaternary);
|
|
13
13
|
return {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
button: cx(buttonHoverCls, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 51;\n top: ", ";\n right: ", ";\n\n opacity: 0;\n "])), type === 'pure' ? 0 : '8px', type === 'pure' ? 0 : '8px')),
|
|
15
|
+
container: cx(prefix, type !== 'pure' && typeStylish, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n overflow: auto;\n border-radius: ", "px;\n transition: background-color 100ms ", ";\n\n &:hover {\n .", " {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n }\n\n .prism-code {\n background: none !important;\n }\n\n pre {\n margin: 0 !important;\n padding: ", " !important;\n background: none !important;\n }\n\n code {\n background: transparent !important;\n }\n "])), token.borderRadius, token.motionEaseOut, buttonHoverCls, langHoverCls, type === 'pure' ? 0 : "16px 24px")),
|
|
16
16
|
lang: cx(langHoverCls, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 50;\n right: 8px;\n bottom: 8px;\n\n color: ", ";\n\n opacity: 0;\n\n transition: opacity 0.1s;\n "])), token.colorTextPlaceholder))
|
|
17
17
|
};
|
|
18
18
|
});
|
package/es/Highlighter/theme.js
CHANGED
|
@@ -9,36 +9,38 @@ export var themeConfig = function themeConfig(isDarkMode) {
|
|
|
9
9
|
var colorGreen = isDarkMode ? colorScales.lime[type][9] : colorScales.green[type][9];
|
|
10
10
|
var colorBlue = isDarkMode ? colorScales.blue[type][9] : colorScales.geekblue[type][9];
|
|
11
11
|
return {
|
|
12
|
+
colors: {
|
|
13
|
+
'editor.foreground': colorTextSecondary
|
|
14
|
+
},
|
|
12
15
|
name: type,
|
|
13
|
-
type: type,
|
|
14
16
|
semanticHighlighting: true,
|
|
15
17
|
semanticTokenColors: {
|
|
16
|
-
|
|
17
|
-
foreground: colorBlue
|
|
18
|
-
},
|
|
19
|
-
'variable.constant': {
|
|
18
|
+
'annotation:dart': {
|
|
20
19
|
foreground: colorGreen
|
|
21
20
|
},
|
|
22
|
-
'
|
|
23
|
-
foreground:
|
|
21
|
+
'enumMember': {
|
|
22
|
+
foreground: colorBlue
|
|
24
23
|
},
|
|
25
|
-
'
|
|
24
|
+
'macro': {
|
|
26
25
|
foreground: colorGreen
|
|
27
26
|
},
|
|
28
|
-
'
|
|
29
|
-
foreground:
|
|
27
|
+
'parameter.label:dart': {
|
|
28
|
+
foreground: colorTextTertiary
|
|
30
29
|
},
|
|
31
|
-
'
|
|
30
|
+
'property:dart': {
|
|
32
31
|
foreground: colorGreen
|
|
33
32
|
},
|
|
34
|
-
'
|
|
35
|
-
foreground:
|
|
33
|
+
'tomlArrayKey': {
|
|
34
|
+
foreground: colorRed
|
|
36
35
|
},
|
|
37
|
-
|
|
36
|
+
'variable.constant': {
|
|
38
37
|
foreground: colorGreen
|
|
39
38
|
},
|
|
40
|
-
|
|
39
|
+
'variable.defaultLibrary': {
|
|
41
40
|
foreground: colorRed
|
|
41
|
+
},
|
|
42
|
+
'variable:dart': {
|
|
43
|
+
foreground: colorGreen
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
tokenColors: [{
|
|
@@ -1012,8 +1014,8 @@ export var themeConfig = function themeConfig(isDarkMode) {
|
|
|
1012
1014
|
foreground: colorTextTertiary
|
|
1013
1015
|
}
|
|
1014
1016
|
}, {
|
|
1015
|
-
name: 'php illegal.non-
|
|
1016
|
-
scope: 'invalid.illegal.non-
|
|
1017
|
+
name: 'php illegal.non-undefined-typehinted',
|
|
1018
|
+
scope: 'invalid.illegal.non-undefined-typehinted.php',
|
|
1017
1019
|
settings: {
|
|
1018
1020
|
foreground: colorRed
|
|
1019
1021
|
}
|
|
@@ -1497,8 +1499,8 @@ export var themeConfig = function themeConfig(isDarkMode) {
|
|
|
1497
1499
|
name: 'Comments',
|
|
1498
1500
|
scope: 'comment, punctuation.definition.comment',
|
|
1499
1501
|
settings: {
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
+
fontStyle: 'italic',
|
|
1503
|
+
foreground: colorTextTertiary
|
|
1502
1504
|
}
|
|
1503
1505
|
}, {
|
|
1504
1506
|
name: '[VSCODE-CUSTOM] Markdown Quote',
|
|
@@ -1648,8 +1650,6 @@ export var themeConfig = function themeConfig(isDarkMode) {
|
|
|
1648
1650
|
fontStyle: 'italic'
|
|
1649
1651
|
}
|
|
1650
1652
|
}],
|
|
1651
|
-
|
|
1652
|
-
'editor.foreground': colorTextSecondary
|
|
1653
|
-
}
|
|
1653
|
+
type: type
|
|
1654
1654
|
};
|
|
1655
1655
|
};
|
package/es/Icon/index.js
CHANGED
|
@@ -11,26 +11,34 @@ var calcSize = function calcSize(size) {
|
|
|
11
11
|
var strokeWidth;
|
|
12
12
|
switch (size) {
|
|
13
13
|
case 'large':
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
{
|
|
15
|
+
fontSize = 24;
|
|
16
|
+
strokeWidth = 2;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
17
19
|
case 'normal':
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
{
|
|
21
|
+
fontSize = 20;
|
|
22
|
+
strokeWidth = 2;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
21
25
|
case 'small':
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
{
|
|
27
|
+
fontSize = 14;
|
|
28
|
+
strokeWidth = 1.5;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
25
31
|
default:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
{
|
|
33
|
+
if (size) {
|
|
34
|
+
fontSize = (size === null || size === void 0 ? void 0 : size.fontSize) || 24;
|
|
35
|
+
strokeWidth = (size === null || size === void 0 ? void 0 : size.strokeWidth) || 2;
|
|
36
|
+
} else {
|
|
37
|
+
fontSize = '1em';
|
|
38
|
+
strokeWidth = 2;
|
|
39
|
+
}
|
|
40
|
+
break;
|
|
32
41
|
}
|
|
33
|
-
break;
|
|
34
42
|
}
|
|
35
43
|
return {
|
|
36
44
|
fontSize: fontSize,
|
package/es/Input/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Input as AntInput } from 'antd';
|
|
|
8
8
|
import { forwardRef, memo } from 'react';
|
|
9
9
|
import { useStyles } from "./style";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
export var Input = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref,
|
|
11
|
+
export var Input = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, reference) {
|
|
12
12
|
var className = _ref.className,
|
|
13
13
|
_ref$type = _ref.type,
|
|
14
14
|
type = _ref$type === void 0 ? 'ghost' : _ref$type,
|
|
@@ -21,10 +21,10 @@ export var Input = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, re
|
|
|
21
21
|
return /*#__PURE__*/_jsx(AntInput, _objectSpread({
|
|
22
22
|
bordered: type !== 'pure',
|
|
23
23
|
className: cx(styles.input, className),
|
|
24
|
-
ref:
|
|
24
|
+
ref: reference
|
|
25
25
|
}, props));
|
|
26
26
|
}));
|
|
27
|
-
export var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2,
|
|
27
|
+
export var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, reference) {
|
|
28
28
|
var className = _ref2.className,
|
|
29
29
|
_ref2$type = _ref2.type,
|
|
30
30
|
type = _ref2$type === void 0 ? 'ghost' : _ref2$type,
|
|
@@ -40,7 +40,7 @@ export var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2
|
|
|
40
40
|
return /*#__PURE__*/_jsx(AntInput.TextArea, _objectSpread({
|
|
41
41
|
bordered: type !== 'pure',
|
|
42
42
|
className: cx(styles.textarea, className),
|
|
43
|
-
ref:
|
|
43
|
+
ref: reference,
|
|
44
44
|
style: resize ? style : _objectSpread({
|
|
45
45
|
resize: 'none'
|
|
46
46
|
}, style)
|
package/es/Layout/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import { useResponsive } from 'antd-style';
|
|
3
3
|
import { memo, useEffect, useState } from 'react';
|
|
4
|
-
import
|
|
4
|
+
import DraggablePanel from "../DraggablePanel";
|
|
5
5
|
import { useStyles } from "./style";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
package/es/Layout/style.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare const useStyles: (props?: number | undefined) => import("antd-style").ReturnStyles<{
|
|
2
2
|
app: import("antd-style").SerializedStyles;
|
|
3
|
-
header: import("antd-style").SerializedStyles;
|
|
4
|
-
glass: import("antd-style").SerializedStyles;
|
|
5
|
-
main: import("antd-style").SerializedStyles;
|
|
6
|
-
content: import("antd-style").SerializedStyles;
|
|
7
|
-
footer: import("antd-style").SerializedStyles;
|
|
8
3
|
aside: import("antd-style").SerializedStyles;
|
|
9
4
|
asideInner: import("antd-style").SerializedStyles;
|
|
5
|
+
content: import("antd-style").SerializedStyles;
|
|
6
|
+
footer: import("antd-style").SerializedStyles;
|
|
7
|
+
glass: import("antd-style").SerializedStyles;
|
|
8
|
+
header: import("antd-style").SerializedStyles;
|
|
9
|
+
main: import("antd-style").SerializedStyles;
|
|
10
10
|
toc: import("antd-style").SerializedStyles;
|
|
11
11
|
}>;
|
package/es/Layout/style.js
CHANGED
|
@@ -8,13 +8,13 @@ export var useStyles = createStyles(function (_ref, headerHeight) {
|
|
|
8
8
|
var baseGlass = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: none;\n content: '';\n user-select: none;\n\n position: absolute;\n z-index: -1;\n inset: -1px 0 ", ";\n "])), responsive.mobile ? '-25%' : '-50%');
|
|
9
9
|
return {
|
|
10
10
|
app: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n height: 100vh;\n "]))),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
aside: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 2;\n height: 100%;\n "]))),
|
|
12
|
+
asideInner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: calc(100vh - 64px);\n "]))),
|
|
13
|
+
content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n flex: 1;\n max-width: 100%;\n "]))),
|
|
14
|
+
footer: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n "]))),
|
|
15
|
+
glass: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n z-index: 0;\n\n &::before {\n ", ";\n ", ";\n mask-image: linear-gradient(to bottom, black ", "px, transparent);\n }\n\n &::after {\n ", ";\n }\n "])), stylish.blur, baseGlass, headerHeight, baseGlass),
|
|
16
|
+
header: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 999;\n top: 0;\n max-width: 100%;\n "]))),
|
|
17
|
+
main: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: stretch;\n max-width: 100vw;\n "]))),
|
|
18
18
|
toc: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral([""])))
|
|
19
19
|
};
|
|
20
20
|
});
|
|
@@ -60,5 +60,5 @@ export interface ListItemProps {
|
|
|
60
60
|
*/
|
|
61
61
|
title: string;
|
|
62
62
|
}
|
|
63
|
-
declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & HTMLAttributes<any> & import("react").RefAttributes<HTMLElement
|
|
63
|
+
declare const ListItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ListItemProps & HTMLAttributes<any> & import("react").RefAttributes<HTMLElement>>>;
|
|
64
64
|
export default ListItem;
|
|
@@ -1,55 +1,34 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
4
3
|
var _excluded = ["active", "avatar", "loading", "description", "date", "title", "onHoverChange", "renderActions", "className", "style", "showAction", "classNames"];
|
|
5
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
6
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
6
|
import { LoadingOutlined, MessageOutlined } from '@ant-design/icons';
|
|
9
|
-
import {
|
|
10
|
-
import { forwardRef } from 'react';
|
|
7
|
+
import { forwardRef, memo } from 'react';
|
|
11
8
|
import { Flexbox } from 'react-layout-kit';
|
|
12
|
-
import {
|
|
9
|
+
import { useStyles } from "./style";
|
|
13
10
|
import { getChatItemTime } from "./time";
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
var useStyles = createStyles(function (_ref) {
|
|
17
|
-
var css = _ref.css,
|
|
18
|
-
cx = _ref.cx,
|
|
19
|
-
token = _ref.token;
|
|
20
|
-
var textOverlay = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --overlay-background: ", ";\n\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n width: 32px;\n height: 44px;\n\n background: linear-gradient(to right, transparent, var(--overlay-background));\n "])), token.colorBgLayout);
|
|
21
|
-
var overlayColor = convertAlphaToSolid(token.colorFillContent, token.colorBgLayout);
|
|
22
|
-
var hoverOverlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n --overlay-background: ", ";\n }\n "])), cx(textOverlay), overlayColor);
|
|
23
|
-
return {
|
|
24
|
-
container: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n border-radius: 8px;\n\n &:hover {\n background: ", ";\n ", "\n }\n "])), token.colorTextTertiary, token.colorFillContent, hoverOverlay),
|
|
25
|
-
active: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n\n ", "\n "])), token.colorText, token.colorFillContent, hoverOverlay),
|
|
26
|
-
content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n "]))),
|
|
27
|
-
title: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 0.9em;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
|
|
28
|
-
time: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
|
|
29
|
-
desc: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n margin-top: 2px;\n\n font-size: 0.75em;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n opacity: 0.5;\n "]))),
|
|
30
|
-
textOverlay: textOverlay
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
11
|
|
|
34
12
|
/**
|
|
35
13
|
* 卡片列表项的属性
|
|
36
14
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
classNames =
|
|
52
|
-
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
var ListItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, reference) {
|
|
18
|
+
var active = _ref.active,
|
|
19
|
+
avatar = _ref.avatar,
|
|
20
|
+
loading = _ref.loading,
|
|
21
|
+
description = _ref.description,
|
|
22
|
+
date = _ref.date,
|
|
23
|
+
title = _ref.title,
|
|
24
|
+
onHoverChange = _ref.onHoverChange,
|
|
25
|
+
renderActions = _ref.renderActions,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
style = _ref.style,
|
|
28
|
+
showAction = _ref.showAction,
|
|
29
|
+
_ref$classNames = _ref.classNames,
|
|
30
|
+
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
53
32
|
var _useStyles = useStyles(),
|
|
54
33
|
styles = _useStyles.styles,
|
|
55
34
|
cx = _useStyles.cx;
|
|
@@ -61,7 +40,7 @@ var ListItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
61
40
|
horizontal: true,
|
|
62
41
|
paddingBlock: 8,
|
|
63
42
|
paddingInline: '12px 8px',
|
|
64
|
-
ref:
|
|
43
|
+
ref: reference,
|
|
65
44
|
style: style
|
|
66
45
|
}, props), {}, {
|
|
67
46
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -106,5 +85,5 @@ var ListItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
106
85
|
children: getChatItemTime(date)
|
|
107
86
|
})]
|
|
108
87
|
}));
|
|
109
|
-
});
|
|
88
|
+
}));
|
|
110
89
|
export default ListItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
|
+
active: import("antd-style").SerializedStyles;
|
|
3
|
+
container: import("antd-style").SerializedStyles;
|
|
4
|
+
content: import("antd-style").SerializedStyles;
|
|
5
|
+
desc: import("antd-style").SerializedStyles;
|
|
6
|
+
textOverlay: import("antd-style").SerializedStyles;
|
|
7
|
+
time: import("antd-style").SerializedStyles;
|
|
8
|
+
title: import("antd-style").SerializedStyles;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
import { convertAlphaToSolid } from "../../utils/colorUtils";
|
|
5
|
+
export var useStyles = createStyles(function (_ref) {
|
|
6
|
+
var css = _ref.css,
|
|
7
|
+
cx = _ref.cx,
|
|
8
|
+
token = _ref.token;
|
|
9
|
+
var textOverlay = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --overlay-background: ", ";\n\n position: absolute;\n z-index: 10;\n top: 0;\n right: 0;\n\n width: 32px;\n height: 44px;\n\n background: linear-gradient(to right, transparent, var(--overlay-background));\n "])), token.colorBgLayout);
|
|
10
|
+
var overlayColor = convertAlphaToSolid(token.colorFillContent, token.colorBgLayout);
|
|
11
|
+
var hoverOverlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n --overlay-background: ", ";\n }\n "])), cx(textOverlay), overlayColor);
|
|
12
|
+
return {
|
|
13
|
+
active: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n\n ", "\n "])), token.colorText, token.colorFillContent, hoverOverlay),
|
|
14
|
+
container: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n border-radius: 8px;\n\n &:hover {\n background: ", ";\n ", "\n }\n "])), token.colorTextTertiary, token.colorFillContent, hoverOverlay),
|
|
15
|
+
content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n "]))),
|
|
16
|
+
desc: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n margin-top: 2px;\n\n font-size: 0.75em;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n opacity: 0.5;\n "]))),
|
|
17
|
+
textOverlay: textOverlay,
|
|
18
|
+
time: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextPlaceholder),
|
|
19
|
+
title: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 0.9em;\n text-overflow: ellipsis;\n white-space: nowrap;\n "])))
|
|
20
|
+
};
|
|
21
|
+
});
|
package/es/List/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const List: {
|
|
3
|
-
Item: import("react").ForwardRefExoticComponent<import("./ListItem").ListItemProps & import("react").HTMLAttributes<any> & import("react").RefAttributes<HTMLElement
|
|
3
|
+
Item: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./ListItem").ListItemProps & import("react").HTMLAttributes<any> & import("react").RefAttributes<HTMLElement>>>;
|
|
4
4
|
};
|
|
5
5
|
export default List;
|
package/es/Logo/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import { DivProps } from "../types";
|
|
3
3
|
export interface LogoProps extends DivProps {
|
|
4
4
|
/**
|
|
5
5
|
* @description Additional React Node to be rendered next to the logo
|
|
6
6
|
*/
|
|
7
|
-
extra?:
|
|
7
|
+
extra?: ReactNode;
|
|
8
8
|
/**
|
|
9
9
|
* @description Size of the logo in pixels
|
|
10
10
|
* @default 32
|