@wil-works/evoke-charts 0.3.1 → 0.4.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 ADDED
@@ -0,0 +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";
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-0c5d944e] {
2
+ .ev-chart[data-v-04ce6a3d] {
3
3
  position: relative;
4
4
  /* 容器不带边框:是否加框、加多粗由宿主决定,图表只负责内容;
5
5
  圆角裁剪下沉到 canvas 与浮层自身(border-radius: inherit) */
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  /* 关键:canvas 必须能接收鼠标事件 */
12
- .ev-chart__canvas[data-v-0c5d944e] {
12
+ .ev-chart__canvas[data-v-04ce6a3d] {
13
13
  position: absolute;
14
14
  top: 0;
15
15
  left: 0;
@@ -23,14 +23,14 @@
23
23
 
24
24
  /* HTML 覆盖层:只在内容层,不与 canvas 抢交互(子元素可自行 pointer-events:auto),
25
25
  也不压过 tooltip(z-index 100) */
26
- .ev-chart__overlay[data-v-0c5d944e] {
26
+ .ev-chart__overlay[data-v-04ce6a3d] {
27
27
  position: absolute;
28
28
  inset: 0;
29
29
  z-index: 1;
30
30
  pointer-events: none;
31
31
  border-radius: inherit;
32
32
  }
33
- .ev-chart__tooltip[data-v-0c5d944e] {
33
+ .ev-chart__tooltip[data-v-04ce6a3d] {
34
34
  position: absolute;
35
35
  pointer-events: none;
36
36
  z-index: 100;
@@ -43,55 +43,54 @@
43
43
  line-height: 1.6;
44
44
  white-space: nowrap;
45
45
  /* 定位由 left/top 精确计算(含水平 clamp 与垂直翻转) */
46
- /* 位置变化平滑过渡:鼠标停下后 tooltip 滑过去,而非实时紧跟 */
47
- transition:
48
- left 0.25s cubic-bezier(0.22, 1, 0.36, 1),
49
- top 0.25s cubic-bezier(0.22, 1, 0.36, 1);
46
+ /* 位置变化平滑过渡:鼠标停下后 tooltip 滑过去,而非实时紧跟(时长曲线见 interactions.js) */
47
+ cursor: default;
48
+ transition: var(--ev-tooltip-pos-transition);
50
49
  will-change: left, top;
51
50
  }
52
51
 
53
52
  /* tooltip 淡入淡出(仅 opacity,位置由 left/top transition 负责) */
54
- .ev-chart-tooltip-enter-active[data-v-0c5d944e],
55
- .ev-chart-tooltip-leave-active[data-v-0c5d944e] {
56
- transition: opacity 0.18s ease;
53
+ .ev-chart-tooltip-enter-active[data-v-04ce6a3d],
54
+ .ev-chart-tooltip-leave-active[data-v-04ce6a3d] {
55
+ transition: var(--ev-tooltip-fade-transition);
57
56
  }
58
57
 
59
58
  /* 进入期间禁用位置 transition,避免首次出现时从旧位置滑入 */
60
- .ev-chart-tooltip-enter-active[data-v-0c5d944e] {
59
+ .ev-chart-tooltip-enter-active[data-v-04ce6a3d] {
61
60
  transition:
62
- opacity 0.18s ease,
61
+ var(--ev-tooltip-fade-transition),
63
62
  left 0s,
64
63
  top 0s;
65
64
  }
66
- .ev-chart-tooltip-enter-from[data-v-0c5d944e],
67
- .ev-chart-tooltip-leave-to[data-v-0c5d944e] {
65
+ .ev-chart-tooltip-enter-from[data-v-04ce6a3d],
66
+ .ev-chart-tooltip-leave-to[data-v-04ce6a3d] {
68
67
  opacity: 0;
69
68
  }
70
69
 
71
70
  /* v-html 注入的内容不带 scoped 属性,需用 :deep() 穿透 */
72
- [data-v-0c5d944e] .ev-chart__tooltip-title {
71
+ [data-v-04ce6a3d] .ev-chart__tooltip-title {
73
72
  color: var(--ev-text-color-secondary, #6b7280);
74
73
  font-size: 12px;
75
74
  margin-bottom: 6px;
76
75
  font-weight: 500;
77
76
  }
78
- [data-v-0c5d944e] .ev-chart__tooltip-item {
77
+ [data-v-04ce6a3d] .ev-chart__tooltip-item {
79
78
  display: flex;
80
79
  align-items: center;
81
80
  gap: 8px;
82
81
  padding: 2px 0;
83
82
  }
84
- [data-v-0c5d944e] .ev-chart__tooltip-dot {
83
+ [data-v-04ce6a3d] .ev-chart__tooltip-dot {
85
84
  width: 8px;
86
85
  height: 8px;
87
86
  border-radius: 50%;
88
87
  flex-shrink: 0;
89
88
  display: inline-block;
90
89
  }
91
- [data-v-0c5d944e] .ev-chart__tooltip-name {
90
+ [data-v-04ce6a3d] .ev-chart__tooltip-name {
92
91
  color: var(--ev-text-color-primary, #111827);
93
92
  }
94
- [data-v-0c5d944e] .ev-chart__tooltip-value {
93
+ [data-v-04ce6a3d] .ev-chart__tooltip-value {
95
94
  color: var(--ev-text-color-primary, #111827);
96
95
  font-weight: 600;
97
96
  margin-left: auto;
@@ -100,7 +99,7 @@
100
99
  }
101
100
 
102
101
  /* ══════ 空数据占位 ══════ */
103
- .ev-chart__empty[data-v-0c5d944e] {
102
+ .ev-chart__empty[data-v-04ce6a3d] {
104
103
  position: absolute;
105
104
  inset: 0;
106
105
  border-radius: inherit;
@@ -113,7 +112,7 @@
113
112
  gap: 14px;
114
113
  user-select: none;
115
114
  }
116
- .ev-chart__empty-icon-wrap[data-v-0c5d944e] {
115
+ .ev-chart__empty-icon-wrap[data-v-04ce6a3d] {
117
116
  display: flex;
118
117
  align-items: center;
119
118
  justify-content: center;
@@ -122,19 +121,19 @@
122
121
  border-radius: 16px;
123
122
  background: var(--ev-fill-color-light, #f5f7fa);
124
123
  }
125
- .ev-chart__empty-img[data-v-0c5d944e] {
124
+ .ev-chart__empty-img[data-v-04ce6a3d] {
126
125
  width: 32px;
127
126
  height: 32px;
128
127
  opacity: 0.4;
129
128
  }
130
- .ev-chart__empty-text[data-v-0c5d944e] {
129
+ .ev-chart__empty-text[data-v-04ce6a3d] {
131
130
  letter-spacing: 0.04em;
132
131
  font-weight: 500;
133
132
  font-size: 13px;
134
133
  }
135
134
 
136
135
  /* ══════ 加载中骨架 ══════ */
137
- .ev-chart__loading[data-v-0c5d944e] {
136
+ .ev-chart__loading[data-v-04ce6a3d] {
138
137
  position: absolute;
139
138
  inset: 0;
140
139
  border-radius: inherit;
@@ -143,20 +142,20 @@
143
142
  justify-content: center;
144
143
  background: var(--ev-bg-color, #ffffff);
145
144
  }
146
- .ev-chart__loading-bars[data-v-0c5d944e] {
145
+ .ev-chart__loading-bars[data-v-04ce6a3d] {
147
146
  display: flex;
148
147
  align-items: flex-end;
149
148
  gap: 6px;
150
149
  height: 60px;
151
150
  }
152
- .ev-chart__loading-bar[data-v-0c5d944e] {
151
+ .ev-chart__loading-bar[data-v-04ce6a3d] {
153
152
  width: 10px;
154
153
  height: 40px;
155
154
  border-radius: 4px;
156
155
  background: var(--ev-border-color, #e2e8f0);
157
- animation: ev-chart-shimmer-0c5d944e 1.2s ease-in-out infinite;
156
+ animation: ev-chart-shimmer-04ce6a3d 1.2s ease-in-out infinite;
158
157
  }
159
- @keyframes ev-chart-shimmer-0c5d944e {
158
+ @keyframes ev-chart-shimmer-04ce6a3d {
160
159
  0%,
161
160
  100% {
162
161
  transform: scaleY(0.4);
@@ -169,7 +168,7 @@
169
168
  }
170
169
 
171
170
  /* ══════ 错误边界 ══════ */
172
- .ev-chart__error[data-v-0c5d944e] {
171
+ .ev-chart__error[data-v-04ce6a3d] {
173
172
  position: absolute;
174
173
  inset: 0;
175
174
  border-radius: inherit;
@@ -183,13 +182,13 @@
183
182
  padding: 20px;
184
183
  text-align: center;
185
184
  }
186
- .ev-chart__error-icon[data-v-0c5d944e] {
185
+ .ev-chart__error-icon[data-v-04ce6a3d] {
187
186
  display: flex;
188
187
  align-items: center;
189
188
  justify-content: center;
190
189
  font-size: 30px;
191
190
  }
192
- .ev-chart__error-text[data-v-0c5d944e] {
191
+ .ev-chart__error-text[data-v-04ce6a3d] {
193
192
  font-size: 12px;
194
193
  line-height: 1.5;
195
194
  max-width: 80%;
@@ -197,17 +196,17 @@
197
196
  }
198
197
 
199
198
  /* ══════ 进入/离开淡入淡出 ══════ */
200
- .ev-chart-fade-enter-active[data-v-0c5d944e],
201
- .ev-chart-fade-leave-active[data-v-0c5d944e] {
199
+ .ev-chart-fade-enter-active[data-v-04ce6a3d],
200
+ .ev-chart-fade-leave-active[data-v-04ce6a3d] {
202
201
  transition: opacity 0.2s ease;
203
202
  }
204
- .ev-chart-fade-enter-from[data-v-0c5d944e],
205
- .ev-chart-fade-leave-to[data-v-0c5d944e] {
203
+ .ev-chart-fade-enter-from[data-v-04ce6a3d],
204
+ .ev-chart-fade-leave-to[data-v-04ce6a3d] {
206
205
  opacity: 0;
207
206
  }
208
207
 
209
208
  /* ══════ 无障碍:sr-only ══════ */
210
- .ev-chart__sr-only[data-v-0c5d944e] {
209
+ .ev-chart__sr-only[data-v-04ce6a3d] {
211
210
  position: absolute;
212
211
  width: 1px;
213
212
  height: 1px;