@lobehub/ui 1.16.0 → 1.16.1
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/style.d.ts +1 -1
- package/es/ActionIcon/style.js +5 -3
- package/es/Conversation/ChatList/MessageItem/Toolbar.js +4 -2
- package/es/DraggablePanel/index.js +1 -1
- package/es/Highlighter/SyntaxHighlighter/index.js +3 -3
- package/es/Highlighter/SyntaxHighlighter/style.d.ts +1 -1
- package/es/Highlighter/SyntaxHighlighter/style.js +3 -2
- package/es/ThemeProvider/GlobalStyle.js +5 -2
- package/es/styles/algorithms/generateCustomStylish.js +1 -1
- package/es/styles/colors.js +1 -1
- package/package.json +1 -1
package/es/ActionIcon/style.d.ts
CHANGED
package/es/ActionIcon/style.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject
|
|
2
|
+
var _templateObject;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
5
5
|
var css = _ref.css,
|
|
6
|
-
token = _ref.token
|
|
6
|
+
token = _ref.token,
|
|
7
|
+
stylish = _ref.stylish,
|
|
8
|
+
cx = _ref.cx;
|
|
7
9
|
var active = _ref2.active,
|
|
8
10
|
glass = _ref2.glass;
|
|
9
11
|
return {
|
|
10
|
-
block: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
12
|
+
block: cx(glass && stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n\n color: ", ";\n\n background: ", ";\n\n transition: color 600ms ", ",\n background-color 100ms ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n "])), active ? token.colorText : token.colorTextTertiary, active ? token.colorFillTertiary : 'transparent', token.motionEaseOut, token.motionEaseOut, token.colorText, token.colorFillSecondary, token.colorText, token.colorFill))
|
|
11
13
|
};
|
|
12
14
|
});
|
|
@@ -16,9 +16,11 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
16
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
var useStyles = createStyles(function (_ref) {
|
|
18
18
|
var css = _ref.css,
|
|
19
|
-
token = _ref.token
|
|
19
|
+
token = _ref.token,
|
|
20
|
+
stylish = _ref.stylish,
|
|
21
|
+
cx = _ref.cx;
|
|
20
22
|
return {
|
|
21
|
-
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
23
|
+
container: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 4px;\n "])), rgba(token.colorBgElevated, 0.2)))
|
|
22
24
|
};
|
|
23
25
|
});
|
|
24
26
|
var Toolbar = /*#__PURE__*/memo(function (_ref2) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import { useHighlight } from "../../hooks/useHighlight";
|
|
3
3
|
import { Loading3QuartersOutlined as Loading } from '@ant-design/icons';
|
|
4
|
+
import { useThemeMode } from 'antd-style';
|
|
4
5
|
import { memo, useEffect } from 'react';
|
|
5
6
|
import { Center } from 'react-layout-kit';
|
|
6
7
|
import { shallow } from 'zustand/shallow';
|
|
7
|
-
import { useThemeMode } from 'antd-style';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -28,7 +28,7 @@ var SyntaxHighlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
28
28
|
}, []);
|
|
29
29
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
30
30
|
children: [isLoading ? /*#__PURE__*/_jsx("div", {
|
|
31
|
-
className: styles.
|
|
31
|
+
className: styles.shiki,
|
|
32
32
|
children: /*#__PURE__*/_jsx("pre", {
|
|
33
33
|
children: /*#__PURE__*/_jsx("code", {
|
|
34
34
|
children: children
|
|
@@ -48,7 +48,7 @@ var SyntaxHighlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
48
48
|
style: {
|
|
49
49
|
color: theme.colorTextTertiary
|
|
50
50
|
}
|
|
51
|
-
}), "
|
|
51
|
+
}), "Highlighting..."]
|
|
52
52
|
})]
|
|
53
53
|
});
|
|
54
54
|
});
|
|
@@ -5,11 +5,12 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
token = _ref.token,
|
|
7
7
|
cx = _ref.cx,
|
|
8
|
-
prefixCls = _ref.prefixCls
|
|
8
|
+
prefixCls = _ref.prefixCls,
|
|
9
|
+
stylish = _ref.stylish;
|
|
9
10
|
var prefix = "".concat(prefixCls, "-highlighter");
|
|
10
11
|
return {
|
|
11
12
|
shiki: cx("".concat(prefix, "-shiki"), css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .shiki {\n overflow-x: scroll;\n background: none !important;\n }\n "])))),
|
|
12
13
|
prism: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pre {\n overflow-x: scroll;\n font-family: ", " !important;\n }\n "])), token.fontFamilyCode),
|
|
13
|
-
loading: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
14
|
+
loading: cx(stylish.blur, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n\n padding: 4px 8px;\n\n color: ", ";\n\n border-radius: ", ";\n "])), token.colorTextTertiary, token.borderRadiusSM))
|
|
14
15
|
};
|
|
15
16
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { createGlobalStyle } from 'antd-style';
|
|
4
|
-
var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n html,body {\n --font-settings: \"cv01\", \"tnum\", \"kern\";\n --font-variations: \"opsz\" auto, tabular-nums;\n\n overflow-x: hidden;\n\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n font-size: ", "px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n line-height: 1;\n color: ", ";\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n vertical-align: baseline;\n\n color-scheme: dark;\n background-color: ", ";\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n }\n\n\n * {\n
|
|
4
|
+
var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n html,body {\n --font-settings: \"cv01\", \"tnum\", \"kern\";\n --font-variations: \"opsz\" auto, tabular-nums;\n\n overflow-x: hidden;\n\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n font-size: ", "px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n line-height: 1;\n color: ", ";\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n vertical-align: baseline;\n\n color-scheme: dark;\n background-color: ", ";\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n }\n \n\n * {\n\t box-sizing: border-box;\n\t vertical-align: baseline;\n }\n\n ::-webkit-scrollbar {\n\t width: 0;\n\t height: 4px;\n\t background-color: transparent;\n\n\t &-thumb {\n\t\t background-color: transparent;\n\t\t border-radius: 4px;\n\t\t transition: background-color 500ms ", ";\n\t }\n\n\t &-corner {\n\t\t display: none;\n\t }\n }\n\n #root {\n\t min-height: 100vh;\n }\n\n p {\n text-align: justify;\n word-wrap: break-word;\n }\n \n code {\n\t font-family: ", " !important;\n\t * {\n\t\t font-family: inherit !important;\n\t }\n }\n\n *:hover, *:focus {\n\t ::-webkit-scrollbar {\n\t\t &-thumb {\n\t\t\t background-color: ", ";\n\t\t }\n\t }\n }\n"])), function (_ref) {
|
|
5
5
|
var theme = _ref.theme;
|
|
6
6
|
return theme.fontFamily;
|
|
7
7
|
}, function (_ref2) {
|
|
@@ -15,9 +15,12 @@ var GlobalStyle = createGlobalStyle(_templateObject || (_templateObject = _tagge
|
|
|
15
15
|
return theme.colorBgLayout;
|
|
16
16
|
}, function (_ref5) {
|
|
17
17
|
var theme = _ref5.theme;
|
|
18
|
-
return theme.
|
|
18
|
+
return theme.motionEaseOut;
|
|
19
19
|
}, function (_ref6) {
|
|
20
20
|
var theme = _ref6.theme;
|
|
21
21
|
return theme.fontFamilyCode;
|
|
22
|
+
}, function (_ref7) {
|
|
23
|
+
var theme = _ref7.theme;
|
|
24
|
+
return theme.colorFill;
|
|
22
25
|
});
|
|
23
26
|
export default GlobalStyle;
|
|
@@ -13,7 +13,7 @@ export var generateCustomStylish = function generateCustomStylish(_ref) {
|
|
|
13
13
|
heroGradientFlow: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: flow 5s ease infinite;\n\n @keyframes flow {\n 0% {\n background-position: 0 0;\n }\n\n 50% {\n background-position: 100% 100%;\n }\n\n 100% {\n background-position: 0 0;\n }\n }\n "]))),
|
|
14
14
|
heroBlurBall: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n will-change: transform;\n\n background: linear-gradient(\n 135deg,\n ", " 0%,\n ", " 30%,\n ", " 70%,\n ", " 100%\n );\n background-size: 200% 200%;\n filter: blur(69px);\n\n animation: glow 10s ease infinite;\n\n @keyframes glow {\n 0% {\n background-position: 0 -100%;\n }\n\n 50% {\n background-position: 200% 50%;\n }\n\n 100% {\n background-position: 0 -100%;\n }\n }\n "])), token.gradientColor3, token.gradientColor1, token.red, token.cyan),
|
|
15
15
|
iconGradientDefault: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background-image: radial-gradient(\n 100% 100% at 50% 0,\n ", " 0,\n ", " 100%\n );\n "])), rgba(token.colorSolid, 0.2), rgba(token.colorSolid, 0.1)),
|
|
16
|
-
blur: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n backdrop-filter: blur(
|
|
16
|
+
blur: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n backdrop-filter: saturate(180%) blur(10px);\n "]))),
|
|
17
17
|
markdown: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin: 20px auto;\n\n font-size: 14px;\n line-height: 1.8;\n color: ", ";\n text-align: justify;\n word-wrap: break-word;\n }\n\n blockquote {\n margin: 16px 0;\n padding: 0 12px;\n p {\n font-style: italic;\n color: ", ";\n }\n }\n\n p:not(:last-child) {\n margin-bottom: 1em;\n }\n\n a {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n }\n\n img {\n max-width: 100%;\n }\n\n pre {\n border-radius: ", "px;\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n\n font-size: ", "px;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding: 8px;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n th,\n td {\n padding-block-start: 10px;\n padding-block-end: 10px;\n padding-inline-start: 16px;\n padding-inline-end: 16px;\n }\n\n thead {\n tr {\n th {\n background: ", ";\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n &:last-child {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n }\n }\n\n ul li {\n line-height: 1.8;\n }\n "])), isDarkMode ? token.colorTextSecondary : token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, token.borderRadius, token.fontSizeSM, isDarkMode ? token.cyan9A : token.cyan10A, isDarkMode ? token.cyan1A : token.cyan3A, isDarkMode ? token.cyan1A : token.cyan4A, token.borderRadiusSM, token.colorBorderSecondary, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius)
|
|
18
18
|
};
|
|
19
19
|
};
|
package/es/styles/colors.js
CHANGED
|
@@ -75,7 +75,7 @@ export var colorScales = {
|
|
|
75
75
|
light: ['#ffffff', '#f8f8f8', '#eeeeee', '#e3e3e3', '#dddddd', '#cccccc', '#bbbbbb', '#aaaaaa', '#999999', '#888888', '#666666', '#333333', '#080808'],
|
|
76
76
|
lightA: ['rgba(0, 0, 0, 0.015)', 'rgba(0, 0, 0, 0.03)', 'rgba(0, 0, 0, 0.06)', 'rgba(0, 0, 0, 0.12)', 'rgba(0, 0, 0, 0.18)', 'rgba(0, 0, 0, 0.24)', 'rgba(0, 0, 0, 0.32)', 'rgba(0, 0, 0, 0.38)', 'rgba(0, 0, 0, 0.44)', 'rgba(0, 0, 0, 0.5)', 'rgba(0, 0, 0, 0.68)', 'rgba(0, 0, 0, 0.84)', 'rgba(0, 0, 0, 0.98)'],
|
|
77
77
|
dark: ['#000000', '#111111', '#222222', '#2d2d2d', '#333333', '#444444', '#555555', '#666666', '#6f6f6f', '#777777', '#aaaaaa', '#dddddd', '#ffffff'],
|
|
78
|
-
darkA: ['rgba(255, 255, 255, 0.02)', 'rgba(255, 255, 255, 0.
|
|
78
|
+
darkA: ['rgba(255, 255, 255, 0.02)', 'rgba(255, 255, 255, 0.06)', 'rgba(255, 255, 255, 0.10)', 'rgba(255, 255, 255, 0.16)', 'rgba(255, 255, 255, 0.24)', 'rgba(255, 255, 255, 0.28)', 'rgba(255, 255, 255, 0.32)', 'rgba(255, 255, 255, 0.38)', 'rgba(255, 255, 255, 0.44)', 'rgba(255, 255, 255, 0.5)', 'rgba(255, 255, 255, 0.66)', 'rgba(255, 255, 255, 0.84)', '#ffffff']
|
|
79
79
|
},
|
|
80
80
|
bnw: {
|
|
81
81
|
light: ['#ffffff', '#f5f5f5', '#eeeeee', '#cccccc', '#aaaaaa', '#888888', '#666666', '#444444', '#333333', '#222222', '#111111', '#111111', '#111111'],
|