@baishuyun/ai-design 2.0.27 → 2.0.28
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ai-design",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.28",
|
|
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.
|
|
64
|
-
"@baishuyun/types": "3.0.
|
|
63
|
+
"@baishuyun/ai-feat-utils": "2.0.26",
|
|
64
|
+
"@baishuyun/types": "3.0.24"
|
|
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.24",
|
|
87
87
|
"@baishuyun/tailwind-config": "3.0.9",
|
|
88
88
|
"@baishuyun/typescript-config": "2.0.9"
|
|
89
89
|
},
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import { createPortal } from 'react-dom';
|
|
10
10
|
import { cn } from '../../lib/utils';
|
|
11
11
|
import { transCls } from '../../const/ui';
|
|
12
|
-
import { ScrollSlider } from './scroll-slider';
|
|
12
|
+
import { FlatNode, ScrollSlider } from './scroll-slider';
|
|
13
13
|
import { EntryPopover } from './entry-popover';
|
|
14
|
-
import { buildEntryTreeFromAliasMap } from './build-tree';
|
|
15
|
-
import type { BsEntrySelectProps, BsEntrySelectChangeResult } from './types';
|
|
14
|
+
import { buildEntryTreeFromAliasMap, buildFlowCenterTree } from './build-tree';
|
|
15
|
+
import type { BsEntrySelectProps, BsEntrySelectChangeResult, EntryTreeItem } from './types';
|
|
16
16
|
import { MenuLinesIcon } from '../bs-icons';
|
|
17
17
|
import { useSelectPopoverPosition } from '../../hooks/use-select-popover-position';
|
|
18
18
|
|
|
@@ -163,7 +163,27 @@ export const BsEntrySelect = forwardRef<HTMLDivElement, BsEntrySelectProps>(
|
|
|
163
163
|
|
|
164
164
|
const currentAppTree = useMemo(() => {
|
|
165
165
|
if (!currentAppId || !appDetails[currentAppId]) return [];
|
|
166
|
-
|
|
166
|
+
|
|
167
|
+
const showFlowCenter = (appDetails[currentAppId ?? '']?.isFlow ?? false);
|
|
168
|
+
|
|
169
|
+
const flowCenterNodes: FlatNode[] = [];
|
|
170
|
+
|
|
171
|
+
// Flow center — first tab in tabs mode for flow-type apps
|
|
172
|
+
if (showFlowCenter) {
|
|
173
|
+
const flowTree = buildFlowCenterTree();
|
|
174
|
+
flowCenterNodes.push(
|
|
175
|
+
...flowTree.map((node) => ({
|
|
176
|
+
node,
|
|
177
|
+
appId: currentAppId ?? '',
|
|
178
|
+
section: 'current' as const,
|
|
179
|
+
})),
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const flowCenterItems: EntryTreeItem[] = flowCenterNodes.map(n => n.node);
|
|
184
|
+
const result = buildEntryTreeFromAliasMap(appDetails[currentAppId], searchQuery);
|
|
185
|
+
|
|
186
|
+
return flowCenterItems.concat(result);
|
|
167
187
|
}, [
|
|
168
188
|
appDetails,
|
|
169
189
|
currentAppId,
|