@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,541 +1,628 @@
1
+ @layer icen.components {
1
2
  /*
2
3
  * @icen.ai/ui — kb-ingest.css(摄取域:kb-pipeline / kb-chunks / kb-segment / kb-connector / kb-metadata / kb-qa)
3
4
  *
4
- * 共享原语在 kb.css(.kb-row/.kb-dot/.kb-fold-head/.kb-chip/.kb-num/.kb-meta/.kb-badge/.kb-empty/.kb-notice…),
5
+ * 共享原语在 kb.css(.icen-kb-row/.icen-kb-dot/.icen-kb-fold-head/.icen-kb-chip/.icen-kb-num/.icen-kb-meta/.icen-kb-badge/.icen-kb-empty/.icen-kb-notice…),
5
6
  * 本文件只做本域专属结构。DOM 契约见 docs/spec/kb-family.md §5.5–5.10 与各 behavior 头注释。
6
7
  *
7
8
  * 域内纪律(spec §2):
8
9
  * - 摄取域=中性行 + 状态色只给状态点与徽标(连线/边框一律层级色)
9
- * - 数字 .kb-num;元信息 .kb-meta;材料 bg → bg-soft 两档;圆角 --radius-md(容器)/ --radius-sm(行内)
10
- * - 动效 ≤240ms ease-out;运行脉冲交给 kb.css .kb-dot.is-live;reduced-motion 全退化为瞬时
11
- * - 域自持控件基元:.kb-btn(钮)/ .kb-input(输入)/ .kb-seg(mini segmented),不依赖库内其他 css
12
- * - 只消费 --token-* / --radius-* / --font-mono,附缺省回退,可独立安装
10
+ * - 数字 .icen-kb-num;元信息 .icen-kb-meta;材料 bg → bg-soft 两档;圆角 --icen-radius-md(容器)/ --icen-radius-sm(行内)
11
+ * - 动效 ≤240ms ease-out;运行脉冲交给 kb.css .icen-kb-dot.is-live;reduced-motion 全退化为瞬时
12
+ * - 域控件布局(输入视觉复用基础组件):.icen-kb-btn(钮)/ .icen-kb-input(输入)/ .icen-kb-seg(mini segmented),输入原语随 tokens.css 提供
13
+ * - 只消费 --icen-token-* / --icen-radius-* / --icen-font-mono,附缺省回退,可独立安装
13
14
  */
14
15
 
15
- /* ══════════════ 域自持控件基元(.kb-btn / .kb-input / .kb-seg) ══════════════ */
16
+ /* ══════════════ 域控件布局(输入视觉复用基础组件)(.icen-kb-btn / .icen-kb-input / .icen-kb-seg) ══════════════ */
16
17
 
17
- .kb-btn {
18
+ .icen-kb-btn {
18
19
  display: inline-flex;
19
20
  align-items: center;
20
- gap: 5px;
21
- padding: 3px 10px;
22
- border: 1px solid var(--token-line-soft);
23
- border-radius: var(--radius-sm, 6px);
24
- background: var(--token-bg-soft);
25
- color: var(--token-text-muted);
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);
26
+ border: 1px solid var(--icen-token-line-soft);
27
+ border-radius: var(--icen-radius-sm);
28
+ background: var(--icen-token-bg-soft);
29
+ color: var(--icen-token-text-muted);
26
30
  font: inherit;
27
- font-size: 12px;
28
- 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;
29
34
  white-space: nowrap;
30
35
  cursor: pointer;
31
36
  transition:
32
- color 0.16s ease-out,
33
- border-color 0.16s ease-out,
34
- 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);
40
+ }
41
+ .icen-kb-btn:hover {
42
+ color: var(--icen-token-text);
43
+ border-color: var(--icen-token-line);
44
+ background: var(--icen-token-fill-hover);
35
45
  }
36
- .kb-btn:hover {
37
- color: var(--token-text);
38
- border-color: var(--token-line);
46
+ .icen-kb-btn:active {
47
+ background: var(--icen-token-fill-pressed);
39
48
  }
40
- .kb-btn:focus-visible {
41
- outline: 2px solid var(--token-accent);
42
- outline-offset: 1px;
49
+ .icen-kb-btn:focus-visible {
50
+ outline: none;
51
+ box-shadow: var(--icen-ring);
43
52
  }
44
- .kb-btn:disabled,
45
- .kb-btn[aria-disabled='true'] {
46
- opacity: 0.5;
53
+ .icen-kb-btn:disabled,
54
+ .icen-kb-btn[aria-disabled='true'] {
55
+ opacity: var(--icen-disabled-opacity);
47
56
  cursor: not-allowed;
48
57
  }
49
- .kb-btn svg {
50
- width: 13px;
51
- height: 13px;
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
+ }
99
+ .icen-kb-btn svg {
100
+ width: 14px;
101
+ height: 14px;
52
102
  flex: 0 0 auto;
53
103
  }
54
104
 
55
- .kb-input {
56
- box-sizing: border-box;
57
- min-width: 0;
58
- padding: 3px 8px;
59
- border: 1px solid var(--token-line-soft);
60
- border-radius: var(--radius-sm, 6px);
61
- background: var(--token-bg);
62
- color: var(--token-text);
63
- font: inherit;
64
- font-size: 12.5px;
65
- line-height: 1.5;
66
- transition: border-color 0.16s ease-out;
67
- }
68
- .kb-input::placeholder {
69
- color: var(--token-text-faint);
70
- }
71
- .kb-input:focus {
72
- outline: none;
73
- border-color: var(--token-accent);
105
+ /* 输入表面与几何沿用 tokens.css 的共享输入配方(高度 28 / 圆角 6 / 内距 8)。 */
106
+ .icen-kb-input[aria-invalid='true'] {
107
+ border-color: var(--icen-token-error);
74
108
  }
75
- .kb-input[aria-invalid='true'] {
76
- border-color: var(--token-danger, var(--token-error));
77
- }
78
- .kb-input--mono {
79
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
80
- font-size: 12px;
109
+ .icen-kb-input--mono {
110
+ font-family: var(--icen-font-mono);
111
+ font-size: var(--icen-font-size-caption);
81
112
  }
82
113
 
83
- .kb-seg {
114
+ .icen-kb-seg {
84
115
  display: inline-flex;
85
116
  gap: 2px;
86
117
  padding: 2px;
87
- border: 1px solid var(--token-line-soft);
88
- border-radius: var(--radius-sm, 6px);
89
- background: var(--token-bg-soft);
118
+ border: 1px solid var(--icen-token-line-soft);
119
+ border-radius: var(--icen-radius-sm);
120
+ background: var(--icen-token-bg-soft);
90
121
  }
91
- .kb-seg-item {
92
- border: none;
122
+ .icen-kb-seg-item {
123
+ display: inline-flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ min-block-size: 22px;
127
+ border: 1px solid transparent;
93
128
  background: none;
94
- padding: 2px 10px;
95
- border-radius: calc(var(--radius-sm, 6px) - 2px);
129
+ padding-block: 0;
130
+ padding-inline: 9px;
131
+ border-radius: calc(var(--icen-radius-sm) - 2px);
96
132
  font: inherit;
97
- font-size: 12px;
98
- line-height: 1.5;
99
- color: var(--token-text-muted);
133
+ font-size: var(--icen-font-size-caption);
134
+ font-weight: 500;
135
+ line-height: 1;
136
+ color: var(--icen-token-text-muted);
100
137
  cursor: pointer;
101
138
  transition:
102
- color 0.16s ease-out,
103
- 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);
104
142
  }
105
- .kb-seg-item:hover {
106
- color: var(--token-text);
143
+ .icen-kb-seg-item:hover {
144
+ color: var(--icen-token-text);
145
+ background: var(--icen-token-fill-hover);
107
146
  }
108
- .kb-seg-item.is-active {
109
- background: var(--token-bg);
110
- color: var(--token-text);
111
- box-shadow: 0 0 0 1px var(--token-line-soft);
147
+ .icen-kb-seg-item:active {
148
+ background: var(--icen-token-fill-pressed);
112
149
  }
113
- .kb-seg-item:focus-visible {
114
- outline: 2px solid var(--token-accent);
115
- outline-offset: -2px;
150
+ .icen-kb-seg-item.is-active {
151
+ background: var(--icen-token-surface);
152
+ color: var(--icen-token-text);
153
+ box-shadow: 0 0 0 1px var(--icen-token-line-soft);
116
154
  }
117
- .kb-seg-item:disabled {
118
- opacity: 0.45;
155
+ .icen-kb-seg-item:focus-visible {
156
+ outline: none;
157
+ box-shadow: var(--icen-ring);
158
+ }
159
+ .icen-kb-seg-item:disabled {
160
+ opacity: var(--icen-disabled-opacity);
119
161
  cursor: not-allowed;
120
162
  }
121
163
 
122
164
  /* ══════════════ kb-pipeline · 解析管线时间线(§5.5) ══════════════ */
123
165
 
124
- .kb-pipeline {
125
- border: 1px solid var(--token-line-soft);
126
- border-radius: var(--radius-md, 10px);
127
- background: var(--token-bg-soft);
128
- padding: 6px 8px;
166
+ .icen-kb-pipeline {
167
+ border: 1px solid var(--icen-token-line-soft);
168
+ border-radius: var(--icen-radius-md);
169
+ background: var(--icen-token-bg-soft);
170
+ padding: 8px;
129
171
  min-width: 0;
130
172
  }
131
- .kb-pipeline-list {
173
+ .icen-kb-pipeline-list {
132
174
  display: flex;
133
175
  flex-direction: column;
134
176
  gap: 10px;
135
177
  min-width: 0;
136
178
  }
137
179
 
138
- .kb-pipeline-head {
180
+ .icen-kb-pipeline-head {
139
181
  display: flex;
140
182
  align-items: center;
141
183
  gap: 6px;
142
184
  min-width: 0;
143
185
  }
144
- .kb-pipeline-head > .kb-pipeline-toggle {
186
+ .icen-kb-pipeline-head > .icen-kb-pipeline-toggle {
145
187
  flex: 1 1 auto;
146
188
  min-width: 0;
147
189
  }
148
- .kb-pipeline-head > .kb-pipeline-rerun {
190
+ .icen-kb-pipeline-head > .icen-kb-pipeline-rerun {
149
191
  flex: 0 0 auto;
150
192
  }
151
193
 
152
- /* 头部状态徽章:状态色只落在徽章(点由 .kb-dot 承担) */
153
- .kb-pipeline-state {
194
+ /* 头部状态徽章:状态色只落在徽章(点由 .icen-kb-dot 承担) */
195
+ .icen-kb-pipeline-state {
154
196
  display: inline-flex;
155
197
  align-items: center;
156
- gap: 5px;
198
+ gap: 6px;
157
199
  flex: 0 0 auto;
158
- font-size: 11.5px;
159
- color: var(--token-text-faint);
160
- }
161
- .kb-pipeline-state.is-running .kb-pipeline-state-label { color: var(--token-accent); }
162
- .kb-pipeline-state.is-done .kb-pipeline-state-label { color: var(--token-success); }
163
- .kb-pipeline-state.is-fail .kb-pipeline-state-label { color: var(--token-danger, var(--token-error)); }
164
- .kb-pipeline-state.is-cancel .kb-pipeline-state-label { color: var(--token-text-muted); }
200
+ font-size: var(--icen-density-font-size-xs);
201
+ letter-spacing: 0.3px;
202
+ color: var(--icen-token-text-faint);
203
+ }
204
+ .icen-kb-pipeline-state.is-running .icen-kb-pipeline-state-label { color: var(--icen-token-accent-text); }
205
+ .icen-kb-pipeline-state.is-done .icen-kb-pipeline-state-label { color: var(--icen-token-success); }
206
+ .icen-kb-pipeline-state.is-fail .icen-kb-pipeline-state-label { color: var(--icen-token-error); }
207
+ .icen-kb-pipeline-state.is-cancel .icen-kb-pipeline-state-label { color: var(--icen-token-text-muted); }
165
208
 
166
- .kb-pipeline-title {
209
+ .icen-kb-pipeline-title {
167
210
  flex: 1 1 auto;
168
211
  min-width: 0;
169
- color: var(--token-text);
170
- font-size: 13px;
212
+ color: var(--icen-token-text);
213
+ font-size: var(--icen-density-font-size-md);
214
+ font-weight: 600;
171
215
  overflow: hidden;
172
216
  text-overflow: ellipsis;
173
217
  white-space: nowrap;
174
218
  }
175
219
 
176
- /* 可选细粒度进度条(run.progress 定义时出现):3px 细线,与上下内容各留 8px */
177
- .kb-pipeline-progress {
220
+ /* 可选细粒度进度条(run.icen-progress 定义时出现):3px 细线,与上下内容各留 8px */
221
+ .icen-kb-pipeline-progress {
178
222
  height: 3px;
179
223
  margin: 8px;
180
- border-radius: 2px;
181
- background: var(--token-line-soft);
224
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
225
+ background: var(--icen-token-line-soft);
182
226
  overflow: hidden;
183
227
  }
184
- .kb-pipeline-progress > i {
228
+ .icen-kb-pipeline-progress > i {
185
229
  display: block;
186
230
  height: 100%;
187
- border-radius: 2px;
188
- background: var(--token-accent);
231
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
232
+ background: var(--icen-token-accent);
189
233
  opacity: 0.7;
190
- transition: width 0.24s ease-out;
234
+ transition: width var(--icen-tx-slow);
191
235
  }
192
236
 
193
- /* 步骤时间线:纵向连线(层级色,不给状态色) */
194
- .kb-pipeline-steps {
237
+ /* 步骤时间线:纵向连线(层级色,不给状态色;沿 inline-start,RTL 镜像) */
238
+ .icen-kb-pipeline-steps {
195
239
  list-style: none;
196
240
  margin: 4px 0 0;
197
- padding: 0 0 0 6px;
241
+ padding: 0;
242
+ padding-inline-start: 6px;
198
243
  display: flex;
199
244
  flex-direction: column;
200
245
  gap: 2px;
201
- min-width: 0;
246
+ min-inline-size: 0;
202
247
  }
203
- .kb-pipeline-step {
248
+ .icen-kb-pipeline-step {
204
249
  position: relative;
205
250
  display: flex;
206
251
  align-items: center;
207
252
  gap: 8px;
208
- min-height: 26px;
209
- padding: 1px 2px;
210
- border-radius: var(--radius-sm, 6px);
253
+ min-height: var(--icen-density-item-height);
254
+ padding: 2px;
255
+ border-radius: var(--icen-radius-sm);
211
256
  }
212
- .kb-pipeline-step:not(:last-child)::before {
257
+ .icen-kb-pipeline-step:not(:last-child)::before {
213
258
  content: '';
214
259
  position: absolute;
215
- left: 6.5px;
260
+ inset-inline-start: 5px; /* 对齐全族 6px 状态点的圆心 */
216
261
  top: 15px;
217
262
  bottom: -5px;
218
263
  width: 1px;
219
- background: var(--token-line-soft);
264
+ background: var(--icen-token-line-soft);
220
265
  }
221
- .kb-pipeline-step > .kb-dot {
266
+ .icen-kb-pipeline-step > .icen-kb-dot {
222
267
  position: relative;
223
268
  z-index: 1;
224
269
  flex: 0 0 auto;
225
270
  }
226
- .kb-pipeline-step-label {
227
- font-size: 12.5px;
228
- color: var(--token-text);
271
+ .icen-kb-pipeline-step-label {
272
+ font-size: var(--icen-density-font-size-md);
273
+ color: var(--icen-token-text);
229
274
  white-space: nowrap;
230
275
  }
231
- .kb-step-detail {
232
- font-size: 11.5px;
233
- color: var(--token-text-faint);
276
+ .icen-kb-step-detail {
277
+ font-size: var(--icen-density-font-size-xs);
278
+ color: var(--icen-token-text-faint);
234
279
  overflow: hidden;
235
280
  text-overflow: ellipsis;
236
281
  white-space: nowrap;
237
282
  min-width: 0;
238
283
  }
239
284
  /* 状态映射:未开始/排队/取消 中性弱化;进行中 accent;完成 muted;失败 danger */
240
- .kb-pipeline-step.is-unstart .kb-pipeline-step-label,
241
- .kb-pipeline-step.is-queued .kb-pipeline-step-label { color: var(--token-text-faint); }
242
- .kb-pipeline-step.is-running .kb-pipeline-step-label { color: var(--token-accent); }
243
- .kb-pipeline-step.is-done .kb-pipeline-step-label { color: var(--token-text-muted); }
244
- .kb-pipeline-step.is-cancel .kb-pipeline-step-label {
245
- color: var(--token-text-faint);
285
+ .icen-kb-pipeline-step.is-unstart .icen-kb-pipeline-step-label,
286
+ .icen-kb-pipeline-step.is-queued .icen-kb-pipeline-step-label { color: var(--icen-token-text-faint); }
287
+ .icen-kb-pipeline-step.is-running .icen-kb-pipeline-step-label { color: var(--icen-token-accent-text); }
288
+ .icen-kb-pipeline-step.is-done .icen-kb-pipeline-step-label { color: var(--icen-token-text-muted); }
289
+ .icen-kb-pipeline-step.is-cancel .icen-kb-pipeline-step-label {
290
+ color: var(--icen-token-text-faint);
246
291
  text-decoration: line-through;
247
292
  }
248
- .kb-pipeline-step.is-fail .kb-pipeline-step-label { color: var(--token-danger, var(--token-error)); }
249
- .kb-pipeline-step-elapsed {
250
- margin-left: auto;
293
+ .icen-kb-pipeline-step.is-fail .icen-kb-pipeline-step-label { color: var(--icen-token-error); }
294
+ .icen-kb-pipeline-step-elapsed {
295
+ margin-inline-start: auto;
251
296
  flex: 0 0 auto;
252
297
  }
253
298
 
254
299
  /* 失败错误区:阶段定位 + 原因(fail 时随 body 展开) */
255
- .kb-pipeline-error {
300
+ .icen-kb-pipeline-error {
256
301
  display: flex;
257
302
  align-items: flex-start;
258
303
  gap: 8px;
259
304
  margin-top: 8px;
260
305
  padding: 8px 10px;
261
- border-radius: var(--radius-sm, 6px);
262
- background: color-mix(in srgb, var(--token-danger, var(--token-error)) 7%, transparent);
306
+ border: 1px solid color-mix(in srgb, var(--icen-token-error) 24%, transparent);
307
+ border-radius: var(--icen-radius-sm);
308
+ background: var(--icen-token-error-muted);
263
309
  }
264
- .kb-pipeline-error > svg {
265
- width: 13px;
266
- height: 13px;
310
+ .icen-kb-pipeline-error > svg {
311
+ width: 14px;
312
+ height: 14px;
267
313
  flex: 0 0 auto;
268
- color: var(--token-danger, var(--token-error));
314
+ color: var(--icen-token-error);
269
315
  margin-top: 2px;
270
316
  }
271
- .kb-pipeline-error-stage {
317
+ .icen-kb-pipeline-error-stage {
272
318
  flex: 0 0 auto;
273
- font-family: var(--font-mono, ui-monospace, monospace);
274
- font-size: 11.5px;
319
+ font-family: var(--icen-font-mono);
320
+ font-size: var(--icen-density-font-size-xs);
275
321
  font-weight: 600;
276
- color: var(--token-danger, var(--token-error));
322
+ letter-spacing: 0.3px;
323
+ color: var(--icen-token-error);
277
324
  }
278
- .kb-pipeline-error-msg {
325
+ .icen-kb-pipeline-error-msg {
279
326
  flex: 1 1 auto;
280
327
  min-width: 0;
281
- font-size: 12px;
328
+ font-size: var(--icen-density-font-size-xs);
282
329
  line-height: 1.6;
283
- color: var(--token-text-muted);
330
+ /* 错误原因正文是实质内容,不用 muted 弱化(浅红底上 muted 过不了对比度门) */
331
+ color: var(--icen-token-text);
284
332
  }
285
333
 
286
334
  /* ══════════════ kb-chunks · chunk 编辑器(§5.6) ══════════════ */
287
335
 
288
- .kb-chunks {
336
+ .icen-kb-chunks {
289
337
  display: flex;
290
338
  flex-direction: column;
291
339
  gap: 10px;
292
340
  min-width: 0;
293
341
  }
294
- .kb-chunks-bar {
342
+ .icen-kb-chunks-bar {
295
343
  display: flex;
296
344
  align-items: center;
297
345
  gap: 8px;
298
346
  flex-wrap: wrap;
299
347
  }
300
- .kb-chunks-bar .kb-chunks-mode {
348
+ .icen-kb-chunks-bar .icen-kb-chunks-mode {
301
349
  flex: 0 0 auto;
302
350
  }
303
- .kb-chunks-bar .kb-chunks-search {
351
+ .icen-kb-chunks-bar .icen-kb-chunks-search {
304
352
  flex: 1 1 auto;
305
353
  min-width: 140px;
306
354
  }
307
- .kb-chunks-bar .kb-chunks-add {
355
+ .icen-kb-chunks-bar .icen-kb-chunks-add {
308
356
  flex: 0 0 auto;
309
357
  }
310
358
 
311
- .kb-chunk-list {
359
+ .icen-kb-chunk-list {
312
360
  display: flex;
313
361
  flex-direction: column;
314
362
  gap: 8px;
315
363
  min-width: 0;
316
364
  }
317
365
 
318
- .kb-chunk {
366
+ .icen-kb-chunk {
319
367
  display: grid;
320
368
  grid-template-columns: auto minmax(0, 1fr) auto;
321
369
  align-items: start;
322
370
  gap: 10px;
323
371
  padding: 8px 10px;
324
- border: 1px solid var(--token-line-soft);
325
- border-radius: var(--radius-md, 10px);
326
- background: var(--token-bg-soft);
327
- transition: opacity 0.16s ease-out;
372
+ border: 1px solid var(--icen-token-line-soft);
373
+ border-radius: var(--icen-radius-md);
374
+ background: var(--icen-token-bg-soft);
375
+ transition:
376
+ color var(--icen-tx-fast),
377
+ border-color var(--icen-tx-fast),
378
+ background-color var(--icen-tx-fast);
379
+ }
380
+ /* available=false:不删除但排除出检索 → 文字降级(不整卡透明:透明度会被 axe 算进对比度) */
381
+ .icen-kb-chunk.is-off {
382
+ color: var(--icen-token-text-muted);
328
383
  }
329
- /* available=false:不删除但排除出检索 → 整体降透明度 */
330
- .kb-chunk.is-off {
331
- opacity: 0.55;
384
+ .icen-kb-chunk.is-off .icen-kb-chunk-content {
385
+ color: var(--icen-token-text-muted);
332
386
  }
333
387
 
334
388
  /* 启用开关(kb 域自持,无 switch.css 依赖) */
335
- .kb-chunk-switch {
389
+ .icen-kb-chunk-switch {
336
390
  display: inline-flex;
337
391
  align-items: center;
338
392
  gap: 6px;
393
+ min-block-size: var(--icen-density-item-height);
339
394
  margin-top: 2px;
340
- font-size: 11.5px;
341
- color: var(--token-text-faint);
395
+ font-size: var(--icen-density-font-size-xs);
396
+ color: var(--icen-token-text-faint);
342
397
  cursor: pointer;
343
398
  user-select: none;
344
399
  }
345
- .kb-chunk-switch input {
400
+ .icen-kb-chunk-switch input {
346
401
  position: absolute;
347
402
  width: 0;
348
403
  height: 0;
349
404
  opacity: 0;
350
405
  }
351
- .kb-chunk-switch-track {
406
+ .icen-kb-chunk-switch-track {
352
407
  position: relative;
353
408
  flex: 0 0 auto;
354
- width: 26px;
355
- height: 15px;
356
- border-radius: 999px;
357
- background: var(--token-line-soft);
358
- transition: background-color 0.16s ease-out;
409
+ width: 28px;
410
+ height: 17px;
411
+ border: 1px solid transparent;
412
+ border-radius: var(--icen-radius-full);
413
+ background: var(--icen-token-line-soft);
414
+ transition: background-color var(--icen-tx-fast);
359
415
  }
360
- .kb-chunk-switch-thumb {
416
+ .icen-kb-chunk-switch-thumb {
361
417
  position: absolute;
362
418
  top: 2px;
363
- left: 2px;
419
+ left: 2px; /* guard:allow-physical 开关是物理隐喻控件(Material 惯例:RTL 下方向保持物理,不镜像) */
364
420
  width: 11px;
365
421
  height: 11px;
422
+ border: 1px solid transparent;
366
423
  border-radius: 50%;
367
- background: var(--token-bg);
368
- box-shadow: 0 0 0 1px var(--token-line-soft);
369
- transition: transform 0.16s ease-out;
424
+ background: var(--icen-token-bg);
425
+ box-shadow: 0 0 0 1px var(--icen-token-line-soft);
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);
370
431
  }
371
- .kb-chunk-switch input:checked + .kb-chunk-switch-track {
372
- background: var(--token-success);
432
+ .icen-kb-chunk-switch:active input:not(:checked) + .icen-kb-chunk-switch-track {
433
+ background: var(--icen-token-fill-pressed);
373
434
  }
374
- .kb-chunk-switch input:checked + .kb-chunk-switch-track > .kb-chunk-switch-thumb {
375
- transform: translateX(11px);
435
+ .icen-kb-chunk-switch input:checked + .icen-kb-chunk-switch-track {
436
+ background: var(--icen-token-success);
376
437
  }
377
- .kb-chunk-switch input:focus-visible + .kb-chunk-switch-track {
378
- outline: 2px solid var(--token-accent);
379
- outline-offset: 1px;
438
+ .icen-kb-chunk-switch input:checked + .icen-kb-chunk-switch-track > .icen-kb-chunk-switch-thumb {
439
+ transform: translateX(11px); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
440
+ }
441
+ .icen-kb-chunk-switch input:focus-visible + .icen-kb-chunk-switch-track {
442
+ outline: none;
443
+ box-shadow: var(--icen-ring);
380
444
  }
381
445
 
382
- .kb-chunk-main {
446
+ .icen-kb-chunk-main {
383
447
  display: flex;
384
448
  flex-direction: column;
385
- gap: 5px;
386
- min-width: 0;
449
+ gap: 6px;
450
+ min-inline-size: 0;
387
451
  }
388
- /* 行内编辑:静默无边,编辑态(focus)边框 accent */
389
- .kb-chunk-content {
390
- padding: 2px 6px;
452
+ /* 行内编辑:静默无边,编辑态(focus)边框 accent + 焦点环 */
453
+ .icen-kb-chunk-content {
454
+ padding: 3px 6px;
391
455
  margin: 0 -6px;
392
456
  border: 1px solid transparent;
393
- border-radius: var(--radius-sm, 6px);
394
- font-size: 12.5px;
457
+ border-radius: var(--icen-radius-sm);
458
+ font-size: var(--icen-density-font-size-md);
395
459
  line-height: 1.7;
396
- color: var(--token-text);
460
+ color: var(--icen-token-text);
397
461
  white-space: pre-wrap;
398
462
  word-break: break-word;
399
- 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);
400
468
  }
401
- .kb-chunk-content:focus {
469
+ .icen-kb-chunk-content:focus {
402
470
  outline: none;
403
- border-color: var(--token-accent);
404
- background: var(--token-bg);
471
+ border-color: var(--icen-token-accent);
472
+ background: var(--icen-token-surface);
473
+ box-shadow: var(--icen-ring);
405
474
  }
406
475
 
407
- .kb-chunk-keywords {
476
+ .icen-kb-chunk-keywords {
408
477
  display: flex;
409
478
  align-items: center;
410
479
  flex-wrap: wrap;
411
480
  gap: 4px;
412
- min-width: 0;
481
+ min-inline-size: 0;
413
482
  }
414
- .kb-chunk-keyword-x {
483
+ .icen-kb-chunk-keyword-x {
415
484
  border: none;
416
485
  background: none;
417
- padding: 0 0 0 3px;
486
+ padding: 0;
487
+ padding-inline-start: 3px;
488
+ border-radius: var(--icen-radius-xs);
418
489
  font: inherit;
419
- font-size: 12px;
490
+ font-size: var(--icen-density-font-size-xs);
420
491
  line-height: 1;
421
- color: var(--token-text-faint);
492
+ color: var(--icen-token-text-faint);
422
493
  cursor: pointer;
494
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast);
495
+ }
496
+ .icen-kb-chunk-keyword-x:hover {
497
+ color: var(--icen-token-error);
498
+ background: var(--icen-token-fill-hover);
423
499
  }
424
- .kb-chunk-keyword-x:hover {
425
- color: var(--token-danger, var(--token-error));
500
+ .icen-kb-chunk-keyword-x:active {
501
+ background: var(--icen-token-fill-pressed);
426
502
  }
427
- .kb-chunk-keyword-x:focus-visible {
428
- outline: 2px solid var(--token-accent);
429
- outline-offset: 1px;
503
+ .icen-kb-chunk-keyword-x:focus-visible {
504
+ outline: none;
505
+ box-shadow: var(--icen-ring);
430
506
  }
431
- .kb-chunk-keyword-input {
507
+ .icen-kb-chunk-keyword-input {
432
508
  border: none;
433
509
  background: none;
434
510
  outline: none;
435
511
  padding: 2px 4px;
436
512
  width: 96px;
437
- font-family: var(--font-mono, ui-monospace, monospace);
438
- font-size: 11px;
439
- color: var(--token-text);
513
+ font-family: var(--icen-font-mono);
514
+ font-size: var(--icen-density-font-size-xs);
515
+ color: var(--icen-token-text);
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);
440
522
  }
441
- .kb-chunk-keyword-input::placeholder {
442
- color: var(--token-text-faint);
523
+ .icen-kb-chunk-keyword-input::placeholder {
524
+ color: var(--icen-token-text-faint);
443
525
  }
444
526
 
445
- .kb-chunk-meta {
446
- color: var(--token-text-faint);
527
+ .icen-kb-chunk-meta {
528
+ color: var(--icen-token-text-muted);
447
529
  }
448
- .kb-chunk-edited-flag {
449
- color: var(--token-warning);
530
+ .icen-kb-chunk-edited-flag {
531
+ color: var(--icen-token-warning);
450
532
  }
451
533
 
452
534
  /* ══════════════ kb-segment · 分段策略 + 实时预览(§5.7) ══════════════ */
453
535
 
454
- .kb-segment-host {
536
+ .icen-kb-segment-host {
455
537
  min-width: 0;
456
538
  }
457
- .kb-segment {
539
+ .icen-kb-segment {
458
540
  display: grid;
459
541
  grid-template-columns: minmax(260px, 5fr) minmax(0, 7fr);
460
542
  gap: 16px;
461
543
  min-width: 0;
462
544
  }
463
545
  @media (max-width: 720px) {
464
- .kb-segment {
546
+ .icen-kb-segment {
465
547
  grid-template-columns: minmax(0, 1fr);
466
548
  }
467
549
  }
468
550
 
469
- .kb-segment-form {
551
+ .icen-kb-segment-form {
470
552
  display: flex;
471
553
  flex-direction: column;
472
554
  gap: 10px;
473
555
  min-width: 0;
474
556
  }
475
- .kb-segment-locked {
476
- color: var(--token-warning);
557
+ .icen-kb-segment-locked {
558
+ color: var(--icen-token-warning);
477
559
  }
478
- .kb-segment-locked svg {
479
- color: var(--token-warning);
560
+ .icen-kb-segment-locked svg {
561
+ color: var(--icen-token-warning);
480
562
  }
481
- .kb-field {
563
+ .icen-kb-field {
482
564
  display: flex;
483
565
  flex-direction: column;
484
566
  gap: 4px;
485
567
  min-width: 0;
486
568
  }
487
- .kb-field > .kb-field-label {
488
- font-size: 11.5px;
489
- color: var(--token-text-faint);
569
+ .icen-kb-field > .icen-kb-field-label {
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);
490
574
  }
491
- .kb-field > .kb-input {
575
+ .icen-kb-field > .icen-kb-input {
492
576
  width: 100%;
493
577
  }
494
- .kb-segment-overlap-error {
578
+ .icen-kb-segment-overlap-error {
495
579
  margin-top: -4px;
496
- color: var(--token-danger, var(--token-error));
580
+ font-size: var(--icen-density-font-size-xs);
581
+ color: var(--icen-token-error);
497
582
  }
498
- .kb-segment-clean {
583
+ .icen-kb-segment-clean {
499
584
  display: flex;
500
585
  flex-wrap: wrap;
501
586
  gap: 6px 14px;
502
587
  }
503
- .kb-segment-clean-item {
588
+ .icen-kb-segment-clean-item {
504
589
  display: inline-flex;
505
590
  align-items: center;
506
- gap: 5px;
507
- font-size: 12px;
508
- color: var(--token-text-muted);
591
+ gap: 6px;
592
+ min-block-size: 24px;
593
+ font-size: var(--icen-density-font-size-xs);
594
+ color: var(--icen-token-text-muted);
509
595
  cursor: pointer;
510
596
  user-select: none;
597
+ transition: color var(--icen-tx-fast);
511
598
  }
512
- .kb-segment-clean-item input {
513
- accent-color: var(--token-accent);
514
- margin: 0;
599
+ .icen-kb-segment-clean-item:hover {
600
+ color: var(--icen-token-text);
515
601
  }
602
+ .icen-kb-segment-clean-item .icen-checkbox { flex: 0 0 auto; }
516
603
 
517
- .kb-segment-preview {
604
+ .icen-kb-segment-preview {
518
605
  display: flex;
519
606
  flex-direction: column;
520
607
  gap: 8px;
521
- padding: 10px;
522
- border: 1px solid var(--token-line-soft);
523
- border-radius: var(--radius-md, 10px);
524
- background: var(--token-bg);
608
+ padding: 12px;
609
+ border: 1px solid var(--icen-token-line-soft);
610
+ border-radius: var(--icen-radius-md);
611
+ background: var(--icen-token-bg);
525
612
  min-width: 0;
526
613
  min-height: 0;
527
614
  }
528
- .kb-segment-stats {
615
+ .icen-kb-segment-stats {
529
616
  display: flex;
530
617
  align-items: baseline;
531
618
  gap: 12px;
532
619
  flex-wrap: wrap;
533
620
  }
534
- .kb-segment-stat {
535
- font-size: 12.5px;
536
- color: var(--token-text);
621
+ .icen-kb-segment-stat {
622
+ font-size: var(--icen-density-font-size-xs);
623
+ color: var(--icen-token-text);
537
624
  }
538
- .kb-segment-blocks {
625
+ .icen-kb-segment-blocks {
539
626
  display: flex;
540
627
  flex-direction: column;
541
628
  gap: 6px;
@@ -544,355 +631,447 @@
544
631
  max-height: 480px;
545
632
  overflow-y: auto;
546
633
  }
547
- .kb-segment-block {
634
+ .icen-kb-segment-block {
548
635
  display: grid;
549
636
  grid-template-columns: auto minmax(0, 1fr);
550
637
  gap: 8px;
551
638
  padding: 6px 8px;
552
- border: 1px solid var(--token-line-soft);
553
- border-radius: var(--radius-sm, 6px);
554
- background: var(--token-bg-soft);
639
+ border: 1px solid var(--icen-token-line-soft);
640
+ border-radius: var(--icen-radius-sm);
641
+ background: var(--icen-token-bg-soft);
555
642
  }
556
- .kb-segment-block-no {
557
- color: var(--token-text-faint);
643
+ .icen-kb-segment-block-no {
644
+ color: var(--icen-token-text-faint);
558
645
  }
559
646
  /* 内容截断 200px,点击展开(渐进披露) */
560
- .kb-segment-block-text {
647
+ .icen-kb-segment-block-text {
561
648
  max-height: 200px;
562
649
  overflow: hidden;
563
- font-size: 12.5px;
650
+ font-size: var(--icen-density-font-size-md);
564
651
  line-height: 1.7;
565
- color: var(--token-text-muted);
652
+ color: var(--icen-token-text-muted);
566
653
  white-space: pre-wrap;
567
654
  word-break: break-word;
568
655
  cursor: pointer;
569
- 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);
570
665
  }
571
- .kb-segment-block-text.is-open {
666
+ .icen-kb-segment-block-text.is-open {
572
667
  max-height: none;
573
668
  }
574
- .kb-segment-block-text:focus-visible {
575
- outline: 2px solid var(--token-accent);
576
- outline-offset: 1px;
669
+ .icen-kb-segment-block-text:focus-visible {
670
+ outline: none;
671
+ box-shadow: var(--icen-ring);
577
672
  }
578
673
 
579
674
  /* ══════════════ kb-connector · 连接器卡(§5.8) ══════════════ */
580
675
 
581
- .kb-connector-grid {
676
+ .icen-kb-connector-grid {
582
677
  display: grid;
583
678
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
584
679
  gap: 12px;
585
680
  min-width: 0;
586
681
  }
587
682
 
588
- .kb-connector {
683
+ .icen-kb-connector {
589
684
  display: flex;
590
685
  flex-direction: column;
591
686
  gap: 8px;
592
- padding: 10px 12px 10px 14px;
593
- border: 1px solid var(--token-line-soft);
594
- border-left: 2px solid var(--token-line-soft);
595
- border-radius: var(--radius-md, 10px);
596
- background: var(--token-bg-soft);
597
- min-width: 0;
598
- }
599
- /* 健康左缘 2px 色条(connectorHealth 判定;色只在此与状态点上) */
600
- .kb-connector.is-healthy { border-left-color: var(--token-success); }
601
- .kb-connector.is-stale { border-left-color: var(--token-warning); }
602
- .kb-connector.is-failing { border-left-color: var(--token-danger, var(--token-error)); }
603
- .kb-connector.is-off { border-left-color: var(--token-line); }
687
+ padding-block: 10px;
688
+ padding-inline: 12px;
689
+ border: 1px solid var(--icen-token-line-soft);
690
+ border-inline-start: 2px solid var(--icen-token-line-soft);
691
+ border-radius: var(--icen-radius-md);
692
+ background: var(--icen-token-bg-soft);
693
+ min-inline-size: 0;
694
+ }
695
+ /* 健康起始缘 2px 色条(connectorHealth 判定;色只在此与状态点上;RTL 镜像) */
696
+ .icen-kb-connector.is-healthy { border-inline-start-color: var(--icen-token-success); }
697
+ .icen-kb-connector.is-stale { border-inline-start-color: var(--icen-token-warning); }
698
+ .icen-kb-connector.is-failing { border-inline-start-color: var(--icen-token-error); }
699
+ .icen-kb-connector.is-off { border-inline-start-color: var(--icen-token-line); }
604
700
 
605
- .kb-connector-head {
701
+ .icen-kb-connector-head {
606
702
  display: flex;
607
703
  align-items: center;
608
704
  gap: 8px;
609
- min-width: 0;
705
+ min-inline-size: 0;
610
706
  }
611
- /* .kb-source-icon 基元归 kb-ground.css;本域兜底一份最小骨架(同名同义,共存不冲突) */
612
- .kb-connector-head .kb-source-icon {
707
+ /* .icen-kb-source-icon 基元归 kb-ground.css;本域兜底一份最小骨架(同名同义,共存不冲突) */
708
+ .icen-kb-connector-head .icen-kb-source-icon {
613
709
  flex: 0 0 auto;
614
710
  display: inline-flex;
615
- color: var(--token-text-muted);
711
+ color: var(--icen-token-text-muted);
616
712
  }
617
- .kb-connector-head .kb-source-icon svg {
713
+ .icen-kb-connector-head .icen-kb-source-icon svg {
618
714
  width: 16px;
619
715
  height: 16px;
620
716
  }
621
- .kb-connector-main {
717
+ .icen-kb-connector-main {
622
718
  flex: 1 1 auto;
623
- min-width: 0;
719
+ min-inline-size: 0;
624
720
  display: flex;
625
721
  flex-direction: column;
626
722
  gap: 1px;
627
723
  }
628
- .kb-connector-name {
629
- font-size: 13px;
724
+ .icen-kb-connector-name {
725
+ font-size: var(--icen-density-font-size-md);
630
726
  font-weight: 600;
631
- color: var(--token-text);
727
+ line-height: 1.35;
728
+ color: var(--icen-token-text);
632
729
  overflow: hidden;
633
730
  text-overflow: ellipsis;
634
731
  white-space: nowrap;
635
732
  }
636
- .kb-connector-sub {
637
- font-size: 11.5px;
638
- color: var(--token-text-faint);
733
+ .icen-kb-connector-sub {
734
+ font-size: var(--icen-density-font-size-xs);
735
+ line-height: 1.4;
736
+ color: var(--icen-token-text-faint);
639
737
  overflow: hidden;
640
738
  text-overflow: ellipsis;
641
739
  white-space: nowrap;
642
740
  }
643
- /* 同步计划:mono 不换行(cron 原值包 .kb-chip;人类可读文本 .kb-meta)——绝不散点裸渲 */
644
- .kb-connector-schedule {
741
+ /* 同步计划:mono 不换行(cron 原值包 .icen-kb-chip;人类可读文本 .icen-kb-meta)——绝不散点裸渲 */
742
+ .icen-kb-connector-schedule {
645
743
  flex: 0 0 auto;
646
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
744
+ font-family: var(--icen-font-mono);
745
+ font-size: var(--icen-density-font-size-xs);
746
+ letter-spacing: 0.3px;
647
747
  white-space: nowrap;
648
748
  }
649
749
 
650
- /* 指标区:CSS grid 两列对齐(label 11px faint 左、value .kb-num 右,同列基线) */
651
- .kb-connector-metrics {
750
+ /* 指标区:CSS grid 两列对齐(label 11px faint 起始缘、value .icen-kb-num 行内末端,同列基线) */
751
+ .icen-kb-connector-metrics {
652
752
  display: grid;
653
753
  grid-template-columns: repeat(2, minmax(0, 1fr));
654
754
  gap: 6px 12px;
655
755
  }
656
- .kb-connector-signal {
756
+ .icen-kb-connector-signal {
657
757
  display: flex;
658
758
  align-items: baseline;
659
759
  gap: 6px;
660
- min-width: 0;
760
+ min-inline-size: 0;
661
761
  min-height: 22px;
662
762
  }
663
763
  /* 健康状态点与文字基线并排时垂直居中,避免点悬浮 */
664
- .kb-connector-signal .kb-dot {
764
+ .icen-kb-connector-signal .icen-kb-dot {
665
765
  align-self: center;
666
766
  }
667
- .kb-connector-signal-label {
767
+ .icen-kb-connector-signal-label {
668
768
  flex: 0 0 auto;
669
- font-size: 11px;
670
- color: var(--token-text-faint);
769
+ font-size: var(--icen-density-font-size-xs);
770
+ color: var(--icen-token-text-faint);
671
771
  }
672
- .kb-connector-signal-value {
772
+ .icen-kb-connector-signal-value {
673
773
  flex: 1 1 auto;
674
- min-width: 0;
675
- margin-left: auto;
676
- font-size: 12px;
677
- color: var(--token-text);
678
- text-align: right;
774
+ min-inline-size: 0;
775
+ margin-inline-start: auto;
776
+ font-size: var(--icen-density-font-size-xs);
777
+ color: var(--icen-token-text);
778
+ text-align: end;
679
779
  overflow: hidden;
680
780
  text-overflow: ellipsis;
681
781
  white-space: nowrap;
682
782
  }
683
- /* 凭证与指标同排版(文字值右对齐同列),仅以颜色区分:过期 = error 红与 failing 一致,未配置 warning,正常 muted */
684
- .kb-connector-cred.is-expired {
685
- color: var(--token-danger, var(--token-error));
783
+ /* 凭证与指标同排版(文字值行内末端对齐同列),仅以颜色区分:过期 = error 红与 failing 一致,未配置 warning,正常 muted */
784
+ .icen-kb-connector-cred.is-expired {
785
+ color: var(--icen-token-error);
686
786
  font-weight: 500;
687
787
  }
688
- .kb-connector-cred.is-none {
689
- color: var(--token-warning);
788
+ .icen-kb-connector-cred.is-none {
789
+ color: var(--icen-token-warning);
690
790
  }
691
- .kb-connector-cred.is-ok {
692
- color: var(--token-text-muted);
791
+ .icen-kb-connector-cred.is-ok {
792
+ color: var(--icen-token-text-muted);
693
793
  }
694
794
 
695
- .kb-connector-foot {
795
+ .icen-kb-connector-foot {
696
796
  display: flex;
697
797
  align-items: center;
698
798
  justify-content: space-between;
699
799
  gap: 8px;
700
800
  padding-top: 8px;
701
- border-top: 1px solid var(--token-line-soft);
801
+ border-top: 1px solid var(--icen-token-line-soft);
702
802
  flex-wrap: wrap;
703
803
  }
704
- .kb-connector-actions {
804
+ .icen-kb-connector-actions {
705
805
  display: inline-flex;
706
806
  align-items: center;
707
807
  gap: 6px;
708
808
  flex-wrap: wrap;
709
809
  }
710
- .kb-connector-actions .kb-btn {
711
- padding: 2px 8px;
712
- font-size: 11.5px;
713
- }
714
810
 
715
811
  /* ══════════════ kb-metadata · 元数据管理(§5.9) ══════════════ */
716
812
 
717
- .kb-metadata {
813
+ .icen-kb-metadata {
718
814
  min-width: 0;
719
815
  }
720
- .kb-metadata-table {
816
+ .icen-kb-metadata-table {
721
817
  width: 100%;
722
818
  border-collapse: collapse;
723
819
  table-layout: fixed;
820
+ font-variant-numeric: tabular-nums;
724
821
  }
725
- .kb-metadata-th {
726
- padding: 4px 8px;
727
- border-bottom: 1px solid var(--token-line-soft);
728
- font-size: 11.5px;
822
+ .icen-kb-metadata-th {
823
+ height: var(--icen-density-item-height);
824
+ padding: 5px 8px;
825
+ border-bottom: 1px solid var(--icen-token-line-soft);
826
+ font-size: var(--icen-density-font-size-xs);
729
827
  font-weight: 500;
730
- color: var(--token-text-faint);
731
- text-align: left;
828
+ letter-spacing: 0.3px;
829
+ color: var(--icen-token-text-faint);
830
+ text-align: start;
732
831
  white-space: nowrap;
733
832
  }
734
- .kb-metadata-th:nth-child(1) { width: 32%; }
735
- .kb-metadata-th:nth-child(2) { width: 84px; }
736
- .kb-metadata-th:nth-child(4) { width: 60px; }
737
- .kb-metadata-row > td {
738
- padding: 4px 8px;
739
- border-bottom: 1px solid var(--token-line-soft);
740
- font-size: 12.5px;
833
+ .icen-kb-metadata-th:nth-child(1) { width: 32%; }
834
+ .icen-kb-metadata-th:nth-child(2) { width: 84px; }
835
+ .icen-kb-metadata-th:nth-child(4) { width: 96px; } /* 28px 操作钮(含中英文按钮文本)不截断 */
836
+ .icen-kb-metadata-row > td {
837
+ padding: 5px 8px;
838
+ border-bottom: 1px solid var(--icen-token-line-soft);
839
+ font-size: var(--icen-density-font-size-md);
741
840
  vertical-align: middle;
742
841
  overflow: hidden;
743
842
  text-overflow: ellipsis;
744
843
  white-space: nowrap;
745
844
  }
746
- .kb-metadata-row:hover > td {
747
- background: var(--token-bg-soft);
845
+ .icen-kb-metadata-row:last-child > td {
846
+ border-bottom: 0; /* 列表最后一行去分隔线 */
748
847
  }
749
- .kb-metadata-key {
750
- font-family: var(--font-mono, ui-monospace, monospace);
751
- font-size: 12px;
752
- color: var(--token-text);
848
+ .icen-kb-metadata-row:hover > td {
849
+ background: var(--icen-token-fill-hover);
753
850
  }
754
- .kb-metadata-key-label {
755
- font-size: 11px;
756
- color: var(--token-text-faint);
851
+ .icen-kb-metadata-key {
852
+ font-family: var(--icen-font-mono);
853
+ font-size: var(--icen-density-font-size-xs);
854
+ color: var(--icen-token-text);
757
855
  }
758
- .kb-metadata-builtin-flag {
759
- margin-left: 6px;
760
- font-size: 10.5px;
761
- color: var(--token-text-faint);
762
- border: 1px solid var(--token-line-soft);
763
- border-radius: 999px;
764
- padding: 1px 6px;
856
+ .icen-kb-metadata-key-label {
857
+ font-size: var(--icen-density-font-size-xs);
858
+ color: var(--icen-token-text-faint);
765
859
  }
766
- .kb-metadata-type {
767
- font-family: var(--font-mono, ui-monospace, monospace);
860
+ .icen-kb-metadata-builtin-flag {
861
+ display: inline-flex;
862
+ align-items: center;
863
+ min-block-size: 22px;
864
+ margin-inline-start: 6px;
865
+ padding: 0 7px;
866
+ font-size: var(--icen-density-font-size-xs);
867
+ line-height: 1;
868
+ color: var(--icen-token-text-faint);
869
+ border: 1px solid var(--icen-token-line-soft);
870
+ border-radius: var(--icen-radius-full);
871
+ vertical-align: middle;
768
872
  }
769
- .kb-metadata-readonly {
770
- color: var(--token-text-muted);
873
+ .icen-kb-metadata-type {
874
+ font-family: var(--icen-font-mono);
771
875
  }
772
- .kb-metadata-value .kb-input {
773
- width: 100%;
876
+ .icen-kb-metadata-readonly {
877
+ color: var(--icen-token-text-muted);
774
878
  }
775
- .kb-metadata-ops {
776
- text-align: right;
879
+ .icen-kb-metadata-value .icen-kb-input {
880
+ inline-size: 100%;
777
881
  }
778
- .kb-metadata-ops .kb-btn {
779
- padding: 1px 8px;
780
- font-size: 11.5px;
882
+ .icen-kb-metadata-ops {
883
+ text-align: end;
781
884
  }
782
- .kb-metadata-empty {
783
- padding: 18px 8px !important;
885
+ .icen-kb-metadata-empty {
886
+ padding: 20px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
887
+ font-size: var(--icen-font-size-caption);
784
888
  text-align: center;
785
- color: var(--token-text-faint);
786
- white-space: normal !important;
889
+ color: var(--icen-token-text-faint);
890
+ white-space: normal !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
787
891
  }
788
- .kb-metadata-new {
892
+ .icen-kb-metadata-new {
789
893
  display: flex;
790
894
  align-items: center;
791
895
  gap: 8px;
792
896
  flex-wrap: wrap;
793
- margin-top: 10px;
897
+ margin-top: 12px;
794
898
  }
795
- .kb-metadata-new .kb-metadata-new-key {
899
+ .icen-kb-metadata-new .icen-kb-metadata-new-key {
796
900
  width: 220px;
797
901
  }
798
902
 
799
903
  /* ══════════════ kb-qa · 认证问答对编辑器(§5.10) ══════════════ */
800
904
 
801
- .kb-qa {
802
- min-width: 0;
905
+ .icen-kb-qa {
906
+ min-inline-size: 0;
803
907
  }
804
- .kb-qa-bar {
908
+ .icen-kb-qa-bar {
805
909
  display: flex;
806
910
  align-items: center;
807
911
  gap: 8px;
808
912
  flex-wrap: wrap;
809
913
  margin-bottom: 8px;
810
914
  }
811
- .kb-qa-bar .kb-qa-hint {
915
+ .icen-kb-qa-bar .icen-kb-qa-hint {
812
916
  flex: 1 1 auto;
813
- min-width: 0;
917
+ min-inline-size: 0;
814
918
  overflow: hidden;
815
919
  text-overflow: ellipsis;
816
920
  }
817
- .kb-qa-table {
818
- width: 100%;
921
+ .icen-kb-qa-table {
922
+ inline-size: 100%;
819
923
  border-collapse: collapse;
820
924
  table-layout: fixed;
925
+ font-variant-numeric: tabular-nums;
821
926
  }
822
- .kb-qa-th {
823
- padding: 4px 8px;
824
- border-bottom: 1px solid var(--token-line-soft);
825
- font-size: 11.5px;
927
+ .icen-kb-qa-th {
928
+ height: var(--icen-density-item-height);
929
+ padding: 5px 8px;
930
+ border-bottom: 1px solid var(--icen-token-line-soft);
931
+ font-size: var(--icen-density-font-size-xs);
826
932
  font-weight: 500;
827
- color: var(--token-text-faint);
828
- text-align: left;
933
+ letter-spacing: 0.3px;
934
+ color: var(--icen-token-text-faint);
935
+ text-align: start;
829
936
  white-space: nowrap;
830
937
  }
831
- .kb-qa-th:nth-child(1) { width: 44%; }
832
- .kb-qa-th:nth-child(2) { width: 44%; }
833
- .kb-qa-th:nth-child(3) { width: 52px; }
834
- .kb-qa-row > td {
835
- padding: 4px 8px;
836
- border-bottom: 1px solid var(--token-line-soft);
837
- font-size: 12.5px;
938
+ .icen-kb-qa-th:nth-child(1) { width: 44%; }
939
+ .icen-kb-qa-th:nth-child(2) { width: 44%; }
940
+ .icen-kb-qa-th:nth-child(3) { width: 88px; } /* 28px 操作钮(含中英文按钮文本)不截断 */
941
+ .icen-kb-qa-row > td {
942
+ padding: 5px 8px;
943
+ border-bottom: 1px solid var(--icen-token-line-soft);
944
+ font-size: var(--icen-density-font-size-md);
838
945
  vertical-align: top;
839
946
  }
840
- .kb-qa-row:hover > td {
841
- background: var(--token-bg-soft);
947
+ .icen-kb-qa-row:last-child > td {
948
+ border-bottom: 0; /* 列表最后一行去分隔线 */
949
+ }
950
+ .icen-kb-qa-row:hover > td {
951
+ background: var(--icen-token-fill-hover);
842
952
  }
843
- /* 行内编辑格:静默,focus 内描边 accent */
844
- .kb-qa-q,
845
- .kb-qa-a {
953
+ /* 行内编辑格:静默,hover 提示可编辑,focus 给焦点环 */
954
+ .icen-kb-qa-q,
955
+ .icen-kb-qa-a {
846
956
  outline: none;
847
- border-radius: var(--radius-sm, 6px);
848
- padding: 2px 4px;
849
- margin: -2px -4px;
957
+ border-radius: var(--icen-radius-sm);
958
+ padding: 3px 4px;
959
+ margin: -3px -4px;
850
960
  line-height: 1.7;
851
961
  word-break: break-word;
852
- transition: box-shadow 0.16s ease-out;
962
+ transition: box-shadow var(--icen-tx-fast), background-color var(--icen-tx-fast);
853
963
  }
854
- .kb-qa-q:focus,
855
- .kb-qa-a:focus {
856
- box-shadow: inset 0 0 0 1px var(--token-accent);
964
+ .icen-kb-qa-q:hover,
965
+ .icen-kb-qa-a:hover {
966
+ background: var(--icen-token-fill-hover);
857
967
  }
858
- .kb-qa-q:empty::before,
859
- .kb-qa-a:empty::before {
968
+ .icen-kb-qa-q:focus,
969
+ .icen-kb-qa-a:focus {
970
+ box-shadow: var(--icen-ring);
971
+ }
972
+ .icen-kb-qa-q:empty::before,
973
+ .icen-kb-qa-a:empty::before {
860
974
  content: '…';
861
- color: var(--token-text-faint);
975
+ color: var(--icen-token-text-faint);
862
976
  }
863
- .kb-qa-ops {
864
- text-align: right;
977
+ .icen-kb-qa-ops {
978
+ text-align: end;
865
979
  vertical-align: middle;
866
980
  }
867
- .kb-qa-ops .kb-btn {
868
- padding: 1px 8px;
869
- font-size: 11.5px;
870
- }
871
- .kb-qa-empty {
872
- padding: 18px 8px !important;
981
+ .icen-kb-qa-empty {
982
+ padding: 20px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
983
+ font-size: var(--icen-font-size-caption);
873
984
  text-align: center;
874
- color: var(--token-text-faint);
985
+ color: var(--icen-token-text-faint);
875
986
  }
876
987
 
877
988
  /* ══════════════ 密度 / 动效守卫 ══════════════ */
878
989
 
879
- [data-density='compact'] .kb-pipeline-step { min-height: 22px; }
880
- [data-density='compact'] .kb-chunk { padding: 5px 8px; gap: 8px; }
881
- [data-density='compact'] .kb-metadata-row > td,
882
- [data-density='compact'] .kb-qa-row > td { padding-top: 2px; padding-bottom: 2px; }
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; }
997
+ [data-icen-density='compact'] .icen-kb-metadata-row > td,
998
+ [data-icen-density='compact'] .icen-kb-qa-row > td { padding-top: 2px; padding-bottom: 2px; }
883
999
 
884
1000
  @media (prefers-reduced-motion: reduce) {
885
- .kb-btn,
886
- .kb-input,
887
- .kb-seg-item,
888
- .kb-chunk,
889
- .kb-chunk-content,
890
- .kb-chunk-switch-track,
891
- .kb-chunk-switch-thumb,
892
- .kb-pipeline-progress > i,
893
- .kb-segment-block-text,
894
- .kb-qa-q,
895
- .kb-qa-a {
1001
+ .icen-kb-btn,
1002
+ .icen-kb-input,
1003
+ .icen-kb-seg-item,
1004
+ .icen-kb-chunk,
1005
+ .icen-kb-chunk-content,
1006
+ .icen-kb-chunk-switch-track,
1007
+ .icen-kb-chunk-switch-thumb,
1008
+ .icen-kb-pipeline-progress > i,
1009
+ .icen-kb-segment-block-text,
1010
+ .icen-kb-qa-q,
1011
+ .icen-kb-qa-a {
896
1012
  transition: none;
897
1013
  }
898
1014
  }
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
+
1077
+ }