@icen.ai/ui 0.10.0 → 0.11.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 (362) hide show
  1. package/AGENTS.md +79 -309
  2. package/LICENSE +21 -0
  3. package/README.md +43 -54
  4. package/dist/base.css +68 -22
  5. package/dist/behaviors/accordion.mjs +1 -1
  6. package/dist/behaviors/ai-branch.mjs +14 -0
  7. package/dist/behaviors/ai-chat.d.mts +2 -2
  8. package/dist/behaviors/ai-chat.mjs +66 -10
  9. package/dist/behaviors/ai-composer.d.mts +5 -5
  10. package/dist/behaviors/ai-composer.mjs +34 -10
  11. package/dist/behaviors/ai-core.mjs +14 -0
  12. package/dist/behaviors/ai-diff.mjs +14 -0
  13. package/dist/behaviors/ai-feedback.mjs +14 -0
  14. package/dist/behaviors/ai-panel.d.mts +2 -2
  15. package/dist/behaviors/ai-panel.mjs +14 -0
  16. package/dist/behaviors/ai-provider.d.mts +1 -1
  17. package/dist/behaviors/ai-provider.mjs +14 -0
  18. package/dist/behaviors/ai-threads.mjs +14 -0
  19. package/dist/behaviors/ai-tool.d.mts +1 -1
  20. package/dist/behaviors/ai-tool.mjs +299 -24
  21. package/dist/behaviors/ai-tools.mjs +1179 -28
  22. package/dist/behaviors/autocomplete.d.mts +1 -1
  23. package/dist/behaviors/autocomplete.mjs +14 -0
  24. package/dist/behaviors/back-top.mjs +14 -0
  25. package/dist/behaviors/carousel.mjs +21 -1
  26. package/dist/behaviors/cascader.mjs +27 -0
  27. package/dist/behaviors/charts.d.mts +12 -1
  28. package/dist/behaviors/charts.mjs +298 -20
  29. package/dist/behaviors/code-block.mjs +22 -1
  30. package/dist/behaviors/command-palette.mjs +3 -3
  31. package/dist/behaviors/context-menu.d.mts +2 -2
  32. package/dist/behaviors/context-menu.mjs +14 -0
  33. package/dist/behaviors/controls.d.mts +8 -8
  34. package/dist/behaviors/controls.mjs +50 -6
  35. package/dist/behaviors/copy.mjs +14 -0
  36. package/dist/behaviors/datatable.d.mts +3 -3
  37. package/dist/behaviors/datatable.mjs +89 -11
  38. package/dist/behaviors/date-picker.mjs +14 -0
  39. package/dist/behaviors/events.d.mts +10 -10
  40. package/dist/behaviors/events.mjs +11 -1
  41. package/dist/behaviors/form-validate.d.mts +10 -1
  42. package/dist/behaviors/form-validate.mjs +279 -4611
  43. package/dist/behaviors/i18n.d.mts +14 -0
  44. package/dist/behaviors/i18n.mjs +28 -0
  45. package/dist/behaviors/input.mjs +16 -0
  46. package/dist/behaviors/kb-access.d.mts +2 -2
  47. package/dist/behaviors/kb-access.mjs +21 -2
  48. package/dist/behaviors/kb-acl.d.mts +2 -2
  49. package/dist/behaviors/kb-acl.mjs +14 -0
  50. package/dist/behaviors/kb-answer.d.mts +2 -2
  51. package/dist/behaviors/kb-answer.mjs +298 -23
  52. package/dist/behaviors/kb-audit.d.mts +2 -2
  53. package/dist/behaviors/kb-audit.mjs +14 -0
  54. package/dist/behaviors/kb-canvas.d.mts +3 -3
  55. package/dist/behaviors/kb-canvas.mjs +14 -0
  56. package/dist/behaviors/kb-chain.d.mts +2 -2
  57. package/dist/behaviors/kb-chain.mjs +14 -0
  58. package/dist/behaviors/kb-checkpoint.d.mts +2 -2
  59. package/dist/behaviors/kb-checkpoint.mjs +14 -0
  60. package/dist/behaviors/kb-chunks.d.mts +2 -2
  61. package/dist/behaviors/kb-chunks.mjs +14 -0
  62. package/dist/behaviors/kb-citation.d.mts +2 -2
  63. package/dist/behaviors/kb-citation.mjs +33 -6
  64. package/dist/behaviors/kb-clarify.d.mts +2 -2
  65. package/dist/behaviors/kb-clarify.mjs +14 -0
  66. package/dist/behaviors/kb-conflict.d.mts +2 -2
  67. package/dist/behaviors/kb-conflict.mjs +14 -0
  68. package/dist/behaviors/kb-connector.d.mts +2 -2
  69. package/dist/behaviors/kb-connector.mjs +14 -0
  70. package/dist/behaviors/kb-core.d.mts +1 -1
  71. package/dist/behaviors/kb-core.mjs +14 -0
  72. package/dist/behaviors/kb-eval.d.mts +2 -2
  73. package/dist/behaviors/kb-eval.mjs +21 -2
  74. package/dist/behaviors/kb-explain.d.mts +2 -2
  75. package/dist/behaviors/kb-explain.mjs +26 -2
  76. package/dist/behaviors/kb-filter.d.mts +2 -2
  77. package/dist/behaviors/kb-filter.mjs +21 -2
  78. package/dist/behaviors/kb-gap.d.mts +2 -2
  79. package/dist/behaviors/kb-gap.mjs +14 -0
  80. package/dist/behaviors/kb-hittest.d.mts +2 -2
  81. package/dist/behaviors/kb-hittest.mjs +15 -1
  82. package/dist/behaviors/kb-metadata.mjs +19 -0
  83. package/dist/behaviors/kb-passage.d.mts +2 -2
  84. package/dist/behaviors/kb-passage.mjs +14 -0
  85. package/dist/behaviors/kb-pipeline.d.mts +2 -2
  86. package/dist/behaviors/kb-pipeline.mjs +14 -0
  87. package/dist/behaviors/kb-qa.mjs +14 -0
  88. package/dist/behaviors/kb-rerank.d.mts +2 -2
  89. package/dist/behaviors/kb-rerank.mjs +14 -0
  90. package/dist/behaviors/kb-retrieval.d.mts +2 -2
  91. package/dist/behaviors/kb-retrieval.mjs +31 -4
  92. package/dist/behaviors/kb-review.d.mts +2 -2
  93. package/dist/behaviors/kb-review.mjs +21 -2
  94. package/dist/behaviors/kb-sandbox.d.mts +2 -2
  95. package/dist/behaviors/kb-sandbox.mjs +20 -1
  96. package/dist/behaviors/kb-segment.d.mts +2 -2
  97. package/dist/behaviors/kb-segment.mjs +15 -1
  98. package/dist/behaviors/kb-select.mjs +21 -2
  99. package/dist/behaviors/kb-sources.d.mts +2 -2
  100. package/dist/behaviors/kb-sources.mjs +14 -0
  101. package/dist/behaviors/kb-sql.d.mts +2 -2
  102. package/dist/behaviors/kb-sql.mjs +14 -0
  103. package/dist/behaviors/kb-trace.d.mts +2 -2
  104. package/dist/behaviors/kb-trace.mjs +22 -3
  105. package/dist/behaviors/kb-visibility.d.mts +2 -2
  106. package/dist/behaviors/kb-visibility.mjs +14 -0
  107. package/dist/behaviors/kb-who-can.d.mts +2 -2
  108. package/dist/behaviors/kb-who-can.mjs +21 -2
  109. package/dist/behaviors/mentions.d.mts +1 -1
  110. package/dist/behaviors/mentions.mjs +14 -0
  111. package/dist/behaviors/modal.d.mts +1 -1
  112. package/dist/behaviors/modal.mjs +14 -0
  113. package/dist/behaviors/motion.d.mts +16 -0
  114. package/dist/behaviors/motion.mjs +39 -0
  115. package/dist/behaviors/notification.d.mts +2 -2
  116. package/dist/behaviors/notification.mjs +27 -3
  117. package/dist/behaviors/panel.mjs +14 -0
  118. package/dist/behaviors/scroll-area.d.mts +17 -0
  119. package/dist/behaviors/scroll-area.mjs +59 -0
  120. package/dist/behaviors/select.mjs +21 -2
  121. package/dist/behaviors/slider.mjs +3 -3
  122. package/dist/behaviors/split-pane.mjs +2 -0
  123. package/dist/behaviors/suggestions.mjs +14 -0
  124. package/dist/behaviors/tabs.mjs +10 -0
  125. package/dist/behaviors/tag-input.mjs +14 -0
  126. package/dist/behaviors/theme-switcher.d.mts +2 -2
  127. package/dist/behaviors/theme-switcher.mjs +30 -2
  128. package/dist/behaviors/theme.mjs +16 -2
  129. package/dist/behaviors/toast.d.mts +2 -2
  130. package/dist/behaviors/toast.mjs +14 -0
  131. package/dist/behaviors/tree-select.mjs +27 -0
  132. package/dist/behaviors/tree.mjs +4 -4
  133. package/dist/behaviors/upload.mjs +14 -0
  134. package/dist/behaviors/url-safety.d.mts +8 -0
  135. package/dist/behaviors/url-safety.mjs +11 -0
  136. package/dist/components/accordion.d.mts +2 -0
  137. package/dist/components/ai-branch.d.mts +2 -0
  138. package/dist/components/ai-chat.css +40 -33
  139. package/dist/components/ai-chat.d.mts +2 -0
  140. package/dist/components/ai-composer.d.mts +2 -0
  141. package/dist/components/ai-context.d.mts +2 -0
  142. package/dist/components/ai-context.mjs +1 -0
  143. package/dist/components/ai-diff.css +6 -6
  144. package/dist/components/ai-diff.d.mts +2 -0
  145. package/dist/components/ai-feedback.d.mts +2 -0
  146. package/dist/components/ai-files.d.mts +2 -0
  147. package/dist/components/ai-message.d.mts +2 -0
  148. package/dist/components/ai-panel.css +12 -10
  149. package/dist/components/ai-reasoning.d.mts +2 -0
  150. package/dist/components/ai-subagent.d.mts +2 -0
  151. package/dist/components/ai-subagent.mjs +1 -0
  152. package/dist/components/ai-threads.d.mts +2 -0
  153. package/dist/components/ai-todo.d.mts +2 -0
  154. package/dist/components/ai-todo.mjs +1 -0
  155. package/dist/components/ai-tool-call.d.mts +2 -0
  156. package/dist/components/ai-tool-call.mjs +1 -0
  157. package/dist/components/ai-tool.css +16 -16
  158. package/dist/components/ai-usage.d.mts +2 -0
  159. package/dist/components/alert.d.mts +2 -0
  160. package/dist/components/autocomplete.css +12 -12
  161. package/dist/components/autocomplete.d.mts +2 -0
  162. package/dist/components/avatar.d.mts +2 -0
  163. package/dist/components/back-top.css +47 -16
  164. package/dist/components/back-top.d.mts +2 -0
  165. package/dist/components/badge.css +1 -1
  166. package/dist/components/badge.d.mts +2 -0
  167. package/dist/components/breadcrumb.css +26 -8
  168. package/dist/components/breadcrumb.d.mts +2 -0
  169. package/dist/components/btn.css +67 -62
  170. package/dist/components/btn.d.mts +2 -0
  171. package/dist/components/card.css +22 -22
  172. package/dist/components/card.d.mts +2 -0
  173. package/dist/components/carousel.d.mts +2 -0
  174. package/dist/components/cascader.css +56 -35
  175. package/dist/components/cascader.d.mts +2 -0
  176. package/dist/components/chart-area.css +46 -0
  177. package/dist/components/chart-area.d.mts +2 -0
  178. package/dist/components/chart-bar.css +66 -19
  179. package/dist/components/chart-bar.d.mts +2 -0
  180. package/dist/components/chart-calendar.d.mts +2 -0
  181. package/dist/components/chart-gauge.css +23 -3
  182. package/dist/components/chart-gauge.d.mts +2 -0
  183. package/dist/components/chart-graph.css +15 -3
  184. package/dist/components/chart-graph.d.mts +2 -0
  185. package/dist/components/chart-heatmap.css +117 -95
  186. package/dist/components/chart-heatmap.d.mts +2 -0
  187. package/dist/components/chart-line.css +54 -0
  188. package/dist/components/chart-line.d.mts +2 -0
  189. package/dist/components/chart-map.d.mts +2 -0
  190. package/dist/components/chart-pie.css +29 -0
  191. package/dist/components/chart-pie.d.mts +2 -0
  192. package/dist/components/chart-radar.css +50 -1
  193. package/dist/components/chart-radar.d.mts +2 -0
  194. package/dist/components/chart-scatter.css +39 -2
  195. package/dist/components/chart-scatter.d.mts +2 -0
  196. package/dist/components/chart-sparkline.css +20 -0
  197. package/dist/components/chart-sparkline.d.mts +2 -0
  198. package/dist/components/chart-stack.css +16 -5
  199. package/dist/components/chart-stack.d.mts +2 -0
  200. package/dist/components/charts.css +109 -35
  201. package/dist/components/charts.d.mts +2 -0
  202. package/dist/components/code-block.css +10 -8
  203. package/dist/components/code-block.d.mts +2 -0
  204. package/dist/components/command-palette.css +45 -38
  205. package/dist/components/command-palette.d.mts +2 -0
  206. package/dist/components/content.css +62 -57
  207. package/dist/components/context-menu.d.mts +2 -0
  208. package/dist/components/copy.css +10 -10
  209. package/dist/components/copy.d.mts +2 -0
  210. package/dist/components/datatable.css +72 -59
  211. package/dist/components/datatable.d.mts +2 -0
  212. package/dist/components/date-picker.css +26 -26
  213. package/dist/components/date-picker.d.mts +2 -0
  214. package/dist/components/desc.d.mts +2 -0
  215. package/dist/components/dropdown.d.mts +2 -0
  216. package/dist/components/empty.css +16 -16
  217. package/dist/components/empty.d.mts +2 -0
  218. package/dist/components/feedback.css +31 -29
  219. package/dist/components/form-validate.css +20 -6
  220. package/dist/components/form-validate.d.mts +2 -0
  221. package/dist/components/form.css +17 -14
  222. package/dist/components/form.d.mts +2 -0
  223. package/dist/components/icon.css +21 -10
  224. package/dist/components/icon.d.mts +2 -0
  225. package/dist/components/input.css +22 -22
  226. package/dist/components/input.d.mts +2 -0
  227. package/dist/components/kb-access.d.mts +2 -0
  228. package/dist/components/kb-acl.d.mts +2 -0
  229. package/dist/components/kb-agent.css +134 -55
  230. package/dist/components/kb-answer.d.mts +2 -0
  231. package/dist/components/kb-audit.d.mts +2 -0
  232. package/dist/components/kb-canvas.d.mts +2 -0
  233. package/dist/components/kb-chain.d.mts +2 -0
  234. package/dist/components/kb-checkpoint.d.mts +2 -0
  235. package/dist/components/kb-chunks.d.mts +2 -0
  236. package/dist/components/kb-citation.d.mts +2 -0
  237. package/dist/components/kb-clarify.d.mts +2 -0
  238. package/dist/components/kb-conflict.d.mts +2 -0
  239. package/dist/components/kb-connector.d.mts +2 -0
  240. package/dist/components/kb-data.css +192 -80
  241. package/dist/components/kb-eval.d.mts +2 -0
  242. package/dist/components/kb-explain.d.mts +2 -0
  243. package/dist/components/kb-filter.d.mts +2 -0
  244. package/dist/components/kb-gap.d.mts +2 -0
  245. package/dist/components/kb-ground.css +165 -73
  246. package/dist/components/kb-hittest.d.mts +2 -0
  247. package/dist/components/kb-ingest.css +308 -113
  248. package/dist/components/kb-metadata.d.mts +2 -0
  249. package/dist/components/kb-ops.css +189 -75
  250. package/dist/components/kb-passage.d.mts +2 -0
  251. package/dist/components/kb-perm.css +158 -87
  252. package/dist/components/kb-pipeline.d.mts +2 -0
  253. package/dist/components/kb-qa.d.mts +2 -0
  254. package/dist/components/kb-rerank.d.mts +2 -0
  255. package/dist/components/kb-retrieval.d.mts +2 -0
  256. package/dist/components/kb-review.d.mts +2 -0
  257. package/dist/components/kb-sandbox.d.mts +2 -0
  258. package/dist/components/kb-search.css +353 -116
  259. package/dist/components/kb-segment.d.mts +2 -0
  260. package/dist/components/kb-sources.d.mts +2 -0
  261. package/dist/components/kb-sql.d.mts +2 -0
  262. package/dist/components/kb-trace.d.mts +2 -0
  263. package/dist/components/kb-visibility.d.mts +2 -0
  264. package/dist/components/kb-who-can.d.mts +2 -0
  265. package/dist/components/kb.css +60 -36
  266. package/dist/components/kb.d.mts +2 -0
  267. package/dist/components/kbd.d.mts +2 -0
  268. package/dist/components/layout.css +10 -10
  269. package/dist/components/layout.d.mts +2 -0
  270. package/dist/components/list.d.mts +2 -0
  271. package/dist/components/material-chinese.css +10 -0
  272. package/dist/components/material-soviet.css +10 -0
  273. package/dist/components/material.css +61 -18
  274. package/dist/components/media-card.d.mts +2 -0
  275. package/dist/components/media.css +22 -27
  276. package/dist/components/mentions.css +18 -17
  277. package/dist/components/mentions.d.mts +2 -0
  278. package/dist/components/menu.css +32 -28
  279. package/dist/components/modal.css +30 -27
  280. package/dist/components/modal.d.mts +2 -0
  281. package/dist/components/nav.css +48 -44
  282. package/dist/components/nav.d.mts +2 -0
  283. package/dist/components/notification.css +31 -25
  284. package/dist/components/notification.d.mts +2 -0
  285. package/dist/components/pagination.css +15 -13
  286. package/dist/components/pagination.d.mts +2 -0
  287. package/dist/components/panel.css +19 -20
  288. package/dist/components/panel.d.mts +2 -0
  289. package/dist/components/pill.css +8 -7
  290. package/dist/components/pill.d.mts +2 -0
  291. package/dist/components/popover.css +32 -23
  292. package/dist/components/popover.d.mts +2 -0
  293. package/dist/components/progress.d.mts +2 -0
  294. package/dist/components/rating.d.mts +2 -0
  295. package/dist/components/result.d.mts +2 -0
  296. package/dist/components/scroll-area.css +84 -112
  297. package/dist/components/scroll-area.d.mts +2 -0
  298. package/dist/components/scroll-area.mjs +1 -0
  299. package/dist/components/segmented.css +47 -29
  300. package/dist/components/segmented.d.mts +2 -0
  301. package/dist/components/select.css +80 -41
  302. package/dist/components/select.d.mts +2 -0
  303. package/dist/components/sidebar.css +42 -38
  304. package/dist/components/sidebar.d.mts +2 -0
  305. package/dist/components/skeleton.d.mts +2 -0
  306. package/dist/components/slider.css +26 -22
  307. package/dist/components/slider.d.mts +2 -0
  308. package/dist/components/spinner.d.mts +2 -0
  309. package/dist/components/split-pane.css +16 -7
  310. package/dist/components/split-pane.d.mts +2 -0
  311. package/dist/components/stat.css +17 -16
  312. package/dist/components/stat.d.mts +2 -0
  313. package/dist/components/steps.css +26 -26
  314. package/dist/components/steps.d.mts +2 -0
  315. package/dist/components/switch.css +78 -39
  316. package/dist/components/switch.d.mts +2 -0
  317. package/dist/components/table.css +54 -32
  318. package/dist/components/table.d.mts +2 -0
  319. package/dist/components/tabs.css +53 -32
  320. package/dist/components/tabs.d.mts +2 -0
  321. package/dist/components/tag-input.css +12 -8
  322. package/dist/components/tag-input.d.mts +2 -0
  323. package/dist/components/tag.css +20 -12
  324. package/dist/components/tag.d.mts +2 -0
  325. package/dist/components/theme-switcher.css +7 -7
  326. package/dist/components/theme-switcher.d.mts +2 -0
  327. package/dist/components/timeline.d.mts +2 -0
  328. package/dist/components/toast.css +34 -30
  329. package/dist/components/toast.d.mts +2 -0
  330. package/dist/components/toolbar.css +19 -18
  331. package/dist/components/toolbar.d.mts +2 -0
  332. package/dist/components/tooltip.css +9 -8
  333. package/dist/components/tooltip.d.mts +2 -0
  334. package/dist/components/tree-select.css +63 -40
  335. package/dist/components/tree-select.d.mts +2 -0
  336. package/dist/components/tree.d.mts +2 -0
  337. package/dist/components/upload.css +9 -11
  338. package/dist/components/upload.d.mts +2 -0
  339. package/dist/index.d.mts +85 -84
  340. package/dist/index.mjs +14644 -13935
  341. package/dist/react.d.mts +18 -18
  342. package/dist/react.mjs +377 -36
  343. package/dist/registry.json +797 -64
  344. package/dist/tokens/colors.css +6 -0
  345. package/dist/tokens/design.css +137 -31
  346. package/dist/tokens/dtcg.json +9592 -2008
  347. package/dist/tokens/figma.variables.json +7451 -2141
  348. package/dist/tokens/motion.css +51 -0
  349. package/dist/tokens/pixel.css +10 -0
  350. package/dist/tokens/scrollbars.css +40 -0
  351. package/dist/tokens/tokens-studio.json +8390 -1142
  352. package/dist/tokens/typography.css +33 -0
  353. package/dist/tokens.css +402 -82
  354. package/dist/ui.css +4196 -2163
  355. package/dist/vue.d.mts +17 -17
  356. package/dist/vue.mjs +371 -34
  357. package/docs/spec/charts-scale-a11y.md +115 -0
  358. package/docs/spec/design-philosophy.md +5 -5
  359. package/docs/spec/design-primitives.md +10 -10
  360. package/docs/spec/motion-typography.md +105 -0
  361. package/docs/spec/scrollbars.md +46 -0
  362. package/package.json +17 -3
@@ -18,48 +18,97 @@
18
18
  .icen-kb-btn {
19
19
  display: inline-flex;
20
20
  align-items: center;
21
- gap: 5px;
22
- padding: 3px 10px;
21
+ justify-content: center;
22
+ gap: 6px;
23
+ min-block-size: var(--icen-density-item-height);
24
+ padding-block: 3px;
25
+ padding-inline: var(--icen-control-padding-inline);
23
26
  border: 1px solid var(--icen-token-line-soft);
24
27
  border-radius: var(--icen-radius-sm);
25
28
  background: var(--icen-token-bg-soft);
26
29
  color: var(--icen-token-text-muted);
27
30
  font: inherit;
28
- font-size: 12px;
29
- line-height: 1.5;
31
+ font-size: var(--icen-font-size-control);
32
+ font-weight: var(--icen-font-weight-control);
33
+ line-height: 1.35;
30
34
  white-space: nowrap;
31
35
  cursor: pointer;
32
36
  transition:
33
- color 0.16s ease-out,
34
- border-color 0.16s ease-out,
35
- background-color 0.16s ease-out;
37
+ color var(--icen-tx-fast),
38
+ border-color var(--icen-tx-fast),
39
+ background-color var(--icen-tx-fast);
36
40
  }
37
41
  .icen-kb-btn:hover {
38
42
  color: var(--icen-token-text);
39
43
  border-color: var(--icen-token-line);
44
+ background: var(--icen-token-fill-hover);
45
+ }
46
+ .icen-kb-btn:active {
47
+ background: var(--icen-token-fill-pressed);
40
48
  }
41
49
  .icen-kb-btn:focus-visible {
42
- outline: 2px solid var(--icen-token-accent);
43
- outline-offset: 1px;
50
+ outline: none;
51
+ box-shadow: var(--icen-ring);
44
52
  }
45
53
  .icen-kb-btn:disabled,
46
54
  .icen-kb-btn[aria-disabled='true'] {
47
- opacity: 0.5;
55
+ opacity: var(--icen-disabled-opacity);
48
56
  cursor: not-allowed;
49
57
  }
58
+ /* 主行动(新增/定义):与 kb-search 运行钮、kb-ops 提交钮同一 accent-strong 口径 */
59
+ [data-icen-kb-chunk-add],
60
+ [data-icen-kb-metadata-define],
61
+ [data-icen-kb-qa-add] {
62
+ color: var(--icen-token-on-accent);
63
+ background: var(--icen-token-accent-strong);
64
+ border-color: var(--icen-token-accent-strong);
65
+ font-weight: 600;
66
+ }
67
+ [data-icen-kb-chunk-add]:hover,
68
+ [data-icen-kb-metadata-define]:hover,
69
+ [data-icen-kb-qa-add]:hover {
70
+ color: var(--icen-token-on-accent);
71
+ background: color-mix(in srgb, var(--icen-token-accent-strong) 92%, var(--icen-token-text));
72
+ border-color: color-mix(in srgb, var(--icen-token-accent-strong) 92%, var(--icen-token-text));
73
+ }
74
+ [data-icen-kb-chunk-add]:active,
75
+ [data-icen-kb-metadata-define]:active,
76
+ [data-icen-kb-qa-add]:active {
77
+ background: color-mix(in srgb, var(--icen-token-accent-strong) 84%, var(--icen-token-text));
78
+ }
79
+ /* 危险行动(删除/移除):线框 danger,不抢主行动的 accent */
80
+ [data-icen-kb-chunk-remove],
81
+ [data-icen-kb-metadata-remove],
82
+ [data-icen-kb-qa-remove] {
83
+ color: var(--icen-token-error);
84
+ border-color: color-mix(in srgb, var(--icen-token-error) 45%, transparent);
85
+ background: transparent;
86
+ }
87
+ [data-icen-kb-chunk-remove]:hover,
88
+ [data-icen-kb-metadata-remove]:hover,
89
+ [data-icen-kb-qa-remove]:hover {
90
+ color: var(--icen-token-error);
91
+ border-color: var(--icen-token-error);
92
+ background: var(--icen-token-error-muted);
93
+ }
94
+ [data-icen-kb-chunk-remove]:active,
95
+ [data-icen-kb-metadata-remove]:active,
96
+ [data-icen-kb-qa-remove]:active {
97
+ background: color-mix(in srgb, var(--icen-token-error) 18%, transparent);
98
+ }
50
99
  .icen-kb-btn svg {
51
- width: 13px;
52
- height: 13px;
100
+ width: 14px;
101
+ height: 14px;
53
102
  flex: 0 0 auto;
54
103
  }
55
104
 
56
- /* Input surface/geometry comes from the shared input recipe in tokens.css. */
105
+ /* 输入表面与几何沿用 tokens.css 的共享输入配方(高度 28 / 圆角 6 / 内距 8)。 */
57
106
  .icen-kb-input[aria-invalid='true'] {
58
107
  border-color: var(--icen-token-error);
59
108
  }
60
109
  .icen-kb-input--mono {
61
110
  font-family: var(--icen-font-mono);
62
- font-size: var(--icen-density-font-size-sm);
111
+ font-size: var(--icen-font-size-caption);
63
112
  }
64
113
 
65
114
  .icen-kb-seg {
@@ -71,33 +120,44 @@
71
120
  background: var(--icen-token-bg-soft);
72
121
  }
73
122
  .icen-kb-seg-item {
74
- border: none;
123
+ display: inline-flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ min-block-size: 22px;
127
+ border: 1px solid transparent;
75
128
  background: none;
76
- padding: 2px 10px;
129
+ padding-block: 0;
130
+ padding-inline: 9px;
77
131
  border-radius: calc(var(--icen-radius-sm) - 2px);
78
132
  font: inherit;
79
- font-size: 12px;
80
- line-height: 1.5;
133
+ font-size: var(--icen-font-size-caption);
134
+ font-weight: 500;
135
+ line-height: 1;
81
136
  color: var(--icen-token-text-muted);
82
137
  cursor: pointer;
83
138
  transition:
84
- color 0.16s ease-out,
85
- background-color 0.16s ease-out;
139
+ color var(--icen-tx-fast),
140
+ background-color var(--icen-tx-fast),
141
+ box-shadow var(--icen-tx-fast);
86
142
  }
87
143
  .icen-kb-seg-item:hover {
88
144
  color: var(--icen-token-text);
145
+ background: var(--icen-token-fill-hover);
146
+ }
147
+ .icen-kb-seg-item:active {
148
+ background: var(--icen-token-fill-pressed);
89
149
  }
90
150
  .icen-kb-seg-item.is-active {
91
- background: var(--icen-token-bg);
151
+ background: var(--icen-token-surface);
92
152
  color: var(--icen-token-text);
93
153
  box-shadow: 0 0 0 1px var(--icen-token-line-soft);
94
154
  }
95
155
  .icen-kb-seg-item:focus-visible {
96
- outline: 2px solid var(--icen-token-accent);
97
- outline-offset: -2px;
156
+ outline: none;
157
+ box-shadow: var(--icen-ring);
98
158
  }
99
159
  .icen-kb-seg-item:disabled {
100
- opacity: 0.45;
160
+ opacity: var(--icen-disabled-opacity);
101
161
  cursor: not-allowed;
102
162
  }
103
163
 
@@ -107,7 +167,7 @@
107
167
  border: 1px solid var(--icen-token-line-soft);
108
168
  border-radius: var(--icen-radius-md);
109
169
  background: var(--icen-token-bg-soft);
110
- padding: 6px 8px;
170
+ padding: 8px;
111
171
  min-width: 0;
112
172
  }
113
173
  .icen-kb-pipeline-list {
@@ -135,9 +195,10 @@
135
195
  .icen-kb-pipeline-state {
136
196
  display: inline-flex;
137
197
  align-items: center;
138
- gap: 5px;
198
+ gap: 6px;
139
199
  flex: 0 0 auto;
140
- font-size: 11.5px;
200
+ font-size: var(--icen-density-font-size-xs);
201
+ letter-spacing: 0.3px;
141
202
  color: var(--icen-token-text-faint);
142
203
  }
143
204
  .icen-kb-pipeline-state.is-running .icen-kb-pipeline-state-label { color: var(--icen-token-accent-text); }
@@ -149,7 +210,8 @@
149
210
  flex: 1 1 auto;
150
211
  min-width: 0;
151
212
  color: var(--icen-token-text);
152
- font-size: 13px;
213
+ font-size: var(--icen-density-font-size-md);
214
+ font-weight: 600;
153
215
  overflow: hidden;
154
216
  text-overflow: ellipsis;
155
217
  white-space: nowrap;
@@ -169,7 +231,7 @@
169
231
  border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
170
232
  background: var(--icen-token-accent);
171
233
  opacity: 0.7;
172
- transition: width 0.24s ease-out;
234
+ transition: width var(--icen-tx-slow);
173
235
  }
174
236
 
175
237
  /* 步骤时间线:纵向连线(层级色,不给状态色;沿 inline-start,RTL 镜像) */
@@ -188,14 +250,14 @@
188
250
  display: flex;
189
251
  align-items: center;
190
252
  gap: 8px;
191
- min-height: 26px;
192
- padding: 1px 2px;
253
+ min-height: var(--icen-density-item-height);
254
+ padding: 2px;
193
255
  border-radius: var(--icen-radius-sm);
194
256
  }
195
257
  .icen-kb-pipeline-step:not(:last-child)::before {
196
258
  content: '';
197
259
  position: absolute;
198
- inset-inline-start: 6.5px;
260
+ inset-inline-start: 5px; /* 对齐全族 6px 状态点的圆心 */
199
261
  top: 15px;
200
262
  bottom: -5px;
201
263
  width: 1px;
@@ -207,12 +269,12 @@
207
269
  flex: 0 0 auto;
208
270
  }
209
271
  .icen-kb-pipeline-step-label {
210
- font-size: 12.5px;
272
+ font-size: var(--icen-density-font-size-md);
211
273
  color: var(--icen-token-text);
212
274
  white-space: nowrap;
213
275
  }
214
276
  .icen-kb-step-detail {
215
- font-size: 11.5px;
277
+ font-size: var(--icen-density-font-size-xs);
216
278
  color: var(--icen-token-text-faint);
217
279
  overflow: hidden;
218
280
  text-overflow: ellipsis;
@@ -241,12 +303,13 @@
241
303
  gap: 8px;
242
304
  margin-top: 8px;
243
305
  padding: 8px 10px;
306
+ border: 1px solid color-mix(in srgb, var(--icen-token-error) 24%, transparent);
244
307
  border-radius: var(--icen-radius-sm);
245
- background: color-mix(in srgb, var(--icen-token-error) 7%, transparent);
308
+ background: var(--icen-token-error-muted);
246
309
  }
247
310
  .icen-kb-pipeline-error > svg {
248
- width: 13px;
249
- height: 13px;
311
+ width: 14px;
312
+ height: 14px;
250
313
  flex: 0 0 auto;
251
314
  color: var(--icen-token-error);
252
315
  margin-top: 2px;
@@ -254,16 +317,18 @@
254
317
  .icen-kb-pipeline-error-stage {
255
318
  flex: 0 0 auto;
256
319
  font-family: var(--icen-font-mono);
257
- font-size: 11.5px;
320
+ font-size: var(--icen-density-font-size-xs);
258
321
  font-weight: 600;
322
+ letter-spacing: 0.3px;
259
323
  color: var(--icen-token-error);
260
324
  }
261
325
  .icen-kb-pipeline-error-msg {
262
326
  flex: 1 1 auto;
263
327
  min-width: 0;
264
- font-size: 12px;
328
+ font-size: var(--icen-density-font-size-xs);
265
329
  line-height: 1.6;
266
- color: var(--icen-token-text-muted);
330
+ /* 错误原因正文是实质内容,不用 muted 弱化(浅红底上 muted 过不了对比度门) */
331
+ color: var(--icen-token-text);
267
332
  }
268
333
 
269
334
  /* ══════════════ kb-chunks · chunk 编辑器(§5.6) ══════════════ */
@@ -307,11 +372,17 @@
307
372
  border: 1px solid var(--icen-token-line-soft);
308
373
  border-radius: var(--icen-radius-md);
309
374
  background: var(--icen-token-bg-soft);
310
- transition: opacity 0.16s ease-out;
375
+ transition:
376
+ color var(--icen-tx-fast),
377
+ border-color var(--icen-tx-fast),
378
+ background-color var(--icen-tx-fast);
311
379
  }
312
- /* available=false:不删除但排除出检索 → 整体降透明度 */
380
+ /* available=false:不删除但排除出检索 → 文字降级(不整卡透明:透明度会被 axe 算进对比度) */
313
381
  .icen-kb-chunk.is-off {
314
- color: var(--icen-token-text-muted); /* 停用态落在文字色而非整卡透明(透明度会被 axe 算进对比度) */
382
+ color: var(--icen-token-text-muted);
383
+ }
384
+ .icen-kb-chunk.is-off .icen-kb-chunk-content {
385
+ color: var(--icen-token-text-muted);
315
386
  }
316
387
 
317
388
  /* 启用开关(kb 域自持,无 switch.css 依赖) */
@@ -319,8 +390,9 @@
319
390
  display: inline-flex;
320
391
  align-items: center;
321
392
  gap: 6px;
393
+ min-block-size: var(--icen-density-item-height);
322
394
  margin-top: 2px;
323
- font-size: 11.5px;
395
+ font-size: var(--icen-density-font-size-xs);
324
396
  color: var(--icen-token-text-faint);
325
397
  cursor: pointer;
326
398
  user-select: none;
@@ -334,11 +406,12 @@
334
406
  .icen-kb-chunk-switch-track {
335
407
  position: relative;
336
408
  flex: 0 0 auto;
337
- width: 26px;
338
- height: 15px;
409
+ width: 28px;
410
+ height: 17px;
411
+ border: 1px solid transparent;
339
412
  border-radius: var(--icen-radius-full);
340
413
  background: var(--icen-token-line-soft);
341
- transition: background-color 0.16s ease-out;
414
+ transition: background-color var(--icen-tx-fast);
342
415
  }
343
416
  .icen-kb-chunk-switch-thumb {
344
417
  position: absolute;
@@ -346,10 +419,18 @@
346
419
  left: 2px; /* guard:allow-physical 开关是物理隐喻控件(Material 惯例:RTL 下方向保持物理,不镜像) */
347
420
  width: 11px;
348
421
  height: 11px;
422
+ border: 1px solid transparent;
349
423
  border-radius: 50%;
350
424
  background: var(--icen-token-bg);
351
425
  box-shadow: 0 0 0 1px var(--icen-token-line-soft);
352
- transition: transform 0.16s ease-out;
426
+ transition: transform var(--icen-tx-fast);
427
+ }
428
+ /* hover 只提示可切换,不预先染成成功色 */
429
+ .icen-kb-chunk-switch:hover input:not(:checked) + .icen-kb-chunk-switch-track {
430
+ background: var(--icen-token-line);
431
+ }
432
+ .icen-kb-chunk-switch:active input:not(:checked) + .icen-kb-chunk-switch-track {
433
+ background: var(--icen-token-fill-pressed);
353
434
  }
354
435
  .icen-kb-chunk-switch input:checked + .icen-kb-chunk-switch-track {
355
436
  background: var(--icen-token-success);
@@ -358,33 +439,38 @@
358
439
  transform: translateX(11px); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
359
440
  }
360
441
  .icen-kb-chunk-switch input:focus-visible + .icen-kb-chunk-switch-track {
361
- outline: 2px solid var(--icen-token-accent);
362
- outline-offset: 1px;
442
+ outline: none;
443
+ box-shadow: var(--icen-ring);
363
444
  }
364
445
 
365
446
  .icen-kb-chunk-main {
366
447
  display: flex;
367
448
  flex-direction: column;
368
- gap: 5px;
449
+ gap: 6px;
369
450
  min-inline-size: 0;
370
451
  }
371
- /* 行内编辑:静默无边,编辑态(focus)边框 accent */
452
+ /* 行内编辑:静默无边,编辑态(focus)边框 accent + 焦点环 */
372
453
  .icen-kb-chunk-content {
373
- padding: 2px 6px;
454
+ padding: 3px 6px;
374
455
  margin: 0 -6px;
375
456
  border: 1px solid transparent;
376
457
  border-radius: var(--icen-radius-sm);
377
- font-size: 12.5px;
458
+ font-size: var(--icen-density-font-size-md);
378
459
  line-height: 1.7;
379
460
  color: var(--icen-token-text);
380
461
  white-space: pre-wrap;
381
462
  word-break: break-word;
382
- transition: border-color 0.16s ease-out, background-color 0.16s ease-out;
463
+ transition: border-color var(--icen-tx-fast), background-color var(--icen-tx-fast),
464
+ box-shadow var(--icen-tx-fast);
465
+ }
466
+ .icen-kb-chunk-content:hover:not(:focus) {
467
+ background: var(--icen-token-fill-hover);
383
468
  }
384
469
  .icen-kb-chunk-content:focus {
385
470
  outline: none;
386
471
  border-color: var(--icen-token-accent);
387
- background: var(--icen-token-bg);
472
+ background: var(--icen-token-surface);
473
+ box-shadow: var(--icen-ring);
388
474
  }
389
475
 
390
476
  .icen-kb-chunk-keywords {
@@ -399,18 +485,24 @@
399
485
  background: none;
400
486
  padding: 0;
401
487
  padding-inline-start: 3px;
488
+ border-radius: var(--icen-radius-xs);
402
489
  font: inherit;
403
- font-size: 12px;
490
+ font-size: var(--icen-density-font-size-xs);
404
491
  line-height: 1;
405
492
  color: var(--icen-token-text-faint);
406
493
  cursor: pointer;
494
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast);
407
495
  }
408
496
  .icen-kb-chunk-keyword-x:hover {
409
497
  color: var(--icen-token-error);
498
+ background: var(--icen-token-fill-hover);
499
+ }
500
+ .icen-kb-chunk-keyword-x:active {
501
+ background: var(--icen-token-fill-pressed);
410
502
  }
411
503
  .icen-kb-chunk-keyword-x:focus-visible {
412
- outline: 2px solid var(--icen-token-accent);
413
- outline-offset: 1px;
504
+ outline: none;
505
+ box-shadow: var(--icen-ring);
414
506
  }
415
507
  .icen-kb-chunk-keyword-input {
416
508
  border: none;
@@ -419,9 +511,15 @@
419
511
  padding: 2px 4px;
420
512
  width: 96px;
421
513
  font-family: var(--icen-font-mono);
422
- font-size: 11px;
514
+ font-size: var(--icen-density-font-size-xs);
423
515
  color: var(--icen-token-text);
424
516
  }
517
+ /* 裸 input 清掉了边框/背景/outline:必须自给焦点可见性,否则键盘焦点零反馈 */
518
+ .icen-kb-chunk-keyword-input:focus-visible {
519
+ outline: none;
520
+ box-shadow: var(--icen-ring);
521
+ border-radius: var(--icen-radius-xs);
522
+ }
425
523
  .icen-kb-chunk-keyword-input::placeholder {
426
524
  color: var(--icen-token-text-faint);
427
525
  }
@@ -469,14 +567,17 @@
469
567
  min-width: 0;
470
568
  }
471
569
  .icen-kb-field > .icen-kb-field-label {
472
- font-size: 11.5px;
473
- color: var(--icen-token-text-faint);
570
+ font-size: var(--icen-density-font-size-xs);
571
+ font-weight: 500;
572
+ letter-spacing: 0.01em;
573
+ color: var(--icen-token-text-muted);
474
574
  }
475
575
  .icen-kb-field > .icen-kb-input {
476
576
  width: 100%;
477
577
  }
478
578
  .icen-kb-segment-overlap-error {
479
579
  margin-top: -4px;
580
+ font-size: var(--icen-density-font-size-xs);
480
581
  color: var(--icen-token-error);
481
582
  }
482
583
  .icen-kb-segment-clean {
@@ -487,11 +588,16 @@
487
588
  .icen-kb-segment-clean-item {
488
589
  display: inline-flex;
489
590
  align-items: center;
490
- gap: 5px;
491
- font-size: 12px;
591
+ gap: 6px;
592
+ min-block-size: 24px;
593
+ font-size: var(--icen-density-font-size-xs);
492
594
  color: var(--icen-token-text-muted);
493
595
  cursor: pointer;
494
596
  user-select: none;
597
+ transition: color var(--icen-tx-fast);
598
+ }
599
+ .icen-kb-segment-clean-item:hover {
600
+ color: var(--icen-token-text);
495
601
  }
496
602
  .icen-kb-segment-clean-item .icen-checkbox { flex: 0 0 auto; }
497
603
 
@@ -499,7 +605,7 @@
499
605
  display: flex;
500
606
  flex-direction: column;
501
607
  gap: 8px;
502
- padding: 10px;
608
+ padding: 12px;
503
609
  border: 1px solid var(--icen-token-line-soft);
504
610
  border-radius: var(--icen-radius-md);
505
611
  background: var(--icen-token-bg);
@@ -513,7 +619,7 @@
513
619
  flex-wrap: wrap;
514
620
  }
515
621
  .icen-kb-segment-stat {
516
- font-size: 12.5px;
622
+ font-size: var(--icen-density-font-size-xs);
517
623
  color: var(--icen-token-text);
518
624
  }
519
625
  .icen-kb-segment-blocks {
@@ -541,20 +647,28 @@
541
647
  .icen-kb-segment-block-text {
542
648
  max-height: 200px;
543
649
  overflow: hidden;
544
- font-size: 12.5px;
650
+ font-size: var(--icen-density-font-size-md);
545
651
  line-height: 1.7;
546
652
  color: var(--icen-token-text-muted);
547
653
  white-space: pre-wrap;
548
654
  word-break: break-word;
549
655
  cursor: pointer;
550
- transition: max-height 0.16s ease-out;
656
+ transition: max-height var(--icen-tx-normal), color var(--icen-tx-fast),
657
+ background-color var(--icen-tx-fast);
658
+ }
659
+ .icen-kb-segment-block-text:hover {
660
+ color: var(--icen-token-text);
661
+ background: var(--icen-token-fill-hover);
662
+ }
663
+ .icen-kb-segment-block-text:active {
664
+ background: var(--icen-token-fill-pressed);
551
665
  }
552
666
  .icen-kb-segment-block-text.is-open {
553
667
  max-height: none;
554
668
  }
555
669
  .icen-kb-segment-block-text:focus-visible {
556
- outline: 2px solid var(--icen-token-accent);
557
- outline-offset: 1px;
670
+ outline: none;
671
+ box-shadow: var(--icen-ring);
558
672
  }
559
673
 
560
674
  /* ══════════════ kb-connector · 连接器卡(§5.8) ══════════════ */
@@ -571,7 +685,7 @@
571
685
  flex-direction: column;
572
686
  gap: 8px;
573
687
  padding-block: 10px;
574
- padding-inline: 14px 12px;
688
+ padding-inline: 12px;
575
689
  border: 1px solid var(--icen-token-line-soft);
576
690
  border-inline-start: 2px solid var(--icen-token-line-soft);
577
691
  border-radius: var(--icen-radius-md);
@@ -608,15 +722,17 @@
608
722
  gap: 1px;
609
723
  }
610
724
  .icen-kb-connector-name {
611
- font-size: 13px;
725
+ font-size: var(--icen-density-font-size-md);
612
726
  font-weight: 600;
727
+ line-height: 1.35;
613
728
  color: var(--icen-token-text);
614
729
  overflow: hidden;
615
730
  text-overflow: ellipsis;
616
731
  white-space: nowrap;
617
732
  }
618
733
  .icen-kb-connector-sub {
619
- font-size: 11.5px;
734
+ font-size: var(--icen-density-font-size-xs);
735
+ line-height: 1.4;
620
736
  color: var(--icen-token-text-faint);
621
737
  overflow: hidden;
622
738
  text-overflow: ellipsis;
@@ -626,6 +742,8 @@
626
742
  .icen-kb-connector-schedule {
627
743
  flex: 0 0 auto;
628
744
  font-family: var(--icen-font-mono);
745
+ font-size: var(--icen-density-font-size-xs);
746
+ letter-spacing: 0.3px;
629
747
  white-space: nowrap;
630
748
  }
631
749
 
@@ -648,14 +766,14 @@
648
766
  }
649
767
  .icen-kb-connector-signal-label {
650
768
  flex: 0 0 auto;
651
- font-size: 11px;
769
+ font-size: var(--icen-density-font-size-xs);
652
770
  color: var(--icen-token-text-faint);
653
771
  }
654
772
  .icen-kb-connector-signal-value {
655
773
  flex: 1 1 auto;
656
774
  min-inline-size: 0;
657
775
  margin-inline-start: auto;
658
- font-size: 12px;
776
+ font-size: var(--icen-density-font-size-xs);
659
777
  color: var(--icen-token-text);
660
778
  text-align: end;
661
779
  overflow: hidden;
@@ -689,10 +807,6 @@
689
807
  gap: 6px;
690
808
  flex-wrap: wrap;
691
809
  }
692
- .icen-kb-connector-actions .icen-kb-btn {
693
- padding: 2px 8px;
694
- font-size: 11.5px;
695
- }
696
810
 
697
811
  /* ══════════════ kb-metadata · 元数据管理(§5.9) ══════════════ */
698
812
 
@@ -703,47 +817,58 @@
703
817
  width: 100%;
704
818
  border-collapse: collapse;
705
819
  table-layout: fixed;
820
+ font-variant-numeric: tabular-nums;
706
821
  }
707
822
  .icen-kb-metadata-th {
708
- padding: 4px 8px;
823
+ height: var(--icen-density-item-height);
824
+ padding: 5px 8px;
709
825
  border-bottom: 1px solid var(--icen-token-line-soft);
710
- font-size: 11.5px;
826
+ font-size: var(--icen-density-font-size-xs);
711
827
  font-weight: 500;
828
+ letter-spacing: 0.3px;
712
829
  color: var(--icen-token-text-faint);
713
830
  text-align: start;
714
831
  white-space: nowrap;
715
832
  }
716
833
  .icen-kb-metadata-th:nth-child(1) { width: 32%; }
717
834
  .icen-kb-metadata-th:nth-child(2) { width: 84px; }
718
- .icen-kb-metadata-th:nth-child(4) { width: 60px; }
835
+ .icen-kb-metadata-th:nth-child(4) { width: 96px; } /* 28px 操作钮(含中英文按钮文本)不截断 */
719
836
  .icen-kb-metadata-row > td {
720
- padding: 4px 8px;
837
+ padding: 5px 8px;
721
838
  border-bottom: 1px solid var(--icen-token-line-soft);
722
- font-size: 12.5px;
839
+ font-size: var(--icen-density-font-size-md);
723
840
  vertical-align: middle;
724
841
  overflow: hidden;
725
842
  text-overflow: ellipsis;
726
843
  white-space: nowrap;
727
844
  }
845
+ .icen-kb-metadata-row:last-child > td {
846
+ border-bottom: 0; /* 列表最后一行去分隔线 */
847
+ }
728
848
  .icen-kb-metadata-row:hover > td {
729
- background: var(--icen-token-bg-soft);
849
+ background: var(--icen-token-fill-hover);
730
850
  }
731
851
  .icen-kb-metadata-key {
732
852
  font-family: var(--icen-font-mono);
733
- font-size: 12px;
853
+ font-size: var(--icen-density-font-size-xs);
734
854
  color: var(--icen-token-text);
735
855
  }
736
856
  .icen-kb-metadata-key-label {
737
- font-size: 11px;
857
+ font-size: var(--icen-density-font-size-xs);
738
858
  color: var(--icen-token-text-faint);
739
859
  }
740
860
  .icen-kb-metadata-builtin-flag {
861
+ display: inline-flex;
862
+ align-items: center;
863
+ min-block-size: 22px;
741
864
  margin-inline-start: 6px;
742
- font-size: 10.5px;
865
+ padding: 0 7px;
866
+ font-size: var(--icen-density-font-size-xs);
867
+ line-height: 1;
743
868
  color: var(--icen-token-text-faint);
744
869
  border: 1px solid var(--icen-token-line-soft);
745
870
  border-radius: var(--icen-radius-full);
746
- padding: 1px 6px;
871
+ vertical-align: middle;
747
872
  }
748
873
  .icen-kb-metadata-type {
749
874
  font-family: var(--icen-font-mono);
@@ -757,12 +882,9 @@
757
882
  .icen-kb-metadata-ops {
758
883
  text-align: end;
759
884
  }
760
- .icen-kb-metadata-ops .icen-kb-btn {
761
- padding: 1px 8px;
762
- font-size: 11.5px;
763
- }
764
885
  .icen-kb-metadata-empty {
765
- padding: 18px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
886
+ padding: 20px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
887
+ font-size: var(--icen-font-size-caption);
766
888
  text-align: center;
767
889
  color: var(--icen-token-text-faint);
768
890
  white-space: normal !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
@@ -772,7 +894,7 @@
772
894
  align-items: center;
773
895
  gap: 8px;
774
896
  flex-wrap: wrap;
775
- margin-top: 10px;
897
+ margin-top: 12px;
776
898
  }
777
899
  .icen-kb-metadata-new .icen-kb-metadata-new-key {
778
900
  width: 220px;
@@ -800,42 +922,52 @@
800
922
  inline-size: 100%;
801
923
  border-collapse: collapse;
802
924
  table-layout: fixed;
925
+ font-variant-numeric: tabular-nums;
803
926
  }
804
927
  .icen-kb-qa-th {
805
- padding: 4px 8px;
928
+ height: var(--icen-density-item-height);
929
+ padding: 5px 8px;
806
930
  border-bottom: 1px solid var(--icen-token-line-soft);
807
- font-size: 11.5px;
931
+ font-size: var(--icen-density-font-size-xs);
808
932
  font-weight: 500;
933
+ letter-spacing: 0.3px;
809
934
  color: var(--icen-token-text-faint);
810
935
  text-align: start;
811
936
  white-space: nowrap;
812
937
  }
813
938
  .icen-kb-qa-th:nth-child(1) { width: 44%; }
814
939
  .icen-kb-qa-th:nth-child(2) { width: 44%; }
815
- .icen-kb-qa-th:nth-child(3) { width: 52px; }
940
+ .icen-kb-qa-th:nth-child(3) { width: 88px; } /* 28px 操作钮(含中英文按钮文本)不截断 */
816
941
  .icen-kb-qa-row > td {
817
- padding: 4px 8px;
942
+ padding: 5px 8px;
818
943
  border-bottom: 1px solid var(--icen-token-line-soft);
819
- font-size: 12.5px;
944
+ font-size: var(--icen-density-font-size-md);
820
945
  vertical-align: top;
821
946
  }
947
+ .icen-kb-qa-row:last-child > td {
948
+ border-bottom: 0; /* 列表最后一行去分隔线 */
949
+ }
822
950
  .icen-kb-qa-row:hover > td {
823
- background: var(--icen-token-bg-soft);
951
+ background: var(--icen-token-fill-hover);
824
952
  }
825
- /* 行内编辑格:静默,focus 内描边 accent */
953
+ /* 行内编辑格:静默,hover 提示可编辑,focus 给焦点环 */
826
954
  .icen-kb-qa-q,
827
955
  .icen-kb-qa-a {
828
956
  outline: none;
829
957
  border-radius: var(--icen-radius-sm);
830
- padding: 2px 4px;
831
- margin: -2px -4px;
958
+ padding: 3px 4px;
959
+ margin: -3px -4px;
832
960
  line-height: 1.7;
833
961
  word-break: break-word;
834
- transition: box-shadow 0.16s ease-out;
962
+ transition: box-shadow var(--icen-tx-fast), background-color var(--icen-tx-fast);
963
+ }
964
+ .icen-kb-qa-q:hover,
965
+ .icen-kb-qa-a:hover {
966
+ background: var(--icen-token-fill-hover);
835
967
  }
836
968
  .icen-kb-qa-q:focus,
837
969
  .icen-kb-qa-a:focus {
838
- box-shadow: inset 0 0 0 1px var(--icen-token-accent);
970
+ box-shadow: var(--icen-ring);
839
971
  }
840
972
  .icen-kb-qa-q:empty::before,
841
973
  .icen-kb-qa-a:empty::before {
@@ -846,20 +978,22 @@
846
978
  text-align: end;
847
979
  vertical-align: middle;
848
980
  }
849
- .icen-kb-qa-ops .icen-kb-btn {
850
- padding: 1px 8px;
851
- font-size: 11.5px;
852
- }
853
981
  .icen-kb-qa-empty {
854
- padding: 18px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
982
+ padding: 20px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
983
+ font-size: var(--icen-font-size-caption);
855
984
  text-align: center;
856
985
  color: var(--icen-token-text-faint);
857
986
  }
858
987
 
859
988
  /* ══════════════ 密度 / 动效守卫 ══════════════ */
860
989
 
861
- [data-icen-density='compact'] .icen-kb-pipeline-step { min-height: 22px; }
862
- [data-icen-density='compact'] .icen-kb-chunk { padding: 5px 8px; gap: 8px; }
990
+ [data-icen-density='compact'] .icen-kb-pipeline-step { min-height: var(--icen-density-item-height); }
991
+ [data-icen-density='compact'] .icen-kb-pipeline-step:not(:last-child)::before { top: 13px; bottom: -4px; }
992
+ [data-icen-density='compact'] .icen-kb-chunk { padding: 6px 8px; gap: 8px; }
993
+ [data-icen-density='compact'] .icen-kb-segment-preview { padding: 8px; }
994
+ [data-icen-density='compact'] .icen-kb-connector { padding-block: 8px; }
995
+ [data-icen-density='compact'] .icen-kb-metadata-th,
996
+ [data-icen-density='compact'] .icen-kb-qa-th { padding-block: 3px; }
863
997
  [data-icen-density='compact'] .icen-kb-metadata-row > td,
864
998
  [data-icen-density='compact'] .icen-kb-qa-row > td { padding-top: 2px; padding-bottom: 2px; }
865
999
 
@@ -879,4 +1013,65 @@
879
1013
  }
880
1014
  }
881
1015
 
1016
+ /* ══════════════ 高对比模式:控件边界与状态不能只靠底色差 ══════════════ */
1017
+
1018
+ @media (forced-colors: active) {
1019
+ .icen-kb-btn,
1020
+ .icen-kb-seg,
1021
+ .icen-kb-seg-item,
1022
+ .icen-kb-chunk,
1023
+ .icen-kb-chunk-content,
1024
+ .icen-kb-chunk-switch-track,
1025
+ .icen-kb-chunk-switch-thumb,
1026
+ .icen-kb-segment-preview,
1027
+ .icen-kb-segment-block,
1028
+ .icen-kb-connector,
1029
+ .icen-kb-metadata-th,
1030
+ .icen-kb-metadata-row > td,
1031
+ .icen-kb-qa-th,
1032
+ .icen-kb-qa-row > td {
1033
+ border-color: CanvasText;
1034
+ }
1035
+ .icen-kb-pipeline,
1036
+ .icen-kb-pipeline-error {
1037
+ border: 1px solid CanvasText;
1038
+ background: Canvas;
1039
+ }
1040
+ .icen-kb-pipeline-progress {
1041
+ border: 1px solid CanvasText;
1042
+ }
1043
+ .icen-kb-pipeline-progress > i {
1044
+ background: Highlight;
1045
+ }
1046
+ .icen-kb-seg-item.is-active {
1047
+ background: Highlight;
1048
+ color: HighlightText;
1049
+ }
1050
+ .icen-kb-chunk.is-off,
1051
+ .icen-kb-chunk.is-off .icen-kb-chunk-content {
1052
+ color: GrayText;
1053
+ }
1054
+ .icen-kb-chunk-switch input:checked + .icen-kb-chunk-switch-track {
1055
+ background: Highlight;
1056
+ }
1057
+ .icen-kb-chunk-switch input:checked + .icen-kb-chunk-switch-track > .icen-kb-chunk-switch-thumb {
1058
+ background: HighlightText;
1059
+ }
1060
+ .icen-kb-pipeline-step > .icen-kb-dot,
1061
+ .icen-kb-connector-signal .icen-kb-dot { forced-color-adjust: none; } /* 状态点保留语义色 */
1062
+ .icen-kb-btn:focus-visible,
1063
+ .icen-kb-seg-item:focus-visible,
1064
+ .icen-kb-chunk-content:focus,
1065
+ .icen-kb-chunk-switch input:focus-visible + .icen-kb-chunk-switch-track,
1066
+ .icen-kb-chunk-keyword-x:focus-visible,
1067
+ .icen-kb-chunk-keyword-input:focus-visible,
1068
+ .icen-kb-segment-block-text:focus-visible,
1069
+ .icen-kb-qa-q:focus,
1070
+ .icen-kb-qa-a:focus {
1071
+ outline: 2px solid Highlight;
1072
+ outline-offset: 1px;
1073
+ box-shadow: none;
1074
+ }
1075
+ }
1076
+
882
1077
  }