knight-ui 1.2.0 → 1.2.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/component/ai/AIChatInput.d.ts +2 -0
- package/component/input/KeyValueEditor.d.ts +3 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -40,6 +40,8 @@ export interface AIChatInputProps extends UIProps {
|
|
|
40
40
|
minRows?: number;
|
|
41
41
|
/** 最大行数,超出后滚动 @default 4 */
|
|
42
42
|
maxRows?: number;
|
|
43
|
+
/** 底部工具条内容(输入框内、textarea 下方、发送键左侧) —— 库不关心放什么,由调用方组装;不传则保留 20px 空白垫高 */
|
|
44
|
+
bottomBar?: React.ReactNode;
|
|
43
45
|
}
|
|
44
46
|
interface AIChatInputState extends UIState {
|
|
45
47
|
value: string;
|
|
@@ -2,12 +2,15 @@ import React from "react";
|
|
|
2
2
|
import { AbstractUI, type UIProps, type UIState } from "../../base";
|
|
3
3
|
/**
|
|
4
4
|
* 键值编辑器 — 动态 key/value 行,支持增删. 用法: <KeyValueEditor value={obj} onChange={setObj} />
|
|
5
|
+
* - disabled 时输入框置灰、增删按钮不渲染,四个 handler 也各自挡一道(防程序侧调用)
|
|
5
6
|
*/
|
|
6
7
|
export declare class KeyValueEditor extends AbstractUI<KeyValueEditorProps, KeyValueEditorState> {
|
|
7
8
|
private seed;
|
|
8
9
|
/** 标记内部编辑操作,阻止 componentDidUpdate 覆盖状态 */
|
|
9
10
|
private internalEdit;
|
|
10
11
|
constructor(props: KeyValueEditorProps);
|
|
12
|
+
/** 是否禁用 — 输入与增删一律不响应 */
|
|
13
|
+
private get isDisabled();
|
|
11
14
|
componentDidUpdate(prevProps: Readonly<KeyValueEditorProps>): void;
|
|
12
15
|
private static rowsEqual;
|
|
13
16
|
static objectToRows(obj: Record<string, any>): KeyValueRow[];
|