@baishuyun/ai-design 2.0.28 → 2.0.30

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @baishuyun/ai-design
2
2
 
3
+ ## 2.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - fix corp id error and openinglines error
8
+ - Updated dependencies
9
+ - @baishuyun/ai-feat-utils@2.0.28
10
+ - @baishuyun/types@3.0.26
11
+
12
+ ## 2.0.29
13
+
14
+ ### Patch Changes
15
+
16
+ - new std action
17
+ - Updated dependencies
18
+ - @baishuyun/ai-feat-utils@2.0.27
19
+ - @baishuyun/types@3.0.25
20
+
3
21
  ## 2.0.28
4
22
 
5
23
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ai-design",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
4
4
  "description": "AI 功能 UI 组件库 - 所有 AI 功能的 UI 表现唯一真相来源",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -60,8 +60,8 @@
60
60
  "tw-animate-css": "^1.4.0",
61
61
  "vaul": "^1.1.2",
62
62
  "zod": "^4.1.13",
63
- "@baishuyun/ai-feat-utils": "2.0.26",
64
- "@baishuyun/types": "3.0.24"
63
+ "@baishuyun/ai-feat-utils": "2.0.28",
64
+ "@baishuyun/types": "3.0.26"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "react": "^19.0.0",
@@ -83,9 +83,9 @@
83
83
  "typescript": "^5.5.0",
84
84
  "vite": "^5.1.4",
85
85
  "vite-plugin-dts": "^4.5.4",
86
- "@baishuyun/types": "3.0.24",
87
- "@baishuyun/tailwind-config": "3.0.9",
88
- "@baishuyun/typescript-config": "2.0.9"
86
+ "@baishuyun/types": "3.0.26",
87
+ "@baishuyun/typescript-config": "2.0.9",
88
+ "@baishuyun/tailwind-config": "3.0.9"
89
89
  },
90
90
  "keywords": [],
91
91
  "author": "",
@@ -18,6 +18,8 @@ export interface FieldCheckerProps {
18
18
  streaming?: boolean;
19
19
  confirmed?: boolean;
20
20
  onLoaded?: (field: Field) => void;
21
+ /** 字段更新类型:new 新增(淡绿背景),removed 删除(置灰+中横线) */
22
+ updateType?: 'new' | 'removed';
21
23
  }
22
24
 
23
25
  export const FieldChecker = memo(
@@ -32,6 +34,7 @@ export const FieldChecker = memo(
32
34
  checked,
33
35
  streaming,
34
36
  confirmed,
37
+ updateType,
35
38
  }: FieldCheckerProps) => {
36
39
  const { widget, label } = field;
37
40
  if (!widget) {
@@ -119,6 +122,7 @@ export const FieldChecker = memo(
119
122
  icon={icon}
120
123
  className={extraPadding}
121
124
  shortDesc={value as string}
125
+ updateType={updateType}
122
126
  />
123
127
  );
124
128
  }
@@ -136,6 +140,7 @@ export const FieldChecker = memo(
136
140
  icon={icon}
137
141
  shortDesc={typeDesc}
138
142
  className={extraPadding}
143
+ updateType={updateType}
139
144
  extra={
140
145
  items.length ? (
141
146
  <>
@@ -20,6 +20,8 @@ export interface LineCheckerProps {
20
20
  streaming?: boolean;
21
21
  confirmed?: boolean;
22
22
  readonly?: boolean;
23
+ /** 字段更新类型:new 淡绿色背景(新增),removed 置灰+中横线(删除) */
24
+ updateType?: 'new' | 'removed';
23
25
  }
24
26
 
25
27
  export const LineChecker: React.FC<LineCheckerProps> = ({
@@ -36,6 +38,7 @@ export const LineChecker: React.FC<LineCheckerProps> = ({
36
38
  confirmed,
37
39
  readonly,
38
40
  shortDesc,
41
+ updateType,
39
42
  }) => {
40
43
  const [checked, setChecked] = useState(defaultChecked);
41
44
 
@@ -80,10 +83,13 @@ export const LineChecker: React.FC<LineCheckerProps> = ({
80
83
  'w-full transition-colors cursor-pointer',
81
84
  {
82
85
  'cursor-not-allowed': disabled,
83
- 'hover:bg-[#EFF0F6]': !disabled,
86
+ 'hover:bg-[#EFF0F6]': !disabled && !updateType,
84
87
  'items-start': hasExtra,
85
88
  'items-center': !hasExtra,
86
89
  'pointer-events-none': streaming || disabled || readonly || confirmed,
90
+ // 字段更新视觉:新增淡绿背景,删除置灰
91
+ 'bg-[#F0FDF4]': updateType === 'new',
92
+ 'bg-[#F5F5F5]': updateType === 'removed',
87
93
  },
88
94
  className
89
95
  )}
@@ -116,12 +122,13 @@ export const LineChecker: React.FC<LineCheckerProps> = ({
116
122
  <div className="w-4 h-4 flex-shrink-0 text-[#6F829E] leading-[16px]">{icon}</div>
117
123
  )}
118
124
 
119
- {/* Title - truncates */}
125
+ {/* Title - truncates;removed 时置灰并加中横线 */}
120
126
  <p
121
127
  className={classNames(' min-w-0 text-sm text-[#121111] truncate text-[12px]', {
122
128
  'flex-1': !!icon,
123
129
  'flex-grow-1 flex-shrink-0': !icon,
124
130
  '!text-[#666]': readonly,
131
+ 'line-through !text-[#999]': updateType === 'removed',
125
132
  })}
126
133
  >
127
134
  {title}
@@ -134,6 +141,7 @@ export const LineChecker: React.FC<LineCheckerProps> = ({
134
141
  'whitespace-nowrap flex-shrink-0': !!icon,
135
142
  anywhere: !icon,
136
143
  '!text-[#121111]': readonly,
144
+ 'line-through !text-[#999]': updateType === 'removed',
137
145
  })}
138
146
  >
139
147
  {shortDesc}
@@ -106,6 +106,8 @@ const VALID_TYPE_MAP: Partial<Record<FieldType, Set<FieldType>>> = {
106
106
  'text': new Set(['text', 'textarea']),
107
107
  'number': new Set(['text', 'textarea']),
108
108
  'radio': new Set(['radio', 'radiogroup']),
109
+ 'signature': new Set(['signature', 'image', 'upload']),
110
+ 'image': new Set(['signature', 'image', 'upload']),
109
111
  }
110
112
 
111
113
  const EMPTY_SET = new Set();