@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,45 +1,48 @@
1
+ @layer icen.components {
1
2
  /*
2
3
  * @icen.ai/ui — kb-data.css(问数域:kb-sql / kb-answer / kb-clarify / kb-explain)
3
- * 共享原语在 kb.css(.kb-row/.kb-num/.kb-chip/.kb-badge/.kb-fold-head/.kb-notice…),
4
+ * 共享原语在 kb.css(.icen-kb-row/.icen-kb-num/.icen-kb-chip/.icen-kb-badge/.icen-kb-fold-head/.icen-kb-notice…),
4
5
  * 本文件只做本域专属结构。DOM 契约见 docs/spec/kb-family.md §5.15–5.18 与各 behavior 头注释。
5
6
  *
6
7
  * 域内色彩纪律(spec §2 数字域):
7
- * - 数字本身永远中性色(.kb-num / 结果表右对齐列),success 只表达「可信资产」(认证徽章);
8
+ * - 数字本身永远中性色(.icen-kb-num / 结果表右对齐列),success 只表达「可信资产」(认证徽章);
8
9
  * - SQL 着色是语法层级信号不是装饰:全部 color-mix 半透明降饱和(kw=accent /
9
10
  * str=success / num=warning / fn=info / cmt=faint);
10
11
  * - 修正卡 = warning 边框(告警语义);权限提示不可关闭(诚实呈现,无 dismiss 样式钩子)。
11
- * 只消费 --token-* / --radius-* / --density-* / --font-mono;明暗自适应走 token 与 .dark 档。
12
+ * 只消费 --icen-token-* / --icen-radius-* / --icen-density-* / --icen-font-mono;明暗自适应走 token 与 [data-icen-theme="dark"] 档。
12
13
  */
13
14
 
14
15
  /* ═══════════════════ kb-sql · 生成 SQL 卡片 ═══════════════════ */
15
16
 
16
- .kb-sql {
17
+ .icen-kb-sql {
17
18
  display: flex;
18
19
  flex-direction: column;
19
20
  gap: 8px;
20
21
  min-width: 0;
21
22
  padding: 10px 12px;
22
- border: 1px solid var(--token-line-soft);
23
- border-radius: var(--radius-md, 10px);
24
- background: var(--token-surface);
23
+ border: 1px solid var(--icen-token-line-soft);
24
+ border-radius: var(--icen-radius-md);
25
+ background: var(--icen-token-surface);
25
26
  }
26
27
 
27
- .kb-sql-head {
28
+ .icen-kb-sql-head {
28
29
  display: flex;
29
30
  align-items: center;
30
31
  gap: 8px;
31
32
  flex-wrap: wrap;
32
- min-height: 24px;
33
+ min-height: var(--icen-density-item-height);
33
34
  }
34
35
 
35
- .kb-sql-title {
36
- font-size: 13px;
36
+ .icen-kb-sql-title {
37
+ font-size: var(--icen-density-font-size-md);
37
38
  font-weight: 600;
38
- color: var(--token-text);
39
+ line-height: 1.4;
40
+ letter-spacing: var(--icen-letter-spacing-heading);
41
+ color: var(--icen-token-text);
39
42
  white-space: nowrap;
40
43
  }
41
44
 
42
- .kb-sql-tables {
45
+ .icen-kb-sql-tables {
43
46
  display: inline-flex;
44
47
  align-items: center;
45
48
  gap: 4px;
@@ -47,603 +50,716 @@
47
50
  min-width: 0;
48
51
  }
49
52
 
50
- .kb-sql-actions {
53
+ .icen-kb-sql-actions {
51
54
  display: inline-flex;
52
55
  align-items: center;
53
56
  gap: 6px;
54
- margin-left: auto;
57
+ margin-inline-start: auto;
55
58
  flex: 0 0 auto;
56
59
  }
57
60
 
58
61
  /* ghost 图标钮(复制/编辑/应用/确认共用底座) */
59
- .kb-sql-btn {
62
+ .icen-kb-sql-btn {
60
63
  display: inline-flex;
61
64
  align-items: center;
62
- gap: 4px;
63
- min-height: 22px;
64
- padding: 2px 8px;
65
+ gap: 6px;
66
+ height: var(--icen-density-item-height);
67
+ padding: 0 12px;
65
68
  font: inherit;
66
- font-size: 11.5px;
67
- color: var(--token-text-muted);
69
+ font-size: var(--icen-density-font-size-md);
70
+ font-weight: 500;
71
+ line-height: 1;
72
+ color: var(--icen-token-text-muted);
68
73
  background: transparent;
69
- border: 1px solid var(--token-line-soft);
70
- border-radius: var(--radius-sm, 6px);
74
+ border: 1px solid var(--icen-token-line-soft);
75
+ border-radius: var(--icen-radius-sm);
71
76
  cursor: pointer;
72
77
  white-space: nowrap;
78
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
73
79
  }
74
- .kb-sql-btn:hover:not(:disabled) {
75
- color: var(--token-text);
76
- border-color: var(--token-line);
77
- background: var(--token-bg-soft);
80
+ .icen-kb-sql-btn:hover:not(:disabled) {
81
+ color: var(--icen-token-text);
82
+ border-color: var(--icen-token-line);
83
+ background: var(--icen-token-fill-hover);
78
84
  }
79
- .kb-sql-btn:focus-visible {
80
- outline: 2px solid var(--token-accent);
81
- outline-offset: 1px;
85
+ .icen-kb-sql-btn:active:not(:disabled) {
86
+ background: var(--icen-token-fill-pressed);
87
+ border-color: var(--icen-token-line-strong);
82
88
  }
83
- .kb-sql-btn:disabled {
84
- opacity: 0.55;
85
- cursor: default;
89
+ .icen-kb-sql-btn:focus-visible {
90
+ outline: none;
91
+ box-shadow: var(--icen-ring);
86
92
  }
87
- .kb-sql-btn-icon,
88
- .kb-sql-btn-icon svg {
89
- width: 12px;
90
- height: 12px;
93
+ .icen-kb-sql-btn:disabled {
94
+ opacity: var(--icen-disabled-opacity);
95
+ cursor: not-allowed;
96
+ }
97
+ .icen-kb-sql-btn-icon,
98
+ .icen-kb-sql-btn-icon svg {
99
+ width: 14px;
100
+ height: 14px;
91
101
  flex: 0 0 auto;
92
102
  }
93
- .kb-sql-btn--run {
94
- color: var(--token-accent);
95
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
103
+ .icen-kb-sql-btn--run {
104
+ color: var(--icen-token-accent);
105
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
106
+ }
107
+ .icen-kb-sql-btn--run:hover:not(:disabled) {
108
+ color: var(--icen-token-accent);
109
+ border-color: var(--icen-token-accent);
110
+ background: var(--icen-token-accent-subtle);
96
111
  }
97
- .kb-sql-btn--run:hover:not(:disabled) {
98
- color: var(--token-accent);
99
- border-color: var(--token-accent);
100
- background: var(--token-accent-subtle, transparent);
112
+ .icen-kb-sql-btn--run:active:not(:disabled) {
113
+ background: color-mix(in srgb, var(--icen-token-accent) 16%, transparent);
101
114
  }
102
115
  /* 修正卡内的主行动(一屏一个 accent 级操作:此处告警色承载) */
103
- .kb-sql-btn--apply {
104
- color: var(--token-warning);
105
- border-color: color-mix(in srgb, var(--token-warning) 45%, transparent);
106
- background: var(--token-warning-muted, transparent);
116
+ .icen-kb-sql-btn--apply {
117
+ color: var(--icen-token-warning);
118
+ border-color: color-mix(in srgb, var(--icen-token-warning) 45%, transparent);
119
+ background: var(--icen-token-warning-muted);
120
+ }
121
+ .icen-kb-sql-btn--apply:hover:not(:disabled) {
122
+ color: var(--icen-token-warning);
123
+ border-color: var(--icen-token-warning);
124
+ background: color-mix(in srgb, var(--icen-token-warning) 12%, transparent);
107
125
  }
108
- .kb-sql-btn--apply:hover:not(:disabled) {
109
- color: var(--token-warning);
110
- border-color: var(--token-warning);
126
+ .icen-kb-sql-btn--apply:active:not(:disabled) {
127
+ background: color-mix(in srgb, var(--icen-token-warning) 18%, transparent);
111
128
  }
112
129
 
113
- /* SQL 码块:浅色 bg-soft / 深色更深一档(.dark 类,与 tokens 同机制) */
114
- .kb-sql-code {
130
+ /* SQL 码块:浅色 bg-soft / 深色降到画布层([data-icen-theme="dark"] 类,与 tokens 同机制) */
131
+ .icen-kb-sql-code {
115
132
  margin: 0;
116
133
  padding: 10px 12px;
117
- background: var(--token-bg-soft);
118
- border: 1px solid var(--token-line-soft);
119
- border-radius: var(--radius-sm, 6px);
120
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
121
- font-size: 12px;
122
- line-height: 1.65;
123
- color: var(--token-text);
134
+ background: var(--icen-token-bg-soft);
135
+ border: 1px solid var(--icen-token-line-soft);
136
+ border-radius: var(--icen-radius-sm);
137
+ font-family: var(--icen-font-mono);
138
+ font-size: var(--icen-density-font-size-xs);
139
+ line-height: 1.7;
140
+ color: var(--icen-token-text);
124
141
  white-space: pre;
125
142
  overflow: auto;
143
+ overscroll-behavior: contain;
126
144
  max-height: 320px;
127
145
  tab-size: 2;
128
146
  }
129
- .dark .kb-sql-code {
130
- background: color-mix(in srgb, var(--token-bg) 85%, black);
131
- border-color: color-mix(in srgb, var(--token-line-soft) 70%, transparent);
147
+ [data-icen-theme="dark"] .icen-kb-sql-code {
148
+ background: var(--icen-token-bg);
149
+ border-color: color-mix(in srgb, var(--icen-token-line-soft) 70%, transparent);
132
150
  }
133
151
 
134
152
  /* 语法 token:color-mix 半透明降饱和(语法层级,非装饰) */
135
- .kb-sql-tok--kw { color: color-mix(in srgb, var(--token-accent) 85%, transparent); }
136
- .kb-sql-tok--str { color: color-mix(in srgb, var(--token-success) 82%, transparent); }
137
- .kb-sql-tok--num { color: color-mix(in srgb, var(--token-warning) 85%, transparent); }
138
- .kb-sql-tok--fn { color: color-mix(in srgb, var(--token-info) 88%, transparent); }
139
- .kb-sql-tok--cmt { color: color-mix(in srgb, var(--token-text-faint) 72%, transparent); font-style: italic; }
153
+ .icen-kb-sql-tok--kw { color: var(--icen-token-accent-text); }
154
+ .icen-kb-sql-tok--str { color: color-mix(in srgb, var(--icen-token-success) 82%, transparent); }
155
+ .icen-kb-sql-tok--num { color: color-mix(in srgb, var(--icen-token-warning) 50%, var(--icen-token-text)); }
156
+ .icen-kb-sql-tok--fn { color: var(--icen-token-info); }
157
+ .icen-kb-sql-tok--cmt { color: var(--icen-token-text-muted); font-style: italic; }
140
158
 
141
159
  /* 修正卡(warning 边框:「修复已就绪」心智) */
142
- .kb-sql-fix {
160
+ .icen-kb-sql-fix {
143
161
  display: flex;
144
162
  flex-direction: column;
145
163
  gap: 8px;
146
- padding: 8px 10px;
147
- border: 1px solid color-mix(in srgb, var(--token-warning) 45%, transparent);
148
- border-radius: var(--radius-sm, 6px);
149
- background: color-mix(in srgb, var(--token-warning) 5%, transparent);
164
+ padding: 10px 12px;
165
+ border: 1px solid color-mix(in srgb, var(--icen-token-warning) 45%, transparent);
166
+ border-radius: var(--icen-radius-sm);
167
+ background: color-mix(in srgb, var(--icen-token-warning) 5%, transparent);
150
168
  }
151
- .kb-sql-fix-head {
169
+ .icen-kb-sql-fix-head {
152
170
  display: flex;
153
171
  align-items: center;
154
172
  gap: 8px;
173
+ min-height: var(--icen-density-item-height);
155
174
  flex-wrap: wrap;
156
175
  }
157
- .kb-sql-fix-title {
176
+ .icen-kb-sql-fix-title {
158
177
  display: inline-flex;
159
178
  align-items: center;
160
179
  gap: 6px;
161
- font-size: 12px;
162
- color: var(--token-warning);
180
+ font-size: var(--icen-density-font-size-xs);
181
+ line-height: 1.5;
182
+ color: var(--icen-token-warning);
163
183
  }
164
- .kb-sql-fix-title svg {
165
- width: 13px;
166
- height: 13px;
184
+ .icen-kb-sql-fix-title svg {
185
+ width: 14px;
186
+ height: 14px;
167
187
  flex: 0 0 auto;
168
188
  }
169
- .kb-sql-fix-title + .kb-sql-btn,
170
- .kb-sql-fix-head .kb-sql-btn {
171
- margin-left: auto;
189
+ .icen-kb-sql-fix-title + .icen-kb-sql-btn,
190
+ .icen-kb-sql-fix-head .icen-kb-sql-btn {
191
+ margin-inline-start: auto;
172
192
  }
173
- .kb-sql-fix-diff {
174
- min-width: 0;
175
- border-radius: var(--radius-sm, 6px);
193
+ .icen-kb-sql-fix-diff {
194
+ min-inline-size: 0;
195
+ border-radius: var(--icen-radius-sm);
176
196
  overflow: hidden;
177
197
  }
178
- .kb-sql-fix-diff .ai-diff-file {
179
- border: 1px solid var(--token-line-soft);
198
+ .icen-kb-sql-fix-diff .icen-ai-diff-file {
199
+ border: 1px solid var(--icen-token-line-soft);
180
200
  }
181
201
 
182
202
  /* 编辑态:pre ↔ textarea 同尺寸心智(mono) */
183
- .kb-sql-editor {
203
+ .icen-kb-sql-editor {
184
204
  display: flex;
185
205
  flex-direction: column;
186
206
  gap: 8px;
187
207
  }
188
- .kb-sql-editor[hidden] {
208
+ .icen-kb-sql-editor[hidden] {
189
209
  display: none;
190
210
  }
191
- .kb-sql-textarea {
211
+ .icen-kb-sql-textarea {
192
212
  width: 100%;
193
213
  min-height: 132px;
194
214
  padding: 10px 12px;
195
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
196
- font-size: 12px;
197
- line-height: 1.65;
198
- color: var(--token-text);
199
- background: var(--token-bg-soft);
200
- border: 1px solid var(--token-line);
201
- border-radius: var(--radius-sm, 6px);
215
+ font-family: var(--icen-font-mono);
216
+ font-size: var(--icen-density-font-size-xs);
217
+ line-height: 1.7;
218
+ color: var(--icen-token-text);
219
+ background: var(--icen-token-bg-soft);
220
+ border: 1px solid var(--icen-token-line);
221
+ border-radius: var(--icen-radius-sm);
202
222
  resize: vertical;
203
223
  tab-size: 2;
204
224
  }
205
- .kb-sql-textarea:focus-visible {
206
- outline: 2px solid var(--token-accent);
207
- outline-offset: -1px;
225
+ .icen-kb-sql-textarea:focus-visible {
226
+ outline: none;
227
+ box-shadow: var(--icen-ring);
208
228
  }
209
- .kb-sql-editor-actions {
229
+ .icen-kb-sql-editor-actions {
210
230
  display: flex;
211
231
  justify-content: flex-end;
212
232
  gap: 8px;
213
233
  }
214
- .kb-sql.is-editing .kb-sql-fix {
234
+ .icen-kb-sql.is-editing .icen-kb-sql-fix {
215
235
  display: none; /* 编辑当前 SQL 时隐藏旧版修复对比,避免双修离心 */
216
236
  }
217
237
 
218
238
  /* ═══════════════════ kb-clarify · 澄清反问卡 ═══════════════════ */
219
239
 
220
- .kb-clarify {
240
+ .icen-kb-clarify {
221
241
  display: flex;
222
242
  flex-direction: column;
223
243
  gap: 8px;
224
244
  padding: 10px 12px;
225
- border: 1px dashed var(--token-line-dashed, var(--token-line-soft));
226
- border-radius: var(--radius-sm, 6px);
227
- background: var(--token-bg-soft);
245
+ border: 1px dashed var(--icen-token-line-dashed);
246
+ border-radius: var(--icen-radius-md);
247
+ background: var(--icen-token-bg-soft);
228
248
  }
229
- .kb-clarify.is-answered {
249
+ .icen-kb-clarify.is-answered {
230
250
  border-style: solid;
231
- border-color: color-mix(in srgb, var(--token-accent) 30%, transparent);
251
+ border-color: color-mix(in srgb, var(--icen-token-accent) 30%, transparent);
232
252
  }
233
- .kb-clarify-q {
253
+ .icen-kb-clarify-q {
234
254
  display: flex;
235
255
  align-items: flex-start;
236
256
  gap: 6px;
237
- font-size: 13px;
238
- color: var(--token-text);
239
- line-height: 1.6;
257
+ font-size: var(--icen-density-font-size-md);
258
+ line-height: 1.65;
259
+ color: var(--icen-token-text);
240
260
  }
241
- .kb-clarify-qicon,
242
- .kb-clarify-qicon svg {
261
+ .icen-kb-clarify-qicon,
262
+ .icen-kb-clarify-qicon svg {
243
263
  width: 14px;
244
264
  height: 14px;
245
265
  flex: 0 0 auto;
246
266
  margin-top: 2px;
247
- color: var(--token-accent);
267
+ color: var(--icen-token-accent);
248
268
  }
249
- .kb-clarify-qtext {
269
+ .icen-kb-clarify-qtext {
250
270
  min-width: 0;
251
271
  }
252
- .kb-clarify-opts {
272
+ .icen-kb-clarify-opts {
253
273
  display: flex;
254
274
  flex-wrap: wrap;
255
275
  gap: 6px;
256
276
  }
257
- .kb-clarify-opt {
277
+ .icen-kb-clarify-opt {
258
278
  font: inherit;
259
- font-size: 12px;
260
- min-height: 24px;
261
- padding: 3px 12px;
262
- color: var(--token-text-muted);
263
- background: var(--token-surface);
264
- border: 1px solid var(--token-line-soft);
265
- border-radius: 999px;
279
+ font-size: var(--icen-density-font-size-md);
280
+ font-weight: 500;
281
+ min-height: var(--icen-density-item-height);
282
+ padding: 0 12px;
283
+ color: var(--icen-token-text-muted);
284
+ background: var(--icen-token-surface);
285
+ border: 1px solid var(--icen-token-line-soft);
286
+ border-radius: var(--icen-radius-full);
266
287
  cursor: pointer;
267
- transition: color 0.16s ease-out, border-color 0.16s ease-out, background 0.16s ease-out;
288
+ transition: color var(--icen-tx-fast), border-color var(--icen-tx-fast), background-color var(--icen-tx-fast);
268
289
  }
269
- .kb-clarify-opt:hover:not(:disabled) {
270
- color: var(--token-text);
271
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
290
+ .icen-kb-clarify-opt:hover:not(:disabled) {
291
+ color: var(--icen-token-text);
292
+ background: var(--icen-token-fill-hover);
293
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
272
294
  }
273
- .kb-clarify-opt:focus-visible {
274
- outline: 2px solid var(--token-accent);
275
- outline-offset: 1px;
295
+ .icen-kb-clarify-opt:active:not(:disabled):not(.is-picked) {
296
+ background: var(--icen-token-fill-pressed);
276
297
  }
277
- .kb-clarify-opt.is-picked {
278
- color: var(--token-accent);
279
- border-color: color-mix(in srgb, var(--token-accent) 55%, transparent);
280
- background: var(--token-accent-subtle, transparent);
298
+ .icen-kb-clarify-opt:focus-visible {
299
+ outline: none;
300
+ box-shadow: var(--icen-ring);
281
301
  }
282
- .kb-clarify-opt:disabled {
283
- opacity: 0.55;
284
- cursor: default;
302
+ .icen-kb-clarify-opt.is-picked {
303
+ color: var(--icen-token-accent);
304
+ border-color: color-mix(in srgb, var(--icen-token-accent) 55%, transparent);
305
+ background: var(--icen-token-accent-subtle);
285
306
  }
286
- .kb-clarify-resolved {
287
- font-size: 12px;
288
- color: var(--token-text-muted);
307
+ .icen-kb-clarify-opt:disabled {
308
+ opacity: var(--icen-disabled-opacity);
309
+ cursor: not-allowed;
289
310
  }
290
- .kb-clarify-picked {
311
+ .icen-kb-clarify-resolved {
312
+ font-size: var(--icen-density-font-size-xs);
313
+ line-height: 1.5;
314
+ color: var(--icen-token-text-muted);
315
+ }
316
+ .icen-kb-clarify-picked {
291
317
  font-weight: 600;
292
- color: var(--token-text);
318
+ color: var(--icen-token-text);
293
319
  }
294
- .kb-clarify-reason {
295
- font-size: 11.5px;
296
- color: var(--token-text-faint);
320
+ .icen-kb-clarify-reason {
321
+ font-size: var(--icen-density-font-size-xs);
322
+ line-height: 1.5;
323
+ color: var(--icen-token-text-faint);
297
324
  }
298
325
 
299
326
  /* ═══════════════════ kb-explain · 口径解释折叠 ═══════════════════ */
300
327
 
301
- .kb-explain {
328
+ .icen-kb-explain {
302
329
  min-width: 0;
303
- border: 1px solid var(--token-line-soft);
304
- border-radius: var(--radius-sm, 6px);
305
- background: var(--token-bg-soft);
306
- overflow: hidden;
330
+ border: 1px solid var(--icen-token-line-soft);
331
+ border-radius: var(--icen-radius-md);
332
+ background: var(--icen-token-bg-soft);
307
333
  }
308
- .kb-explain-head {
334
+ .icen-kb-explain-head {
309
335
  border-radius: 0;
310
336
  }
311
- .kb-explain-head:hover {
312
- border-radius: var(--radius-sm, 6px);
337
+ .icen-kb-explain-head:hover {
338
+ border-radius: calc(var(--icen-radius-md) - 1px);
313
339
  }
314
- .kb-explain-title {
340
+ .icen-kb-explain-title {
315
341
  white-space: nowrap;
316
342
  overflow: hidden;
317
343
  text-overflow: ellipsis;
318
344
  }
319
- .kb-explain-body {
345
+ .icen-kb-explain-body {
320
346
  display: flex;
321
347
  flex-direction: column;
322
348
  gap: 8px;
323
- padding: 4px 10px 10px 28px;
349
+ padding-block: 6px 12px;
350
+ padding-inline: 12px 28px;
324
351
  }
325
- .kb-explain-group {
352
+ .icen-kb-explain-group {
326
353
  display: flex;
327
354
  align-items: baseline;
328
355
  gap: 6px;
329
356
  flex-wrap: wrap;
330
357
  }
331
- .kb-explain-group-label {
358
+ .icen-kb-explain-group-label {
332
359
  flex: 0 0 auto;
333
- min-width: 2.5em;
334
- font-size: 11px;
335
- color: var(--token-text-faint);
360
+ min-inline-size: 2.5em;
361
+ font-size: var(--icen-density-font-size-xs);
362
+ letter-spacing: .3px;
363
+ color: var(--icen-token-text-faint);
336
364
  }
337
- .kb-explain-metrics {
365
+ .icen-kb-explain-metrics {
338
366
  display: flex;
339
367
  flex-direction: column;
340
368
  gap: 4px;
341
369
  padding-top: 8px;
342
- border-top: 1px dashed var(--token-line-dashed, var(--token-line-soft));
370
+ border-top: 1px dashed var(--icen-token-line-dashed);
343
371
  }
344
- .kb-explain-metric {
372
+ .icen-kb-explain-metric {
345
373
  display: flex;
346
374
  align-items: center;
347
375
  gap: 10px;
348
376
  flex-wrap: wrap;
349
- font-size: 12.5px;
377
+ font-size: var(--icen-density-font-size-md);
378
+ line-height: 1.5;
350
379
  }
351
- .kb-explain-metric-name {
352
- color: var(--token-text);
380
+ .icen-kb-explain-metric-name {
381
+ color: var(--icen-token-text);
353
382
  font-weight: 500;
354
383
  }
355
- .kb-explain-metric-ref {
356
- font-size: 11.5px;
357
- color: var(--token-accent);
384
+ .icen-kb-explain-metric-ref {
385
+ font-size: var(--icen-density-font-size-xs);
386
+ color: var(--icen-token-accent);
358
387
  text-decoration: none;
359
- border-bottom: 1px solid color-mix(in srgb, var(--token-accent) 35%, transparent);
388
+ border-bottom: 1px solid color-mix(in srgb, var(--icen-token-accent) 35%, transparent);
389
+ border-radius: var(--icen-radius-xs);
390
+ transition: border-color var(--icen-tx-fast), color var(--icen-tx-fast);
360
391
  }
361
- .kb-explain-metric-ref:hover {
362
- border-bottom-color: var(--token-accent);
392
+ .icen-kb-explain-metric-ref:hover {
393
+ border-bottom-color: var(--icen-token-accent);
363
394
  }
364
- .kb-explain-count {
395
+ .icen-kb-explain-metric-ref:focus-visible {
396
+ outline: none;
397
+ box-shadow: var(--icen-ring);
398
+ }
399
+ .icen-kb-explain-count {
365
400
  flex: 0 0 auto;
366
401
  }
367
402
 
368
403
  /* ═══════════════════ kb-answer · 答案组合容器 ═══════════════════ */
369
404
 
370
- .kb-answer {
405
+ .icen-kb-answer {
371
406
  display: flex;
372
407
  flex-direction: column;
373
408
  gap: 12px;
374
409
  min-width: 0;
375
- font-size: 13px;
410
+ font-size: var(--icen-density-font-size-md);
376
411
  }
377
412
 
378
413
  /* 徽章区 */
379
- .kb-answer-badges {
414
+ .icen-kb-answer-badges {
380
415
  display: flex;
381
416
  align-items: center;
382
417
  gap: 8px;
383
418
  flex-wrap: wrap;
384
419
  }
385
- .kb-verified {
420
+ .icen-kb-verified {
386
421
  display: inline-flex;
387
422
  align-items: center;
388
423
  gap: 8px;
424
+ min-height: var(--icen-density-item-height);
389
425
  flex-wrap: wrap;
390
426
  padding: 0;
391
427
  font: inherit;
392
428
  background: none;
393
429
  border: none;
430
+ border-radius: var(--icen-radius-sm);
394
431
  cursor: pointer;
395
- text-align: left;
432
+ text-align: start;
396
433
  }
397
- .kb-verified:focus-visible {
398
- outline: 2px solid var(--token-accent);
399
- outline-offset: 3px;
400
- border-radius: var(--radius-sm, 6px);
434
+ .icen-kb-verified:focus-visible {
435
+ outline: none;
436
+ box-shadow: var(--icen-ring);
401
437
  }
402
- .kb-verified-via {
403
- font-size: 11.5px;
404
- color: var(--token-text-muted);
438
+ .icen-kb-verified-via {
439
+ font-size: var(--icen-density-font-size-xs);
440
+ color: var(--icen-token-text-muted);
405
441
  }
406
- .kb-verified-note {
407
- font-size: 11.5px;
408
- color: var(--token-text-faint);
442
+ .icen-kb-verified-note {
443
+ font-size: var(--icen-density-font-size-xs);
444
+ color: var(--icen-token-text-faint);
409
445
  }
410
- .kb-verified-hint {
411
- font-size: 11px;
412
- color: var(--token-text-faint);
413
- border-left: 2px solid var(--token-line-soft);
414
- padding-left: 8px;
446
+ .icen-kb-verified-hint {
447
+ font-size: var(--icen-density-font-size-xs);
448
+ line-height: 1.5;
449
+ color: var(--icen-token-text-faint);
450
+ border-inline-start: 2px solid var(--icen-token-line-soft);
451
+ padding-inline-start: 8px;
415
452
  }
416
- .kb-verified:hover .kb-verified-via {
417
- color: var(--token-text);
453
+ .icen-kb-verified:hover .icen-kb-verified-via {
454
+ color: var(--icen-token-text);
418
455
  }
419
456
 
420
457
  /* 权限提示(行级过滤 + 脱敏列;不可关闭) */
421
- .kb-perm {
458
+ .icen-kb-perm {
422
459
  display: flex;
423
460
  align-items: center;
424
461
  gap: 8px;
425
462
  flex-wrap: wrap;
426
463
  width: 100%;
427
- padding: 4px 8px;
428
- border-radius: var(--radius-sm, 6px);
429
- background: var(--token-bg-soft);
430
- font-size: 11.5px;
431
- color: var(--token-text-muted);
432
- }
433
- .kb-perm-icon,
434
- .kb-perm-icon svg {
464
+ padding: 6px 8px;
465
+ border: 1px solid var(--icen-token-line-soft);
466
+ border-radius: var(--icen-radius-sm);
467
+ background: var(--icen-token-bg-soft);
468
+ font-size: var(--icen-density-font-size-xs);
469
+ line-height: 1.5;
470
+ color: var(--icen-token-text-muted);
471
+ }
472
+ .icen-kb-perm-icon,
473
+ .icen-kb-perm-icon svg {
435
474
  width: 12px;
436
475
  height: 12px;
437
476
  flex: 0 0 auto;
438
- color: var(--token-text-faint);
477
+ color: var(--icen-token-text-faint);
439
478
  }
440
- .kb-perm-mask {
479
+ .icen-kb-perm-mask {
441
480
  display: inline-flex;
442
481
  align-items: center;
443
482
  gap: 4px;
444
483
  flex-wrap: wrap;
445
484
  }
446
- .kb-perm-mask-label {
447
- color: var(--token-text-faint);
485
+ .icen-kb-perm-mask-label {
486
+ color: var(--icen-token-text-faint);
448
487
  }
449
- .kb-perm-mask .kb-chip {
450
- border-color: color-mix(in srgb, var(--token-warning) 35%, transparent);
488
+ .icen-kb-perm-mask .icen-kb-chip {
489
+ border-color: color-mix(in srgb, var(--icen-token-warning) 35%, transparent);
451
490
  }
452
491
 
453
- /* 正文与简化引用角标(与 kb-ground 域 .kb-citation 类名一致;默认弱化,hover 点亮) */
454
- .kb-answer-body {
455
- font-size: 13px;
492
+ /* 正文与简化引用角标(与 kb-ground 域 .icen-kb-citation 类名一致;默认弱化,hover 点亮) */
493
+ .icen-kb-answer-body {
494
+ font-size: var(--icen-density-font-size-md);
456
495
  line-height: 1.75;
457
- color: var(--token-text);
496
+ color: var(--icen-token-text);
458
497
  white-space: pre-wrap;
459
498
  overflow-wrap: anywhere;
460
499
  }
461
- .kb-answer-body .kb-citation {
462
- font-size: 10.5px;
500
+ .icen-kb-answer-body .icen-kb-citation {
501
+ font-size: var(--icen-density-font-size-xs);
463
502
  line-height: 1;
464
503
  margin: 0 1px;
465
504
  padding: 1px 5px;
466
- color: var(--token-text-faint);
467
- background: var(--token-bg-soft);
468
- border: 1px solid var(--token-line-soft);
469
- border-radius: 999px;
505
+ color: var(--icen-token-text-faint);
506
+ background: var(--icen-token-bg-soft);
507
+ border: 1px solid var(--icen-token-line-soft);
508
+ border-radius: var(--icen-radius-full);
470
509
  cursor: default;
471
- transition: color 0.16s ease-out, border-color 0.16s ease-out;
510
+ transition: color var(--icen-tx-fast), border-color var(--icen-tx-fast);
472
511
  }
473
- .kb-answer-body .kb-citation:hover {
474
- color: var(--token-accent);
475
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
512
+ .icen-kb-answer-body .icen-kb-citation:hover {
513
+ color: var(--icen-token-accent);
514
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
476
515
  }
477
516
 
478
517
  /* 槽位 */
479
- .kb-answer-clarify,
480
- .kb-answer-explain {
518
+ .icen-kb-answer-clarify,
519
+ .icen-kb-answer-explain {
481
520
  min-width: 0;
482
521
  }
483
522
 
484
523
  /* 结果表:滚动容器 + sticky 表头 + 数字列右对齐(数字永远中性色) */
485
- .kb-answer-results {
524
+ .icen-kb-answer-results {
486
525
  display: flex;
487
526
  flex-direction: column;
488
527
  gap: 6px;
489
528
  min-width: 0;
490
529
  }
491
- .kb-result-meta {
530
+ .icen-kb-result-meta {
492
531
  display: flex;
493
532
  align-items: center;
494
533
  gap: 10px;
495
534
  flex-wrap: wrap;
496
535
  }
497
- .kb-result-export {
536
+ .icen-kb-result-export {
498
537
  display: inline-flex;
499
538
  gap: 6px;
500
- margin-left: auto;
539
+ flex-wrap: wrap;
540
+ margin-inline-start: auto;
501
541
  }
502
- .kb-result-export-btn {
542
+ .icen-kb-result-export-btn {
503
543
  font: inherit;
504
- font-size: 11.5px;
505
- min-height: 22px;
506
- padding: 2px 8px;
507
- color: var(--token-text-muted);
544
+ font-size: var(--icen-density-font-size-xs);
545
+ font-weight: 500;
546
+ min-height: var(--icen-density-item-height);
547
+ padding: 0 12px;
548
+ color: var(--icen-token-text-muted);
508
549
  background: transparent;
509
- border: 1px solid var(--token-line-soft);
510
- border-radius: var(--radius-sm, 6px);
550
+ border: 1px solid var(--icen-token-line-soft);
551
+ border-radius: var(--icen-radius-sm);
511
552
  cursor: pointer;
553
+ transition: color var(--icen-tx-fast), border-color var(--icen-tx-fast), background-color var(--icen-tx-fast);
512
554
  }
513
- .kb-result-export-btn:hover:not(:disabled) {
514
- color: var(--token-text);
515
- border-color: var(--token-line);
516
- background: var(--token-bg-soft);
555
+ .icen-kb-result-export-btn:hover:not(:disabled) {
556
+ color: var(--icen-token-text);
557
+ border-color: var(--icen-token-line);
558
+ background: var(--icen-token-fill-hover);
517
559
  }
518
- .kb-result-export-btn:focus-visible {
519
- outline: 2px solid var(--token-accent);
520
- outline-offset: 1px;
560
+ .icen-kb-result-export-btn:active:not(:disabled) {
561
+ background: var(--icen-token-fill-pressed);
562
+ border-color: var(--icen-token-line-strong);
521
563
  }
522
- .kb-result-export-btn:disabled {
523
- opacity: 0.55;
524
- cursor: default;
564
+ .icen-kb-result-export-btn:focus-visible {
565
+ outline: none;
566
+ box-shadow: var(--icen-ring);
567
+ }
568
+ .icen-kb-result-export-btn:disabled {
569
+ opacity: var(--icen-disabled-opacity);
570
+ cursor: not-allowed;
525
571
  }
526
- .kb-result-scroll {
572
+ .icen-kb-result-scroll {
527
573
  overflow: auto;
574
+ overscroll-behavior: contain;
528
575
  max-height: 360px;
529
- border: 1px solid var(--token-line-soft);
530
- border-radius: var(--radius-sm, 6px);
531
- background: var(--token-surface);
576
+ border: 1px solid var(--icen-token-line-soft);
577
+ border-radius: var(--icen-radius-md);
578
+ background: var(--icen-token-surface);
532
579
  }
533
- .kb-result-table {
580
+ .icen-kb-result-table {
534
581
  width: 100%;
535
582
  border-collapse: separate;
536
583
  border-spacing: 0;
537
- font-size: 12.5px;
584
+ font-size: var(--icen-density-font-size-md);
538
585
  }
539
- .kb-result-table th {
586
+ .icen-kb-result-table th {
540
587
  position: sticky;
541
588
  top: 0;
542
589
  z-index: 1;
543
590
  padding: 6px 10px;
544
- background: var(--token-bg-soft);
545
- border-bottom: 1px solid var(--token-line-soft);
546
- font-size: 11.5px;
591
+ background: var(--icen-token-bg-soft);
592
+ border-bottom: 1px solid var(--icen-token-line-soft);
593
+ font-size: var(--icen-density-font-size-xs);
547
594
  font-weight: 600;
548
- color: var(--token-text-muted);
549
- text-align: left;
595
+ letter-spacing: .3px;
596
+ color: var(--icen-token-text-muted);
597
+ text-align: start;
550
598
  white-space: nowrap;
551
599
  }
552
- .kb-result-table td {
600
+ .icen-kb-result-table td {
553
601
  padding: 5px 10px;
554
- border-bottom: 1px solid color-mix(in srgb, var(--token-line-soft) 50%, transparent);
555
- color: var(--token-text);
602
+ line-height: 1.5;
603
+ border-bottom: 1px solid color-mix(in srgb, var(--icen-token-line-soft) 50%, transparent);
604
+ color: var(--icen-token-text);
556
605
  white-space: nowrap;
606
+ transition: background-color var(--icen-tx-fast);
557
607
  }
558
- .kb-result-table tbody tr:last-child td {
608
+ .icen-kb-result-table tbody tr:last-child td {
559
609
  border-bottom: none;
560
610
  }
561
- .kb-result-table tbody tr:hover td {
562
- background: var(--token-bg-soft);
611
+ .icen-kb-result-table tbody tr:hover td {
612
+ background: var(--icen-token-fill-hover);
563
613
  }
564
- /* 数字列:等宽 + tabular-nums + 右对齐(值本身中性色) */
565
- .kb-result-table th.kb-num,
566
- .kb-result-table td.kb-num {
567
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
614
+ /* 数字列:等宽 + tabular-nums + 右对齐(数字是 LTR 文种,物理右对齐惯例,RTL 不镜像) */
615
+ .icen-kb-result-table th.icen-kb-num,
616
+ .icen-kb-result-table td.icen-kb-num {
617
+ font-family: var(--icen-font-mono);
568
618
  font-variant-numeric: tabular-nums;
569
- text-align: right;
619
+ text-align: right; /* guard:allow-physical 数字列物理右对齐惯例,RTL 不镜像 */
570
620
  }
571
- .kb-result-null {
572
- color: var(--token-text-faint);
621
+ .icen-kb-result-null {
622
+ color: var(--icen-token-text-faint);
573
623
  }
574
- .kb-result-truncated {
624
+ .icen-kb-result-truncated {
575
625
  padding: 2px 8px;
576
626
  }
577
627
 
578
628
  /* 图表区(renderChart 复用;类型切换 chips) */
579
- .kb-answer-chart {
629
+ .icen-kb-answer-chart {
580
630
  display: flex;
581
631
  flex-direction: column;
582
632
  gap: 8px;
583
633
  min-width: 0;
584
634
  }
585
- .kb-chart-switch {
635
+ .icen-kb-chart-switch {
586
636
  display: flex;
587
637
  align-items: center;
588
638
  gap: 6px;
589
639
  }
590
- .kb-chart-chip {
640
+ .icen-kb-chart-chip {
591
641
  font: inherit;
592
- font-size: 11.5px;
593
- min-height: 22px;
594
- padding: 2px 10px;
595
- color: var(--token-text-muted);
642
+ font-size: var(--icen-density-font-size-xs);
643
+ font-weight: 500;
644
+ min-height: var(--icen-density-item-height);
645
+ padding: 0 12px;
646
+ color: var(--icen-token-text-muted);
596
647
  background: transparent;
597
- border: 1px solid var(--token-line-soft);
598
- border-radius: 999px;
648
+ border: 1px solid var(--icen-token-line-soft);
649
+ border-radius: var(--icen-radius-full);
599
650
  cursor: pointer;
600
- transition: color 0.16s ease-out, border-color 0.16s ease-out, background 0.16s ease-out;
651
+ transition: color var(--icen-tx-fast), border-color var(--icen-tx-fast), background-color var(--icen-tx-fast);
601
652
  }
602
- .kb-chart-chip:hover {
603
- color: var(--token-text);
604
- border-color: var(--token-line);
653
+ .icen-kb-chart-chip:hover {
654
+ color: var(--icen-token-text);
655
+ background: var(--icen-token-fill-hover);
656
+ border-color: var(--icen-token-line);
605
657
  }
606
- .kb-chart-chip:focus-visible {
607
- outline: 2px solid var(--token-accent);
608
- outline-offset: 1px;
658
+ .icen-kb-chart-chip:active {
659
+ background: var(--icen-token-fill-pressed);
609
660
  }
610
- .kb-chart-chip.is-active {
611
- color: var(--token-accent);
612
- border-color: color-mix(in srgb, var(--token-accent) 55%, transparent);
613
- background: var(--token-accent-subtle, transparent);
661
+ .icen-kb-chart-chip:focus-visible {
662
+ outline: none;
663
+ box-shadow: var(--icen-ring);
614
664
  }
615
- .kb-chart-mount {
665
+ .icen-kb-chart-chip.is-active {
666
+ color: var(--icen-token-accent-text);
667
+ border-color: color-mix(in srgb, var(--icen-token-accent) 55%, transparent);
668
+ background: var(--icen-token-accent-subtle);
669
+ }
670
+ .icen-kb-chart-mount {
616
671
  min-height: 0;
617
672
  }
618
673
 
619
674
  /* 追问建议 */
620
- .kb-answer-followups {
675
+ .icen-kb-answer-followups {
621
676
  display: flex;
622
677
  align-items: center;
623
678
  gap: 6px;
624
679
  flex-wrap: wrap;
625
680
  }
626
- .kb-followups-label {
627
- font-size: 11.5px;
628
- color: var(--token-text-faint);
681
+ .icen-kb-followups-label {
682
+ font-size: var(--icen-density-font-size-xs);
683
+ letter-spacing: .3px;
684
+ color: var(--icen-token-text-faint);
629
685
  }
630
- .kb-followup {
686
+ .icen-kb-followup {
631
687
  cursor: pointer;
632
- transition: border-color 0.16s ease-out, color 0.16s ease-out;
688
+ transition: border-color var(--icen-tx-fast), color var(--icen-tx-fast), background-color var(--icen-tx-fast);
689
+ }
690
+ .icen-kb-followup:hover {
691
+ color: var(--icen-token-text);
692
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
633
693
  }
634
- .kb-followup:hover {
635
- color: var(--token-text);
636
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
694
+ .icen-kb-followup:active {
695
+ background: var(--icen-token-fill-pressed);
637
696
  }
638
- .kb-followup:focus-visible {
639
- outline: 2px solid var(--token-accent);
640
- outline-offset: 1px;
697
+ .icen-kb-followup:focus-visible {
698
+ outline: none;
699
+ box-shadow: var(--icen-ring);
641
700
  }
642
701
 
643
702
  /* ═══════════════════ 密度档 ═══════════════════ */
644
703
 
645
- [data-density='compact'] .kb-sql { padding: 8px 10px; gap: 6px; }
646
- [data-density='compact'] .kb-result-table th { padding: 4px 8px; }
647
- [data-density='compact'] .kb-result-table td { padding: 3px 8px; }
648
- [data-density='compact'] .kb-answer { gap: 8px; }
649
- [data-density='compact'] .kb-clarify { padding: 8px 10px; }
704
+ [data-icen-density='compact'] .icen-kb-sql { padding: 8px 10px; gap: 6px; }
705
+ [data-icen-density='compact'] .icen-kb-sql-code { padding: 8px 10px; }
706
+ [data-icen-density='compact'] .icen-kb-sql-fix { padding: 8px 10px; }
707
+ [data-icen-density='compact'] .icen-kb-result-table { font-size: var(--icen-density-font-size-xs); }
708
+ [data-icen-density='compact'] .icen-kb-result-table th { padding: 4px 8px; }
709
+ [data-icen-density='compact'] .icen-kb-result-table td { padding: 3px 8px; }
710
+ [data-icen-density='compact'] .icen-kb-answer { gap: 8px; }
711
+ [data-icen-density='compact'] .icen-kb-clarify { padding: 8px 10px; }
712
+ [data-icen-density='compact'] .icen-kb-clarify-opt { min-height: var(--icen-density-item-height); }
713
+ [data-icen-density='compact'] .icen-kb-explain-body { padding-block: 4px 10px; }
714
+
715
+ /* ═══════════════════ 高对比模式(forced-colors) ═══════════════════
716
+ 表面与焦点回落到系统色;选中/激活态改用 Highlight,语义不依赖单一底色。 */
717
+ @media (forced-colors: active) {
718
+ .icen-kb-sql-btn,
719
+ .icen-kb-clarify-opt,
720
+ .icen-kb-result-export-btn,
721
+ .icen-kb-chart-chip,
722
+ .icen-kb-followup {
723
+ border-color: CanvasText;
724
+ }
725
+ .icen-kb-sql-btn:disabled,
726
+ .icen-kb-clarify-opt:disabled,
727
+ .icen-kb-result-export-btn:disabled {
728
+ opacity: 1;
729
+ color: GrayText;
730
+ }
731
+ .icen-kb-sql-fix {
732
+ border-color: CanvasText;
733
+ background: Canvas;
734
+ }
735
+ .icen-kb-perm,
736
+ .icen-kb-sql-textarea {
737
+ border-color: CanvasText;
738
+ }
739
+ .icen-kb-explain-metric-ref {
740
+ border-bottom-color: CanvasText;
741
+ }
742
+ .icen-kb-result-table th,
743
+ .icen-kb-result-table td {
744
+ border-bottom-color: CanvasText;
745
+ }
746
+ .icen-kb-clarify-opt.is-picked,
747
+ .icen-kb-chart-chip.is-active {
748
+ forced-color-adjust: none;
749
+ background: Highlight;
750
+ border-color: Highlight;
751
+ color: HighlightText;
752
+ }
753
+ .icen-kb-followup:hover {
754
+ border-color: Highlight;
755
+ }
756
+ :is(.icen-kb-sql-btn, .icen-kb-sql-textarea, .icen-kb-clarify-opt, .icen-kb-verified,
757
+ .icen-kb-result-export-btn, .icen-kb-chart-chip, .icen-kb-followup,
758
+ .icen-kb-explain-metric-ref):focus-visible {
759
+ outline: 2px solid Highlight;
760
+ outline-offset: 2px;
761
+ box-shadow: none;
762
+ }
763
+ }
764
+
765
+ }