@wil-works/evoke-charts 0.6.0 → 0.7.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-B5Fk3lBQ.js";
2
- export { SPEC_EXAMPLES, SPEC_RULES, buildChartPrompt, chartOptionsSchema, detectIntent, formatExamples, generateChartSpec, inferColumns, lintChartSpec, looksLikeTime, parseDataTable, parseNumeric, validateOptions };
1
+ import { _ as chartOptionsSchema, a as formatExamples, c as detectIntent, d as planThreed, f as wantsThreed, g as parseNumeric, h as parseDataTable, i as SPEC_EXAMPLES_3D, l as generateChartSpec, m as looksLikeTime, n as buildChartPrompt, o as formatExamples3d, p as inferColumns, r as SPEC_EXAMPLES, s as SPEC_RULES, t as lintChartSpec, u as SPEC_RULES_3D, v as validateOptions } from "./ai-cRi95pS2.js";
2
+ export { SPEC_EXAMPLES, SPEC_EXAMPLES_3D, SPEC_RULES, SPEC_RULES_3D, buildChartPrompt, chartOptionsSchema, detectIntent, formatExamples, formatExamples3d, generateChartSpec, inferColumns, lintChartSpec, looksLikeTime, parseDataTable, parseNumeric, planThreed, validateOptions, wantsThreed };
@@ -1,5 +1,165 @@
1
1
 
2
- .ev-chart[data-v-62da63e1] {
2
+ .ev-chart3d[data-v-36ccea38] {
3
+ --ev-chart3d-surface: var(--ev-bg-color-overlay, #ffffff);
4
+ --ev-chart3d-text: var(--ev-text-color-primary, #1f2937);
5
+ --ev-chart3d-text-secondary: var(--ev-text-color-secondary, #6b7280);
6
+ --ev-chart3d-border: var(--ev-border-color, rgba(31, 41, 55, 0.16));
7
+ --ev-chart3d-fill: var(--ev-fill-color-light, rgba(31, 41, 55, 0.05));
8
+ position: relative;
9
+ overflow: hidden;
10
+ font-family: var(--ev-font-family, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif);
11
+ }
12
+ .ev-chart3d__canvas[data-v-36ccea38] {
13
+ display: block;
14
+ width: 100%;
15
+ height: 100%;
16
+ touch-action: none;
17
+ cursor: grab;
18
+ }
19
+ .ev-chart3d__canvas[data-v-36ccea38]:active {
20
+ cursor: grabbing;
21
+ }
22
+ .ev-chart3d__overlay[data-v-36ccea38] {
23
+ position: absolute;
24
+ inset: 0;
25
+ pointer-events: none;
26
+ }
27
+ .ev-chart3d__empty[data-v-36ccea38],
28
+ .ev-chart3d__loading[data-v-36ccea38],
29
+ .ev-chart3d__error[data-v-36ccea38] {
30
+ position: absolute;
31
+ inset: 0;
32
+ display: flex;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ justify-content: center;
36
+ gap: 8px;
37
+ }
38
+ .ev-chart3d__empty-icon-wrap[data-v-36ccea38] {
39
+ width: 52px;
40
+ height: 52px;
41
+ border-radius: 50%;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ background: var(--ev-chart3d-fill);
46
+ color: var(--ev-chart3d-text-secondary);
47
+ }
48
+ .ev-chart3d__empty-img[data-v-36ccea38] {
49
+ width: 26px;
50
+ height: 26px;
51
+ }
52
+ .ev-chart3d__empty-text[data-v-36ccea38] {
53
+ font-size: 12px;
54
+ color: var(--ev-chart3d-text-secondary);
55
+ }
56
+ .ev-chart3d__loading-bars[data-v-36ccea38] {
57
+ display: flex;
58
+ align-items: flex-end;
59
+ gap: 5px;
60
+ height: 34px;
61
+ }
62
+ .ev-chart3d__loading-bar[data-v-36ccea38] {
63
+ width: 6px;
64
+ border-radius: 3px;
65
+ background: var(--ev-chart3d-border);
66
+ animation: ev-chart3d-shimmer-36ccea38 1.1s ease-in-out infinite;
67
+ }
68
+ .ev-chart3d__error[data-v-36ccea38] {
69
+ color: var(--ev-color-danger, #dc2626);
70
+ font-size: 12px;
71
+ }
72
+ .ev-chart3d__error-icon[data-v-36ccea38] {
73
+ font-size: 22px;
74
+ display: inline-flex;
75
+ }
76
+ .ev-chart3d__tooltip[data-v-36ccea38] {
77
+ position: absolute;
78
+ z-index: 20;
79
+ max-width: 260px;
80
+ padding: 8px 10px;
81
+ border-radius: 8px;
82
+ background: var(--ev-chart3d-surface);
83
+ border: 1px solid var(--ev-chart3d-border);
84
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
85
+ pointer-events: none;
86
+ font-size: 12px;
87
+ line-height: 1.5;
88
+ color: var(--ev-chart3d-text);
89
+ }
90
+ .ev-chart3d__tooltip-title[data-v-36ccea38] {
91
+ font-weight: 600;
92
+ margin-bottom: 4px;
93
+ }
94
+ .ev-chart3d__tooltip-item[data-v-36ccea38] {
95
+ display: flex;
96
+ align-items: center;
97
+ gap: 6px;
98
+ }
99
+ .ev-chart3d__tooltip-dot[data-v-36ccea38] {
100
+ width: 8px;
101
+ height: 8px;
102
+ border-radius: 50%;
103
+ flex: none;
104
+ }
105
+ .ev-chart3d__tooltip-name[data-v-36ccea38] {
106
+ color: var(--ev-chart3d-text-secondary);
107
+ margin-right: auto;
108
+ }
109
+ .ev-chart3d__tooltip-value[data-v-36ccea38] {
110
+ font-variant-numeric: tabular-nums;
111
+ font-weight: 500;
112
+ }
113
+ .ev-chart3d__sr-only[data-v-36ccea38] {
114
+ position: absolute;
115
+ width: 1px;
116
+ height: 1px;
117
+ padding: 0;
118
+ margin: -1px;
119
+ overflow: hidden;
120
+ clip: rect(0, 0, 0, 0);
121
+ white-space: nowrap;
122
+ border: 0;
123
+ }
124
+ .ev-chart3d-fade-enter-active[data-v-36ccea38],
125
+ .ev-chart3d-fade-leave-active[data-v-36ccea38] {
126
+ transition: opacity 0.24s ease;
127
+ }
128
+ .ev-chart3d-fade-enter-from[data-v-36ccea38],
129
+ .ev-chart3d-fade-leave-to[data-v-36ccea38] {
130
+ opacity: 0;
131
+ }
132
+ .ev-chart3d-tooltip-enter-active[data-v-36ccea38],
133
+ .ev-chart3d-tooltip-leave-active[data-v-36ccea38] {
134
+ transition: opacity 0.16s ease;
135
+ }
136
+ .ev-chart3d-tooltip-enter-from[data-v-36ccea38],
137
+ .ev-chart3d-tooltip-leave-to[data-v-36ccea38] {
138
+ opacity: 0;
139
+ }
140
+ @keyframes ev-chart3d-shimmer-36ccea38 {
141
+ 0%, 100% { height: 10px; opacity: 0.55;
142
+ }
143
+ 50% { height: 30px; opacity: 1;
144
+ }
145
+ }
146
+
147
+ /* 暗色覆盖(与生态一致:html.dark 为准) */
148
+ html.dark .ev-chart3d__tooltip {
149
+ background: var(--ev-bg-color-overlay, #1f2937);
150
+ border-color: var(--ev-border-color, rgba(229, 231, 235, 0.2));
151
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
152
+ color: var(--ev-text-color-primary, #e5e7eb);
153
+ }
154
+ html.dark .ev-chart3d {
155
+ --ev-chart3d-surface: var(--ev-bg-color-overlay, #1f2937);
156
+ --ev-chart3d-text: var(--ev-text-color-primary, #e5e7eb);
157
+ --ev-chart3d-text-secondary: var(--ev-text-color-secondary, #9ca3af);
158
+ --ev-chart3d-border: var(--ev-border-color, rgba(229, 231, 235, 0.2));
159
+ --ev-chart3d-fill: var(--ev-fill-color-dark, rgba(229, 231, 235, 0.08));
160
+ }
161
+
162
+ .ev-chart[data-v-af1c6d5e] {
3
163
  position: relative;
4
164
  /* 容器不带边框:是否加框、加多粗由宿主决定,图表只负责内容;
5
165
  圆角裁剪下沉到 canvas 与浮层自身(border-radius: inherit) */
@@ -9,13 +169,13 @@
9
169
  }
10
170
 
11
171
  /* 键盘可达(DESIGN §13.7 期 1):容器可聚焦,焦点环贴内缘不裁切 */
12
- .ev-chart[data-v-62da63e1]:focus-visible {
172
+ .ev-chart[data-v-af1c6d5e]:focus-visible {
13
173
  outline: 2px solid var(--ev-color-primary, #175dff);
14
174
  outline-offset: -2px;
15
175
  }
16
176
 
17
177
  /* 关键:canvas 必须能接收鼠标事件 */
18
- .ev-chart__canvas[data-v-62da63e1] {
178
+ .ev-chart__canvas[data-v-af1c6d5e] {
19
179
  position: absolute;
20
180
  top: 0;
21
181
  left: 0;
@@ -29,14 +189,14 @@
29
189
 
30
190
  /* HTML 覆盖层:只在内容层,不与 canvas 抢交互(子元素可自行 pointer-events:auto),
31
191
  也不压过 tooltip(z-index 100) */
32
- .ev-chart__overlay[data-v-62da63e1] {
192
+ .ev-chart__overlay[data-v-af1c6d5e] {
33
193
  position: absolute;
34
194
  inset: 0;
35
195
  z-index: 1;
36
196
  pointer-events: none;
37
197
  border-radius: inherit;
38
198
  }
39
- .ev-chart__tooltip[data-v-62da63e1] {
199
+ .ev-chart__tooltip[data-v-af1c6d5e] {
40
200
  position: absolute;
41
201
  pointer-events: none;
42
202
  z-index: 100;
@@ -56,47 +216,47 @@
56
216
  }
57
217
 
58
218
  /* tooltip 淡入淡出(仅 opacity,位置由 left/top transition 负责) */
59
- .ev-chart-tooltip-enter-active[data-v-62da63e1],
60
- .ev-chart-tooltip-leave-active[data-v-62da63e1] {
219
+ .ev-chart-tooltip-enter-active[data-v-af1c6d5e],
220
+ .ev-chart-tooltip-leave-active[data-v-af1c6d5e] {
61
221
  transition: var(--ev-tooltip-fade-transition);
62
222
  }
63
223
 
64
224
  /* 进入期间禁用位置 transition,避免首次出现时从旧位置滑入 */
65
- .ev-chart-tooltip-enter-active[data-v-62da63e1] {
225
+ .ev-chart-tooltip-enter-active[data-v-af1c6d5e] {
66
226
  transition:
67
227
  var(--ev-tooltip-fade-transition),
68
228
  left 0s,
69
229
  top 0s;
70
230
  }
71
- .ev-chart-tooltip-enter-from[data-v-62da63e1],
72
- .ev-chart-tooltip-leave-to[data-v-62da63e1] {
231
+ .ev-chart-tooltip-enter-from[data-v-af1c6d5e],
232
+ .ev-chart-tooltip-leave-to[data-v-af1c6d5e] {
73
233
  opacity: 0;
74
234
  }
75
235
 
76
236
  /* v-html 注入的内容不带 scoped 属性,需用 :deep() 穿透 */
77
- [data-v-62da63e1] .ev-chart__tooltip-title {
237
+ [data-v-af1c6d5e] .ev-chart__tooltip-title {
78
238
  color: var(--ev-text-color-secondary, #6b7280);
79
239
  font-size: 12px;
80
240
  margin-bottom: 6px;
81
241
  font-weight: 500;
82
242
  }
83
- [data-v-62da63e1] .ev-chart__tooltip-item {
243
+ [data-v-af1c6d5e] .ev-chart__tooltip-item {
84
244
  display: flex;
85
245
  align-items: center;
86
246
  gap: 8px;
87
247
  padding: 2px 0;
88
248
  }
89
- [data-v-62da63e1] .ev-chart__tooltip-dot {
249
+ [data-v-af1c6d5e] .ev-chart__tooltip-dot {
90
250
  width: 8px;
91
251
  height: 8px;
92
252
  border-radius: 50%;
93
253
  flex-shrink: 0;
94
254
  display: inline-block;
95
255
  }
96
- [data-v-62da63e1] .ev-chart__tooltip-name {
256
+ [data-v-af1c6d5e] .ev-chart__tooltip-name {
97
257
  color: var(--ev-text-color-primary, #111827);
98
258
  }
99
- [data-v-62da63e1] .ev-chart__tooltip-value {
259
+ [data-v-af1c6d5e] .ev-chart__tooltip-value {
100
260
  color: var(--ev-text-color-primary, #111827);
101
261
  font-weight: 600;
102
262
  margin-left: auto;
@@ -105,7 +265,7 @@
105
265
  }
106
266
 
107
267
  /* ══════ 空数据占位 ══════ */
108
- .ev-chart__empty[data-v-62da63e1] {
268
+ .ev-chart__empty[data-v-af1c6d5e] {
109
269
  position: absolute;
110
270
  inset: 0;
111
271
  border-radius: inherit;
@@ -118,7 +278,7 @@
118
278
  gap: 14px;
119
279
  user-select: none;
120
280
  }
121
- .ev-chart__empty-icon-wrap[data-v-62da63e1] {
281
+ .ev-chart__empty-icon-wrap[data-v-af1c6d5e] {
122
282
  display: flex;
123
283
  align-items: center;
124
284
  justify-content: center;
@@ -127,19 +287,19 @@
127
287
  border-radius: 16px;
128
288
  background: var(--ev-fill-color-light, #f5f7fa);
129
289
  }
130
- .ev-chart__empty-img[data-v-62da63e1] {
290
+ .ev-chart__empty-img[data-v-af1c6d5e] {
131
291
  width: 32px;
132
292
  height: 32px;
133
293
  opacity: 0.4;
134
294
  }
135
- .ev-chart__empty-text[data-v-62da63e1] {
295
+ .ev-chart__empty-text[data-v-af1c6d5e] {
136
296
  letter-spacing: 0.04em;
137
297
  font-weight: 500;
138
298
  font-size: 13px;
139
299
  }
140
300
 
141
301
  /* ══════ 加载中骨架 ══════ */
142
- .ev-chart__loading[data-v-62da63e1] {
302
+ .ev-chart__loading[data-v-af1c6d5e] {
143
303
  position: absolute;
144
304
  inset: 0;
145
305
  border-radius: inherit;
@@ -148,20 +308,20 @@
148
308
  justify-content: center;
149
309
  background: var(--ev-bg-color, #ffffff);
150
310
  }
151
- .ev-chart__loading-bars[data-v-62da63e1] {
311
+ .ev-chart__loading-bars[data-v-af1c6d5e] {
152
312
  display: flex;
153
313
  align-items: flex-end;
154
314
  gap: 6px;
155
315
  height: 60px;
156
316
  }
157
- .ev-chart__loading-bar[data-v-62da63e1] {
317
+ .ev-chart__loading-bar[data-v-af1c6d5e] {
158
318
  width: 10px;
159
319
  height: 40px;
160
320
  border-radius: 4px;
161
321
  background: var(--ev-border-color, #e2e8f0);
162
- animation: ev-chart-shimmer-62da63e1 1.2s ease-in-out infinite;
322
+ animation: ev-chart-shimmer-af1c6d5e 1.2s ease-in-out infinite;
163
323
  }
164
- @keyframes ev-chart-shimmer-62da63e1 {
324
+ @keyframes ev-chart-shimmer-af1c6d5e {
165
325
  0%,
166
326
  100% {
167
327
  transform: scaleY(0.4);
@@ -174,7 +334,7 @@
174
334
  }
175
335
 
176
336
  /* ══════ 错误边界 ══════ */
177
- .ev-chart__error[data-v-62da63e1] {
337
+ .ev-chart__error[data-v-af1c6d5e] {
178
338
  position: absolute;
179
339
  inset: 0;
180
340
  border-radius: inherit;
@@ -188,13 +348,13 @@
188
348
  padding: 20px;
189
349
  text-align: center;
190
350
  }
191
- .ev-chart__error-icon[data-v-62da63e1] {
351
+ .ev-chart__error-icon[data-v-af1c6d5e] {
192
352
  display: flex;
193
353
  align-items: center;
194
354
  justify-content: center;
195
355
  font-size: 30px;
196
356
  }
197
- .ev-chart__error-text[data-v-62da63e1] {
357
+ .ev-chart__error-text[data-v-af1c6d5e] {
198
358
  font-size: 12px;
199
359
  line-height: 1.5;
200
360
  max-width: 80%;
@@ -202,17 +362,17 @@
202
362
  }
203
363
 
204
364
  /* ══════ 进入/离开淡入淡出 ══════ */
205
- .ev-chart-fade-enter-active[data-v-62da63e1],
206
- .ev-chart-fade-leave-active[data-v-62da63e1] {
365
+ .ev-chart-fade-enter-active[data-v-af1c6d5e],
366
+ .ev-chart-fade-leave-active[data-v-af1c6d5e] {
207
367
  transition: opacity 0.2s ease;
208
368
  }
209
- .ev-chart-fade-enter-from[data-v-62da63e1],
210
- .ev-chart-fade-leave-to[data-v-62da63e1] {
369
+ .ev-chart-fade-enter-from[data-v-af1c6d5e],
370
+ .ev-chart-fade-leave-to[data-v-af1c6d5e] {
211
371
  opacity: 0;
212
372
  }
213
373
 
214
374
  /* ══════ 无障碍:sr-only ══════ */
215
- .ev-chart__sr-only[data-v-62da63e1] {
375
+ .ev-chart__sr-only[data-v-af1c6d5e] {
216
376
  position: absolute;
217
377
  width: 1px;
218
378
  height: 1px;