@sentropic/design-system-svelte 0.34.0 → 0.34.21

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.
Files changed (112) hide show
  1. package/dist/AppChrome.svelte +660 -0
  2. package/dist/AppChrome.svelte.d.ts +74 -0
  3. package/dist/AppChrome.svelte.d.ts.map +1 -0
  4. package/dist/AppChrome.test.d.ts +2 -0
  5. package/dist/AppChrome.test.d.ts.map +1 -0
  6. package/dist/AppChrome.test.js +122 -0
  7. package/dist/AppHeader.svelte +159 -1
  8. package/dist/AppHeader.svelte.d.ts +18 -1
  9. package/dist/AppHeader.svelte.d.ts.map +1 -1
  10. package/dist/ArcDiagramChart.svelte +380 -0
  11. package/dist/ArcDiagramChart.svelte.d.ts +43 -0
  12. package/dist/ArcDiagramChart.svelte.d.ts.map +1 -0
  13. package/dist/AreaRangeChart.svelte +487 -0
  14. package/dist/AreaRangeChart.svelte.d.ts +38 -0
  15. package/dist/AreaRangeChart.svelte.d.ts.map +1 -0
  16. package/dist/AreaSplineRangeChart.svelte +478 -0
  17. package/dist/AreaSplineRangeChart.svelte.d.ts +37 -0
  18. package/dist/AreaSplineRangeChart.svelte.d.ts.map +1 -0
  19. package/dist/BellCurveChart.svelte +487 -0
  20. package/dist/BellCurveChart.svelte.d.ts +40 -0
  21. package/dist/BellCurveChart.svelte.d.ts.map +1 -0
  22. package/dist/Calendar.svelte +11 -0
  23. package/dist/ChatThread.svelte +32 -1
  24. package/dist/ChatThread.svelte.d.ts +14 -0
  25. package/dist/ChatThread.svelte.d.ts.map +1 -1
  26. package/dist/ColumnPyramidChart.svelte +332 -0
  27. package/dist/ColumnPyramidChart.svelte.d.ts +35 -0
  28. package/dist/ColumnPyramidChart.svelte.d.ts.map +1 -0
  29. package/dist/ColumnRangeChart.svelte +432 -0
  30. package/dist/ColumnRangeChart.svelte.d.ts +42 -0
  31. package/dist/ColumnRangeChart.svelte.d.ts.map +1 -0
  32. package/dist/Combobox.svelte +3 -0
  33. package/dist/ConfigItemCard.svelte +303 -0
  34. package/dist/ConfigItemCard.svelte.d.ts +37 -0
  35. package/dist/ConfigItemCard.svelte.d.ts.map +1 -0
  36. package/dist/ContentSwitcher.svelte +1 -1
  37. package/dist/DatePicker.svelte +3 -0
  38. package/dist/DependencyWheelChart.svelte +413 -0
  39. package/dist/DependencyWheelChart.svelte.d.ts +42 -0
  40. package/dist/DependencyWheelChart.svelte.d.ts.map +1 -0
  41. package/dist/DumbbellChart.svelte +403 -0
  42. package/dist/DumbbellChart.svelte.d.ts +44 -0
  43. package/dist/DumbbellChart.svelte.d.ts.map +1 -0
  44. package/dist/ErrorBarChart.svelte +428 -0
  45. package/dist/ErrorBarChart.svelte.d.ts +40 -0
  46. package/dist/ErrorBarChart.svelte.d.ts.map +1 -0
  47. package/dist/FieldCard.svelte +220 -0
  48. package/dist/FieldCard.svelte.d.ts +28 -0
  49. package/dist/FieldCard.svelte.d.ts.map +1 -0
  50. package/dist/GanttChart.svelte +410 -0
  51. package/dist/GanttChart.svelte.d.ts +39 -0
  52. package/dist/GanttChart.svelte.d.ts.map +1 -0
  53. package/dist/HLCChart.svelte +330 -0
  54. package/dist/HLCChart.svelte.d.ts +32 -0
  55. package/dist/HLCChart.svelte.d.ts.map +1 -0
  56. package/dist/HeikinAshiChart.svelte +365 -0
  57. package/dist/HeikinAshiChart.svelte.d.ts +37 -0
  58. package/dist/HeikinAshiChart.svelte.d.ts.map +1 -0
  59. package/dist/HollowCandlestickChart.svelte +357 -0
  60. package/dist/HollowCandlestickChart.svelte.d.ts +34 -0
  61. package/dist/HollowCandlestickChart.svelte.d.ts.map +1 -0
  62. package/dist/Input.svelte +3 -0
  63. package/dist/ItemChart.svelte +389 -0
  64. package/dist/ItemChart.svelte.d.ts +67 -0
  65. package/dist/ItemChart.svelte.d.ts.map +1 -0
  66. package/dist/LollipopChart.svelte +1 -1
  67. package/dist/MultiSelect.svelte +3 -0
  68. package/dist/NumberInput.svelte +3 -0
  69. package/dist/OHLCChart.svelte +343 -0
  70. package/dist/OHLCChart.svelte.d.ts +33 -0
  71. package/dist/OHLCChart.svelte.d.ts.map +1 -0
  72. package/dist/OrganizationChart.svelte +284 -0
  73. package/dist/OrganizationChart.svelte.d.ts +19 -0
  74. package/dist/OrganizationChart.svelte.d.ts.map +1 -0
  75. package/dist/PasswordInput.svelte +3 -0
  76. package/dist/PolygonChart.svelte +189 -0
  77. package/dist/PolygonChart.svelte.d.ts +17 -0
  78. package/dist/PolygonChart.svelte.d.ts.map +1 -0
  79. package/dist/ScoreCard.svelte +172 -0
  80. package/dist/ScoreCard.svelte.d.ts +27 -0
  81. package/dist/ScoreCard.svelte.d.ts.map +1 -0
  82. package/dist/Search.svelte +7 -5
  83. package/dist/Select.svelte +3 -0
  84. package/dist/StreamgraphChart.svelte +283 -0
  85. package/dist/StreamgraphChart.svelte.d.ts +23 -0
  86. package/dist/StreamgraphChart.svelte.d.ts.map +1 -0
  87. package/dist/StreamingMessage.svelte +44 -2
  88. package/dist/StreamingMessage.svelte.d.ts +18 -1
  89. package/dist/StreamingMessage.svelte.d.ts.map +1 -1
  90. package/dist/TileMapChart.svelte +314 -0
  91. package/dist/TileMapChart.svelte.d.ts +45 -0
  92. package/dist/TileMapChart.svelte.d.ts.map +1 -0
  93. package/dist/TimePicker.svelte +3 -0
  94. package/dist/TimelineChart.svelte +362 -0
  95. package/dist/TimelineChart.svelte.d.ts +22 -0
  96. package/dist/TimelineChart.svelte.d.ts.map +1 -0
  97. package/dist/TreegraphChart.svelte +281 -0
  98. package/dist/TreegraphChart.svelte.d.ts +19 -0
  99. package/dist/TreegraphChart.svelte.d.ts.map +1 -0
  100. package/dist/VariablePieChart.svelte +313 -0
  101. package/dist/VariablePieChart.svelte.d.ts +52 -0
  102. package/dist/VariablePieChart.svelte.d.ts.map +1 -0
  103. package/dist/VennChart.svelte +348 -0
  104. package/dist/VennChart.svelte.d.ts +72 -0
  105. package/dist/VennChart.svelte.d.ts.map +1 -0
  106. package/dist/WordCloudChart.svelte +279 -0
  107. package/dist/WordCloudChart.svelte.d.ts +18 -0
  108. package/dist/WordCloudChart.svelte.d.ts.map +1 -0
  109. package/dist/index.d.ts +56 -0
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +28 -0
  112. package/package.json +5 -3
@@ -0,0 +1,478 @@
1
+ <script lang="ts" module>
2
+ /**
3
+ * AreaSplineRangeChart — variante spline d'AreaRange : bande remplie entre une
4
+ * série BASSE et une série HAUTE le long d'un axe X continu, dont les contours
5
+ * HAUT et BAS sont TOUJOURS lissés (bords courbes). API canonique (référence
6
+ * Svelte ; React/Vue s'alignent).
7
+ *
8
+ * Props obligatoires :
9
+ * data AreaSplineRangeChartDatum[] - tableau {x, low, high}
10
+ * label string - aria-label du graphique
11
+ *
12
+ * Props optionnelles :
13
+ * tone "category1".."category8" (défaut "category1")
14
+ * width number (défaut 480)
15
+ * height number (défaut 240)
16
+ * class string
17
+ *
18
+ * Le tracé `.st-areaSplineRangeChart__area` ferme la bande : ligne HAUTE lissée
19
+ * (sens direct) puis ligne BASSE lissée (sens inverse) puis `Z`.
20
+ */
21
+ export type AreaSplineRangeChartTone =
22
+ | "category1"
23
+ | "category2"
24
+ | "category3"
25
+ | "category4"
26
+ | "category5"
27
+ | "category6"
28
+ | "category7"
29
+ | "category8";
30
+
31
+ export type AreaSplineRangeChartDatum = {
32
+ x: number | string;
33
+ low: number;
34
+ high: number;
35
+ };
36
+ </script>
37
+
38
+ <script lang="ts">
39
+ import ChartDataList from "./ChartDataList.svelte";
40
+
41
+ type AreaSplineRangeChartProps = {
42
+ data: AreaSplineRangeChartDatum[];
43
+ width?: number;
44
+ height?: number;
45
+ tone?: AreaSplineRangeChartTone;
46
+ label: string;
47
+ class?: string;
48
+ };
49
+
50
+ let {
51
+ data = [],
52
+ width = 480,
53
+ height = 240,
54
+ tone = "category1",
55
+ label,
56
+ class: className
57
+ }: AreaSplineRangeChartProps = $props();
58
+
59
+ const MARGIN = { top: 12, right: 16, bottom: 32, left: 44 };
60
+
61
+ function niceTicks(min: number, max: number, target = 5): number[] {
62
+ if (!Number.isFinite(min) || !Number.isFinite(max) || min === max) {
63
+ const base = Number.isFinite(max) ? max : 0;
64
+ return [base];
65
+ }
66
+ const range = max - min;
67
+ const rough = range / Math.max(target - 1, 1);
68
+ const pow = Math.pow(10, Math.floor(Math.log10(rough)));
69
+ const norm = rough / pow;
70
+ let step: number;
71
+ if (norm < 1.5) step = 1 * pow;
72
+ else if (norm < 3) step = 2 * pow;
73
+ else if (norm < 7) step = 5 * pow;
74
+ else step = 10 * pow;
75
+ const start = Math.floor(min / step) * step;
76
+ const end = Math.ceil(max / step) * step;
77
+ const ticks: number[] = [];
78
+ for (let v = start; v <= end + step / 2; v += step) {
79
+ ticks.push(Number(v.toFixed(10)));
80
+ }
81
+ return ticks;
82
+ }
83
+
84
+ function scaleLinear(v: number, d0: number, d1: number, r0: number, r1: number) {
85
+ if (d1 === d0) return r0;
86
+ return r0 + ((v - d0) * (r1 - r0)) / (d1 - d0);
87
+ }
88
+
89
+ function formatTick(v: number): string {
90
+ if (Math.abs(v) >= 1000) return `${(v / 1000).toFixed(v % 1000 === 0 ? 0 : 1)}k`;
91
+ if (Number.isInteger(v)) return String(v);
92
+ return v.toFixed(1);
93
+ }
94
+
95
+ function isNumeric(x: number | string): x is number {
96
+ return typeof x === "number" && Number.isFinite(x);
97
+ }
98
+
99
+ // Normalise un point : low/high finis, ordonnés (lo <= hi).
100
+ function normalize(d: AreaSplineRangeChartDatum): { lo: number; hi: number } | null {
101
+ if (!Number.isFinite(d.low) || !Number.isFinite(d.high)) return null;
102
+ return { lo: Math.min(d.low, d.high), hi: Math.max(d.low, d.high) };
103
+ }
104
+
105
+ // Données valides : low + high finis.
106
+ const validData = $derived(data.filter((d) => normalize(d) !== null));
107
+
108
+ const dataValueItems = $derived(
109
+ validData.map((d) => {
110
+ const r = normalize(d)!;
111
+ return `${d.x}: ${r.lo} – ${r.hi}`;
112
+ })
113
+ );
114
+
115
+ let hoveredIndex: number | null = $state(null);
116
+
117
+ const plotWidth = $derived(Math.max(width - MARGIN.left - MARGIN.right, 1));
118
+ const plotHeight = $derived(Math.max(height - MARGIN.top - MARGIN.bottom, 1));
119
+
120
+ const xDomain = $derived.by(() => {
121
+ if (validData.length === 0) return { kind: "ordinal" as const, values: [] as (number | string)[] };
122
+ const allNumeric = validData.every((d) => isNumeric(d.x));
123
+ if (allNumeric) {
124
+ const xs = validData.map((d) => d.x as number);
125
+ return { kind: "numeric" as const, min: Math.min(...xs), max: Math.max(...xs) };
126
+ }
127
+ return { kind: "ordinal" as const, values: validData.map((d) => d.x) };
128
+ });
129
+
130
+ const yTicks = $derived.by(() => {
131
+ if (validData.length === 0) return [0];
132
+ const lows = validData.map((d) => normalize(d)!.lo);
133
+ const highs = validData.map((d) => normalize(d)!.hi);
134
+ const minRaw = Math.min(...lows);
135
+ const maxRaw = Math.max(...highs);
136
+ const padded = (maxRaw - minRaw) * 0.08 || Math.max(Math.abs(maxRaw), 1) * 0.1;
137
+ return niceTicks(minRaw - padded, maxRaw + padded, 5);
138
+ });
139
+
140
+ const yDomain = $derived.by(() => {
141
+ if (yTicks.length === 0) return { min: 0, max: 1 };
142
+ return { min: yTicks[0], max: yTicks[yTicks.length - 1] };
143
+ });
144
+
145
+ const points = $derived.by(() => {
146
+ if (validData.length === 0) return [];
147
+ return validData.map((d, i) => {
148
+ let x: number;
149
+ if (xDomain.kind === "numeric") {
150
+ x = scaleLinear(d.x as number, xDomain.min, xDomain.max, 0, plotWidth);
151
+ } else {
152
+ const denom = Math.max(validData.length - 1, 1);
153
+ x = validData.length === 1 ? plotWidth / 2 : (i / denom) * plotWidth;
154
+ }
155
+ const r = normalize(d)!;
156
+ const yLow = scaleLinear(r.lo, yDomain.min, yDomain.max, plotHeight, 0);
157
+ const yHigh = scaleLinear(r.hi, yDomain.min, yDomain.max, plotHeight, 0);
158
+ return {
159
+ x: MARGIN.left + x,
160
+ yLow: MARGIN.top + yLow,
161
+ yHigh: MARGIN.top + yHigh,
162
+ datum: d,
163
+ range: r,
164
+ index: i
165
+ };
166
+ });
167
+ });
168
+
169
+ function buildLinearPath(pts: { x: number; y: number }[]): string {
170
+ return pts.map((p, i) => `${i === 0 ? "M" : "L"}${p.x.toFixed(2)},${p.y.toFixed(2)}`).join(" ");
171
+ }
172
+
173
+ // Contour lissé via interpolation Catmull-Rom → Bézier cubique (spline TOUJOURS active).
174
+ function buildSmoothPath(pts: { x: number; y: number }[]): string {
175
+ if (pts.length < 2) return buildLinearPath(pts);
176
+ const t = 0.18;
177
+ let d = `M${pts[0].x.toFixed(2)},${pts[0].y.toFixed(2)}`;
178
+ for (let i = 0; i < pts.length - 1; i++) {
179
+ const p0 = pts[i - 1] ?? pts[i];
180
+ const p1 = pts[i];
181
+ const p2 = pts[i + 1];
182
+ const p3 = pts[i + 2] ?? p2;
183
+ const c1x = p1.x + (p2.x - p0.x) * t;
184
+ const c1y = p1.y + (p2.y - p0.y) * t;
185
+ const c2x = p2.x - (p3.x - p1.x) * t;
186
+ const c2y = p2.y - (p3.y - p1.y) * t;
187
+ d += ` C${c1x.toFixed(2)},${c1y.toFixed(2)} ${c2x.toFixed(2)},${c2y.toFixed(2)} ${p2.x.toFixed(2)},${p2.y.toFixed(2)}`;
188
+ }
189
+ return d;
190
+ }
191
+
192
+ // Continue un tracé existant le long de `pts` SANS `M` initial (la bande
193
+ // enchaîne ligne haute lissée puis ligne basse lissée inversée en un seul sous-tracé).
194
+ function continuePath(prefix: string, pts: { x: number; y: number }[]): string {
195
+ if (pts.length === 0) return prefix;
196
+ const full = buildSmoothPath(pts);
197
+ // Remplace le `M` de tête par `L` pour rester dans le même sous-tracé.
198
+ return `${prefix} L${full.slice(1)}`;
199
+ }
200
+
201
+ const highPath = $derived(
202
+ points.length === 0 ? "" : buildSmoothPath(points.map((p) => ({ x: p.x, y: p.yHigh })))
203
+ );
204
+
205
+ const lowPath = $derived(
206
+ points.length === 0 ? "" : buildSmoothPath(points.map((p) => ({ x: p.x, y: p.yLow })))
207
+ );
208
+
209
+ // Bande : ligne HAUTE lissée (gauche→droite) puis ligne BASSE lissée (droite→gauche) + Z.
210
+ const areaPath = $derived.by(() => {
211
+ if (points.length === 0) return "";
212
+ const lowReversed = [...points].reverse().map((p) => ({ x: p.x, y: p.yLow }));
213
+ return `${continuePath(highPath, lowReversed)} Z`;
214
+ });
215
+
216
+ const gridLines = $derived(
217
+ yTicks.map((tick) => ({
218
+ value: tick,
219
+ y: MARGIN.top + scaleLinear(tick, yDomain.min, yDomain.max, plotHeight, 0)
220
+ }))
221
+ );
222
+
223
+ const xTickEntries = $derived.by(() => {
224
+ if (validData.length === 0) return [];
225
+ if (xDomain.kind === "ordinal") {
226
+ return points.map((p, i) => ({ x: p.x, label: String(validData[i].x) }));
227
+ }
228
+ const target = Math.min(5, validData.length);
229
+ const stride = Math.max(1, Math.round((validData.length - 1) / (target - 1 || 1)));
230
+ const entries: { x: number; label: string }[] = [];
231
+ for (let i = 0; i < validData.length; i += stride) {
232
+ entries.push({ x: points[i].x, label: String(validData[i].x) });
233
+ }
234
+ const lastIdx = validData.length - 1;
235
+ if (entries[entries.length - 1]?.label !== String(validData[lastIdx].x)) {
236
+ entries.push({ x: points[lastIdx].x, label: String(validData[lastIdx].x) });
237
+ }
238
+ return entries;
239
+ });
240
+
241
+ function handleLeave() {
242
+ hoveredIndex = null;
243
+ }
244
+ function handleVisualPointerMove(event: PointerEvent) {
245
+ const target = event.target;
246
+ if (!(target instanceof Element)) {
247
+ hoveredIndex = null;
248
+ return;
249
+ }
250
+ const index = Number(target.getAttribute("data-chart-index"));
251
+ hoveredIndex = Number.isInteger(index) ? index : null;
252
+ }
253
+
254
+ // Identifiant de dégradé unique pour éviter les conflits multi-charts.
255
+ const gradientId = $derived.by(() => {
256
+ return `st-areasplinerangechart-gradient-${Math.random().toString(36).substring(2, 9)}`;
257
+ });
258
+
259
+ const classes = () =>
260
+ ["st-areaSplineRangeChart", `st-areaSplineRangeChart--${tone}`, className].filter(Boolean).join(" ");
261
+ </script>
262
+
263
+ <div class={classes()}>
264
+ <div
265
+ class="st-areaSplineRangeChart__visual"
266
+ role="img"
267
+ aria-label={label}
268
+ onpointermove={handleVisualPointerMove}
269
+ onpointerleave={handleLeave}
270
+ >
271
+ <svg
272
+ viewBox="0 0 {width} {height}"
273
+ preserveAspectRatio="xMidYMid meet"
274
+ width="100%"
275
+ height="100%"
276
+ focusable="false"
277
+ aria-hidden="true"
278
+ >
279
+ <defs>
280
+ <linearGradient id={gradientId} x1="0" y1="0" x2="0" y2="1">
281
+ <stop offset="0%" stop-color="currentColor" stop-opacity="0.32" />
282
+ <stop offset="100%" stop-color="currentColor" stop-opacity="0.12" />
283
+ </linearGradient>
284
+ </defs>
285
+
286
+ <!-- gridlines + Y axis ticks -->
287
+ {#each gridLines as g (g.value)}
288
+ <line
289
+ class="st-areaSplineRangeChart__grid"
290
+ x1={MARGIN.left}
291
+ x2={width - MARGIN.right}
292
+ y1={g.y}
293
+ y2={g.y}
294
+ />
295
+ <text
296
+ class="st-areaSplineRangeChart__tickLabel"
297
+ x={MARGIN.left - 6}
298
+ y={g.y}
299
+ text-anchor="end"
300
+ dominant-baseline="middle"
301
+ >
302
+ {formatTick(g.value)}
303
+ </text>
304
+ {/each}
305
+
306
+ <!-- axes -->
307
+ <line
308
+ class="st-areaSplineRangeChart__axis"
309
+ x1={MARGIN.left}
310
+ x2={MARGIN.left}
311
+ y1={MARGIN.top}
312
+ y2={height - MARGIN.bottom}
313
+ />
314
+ <line
315
+ class="st-areaSplineRangeChart__axis"
316
+ x1={MARGIN.left}
317
+ x2={width - MARGIN.right}
318
+ y1={height - MARGIN.bottom}
319
+ y2={height - MARGIN.bottom}
320
+ />
321
+
322
+ <!-- X tick labels -->
323
+ {#each xTickEntries as tick, i (i)}
324
+ <text
325
+ class="st-areaSplineRangeChart__tickLabel"
326
+ x={tick.x}
327
+ y={height - MARGIN.bottom + 16}
328
+ text-anchor="middle"
329
+ >
330
+ {tick.label}
331
+ </text>
332
+ {/each}
333
+
334
+ {#if areaPath}
335
+ <path class="st-areaSplineRangeChart__area" d={areaPath} fill="url(#{gradientId})" />
336
+ {/if}
337
+ {#if highPath}
338
+ <path
339
+ class="st-areaSplineRangeChart__line st-areaSplineRangeChart__line--high"
340
+ d={highPath}
341
+ fill="none"
342
+ stroke-width="2"
343
+ stroke-linecap="round"
344
+ stroke-linejoin="round"
345
+ />
346
+ {/if}
347
+ {#if lowPath}
348
+ <path
349
+ class="st-areaSplineRangeChart__line st-areaSplineRangeChart__line--low"
350
+ d={lowPath}
351
+ fill="none"
352
+ stroke-width="2"
353
+ stroke-linecap="round"
354
+ stroke-linejoin="round"
355
+ />
356
+ {/if}
357
+
358
+ {#each points as p (p.index)}
359
+ <circle class="st-areaSplineRangeChart__dot" cx={p.x} cy={p.yHigh} r="3.5" data-chart-index={p.index} />
360
+ <circle class="st-areaSplineRangeChart__dot" cx={p.x} cy={p.yLow} r="3.5" data-chart-index={p.index} />
361
+ {/each}
362
+ </svg>
363
+ </div>
364
+
365
+ <ChartDataList {label} items={dataValueItems} />
366
+
367
+ {#if hoveredIndex !== null && points[hoveredIndex]}
368
+ {@const p = points[hoveredIndex]}
369
+ <div
370
+ class="st-areaSplineRangeChart__tooltip"
371
+ role="presentation"
372
+ style="left: {(p.x / width) * 100}%; top: {(p.yHigh / height) * 100}%"
373
+ >
374
+ <span class="st-areaSplineRangeChart__tooltipLabel">{p.datum.x}</span>
375
+ <span class="st-areaSplineRangeChart__tooltipValue">{p.range.lo} – {p.range.hi}</span>
376
+ </div>
377
+ {/if}
378
+ </div>
379
+
380
+ <style>
381
+ .st-areaSplineRangeChart {
382
+ color: var(--st-semantic-data-category1);
383
+ display: block;
384
+ font-family: inherit;
385
+ position: relative;
386
+ width: 100%;
387
+ }
388
+
389
+ .st-areaSplineRangeChart--category1 { color: var(--st-semantic-data-category1); }
390
+ .st-areaSplineRangeChart--category2 { color: var(--st-semantic-data-category2); }
391
+ .st-areaSplineRangeChart--category3 { color: var(--st-semantic-data-category3); }
392
+ .st-areaSplineRangeChart--category4 { color: var(--st-semantic-data-category4); }
393
+ .st-areaSplineRangeChart--category5 { color: var(--st-semantic-data-category5); }
394
+ .st-areaSplineRangeChart--category6 { color: var(--st-semantic-data-category6); }
395
+ .st-areaSplineRangeChart--category7 { color: var(--st-semantic-data-category7); }
396
+ .st-areaSplineRangeChart--category8 { color: var(--st-semantic-data-category8); }
397
+
398
+ .st-areaSplineRangeChart svg {
399
+ display: block;
400
+ overflow: visible;
401
+ }
402
+
403
+ .st-areaSplineRangeChart__visual {
404
+ display: block;
405
+ }
406
+
407
+ .st-areaSplineRangeChart__grid {
408
+ stroke: var(--st-component-areaSplineRangeChart-gridStroke, var(--st-semantic-border-subtle));
409
+ stroke-dasharray: 2 3;
410
+ stroke-width: 1;
411
+ opacity: 0.7;
412
+ }
413
+
414
+ .st-areaSplineRangeChart__axis {
415
+ stroke: var(--st-component-areaSplineRangeChart-axisStroke, var(--st-semantic-border-subtle));
416
+ stroke-width: 1;
417
+ }
418
+
419
+ .st-areaSplineRangeChart__tickLabel {
420
+ fill: var(--st-component-areaSplineRangeChart-labelColor, var(--st-semantic-text-secondary));
421
+ font-size: 0.6875rem;
422
+ }
423
+
424
+ .st-areaSplineRangeChart__line {
425
+ stroke: currentColor;
426
+ }
427
+
428
+ .st-areaSplineRangeChart__line--low {
429
+ opacity: 0.7;
430
+ }
431
+
432
+ .st-areaSplineRangeChart__area {
433
+ stroke: none;
434
+ }
435
+
436
+ .st-areaSplineRangeChart__dot {
437
+ fill: currentColor;
438
+ stroke: var(--st-semantic-surface-default);
439
+ stroke-width: 1.5;
440
+ cursor: pointer;
441
+ transition: r 120ms ease;
442
+ }
443
+
444
+ .st-areaSplineRangeChart__dot:hover {
445
+ r: 5;
446
+ }
447
+
448
+ @media (prefers-reduced-motion: reduce) {
449
+ .st-areaSplineRangeChart__dot {
450
+ transition: none;
451
+ }
452
+ }
453
+
454
+ .st-areaSplineRangeChart__tooltip {
455
+ background: var(--st-component-areaSplineRangeChart-tooltipBackground, var(--st-semantic-surface-inverse));
456
+ border-radius: var(--st-radius-sm, 0.25rem);
457
+ color: var(--st-component-areaSplineRangeChart-tooltipText, var(--st-semantic-text-inverse));
458
+ display: inline-flex;
459
+ flex-direction: column;
460
+ font-size: 0.75rem;
461
+ gap: 0.125rem;
462
+ line-height: 1.2;
463
+ padding: 0.375rem 0.5rem;
464
+ pointer-events: none;
465
+ position: absolute;
466
+ transform: translate(-50%, calc(-100% - 8px));
467
+ white-space: nowrap;
468
+ z-index: 1;
469
+ }
470
+
471
+ .st-areaSplineRangeChart__tooltipLabel {
472
+ font-weight: 600;
473
+ }
474
+
475
+ .st-areaSplineRangeChart__tooltipValue {
476
+ opacity: 0.85;
477
+ }
478
+ </style>
@@ -0,0 +1,37 @@
1
+ /**
2
+ * AreaSplineRangeChart — variante spline d'AreaRange : bande remplie entre une
3
+ * série BASSE et une série HAUTE le long d'un axe X continu, dont les contours
4
+ * HAUT et BAS sont TOUJOURS lissés (bords courbes). API canonique (référence
5
+ * Svelte ; React/Vue s'alignent).
6
+ *
7
+ * Props obligatoires :
8
+ * data AreaSplineRangeChartDatum[] - tableau {x, low, high}
9
+ * label string - aria-label du graphique
10
+ *
11
+ * Props optionnelles :
12
+ * tone "category1".."category8" (défaut "category1")
13
+ * width number (défaut 480)
14
+ * height number (défaut 240)
15
+ * class string
16
+ *
17
+ * Le tracé `.st-areaSplineRangeChart__area` ferme la bande : ligne HAUTE lissée
18
+ * (sens direct) puis ligne BASSE lissée (sens inverse) puis `Z`.
19
+ */
20
+ export type AreaSplineRangeChartTone = "category1" | "category2" | "category3" | "category4" | "category5" | "category6" | "category7" | "category8";
21
+ export type AreaSplineRangeChartDatum = {
22
+ x: number | string;
23
+ low: number;
24
+ high: number;
25
+ };
26
+ type AreaSplineRangeChartProps = {
27
+ data: AreaSplineRangeChartDatum[];
28
+ width?: number;
29
+ height?: number;
30
+ tone?: AreaSplineRangeChartTone;
31
+ label: string;
32
+ class?: string;
33
+ };
34
+ declare const AreaSplineRangeChart: import("svelte").Component<AreaSplineRangeChartProps, {}, "">;
35
+ type AreaSplineRangeChart = ReturnType<typeof AreaSplineRangeChart>;
36
+ export default AreaSplineRangeChart;
37
+ //# sourceMappingURL=AreaSplineRangeChart.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AreaSplineRangeChart.svelte.d.ts","sourceRoot":"","sources":["../src/lib/AreaSplineRangeChart.svelte.ts"],"names":[],"mappings":"AAGE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,wBAAwB,GAChC,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,CAAC;AAEhB,MAAM,MAAM,yBAAyB,GAAG;IACtC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAMF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,yBAAyB,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAyRJ,QAAA,MAAM,oBAAoB,+DAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}