@icen.ai/ui 0.8.1 → 0.9.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.
- package/AGENTS.md +49 -6
- package/README.md +12 -9
- package/dist/behaviors/ai-branch.d.mts +19 -0
- package/dist/behaviors/ai-branch.mjs +217 -0
- package/dist/behaviors/ai-chat.d.mts +8 -6
- package/dist/behaviors/ai-chat.mjs +68 -8
- package/dist/behaviors/ai-composer.mjs +108 -20
- package/dist/behaviors/ai-feedback.d.mts +26 -0
- package/dist/behaviors/ai-feedback.mjs +303 -0
- package/dist/behaviors/ai-panel.d.mts +15 -1
- package/dist/behaviors/ai-panel.mjs +26 -0
- package/dist/behaviors/ai-threads.d.mts +38 -0
- package/dist/behaviors/ai-threads.mjs +319 -0
- package/dist/behaviors/ai-tool.mjs +5 -0
- package/dist/behaviors/ai-tools.mjs +5 -0
- package/dist/behaviors/charts.d.mts +103 -1
- package/dist/behaviors/charts.mjs +795 -0
- package/dist/behaviors/events.d.mts +193 -0
- package/dist/behaviors/kb-access.d.mts +34 -0
- package/dist/behaviors/kb-access.mjs +569 -0
- package/dist/behaviors/kb-acl.d.mts +50 -0
- package/dist/behaviors/kb-acl.mjs +405 -0
- package/dist/behaviors/kb-answer.d.mts +38 -0
- package/dist/behaviors/kb-answer.mjs +2055 -0
- package/dist/behaviors/kb-audit.d.mts +23 -0
- package/dist/behaviors/kb-audit.mjs +375 -0
- package/dist/behaviors/kb-canvas.d.mts +44 -0
- package/dist/behaviors/kb-canvas.mjs +589 -0
- package/dist/behaviors/kb-chain.d.mts +15 -0
- package/dist/behaviors/kb-chain.mjs +270 -0
- package/dist/behaviors/kb-checkpoint.d.mts +16 -0
- package/dist/behaviors/kb-checkpoint.mjs +342 -0
- package/dist/behaviors/kb-chunks.d.mts +31 -0
- package/dist/behaviors/kb-chunks.mjs +475 -0
- package/dist/behaviors/kb-citation.d.mts +38 -0
- package/dist/behaviors/kb-citation.mjs +677 -0
- package/dist/behaviors/kb-clarify.d.mts +20 -0
- package/dist/behaviors/kb-clarify.mjs +248 -0
- package/dist/behaviors/kb-conflict.d.mts +22 -0
- package/dist/behaviors/kb-conflict.mjs +284 -0
- package/dist/behaviors/kb-connector.d.mts +17 -0
- package/dist/behaviors/kb-connector.mjs +375 -0
- package/dist/behaviors/kb-core.d.mts +529 -0
- package/dist/behaviors/kb-core.mjs +890 -0
- package/dist/behaviors/kb-eval.d.mts +22 -0
- package/dist/behaviors/kb-eval.mjs +408 -0
- package/dist/behaviors/kb-explain.d.mts +11 -0
- package/dist/behaviors/kb-explain.mjs +243 -0
- package/dist/behaviors/kb-filter.d.mts +31 -0
- package/dist/behaviors/kb-filter.mjs +587 -0
- package/dist/behaviors/kb-gap.d.mts +27 -0
- package/dist/behaviors/kb-gap.mjs +273 -0
- package/dist/behaviors/kb-hittest.d.mts +34 -0
- package/dist/behaviors/kb-hittest.mjs +409 -0
- package/dist/behaviors/kb-metadata.d.mts +29 -0
- package/dist/behaviors/kb-metadata.mjs +326 -0
- package/dist/behaviors/kb-passage.d.mts +41 -0
- package/dist/behaviors/kb-passage.mjs +529 -0
- package/dist/behaviors/kb-pipeline.d.mts +18 -0
- package/dist/behaviors/kb-pipeline.mjs +381 -0
- package/dist/behaviors/kb-qa.d.mts +26 -0
- package/dist/behaviors/kb-qa.mjs +332 -0
- package/dist/behaviors/kb-rerank.d.mts +20 -0
- package/dist/behaviors/kb-rerank.mjs +315 -0
- package/dist/behaviors/kb-retrieval.d.mts +49 -0
- package/dist/behaviors/kb-retrieval.mjs +746 -0
- package/dist/behaviors/kb-review.d.mts +44 -0
- package/dist/behaviors/kb-review.mjs +451 -0
- package/dist/behaviors/kb-sandbox.d.mts +33 -0
- package/dist/behaviors/kb-sandbox.mjs +325 -0
- package/dist/behaviors/kb-segment.d.mts +32 -0
- package/dist/behaviors/kb-segment.mjs +499 -0
- package/dist/behaviors/kb-sources.d.mts +27 -0
- package/dist/behaviors/kb-sources.mjs +373 -0
- package/dist/behaviors/kb-sql.d.mts +43 -0
- package/dist/behaviors/kb-sql.mjs +948 -0
- package/dist/behaviors/kb-trace.d.mts +16 -0
- package/dist/behaviors/kb-trace.mjs +414 -0
- package/dist/behaviors/kb-visibility.d.mts +44 -0
- package/dist/behaviors/kb-visibility.mjs +403 -0
- package/dist/behaviors/kb-who-can.d.mts +32 -0
- package/dist/behaviors/kb-who-can.mjs +379 -0
- package/dist/components/ai-branch.mjs +3 -0
- package/dist/components/ai-chat.css +295 -0
- package/dist/components/ai-feedback.mjs +3 -0
- package/dist/components/ai-panel.css +217 -0
- package/dist/components/ai-threads.mjs +3 -0
- package/dist/components/chart-graph.css +57 -0
- package/dist/components/chart-graph.mjs +4 -0
- package/dist/components/chart-map.mjs +3 -0
- package/dist/components/chart-scatter.mjs +1 -1
- package/dist/components/charts.css +32 -0
- package/dist/components/charts.mjs +1 -0
- package/dist/components/kb-access.mjs +4 -0
- package/dist/components/kb-acl.mjs +4 -0
- package/dist/components/kb-agent.css +481 -0
- package/dist/components/kb-answer.mjs +4 -0
- package/dist/components/kb-audit.mjs +4 -0
- package/dist/components/kb-canvas.mjs +4 -0
- package/dist/components/kb-chain.mjs +4 -0
- package/dist/components/kb-checkpoint.mjs +4 -0
- package/dist/components/kb-chunks.mjs +4 -0
- package/dist/components/kb-citation.mjs +4 -0
- package/dist/components/kb-clarify.mjs +4 -0
- package/dist/components/kb-conflict.mjs +4 -0
- package/dist/components/kb-connector.mjs +4 -0
- package/dist/components/kb-data.css +649 -0
- package/dist/components/kb-eval.mjs +4 -0
- package/dist/components/kb-explain.mjs +4 -0
- package/dist/components/kb-filter.mjs +4 -0
- package/dist/components/kb-gap.mjs +4 -0
- package/dist/components/kb-ground.css +566 -0
- package/dist/components/kb-hittest.mjs +4 -0
- package/dist/components/kb-ingest.css +898 -0
- package/dist/components/kb-metadata.mjs +4 -0
- package/dist/components/kb-ops.css +548 -0
- package/dist/components/kb-passage.mjs +4 -0
- package/dist/components/kb-perm.css +444 -0
- package/dist/components/kb-pipeline.mjs +4 -0
- package/dist/components/kb-qa.mjs +4 -0
- package/dist/components/kb-rerank.mjs +4 -0
- package/dist/components/kb-retrieval.mjs +4 -0
- package/dist/components/kb-review.mjs +4 -0
- package/dist/components/kb-sandbox.mjs +4 -0
- package/dist/components/kb-search.css +940 -0
- package/dist/components/kb-segment.mjs +4 -0
- package/dist/components/kb-sources.mjs +4 -0
- package/dist/components/kb-sql.mjs +4 -0
- package/dist/components/kb-trace.mjs +4 -0
- package/dist/components/kb-visibility.mjs +4 -0
- package/dist/components/kb-who-can.mjs +4 -0
- package/dist/components/kb.css +252 -0
- package/dist/components/kb.mjs +9 -0
- package/dist/index.d.mts +37 -2
- package/dist/index.mjs +8555 -205
- package/dist/registry.json +325 -3
- package/dist/ui.css +5451 -45
- package/docs/research/2026-10-03-ai-kb-components.md +392 -0
- package/docs/research/2026-10-03-kb-permissions.md +992 -0
- package/docs/spec/kb-family.md +443 -0
- package/package.json +2 -2
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @icen.ai/ui — kb-agent.css(工作台域:kb-canvas / kb-checkpoint / kb-sandbox / kb-chain)
|
|
3
|
+
* 共享原语在 kb.css(.kb-num/.kb-dot/.kb-key/kb-pulse 等,全部 kb-* slug 经 EXTRA_CSS 引入);
|
|
4
|
+
* 本文件只做本域专属结构。DOM 契约见 docs/spec/kb-family.md §5.23–5.26 与各 behavior 头注释。
|
|
5
|
+
*
|
|
6
|
+
* 域纪律(spec §2):工作台域的运动感来自动效(120–240ms ease-out),不来自颜色——
|
|
7
|
+
* 色只标语义(accent=进行中 / success=完成 / danger=失败),不做装饰。
|
|
8
|
+
* 动效预算:展开/浮层进场 160ms(icen-pop-in);流式脉冲 1.6s(kb.css 的 kb-pulse);
|
|
9
|
+
* prefers-reduced-motion 下全部退化为瞬时。
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* ═══════════════ kb-canvas 双栏工作台(§5.23) ═══════════════ */
|
|
13
|
+
|
|
14
|
+
.kb-canvas {
|
|
15
|
+
--kb-canvas-ratio: 0.42; /* JS 拖拽时原位覆写(0–1,无单位) */
|
|
16
|
+
position: relative; /* 划词工具条(.kb-canvas-selbar)的定位包含块 */
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
min-height: 320px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.kb-canvas-main {
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-template-columns:
|
|
25
|
+
minmax(0, calc(var(--kb-canvas-ratio) * 100%))
|
|
26
|
+
6px
|
|
27
|
+
minmax(0, 1fr);
|
|
28
|
+
flex: 1 1 auto;
|
|
29
|
+
min-height: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.kb-canvas-chat,
|
|
33
|
+
.kb-canvas-doc {
|
|
34
|
+
min-height: 0;
|
|
35
|
+
min-width: 0;
|
|
36
|
+
overflow-y: auto;
|
|
37
|
+
overscroll-behavior: contain;
|
|
38
|
+
padding: 10px 12px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* 分隔条:6px 命中区 + 中央 grip 视觉;hover/拖拽点亮 accent(唯一强调处) */
|
|
42
|
+
.kb-canvas-divider {
|
|
43
|
+
position: relative;
|
|
44
|
+
margin: 0;
|
|
45
|
+
border: none;
|
|
46
|
+
border-radius: 2px;
|
|
47
|
+
background: var(--token-line-soft);
|
|
48
|
+
cursor: col-resize;
|
|
49
|
+
touch-action: none; /* 拖拽需接管触摸滚动(指针事件 preventDefault 的对偶) */
|
|
50
|
+
transition: background-color 0.16s ease-out;
|
|
51
|
+
}
|
|
52
|
+
.kb-canvas-divider::after {
|
|
53
|
+
content: '';
|
|
54
|
+
position: absolute;
|
|
55
|
+
left: 50%;
|
|
56
|
+
top: 50%;
|
|
57
|
+
transform: translate(-50%, -50%);
|
|
58
|
+
width: 2px;
|
|
59
|
+
height: 18px;
|
|
60
|
+
border-radius: 1px;
|
|
61
|
+
background: var(--token-line);
|
|
62
|
+
transition: background-color 0.16s ease-out;
|
|
63
|
+
}
|
|
64
|
+
.kb-canvas-divider:hover,
|
|
65
|
+
.kb-canvas-divider.is-active {
|
|
66
|
+
background: color-mix(in srgb, var(--token-accent) 22%, transparent);
|
|
67
|
+
}
|
|
68
|
+
.kb-canvas-divider:hover::after,
|
|
69
|
+
.kb-canvas-divider.is-active::after {
|
|
70
|
+
background: var(--token-accent);
|
|
71
|
+
}
|
|
72
|
+
.kb-canvas-divider:focus-visible {
|
|
73
|
+
outline: 2px solid var(--token-accent);
|
|
74
|
+
outline-offset: -2px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* 拖拽中:禁文本选择(防划词误触)+ 冻结两栏 hover 抖动 */
|
|
78
|
+
.kb-canvas.is-dragging {
|
|
79
|
+
user-select: none;
|
|
80
|
+
}
|
|
81
|
+
.kb-canvas.is-dragging .kb-canvas-chat,
|
|
82
|
+
.kb-canvas.is-dragging .kb-canvas-doc {
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* 右栏内联 diff 间距(渲染复用 ai-diff.css 的 .ai-diff) */
|
|
87
|
+
.kb-canvas-diff {
|
|
88
|
+
margin-bottom: 12px;
|
|
89
|
+
}
|
|
90
|
+
.kb-canvas-diff:last-child {
|
|
91
|
+
margin-bottom: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* 底部版本时间轴:横向节点流;display:flex 会压掉 UA 的 [hidden],须显式声明 */
|
|
95
|
+
.kb-canvas-versions {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: 6px;
|
|
99
|
+
flex: 0 0 auto;
|
|
100
|
+
padding: 6px 10px;
|
|
101
|
+
border-top: 1px solid var(--token-line-soft);
|
|
102
|
+
overflow-x: auto;
|
|
103
|
+
}
|
|
104
|
+
.kb-canvas-versions[hidden] {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.kb-canvas-ver {
|
|
109
|
+
display: inline-flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: 6px;
|
|
112
|
+
flex: 0 0 auto;
|
|
113
|
+
padding: 2px 9px;
|
|
114
|
+
border: 1px solid var(--token-line-soft);
|
|
115
|
+
border-radius: 999px;
|
|
116
|
+
background: var(--token-bg-soft);
|
|
117
|
+
font: inherit;
|
|
118
|
+
font-size: 11.5px;
|
|
119
|
+
color: var(--token-text-muted);
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
transition: color 0.16s ease-out, border-color 0.16s ease-out;
|
|
122
|
+
}
|
|
123
|
+
.kb-canvas-ver:hover {
|
|
124
|
+
color: var(--token-text);
|
|
125
|
+
border-color: var(--token-line);
|
|
126
|
+
}
|
|
127
|
+
.kb-canvas-ver:focus-visible {
|
|
128
|
+
outline: 2px solid var(--token-accent);
|
|
129
|
+
outline-offset: -2px;
|
|
130
|
+
}
|
|
131
|
+
.kb-canvas-ver-dot {
|
|
132
|
+
width: 6px;
|
|
133
|
+
height: 6px;
|
|
134
|
+
border-radius: 50%;
|
|
135
|
+
flex: 0 0 auto;
|
|
136
|
+
background: var(--token-text-faint);
|
|
137
|
+
transition: background-color 0.16s ease-out;
|
|
138
|
+
}
|
|
139
|
+
.kb-canvas-ver-label {
|
|
140
|
+
max-width: 180px;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
text-overflow: ellipsis;
|
|
143
|
+
white-space: nowrap;
|
|
144
|
+
}
|
|
145
|
+
/* current 高亮:点线同色 accent(语义=当前所在版本,非装饰) */
|
|
146
|
+
.kb-canvas-ver.is-current {
|
|
147
|
+
color: var(--token-accent);
|
|
148
|
+
border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
|
|
149
|
+
}
|
|
150
|
+
.kb-canvas-ver.is-current .kb-canvas-ver-dot {
|
|
151
|
+
background: var(--token-accent);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* 划词工具条:浮层三档材质(--z-panel 缺省回落 --z-popover);1.5s 无操作由 JS 隐藏 */
|
|
155
|
+
.kb-canvas-selbar {
|
|
156
|
+
position: absolute;
|
|
157
|
+
z-index: var(--z-panel, var(--z-popover));
|
|
158
|
+
display: flex;
|
|
159
|
+
gap: 2px;
|
|
160
|
+
padding: 3px;
|
|
161
|
+
border-radius: var(--radius-md, 10px);
|
|
162
|
+
background: color-mix(in srgb, var(--token-card-strong, var(--token-bg)) 94%, transparent);
|
|
163
|
+
border: 1px solid var(--token-outline, var(--token-line));
|
|
164
|
+
box-shadow: var(--token-shadow-overlay, 0 8px 24px rgba(0, 0, 0, 0.14));
|
|
165
|
+
animation: icen-pop-in var(--icen-tx-fast, 160ms) ease-out;
|
|
166
|
+
user-select: none;
|
|
167
|
+
}
|
|
168
|
+
.kb-canvas-selbar[hidden] {
|
|
169
|
+
display: none;
|
|
170
|
+
}
|
|
171
|
+
.kb-canvas-selbar-btn {
|
|
172
|
+
border: none;
|
|
173
|
+
background: none;
|
|
174
|
+
border-radius: var(--radius-sm, 6px);
|
|
175
|
+
padding: 3px 9px;
|
|
176
|
+
font: inherit;
|
|
177
|
+
font-size: 12px;
|
|
178
|
+
color: var(--token-text-muted);
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
white-space: nowrap;
|
|
181
|
+
transition: color 0.16s ease-out, background-color 0.16s ease-out;
|
|
182
|
+
}
|
|
183
|
+
.kb-canvas-selbar-btn:hover {
|
|
184
|
+
color: var(--token-text);
|
|
185
|
+
background: var(--token-bg-soft);
|
|
186
|
+
}
|
|
187
|
+
.kb-canvas-selbar-btn:focus-visible {
|
|
188
|
+
outline: 2px solid var(--token-accent);
|
|
189
|
+
outline-offset: -2px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* ═══════════════ kb-checkpoint 检查点(§5.24) ═══════════════ */
|
|
193
|
+
|
|
194
|
+
.kb-checkpoints {
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
gap: 8px;
|
|
198
|
+
flex-wrap: wrap;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.kb-checkpoint {
|
|
202
|
+
display: inline-flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
gap: 6px;
|
|
205
|
+
min-height: 28px;
|
|
206
|
+
padding: 2px 10px;
|
|
207
|
+
border: 1px solid var(--token-line-soft);
|
|
208
|
+
border-radius: var(--radius-sm, 6px);
|
|
209
|
+
background: var(--token-bg-soft);
|
|
210
|
+
font: inherit;
|
|
211
|
+
font-size: 12px;
|
|
212
|
+
color: var(--token-text-muted);
|
|
213
|
+
cursor: pointer;
|
|
214
|
+
transition: color 0.16s ease-out, border-color 0.16s ease-out;
|
|
215
|
+
}
|
|
216
|
+
.kb-checkpoint:hover {
|
|
217
|
+
color: var(--token-text);
|
|
218
|
+
border-color: var(--token-line);
|
|
219
|
+
}
|
|
220
|
+
.kb-checkpoint:focus-visible {
|
|
221
|
+
outline: 2px solid var(--token-accent);
|
|
222
|
+
outline-offset: -2px;
|
|
223
|
+
}
|
|
224
|
+
.kb-checkpoint-icon {
|
|
225
|
+
display: inline-flex;
|
|
226
|
+
color: var(--token-text-faint);
|
|
227
|
+
}
|
|
228
|
+
.kb-checkpoint-icon svg {
|
|
229
|
+
width: 14px;
|
|
230
|
+
height: 14px;
|
|
231
|
+
}
|
|
232
|
+
.kb-checkpoint-time {
|
|
233
|
+
font-size: 11px;
|
|
234
|
+
}
|
|
235
|
+
.kb-checkpoint-label {
|
|
236
|
+
max-width: 180px;
|
|
237
|
+
overflow: hidden;
|
|
238
|
+
text-overflow: ellipsis;
|
|
239
|
+
white-space: nowrap;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* 恢复菜单:fixed 浮层(body 挂载),160ms 进场;默认预选项带 ✓ 与审计说明 */
|
|
243
|
+
.kb-checkpoint-menu {
|
|
244
|
+
position: fixed;
|
|
245
|
+
z-index: var(--z-popover);
|
|
246
|
+
min-width: 248px;
|
|
247
|
+
max-width: 320px;
|
|
248
|
+
margin: 0;
|
|
249
|
+
padding: 6px;
|
|
250
|
+
background: color-mix(in srgb, var(--token-card-strong, var(--token-bg)) 94%, transparent);
|
|
251
|
+
border: 1px solid var(--token-outline, var(--token-line));
|
|
252
|
+
box-shadow: var(--token-shadow-overlay);
|
|
253
|
+
border-radius: var(--radius-md, 10px);
|
|
254
|
+
animation: icen-pop-in var(--icen-tx-fast, 160ms) ease-out;
|
|
255
|
+
}
|
|
256
|
+
.kb-checkpoint-menu-title {
|
|
257
|
+
font-size: 11.5px;
|
|
258
|
+
color: var(--token-text-faint);
|
|
259
|
+
padding: 4px 8px 6px;
|
|
260
|
+
}
|
|
261
|
+
.kb-checkpoint-menu-item {
|
|
262
|
+
display: flex;
|
|
263
|
+
align-items: flex-start;
|
|
264
|
+
gap: 8px;
|
|
265
|
+
width: 100%;
|
|
266
|
+
padding: 6px 8px;
|
|
267
|
+
border: none;
|
|
268
|
+
background: none;
|
|
269
|
+
border-radius: var(--radius-sm, 6px);
|
|
270
|
+
font: inherit;
|
|
271
|
+
font-size: 12.5px;
|
|
272
|
+
color: var(--token-text);
|
|
273
|
+
text-align: left;
|
|
274
|
+
cursor: pointer;
|
|
275
|
+
transition: background-color 0.16s ease-out;
|
|
276
|
+
}
|
|
277
|
+
.kb-checkpoint-menu-item:hover {
|
|
278
|
+
background: var(--token-bg-soft);
|
|
279
|
+
}
|
|
280
|
+
.kb-checkpoint-menu-item:focus-visible {
|
|
281
|
+
outline: 2px solid var(--token-accent);
|
|
282
|
+
outline-offset: -2px;
|
|
283
|
+
}
|
|
284
|
+
.kb-checkpoint-menu-item.is-disabled,
|
|
285
|
+
.kb-checkpoint-menu-item:disabled {
|
|
286
|
+
opacity: 0.45;
|
|
287
|
+
cursor: not-allowed;
|
|
288
|
+
}
|
|
289
|
+
.kb-checkpoint-menu-item:disabled:hover {
|
|
290
|
+
background: none;
|
|
291
|
+
}
|
|
292
|
+
.kb-checkpoint-menu-check {
|
|
293
|
+
flex: 0 0 14px;
|
|
294
|
+
display: inline-flex;
|
|
295
|
+
justify-content: center;
|
|
296
|
+
color: var(--token-accent);
|
|
297
|
+
font-size: 12px;
|
|
298
|
+
line-height: 1.4;
|
|
299
|
+
}
|
|
300
|
+
.kb-checkpoint-menu-item.is-checked .kb-checkpoint-menu-check::before {
|
|
301
|
+
content: '✓';
|
|
302
|
+
}
|
|
303
|
+
.kb-checkpoint-menu-main {
|
|
304
|
+
display: flex;
|
|
305
|
+
flex-direction: column;
|
|
306
|
+
gap: 2px;
|
|
307
|
+
min-width: 0;
|
|
308
|
+
}
|
|
309
|
+
.kb-checkpoint-menu-note {
|
|
310
|
+
font-size: 11px;
|
|
311
|
+
color: var(--token-text-faint);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* ═══════════════ kb-sandbox 沙箱工具容器(§5.25) ═══════════════ */
|
|
315
|
+
|
|
316
|
+
.kb-sandbox {
|
|
317
|
+
position: relative;
|
|
318
|
+
display: block;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.kb-sandbox-stage {
|
|
322
|
+
position: relative;
|
|
323
|
+
aspect-ratio: 16 / 9;
|
|
324
|
+
min-height: 320px;
|
|
325
|
+
border: 1px solid var(--token-line-soft);
|
|
326
|
+
border-radius: var(--radius-md, 10px);
|
|
327
|
+
overflow: hidden;
|
|
328
|
+
background: var(--token-bg);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.kb-sandbox-frame {
|
|
332
|
+
display: block;
|
|
333
|
+
width: 100%;
|
|
334
|
+
height: 100%;
|
|
335
|
+
border: 0;
|
|
336
|
+
background: transparent;
|
|
337
|
+
}
|
|
338
|
+
.kb-sandbox[data-state='idle'] .kb-sandbox-frame {
|
|
339
|
+
display: none; /* 未 load 前不露空白帧 */
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/* 三态由 data-state 驱动(纯 CSS 状态优先纪律);loading 走共享 icen-spin */
|
|
343
|
+
.kb-sandbox-loading,
|
|
344
|
+
.kb-sandbox-err {
|
|
345
|
+
position: absolute;
|
|
346
|
+
inset: 0;
|
|
347
|
+
display: none;
|
|
348
|
+
place-items: center;
|
|
349
|
+
padding: 16px;
|
|
350
|
+
background: var(--token-bg);
|
|
351
|
+
}
|
|
352
|
+
.kb-sandbox[data-state='loading'] .kb-sandbox-loading {
|
|
353
|
+
display: grid;
|
|
354
|
+
}
|
|
355
|
+
.kb-sandbox[data-state='error'] .kb-sandbox-err {
|
|
356
|
+
display: grid;
|
|
357
|
+
}
|
|
358
|
+
.kb-sandbox-spin {
|
|
359
|
+
width: 18px;
|
|
360
|
+
height: 18px;
|
|
361
|
+
border-radius: 50%;
|
|
362
|
+
border: 2px solid var(--token-line-soft);
|
|
363
|
+
border-top-color: var(--token-accent);
|
|
364
|
+
animation: icen-spin 0.8s linear infinite;
|
|
365
|
+
}
|
|
366
|
+
.kb-sandbox-err {
|
|
367
|
+
color: var(--token-danger, var(--token-error));
|
|
368
|
+
font-size: 12.5px;
|
|
369
|
+
text-align: center;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* ═══════════════ kb-chain 工具链条(§5.26) ═══════════════ */
|
|
373
|
+
|
|
374
|
+
.kb-chain {
|
|
375
|
+
display: flex;
|
|
376
|
+
align-items: center;
|
|
377
|
+
min-width: 0;
|
|
378
|
+
padding: 2px 0;
|
|
379
|
+
overflow-x: auto;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.kb-chain-step {
|
|
383
|
+
display: inline-flex;
|
|
384
|
+
align-items: center;
|
|
385
|
+
gap: 6px;
|
|
386
|
+
flex: 0 0 auto;
|
|
387
|
+
padding: 3px 10px;
|
|
388
|
+
border-radius: 999px;
|
|
389
|
+
font-size: 12px;
|
|
390
|
+
color: var(--token-text-muted);
|
|
391
|
+
transition: color 0.16s ease-out, background-color 0.16s ease-out;
|
|
392
|
+
}
|
|
393
|
+
/* 可点(running 及之前):hover 提供可点暗示,仍走中性色 */
|
|
394
|
+
.kb-chain-step[aria-disabled='false'] {
|
|
395
|
+
cursor: pointer;
|
|
396
|
+
}
|
|
397
|
+
.kb-chain-step[aria-disabled='false']:hover {
|
|
398
|
+
color: var(--token-text);
|
|
399
|
+
background: var(--token-bg-soft);
|
|
400
|
+
}
|
|
401
|
+
.kb-chain-step[aria-disabled='false']:focus-visible {
|
|
402
|
+
outline: 2px solid var(--token-accent);
|
|
403
|
+
outline-offset: -2px;
|
|
404
|
+
}
|
|
405
|
+
.kb-chain-step[aria-disabled='true'] {
|
|
406
|
+
color: var(--token-text-faint);
|
|
407
|
+
cursor: default;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* 状态点:空心灰(pending)/ accent 脉冲(running)/ 实心绿(done)/ 实心红(error) */
|
|
411
|
+
.kb-chain-dot {
|
|
412
|
+
box-sizing: border-box;
|
|
413
|
+
width: 8px;
|
|
414
|
+
height: 8px;
|
|
415
|
+
border-radius: 50%;
|
|
416
|
+
flex: 0 0 auto;
|
|
417
|
+
transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
|
|
418
|
+
}
|
|
419
|
+
.kb-chain-step.is-pending .kb-chain-dot {
|
|
420
|
+
border: 1.5px solid var(--token-line);
|
|
421
|
+
background: transparent;
|
|
422
|
+
}
|
|
423
|
+
.kb-chain-step.is-running .kb-chain-dot {
|
|
424
|
+
background: var(--token-accent);
|
|
425
|
+
animation: kb-pulse 1.6s ease-in-out infinite; /* kb.css 共享脉冲 */
|
|
426
|
+
}
|
|
427
|
+
.kb-chain-step.is-done .kb-chain-dot {
|
|
428
|
+
background: var(--token-success);
|
|
429
|
+
}
|
|
430
|
+
.kb-chain-step.is-error .kb-chain-dot {
|
|
431
|
+
background: var(--token-danger, var(--token-error));
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.kb-chain-label {
|
|
435
|
+
white-space: nowrap;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* 步骤间箭头连线:基线 + 45° 折角箭头,中性层级色 */
|
|
439
|
+
.kb-chain-link {
|
|
440
|
+
position: relative;
|
|
441
|
+
flex: 0 0 18px;
|
|
442
|
+
height: 1px;
|
|
443
|
+
margin: 0 2px;
|
|
444
|
+
background: var(--token-line-soft);
|
|
445
|
+
}
|
|
446
|
+
.kb-chain-link::after {
|
|
447
|
+
content: '';
|
|
448
|
+
position: absolute;
|
|
449
|
+
right: 1px;
|
|
450
|
+
top: 50%;
|
|
451
|
+
width: 5px;
|
|
452
|
+
height: 5px;
|
|
453
|
+
border-top: 1px solid var(--token-line);
|
|
454
|
+
border-right: 1px solid var(--token-line);
|
|
455
|
+
transform: translateY(-50%) rotate(45deg);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/* ═══════════════ 动效纪律(reduced-motion 全退化) ═══════════════ */
|
|
459
|
+
|
|
460
|
+
@media (prefers-reduced-motion: reduce) {
|
|
461
|
+
.kb-canvas-divider,
|
|
462
|
+
.kb-canvas-divider::after,
|
|
463
|
+
.kb-canvas-ver,
|
|
464
|
+
.kb-canvas-ver-dot,
|
|
465
|
+
.kb-canvas-selbar,
|
|
466
|
+
.kb-canvas-selbar-btn,
|
|
467
|
+
.kb-checkpoint,
|
|
468
|
+
.kb-checkpoint-menu,
|
|
469
|
+
.kb-checkpoint-menu-item,
|
|
470
|
+
.kb-chain-step,
|
|
471
|
+
.kb-chain-dot {
|
|
472
|
+
transition: none;
|
|
473
|
+
animation: none;
|
|
474
|
+
}
|
|
475
|
+
.kb-chain-step.is-running .kb-chain-dot {
|
|
476
|
+
animation: none; /* 脉冲退化为静态 accent 点 */
|
|
477
|
+
}
|
|
478
|
+
.kb-sandbox-spin {
|
|
479
|
+
animation-duration: 1.6s; /* 旋转保留但放慢,避免频闪不适 */
|
|
480
|
+
}
|
|
481
|
+
}
|