@lobehub/ui 1.20.1 → 1.21.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/Avatar/style.js +1 -1
- package/es/ChatItem/index.d.ts +48 -0
- package/es/ChatItem/index.js +78 -0
- package/es/ChatItem/style.d.ts +14 -0
- package/es/ChatItem/style.js +25 -0
- package/es/ChatList/index.d.ts +16 -0
- package/es/ChatList/index.js +33 -0
- package/es/ChatList/style.d.ts +3 -0
- package/es/ChatList/style.js +9 -0
- package/es/Highlighter/index.d.ts +1 -1
- package/es/Highlighter/style.d.ts +1 -1
- package/es/Highlighter/style.js +2 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/styles/algorithms/generateCustomStylish.js +1 -1
- package/package.json +1 -1
package/es/Avatar/style.js
CHANGED
|
@@ -10,6 +10,6 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
10
10
|
var backgroundColor = background !== null && background !== void 0 ? background : token.colorBgContainer;
|
|
11
11
|
var color = readableColor(backgroundColor);
|
|
12
12
|
return {
|
|
13
|
-
avatar: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n
|
|
13
|
+
avatar: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n background: ", ";\n border: 1px solid ", ";\n\n > .ant-avatar-string {\n font-size: ", "px;\n font-weight: 700;\n line-height: 1 !important;\n color: ", ";\n }\n\n > * {\n cursor: pointer;\n }\n "])), backgroundColor, background ? 'transparent' : token.colorSplit, size * 0.5, color)
|
|
14
14
|
};
|
|
15
15
|
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type AlertProps } from 'antd';
|
|
3
|
+
import type { DivProps } from "../types";
|
|
4
|
+
export interface ChatItemProps extends DivProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description Weather to show alert and alert config
|
|
7
|
+
*/
|
|
8
|
+
alert?: AlertProps;
|
|
9
|
+
/**
|
|
10
|
+
* @description URL of the avatar image
|
|
11
|
+
*/
|
|
12
|
+
avatar?: string;
|
|
13
|
+
/**
|
|
14
|
+
* @description Whether to add spacing between chat items
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
borderSpacing?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @description Whether to show a loading spinner
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @description The message to be displayed
|
|
25
|
+
*/
|
|
26
|
+
message?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @description The name of the chat item
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
/**
|
|
32
|
+
* @description The placement of the chat item
|
|
33
|
+
* @default 'left'
|
|
34
|
+
*/
|
|
35
|
+
placement?: 'left' | 'right';
|
|
36
|
+
/**
|
|
37
|
+
* @description Whether the chat item is primary
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
primary?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* @description The type of chat item
|
|
43
|
+
* @default 'block'
|
|
44
|
+
*/
|
|
45
|
+
type?: 'block' | 'pure';
|
|
46
|
+
}
|
|
47
|
+
declare const ChatItem: import("react").NamedExoticComponent<ChatItemProps>;
|
|
48
|
+
export default ChatItem;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "name", "primary", "borderSpacing", "loading", "message", "placement", "type", "avatar", "alert"];
|
|
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
|
+
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
|
+
import { Alert } from 'antd';
|
|
7
|
+
import { Loader2 } from 'lucide-react';
|
|
8
|
+
import { memo } from 'react';
|
|
9
|
+
import { Avatar, Icon, Markdown } from "./..";
|
|
10
|
+
import { useStyles } from "./style";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
var AVATAR_SIZE = 40;
|
|
14
|
+
var ChatItem = /*#__PURE__*/memo(function (_ref) {
|
|
15
|
+
var className = _ref.className,
|
|
16
|
+
name = _ref.name,
|
|
17
|
+
primary = _ref.primary,
|
|
18
|
+
_ref$borderSpacing = _ref.borderSpacing,
|
|
19
|
+
borderSpacing = _ref$borderSpacing === void 0 ? true : _ref$borderSpacing,
|
|
20
|
+
loading = _ref.loading,
|
|
21
|
+
message = _ref.message,
|
|
22
|
+
_ref$placement = _ref.placement,
|
|
23
|
+
placement = _ref$placement === void 0 ? 'left' : _ref$placement,
|
|
24
|
+
_ref$type = _ref.type,
|
|
25
|
+
type = _ref$type === void 0 ? 'block' : _ref$type,
|
|
26
|
+
avatar = _ref.avatar,
|
|
27
|
+
alert = _ref.alert,
|
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
+
var _useStyles = useStyles({
|
|
30
|
+
placement: placement,
|
|
31
|
+
type: type,
|
|
32
|
+
name: name,
|
|
33
|
+
primary: primary,
|
|
34
|
+
avatarSize: AVATAR_SIZE
|
|
35
|
+
}),
|
|
36
|
+
cx = _useStyles.cx,
|
|
37
|
+
styles = _useStyles.styles;
|
|
38
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
39
|
+
className: cx(styles.container, className)
|
|
40
|
+
}, props), {}, {
|
|
41
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
42
|
+
className: styles.avatarContainer,
|
|
43
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
44
|
+
avatar: avatar,
|
|
45
|
+
size: AVATAR_SIZE
|
|
46
|
+
}), loading && /*#__PURE__*/_jsx("div", {
|
|
47
|
+
className: styles.loading,
|
|
48
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
49
|
+
icon: Loader2,
|
|
50
|
+
size: {
|
|
51
|
+
fontSize: 12,
|
|
52
|
+
strokeWidth: 3
|
|
53
|
+
},
|
|
54
|
+
spin: true
|
|
55
|
+
})
|
|
56
|
+
})]
|
|
57
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
58
|
+
className: styles.messageContainer,
|
|
59
|
+
children: [name && /*#__PURE__*/_jsx("div", {
|
|
60
|
+
className: styles.name,
|
|
61
|
+
children: name
|
|
62
|
+
}), alert ? /*#__PURE__*/_jsx(Alert, _objectSpread({
|
|
63
|
+
showIcon: true
|
|
64
|
+
}, alert)) : /*#__PURE__*/_jsx("div", {
|
|
65
|
+
className: styles.message,
|
|
66
|
+
children: /*#__PURE__*/_jsx(Markdown, {
|
|
67
|
+
children: String(message || '...')
|
|
68
|
+
})
|
|
69
|
+
})]
|
|
70
|
+
}), borderSpacing && /*#__PURE__*/_jsx("div", {
|
|
71
|
+
style: {
|
|
72
|
+
width: AVATAR_SIZE,
|
|
73
|
+
flex: 'none'
|
|
74
|
+
}
|
|
75
|
+
})]
|
|
76
|
+
}));
|
|
77
|
+
});
|
|
78
|
+
export default ChatItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const useStyles: (props?: {
|
|
2
|
+
avatarSize: number;
|
|
3
|
+
name?: string | undefined;
|
|
4
|
+
placement?: "left" | "right" | undefined;
|
|
5
|
+
primary?: boolean | undefined;
|
|
6
|
+
type?: "block" | "pure" | undefined;
|
|
7
|
+
} | undefined) => import("antd-style").ReturnStyles<{
|
|
8
|
+
container: string;
|
|
9
|
+
loading: import("antd-style").SerializedStyles;
|
|
10
|
+
avatarContainer: import("antd-style").SerializedStyles;
|
|
11
|
+
messageContainer: import("antd-style").SerializedStyles;
|
|
12
|
+
name: import("antd-style").SerializedStyles;
|
|
13
|
+
message: string;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
5
|
+
var cx = _ref.cx,
|
|
6
|
+
css = _ref.css,
|
|
7
|
+
token = _ref.token;
|
|
8
|
+
var placement = _ref2.placement,
|
|
9
|
+
type = _ref2.type,
|
|
10
|
+
name = _ref2.name,
|
|
11
|
+
primary = _ref2.primary,
|
|
12
|
+
avatarSize = _ref2.avatarSize;
|
|
13
|
+
var blockStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 8px 12px;\n background-color: ", ";\n border-radius: ", "px;\n transition: background-color 100ms ", ";\n\n &:active {\n background-color: ", ";\n }\n "])), primary ? token.colorFillSecondary : token.colorFillTertiary, token.borderRadiusLG, token.motionEaseOut, primary ? token.colorFill : token.colorFillSecondary);
|
|
14
|
+
var pureStylish = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: ", ";\n "])), name ? 0 : '6px');
|
|
15
|
+
var pureContainerStylish = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n transition: background-color 100ms ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n "])), token.borderRadiusLG, token.motionEaseOut, token.colorFillTertiary, token.colorFillSecondary);
|
|
16
|
+
var typeStylish = type === 'block' ? blockStylish : pureStylish;
|
|
17
|
+
return {
|
|
18
|
+
container: cx(type === 'pure' && pureContainerStylish, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n flex-direction: ", ";\n gap: 12px;\n align-items: flex-start;\n justify-content: revert;\n\n width: 100%;\n padding: 12px;\n "])), placement === 'left' ? 'row' : 'row-reverse')),
|
|
19
|
+
loading: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n right: ", ";\n bottom: 0;\n left: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 16px;\n height: 16px;\n\n color: ", ";\n\n background: ", ";\n border-radius: 50%;\n "])), placement === 'left' ? '-4px' : 'unset', placement === 'right' ? '-4px' : 'unset', token.colorBgLayout, token.colorPrimary),
|
|
20
|
+
avatarContainer: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n flex: none;\n width: ", "px;\n height: ", "px;\n "])), avatarSize, avatarSize),
|
|
21
|
+
messageContainer: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n\n .ant-alert-with-description {\n padding-block: 12px;\n padding-inline: 12px;\n }\n "]))),
|
|
22
|
+
name: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: 6px;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-align: ", ";\n "])), token.colorTextDescription, placement === 'left' ? 'left' : 'right'),
|
|
23
|
+
message: cx(typeStylish, css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: relative;\n "]))))
|
|
24
|
+
};
|
|
25
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChatMessage } from "../Chat";
|
|
3
|
+
import type { DivProps } from "../types";
|
|
4
|
+
export interface ChatListProps extends DivProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description Data of chat messages to be displayed
|
|
7
|
+
*/
|
|
8
|
+
data: ChatMessage[];
|
|
9
|
+
/**
|
|
10
|
+
* @description Type of chat list
|
|
11
|
+
* @default 'chat'
|
|
12
|
+
*/
|
|
13
|
+
type?: 'docs' | 'chat';
|
|
14
|
+
}
|
|
15
|
+
declare const ChatList: import("react").NamedExoticComponent<ChatListProps>;
|
|
16
|
+
export default ChatList;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "data", "type"];
|
|
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
|
+
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
|
+
import { memo } from 'react';
|
|
7
|
+
import { ChatItem } from "./..";
|
|
8
|
+
import { useStyles } from "./style";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
var ChatList = /*#__PURE__*/memo(function (_ref) {
|
|
11
|
+
var className = _ref.className,
|
|
12
|
+
data = _ref.data,
|
|
13
|
+
_ref$type = _ref.type,
|
|
14
|
+
type = _ref$type === void 0 ? 'chat' : _ref$type,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
var _useStyles = useStyles(),
|
|
17
|
+
cx = _useStyles.cx,
|
|
18
|
+
styles = _useStyles.styles;
|
|
19
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
20
|
+
className: cx(styles.container, className)
|
|
21
|
+
}, props), {}, {
|
|
22
|
+
children: data.map(function (item, index) {
|
|
23
|
+
return /*#__PURE__*/_jsx(ChatItem, {
|
|
24
|
+
borderSpacing: type === 'chat',
|
|
25
|
+
message: item.content,
|
|
26
|
+
placement: type === 'chat' ? item.role === 'user' ? 'right' : 'left' : 'left',
|
|
27
|
+
primary: item.role === 'user',
|
|
28
|
+
type: type === 'chat' ? 'block' : 'pure'
|
|
29
|
+
}, index);
|
|
30
|
+
})
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
export default ChatList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref) {
|
|
5
|
+
var css = _ref.css;
|
|
6
|
+
return {
|
|
7
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n "])))
|
|
8
|
+
};
|
|
9
|
+
});
|
|
@@ -30,7 +30,7 @@ export interface HighlighterProps extends DivProps {
|
|
|
30
30
|
* @description The type of the code block
|
|
31
31
|
* @default 'block'
|
|
32
32
|
*/
|
|
33
|
-
type?: 'ghost' | 'block' | '
|
|
33
|
+
type?: 'ghost' | 'block' | 'pure';
|
|
34
34
|
}
|
|
35
35
|
export declare const Highlighter: import("react").NamedExoticComponent<HighlighterProps>;
|
|
36
36
|
export default Highlighter;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useStyles: (props?: "block" | "
|
|
1
|
+
export declare const useStyles: (props?: "block" | "pure" | "ghost" | undefined) => import("antd-style").ReturnStyles<{
|
|
2
2
|
container: string;
|
|
3
3
|
button: string;
|
|
4
4
|
lang: string;
|
package/es/Highlighter/style.js
CHANGED
|
@@ -9,9 +9,9 @@ export var useStyles = createStyles(function (_ref, type) {
|
|
|
9
9
|
var prefix = "".concat(prefixCls, "-highlighter");
|
|
10
10
|
var buttonHoverCls = "".concat(prefix, "-hover-btn");
|
|
11
11
|
var langHoverCls = "".concat(prefix, "-hover-lang");
|
|
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 === '
|
|
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 === 'pure' ? 'transparent' : token.colorFillTertiary);
|
|
13
13
|
return {
|
|
14
|
-
container: cx(prefix, typeStylish, css(_templateObject2 || (_templateObject2 = _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 === '
|
|
14
|
+
container: cx(prefix, typeStylish, css(_templateObject2 || (_templateObject2 = _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")),
|
|
15
15
|
button: cx(buttonHoverCls, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 51;\n top: 8px;\n right: 8px;\n\n opacity: 0;\n "])))),
|
|
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
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { default as ActionIcon, type ActionIconProps, type ActionIconSize } from './ActionIcon';
|
|
2
2
|
export { default as Avatar, type AvatarProps } from './Avatar';
|
|
3
3
|
export type { ChatMessage, MessageRoleType } from './Chat';
|
|
4
|
+
export { default as ChatItem, type ChatItemProps } from './ChatItem';
|
|
5
|
+
export { default as ChatList, type ChatListProps } from './ChatList';
|
|
4
6
|
export { default as ColorScales, type ColorScalesProps } from './ColorScales';
|
|
5
7
|
export { default as ContextMenu, type ContextMenuProps } from './ContextMenu';
|
|
6
8
|
export { default as Conversation, type ConversationProps } from './Conversation';
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as ActionIcon } from "./ActionIcon";
|
|
2
2
|
export { default as Avatar } from "./Avatar";
|
|
3
|
+
export { default as ChatItem } from "./ChatItem";
|
|
4
|
+
export { default as ChatList } from "./ChatList";
|
|
3
5
|
export { default as ColorScales } from "./ColorScales";
|
|
4
6
|
export { default as ContextMenu } from "./ContextMenu";
|
|
5
7
|
export { default as Conversation } from "./Conversation";
|
|
@@ -6,6 +6,6 @@ export var generateCustomStylish = function generateCustomStylish(_ref) {
|
|
|
6
6
|
isDarkMode = _ref.isDarkMode;
|
|
7
7
|
return {
|
|
8
8
|
blur: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n backdrop-filter: saturate(180%) blur(10px);\n "]))),
|
|
9
|
-
markdown: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin:
|
|
9
|
+
markdown: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin-block-start: 0;\n margin-block-end: 0;\n\n font-size: 14px;\n line-height: 1.8;\n color: ", ";\n text-align: justify;\n word-wrap: break-word;\n\n + * {\n margin-block-end: 0.5em;\n }\n }\n\n blockquote {\n margin: 16px 0;\n padding: 0 12px;\n\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: 0;\n margin-inline-end: 0;\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\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\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)
|
|
10
10
|
};
|
|
11
11
|
};
|