@icen.ai/ui 0.9.0 → 0.11.0

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 (431) hide show
  1. package/AGENTS.md +82 -254
  2. package/LICENSE +21 -0
  3. package/README.md +60 -96
  4. package/dist/base.css +258 -188
  5. package/dist/behaviors/accordion.mjs +8 -8
  6. package/dist/behaviors/ai-branch.d.mts +1 -1
  7. package/dist/behaviors/ai-branch.mjs +1011 -94
  8. package/dist/behaviors/ai-chat.d.mts +9 -9
  9. package/dist/behaviors/ai-chat.mjs +1122 -169
  10. package/dist/behaviors/ai-composer.d.mts +47 -15
  11. package/dist/behaviors/ai-composer.mjs +2018 -534
  12. package/dist/behaviors/ai-core.d.mts +1 -1
  13. package/dist/behaviors/ai-core.mjs +1017 -107
  14. package/dist/behaviors/ai-diff.mjs +1020 -127
  15. package/dist/behaviors/ai-feedback.d.mts +1 -1
  16. package/dist/behaviors/ai-feedback.mjs +1036 -126
  17. package/dist/behaviors/ai-panel.d.mts +10 -10
  18. package/dist/behaviors/ai-panel.mjs +1285 -266
  19. package/dist/behaviors/ai-provider.d.mts +1 -1
  20. package/dist/behaviors/ai-provider.mjs +1004 -101
  21. package/dist/behaviors/ai-threads.d.mts +1 -1
  22. package/dist/behaviors/ai-threads.mjs +1069 -154
  23. package/dist/behaviors/ai-tool.d.mts +3 -3
  24. package/dist/behaviors/ai-tool.mjs +2087 -413
  25. package/dist/behaviors/ai-tools.d.mts +89 -16
  26. package/dist/behaviors/ai-tools.mjs +5365 -380
  27. package/dist/behaviors/autocomplete.d.mts +53 -0
  28. package/dist/behaviors/autocomplete.mjs +1601 -0
  29. package/dist/behaviors/back-top.d.mts +1 -1
  30. package/dist/behaviors/back-top.mjs +952 -14
  31. package/dist/behaviors/carousel.d.mts +1 -1
  32. package/dist/behaviors/carousel.mjs +914 -12
  33. package/dist/behaviors/cascader.d.mts +48 -0
  34. package/dist/behaviors/cascader.mjs +1867 -0
  35. package/dist/behaviors/charts.d.mts +72 -8
  36. package/dist/behaviors/charts.mjs +1953 -272
  37. package/dist/behaviors/code-block.d.mts +36 -0
  38. package/dist/behaviors/code-block.mjs +1619 -0
  39. package/dist/behaviors/command-palette.d.mts +9 -6
  40. package/dist/behaviors/command-palette.mjs +164 -62
  41. package/dist/behaviors/context-menu.d.mts +10 -9
  42. package/dist/behaviors/context-menu.mjs +1113 -44
  43. package/dist/behaviors/controls.d.mts +21 -21
  44. package/dist/behaviors/controls.mjs +1024 -134
  45. package/dist/behaviors/copy.d.mts +21 -2
  46. package/dist/behaviors/copy.mjs +1207 -42
  47. package/dist/behaviors/datatable.d.mts +55 -5
  48. package/dist/behaviors/datatable.mjs +2033 -212
  49. package/dist/behaviors/date-picker.d.mts +0 -1
  50. package/dist/behaviors/date-picker.mjs +1341 -293
  51. package/dist/behaviors/design.d.mts +54 -0
  52. package/dist/behaviors/design.mjs +109 -0
  53. package/dist/behaviors/dropdown.d.mts +5 -6
  54. package/dist/behaviors/dropdown.mjs +262 -110
  55. package/dist/behaviors/events.d.mts +127 -10
  56. package/dist/behaviors/events.mjs +58 -3
  57. package/dist/behaviors/feedback.d.mts +30 -0
  58. package/dist/behaviors/feedback.mjs +296 -0
  59. package/dist/behaviors/focus.d.mts +8 -0
  60. package/dist/behaviors/focus.mjs +24 -0
  61. package/dist/behaviors/form-validate.d.mts +111 -0
  62. package/dist/behaviors/form-validate.mjs +1746 -0
  63. package/dist/behaviors/i18n.d.mts +790 -0
  64. package/dist/behaviors/i18n.mjs +1713 -0
  65. package/dist/behaviors/icons.d.mts +93 -0
  66. package/dist/behaviors/icons.mjs +113 -0
  67. package/dist/behaviors/input.d.mts +9 -1
  68. package/dist/behaviors/input.mjs +1059 -60
  69. package/dist/behaviors/kb-access.d.mts +3 -3
  70. package/dist/behaviors/kb-access.mjs +2135 -239
  71. package/dist/behaviors/kb-acl.d.mts +8 -8
  72. package/dist/behaviors/kb-acl.mjs +1120 -179
  73. package/dist/behaviors/kb-answer.d.mts +2 -2
  74. package/dist/behaviors/kb-answer.mjs +2120 -435
  75. package/dist/behaviors/kb-audit.d.mts +3 -3
  76. package/dist/behaviors/kb-audit.mjs +1077 -154
  77. package/dist/behaviors/kb-canvas.d.mts +3 -3
  78. package/dist/behaviors/kb-canvas.mjs +1101 -177
  79. package/dist/behaviors/kb-chain.d.mts +2 -2
  80. package/dist/behaviors/kb-chain.mjs +1023 -100
  81. package/dist/behaviors/kb-checkpoint.d.mts +3 -3
  82. package/dist/behaviors/kb-checkpoint.mjs +1320 -169
  83. package/dist/behaviors/kb-chunks.d.mts +2 -2
  84. package/dist/behaviors/kb-chunks.mjs +1153 -213
  85. package/dist/behaviors/kb-citation.d.mts +3 -3
  86. package/dist/behaviors/kb-citation.mjs +1221 -185
  87. package/dist/behaviors/kb-clarify.d.mts +2 -2
  88. package/dist/behaviors/kb-clarify.mjs +1059 -130
  89. package/dist/behaviors/kb-conflict.d.mts +2 -2
  90. package/dist/behaviors/kb-conflict.mjs +1042 -119
  91. package/dist/behaviors/kb-connector.d.mts +2 -2
  92. package/dist/behaviors/kb-connector.mjs +1105 -176
  93. package/dist/behaviors/kb-core.d.mts +7 -2
  94. package/dist/behaviors/kb-core.mjs +1078 -162
  95. package/dist/behaviors/kb-eval.d.mts +2 -2
  96. package/dist/behaviors/kb-eval.mjs +1977 -144
  97. package/dist/behaviors/kb-explain.d.mts +3 -3
  98. package/dist/behaviors/kb-explain.mjs +1037 -104
  99. package/dist/behaviors/kb-filter.d.mts +2 -2
  100. package/dist/behaviors/kb-filter.mjs +2014 -178
  101. package/dist/behaviors/kb-gap.d.mts +3 -3
  102. package/dist/behaviors/kb-gap.mjs +1044 -121
  103. package/dist/behaviors/kb-hittest.d.mts +3 -3
  104. package/dist/behaviors/kb-hittest.mjs +1095 -151
  105. package/dist/behaviors/kb-metadata.mjs +1058 -130
  106. package/dist/behaviors/kb-passage.d.mts +4 -4
  107. package/dist/behaviors/kb-passage.mjs +1102 -161
  108. package/dist/behaviors/kb-pipeline.d.mts +4 -4
  109. package/dist/behaviors/kb-pipeline.mjs +1083 -162
  110. package/dist/behaviors/kb-qa.mjs +1089 -160
  111. package/dist/behaviors/kb-rerank.d.mts +2 -2
  112. package/dist/behaviors/kb-rerank.mjs +1048 -114
  113. package/dist/behaviors/kb-retrieval.d.mts +2 -2
  114. package/dist/behaviors/kb-retrieval.mjs +2079 -226
  115. package/dist/behaviors/kb-review.d.mts +2 -2
  116. package/dist/behaviors/kb-review.mjs +1996 -159
  117. package/dist/behaviors/kb-sandbox.d.mts +3 -3
  118. package/dist/behaviors/kb-sandbox.mjs +1033 -105
  119. package/dist/behaviors/kb-segment.d.mts +2 -2
  120. package/dist/behaviors/kb-segment.mjs +1112 -179
  121. package/dist/behaviors/kb-select.d.mts +24 -0
  122. package/dist/behaviors/kb-select.mjs +1995 -0
  123. package/dist/behaviors/kb-sources.d.mts +3 -3
  124. package/dist/behaviors/kb-sources.mjs +1085 -170
  125. package/dist/behaviors/kb-sql.d.mts +3 -3
  126. package/dist/behaviors/kb-sql.mjs +1144 -226
  127. package/dist/behaviors/kb-trace.d.mts +3 -3
  128. package/dist/behaviors/kb-trace.mjs +1051 -131
  129. package/dist/behaviors/kb-visibility.d.mts +2 -2
  130. package/dist/behaviors/kb-visibility.mjs +1087 -158
  131. package/dist/behaviors/kb-who-can.d.mts +2 -2
  132. package/dist/behaviors/kb-who-can.mjs +1980 -137
  133. package/dist/behaviors/mentions.d.mts +93 -0
  134. package/dist/behaviors/mentions.mjs +2153 -0
  135. package/dist/behaviors/modal.d.mts +4 -3
  136. package/dist/behaviors/modal.mjs +1056 -33
  137. package/dist/behaviors/nav.d.mts +1 -1
  138. package/dist/behaviors/nav.mjs +6 -6
  139. package/dist/behaviors/notification.d.mts +16 -8
  140. package/dist/behaviors/notification.mjs +1629 -268
  141. package/dist/behaviors/panel.d.mts +4 -0
  142. package/dist/behaviors/panel.mjs +995 -0
  143. package/dist/behaviors/popover.d.mts +28 -5
  144. package/dist/behaviors/popover.mjs +225 -24
  145. package/dist/behaviors/scroll-area.d.mts +17 -0
  146. package/dist/behaviors/scroll-area.mjs +59 -0
  147. package/dist/behaviors/select.d.mts +5 -2
  148. package/dist/behaviors/select.mjs +1416 -117
  149. package/dist/behaviors/sidebar.d.mts +1 -1
  150. package/dist/behaviors/sidebar.mjs +13 -13
  151. package/dist/behaviors/slider.d.mts +1 -1
  152. package/dist/behaviors/slider.mjs +12 -12
  153. package/dist/behaviors/split-pane.d.mts +1 -1
  154. package/dist/behaviors/split-pane.mjs +9 -7
  155. package/dist/behaviors/suggestions.d.mts +27 -0
  156. package/dist/behaviors/suggestions.mjs +1090 -0
  157. package/dist/behaviors/svg-parse.d.mts +14 -0
  158. package/dist/behaviors/svg-parse.mjs +37 -0
  159. package/dist/behaviors/tabs.d.mts +2 -2
  160. package/dist/behaviors/tabs.mjs +35 -25
  161. package/dist/behaviors/tag-input.d.mts +23 -5
  162. package/dist/behaviors/tag-input.mjs +1360 -104
  163. package/dist/behaviors/theme-switcher.d.mts +24 -0
  164. package/dist/behaviors/theme-switcher.mjs +1996 -0
  165. package/dist/behaviors/theme.d.mts +15 -8
  166. package/dist/behaviors/theme.mjs +406 -30
  167. package/dist/behaviors/toast.d.mts +24 -25
  168. package/dist/behaviors/toast.mjs +1267 -88
  169. package/dist/behaviors/tooltip.d.mts +4 -0
  170. package/dist/behaviors/tooltip.mjs +378 -0
  171. package/dist/behaviors/tree-select.d.mts +69 -0
  172. package/dist/behaviors/tree-select.mjs +1921 -0
  173. package/dist/behaviors/tree.d.mts +1 -1
  174. package/dist/behaviors/tree.mjs +18 -18
  175. package/dist/behaviors/upload.d.mts +3 -2
  176. package/dist/behaviors/upload.mjs +1077 -66
  177. package/dist/behaviors/url-safety.d.mts +8 -0
  178. package/dist/behaviors/url-safety.mjs +11 -0
  179. package/dist/cli.mjs +5 -6
  180. package/dist/components/accordion.d.mts +2 -0
  181. package/dist/components/ai-branch.d.mts +2 -0
  182. package/dist/components/ai-chat.css +682 -582
  183. package/dist/components/ai-chat.d.mts +2 -0
  184. package/dist/components/ai-composer.d.mts +2 -0
  185. package/dist/components/ai-context.d.mts +2 -0
  186. package/dist/components/ai-context.mjs +1 -0
  187. package/dist/components/ai-diff.css +153 -132
  188. package/dist/components/ai-diff.d.mts +2 -0
  189. package/dist/components/ai-feedback.d.mts +2 -0
  190. package/dist/components/ai-files.d.mts +2 -0
  191. package/dist/components/ai-message.d.mts +2 -0
  192. package/dist/components/ai-panel.css +353 -343
  193. package/dist/components/ai-reasoning.d.mts +2 -0
  194. package/dist/components/ai-subagent.d.mts +2 -0
  195. package/dist/components/ai-subagent.mjs +1 -0
  196. package/dist/components/ai-threads.d.mts +2 -0
  197. package/dist/components/ai-todo.d.mts +2 -0
  198. package/dist/components/ai-todo.mjs +1 -0
  199. package/dist/components/ai-tool-call.d.mts +2 -0
  200. package/dist/components/ai-tool-call.mjs +1 -0
  201. package/dist/components/ai-tool.css +397 -242
  202. package/dist/components/ai-usage.d.mts +2 -0
  203. package/dist/components/alert.d.mts +2 -0
  204. package/dist/components/autocomplete.css +61 -0
  205. package/dist/components/autocomplete.d.mts +2 -0
  206. package/dist/components/autocomplete.mjs +3 -0
  207. package/dist/components/avatar.d.mts +2 -0
  208. package/dist/components/back-top.css +74 -40
  209. package/dist/components/back-top.d.mts +2 -0
  210. package/dist/components/badge.css +44 -41
  211. package/dist/components/badge.d.mts +2 -0
  212. package/dist/components/breadcrumb.css +85 -46
  213. package/dist/components/breadcrumb.d.mts +2 -0
  214. package/dist/components/btn.css +105 -94
  215. package/dist/components/btn.d.mts +2 -0
  216. package/dist/components/card.css +124 -113
  217. package/dist/components/card.d.mts +2 -0
  218. package/dist/components/carousel.d.mts +2 -0
  219. package/dist/components/cascader.css +332 -0
  220. package/dist/components/cascader.d.mts +2 -0
  221. package/dist/components/cascader.mjs +3 -0
  222. package/dist/components/chart-area.css +54 -2
  223. package/dist/components/chart-area.d.mts +2 -0
  224. package/dist/components/chart-bar.css +147 -38
  225. package/dist/components/chart-bar.d.mts +2 -0
  226. package/dist/components/chart-calendar.d.mts +2 -0
  227. package/dist/components/chart-gauge.css +36 -13
  228. package/dist/components/chart-gauge.d.mts +2 -0
  229. package/dist/components/chart-graph.css +35 -20
  230. package/dist/components/chart-graph.d.mts +2 -0
  231. package/dist/components/chart-heatmap.css +67 -39
  232. package/dist/components/chart-heatmap.d.mts +2 -0
  233. package/dist/components/chart-line.css +62 -3
  234. package/dist/components/chart-line.d.mts +2 -0
  235. package/dist/components/chart-map.d.mts +2 -0
  236. package/dist/components/chart-pie.css +38 -6
  237. package/dist/components/chart-pie.d.mts +2 -0
  238. package/dist/components/chart-radar.css +57 -5
  239. package/dist/components/chart-radar.d.mts +2 -0
  240. package/dist/components/chart-scatter.css +47 -7
  241. package/dist/components/chart-scatter.d.mts +2 -0
  242. package/dist/components/chart-sparkline.css +25 -2
  243. package/dist/components/chart-sparkline.d.mts +2 -0
  244. package/dist/components/chart-stack.css +27 -13
  245. package/dist/components/chart-stack.d.mts +2 -0
  246. package/dist/components/charts.css +220 -84
  247. package/dist/components/charts.d.mts +2 -0
  248. package/dist/components/code-block.css +420 -0
  249. package/dist/components/code-block.d.mts +2 -0
  250. package/dist/components/code-block.mjs +4 -0
  251. package/dist/components/command-palette.css +150 -122
  252. package/dist/components/command-palette.d.mts +2 -0
  253. package/dist/components/content.css +274 -263
  254. package/dist/components/context-menu.d.mts +2 -0
  255. package/dist/components/copy.css +73 -45
  256. package/dist/components/copy.d.mts +2 -0
  257. package/dist/components/datatable.css +457 -202
  258. package/dist/components/datatable.d.mts +2 -0
  259. package/dist/components/date-picker.css +136 -105
  260. package/dist/components/date-picker.d.mts +2 -0
  261. package/dist/components/desc.d.mts +2 -0
  262. package/dist/components/dropdown.d.mts +2 -0
  263. package/dist/components/empty.css +72 -69
  264. package/dist/components/empty.d.mts +2 -0
  265. package/dist/components/feedback.css +211 -191
  266. package/dist/components/form-validate.css +134 -0
  267. package/dist/components/form-validate.d.mts +2 -0
  268. package/dist/components/form-validate.mjs +3 -0
  269. package/dist/components/form.css +157 -131
  270. package/dist/components/form.d.mts +2 -0
  271. package/dist/components/icon.css +113 -0
  272. package/dist/components/icon.d.mts +2 -0
  273. package/dist/components/icon.mjs +3 -0
  274. package/dist/components/input.css +163 -108
  275. package/dist/components/input.d.mts +2 -0
  276. package/dist/components/kb-access.d.mts +2 -0
  277. package/dist/components/kb-acl.d.mts +2 -0
  278. package/dist/components/kb-agent.css +300 -206
  279. package/dist/components/kb-answer.d.mts +2 -0
  280. package/dist/components/kb-audit.d.mts +2 -0
  281. package/dist/components/kb-canvas.d.mts +2 -0
  282. package/dist/components/kb-chain.d.mts +2 -0
  283. package/dist/components/kb-checkpoint.d.mts +2 -0
  284. package/dist/components/kb-chunks.d.mts +2 -0
  285. package/dist/components/kb-citation.d.mts +2 -0
  286. package/dist/components/kb-clarify.d.mts +2 -0
  287. package/dist/components/kb-conflict.d.mts +2 -0
  288. package/dist/components/kb-connector.d.mts +2 -0
  289. package/dist/components/kb-data.css +431 -315
  290. package/dist/components/kb-eval.d.mts +2 -0
  291. package/dist/components/kb-explain.d.mts +2 -0
  292. package/dist/components/kb-filter.d.mts +2 -0
  293. package/dist/components/kb-gap.d.mts +2 -0
  294. package/dist/components/kb-ground.css +333 -229
  295. package/dist/components/kb-hittest.d.mts +2 -0
  296. package/dist/components/kb-ingest.css +613 -434
  297. package/dist/components/kb-metadata.d.mts +2 -0
  298. package/dist/components/kb-ops.css +422 -302
  299. package/dist/components/kb-passage.d.mts +2 -0
  300. package/dist/components/kb-perm.css +374 -314
  301. package/dist/components/kb-pipeline.d.mts +2 -0
  302. package/dist/components/kb-qa.d.mts +2 -0
  303. package/dist/components/kb-rerank.d.mts +2 -0
  304. package/dist/components/kb-retrieval.d.mts +2 -0
  305. package/dist/components/kb-review.d.mts +2 -0
  306. package/dist/components/kb-sandbox.d.mts +2 -0
  307. package/dist/components/kb-search.css +653 -459
  308. package/dist/components/kb-segment.d.mts +2 -0
  309. package/dist/components/kb-sources.d.mts +2 -0
  310. package/dist/components/kb-sql.d.mts +2 -0
  311. package/dist/components/kb-trace.d.mts +2 -0
  312. package/dist/components/kb-visibility.d.mts +2 -0
  313. package/dist/components/kb-who-can.d.mts +2 -0
  314. package/dist/components/kb.css +170 -135
  315. package/dist/components/kb.d.mts +2 -0
  316. package/dist/components/kbd.d.mts +2 -0
  317. package/dist/components/layout.css +86 -83
  318. package/dist/components/layout.d.mts +2 -0
  319. package/dist/components/list.d.mts +2 -0
  320. package/dist/components/material-chinese.css +83 -0
  321. package/dist/components/material-soviet.css +86 -0
  322. package/dist/components/material.css +318 -0
  323. package/dist/components/media-card.d.mts +2 -0
  324. package/dist/components/media.css +225 -176
  325. package/dist/components/mentions.css +190 -0
  326. package/dist/components/mentions.d.mts +2 -0
  327. package/dist/components/mentions.mjs +3 -0
  328. package/dist/components/menu.css +121 -109
  329. package/dist/components/modal.css +116 -118
  330. package/dist/components/modal.d.mts +2 -0
  331. package/dist/components/nav.css +136 -129
  332. package/dist/components/nav.d.mts +2 -0
  333. package/dist/components/notification.css +247 -177
  334. package/dist/components/notification.d.mts +2 -0
  335. package/dist/components/pagination.css +62 -57
  336. package/dist/components/pagination.d.mts +2 -0
  337. package/dist/components/panel.css +70 -68
  338. package/dist/components/panel.d.mts +2 -0
  339. package/dist/components/panel.mjs +1 -0
  340. package/dist/components/pill.css +83 -72
  341. package/dist/components/pill.d.mts +2 -0
  342. package/dist/components/popover.css +80 -57
  343. package/dist/components/popover.d.mts +2 -0
  344. package/dist/components/progress.d.mts +2 -0
  345. package/dist/components/rating.d.mts +2 -0
  346. package/dist/components/result.d.mts +2 -0
  347. package/dist/components/scroll-area.css +29 -54
  348. package/dist/components/scroll-area.d.mts +2 -0
  349. package/dist/components/scroll-area.mjs +1 -0
  350. package/dist/components/segmented.css +167 -146
  351. package/dist/components/segmented.d.mts +2 -0
  352. package/dist/components/select.css +250 -191
  353. package/dist/components/select.d.mts +2 -0
  354. package/dist/components/sidebar.css +157 -143
  355. package/dist/components/sidebar.d.mts +2 -0
  356. package/dist/components/skeleton.d.mts +2 -0
  357. package/dist/components/slider.css +135 -128
  358. package/dist/components/slider.d.mts +2 -0
  359. package/dist/components/spinner.d.mts +2 -0
  360. package/dist/components/split-pane.css +120 -108
  361. package/dist/components/split-pane.d.mts +2 -0
  362. package/dist/components/stat.css +116 -109
  363. package/dist/components/stat.d.mts +2 -0
  364. package/dist/components/steps.css +114 -108
  365. package/dist/components/steps.d.mts +2 -0
  366. package/dist/components/switch.css +192 -149
  367. package/dist/components/switch.d.mts +2 -0
  368. package/dist/components/table.css +158 -112
  369. package/dist/components/table.d.mts +2 -0
  370. package/dist/components/tabs.css +143 -116
  371. package/dist/components/tabs.d.mts +2 -0
  372. package/dist/components/tag-input.css +52 -133
  373. package/dist/components/tag-input.d.mts +2 -0
  374. package/dist/components/tag.css +90 -72
  375. package/dist/components/tag.d.mts +2 -0
  376. package/dist/components/theme-switcher.css +105 -0
  377. package/dist/components/theme-switcher.d.mts +2 -0
  378. package/dist/components/theme-switcher.mjs +3 -0
  379. package/dist/components/timeline.d.mts +2 -0
  380. package/dist/components/toast.css +115 -97
  381. package/dist/components/toast.d.mts +2 -0
  382. package/dist/components/toolbar.css +47 -43
  383. package/dist/components/toolbar.d.mts +2 -0
  384. package/dist/components/tooltip.css +103 -43
  385. package/dist/components/tooltip.d.mts +2 -0
  386. package/dist/components/tooltip.mjs +1 -0
  387. package/dist/components/tree-select.css +439 -0
  388. package/dist/components/tree-select.d.mts +2 -0
  389. package/dist/components/tree-select.mjs +3 -0
  390. package/dist/components/tree.d.mts +2 -0
  391. package/dist/components/upload.css +138 -97
  392. package/dist/components/upload.d.mts +2 -0
  393. package/dist/fonts/LICENSES/ark-pixel/OFL.txt +96 -0
  394. package/dist/fonts/LICENSES/cubic-11/OFL.txt +108 -0
  395. package/dist/fonts/LICENSES/galmuri/LICENSE.txt +93 -0
  396. package/dist/fonts/OFL.txt +96 -0
  397. package/dist/fonts/README.md +14 -0
  398. package/dist/fonts/fusion-pixel-12px-zh-hans.woff2 +0 -0
  399. package/dist/index.d.mts +85 -70
  400. package/dist/index.mjs +17330 -5773
  401. package/dist/react.d.mts +91 -0
  402. package/dist/react.mjs +8307 -0
  403. package/dist/registry.json +918 -70
  404. package/dist/tokens/chinese.css +44 -0
  405. package/dist/tokens/colors.css +371 -1222
  406. package/dist/tokens/design.css +209 -0
  407. package/dist/tokens/dtcg.json +15926 -0
  408. package/dist/tokens/figma.variables.json +10779 -0
  409. package/dist/tokens/icon-masks.css +78 -0
  410. package/dist/tokens/pixel.css +53 -0
  411. package/dist/tokens/scrollbars.css +40 -0
  412. package/dist/tokens/soviet.css +44 -0
  413. package/dist/tokens/style-profiles.css +36 -547
  414. package/dist/tokens/themes.json +308 -0
  415. package/dist/tokens/tokens-studio.json +11648 -0
  416. package/dist/tokens/typography.css +21 -18
  417. package/dist/tokens.css +1783 -1806
  418. package/dist/ui.css +14796 -10750
  419. package/dist/vue.d.mts +344 -0
  420. package/dist/vue.mjs +7876 -0
  421. package/docs/spec/ai-input-experience.md +75 -0
  422. package/docs/spec/ai-native.md +238 -147
  423. package/docs/spec/design-philosophy.md +189 -0
  424. package/docs/spec/design-primitives.md +196 -0
  425. package/docs/spec/kb-family.md +147 -115
  426. package/docs/spec/scrollbars.md +46 -0
  427. package/package.json +56 -8
  428. package/dist/retro-effects.css +0 -255
  429. package/dist/tokens/retro-effects.css +0 -255
  430. package/docs/research/2026-10-03-ai-kb-components.md +0 -392
  431. package/docs/research/2026-10-03-kb-permissions.md +0 -992
@@ -1,701 +1,773 @@
1
+ @layer icen.components {
1
2
  /*
2
3
  * @icen.ai/ui — kb-search.css(检索域:kb-retrieval / kb-filter / kb-rerank / kb-hittest)
3
- * 共享原语在 kb.css(.kb-score/.kb-hit mark/.kb-chip/.kb-num/.kb-badge/.kb-empty…),
4
+ * 共享原语在 kb.css(.icen-kb-score/.icen-kb-hit mark/.icen-kb-chip/.icen-kb-num/.icen-kb-badge/.icen-kb-empty…),
4
5
  * 本文件只做本域专属结构。DOM 契约见 docs/spec/kb-family.md §5.11–5.14 与各 behavior 头注释。
5
6
  *
6
7
  * 域内纪律(spec §2):
7
8
  * - 参数栏 gap 8、控件高 28;行基元 28px 节奏;组内 8px、区块 12–16px
8
9
  * - accent 稀缺:每个视图唯一 accent 级操作(检索「运行」/ 测试「运行全部」);其余 ghost 24px
9
- * - 数字一律 .kb-num(mono + tabular-nums);元信息 11–11.5px faint
10
+ * - 数字一律 .icen-kb-num(mono + tabular-nums);元信息 11–12px faint
10
11
  * - 显式禁用不隐藏(alpha 脱离混合模式 / 阈值脱离重排 / 组深度达上限 → .is-off + disabled)
11
- * - 只用 --token-* 与 kb.css 原语;动效 ≤240ms ease-out;reduced-motion 走全局规则
12
+ * - 只用 --icen-token-* 与 kb.css 原语;动效 ≤240ms ease-out;reduced-motion 走全局规则
12
13
  */
13
14
 
14
15
  /* ══════════════ 0. 域内共享控件基元 ══════════════ */
15
16
 
16
- /* 文本输入(query / 过滤字段 / 过滤值 / 新增问题) */
17
- .kb-retrieval-query,
18
- .kb-hittest-input,
19
- .kb-filter-field,
20
- .kb-filter-value {
21
- height: 28px;
22
- padding: 0 10px;
23
- font: inherit;
24
- font-size: 12.5px;
25
- color: var(--token-text);
26
- background: var(--token-bg);
27
- border: 1px solid var(--token-line-soft);
28
- border-radius: var(--radius-sm, 6px);
29
- transition: border-color 0.16s ease-out;
30
- }
31
- .kb-retrieval-query::placeholder,
32
- .kb-hittest-input::placeholder,
33
- .kb-filter-field::placeholder,
34
- .kb-filter-value::placeholder {
35
- color: var(--token-text-faint);
36
- }
37
- .kb-retrieval-query:focus-visible,
38
- .kb-hittest-input:focus-visible,
39
- .kb-filter-field:focus-visible,
40
- .kb-filter-value:focus-visible,
41
- .kb-filter-op:focus-visible {
42
- outline: none;
43
- border-color: var(--token-accent);
44
- }
45
- .kb-filter-field:disabled,
46
- .kb-filter-value:disabled {
47
- opacity: var(--icen-disabled-opacity, 0.5);
48
- cursor: not-allowed;
49
- }
17
+ /* 文本输入视觉随 input.css;本域只负责宽度与 flex 分配。 */
50
18
 
51
19
  /* 滑杆(alpha 混合权重 / 分数阈值):自实现简单拖杆,input[type=range] 样式化 */
52
- .kb-range {
20
+ .icen-kb-range {
53
21
  -webkit-appearance: none;
54
22
  appearance: none;
55
23
  width: 96px;
56
- height: 28px;
24
+ height: var(--icen-density-item-height);
57
25
  margin: 0;
26
+ border-radius: var(--icen-radius-full);
58
27
  background: transparent;
59
- accent-color: var(--token-accent);
28
+ accent-color: var(--icen-token-accent);
60
29
  cursor: pointer;
61
30
  }
62
- .kb-range::-webkit-slider-runnable-track {
31
+ .icen-kb-range::-webkit-slider-runnable-track {
63
32
  height: 3px;
64
- border-radius: 2px;
65
- background: var(--token-line-soft);
33
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
34
+ background: var(--icen-token-line-soft);
66
35
  }
67
- .kb-range::-webkit-slider-thumb {
36
+ .icen-kb-range::-webkit-slider-thumb {
68
37
  -webkit-appearance: none;
69
38
  appearance: none;
70
39
  width: 11px;
71
40
  height: 11px;
72
41
  margin-top: -4px;
73
42
  border-radius: 50%;
74
- background: var(--token-bg);
75
- border: 1.5px solid var(--token-text-muted);
76
- transition: border-color 0.16s ease-out;
43
+ background: var(--icen-token-surface);
44
+ border: 1.5px solid var(--icen-token-text-muted);
45
+ transition: border-color var(--icen-tx-fast), background-color var(--icen-tx-fast);
77
46
  }
78
- .kb-range:hover:not(:disabled)::-webkit-slider-thumb {
79
- border-color: var(--token-text);
47
+ .icen-kb-range:hover:not(:disabled)::-webkit-slider-thumb {
48
+ border-color: var(--icen-token-text);
80
49
  }
81
- .kb-range::-moz-range-track {
50
+ .icen-kb-range:active:not(:disabled)::-webkit-slider-thumb {
51
+ border-color: var(--icen-token-accent-strong);
52
+ }
53
+ .icen-kb-range::-moz-range-track {
82
54
  height: 3px;
83
- border-radius: 2px;
84
- background: var(--token-line-soft);
55
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
56
+ background: var(--icen-token-line-soft);
85
57
  }
86
- .kb-range::-moz-range-thumb {
87
- width: 9px;
88
- height: 9px;
58
+ .icen-kb-range::-moz-range-thumb {
59
+ width: 11px;
60
+ height: 11px;
89
61
  border-radius: 50%;
90
- background: var(--token-bg);
91
- border: 1.5px solid var(--token-text-muted);
62
+ background: var(--icen-token-surface);
63
+ border: 1.5px solid var(--icen-token-text-muted);
64
+ transition: border-color var(--icen-tx-fast), background-color var(--icen-tx-fast);
65
+ }
66
+ .icen-kb-range:hover:not(:disabled)::-moz-range-thumb {
67
+ border-color: var(--icen-token-text);
92
68
  }
93
- .kb-range:disabled {
94
- opacity: 0.45;
69
+ .icen-kb-range:active:not(:disabled)::-moz-range-thumb {
70
+ border-color: var(--icen-token-accent-strong);
71
+ }
72
+ .icen-kb-range:disabled {
73
+ opacity: var(--icen-disabled-opacity);
95
74
  cursor: not-allowed;
96
75
  }
97
- .kb-range:focus-visible {
98
- outline: 2px solid var(--token-accent);
99
- outline-offset: 2px;
76
+ .icen-kb-range:focus-visible {
77
+ outline: none;
78
+ box-shadow: var(--icen-ring);
100
79
  }
101
80
 
102
81
  /* 开关(重排 / 重排对比):中性色——accent 留给运行钮 */
103
- .kb-switch {
82
+ .icen-kb-switch {
104
83
  position: relative;
105
84
  flex: 0 0 auto;
106
85
  width: 30px;
107
86
  height: 17px;
108
87
  padding: 0;
109
- border-radius: 999px;
110
- border: 1px solid var(--token-line-soft);
111
- background: var(--token-bg-soft);
88
+ border-radius: var(--icen-radius-full);
89
+ border: 1px solid var(--icen-token-line-soft);
90
+ background: var(--icen-token-bg-soft);
112
91
  cursor: pointer;
113
- transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
92
+ transition: background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
114
93
  }
115
- .kb-switch::after {
94
+ /* 视觉尺寸保持 30×17,命中区扩到 36×27(WCAG 2.5.8 下限),不改变排版占位 */
95
+ .icen-kb-switch::before {
96
+ content: '';
97
+ position: absolute;
98
+ inset: -5px -3px;
99
+ border-radius: var(--icen-radius-full);
100
+ }
101
+ .icen-kb-switch::after {
116
102
  content: '';
117
103
  position: absolute;
118
104
  top: 2px;
119
- left: 2px;
105
+ left: 2px; /* guard:allow-physical 开关是物理隐喻控件(RTL 下方向保持物理,不镜像) */
120
106
  width: 11px;
121
107
  height: 11px;
122
108
  border-radius: 50%;
123
- background: var(--token-text-faint);
124
- transition: transform 0.16s ease-out, background-color 0.16s ease-out;
109
+ background: var(--icen-token-text-muted);
110
+ transition: transform var(--icen-tx-fast), background-color var(--icen-tx-fast);
111
+ }
112
+ .icen-kb-switch:hover:not(:disabled):not([aria-checked='true']) {
113
+ background: var(--icen-token-fill-hover);
114
+ border-color: var(--icen-token-line);
125
115
  }
126
- .kb-switch[aria-checked='true'] {
127
- background: color-mix(in srgb, var(--token-text) 10%, transparent);
128
- border-color: var(--token-line);
116
+ .icen-kb-switch:active:not(:disabled):not([aria-checked='true']) {
117
+ background: var(--icen-token-fill-pressed);
129
118
  }
130
- .kb-switch[aria-checked='true']::after {
131
- transform: translateX(13px);
132
- background: var(--token-text);
119
+ .icen-kb-switch[aria-checked='true'] {
120
+ background: color-mix(in srgb, var(--icen-token-text) 12%, transparent);
121
+ border-color: var(--icen-token-line);
133
122
  }
134
- .kb-switch:focus-visible {
135
- outline: 2px solid var(--token-accent);
136
- outline-offset: 2px;
123
+ .icen-kb-switch[aria-checked='true']:hover:not(:disabled) {
124
+ background: color-mix(in srgb, var(--icen-token-text) 16%, transparent);
125
+ border-color: var(--icen-token-line-strong);
137
126
  }
138
- .kb-toggle {
127
+ .icen-kb-switch[aria-checked='true']:active:not(:disabled) {
128
+ background: color-mix(in srgb, var(--icen-token-text) 20%, transparent);
129
+ }
130
+ .icen-kb-switch[aria-checked='true']::after {
131
+ transform: translateX(13px); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
132
+ background: var(--icen-token-text);
133
+ }
134
+ .icen-kb-switch:disabled {
135
+ opacity: var(--icen-disabled-opacity);
136
+ cursor: not-allowed;
137
+ pointer-events: none;
138
+ }
139
+ .icen-kb-switch:focus-visible {
140
+ outline: none;
141
+ box-shadow: var(--icen-ring);
142
+ }
143
+ .icen-kb-toggle {
139
144
  display: inline-flex;
140
145
  align-items: center;
141
146
  gap: 6px;
142
147
  }
143
- .kb-toggle-label {
144
- font-size: 12px;
145
- color: var(--token-text-muted);
148
+ .icen-kb-toggle-label {
149
+ font-size: var(--icen-density-font-size-xs);
150
+ color: var(--icen-token-text-muted);
146
151
  }
147
152
 
148
153
  /* 运行钮:本视图唯一 accent 级操作(btn-primary 语义,域内自持样式) */
149
- .kb-run {
154
+ .icen-kb-run {
150
155
  display: inline-flex;
151
156
  align-items: center;
152
157
  gap: 6px;
153
- height: 28px;
154
- padding: 0 14px;
158
+ height: var(--icen-density-item-height);
159
+ padding: 0 12px;
155
160
  font: inherit;
156
- font-size: 12.5px;
161
+ font-size: var(--icen-density-font-size-md);
157
162
  font-weight: 600;
158
- letter-spacing: 0.02em;
159
- color: var(--token-on-accent);
160
- background: var(--token-accent);
161
- border: 1px solid var(--token-accent);
162
- border-radius: var(--radius-sm, 6px);
163
+ letter-spacing: var(--icen-letter-spacing-control);
164
+ color: var(--icen-token-on-accent);
165
+ background: var(--icen-token-accent-strong);
166
+ border: 1px solid var(--icen-token-accent-strong);
167
+ border-radius: var(--icen-control-radius);
163
168
  cursor: pointer;
164
- transition: background-color 0.16s ease-out, border-color 0.16s ease-out, opacity 0.16s ease-out;
169
+ transition: background-color var(--icen-tx-fast), border-color var(--icen-tx-fast), opacity var(--icen-tx-fast);
165
170
  }
166
- .kb-run svg {
167
- width: 12px;
168
- height: 12px;
171
+ .icen-kb-run svg {
172
+ width: 14px;
173
+ height: 14px;
169
174
  }
170
- .kb-run:hover:not(:disabled) {
171
- background: var(--token-accent-deep, var(--token-accent));
172
- border-color: var(--token-accent-deep, var(--token-accent));
175
+ .icen-kb-run:hover:not(:disabled) {
176
+ background: var(--icen-token-accent-deep);
177
+ border-color: var(--icen-token-accent-deep);
173
178
  }
174
- .kb-run:disabled {
175
- opacity: var(--icen-disabled-opacity, 0.5);
179
+ .icen-kb-run:active:not(:disabled) {
180
+ background: color-mix(in srgb, var(--icen-token-accent-deep) 88%, var(--icen-token-text));
181
+ border-color: color-mix(in srgb, var(--icen-token-accent-deep) 88%, var(--icen-token-text));
182
+ }
183
+ .icen-kb-run:focus-visible {
184
+ outline: none;
185
+ box-shadow: var(--icen-ring);
186
+ }
187
+ .icen-kb-run:disabled {
188
+ opacity: var(--icen-disabled-opacity);
176
189
  cursor: not-allowed;
177
190
  pointer-events: none;
178
191
  }
179
192
 
180
193
  /* ghost 操作钮(24px:filter 增删 / DSL 复制 / hittest pin 与删除 / 参数复制) */
181
- .kb-params-copy,
182
- .kb-filter-act,
183
- .kb-hittest-pin,
184
- .kb-hittest-remove {
194
+ .icen-kb-params-copy,
195
+ .icen-kb-filter-act,
196
+ .icen-kb-hittest-pin,
197
+ .icen-kb-hittest-remove {
185
198
  display: inline-flex;
186
199
  align-items: center;
187
200
  justify-content: center;
201
+ gap: 4px;
188
202
  width: 24px;
189
203
  height: 24px;
190
204
  padding: 0;
191
205
  font: inherit;
192
- font-size: 12.5px;
206
+ font-size: var(--icen-density-font-size-xs);
193
207
  line-height: 1;
194
- color: var(--token-text-muted);
208
+ color: var(--icen-token-text-muted);
195
209
  background: transparent;
196
210
  border: 1px solid transparent;
197
- border-radius: var(--radius-sm, 6px);
211
+ border-radius: var(--icen-radius-sm);
198
212
  cursor: pointer;
199
- transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
200
- }
201
- .kb-params-copy:hover,
202
- .kb-filter-act:hover:not(:disabled),
203
- .kb-hittest-pin:hover,
204
- .kb-hittest-remove:hover {
205
- color: var(--token-text);
206
- background: var(--token-bg-soft);
207
- border-color: var(--token-line-soft);
208
- }
209
- .kb-filter-act:disabled {
210
- opacity: var(--icen-disabled-opacity, 0.45);
213
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
214
+ }
215
+ .icen-kb-params-copy:hover,
216
+ .icen-kb-filter-act:hover:not(:disabled),
217
+ .icen-kb-hittest-pin:hover,
218
+ .icen-kb-hittest-remove:hover {
219
+ color: var(--icen-token-text);
220
+ background: var(--icen-token-fill-hover);
221
+ border-color: var(--icen-token-line-soft);
222
+ }
223
+ .icen-kb-params-copy:active,
224
+ .icen-kb-filter-act:active:not(:disabled),
225
+ .icen-kb-hittest-pin:active,
226
+ .icen-kb-hittest-remove:active {
227
+ background: var(--icen-token-fill-pressed);
228
+ border-color: var(--icen-token-line);
229
+ }
230
+ .icen-kb-params-copy:focus-visible,
231
+ .icen-kb-filter-act:focus-visible,
232
+ .icen-kb-hittest-pin:focus-visible,
233
+ .icen-kb-hittest-remove:focus-visible {
234
+ outline: none;
235
+ box-shadow: var(--icen-ring);
236
+ }
237
+ .icen-kb-filter-act:disabled {
238
+ opacity: var(--icen-disabled-opacity);
211
239
  cursor: not-allowed;
212
240
  }
213
- .kb-filter-act.is-danger:hover:not(:disabled),
214
- .kb-hittest-remove:hover {
215
- color: var(--token-danger, var(--token-error));
241
+ .icen-kb-filter-act.is-danger:hover:not(:disabled),
242
+ .icen-kb-hittest-remove:hover {
243
+ color: var(--icen-token-error);
244
+ background: var(--icen-token-error-muted);
245
+ border-color: color-mix(in srgb, var(--icen-token-error) 38%, transparent);
216
246
  }
217
- .kb-params-copy.is-copied,
218
- .kb-filter-dsl-copy.is-copied {
219
- color: var(--token-success);
247
+ .icen-kb-params-copy.is-copied,
248
+ .icen-kb-filter-dsl-copy.is-copied {
249
+ color: var(--icen-token-success);
220
250
  }
221
- .kb-params-copy {
222
- width: 22px;
223
- height: 22px;
251
+ .icen-kb-params-copy {
252
+ width: 24px; /* WCAG 2.5.8 下限(22 → 24) */
253
+ height: 24px;
224
254
  }
225
- .kb-params-copy svg {
226
- width: 12px;
227
- height: 12px;
255
+ .icen-kb-params-copy svg {
256
+ width: 13px;
257
+ height: 13px;
228
258
  }
229
259
 
230
260
  /* scoreKind 微型 chip(retrieval hit / rerank 列头共用) */
231
- .kb-chip--kind {
232
- font-size: 10px;
233
- padding: 1px 6px;
234
- color: var(--token-text-faint);
261
+ .icen-kb-chip--kind {
262
+ font-size: var(--icen-density-font-size-xs);
263
+ letter-spacing: 0.01em;
264
+ padding: 0 6px;
265
+ color: var(--icen-token-text-faint);
235
266
  }
236
267
 
237
268
  /* ══════════════ 1. kb-retrieval 检索 playground ══════════════ */
238
269
 
239
- .kb-retrieval {
270
+ .icen-kb-retrieval {
240
271
  display: flex;
241
272
  flex-direction: column;
242
273
  gap: 12px;
243
274
  }
244
275
 
245
- .kb-retrieval-bar {
276
+ .icen-kb-retrieval-bar {
246
277
  display: flex;
247
278
  flex-wrap: wrap;
248
279
  align-items: center;
249
- gap: 10px 14px;
280
+ gap: 10px 12px;
250
281
  }
251
282
 
252
- .kb-retrieval-query {
283
+ .icen-kb-retrieval-query {
253
284
  flex: 1 1 200px;
254
285
  min-width: 160px;
255
286
  }
256
287
 
257
288
  /* 模式 segmented(向量|关键词|混合):激活态用层级色,不与运行钮抢 accent */
258
- .kb-modes {
289
+ .icen-kb-modes {
259
290
  display: inline-flex;
260
291
  align-items: center;
261
292
  gap: 2px;
262
293
  box-sizing: border-box;
263
- height: 28px;
264
- padding: 2px;
265
- background: var(--token-bg-soft);
266
- border: 1px solid var(--token-line-soft);
267
- border-radius: var(--radius-sm, 6px);
268
- }
269
- .kb-mode-item {
270
- height: 22px;
294
+ height: var(--icen-density-item-height);
295
+ padding: 1px;
296
+ background: var(--icen-token-bg-soft);
297
+ border: 1px solid var(--icen-token-line-soft);
298
+ border-radius: var(--icen-radius-sm);
299
+ }
300
+ .icen-kb-mode-item {
301
+ height: 24px;
271
302
  padding: 0 10px;
272
303
  font: inherit;
273
- font-size: 12px;
304
+ font-size: var(--icen-density-font-size-md);
305
+ font-weight: 500;
274
306
  line-height: 1;
275
- color: var(--token-text-muted);
307
+ color: var(--icen-token-text-muted);
276
308
  background: transparent;
277
309
  border: none;
278
- border-radius: 4px;
310
+ border-radius: max(0px, calc(var(--icen-radius-sm) - 2px));
279
311
  cursor: pointer;
280
- transition: color 0.16s ease-out, background-color 0.16s ease-out;
312
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
281
313
  }
282
- .kb-mode-item:hover {
283
- color: var(--token-text);
314
+ .icen-kb-mode-item:hover:not(.is-active) {
315
+ color: var(--icen-token-text);
316
+ background: var(--icen-token-fill-hover);
284
317
  }
285
- .kb-mode-item.is-active {
286
- background: var(--token-bg);
287
- color: var(--token-text);
288
- font-weight: 600;
289
- box-shadow: var(--token-shadow-inset);
318
+ .icen-kb-mode-item:active:not(.is-active) {
319
+ background: var(--icen-token-fill-pressed);
290
320
  }
291
- .kb-mode-item:focus-visible {
292
- outline: 2px solid var(--token-accent);
293
- outline-offset: -2px;
321
+ .icen-kb-mode-item.is-active {
322
+ background: var(--icen-token-surface-raised);
323
+ color: var(--icen-token-text);
324
+ box-shadow: var(--icen-token-shadow-control);
325
+ }
326
+ .icen-kb-mode-item:focus-visible {
327
+ outline: none;
328
+ box-shadow: var(--icen-ring);
294
329
  }
295
330
 
296
331
  /* topK 步进器 */
297
- .kb-step {
332
+ .icen-kb-step {
298
333
  display: inline-flex;
299
334
  align-items: center;
300
- height: 28px;
335
+ height: var(--icen-density-item-height);
301
336
  overflow: hidden;
302
- background: var(--token-bg);
303
- border: 1px solid var(--token-line-soft);
304
- border-radius: var(--radius-sm, 6px);
337
+ background: var(--icen-token-bg);
338
+ border: 1px solid var(--icen-token-line-soft);
339
+ border-radius: var(--icen-radius-sm);
340
+ transition: box-shadow var(--icen-tx-fast);
305
341
  }
306
- .kb-step-btn {
342
+ .icen-kb-step:has(.icen-kb-step-btn:focus-visible) {
343
+ box-shadow: var(--icen-ring);
344
+ }
345
+ .icen-kb-step-btn {
307
346
  width: 26px;
308
347
  height: 100%;
309
348
  font: inherit;
310
- font-size: 13px;
311
- color: var(--token-text-muted);
349
+ font-size: var(--icen-density-font-size-md);
350
+ font-weight: 500;
351
+ line-height: 1;
352
+ font-variant-numeric: tabular-nums;
353
+ color: var(--icen-token-text-muted);
312
354
  background: transparent;
313
355
  border: none;
314
356
  cursor: pointer;
315
- transition: background-color 0.16s ease-out, color 0.16s ease-out;
357
+ transition: background-color var(--icen-tx-fast), color var(--icen-tx-fast);
316
358
  }
317
- .kb-step-btn:hover:not(:disabled) {
318
- background: var(--token-bg-soft);
319
- color: var(--token-text);
359
+ .icen-kb-step-btn:hover:not(:disabled) {
360
+ background: var(--icen-token-fill-hover);
361
+ color: var(--icen-token-text);
320
362
  }
321
- .kb-step-btn:disabled {
322
- opacity: var(--icen-disabled-opacity, 0.45);
363
+ .icen-kb-step-btn:active:not(:disabled) {
364
+ background: var(--icen-token-fill-pressed);
365
+ }
366
+ .icen-kb-step-btn:focus-visible {
367
+ outline: none;
368
+ }
369
+ .icen-kb-step-btn:disabled {
370
+ opacity: var(--icen-disabled-opacity);
323
371
  cursor: not-allowed;
324
372
  }
325
- .kb-step-value {
373
+ .icen-kb-step-value {
326
374
  min-width: 26px;
327
375
  text-align: center;
328
376
  }
329
377
 
330
378
  /* alpha 双端滑杆:两端语义文案(title 提示);非混合模式显式禁用不隐藏 */
331
- .kb-alpha {
379
+ .icen-kb-alpha {
332
380
  display: inline-flex;
333
381
  align-items: center;
334
382
  gap: 6px;
335
- height: 28px;
383
+ height: var(--icen-density-item-height);
336
384
  }
337
- .kb-alpha-end {
338
- font-size: 10.5px;
339
- color: var(--token-text-faint);
385
+ .icen-kb-alpha-end {
386
+ font-size: var(--icen-density-font-size-xs);
387
+ line-height: 1.4;
388
+ color: var(--icen-token-text-faint);
340
389
  cursor: help;
341
390
  white-space: nowrap;
342
391
  }
343
- .kb-alpha.is-off {
344
- opacity: 0.55;
392
+ .icen-kb-alpha.is-off {
393
+ opacity: var(--icen-disabled-opacity);
345
394
  }
346
395
 
347
396
  /* 阈值 + 存活计数:rerank 关闭时 N/A(显式禁用不隐藏) */
348
- .kb-threshold {
397
+ .icen-kb-threshold {
349
398
  display: inline-flex;
350
399
  align-items: center;
351
400
  gap: 6px;
352
- height: 28px;
401
+ height: var(--icen-density-item-height);
353
402
  }
354
- .kb-threshold-count {
403
+ .icen-kb-threshold-count {
355
404
  min-width: 150px;
356
405
  white-space: nowrap;
357
406
  }
358
- .kb-threshold.is-off .kb-threshold-count {
359
- color: var(--token-text-faint);
407
+ .icen-kb-threshold.is-off .icen-kb-threshold-count {
408
+ color: var(--icen-token-text-faint);
360
409
  }
361
410
 
362
- .kb-retrieval-bar .kb-run {
363
- margin-left: auto;
411
+ .icen-kb-retrieval-bar .icen-kb-run {
412
+ margin-inline-start: auto;
364
413
  }
365
414
 
366
- /* 检索身份选择(权限域注入的控件,spec §9.7;固定身份集——服务端 token 语义,不接受自由输入) */
367
- .kb-retrieval-idn-group { display: inline-flex; align-items: center; gap: 6px; }
368
- .kb-retrieval-idn {
369
- height: 28px;
370
- padding: 0 6px;
371
- font: inherit;
372
- font-size: 12.5px;
373
- color: var(--token-text);
374
- background: var(--token-bg);
375
- border: 1px solid var(--token-line-soft);
376
- border-radius: var(--radius-sm, 6px);
377
- transition: border-color 0.16s ease-out;
378
- }
379
- .kb-retrieval-idn:focus-visible { outline: none; border-color: var(--token-accent); }
415
+ /* 检索身份选择(权限域注入的控件,spec §9.7;固定身份集——服务端 token 语义,不接受自由输入)。
416
+ 弹层选择器(icen-select)域钩子:面样式随 select.css,此处只管布局 */
417
+ .icen-kb-retrieval-idn-group { display: inline-flex; align-items: center; gap: 6px; }
418
+ .icen-kb-retrieval-idn { flex: 0 0 auto; inline-size: auto; }
380
419
 
381
- /* 可复制参数 JSON 行(.kb-meta mono;DSL 双表示纪律):不换行不断词,横向滚动 */
382
- .kb-params {
420
+ /* 可复制参数 JSON 行(.icen-kb-meta mono;DSL 双表示纪律):不换行不断词,横向滚动 */
421
+ .icen-kb-params {
383
422
  display: flex;
384
423
  align-items: center;
385
424
  gap: 6px;
386
425
  min-width: 0;
387
426
  max-width: 100%;
388
427
  }
389
- .kb-params-text {
428
+ .icen-kb-params-text {
390
429
  flex: 1 1 auto;
391
430
  min-width: 0;
392
431
  overflow-x: auto;
393
432
  white-space: pre;
394
433
  word-break: normal;
395
- font-family: var(--font-mono, ui-monospace, monospace);
434
+ font-family: var(--icen-font-mono);
396
435
  }
397
436
 
398
- /* 命中列表:rank 列 28px 右对齐,hover 浮起 */
399
- .kb-hits {
437
+ /* 命中列表:rank 列 28px 物理右对齐(数字 LTR 文种惯例,RTL 不镜像),hover 浮起 */
438
+ .icen-kb-hits {
400
439
  display: flex;
401
440
  flex-direction: column;
402
- gap: 4px;
441
+ gap: 6px;
403
442
  }
404
- .kb-hit {
443
+ .icen-kb-hit {
405
444
  display: grid;
406
445
  grid-template-columns: 28px minmax(0, 1fr) auto;
407
446
  gap: 10px;
408
447
  padding: 8px 10px;
409
- background: var(--token-bg-soft);
410
- border: 1px solid transparent;
411
- border-radius: var(--radius-md, 8px);
412
- transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out;
413
- }
414
- .kb-hit:hover {
415
- border-color: var(--token-line-soft);
416
- box-shadow: var(--token-shadow-card);
417
- }
418
- .kb-hit-rank {
448
+ background: var(--icen-token-bg-soft);
449
+ border: 1px solid var(--icen-token-line-soft);
450
+ border-radius: var(--icen-radius-md);
451
+ transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
452
+ }
453
+ /* hover 阴影抬升仅可悬停设备生效(触屏关闭,AGENTS 动效守卫) */
454
+ @media (hover: hover) and (pointer: fine) {
455
+ .icen-kb-hit:hover {
456
+ border-color: var(--icen-token-line);
457
+ box-shadow: var(--icen-token-shadow-card);
458
+ }
459
+ }
460
+ .icen-kb-hit-rank {
419
461
  width: 28px;
420
462
  padding-top: 1px;
421
- text-align: right;
422
- font-size: 12px;
423
- color: var(--token-text-faint);
463
+ text-align: right; /* guard:allow-physical rank 是数字(LTR 文种),物理右对齐惯例,RTL 不镜像 */
464
+ font-size: var(--icen-density-font-size-xs);
465
+ line-height: 1.5;
466
+ color: var(--icen-token-text-faint);
424
467
  }
425
- .kb-hit-main {
468
+ .icen-kb-hit-main {
426
469
  display: flex;
427
470
  flex-direction: column;
428
- gap: 3px;
429
- min-width: 0;
471
+ gap: 4px;
472
+ min-inline-size: 0;
430
473
  }
431
- .kb-hit-title {
432
- font-size: 13px;
474
+ .icen-kb-hit-title {
475
+ font-size: var(--icen-density-font-size-md);
433
476
  font-weight: 500;
434
- color: var(--token-text);
477
+ line-height: 1.4;
478
+ letter-spacing: var(--icen-letter-spacing-control);
479
+ color: var(--icen-token-text);
435
480
  white-space: nowrap;
436
481
  overflow: hidden;
437
482
  text-overflow: ellipsis;
438
483
  }
439
- .kb-hit-snippet {
484
+ .icen-kb-hit-snippet {
440
485
  display: -webkit-box;
441
486
  -webkit-box-orient: vertical;
442
487
  -webkit-line-clamp: 2;
443
488
  overflow: hidden;
444
- font-size: 12.5px;
445
- line-height: 1.65;
446
- color: var(--token-text-muted);
489
+ font-size: var(--icen-density-font-size-md);
490
+ line-height: 1.7;
491
+ color: var(--icen-token-text-muted);
447
492
  }
448
- /* 多命中分色轮转(补 kb-quote 的 data-hit 轮转到 .kb-hit mark) */
449
- .kb-hit mark[data-hit='1'] {
450
- background: color-mix(in srgb, var(--token-warning) 22%, transparent);
493
+ /* 多命中分色轮转(补 kb-quote 的 data-icen-hit 轮转到 .icen-kb-hit mark) */
494
+ .icen-kb-hit mark[data-icen-hit='1'] {
495
+ background: color-mix(in srgb, var(--icen-token-warning) 22%, transparent);
451
496
  }
452
- .kb-hit mark[data-hit='2'] {
453
- background: color-mix(in srgb, var(--token-info, var(--token-accent)) 20%, transparent);
497
+ .icen-kb-hit mark[data-icen-hit='2'] {
498
+ background: color-mix(in srgb, var(--icen-token-info) 20%, transparent);
454
499
  }
455
- .kb-hit-meta {
500
+ .icen-kb-hit-meta {
456
501
  display: flex;
457
502
  flex-wrap: wrap;
458
- gap: 4px;
503
+ gap: 6px;
459
504
  }
460
- .kb-hit-meta:empty {
505
+ .icen-kb-hit-meta:empty {
461
506
  display: none;
462
507
  }
463
- .kb-hit-side {
508
+ .icen-kb-hit-side {
464
509
  display: flex;
465
510
  flex-direction: column;
466
511
  align-items: flex-end;
467
- gap: 4px;
512
+ gap: 6px;
468
513
  }
469
514
 
470
515
  /* 分数拆解:vectorPart/keywordPart 微型双段条(向量=accent / 关键词=info) */
471
- .kb-score-dual {
516
+ .icen-kb-score-dual {
472
517
  display: inline-flex;
473
518
  width: 88px;
474
519
  height: 3px;
475
520
  overflow: hidden;
476
- border-radius: 2px;
477
- background: var(--token-line-soft);
521
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
522
+ background: var(--icen-token-line-soft);
478
523
  }
479
- .kb-score-dual i {
524
+ .icen-kb-score-dual i {
480
525
  display: block;
481
526
  height: 100%;
482
527
  }
483
- .kb-score-dual .kb-score-dual-vec {
484
- background: var(--token-accent);
528
+ .icen-kb-score-dual .icen-kb-score-dual-vec {
529
+ background: var(--icen-token-accent);
485
530
  opacity: 0.75;
486
531
  }
487
- .kb-score-dual .kb-score-dual-kw {
532
+ .icen-kb-score-dual .icen-kb-score-dual-kw {
488
533
  flex: 1 1 auto;
489
- background: var(--token-info, var(--token-accent));
534
+ background: var(--icen-token-info);
490
535
  opacity: 0.8;
491
536
  }
492
537
 
493
538
  /* 分数条固定轨道:bar 定宽 64px、不参与 flex 伸缩,i 定量不缩——
494
539
  跨行条长与百分比严格成比例(0.488 与 0.131 肉眼可辨;retrieval 与 rerank 同规) */
495
- .kb-retrieval .kb-score-bar,
496
- .kb-rerank .kb-score-bar {
540
+ .icen-kb-retrieval .icen-kb-score-bar,
541
+ .icen-kb-rerank .icen-kb-score-bar {
497
542
  display: block;
498
543
  flex: 0 0 64px;
499
544
  width: 64px;
500
545
  min-width: 0;
501
546
  }
502
- .kb-retrieval .kb-score-bar > i,
503
- .kb-rerank .kb-score-bar > i {
547
+ .icen-kb-retrieval .icen-kb-score-bar > i,
548
+ .icen-kb-rerank .icen-kb-score-bar > i {
504
549
  display: block;
505
550
  flex: 0 0 auto;
506
551
  }
507
552
 
508
553
  /* explain 折叠小字 */
509
- .kb-hit-explain-fold {
554
+ .icen-kb-hit-explain-fold {
510
555
  display: flex;
511
556
  flex-direction: column;
512
557
  align-items: flex-end;
513
- gap: 3px;
558
+ gap: 4px;
514
559
  }
515
- .kb-hit-explain-toggle {
516
- padding: 0;
560
+ .icen-kb-hit-explain-toggle {
561
+ display: inline-flex;
562
+ align-items: center;
563
+ justify-content: center;
564
+ padding: 0 4px;
517
565
  font: inherit;
518
- font-size: 10.5px;
519
- color: var(--token-text-faint);
566
+ font-size: var(--icen-density-font-size-xs);
567
+ line-height: 1;
568
+ color: var(--icen-token-text-faint);
520
569
  background: transparent;
521
570
  border: none;
571
+ border-radius: var(--icen-radius-xs);
522
572
  cursor: pointer;
573
+ min-inline-size: 24px; /* WCAG 2.5.8 下限 */
574
+ min-block-size: 24px;
575
+ transition: color var(--icen-tx-fast);
523
576
  }
524
- .kb-hit-explain-toggle:hover {
525
- color: var(--token-text-muted);
577
+ .icen-kb-hit-explain-toggle:hover {
578
+ color: var(--icen-token-text-muted);
526
579
  text-decoration: underline;
527
580
  }
528
- .kb-hit-explain {
529
- max-width: 320px;
530
- font-size: 10.5px;
531
- line-height: 1.6;
532
- text-align: right;
581
+ .icen-kb-hit-explain-toggle:focus-visible {
582
+ outline: none;
583
+ box-shadow: var(--icen-ring);
584
+ }
585
+ .icen-kb-hit-explain {
586
+ max-inline-size: 320px;
587
+ font-size: var(--icen-density-font-size-xs);
588
+ line-height: 1.65;
589
+ text-align: end;
533
590
  white-space: normal;
534
591
  word-break: break-all;
535
592
  }
536
593
 
537
594
  /* 运行态 */
538
- .kb-retrieval.is-busy .kb-hits {
595
+ .icen-kb-retrieval.is-busy .icen-kb-hits {
539
596
  opacity: 0.6;
540
597
  }
541
- .kb-retrieval.is-busy .kb-hit {
598
+ .icen-kb-retrieval.is-busy .icen-kb-hit {
542
599
  pointer-events: none;
543
600
  }
544
601
 
545
602
  /* ══════════════ 2. kb-filter 过滤器构建器 ══════════════ */
546
603
 
547
- .kb-filter {
604
+ .icen-kb-filter {
548
605
  display: flex;
549
606
  flex-direction: column;
550
607
  gap: 12px;
551
608
  }
552
609
 
553
- /* 组:嵌套组缩进 16px + 连接线(body 左缘竖线 + rule 行横线) */
554
- .kb-filter-group {
555
- padding: 8px;
556
- border: 1px solid var(--token-line-soft);
557
- border-radius: var(--radius-md, 8px);
610
+ /* 组:嵌套组缩进 16px + 连接线(body 起始缘竖线 + rule 行横线,RTL 镜像) */
611
+ .icen-kb-filter-group {
612
+ padding: 8px 10px;
613
+ border: 1px solid var(--icen-token-line-soft);
614
+ border-radius: var(--icen-radius-md);
558
615
  }
559
- .kb-filter-group .kb-filter-group {
560
- background: var(--token-bg-soft);
616
+ .icen-kb-filter-group .icen-kb-filter-group {
617
+ background: var(--icen-token-bg-soft);
561
618
  }
562
- .kb-filter-head {
619
+ .icen-kb-filter-head {
563
620
  display: flex;
564
621
  align-items: center;
565
- gap: 6px;
566
- margin-bottom: 6px;
622
+ gap: 8px;
623
+ min-height: var(--icen-density-item-height);
624
+ margin-bottom: 8px;
567
625
  }
568
- .kb-filter-op-toggle {
569
- height: 24px;
570
- padding: 0 10px;
571
- font-family: var(--font-mono, ui-monospace, monospace);
572
- font-size: 11px;
573
- letter-spacing: 0.5px;
574
- color: var(--token-text-muted);
575
- background: var(--token-bg);
576
- border: 1px solid var(--token-line-soft);
577
- border-radius: var(--radius-sm, 6px);
626
+ .icen-kb-filter-op-toggle {
627
+ height: var(--icen-density-item-height);
628
+ padding: 0 12px;
629
+ font-family: var(--icen-font-mono);
630
+ font-size: var(--icen-density-font-size-xs);
631
+ letter-spacing: .3px;
632
+ color: var(--icen-token-text-muted);
633
+ background: var(--icen-token-bg);
634
+ border: 1px solid var(--icen-token-line-soft);
635
+ border-radius: var(--icen-radius-sm);
578
636
  cursor: pointer;
579
- transition: color 0.16s ease-out, border-color 0.16s ease-out;
637
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
638
+ }
639
+ .icen-kb-filter-op-toggle:hover {
640
+ color: var(--icen-token-text);
641
+ background: var(--icen-token-fill-hover);
642
+ border-color: var(--icen-token-line);
580
643
  }
581
- .kb-filter-op-toggle:hover {
582
- color: var(--token-text);
583
- border-color: var(--token-line);
644
+ .icen-kb-filter-op-toggle:active {
645
+ background: var(--icen-token-fill-pressed);
646
+ }
647
+ .icen-kb-filter-op-toggle:focus-visible {
648
+ outline: none;
649
+ box-shadow: var(--icen-ring);
584
650
  }
585
- .kb-filter-op-toggle.is-or {
651
+ .icen-kb-filter-op-toggle.is-or {
586
652
  font-weight: 600;
587
- color: var(--token-text);
653
+ color: var(--icen-token-text);
588
654
  }
589
- .kb-filter-head .kb-filter-act {
655
+ .icen-kb-filter-head .icen-kb-filter-act {
590
656
  padding: 0 8px;
591
657
  width: auto;
658
+ height: var(--icen-density-item-height);
592
659
  }
593
660
 
594
- .kb-filter-body {
661
+ .icen-kb-filter-body {
595
662
  display: flex;
596
663
  flex-direction: column;
597
664
  gap: 6px;
598
- margin-left: 16px;
599
- padding-left: 10px;
600
- border-left: 1px solid var(--token-line-soft);
665
+ margin-inline-start: 16px;
666
+ padding-inline-start: 10px;
667
+ border-inline-start: 1px solid var(--icen-token-line-soft);
601
668
  }
602
669
 
603
- .kb-filter-rule {
670
+ .icen-kb-filter-rule {
604
671
  position: relative;
605
672
  display: flex;
606
673
  flex-wrap: wrap; /* 窄栏兜底:值输入挤不下时独占次行全宽,日期串不截字 */
607
674
  align-items: center;
608
675
  gap: 6px;
676
+ min-height: var(--icen-density-item-height);
609
677
  }
610
- /* rule → 组竖线的横向连接线 */
611
- .kb-filter-rule::before {
678
+ /* rule → 组竖线的横向连接线(竖线沿 inline-start,RTL 镜像) */
679
+ .icen-kb-filter-rule::before {
612
680
  content: '';
613
681
  position: absolute;
614
682
  top: 50%;
615
- left: -10px;
683
+ inset-inline-start: -10px;
616
684
  width: 10px;
617
685
  height: 1px;
618
- background: var(--token-line-soft);
686
+ background: var(--icen-token-line-soft);
619
687
  }
620
- .kb-filter-field {
688
+ .icen-kb-filter-field {
621
689
  width: 120px;
622
690
  flex: 0 0 auto;
623
- font-family: var(--font-mono, ui-monospace, monospace);
624
- font-size: 12px;
691
+ font-family: var(--icen-font-mono);
692
+ font-size: var(--icen-density-font-size-sm);
625
693
  }
626
- .kb-filter-op {
627
- height: 28px;
628
- padding: 0 6px;
629
- font: inherit;
630
- font-size: 12px;
631
- color: var(--token-text);
632
- background: var(--token-bg);
633
- border: 1px solid var(--token-line-soft);
634
- border-radius: var(--radius-sm, 6px);
635
- cursor: pointer;
694
+ .icen-kb-filter-op {
695
+ /* 弹层选择器(icen-select)域钩子:面样式随 select.css,此处只管布局 */
696
+ flex: 0 0 auto;
697
+ inline-size: auto;
636
698
  }
637
- .kb-filter-value {
699
+ .icen-kb-filter-value {
638
700
  flex: 1 1 120px;
639
701
  min-width: 104px; /* 12px mono 下容得下整条日期串 2026-07-01,不截字 */
640
- font-family: var(--font-mono, ui-monospace, monospace);
641
- font-size: 12px;
702
+ font-family: var(--icen-font-mono);
703
+ font-size: var(--icen-density-font-size-sm);
642
704
  }
643
705
 
644
706
  /* DSL 镜像(Mongo JSON / OData tab 切换,mono 可复制) */
645
- .kb-filter-dsl {
707
+ .icen-kb-filter-dsl {
646
708
  display: flex;
647
709
  flex-direction: column;
648
- gap: 5px;
649
- padding: 6px 8px;
650
- background: var(--token-bg-soft);
651
- border: 1px solid var(--token-line-soft);
652
- border-radius: var(--radius-md, 8px);
710
+ gap: 6px;
711
+ padding: 8px;
712
+ background: var(--icen-token-bg-soft);
713
+ border: 1px solid var(--icen-token-line-soft);
714
+ border-radius: var(--icen-radius-md);
653
715
  }
654
- .kb-filter-dsl-bar {
716
+ .icen-kb-filter-dsl-bar {
655
717
  display: flex;
656
718
  align-items: center;
657
- gap: 4px;
719
+ gap: 6px;
658
720
  }
659
- .kb-filter-dsl-tab {
660
- height: 22px;
661
- padding: 0 10px;
662
- font-family: var(--font-mono, ui-monospace, monospace);
663
- font-size: 11px;
664
- color: var(--token-text-faint);
721
+ .icen-kb-filter-dsl-tab {
722
+ height: 24px;
723
+ padding: 0 8px;
724
+ font-family: var(--icen-font-mono);
725
+ font-size: var(--icen-density-font-size-xs);
726
+ color: var(--icen-token-text-faint);
665
727
  background: transparent;
666
728
  border: 1px solid transparent;
667
- border-radius: var(--radius-sm, 6px);
729
+ border-radius: var(--icen-radius-sm);
668
730
  cursor: pointer;
669
- transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
731
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
670
732
  }
671
- .kb-filter-dsl-tab:hover {
672
- color: var(--token-text-muted);
733
+ .icen-kb-filter-dsl-tab:hover {
734
+ color: var(--icen-token-text-muted);
735
+ background: var(--icen-token-fill-hover);
673
736
  }
674
- .kb-filter-dsl-tab.is-active {
675
- color: var(--token-text);
676
- background: var(--token-bg);
677
- border-color: var(--token-line-soft);
737
+ .icen-kb-filter-dsl-tab:active {
738
+ background: var(--icen-token-fill-pressed);
678
739
  }
679
- .kb-filter-dsl-copy {
680
- margin-left: auto;
740
+ .icen-kb-filter-dsl-tab.is-active {
741
+ color: var(--icen-token-text);
742
+ background: var(--icen-token-bg);
743
+ border-color: var(--icen-token-line-soft);
744
+ }
745
+ .icen-kb-filter-dsl-tab:focus-visible {
746
+ outline: none;
747
+ box-shadow: var(--icen-ring);
748
+ }
749
+ .icen-kb-filter-dsl-copy {
750
+ margin-inline-start: auto;
681
751
  width: auto;
682
752
  padding: 0 8px;
683
- font-size: 11px;
753
+ font-size: var(--icen-density-font-size-xs);
684
754
  }
685
- .kb-filter-dsl-text {
755
+ .icen-kb-filter-dsl-text {
686
756
  display: block;
687
- max-height: 110px;
757
+ max-block-size: 110px;
688
758
  overflow: auto;
689
- line-height: 1.6;
759
+ font-size: var(--icen-density-font-size-xs);
760
+ line-height: 1.65;
761
+ color: var(--icen-token-text-muted);
690
762
  /* DSL 镜像(Mongo/OData):mono + 不换行不断词,横向滚动兜底 */
691
763
  white-space: pre;
692
764
  word-break: normal;
693
- font-family: var(--font-mono, ui-monospace, monospace);
765
+ font-family: var(--icen-font-mono);
694
766
  }
695
767
 
696
768
  /* ══════════════ 3. kb-rerank rerank A/B 对比 ══════════════ */
697
769
 
698
- .kb-rerank {
770
+ .icen-kb-rerank {
699
771
  display: flex;
700
772
  flex-direction: column;
701
773
  gap: 10px;
@@ -703,15 +775,16 @@
703
775
  min-width: 0;
704
776
  overflow-x: auto;
705
777
  }
706
- .kb-rerank-head {
778
+ .icen-kb-rerank-head {
707
779
  display: flex;
708
780
  align-items: center;
709
781
  gap: 8px;
782
+ min-height: var(--icen-density-item-height);
710
783
  }
711
- .kb-rerank-switch-label {
712
- margin-left: auto;
784
+ .icen-kb-rerank-switch-label {
785
+ margin-inline-start: auto;
713
786
  }
714
- .kb-rerank-grid {
787
+ .icen-kb-rerank-grid {
715
788
  display: grid;
716
789
  grid-template-columns: minmax(200px, 1fr) 52px minmax(200px, 1fr);
717
790
  min-width: 470px; /* 列最小宽合计:低于此宽走横向滚动而非压缩截断 */
@@ -719,222 +792,343 @@
719
792
  row-gap: 2px;
720
793
  align-items: stretch;
721
794
  }
722
- .kb-rerank-grid > .kb-empty {
795
+ .icen-kb-rerank-grid > .icen-kb-empty {
723
796
  grid-column: 1 / -1;
724
797
  }
725
- .kb-rerank-colhead {
798
+ .icen-kb-rerank-colhead {
726
799
  display: flex;
727
800
  align-items: center;
728
801
  gap: 6px;
729
- min-height: 26px;
802
+ min-height: var(--icen-density-item-height);
730
803
  padding: 0 8px;
731
- font-size: 11.5px;
732
- color: var(--token-text-muted);
733
- border-bottom: 1px solid var(--token-line-soft);
804
+ font-size: var(--icen-density-font-size-xs);
805
+ font-weight: 500;
806
+ letter-spacing: .3px;
807
+ color: var(--icen-token-text-muted);
808
+ border-bottom: 1px solid var(--icen-token-line-soft);
734
809
  }
735
- .kb-rerank-colhead--delta {
810
+ .icen-kb-rerank-colhead--delta {
736
811
  justify-content: center;
737
- font-family: var(--font-mono, ui-monospace, monospace);
812
+ font-family: var(--icen-font-mono);
738
813
  }
739
814
  /* 行容器 display:contents:三格参与网格对齐,行 hover 整排点亮 */
740
- .kb-rerank-row {
815
+ .icen-kb-rerank-row {
741
816
  display: contents;
742
817
  }
743
- .kb-rerank-row:hover > .kb-rerank-col {
744
- background: var(--token-bg-soft);
818
+ .icen-kb-rerank-row:hover > .icen-kb-rerank-col {
819
+ background: var(--icen-token-fill-hover);
745
820
  }
746
- .kb-rerank-col {
821
+ .icen-kb-rerank-col {
747
822
  display: flex;
748
823
  align-items: center;
749
824
  gap: 8px;
750
- min-height: 32px;
751
- padding: 3px 8px;
752
- border-radius: var(--radius-sm, 6px);
753
- transition: background-color 0.16s ease-out;
825
+ min-height: var(--icen-density-item-height);
826
+ padding: 2px 8px;
827
+ border-radius: var(--icen-radius-sm);
828
+ transition: background-color var(--icen-tx-fast);
754
829
  }
755
- .kb-rerank-col.is-missing {
756
- opacity: 0.6;
830
+ .icen-kb-rerank-col.is-missing {
831
+ /* 落选列不降透明(透明会被 axe 算进对比度):落选语义由 muted 文案承担 */
757
832
  }
758
- .kb-rerank-rank {
833
+ .icen-kb-rerank-rank {
759
834
  flex: 0 0 auto;
760
835
  width: 18px;
761
- text-align: right;
762
- font-size: 11.5px;
836
+ text-align: right; /* guard:allow-physical rank 是数字(LTR 文种),物理右对齐惯例,RTL 不镜像 */
837
+ font-size: var(--icen-density-font-size-xs);
838
+ line-height: 1.5;
839
+ color: var(--icen-token-text-faint);
763
840
  }
764
- .kb-rerank-title {
841
+ .icen-kb-rerank-title {
765
842
  flex: 1 1 auto;
766
- min-width: 0;
843
+ min-inline-size: 0;
767
844
  overflow: hidden;
768
- font-size: 12.5px;
769
- color: var(--token-text);
845
+ font-size: var(--icen-density-font-size-md);
846
+ line-height: 1.4;
847
+ color: var(--icen-token-text);
770
848
  white-space: nowrap;
771
849
  text-overflow: ellipsis;
772
850
  }
773
- .kb-rerank-missing {
851
+ .icen-kb-rerank-missing {
774
852
  flex: 1 1 auto;
775
- font-size: 11px;
776
- color: var(--token-text-faint);
853
+ font-size: var(--icen-density-font-size-xs);
854
+ color: var(--icen-token-text-muted);
777
855
  }
778
856
  /* delta 箭头:上升绿 / 下降红 / 持平或单侧缺失 — */
779
- .kb-rerank-delta {
857
+ .icen-kb-rerank-delta {
780
858
  display: flex;
781
859
  align-items: center;
782
860
  justify-content: center;
783
- font-family: var(--font-mono, ui-monospace, monospace);
861
+ font-family: var(--icen-font-mono);
784
862
  font-variant-numeric: tabular-nums;
785
- font-size: 11.5px;
786
- color: var(--token-text-faint);
863
+ font-size: var(--icen-density-font-size-xs);
864
+ letter-spacing: .01em;
865
+ color: var(--icen-token-text-faint);
787
866
  }
788
- .kb-rerank-delta.is-up {
867
+ .icen-kb-rerank-delta.is-up {
789
868
  font-weight: 600;
790
- color: var(--token-success);
869
+ color: var(--icen-token-success);
791
870
  }
792
- .kb-rerank-delta.is-down {
871
+ .icen-kb-rerank-delta.is-down {
793
872
  font-weight: 600;
794
- color: var(--token-danger, var(--token-error));
873
+ color: var(--icen-token-error);
795
874
  }
796
875
  /* 开关关闭:重排后列压淡(显式禁用不隐藏) */
797
- .kb-rerank.is-off .kb-rerank-col--after {
798
- opacity: 0.45;
876
+ .icen-kb-rerank.is-off .icen-kb-rerank-col--after {
877
+ opacity: var(--icen-disabled-opacity);
799
878
  }
800
879
 
801
880
  /* ══════════════ 4. kb-hittest 召回测试集 ══════════════ */
802
881
 
803
- .kb-hittest {
882
+ .icen-kb-hittest {
804
883
  display: flex;
805
884
  flex-direction: column;
806
885
  gap: 12px;
807
886
  }
808
- .kb-hittest > .kb-run {
887
+ .icen-kb-hittest > .icen-kb-run {
809
888
  align-self: flex-start;
810
889
  }
811
890
 
812
891
  /* 统计头:命中率大数字 + 均分 + 通过 x/y + 参数快照徽标 */
813
- .kb-hittest-stats {
892
+ .icen-kb-hittest-stats {
814
893
  display: flex;
815
894
  flex-wrap: wrap;
816
895
  align-items: center;
817
- gap: 20px;
896
+ gap: 16px;
818
897
  padding: 10px 12px;
819
- background: var(--token-bg-soft);
820
- border: 1px solid var(--token-line-soft);
821
- border-radius: var(--radius-md, 8px);
898
+ background: var(--icen-token-bg-soft);
899
+ border: 1px solid var(--icen-token-line-soft);
900
+ border-radius: var(--icen-radius-md);
822
901
  }
823
- .kb-hittest-stat {
902
+ .icen-kb-hittest-stat {
824
903
  display: flex;
825
904
  align-items: baseline;
826
905
  gap: 6px;
827
906
  }
828
- .kb-hittest-stat-label {
829
- font-size: 10.5px;
830
- letter-spacing: 0.3px;
831
- color: var(--token-text-faint);
907
+ .icen-kb-hittest-stat-label {
908
+ font-size: var(--icen-density-font-size-xs);
909
+ letter-spacing: .3px;
910
+ color: var(--icen-token-text-faint);
832
911
  }
833
- .kb-hittest-hitrate {
912
+ .icen-kb-hittest-hitrate {
834
913
  font-size: 22px;
835
914
  font-weight: 600;
836
- color: var(--token-text);
915
+ line-height: 1.1;
916
+ letter-spacing: -.01em;
917
+ font-variant-numeric: tabular-nums;
918
+ color: var(--icen-token-text);
837
919
  }
838
- .kb-hittest-stats .kb-badge {
839
- margin-left: auto;
920
+ .icen-kb-hittest-stats .icen-kb-badge {
921
+ margin-inline-start: auto;
840
922
  }
841
923
 
842
924
  /* 问题列表 */
843
- .kb-hittest-list {
925
+ .icen-kb-hittest-list {
844
926
  display: flex;
845
927
  flex-direction: column;
846
928
  gap: 4px;
847
929
  }
848
- .kb-hittest-row {
930
+ .icen-kb-hittest-row {
849
931
  display: grid;
850
932
  grid-template-columns: 24px minmax(0, 1fr) auto 28px 24px;
851
933
  gap: 8px;
852
934
  align-items: center;
853
- min-height: 30px;
854
- padding: 3px 8px;
855
- border-radius: var(--radius-sm, 6px);
935
+ min-height: var(--icen-density-item-height);
936
+ padding: 2px 8px;
937
+ border-radius: var(--icen-radius-sm);
938
+ transition: background-color var(--icen-tx-fast);
856
939
  }
857
- .kb-hittest-row:hover {
858
- background: var(--token-bg-soft);
940
+ .icen-kb-hittest-row:hover {
941
+ background: var(--icen-token-fill-hover);
859
942
  }
860
- .kb-hittest-pin svg {
943
+ .icen-kb-hittest-pin svg {
861
944
  width: 13px;
862
945
  height: 13px;
863
946
  opacity: 0.55;
947
+ transition: opacity var(--icen-tx-fast);
864
948
  }
865
- .kb-hittest-pin.is-pinned {
866
- color: var(--token-text);
949
+ .icen-kb-hittest-row:hover .icen-kb-hittest-pin svg {
950
+ opacity: 0.8;
951
+ }
952
+ .icen-kb-hittest-pin.is-pinned {
953
+ color: var(--icen-token-text);
867
954
  }
868
- .kb-hittest-pin.is-pinned svg {
955
+ .icen-kb-hittest-pin.is-pinned svg {
869
956
  opacity: 1;
870
957
  }
871
- .kb-hittest-q {
958
+ .icen-kb-hittest-q {
872
959
  overflow: hidden;
873
- font-size: 13px;
874
- color: var(--token-text);
960
+ font-size: var(--icen-density-font-size-md);
961
+ line-height: 1.5;
962
+ color: var(--icen-token-text);
875
963
  white-space: nowrap;
876
964
  text-overflow: ellipsis;
877
965
  }
878
- .kb-hittest-expected {
966
+ .icen-kb-hittest-expected {
879
967
  display: inline-flex;
880
968
  align-items: center;
881
969
  gap: 4px;
882
970
  max-width: 42%;
883
971
  overflow: hidden;
884
972
  }
885
- .kb-hittest-result {
973
+ .icen-kb-hittest-result {
886
974
  width: 28px;
887
975
  text-align: center;
888
976
  font-weight: 600;
889
- color: var(--token-text-faint);
977
+ line-height: 1.5;
978
+ font-variant-numeric: tabular-nums;
979
+ color: var(--icen-token-text-faint);
890
980
  }
891
- .kb-hittest-row.is-pass .kb-hittest-result {
892
- color: var(--token-success);
981
+ .icen-kb-hittest-row.is-pass .icen-kb-hittest-result {
982
+ color: var(--icen-token-success);
893
983
  }
894
- .kb-hittest-row.is-fail .kb-hittest-result {
895
- color: var(--token-danger, var(--token-error));
984
+ .icen-kb-hittest-row.is-fail .icen-kb-hittest-result {
985
+ color: var(--icen-token-error);
896
986
  }
897
- .kb-hittest-remove {
987
+ .icen-kb-hittest-remove {
898
988
  opacity: 0;
989
+ transition: opacity var(--icen-tx-fast);
899
990
  }
900
- .kb-hittest-row:hover .kb-hittest-remove,
901
- .kb-hittest-remove:focus-visible {
991
+ .icen-kb-hittest-row:hover .icen-kb-hittest-remove,
992
+ .icen-kb-hittest-remove:focus-visible {
902
993
  opacity: 1;
903
994
  }
904
995
 
905
996
  /* 新增问题 */
906
- .kb-hittest-add {
997
+ .icen-kb-hittest-add {
907
998
  display: flex;
908
999
  gap: 8px;
909
1000
  }
910
- .kb-hittest-input {
1001
+ .icen-kb-hittest-input {
911
1002
  flex: 1 1 auto;
912
1003
  }
913
- .kb-hittest-add-btn {
914
- height: 28px;
1004
+ .icen-kb-hittest-add-btn {
1005
+ height: var(--icen-density-item-height);
915
1006
  padding: 0 12px;
916
1007
  font: inherit;
917
- font-size: 12.5px;
918
- color: var(--token-text-muted);
919
- background: var(--token-bg);
920
- border: 1px solid var(--token-line-soft);
921
- border-radius: var(--radius-sm, 6px);
1008
+ font-size: var(--icen-density-font-size-md);
1009
+ font-weight: 500;
1010
+ color: var(--icen-token-text-muted);
1011
+ background: var(--icen-token-bg);
1012
+ border: 1px solid var(--icen-token-line-soft);
1013
+ border-radius: var(--icen-radius-sm);
922
1014
  cursor: pointer;
923
- transition: color 0.16s ease-out, border-color 0.16s ease-out;
1015
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
924
1016
  }
925
- .kb-hittest-add-btn:hover {
926
- color: var(--token-text);
927
- border-color: var(--token-line);
1017
+ .icen-kb-hittest-add-btn:hover:not(:disabled) {
1018
+ color: var(--icen-token-text);
1019
+ background: var(--icen-token-fill-hover);
1020
+ border-color: var(--icen-token-line);
1021
+ }
1022
+ .icen-kb-hittest-add-btn:active:not(:disabled) {
1023
+ background: var(--icen-token-fill-pressed);
1024
+ }
1025
+ .icen-kb-hittest-add-btn:focus-visible {
1026
+ outline: none;
1027
+ box-shadow: var(--icen-ring);
1028
+ }
1029
+ .icen-kb-hittest-add-btn:disabled {
1030
+ opacity: var(--icen-disabled-opacity);
1031
+ cursor: not-allowed;
928
1032
  }
929
1033
 
930
1034
  /* ══════════════ 5. 密度档(spec §2:compact 行高收紧) ══════════════ */
931
1035
 
932
- [data-density='compact'] .kb-hit {
933
- padding: 5px 8px;
1036
+ [data-icen-density='compact'] .icen-kb-hit {
1037
+ padding: 6px 8px;
1038
+ gap: 8px;
1039
+ }
1040
+ [data-icen-density='compact'] .icen-kb-hittest-row {
1041
+ min-height: var(--icen-density-item-height);
934
1042
  }
935
- [data-density='compact'] .kb-hittest-row {
936
- min-height: 24px;
1043
+ [data-icen-density='compact'] .icen-kb-rerank-col {
1044
+ min-height: var(--icen-density-item-height);
937
1045
  }
938
- [data-density='compact'] .kb-rerank-col {
939
- min-height: 26px;
1046
+ [data-icen-density='compact'] .icen-kb-hittest-stats {
1047
+ gap: 12px;
1048
+ padding: 8px 10px;
1049
+ }
1050
+ [data-icen-density='compact'] .icen-kb-filter-group {
1051
+ padding: 6px 8px;
1052
+ }
1053
+ [data-icen-density='compact'] .icen-kb-filter-head {
1054
+ margin-bottom: 6px;
1055
+ }
1056
+ [data-icen-density='compact'] .icen-kb-filter-dsl {
1057
+ padding: 6px;
1058
+ }
1059
+
1060
+ /* ══════════════ 6. 高对比模式(forced-colors) ══════════════
1061
+ 自绘控件不能只靠底色/阴影区分状态:补边框与系统色,焦点改用 Highlight 轮廓。 */
1062
+ @media (forced-colors: active) {
1063
+ .icen-kb-switch,
1064
+ .icen-kb-filter-op-toggle,
1065
+ .icen-kb-step,
1066
+ .icen-kb-hit,
1067
+ .icen-kb-hittest-add-btn {
1068
+ border-color: CanvasText;
1069
+ }
1070
+ .icen-kb-params-copy,
1071
+ .icen-kb-filter-act,
1072
+ .icen-kb-hittest-pin,
1073
+ .icen-kb-hittest-remove {
1074
+ border-color: CanvasText;
1075
+ }
1076
+ .icen-kb-hittest-remove {
1077
+ opacity: 1;
1078
+ }
1079
+ .icen-kb-switch {
1080
+ background: Canvas;
1081
+ }
1082
+ .icen-kb-switch[aria-checked='true'] {
1083
+ forced-color-adjust: none;
1084
+ background: Highlight;
1085
+ border-color: Highlight;
1086
+ }
1087
+ .icen-kb-switch[aria-checked='true']::after {
1088
+ background: HighlightText;
1089
+ }
1090
+ .icen-kb-mode-item.is-active,
1091
+ .icen-kb-filter-dsl-tab.is-active {
1092
+ forced-color-adjust: none;
1093
+ background: Highlight;
1094
+ border-color: Highlight;
1095
+ color: HighlightText;
1096
+ }
1097
+ .icen-kb-score-dual {
1098
+ outline: 1px solid CanvasText;
1099
+ outline-offset: 1px;
1100
+ }
1101
+ .icen-kb-hit:hover,
1102
+ .icen-kb-filter-op-toggle:hover {
1103
+ border-color: Highlight;
1104
+ }
1105
+ .icen-kb-rerank-delta.is-up,
1106
+ .icen-kb-rerank-delta.is-down,
1107
+ .icen-kb-hittest-row.is-pass .icen-kb-hittest-result,
1108
+ .icen-kb-hittest-row.is-fail .icen-kb-hittest-result {
1109
+ forced-color-adjust: none;
1110
+ }
1111
+ .icen-kb-range:focus-visible,
1112
+ .icen-kb-switch:focus-visible,
1113
+ .icen-kb-run:focus-visible,
1114
+ .icen-kb-params-copy:focus-visible,
1115
+ .icen-kb-filter-act:focus-visible,
1116
+ .icen-kb-hittest-pin:focus-visible,
1117
+ .icen-kb-hittest-remove:focus-visible,
1118
+ .icen-kb-mode-item:focus-visible,
1119
+ .icen-kb-hit-explain-toggle:focus-visible,
1120
+ .icen-kb-filter-op-toggle:focus-visible,
1121
+ .icen-kb-filter-dsl-tab:focus-visible,
1122
+ .icen-kb-hittest-add-btn:focus-visible {
1123
+ outline: 2px solid Highlight;
1124
+ outline-offset: 2px;
1125
+ box-shadow: none;
1126
+ }
1127
+ .icen-kb-step:has(.icen-kb-step-btn:focus-visible) {
1128
+ outline: 2px solid Highlight;
1129
+ outline-offset: 2px;
1130
+ box-shadow: none;
1131
+ }
1132
+ }
1133
+
940
1134
  }