@lobehub/ui 1.146.1 → 1.146.3
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/ChatHeader/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface ChatHeaderProps extends
|
|
2
|
+
import { FlexboxProps } from 'react-layout-kit';
|
|
3
|
+
export interface ChatHeaderProps extends FlexboxProps {
|
|
4
4
|
classNames?: {
|
|
5
5
|
center?: string;
|
|
6
6
|
left?: string;
|
|
7
7
|
right?: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
gaps?: {
|
|
10
10
|
center?: number;
|
|
11
11
|
left?: number;
|
|
12
12
|
right?: number;
|
package/es/ChatHeader/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["left", "right", "className", "styles", "gaps", "classNames", "showBackButton", "onBackClick", "children", "gap"];
|
|
3
6
|
import { ChevronLeft } from 'lucide-react';
|
|
4
7
|
import { memo } from 'react';
|
|
5
8
|
import { Flexbox } from 'react-layout-kit';
|
|
@@ -11,28 +14,32 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
11
14
|
var left = _ref.left,
|
|
12
15
|
right = _ref.right,
|
|
13
16
|
className = _ref.className,
|
|
14
|
-
style = _ref.style,
|
|
15
17
|
contentStyles = _ref.styles,
|
|
18
|
+
gaps = _ref.gaps,
|
|
16
19
|
classNames = _ref.classNames,
|
|
17
20
|
showBackButton = _ref.showBackButton,
|
|
18
21
|
onBackClick = _ref.onBackClick,
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
children = _ref.children,
|
|
23
|
+
_ref$gap = _ref.gap,
|
|
24
|
+
gap = _ref$gap === void 0 ? 16 : _ref$gap,
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
26
|
var _useStyles = useStyles(),
|
|
22
27
|
cx = _useStyles.cx,
|
|
23
28
|
styles = _useStyles.styles;
|
|
24
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
29
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
25
30
|
align: 'center',
|
|
26
31
|
className: cx(styles.container, className),
|
|
27
32
|
distribution: 'space-between',
|
|
33
|
+
gap: gap,
|
|
28
34
|
horizontal: true,
|
|
29
|
-
paddingInline: 16
|
|
30
|
-
|
|
35
|
+
paddingInline: 16
|
|
36
|
+
}, rest), {}, {
|
|
31
37
|
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
32
38
|
align: 'center',
|
|
33
39
|
className: cx(styles.left, classNames === null || classNames === void 0 ? void 0 : classNames.left),
|
|
34
|
-
gap: (
|
|
40
|
+
gap: (gaps === null || gaps === void 0 ? void 0 : gaps.left) || 12,
|
|
35
41
|
horizontal: true,
|
|
42
|
+
justify: 'flex-start',
|
|
36
43
|
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.left,
|
|
37
44
|
children: [showBackButton && /*#__PURE__*/_jsx(ActionIcon, {
|
|
38
45
|
icon: ChevronLeft,
|
|
@@ -43,24 +50,26 @@ var ChatHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
43
50
|
fontSize: 24
|
|
44
51
|
},
|
|
45
52
|
style: {
|
|
46
|
-
marginRight:
|
|
53
|
+
marginRight: gaps !== null && gaps !== void 0 && gaps.left ? -gaps.left / 2 : -6
|
|
47
54
|
}
|
|
48
55
|
}), left]
|
|
49
56
|
}), children && /*#__PURE__*/_jsx(Flexbox, {
|
|
50
57
|
align: 'center',
|
|
51
58
|
className: cx(styles.center, classNames === null || classNames === void 0 ? void 0 : classNames.center),
|
|
52
|
-
gap: (
|
|
59
|
+
gap: (gaps === null || gaps === void 0 ? void 0 : gaps.center) || 8,
|
|
53
60
|
horizontal: true,
|
|
61
|
+
justify: 'center',
|
|
54
62
|
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.center,
|
|
55
63
|
children: children
|
|
56
64
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
57
65
|
align: 'center',
|
|
58
66
|
className: cx(styles.right, classNames === null || classNames === void 0 ? void 0 : classNames.right),
|
|
59
|
-
gap: (
|
|
67
|
+
gap: (gaps === null || gaps === void 0 ? void 0 : gaps.right) || 8,
|
|
60
68
|
horizontal: true,
|
|
69
|
+
justify: 'flex-end',
|
|
61
70
|
style: contentStyles === null || contentStyles === void 0 ? void 0 : contentStyles.right,
|
|
62
71
|
children: right
|
|
63
72
|
})]
|
|
64
|
-
});
|
|
73
|
+
}));
|
|
65
74
|
});
|
|
66
75
|
export default ChatHeader;
|
|
@@ -7,8 +7,8 @@ import { ChevronDown, ChevronUp } from 'lucide-react';
|
|
|
7
7
|
import { rgba } from 'polished';
|
|
8
8
|
import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
9
9
|
import { Flexbox } from 'react-layout-kit';
|
|
10
|
-
import MobileSafeArea from "../../MobileSafeArea";
|
|
11
10
|
import ActionIcon from "../../ActionIcon";
|
|
11
|
+
import MobileSafeArea from "../../MobileSafeArea";
|
|
12
12
|
import ChatInputAreaInner from "../ChatInputAreaInner";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/ChatItem/style.js
CHANGED
|
@@ -32,6 +32,6 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
32
32
|
messageContainer: cx(editingStylish, css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n max-width: 100%;\n margin-block-start: ", "px;\n\n ", " {\n overflow-x: auto;\n }\n "])), time ? -16 : 0, responsive.mobile)),
|
|
33
33
|
messageContent: cx(editingStylish, css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n max-width: 100%;\n\n ", " {\n flex-direction: column !important;\n }\n "])), responsive.mobile)),
|
|
34
34
|
messageExtra: cx('message-extra'),
|
|
35
|
-
name: css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin-block-end: 6px;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-align: ", ";\n
|
|
35
|
+
name: css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n margin-block-end: 6px;\n\n font-size: 12px;\n line-height: 1;\n color: ", ";\n text-align: ", ";\n "])), token.colorTextDescription, placement === 'left' ? 'left' : 'right')
|
|
36
36
|
};
|
|
37
37
|
});
|
package/es/Markdown/utils.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
1
3
|
export function escapeDollarNumber(text) {
|
|
2
4
|
var escapedText = '';
|
|
3
5
|
for (var i = 0; i < text.length; i += 1) {
|
|
4
6
|
var char = text[i];
|
|
5
7
|
var nextChar = text[i + 1] || ' ';
|
|
6
8
|
if (char === '$' && nextChar >= '0' && nextChar <= '9') {
|
|
7
|
-
char =
|
|
9
|
+
char = String.raw(_templateObject || (_templateObject = _taggedTemplateLiteral(["$"], ["\\$"])));
|
|
8
10
|
}
|
|
9
11
|
escapedText += char;
|
|
10
12
|
}
|
|
@@ -24,5 +26,5 @@ export function escapeBrackets(text) {
|
|
|
24
26
|
});
|
|
25
27
|
}
|
|
26
28
|
export function escapeMhchem(text) {
|
|
27
|
-
return text.replaceAll(
|
|
29
|
+
return text.replaceAll(String.raw(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["$ce{"], ["$\\ce{"]))), String.raw(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["$\\ce{"], ["$\\\\ce{"])))).replaceAll(String.raw(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["$pu{"], ["$\\pu{"]))), String.raw(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["$\\pu{"], ["$\\\\pu{"]))));
|
|
28
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.146.
|
|
3
|
+
"version": "1.146.3",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@dnd-kit/utilities": "^3.2.2",
|
|
83
83
|
"@emoji-mart/data": "^1.2.1",
|
|
84
84
|
"@emoji-mart/react": "^1.1.1",
|
|
85
|
-
"@floating-ui/react": "^0.26.
|
|
85
|
+
"@floating-ui/react": "^0.26.19",
|
|
86
86
|
"@giscus/react": "^3.0.0",
|
|
87
87
|
"@lobehub/emojilib": "latest",
|
|
88
88
|
"@react-spring/web": "^9.7.3",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@ant-design/icons": "^5.3.7",
|
|
127
127
|
"@commitlint/cli": "^19.3.0",
|
|
128
|
-
"@lobehub/lint": "^1.
|
|
128
|
+
"@lobehub/lint": "^1.24.2",
|
|
129
129
|
"@testing-library/react": "^14.3.1",
|
|
130
130
|
"@types/chroma-js": "^2.4.4",
|
|
131
131
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -156,7 +156,6 @@
|
|
|
156
156
|
"remark-cli": "^11.0.0",
|
|
157
157
|
"semantic-release": "^21.1.2",
|
|
158
158
|
"stylelint": "^15.11.0",
|
|
159
|
-
"stylelint-use-logical-spec": "^5.0.1",
|
|
160
159
|
"typescript": "^5.5.2",
|
|
161
160
|
"vitest": "~1.2.2"
|
|
162
161
|
},
|