@robot-admin/naive-ui-components 0.40.2 → 0.40.4

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 (227) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +2 -2
  3. package/README_EN.md +17 -17
  4. package/dist/BPMN.cjs +1 -1
  5. package/dist/BPMN.js +1 -1
  6. package/dist/C_ActionBar.css +58 -52
  7. package/dist/C_ActionBar2.cjs +1 -1
  8. package/dist/C_ActionBar2.js +1 -1
  9. package/dist/C_AntV.css +108 -108
  10. package/dist/C_AvatarGroup.css +29 -29
  11. package/dist/C_AvatarGroup2.cjs +1 -1
  12. package/dist/C_AvatarGroup2.js +1 -1
  13. package/dist/C_Barcode.css +6 -6
  14. package/dist/C_Barcode.d.cts +2 -2
  15. package/dist/C_Barcode.d.ts +2 -2
  16. package/dist/C_Barcode2.cjs +1 -1
  17. package/dist/C_Barcode2.js +1 -1
  18. package/dist/C_Captcha.css +42 -42
  19. package/dist/C_Captcha2.cjs +1 -1
  20. package/dist/C_Captcha2.js +1 -1
  21. package/dist/C_Cascade.css +4 -4
  22. package/dist/C_Cascade.d.cts +2 -2
  23. package/dist/C_Cascade.d.ts +2 -2
  24. package/dist/C_Cascade2.cjs +1 -1
  25. package/dist/C_Cascade2.js +1 -1
  26. package/dist/C_City.css +35 -35
  27. package/dist/C_City2.cjs +1 -1
  28. package/dist/C_City2.js +1 -1
  29. package/dist/C_Code.css +27 -27
  30. package/dist/C_Code.d.cts +2 -2
  31. package/dist/C_Code.d.ts +2 -2
  32. package/dist/C_Code2.cjs +1 -1
  33. package/dist/C_Code2.js +1 -1
  34. package/dist/C_CollapsePanel2.cjs +1 -1
  35. package/dist/C_CollapsePanel2.js +1 -1
  36. package/dist/C_ContextMenu.css +10 -10
  37. package/dist/C_ContextMenu2.cjs +1 -1
  38. package/dist/C_ContextMenu2.js +1 -1
  39. package/dist/C_DataPicker.css +32 -32
  40. package/dist/C_DataPicker2.cjs +1 -1
  41. package/dist/C_DataPicker2.js +1 -1
  42. package/dist/C_Editor.css +13 -13
  43. package/dist/C_Editor.d.cts +2 -2
  44. package/dist/C_Editor.d.ts +2 -2
  45. package/dist/C_Editor2.cjs +1 -1
  46. package/dist/C_Editor2.js +1 -1
  47. package/dist/C_FilePreview.css +104 -104
  48. package/dist/C_FilePreview2.cjs +1 -1
  49. package/dist/C_FilePreview2.js +1 -1
  50. package/dist/C_FormModal.css +58 -52
  51. package/dist/C_FormSearch.css +72 -72
  52. package/dist/C_FullCalendar2.cjs +1 -1
  53. package/dist/C_FullCalendar2.js +1 -1
  54. package/dist/C_GlobalSearch.css +139 -136
  55. package/dist/C_GlobalSearch2.cjs +1 -1
  56. package/dist/C_GlobalSearch2.js +1 -1
  57. package/dist/C_Guide.css +3 -3
  58. package/dist/C_Guide2.cjs +1 -1
  59. package/dist/C_Guide2.js +1 -1
  60. package/dist/C_Language.css +2 -2
  61. package/dist/C_Language2.cjs +1 -1
  62. package/dist/C_Language2.js +1 -1
  63. package/dist/C_Login.css +136 -121
  64. package/dist/C_Login2.cjs +1 -1
  65. package/dist/C_Login2.js +1 -1
  66. package/dist/C_Markdown.css +37 -37
  67. package/dist/C_Markdown.d.cts +2 -2
  68. package/dist/C_Markdown.d.ts +2 -2
  69. package/dist/C_Markdown2.cjs +1 -1
  70. package/dist/C_Markdown2.js +1 -1
  71. package/dist/C_NotificationCenter.css +51 -36
  72. package/dist/C_NotificationCenter2.cjs +1 -1
  73. package/dist/C_NotificationCenter2.js +1 -1
  74. package/dist/C_Progress.d.cts +2 -2
  75. package/dist/C_Progress.d.ts +2 -2
  76. package/dist/C_Progress2.cjs +1 -1
  77. package/dist/C_Progress2.js +1 -1
  78. package/dist/C_Signature.css +15 -15
  79. package/dist/C_Signature2.cjs +1 -1
  80. package/dist/C_Signature2.js +1 -1
  81. package/dist/C_Steps.css +39 -39
  82. package/dist/C_Steps.d.cts +2 -2
  83. package/dist/C_Steps.d.ts +2 -2
  84. package/dist/C_Steps2.cjs +1 -1
  85. package/dist/C_Steps2.js +1 -1
  86. package/dist/C_Table.base.css +58 -52
  87. package/dist/C_Table.css +58 -52
  88. package/dist/C_Table.d.ts +1 -0
  89. package/dist/C_Table2.cjs +2 -2
  90. package/dist/C_Table2.js +2 -2
  91. package/dist/C_TagsView.css +60 -50
  92. package/dist/C_TagsView2.cjs +1 -1
  93. package/dist/C_TagsView2.js +1 -1
  94. package/dist/C_Timeline.css +53 -53
  95. package/dist/C_Timeline2.cjs +1 -1
  96. package/dist/C_Timeline2.js +1 -1
  97. package/dist/C_Tree.d.ts +1 -0
  98. package/dist/C_Upload.css +80 -80
  99. package/dist/C_Upload2.cjs +1 -1
  100. package/dist/C_Upload2.js +1 -1
  101. package/dist/C_WaterFall.css +41 -41
  102. package/dist/C_WaterFall.d.cts +2 -2
  103. package/dist/C_WaterFall.d.ts +2 -2
  104. package/dist/C_WaterFall2.cjs +1 -1
  105. package/dist/C_WaterFall2.js +1 -1
  106. package/dist/C_WorkFlow.css +93 -92
  107. package/dist/C_WorkFlow2.cjs +1 -1
  108. package/dist/C_WorkFlow2.js +1 -1
  109. package/dist/ER.cjs +1 -1
  110. package/dist/ER.js +1 -1
  111. package/dist/UML.cjs +3 -3
  112. package/dist/UML.js +3 -3
  113. package/dist/component-config.d.ts +2 -0
  114. package/dist/constants.d.cts +3 -3
  115. package/dist/constants.d.ts +3 -3
  116. package/dist/constants2.d.cts +2 -2
  117. package/dist/constants2.d.ts +2 -2
  118. package/dist/constants3.d.cts +1 -1
  119. package/dist/constants3.d.ts +1 -1
  120. package/dist/constants4.d.cts +6 -6
  121. package/dist/constants4.d.ts +7 -6
  122. package/dist/constants5.d.cts +2 -2
  123. package/dist/constants5.d.ts +2 -2
  124. package/dist/context.d.cts +2 -0
  125. package/dist/data2.d.cts +10 -10
  126. package/dist/data2.d.ts +10 -10
  127. package/dist/editors.cjs +1 -1
  128. package/dist/editors.d.cts +3 -3
  129. package/dist/editors.d.ts +3 -3
  130. package/dist/editors.js +1 -1
  131. package/dist/graphEditSession.cjs +1 -0
  132. package/dist/graphEditSession.js +1 -0
  133. package/dist/index.d.cts +9 -9
  134. package/dist/index.d.ts +10 -9
  135. package/dist/index.vue.d.cts +4 -4
  136. package/dist/index.vue.d.ts +4 -4
  137. package/dist/index10.vue.d.cts +2 -3
  138. package/dist/index10.vue.d.ts +10 -7
  139. package/dist/index11.vue.d.cts +10 -7
  140. package/dist/index11.vue.d.ts +4 -4
  141. package/dist/index12.vue.d.cts +4 -4
  142. package/dist/index13.vue.d.ts +16 -13
  143. package/dist/index14.vue.d.cts +16 -13
  144. package/dist/index16.vue.d.ts +6 -11
  145. package/dist/index17.vue.d.cts +6 -11
  146. package/dist/index17.vue.d.ts +6 -6
  147. package/dist/index18.vue.d.cts +6 -6
  148. package/dist/index18.vue.d.ts +4 -9
  149. package/dist/index19.vue.d.cts +4 -9
  150. package/dist/index20.vue.d.ts +1 -2
  151. package/dist/index21.vue.d.cts +1 -2
  152. package/dist/index21.vue.d.ts +19 -17
  153. package/dist/index22.vue.d.cts +19 -17
  154. package/dist/index24.vue.d.cts +9 -6
  155. package/dist/index24.vue.d.ts +9 -6
  156. package/dist/index27.vue.d.cts +3 -3
  157. package/dist/index27.vue.d.ts +3 -3
  158. package/dist/index28.vue.d.cts +12 -19
  159. package/dist/index28.vue.d.ts +12 -19
  160. package/dist/index3.vue.d.cts +3 -3
  161. package/dist/index3.vue.d.ts +3 -3
  162. package/dist/index30.vue.d.cts +3 -10
  163. package/dist/index30.vue.d.ts +3 -10
  164. package/dist/index31.vue.d.cts +5 -5
  165. package/dist/index31.vue.d.ts +5 -5
  166. package/dist/index32.vue.d.cts +4 -4
  167. package/dist/index32.vue.d.ts +4 -4
  168. package/dist/index4.vue.d.cts +12 -9
  169. package/dist/index4.vue.d.ts +12 -9
  170. package/dist/index7.vue.d.ts +14 -14
  171. package/dist/index8.vue.d.cts +14 -14
  172. package/dist/index8.vue.d.ts +1 -1
  173. package/dist/index9.vue.d.cts +1 -1
  174. package/dist/index9.vue.d.ts +2 -3
  175. package/dist/locale.cjs +1 -0
  176. package/dist/locale.js +1 -0
  177. package/dist/mapUtils.d.cts +4 -4
  178. package/dist/mapUtils.d.ts +4 -4
  179. package/dist/presets.d.cts +1 -1
  180. package/dist/presets.d.ts +1 -1
  181. package/dist/serializeSearch.cjs +1 -1
  182. package/dist/serializeSearch.js +1 -1
  183. package/dist/style.css +1250 -1200
  184. package/dist/types.d.cts +1 -0
  185. package/dist/types.d.ts +1 -0
  186. package/dist/useCollapsePanel.d.cts +7 -7
  187. package/dist/useCollapsePanel.d.ts +7 -7
  188. package/dist/useComponentLocale.cjs +1 -1
  189. package/dist/useComponentLocale.js +1 -1
  190. package/dist/useCropperCore.d.cts +10 -10
  191. package/dist/useCropperCore.d.ts +10 -10
  192. package/dist/useDynamicFormState.d.cts +2 -2
  193. package/dist/useDynamicFormState.d.ts +2 -2
  194. package/dist/useEdgeInteraction.d.cts +1 -1
  195. package/dist/useEdgeInteraction.d.ts +1 -1
  196. package/dist/useFullscreen.d.cts +1 -1
  197. package/dist/useFullscreen.d.ts +1 -1
  198. package/dist/useGlobalSearch.d.cts +1 -5
  199. package/dist/useGlobalSearch.d.ts +1 -5
  200. package/dist/useInfiniteScroll.d.cts +42 -70
  201. package/dist/useInfiniteScroll.d.ts +42 -70
  202. package/dist/useQRCode.d.cts +3 -3
  203. package/dist/useQRCode.d.ts +3 -3
  204. package/dist/useScopedComponentLocale.cjs +1 -0
  205. package/dist/useScopedComponentLocale.js +1 -0
  206. package/dist/useSignatureHistory.d.cts +9 -4
  207. package/dist/useSignatureHistory.d.ts +9 -4
  208. package/dist/useSplitResize.d.cts +8 -8
  209. package/dist/useSplitResize.d.ts +8 -8
  210. package/dist/useWorkflowValidation.d.cts +39 -34
  211. package/dist/useWorkflowValidation.d.ts +39 -34
  212. package/dist/verification.d.cts +2 -2
  213. package/dist/verification.d.ts +2 -2
  214. package/docs/architecture.en.md +1 -1
  215. package/docs/architecture.md +1 -1
  216. package/docs/component-audit-closure-0.40.4.md +62 -0
  217. package/docs/engineering.en.md +3 -2
  218. package/docs/engineering.md +3 -2
  219. package/docs/guides/search-workflows.md +2 -0
  220. package/docs/guides/transfer.md +2 -0
  221. package/docs/guides/usage.en.md +15 -1
  222. package/docs/guides/usage.md +25 -2
  223. package/docs/guides/workflow.md +5 -1
  224. package/docs/stability-boundaries-0.40.3.md +38 -0
  225. package/package.json +1 -1
  226. package/dist/readonlyGraph.cjs +0 -1
  227. package/dist/readonlyGraph.js +0 -1
@@ -27,7 +27,8 @@ bun run build
27
27
  - **Artifact entry validation**: `check-dist-entries.js` prevents internal chunks from replacing root declarations and verifies component utility subpath types
28
28
  - **Package contract validation**: blocks Naive UI internal type paths, hidden optional installs, and plugin console side effects
29
29
  - **Size budgets**: `check-size-budget.js` prevents accidental growth of global, C_Form/C_Table, and total dist output
30
- - **Consumer budgets**: `check-consumer-size.js` builds four minimal Vite applications, sums gzip bytes along the emitted static JS import graph, and rejects eager editor, spreadsheet, screenshot, or print dependencies.
30
+ - **Consumer budgets**: `check-consumer-size.js` builds isolated minimal component consumers, sums gzip bytes along the emitted static import graph, and checks heavy dependencies and first-open increments.
31
+ - **Type quality budgets**: scripts, template bindings/interpolations, slot parameters and SFC generic attributes contribute to explicit `any` counts. Comments, strings and static HTML do not. Regression tests cover the counting boundaries, and current measured baselines prevent increases.
31
32
 
32
33
  ### Build Output
33
34
 
@@ -77,7 +78,7 @@ bun run lint:eslint # Audit the existing ESLint rule backlog
77
78
  bun run verify # Type, test, export, and build verification
78
79
  ```
79
80
 
80
- Consumer budgets include Vue and Naive UI. The four applications are independent measurements and cannot be added to estimate one application's size. `C_Form/base` renders one input; `C_Table/base` renders one row and column. The other cases render one search input and one action button. Base CSS excludes the built-in rich-text editor styles. Dynamic JS is built and checked but excluded from initial bytes; using those features still loads it. This check measures transfer size, not browser interaction performance. Both `verify` and the pre-publish lifecycle include this gate.
81
+ Consumer budgets include Vue and Naive UI. Entry measurements are independent and cannot be added to estimate one application's size. `C_Form/base` renders one input; `C_Table/base` renders one row and column. Search, actions, trees, organization charts, pickers and workflows also have minimal consumer scenarios. Base CSS excludes built-in rich-text editor styles. Dynamic JS is built and checked but excluded from initial bytes; DataPicker, UserPicker and AntV also have first-open increment gates. This measures transfer size, not browser interaction performance. Both `verify` and the pre-publish lifecycle include this gate.
81
82
 
82
83
  ### Project Structure
83
84
 
@@ -27,7 +27,8 @@ bun run build
27
27
  - **产物入口校验**:`check-dist-entries.js` 防止内部 chunk 覆盖根声明,并保证组件工具的子路径类型完整
28
28
  - **包契约校验**:禁止 Naive UI 内部类型路径、隐式可选依赖和插件控制台副作用
29
29
  - **体积预算**:`check-size-budget.js` 阻止全量样式、C_Form/C_Table 样式和 dist 总量意外膨胀
30
- - **消费端预算**:`check-consumer-size.js` 用 Vite 构建四个最小消费应用,沿实际静态导入图累计首屏 JS gzip;同时检查编辑器、Excel、截图和打印依赖没有进入首屏。
30
+ - **消费端预算**:`check-consumer-size.js` 用 Vite 构建各独立组件的最小消费场景,沿实际静态导入图累计首屏 JS gzip,并检查重型依赖与首次打开的增量。
31
+ - **类型质量预算**:脚本、模板绑定/插值、插槽参数与 SFC 泛型属性统一统计显式 `any`;注释、字符串和静态 HTML 不计入。回归覆盖统计边界,预算按当前实际值约束后续回涨。
31
32
 
32
33
  ### 输出产物
33
34
 
@@ -78,7 +79,7 @@ bun run lint:eslint # ESLint 存量规则审计
78
79
  bun run verify # 类型、测试、导出和构建全量验证
79
80
  ```
80
81
 
81
- 消费端预算包含 Vue 和 Naive UI,四个独立场景分别测量,不能相加当作同一应用的体积。`C_Form/base` 为单输入字段,`C_Table/base` 为单列单行展示表格;另外测量一个输入查询和一个操作按钮。基础样式排除内置富文本编辑器样式。动态 JS 会完成构建检查,但不计入首屏;使用对应字段或功能时仍会加载。此检查衡量传输体积,不替代真实浏览器的交互性能测量。`verify` 和发布前生命周期均包含该门禁。
82
+ 消费端预算包含 Vue 和 Naive UI,各入口独立测量,不能相加当作同一应用的体积。`C_Form/base` 为单输入字段,`C_Table/base` 为单列单行展示表格;搜索、操作栏、树、组织图、选择器与流程等也有对应的最小消费场景。基础样式排除内置富文本编辑器样式。动态 JS 会完成构建检查,但不计入首屏;DataPicker、UserPicker 与 AntV 还分别检查首次打开的增量。此检查衡量传输体积,不替代真实浏览器的交互性能测量。`verify` 和发布前生命周期均包含该门禁。
82
83
 
83
84
  ### 项目结构
84
85
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  `C_FormSearch` 保留已有 `formItemList`、`v-model`、`formParams`、历史记录和 `@search` 接口。普通接入仍采用 `inline` 布局;复杂业务可显式开启容器网格。组件只管理搜索条件与执行状态,不绑定分页接口、租户规则或特定表格。
4
4
 
5
+ 输入历史由 `formSearchInputHistoryString` 指定存储范围。复用页面切换账号或业务时可同步更换这个键,无需重建组件:旧范围的面板会关闭,已存历史不会带入新范围;新范围没有记录时使用字段显式声明的 `hisList` 默认建议。取消存储键会恢复默认建议并停止持久化。搜索模型本身仍由业务控制,切换历史范围不会修改当前输入。
6
+
5
7
  ## 容器布局与字段
6
8
 
7
9
  ```vue
@@ -8,4 +8,6 @@
8
8
 
9
9
  `size="small | medium | large"` 对应 28 / 34 / 40px 固定行高。继续通过既有 `--tf-height` 覆盖列表高度,例如 `style="--tf-height: 240px"`;无需为大列表额外设置高度或分页。
10
10
 
11
+ 默认行显示 `label` 和可选 `icon`。`group`、`description`、`extra` 可携带业务元数据,但默认列表不据此分组,也没有自动展开描述的详细模式;这些字段不会改变筛选、选择或固定行高。
12
+
11
13
  若项目自行改变行高、需要打印全部项,或依赖完整列表 DOM,可显式设置 `:virtual-scroll="false"` 保留普通渲染。默认开启自动判断,常规接入无需配置。搜索仍检查全部数据;虚拟列表减少 DOM 与组件挂载量,不把筛选或数据存储变成无限容量服务。
@@ -390,8 +390,14 @@ Add `{ type: 'selection' }` explicitly. Receive keys and rows through `@selectio
390
390
 
391
391
  `C_Table` remains owned by its current Naive UI table implementation. A MachTable mode should render MachTable with its native columns, events, and instance API as a complete engine boundary rather than translating between the two engines. They only share engine-neutral page actions such as `C_ActionBar`.
392
392
 
393
+ Expanded child tables use the same selection rules for `selectChildRow`, `unselectChildRow`, `selectAllChildren`, `clearChildrenSelection`, and checkbox interaction: only loaded, eligible children are selected, with the configured parent linkage and parent selection limit. `child-selection-change` includes selected keys and complete child records. Duplicate selections and invalid keys do not emit extra events.
394
+
395
+ `C_ActionBar` leaves `config.showDivider` off by default. When enabled, `dividerType: 'vertical'` renders vertical separators and `'horizontal'` renders 20px horizontal separators between buttons. Neither option changes button direction or adds a separator after the last action in a group.
396
+
393
397
  ## Common component contracts
394
398
 
399
+ For `C_Cascade`, import `CascadeProps` from its component subpath when extracting configuration, for example `const regionConfig = { data: regions, density: 'compact' } satisfies CascadeProps`. Keep using `CascadeValue` for the model. The exported type is the component's own Props declaration, so consumers do not need instance-type extraction.
400
+
395
401
  ### Form values and validation
396
402
 
397
403
  Continue with `useCForm()` from the example above to read and update values without duplicating model synchronization or waiting for rendering:
@@ -687,7 +693,7 @@ Parent buttons open a themed directory panel with page counts and current-page f
687
693
 
688
694
  ## Configuration and behavior contracts (0.21)
689
695
 
690
- Use `@robot-admin/naive-ui-components/config` to import `COMPONENT_LOCALE_KEY`, `COMPONENT_FEEDBACK_KEY` and their protocol types. This entry shares injection identities with the root entry without importing components, router or the Naive feedback adapter. Provide a reactive configuration or locale getter for language changes. Built-in `zh-CN`/`en-US` text now also covers Tree, Transfer, SplitPane, Chat, NotificationCenter, Theme, Language, Skeleton and Timeline. Explicit labels remain application-owned.
696
+ Use `@robot-admin/naive-ui-components/config` to import shared injection keys, protocol types, palettes and the theme factory. This entry shares injection identities with the root entry without registering components or importing the router or message/dialog feedback adapter. The theme factory uses Naive UI's public theme API; native CJS imports load Naive UI. Provide a reactive configuration or locale getter for language changes. Built-in `zh-CN`/`en-US` text covers Tree, Transfer, SplitPane, Chat, NotificationCenter, Theme, Language, Skeleton, Timeline, Upload, AvatarGroup, City, GlobalSearch, Guide and Login alongside Form/Table/Search/Breadcrumb. DataPicker's local locale also reaches its category tree. Explicit labels, file names and server error messages remain application-owned.
691
697
 
692
698
  Form action slots receive the current model, including a normal business field named `value`. Collapsed search fields remain mounted and validated; errors expand the form. `show: false` excludes a field. Table expansion discards stale completions after dataset changes, and nested selection honors eligibility, parent limits and consistent events. Native Menu options preserve string/number keys; route-mode callbacks remain string paths. Chat drafts belong to the contact and retain at most 50 nonempty inactive drafts. ER and Workflow emit user-completed canvas edits without echoing parent updates. Human verification gates password login; SMS uses its own validation.
693
699
 
@@ -706,3 +712,11 @@ WaterFall fills a visible sentinel for at most five consecutive pages, then expo
706
712
  Video supports MP4/HLS by default. DASH/FLV require a `sourceAdapters` loader returning a compatible xgplayer constructor; missing adapters enter the error state and emit `error`. Protocol SDK installation remains opt-in.
707
713
 
708
714
  Notification `categoryOptions` customizes labels/order of existing `all/system/business/alarm` categories. It does not add domain enums. The `filters` slot receives `{ controller }`; `item` and `item-actions` receive `{ message, index, busy, select, read, remove }`. Use supplied callbacks to retain busy/error handling. Approval commands, tenancy, authorization and backend contracts remain application-owned; Robot_Admin's enterprise notification store is not bundled into this preview component.
715
+
716
+ ### Shared component configuration and WaterFall business types
717
+
718
+ `BarcodeProps`, `CascadeProps`, `ProgressProps`, `StepsProps`, `CodeProps`, `EditorProps` and `MarkdownProps` are the same declarations used by their components. Import from the root or component subpath and use `satisfies` for extracted configuration; no instance-type extraction or builder is required.
719
+
720
+ `C_WaterFall` infers business fields from `items` into events and its `item` slot. `useWaterFallLayout` retains those fields and the existing deep-readonly/nested-Ref unwrapping behavior. `WaterFallProps<T>`, `WaterFallEmits<T>` and `WaterFallSlots<T>` support wrappers; ordinary templates need no explicit generic or conversion. The footer still receives `status`, `paused` and `loadMore`.
721
+
722
+ Timeline tag types `default/success/warning/error/info` follow theme colors. Missing or historical custom strings retain the default primary color. Skeleton `repeat` applies to `text/card/image`; lists continue using `list.items`.
@@ -66,7 +66,7 @@ app.mount('#app')
66
66
 
67
67
  ### 按需配置语言与反馈
68
68
 
69
- 独立 `/config` 入口只导出注入键和协议类型,不加载组件、路由或 Naive UI 适配器。与根入口使用相同的注入键,可以直接配置按需使用的组件:
69
+ 独立 `/config` 入口导出共享注入键、协议类型、色板及主题工厂,不注册组件、不加载路由或消息/弹窗反馈适配器。主题工厂依赖 Naive UI 的公开主题接口,原生 CJS 导入会加载 Naive UI。该入口与根入口使用相同的注入键,可以直接配置按需使用的组件:
70
70
 
71
71
  ```ts
72
72
  import {
@@ -81,7 +81,7 @@ app.provide(COMPONENT_FEEDBACK_KEY, {
81
81
  })
82
82
  ```
83
83
 
84
- 默认中文,内置支持 `zh-CN` / `en-US`,自定义 `messages` 或 `t` 沿用现有协议。需要动态切换时提供响应式对象或 `locale` getter。Tree、Transfer、SplitPane、Chat、NotificationCenter、Theme、Language、Skeleton、Timeline 的内置文案与已有 Form/Table/Search/Breadcrumb 一起使用该上下文;业务标题、菜单名称和显式传入的文案由宿主管理。
84
+ 默认中文,内置支持 `zh-CN` / `en-US`,自定义 `messages` 或 `t` 沿用现有协议。需要动态切换时提供响应式对象或 `locale` getter。Tree、Transfer、SplitPane、Chat、NotificationCenter、Theme、Language、Skeleton、Timeline、Upload、AvatarGroup、City、GlobalSearch、Guide、Login 的内置文案与已有 Form/Table/Search/Breadcrumb 一起使用该上下文;DataPicker 的局部语言也传给内嵌分类树。业务标题、菜单名称和显式传入的文案由宿主管理,上传文件名和服务端错误保持原文。
85
85
 
86
86
  ### Composables 单独使用
87
87
 
@@ -505,10 +505,16 @@ const config = defineTableConfig({
505
505
 
506
506
  选择列须显式配置 `{ type: 'selection' }`,通过 `@selection-change="(keys, rows) => ..."` 接收结果;主动清空时使用公开实例方法 `clearSelection()`,不观察内部 manager 状态。
507
507
 
508
+ 展开子表的 `selectChildRow`、`unselectChildRow`、`selectAllChildren`、`clearChildrenSelection` 与界面勾选遵循同一规则:只处理已加载且允许选择的子行,并复用父子联动及父表数量上限。`child-selection-change` 同时提供当前选中子行的 key 和完整记录;重复选择或无效 key 不产生额外事件。
509
+
510
+ `C_ActionBar` 的 `config.showDivider` 默认关闭。开启后,`dividerType: 'vertical'` 使用按钮间竖线,`'horizontal'` 使用 20px 短横线;两者均不改变按钮排列,也不在每组末尾添加分割线。
511
+
508
512
  `C_Table` 继续由当前 Naive UI 表格实现负责;需要 MachTable 时应由业务入口完整渲染 MachTable 及其原生配置,避免在两套列定义、事件和实例 API 之间做隐式转换。二者只共享 `C_ActionBar` 这类框架无关的页面动作模型,不互相污染。
509
513
 
510
514
  ## 常用组件约定
511
515
 
516
+ `C_Cascade` 的三级字段配置可直接使用子路径导出的 `CascadeProps`,例如 `const regionConfig = { data: regions, density: 'compact' } satisfies CascadeProps`;绑定值使用已有 `CascadeValue`。该类型与组件 Props 共用同一声明,无需从组件实例反推。
517
+
512
518
  ### 表单读写与校验
513
519
 
514
520
  延续上例的 `useCForm()`,优先使用助手读写模型,减少手写双向同步和等待渲染的代码:
@@ -885,3 +891,20 @@ Draggable 默认只在自身排序。需要跨列表拖动时,在相关实例
885
891
  `C_NotificationCenter.categoryOptions` 只定制已有 `all/system/business/alarm` 分类的标签和顺序,不扩展消息领域协议。`filters` 插槽提供 `{ controller }`,`item` / `item-actions` 提供 `{ message, index, busy, select, read, remove }`,可组合独立筛选和业务操作。异步操作应沿用提供的回调以保留 busy/错误处理。
886
892
 
887
893
  审批命令、租户、权限和后端协议由宿主管理。Robot_Admin 的企业消息使用领域 Store 与自己的通知铃铛;本包提供可复用的通知展示与交互,二者的能力边界不同。
894
+
895
+ ### 简单组件配置与瀑布流业务类型
896
+
897
+ `BarcodeProps`、`CascadeProps`、`ProgressProps`、`StepsProps`、`CodeProps`、`EditorProps`、`MarkdownProps` 与组件共用同一份声明,可从根入口或各组件子路径导入。提取公共配置时直接使用 `satisfies`,不必从组件实例反推类型,也不需要配置工厂:
898
+
899
+ ```typescript
900
+ import type { CodeProps } from '@robot-admin/naive-ui-components/C_Code'
901
+ const code = {
902
+ code: 'const value = 1',
903
+ language: 'typescript',
904
+ } satisfies CodeProps
905
+ // <C_Code v-bind="code" />
906
+ ```
907
+
908
+ `C_WaterFall` 从 `items` 自动推导事件和 `item` 插槽的业务字段;普通业务接口无需索引签名或额外类型转换。`useWaterFallLayout` 保留来源业务类型,并沿用原有深只读代理和嵌套 Ref 解包行为,事件、插槽与布局读取保持一致。`WaterFallProps<T>` / `WaterFallEmits<T>` / `WaterFallSlots<T>` 可用于提取配置或封装,常规模板无需显式填写泛型。`footer` 插槽继续提供 `status`、`paused`、`loadMore`。
909
+
910
+ 时间线标签的 `type` 支持 `default/success/warning/error/info`,颜色跟随当前主题;未指定和历史自定义字符串保留默认主色。`C_Skeleton.repeat` 用于 `text/card/image`,列表数量继续由 `list.items` 控制。
@@ -138,7 +138,7 @@ const edges: WorkflowEdge[] = [
138
138
 
139
139
  ## 只读、校验与快照
140
140
 
141
- `readonly` 禁止拖动、连接、删除、修改和保存,隐藏添加/删除按钮;点击节点仍保留 `node-click` 事件以供详情使用。运行中切为只读、替换流程数据或关闭配置都会作废当前编辑会话,等待中的旧选择结果不会回写。
141
+ `readonly` 禁止拖动、连接、删除、修改和保存,隐藏添加/删除按钮;点击节点仍保留 `node-click` 事件以供详情使用。运行中切为只读、替换流程数据或关闭配置都会作废当前编辑会话,等待中的旧选择结果不会回写。点击连线通过 `edge-click` 返回隔离的 `WorkflowEdge` 快照,只读模式仍可查看详情,不包含 SDK 运行态引用。
142
142
 
143
143
  `change`、`update:modelValue`、`save` 和 `getCurrentWorkflowData()` 输出公开模型快照,保留显式业务配置和连线端口,排除画布 SDK 注入的运行态引用。外部 v-model 原样回填不会反复触发数据变更。拖动结束及用户结构操作才提交画布变更,尺寸测量和选中状态变化不会触发保存。
144
144
 
@@ -148,6 +148,10 @@ const edges: WorkflowEdge[] = [
148
148
 
149
149
  “流程设计预览”按图结构排列节点,并展示人员、审批模式、条件和目标。分支会标明默认路由和失效目标;它是设计清单,不代表分支将依次执行,也不根据表单值模拟命中路径。循环、并行执行、多人审批完成规则和兜底策略仍需业务执行端验证。
150
150
 
151
+ 外部流程定义发生实质变化时,已打开的设计预览会关闭,避免确认一个未完整展示的新定义;等值的 `v-model` 回填保留预览。确认动作还会再次核对当前模型,旧预览按钮不会触发保存。
152
+
151
153
  ## 组织选人
152
154
 
153
155
  本地人员、组织树、远程解析、范围切换、顺序审批和失效选人会话的配置,见 [工作流的组织选人与节点配置](./workflow-people.md)。独立人员选择使用 [C_UserPicker 指南](./user-picker.md),两者复用同一选择能力。
156
+
157
+ `roles` 保留为历史输入兼容项,当前配置面板按人员选择,不会自动把角色展开为审批人。角色成员解析与授权由业务来源完成,再通过 `people.source` 提供人员,无需接入另一套流程引擎。
@@ -0,0 +1,38 @@
1
+ # 0.40.3 交互与生命周期边界闭环
2
+
3
+ 日期:2026-11-15。基线:0.40.2。修复以可复现问题为范围,公开属性、模型、配置和类型入口保持兼容。C_Table 仅修改公开查询 hook 的取消与销毁处理,渲染、列配置、布局与高级表格能力不变;MachTable 未改动。
4
+
5
+ ## 修复与回归
6
+
7
+ | 范围 | 最终行为 | 验证边界 |
8
+ | -------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
9
+ | useTableQuery | 请求先登记归属再取消前任;同步 abort、状态观察器和回调重入不能覆盖后继控制器或 loading;销毁后不再启动请求 | 替换和直接取消重入、late result、销毁后的所有请求入口;通知回调异常隔离,既有 bindings 与分页保留 |
10
+ | C_FullCalendar | 当前事件变更、替换或移除后,旧编辑/删除会话失效;提交前再次校验并结束旧会话 | 使用真实 FullCalendar DOM 点击;等值回填、无关更新和原地 reverse 保留草稿,兼顾同轮同步提交与 emit 重入 |
11
+ | C_Upload 哈希 | 分片以可取消任务让步,不再等待绘制帧;保留串行哈希与并发上传分层 | RAF 不派发时队列仍完成;取消、最后一片及卸载清理。后台定时器仍受浏览器节流,页面冻结时不能保证继续运行 |
12
+ | C_ContextMenu | 上下/Home/End 仅在当前菜单层导航,左键关闭子菜单并恢复父项焦点 | 两层/多层、边界、禁用项及恢复焦点,保留既有鼠标与根菜单关闭行为 |
13
+ | 搜索、选择与上传语言 | 搜索默认文案动态解析;选择器局部语言贯通分类树,后代本地文案仍优先;上传状态与可访问名称支持现有语言协议 | 动态切换、自定义 messages/t、业务文件名/错误/插槽保留、字典键新增删除及显式空消息 |
14
+
15
+ `saveEvent/deleteEvent` 提交当前打开的日历 UI 会话;程序化数据写入继续使用既有 `expose.addEvent/updateEvent/deleteEvent`。不会把父列表的任意变化都当作取消理由,也不建立全列表快照缓存。
16
+
17
+ 翻译函数通过 JavaScript `in` 建立缺失消息键的存在性依赖,并继续使用自有属性检查排除继承字段。无 Vue 运行依赖进入 core。上传内置词表仅随上传入口加载,应用 messages/t 仍优先,未增加公开语言配置或第二套 Provider。
18
+
19
+ ## 质量与文档
20
+
21
+ - 类型计数补齐模板绑定、插值、插槽参数及 SFC generic 属性;忽略注释、字符串和静态 HTML,解析失败直接阻断。新增 7 项统计回归。
22
+ - 移除 Upload 的模板宽泛断言。当前合计 102 个显式 any(含两处既有模板断言),14 个 console;总预算及重点组件预算按当前实值收紧,没有为 SDK 类型归零而改写引擎契约。
23
+ - 修正 `/config` 的中英文文档:它还导出色板和主题工厂,原生 CJS 会加载 Naive UI;组件注册、路由与消息/弹窗反馈适配器仍不由该入口加载。
24
+ - 甘特生命周期测试显式等待真实动态模块就绪,再执行原有实例断言;避免把 SDK 冷加载混入假时钟轮询期限,未改生产甘特或增加测试超时。
25
+
26
+ ## 验证与产物
27
+
28
+ 完整 `bun run verify` 通过:579 项逻辑测试、956 项组件挂载测试,以及源码/组件/消费者类型、质量、导出、vendor、构建和发布消费者契约。
29
+
30
+ 正式 dist 消费者的 24 项 Chromium/Firefox/WebKit 场景和 3 项 Chromium 性能门禁通过,无重试。最低与最新 peer 组合均在独立临时消费者安装验证,保持既有最低组合的浏览器构建/CJS SSR 与最新组合的原生 ESM/CJS 边界,不把旧 Naive UI 的格式限制描述为已修复。
31
+
32
+ 依赖审计为 0 项发现,67 项防护行为检查通过。全量 lint 为 0 错误、17 条既有警告。
33
+
34
+ 各入口首屏、首开和 CSS 预算保持原值:C_Table/base 约 249.9 KiB/250 KiB,C_ActionBar 约 94.7 KiB/95 KiB。初测发现上传词表放进公共字典会增加无关入口体积,已通过组件内默认词表消除这项耦合,而非放宽首屏限额。双格式物理产物较 0.40.2 增加 6,517 B;消耗原有余量后,仅为总物理预算追加 6 KiB。
35
+
36
+ 固定规模性能回归使用 Apple M5 / macOS arm64、Node 24.19.0、Bun 1.4.2 与 Playwright 1.63.0,1440×1000 串行测量:100/500 个展开组织卡片挂载约 42.0/55.4 ms;300+300 行与 240 个输入的工作台挂载约 170.7 ms、切换约 22.7 ms、输入更新约 71.6 ms。卸载后宿主 DOM 均为零。这是一次本机串行观察,不能作为 P95、堆内存、GC 或任意数据规模的承诺,亦不宣称本轮优化了表格渲染引擎。
37
+
38
+ GitHub 账户账单限制仍由账户侧处理;不能把未启动的远端任务计作通过。代码门禁保持启用,本地验证与远端状态分别记录。
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.40.2",
6
+ "version": "0.40.4",
7
7
  "description": "基于 Naive UI 的 Vue 3 组件库",
8
8
  "packageManager": "bun@1.4.2",
9
9
  "engines": {
@@ -1 +0,0 @@
1
- function e(e,t){e.on(`cell:change:*`,({cell:e,key:n,previous:r,options:i})=>{t()&&i.ui&&e.prop(n,r,{ui:!1})})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1 +0,0 @@
1
- function e(e,t){e.on(`cell:change:*`,({cell:e,key:n,previous:r,options:i})=>{t()&&i.ui&&e.prop(n,r,{ui:!1})})}export{e as t};