feat: 状态胶囊升级——顶栏紧凑状态条 + 点击展开宿主渲染详情弹层(StatusItem.icon/detail:分组/行/徽标/行内深链)
This commit is contained in:
@@ -10,12 +10,50 @@ export interface OpenViewAction {
|
||||
params?: unknown
|
||||
}
|
||||
|
||||
/** 徽标/胶囊共用色调语义 */
|
||||
export type StatusTone = 'default' | 'accent' | 'warn' | 'danger'
|
||||
|
||||
/** 详情弹层里的一行(数据驱动;openView 缺省为纯展示行) */
|
||||
export interface StatusDetailRow {
|
||||
/** svg 字符串(14px 线条风格,currentColor) */
|
||||
icon?: string
|
||||
label: string
|
||||
/** 次级说明(label 下方小字) */
|
||||
detail?: string
|
||||
/** 右侧徽标文本(如 +76 -40、7/7、✓) */
|
||||
trailing?: string
|
||||
/** 徽标色调,缺省 default */
|
||||
tone?: StatusTone
|
||||
/** 整行点击的深链;缺省不可点击 */
|
||||
openView?: OpenViewAction
|
||||
}
|
||||
|
||||
/** 详情弹层分组 */
|
||||
export interface StatusDetailSection {
|
||||
/** 分组标题(如「Git 工具」「计划」);缺省无标题 */
|
||||
title?: string
|
||||
rows: StatusDetailRow[]
|
||||
}
|
||||
|
||||
/** 状态胶囊的展开详情:点击胶囊弹出宿主渲染的分组列表弹层。
|
||||
* 声明了 detail 的胶囊,点击 = 展开弹层(行内 openView 负责深链);
|
||||
* 未声明的胶囊保持原行为:点击 = item.openView。 */
|
||||
export interface StatusDetail {
|
||||
/** 弹层标题;缺省用胶囊文本 */
|
||||
title?: string
|
||||
sections: StatusDetailSection[]
|
||||
}
|
||||
|
||||
/** 状态胶囊条目(TitleBar 胶囊区 / 聊天区浮动胶囊共用一份数据) */
|
||||
export interface StatusItem {
|
||||
text: string
|
||||
tone?: 'default' | 'accent' | 'warn' | 'danger'
|
||||
/** 点击行为:深链;缺省不可点击 */
|
||||
/** svg 字符串(12-14px 线条风格,currentColor;缺省纯文字胶囊) */
|
||||
icon?: string
|
||||
tone?: StatusTone
|
||||
/** 点击行为:深链;有 detail 时被弹层取代;两者都缺省不可点击 */
|
||||
openView?: OpenViewAction
|
||||
/** 点击展开的详情弹层(数据驱动,宿主统一渲染) */
|
||||
detail?: StatusDetail
|
||||
}
|
||||
|
||||
/** 输入区工具行按钮 */
|
||||
|
||||
Reference in New Issue
Block a user