@stealthscale/component-charts 0.2.1 → 0.2.3

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 (123) hide show
  1. package/dist/cyclonedx/bom.json +1 -1
  2. package/dist/index.js +1 -14710
  3. package/dist/pages/area-chart/area-chart.js +1151 -0
  4. package/dist/pages/area-chart/area-chart.props.js +3 -0
  5. package/dist/pages/bar-chart/bar-chart.js +990 -0
  6. package/dist/pages/bar-chart/bar-chart.props.js +3 -0
  7. package/dist/pages/box-plot/box-plot.js +1585 -0
  8. package/dist/pages/box-plot/box-plot.props.js +3 -0
  9. package/dist/pages/bubble-chart/bubble-chart.js +938 -0
  10. package/dist/pages/bubble-chart/bubble-chart.props.js +3 -0
  11. package/dist/pages/burndown-chart/burndown-chart.js +805 -0
  12. package/dist/pages/burndown-chart/burndown-chart.props.js +3 -0
  13. package/dist/pages/candlestick-chart/candlestick-chart.js +853 -0
  14. package/dist/pages/candlestick-chart/candlestick-chart.props.js +3 -0
  15. package/dist/pages/chart/chart.js +1190 -0
  16. package/dist/pages/chart/chart.props.js +3 -0
  17. package/dist/pages/chord-diagram/chord-diagram.js +891 -0
  18. package/dist/pages/chord-diagram/chord-diagram.props.js +3 -0
  19. package/dist/pages/combo-chart/combo-chart.js +873 -0
  20. package/dist/pages/combo-chart/combo-chart.props.js +3 -0
  21. package/dist/pages/distribution-chart/distribution-chart.js +1066 -0
  22. package/dist/pages/distribution-chart/distribution-chart.props.js +3 -0
  23. package/dist/pages/donut-chart/donut-chart.js +726 -0
  24. package/dist/pages/donut-chart/donut-chart.props.js +3 -0
  25. package/dist/pages/funnel-chart/funnel-chart.js +1094 -0
  26. package/dist/pages/funnel-chart/funnel-chart.props.js +3 -0
  27. package/dist/pages/gauge-chart/gauge-chart.js +767 -0
  28. package/dist/pages/gauge-chart/gauge-chart.props.js +3 -0
  29. package/dist/pages/heatmap/heatmap.js +1967 -0
  30. package/dist/pages/heatmap/heatmap.props.js +3 -0
  31. package/dist/pages/histogram-chart/histogram-chart.js +768 -0
  32. package/dist/pages/histogram-chart/histogram-chart.props.js +3 -0
  33. package/dist/pages/horizontal-bar-chart/horizontal-bar-chart.js +701 -0
  34. package/dist/pages/horizontal-bar-chart/horizontal-bar-chart.props.js +3 -0
  35. package/dist/pages/line-chart/line-chart.js +1882 -0
  36. package/dist/pages/line-chart/line-chart.props.js +3 -0
  37. package/dist/pages/pages.json +393 -0
  38. package/dist/pages/pareto-chart/pareto-chart.js +669 -0
  39. package/dist/pages/pareto-chart/pareto-chart.props.js +3 -0
  40. package/dist/pages/percent-stacked-bar/percent-stacked-bar.js +662 -0
  41. package/dist/pages/percent-stacked-bar/percent-stacked-bar.props.js +3 -0
  42. package/dist/pages/pie-chart/pie-chart.js +1007 -0
  43. package/dist/pages/pie-chart/pie-chart.props.js +3 -0
  44. package/dist/pages/polar-area-chart/polar-area-chart.js +812 -0
  45. package/dist/pages/polar-area-chart/polar-area-chart.props.js +3 -0
  46. package/dist/pages/radar-chart/radar-chart.js +1101 -0
  47. package/dist/pages/radar-chart/radar-chart.props.js +3 -0
  48. package/dist/pages/radial-bar-chart/radial-bar-chart.js +766 -0
  49. package/dist/pages/radial-bar-chart/radial-bar-chart.props.js +3 -0
  50. package/dist/pages/range-chart/range-chart.js +914 -0
  51. package/dist/pages/range-chart/range-chart.props.js +3 -0
  52. package/dist/pages/regression-overlay/regression-overlay.js +494 -0
  53. package/dist/pages/regression-overlay/regression-overlay.props.js +3 -0
  54. package/dist/pages/sankey-chart/sankey-chart.js +700 -0
  55. package/dist/pages/sankey-chart/sankey-chart.props.js +3 -0
  56. package/dist/pages/scatter-plot/scatter-plot.js +1248 -0
  57. package/dist/pages/scatter-plot/scatter-plot.props.js +3 -0
  58. package/dist/pages/sparkbar/sparkbar.js +629 -0
  59. package/dist/pages/sparkbar/sparkbar.props.js +3 -0
  60. package/dist/pages/sparkline/sparkline.js +960 -0
  61. package/dist/pages/sparkline/sparkline.props.js +3 -0
  62. package/dist/pages/spend-5xQ76WSj.js +185 -0
  63. package/dist/pages/stacked-area-chart/stacked-area-chart.js +912 -0
  64. package/dist/pages/stacked-area-chart/stacked-area-chart.props.js +3 -0
  65. package/dist/pages/stacked-bar-chart/stacked-bar-chart.js +722 -0
  66. package/dist/pages/stacked-bar-chart/stacked-bar-chart.props.js +3 -0
  67. package/dist/pages/step-line-chart/step-line-chart.js +573 -0
  68. package/dist/pages/step-line-chart/step-line-chart.props.js +3 -0
  69. package/dist/pages/stream-graph/stream-graph.js +1662 -0
  70. package/dist/pages/stream-graph/stream-graph.props.js +3 -0
  71. package/dist/pages/sunburst-chart/sunburst-chart.js +1051 -0
  72. package/dist/pages/sunburst-chart/sunburst-chart.props.js +3 -0
  73. package/dist/pages/timeline-chart/timeline-chart.js +1124 -0
  74. package/dist/pages/timeline-chart/timeline-chart.props.js +3 -0
  75. package/dist/pages/treemap-chart/treemap-chart.js +904 -0
  76. package/dist/pages/treemap-chart/treemap-chart.props.js +3 -0
  77. package/dist/pages/violin-plot/violin-plot.js +1303 -0
  78. package/dist/pages/violin-plot/violin-plot.props.js +3 -0
  79. package/dist/pages/visitors-oFFVcbIZ.js +248 -0
  80. package/dist/pages/waterfall-chart/waterfall-chart.js +1195 -0
  81. package/dist/pages/waterfall-chart/waterfall-chart.props.js +3 -0
  82. package/dist/shared-DVZJ2nST.js +14711 -0
  83. package/dist/theme.js +29 -13
  84. package/locales/en/specimen/area-chart.json +56 -0
  85. package/locales/en/specimen/bar-chart.json +56 -0
  86. package/locales/en/specimen/box-plot.json +65 -0
  87. package/locales/en/specimen/bubble-chart.json +47 -0
  88. package/locales/en/specimen/burndown-chart.json +46 -0
  89. package/locales/en/specimen/candlestick-chart.json +42 -0
  90. package/locales/en/specimen/chart.json +53 -0
  91. package/locales/en/specimen/chord-diagram.json +69 -0
  92. package/locales/en/specimen/combo-chart.json +41 -0
  93. package/locales/en/specimen/distribution-chart.json +47 -0
  94. package/locales/en/specimen/donut-chart.json +63 -0
  95. package/locales/en/specimen/funnel-chart.json +84 -0
  96. package/locales/en/specimen/gauge-chart.json +68 -0
  97. package/locales/en/specimen/heatmap.json +187 -0
  98. package/locales/en/specimen/histogram-chart.json +48 -0
  99. package/locales/en/specimen/horizontal-bar-chart.json +54 -0
  100. package/locales/en/specimen/line-chart.json +106 -0
  101. package/locales/en/specimen/pareto-chart.json +43 -0
  102. package/locales/en/specimen/percent-stacked-bar.json +37 -0
  103. package/locales/en/specimen/pie-chart.json +80 -0
  104. package/locales/en/specimen/polar-area-chart.json +90 -0
  105. package/locales/en/specimen/radar-chart.json +82 -0
  106. package/locales/en/specimen/radial-bar-chart.json +62 -0
  107. package/locales/en/specimen/range-chart.json +42 -0
  108. package/locales/en/specimen/regression-overlay.json +36 -0
  109. package/locales/en/specimen/sankey-chart.json +89 -0
  110. package/locales/en/specimen/scatter-plot.json +88 -0
  111. package/locales/en/specimen/sparkbar.json +51 -0
  112. package/locales/en/specimen/sparkline.json +70 -0
  113. package/locales/en/specimen/stacked-area-chart.json +44 -0
  114. package/locales/en/specimen/stacked-bar-chart.json +34 -0
  115. package/locales/en/specimen/step-line-chart.json +33 -0
  116. package/locales/en/specimen/stream-graph.json +54 -0
  117. package/locales/en/specimen/sunburst-chart.json +110 -0
  118. package/locales/en/specimen/timeline-chart.json +77 -0
  119. package/locales/en/specimen/treemap-chart.json +107 -0
  120. package/locales/en/specimen/violin-plot.json +54 -0
  121. package/locales/en/specimen/waterfall-chart.json +71 -0
  122. package/package.json +9 -8
  123. /package/dist/{recipe-BbGw00ut.js → recipes-BbGw00ut.js} +0 -0
@@ -0,0 +1,1151 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { yt as AreaChart } from "../../shared-DVZJ2nST.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Room, specimen, useWords } from "@stealthscale/specimen";
7
+ import { RotateCcwIcon } from "lucide-react";
8
+ import { Button } from "@stealthscale/component-actions";
9
+ import { Stack } from "@stealthscale/component-layout";
10
+ import { Slider } from "@stealthscale/component-forms";
11
+ //#region src/area-chart/examples/bandwidth.example.tsx
12
+ var bandwidth_example_exports = /* @__PURE__ */ __exportAll({
13
+ Bandwidth: () => Bandwidth,
14
+ source: () => source$6
15
+ });
16
+ const HOURS$4 = [
17
+ [120, 40],
18
+ [180, 55],
19
+ [260, 90],
20
+ [310, 140],
21
+ [295, 180],
22
+ [240, 150],
23
+ [205, 95],
24
+ [150, 60]
25
+ ].map(([inbound, outbound], index) => ({
26
+ hour: `2026-09-28T${String(index * 3).padStart(2, "0")}:00:00Z`,
27
+ inbound,
28
+ outbound
29
+ }));
30
+ function Bandwidth() {
31
+ const $ = c(24);
32
+ const { t } = useWords("area-chart");
33
+ let t0;
34
+ if ($[0] !== t) {
35
+ t0 = t("bandwidth.caption");
36
+ $[0] = t;
37
+ $[1] = t0;
38
+ } else t0 = $[1];
39
+ let t1;
40
+ if ($[2] !== t) {
41
+ t1 = t("bandwidth.label");
42
+ $[2] = t;
43
+ $[3] = t1;
44
+ } else t1 = $[3];
45
+ let t2;
46
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
47
+ t2 = {
48
+ hour: "2-digit",
49
+ hourCycle: "h23",
50
+ minute: "2-digit",
51
+ timeZone: "UTC"
52
+ };
53
+ $[4] = t2;
54
+ } else t2 = $[4];
55
+ let t3;
56
+ if ($[5] !== t) {
57
+ t3 = t("series");
58
+ $[5] = t;
59
+ $[6] = t3;
60
+ } else t3 = $[6];
61
+ let t4;
62
+ if ($[7] !== t) {
63
+ t4 = t("bandwidth.inbound");
64
+ $[7] = t;
65
+ $[8] = t4;
66
+ } else t4 = $[8];
67
+ let t5;
68
+ if ($[9] !== t4) {
69
+ t5 = {
70
+ key: "inbound",
71
+ label: t4
72
+ };
73
+ $[9] = t4;
74
+ $[10] = t5;
75
+ } else t5 = $[10];
76
+ let t6;
77
+ if ($[11] !== t) {
78
+ t6 = t("bandwidth.outbound");
79
+ $[11] = t;
80
+ $[12] = t6;
81
+ } else t6 = $[12];
82
+ let t7;
83
+ if ($[13] !== t6) {
84
+ t7 = {
85
+ key: "outbound",
86
+ label: t6
87
+ };
88
+ $[13] = t6;
89
+ $[14] = t7;
90
+ } else t7 = $[14];
91
+ let t8;
92
+ if ($[15] !== t5 || $[16] !== t7) {
93
+ t8 = [t5, t7];
94
+ $[15] = t5;
95
+ $[16] = t7;
96
+ $[17] = t8;
97
+ } else t8 = $[17];
98
+ let t9;
99
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
100
+ t9 = {
101
+ style: "unit",
102
+ unit: "megabit-per-second",
103
+ unitDisplay: "short"
104
+ };
105
+ $[18] = t9;
106
+ } else t9 = $[18];
107
+ let t10;
108
+ if ($[19] !== t0 || $[20] !== t1 || $[21] !== t3 || $[22] !== t8) {
109
+ t10 = /* @__PURE__ */ jsx(AreaChart, {
110
+ caption: t0,
111
+ categoryKey: "hour",
112
+ curve: "linear",
113
+ data: HOURS$4,
114
+ label: t1,
115
+ labelOptions: t2,
116
+ legendLabel: t3,
117
+ series: t8,
118
+ valueOptions: t9
119
+ });
120
+ $[19] = t0;
121
+ $[20] = t1;
122
+ $[21] = t3;
123
+ $[22] = t8;
124
+ $[23] = t10;
125
+ } else t10 = $[23];
126
+ return t10;
127
+ }
128
+ const source$6 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { AreaChart } from \"@stealthscale/component-charts\";\n\nconst HOURS = [\n [120, 40],\n [180, 55],\n [260, 90],\n [310, 140],\n [295, 180],\n [240, 150],\n [205, 95],\n [150, 60],\n].map(([inbound, outbound], index) => ({\n hour: `2026-09-28T${String(index * 3).padStart(2, \"0\")}:00:00Z`,\n inbound,\n outbound,\n}));\n\nexport function Bandwidth(): ReactElement {\n const { t } = useWords(\"area-chart\");\n\n return (\n <AreaChart\n caption={t(\"bandwidth.caption\")}\n categoryKey=\"hour\"\n curve=\"linear\"\n data={HOURS}\n label={t(\"bandwidth.label\")}\n labelOptions={{ hour: \"2-digit\", hourCycle: \"h23\", minute: \"2-digit\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n series={[\n { key: \"inbound\", label: t(\"bandwidth.inbound\") },\n { key: \"outbound\", label: t(\"bandwidth.outbound\") },\n ]}\n valueOptions={{ style: \"unit\", unit: \"megabit-per-second\", unitDisplay: \"short\" }}\n />\n );\n}\n";
129
+ //#endregion
130
+ //#region src/area-chart/examples/busiest.example.tsx
131
+ var busiest_example_exports = /* @__PURE__ */ __exportAll({
132
+ Busiest: () => Busiest,
133
+ source: () => source$5
134
+ });
135
+ const HOURS$3 = [
136
+ [120, 40],
137
+ [180, 55],
138
+ [260, 90],
139
+ [310, 140],
140
+ [295, 180],
141
+ [240, 150],
142
+ [205, 95],
143
+ [150, 60]
144
+ ].map(([inbound, outbound], index) => ({
145
+ hour: `2026-09-28T${String(index * 3).padStart(2, "0")}:00:00Z`,
146
+ inbound,
147
+ outbound
148
+ }));
149
+ function Busiest() {
150
+ const $ = c(24);
151
+ const { t } = useWords("area-chart");
152
+ let t0;
153
+ if ($[0] !== t) {
154
+ t0 = t("busiest.caption");
155
+ $[0] = t;
156
+ $[1] = t0;
157
+ } else t0 = $[1];
158
+ let t1;
159
+ if ($[2] !== t) {
160
+ t1 = t("bandwidth.label");
161
+ $[2] = t;
162
+ $[3] = t1;
163
+ } else t1 = $[3];
164
+ let t2;
165
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
166
+ t2 = {
167
+ hour: "2-digit",
168
+ hourCycle: "h23",
169
+ minute: "2-digit",
170
+ timeZone: "UTC"
171
+ };
172
+ $[4] = t2;
173
+ } else t2 = $[4];
174
+ let t3;
175
+ if ($[5] !== t) {
176
+ t3 = t("series");
177
+ $[5] = t;
178
+ $[6] = t3;
179
+ } else t3 = $[6];
180
+ let t4;
181
+ if ($[7] !== t) {
182
+ t4 = t("bandwidth.inbound");
183
+ $[7] = t;
184
+ $[8] = t4;
185
+ } else t4 = $[8];
186
+ let t5;
187
+ if ($[9] !== t4) {
188
+ t5 = {
189
+ key: "inbound",
190
+ label: t4
191
+ };
192
+ $[9] = t4;
193
+ $[10] = t5;
194
+ } else t5 = $[10];
195
+ let t6;
196
+ if ($[11] !== t) {
197
+ t6 = t("bandwidth.outbound");
198
+ $[11] = t;
199
+ $[12] = t6;
200
+ } else t6 = $[12];
201
+ let t7;
202
+ if ($[13] !== t6) {
203
+ t7 = {
204
+ key: "outbound",
205
+ label: t6
206
+ };
207
+ $[13] = t6;
208
+ $[14] = t7;
209
+ } else t7 = $[14];
210
+ let t8;
211
+ if ($[15] !== t5 || $[16] !== t7) {
212
+ t8 = [t5, t7];
213
+ $[15] = t5;
214
+ $[16] = t7;
215
+ $[17] = t8;
216
+ } else t8 = $[17];
217
+ let t9;
218
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
219
+ t9 = {
220
+ style: "unit",
221
+ unit: "megabit-per-second",
222
+ unitDisplay: "short"
223
+ };
224
+ $[18] = t9;
225
+ } else t9 = $[18];
226
+ let t10;
227
+ if ($[19] !== t0 || $[20] !== t1 || $[21] !== t3 || $[22] !== t8) {
228
+ t10 = /* @__PURE__ */ jsx(AreaChart, {
229
+ caption: t0,
230
+ categoryKey: "hour",
231
+ curve: "linear",
232
+ data: HOURS$3,
233
+ defaultIndex: 3,
234
+ label: t1,
235
+ labelOptions: t2,
236
+ legendLabel: t3,
237
+ series: t8,
238
+ valueOptions: t9
239
+ });
240
+ $[19] = t0;
241
+ $[20] = t1;
242
+ $[21] = t3;
243
+ $[22] = t8;
244
+ $[23] = t10;
245
+ } else t10 = $[23];
246
+ return t10;
247
+ }
248
+ const source$5 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { AreaChart } from \"@stealthscale/component-charts\";\n\nconst HOURS = [\n [120, 40],\n [180, 55],\n [260, 90],\n [310, 140],\n [295, 180],\n [240, 150],\n [205, 95],\n [150, 60],\n].map(([inbound, outbound], index) => ({\n hour: `2026-09-28T${String(index * 3).padStart(2, \"0\")}:00:00Z`,\n inbound,\n outbound,\n}));\n\nexport function Busiest(): ReactElement {\n const { t } = useWords(\"area-chart\");\n\n return (\n <AreaChart\n caption={t(\"busiest.caption\")}\n categoryKey=\"hour\"\n curve=\"linear\"\n data={HOURS}\n defaultIndex={3}\n label={t(\"bandwidth.label\")}\n labelOptions={{ hour: \"2-digit\", hourCycle: \"h23\", minute: \"2-digit\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n series={[\n { key: \"inbound\", label: t(\"bandwidth.inbound\") },\n { key: \"outbound\", label: t(\"bandwidth.outbound\") },\n ]}\n valueOptions={{ style: \"unit\", unit: \"megabit-per-second\", unitDisplay: \"short\" }}\n />\n );\n}\n";
249
+ //#endregion
250
+ //#region src/area-chart/examples/internal.example.tsx
251
+ var internal_example_exports = /* @__PURE__ */ __exportAll({
252
+ Internal: () => Internal,
253
+ source: () => source$4
254
+ });
255
+ const HOURS$2 = [
256
+ [
257
+ 120,
258
+ 40,
259
+ 35
260
+ ],
261
+ [
262
+ 180,
263
+ 55,
264
+ 42
265
+ ],
266
+ [
267
+ 260,
268
+ 90,
269
+ 51
270
+ ],
271
+ [
272
+ 310,
273
+ 140,
274
+ 48
275
+ ],
276
+ [
277
+ 295,
278
+ 180,
279
+ 57
280
+ ],
281
+ [
282
+ 240,
283
+ 150,
284
+ 44
285
+ ],
286
+ [
287
+ 205,
288
+ 95,
289
+ 39
290
+ ],
291
+ [
292
+ 150,
293
+ 60,
294
+ 36
295
+ ]
296
+ ].map(([inbound, outbound, replication], index) => ({
297
+ hour: `2026-09-28T${String(index * 3).padStart(2, "0")}:00:00Z`,
298
+ inbound,
299
+ outbound,
300
+ replication
301
+ }));
302
+ function Internal() {
303
+ const $ = c(30);
304
+ const { t } = useWords("area-chart");
305
+ let t0;
306
+ if ($[0] !== t) {
307
+ t0 = t("internal.caption");
308
+ $[0] = t;
309
+ $[1] = t0;
310
+ } else t0 = $[1];
311
+ let t1;
312
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
313
+ t1 = ["replication"];
314
+ $[2] = t1;
315
+ } else t1 = $[2];
316
+ let t2;
317
+ if ($[3] !== t) {
318
+ t2 = t("bandwidth.label");
319
+ $[3] = t;
320
+ $[4] = t2;
321
+ } else t2 = $[4];
322
+ let t3;
323
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
324
+ t3 = {
325
+ hour: "2-digit",
326
+ hourCycle: "h23",
327
+ minute: "2-digit",
328
+ timeZone: "UTC"
329
+ };
330
+ $[5] = t3;
331
+ } else t3 = $[5];
332
+ let t4;
333
+ if ($[6] !== t) {
334
+ t4 = t("series");
335
+ $[6] = t;
336
+ $[7] = t4;
337
+ } else t4 = $[7];
338
+ let t5;
339
+ if ($[8] !== t) {
340
+ t5 = t("bandwidth.inbound");
341
+ $[8] = t;
342
+ $[9] = t5;
343
+ } else t5 = $[9];
344
+ let t6;
345
+ if ($[10] !== t5) {
346
+ t6 = {
347
+ key: "inbound",
348
+ label: t5
349
+ };
350
+ $[10] = t5;
351
+ $[11] = t6;
352
+ } else t6 = $[11];
353
+ let t7;
354
+ if ($[12] !== t) {
355
+ t7 = t("bandwidth.outbound");
356
+ $[12] = t;
357
+ $[13] = t7;
358
+ } else t7 = $[13];
359
+ let t8;
360
+ if ($[14] !== t7) {
361
+ t8 = {
362
+ key: "outbound",
363
+ label: t7
364
+ };
365
+ $[14] = t7;
366
+ $[15] = t8;
367
+ } else t8 = $[15];
368
+ let t9;
369
+ if ($[16] !== t) {
370
+ t9 = t("internal.replication");
371
+ $[16] = t;
372
+ $[17] = t9;
373
+ } else t9 = $[17];
374
+ let t10;
375
+ if ($[18] !== t9) {
376
+ t10 = {
377
+ key: "replication",
378
+ label: t9
379
+ };
380
+ $[18] = t9;
381
+ $[19] = t10;
382
+ } else t10 = $[19];
383
+ let t11;
384
+ if ($[20] !== t10 || $[21] !== t6 || $[22] !== t8) {
385
+ t11 = [
386
+ t6,
387
+ t8,
388
+ t10
389
+ ];
390
+ $[20] = t10;
391
+ $[21] = t6;
392
+ $[22] = t8;
393
+ $[23] = t11;
394
+ } else t11 = $[23];
395
+ let t12;
396
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
397
+ t12 = {
398
+ style: "unit",
399
+ unit: "megabit-per-second",
400
+ unitDisplay: "short"
401
+ };
402
+ $[24] = t12;
403
+ } else t12 = $[24];
404
+ let t13;
405
+ if ($[25] !== t0 || $[26] !== t11 || $[27] !== t2 || $[28] !== t4) {
406
+ t13 = /* @__PURE__ */ jsx(AreaChart, {
407
+ caption: t0,
408
+ categoryKey: "hour",
409
+ curve: "linear",
410
+ data: HOURS$2,
411
+ defaultHiddenKeys: t1,
412
+ label: t2,
413
+ labelOptions: t3,
414
+ legendLabel: t4,
415
+ series: t11,
416
+ valueOptions: t12
417
+ });
418
+ $[25] = t0;
419
+ $[26] = t11;
420
+ $[27] = t2;
421
+ $[28] = t4;
422
+ $[29] = t13;
423
+ } else t13 = $[29];
424
+ return t13;
425
+ }
426
+ const source$4 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { AreaChart } from \"@stealthscale/component-charts\";\n\nconst HOURS = [\n [120, 40, 35],\n [180, 55, 42],\n [260, 90, 51],\n [310, 140, 48],\n [295, 180, 57],\n [240, 150, 44],\n [205, 95, 39],\n [150, 60, 36],\n].map(([inbound, outbound, replication], index) => ({\n hour: `2026-09-28T${String(index * 3).padStart(2, \"0\")}:00:00Z`,\n inbound,\n outbound,\n replication,\n}));\n\nexport function Internal(): ReactElement {\n const { t } = useWords(\"area-chart\");\n\n return (\n <AreaChart\n caption={t(\"internal.caption\")}\n categoryKey=\"hour\"\n curve=\"linear\"\n data={HOURS}\n defaultHiddenKeys={[\"replication\"]}\n label={t(\"bandwidth.label\")}\n labelOptions={{ hour: \"2-digit\", hourCycle: \"h23\", minute: \"2-digit\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n series={[\n { key: \"inbound\", label: t(\"bandwidth.inbound\") },\n { key: \"outbound\", label: t(\"bandwidth.outbound\") },\n { key: \"replication\", label: t(\"internal.replication\") },\n ]}\n valueOptions={{ style: \"unit\", unit: \"megabit-per-second\", unitDisplay: \"short\" }}\n />\n );\n}\n";
427
+ //#endregion
428
+ //#region src/area-chart/examples/offline.example.tsx
429
+ var offline_example_exports = /* @__PURE__ */ __exportAll({
430
+ Offline: () => Offline,
431
+ source: () => source$3
432
+ });
433
+ const HOURS$1 = [];
434
+ function Offline() {
435
+ const $ = c(22);
436
+ const { t } = useWords("area-chart");
437
+ let t0;
438
+ if ($[0] !== t) {
439
+ t0 = t("offline.caption");
440
+ $[0] = t;
441
+ $[1] = t0;
442
+ } else t0 = $[1];
443
+ let t1;
444
+ if ($[2] !== t) {
445
+ t1 = t("offline.empty");
446
+ $[2] = t;
447
+ $[3] = t1;
448
+ } else t1 = $[3];
449
+ let t2;
450
+ if ($[4] !== t) {
451
+ t2 = t("bandwidth.label");
452
+ $[4] = t;
453
+ $[5] = t2;
454
+ } else t2 = $[5];
455
+ let t3;
456
+ if ($[6] !== t) {
457
+ t3 = t("bandwidth.inbound");
458
+ $[6] = t;
459
+ $[7] = t3;
460
+ } else t3 = $[7];
461
+ let t4;
462
+ if ($[8] !== t3) {
463
+ t4 = {
464
+ key: "inbound",
465
+ label: t3
466
+ };
467
+ $[8] = t3;
468
+ $[9] = t4;
469
+ } else t4 = $[9];
470
+ let t5;
471
+ if ($[10] !== t) {
472
+ t5 = t("bandwidth.outbound");
473
+ $[10] = t;
474
+ $[11] = t5;
475
+ } else t5 = $[11];
476
+ let t6;
477
+ if ($[12] !== t5) {
478
+ t6 = {
479
+ key: "outbound",
480
+ label: t5
481
+ };
482
+ $[12] = t5;
483
+ $[13] = t6;
484
+ } else t6 = $[13];
485
+ let t7;
486
+ if ($[14] !== t4 || $[15] !== t6) {
487
+ t7 = [t4, t6];
488
+ $[14] = t4;
489
+ $[15] = t6;
490
+ $[16] = t7;
491
+ } else t7 = $[16];
492
+ let t8;
493
+ if ($[17] !== t0 || $[18] !== t1 || $[19] !== t2 || $[20] !== t7) {
494
+ t8 = /* @__PURE__ */ jsx(AreaChart, {
495
+ caption: t0,
496
+ categoryKey: "hour",
497
+ data: HOURS$1,
498
+ empty: t1,
499
+ label: t2,
500
+ series: t7
501
+ });
502
+ $[17] = t0;
503
+ $[18] = t1;
504
+ $[19] = t2;
505
+ $[20] = t7;
506
+ $[21] = t8;
507
+ } else t8 = $[21];
508
+ return t8;
509
+ }
510
+ const source$3 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { AreaChart } from \"@stealthscale/component-charts\";\n\nconst HOURS: Array<{ hour: string; inbound: number; outbound: number }> = [];\n\nexport function Offline(): ReactElement {\n const { t } = useWords(\"area-chart\");\n\n return (\n <AreaChart\n caption={t(\"offline.caption\")}\n categoryKey=\"hour\"\n data={HOURS}\n empty={t(\"offline.empty\")}\n label={t(\"bandwidth.label\")}\n series={[\n { key: \"inbound\", label: t(\"bandwidth.inbound\") },\n { key: \"outbound\", label: t(\"bandwidth.outbound\") },\n ]}\n />\n );\n}\n";
511
+ //#endregion
512
+ //#region src/area-chart/examples/replay.example.tsx
513
+ var replay_example_exports = /* @__PURE__ */ __exportAll({
514
+ Replay: () => Replay,
515
+ source: () => source$2
516
+ });
517
+ const HOURS = [
518
+ [120, 40],
519
+ [180, 55],
520
+ [260, 90],
521
+ [310, 140],
522
+ [295, 180],
523
+ [240, 150],
524
+ [205, 95],
525
+ [150, 60]
526
+ ].map(([inbound, outbound], index) => ({
527
+ hour: `2026-09-28T${String(index * 3).padStart(2, "0")}:00:00Z`,
528
+ inbound,
529
+ outbound
530
+ }));
531
+ function Replay() {
532
+ const $ = c(36);
533
+ const { t } = useWords("area-chart");
534
+ const [run, setRun] = useState(0);
535
+ let t0;
536
+ if ($[0] !== t) {
537
+ t0 = t("bandwidth.caption");
538
+ $[0] = t;
539
+ $[1] = t0;
540
+ } else t0 = $[1];
541
+ let t1;
542
+ if ($[2] !== t) {
543
+ t1 = t("bandwidth.label");
544
+ $[2] = t;
545
+ $[3] = t1;
546
+ } else t1 = $[3];
547
+ let t2;
548
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
549
+ t2 = {
550
+ hour: "2-digit",
551
+ hourCycle: "h23",
552
+ minute: "2-digit",
553
+ timeZone: "UTC"
554
+ };
555
+ $[4] = t2;
556
+ } else t2 = $[4];
557
+ let t3;
558
+ if ($[5] !== t) {
559
+ t3 = t("series");
560
+ $[5] = t;
561
+ $[6] = t3;
562
+ } else t3 = $[6];
563
+ let t4;
564
+ if ($[7] !== t) {
565
+ t4 = t("bandwidth.inbound");
566
+ $[7] = t;
567
+ $[8] = t4;
568
+ } else t4 = $[8];
569
+ let t5;
570
+ if ($[9] !== t4) {
571
+ t5 = {
572
+ key: "inbound",
573
+ label: t4
574
+ };
575
+ $[9] = t4;
576
+ $[10] = t5;
577
+ } else t5 = $[10];
578
+ let t6;
579
+ if ($[11] !== t) {
580
+ t6 = t("bandwidth.outbound");
581
+ $[11] = t;
582
+ $[12] = t6;
583
+ } else t6 = $[12];
584
+ let t7;
585
+ if ($[13] !== t6) {
586
+ t7 = {
587
+ key: "outbound",
588
+ label: t6
589
+ };
590
+ $[13] = t6;
591
+ $[14] = t7;
592
+ } else t7 = $[14];
593
+ let t8;
594
+ if ($[15] !== t5 || $[16] !== t7) {
595
+ t8 = [t5, t7];
596
+ $[15] = t5;
597
+ $[16] = t7;
598
+ $[17] = t8;
599
+ } else t8 = $[17];
600
+ let t9;
601
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
602
+ t9 = {
603
+ style: "unit",
604
+ unit: "megabit-per-second",
605
+ unitDisplay: "short"
606
+ };
607
+ $[18] = t9;
608
+ } else t9 = $[18];
609
+ let t10;
610
+ if ($[19] !== run || $[20] !== t0 || $[21] !== t1 || $[22] !== t3 || $[23] !== t8) {
611
+ t10 = /* @__PURE__ */ jsx(AreaChart, {
612
+ animate: true,
613
+ caption: t0,
614
+ categoryKey: "hour",
615
+ curve: "linear",
616
+ data: HOURS,
617
+ label: t1,
618
+ labelOptions: t2,
619
+ legendLabel: t3,
620
+ series: t8,
621
+ valueOptions: t9
622
+ }, run);
623
+ $[19] = run;
624
+ $[20] = t0;
625
+ $[21] = t1;
626
+ $[22] = t3;
627
+ $[23] = t8;
628
+ $[24] = t10;
629
+ } else t10 = $[24];
630
+ let t11;
631
+ if ($[25] !== run) {
632
+ t11 = () => {
633
+ setRun(run + 1);
634
+ };
635
+ $[25] = run;
636
+ $[26] = t11;
637
+ } else t11 = $[26];
638
+ let t12;
639
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
640
+ t12 = /* @__PURE__ */ jsx(RotateCcwIcon, {});
641
+ $[27] = t12;
642
+ } else t12 = $[27];
643
+ let t13;
644
+ if ($[28] !== t) {
645
+ t13 = t("replay.replay");
646
+ $[28] = t;
647
+ $[29] = t13;
648
+ } else t13 = $[29];
649
+ let t14;
650
+ if ($[30] !== t11 || $[31] !== t13) {
651
+ t14 = /* @__PURE__ */ jsxs(Button, {
652
+ onClick: t11,
653
+ size: "sm",
654
+ variant: "outline",
655
+ children: [t12, t13]
656
+ });
657
+ $[30] = t11;
658
+ $[31] = t13;
659
+ $[32] = t14;
660
+ } else t14 = $[32];
661
+ let t15;
662
+ if ($[33] !== t10 || $[34] !== t14) {
663
+ t15 = /* @__PURE__ */ jsxs(Stack, {
664
+ align: "flex-start",
665
+ children: [t10, t14]
666
+ });
667
+ $[33] = t10;
668
+ $[34] = t14;
669
+ $[35] = t15;
670
+ } else t15 = $[35];
671
+ return t15;
672
+ }
673
+ const source$2 = "import { type ReactElement, useState } from \"react\";\n\nimport { RotateCcwIcon } from \"lucide-react\";\n\nimport { Button } from \"@stealthscale/component-actions\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { AreaChart } from \"@stealthscale/component-charts\";\n\nconst HOURS = [\n [120, 40],\n [180, 55],\n [260, 90],\n [310, 140],\n [295, 180],\n [240, 150],\n [205, 95],\n [150, 60],\n].map(([inbound, outbound], index) => ({\n hour: `2026-09-28T${String(index * 3).padStart(2, \"0\")}:00:00Z`,\n inbound,\n outbound,\n}));\n\nexport function Replay(): ReactElement {\n const { t } = useWords(\"area-chart\");\n const [run, setRun] = useState(0);\n\n return (\n <Stack align=\"flex-start\">\n <AreaChart\n animate\n caption={t(\"bandwidth.caption\")}\n categoryKey=\"hour\"\n curve=\"linear\"\n data={HOURS}\n key={run}\n label={t(\"bandwidth.label\")}\n labelOptions={{ hour: \"2-digit\", hourCycle: \"h23\", minute: \"2-digit\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n series={[\n { key: \"inbound\", label: t(\"bandwidth.inbound\") },\n { key: \"outbound\", label: t(\"bandwidth.outbound\") },\n ]}\n valueOptions={{ style: \"unit\", unit: \"megabit-per-second\", unitDisplay: \"short\" }}\n />\n <Button\n onClick={() => {\n setRun(run + 1);\n }}\n size=\"sm\"\n variant=\"outline\"\n >\n <RotateCcwIcon />\n {t(\"replay.replay\")}\n </Button>\n </Stack>\n );\n}\n";
674
+ //#endregion
675
+ //#region src/area-chart/examples/storage.example.tsx
676
+ var storage_example_exports = /* @__PURE__ */ __exportAll({
677
+ Storage: () => Storage,
678
+ source: () => source$1
679
+ });
680
+ const MONTHS = [
681
+ {
682
+ month: "2026-04-01",
683
+ used: 412
684
+ },
685
+ {
686
+ month: "2026-05-01",
687
+ used: 468
688
+ },
689
+ {
690
+ month: "2026-06-01",
691
+ used: 521
692
+ },
693
+ {
694
+ month: "2026-07-01",
695
+ used: 604
696
+ },
697
+ {
698
+ month: "2026-08-01",
699
+ used: 689
700
+ },
701
+ {
702
+ month: "2026-09-01",
703
+ used: 742
704
+ }
705
+ ];
706
+ function Storage() {
707
+ const $ = c(14);
708
+ const { t } = useWords("area-chart");
709
+ let t0;
710
+ if ($[0] !== t) {
711
+ t0 = t("storage.caption");
712
+ $[0] = t;
713
+ $[1] = t0;
714
+ } else t0 = $[1];
715
+ let t1;
716
+ if ($[2] !== t) {
717
+ t1 = t("storage.label");
718
+ $[2] = t;
719
+ $[3] = t1;
720
+ } else t1 = $[3];
721
+ let t2;
722
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
723
+ t2 = {
724
+ month: "short",
725
+ timeZone: "UTC"
726
+ };
727
+ $[4] = t2;
728
+ } else t2 = $[4];
729
+ let t3;
730
+ if ($[5] !== t) {
731
+ t3 = t("storage.used");
732
+ $[5] = t;
733
+ $[6] = t3;
734
+ } else t3 = $[6];
735
+ let t4;
736
+ if ($[7] !== t3) {
737
+ t4 = [{
738
+ color: "teal",
739
+ key: "used",
740
+ label: t3
741
+ }];
742
+ $[7] = t3;
743
+ $[8] = t4;
744
+ } else t4 = $[8];
745
+ let t5;
746
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
747
+ t5 = {
748
+ style: "unit",
749
+ unit: "gigabyte"
750
+ };
751
+ $[9] = t5;
752
+ } else t5 = $[9];
753
+ let t6;
754
+ if ($[10] !== t0 || $[11] !== t1 || $[12] !== t4) {
755
+ t6 = /* @__PURE__ */ jsx(AreaChart, {
756
+ caption: t0,
757
+ categoryKey: "month",
758
+ data: MONTHS,
759
+ label: t1,
760
+ labelOptions: t2,
761
+ series: t4,
762
+ valueOptions: t5
763
+ });
764
+ $[10] = t0;
765
+ $[11] = t1;
766
+ $[12] = t4;
767
+ $[13] = t6;
768
+ } else t6 = $[13];
769
+ return t6;
770
+ }
771
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { AreaChart } from \"@stealthscale/component-charts\";\n\nconst MONTHS = [\n { month: \"2026-04-01\", used: 412 },\n { month: \"2026-05-01\", used: 468 },\n { month: \"2026-06-01\", used: 521 },\n { month: \"2026-07-01\", used: 604 },\n { month: \"2026-08-01\", used: 689 },\n { month: \"2026-09-01\", used: 742 },\n];\n\nexport function Storage(): ReactElement {\n const { t } = useWords(\"area-chart\");\n\n return (\n <AreaChart\n caption={t(\"storage.caption\")}\n categoryKey=\"month\"\n data={MONTHS}\n label={t(\"storage.label\")}\n labelOptions={{ month: \"short\", timeZone: \"UTC\" }}\n series={[{ color: \"teal\", key: \"used\", label: t(\"storage.used\") }]}\n valueOptions={{ style: \"unit\", unit: \"gigabyte\" }}\n />\n );\n}\n";
772
+ //#endregion
773
+ //#region src/area-chart/examples/zoom.example.tsx
774
+ var zoom_example_exports = /* @__PURE__ */ __exportAll({
775
+ Zoom: () => Zoom,
776
+ source: () => source
777
+ });
778
+ function dayAt(index) {
779
+ return new Date(Date.UTC(2025, 9, 1 + index));
780
+ }
781
+ const YEAR = Array.from({ length: 365 }, (_, index) => {
782
+ const day = dayAt(index);
783
+ const weekend = [0, 6].includes(day.getUTCDay()) ? .62 : 1;
784
+ const launch = index >= 330 && index < 337 ? 1.7 : 1;
785
+ return {
786
+ day: day.toISOString().slice(0, 10),
787
+ visitors: Math.round((3900 + index * 7) * weekend * launch)
788
+ };
789
+ });
790
+ function Zoom() {
791
+ const $ = c(68);
792
+ const { i18n, t } = useWords("area-chart");
793
+ let t0;
794
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
795
+ t0 = [YEAR.length - 91, YEAR.length - 1];
796
+ $[0] = t0;
797
+ } else t0 = $[0];
798
+ const [range, setRange] = useState(t0);
799
+ const [t1, t2] = range;
800
+ const from = t1 === void 0 ? 0 : t1;
801
+ const to = t2 === void 0 ? 0 : t2;
802
+ let T0;
803
+ let T1;
804
+ let T2;
805
+ let t10;
806
+ let t3;
807
+ let t4;
808
+ let t5;
809
+ let t6;
810
+ let t7;
811
+ let t8;
812
+ let t9;
813
+ if ($[1] !== from || $[2] !== i18n.language || $[3] !== range || $[4] !== t || $[5] !== to) {
814
+ const dates = new Intl.DateTimeFormat(i18n.language, {
815
+ dateStyle: "medium",
816
+ timeZone: "UTC"
817
+ });
818
+ T2 = Stack;
819
+ let t11;
820
+ if ($[17] !== t) {
821
+ t11 = t("zoom.caption");
822
+ $[17] = t;
823
+ $[18] = t11;
824
+ } else t11 = $[18];
825
+ let t12;
826
+ if ($[19] !== from || $[20] !== to) {
827
+ t12 = YEAR.slice(from, to + 1);
828
+ $[19] = from;
829
+ $[20] = to;
830
+ $[21] = t12;
831
+ } else t12 = $[21];
832
+ let t13;
833
+ if ($[22] !== t) {
834
+ t13 = t("zoom.label");
835
+ $[22] = t;
836
+ $[23] = t13;
837
+ } else t13 = $[23];
838
+ let t14;
839
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
840
+ t14 = {
841
+ day: "numeric",
842
+ month: "short",
843
+ timeZone: "UTC"
844
+ };
845
+ $[24] = t14;
846
+ } else t14 = $[24];
847
+ let t15;
848
+ if ($[25] !== t) {
849
+ t15 = t("zoom.visitors");
850
+ $[25] = t;
851
+ $[26] = t15;
852
+ } else t15 = $[26];
853
+ let t16;
854
+ if ($[27] !== t15) {
855
+ t16 = [{
856
+ key: "visitors",
857
+ label: t15
858
+ }];
859
+ $[27] = t15;
860
+ $[28] = t16;
861
+ } else t16 = $[28];
862
+ if ($[29] !== t11 || $[30] !== t12 || $[31] !== t13 || $[32] !== t16) {
863
+ t10 = /* @__PURE__ */ jsx(AreaChart, {
864
+ caption: t11,
865
+ categoryKey: "day",
866
+ curve: "linear",
867
+ data: t12,
868
+ label: t13,
869
+ labelOptions: t14,
870
+ series: t16
871
+ });
872
+ $[29] = t11;
873
+ $[30] = t12;
874
+ $[31] = t13;
875
+ $[32] = t16;
876
+ $[33] = t10;
877
+ } else t10 = $[33];
878
+ T1 = Slider.Root;
879
+ t4 = (t17) => {
880
+ const { value } = t17;
881
+ return dates.format(dayAt(value));
882
+ };
883
+ t5 = YEAR.length - 1;
884
+ t6 = 6;
885
+ if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
886
+ t7 = (t18) => {
887
+ const { value: value_0 } = t18;
888
+ setRange(value_0);
889
+ };
890
+ $[34] = t7;
891
+ } else t7 = $[34];
892
+ t8 = range;
893
+ let t18;
894
+ if ($[35] !== t) {
895
+ t18 = t("zoom.range");
896
+ $[35] = t;
897
+ $[36] = t18;
898
+ } else t18 = $[36];
899
+ if ($[37] !== t18) {
900
+ t9 = /* @__PURE__ */ jsx(Slider.Label, { children: t18 });
901
+ $[37] = t18;
902
+ $[38] = t9;
903
+ } else t9 = $[38];
904
+ T0 = Slider.ValueText;
905
+ t3 = dates.formatRange(dayAt(from), dayAt(to));
906
+ $[1] = from;
907
+ $[2] = i18n.language;
908
+ $[3] = range;
909
+ $[4] = t;
910
+ $[5] = to;
911
+ $[6] = T0;
912
+ $[7] = T1;
913
+ $[8] = T2;
914
+ $[9] = t10;
915
+ $[10] = t3;
916
+ $[11] = t4;
917
+ $[12] = t5;
918
+ $[13] = t6;
919
+ $[14] = t7;
920
+ $[15] = t8;
921
+ $[16] = t9;
922
+ } else {
923
+ T0 = $[6];
924
+ T1 = $[7];
925
+ T2 = $[8];
926
+ t10 = $[9];
927
+ t3 = $[10];
928
+ t4 = $[11];
929
+ t5 = $[12];
930
+ t6 = $[13];
931
+ t7 = $[14];
932
+ t8 = $[15];
933
+ t9 = $[16];
934
+ }
935
+ let t11;
936
+ if ($[39] !== T0 || $[40] !== t3) {
937
+ t11 = /* @__PURE__ */ jsx(T0, { children: t3 });
938
+ $[39] = T0;
939
+ $[40] = t3;
940
+ $[41] = t11;
941
+ } else t11 = $[41];
942
+ let t12;
943
+ if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
944
+ t12 = /* @__PURE__ */ jsx(Slider.Track, { children: /* @__PURE__ */ jsx(Slider.Range, {}) });
945
+ $[42] = t12;
946
+ } else t12 = $[42];
947
+ let t13;
948
+ if ($[43] !== t) {
949
+ t13 = t("zoom.from");
950
+ $[43] = t;
951
+ $[44] = t13;
952
+ } else t13 = $[44];
953
+ let t14;
954
+ if ($[45] !== t13) {
955
+ t14 = /* @__PURE__ */ jsx(Slider.Thumb, {
956
+ index: 0,
957
+ label: t13
958
+ });
959
+ $[45] = t13;
960
+ $[46] = t14;
961
+ } else t14 = $[46];
962
+ let t15;
963
+ if ($[47] !== t) {
964
+ t15 = t("zoom.to");
965
+ $[47] = t;
966
+ $[48] = t15;
967
+ } else t15 = $[48];
968
+ let t16;
969
+ if ($[49] !== t15) {
970
+ t16 = /* @__PURE__ */ jsx(Slider.Thumb, {
971
+ index: 1,
972
+ label: t15
973
+ });
974
+ $[49] = t15;
975
+ $[50] = t16;
976
+ } else t16 = $[50];
977
+ let t17;
978
+ if ($[51] !== t14 || $[52] !== t16) {
979
+ t17 = /* @__PURE__ */ jsxs(Slider.Control, { children: [
980
+ t12,
981
+ t14,
982
+ t16
983
+ ] });
984
+ $[51] = t14;
985
+ $[52] = t16;
986
+ $[53] = t17;
987
+ } else t17 = $[53];
988
+ let t18;
989
+ if ($[54] !== T1 || $[55] !== t11 || $[56] !== t17 || $[57] !== t4 || $[58] !== t5 || $[59] !== t6 || $[60] !== t7 || $[61] !== t8 || $[62] !== t9) {
990
+ t18 = /* @__PURE__ */ jsxs(T1, {
991
+ getAriaValueText: t4,
992
+ max: t5,
993
+ minStepsBetweenThumbs: t6,
994
+ onValueChange: t7,
995
+ value: t8,
996
+ children: [
997
+ t9,
998
+ t11,
999
+ t17
1000
+ ]
1001
+ });
1002
+ $[54] = T1;
1003
+ $[55] = t11;
1004
+ $[56] = t17;
1005
+ $[57] = t4;
1006
+ $[58] = t5;
1007
+ $[59] = t6;
1008
+ $[60] = t7;
1009
+ $[61] = t8;
1010
+ $[62] = t9;
1011
+ $[63] = t18;
1012
+ } else t18 = $[63];
1013
+ let t19;
1014
+ if ($[64] !== T2 || $[65] !== t10 || $[66] !== t18) {
1015
+ t19 = /* @__PURE__ */ jsxs(T2, { children: [t10, t18] });
1016
+ $[64] = T2;
1017
+ $[65] = t10;
1018
+ $[66] = t18;
1019
+ $[67] = t19;
1020
+ } else t19 = $[67];
1021
+ return t19;
1022
+ }
1023
+ const source = "import { type ReactElement, useState } from \"react\";\n\nimport { Slider } from \"@stealthscale/component-forms\";\nimport { Stack } from \"@stealthscale/component-layout\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { AreaChart } from \"@stealthscale/component-charts\";\n\nfunction dayAt(index: number): Date {\n return new Date(Date.UTC(2025, 9, 1 + index));\n}\n\nconst YEAR = Array.from({ length: 365 }, (_, index) => {\n const day = dayAt(index);\n const weekend = [0, 6].includes(day.getUTCDay()) ? 0.62 : 1;\n const launch = index >= 330 && index < 337 ? 1.7 : 1;\n\n return {\n day: day.toISOString().slice(0, 10),\n visitors: Math.round((3900 + index * 7) * weekend * launch),\n };\n});\n\nexport function Zoom(): ReactElement {\n const { i18n, t } = useWords(\"area-chart\");\n const [range, setRange] = useState([YEAR.length - 91, YEAR.length - 1]);\n const [from = 0, to = 0] = range;\n const dates = new Intl.DateTimeFormat(i18n.language, { dateStyle: \"medium\", timeZone: \"UTC\" });\n\n return (\n <Stack>\n <AreaChart\n caption={t(\"zoom.caption\")}\n categoryKey=\"day\"\n curve=\"linear\"\n data={YEAR.slice(from, to + 1)}\n label={t(\"zoom.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n series={[{ key: \"visitors\", label: t(\"zoom.visitors\") }]}\n />\n <Slider.Root\n getAriaValueText={({ value }) => dates.format(dayAt(value))}\n max={YEAR.length - 1}\n minStepsBetweenThumbs={6}\n onValueChange={({ value }) => {\n setRange(value);\n }}\n value={range}\n >\n <Slider.Label>{t(\"zoom.range\")}</Slider.Label>\n <Slider.ValueText>{dates.formatRange(dayAt(from), dayAt(to))}</Slider.ValueText>\n <Slider.Control>\n <Slider.Track>\n <Slider.Range />\n </Slider.Track>\n <Slider.Thumb index={0} label={t(\"zoom.from\")} />\n <Slider.Thumb index={1} label={t(\"zoom.to\")} />\n </Slider.Control>\n </Slider.Root>\n </Stack>\n );\n}\n";
1024
+ //#endregion
1025
+ //#region src/area-chart/area-chart.specimen.tsx
1026
+ /**
1027
+ * Catalogue page for the area chart.
1028
+ *
1029
+ * @remarks
1030
+ * The area chart has no recipe of its own: the chart's recipe styles its figure, so every scene
1031
+ * is hand-written. The scenes render one area of storage in use, two overlapping areas of
1032
+ * traffic, the tooltip open at the busiest hour, the areas animated in with a replay, a series
1033
+ * hidden on the first render, a year of visitors zoomed with a range slider, the traffic at a
1034
+ * phone's width, and a day without readings. Every scene renders a component from `examples/`
1035
+ * and shows that file as its source. The words are keys under `area-chart` in
1036
+ * `locales/en/specimen/area-chart.json`.
1037
+ */
1038
+ /**
1039
+ * Hand-written scene for one area.
1040
+ */
1041
+ const one = {
1042
+ about: "area-chart.storage.about",
1043
+ draw: () => /* @__PURE__ */ jsx(Room, {
1044
+ size: "lg",
1045
+ children: /* @__PURE__ */ jsx(Storage, {})
1046
+ }),
1047
+ example: storage_example_exports,
1048
+ title: "area-chart.storage.title"
1049
+ };
1050
+ /**
1051
+ * Hand-written scene for two overlapping areas.
1052
+ */
1053
+ const overlapping = {
1054
+ about: "area-chart.bandwidth.about",
1055
+ draw: () => /* @__PURE__ */ jsx(Room, {
1056
+ size: "lg",
1057
+ children: /* @__PURE__ */ jsx(Bandwidth, {})
1058
+ }),
1059
+ example: bandwidth_example_exports,
1060
+ title: "area-chart.bandwidth.title"
1061
+ };
1062
+ /**
1063
+ * Hand-written scene for the tooltip open at a row.
1064
+ */
1065
+ const tooltip = {
1066
+ about: "area-chart.busiest.about",
1067
+ draw: () => /* @__PURE__ */ jsx(Room, {
1068
+ size: "lg",
1069
+ children: /* @__PURE__ */ jsx(Busiest, {})
1070
+ }),
1071
+ example: busiest_example_exports,
1072
+ title: "area-chart.busiest.title"
1073
+ };
1074
+ /**
1075
+ * Hand-written scene for the areas animated in, with a replay.
1076
+ */
1077
+ const animated = {
1078
+ about: "area-chart.replay.about",
1079
+ draw: () => /* @__PURE__ */ jsx(Room, {
1080
+ size: "lg",
1081
+ children: /* @__PURE__ */ jsx(Replay, {})
1082
+ }),
1083
+ example: replay_example_exports,
1084
+ title: "area-chart.replay.title"
1085
+ };
1086
+ /**
1087
+ * Hand-written scene for a series hidden on the first render.
1088
+ */
1089
+ const hidden = {
1090
+ about: "area-chart.internal.about",
1091
+ draw: () => /* @__PURE__ */ jsx(Room, {
1092
+ size: "lg",
1093
+ children: /* @__PURE__ */ jsx(Internal, {})
1094
+ }),
1095
+ example: internal_example_exports,
1096
+ title: "area-chart.internal.title"
1097
+ };
1098
+ /**
1099
+ * Hand-written scene for a year of rows zoomed with a range slider.
1100
+ */
1101
+ const zoomed = {
1102
+ about: "area-chart.zoom.about",
1103
+ draw: () => /* @__PURE__ */ jsx(Room, {
1104
+ size: "lg",
1105
+ children: /* @__PURE__ */ jsx(Zoom, {})
1106
+ }),
1107
+ example: zoom_example_exports,
1108
+ title: "area-chart.zoom.title"
1109
+ };
1110
+ /**
1111
+ * Hand-written scene for the traffic at a phone's width.
1112
+ */
1113
+ const narrow = {
1114
+ about: "area-chart.narrow.about",
1115
+ draw: () => /* @__PURE__ */ jsx(Room, {
1116
+ size: "xs",
1117
+ children: /* @__PURE__ */ jsx(Bandwidth, {})
1118
+ }),
1119
+ example: bandwidth_example_exports,
1120
+ title: "area-chart.narrow.title"
1121
+ };
1122
+ /**
1123
+ * Hand-written scene for a day without readings.
1124
+ */
1125
+ const empty = {
1126
+ about: "area-chart.offline.about",
1127
+ draw: () => /* @__PURE__ */ jsx(Room, {
1128
+ size: "md",
1129
+ children: /* @__PURE__ */ jsx(Offline, {})
1130
+ }),
1131
+ example: offline_example_exports,
1132
+ title: "area-chart.offline.title"
1133
+ };
1134
+ var area_chart_specimen_default = specimen({
1135
+ about: "area-chart.about",
1136
+ id: "components/charts/area-chart",
1137
+ imports: "import { AreaChart } from \"@stealthscale/component-charts\";",
1138
+ scenes: [
1139
+ one,
1140
+ overlapping,
1141
+ tooltip,
1142
+ animated,
1143
+ hidden,
1144
+ zoomed,
1145
+ narrow,
1146
+ empty
1147
+ ],
1148
+ title: "area-chart.title"
1149
+ });
1150
+ //#endregion
1151
+ export { animated, area_chart_specimen_default as default, empty, hidden, narrow, one, overlapping, tooltip, zoomed };