@robot-admin/naive-ui-components 0.40.1 → 0.40.3

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 (135) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -1
  3. package/README_EN.md +2 -1
  4. package/dist/C_ActionBar.css +52 -52
  5. package/dist/C_ActionBar2.cjs +1 -1
  6. package/dist/C_ActionBar2.js +1 -1
  7. package/dist/C_ContextMenu.css +10 -10
  8. package/dist/C_ContextMenu2.cjs +1 -1
  9. package/dist/C_ContextMenu2.js +1 -1
  10. package/dist/C_DataPicker.css +32 -32
  11. package/dist/C_DataPicker2.cjs +1 -1
  12. package/dist/C_DataPicker2.js +1 -1
  13. package/dist/C_FormModal.css +53 -53
  14. package/dist/C_FormModal2.cjs +1 -1
  15. package/dist/C_FormModal2.js +1 -1
  16. package/dist/C_FormSearch.css +72 -72
  17. package/dist/C_FullCalendar2.cjs +1 -1
  18. package/dist/C_FullCalendar2.js +1 -1
  19. package/dist/C_Table.base.css +52 -52
  20. package/dist/C_Table.css +52 -52
  21. package/dist/C_Table.d.ts +1 -0
  22. package/dist/C_Tree.d.ts +1 -0
  23. package/dist/C_Upload.css +80 -80
  24. package/dist/C_Upload2.cjs +1 -1
  25. package/dist/C_Upload2.js +1 -1
  26. package/dist/constants.d.cts +2 -2
  27. package/dist/constants.d.ts +2 -2
  28. package/dist/constants2.d.cts +2 -2
  29. package/dist/constants2.d.ts +2 -2
  30. package/dist/constants3.d.cts +4 -4
  31. package/dist/constants3.d.ts +4 -4
  32. package/dist/constants4.d.cts +3 -3
  33. package/dist/constants4.d.ts +4 -3
  34. package/dist/data2.d.cts +9 -9
  35. package/dist/data2.d.ts +9 -9
  36. package/dist/editors.cjs +1 -1
  37. package/dist/editors.d.cts +7 -7
  38. package/dist/editors.d.ts +7 -7
  39. package/dist/editors.js +1 -1
  40. package/dist/fieldRenderers.cjs +1 -1
  41. package/dist/fieldRenderers.js +1 -1
  42. package/dist/formField.d.cts +2 -2
  43. package/dist/formField.d.ts +2 -2
  44. package/dist/graphics.d.cts +1 -1
  45. package/dist/graphics.d.ts +1 -1
  46. package/dist/index.d.cts +1 -0
  47. package/dist/index.d.ts +1 -0
  48. package/dist/index.vue.d.cts +1 -1
  49. package/dist/index.vue.d.ts +1 -1
  50. package/dist/index10.vue.d.cts +2 -2
  51. package/dist/index10.vue.d.ts +4 -4
  52. package/dist/index11.vue.d.cts +4 -4
  53. package/dist/index11.vue.d.ts +3 -3
  54. package/dist/index12.vue.d.cts +3 -3
  55. package/dist/index13.vue.d.ts +2 -2
  56. package/dist/index14.vue.d.cts +2 -2
  57. package/dist/index15.vue.d.ts +2 -2
  58. package/dist/index16.vue.d.cts +2 -2
  59. package/dist/index16.vue.d.ts +6 -6
  60. package/dist/index17.vue.d.cts +6 -6
  61. package/dist/index17.vue.d.ts +7 -7
  62. package/dist/index18.vue.d.cts +7 -7
  63. package/dist/index18.vue.d.ts +3 -3
  64. package/dist/index19.vue.d.cts +3 -3
  65. package/dist/index21.vue.d.ts +4 -4
  66. package/dist/index22.vue.d.cts +4 -4
  67. package/dist/index24.vue.d.cts +1 -1
  68. package/dist/index24.vue.d.ts +1 -1
  69. package/dist/index27.vue.d.cts +1 -1
  70. package/dist/index27.vue.d.ts +1 -1
  71. package/dist/index28.vue.d.cts +3 -3
  72. package/dist/index28.vue.d.ts +3 -3
  73. package/dist/index3.vue.d.cts +2 -2
  74. package/dist/index3.vue.d.ts +2 -2
  75. package/dist/index30.vue.d.cts +1 -1
  76. package/dist/index30.vue.d.ts +1 -1
  77. package/dist/index31.vue.d.cts +5 -5
  78. package/dist/index31.vue.d.ts +5 -5
  79. package/dist/index32.vue.d.cts +2 -2
  80. package/dist/index32.vue.d.ts +2 -2
  81. package/dist/index4.vue.d.cts +2 -2
  82. package/dist/index4.vue.d.ts +2 -2
  83. package/dist/index7.vue.d.ts +2 -2
  84. package/dist/index8.vue.d.cts +2 -2
  85. package/dist/index8.vue.d.ts +2 -2
  86. package/dist/index9.vue.d.cts +2 -2
  87. package/dist/index9.vue.d.ts +2 -2
  88. package/dist/locale.cjs +1 -0
  89. package/dist/locale.js +1 -0
  90. package/dist/mapUtils.d.cts +1 -1
  91. package/dist/mapUtils.d.ts +1 -1
  92. package/dist/presets.d.cts +1 -1
  93. package/dist/presets.d.ts +1 -1
  94. package/dist/serializeSearch.cjs +1 -1
  95. package/dist/serializeSearch.js +1 -1
  96. package/dist/source.d.cts +2 -2
  97. package/dist/source.d.ts +2 -2
  98. package/dist/style.css +250 -250
  99. package/dist/useCalendarEvents.d.cts +1 -1
  100. package/dist/useCalendarEvents.d.ts +1 -1
  101. package/dist/useCollapsePanel.d.cts +3 -3
  102. package/dist/useCollapsePanel.d.ts +3 -3
  103. package/dist/useComponentLocale.cjs +1 -1
  104. package/dist/useComponentLocale.js +1 -1
  105. package/dist/useCropperCore.d.cts +5 -5
  106. package/dist/useCropperCore.d.ts +5 -5
  107. package/dist/useDynamicFormState.d.cts +2 -2
  108. package/dist/useDynamicFormState.d.ts +2 -2
  109. package/dist/useEdgeInteraction.d.cts +1 -1
  110. package/dist/useEdgeInteraction.d.ts +1 -1
  111. package/dist/useFullscreen.d.cts +3 -3
  112. package/dist/useFullscreen.d.ts +3 -3
  113. package/dist/useInfiniteScroll.d.cts +5 -5
  114. package/dist/useInfiniteScroll.d.ts +5 -5
  115. package/dist/useQRCode.d.cts +2 -2
  116. package/dist/useQRCode.d.ts +2 -2
  117. package/dist/useSignatureHistory.d.cts +4 -4
  118. package/dist/useSignatureHistory.d.ts +4 -4
  119. package/dist/useSplitResize.d.cts +6 -6
  120. package/dist/useSplitResize.d.ts +6 -6
  121. package/dist/useTimeSelection.d.cts +3 -3
  122. package/dist/useTimeSelection.d.ts +3 -3
  123. package/dist/useWorkflowValidation.d.cts +2 -2
  124. package/dist/useWorkflowValidation.d.ts +2 -2
  125. package/dist/verification.d.cts +2 -2
  126. package/dist/verification.d.ts +2 -2
  127. package/docs/architecture.en.md +1 -1
  128. package/docs/architecture.md +1 -1
  129. package/docs/engineering.en.md +6 -5
  130. package/docs/engineering.md +6 -5
  131. package/docs/guides/usage.en.md +1 -1
  132. package/docs/guides/usage.md +2 -2
  133. package/docs/stability-boundaries-0.40.3.md +38 -0
  134. package/docs/stability-review-20261115.md +42 -0
  135. package/package.json +8 -4
@@ -307,16 +307,16 @@ declare const __VLS_base: vue.DefineComponent<WorkflowProps, {
307
307
  }>;
308
308
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
309
309
  "node-click": (node: WorkflowNode<NodeType>) => any;
310
+ "update:modelValue": (value: WorkflowData) => any;
310
311
  change: (value: WorkflowData) => any;
311
312
  save: (data: WorkflowData) => any;
312
- "update:modelValue": (value: WorkflowData) => any;
313
313
  "validate-error": (errors: ValidationError[]) => any;
314
314
  "edge-click": (edge: WorkflowEdge) => any;
315
315
  }, string, vue.PublicProps, Readonly<WorkflowProps> & Readonly<{
316
316
  "onNode-click"?: ((node: WorkflowNode<NodeType>) => any) | undefined;
317
+ "onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
317
318
  onChange?: ((value: WorkflowData) => any) | undefined;
318
319
  onSave?: ((data: WorkflowData) => any) | undefined;
319
- "onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
320
320
  "onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
321
321
  "onEdge-click"?: ((edge: WorkflowEdge) => any) | undefined;
322
322
  }>, {
@@ -307,16 +307,16 @@ declare const __VLS_base: vue.DefineComponent<WorkflowProps, {
307
307
  }>;
308
308
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
309
309
  "node-click": (node: WorkflowNode<NodeType>) => any;
310
+ "update:modelValue": (value: WorkflowData) => any;
310
311
  change: (value: WorkflowData) => any;
311
312
  save: (data: WorkflowData) => any;
312
- "update:modelValue": (value: WorkflowData) => any;
313
313
  "validate-error": (errors: ValidationError[]) => any;
314
314
  "edge-click": (edge: WorkflowEdge) => any;
315
315
  }, string, vue.PublicProps, Readonly<WorkflowProps> & Readonly<{
316
316
  "onNode-click"?: ((node: WorkflowNode<NodeType>) => any) | undefined;
317
+ "onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
317
318
  onChange?: ((value: WorkflowData) => any) | undefined;
318
319
  onSave?: ((data: WorkflowData) => any) | undefined;
319
- "onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
320
320
  "onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
321
321
  "onEdge-click"?: ((edge: WorkflowEdge) => any) | undefined;
322
322
  }>, {
@@ -78,19 +78,19 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
78
78
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
79
79
  change: (valid: boolean) => any;
80
80
  success: (data: CaptchaSuccessPayload) => any;
81
- reset: () => any;
82
81
  fail: (error: string) => any;
83
82
  "verify-error": (error: unknown) => any;
84
83
  "load-error": (error: unknown) => any;
85
84
  "visible-change": (visible: boolean) => any;
85
+ reset: () => any;
86
86
  }, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
87
87
  onChange?: ((valid: boolean) => any) | undefined;
88
88
  onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
89
- onReset?: (() => any) | undefined;
90
89
  onFail?: ((error: string) => any) | undefined;
91
90
  "onVerify-error"?: ((error: unknown) => any) | undefined;
92
91
  "onLoad-error"?: ((error: unknown) => any) | undefined;
93
92
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
93
+ onReset?: (() => any) | undefined;
94
94
  }>, {
95
95
  disabled: boolean;
96
96
  provider: CaptchaProvider;
@@ -78,19 +78,19 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
78
78
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
79
79
  change: (valid: boolean) => any;
80
80
  success: (data: CaptchaSuccessPayload) => any;
81
- reset: () => any;
82
81
  fail: (error: string) => any;
83
82
  "verify-error": (error: unknown) => any;
84
83
  "load-error": (error: unknown) => any;
85
84
  "visible-change": (visible: boolean) => any;
85
+ reset: () => any;
86
86
  }, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
87
87
  onChange?: ((valid: boolean) => any) | undefined;
88
88
  onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
89
- onReset?: (() => any) | undefined;
90
89
  onFail?: ((error: string) => any) | undefined;
91
90
  "onVerify-error"?: ((error: unknown) => any) | undefined;
92
91
  "onLoad-error"?: ((error: unknown) => any) | undefined;
93
92
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
93
+ onReset?: (() => any) | undefined;
94
94
  }>, {
95
95
  disabled: boolean;
96
96
  provider: CaptchaProvider;
@@ -83,4 +83,4 @@ Verify behavior through published consumers, public types, multiple applications
83
83
 
84
84
  `bun run verify` is the local quality gate. `bun run check:audit` remains a separate check and CI gate. Record actual advisory results; do not hide them by disabling checks or forcing unverified major versions.
85
85
 
86
- Fresh consumer compatibility is checked with `bun run check:consumer-contracts minimum` and `latest`. Each profile installs the real tarball in an isolated temporary directory, checks ESM/CJS types and renders representative components. CI runs both profiles. `/config` exports shared injection keys and protocol types without loading the presentation layer.
86
+ Fresh consumer compatibility is checked with `bun run check:consumer-contracts minimum` and `latest`. Each profile installs the real tarball in an isolated temporary directory, checks ESM/CJS types and renders representative components. CI runs both profiles. `/config` exports shared injection keys, protocol types, palettes and `createComponentTheme`. It does not register components or import the router or message/dialog feedback adapter. Its theme factory uses Naive UI's public theme API, so native CJS imports of this entry load Naive UI.
@@ -30,7 +30,7 @@
30
30
 
31
31
  Naive UI 2.35 的 CommonJS 分发不提供 Node 原生 ESM 所需的命名导出,因此最低组合不支持该运行方式。原生 Node ESM SSR 已验证的配置为 Naive UI 2.45.3;这里不将它宣称为历史首次修复版本。Vite 等打包器接入和 CJS SSR 继续保留原有 peer 范围。
32
32
 
33
- `/config` 是独立公共配置入口,只包含注入键和协议类型,不引入呈现层。组件注册、样式与反馈适配仍由各自入口负责。
33
+ `/config` 是独立公共配置入口,导出共享注入键、协议类型、色板及 `createComponentTheme`。它不注册组件、不加载路由或消息/弹窗反馈适配器;主题工厂使用 Naive UI 的公开主题接口,因此原生 CJS 导入该入口会加载 Naive UI。组件注册和样式仍由各自入口负责。
34
34
 
35
35
  ## 高亮实例
36
36
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  ```
10
10
  bun run build
11
- ├── 1. tsdown → Multi-entry bundling (62 components ESM/CJS/DTS)
11
+ ├── 1. tsdown → Multi-entry bundling (63 components ESM/CJS/DTS)
12
12
  ├── 2. sass CLI → Compile the shared-variable entry → global-scss.css
13
13
  ├── 3. merge-css.js → Merge Vue-compiled SFC CSS + global variables → style.css
14
14
  ├── 4. gen-exports.js → Auto-generate package.json exports map
@@ -18,7 +18,7 @@ bun run build
18
18
 
19
19
  ### Key Technical Details
20
20
 
21
- - **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based), 55 component entries plus the root entry and resolver
21
+ - **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based), 63 component entries plus the root entry and resolver
22
22
  - **SCSS processing**: Custom `scssTransformPlugin` compiles SFC SCSS within the Rolldown pipeline; standalone Sass CLI only compiles the shared-variable entry
23
23
  - **CSS merging**: Post-build merges Vue scoped-compiled per-chunk CSS with shared variables into a single `style.css`, avoiding duplicate styles and leaked raw `:deep()` selectors
24
24
  - **Type exports**: Unified `export *` barrel pattern with auto-generated `.d.ts`
@@ -27,14 +27,15 @@ 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
 
34
35
  ```
35
36
  dist/
36
37
  ├── index.js / index.cjs / index.d.ts # Main entry
37
- ├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (55 components)
38
+ ├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (63 components)
38
39
  ├── C_Form.base.css / C_Form.css # Base/full style tiers
39
40
  ├── C_Table.base.css / C_Table.css # Base/full style tiers
40
41
  ├── style.css # Merged full styles
@@ -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
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  ```
10
10
  bun run build
11
- ├── 1. tsdown → 多入口打包(62 组件 ESM/CJS/DTS)
11
+ ├── 1. tsdown → 多入口打包(63 组件 ESM/CJS/DTS)
12
12
  ├── 2. sass CLI → 编译共享变量入口 → global-scss.css
13
13
  ├── 3. merge-css.js → 合并 Vue 编译后的 SFC CSS + 全局变量 → style.css
14
14
  ├── 4. gen-exports.js → 自动生成 package.json exports 映射
@@ -18,7 +18,7 @@ bun run build
18
18
 
19
19
  ### 技术要点
20
20
 
21
- - **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),55 个组件入口,加主入口与 Resolver
21
+ - **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),63 个组件入口,加主入口与 Resolver
22
22
  - **SCSS 处理**:自定义 `scssTransformPlugin` 在 Rolldown 管线内编译 SFC SCSS,独立 Sass CLI 仅编译共享变量入口
23
23
  - **CSS 合并**:构建后将 Vue 已完成 scoped 转换的 per-chunk CSS 与共享变量合并为单一 `style.css`,避免重复样式和原始 `:deep()` 选择器泄漏
24
24
  - **类型导出**:统一 `export *` barrel 模式,自动生成完整 `.d.ts`
@@ -27,14 +27,15 @@ 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
 
34
35
  ```
35
36
  dist/
36
37
  ├── index.js / index.cjs / index.d.ts # 主入口
37
- ├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(55 组件)
38
+ ├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(63 组件)
38
39
  ├── C_Form.base.css / C_Form.css # 基础/完整样式层级
39
40
  ├── C_Table.base.css / C_Table.css # 基础/完整样式层级
40
41
  ├── style.css # 合并后的全量样式
@@ -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
 
@@ -687,7 +687,7 @@ Parent buttons open a themed directory panel with page counts and current-page f
687
687
 
688
688
  ## Configuration and behavior contracts (0.21)
689
689
 
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.
690
+ 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 and Upload 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
691
 
692
692
  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
693
 
@@ -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 的内置文案与已有 Form/Table/Search/Breadcrumb 一起使用该上下文;DataPicker 的局部语言也传给内嵌分类树。业务标题、菜单名称和显式传入的文案由宿主管理,上传文件名和服务端错误保持原文。
85
85
 
86
86
  ### Composables 单独使用
87
87
 
@@ -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 账户账单限制仍由账户侧处理;不能把未启动的远端任务计作通过。代码门禁保持启用,本地验证与远端状态分别记录。
@@ -0,0 +1,42 @@
1
+ # 0.40.2 精准稳定性复核
2
+
3
+ 日期:2026-11-15。基线:0.40.1。范围是已复现的旧异步选项、默认文案与验证缺口;保持现有组件职责、公开 API 和业务配置。C_Table 实现与 MachTable 均未修改,Robot_Admin 的同步仅升级正式依赖。
4
+
5
+ ## 修复与兼容
6
+
7
+ | 范围 | 问题与最终行为 | 验证 |
8
+ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
9
+ | C_Form 的旧 asyncOptions | 真正切换 dependsOn 后立即失效旧候选,失败不回退到旧候选或静态 children;同条件手动刷新或同值通知失败仍保留有效候选;业务选值不自动清除 | 原始失效问题复现;真实组件选项与业务值断言;同值、对象等值替换与嵌套变化 |
10
+ | 异步请求归属 | 新请求在旧请求 abort 前登记;同步回调重入后旧请求不再加载或清理后继状态;候选观察器同步重载、同步失败、替换 loader、移除与销毁均按当前归属处理 | version 与 controller 双重归属;晚到结果、错误和 loading 回归 |
11
+ | C_ActionBar / C_FormModal | 默认文案跟随既有全局或弹窗局部语言;显式业务文案优先;公开中文预设和默认中文语义保持兼容 | 动态切换、自定义消息、局部语言、空字符串回退及多应用隔离 |
12
+ | 构建消费边界 | 浏览器场景只消费公开 dist 入口;构建拒绝库内 src 运行模块 | 生产构建 manifest、强制 dist 解析与页面错误断言 |
13
+
14
+ 没有新增运行时依赖、属性或配置体系。依赖上下文比较复用现有值快照与比较工具,只处理声明的 dependsOn;取消实际网络请求仍需 loader 配合 signal,忽略取消的旧结果也不能回写。业务接口权限、领域校验与保存事务继续属于应用。
15
+
16
+ ## 验证与性能
17
+
18
+ - `bun run verify`:563 项逻辑测试、924 项组件挂载测试;源码、Vue、测试及消费者类型,导出、旧 API、质量、vendor、构建、ESM/CJS 与可选 peer 契约全部通过。
19
+ - 正式 dist 的 8 个真实业务交互在 Chromium、Firefox、WebKit 共 24 项通过,无重试,无页面错误或控制台错误/警告;覆盖主从隔离与独立重试、质量连续输入与精度、嵌套分割布局恢复、物料/人员身份、取消与焦点返回、远程树失败和范围替换。
20
+ - 最低与最新 peer 均在独立临时消费者安装通过:最低 Vue 3.5.3 / Naive UI 2.35.0 / Router 4.6.4;最新 Vue 3.5.45 / Naive UI 2.45.3 / Router 5.5.1。最低历史 Naive UI 组合仅验证 CJS 渲染及浏览器构建,不宣称原生 Node ESM 支持;第三方声明内部保持既有 skipLibCheck 契约。
21
+ - 依赖安全检查为 0 项发现,67 项防护行为检查通过。lint 为 0 错误、17 条既有警告,未为降低数字拆散解析或渲染逻辑。
22
+ - 原有各入口首屏、首开与 CSS 预算保持不变。此次双格式物理产物超出旧总预算 2,064 B,按整 KiB 仅追加 3 KiB;这不是首屏或执行性能的替代指标。
23
+
24
+ 性能门禁新增三个串行 Chromium 场景,固定 1440×1000,Apple M5 / macOS arm64 / Node 24.19.0 / Bun 1.4.2 / Playwright 1.63.0。单次实测:
25
+
26
+ | 场景 | 挂载 | 定位/切换 | DOM 节点 | 输入模型更新 |
27
+ | ------------------------------- | -------: | ---------: | -------: | -----------: |
28
+ | 100 个展开组织卡片 | 43.9 ms | 30.0 ms | 834 | — |
29
+ | 500 个展开组织卡片 | 58.4 ms | 29.1 ms | 4,134 | — |
30
+ | 300+300 行与 240 个真实编辑输入 | 146.4 ms | 27.3 ms | 2,197 | 44.5 ms |
31
+
32
+ 两个只读表均使用虚拟渲染;240 个输入全部挂载;三个宿主卸载后 DOM 为零。耗时包含 Vue 更新及两帧等待,输入耗时包含自动化开销。这些是固定规模的本机基准,不是 P95、堆内存、GC 或最大容量证明;CI runner 需积累独立基线,不能沿用本机数值作为承诺。执行方式和测量契约见 [浏览器门禁](https://github.com/ChenyCHENYU/naive-ui-components/blob/main/e2e/README.md)。
33
+
34
+ ## 优化后复扫结论
35
+
36
+ - **常用组件接入保持扁平。** 本轮不要求使用侧补取消序号、重复选项状态或语言转换,底层修复即生效;不把领域协议推断或额外 DSL 引入组件。
37
+ - **C_Table 继续承担一般业务表格。** 现有列配置、编辑、虚拟列表与 C_SplitPane 足以支撑已建立的主从多表和质量矩阵对照契约;高级表格继续使用独立 MachTable 专项,不把两者揉在一起。
38
+ - **选择能力共用已有内核。** 分类物料由 C_DataPicker、组织选人由 C_UserPicker 复用树与选择会话,保持来源注册、分页、解析、草稿和确认的既有分层,未再增加一套查询缓存或选择状态机。
39
+ - **质量门禁覆盖真实产物。** 单测与挂载回归验证可控乱序、同步重入及生命周期;浏览器验证真实布局和交互;独立安装验证包声明和最低/最新依赖。各层证据各自成立,不互相代替。
40
+ - **剩余工作以业务数据驱动。** WL 三个场景仍是列明交互契约的离线同功能对照,不是 WL 所有页面迁移验收。真实权限、库存判据、仪器采集、保存事务、审批执行、多业务 UAT、读屏和长时堆内存需要对应环境验证;不因尚未接后端而增加模拟业务引擎。
41
+
42
+ 目前未发现需要继续扩张公开 API 或整体重构的确定问题。后续优先用真实来源、典型数据规模与可复现故障验证,再针对实际瓶颈修复,保持现有架构和使用侧简洁。
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.40.1",
6
+ "version": "0.40.3",
7
7
  "description": "基于 Naive UI 的 Vue 3 组件库",
8
8
  "packageManager": "bun@1.4.2",
9
9
  "engines": {
@@ -134,7 +134,10 @@
134
134
  "check:quality": "node scripts/check-source-quality.js",
135
135
  "check:consumer-types": "vue-tsc --noEmit -p tests/consumer/tsconfig.json",
136
136
  "check:consumer-contracts": "node scripts/check-consumer-contracts.js",
137
- "verify": "bun run lint:check && bun run type-check && bun run type-check:vue && bun run test && bun run test:components && bun run type-check:components && bun run check:exports && bun run check:vendor && bun run check:legacy && bun run check:package && bun run check:quality && bun run build && bun run check:consumer-size && bun run check:consumer-types && bun run check:consumer-contracts && bun run check:search-workflows",
137
+ "verify": "bun run lint:check && bun run type-check && bun run type-check:vue && bun run test && bun run test:components && bun run type-check:components && bun run check:exports && bun run check:vendor && bun run check:legacy && bun run check:package && bun run check:quality && bun run build && bun run check:consumer-size && bun run check:consumer-types && bun run check:consumer-contracts && bun run check:search-workflows && bun run type-check:e2e",
138
+ "test:browser": "playwright test --config playwright.config.ts",
139
+ "test:performance": "playwright test --config playwright.performance.config.ts",
140
+ "type-check:e2e": "tsc --noEmit -p e2e/tsconfig.json",
138
141
  "prepublishOnly": "bun run verify",
139
142
  "release": "changeset publish",
140
143
  "changeset": "changeset",
@@ -217,6 +220,7 @@
217
220
  "@iconify-json/la": "1.2.1",
218
221
  "@iconify-json/mdi": "1.2.3",
219
222
  "@iconify-json/ri": "1.2.10",
223
+ "@playwright/test": "1.63.0",
220
224
  "@robot-admin/git-standards": "1.0.3",
221
225
  "@types/node": "^24.13.3",
222
226
  "@types/sortablejs": "^1.15.9",
@@ -244,6 +248,7 @@
244
248
  "postcss-selector-parser": "7.1.6",
245
249
  "prettier": "^3.9.6",
246
250
  "sass": "^1.103.1",
251
+ "sortablejs": "1.15.7",
247
252
  "tsdown": "^0.20.3",
248
253
  "typescript": "^5.9.3",
249
254
  "unocss": "66.10.5",
@@ -252,9 +257,8 @@
252
257
  "vite": "8.2.4",
253
258
  "vitest": "4.1.12",
254
259
  "vue": "^3.5.42",
255
- "vue-tsc": "^3.3.11",
256
260
  "vue-router": "^5.3.1",
257
- "sortablejs": "1.15.7",
261
+ "vue-tsc": "^3.3.11",
258
262
  "xlsx": "file:vendor/xlsx-0.20.3.tgz"
259
263
  },
260
264
  "overrides": {