@icen.ai/ui 0.5.0 → 0.8.1
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 +262 -0
- package/README.md +52 -13
- package/dist/base.css +33 -5
- package/dist/behaviors/accordion.d.mts +7 -0
- package/dist/behaviors/accordion.mjs +37 -11
- package/dist/behaviors/ai-chat.d.mts +59 -0
- package/dist/behaviors/ai-chat.mjs +580 -0
- package/dist/behaviors/ai-composer.d.mts +137 -0
- package/dist/behaviors/ai-composer.mjs +2114 -0
- package/dist/behaviors/ai-core.d.mts +156 -0
- package/dist/behaviors/ai-core.mjs +504 -0
- package/dist/behaviors/ai-diff.d.mts +53 -0
- package/dist/behaviors/ai-diff.mjs +413 -0
- package/dist/behaviors/ai-panel.d.mts +101 -0
- package/dist/behaviors/ai-panel.mjs +1087 -0
- package/dist/behaviors/ai-provider.d.mts +198 -0
- package/dist/behaviors/ai-provider.mjs +1061 -0
- package/dist/behaviors/ai-tool.d.mts +26 -0
- package/dist/behaviors/ai-tool.mjs +2173 -0
- package/dist/behaviors/ai-tools.d.mts +84 -0
- package/dist/behaviors/ai-tools.mjs +1762 -0
- package/dist/behaviors/back-top.d.mts +20 -0
- package/dist/behaviors/back-top.mjs +64 -32
- package/dist/behaviors/carousel.d.mts +7 -0
- package/dist/behaviors/carousel.mjs +72 -27
- package/dist/behaviors/charts.d.mts +296 -0
- package/dist/behaviors/charts.mjs +1364 -440
- package/dist/behaviors/command-palette.d.mts +42 -0
- package/dist/behaviors/command-palette.mjs +167 -27
- package/dist/behaviors/context-menu.d.mts +53 -0
- package/dist/behaviors/context-menu.mjs +127 -39
- package/dist/behaviors/controls.d.mts +59 -0
- package/dist/behaviors/controls.mjs +601 -0
- package/dist/behaviors/copy.d.mts +7 -0
- package/dist/behaviors/copy.mjs +41 -15
- package/dist/behaviors/datatable.d.mts +90 -0
- package/dist/behaviors/datatable.mjs +279 -53
- package/dist/behaviors/date-picker.d.mts +4 -0
- package/dist/behaviors/date-picker.mjs +276 -69
- package/dist/behaviors/dropdown.d.mts +8 -0
- package/dist/behaviors/dropdown.mjs +171 -28
- package/dist/behaviors/events.d.mts +330 -0
- package/dist/behaviors/events.mjs +208 -0
- package/dist/behaviors/input.d.mts +4 -0
- package/dist/behaviors/input.mjs +52 -32
- package/dist/behaviors/modal.d.mts +30 -0
- package/dist/behaviors/modal.mjs +87 -16
- package/dist/behaviors/nav.d.mts +7 -0
- package/dist/behaviors/nav.mjs +57 -15
- package/dist/behaviors/notification.d.mts +188 -0
- package/dist/behaviors/notification.mjs +274 -140
- package/dist/behaviors/popover.d.mts +82 -0
- package/dist/behaviors/popover.mjs +92 -5
- package/dist/behaviors/select.d.mts +6 -0
- package/dist/behaviors/select.mjs +287 -45
- package/dist/behaviors/sidebar.d.mts +7 -0
- package/dist/behaviors/sidebar.mjs +44 -13
- package/dist/behaviors/slider.d.mts +7 -0
- package/dist/behaviors/slider.mjs +55 -43
- package/dist/behaviors/split-pane.d.mts +8 -0
- package/dist/behaviors/split-pane.mjs +70 -29
- package/dist/behaviors/tabs.d.mts +9 -0
- package/dist/behaviors/tabs.mjs +102 -26
- package/dist/behaviors/tag-input.d.mts +7 -0
- package/dist/behaviors/tag-input.mjs +66 -17
- package/dist/behaviors/theme.d.mts +36 -0
- package/dist/behaviors/theme.mjs +51 -5
- package/dist/behaviors/toast.d.mts +48 -0
- package/dist/behaviors/toast.mjs +98 -25
- package/dist/behaviors/tree.d.mts +7 -0
- package/dist/behaviors/tree.mjs +39 -15
- package/dist/behaviors/upload.d.mts +4 -0
- package/dist/behaviors/upload.mjs +79 -44
- package/dist/cli.mjs +1 -1
- package/dist/components/ai-chat.css +1037 -0
- package/dist/components/ai-chat.mjs +3 -0
- package/dist/components/ai-composer.mjs +3 -0
- package/dist/components/ai-context.mjs +2 -0
- package/dist/components/ai-diff.css +311 -0
- package/dist/components/ai-diff.mjs +3 -0
- package/dist/components/ai-files.mjs +3 -0
- package/dist/components/ai-message.mjs +3 -0
- package/dist/components/ai-panel.css +682 -0
- package/dist/components/ai-reasoning.mjs +3 -0
- package/dist/components/ai-subagent.mjs +2 -0
- package/dist/components/ai-todo.mjs +2 -0
- package/dist/components/ai-tool-call.mjs +2 -0
- package/dist/components/ai-tool.css +532 -0
- package/dist/components/ai-usage.mjs +3 -0
- package/dist/components/badge.css +5 -9
- package/dist/components/breadcrumb.css +0 -36
- package/dist/components/btn.css +4 -7
- package/dist/components/card.css +3 -6
- package/dist/components/chart-bar.css +10 -0
- package/dist/components/chart-calendar.mjs +4 -0
- package/dist/components/chart-gauge.css +1 -1
- package/dist/components/chart-heatmap.css +40 -0
- package/dist/components/chart-pie.css +0 -6
- package/dist/components/chart-scatter.css +24 -0
- package/dist/components/chart-scatter.mjs +4 -0
- package/dist/components/charts.css +87 -2
- package/dist/components/charts.mjs +1 -0
- package/dist/components/command-palette.css +2 -2
- package/dist/components/content.css +11 -25
- package/dist/components/copy.css +8 -8
- package/dist/components/datatable.css +5 -9
- package/dist/components/date-picker.css +4 -8
- package/dist/components/empty.css +0 -4
- package/dist/components/feedback.css +10 -17
- package/dist/components/form.css +13 -14
- package/dist/components/input.css +2 -2
- package/dist/components/layout.css +36 -36
- package/dist/components/media.css +12 -8
- package/dist/components/menu.css +2 -2
- package/dist/components/modal.css +1 -1
- package/dist/components/nav.css +11 -6
- package/dist/components/notification.css +27 -28
- package/dist/components/pagination.css +4 -2
- package/dist/components/pagination.mjs +1 -0
- package/dist/components/panel.css +16 -16
- package/dist/components/pill.css +15 -15
- package/dist/components/rating.mjs +1 -0
- package/dist/components/segmented.css +14 -6
- package/dist/components/segmented.mjs +1 -0
- package/dist/components/select.css +79 -24
- package/dist/components/sidebar.css +1 -1
- package/dist/components/split-pane.css +0 -1
- package/dist/components/stat.css +14 -18
- package/dist/components/steps.css +15 -5
- package/dist/components/steps.mjs +1 -0
- package/dist/components/switch.css +11 -13
- package/dist/components/switch.mjs +1 -0
- package/dist/components/table.css +46 -47
- package/dist/components/table.mjs +1 -0
- package/dist/components/tabs.css +57 -45
- package/dist/components/tag-input.css +5 -10
- package/dist/components/toast.css +16 -13
- package/dist/components/tooltip.css +2 -2
- package/dist/components/upload.css +0 -15
- package/dist/index.d.mts +39 -0
- package/dist/index.mjs +11243 -3312
- package/dist/registry.json +147 -9
- package/dist/retro-effects.css +23 -32
- package/dist/tokens/colors.css +4 -1
- package/dist/tokens/retro-effects.css +23 -32
- package/dist/tokens/style-profiles.css +24 -2
- package/dist/tokens/typography.css +2 -0
- package/dist/tokens.css +30 -3
- package/dist/ui.css +3420 -645
- package/docs/spec/ai-native.md +662 -0
- package/package.json +15 -5
package/dist/registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icen.ai/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"tokens": [
|
|
5
5
|
"colors.css",
|
|
6
6
|
"style-profiles.css",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
],
|
|
12
12
|
"base": "base.css",
|
|
13
13
|
"components": [
|
|
14
|
+
"ai-chat",
|
|
15
|
+
"ai-diff",
|
|
16
|
+
"ai-panel",
|
|
17
|
+
"ai-tool",
|
|
14
18
|
"back-top",
|
|
15
19
|
"badge",
|
|
16
20
|
"breadcrumb",
|
|
@@ -23,6 +27,7 @@
|
|
|
23
27
|
"chart-line",
|
|
24
28
|
"chart-pie",
|
|
25
29
|
"chart-radar",
|
|
30
|
+
"chart-scatter",
|
|
26
31
|
"chart-sparkline",
|
|
27
32
|
"chart-stack",
|
|
28
33
|
"charts",
|
|
@@ -65,15 +70,25 @@
|
|
|
65
70
|
],
|
|
66
71
|
"behaviors": [
|
|
67
72
|
"accordion",
|
|
73
|
+
"ai-chat",
|
|
74
|
+
"ai-composer",
|
|
75
|
+
"ai-core",
|
|
76
|
+
"ai-diff",
|
|
77
|
+
"ai-panel",
|
|
78
|
+
"ai-provider",
|
|
79
|
+
"ai-tool",
|
|
80
|
+
"ai-tools",
|
|
68
81
|
"back-top",
|
|
69
82
|
"carousel",
|
|
70
83
|
"charts",
|
|
71
84
|
"command-palette",
|
|
72
85
|
"context-menu",
|
|
86
|
+
"controls",
|
|
73
87
|
"copy",
|
|
74
88
|
"datatable",
|
|
75
89
|
"date-picker",
|
|
76
90
|
"dropdown",
|
|
91
|
+
"events",
|
|
77
92
|
"input",
|
|
78
93
|
"modal",
|
|
79
94
|
"nav",
|
|
@@ -150,10 +165,21 @@
|
|
|
150
165
|
"init": "initTagInput"
|
|
151
166
|
},
|
|
152
167
|
"switch": {
|
|
153
|
-
"css": "switch.css"
|
|
168
|
+
"css": "switch.css",
|
|
169
|
+
"behavior": "controls",
|
|
170
|
+
"init": "initSwitch",
|
|
171
|
+
"exports": [
|
|
172
|
+
"initSwitch"
|
|
173
|
+
]
|
|
154
174
|
},
|
|
155
175
|
"segmented": {
|
|
156
|
-
"css": "segmented.css"
|
|
176
|
+
"css": "segmented.css",
|
|
177
|
+
"behavior": "controls",
|
|
178
|
+
"exports": [
|
|
179
|
+
"initInput",
|
|
180
|
+
"initSegmented",
|
|
181
|
+
"initStepper"
|
|
182
|
+
]
|
|
157
183
|
},
|
|
158
184
|
"upload": {
|
|
159
185
|
"css": "upload.css",
|
|
@@ -210,7 +236,12 @@
|
|
|
210
236
|
"css": "media.css"
|
|
211
237
|
},
|
|
212
238
|
"rating": {
|
|
213
|
-
"css": "media.css"
|
|
239
|
+
"css": "media.css",
|
|
240
|
+
"behavior": "controls",
|
|
241
|
+
"init": "initRating",
|
|
242
|
+
"exports": [
|
|
243
|
+
"initRating"
|
|
244
|
+
]
|
|
214
245
|
},
|
|
215
246
|
"kbd": {
|
|
216
247
|
"css": "content.css"
|
|
@@ -246,7 +277,12 @@
|
|
|
246
277
|
"css": "scroll-area.css"
|
|
247
278
|
},
|
|
248
279
|
"table": {
|
|
249
|
-
"css": "table.css"
|
|
280
|
+
"css": "table.css",
|
|
281
|
+
"behavior": "controls",
|
|
282
|
+
"init": "initTableSort",
|
|
283
|
+
"exports": [
|
|
284
|
+
"initTableSort"
|
|
285
|
+
]
|
|
250
286
|
},
|
|
251
287
|
"datatable": {
|
|
252
288
|
"css": "datatable.css",
|
|
@@ -269,7 +305,8 @@
|
|
|
269
305
|
"chart-area.css",
|
|
270
306
|
"chart-stack.css",
|
|
271
307
|
"chart-gauge.css",
|
|
272
|
-
"chart-sparkline.css"
|
|
308
|
+
"chart-sparkline.css",
|
|
309
|
+
"chart-scatter.css"
|
|
273
310
|
],
|
|
274
311
|
"behavior": "charts",
|
|
275
312
|
"exports": [
|
|
@@ -282,7 +319,14 @@
|
|
|
282
319
|
"renderRadar",
|
|
283
320
|
"renderHeatmap",
|
|
284
321
|
"renderSparkline",
|
|
285
|
-
"renderGauge"
|
|
322
|
+
"renderGauge",
|
|
323
|
+
"renderCalendar",
|
|
324
|
+
"renderScatter",
|
|
325
|
+
"renderChart",
|
|
326
|
+
"normalizeChartSpec",
|
|
327
|
+
"inferChartType",
|
|
328
|
+
"chartFormatValue",
|
|
329
|
+
"registerChartTone"
|
|
286
330
|
]
|
|
287
331
|
},
|
|
288
332
|
"chart-line": {
|
|
@@ -376,6 +420,26 @@
|
|
|
376
420
|
"renderSparkline"
|
|
377
421
|
]
|
|
378
422
|
},
|
|
423
|
+
"chart-scatter": {
|
|
424
|
+
"css": "chart-scatter.css",
|
|
425
|
+
"extraCss": [
|
|
426
|
+
"charts.css"
|
|
427
|
+
],
|
|
428
|
+
"behavior": "charts",
|
|
429
|
+
"exports": [
|
|
430
|
+
"renderScatter"
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
"chart-calendar": {
|
|
434
|
+
"css": "chart-heatmap.css",
|
|
435
|
+
"extraCss": [
|
|
436
|
+
"charts.css"
|
|
437
|
+
],
|
|
438
|
+
"behavior": "charts",
|
|
439
|
+
"exports": [
|
|
440
|
+
"renderCalendar"
|
|
441
|
+
]
|
|
442
|
+
},
|
|
379
443
|
"alert": {
|
|
380
444
|
"css": "feedback.css"
|
|
381
445
|
},
|
|
@@ -418,10 +482,20 @@
|
|
|
418
482
|
"css": "breadcrumb.css"
|
|
419
483
|
},
|
|
420
484
|
"pagination": {
|
|
421
|
-
"css": "pagination.css"
|
|
485
|
+
"css": "pagination.css",
|
|
486
|
+
"behavior": "controls",
|
|
487
|
+
"init": "initPagination",
|
|
488
|
+
"exports": [
|
|
489
|
+
"initPagination"
|
|
490
|
+
]
|
|
422
491
|
},
|
|
423
492
|
"steps": {
|
|
424
|
-
"css": "steps.css"
|
|
493
|
+
"css": "steps.css",
|
|
494
|
+
"behavior": "controls",
|
|
495
|
+
"init": "initSteps",
|
|
496
|
+
"exports": [
|
|
497
|
+
"initSteps"
|
|
498
|
+
]
|
|
425
499
|
},
|
|
426
500
|
"back-top": {
|
|
427
501
|
"css": "back-top.css",
|
|
@@ -430,6 +504,70 @@
|
|
|
430
504
|
},
|
|
431
505
|
"layout": {
|
|
432
506
|
"css": "layout.css"
|
|
507
|
+
},
|
|
508
|
+
"ai-chat": {
|
|
509
|
+
"css": "ai-chat.css",
|
|
510
|
+
"behavior": "ai-chat",
|
|
511
|
+
"init": "initAiChat"
|
|
512
|
+
},
|
|
513
|
+
"ai-message": {
|
|
514
|
+
"css": "ai-chat.css",
|
|
515
|
+
"behavior": "ai-chat",
|
|
516
|
+
"exports": [
|
|
517
|
+
"renderAiMessage",
|
|
518
|
+
"createAiStream",
|
|
519
|
+
"initAiChat"
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
"ai-reasoning": {
|
|
523
|
+
"css": "ai-chat.css",
|
|
524
|
+
"behavior": "ai-chat",
|
|
525
|
+
"exports": [
|
|
526
|
+
"createAiStream",
|
|
527
|
+
"initAiChat"
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
"ai-composer": {
|
|
531
|
+
"css": "ai-chat.css",
|
|
532
|
+
"behavior": "ai-composer",
|
|
533
|
+
"init": "initAiComposer"
|
|
534
|
+
},
|
|
535
|
+
"ai-tool-call": {
|
|
536
|
+
"css": "ai-tool.css",
|
|
537
|
+
"init": "initAiTool"
|
|
538
|
+
},
|
|
539
|
+
"ai-subagent": {
|
|
540
|
+
"css": "ai-tool.css",
|
|
541
|
+
"init": "initAiSubagent"
|
|
542
|
+
},
|
|
543
|
+
"ai-diff": {
|
|
544
|
+
"css": "ai-diff.css",
|
|
545
|
+
"behavior": "ai-diff",
|
|
546
|
+
"init": "initAiDiff"
|
|
547
|
+
},
|
|
548
|
+
"ai-files": {
|
|
549
|
+
"css": "ai-diff.css",
|
|
550
|
+
"behavior": "ai-diff",
|
|
551
|
+
"exports": [
|
|
552
|
+
"renderAiDiff"
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
"ai-todo": {
|
|
556
|
+
"css": "ai-panel.css",
|
|
557
|
+
"init": "initAiTodo"
|
|
558
|
+
},
|
|
559
|
+
"ai-context": {
|
|
560
|
+
"css": "ai-panel.css",
|
|
561
|
+
"init": "initAiContext"
|
|
562
|
+
},
|
|
563
|
+
"ai-usage": {
|
|
564
|
+
"css": "ai-panel.css",
|
|
565
|
+
"behavior": "ai-panel",
|
|
566
|
+
"exports": [
|
|
567
|
+
"renderAiUsage",
|
|
568
|
+
"renderAiUsageRing",
|
|
569
|
+
"renderAiAudit"
|
|
570
|
+
]
|
|
433
571
|
}
|
|
434
572
|
}
|
|
435
573
|
}
|
package/dist/retro-effects.css
CHANGED
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
*
|
|
7
7
|
* 仅在 <html class="style-retro">(或叠加 .dark)激活时生效,对其它风格无副作用:
|
|
8
8
|
* - CRT 扫描线 + 暗角 + 颗粒噪点
|
|
9
|
-
* -
|
|
9
|
+
* - 游走扫描光
|
|
10
10
|
* - RGB 色散 / 霓虹发光(暗色)
|
|
11
11
|
* - 像素边框 / 像素按钮 / 像素分隔线工具类
|
|
12
12
|
* - 开机自检 / 打字机光标 / 页面闪白动画
|
|
13
13
|
*
|
|
14
|
+
* 作用域约定:效果类(扫描线/噪点/光标/开机行/闪白)均收在 .style-retro 下;
|
|
15
|
+
* 像素工具类(.retro-pixel-border / .retro-pixel-button / .retro-pixel-rule)
|
|
16
|
+
* 有意保持全局可用——它们是纯几何装饰,任何风格都可取用。
|
|
17
|
+
* z-index 统一走 base.css 的 --z-fx 标尺(效果层,tooltip 之上)。
|
|
18
|
+
*
|
|
14
19
|
* 所有动画尊重 prefers-reduced-motion:在 reduce 下由 base.css 的全局兜底降为 0.01ms。
|
|
15
20
|
*/
|
|
16
21
|
|
|
@@ -24,7 +29,7 @@
|
|
|
24
29
|
position: fixed;
|
|
25
30
|
inset: 0;
|
|
26
31
|
pointer-events: none;
|
|
27
|
-
z-index:
|
|
32
|
+
z-index: calc(var(--z-fx) - 1);
|
|
28
33
|
opacity: 0.14;
|
|
29
34
|
background:
|
|
30
35
|
repeating-linear-gradient(
|
|
@@ -48,7 +53,7 @@
|
|
|
48
53
|
position: fixed;
|
|
49
54
|
inset: 0;
|
|
50
55
|
pointer-events: none;
|
|
51
|
-
z-index:
|
|
56
|
+
z-index: calc(var(--z-fx) - 2);
|
|
52
57
|
background:
|
|
53
58
|
radial-gradient(
|
|
54
59
|
ellipse at center,
|
|
@@ -58,20 +63,6 @@
|
|
|
58
63
|
opacity: 0.55;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
|
-
/* 屏幕闪烁(备用工具类,需要时挂在元素上) */
|
|
62
|
-
@keyframes retro-flicker {
|
|
63
|
-
0%, 100% { opacity: 1; }
|
|
64
|
-
50% { opacity: 0.985; }
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* 屏幕轻微抖动(备用工具类) */
|
|
68
|
-
@keyframes retro-jitter {
|
|
69
|
-
0%, 100% { transform: translate(0, 0); }
|
|
70
|
-
25% { transform: translate(0.5px, 0); }
|
|
71
|
-
50% { transform: translate(-0.5px, 0.5px); }
|
|
72
|
-
75% { transform: translate(0, -0.5px); }
|
|
73
|
-
}
|
|
74
|
-
|
|
75
66
|
/* CRT 颗粒噪点 */
|
|
76
67
|
@keyframes retro-grain {
|
|
77
68
|
0%, 100% { background-position: 0 0; }
|
|
@@ -90,7 +81,7 @@
|
|
|
90
81
|
position: fixed;
|
|
91
82
|
inset: 0;
|
|
92
83
|
pointer-events: none;
|
|
93
|
-
z-index:
|
|
84
|
+
z-index: calc(var(--z-fx) - 3);
|
|
94
85
|
opacity: 0.06;
|
|
95
86
|
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
|
|
96
87
|
animation: retro-grain 0.5s steps(10) infinite;
|
|
@@ -110,9 +101,8 @@
|
|
|
110
101
|
100% { transform: translateY(100vh); }
|
|
111
102
|
}
|
|
112
103
|
|
|
113
|
-
/* 游走的扫描线(偶尔闪过)——
|
|
114
|
-
.style-retro .retro-scanline-beam
|
|
115
|
-
.retro-scanline-beam {
|
|
104
|
+
/* 游走的扫描线(偶尔闪过)—— 仅 .style-retro 下生效 */
|
|
105
|
+
.style-retro .retro-scanline-beam {
|
|
116
106
|
position: fixed;
|
|
117
107
|
left: 0;
|
|
118
108
|
right: 0;
|
|
@@ -124,7 +114,7 @@
|
|
|
124
114
|
transparent
|
|
125
115
|
);
|
|
126
116
|
pointer-events: none;
|
|
127
|
-
z-index:
|
|
117
|
+
z-index: calc(var(--z-fx) - 4);
|
|
128
118
|
opacity: 0.4;
|
|
129
119
|
animation: retro-scanline-slide 4s linear infinite;
|
|
130
120
|
}
|
|
@@ -140,19 +130,19 @@
|
|
|
140
130
|
100% { opacity: 0; transform: translateY(-4px); }
|
|
141
131
|
}
|
|
142
132
|
|
|
143
|
-
.retro-boot-line {
|
|
133
|
+
.style-retro .retro-boot-line {
|
|
144
134
|
opacity: 0;
|
|
145
135
|
animation: retro-boot-text 0.3s steps(1) forwards;
|
|
146
136
|
}
|
|
147
137
|
|
|
148
|
-
.retro-boot-line:nth-child(1) { animation-delay: 0.1s; }
|
|
149
|
-
.retro-boot-line:nth-child(2) { animation-delay: 0.25s; }
|
|
150
|
-
.retro-boot-line:nth-child(3) { animation-delay: 0.4s; }
|
|
151
|
-
.retro-boot-line:nth-child(4) { animation-delay: 0.55s; }
|
|
152
|
-
.retro-boot-line:nth-child(5) { animation-delay: 0.7s; }
|
|
138
|
+
.style-retro .retro-boot-line:nth-child(1) { animation-delay: 0.1s; }
|
|
139
|
+
.style-retro .retro-boot-line:nth-child(2) { animation-delay: 0.25s; }
|
|
140
|
+
.style-retro .retro-boot-line:nth-child(3) { animation-delay: 0.4s; }
|
|
141
|
+
.style-retro .retro-boot-line:nth-child(4) { animation-delay: 0.55s; }
|
|
142
|
+
.style-retro .retro-boot-line:nth-child(5) { animation-delay: 0.7s; }
|
|
153
143
|
|
|
154
144
|
/* 打字机光标 */
|
|
155
|
-
.retro-cursor::after {
|
|
145
|
+
.style-retro .retro-cursor::after {
|
|
156
146
|
content: "█";
|
|
157
147
|
display: inline-block;
|
|
158
148
|
margin-left: 2px;
|
|
@@ -250,15 +240,16 @@
|
|
|
250
240
|
100% { opacity: 0; }
|
|
251
241
|
}
|
|
252
242
|
|
|
253
|
-
.retro-page-flash {
|
|
243
|
+
.style-retro .retro-page-flash {
|
|
254
244
|
position: fixed;
|
|
255
245
|
inset: 0;
|
|
256
246
|
pointer-events: none;
|
|
257
|
-
z-index:
|
|
247
|
+
z-index: var(--z-fx);
|
|
258
248
|
background: var(--token-bg);
|
|
259
249
|
opacity: 0;
|
|
260
250
|
}
|
|
261
251
|
|
|
262
|
-
.
|
|
252
|
+
/* 状态类遵循全库 .is-* 规范 */
|
|
253
|
+
.style-retro .retro-page-flash.is-active {
|
|
263
254
|
animation: retro-flash 0.2s steps(3) forwards;
|
|
264
255
|
}
|
package/dist/tokens/colors.css
CHANGED
|
@@ -504,6 +504,8 @@
|
|
|
504
504
|
--token-accent-glow: color-mix(in srgb, var(--token-accent) 8%, transparent);
|
|
505
505
|
--token-line-dashed: color-mix(in srgb, var(--token-line-soft) 60%, transparent);
|
|
506
506
|
--token-overlay-bg: color-mix(in srgb, var(--token-bg) 92%, transparent);
|
|
507
|
+
/* 睡莲粉 accent 上的文字色:深绿灰(白字在 #d59ab1 上对比度不达标) */
|
|
508
|
+
--token-on-accent: #26302b;
|
|
507
509
|
|
|
508
510
|
--token-shadow-elevated: 0 1px 2px rgba(0,0,0,.18), 0 8px 22px rgba(0,0,0,.24);
|
|
509
511
|
--token-shadow-overlay: 0 2px 5px rgba(0,0,0,.24), 0 14px 36px rgba(0,0,0,.32);
|
|
@@ -841,7 +843,8 @@
|
|
|
841
843
|
--token-accent-glow: color-mix(in srgb, var(--token-accent) 6%, transparent);
|
|
842
844
|
--token-line-dashed: color-mix(in srgb, var(--token-line-soft) 60%, transparent);
|
|
843
845
|
--token-overlay-bg: color-mix(in srgb, var(--token-bg) 94%, transparent);
|
|
844
|
-
|
|
846
|
+
/* 松烟绿 accent 上的文字色:深墨(白字在 #7AA87E 上对比度不达标) */
|
|
847
|
+
--token-on-accent: #1a2018;
|
|
845
848
|
|
|
846
849
|
--token-shadow-elevated: 0 1px 2px rgba(0,0,0,.2), 0 4px 14px rgba(0,0,0,.22);
|
|
847
850
|
--token-shadow-overlay: 0 2px 4px rgba(0,0,0,.28), 0 10px 30px rgba(0,0,0,.34);
|
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
*
|
|
7
7
|
* 仅在 <html class="style-retro">(或叠加 .dark)激活时生效,对其它风格无副作用:
|
|
8
8
|
* - CRT 扫描线 + 暗角 + 颗粒噪点
|
|
9
|
-
* -
|
|
9
|
+
* - 游走扫描光
|
|
10
10
|
* - RGB 色散 / 霓虹发光(暗色)
|
|
11
11
|
* - 像素边框 / 像素按钮 / 像素分隔线工具类
|
|
12
12
|
* - 开机自检 / 打字机光标 / 页面闪白动画
|
|
13
13
|
*
|
|
14
|
+
* 作用域约定:效果类(扫描线/噪点/光标/开机行/闪白)均收在 .style-retro 下;
|
|
15
|
+
* 像素工具类(.retro-pixel-border / .retro-pixel-button / .retro-pixel-rule)
|
|
16
|
+
* 有意保持全局可用——它们是纯几何装饰,任何风格都可取用。
|
|
17
|
+
* z-index 统一走 base.css 的 --z-fx 标尺(效果层,tooltip 之上)。
|
|
18
|
+
*
|
|
14
19
|
* 所有动画尊重 prefers-reduced-motion:在 reduce 下由 base.css 的全局兜底降为 0.01ms。
|
|
15
20
|
*/
|
|
16
21
|
|
|
@@ -24,7 +29,7 @@
|
|
|
24
29
|
position: fixed;
|
|
25
30
|
inset: 0;
|
|
26
31
|
pointer-events: none;
|
|
27
|
-
z-index:
|
|
32
|
+
z-index: calc(var(--z-fx) - 1);
|
|
28
33
|
opacity: 0.14;
|
|
29
34
|
background:
|
|
30
35
|
repeating-linear-gradient(
|
|
@@ -48,7 +53,7 @@
|
|
|
48
53
|
position: fixed;
|
|
49
54
|
inset: 0;
|
|
50
55
|
pointer-events: none;
|
|
51
|
-
z-index:
|
|
56
|
+
z-index: calc(var(--z-fx) - 2);
|
|
52
57
|
background:
|
|
53
58
|
radial-gradient(
|
|
54
59
|
ellipse at center,
|
|
@@ -58,20 +63,6 @@
|
|
|
58
63
|
opacity: 0.55;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
|
-
/* 屏幕闪烁(备用工具类,需要时挂在元素上) */
|
|
62
|
-
@keyframes retro-flicker {
|
|
63
|
-
0%, 100% { opacity: 1; }
|
|
64
|
-
50% { opacity: 0.985; }
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* 屏幕轻微抖动(备用工具类) */
|
|
68
|
-
@keyframes retro-jitter {
|
|
69
|
-
0%, 100% { transform: translate(0, 0); }
|
|
70
|
-
25% { transform: translate(0.5px, 0); }
|
|
71
|
-
50% { transform: translate(-0.5px, 0.5px); }
|
|
72
|
-
75% { transform: translate(0, -0.5px); }
|
|
73
|
-
}
|
|
74
|
-
|
|
75
66
|
/* CRT 颗粒噪点 */
|
|
76
67
|
@keyframes retro-grain {
|
|
77
68
|
0%, 100% { background-position: 0 0; }
|
|
@@ -90,7 +81,7 @@
|
|
|
90
81
|
position: fixed;
|
|
91
82
|
inset: 0;
|
|
92
83
|
pointer-events: none;
|
|
93
|
-
z-index:
|
|
84
|
+
z-index: calc(var(--z-fx) - 3);
|
|
94
85
|
opacity: 0.06;
|
|
95
86
|
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
|
|
96
87
|
animation: retro-grain 0.5s steps(10) infinite;
|
|
@@ -110,9 +101,8 @@
|
|
|
110
101
|
100% { transform: translateY(100vh); }
|
|
111
102
|
}
|
|
112
103
|
|
|
113
|
-
/* 游走的扫描线(偶尔闪过)——
|
|
114
|
-
.style-retro .retro-scanline-beam
|
|
115
|
-
.retro-scanline-beam {
|
|
104
|
+
/* 游走的扫描线(偶尔闪过)—— 仅 .style-retro 下生效 */
|
|
105
|
+
.style-retro .retro-scanline-beam {
|
|
116
106
|
position: fixed;
|
|
117
107
|
left: 0;
|
|
118
108
|
right: 0;
|
|
@@ -124,7 +114,7 @@
|
|
|
124
114
|
transparent
|
|
125
115
|
);
|
|
126
116
|
pointer-events: none;
|
|
127
|
-
z-index:
|
|
117
|
+
z-index: calc(var(--z-fx) - 4);
|
|
128
118
|
opacity: 0.4;
|
|
129
119
|
animation: retro-scanline-slide 4s linear infinite;
|
|
130
120
|
}
|
|
@@ -140,19 +130,19 @@
|
|
|
140
130
|
100% { opacity: 0; transform: translateY(-4px); }
|
|
141
131
|
}
|
|
142
132
|
|
|
143
|
-
.retro-boot-line {
|
|
133
|
+
.style-retro .retro-boot-line {
|
|
144
134
|
opacity: 0;
|
|
145
135
|
animation: retro-boot-text 0.3s steps(1) forwards;
|
|
146
136
|
}
|
|
147
137
|
|
|
148
|
-
.retro-boot-line:nth-child(1) { animation-delay: 0.1s; }
|
|
149
|
-
.retro-boot-line:nth-child(2) { animation-delay: 0.25s; }
|
|
150
|
-
.retro-boot-line:nth-child(3) { animation-delay: 0.4s; }
|
|
151
|
-
.retro-boot-line:nth-child(4) { animation-delay: 0.55s; }
|
|
152
|
-
.retro-boot-line:nth-child(5) { animation-delay: 0.7s; }
|
|
138
|
+
.style-retro .retro-boot-line:nth-child(1) { animation-delay: 0.1s; }
|
|
139
|
+
.style-retro .retro-boot-line:nth-child(2) { animation-delay: 0.25s; }
|
|
140
|
+
.style-retro .retro-boot-line:nth-child(3) { animation-delay: 0.4s; }
|
|
141
|
+
.style-retro .retro-boot-line:nth-child(4) { animation-delay: 0.55s; }
|
|
142
|
+
.style-retro .retro-boot-line:nth-child(5) { animation-delay: 0.7s; }
|
|
153
143
|
|
|
154
144
|
/* 打字机光标 */
|
|
155
|
-
.retro-cursor::after {
|
|
145
|
+
.style-retro .retro-cursor::after {
|
|
156
146
|
content: "█";
|
|
157
147
|
display: inline-block;
|
|
158
148
|
margin-left: 2px;
|
|
@@ -250,15 +240,16 @@
|
|
|
250
240
|
100% { opacity: 0; }
|
|
251
241
|
}
|
|
252
242
|
|
|
253
|
-
.retro-page-flash {
|
|
243
|
+
.style-retro .retro-page-flash {
|
|
254
244
|
position: fixed;
|
|
255
245
|
inset: 0;
|
|
256
246
|
pointer-events: none;
|
|
257
|
-
z-index:
|
|
247
|
+
z-index: var(--z-fx);
|
|
258
248
|
background: var(--token-bg);
|
|
259
249
|
opacity: 0;
|
|
260
250
|
}
|
|
261
251
|
|
|
262
|
-
.
|
|
252
|
+
/* 状态类遵循全库 .is-* 规范 */
|
|
253
|
+
.style-retro .retro-page-flash.is-active {
|
|
263
254
|
animation: retro-flash 0.2s steps(3) forwards;
|
|
264
255
|
}
|
|
@@ -60,13 +60,20 @@
|
|
|
60
60
|
--density-space-sm: 0.5rem;
|
|
61
61
|
--density-space-md: 0.75rem;
|
|
62
62
|
--density-space-lg: 1rem;
|
|
63
|
+
--density-space-xl: 1.5rem;
|
|
64
|
+
--density-space-2xl: 2rem;
|
|
65
|
+
--density-space-3xl: 3rem;
|
|
66
|
+
--density-space-4xl: 4rem;
|
|
63
67
|
--density-input-height-sm: 28px;
|
|
64
68
|
--density-input-height-md: 36px;
|
|
65
69
|
--density-input-height-lg: 44px;
|
|
70
|
+
--density-font-size-2xs: 10px;
|
|
66
71
|
--density-font-size-xs: 11px;
|
|
67
72
|
--density-font-size-sm: 12px;
|
|
68
73
|
--density-font-size-md: 13px;
|
|
69
74
|
--density-font-size-lg: 14px;
|
|
75
|
+
--density-font-size-xl: 18px;
|
|
76
|
+
--density-font-size-2xl: 22px;
|
|
70
77
|
|
|
71
78
|
/* ── Motion 动效 ── */
|
|
72
79
|
--duration-instant: 0ms;
|
|
@@ -77,7 +84,9 @@
|
|
|
77
84
|
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
78
85
|
--ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
79
86
|
|
|
80
|
-
/* ── Typography 字体 ──
|
|
87
|
+
/* ── Typography 字体 ──
|
|
88
|
+
--line-height-heading 不在此定义:typography.css 独家拥有(icen 品牌 1.2),
|
|
89
|
+
各 .style-* profile 需要差异化时在自己的块里覆盖。 */
|
|
81
90
|
--font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
82
91
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
83
92
|
--font-mono-paper: ui-monospace, SFMono-Regular, 'JetBrains Mono', 'Courier New', monospace;
|
|
@@ -85,7 +94,6 @@
|
|
|
85
94
|
--letter-spacing-body: 0;
|
|
86
95
|
--letter-spacing-heading: 0;
|
|
87
96
|
--line-height-body: 1.5;
|
|
88
|
-
--line-height-heading: 1.2;
|
|
89
97
|
}
|
|
90
98
|
|
|
91
99
|
/* ══════════════════════════════════════════════════════════════
|
|
@@ -98,13 +106,20 @@
|
|
|
98
106
|
--density-space-sm: 0.5rem;
|
|
99
107
|
--density-space-md: 0.75rem;
|
|
100
108
|
--density-space-lg: 1rem;
|
|
109
|
+
--density-space-xl: 1.5rem;
|
|
110
|
+
--density-space-2xl: 2rem;
|
|
111
|
+
--density-space-3xl: 3rem;
|
|
112
|
+
--density-space-4xl: 4rem;
|
|
101
113
|
--density-input-height-sm: 28px;
|
|
102
114
|
--density-input-height-md: 36px;
|
|
103
115
|
--density-input-height-lg: 44px;
|
|
116
|
+
--density-font-size-2xs: 10px;
|
|
104
117
|
--density-font-size-xs: 11px;
|
|
105
118
|
--density-font-size-sm: 12px;
|
|
106
119
|
--density-font-size-md: 13px;
|
|
107
120
|
--density-font-size-lg: 14px;
|
|
121
|
+
--density-font-size-xl: 18px;
|
|
122
|
+
--density-font-size-2xl: 22px;
|
|
108
123
|
|
|
109
124
|
/* ── Motion ── */
|
|
110
125
|
--duration-fast: 150ms;
|
|
@@ -133,13 +148,20 @@
|
|
|
133
148
|
--density-space-sm: 0.25rem;
|
|
134
149
|
--density-space-md: 0.5rem;
|
|
135
150
|
--density-space-lg: 0.75rem;
|
|
151
|
+
--density-space-xl: 1rem;
|
|
152
|
+
--density-space-2xl: 1.5rem;
|
|
153
|
+
--density-space-3xl: 2rem;
|
|
154
|
+
--density-space-4xl: 3rem;
|
|
136
155
|
--density-input-height-sm: 24px;
|
|
137
156
|
--density-input-height-md: 32px;
|
|
138
157
|
--density-input-height-lg: 40px;
|
|
158
|
+
--density-font-size-2xs: 9px;
|
|
139
159
|
--density-font-size-xs: 9px;
|
|
140
160
|
--density-font-size-sm: 10px;
|
|
141
161
|
--density-font-size-md: 11px;
|
|
142
162
|
--density-font-size-lg: 12px;
|
|
163
|
+
--density-font-size-xl: 14px;
|
|
164
|
+
--density-font-size-2xl: 16px;
|
|
143
165
|
|
|
144
166
|
/* ── Motion:像素风瞬间切换 ── */
|
|
145
167
|
--duration-fast: 0ms;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @icen.ai/ui — Typography Tokens(icen canonical)
|
|
3
3
|
* 美学基调:等宽数字精密感 × 衬线书卷气(宋体标题)
|
|
4
4
|
* 默认(:root)即 icen 品牌形态;.style-modern 显式回退 system-ui 栈(见 style-profiles.css)
|
|
5
|
+
* 工具类:.font-math(数字密集区,"Numeric Math" 数学字体 + tabular-nums)
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
/* ── 数学/等宽数字字体(数字密集区的精密感) ── */
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
--font-heading: 'Songti SC', 'STSong', 'Noto Serif SC', 'Source Han Serif SC', SimSun, serif;
|
|
25
26
|
--font-cjk: var(--font-heading);
|
|
26
27
|
--line-height-body: 1.7;
|
|
28
|
+
/* 独家定义(style-profiles.css 的 :root 不再重复;profile 差异化在各 .style-* 块覆盖) */
|
|
27
29
|
--line-height-heading: 1.2;
|
|
28
30
|
}
|
|
29
31
|
|