@lobehub/ui 1.104.1 → 1.104.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.
|
@@ -33,7 +33,7 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
33
33
|
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
34
34
|
className: styles.container
|
|
35
35
|
}, props), {}, {
|
|
36
|
-
children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), items.map(function (item) {
|
|
36
|
+
children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), (items === null || items === void 0 ? void 0 : items.length) > 0 && items.map(function (item) {
|
|
37
37
|
return /*#__PURE__*/_jsx(ActionIcon, {
|
|
38
38
|
icon: item.icon,
|
|
39
39
|
onClick: onActionClick ? function () {
|
|
@@ -43,7 +43,7 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
43
43
|
size: "small",
|
|
44
44
|
title: item.label
|
|
45
45
|
}, item.key);
|
|
46
|
-
}), dropdownMenu && /*#__PURE__*/_jsx(Dropdown, {
|
|
46
|
+
}), (dropdownMenu === null || dropdownMenu === void 0 ? void 0 : dropdownMenu.length) > 0 && /*#__PURE__*/_jsx(Dropdown, {
|
|
47
47
|
menu: {
|
|
48
48
|
items: dropdownMenu.map(function (item) {
|
|
49
49
|
if (item.type) return item;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ActionIconGroupProps } from "../ActionIconGroup";
|
|
3
|
-
import { ChatMessage } from "../types";
|
|
4
3
|
export interface ActionsBarProps extends ActionIconGroupProps {
|
|
5
4
|
text?: {
|
|
6
5
|
copy?: string;
|
|
@@ -9,5 +8,5 @@ export interface ActionsBarProps extends ActionIconGroupProps {
|
|
|
9
8
|
regenerate?: string;
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
declare const ActionsBar: import("react").NamedExoticComponent<ActionsBarProps
|
|
11
|
+
declare const ActionsBar: import("react").NamedExoticComponent<ActionsBarProps>;
|
|
13
12
|
export default ActionsBar;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["text"];
|
|
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';
|
|
@@ -8,8 +8,7 @@ import ActionIconGroup from "../ActionIconGroup";
|
|
|
8
8
|
import { useChatListActionsBar } from "../hooks/useChatListActionsBar";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
var ActionsBar = /*#__PURE__*/memo(function (_ref) {
|
|
11
|
-
var
|
|
12
|
-
text = _ref.text,
|
|
11
|
+
var text = _ref.text,
|
|
13
12
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
13
|
var _useChatListActionsBa = useChatListActionsBar(text),
|
|
15
14
|
regenerate = _useChatListActionsBa.regenerate,
|
|
@@ -19,7 +18,7 @@ var ActionsBar = /*#__PURE__*/memo(function (_ref) {
|
|
|
19
18
|
del = _useChatListActionsBa.del;
|
|
20
19
|
return /*#__PURE__*/_jsx(ActionIconGroup, _objectSpread({
|
|
21
20
|
dropdownMenu: [edit, copy, regenerate, divider, del],
|
|
22
|
-
items: [regenerate,
|
|
21
|
+
items: [regenerate, edit],
|
|
23
22
|
type: "ghost"
|
|
24
23
|
}, props));
|
|
25
24
|
});
|
package/es/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { default as ChatInputArea, type ChatInputAreaProps } from './ChatInputAr
|
|
|
9
9
|
export { default as ChatItem, type ChatItemProps } from './ChatItem';
|
|
10
10
|
export type { ChatListProps, OnActionClick, OnMessageChange, RenderAction, RenderErrorMessage, RenderItem, RenderMessage, RenderMessageExtra, } from './ChatList';
|
|
11
11
|
export { default as ChatList } from './ChatList';
|
|
12
|
+
export { default as ActionsBar, type ActionsBarProps } from './ChatList/ActionsBar';
|
|
12
13
|
export { default as CodeEditor, type CodeEditorProps } from './CodeEditor';
|
|
13
14
|
export { default as ColorScales, type ColorScalesProps } from './ColorScales';
|
|
14
15
|
export { type Config, default as ConfigProvider, useCdnFn } from './ConfigProvider';
|
package/es/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { default as ChatHeaderTitle } from "./ChatHeader/ChatHeaderTitle";
|
|
|
8
8
|
export { default as ChatInputArea } from "./ChatInputArea";
|
|
9
9
|
export { default as ChatItem } from "./ChatItem";
|
|
10
10
|
export { default as ChatList } from "./ChatList";
|
|
11
|
+
export { default as ActionsBar } from "./ChatList/ActionsBar";
|
|
11
12
|
export { default as CodeEditor } from "./CodeEditor";
|
|
12
13
|
export { default as ColorScales } from "./ColorScales";
|
|
13
14
|
export { default as ConfigProvider, useCdnFn } from "./ConfigProvider";
|
|
@@ -21,13 +21,7 @@ export interface ChatMessage extends BaseDataModel {
|
|
|
21
21
|
*/
|
|
22
22
|
content: string;
|
|
23
23
|
error?: any;
|
|
24
|
-
extra?:
|
|
25
|
-
fromModel?: string;
|
|
26
|
-
translate?: {
|
|
27
|
-
target: string;
|
|
28
|
-
to: string;
|
|
29
|
-
};
|
|
30
|
-
} & Record<string, any>;
|
|
24
|
+
extra?: any;
|
|
31
25
|
/**
|
|
32
26
|
* replace with plugin
|
|
33
27
|
* @deprecated
|