@stealthscale/component-charts 0.2.2 → 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 +1 -1
  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 +8 -7
  123. /package/dist/{recipe-BbGw00ut.js → recipes-BbGw00ut.js} +0 -0
@@ -0,0 +1,805 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { ct as BurndownChart, lt as burndownFinish } 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
+ //#region src/burndown-chart/examples/ahead.example.tsx
11
+ var ahead_example_exports = /* @__PURE__ */ __exportAll({
12
+ Ahead: () => Ahead,
13
+ source: () => source$5
14
+ });
15
+ const POINTS$5 = [
16
+ {
17
+ at: "2026-09-14",
18
+ remaining: 40
19
+ },
20
+ {
21
+ at: "2026-09-15",
22
+ remaining: 34
23
+ },
24
+ {
25
+ at: "2026-09-16",
26
+ remaining: 29
27
+ },
28
+ {
29
+ at: "2026-09-17",
30
+ remaining: 22
31
+ },
32
+ {
33
+ at: "2026-09-18",
34
+ remaining: 17
35
+ },
36
+ { at: "2026-09-21" },
37
+ { at: "2026-09-22" },
38
+ { at: "2026-09-23" },
39
+ { at: "2026-09-24" },
40
+ { at: "2026-09-25" }
41
+ ];
42
+ function Ahead() {
43
+ const $ = c(21);
44
+ const { t } = useWords("burndown-chart");
45
+ let t0;
46
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
47
+ t0 = burndownFinish(POINTS$5);
48
+ $[0] = t0;
49
+ } else t0 = $[0];
50
+ const finish = t0;
51
+ let t1;
52
+ if ($[1] !== t) {
53
+ t1 = finish === void 0 ? t("stalled") : t("finish", {
54
+ day: Math.ceil(finish) + 1,
55
+ days: POINTS$5.length
56
+ });
57
+ $[1] = t;
58
+ $[2] = t1;
59
+ } else t1 = $[2];
60
+ let t2;
61
+ if ($[3] !== t) {
62
+ t2 = t("ideal");
63
+ $[3] = t;
64
+ $[4] = t2;
65
+ } else t2 = $[4];
66
+ let t3;
67
+ if ($[5] !== t) {
68
+ t3 = t("ahead.label");
69
+ $[5] = t;
70
+ $[6] = t3;
71
+ } else t3 = $[6];
72
+ let t4;
73
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
74
+ t4 = {
75
+ day: "numeric",
76
+ month: "short",
77
+ timeZone: "UTC"
78
+ };
79
+ $[7] = t4;
80
+ } else t4 = $[7];
81
+ let t5;
82
+ if ($[8] !== t) {
83
+ t5 = t("series");
84
+ $[8] = t;
85
+ $[9] = t5;
86
+ } else t5 = $[9];
87
+ let t6;
88
+ if ($[10] !== t) {
89
+ t6 = t("projected");
90
+ $[10] = t;
91
+ $[11] = t6;
92
+ } else t6 = $[11];
93
+ let t7;
94
+ if ($[12] !== t) {
95
+ t7 = t("remaining");
96
+ $[12] = t;
97
+ $[13] = t7;
98
+ } else t7 = $[13];
99
+ let t8;
100
+ if ($[14] !== t1 || $[15] !== t2 || $[16] !== t3 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7) {
101
+ t8 = /* @__PURE__ */ jsx(BurndownChart, {
102
+ caption: t1,
103
+ idealLabel: t2,
104
+ label: t3,
105
+ labelOptions: t4,
106
+ legendLabel: t5,
107
+ points: POINTS$5,
108
+ projectedLabel: t6,
109
+ remainingLabel: t7
110
+ });
111
+ $[14] = t1;
112
+ $[15] = t2;
113
+ $[16] = t3;
114
+ $[17] = t5;
115
+ $[18] = t6;
116
+ $[19] = t7;
117
+ $[20] = t8;
118
+ } else t8 = $[20];
119
+ return t8;
120
+ }
121
+ const source$5 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { BurndownChart, burndownFinish } from \"@stealthscale/component-charts\";\n\nconst POINTS = [\n { at: \"2026-09-14\", remaining: 40 },\n { at: \"2026-09-15\", remaining: 34 },\n { at: \"2026-09-16\", remaining: 29 },\n { at: \"2026-09-17\", remaining: 22 },\n { at: \"2026-09-18\", remaining: 17 },\n { at: \"2026-09-21\" },\n { at: \"2026-09-22\" },\n { at: \"2026-09-23\" },\n { at: \"2026-09-24\" },\n { at: \"2026-09-25\" },\n];\n\nexport function Ahead(): ReactElement {\n const { t } = useWords(\"burndown-chart\");\n const finish = burndownFinish(POINTS);\n\n return (\n <BurndownChart\n caption={\n finish === undefined\n ? t(\"stalled\")\n : t(\"finish\", { day: Math.ceil(finish) + 1, days: POINTS.length })\n }\n idealLabel={t(\"ideal\")}\n label={t(\"ahead.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n points={POINTS}\n projectedLabel={t(\"projected\")}\n remainingLabel={t(\"remaining\")}\n />\n );\n}\n";
122
+ //#endregion
123
+ //#region src/burndown-chart/examples/quiet.example.tsx
124
+ var quiet_example_exports = /* @__PURE__ */ __exportAll({
125
+ Quiet: () => Quiet,
126
+ source: () => source$4
127
+ });
128
+ const POINTS$4 = [];
129
+ function Quiet() {
130
+ const $ = c(22);
131
+ const { t } = useWords("burndown-chart");
132
+ let t0;
133
+ if ($[0] !== t) {
134
+ t0 = t("quiet.caption");
135
+ $[0] = t;
136
+ $[1] = t0;
137
+ } else t0 = $[1];
138
+ let t1;
139
+ if ($[2] !== t) {
140
+ t1 = t("quiet.empty");
141
+ $[2] = t;
142
+ $[3] = t1;
143
+ } else t1 = $[3];
144
+ let t2;
145
+ if ($[4] !== t) {
146
+ t2 = t("ideal");
147
+ $[4] = t;
148
+ $[5] = t2;
149
+ } else t2 = $[5];
150
+ let t3;
151
+ if ($[6] !== t) {
152
+ t3 = t("sprint.label");
153
+ $[6] = t;
154
+ $[7] = t3;
155
+ } else t3 = $[7];
156
+ let t4;
157
+ if ($[8] !== t) {
158
+ t4 = t("series");
159
+ $[8] = t;
160
+ $[9] = t4;
161
+ } else t4 = $[9];
162
+ let t5;
163
+ if ($[10] !== t) {
164
+ t5 = t("projected");
165
+ $[10] = t;
166
+ $[11] = t5;
167
+ } else t5 = $[11];
168
+ let t6;
169
+ if ($[12] !== t) {
170
+ t6 = t("remaining");
171
+ $[12] = t;
172
+ $[13] = t6;
173
+ } else t6 = $[13];
174
+ let t7;
175
+ if ($[14] !== t0 || $[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== t6) {
176
+ t7 = /* @__PURE__ */ jsx(BurndownChart, {
177
+ caption: t0,
178
+ empty: t1,
179
+ idealLabel: t2,
180
+ label: t3,
181
+ legendLabel: t4,
182
+ points: POINTS$4,
183
+ projectedLabel: t5,
184
+ remainingLabel: t6
185
+ });
186
+ $[14] = t0;
187
+ $[15] = t1;
188
+ $[16] = t2;
189
+ $[17] = t3;
190
+ $[18] = t4;
191
+ $[19] = t5;
192
+ $[20] = t6;
193
+ $[21] = t7;
194
+ } else t7 = $[21];
195
+ return t7;
196
+ }
197
+ const source$4 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { BurndownChart } from \"@stealthscale/component-charts\";\n\nconst POINTS: Array<{ at: string; remaining?: number }> = [];\n\nexport function Quiet(): ReactElement {\n const { t } = useWords(\"burndown-chart\");\n\n return (\n <BurndownChart\n caption={t(\"quiet.caption\")}\n empty={t(\"quiet.empty\")}\n idealLabel={t(\"ideal\")}\n label={t(\"sprint.label\")}\n legendLabel={t(\"series\")}\n points={POINTS}\n projectedLabel={t(\"projected\")}\n remainingLabel={t(\"remaining\")}\n />\n );\n}\n";
198
+ //#endregion
199
+ //#region src/burndown-chart/examples/replay.example.tsx
200
+ var replay_example_exports = /* @__PURE__ */ __exportAll({
201
+ Replay: () => Replay,
202
+ source: () => source$3
203
+ });
204
+ const POINTS$3 = [
205
+ {
206
+ at: "2026-09-14",
207
+ remaining: 60
208
+ },
209
+ {
210
+ at: "2026-09-15",
211
+ remaining: 55
212
+ },
213
+ {
214
+ at: "2026-09-16",
215
+ remaining: 52
216
+ },
217
+ {
218
+ at: "2026-09-17",
219
+ remaining: 47
220
+ },
221
+ {
222
+ at: "2026-09-18",
223
+ remaining: 44
224
+ },
225
+ {
226
+ at: "2026-09-21",
227
+ remaining: 39
228
+ },
229
+ {
230
+ at: "2026-09-22",
231
+ remaining: 36
232
+ },
233
+ { at: "2026-09-23" },
234
+ { at: "2026-09-24" },
235
+ { at: "2026-09-25" }
236
+ ];
237
+ function Replay() {
238
+ const $ = c(33);
239
+ const { t } = useWords("burndown-chart");
240
+ const [run, setRun] = useState(0);
241
+ let t0;
242
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
243
+ t0 = burndownFinish(POINTS$3);
244
+ $[0] = t0;
245
+ } else t0 = $[0];
246
+ const finish = t0;
247
+ let t1;
248
+ if ($[1] !== t) {
249
+ t1 = finish === void 0 ? t("stalled") : t("finish", {
250
+ day: Math.ceil(finish) + 1,
251
+ days: POINTS$3.length
252
+ });
253
+ $[1] = t;
254
+ $[2] = t1;
255
+ } else t1 = $[2];
256
+ let t2;
257
+ if ($[3] !== t) {
258
+ t2 = t("ideal");
259
+ $[3] = t;
260
+ $[4] = t2;
261
+ } else t2 = $[4];
262
+ let t3;
263
+ if ($[5] !== t) {
264
+ t3 = t("sprint.label");
265
+ $[5] = t;
266
+ $[6] = t3;
267
+ } else t3 = $[6];
268
+ let t4;
269
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
270
+ t4 = {
271
+ day: "numeric",
272
+ month: "short",
273
+ timeZone: "UTC"
274
+ };
275
+ $[7] = t4;
276
+ } else t4 = $[7];
277
+ let t5;
278
+ if ($[8] !== t) {
279
+ t5 = t("series");
280
+ $[8] = t;
281
+ $[9] = t5;
282
+ } else t5 = $[9];
283
+ let t6;
284
+ if ($[10] !== t) {
285
+ t6 = t("projected");
286
+ $[10] = t;
287
+ $[11] = t6;
288
+ } else t6 = $[11];
289
+ let t7;
290
+ if ($[12] !== t) {
291
+ t7 = t("remaining");
292
+ $[12] = t;
293
+ $[13] = t7;
294
+ } else t7 = $[13];
295
+ let t8;
296
+ if ($[14] !== run || $[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t5 || $[19] !== t6 || $[20] !== t7) {
297
+ t8 = /* @__PURE__ */ jsx(BurndownChart, {
298
+ animate: true,
299
+ caption: t1,
300
+ idealLabel: t2,
301
+ label: t3,
302
+ labelOptions: t4,
303
+ legendLabel: t5,
304
+ points: POINTS$3,
305
+ projectedLabel: t6,
306
+ remainingLabel: t7
307
+ }, run);
308
+ $[14] = run;
309
+ $[15] = t1;
310
+ $[16] = t2;
311
+ $[17] = t3;
312
+ $[18] = t5;
313
+ $[19] = t6;
314
+ $[20] = t7;
315
+ $[21] = t8;
316
+ } else t8 = $[21];
317
+ let t9;
318
+ if ($[22] !== run) {
319
+ t9 = () => {
320
+ setRun(run + 1);
321
+ };
322
+ $[22] = run;
323
+ $[23] = t9;
324
+ } else t9 = $[23];
325
+ let t10;
326
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
327
+ t10 = /* @__PURE__ */ jsx(RotateCcwIcon, {});
328
+ $[24] = t10;
329
+ } else t10 = $[24];
330
+ let t11;
331
+ if ($[25] !== t) {
332
+ t11 = t("replay.replay");
333
+ $[25] = t;
334
+ $[26] = t11;
335
+ } else t11 = $[26];
336
+ let t12;
337
+ if ($[27] !== t11 || $[28] !== t9) {
338
+ t12 = /* @__PURE__ */ jsxs(Button, {
339
+ onClick: t9,
340
+ size: "sm",
341
+ variant: "outline",
342
+ children: [t10, t11]
343
+ });
344
+ $[27] = t11;
345
+ $[28] = t9;
346
+ $[29] = t12;
347
+ } else t12 = $[29];
348
+ let t13;
349
+ if ($[30] !== t12 || $[31] !== t8) {
350
+ t13 = /* @__PURE__ */ jsxs(Stack, {
351
+ align: "flex-start",
352
+ children: [t8, t12]
353
+ });
354
+ $[30] = t12;
355
+ $[31] = t8;
356
+ $[32] = t13;
357
+ } else t13 = $[32];
358
+ return t13;
359
+ }
360
+ const source$3 = "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 { BurndownChart, burndownFinish } from \"@stealthscale/component-charts\";\n\nconst POINTS = [\n { at: \"2026-09-14\", remaining: 60 },\n { at: \"2026-09-15\", remaining: 55 },\n { at: \"2026-09-16\", remaining: 52 },\n { at: \"2026-09-17\", remaining: 47 },\n { at: \"2026-09-18\", remaining: 44 },\n { at: \"2026-09-21\", remaining: 39 },\n { at: \"2026-09-22\", remaining: 36 },\n { at: \"2026-09-23\" },\n { at: \"2026-09-24\" },\n { at: \"2026-09-25\" },\n];\n\nexport function Replay(): ReactElement {\n const { t } = useWords(\"burndown-chart\");\n const [run, setRun] = useState(0);\n const finish = burndownFinish(POINTS);\n\n return (\n <Stack align=\"flex-start\">\n <BurndownChart\n animate\n caption={\n finish === undefined\n ? t(\"stalled\")\n : t(\"finish\", { day: Math.ceil(finish) + 1, days: POINTS.length })\n }\n idealLabel={t(\"ideal\")}\n key={run}\n label={t(\"sprint.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n points={POINTS}\n projectedLabel={t(\"projected\")}\n remainingLabel={t(\"remaining\")}\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";
361
+ //#endregion
362
+ //#region src/burndown-chart/examples/scope.example.tsx
363
+ var scope_example_exports = /* @__PURE__ */ __exportAll({
364
+ Scope: () => Scope,
365
+ source: () => source$2
366
+ });
367
+ const POINTS$2 = [
368
+ {
369
+ at: "2026-09-14",
370
+ remaining: 30
371
+ },
372
+ {
373
+ at: "2026-09-15",
374
+ remaining: 28
375
+ },
376
+ {
377
+ at: "2026-09-16",
378
+ remaining: 36
379
+ },
380
+ {
381
+ at: "2026-09-17",
382
+ remaining: 35
383
+ },
384
+ { at: "2026-09-18" },
385
+ { at: "2026-09-21" },
386
+ { at: "2026-09-22" },
387
+ { at: "2026-09-23" },
388
+ { at: "2026-09-24" },
389
+ { at: "2026-09-25" }
390
+ ];
391
+ function Scope() {
392
+ const $ = c(20);
393
+ const { t } = useWords("burndown-chart");
394
+ let t0;
395
+ if ($[0] !== t) {
396
+ t0 = t("scope.caption");
397
+ $[0] = t;
398
+ $[1] = t0;
399
+ } else t0 = $[1];
400
+ let t1;
401
+ if ($[2] !== t) {
402
+ t1 = t("ideal");
403
+ $[2] = t;
404
+ $[3] = t1;
405
+ } else t1 = $[3];
406
+ let t2;
407
+ if ($[4] !== t) {
408
+ t2 = t("scope.label");
409
+ $[4] = t;
410
+ $[5] = t2;
411
+ } else t2 = $[5];
412
+ let t3;
413
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
414
+ t3 = {
415
+ day: "numeric",
416
+ month: "short",
417
+ timeZone: "UTC"
418
+ };
419
+ $[6] = t3;
420
+ } else t3 = $[6];
421
+ let t4;
422
+ if ($[7] !== t) {
423
+ t4 = t("series");
424
+ $[7] = t;
425
+ $[8] = t4;
426
+ } else t4 = $[8];
427
+ let t5;
428
+ if ($[9] !== t) {
429
+ t5 = t("projected");
430
+ $[9] = t;
431
+ $[10] = t5;
432
+ } else t5 = $[10];
433
+ let t6;
434
+ if ($[11] !== t) {
435
+ t6 = t("remaining");
436
+ $[11] = t;
437
+ $[12] = t6;
438
+ } else t6 = $[12];
439
+ let t7;
440
+ if ($[13] !== t0 || $[14] !== t1 || $[15] !== t2 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6) {
441
+ t7 = /* @__PURE__ */ jsx(BurndownChart, {
442
+ caption: t0,
443
+ idealLabel: t1,
444
+ label: t2,
445
+ labelOptions: t3,
446
+ legendLabel: t4,
447
+ points: POINTS$2,
448
+ projectedLabel: t5,
449
+ remainingLabel: t6
450
+ });
451
+ $[13] = t0;
452
+ $[14] = t1;
453
+ $[15] = t2;
454
+ $[16] = t4;
455
+ $[17] = t5;
456
+ $[18] = t6;
457
+ $[19] = t7;
458
+ } else t7 = $[19];
459
+ return t7;
460
+ }
461
+ const source$2 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { BurndownChart } from \"@stealthscale/component-charts\";\n\nconst POINTS = [\n { at: \"2026-09-14\", remaining: 30 },\n { at: \"2026-09-15\", remaining: 28 },\n { at: \"2026-09-16\", remaining: 36 },\n { at: \"2026-09-17\", remaining: 35 },\n { at: \"2026-09-18\" },\n { at: \"2026-09-21\" },\n { at: \"2026-09-22\" },\n { at: \"2026-09-23\" },\n { at: \"2026-09-24\" },\n { at: \"2026-09-25\" },\n];\n\nexport function Scope(): ReactElement {\n const { t } = useWords(\"burndown-chart\");\n\n return (\n <BurndownChart\n caption={t(\"scope.caption\")}\n idealLabel={t(\"ideal\")}\n label={t(\"scope.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n points={POINTS}\n projectedLabel={t(\"projected\")}\n remainingLabel={t(\"remaining\")}\n />\n );\n}\n";
462
+ //#endregion
463
+ //#region src/burndown-chart/examples/sprint.example.tsx
464
+ var sprint_example_exports = /* @__PURE__ */ __exportAll({
465
+ Sprint: () => Sprint,
466
+ source: () => source$1
467
+ });
468
+ const POINTS$1 = [
469
+ {
470
+ at: "2026-09-14",
471
+ remaining: 60
472
+ },
473
+ {
474
+ at: "2026-09-15",
475
+ remaining: 55
476
+ },
477
+ {
478
+ at: "2026-09-16",
479
+ remaining: 52
480
+ },
481
+ {
482
+ at: "2026-09-17",
483
+ remaining: 47
484
+ },
485
+ {
486
+ at: "2026-09-18",
487
+ remaining: 44
488
+ },
489
+ {
490
+ at: "2026-09-21",
491
+ remaining: 39
492
+ },
493
+ {
494
+ at: "2026-09-22",
495
+ remaining: 36
496
+ },
497
+ { at: "2026-09-23" },
498
+ { at: "2026-09-24" },
499
+ { at: "2026-09-25" }
500
+ ];
501
+ function Sprint() {
502
+ const $ = c(21);
503
+ const { t } = useWords("burndown-chart");
504
+ let t0;
505
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
506
+ t0 = burndownFinish(POINTS$1);
507
+ $[0] = t0;
508
+ } else t0 = $[0];
509
+ const finish = t0;
510
+ let t1;
511
+ if ($[1] !== t) {
512
+ t1 = finish === void 0 ? t("stalled") : t("finish", {
513
+ day: Math.ceil(finish) + 1,
514
+ days: POINTS$1.length
515
+ });
516
+ $[1] = t;
517
+ $[2] = t1;
518
+ } else t1 = $[2];
519
+ let t2;
520
+ if ($[3] !== t) {
521
+ t2 = t("ideal");
522
+ $[3] = t;
523
+ $[4] = t2;
524
+ } else t2 = $[4];
525
+ let t3;
526
+ if ($[5] !== t) {
527
+ t3 = t("sprint.label");
528
+ $[5] = t;
529
+ $[6] = t3;
530
+ } else t3 = $[6];
531
+ let t4;
532
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
533
+ t4 = {
534
+ day: "numeric",
535
+ month: "short",
536
+ timeZone: "UTC"
537
+ };
538
+ $[7] = t4;
539
+ } else t4 = $[7];
540
+ let t5;
541
+ if ($[8] !== t) {
542
+ t5 = t("series");
543
+ $[8] = t;
544
+ $[9] = t5;
545
+ } else t5 = $[9];
546
+ let t6;
547
+ if ($[10] !== t) {
548
+ t6 = t("projected");
549
+ $[10] = t;
550
+ $[11] = t6;
551
+ } else t6 = $[11];
552
+ let t7;
553
+ if ($[12] !== t) {
554
+ t7 = t("remaining");
555
+ $[12] = t;
556
+ $[13] = t7;
557
+ } else t7 = $[13];
558
+ let t8;
559
+ if ($[14] !== t1 || $[15] !== t2 || $[16] !== t3 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7) {
560
+ t8 = /* @__PURE__ */ jsx(BurndownChart, {
561
+ caption: t1,
562
+ idealLabel: t2,
563
+ label: t3,
564
+ labelOptions: t4,
565
+ legendLabel: t5,
566
+ points: POINTS$1,
567
+ projectedLabel: t6,
568
+ remainingLabel: t7
569
+ });
570
+ $[14] = t1;
571
+ $[15] = t2;
572
+ $[16] = t3;
573
+ $[17] = t5;
574
+ $[18] = t6;
575
+ $[19] = t7;
576
+ $[20] = t8;
577
+ } else t8 = $[20];
578
+ return t8;
579
+ }
580
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { BurndownChart, burndownFinish } from \"@stealthscale/component-charts\";\n\nconst POINTS = [\n { at: \"2026-09-14\", remaining: 60 },\n { at: \"2026-09-15\", remaining: 55 },\n { at: \"2026-09-16\", remaining: 52 },\n { at: \"2026-09-17\", remaining: 47 },\n { at: \"2026-09-18\", remaining: 44 },\n { at: \"2026-09-21\", remaining: 39 },\n { at: \"2026-09-22\", remaining: 36 },\n { at: \"2026-09-23\" },\n { at: \"2026-09-24\" },\n { at: \"2026-09-25\" },\n];\n\nexport function Sprint(): ReactElement {\n const { t } = useWords(\"burndown-chart\");\n const finish = burndownFinish(POINTS);\n\n return (\n <BurndownChart\n caption={\n finish === undefined\n ? t(\"stalled\")\n : t(\"finish\", { day: Math.ceil(finish) + 1, days: POINTS.length })\n }\n idealLabel={t(\"ideal\")}\n label={t(\"sprint.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n points={POINTS}\n projectedLabel={t(\"projected\")}\n remainingLabel={t(\"remaining\")}\n />\n );\n}\n";
581
+ //#endregion
582
+ //#region src/burndown-chart/examples/today.example.tsx
583
+ var today_example_exports = /* @__PURE__ */ __exportAll({
584
+ Today: () => Today,
585
+ source: () => source
586
+ });
587
+ const POINTS = [
588
+ {
589
+ at: "2026-09-14",
590
+ remaining: 60
591
+ },
592
+ {
593
+ at: "2026-09-15",
594
+ remaining: 55
595
+ },
596
+ {
597
+ at: "2026-09-16",
598
+ remaining: 52
599
+ },
600
+ {
601
+ at: "2026-09-17",
602
+ remaining: 47
603
+ },
604
+ {
605
+ at: "2026-09-18",
606
+ remaining: 44
607
+ },
608
+ {
609
+ at: "2026-09-21",
610
+ remaining: 39
611
+ },
612
+ {
613
+ at: "2026-09-22",
614
+ remaining: 36
615
+ },
616
+ { at: "2026-09-23" },
617
+ { at: "2026-09-24" },
618
+ { at: "2026-09-25" }
619
+ ];
620
+ function Today() {
621
+ const $ = c(20);
622
+ const { t } = useWords("burndown-chart");
623
+ let t0;
624
+ if ($[0] !== t) {
625
+ t0 = t("today.caption");
626
+ $[0] = t;
627
+ $[1] = t0;
628
+ } else t0 = $[1];
629
+ let t1;
630
+ if ($[2] !== t) {
631
+ t1 = t("ideal");
632
+ $[2] = t;
633
+ $[3] = t1;
634
+ } else t1 = $[3];
635
+ let t2;
636
+ if ($[4] !== t) {
637
+ t2 = t("sprint.label");
638
+ $[4] = t;
639
+ $[5] = t2;
640
+ } else t2 = $[5];
641
+ let t3;
642
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
643
+ t3 = {
644
+ day: "numeric",
645
+ month: "short",
646
+ timeZone: "UTC"
647
+ };
648
+ $[6] = t3;
649
+ } else t3 = $[6];
650
+ let t4;
651
+ if ($[7] !== t) {
652
+ t4 = t("series");
653
+ $[7] = t;
654
+ $[8] = t4;
655
+ } else t4 = $[8];
656
+ let t5;
657
+ if ($[9] !== t) {
658
+ t5 = t("projected");
659
+ $[9] = t;
660
+ $[10] = t5;
661
+ } else t5 = $[10];
662
+ let t6;
663
+ if ($[11] !== t) {
664
+ t6 = t("remaining");
665
+ $[11] = t;
666
+ $[12] = t6;
667
+ } else t6 = $[12];
668
+ let t7;
669
+ if ($[13] !== t0 || $[14] !== t1 || $[15] !== t2 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6) {
670
+ t7 = /* @__PURE__ */ jsx(BurndownChart, {
671
+ caption: t0,
672
+ defaultIndex: 6,
673
+ idealLabel: t1,
674
+ label: t2,
675
+ labelOptions: t3,
676
+ legendLabel: t4,
677
+ points: POINTS,
678
+ projectedLabel: t5,
679
+ remainingLabel: t6
680
+ });
681
+ $[13] = t0;
682
+ $[14] = t1;
683
+ $[15] = t2;
684
+ $[16] = t4;
685
+ $[17] = t5;
686
+ $[18] = t6;
687
+ $[19] = t7;
688
+ } else t7 = $[19];
689
+ return t7;
690
+ }
691
+ const source = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { BurndownChart } from \"@stealthscale/component-charts\";\n\nconst POINTS = [\n { at: \"2026-09-14\", remaining: 60 },\n { at: \"2026-09-15\", remaining: 55 },\n { at: \"2026-09-16\", remaining: 52 },\n { at: \"2026-09-17\", remaining: 47 },\n { at: \"2026-09-18\", remaining: 44 },\n { at: \"2026-09-21\", remaining: 39 },\n { at: \"2026-09-22\", remaining: 36 },\n { at: \"2026-09-23\" },\n { at: \"2026-09-24\" },\n { at: \"2026-09-25\" },\n];\n\nexport function Today(): ReactElement {\n const { t } = useWords(\"burndown-chart\");\n\n return (\n <BurndownChart\n caption={t(\"today.caption\")}\n defaultIndex={6}\n idealLabel={t(\"ideal\")}\n label={t(\"sprint.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n legendLabel={t(\"series\")}\n points={POINTS}\n projectedLabel={t(\"projected\")}\n remainingLabel={t(\"remaining\")}\n />\n );\n}\n";
692
+ //#endregion
693
+ //#region src/burndown-chart/burndown-chart.specimen.tsx
694
+ /**
695
+ * Catalogue page for the burndown chart.
696
+ *
697
+ * @remarks
698
+ * The burndown chart has no recipe of its own: the chart's recipe styles its figure, so every
699
+ * scene is hand-written. The scenes render a sprint behind its plan, one ahead of it, one whose
700
+ * work grew, the tooltip open at the last reading, the lines animated in with a replay, the
701
+ * sprint at a phone's width, and a sprint without periods. Every scene renders a component from
702
+ * `examples/` and shows that file as its source. The words are keys under `burndown-chart` in
703
+ * `locales/en/specimen/burndown-chart.json`.
704
+ */
705
+ /**
706
+ * Hand-written scene for a sprint behind its plan.
707
+ */
708
+ const behind = {
709
+ about: "burndown-chart.sprint.about",
710
+ draw: () => /* @__PURE__ */ jsx(Room, {
711
+ size: "lg",
712
+ children: /* @__PURE__ */ jsx(Sprint, {})
713
+ }),
714
+ example: sprint_example_exports,
715
+ title: "burndown-chart.sprint.title"
716
+ };
717
+ /**
718
+ * Hand-written scene for a sprint ahead of its plan.
719
+ */
720
+ const early = {
721
+ about: "burndown-chart.ahead.about",
722
+ draw: () => /* @__PURE__ */ jsx(Room, {
723
+ size: "lg",
724
+ children: /* @__PURE__ */ jsx(Ahead, {})
725
+ }),
726
+ example: ahead_example_exports,
727
+ title: "burndown-chart.ahead.title"
728
+ };
729
+ /**
730
+ * Hand-written scene for work that grew, without a projection.
731
+ */
732
+ const grown = {
733
+ about: "burndown-chart.scope.about",
734
+ draw: () => /* @__PURE__ */ jsx(Room, {
735
+ size: "lg",
736
+ children: /* @__PURE__ */ jsx(Scope, {})
737
+ }),
738
+ example: scope_example_exports,
739
+ title: "burndown-chart.scope.title"
740
+ };
741
+ /**
742
+ * Hand-written scene for the tooltip open at a row.
743
+ */
744
+ const tooltip = {
745
+ about: "burndown-chart.today.about",
746
+ draw: () => /* @__PURE__ */ jsx(Room, {
747
+ size: "lg",
748
+ children: /* @__PURE__ */ jsx(Today, {})
749
+ }),
750
+ example: today_example_exports,
751
+ title: "burndown-chart.today.title"
752
+ };
753
+ /**
754
+ * Hand-written scene for the lines animated in, with a replay.
755
+ */
756
+ const animated = {
757
+ about: "burndown-chart.replay.about",
758
+ draw: () => /* @__PURE__ */ jsx(Room, {
759
+ size: "lg",
760
+ children: /* @__PURE__ */ jsx(Replay, {})
761
+ }),
762
+ example: replay_example_exports,
763
+ title: "burndown-chart.replay.title"
764
+ };
765
+ /**
766
+ * Hand-written scene for the sprint at a phone's width.
767
+ */
768
+ const narrow = {
769
+ about: "burndown-chart.narrow.about",
770
+ draw: () => /* @__PURE__ */ jsx(Room, {
771
+ size: "xs",
772
+ children: /* @__PURE__ */ jsx(Sprint, {})
773
+ }),
774
+ example: sprint_example_exports,
775
+ title: "burndown-chart.narrow.title"
776
+ };
777
+ /**
778
+ * Hand-written scene for a sprint without periods.
779
+ */
780
+ const empty = {
781
+ about: "burndown-chart.quiet.about",
782
+ draw: () => /* @__PURE__ */ jsx(Room, {
783
+ size: "md",
784
+ children: /* @__PURE__ */ jsx(Quiet, {})
785
+ }),
786
+ example: quiet_example_exports,
787
+ title: "burndown-chart.quiet.title"
788
+ };
789
+ var burndown_chart_specimen_default = specimen({
790
+ about: "burndown-chart.about",
791
+ id: "components/charts/burndown-chart",
792
+ imports: "import { BurndownChart } from \"@stealthscale/component-charts\";",
793
+ scenes: [
794
+ behind,
795
+ early,
796
+ grown,
797
+ tooltip,
798
+ animated,
799
+ narrow,
800
+ empty
801
+ ],
802
+ title: "burndown-chart.title"
803
+ });
804
+ //#endregion
805
+ export { animated, behind, burndown_chart_specimen_default as default, early, empty, grown, narrow, tooltip };