@robot-admin/naive-ui-components 0.40.2 → 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.
- package/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/README_EN.md +2 -2
- package/dist/C_ContextMenu.css +10 -10
- package/dist/C_ContextMenu2.cjs +1 -1
- package/dist/C_ContextMenu2.js +1 -1
- package/dist/C_DataPicker.css +32 -32
- package/dist/C_DataPicker2.cjs +1 -1
- package/dist/C_DataPicker2.js +1 -1
- package/dist/C_FormSearch.css +72 -72
- package/dist/C_FullCalendar2.cjs +1 -1
- package/dist/C_FullCalendar2.js +1 -1
- package/dist/C_Table.d.ts +1 -0
- package/dist/C_Tree.d.ts +1 -0
- package/dist/C_Upload.css +80 -80
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants2.d.cts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants3.d.cts +6 -6
- package/dist/constants3.d.ts +6 -6
- package/dist/constants4.d.cts +2 -2
- package/dist/constants4.d.ts +3 -2
- package/dist/data2.d.cts +8 -8
- package/dist/data2.d.ts +8 -8
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.cts +5 -5
- package/dist/editors.d.ts +5 -5
- package/dist/editors.js +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.vue.d.cts +1 -1
- package/dist/index.vue.d.ts +1 -1
- package/dist/index10.vue.d.cts +2 -2
- package/dist/index10.vue.d.ts +4 -4
- package/dist/index11.vue.d.cts +4 -4
- package/dist/index11.vue.d.ts +3 -3
- package/dist/index12.vue.d.cts +3 -3
- package/dist/index13.vue.d.ts +1 -1
- package/dist/index14.vue.d.cts +1 -1
- package/dist/index16.vue.d.ts +4 -4
- package/dist/index17.vue.d.cts +4 -4
- package/dist/index17.vue.d.ts +8 -8
- package/dist/index18.vue.d.cts +8 -8
- package/dist/index18.vue.d.ts +2 -2
- package/dist/index19.vue.d.cts +2 -2
- package/dist/index20.vue.d.ts +2 -2
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +2 -2
- package/dist/index24.vue.d.cts +1 -1
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index28.vue.d.cts +2 -2
- package/dist/index28.vue.d.ts +2 -2
- package/dist/index3.vue.d.cts +3 -3
- package/dist/index3.vue.d.ts +3 -3
- package/dist/index31.vue.d.cts +2 -2
- package/dist/index31.vue.d.ts +2 -2
- package/dist/index32.vue.d.cts +2 -2
- package/dist/index32.vue.d.ts +2 -2
- package/dist/index4.vue.d.cts +3 -3
- package/dist/index4.vue.d.ts +3 -3
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index8.vue.d.cts +2 -2
- package/dist/index9.vue.d.ts +2 -2
- package/dist/locale.cjs +1 -0
- package/dist/locale.js +1 -0
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/serializeSearch.cjs +1 -1
- package/dist/serializeSearch.js +1 -1
- package/dist/style.css +197 -197
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +6 -6
- package/dist/useCollapsePanel.d.ts +6 -6
- package/dist/useComponentLocale.cjs +1 -1
- package/dist/useComponentLocale.js +1 -1
- package/dist/useCropperCore.d.cts +5 -5
- package/dist/useCropperCore.d.ts +5 -5
- package/dist/useDynamicFormState.d.cts +2 -2
- package/dist/useDynamicFormState.d.ts +2 -2
- package/dist/useEdgeInteraction.d.cts +1 -1
- package/dist/useEdgeInteraction.d.ts +1 -1
- package/dist/useFullscreen.d.cts +1 -1
- package/dist/useFullscreen.d.ts +1 -1
- package/dist/useInfiniteScroll.d.cts +5 -5
- package/dist/useInfiniteScroll.d.ts +5 -5
- package/dist/useQRCode.d.cts +2 -2
- package/dist/useQRCode.d.ts +2 -2
- package/dist/useSignatureHistory.d.cts +3 -3
- package/dist/useSignatureHistory.d.ts +3 -3
- package/dist/useSplitResize.d.cts +6 -6
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useWorkflowValidation.d.cts +4 -4
- package/dist/useWorkflowValidation.d.ts +4 -4
- package/dist/verification.d.cts +2 -2
- package/dist/verification.d.ts +2 -2
- package/docs/architecture.en.md +1 -1
- package/docs/architecture.md +1 -1
- package/docs/engineering.en.md +3 -2
- package/docs/engineering.md +3 -2
- package/docs/guides/usage.en.md +1 -1
- package/docs/guides/usage.md +2 -2
- package/docs/stability-boundaries-0.40.3.md +38 -0
- package/package.json +1 -1
package/dist/verification.d.ts
CHANGED
|
@@ -77,20 +77,20 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
|
77
77
|
show: () => void;
|
|
78
78
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
79
79
|
change: (valid: boolean) => any;
|
|
80
|
-
reset: () => any;
|
|
81
80
|
success: (data: CaptchaSuccessPayload) => 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
|
-
onReset?: (() => any) | undefined;
|
|
89
88
|
onSuccess?: ((data: CaptchaSuccessPayload) => 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;
|
package/docs/architecture.en.md
CHANGED
|
@@ -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
|
|
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.
|
package/docs/architecture.md
CHANGED
|
@@ -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
|
|
package/docs/engineering.en.md
CHANGED
|
@@ -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
|
|
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.
|
|
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
|
|
package/docs/engineering.md
CHANGED
|
@@ -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
|
|
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
|
|
82
|
+
消费端预算包含 Vue 和 Naive UI,各入口独立测量,不能相加当作同一应用的体积。`C_Form/base` 为单输入字段,`C_Table/base` 为单列单行展示表格;搜索、操作栏、树、组织图、选择器与流程等也有对应的最小消费场景。基础样式排除内置富文本编辑器样式。动态 JS 会完成构建检查,但不计入首屏;DataPicker、UserPicker 与 AntV 还分别检查首次打开的增量。此检查衡量传输体积,不替代真实浏览器的交互性能测量。`verify` 和发布前生命周期均包含该门禁。
|
|
82
83
|
|
|
83
84
|
### 项目结构
|
|
84
85
|
|
package/docs/guides/usage.en.md
CHANGED
|
@@ -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
|
|
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
|
|
package/docs/guides/usage.md
CHANGED
|
@@ -66,7 +66,7 @@ app.mount('#app')
|
|
|
66
66
|
|
|
67
67
|
### 按需配置语言与反馈
|
|
68
68
|
|
|
69
|
-
独立 `/config`
|
|
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 账户账单限制仍由账户侧处理;不能把未启动的远端任务计作通过。代码门禁保持启用,本地验证与远端状态分别记录。
|