@lobehub/ui 1.51.0 → 1.52.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/ActionIcon/index.d.ts +1 -1
- package/es/Chat/store/messageReducer.d.ts +1 -1
- package/es/Chat/store/store.d.ts +1 -1
- package/es/Chat/types.d.ts +3 -3
- package/es/ChatList/index.d.ts +2 -2
- package/es/ContextMenu/types/menuItem.d.ts +1 -1
- package/es/DraggablePanel/components/DraggablePanelBody.d.ts +1 -1
- package/es/DraggablePanel/components/DraggablePanelContainer.d.ts +1 -1
- package/es/DraggablePanel/components/DraggablePanelFooter.d.ts +1 -1
- package/es/DraggablePanel/index.d.ts +1 -1
- package/es/EditableText/index.d.ts +1 -1
- package/es/Form/components/FormDivider.d.ts +1 -1
- package/es/Form/components/FormFooter.d.ts +1 -1
- package/es/Form/components/FormGroup.d.ts +1 -0
- package/es/Form/components/FormGroup.js +3 -1
- package/es/Form/index.d.ts +1 -0
- package/es/Form/index.js +1 -0
- package/es/GradientButton/index.d.ts +1 -1
- package/es/Icon/index.d.ts +1 -1
- package/es/Layout/index.d.ts +2 -2
- package/es/Tooltip/index.d.ts +1 -1
- package/es/styles/colors.d.ts +1 -1
- package/es/styles/customTheme.d.ts +4 -4
- package/es/types/customToken.d.ts +7 -7
- package/es/types/index.d.ts +5 -5
- package/es/types/llm.d.ts +2 -2
- package/package.json +1 -1
package/es/ActionIcon/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
import { type TooltipProps } from "../Tooltip";
|
|
4
4
|
import { DivProps } from "../types";
|
|
5
|
-
export
|
|
5
|
+
export type ActionIconSize = 'large' | 'normal' | 'small' | 'site' | {
|
|
6
6
|
blockSize?: number;
|
|
7
7
|
borderRadius?: number;
|
|
8
8
|
fontSize?: number;
|
package/es/Chat/store/store.d.ts
CHANGED
|
@@ -29,6 +29,6 @@ interface ChatAction {
|
|
|
29
29
|
*/
|
|
30
30
|
sendMessage: () => Promise<void>;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type ChatStore = ChatAction & ChatState;
|
|
33
33
|
export declare const createStore: StateCreator<ChatStore, [['zustand/devtools', never]]>;
|
|
34
34
|
export {};
|
package/es/Chat/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type InternalChatContext = Omit<ChatContext, 'id'>;
|
|
2
|
+
export type MessageRoleType = 'user' | 'system' | 'assistant' | 'function';
|
|
3
3
|
/**
|
|
4
4
|
* 聊天消息错误对象
|
|
5
5
|
*/
|
|
@@ -65,7 +65,7 @@ export interface ChatContext {
|
|
|
65
65
|
title?: string;
|
|
66
66
|
updateAt: number;
|
|
67
67
|
}
|
|
68
|
-
export
|
|
68
|
+
export type ChatContextMap = Record<string, Omit<ChatContext, 'systemRole'>>;
|
|
69
69
|
/**
|
|
70
70
|
* 请求数据类型
|
|
71
71
|
*/
|
package/es/ChatList/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ChatItemProps } from "../ChatItem";
|
|
3
3
|
import type { DivProps } from "../types";
|
|
4
4
|
import { ChatMessage } from "../types/chatMessage";
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type MessageExtra = (props: ChatMessage) => ReactNode;
|
|
6
|
+
export type RenderMessage = (content: ReactNode, message: ChatMessage) => ReactNode;
|
|
7
7
|
export interface ChatListProps extends DivProps {
|
|
8
8
|
/**
|
|
9
9
|
* @description Data of chat messages to be displayed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type DivProps } from "../../types";
|
|
3
|
-
export
|
|
3
|
+
export type DraggablePanelBodyProps = DivProps;
|
|
4
4
|
declare const DraggablePanelBody: import("react").NamedExoticComponent<DivProps>;
|
|
5
5
|
export default DraggablePanelBody;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type DivProps } from "../../types";
|
|
3
|
-
export
|
|
3
|
+
export type DraggablePanelContainerProps = DivProps;
|
|
4
4
|
declare const DraggablePanelContainer: import("react").NamedExoticComponent<DivProps>;
|
|
5
5
|
export default DraggablePanelContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type DivProps } from "../../types";
|
|
3
|
-
export
|
|
3
|
+
export type DraggablePanelFooterProps = DivProps;
|
|
4
4
|
declare const DraggablePanelFooter: import("react").NamedExoticComponent<DivProps>;
|
|
5
5
|
export default DraggablePanelFooter;
|
|
@@ -2,7 +2,7 @@ import type { NumberSize, Size } from 're-resizable';
|
|
|
2
2
|
import { type CSSProperties } from 'react';
|
|
3
3
|
import type { Props as RndProps } from 'react-rnd';
|
|
4
4
|
import { DivProps } from "../types";
|
|
5
|
-
export
|
|
5
|
+
export type placementType = 'right' | 'left' | 'top' | 'bottom';
|
|
6
6
|
export interface DraggablePanelProps extends DivProps {
|
|
7
7
|
/**
|
|
8
8
|
* @title The class name for the content and handle component
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ControlInputProps } from "../components/ControlInput";
|
|
3
|
-
export
|
|
3
|
+
export type EditableTextProps = ControlInputProps;
|
|
4
4
|
declare const EditableText: import("react").NamedExoticComponent<ControlInputProps>;
|
|
5
5
|
export default EditableText;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DividerProps } from 'antd';
|
|
3
|
-
export
|
|
3
|
+
export type FormDividerProps = DividerProps;
|
|
4
4
|
declare const Divider: import("react").NamedExoticComponent<DividerProps>;
|
|
5
5
|
export default Divider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DivProps } from "../../types";
|
|
3
|
-
export
|
|
3
|
+
export type FormFooterProps = DivProps;
|
|
4
4
|
declare const FormFooter: import("react").NamedExoticComponent<DivProps>;
|
|
5
5
|
export default FormFooter;
|
|
@@ -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 = ["className", "icon", "title", "children"];
|
|
3
|
+
var _excluded = ["className", "icon", "title", "children", "extra"];
|
|
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 { Icon } from "../..";
|
|
@@ -14,6 +14,7 @@ var FormGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
14
14
|
icon = _ref.icon,
|
|
15
15
|
title = _ref.title,
|
|
16
16
|
children = _ref.children,
|
|
17
|
+
extra = _ref.extra,
|
|
17
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
19
|
var _useStyles = useStyles(),
|
|
19
20
|
cx = _useStyles.cx,
|
|
@@ -23,6 +24,7 @@ var FormGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
23
24
|
defaultActiveKey: [1],
|
|
24
25
|
items: [{
|
|
25
26
|
children: children,
|
|
27
|
+
extra: extra,
|
|
26
28
|
key: 1,
|
|
27
29
|
label: /*#__PURE__*/_jsxs("div", {
|
|
28
30
|
className: styles.title,
|
package/es/Form/index.d.ts
CHANGED
package/es/Form/index.js
CHANGED
|
@@ -29,6 +29,7 @@ var Form = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
29
|
}, props), {}, {
|
|
30
30
|
children: [items === null || items === void 0 ? void 0 : items.map(function (group, groupIndex) {
|
|
31
31
|
return /*#__PURE__*/_jsx(FormGroup, {
|
|
32
|
+
extra: group === null || group === void 0 ? void 0 : group.extra,
|
|
32
33
|
icon: group === null || group === void 0 ? void 0 : group.icon,
|
|
33
34
|
title: group.title,
|
|
34
35
|
children: group.children.filter(function (item) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ButtonProps } from 'antd';
|
|
3
|
-
export
|
|
3
|
+
export type GradientButtonProps = ButtonProps;
|
|
4
4
|
declare const GradientButton: import("react").NamedExoticComponent<ButtonProps>;
|
|
5
5
|
export default GradientButton;
|
package/es/Icon/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
import { DivProps } from "../types";
|
|
4
|
-
export
|
|
4
|
+
export type IconSize = 'large' | 'normal' | 'small' | {
|
|
5
5
|
fontSize?: number;
|
|
6
6
|
strokeWidth?: number;
|
|
7
7
|
};
|
package/es/Layout/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface LayoutHeaderProps extends DivProps {
|
|
|
4
4
|
headerHeight?: number;
|
|
5
5
|
}
|
|
6
6
|
export declare const LayoutHeader: import("react").NamedExoticComponent<LayoutHeaderProps>;
|
|
7
|
-
export
|
|
7
|
+
export type LayoutMainProps = DivProps;
|
|
8
8
|
export declare const LayoutMain: import("react").NamedExoticComponent<DivProps>;
|
|
9
9
|
export interface LayoutSidebarProps extends DivProps {
|
|
10
10
|
headerHeight?: number;
|
|
@@ -18,7 +18,7 @@ export interface LayoutTocProps extends DivProps {
|
|
|
18
18
|
tocWidth?: number;
|
|
19
19
|
}
|
|
20
20
|
export declare const LayoutToc: import("react").NamedExoticComponent<LayoutTocProps>;
|
|
21
|
-
export
|
|
21
|
+
export type LayoutFooterProps = DivProps;
|
|
22
22
|
export declare const LayoutFooter: import("react").NamedExoticComponent<DivProps>;
|
|
23
23
|
export interface LayoutProps {
|
|
24
24
|
/**
|
package/es/Tooltip/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TooltipProps as AntdTooltipProps } from 'antd';
|
|
3
|
-
export
|
|
3
|
+
export type TooltipProps = AntdTooltipProps;
|
|
4
4
|
declare const Tooltip: import("react").NamedExoticComponent<AntdTooltipProps>;
|
|
5
5
|
export default Tooltip;
|
package/es/styles/colors.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export declare const primaryColors: {
|
|
|
12
12
|
volcano: string;
|
|
13
13
|
yellow: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
export
|
|
15
|
+
export type PrimaryColorsObj = typeof primaryColors;
|
|
16
|
+
export type PrimaryColors = keyof PrimaryColorsObj;
|
|
17
17
|
export declare const primaryColorsSwatches: string[];
|
|
18
18
|
export declare const neutralColors: {
|
|
19
19
|
mauve: string;
|
|
@@ -23,6 +23,6 @@ export declare const neutralColors: {
|
|
|
23
23
|
slate: string;
|
|
24
24
|
};
|
|
25
25
|
export declare const neutralColorsSwatches: string[];
|
|
26
|
-
export
|
|
27
|
-
export
|
|
26
|
+
export type NeutralColorsObj = typeof neutralColors;
|
|
27
|
+
export type NeutralColors = keyof NeutralColorsObj;
|
|
28
28
|
export declare const findCustomThemeName: (type: 'primary' | 'neutral', value: string) => string | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
declare const PresetColors: readonly ["red", "volcano", "orange", "gold", "yellow", "lime", "green", "cyan", "blue", "geekblue", "purple", "magenta", "gray"];
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
2
|
+
export type PresetColorKey = (typeof PresetColors)[number];
|
|
3
|
+
export type PresetColorType = Record<PresetColorKey, string>;
|
|
4
|
+
type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
5
|
+
type ColorTokenKey = 'Bg' | 'BgHover' | 'Border' | 'BorderSecondary' | 'BorderHover' | 'Hover' | '' | 'Active' | 'TextHover' | 'Text' | 'TextActive';
|
|
6
|
+
export type ColorToken = {
|
|
7
7
|
[key in `${keyof PresetColorType}${ColorTokenKey}`]: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type ColorPalettes = {
|
|
10
10
|
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type ColorPalettesAlpha = {
|
|
13
13
|
[key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string;
|
|
14
14
|
};
|
|
15
15
|
export interface LobeCustomToken extends ColorToken, ColorPalettes, ColorPalettesAlpha {
|
package/es/types/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export * from './customStylish';
|
|
|
4
4
|
export * from './customToken';
|
|
5
5
|
export * from './llm';
|
|
6
6
|
export * from './meta';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
7
|
+
export type DivProps = HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
export type SvgProps = HTMLAttributes<SVGSVGElement>;
|
|
9
|
+
export type ImgProps = HTMLAttributes<HTMLImageElement>;
|
|
10
|
+
export type InputProps = HTMLAttributes<HTMLInputElement>;
|
|
11
|
+
export type TextAreaProps = HTMLAttributes<HTMLTextAreaElement>;
|
package/es/types/llm.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ export interface LMParameters {
|
|
|
34
34
|
*/
|
|
35
35
|
top_p?: number;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type LLMRoleType = 'user' | 'system' | 'assistant' | 'function';
|
|
38
38
|
export interface LLMMessage {
|
|
39
39
|
content: string;
|
|
40
40
|
role: LLMRoleType;
|
|
41
41
|
}
|
|
42
|
-
export
|
|
42
|
+
export type LLMExample = LLMMessage[];
|