@baishuyun/ai-design 2.0.29 → 2.0.31
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.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- new std action
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @baishuyun/ai-feat-utils@2.0.29
|
|
10
|
+
- @baishuyun/types@3.0.27
|
|
11
|
+
|
|
12
|
+
## 2.0.30
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- fix corp id error and openinglines error
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @baishuyun/ai-feat-utils@2.0.28
|
|
19
|
+
- @baishuyun/types@3.0.26
|
|
20
|
+
|
|
3
21
|
## 2.0.29
|
|
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.
|
|
3
|
+
"version": "2.0.31",
|
|
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/
|
|
64
|
-
"@baishuyun/
|
|
63
|
+
"@baishuyun/types": "3.0.27",
|
|
64
|
+
"@baishuyun/ai-feat-utils": "2.0.29"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": "^19.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
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.
|
|
86
|
+
"@baishuyun/types": "3.0.27",
|
|
87
87
|
"@baishuyun/tailwind-config": "3.0.9",
|
|
88
88
|
"@baishuyun/typescript-config": "2.0.9"
|
|
89
89
|
},
|
|
@@ -507,7 +507,7 @@ export function ScrollSlider({
|
|
|
507
507
|
isTabs
|
|
508
508
|
// px compensates -mx: keeps pills at the same visual position
|
|
509
509
|
// while letting bottom corner flares paint without being clipped
|
|
510
|
-
? 'items-end gap-0 overflow-y-hidden px-[10px] -mx-[10px] border-b-[#e0e0e0] before:content-[""] before:absolute before:bottom-[0px] before:left-[-
|
|
510
|
+
? 'items-end gap-0 overflow-y-hidden px-[10px] -mx-[10px] border-b-[#e0e0e0] before:content-[""] before:absolute before:bottom-[0px] before:left-[-20vw] before:right-0 before:h-[1px] before:w-[300vw] before:bg-[#e0e0e0] h-full'
|
|
511
511
|
: 'items-center gap-2.5',
|
|
512
512
|
)}
|
|
513
513
|
>
|
|
@@ -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();
|
package/src/lib/utils.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { clsx, type ClassValue } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
FieldType,
|
|
5
|
+
IAddress,
|
|
6
|
+
ILocation,
|
|
7
|
+
IField,
|
|
8
|
+
ILinkedData,
|
|
9
|
+
IFormAttachment,
|
|
10
|
+
} from '@baishuyun/types';
|
|
4
11
|
|
|
5
12
|
export function cn(...inputs: ClassValue[]) {
|
|
6
13
|
return twMerge(clsx(inputs));
|
|
@@ -80,6 +87,14 @@ export const toHumanReadable = (value: unknown, type: FieldType): string | unkno
|
|
|
80
87
|
return `经度: ${lnglatXY[0] || ''}, 纬度: ${lnglatXY[1] || ''}`;
|
|
81
88
|
}
|
|
82
89
|
|
|
90
|
+
if (
|
|
91
|
+
(type === 'upload' || type === 'image' || type === 'signature') &&
|
|
92
|
+
typeof value !== 'string'
|
|
93
|
+
) {
|
|
94
|
+
const a = value as IFormAttachment;
|
|
95
|
+
return a.name;
|
|
96
|
+
}
|
|
97
|
+
|
|
83
98
|
if (type === 'linkdata') {
|
|
84
99
|
return (value as ILinkedData).label;
|
|
85
100
|
}
|