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