@kylincloud/flamegraph 0.35.18 → 0.35.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kylincloud/flamegraph",
3
- "version": "0.35.18",
3
+ "version": "0.35.19",
4
4
  "description": "KylinCloud flamegraph renderer (Pyroscope-based)",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.node.cjs.js",
@@ -9,19 +9,69 @@
9
9
  }
10
10
 
11
11
  .search {
12
- background: var(--ps-immutable-off-white);
13
- transition: background-color ease-out 0.1s;
12
+ // 默认样式:白色背景,适用于 light 和 kylin 模式
13
+ background: var(--ps-immutable-white);
14
+ transition:
15
+ background-color 0.1s ease-out,
16
+ border-color 0.1s ease-out,
17
+ box-shadow 0.1s ease-out;
18
+
14
19
  font: inherit;
15
20
  margin-right: 1.5px;
16
21
  border: 1px solid var(--ps-ui-border);
17
22
  display: flex;
18
- /* 移除 flex-grow: 1 */
19
23
  height: 37px;
20
24
  width: 100%;
21
25
 
22
- &,
26
+ // 2)文本颜色改成“偏灰”,不要纯黑
27
+ // 这里用一个接近 antd 的值:rgba(0, 0, 0, 0.65)
28
+ color: rgba(0, 0, 0, 0.65);
29
+
30
+ // 3)placeholder 再淡一点,类似 antd 的 placeholder
23
31
  &::placeholder {
24
- color: var(--ps-immutable-placeholder-text) !important;
32
+ color: rgba(0, 0, 0, 0.25);
33
+ }
34
+
35
+ // 适配 light 和 kylin 模式
36
+ &.light,
37
+ &.kylin {
38
+ background: var(--ps-immutable-white);
39
+ color: rgba(0, 0, 0, 0.65);
40
+ border-color: var(--ps-ui-border);
41
+ }
42
+
43
+ // 适配 dark 模式
44
+ @media (prefers-color-scheme: dark) {
45
+
46
+ &,
47
+ &.dark {
48
+ background: var(--ps-immutable-dark-background);
49
+ border-color: var(--ps-ui-border-dark);
50
+ color: rgba(255, 255, 255, 0.75);
51
+
52
+ &::placeholder {
53
+ color: rgba(255, 255, 255, 0.5);
54
+ }
55
+ }
56
+ }
57
+
58
+ // 聚焦样式
59
+ &.light:focus,
60
+ &.kylin:focus {
61
+ background: var(--ps-immutable-white);
62
+ border-color: rgb(93, 151, 111);
63
+ box-shadow: 0 0 0 2px rgba(93, 151, 111, 0.2);
64
+ outline: none;
65
+ }
66
+
67
+ // dark 模式下的聚焦样式
68
+ @media (prefers-color-scheme: dark) {
69
+ &.dark:focus {
70
+ background: var(--ps-immutable-dark-background);
71
+ border-color: rgb(93, 151, 111);
72
+ box-shadow: 0 0 0 2px rgba(93, 151, 111, 0.2);
73
+ outline: none;
74
+ }
25
75
  }
26
76
  }
27
77
 
@@ -36,14 +86,9 @@
36
86
 
37
87
  .search-synced {
38
88
  @extend .search;
39
-
40
89
  border-color: var(--ps-immutable-linked-border);
41
90
  }
42
91
 
43
- .search:focus {
44
- background: var(--ps-immutable-white);
45
- }
46
-
47
92
  .icon {
48
93
  cursor: pointer;
49
94
 
@@ -85,6 +85,8 @@ tt {
85
85
  color: var(--ps-neutral-2);
86
86
  text-align: right;
87
87
  padding: 0px 10px;
88
+ /* 设置更小的行高,保证文本紧凑 */
89
+ line-height: 1;
88
90
  border-left: 1px solid var(--ps-ui-border);
89
91
  border-bottom: 1px solid var(--ps-ui-border);
90
92
  width: 150px;