Skip to content

Commit 9ea80ef

Browse files
committed
feat: synchronize deps to antd 6.4.0 and antdx 2.7.0
1 parent 8dc598b commit 9ea80ef

40 files changed

Lines changed: 1932 additions & 1851 deletions

File tree

.changeset/five-wings-look.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@modelscope-studio/lint-config': patch
3+
'@modelscope-studio/changelog': patch
4+
'@modelscope-studio/antdx': patch
5+
'@modelscope-studio/antd': patch
6+
'@modelscope-studio/base': patch
7+
'@modelscope-studio/pro': patch
8+
'@modelscope-studio/frontend': patch
9+
'modelscope_studio': patch
10+
---
11+
12+
feat: synchronize deps to antd 6.4.0 and antdx 2.7.0

.wiki/en/Ant Design X Components/General Components/Bubble Chat Bubble/Bubble Chat Bubble.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,24 @@
2222

2323
## Table of Contents
2424

25-
1. [Introduction](#introduction)
26-
2. [Project Structure](#project-structure)
27-
3. [Core Components](#core-components)
28-
4. [Architecture Overview](#architecture-overview)
29-
5. [Component Details](#component-details)
30-
6. [Dependency Analysis](#dependency-analysis)
31-
7. [Performance and Maintainability](#performance-and-maintainability)
32-
8. [Troubleshooting Guide](#troubleshooting-guide)
33-
9. [Conclusion](#conclusion)
34-
10. [Appendix: Usage Examples and Best Practices](#appendix-usage-examples-and-best-practices)
25+
- [Bubble Chat Bubble](#bubble-chat-bubble)
26+
- [Update Summary](#update-summary)
27+
- [Table of Contents](#table-of-contents)
28+
- [Introduction](#introduction)
29+
- [Project Structure](#project-structure)
30+
- [Core Components](#core-components)
31+
- [Architecture Overview](#architecture-overview)
32+
- [Component Details](#component-details)
33+
- [Bubble Component](#bubble-component)
34+
- [BubbleList Component](#bubblelist-component)
35+
- [BubbleListItem and BubbleListRole](#bubblelistitem-and-bubblelistrole)
36+
- [useRole - Role Resolution Utility](#userole---role-resolution-utility)
37+
- [Divider Component](#divider-component)
38+
- [Dependency Analysis](#dependency-analysis)
39+
- [Performance and Maintainability](#performance-and-maintainability)
40+
- [Troubleshooting Guide](#troubleshooting-guide)
41+
- [Conclusion](#conclusion)
42+
- [Appendix: Usage Examples and Best Practices](#appendix-usage-examples-and-best-practices)
3543

3644
## Introduction
3745

@@ -160,7 +168,7 @@ RenderX --> End(["Done"])
160168
- **Purpose**: Converts role configuration (string, function, or object) to the RoleType required by @ant-design/x, with slot patching and index injection.
161169
- **Key Points**:
162170
- Supports `defaultRoleKeys`
163-
- Supports `preProcess` and `defaultRolePostProcess` hooks
171+
- Supports `preProcess` and `postProcess` hooks
164172
- Automatically patches header/footer/avatar/extra/loadingRender/contentRender slots
165173
- Default `contentRender` serializes objects to strings
166174

.wiki/en/Ant Design X Components/General Components/Bubble Chat Bubble/Bubble.List Component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RenderList --> End(["Done"])
3232
## Key Features
3333

3434
- **Items merging**: Prioritizes `props.items`; if not provided, reads `slotItems.items` or `default` from context, then uses `renderItems` to normalize to an array.
35-
- **Role resolution**: Uses `useRole` to support role as string, function, or object, with `preProcess` and `defaultRolePostProcess` hooks.
35+
- **Role resolution**: Uses `useRole` to support role as string, function, or object, with `preProcess` and `postProcess` hooks.
3636
- **Slot patching**: Applies patches to slots so role's avatar/header/footer/extra/loadingRender/contentRender can be overridden in advance.
3737
- **Render and scroll**: Renders via @ant-design/x's `XBubble.List`, with auto-scroll binding and scroll event callbacks.
3838

.wiki/zh/Ant Design X 组件库/反馈组件/Copy 复制操作.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ L --> N
8080

8181
### 后端组件层
8282

83-
- ****init**.py**: Python 后端组件定义,继承自 ModelScopeLayoutComponent
83+
- \***\*init**.py\*\*: Python 后端组件定义,继承自 ModelScopeLayoutComponent
8484

8585
### 工具函数层
8686

.wiki/zh/Ant Design X 组件库/通用组件/Bubble 对话气泡/Bubble 对话气泡.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ BubbleListRole --> RoleItemHandler : "注入"
251251
- 功能定位:将角色配置(字符串函数或对象)转换为 @ant-design/x 所需的 RoleType,并进行插槽补丁与索引注入。
252252
- 关键点:
253253
- 支持默认键 defaultRoleKeys
254-
- 支持 preProcess 与 defaultRolePostProcess 钩子
254+
- 支持 preProcess 与 postProcess 钩子
255255
- 自动将角色配置中的 header/footer/avatar/extra/loadingRender/contentRender 等插槽与内容进行补丁合并
256256
- 默认 contentRender 会将对象序列化为字符串
257257

.wiki/zh/Ant Design X 组件库/通用组件/Bubble 对话气泡/Bubble.List 列表组件.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ FrontList-->>FrontIndex : "渲染 XBubble.List"
143143
- 优先使用外部传入的 items;若未提供,则从上下文读取 slotItems 中的 items 或 default。
144144
- 使用 renderItems 将插槽内容转换为可渲染的数组。
145145
- 角色解析
146-
- useRole 支持 role 为字符串函数或对象,支持 preProcess 与 defaultRolePostProcess 钩子。
146+
- useRole 支持 role 为字符串函数或对象,支持 preProcess 与 postProcess 钩子。
147147
- 对插槽进行补丁处理,使角色的 avatar/header/footer/extra/loadingRender/contentRender 能前置覆盖。
148148
- 渲染与滚动
149149
- 通过 @ant-design/x 的 XBubble.List 渲染,支持自动滚动绑定与滚动事件回调。

.wiki/zh/Ant Design X 组件库/通用组件/Bubble 对话气泡/Bubble.Role 角色标识组件.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ Ctx-->>Dev : 渲染完成的消息气泡
167167
### 显示逻辑与角色类型
168168

169169
- 角色解析流程
170-
- useRole 接收 role、defaultRoleKeys、preProcess、defaultRolePostProcess 等参数。
170+
- useRole 接收 role、defaultRoleKeys、preProcess、postProcess 等参数。
171171
- 通过 useRoleItems 获取角色项集合,构建角色映射表。
172172
- 合并默认角色键与用户自定义角色键,按顺序解析为函数或对象。
173-
- 对于每个消息项,先执行 preProcess,再将角色插槽通过 patchSlots 合并到消息项上,最后应用 defaultRolePostProcess 进行最终调整。
173+
- 对于每个消息项,先执行 preProcess,再将角色插槽通过 patchSlots 合并到消息项上,最后应用 postProcess 进行最终调整。
174174

175175
```mermaid
176176
flowchart TD
@@ -180,7 +180,7 @@ BuildMap --> MergeKeys["合并默认键与自定义键"]
180180
MergeKeys --> ResolveEach["逐个解析角色键"]
181181
ResolveEach --> PreProcess["执行 preProcess 钩子"]
182182
PreProcess --> PatchSlots["合并角色插槽到消息项"]
183-
PatchSlots --> PostProcess["执行 defaultRolePostProcess 钩子"]
183+
PatchSlots --> PostProcess["执行 postProcess 钩子"]
184184
PostProcess --> End(["结束"])
185185
```
186186

@@ -256,7 +256,7 @@ ItemHandler <.. BubbleListItem : "委托"
256256
- 自定义角色样式
257257
- 通过 class_names 与 styles 为不同区域设置类名与内联样式;利用 shape 与 variant 控制外观。
258258
- 动态角色信息
259-
- 结合 useRole 的 preProcess 与 defaultRolePostProcess,实现根据消息索引或上下文动态调整角色配置。
259+
- 结合 useRole 的 preProcess 与 postProcess,实现根据消息索引或上下文动态调整角色配置。
260260
- 与 Bubble.Item 的组合
261261
- 在 BubbleList 中同时提供 items 与 roles,确保角色信息与消息内容协同渲染。
262262

backend/modelscope_studio/components/antd/alert/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def __init__(
3232
self,
3333
additional_props: dict | None = None,
3434
*,
35+
variant: Literal['filled', 'outlined'] | None = None,
3536
action: str | None = None,
3637
after_close: str | None = None,
3738
banner: bool | None = None,
@@ -63,6 +64,7 @@ def __init__(
6364
self.class_names = class_names
6465
self.styles = styles
6566
self.additional_props = additional_props
67+
self.variant = variant
6668
self.action = action
6769
self.after_close = after_close
6870
self.banner = banner

backend/modelscope_studio/components/antd/anchor/item/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def __init__(
2222
title: str | None = None,
2323
additional_props: dict | None = None,
2424
*,
25+
target_offset: int | float | None = None,
2526
key: str | None = None,
2627
replace: bool | None = None,
2728
href: str | None = None,
@@ -53,6 +54,7 @@ def __init__(
5354
self.additional_props = additional_props
5455
self.title = title
5556
self.key = key
57+
self.target_offset = target_offset
5658
self.replace = replace
5759
self.href = href
5860
self.href_target = href_target

backend/modelscope_studio/components/antd/cascader/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class AntdCascader(ModelScopeDataLayoutComponent):
3838
# supported slots
3939
SLOTS = [
4040
'allowClear.clearIcon', 'suffixIcon', 'maxTagPlaceholder',
41-
'notFoundContent', 'expandIcon', 'removeIcon', 'prefix',
42-
'displayRender', 'tagRender', 'dropdownRender', 'popupRender'
41+
'notFoundContent', 'expandIcon', 'removeIcon', 'showSearch.searchIcon',
42+
'prefix', 'displayRender', 'tagRender', 'dropdownRender', 'popupRender'
4343
'showSearch.render', 'optionRender'
4444
]
4545

@@ -61,6 +61,7 @@ def __init__(
6161
popup_render: str | None = None,
6262
expand_icon: str | None = None,
6363
prefix: str | None = None,
64+
search_icon: str | None = None,
6465
expand_trigger: Literal['click', 'hover'] = 'click',
6566
filed_names: dict | None = None,
6667
get_popup_container: str | None = None,
@@ -120,6 +121,7 @@ def __init__(
120121
self.dropdown_render = dropdown_render
121122
self.popup_render = popup_render
122123
self.expand_icon = expand_icon
124+
self.search_icon = search_icon
123125
self.expand_trigger = expand_trigger
124126
self.filed_names = filed_names
125127
self.get_popup_container = get_popup_container

0 commit comments

Comments
 (0)