@wil-works/evoke-charts 0.4.0 → 0.6.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/dist/ai.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as SPEC_RULES, c as inferColumns, d as parseNumeric, f as chartOptionsSchema, i as formatExamples, l as looksLikeTime, n as buildChartPrompt, o as detectIntent, p as validateOptions, r as SPEC_EXAMPLES, s as generateChartSpec, t as lintChartSpec, u as parseDataTable } from "./ai-BdpMydhW.js";
1
+ import { a as SPEC_RULES, c as inferColumns, d as parseNumeric, f as chartOptionsSchema, i as formatExamples, l as looksLikeTime, n as buildChartPrompt, o as detectIntent, p as validateOptions, r as SPEC_EXAMPLES, s as generateChartSpec, t as lintChartSpec, u as parseDataTable } from "./ai-B5Fk3lBQ.js";
2
2
  export { SPEC_EXAMPLES, SPEC_RULES, buildChartPrompt, chartOptionsSchema, detectIntent, formatExamples, generateChartSpec, inferColumns, lintChartSpec, looksLikeTime, parseDataTable, parseNumeric, validateOptions };
@@ -1,5 +1,5 @@
1
1
 
2
- .ev-chart[data-v-04ce6a3d] {
2
+ .ev-chart[data-v-62da63e1] {
3
3
  position: relative;
4
4
  /* 容器不带边框:是否加框、加多粗由宿主决定,图表只负责内容;
5
5
  圆角裁剪下沉到 canvas 与浮层自身(border-radius: inherit) */
@@ -8,8 +8,14 @@
8
8
  background: var(--ev-bg-color, #ffffff);
9
9
  }
10
10
 
11
+ /* 键盘可达(DESIGN §13.7 期 1):容器可聚焦,焦点环贴内缘不裁切 */
12
+ .ev-chart[data-v-62da63e1]:focus-visible {
13
+ outline: 2px solid var(--ev-color-primary, #175dff);
14
+ outline-offset: -2px;
15
+ }
16
+
11
17
  /* 关键:canvas 必须能接收鼠标事件 */
12
- .ev-chart__canvas[data-v-04ce6a3d] {
18
+ .ev-chart__canvas[data-v-62da63e1] {
13
19
  position: absolute;
14
20
  top: 0;
15
21
  left: 0;
@@ -23,14 +29,14 @@
23
29
 
24
30
  /* HTML 覆盖层:只在内容层,不与 canvas 抢交互(子元素可自行 pointer-events:auto),
25
31
  也不压过 tooltip(z-index 100) */
26
- .ev-chart__overlay[data-v-04ce6a3d] {
32
+ .ev-chart__overlay[data-v-62da63e1] {
27
33
  position: absolute;
28
34
  inset: 0;
29
35
  z-index: 1;
30
36
  pointer-events: none;
31
37
  border-radius: inherit;
32
38
  }
33
- .ev-chart__tooltip[data-v-04ce6a3d] {
39
+ .ev-chart__tooltip[data-v-62da63e1] {
34
40
  position: absolute;
35
41
  pointer-events: none;
36
42
  z-index: 100;
@@ -50,47 +56,47 @@
50
56
  }
51
57
 
52
58
  /* tooltip 淡入淡出(仅 opacity,位置由 left/top transition 负责) */
53
- .ev-chart-tooltip-enter-active[data-v-04ce6a3d],
54
- .ev-chart-tooltip-leave-active[data-v-04ce6a3d] {
59
+ .ev-chart-tooltip-enter-active[data-v-62da63e1],
60
+ .ev-chart-tooltip-leave-active[data-v-62da63e1] {
55
61
  transition: var(--ev-tooltip-fade-transition);
56
62
  }
57
63
 
58
64
  /* 进入期间禁用位置 transition,避免首次出现时从旧位置滑入 */
59
- .ev-chart-tooltip-enter-active[data-v-04ce6a3d] {
65
+ .ev-chart-tooltip-enter-active[data-v-62da63e1] {
60
66
  transition:
61
67
  var(--ev-tooltip-fade-transition),
62
68
  left 0s,
63
69
  top 0s;
64
70
  }
65
- .ev-chart-tooltip-enter-from[data-v-04ce6a3d],
66
- .ev-chart-tooltip-leave-to[data-v-04ce6a3d] {
71
+ .ev-chart-tooltip-enter-from[data-v-62da63e1],
72
+ .ev-chart-tooltip-leave-to[data-v-62da63e1] {
67
73
  opacity: 0;
68
74
  }
69
75
 
70
76
  /* v-html 注入的内容不带 scoped 属性,需用 :deep() 穿透 */
71
- [data-v-04ce6a3d] .ev-chart__tooltip-title {
77
+ [data-v-62da63e1] .ev-chart__tooltip-title {
72
78
  color: var(--ev-text-color-secondary, #6b7280);
73
79
  font-size: 12px;
74
80
  margin-bottom: 6px;
75
81
  font-weight: 500;
76
82
  }
77
- [data-v-04ce6a3d] .ev-chart__tooltip-item {
83
+ [data-v-62da63e1] .ev-chart__tooltip-item {
78
84
  display: flex;
79
85
  align-items: center;
80
86
  gap: 8px;
81
87
  padding: 2px 0;
82
88
  }
83
- [data-v-04ce6a3d] .ev-chart__tooltip-dot {
89
+ [data-v-62da63e1] .ev-chart__tooltip-dot {
84
90
  width: 8px;
85
91
  height: 8px;
86
92
  border-radius: 50%;
87
93
  flex-shrink: 0;
88
94
  display: inline-block;
89
95
  }
90
- [data-v-04ce6a3d] .ev-chart__tooltip-name {
96
+ [data-v-62da63e1] .ev-chart__tooltip-name {
91
97
  color: var(--ev-text-color-primary, #111827);
92
98
  }
93
- [data-v-04ce6a3d] .ev-chart__tooltip-value {
99
+ [data-v-62da63e1] .ev-chart__tooltip-value {
94
100
  color: var(--ev-text-color-primary, #111827);
95
101
  font-weight: 600;
96
102
  margin-left: auto;
@@ -99,7 +105,7 @@
99
105
  }
100
106
 
101
107
  /* ══════ 空数据占位 ══════ */
102
- .ev-chart__empty[data-v-04ce6a3d] {
108
+ .ev-chart__empty[data-v-62da63e1] {
103
109
  position: absolute;
104
110
  inset: 0;
105
111
  border-radius: inherit;
@@ -112,7 +118,7 @@
112
118
  gap: 14px;
113
119
  user-select: none;
114
120
  }
115
- .ev-chart__empty-icon-wrap[data-v-04ce6a3d] {
121
+ .ev-chart__empty-icon-wrap[data-v-62da63e1] {
116
122
  display: flex;
117
123
  align-items: center;
118
124
  justify-content: center;
@@ -121,19 +127,19 @@
121
127
  border-radius: 16px;
122
128
  background: var(--ev-fill-color-light, #f5f7fa);
123
129
  }
124
- .ev-chart__empty-img[data-v-04ce6a3d] {
130
+ .ev-chart__empty-img[data-v-62da63e1] {
125
131
  width: 32px;
126
132
  height: 32px;
127
133
  opacity: 0.4;
128
134
  }
129
- .ev-chart__empty-text[data-v-04ce6a3d] {
135
+ .ev-chart__empty-text[data-v-62da63e1] {
130
136
  letter-spacing: 0.04em;
131
137
  font-weight: 500;
132
138
  font-size: 13px;
133
139
  }
134
140
 
135
141
  /* ══════ 加载中骨架 ══════ */
136
- .ev-chart__loading[data-v-04ce6a3d] {
142
+ .ev-chart__loading[data-v-62da63e1] {
137
143
  position: absolute;
138
144
  inset: 0;
139
145
  border-radius: inherit;
@@ -142,20 +148,20 @@
142
148
  justify-content: center;
143
149
  background: var(--ev-bg-color, #ffffff);
144
150
  }
145
- .ev-chart__loading-bars[data-v-04ce6a3d] {
151
+ .ev-chart__loading-bars[data-v-62da63e1] {
146
152
  display: flex;
147
153
  align-items: flex-end;
148
154
  gap: 6px;
149
155
  height: 60px;
150
156
  }
151
- .ev-chart__loading-bar[data-v-04ce6a3d] {
157
+ .ev-chart__loading-bar[data-v-62da63e1] {
152
158
  width: 10px;
153
159
  height: 40px;
154
160
  border-radius: 4px;
155
161
  background: var(--ev-border-color, #e2e8f0);
156
- animation: ev-chart-shimmer-04ce6a3d 1.2s ease-in-out infinite;
162
+ animation: ev-chart-shimmer-62da63e1 1.2s ease-in-out infinite;
157
163
  }
158
- @keyframes ev-chart-shimmer-04ce6a3d {
164
+ @keyframes ev-chart-shimmer-62da63e1 {
159
165
  0%,
160
166
  100% {
161
167
  transform: scaleY(0.4);
@@ -168,7 +174,7 @@
168
174
  }
169
175
 
170
176
  /* ══════ 错误边界 ══════ */
171
- .ev-chart__error[data-v-04ce6a3d] {
177
+ .ev-chart__error[data-v-62da63e1] {
172
178
  position: absolute;
173
179
  inset: 0;
174
180
  border-radius: inherit;
@@ -182,13 +188,13 @@
182
188
  padding: 20px;
183
189
  text-align: center;
184
190
  }
185
- .ev-chart__error-icon[data-v-04ce6a3d] {
191
+ .ev-chart__error-icon[data-v-62da63e1] {
186
192
  display: flex;
187
193
  align-items: center;
188
194
  justify-content: center;
189
195
  font-size: 30px;
190
196
  }
191
- .ev-chart__error-text[data-v-04ce6a3d] {
197
+ .ev-chart__error-text[data-v-62da63e1] {
192
198
  font-size: 12px;
193
199
  line-height: 1.5;
194
200
  max-width: 80%;
@@ -196,17 +202,17 @@
196
202
  }
197
203
 
198
204
  /* ══════ 进入/离开淡入淡出 ══════ */
199
- .ev-chart-fade-enter-active[data-v-04ce6a3d],
200
- .ev-chart-fade-leave-active[data-v-04ce6a3d] {
205
+ .ev-chart-fade-enter-active[data-v-62da63e1],
206
+ .ev-chart-fade-leave-active[data-v-62da63e1] {
201
207
  transition: opacity 0.2s ease;
202
208
  }
203
- .ev-chart-fade-enter-from[data-v-04ce6a3d],
204
- .ev-chart-fade-leave-to[data-v-04ce6a3d] {
209
+ .ev-chart-fade-enter-from[data-v-62da63e1],
210
+ .ev-chart-fade-leave-to[data-v-62da63e1] {
205
211
  opacity: 0;
206
212
  }
207
213
 
208
214
  /* ══════ 无障碍:sr-only ══════ */
209
- .ev-chart__sr-only[data-v-04ce6a3d] {
215
+ .ev-chart__sr-only[data-v-62da63e1] {
210
216
  position: absolute;
211
217
  width: 1px;
212
218
  height: 1px;