@robot-admin/naive-ui-components 0.11.7 → 0.12.1

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 (185) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +146 -29
  3. package/README_EN.md +146 -29
  4. package/SECURITY.md +1 -0
  5. package/dist/C_ActionBar.cjs +1 -1
  6. package/dist/C_ActionBar.css +53 -53
  7. package/dist/C_ActionBar.d.cts +2 -2
  8. package/dist/C_ActionBar.d.ts +2 -2
  9. package/dist/C_ActionBar.js +1 -1
  10. package/dist/C_ActionBar2.cjs +1 -1
  11. package/dist/C_ActionBar2.js +1 -1
  12. package/dist/C_AntV.css +67 -67
  13. package/dist/C_AntV2.cjs +3 -3
  14. package/dist/C_AntV2.js +3 -3
  15. package/dist/C_AudioPlayer.d.cts +1 -1
  16. package/dist/C_AudioPlayer.d.ts +1 -1
  17. package/dist/C_AvatarGroup.d.cts +1 -1
  18. package/dist/C_AvatarGroup.d.ts +1 -1
  19. package/dist/C_Barcode.d.cts +1 -1
  20. package/dist/C_Barcode.d.ts +1 -1
  21. package/dist/C_Breadcrumb.d.cts +1 -1
  22. package/dist/C_Breadcrumb.d.ts +1 -1
  23. package/dist/C_Captcha.cjs +1 -1
  24. package/dist/C_Captcha.css +193 -51
  25. package/dist/C_Captcha.d.cts +2 -3
  26. package/dist/C_Captcha.d.ts +2 -3
  27. package/dist/C_Captcha.js +1 -1
  28. package/dist/C_Captcha2.cjs +1 -1
  29. package/dist/C_Captcha2.js +1 -1
  30. package/dist/C_Cascade.d.cts +1 -1
  31. package/dist/C_Cascade.d.ts +1 -1
  32. package/dist/C_Chat.d.cts +1 -1
  33. package/dist/C_Chat.d.ts +1 -1
  34. package/dist/C_City.d.cts +1 -1
  35. package/dist/C_City.d.ts +1 -1
  36. package/dist/C_Code.d.cts +1 -1
  37. package/dist/C_Code.d.ts +1 -1
  38. package/dist/C_ContextMenu.d.cts +1 -1
  39. package/dist/C_ContextMenu.d.ts +1 -1
  40. package/dist/C_Date.d.cts +1 -1
  41. package/dist/C_Date.d.ts +1 -1
  42. package/dist/C_Editor.d.cts +1 -1
  43. package/dist/C_Editor.d.ts +1 -1
  44. package/dist/C_FormModal.cjs +1 -0
  45. package/dist/C_FormModal.css +41 -0
  46. package/dist/C_FormModal.d.cts +2 -0
  47. package/dist/C_FormModal.d.ts +3 -0
  48. package/dist/C_FormModal.js +1 -0
  49. package/dist/C_FormModal2.cjs +1 -0
  50. package/dist/C_FormModal2.js +1 -0
  51. package/dist/C_Login.css +210 -127
  52. package/dist/C_Login2.cjs +1 -1
  53. package/dist/C_Login2.js +1 -1
  54. package/dist/C_Map.css +3 -3
  55. package/dist/C_Map2.cjs +1 -1
  56. package/dist/C_Map2.js +1 -1
  57. package/dist/C_Menu.d.cts +1 -1
  58. package/dist/C_Table.base.css +86 -86
  59. package/dist/C_Table.cjs +1 -1
  60. package/dist/C_Table.css +86 -86
  61. package/dist/C_Table.d.ts +4 -3
  62. package/dist/C_Table.js +1 -1
  63. package/dist/C_Tabs.cjs +1 -0
  64. package/dist/C_Tabs.css +1 -0
  65. package/dist/C_Tabs.d.cts +2 -0
  66. package/dist/C_Tabs.d.ts +2 -0
  67. package/dist/C_Tabs.js +1 -0
  68. package/dist/C_TagsView.css +38 -38
  69. package/dist/C_TagsView2.cjs +1 -1
  70. package/dist/C_TagsView2.js +1 -1
  71. package/dist/C_VtableGantt.css +19 -19
  72. package/dist/C_VtableGantt2.cjs +1 -1
  73. package/dist/C_VtableGantt2.js +1 -1
  74. package/dist/constants.d.cts +2 -2
  75. package/dist/constants.d.ts +2 -2
  76. package/dist/constants2.d.cts +2 -2
  77. package/dist/constants2.d.ts +2 -2
  78. package/dist/constants3.d.cts +2 -2
  79. package/dist/constants3.d.ts +2 -2
  80. package/dist/constants4.d.cts +4 -4
  81. package/dist/constants4.d.ts +4 -4
  82. package/dist/constants5.d.cts +2 -2
  83. package/dist/constants5.d.ts +2 -2
  84. package/dist/data.d.cts +108 -0
  85. package/dist/data.d.ts +108 -0
  86. package/dist/data2.cjs +1 -0
  87. package/dist/data2.js +1 -0
  88. package/dist/index.cjs +1 -1
  89. package/dist/index.d.cts +49 -48
  90. package/dist/index.d.ts +51 -49
  91. package/dist/index.js +1 -1
  92. package/dist/index.vue.d.cts +72 -69
  93. package/dist/index.vue.d.ts +72 -69
  94. package/dist/index10.vue.d.cts +80 -39
  95. package/dist/index10.vue.d.ts +68 -77
  96. package/dist/index11.vue.d.cts +68 -77
  97. package/dist/index11.vue.d.ts +53 -68
  98. package/dist/index12.vue.d.cts +53 -68
  99. package/dist/index12.vue.d.ts +52 -58
  100. package/dist/index13.vue.d.cts +52 -58
  101. package/dist/index13.vue.d.ts +3 -3
  102. package/dist/index14.vue.d.cts +3 -3
  103. package/dist/index14.vue.d.ts +5 -5
  104. package/dist/index15.vue.d.cts +5 -5
  105. package/dist/index15.vue.d.ts +2 -2
  106. package/dist/index16.vue.d.cts +2 -2
  107. package/dist/index16.vue.d.ts +14 -11
  108. package/dist/index17.vue.d.cts +14 -11
  109. package/dist/index17.vue.d.ts +4 -4
  110. package/dist/index18.vue.d.cts +4 -4
  111. package/dist/index18.vue.d.ts +3 -3
  112. package/dist/index19.vue.d.cts +2 -2
  113. package/dist/index19.vue.d.ts +2 -2
  114. package/dist/index2.vue.d.cts +70 -65
  115. package/dist/index2.vue.d.ts +70 -65
  116. package/dist/index20.vue.d.cts +1 -1
  117. package/dist/index20.vue.d.ts +1 -1
  118. package/dist/index21.vue.d.cts +2 -2
  119. package/dist/index21.vue.d.ts +2 -2
  120. package/dist/index22.vue.d.cts +1 -1
  121. package/dist/index22.vue.d.ts +1 -1
  122. package/dist/index24.vue.d.cts +2 -2
  123. package/dist/index24.vue.d.ts +2 -2
  124. package/dist/index25.vue.d.cts +1 -1
  125. package/dist/index25.vue.d.ts +1 -1
  126. package/dist/index27.vue.d.cts +2 -2
  127. package/dist/index27.vue.d.ts +2 -2
  128. package/dist/index3.vue.d.cts +30 -80
  129. package/dist/index3.vue.d.ts +30 -80
  130. package/dist/index4.vue.d.cts +130 -30
  131. package/dist/index4.vue.d.ts +22 -30
  132. package/dist/index5.vue.d.cts +18 -126
  133. package/dist/index5.vue.d.ts +22 -19
  134. package/dist/index6.vue.d.cts +22 -19
  135. package/dist/index6.vue.d.ts +117 -22
  136. package/dist/index7.vue.d.cts +117 -22
  137. package/dist/index7.vue.d.ts +17 -110
  138. package/dist/index8.vue.d.cts +17 -110
  139. package/dist/index8.vue.d.ts +37 -24
  140. package/dist/index9.vue.d.cts +37 -24
  141. package/dist/index9.vue.d.ts +80 -39
  142. package/dist/mapUtils.d.cts +4 -4
  143. package/dist/mapUtils.d.ts +4 -4
  144. package/dist/presets.d.cts +96 -0
  145. package/dist/presets.d.ts +96 -0
  146. package/dist/resolver.cjs +1 -1
  147. package/dist/resolver.d.cts +1 -1
  148. package/dist/resolver.d.ts +1 -1
  149. package/dist/resolver.js +1 -1
  150. package/dist/style.css +520 -393
  151. package/dist/useCalendarEvents.d.cts +1 -1
  152. package/dist/useCalendarEvents.d.ts +1 -1
  153. package/dist/useCollapsePanel.d.cts +8 -8
  154. package/dist/useCollapsePanel.d.ts +8 -8
  155. package/dist/useCropperCore.d.cts +9 -9
  156. package/dist/useCropperCore.d.ts +9 -9
  157. package/dist/useDraggableLayout.d.cts +2 -2
  158. package/dist/useDraggableLayout.d.ts +2 -2
  159. package/dist/useEdgeInteraction.d.cts +3 -2
  160. package/dist/useEdgeInteraction.d.ts +3 -2
  161. package/dist/useInfiniteScroll.d.cts +1 -1
  162. package/dist/useInfiniteScroll.d.ts +1 -1
  163. package/dist/useQRCode.d.cts +4 -4
  164. package/dist/useQRCode.d.ts +4 -4
  165. package/dist/useSearchState.d.cts +6 -6
  166. package/dist/useSearchState.d.ts +6 -6
  167. package/dist/useSignatureHistory.d.cts +4 -4
  168. package/dist/useSignatureHistory.d.ts +4 -4
  169. package/dist/useSplitResize.d.cts +6 -6
  170. package/dist/useSplitResize.d.ts +6 -6
  171. package/dist/useTableQuery.cjs +3 -3
  172. package/dist/useTableQuery.d.cts +10 -0
  173. package/dist/useTableQuery.d.ts +10 -0
  174. package/dist/useTableQuery.js +3 -3
  175. package/dist/useTimeSelection.d.cts +5 -5
  176. package/dist/useTimeSelection.d.ts +5 -5
  177. package/dist/useTreeOperations.d.cts +8 -8
  178. package/dist/useTreeOperations.d.ts +8 -8
  179. package/dist/useWorkflowValidation.d.cts +4 -4
  180. package/dist/useWorkflowValidation.d.ts +4 -4
  181. package/dist/verification.d.cts +70 -5
  182. package/dist/verification.d.ts +70 -5
  183. package/package.json +2 -1
  184. package/dist/types.d.ts +0 -58
  185. package/dist/types2.d.cts +0 -58
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @robot-admin/naive-ui-components
2
2
 
3
+ ## 0.12.1
4
+
5
+ ### Minor Changes
6
+
7
+ - Enhance `C_ActionBar` with semantic action presets, getter-based reactive states, guarded async loading, and icon-first compact `tiny` defaults, including consistent create/save/cancel/close actions for forms and details. Allow `C_Table` toolbars to consume the same left/right action model while preserving existing slots, configurable sizing, and independent table engines.
8
+
9
+ - Polish the C_Captcha and C_Login verification flow with package-owned SVG state icons, explicit verification copy, theme variables, a visibility event for pausing expensive host effects, and a clearer verification-before-submit layout. Add an opt-in, lazily loaded ALTCHA provider for free self-hosted proof-of-work challenges while preserving the existing puzzle provider by default.
10
+
11
+ - 新增公开的 `C_Tabs` 数据驱动紧凑标签页,支持 render、插槽、异步切换守卫、徽标、图标、关闭和 tabs-only 场景,并接入按需 Resolver 与独立样式入口。
12
+
13
+ - Add `C_FormModal`, a compact data-driven create/edit modal that reuses `C_Form` and `C_ActionBar`, accepts any structurally compatible headless CRUD editor without coupling the component package to a request library, and keeps fields, validation, loading and footer actions out of business templates.
14
+
15
+ ## 0.11.8
16
+
17
+ ### Patch Changes
18
+
19
+ - 修复 `C_Map` 在 Vite 深层按需加载、未整体预构建组件库时的 Leaflet CommonJS/ESM 互操作错误;组件同时兼容命名空间和 `default` 导出,并在 API 形态异常时返回明确错误。同步关闭 `C_VtableGantt` 在组件快速卸载或配置连续变化时的异步初始化竞态,避免向已经失效的容器创建实例。
20
+
3
21
  ## 0.11.7
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **基于 Naive UI 的 Vue 3 企业级组件库**
6
6
 
7
- 从 Robot Admin 中提炼的 51 个高质量业务组件,支持全量注册、按需导入(Tree-Shaking)和子路径独立导入。
7
+ 从 Robot Admin 中提炼的 53 个高质量业务组件,支持全量注册、按需导入(Tree-Shaking)和子路径独立导入。
8
8
 
9
9
  [![NPM Version](https://img.shields.io/npm/v/@robot-admin/naive-ui-components)](https://www.npmjs.com/package/@robot-admin/naive-ui-components)
10
10
  [![License](https://img.shields.io/npm/l/@robot-admin/naive-ui-components)](./LICENSE)
@@ -167,6 +167,40 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
167
167
  </template>
168
168
  ```
169
169
 
170
+ 新增/编辑场景推荐用 `C_FormModal` 直接消费 Headless CRUD 的结构化 `editor`。字段、校验和布局继续由 `C_Form` 配置驱动,页面不再重复编写 Modal、按钮、loading 和草稿状态;默认采用紧凑小尺寸表单和右下角带图标操作按钮,宽度、表单尺寸与动作文案仍可覆盖:
171
+
172
+ ```vue
173
+ <script setup lang="ts">
174
+ import { C_FormModal } from '@robot-admin/naive-ui-components/C_FormModal'
175
+ import type { FormModalEditor } from '@robot-admin/naive-ui-components/C_FormModal'
176
+ import {
177
+ defineFormConfig,
178
+ defineFormOptions,
179
+ } from '@robot-admin/naive-ui-components/C_Form'
180
+
181
+ interface UserForm {
182
+ name: string
183
+ }
184
+
185
+ defineProps<{ editor: FormModalEditor<UserForm> }>()
186
+
187
+ const fields = defineFormOptions<UserForm>([
188
+ { type: 'input', prop: 'name', label: '名称', required: true },
189
+ ])
190
+ const formConfig = defineFormConfig<UserForm>({ labelPlacement: 'top' })
191
+ </script>
192
+
193
+ <template>
194
+ <C_FormModal
195
+ :editor="editor"
196
+ :options="fields"
197
+ :config="formConfig"
198
+ />
199
+ </template>
200
+ ```
201
+
202
+ `editor` 采用结构类型,不要求组件库依赖某个请求库;任何提供 `visible/mode/model/title/loading/setModel/close/submit` 的 Headless 控制器都可接入。弹窗默认保留关闭按钮、遮罩关闭和 Esc 行为,也可按高风险表单显式关闭。
203
+
170
204
  远程表格推荐交给 `useTableQuery` 管理请求取消、竞态、分页和 loading;只需把 `bindings` 绑定给组件。`rowKey` 必须稳定且唯一,默认会检测缺失和重复键。
171
205
 
172
206
  ```vue
@@ -216,6 +250,65 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
216
250
  </template>
217
251
  ```
218
252
 
253
+ `C_Tabs` 是面向页面场景切换的统一数据驱动标签页,名称与全局 `C_*` 体系保持一致。默认使用紧凑
254
+ `small` 尺寸、延迟呈现面板并支持受控/非受控状态;只做筛选或视图切换时启用 `tabsOnly`,组件
255
+ 不会执行面板内容,避免隐藏内容产生渲染开销或副作用。常规场景只维护数组,复杂内容可以按需使用 `render`、`pane` 或
256
+ `pane-{key}` 插槽:
257
+
258
+ ```vue
259
+ <script setup lang="ts">
260
+ import { ref } from 'vue'
261
+ import { C_Tabs, defineTabs } from '@robot-admin/naive-ui-components/C_Tabs'
262
+
263
+ const activeView = ref('basic')
264
+ const views = defineTabs([
265
+ { key: 'basic', label: '基础表格', icon: 'mdi:table' },
266
+ { key: 'tree', label: '树形表格', icon: 'mdi:file-tree-outline' },
267
+ ])
268
+ </script>
269
+
270
+ <template>
271
+ <C_Tabs
272
+ v-model="activeView"
273
+ :items="views"
274
+ type="segment"
275
+ tabs-only
276
+ />
277
+ </template>
278
+ ```
279
+
280
+ | API | 说明 |
281
+ | ----------------------------- | ------------------------------------------------------------------------- |
282
+ | `items` | `key/label` 为必填,支持 `icon`、`badge`、禁用、关闭及 `renderTab/render` |
283
+ | `modelValue` / `defaultValue` | 同时支持受控和非受控状态 |
284
+ | `type` / `size` / `placement` | `line/card/bar/segment` 与常用尺寸、方向;默认 `line/small/top` |
285
+ | `tabsOnly` | 只呈现标签导航,适合表格场景和查询条件切换 |
286
+ | `beforeChange` | 支持同步或异步切换守卫;返回 `false` 或抛错均保留当前页 |
287
+ | 插槽 | `tab`、`pane` 和 `pane-{key}`,均提供当前 item 与 active 状态 |
288
+ | 事件 | `change`、`close`、`add` 及标准 `update:modelValue` |
289
+
290
+ 页面级和表格级按钮统一使用 `C_ActionBar`,无需再维护另一套 Toolbar。操作栏默认采用带图标的 `tiny` 紧凑按钮和 `6px` 间距;`add`、`refresh`、`export`、`columns`、`settings` 等语义 key 会自动补齐一致的文案、图标与按钮类型,自定义动作未传图标时使用中性操作图标。`show`、`disabled`、`loading` 可直接传布尔值、`Ref` 或 getter,异步操作默认防重复点击并自动展示 loading。`C_Table` 可在 `toolbar.actions` / `toolbar.rightActions` 中直接复用同一份动作配置,同时保留原有左右插槽;需要更大按钮时,通过 `actionBar.size` 或单个动作的 `size` 覆盖:
291
+
292
+ ```ts
293
+ import { defineActions } from '@robot-admin/naive-ui-components/C_ActionBar'
294
+ import { defineTableConfig } from '@robot-admin/naive-ui-components/C_Table'
295
+
296
+ const actions = defineActions([
297
+ { key: 'add', onClick: openCreate },
298
+ { key: 'refresh', disabled: () => loading.value, onClick: refresh },
299
+ { key: 'settings', group: 'right', onClick: openSettings },
300
+ ])
301
+
302
+ const config = defineTableConfig({
303
+ toolbar: {
304
+ actions,
305
+ actionBar: { size: 'small' }, // 可选;默认是 tiny
306
+ },
307
+ })
308
+ ```
309
+
310
+ `C_Table` 继续由当前 Naive UI 表格实现负责;需要 MachTable 时应由业务入口完整渲染 MachTable 及其原生配置,避免在两套列定义、事件和实例 API 之间做隐式转换。二者只共享 `C_ActionBar` 这类框架无关的页面动作模型,不互相污染。
311
+
219
312
  ### C_Map 推荐用法
220
313
 
221
314
  `C_Map` 统一以 `[纬度, 经度]` 接收中心点和标记坐标;切换高德地图时会在组件内部转换为其要求的 `[经度, 纬度]`,使用侧无需维护两套数据。非法标记会被隔离,组件只清理自己创建的 Marker,不会误删通过 `ready` 事件添加的业务图层。
@@ -248,14 +341,36 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
248
341
  </template>
249
342
  ```
250
343
 
251
- 组件实例提供 `getMap()`、`refresh()` 和 `fitToMarkers()`,适合标签页显示、容器尺寸变化和业务图层扩展。使用 `map-type="amap"` 时必须提供 `amap-key`;2021-12-02 之后申请的 Key 还必须按[高德官方安全密钥说明](https://lbs.amap.com/api/javascript-api-v2/guide/abc/jscode)配置 `:amap-security-config="{ serviceHost: '/_AMapService' }"`(生产推荐,由服务端代理保管安全密钥),或仅在开发环境传 `{ securityJsCode: '...' }`。安全配置会在 SDK 脚本加载前写入,并拒绝同页混用不同 Key。宿主应用还需在 CSP 的 `script-src` 中允许 `https://webapi.amap.com`,同时在高德控制台配置域名白名单和配额限制。
344
+ 组件实例提供 `getMap()`、`refresh()` 和 `fitToMarkers()`,适合标签页显示、容器尺寸变化和业务图层扩展。OpenStreetMap 模式会在组件内部兼容 Leaflet 的 ESM 命名空间和 CommonJS `default` 形态,宿主无需为正确性配置整包预构建。使用 `map-type="amap"` 时必须提供 `amap-key`;2021-12-02 之后申请的 Key 还必须按[高德官方安全密钥说明](https://lbs.amap.com/api/javascript-api-v2/guide/abc/jscode)配置 `:amap-security-config="{ serviceHost: '/_AMapService' }"`(生产推荐,由服务端代理保管安全密钥),或仅在开发环境传 `{ securityJsCode: '...' }`。安全配置会在 SDK 脚本加载前写入,并拒绝同页混用不同 Key。宿主应用还需在 CSP 的 `script-src` 中允许 `https://webapi.amap.com`,同时在高德控制台配置域名白名单和配额限制。
252
345
 
253
346
  `C_Date`、`C_Time`、`C_Menu`、`C_FormSearch` 均支持标准 `v-model`。组件可直接放在没有 `NMessageProvider` / `NDialogProvider` 的页面;如需统一提示、确认和文案,可在安装时传入 `feedback`、`locale`、`form` 与 `table.defaults`。
254
347
 
255
348
  ### C_Captcha 服务端校验
256
349
 
350
+ 验证码入口使用组件库内置 SVG 状态图标,不依赖操作系统 Emoji 或在线图标服务;默认、校验中、成功和失败状态均保持一致的尺寸与语义颜色。`C_Login` 会把验证入口放在提交按钮之前并显示明确操作文案,同时透传 `captcha-visible-change`,宿主可在拼图交互期间暂停高开销背景动画。品牌接入可在外层通过 `--cc-height`、`--cc-radius`、`--cc-color`、`--cc-icon-color`、`--cc-bg`、`--cc-bg-hover`、`--cc-border`、`--cc-border-hover` 和 `--cc-focus` 调整外观,无需穿透组件内部 DOM。
351
+
257
352
  默认本地模式仅证明浏览器内的拼图交互已经完成,不能作为登录、支付等敏感操作的安全凭证。生产场景应传入 `verifier`,并开启 `require-server-verification`;组件会处理超时、取消和竞态,只在独立的服务端/验证码提供商确认后发出 `success`。请求中的 `token`、`timestamp` 都由客户端生成,只能用于关联和日志,服务端绝不能把它们本身当作可信证明。
258
353
 
354
+ 需要国内网络可用且长期免费的方案时,可显式选择开源 MIT 的 ALTCHA 自托管模式。该模式仅在使用时懒加载,不增加默认拼图入口的首屏执行成本;组件会强制服务端校验,缺少 `challenge-url` 或 `verifier` 时失败关闭。应用后端必须签发新鲜的一次性挑战、验证 PoW payload、阻止重放并限流;密钥只存于服务端。
355
+
356
+ ```vue
357
+ <C_Captcha
358
+ provider="altcha"
359
+ challenge-url="/api/auth/captcha/challenge"
360
+ :verifier="
361
+ async ({ token, signal }) => {
362
+ const response = await fetch('/api/auth/captcha/verify', {
363
+ method: 'POST',
364
+ headers: { 'content-type': 'application/json' },
365
+ body: JSON.stringify({ payload: token }),
366
+ signal,
367
+ })
368
+ return response.json() // { valid: boolean, token: '服务端一次性登录令牌' }
369
+ }
370
+ "
371
+ />
372
+ ```
373
+
259
374
  ```vue
260
375
  <C_Captcha
261
376
  require-server-verification
@@ -277,36 +392,37 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
277
392
  />
278
393
  ```
279
394
 
280
- 开启 `require-server-verification` 后,成功响应必须包含服务端 token。该 token 应短期、一次性使用,并绑定当前会话或业务请求。`C_Login` 可通过 `captchaVerifier`、`requireCaptchaServerVerification` 和 `captchaVerificationTimeout` 透传同一安全策略,并在 `submit` 数据中通过 `captchaVerifiedBy` 标识验证来源。更多边界说明见 [SECURITY.md](./SECURITY.md)。
395
+ 开启 `require-server-verification` 后,成功响应必须包含服务端 token。该 token 应短期、一次性使用,并绑定当前会话或业务请求。`C_Login` 可通过 `captchaProvider`、`captchaChallengeUrl`、`captchaVerifier`、`requireCaptchaServerVerification` 和 `captchaVerificationTimeout` 透传同一安全策略,并在 `submit` 数据中通过 `captchaType` 与 `captchaVerifiedBy` 标识验证类型和来源。更多边界说明见 [SECURITY.md](./SECURITY.md)。
281
396
 
282
- ### 📋 组件清单(51 个)
397
+ ### 📋 组件清单(53 个)
283
398
 
284
399
  > 💡 所有组件均提供 **在线交互演示**,访问 [组件文档](https://www.tzagileteam.com/robot/components/preface) 可直接在页面中体验真实效果(通过 iframe 嵌入 Robot Admin 生产环境)。
285
400
 
286
401
  #### 基础组件
287
402
 
288
- | 组件 | 说明 | 外部依赖 |
289
- | ---------------- | ---------------- | --------------------------- |
290
- | `C_Icon` | Iconify 图标封装 | `@iconify/vue` |
291
- | `C_Code` | 代码高亮显示 | `highlight.js` |
292
- | `C_Barcode` | 条形码生成器 | `@chenfengyuan/vue-barcode` |
293
- | `C_Captcha` | 拼图验证码 | `vue3-puzzle-vcode` |
294
- | `C_Cascade` | 级联面板选择器 | - |
295
- | `C_Guide` | 新手引导 | `driver.js` |
296
- | `C_Progress` | 增强进度条 | - |
297
- | `C_Steps` | 步骤条 | - |
298
- | `C_ActionBar` | 操作按钮栏 | - |
299
- | `C_Theme` | 主题切换器 | - |
300
- | `C_Language` | 语言切换器 | - |
301
- | `C_Date` | 日期选择器增强 | - |
302
- | `C_City` | 省市区三级联动 | - |
303
- | `C_Breadcrumb` | 面包屑导航 | - |
304
- | `C_Menu` | 导航菜单 | - |
305
- | `C_TagsView` | 标签页导航 | - |
306
- | `C_GlobalSearch` | 全局搜索面板 | - |
307
- | `C_AvatarGroup` | 头像组合展示 | - |
308
- | `C_OrgChart` | 组织架构图 | - |
309
- | `C_Skeleton` | 骨架屏占位组件 | - |
403
+ | 组件 | 说明 | 外部依赖 |
404
+ | ---------------- | ----------------------- | ----------------------------- |
405
+ | `C_Icon` | Iconify 图标封装 | `@iconify/vue` |
406
+ | `C_Code` | 代码高亮显示 | `highlight.js` |
407
+ | `C_Barcode` | 条形码生成器 | `@chenfengyuan/vue-barcode` |
408
+ | `C_Captcha` | 拼图/ALTCHA 人机验证 | `vue3-puzzle-vcode`、`altcha` |
409
+ | `C_Cascade` | 级联面板选择器 | - |
410
+ | `C_Guide` | 新手引导 | `driver.js` |
411
+ | `C_Progress` | 增强进度条 | - |
412
+ | `C_Steps` | 步骤条 | - |
413
+ | `C_ActionBar` | 操作按钮栏 | - |
414
+ | `C_Theme` | 主题切换器 | - |
415
+ | `C_Language` | 语言切换器 | - |
416
+ | `C_Date` | 日期选择器增强 | - |
417
+ | `C_City` | 省市区三级联动 | - |
418
+ | `C_Breadcrumb` | 面包屑导航 | - |
419
+ | `C_Menu` | 导航菜单 | - |
420
+ | `C_Tabs` | 数据驱动标签页/场景切换 | - |
421
+ | `C_TagsView` | 标签页导航 | - |
422
+ | `C_GlobalSearch` | 全局搜索面板 | - |
423
+ | `C_AvatarGroup` | 头像组合展示 | - |
424
+ | `C_OrgChart` | 组织架构图 | - |
425
+ | `C_Skeleton` | 骨架屏占位组件 | - |
310
426
 
311
427
  #### 内容 & 编辑组件
312
428
 
@@ -339,6 +455,7 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
339
455
  | 组件 | 说明 | 外部依赖 |
340
456
  | ----------------- | ------------------------------------------------- | -------------------- |
341
457
  | `C_Form` | 动态表单引擎(Grid/Tabs/Steps/Card/Dynamic 布局) | - |
458
+ | `C_FormModal` | 数据驱动的新增/编辑表单弹窗 | - |
342
459
  | `C_FormSearch` | 搜索表单 | - |
343
460
  | `C_CollapsePanel` | 折叠面板 | - |
344
461
  | `C_SplitPane` | 分割面板 | - |
@@ -380,7 +497,7 @@ bun add vue naive-ui
380
497
 
381
498
  ```
382
499
  bun run build
383
- ├── 1. tsdown → 多入口打包(51 组件 ESM/CJS/DTS)
500
+ ├── 1. tsdown → 多入口打包(53 组件 ESM/CJS/DTS)
384
501
  ├── 2. sass CLI → 编译共享变量入口 → global-scss.css
385
502
  ├── 3. merge-css.js → 合并 Vue 编译后的 SFC CSS + 全局变量 → style.css
386
503
  ├── 4. gen-exports.js → 自动生成 package.json exports 映射
@@ -390,7 +507,7 @@ bun run build
390
507
 
391
508
  #### 技术要点
392
509
 
393
- - **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),51 个独立入口并行编译
510
+ - **构建引擎**:[tsdown](https://github.com/rolldown/tsdown)(基于 Rolldown),53 个独立入口并行编译
394
511
  - **SCSS 处理**:自定义 `scssTransformPlugin` 在 Rolldown 管线内编译 SFC SCSS,独立 Sass CLI 仅编译共享变量入口
395
512
  - **CSS 合并**:构建后将 Vue 已完成 scoped 转换的 per-chunk CSS 与共享变量合并为单一 `style.css`,避免重复样式和原始 `:deep()` 选择器泄漏
396
513
  - **类型导出**:统一 `export *` barrel 模式,自动生成完整 `.d.ts`
@@ -405,7 +522,7 @@ bun run build
405
522
  ```
406
523
  dist/
407
524
  ├── index.js / index.cjs / index.d.ts # 主入口
408
- ├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(51 组件)
525
+ ├── C_Form.js / C_Form.cjs / C_Form.d.ts # 子路径入口(53 组件)
409
526
  ├── C_Form.base.css / C_Form.full.css # 基础/完整样式层级
410
527
  ├── C_Table.base.css / C_Table.full.css # 基础/完整样式层级
411
528
  ├── style.css # 合并后的全量样式
package/README_EN.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Enterprise-grade Vue 3 component library built on Naive UI**
6
6
 
7
- 51 production-ready business components extracted from Robot Admin, supporting global registration, on-demand imports (Tree-Shaking), and subpath imports.
7
+ 53 production-ready business components extracted from Robot Admin, supporting global registration, on-demand imports (Tree-Shaking), and subpath imports.
8
8
 
9
9
  [![NPM Version](https://img.shields.io/npm/v/@robot-admin/naive-ui-components)](https://www.npmjs.com/package/@robot-admin/naive-ui-components)
10
10
  [![License](https://img.shields.io/npm/l/@robot-admin/naive-ui-components)](./LICENSE)
@@ -135,6 +135,40 @@ const { model, formRef, bindings } = useCForm({
135
135
  })
136
136
  ```
137
137
 
138
+ For create/edit flows, `C_FormModal` consumes a structural headless `editor` directly. Fields, validation, and layout remain data-driven by `C_Form`, while pages no longer own duplicate modal, draft, or loading state:
139
+
140
+ ```vue
141
+ <script setup lang="ts">
142
+ import { C_FormModal } from '@robot-admin/naive-ui-components/C_FormModal'
143
+ import type { FormModalEditor } from '@robot-admin/naive-ui-components/C_FormModal'
144
+ import {
145
+ defineFormConfig,
146
+ defineFormOptions,
147
+ } from '@robot-admin/naive-ui-components/C_Form'
148
+
149
+ interface UserForm {
150
+ name: string
151
+ }
152
+
153
+ defineProps<{ editor: FormModalEditor<UserForm> }>()
154
+
155
+ const fields = defineFormOptions<UserForm>([
156
+ { type: 'input', prop: 'name', label: 'Name', required: true },
157
+ ])
158
+ const formConfig = defineFormConfig<UserForm>({ labelPlacement: 'top' })
159
+ </script>
160
+
161
+ <template>
162
+ <C_FormModal
163
+ :editor="editor"
164
+ :options="fields"
165
+ :config="formConfig"
166
+ />
167
+ </template>
168
+ ```
169
+
170
+ The editor contract is structural: the component package does not depend on a request library. Any controller exposing `visible/mode/model/title/loading/setModel/close/submit` can drive it. The default uses a responsive 620px width, `small` form controls, and a right-aligned icon-based `C_ActionBar` for a compact admin workflow. Close button, mask close, and Escape remain enabled by default and can be disabled for high-risk forms.
171
+
138
172
  For remote tables, `useTableQuery` owns cancellation, latest-request-wins behavior, pagination, and loading. Destructure its `bindings` and use `<C_Table v-bind="bindings" />`:
139
173
 
140
174
  ```ts
@@ -157,6 +191,65 @@ const { bindings } = useTableQuery<UserRow, { keyword: string }>({
157
191
  })
158
192
  ```
159
193
 
194
+ `C_Tabs` is the data-driven page-scenario switcher for the global `C_*` system. It defaults to the compact
195
+ `small` size, lazy pane display, and supports controlled or uncontrolled state. Set `tabsOnly` for filters or
196
+ view switching; pane content is not executed, avoiding hidden render work and side effects. Most pages only maintain an item array; complex
197
+ content can opt into `render`, `pane`, or `pane-{key}` slots:
198
+
199
+ ```vue
200
+ <script setup lang="ts">
201
+ import { ref } from 'vue'
202
+ import { C_Tabs, defineTabs } from '@robot-admin/naive-ui-components/C_Tabs'
203
+
204
+ const activeView = ref('basic')
205
+ const views = defineTabs([
206
+ { key: 'basic', label: 'Basic table', icon: 'mdi:table' },
207
+ { key: 'tree', label: 'Tree table', icon: 'mdi:file-tree-outline' },
208
+ ])
209
+ </script>
210
+
211
+ <template>
212
+ <C_Tabs
213
+ v-model="activeView"
214
+ :items="views"
215
+ type="segment"
216
+ tabs-only
217
+ />
218
+ </template>
219
+ ```
220
+
221
+ | API | Description |
222
+ | ----------------------------- | --------------------------------------------------------------------------------------------- |
223
+ | `items` | Requires `key/label`; supports icons, badges, disabled/closable state, and `renderTab/render` |
224
+ | `modelValue` / `defaultValue` | Controlled and uncontrolled state |
225
+ | `type` / `size` / `placement` | `line/card/bar/segment`, common sizes and placements; defaults to `line/small/top` |
226
+ | `tabsOnly` | Renders navigation only for table scenarios and query switches |
227
+ | `beforeChange` | Sync/async guard; `false` or an error keeps the current tab |
228
+ | Slots | `tab`, `pane`, and `pane-{key}`, each with item and active state |
229
+ | Events | `change`, `close`, `add`, and standard `update:modelValue` |
230
+
231
+ Use `C_ActionBar` as the single page/table action model instead of maintaining another toolbar abstraction. It defaults to compact `tiny` buttons with icons and a `6px` gap. Semantic keys such as `add`, `refresh`, `export`, `columns`, and `settings` supply consistent labels, icons, and button types; custom actions receive a neutral icon when none is provided. `show`, `disabled`, and `loading` accept booleans, refs, or getters; async handlers are guarded against duplicate clicks and receive automatic loading feedback. `C_Table` consumes the same actions through `toolbar.actions` / `toolbar.rightActions` while preserving its existing toolbar slots. Override `actionBar.size` or an individual action's `size` when a larger control is required:
232
+
233
+ ```ts
234
+ import { defineActions } from '@robot-admin/naive-ui-components/C_ActionBar'
235
+ import { defineTableConfig } from '@robot-admin/naive-ui-components/C_Table'
236
+
237
+ const actions = defineActions([
238
+ { key: 'add', onClick: openCreate },
239
+ { key: 'refresh', disabled: () => loading.value, onClick: refresh },
240
+ { key: 'settings', group: 'right', onClick: openSettings },
241
+ ])
242
+
243
+ const config = defineTableConfig({
244
+ toolbar: {
245
+ actions,
246
+ actionBar: { size: 'small' }, // optional; tiny by default
247
+ },
248
+ })
249
+ ```
250
+
251
+ `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`.
252
+
160
253
  ### Recommended C_Map setup
161
254
 
162
255
  `C_Map` consistently accepts `[latitude, longitude]` for centers and markers. It converts coordinates to AMap's `[longitude, latitude]` order internally, filters invalid markers, and only removes markers owned by the component.
@@ -189,14 +282,36 @@ const { bindings } = useTableQuery<UserRow, { keyword: string }>({
189
282
  </template>
190
283
  ```
191
284
 
192
- The exposed instance provides `getMap()`, `refresh()`, and `fitToMarkers()` for tab visibility changes, container resizes, and custom business layers. `map-type="amap"` requires `amap-key`; keys created after 2021-12-02 also require `:amap-security-config="{ serviceHost: '/_AMapService' }"` (recommended in production so the server proxy retains the security secret), or `{ securityJsCode: '...' }` for development only, as described by the [official AMap security guidance](https://lbs.amap.com/api/javascript-api-v2/guide/abc/jscode). The config is installed before the SDK script and conflicting keys on one page are rejected. The host CSP must also allow `https://webapi.amap.com` in `script-src`, with domain allowlists and quotas enforced in the AMap console.
285
+ The exposed instance provides `getMap()`, `refresh()`, and `fitToMarkers()` for tab visibility changes, container resizes, and custom business layers. OpenStreetMap mode normalizes both the Leaflet ESM namespace and CommonJS `default` shape internally, so hosts do not need whole-package prebundling for correctness. `map-type="amap"` requires `amap-key`; keys created after 2021-12-02 also require `:amap-security-config="{ serviceHost: '/_AMapService' }"` (recommended in production so the server proxy retains the security secret), or `{ securityJsCode: '...' }` for development only, as described by the [official AMap security guidance](https://lbs.amap.com/api/javascript-api-v2/guide/abc/jscode). The config is installed before the SDK script and conflicting keys on one page are rejected. The host CSP must also allow `https://webapi.amap.com` in `script-src`, with domain allowlists and quotas enforced in the AMap console.
193
286
 
194
287
  `C_Date`, `C_Time`, `C_Menu`, and `C_FormSearch` support standard `v-model`. Message/dialog providers are optional; application-wide feedback, locale, form defaults, and `table.defaults` can be supplied through plugin options.
195
288
 
196
289
  ### C_Captcha Server Verification
197
290
 
291
+ The captcha trigger uses package-owned SVG status icons and does not depend on platform emoji or an online icon service. Idle, verifying, success, and error states keep consistent sizing and semantic colors. `C_Login` places the verification action before submit, keeps the action label explicit, and forwards `captcha-visible-change` so hosts can pause expensive background animation during puzzle interaction. Brand styling can be adjusted from the host with `--cc-height`, `--cc-radius`, `--cc-color`, `--cc-icon-color`, `--cc-bg`, `--cc-bg-hover`, `--cc-border`, `--cc-border-hover`, and `--cc-focus`, without reaching into internal DOM.
292
+
198
293
  The default local mode only proves that the browser-side puzzle interaction completed. It is not a security credential for login, payment, or other sensitive actions. In production, provide a `verifier` and enable `require-server-verification`. Timeout, cancellation, and stale attempts are handled by the component, and `success` is emitted only after approval by an independent server/provider challenge. Request `token` and `timestamp` values are client-generated telemetry and must never be trusted as proof by the server.
199
294
 
295
+ For a permanently free, network-independent option, explicitly select the open-source MIT ALTCHA self-hosted provider. It is lazy-loaded only when selected, so the default puzzle path keeps its startup cost. ALTCHA mode always fails closed through server verification: the application server must issue fresh single-use challenges, verify the PoW payload, prevent replay, and rate-limit attempts while retaining all secrets server-side.
296
+
297
+ ```vue
298
+ <C_Captcha
299
+ provider="altcha"
300
+ challenge-url="/api/auth/captcha/challenge"
301
+ :verifier="
302
+ async ({ token, signal }) => {
303
+ const response = await fetch('/api/auth/captcha/verify', {
304
+ method: 'POST',
305
+ headers: { 'content-type': 'application/json' },
306
+ body: JSON.stringify({ payload: token }),
307
+ signal,
308
+ })
309
+ return response.json() // { valid: boolean, token: 'single-use-server-token' }
310
+ }
311
+ "
312
+ />
313
+ ```
314
+
200
315
  ```vue
201
316
  <C_Captcha
202
317
  require-server-verification
@@ -218,36 +333,37 @@ The default local mode only proves that the browser-side puzzle interaction comp
218
333
  />
219
334
  ```
220
335
 
221
- With `require-server-verification`, a successful response must include a server token. Server tokens should be short-lived, single-use, and bound to the current session or operation. `C_Login` forwards the same policy through `captchaVerifier`, `requireCaptchaServerVerification`, and `captchaVerificationTimeout`, and its `submit` payload identifies the result through `captchaVerifiedBy`. See [SECURITY.md](./SECURITY.md) for trust-boundary details.
336
+ With `require-server-verification`, a successful response must include a server token. Server tokens should be short-lived, single-use, and bound to the current session or operation. `C_Login` forwards the same policy through `captchaProvider`, `captchaChallengeUrl`, `captchaVerifier`, `requireCaptchaServerVerification`, and `captchaVerificationTimeout`; its `submit` payload identifies the result through `captchaType` and `captchaVerifiedBy`. See [SECURITY.md](./SECURITY.md) for trust-boundary details.
222
337
 
223
- ### 📋 Component List (51 Components)
338
+ ### 📋 Component List (53 Components)
224
339
 
225
340
  > 💡 All components provide **interactive live demos**. Visit the [Component Docs](https://www.tzagileteam.com/robot/components/preface) to try them out in real-time (rendered via iframe from Robot Admin production).
226
341
 
227
342
  #### Basic Components
228
343
 
229
- | Component | Description | External Deps |
230
- | ---------------- | ------------------------ | --------------------------- |
231
- | `C_Icon` | Iconify icon wrapper | `@iconify/vue` |
232
- | `C_Code` | Code highlighting | `highlight.js` |
233
- | `C_Barcode` | Barcode generator | `@chenfengyuan/vue-barcode` |
234
- | `C_Captcha` | Puzzle captcha | `vue3-puzzle-vcode` |
235
- | `C_Cascade` | Cascade panel selector | - |
236
- | `C_Guide` | User guide / tour | `driver.js` |
237
- | `C_Progress` | Enhanced progress bar | - |
238
- | `C_Steps` | Step bar | - |
239
- | `C_ActionBar` | Action button bar | - |
240
- | `C_Theme` | Theme switcher | - |
241
- | `C_Language` | Language switcher | - |
242
- | `C_Date` | Enhanced date picker | - |
243
- | `C_City` | Province / city selector | - |
244
- | `C_Breadcrumb` | Breadcrumb navigation | - |
245
- | `C_Menu` | Navigation menu | - |
246
- | `C_TagsView` | Tab-based navigation | - |
247
- | `C_GlobalSearch` | Global search panel | - |
248
- | `C_AvatarGroup` | Avatar group display | - |
249
- | `C_OrgChart` | Organization chart | - |
250
- | `C_Skeleton` | Skeleton placeholder | - |
344
+ | Component | Description | External Deps |
345
+ | ---------------- | ------------------------- | ----------------------------- |
346
+ | `C_Icon` | Iconify icon wrapper | `@iconify/vue` |
347
+ | `C_Code` | Code highlighting | `highlight.js` |
348
+ | `C_Barcode` | Barcode generator | `@chenfengyuan/vue-barcode` |
349
+ | `C_Captcha` | Puzzle / ALTCHA captcha | `vue3-puzzle-vcode`, `altcha` |
350
+ | `C_Cascade` | Cascade panel selector | - |
351
+ | `C_Guide` | User guide / tour | `driver.js` |
352
+ | `C_Progress` | Enhanced progress bar | - |
353
+ | `C_Steps` | Step bar | - |
354
+ | `C_ActionBar` | Action button bar | - |
355
+ | `C_Theme` | Theme switcher | - |
356
+ | `C_Language` | Language switcher | - |
357
+ | `C_Date` | Enhanced date picker | - |
358
+ | `C_City` | Province / city selector | - |
359
+ | `C_Breadcrumb` | Breadcrumb navigation | - |
360
+ | `C_Menu` | Navigation menu | - |
361
+ | `C_Tabs` | Data-driven scenario tabs | - |
362
+ | `C_TagsView` | Tab-based navigation | - |
363
+ | `C_GlobalSearch` | Global search panel | - |
364
+ | `C_AvatarGroup` | Avatar group display | - |
365
+ | `C_OrgChart` | Organization chart | - |
366
+ | `C_Skeleton` | Skeleton placeholder | - |
251
367
 
252
368
  #### Content & Editor Components
253
369
 
@@ -280,6 +396,7 @@ With `require-server-verification`, a successful response must include a server
280
396
  | Component | Description | External Deps |
281
397
  | ----------------- | ------------------------------------------------- | -------------------- |
282
398
  | `C_Form` | Dynamic form engine (Grid/Tabs/Steps/Card layout) | - |
399
+ | `C_FormModal` | Data-driven create/edit form modal | - |
283
400
  | `C_FormSearch` | Search form | - |
284
401
  | `C_CollapsePanel` | Collapse panel | - |
285
402
  | `C_SplitPane` | Split pane | - |
@@ -321,7 +438,7 @@ Install optional peers per feature: `vue-router` for `C_Breadcrumb`/`C_TagsView`
321
438
 
322
439
  ```
323
440
  bun run build
324
- ├── 1. tsdown → Multi-entry bundling (51 components ESM/CJS/DTS)
441
+ ├── 1. tsdown → Multi-entry bundling (53 components ESM/CJS/DTS)
325
442
  ├── 2. sass CLI → Compile the shared-variable entry → global-scss.css
326
443
  ├── 3. merge-css.js → Merge Vue-compiled SFC CSS + global variables → style.css
327
444
  ├── 4. gen-exports.js → Auto-generate package.json exports map
@@ -331,7 +448,7 @@ bun run build
331
448
 
332
449
  #### Key Technical Details
333
450
 
334
- - **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based), 51 independent entries compiled in parallel
451
+ - **Build engine**: [tsdown](https://github.com/rolldown/tsdown) (Rolldown-based), 53 independent entries compiled in parallel
335
452
  - **SCSS processing**: Custom `scssTransformPlugin` compiles SFC SCSS within the Rolldown pipeline; standalone Sass CLI only compiles the shared-variable entry
336
453
  - **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
337
454
  - **Type exports**: Unified `export *` barrel pattern with auto-generated `.d.ts`
@@ -346,7 +463,7 @@ bun run build
346
463
  ```
347
464
  dist/
348
465
  ├── index.js / index.cjs / index.d.ts # Main entry
349
- ├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (51 components)
466
+ ├── C_Form.js / C_Form.cjs / C_Form.d.ts # Subpath entries (53 components)
350
467
  ├── C_Form.base.css / C_Form.full.css # Base/full style tiers
351
468
  ├── C_Table.base.css / C_Table.full.css # Base/full style tiers
352
469
  ├── style.css # Merged full styles
package/SECURITY.md CHANGED
@@ -11,6 +11,7 @@ Please use GitHub's private security-advisory flow for the repository. Include t
11
11
  ## Trust boundaries
12
12
 
13
13
  - `C_Captcha` local mode is a UI interaction check, not authentication. Its client token and timestamp are untrusted telemetry. Sensitive flows must configure `verifier` with `requireServerVerification`, validate an independent server/provider-issued challenge, and return a short-lived, single-use token bound to the session or operation. Fail-closed mode rejects successful responses that omit this token.
14
+ - `C_Captcha` ALTCHA mode is self-hosted and forces server verification. The application server must sign fresh challenges, validate payloads with a server-only secret, enforce expiration and single use, bind the returned token to the session or operation, and apply rate limits. The browser must never receive the HMAC secret.
14
15
  - Rich HTML is sanitized by the library, but applications must still apply server-side validation, output encoding, CSP, and authorization. Client-side sanitization is not an authorization boundary.
15
16
  - Formula evaluation uses a bounded parser and does not execute arbitrary JavaScript. Do not replace it with `eval` or `Function` for untrusted input.
16
17
  - Upload type, size, hashing, and chunk checks improve UX and integrity but do not replace server-side content validation, malware scanning, quotas, or access control.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`);const e=require(`./C_ActionBar2.cjs`);exports.C_ActionBar=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`);const e=require(`./C_ActionBar2.cjs`);exports.ACTION_BAR_DEFAULT_CONFIG=e.n,exports.ACTION_PRESETS=e.r,exports.C_ActionBar=e.t,exports.DEFAULT_ACTION_ICON=e.i,exports.defineActions=e.a,exports.resolveActionPreset=e.o;