@baishuyun/ai-design 2.0.39 → 2.1.0-alpha.2
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/CHANGELOG.md +28 -8
- package/package.json +8 -5
- package/src/components/agent-helper/agent-entry-card/index.tsx +1 -1
- package/src/components/agent-helper/field-value-input/picker-inputs.tsx +12 -9
- package/src/components/agent-helper/trigger-select/index.tsx +1 -1
- package/src/components/collapsible-txt-msg.tsx +11 -6
- package/src/components/fake-bot-msg.tsx +4 -2
- package/src/hooks/use-column-appear.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
# @baishuyun/ai-design
|
|
2
2
|
|
|
3
|
-
## 2.0.
|
|
3
|
+
## 2.1.0-alpha.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- session
|
|
8
8
|
- Updated dependencies
|
|
9
|
-
- @baishuyun/ai-feat-utils@2.0.
|
|
10
|
-
- @baishuyun/types@3.0.
|
|
9
|
+
- @baishuyun/ai-feat-utils@2.0.34-alpha.2
|
|
10
|
+
- @baishuyun/types@3.1.0-alpha.2
|
|
11
11
|
|
|
12
|
-
## 2.0.
|
|
12
|
+
## 2.1.0-alpha.1
|
|
13
13
|
|
|
14
14
|
### Patch Changes
|
|
15
15
|
|
|
16
|
-
-
|
|
16
|
+
- session manager
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @baishuyun/ai-feat-utils@2.0.34-alpha.1
|
|
19
|
+
- @baishuyun/types@3.1.0-alpha.1
|
|
20
|
+
|
|
21
|
+
## 2.1.0-alpha.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- 8716e65: Upgrade AI SDK from 5.x to 7.x.
|
|
26
|
+
|
|
27
|
+
- `ai` -> `^7.0.66`, `@ai-sdk/react` -> `^4.0.69`
|
|
28
|
+
- `@ai-sdk/provider` -> `^4.0.7`, `@ai-sdk/provider-utils` -> `^5.0.27`
|
|
29
|
+
- `@ai-sdk/deepseek` -> `^3.0.28`
|
|
30
|
+
- Remove unused `@ai-sdk/mcp`
|
|
31
|
+
- Add `engines.node >= 22`
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- add agent
|
|
36
|
+
- Updated dependencies [8716e65]
|
|
17
37
|
- Updated dependencies
|
|
18
|
-
- @baishuyun/
|
|
19
|
-
- @baishuyun/
|
|
38
|
+
- @baishuyun/types@3.1.0-alpha.0
|
|
39
|
+
- @baishuyun/ai-feat-utils@2.0.34-alpha.0
|
|
20
40
|
|
|
21
41
|
## 2.0.37
|
|
22
42
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ai-design",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-alpha.2",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=22"
|
|
6
|
+
},
|
|
4
7
|
"description": "AI 功能 UI 组件库 - 所有 AI 功能的 UI 表现唯一真相来源",
|
|
5
8
|
"type": "module",
|
|
6
9
|
"main": "src/index.ts",
|
|
@@ -43,7 +46,7 @@
|
|
|
43
46
|
"@radix-ui/react-tabs": "^1.1.14",
|
|
44
47
|
"@radix-ui/react-tooltip": "^1.2.9",
|
|
45
48
|
"@tanstack/react-table": "^8.21.3",
|
|
46
|
-
"ai": "^
|
|
49
|
+
"ai": "^7.0.66",
|
|
47
50
|
"class-variance-authority": "^0.7.1",
|
|
48
51
|
"classnames": "^2.5.1",
|
|
49
52
|
"clsx": "^2.1.1",
|
|
@@ -60,8 +63,8 @@
|
|
|
60
63
|
"tw-animate-css": "^1.4.0",
|
|
61
64
|
"vaul": "^1.1.2",
|
|
62
65
|
"zod": "^4.1.13",
|
|
63
|
-
"@baishuyun/ai-feat-utils": "2.0.
|
|
64
|
-
"@baishuyun/types": "3.0.
|
|
66
|
+
"@baishuyun/ai-feat-utils": "2.0.34-alpha.2",
|
|
67
|
+
"@baishuyun/types": "3.1.0-alpha.2"
|
|
65
68
|
},
|
|
66
69
|
"peerDependencies": {
|
|
67
70
|
"react": "^19.0.0",
|
|
@@ -84,7 +87,7 @@
|
|
|
84
87
|
"vite": "^5.1.4",
|
|
85
88
|
"vite-plugin-dts": "^4.5.4",
|
|
86
89
|
"@baishuyun/tailwind-config": "3.0.9",
|
|
87
|
-
"@baishuyun/types": "3.0.
|
|
90
|
+
"@baishuyun/types": "3.1.0-alpha.2",
|
|
88
91
|
"@baishuyun/typescript-config": "2.0.9"
|
|
89
92
|
},
|
|
90
93
|
"keywords": [],
|
|
@@ -19,18 +19,21 @@ import { chinaAddressData } from './china-address-data';
|
|
|
19
19
|
const inputBaseCls =
|
|
20
20
|
'h-[34px] px-[10px] py-[7px] rounded-[4px] bg-white border text-[14px] text-[#030303] placeholder:text-[#999999] focus:outline-none focus:border-[#0265FF] w-full disabled:bg-[#EFF0F6] disabled:cursor-not-allowed';
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
type PickerItem = {
|
|
23
23
|
label: string;
|
|
24
24
|
value: string | number;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function getItems(field: FieldValueInputProps['field']): PickerItem[] {
|
|
28
|
+
return (field.widget?.items ?? [])
|
|
29
|
+
.map((it) => {
|
|
30
|
+
if ('text' in it) {
|
|
31
|
+
return { label: it.text, value: it.value };
|
|
32
|
+
}
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.map((it) => ({
|
|
31
|
-
label: it.label ?? it.text ?? '',
|
|
32
|
-
value: it.value,
|
|
33
|
-
})) as WidgetItem[] ?? [];
|
|
34
|
+
return null;
|
|
35
|
+
})
|
|
36
|
+
.filter((item): item is PickerItem => item !== null);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
function usePortalContainer(attr: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { triggerType } from '@baishuyun/types';
|
|
2
|
-
import { CommonTypeIcon, GoToFormIcon, FlowNodeTypeIcon,
|
|
2
|
+
import { CommonTypeIcon, GoToFormIcon, FlowNodeTypeIcon, FormFieldIcon, FormTypeIcon } from '../../bs-icons';
|
|
3
3
|
import { IconCard, type IconCardProps } from '../../icon-card';
|
|
4
4
|
|
|
5
5
|
export type TriggerCardConfig = Pick<
|
|
@@ -14,6 +14,8 @@ export interface CollapsibleTxtMsgProps {
|
|
|
14
14
|
ghost?: boolean;
|
|
15
15
|
|
|
16
16
|
disableExpand?: boolean;
|
|
17
|
+
|
|
18
|
+
withOpenShadow?: boolean;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export const CollapsibleTxtMsg = ({
|
|
@@ -24,21 +26,24 @@ export const CollapsibleTxtMsg = ({
|
|
|
24
26
|
disableExpand,
|
|
25
27
|
children,
|
|
26
28
|
defaultOpen,
|
|
29
|
+
withOpenShadow,
|
|
27
30
|
}: CollapsibleTxtMsgProps) => {
|
|
28
31
|
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
29
32
|
|
|
30
|
-
const cls = classNames({
|
|
31
|
-
'bg-[#fafafa] border border-[#e0e0e0] border-solid p-2.5': !ghost
|
|
32
|
-
})
|
|
33
33
|
|
|
34
34
|
const isGhostOpen = isOpen && ghost;
|
|
35
35
|
|
|
36
|
-
const
|
|
36
|
+
const cls = classNames({
|
|
37
|
+
'bg-[#fafafa] border border-[#e0e0e0] border-solid p-2.5': !ghost,
|
|
38
|
+
'shadow-lg p-2.5': withOpenShadow && isGhostOpen,
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const t = (isGhostOpen && !withOpenShadow) ? '' : title;
|
|
37
42
|
|
|
38
43
|
return (
|
|
39
44
|
<div className={classNames("flex flex-col gap-2.5 rounded-lg w-full", cls)}>
|
|
40
45
|
<div
|
|
41
|
-
className={cn('flex items-center justify-between w-full', {
|
|
46
|
+
className={cn('flex items-center justify-between w-full gap-2.5', {
|
|
42
47
|
'cursor-pointer': !disableExpand,
|
|
43
48
|
})}
|
|
44
49
|
onClick={() => {
|
|
@@ -68,7 +73,7 @@ export const CollapsibleTxtMsg = ({
|
|
|
68
73
|
</button>
|
|
69
74
|
</div>
|
|
70
75
|
{isOpen && !disableExpand && (
|
|
71
|
-
<div className="text-[#121111] text-[14px] word-wrap">{content || children}</div>
|
|
76
|
+
<div className="text-[#121111] text-[14px] word-wrap break-all max-w-full">{content || children}</div>
|
|
72
77
|
)}
|
|
73
78
|
</div>
|
|
74
79
|
);
|
|
@@ -5,14 +5,16 @@ import { cn } from '../lib/utils';
|
|
|
5
5
|
export const FakeBotMessage = ({
|
|
6
6
|
children,
|
|
7
7
|
className,
|
|
8
|
-
avatarJsx
|
|
8
|
+
avatarJsx,
|
|
9
|
+
headless = false,
|
|
9
10
|
}: {
|
|
10
11
|
children: ReactNode;
|
|
11
12
|
offset?: boolean;
|
|
12
13
|
className?: string;
|
|
13
14
|
avatarJsx?: ReactNode;
|
|
15
|
+
headless?: boolean;
|
|
14
16
|
}) => {
|
|
15
|
-
if (!avatarJsx) {
|
|
17
|
+
if (headless || !avatarJsx) {
|
|
16
18
|
return (
|
|
17
19
|
<div>
|
|
18
20
|
<MessageContent
|
|
@@ -18,7 +18,7 @@ interface UseColumnAppearResult {
|
|
|
18
18
|
/** 列是否正在执行 appear (hidden→visible) 动画 */
|
|
19
19
|
appearing: boolean;
|
|
20
20
|
/** 附加到列最外层 DOM 元素的 ref,用于监听 transitionend */
|
|
21
|
-
colRef: React.RefObject<HTMLDivElement>;
|
|
21
|
+
colRef: React.RefObject<HTMLDivElement | null>;
|
|
22
22
|
/** 当前适用的 transition CSS 属性,直接展开到 style={} */
|
|
23
23
|
getTransitionStyle: React.CSSProperties;
|
|
24
24
|
}
|