@done-coding/admin-core 0.27.0 → 0.28.0

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.
Files changed (134) hide show
  1. package/es/bridge/index.mjs +11 -3
  2. package/es/components/app-layout/AppBody.vue.mjs +1 -1
  3. package/es/components/app-layout/AppBody.vue2.mjs +14 -5
  4. package/es/components/app-layout/AppHeader.vue.mjs +1 -1
  5. package/es/components/app-layout/AppHeader.vue2.mjs +7 -5
  6. package/es/components/app-layout/AppLayout.vue.mjs +1 -1
  7. package/es/components/app-layout/AppLayout.vue2.mjs +2 -1
  8. package/es/components/app-layout/AppPage.vue.mjs +1 -1
  9. package/es/components/app-layout/AppPage.vue2.mjs +35 -32
  10. package/es/components/app-layout/app-page-geometry.mjs +16 -16
  11. package/es/components/app-layout/app-page-recommended.mjs +10 -0
  12. package/es/components/data-view/DataGridView.vue.mjs +1 -1
  13. package/es/components/data-view/DataGridView.vue2.mjs +29 -17
  14. package/es/components/data-view/DataListView.vue.mjs +1 -1
  15. package/es/components/data-view/DataListView.vue2.mjs +10 -0
  16. package/es/components/data-view/InfiniteListView.vue.mjs +1 -1
  17. package/es/components/data-view/InfiniteListView.vue2.mjs +9 -3
  18. package/es/components/data-view/use-active-scroll.mjs +15 -0
  19. package/es/components/display/DragFloat.vue.mjs +7 -0
  20. package/es/components/display/DragFloat.vue2.mjs +109 -0
  21. package/es/components/display/TabsHeader.vue.mjs +1 -1
  22. package/es/components/display/TabsHeader.vue2.mjs +9 -10
  23. package/es/components/display/TabsMain.vue.mjs +22 -7
  24. package/es/components/display/tabs-variant.mjs +14 -0
  25. package/es/components/form/FormDivider.vue.mjs +7 -0
  26. package/es/components/form/FormDivider.vue2.mjs +14 -0
  27. package/es/components/form/FormGroupTitle.vue.mjs +7 -0
  28. package/es/components/form/FormGroupTitle.vue2.mjs +59 -0
  29. package/es/components/form/FormItemNestForm.vue.mjs +1 -1
  30. package/es/components/form/FormItemNestFormList.vue.mjs +1 -1
  31. package/es/components/form/FormMain.vue.mjs +1 -1
  32. package/es/components/form/FormMain.vue2.mjs +69 -9
  33. package/es/components/form/FormSearch.vue.mjs +1 -1
  34. package/es/components/form/FormSearch.vue2.mjs +15 -3
  35. package/es/components/form/FormSubmitPanel.vue.mjs +1 -1
  36. package/es/components/form/FormSubmitPanel.vue2.mjs +14 -1
  37. package/es/components/form/ai-schema.mjs +139 -0
  38. package/es/components/form/group.mjs +81 -0
  39. package/es/components/form/use-ai-fill.mjs +71 -0
  40. package/es/components/form/utils.mjs +15 -4
  41. package/es/components/list-layout/ListLayout.vue.mjs +1 -1
  42. package/es/components/list-layout/ListLayout.vue2.mjs +103 -62
  43. package/es/components/modal/ImagePreviewTrigger.vue.mjs +5 -1
  44. package/es/components/modal/ModalConfirm.vue.mjs +1 -1
  45. package/es/components/modal/ModalConfirm.vue2.mjs +8 -5
  46. package/es/components/modal/VideoPreviewTrigger.vue.mjs +1 -1
  47. package/es/components/modal/VideoPreviewTrigger.vue2.mjs +2 -1
  48. package/es/components/page-layout/AppPageDetail.vue.mjs +1 -1
  49. package/es/components/page-layout/AppPageDetail.vue2.mjs +17 -13
  50. package/es/components/page-layout/AppPageListDetailLayout.vue.mjs +7 -4
  51. package/es/components/page-layout/AppPageListDetailSheet.vue.mjs +12 -4
  52. package/es/components/page-layout/AppPageListDetailSplit.vue.mjs +1 -1
  53. package/es/components/page-layout/AppPageListDetailSplit.vue2.mjs +10 -3
  54. package/es/components/table/TableMain.vue.mjs +1 -1
  55. package/es/components/table/TableMain.vue2.mjs +45 -25
  56. package/es/components/view-layout/ViewLayout.vue.mjs +1 -1
  57. package/es/components/view-layout/ViewLayout.vue2.mjs +46 -15
  58. package/es/config/slot-region.mjs +1 -0
  59. package/es/hooks/use-active-record.mjs +5 -1
  60. package/es/hooks/use-surface.mjs +27 -0
  61. package/es/hooks/use-theme-apply.mjs +52 -18
  62. package/es/index.mjs +81 -59
  63. package/es/inject/key.mjs +4 -0
  64. package/es/store/app.mjs +51 -17
  65. package/es/style.css +361 -184
  66. package/es/utils/dom.mjs +7 -1
  67. package/es/utils/gap-scale.mjs +25 -0
  68. package/es/utils/theme-scale.mjs +27 -0
  69. package/package.json +2 -2
  70. package/src/bridge/docs/README.md +30 -0
  71. package/src/components/app-layout/docs/README-AppBody.md +21 -0
  72. package/src/components/app-layout/docs/README-AppPage.md +20 -3
  73. package/src/components/data-view/docs/README-DataGridView.md +15 -0
  74. package/src/components/data-view/docs/README-DataListView.md +13 -0
  75. package/src/components/data-view/docs/README-InfiniteListView.md +15 -0
  76. package/src/components/display/README.md +1 -0
  77. package/src/components/display/docs/README-DragFloat.md +68 -0
  78. package/src/components/form/README.md +4 -2
  79. package/src/components/form/docs/README-FormItemNestForm.md +5 -3
  80. package/src/components/form/docs/README-FormItemNestFormList.md +7 -1
  81. package/src/components/form/docs/README-FormMain.md +102 -1
  82. package/src/components/form/docs/README-FormSearch.md +5 -0
  83. package/src/components/list-layout/docs/README-ListLayout.md +61 -1
  84. package/src/components/modal/docs/README-ImagePreviewTrigger.md +2 -0
  85. package/src/components/modal/docs/README-VideoPreviewTrigger.md +4 -1
  86. package/src/components/page-layout/docs/README-AppPageDetail.md +11 -1
  87. package/src/components/page-layout/docs/README-AppPageListDetailLayout.md +64 -6
  88. package/src/components/table/docs/README-TableMain.md +22 -0
  89. package/src/components/view-layout/docs/README-ViewLayout.md +27 -2
  90. package/src/hooks/docs/README.md +30 -1
  91. package/types/bridge/index.d.ts +69 -10
  92. package/types/components/app-layout/AppPage.vue.d.ts +15 -7
  93. package/types/components/app-layout/app-page-geometry.d.ts +19 -10
  94. package/types/components/app-layout/app-page-recommended.d.ts +12 -0
  95. package/types/components/app-layout/index.d.ts +1 -0
  96. package/types/components/data-view/types.d.ts +18 -0
  97. package/types/components/data-view/use-active-scroll.d.ts +30 -0
  98. package/types/components/display/BadgeMark.vue.d.ts +2 -2
  99. package/types/components/display/DragFloat.vue.d.ts +35 -0
  100. package/types/components/display/TabsHeader.vue.d.ts +7 -0
  101. package/types/components/display/index.d.ts +8 -1
  102. package/types/components/display/tabs-variant.d.ts +17 -0
  103. package/types/components/display/types.d.ts +6 -0
  104. package/types/components/form/FormDivider.vue.d.ts +2 -0
  105. package/types/components/form/FormGroupTitle.vue.d.ts +22 -0
  106. package/types/components/form/FormItemNestForm.vue.d.ts +2 -0
  107. package/types/components/form/ai-schema.d.ts +24 -0
  108. package/types/components/form/group.d.ts +36 -0
  109. package/types/components/form/index.d.ts +2 -0
  110. package/types/components/form/types.d.ts +94 -3
  111. package/types/components/form/use-ai-fill.d.ts +59 -0
  112. package/types/components/form/utils.d.ts +19 -0
  113. package/types/components/list-layout/ListLayout.vue.d.ts +3 -0
  114. package/types/components/list-layout/types.d.ts +28 -0
  115. package/types/components/modal/ModalConfirm.vue.d.ts +1 -1
  116. package/types/components/modal/VideoPreviewTrigger.vue.d.ts +1 -1
  117. package/types/components/page-layout/AppPageDetail.vue.d.ts +2 -2
  118. package/types/components/page-layout/AppPageListDetailLayout.vue.d.ts +3 -7
  119. package/types/components/page-layout/AppPageListDetailSheet.vue.d.ts +4 -8
  120. package/types/components/page-layout/AppPageListDetailSplit.vue.d.ts +4 -8
  121. package/types/components/page-layout/types.d.ts +42 -0
  122. package/types/components/panel/PanelItemNestForm.vue.d.ts +2 -0
  123. package/types/components/table/types.d.ts +9 -0
  124. package/types/components/view-layout/ViewLayout.vue.d.ts +18 -0
  125. package/types/components/view-layout/types.d.ts +15 -0
  126. package/types/config/slot-region.d.ts +10 -1
  127. package/types/hooks/use-surface.d.ts +34 -0
  128. package/types/inject/key.d.ts +10 -0
  129. package/types/injectInfo.json.d.ts +1 -1
  130. package/types/store/app.d.ts +3 -0
  131. package/types/utils/dom.d.ts +31 -0
  132. package/types/utils/gap-scale.d.ts +46 -0
  133. package/types/utils/index.d.ts +1 -0
  134. package/types/utils/theme-scale.d.ts +33 -0
@@ -35,7 +35,7 @@ export interface AppPageSlotSizes {
35
35
  * AppPage(四槽 owner)据此扣槽后**同键重 provide**,四家一次修好。左右槽只减宽、不影响高,故只扣 top/bottom;
36
36
  * 扣减量与 shim padding 同式(见 {@link appPageSlotInset})以与内容内缩一致。
37
37
  */
38
- export declare function computeAppPageReducedViewportHeight(bodyViewportHeight: number, slotSizes: AppPageSlotSizes, shimPadding: number): number;
38
+ export declare function computeAppPageReducedViewportHeight(bodyViewportHeight: number, slotSizes: AppPageSlotSizes, outerGap: number): number;
39
39
  /**
40
40
  * 扣掉 left/right 槽后的内容视口可用宽(纯函数,钳非负)——「撑满且不出横向滚动条」的最大宽。
41
41
  *
@@ -43,7 +43,7 @@ export declare function computeAppPageReducedViewportHeight(bodyViewportHeight:
43
43
  * [MUST NOT] 用 `calc(100vw − …)` 推:100vw 含滚动条宽,有纵向滚动条时按其撑满会横向溢出)。
44
44
  * 扣减量与 {@link computeAppPageReducedViewportHeight} 同式({@link appPageSlotInset},与 shim padding 回写一致)。
45
45
  */
46
- export declare function computeAppPageReducedViewportWidth(pageBoxWidth: number, slotSizes: AppPageSlotSizes, shimPadding: number): number;
46
+ export declare function computeAppPageReducedViewportWidth(pageBoxWidth: number, slotSizes: AppPageSlotSizes, outerGap: number): number;
47
47
  /**
48
48
  * 合成「固定 chrome 四边内衬」(px, 窗口坐标,纯函数)= app 级 chrome inset + 对应悬浮槽(含 gap,仅槽存在时计)。
49
49
  * 供 tile 等自然流 window 滚动定位不被固定 chrome 遮(`APP_PAGE_CONTENT_INSET`)。
@@ -63,17 +63,26 @@ export declare const APP_PAGE_SLOT_Z_INDEX = 1;
63
63
  * 未渲染时对应 H=0 即自动贴满。
64
64
  * 全 viewport 坐标、scroll 不变;调用方传响应式快照即随 chrome 跟。
65
65
  *
66
- * @param topH/bottomH top/bottom 区量得高(含其 shim 边距;未渲染为 0),用于 left/right 让位。
66
+ * @param slotSizes 四区量得尺寸(本函数只用 topH/bottomH —— left/right 只减宽、不影响竖向跨度)。
67
+ * @param outerGap 外圈档(`gapScaleValue(基数,"outer")`)——**槽 ↔ 槽**的间隔。
68
+ *
69
+ * 🔴 让位量走 {@link appPageSlotInset}(`v ? v + outerGap : 0`),与 `shimStyle`
70
+ * (槽 ↔ 默认内容)**同式同源**。huhyx7 只改了 shim 那一处、漏了本函数,导致
71
+ * 「默认内容让了一个外圈档、而 left/right 紧贴 top/bottom 零间隙」——同一页里
72
+ * 两种让位口径并存。[MUST NOT] 只改一处。
67
73
  */
68
- export declare function computeAppPageSlotStyles(rect: AppPageRectInset, topH: number, bottomH: number): AppPageSlotStyles;
74
+ export declare function computeAppPageSlotStyles(rect: AppPageRectInset, slotSizes: AppPageSlotSizes, outerGap: number): AppPageSlotStyles;
69
75
  /**
70
76
  * AppPage 四区内层 shim 的四边 padding(纯函数)。
71
77
  *
72
- * chrome 的外侧边留 `sp`(= app-body-shim 内边距,复刻原呼吸)、朝内容的内侧边留
73
- * `gap`(AppPage 级控距);left/right 的上下边为 0(竖向间隔由 top/bottom 区的 `gap` 边管)。
74
- * `padding` 简写按 上/右/下/左。
78
+ * 🔴 **huhyx7 起四边恒 0**,两个来源都消失了:
79
+ * - **朝 chrome 侧**:原本留 `shimPadding` 是为了复刻 `app-body-shim` 的内呼吸
80
+ * (槽是 `fixed`、逃出了那层 padding 盒)。该 padding 已废除,无可复刻之物;
81
+ * 且槽本就贴在 `.app-body` 的 padding 盒边缘,**外圈档已经给过呼吸**。
82
+ * - **朝内容侧**:间隔改由**默认槽**让出(见 {@link appPageSlotInset}),
83
+ * 槽这边 [MUST] 归零,否则两边各让一份 = 双份。
75
84
  *
76
- * @param sp app-body-shim 内边距(朝 chrome 侧呼吸)
77
- * @param gap AppPage gap(朝内容侧间隔)
85
+ * 保留本函数而非删掉挂点:槽内层 shim 仍是布局盒(`left/right` 靠它填满竖轨),
86
+ * 且留一个显式的「四边为 0 是刻意的」出口,比让下一个人从空 div 里猜要好。
78
87
  */
79
- export declare function computeAppPageSlotShimStyles(sp: number, gap: number): AppPageSlotStyles;
88
+ export declare function computeAppPageSlotShimStyles(): AppPageSlotStyles;
@@ -0,0 +1,12 @@
1
+ import { AppPageListLayoutRecommended } from './types';
2
+ /**
3
+ * 窄栏(`AppPage#left` / `#right`)里放 `ListLayout` 的推荐配置(固定内置值,非运行时开关)。
4
+ *
5
+ * **唯一来源**:`AppPage` 经 `#left` / `#right` 插槽 scope 下发(`listLayoutRecommended`),
6
+ * `AppPageListDetailSplit` 经 `#list` 插槽 scope 转发 —— 两条通道读同一份常量,
7
+ * [MUST NOT] 各写一份(同一个会变的值抄两处必漂移)。
8
+ *
9
+ * 与 `useContextDefaults` 的分工:后者是**隐式**通道(自动生效但要求直系父可达),本常量是
10
+ * **显式**通道(消费方在 `#list` 里包了包裹层、隐式通道断链时的出路)。两者值域刻意重叠。
11
+ */
12
+ export declare const APP_PAGE_LIST_LAYOUT_RECOMMENDED: AppPageListLayoutRecommended;
@@ -11,3 +11,4 @@ export { AppLayout, AppHeader, AppSidebar, AppAside, AppBody, AppBreadcrumb, App
11
11
  export * from './types';
12
12
  export * from './viewport';
13
13
  export * from './app-page-geometry';
14
+ export * from './app-page-recommended';
@@ -32,6 +32,12 @@ export type DataViewColumn<T extends Record<string, any> = Record<string, any>>
32
32
  * 外层用 CSS 决定,本组件不内置任何列数 / 布局。
33
33
  */
34
34
  export interface DataListViewProps<T extends Record<string, any>, F extends Record<string, any>> {
35
+ /**
36
+ * 当前项**跟随滚动**(默认开):`activeId` 变化后把对应项滚进视口。
37
+ * 用 `nearest` 语义 ⇒ **已在视口内则零动作**,用户自己滚着看时点某项不会被拽走。
38
+ * 上/下一条导航、深链直达当前项等场景全靠它。关掉传 `false`。
39
+ */
40
+ activeScroll?: boolean;
35
41
  /** 当前页数据(外部传入,组件不持有请求 / 分页逻辑) */
36
42
  data: T[];
37
43
  /** 行唯一键:行数据键名 或 取键函数(内部统一 String 化) */
@@ -121,6 +127,12 @@ export interface InfiniteListViewProps<T extends Record<string, any> = Record<st
121
127
  estimateSize?: number;
122
128
  /** 视口外预渲染项数 */
123
129
  overscan?: number;
130
+ /**
131
+ * 自持面(默认 `true`):面色 + 内呼吸 + 圆角,单独用也观感一致。
132
+ * 置于 `ModalConfirm` 正文时经上下文自动取 `false`;显式传值恒优先。
133
+ * 详见 `hooks/use-surface.ts`。
134
+ */
135
+ surface?: boolean;
124
136
  /** 传入时容器限高滚动(内部 overflowY: auto);数字 = px,字符串 = CSS 长度(如 "100vh") */
125
137
  maxHeight?: number | string;
126
138
  /** opt-in 触摸下拉刷新(默认关) */
@@ -155,6 +167,12 @@ export interface DataGridViewProps<T extends Record<string, any>, SQ extends Rec
155
167
  * (24 栅格,如 `{ xs: 24, sm: 12, md: 8, lg: 6, xl: 4 }`,列数 = 24 / span)。
156
168
  */
157
169
  gridColumns?: number | GridColumnsConfig;
170
+ /**
171
+ * 自持面(默认 `true`):面色 + 内呼吸 + 圆角,单独用也观感一致。
172
+ * 置于 `ModalConfirm` 正文时经上下文自动取 `false`;显式传值恒优先。
173
+ * 详见 `hooks/use-surface.ts`。
174
+ */
175
+ surface?: boolean;
158
176
  /**
159
177
  * 数据区最大高度;与 refine 二选一作为高度基准。
160
178
  * 数字 = px;字符串 = CSS 长度(默认 "100vh" = 满视口高,等价视口高度限高,
@@ -0,0 +1,30 @@
1
+ import { Ref } from 'vue';
2
+ import { ActiveRecordKey } from '../../hooks/use-active-record';
3
+ /** {@link useActiveScroll} 入参 */
4
+ export interface UseActiveScrollOptions {
5
+ /** 开关(默认由消费组件的 prop 决定) */
6
+ enabled: () => boolean;
7
+ /** 当前项 id(变化即触发跟随) */
8
+ activeId: Ref<ActiveRecordKey | undefined>;
9
+ /** 列表根容器(在其内部按 `activeSelector` 找当前项) */
10
+ container: () => HTMLElement | null | undefined;
11
+ /** 当前项选择器,默认 `.is-active` */
12
+ activeSelector?: string;
13
+ }
14
+ /**
15
+ * 当前项**跟随滚动**:`activeId` 变化后把对应 DOM 滚进视口(非主干增强,规则 22)。
16
+ *
17
+ * 用 `domScrollIntoViewport`(`block/inline: "nearest"`):
18
+ * - **已在视口内则零动作** —— 用户自己滚着看时点某项不会被拽走,干扰极小;
19
+ * - `nearest` 同时避免「越级滚动」(默认 `start` 会把整个 body 滚了)。
20
+ *
21
+ * 🔴 瞬时(`behavior: "auto"`)而非 `smooth`:这是**跟随**不是**导航**。
22
+ * 本仓 `TabsTile` 自研 smooth 滚动曾被 v-model 回流重渲染打断(真机复现),
23
+ * [MUST NOT] 在此默认 smooth。
24
+ *
25
+ * `nextTick` 是必须的:`activeId` 变化到「当前项 DOM 拿到 active 类」要等一次渲染,
26
+ * 同步查会选中**上一个**当前项。
27
+ *
28
+ * 删除该功能 = 删本文件 + 组件里那一行委托 + prop(规则 22 可摘除边界)。
29
+ */
30
+ export declare const useActiveScroll: (options: UseActiveScrollOptions) => void;
@@ -108,7 +108,7 @@ declare function __VLS_template(): {
108
108
  max: number;
109
109
  showZero: boolean;
110
110
  badgeStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
111
- }> & Omit<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, "value" | "max" | "content" | "offset" | "type" | "showZero" | "badgeStyle"> & {
111
+ }> & Omit<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, "offset" | "type" | "value" | "max" | "content" | "showZero" | "badgeStyle"> & {
112
112
  content: string;
113
113
  } & {} & import('vue').ComponentCustomProperties & {} & {
114
114
  $slots: {
@@ -187,7 +187,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
187
187
  max: number;
188
188
  showZero: boolean;
189
189
  badgeStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
190
- }> & Omit<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, "value" | "max" | "content" | "offset" | "type" | "showZero" | "badgeStyle"> & {
190
+ }> & Omit<Readonly<import('element-plus').BadgeProps> & Readonly<{}>, "offset" | "type" | "value" | "max" | "content" | "showZero" | "badgeStyle"> & {
191
191
  content: string;
192
192
  } & {} & import('vue').ComponentCustomProperties & {} & {
193
193
  $slots: {
@@ -0,0 +1,35 @@
1
+ /** 初始停靠角 */
2
+ type DragFloatPlacement = "top-right" | "top-left" | "bottom-right" | "bottom-left";
3
+ type __VLS_Props = {
4
+ /** 初始停靠角(拖动后失效,以拖后位置为准) */
5
+ placement?: DragFloatPlacement;
6
+ /** 初始角内缩偏移 px(负值 = 微溢出宿主角) */
7
+ offset?: number;
8
+ /** 呼吸光影(主色缓慢明暗;reduced-motion 静止、拖拽中暂停) */
9
+ breathing?: boolean;
10
+ };
11
+ declare function __VLS_template(): {
12
+ attrs: Partial<{}>;
13
+ slots: {
14
+ default?(_: {}): any;
15
+ };
16
+ refs: {
17
+ rootRef: HTMLDivElement;
18
+ };
19
+ rootEl: HTMLDivElement;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
+ placement: DragFloatPlacement;
24
+ offset: number;
25
+ breathing: boolean;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
+ rootRef: HTMLDivElement;
28
+ }, HTMLDivElement>;
29
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
+ export default _default;
31
+ type __VLS_WithTemplateSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -5,6 +5,12 @@ type __VLS_Props = {
5
5
  level?: number;
6
6
  /** 视觉风格变体;不传按 level 推导默认 */
7
7
  variant?: TabsHeaderVariant;
8
+ /**
9
+ * `card` 变体下**选中块**的底色(默认取底档 `--el-bg-color-page`)。
10
+ * 消费方可换成主色浅调等(如 `var(--el-color-primary-light-9)`)做高亮态。
11
+ * 🔴 [MUST] 传 CSS 变量或主题色,[MUST NOT] 写死色值 —— 写死切主题 / 亮暗不跟(规则 14)。
12
+ */
13
+ activeBg?: string;
8
14
  };
9
15
  type __VLS_PublicProps = {
10
16
  "activeKey"?: string;
@@ -25,6 +31,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
25
31
  "onUpdate:activeKey"?: ((value: string) => any) | undefined;
26
32
  }>, {
27
33
  level: number;
34
+ activeBg: string;
28
35
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
29
36
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
37
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { default as DragFloat } from './DragFloat.vue';
1
2
  import { default as ShadowClone } from './ShadowClone.vue';
2
3
  import { default as WatchSize } from './WatchSize.vue';
3
4
  import { default as TabsMain } from './TabsMain.vue';
@@ -55,5 +56,11 @@ BooleanTag,
55
56
  * `disabled` 关闭分身仅就地)。两份 vnode 树 = 两个独立实例,只适合无内部状态的受控组件
56
57
  * (v-model 绑同一 ref 即同源同步);静态固定 id 双份会撞,消费方负责。
57
58
  */
58
- ShadowClone, };
59
+ ShadowClone,
60
+ /**
61
+ * 可拖拽悬浮容器:默认插槽内容变成宿主容器(offsetParent,[MUST] 有定位)内可拖拽的
62
+ * 悬浮块——容器内约束 + 点击拖拽消歧(拖过阈值不触发 click)+ 呼吸光影 + 位置会话内
63
+ * 记忆。首个消费者 = FormMain AI 填充触发器。[MUST NOT] 当 fixed 全局悬浮球用。
64
+ */
65
+ DragFloat, };
59
66
  export * from './types';
@@ -0,0 +1,17 @@
1
+ import { TabsHeaderVariant } from './types';
2
+ /** level 钳到 [1,4](超 4 档按 4 处理) */
3
+ export declare const tabsClampLevel: (level: number) => number;
4
+ /**
5
+ * 解析最终 variant:显式传入恒优先,否则按 level 推导默认。
6
+ *
7
+ * 🔴 `TabsHeader`(画 tab 条)与 `TabsMain`(决定 header ↔ content 之间留不留呼吸位)
8
+ * **都要知道最终 variant**,故抽为纯函数共用 —— [MUST NOT] 两处各写一份推导,
9
+ * 那样 card 的「选中块与 content 连通」会在某一侧悄悄失配。
10
+ */
11
+ export declare const resolveTabsHeaderVariant: (variant: TabsHeaderVariant | undefined, level: number) => TabsHeaderVariant;
12
+ /**
13
+ * `card` 变体下选中块 / 根底的缺省色(底档)。
14
+ * 🔴 `TabsHeader`(画选中块)与 `TabsMain`(给根铺同色保连通)**共用此常量** ——
15
+ * 两处各写一份默认值,就会出现「选中块有色、根还是透明」的半截连通。
16
+ */
17
+ export declare const TABS_ACTIVE_BG_DEFAULT = "var(--el-bg-color-page)";
@@ -209,6 +209,12 @@ export interface TabsMainProps {
209
209
  refineReduceHeight?: number;
210
210
  /** 显式指定 TabsHeader 视觉风格,不传则按 visualLevel 推导默认(L1=card / L2=indicator / L3=indicator-compact / L4=plain)。字号始终跟随 level,不受 variant 影响。 */
211
211
  variant?: TabsHeaderVariant;
212
+ /**
213
+ * `card` 变体下**选中块**的底色(默认底档 `--el-bg-color-page`)。
214
+ * 换主色浅调(`var(--el-color-primary-light-9)`)即高亮态。
215
+ * [MUST] 传 CSS 变量 / 主题色,[MUST NOT] 写死色值(规则 14)。
216
+ */
217
+ activeBg?: string;
212
218
  /**
213
219
  * 把当前激活 tab(v-model)同步到路由 URL query 的 key 名。
214
220
  * - 传了即启用**双向同步**:切 tab → `router.replace` 写 `?{queryKey}={tab.key}`(不压历史栈、只增删自己这个 key、不动其它 query);
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ /** 分组标题文案 */
3
+ title: string;
4
+ /** 是否可折叠(false = 纯标题,无箭头无点击) */
5
+ collapsible?: boolean;
6
+ /** 当前折叠态(真相在 swiftFormItemGroup 闭包,本组件只读) */
7
+ collapsed?: boolean;
8
+ /** 组内成员字段 key —— 用于判断校验错误是否落在本组 */
9
+ memberKeys?: string[];
10
+ /** 切换折叠(回调 prop,配置化挂载经 h() 传入) */
11
+ onToggle?: () => void;
12
+ /** 展开(幂等,校验失败自动展开用;回调 prop) */
13
+ onExpand?: () => void;
14
+ };
15
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
+ onToggle: () => void;
17
+ collapsed: boolean;
18
+ collapsible: boolean;
19
+ memberKeys: string[];
20
+ onExpand: () => void;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ export default _default;
@@ -31,6 +31,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
31
31
  generate: () => Record<string, any>;
32
32
  parse: (stringifyData: import('./types').ExcludeNeverProperties<import('./types').ExtractFormStringifyRawFromObject<Record<string, any>, Record<string, any>>>) => Record<string, any>;
33
33
  stringify: () => import('./types').ExcludeNeverProperties<import('./types').ExtractFormStringifyRawFromObject<Record<string, any>, Record<string, any>>>;
34
+ getAiSchema: () => Promise<import('./types').FormAiSchema>;
35
+ setValues: (partial: Partial<Record<string, any>>) => void;
34
36
  } | null;
35
37
  }, any>;
36
38
  export default _default;
@@ -0,0 +1,24 @@
1
+ import { FormAiSchema, FormItemConfigList } from './types';
2
+ import { CoreConfigDescription } from '../../bridge';
3
+ /**
4
+ * 表单目标描述解析(trsf36):`FormMainProps.description` → schema 顶层 description 文本。
5
+ * string 直用;`CoreConfigDescription` 对象拼「适用:…/不适用:…」(与字段级
6
+ * {@link buildAiDescription} 措辞同源);空 / 全空对象 → undefined(duck 不输出)。
7
+ */
8
+ export declare const resolveFormAiFormDescription: (description: string | CoreConfigDescription | undefined) => string | undefined;
9
+ /** `getFormAiSchema` 可选项(trsf36 追加,additive) */
10
+ export interface GetFormAiSchemaOptions {
11
+ /** 表单目标描述(→ schema 顶层 description,见 {@link resolveFormAiFormDescription}) */
12
+ description?: string | CoreConfigDescription;
13
+ }
14
+ /**
15
+ * 导出表单机器可读描述——按 OpenAI strict 硬限制裁剪的 JSON Schema(AI 填充数据层)。
16
+ * ----
17
+ * - property key = 配置 key(key 是身份,description 是语义,D4);全 key 进 required,
18
+ * 每字段 `anyOf: [载荷, {type:"null"}]`——null = 留空通道(不确定就留空,D8-ⓑ)。
19
+ * - 过滤:ignore(含 `__` 全大写约定)/ hide 为真 / aiIgnore 为真的项不导出(D5 + 隐私面)。
20
+ * - 选项三形态见 {@link resolveAiOptions}(getOptions 异步 ⇒ 本函数 async)。
21
+ * - 🔴 pattern / format / minLength 不被模型执行 ⇒ 校验回落表单自己的 rules(D1)。
22
+ * - 表单目标描述(trsf36)经 options.description 落顶层 description(缺省不输出)。
23
+ */
24
+ export declare const getFormAiSchema: <PO extends Record<string, any>, SO extends Record<string, any>>(list: FormItemConfigList<PO, SO>, data: PO, options?: GetFormAiSchemaOptions) => Promise<FormAiSchema>;
@@ -0,0 +1,36 @@
1
+ import { FormItemConfig, FormItemConfigList } from './types';
2
+ /**
3
+ * 折叠态的**视觉隐藏**类名(样式在 `FormMain.vue`)。
4
+ * 🔴 走 class 而非 `hide`:`hide` 会进 `hideKeyList` 并被 `validate()` 抹掉错误 ——
5
+ * 折叠区的必填项就此静默失效。视觉隐藏不影响 el-form-item 的校验。
6
+ */
7
+ export declare const COLLAPSED_CLASS = "dc-form-item-collapsed";
8
+ /** `swiftFormItemGroup` 可选项 */
9
+ export interface SwiftFormItemGroupOptions {
10
+ /** 初始是否折叠(非受控,默认 false = 展开) */
11
+ defaultCollapsed?: boolean;
12
+ /** 是否可折叠(默认 true;false = 纯分组标题,不接管组内项显隐) */
13
+ collapsible?: boolean;
14
+ /** 标题伪 item key 覆盖([MUST] `__` 前缀全大写;缺省内部自增 `__GROUP_<n>`) */
15
+ key?: string;
16
+ }
17
+ /**
18
+ * 快捷配置表单分组:`[标题伪 item, ...组内项]` 扁平展开。
19
+ *
20
+ * - 标题伪 item **恒 `span: 24` 不可配**(甲方 2026-09-15 明定,不给覆盖口子)。
21
+ * - 折叠态**按 FormMain 实例隔离**:以 `scope.data` 对象身份为键懒建 ref——同一份
22
+ * 配置喂多个表单实例(如 C4 行列表每行)互不串态。
23
+ * - 折叠 = **纯视觉收起**:组内项照常参与校验;有必填未填时 `validate()` 照常失败,
24
+ * 并由 `FormGroupTitle` **自动展开本组 + 滚动到错误项**([MUST NOT] 让使用者
25
+ * 面对「看不见错在哪、却提交不了」,也 [MUST NOT] 把必填项静默跳过)。
26
+ * - 组内项原有 `hide`(布尔 / 函数)**不受折叠影响**,两者是正交的两件事。
27
+ */
28
+ export declare const swiftFormItemGroup: <PO extends Record<string, any>,
29
+ /** 需要格式化的模型 */
30
+ SO extends Record<string, any>>(title: string, items: FormItemConfigList<PO, SO>, options?: SwiftFormItemGroupOptions) => FormItemConfigList<PO, SO>;
31
+ /**
32
+ * 快捷配置表单分割线:单个伪 item(`ElDivider`,恒整行、数据零污染)。
33
+ */
34
+ export declare const swiftFormItemDivider: <PO extends Record<string, any> = Record<string, any>,
35
+ /** 需要格式化的模型 */
36
+ SO extends Record<string, any> = Record<string, any>>() => FormItemConfig<PO, SO>;
@@ -22,6 +22,8 @@ import { default as FormItemNestForm } from './FormItemNestForm.vue';
22
22
  import { default as FormItemNestFormList } from './FormItemNestFormList.vue';
23
23
  export * from './types';
24
24
  export * from './utils';
25
+ export * from './group';
26
+ export * from './ai-schema';
25
27
  export * from './nest-registry';
26
28
  export * from './use-nest-form';
27
29
  export * from './nest-form-item';
@@ -1,5 +1,6 @@
1
1
  import { FormItemRule, ColProps, FormItemProps, ButtonProps, AffixProps } from 'element-plus';
2
- import { VNode, ComputedRef } from 'vue';
2
+ import { VNode, ComputedRef, Component } from 'vue';
3
+ import { CoreConfigDescription } from '../../bridge';
3
4
  export type OnlyOneKey<T extends Record<string, any>> = {
4
5
  [K in keyof T]: {
5
6
  [P in K]?: T[P];
@@ -22,6 +23,36 @@ export type FormItemConfigExtra = OnlyOneKey<{
22
23
  interface WrapProps extends FormItemProps {
23
24
  [key: string]: any;
24
25
  }
26
+ /** AI 填充数据类型(`FormItemConfig.type`;OpenAI strict 支持的基元集,期一 array 恒字符串元素) */
27
+ export type FormAiValueType = "string" | "number" | "integer" | "boolean" | "array";
28
+ /** getAiSchema 单字段有效载荷(anyOf 第一分支;第二分支恒 `{type:"null"}` 留空通道) */
29
+ export interface FormAiSchemaPayload {
30
+ type: FormAiValueType;
31
+ /** 选项枚举(options / getOptions 形态且值类型均一才挂;remoteMethod 不可穷举不产出) */
32
+ enum?: Array<string | number>;
33
+ /** 数组元素约束(仅 type:"array";期一只支持字符串数组,D7) */
34
+ items?: {
35
+ type: "string";
36
+ };
37
+ }
38
+ /** getAiSchema 单字段投影(description = label + tip(string) + suitable/unsuitable + 选项 label 拼装) */
39
+ export interface FormAiSchemaProperty {
40
+ description: string;
41
+ /** [载荷, null]——所有字段进 required 后由 null 分支表达"留空"(模型不确定就留空) */
42
+ anyOf: [FormAiSchemaPayload, {
43
+ type: "null";
44
+ }];
45
+ }
46
+ /** 表单机器可读描述(按 OpenAI strict 硬限制裁剪的 JSON Schema,`getAiSchema()` 返回值) */
47
+ export interface FormAiSchema {
48
+ type: "object";
49
+ /** 表单目标描述(trsf36,JSON Schema 标准顶层字段)——来自 `FormMainProps.description`,缺省不输出 */
50
+ description?: string;
51
+ properties: Record<string, FormAiSchemaProperty>;
52
+ /** strict 约束:全部导出字段进 required(可空由各字段 anyOf null 分支表达) */
53
+ required: string[];
54
+ additionalProperties: false;
55
+ }
25
56
  /** formItem联动配置 */
26
57
  interface FormItemLinkConfig<K extends string, BV, OV> {
27
58
  /** 关联(该宿主配置)表单项的key */
@@ -104,6 +135,22 @@ SV extends PK extends keyof SO ? SO[PK] : PV = PK extends keyof SO ? SO[PK] : PV
104
135
  * 额外一些配置
105
136
  */
106
137
  extra?: FormItemConfigExtra;
138
+ /**
139
+ * AI 填充数据类型(getAiSchema 导出用;可选——加必填即 breaking)。
140
+ * 解析优先级:显式 > init typeof 推导 > 兜底 "string"。
141
+ * 语义类型(人名/金额)写 description,[MUST NOT] 另开字段。
142
+ */
143
+ type?: FormAiValueType;
144
+ /**
145
+ * AI 填充选型描述(正/反两面精调位,复用主题那套 {@link CoreConfigDescription}),
146
+ * 拼进 schema property description(与 label / string 形态 tip 同拼)。
147
+ */
148
+ description?: CoreConfigDescription;
149
+ /**
150
+ * AI 填充排除(隐私面):本项不出现在 getAiSchema 导出——
151
+ * schema 会带走 label + 选项数据(可能含客户名单 / 内部编码),逐字段按需排除。
152
+ */
153
+ aiIgnore?: boolean;
107
154
  }
108
155
  /** form配置 */
109
156
  export type FormItemConfigList<PO extends Record<string, any> = Record<string, any>, SO extends Record<string, any> = Record<string, any>> = FormItemConfig<PO, SO>[];
@@ -144,9 +191,19 @@ export interface FormMainInstance<PO extends Record<string, any> = Record<string
144
191
  generate: () => PO;
145
192
  parse: (stringifyData: ExtractFormStringifyFromObject<PO, SO>) => PO;
146
193
  stringify: () => ExcludeNeverProperties<ExtractFormStringifyRawFromObject<PO, SO>>;
194
+ /**
195
+ * 导出表单机器可读描述(OpenAI strict 裁剪 JSON Schema,AI 填充数据层)。
196
+ * async:getOptions 型选项需异步拉取后并入 enum。
197
+ */
198
+ getAiSchema: () => Promise<FormAiSchema>;
199
+ /**
200
+ * 按 key 就地 patch 表单值([MUST NOT] 换 data 容器引用——父子同引用贯通,换即断链)。
201
+ * 只写配置内非 ignore 的 key;undefined / null 跳过(= 留空语义)。
202
+ */
203
+ setValues: (partial: Partial<PO>) => void;
147
204
  }
148
205
  /** FormSearch expose类型 */
149
- export interface FormSearchInstance<PO extends Record<string, any> = Record<string, any>, SO extends Record<string, any> = Record<string, any>> extends Omit<FormMainInstance<PO, SO>, "generate" | "parse" | "stringify"> {
206
+ export interface FormSearchInstance<PO extends Record<string, any> = Record<string, any>, SO extends Record<string, any> = Record<string, any>> extends Omit<FormMainInstance<PO, SO>, "generate" | "parse" | "stringify" | "getAiSchema" | "setValues"> {
150
207
  /** 触发搜索 */
151
208
  triggerSearch: () => void;
152
209
  /** 触发重置 */
@@ -180,6 +237,28 @@ export interface FormMainProps<PO extends Record<string, any>, SO extends Record
180
237
  * 嵌套子表单(FormNest 等联结组件)是独立 FormMain 实例,需各自开启。
181
238
  */
182
239
  layoutByContainer?: boolean;
240
+ /**
241
+ * AI 填充入口开关(e9dzn4 交互层 / gf9z3w 控制反转)。缺省 undefined = 自动:
242
+ * 触发组件可用(bridge `aiFillTrigger` ∥ {@link aiFillTrigger} prop)且本实例非
243
+ * 嵌套子表单时出悬浮触点;`false` = 组件级否决恒关。嵌套实例(C1 / C4 内)恒关
244
+ * 不受此值影响。`FormSearch` 同自动档(透传本 prop,undefined [MUST] 保持三态)。
245
+ */
246
+ aiFill?: boolean;
247
+ /**
248
+ * AI 填充触发组件局部覆盖(某表单换触发器);缺省走 bridge 主通道
249
+ * `bridge.register({ aiFillTrigger })`。core 渲染时喂 duck props
250
+ * (`getSchema` / `onData → { appliedCount, undo }`),组件来源任意。
251
+ */
252
+ aiFillTrigger?: Component;
253
+ /**
254
+ * 表单目标描述(trsf36):这个表单是做什么的——落 `getAiSchema()` 产出的
255
+ * schema **顶层 `description`**,让模型带着表单意图理解字段(录入 vs 筛选等)。
256
+ * string = 主干场景直用;`CoreConfigDescription` 对象 = 正/反两面精调
257
+ * (拼「适用:…/不适用:…」,与字段级 {@link FormItemConfig.description} 同源语义)。
258
+ * 缺省不输出该字段。AI 只是第一个消费方——本 prop 描述表单本体,
259
+ * [MUST NOT] 冠 ai 前缀。`FormSearch` 同名 prop 透传并自动拼接筛选形态语义。
260
+ */
261
+ description?: string | CoreConfigDescription;
183
262
  }
184
263
  /** FormSearch props */
185
264
  export interface FormSearchProps<PO extends Record<string, any>, SO extends Record<string, any>, SQ extends Record<string, any>> extends FormMainProps<PO, SO> {
@@ -244,7 +323,7 @@ export interface DatePickerShortcut {
244
323
  }
245
324
  export type FormItemConfigSwiftOptionsCommon<PO extends Record<string, any>,
246
325
  /** 需要格式化的模型 */
247
- SO extends Record<string, any>> = Omit<FormItemConfig<PO, SO>, "rules"> & {
326
+ SO extends Record<string, any>> = Omit<FormItemConfig<PO, SO>, "rules" | "type"> & {
248
327
  /** label */
249
328
  /**
250
329
  * 表单类型
@@ -356,6 +435,18 @@ export type FormSubmitPanelProps<PO extends Record<string, any>, SO extends Reco
356
435
  * 与 divider 正交:divider 管边框+圆角,bare 管 padding,可叠加全 flush。
357
436
  */
358
437
  bare?: boolean;
438
+ /**
439
+ * 根面板是否**成面**(背景色 + 内呼吸 + 圆角),默认 `true`。
440
+ *
441
+ * 页面里它躺在灰底 `--el-bg-color-page` 上 ⇒ 要成面才有「一块卡」的层级;
442
+ * **弹窗里它躺在 `--el-bg-color-overlay`(已经是面)上 ⇒ [MUST NOT] 再刷一层**,
443
+ * 否则暗色下 overlay `#1d1e1f` 上盖 `#141414` = 弹窗里凹下去一块
444
+ * (亮色两者都是 `#fff`,看不出来 —— [MUST NOT] 只用亮色截图验收)。
445
+ *
446
+ * 缺省由上下文推导:直系父带 `SlotRegion.ModalConfirm_Body` 标记 ⇒ `false`;
447
+ * 其余 ⇒ `true`。显式传值恒优先。
448
+ */
449
+ surface?: boolean;
359
450
  /** 根面板自定义 class(显式根出口)
360
451
  * ----
361
452
  * inheritAttrs:false 下消费方 `class` 经 v-bind 转发内层 FormMain(对标 FormSearch),
@@ -0,0 +1,59 @@
1
+ import { Component, ComputedRef } from 'vue';
2
+ import { CoreConfigDescription } from '../../bridge';
3
+ import { FormAiSchema, FormItemConfigList } from './types';
4
+ /**
5
+ * FormMain · AI 填充「插座 + 落表」hook(e9dzn4 交互层 → gf9z3w 控制反转终态;
6
+ * 组件同级收纳,规则 21/22,不出桶)。
7
+ *
8
+ * 控制反转分工(甲方 2026-09-15 拍定):
9
+ * - **core(本 hook)**:挂点显隐三闸 + 喂 duck props(`getSchema` / `onData`)+
10
+ * 数据落表(setValues 同判据)+ 写入项高亮 + 撤销**机制**(快照回滚)。
11
+ * - **触发组件(bridge 注册,如 forge-agent LlmJsonTrigger)**:全部 AI 交互 UI——
12
+ * popup / prompt 获取 / LLM 调用 / 错误展示 / 撤销**按钮**(拿 onData 回执渲染)。
13
+ * - 两侧互不知晓,应用层 bridge 组装。[MUST NOT] 在 core 里搓 LLM 调用或 prompt UI。
14
+ *
15
+ * 入口显隐三闸(都过才出):
16
+ * - 触发组件可用:`aiFillTrigger` prop(局部覆盖)∥ bridge `aiFillTrigger`(主通道,
17
+ * shallowRef 响应式);
18
+ * - 非嵌套实例:C1 / C4 内的子 FormMain 经「能注入到父 FormMain registry」自判恒关;
19
+ * - `aiFill` prop ≠ false(组件级否决;三态布尔 [MUST] withDefaults 显式 undefined)。
20
+ */
21
+ /** 触发组件 `onData` 回执(duck 契约的 core 半边) */
22
+ export interface FormAiFillReceipt {
23
+ /** 实际写入的字段数 */
24
+ appliedCount: number;
25
+ /** 整体撤销本次写入(回滚到填充前快照 + 清高亮) */
26
+ undo: () => void;
27
+ }
28
+ /** `useFormAiFill` 依赖(getter 传入、只读不写——功能是主干状态的纯下游,规则 22) */
29
+ export interface UseFormAiFillOptions<PO extends Record<string, any>> {
30
+ /** `props.aiFill`(undefined = 自动;false = 否决) */
31
+ getEnabled: () => boolean | undefined;
32
+ /** `props.aiFillTrigger`(局部覆盖,优先于 bridge 主通道) */
33
+ getTrigger: () => Component | undefined;
34
+ /** `props.description`(表单目标描述——bridge `aiFillRequireDescription` 策略位判据) */
35
+ getDescription: () => string | CoreConfigDescription | undefined;
36
+ /** 表单配置列表(算实际写入 key,与 `patchFormData` 同判据) */
37
+ getList: () => FormItemConfigList<PO, any>;
38
+ /** 表单数据(撤销快照源) */
39
+ getData: () => PO;
40
+ /** = `FormMainInstance.getAiSchema`(数据层,含表单目标 description 组装) */
41
+ getSchema: () => Promise<FormAiSchema>;
42
+ /** = `FormMainInstance.setValues`(数据层,就地 patch) */
43
+ applyValues: (partial: Partial<PO>) => void;
44
+ }
45
+ /** `useFormAiFill` 返回面(FormMain 模板挂点消费;符号带 aiFill 前缀,规则 9) */
46
+ export interface UseFormAiFillReturn {
47
+ /** 入口是否渲染(三闸合一,响应式) */
48
+ aiFillVisible: ComputedRef<boolean>;
49
+ /** 生效触发组件(prop 局部覆盖 ∥ bridge 主通道) */
50
+ aiFillTriggerComponent: ComputedRef<Component | undefined>;
51
+ /** 喂给触发组件的 duck props(getSchema / onData) */
52
+ aiFillTriggerProps: {
53
+ getSchema: () => Promise<FormAiSchema>;
54
+ onData: (data: Record<string, any>) => FormAiFillReceipt;
55
+ };
56
+ /** 高亮 class(ElCol 挂点:本次写入的 key → 闪烁类) */
57
+ aiFillItemClass: (key: string) => string | undefined;
58
+ }
59
+ export declare const useFormAiFill: <PO extends Record<string, any>>(options: UseFormAiFillOptions<PO>) => UseFormAiFillReturn;
@@ -38,6 +38,15 @@ export declare const resolveFormLayout: (layout?: Partial<ColProps>, scale?: num
38
38
  * 与手动选日期完全同源,无需任何额外格式化依赖。
39
39
  */
40
40
  export declare const getDatePickerShortcuts: () => DatePickerShortcut[];
41
+ /**
42
+ * 检测表单项是否忽略(`ignore` 显式 / `__` 前缀全大写 key 约定)。
43
+ * generate / parse / stringify / patch / AI schema 导出共用的**单一真相源判据**,
44
+ * [MUST NOT] 在消费侧另写一份。
45
+ */
46
+ export declare const checkFormItemIsIgnore: (config: {
47
+ ignore?: boolean;
48
+ key: string;
49
+ }) => boolean;
41
50
  /**
42
51
  * 生成表单数据
43
52
  */
@@ -50,6 +59,16 @@ export declare const parseFormData: <PO extends Record<string, any>, SO extends
50
59
  * 序列化表单数据
51
60
  */
52
61
  export declare const stringifyFormData: <PO extends Record<string, any>, SO extends Record<string, any>>(data: PO, list: FormItemConfigList<PO, SO>) => import('./types').ExcludeNeverProperties<import('./types').ExtractFormStringifyRawFromObject<PO, SO>>;
62
+ /**
63
+ * 按 key 就地 patch 表单数据(AI 填充 / 程序化写值共用)。
64
+ * ----
65
+ * - [MUST NOT] 换 data 容器引用——PO 容器由 generate() 建、父子靠同一引用贯通,换引用当场断链;
66
+ * 本函数只做逐 key 赋值,父侧引用恒不变。
67
+ * - 只写配置内非 ignore 的 key(未知 key 不落容器,防幻觉 key 污染 PO 形态)。
68
+ * - undefined / null 跳过(= 留空语义,对齐 getAiSchema 的 null 留空通道);
69
+ * 要清空字段由调用方传该字段类型的空值("" / [])。
70
+ */
71
+ export declare const patchFormData: <PO extends Record<string, any>, SO extends Record<string, any>>(data: PO, list: FormItemConfigList<PO, SO>, partial: Partial<PO>) => void;
53
72
  /**
54
73
  * 获取v-model语法糖配置
55
74
  */