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