@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,853 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { Mt as colorOf, at as CandlestickChart } 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 { ReferenceLine } from "recharts";
7
+ import { Room, specimen, useWords } from "@stealthscale/specimen";
8
+ import { RotateCcwIcon } from "lucide-react";
9
+ import { Button } from "@stealthscale/component-actions";
10
+ import { Stack } from "@stealthscale/component-layout";
11
+ //#region src/candlestick-chart/examples/acme.ts
12
+ /**
13
+ * Lists the daily prices in dollars of a share, ACME, over the 22 trading days of September 2026,
14
+ * which the candlestick chart's examples share: it opened the month at $156.22 and closed it at
15
+ * $176.03.
16
+ */
17
+ const ACME = [
18
+ {
19
+ close: 154.87,
20
+ day: "2026-09-01",
21
+ high: 156.81,
22
+ low: 153.08,
23
+ open: 156.22
24
+ },
25
+ {
26
+ close: 155.25,
27
+ day: "2026-09-02",
28
+ high: 156.72,
29
+ low: 153.4,
30
+ open: 154.6
31
+ },
32
+ {
33
+ close: 158.24,
34
+ day: "2026-09-03",
35
+ high: 159.43,
36
+ low: 153.9,
37
+ open: 155.19
38
+ },
39
+ {
40
+ close: 159.72,
41
+ day: "2026-09-04",
42
+ high: 161.19,
43
+ low: 155.99,
44
+ open: 157.93
45
+ },
46
+ {
47
+ close: 161.9,
48
+ day: "2026-09-07",
49
+ high: 162.25,
50
+ low: 159.16,
51
+ open: 159.31
52
+ },
53
+ {
54
+ close: 160.61,
55
+ day: "2026-09-08",
56
+ high: 162.06,
57
+ low: 158.67,
58
+ open: 161.6
59
+ },
60
+ {
61
+ close: 160.88,
62
+ day: "2026-09-09",
63
+ high: 162.74,
64
+ low: 159.88,
65
+ open: 160.37
66
+ },
67
+ {
68
+ close: 165.92,
69
+ day: "2026-09-10",
70
+ high: 168.03,
71
+ low: 160.18,
72
+ open: 160.45
73
+ },
74
+ {
75
+ close: 165,
76
+ day: "2026-09-11",
77
+ high: 165.95,
78
+ low: 164.31,
79
+ open: 165.77
80
+ },
81
+ {
82
+ close: 167.78,
83
+ day: "2026-09-14",
84
+ high: 168.81,
85
+ low: 163.8,
86
+ open: 165.28
87
+ },
88
+ {
89
+ close: 165.28,
90
+ day: "2026-09-15",
91
+ high: 168.8,
92
+ low: 164.39,
93
+ open: 168.46
94
+ },
95
+ {
96
+ close: 161.79,
97
+ day: "2026-09-16",
98
+ high: 166.24,
99
+ low: 160.3,
100
+ open: 165.1
101
+ },
102
+ {
103
+ close: 167.15,
104
+ day: "2026-09-17",
105
+ high: 167.16,
106
+ low: 161.48,
107
+ open: 161.76
108
+ },
109
+ {
110
+ close: 168.02,
111
+ day: "2026-09-18",
112
+ high: 168.13,
113
+ low: 166.04,
114
+ open: 166.78
115
+ },
116
+ {
117
+ close: 170.25,
118
+ day: "2026-09-21",
119
+ high: 171.16,
120
+ low: 167.04,
121
+ open: 167.91
122
+ },
123
+ {
124
+ close: 173.2,
125
+ day: "2026-09-22",
126
+ high: 173.94,
127
+ low: 169.91,
128
+ open: 170.43
129
+ },
130
+ {
131
+ close: 172.07,
132
+ day: "2026-09-23",
133
+ high: 173.67,
134
+ low: 171.87,
135
+ open: 173.2
136
+ },
137
+ {
138
+ close: 171.96,
139
+ day: "2026-09-24",
140
+ high: 173.44,
141
+ low: 171.4,
142
+ open: 172.7
143
+ },
144
+ {
145
+ close: 180.02,
146
+ day: "2026-09-25",
147
+ high: 181.37,
148
+ low: 171.51,
149
+ open: 172.08
150
+ },
151
+ {
152
+ close: 178.14,
153
+ day: "2026-09-28",
154
+ high: 181.66,
155
+ low: 177.91,
156
+ open: 180.03
157
+ },
158
+ {
159
+ close: 181.08,
160
+ day: "2026-09-29",
161
+ high: 181.55,
162
+ low: 177.44,
163
+ open: 178.49
164
+ },
165
+ {
166
+ close: 176.03,
167
+ day: "2026-09-30",
168
+ high: 182.42,
169
+ low: 176.03,
170
+ open: 181.19
171
+ }
172
+ ];
173
+ //#endregion
174
+ //#region src/candlestick-chart/examples/busiest.example.tsx
175
+ var busiest_example_exports = /* @__PURE__ */ __exportAll({
176
+ Busiest: () => Busiest,
177
+ source: () => source$5
178
+ });
179
+ function Busiest() {
180
+ const $ = c(9);
181
+ const { t } = useWords("candlestick-chart");
182
+ let t0;
183
+ if ($[0] !== t) {
184
+ t0 = t("busiest.caption");
185
+ $[0] = t;
186
+ $[1] = t0;
187
+ } else t0 = $[1];
188
+ let t1;
189
+ if ($[2] !== t) {
190
+ t1 = t("daily.label");
191
+ $[2] = t;
192
+ $[3] = t1;
193
+ } else t1 = $[3];
194
+ let t2;
195
+ let t3;
196
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
197
+ t2 = {
198
+ day: "numeric",
199
+ month: "short",
200
+ timeZone: "UTC"
201
+ };
202
+ t3 = {
203
+ currency: "USD",
204
+ style: "currency"
205
+ };
206
+ $[4] = t2;
207
+ $[5] = t3;
208
+ } else {
209
+ t2 = $[4];
210
+ t3 = $[5];
211
+ }
212
+ let t4;
213
+ if ($[6] !== t0 || $[7] !== t1) {
214
+ t4 = /* @__PURE__ */ jsx(CandlestickChart, {
215
+ caption: t0,
216
+ categoryKey: "day",
217
+ data: ACME,
218
+ defaultIndex: 18,
219
+ label: t1,
220
+ labelOptions: t2,
221
+ valueOptions: t3
222
+ });
223
+ $[6] = t0;
224
+ $[7] = t1;
225
+ $[8] = t4;
226
+ } else t4 = $[8];
227
+ return t4;
228
+ }
229
+ const source$5 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { CandlestickChart } from \"@stealthscale/component-charts\";\n\nimport { ACME } from \"./acme.ts\";\n\nexport function Busiest(): ReactElement {\n const { t } = useWords(\"candlestick-chart\");\n\n return (\n <CandlestickChart\n caption={t(\"busiest.caption\")}\n categoryKey=\"day\"\n data={ACME}\n defaultIndex={18}\n label={t(\"daily.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n valueOptions={{ currency: \"USD\", style: \"currency\" }}\n />\n );\n}\n";
230
+ //#endregion
231
+ //#region src/candlestick-chart/examples/daily.example.tsx
232
+ var daily_example_exports = /* @__PURE__ */ __exportAll({
233
+ Daily: () => Daily,
234
+ source: () => source$4
235
+ });
236
+ function Daily() {
237
+ const $ = c(9);
238
+ const { t } = useWords("candlestick-chart");
239
+ let t0;
240
+ if ($[0] !== t) {
241
+ t0 = t("daily.caption");
242
+ $[0] = t;
243
+ $[1] = t0;
244
+ } else t0 = $[1];
245
+ let t1;
246
+ if ($[2] !== t) {
247
+ t1 = t("daily.label");
248
+ $[2] = t;
249
+ $[3] = t1;
250
+ } else t1 = $[3];
251
+ let t2;
252
+ let t3;
253
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
254
+ t2 = {
255
+ day: "numeric",
256
+ month: "short",
257
+ timeZone: "UTC"
258
+ };
259
+ t3 = {
260
+ currency: "USD",
261
+ style: "currency"
262
+ };
263
+ $[4] = t2;
264
+ $[5] = t3;
265
+ } else {
266
+ t2 = $[4];
267
+ t3 = $[5];
268
+ }
269
+ let t4;
270
+ if ($[6] !== t0 || $[7] !== t1) {
271
+ t4 = /* @__PURE__ */ jsx(CandlestickChart, {
272
+ caption: t0,
273
+ categoryKey: "day",
274
+ data: ACME,
275
+ label: t1,
276
+ labelOptions: t2,
277
+ valueOptions: t3
278
+ });
279
+ $[6] = t0;
280
+ $[7] = t1;
281
+ $[8] = t4;
282
+ } else t4 = $[8];
283
+ return t4;
284
+ }
285
+ const source$4 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { CandlestickChart } from \"@stealthscale/component-charts\";\n\nimport { ACME } from \"./acme.ts\";\n\nexport function Daily(): ReactElement {\n const { t } = useWords(\"candlestick-chart\");\n\n return (\n <CandlestickChart\n caption={t(\"daily.caption\")}\n categoryKey=\"day\"\n data={ACME}\n label={t(\"daily.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n valueOptions={{ currency: \"USD\", style: \"currency\" }}\n />\n );\n}\n";
286
+ //#endregion
287
+ //#region src/candlestick-chart/examples/opening.example.tsx
288
+ var opening_example_exports = /* @__PURE__ */ __exportAll({
289
+ Opening: () => Opening,
290
+ source: () => source$3
291
+ });
292
+ function Opening() {
293
+ const $ = c(17);
294
+ const { t } = useWords("candlestick-chart");
295
+ let t0;
296
+ if ($[0] !== t) {
297
+ t0 = t("opening.caption");
298
+ $[0] = t;
299
+ $[1] = t0;
300
+ } else t0 = $[1];
301
+ let t1;
302
+ if ($[2] !== t) {
303
+ t1 = t("daily.label");
304
+ $[2] = t;
305
+ $[3] = t1;
306
+ } else t1 = $[3];
307
+ let t2;
308
+ let t3;
309
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
310
+ t2 = {
311
+ day: "numeric",
312
+ month: "short",
313
+ timeZone: "UTC"
314
+ };
315
+ t3 = {
316
+ currency: "USD",
317
+ style: "currency"
318
+ };
319
+ $[4] = t2;
320
+ $[5] = t3;
321
+ } else {
322
+ t2 = $[4];
323
+ t3 = $[5];
324
+ }
325
+ let t4;
326
+ if ($[6] !== t) {
327
+ t4 = t("opening.open");
328
+ $[6] = t;
329
+ $[7] = t4;
330
+ } else t4 = $[7];
331
+ let t5;
332
+ if ($[8] !== t4) {
333
+ t5 = {
334
+ position: "insideTopRight",
335
+ value: t4
336
+ };
337
+ $[8] = t4;
338
+ $[9] = t5;
339
+ } else t5 = $[9];
340
+ let t6;
341
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
342
+ t6 = colorOf("neutral");
343
+ $[10] = t6;
344
+ } else t6 = $[10];
345
+ let t7;
346
+ if ($[11] !== t5) {
347
+ t7 = /* @__PURE__ */ jsx(ReferenceLine, {
348
+ label: t5,
349
+ stroke: t6,
350
+ strokeDasharray: "6 4",
351
+ y: 156.22
352
+ });
353
+ $[11] = t5;
354
+ $[12] = t7;
355
+ } else t7 = $[12];
356
+ let t8;
357
+ if ($[13] !== t0 || $[14] !== t1 || $[15] !== t7) {
358
+ t8 = /* @__PURE__ */ jsx(CandlestickChart, {
359
+ caption: t0,
360
+ categoryKey: "day",
361
+ data: ACME,
362
+ label: t1,
363
+ labelOptions: t2,
364
+ valueOptions: t3,
365
+ children: t7
366
+ });
367
+ $[13] = t0;
368
+ $[14] = t1;
369
+ $[15] = t7;
370
+ $[16] = t8;
371
+ } else t8 = $[16];
372
+ return t8;
373
+ }
374
+ const source$3 = "import { type ReactElement } from \"react\";\n\nimport { ReferenceLine } from \"recharts\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { CandlestickChart, Chart } from \"@stealthscale/component-charts\";\n\nimport { ACME } from \"./acme.ts\";\n\nexport function Opening(): ReactElement {\n const { t } = useWords(\"candlestick-chart\");\n\n return (\n <CandlestickChart\n caption={t(\"opening.caption\")}\n categoryKey=\"day\"\n data={ACME}\n label={t(\"daily.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n valueOptions={{ currency: \"USD\", style: \"currency\" }}\n >\n <ReferenceLine\n label={{ position: \"insideTopRight\", value: t(\"opening.open\") }}\n stroke={Chart.colorOf(\"neutral\")}\n strokeDasharray=\"6 4\"\n y={156.22}\n />\n </CandlestickChart>\n );\n}\n";
375
+ //#endregion
376
+ //#region src/candlestick-chart/examples/euro.ts
377
+ /**
378
+ * Lists the daily rates of the euro in dollars over the 22 trading days of September 2026, which
379
+ * the candlestick chart's examples share: the rate opened the month at 1.0917, closed it at 1.1059,
380
+ * and closed September 14 where it opened.
381
+ */
382
+ const EURO = [
383
+ {
384
+ close: 1.0921,
385
+ day: "2026-09-01",
386
+ high: 1.0922,
387
+ low: 1.091,
388
+ open: 1.0917
389
+ },
390
+ {
391
+ close: 1.0948,
392
+ day: "2026-09-02",
393
+ high: 1.0948,
394
+ low: 1.0913,
395
+ open: 1.0918
396
+ },
397
+ {
398
+ close: 1.0905,
399
+ day: "2026-09-03",
400
+ high: 1.0945,
401
+ low: 1.0883,
402
+ open: 1.0937
403
+ },
404
+ {
405
+ close: 1.0914,
406
+ day: "2026-09-04",
407
+ high: 1.0929,
408
+ low: 1.0906,
409
+ open: 1.0915
410
+ },
411
+ {
412
+ close: 1.0814,
413
+ day: "2026-09-07",
414
+ high: 1.087,
415
+ low: 1.0803,
416
+ open: 1.086
417
+ },
418
+ {
419
+ close: 1.0839,
420
+ day: "2026-09-08",
421
+ high: 1.0858,
422
+ low: 1.083,
423
+ open: 1.0845
424
+ },
425
+ {
426
+ close: 1.0838,
427
+ day: "2026-09-09",
428
+ high: 1.0857,
429
+ low: 1.0823,
430
+ open: 1.083
431
+ },
432
+ {
433
+ close: 1.0832,
434
+ day: "2026-09-10",
435
+ high: 1.0859,
436
+ low: 1.0826,
437
+ open: 1.0852
438
+ },
439
+ {
440
+ close: 1.0811,
441
+ day: "2026-09-11",
442
+ high: 1.0824,
443
+ low: 1.0796,
444
+ open: 1.0803
445
+ },
446
+ {
447
+ close: 1.0799,
448
+ day: "2026-09-14",
449
+ high: 1.0803,
450
+ low: 1.0799,
451
+ open: 1.0799
452
+ },
453
+ {
454
+ close: 1.0832,
455
+ day: "2026-09-15",
456
+ high: 1.0844,
457
+ low: 1.0781,
458
+ open: 1.0795
459
+ },
460
+ {
461
+ close: 1.0884,
462
+ day: "2026-09-16",
463
+ high: 1.0892,
464
+ low: 1.0872,
465
+ open: 1.0883
466
+ },
467
+ {
468
+ close: 1.088,
469
+ day: "2026-09-17",
470
+ high: 1.0907,
471
+ low: 1.084,
472
+ open: 1.0869
473
+ },
474
+ {
475
+ close: 1.0865,
476
+ day: "2026-09-18",
477
+ high: 1.0903,
478
+ low: 1.0854,
479
+ open: 1.0899
480
+ },
481
+ {
482
+ close: 1.0932,
483
+ day: "2026-09-21",
484
+ high: 1.0942,
485
+ low: 1.0908,
486
+ open: 1.0922
487
+ },
488
+ {
489
+ close: 1.0888,
490
+ day: "2026-09-22",
491
+ high: 1.092,
492
+ low: 1.0883,
493
+ open: 1.0918
494
+ },
495
+ {
496
+ close: 1.0932,
497
+ day: "2026-09-23",
498
+ high: 1.0938,
499
+ low: 1.0903,
500
+ open: 1.0914
501
+ },
502
+ {
503
+ close: 1.0941,
504
+ day: "2026-09-24",
505
+ high: 1.0942,
506
+ low: 1.0916,
507
+ open: 1.0929
508
+ },
509
+ {
510
+ close: 1.0966,
511
+ day: "2026-09-25",
512
+ high: 1.0976,
513
+ low: 1.0929,
514
+ open: 1.0938
515
+ },
516
+ {
517
+ close: 1.0984,
518
+ day: "2026-09-28",
519
+ high: 1.1014,
520
+ low: 1.0957,
521
+ open: 1.0981
522
+ },
523
+ {
524
+ close: 1.1056,
525
+ day: "2026-09-29",
526
+ high: 1.108,
527
+ low: 1.0994,
528
+ open: 1.1009
529
+ },
530
+ {
531
+ close: 1.1059,
532
+ day: "2026-09-30",
533
+ high: 1.1068,
534
+ low: 1.1033,
535
+ open: 1.1064
536
+ }
537
+ ];
538
+ //#endregion
539
+ //#region src/candlestick-chart/examples/pair.example.tsx
540
+ var pair_example_exports = /* @__PURE__ */ __exportAll({
541
+ Pair: () => Pair,
542
+ source: () => source$2
543
+ });
544
+ function Pair() {
545
+ const $ = c(9);
546
+ const { t } = useWords("candlestick-chart");
547
+ let t0;
548
+ if ($[0] !== t) {
549
+ t0 = t("pair.caption");
550
+ $[0] = t;
551
+ $[1] = t0;
552
+ } else t0 = $[1];
553
+ let t1;
554
+ if ($[2] !== t) {
555
+ t1 = t("pair.label");
556
+ $[2] = t;
557
+ $[3] = t1;
558
+ } else t1 = $[3];
559
+ let t2;
560
+ let t3;
561
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
562
+ t2 = {
563
+ day: "numeric",
564
+ month: "short",
565
+ timeZone: "UTC"
566
+ };
567
+ t3 = {
568
+ maximumFractionDigits: 4,
569
+ minimumFractionDigits: 4
570
+ };
571
+ $[4] = t2;
572
+ $[5] = t3;
573
+ } else {
574
+ t2 = $[4];
575
+ t3 = $[5];
576
+ }
577
+ let t4;
578
+ if ($[6] !== t0 || $[7] !== t1) {
579
+ t4 = /* @__PURE__ */ jsx(CandlestickChart, {
580
+ caption: t0,
581
+ categoryKey: "day",
582
+ data: EURO,
583
+ label: t1,
584
+ labelOptions: t2,
585
+ valueOptions: t3
586
+ });
587
+ $[6] = t0;
588
+ $[7] = t1;
589
+ $[8] = t4;
590
+ } else t4 = $[8];
591
+ return t4;
592
+ }
593
+ const source$2 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { CandlestickChart } from \"@stealthscale/component-charts\";\n\nimport { EURO } from \"./euro.ts\";\n\nexport function Pair(): ReactElement {\n const { t } = useWords(\"candlestick-chart\");\n\n return (\n <CandlestickChart\n caption={t(\"pair.caption\")}\n categoryKey=\"day\"\n data={EURO}\n label={t(\"pair.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n valueOptions={{ maximumFractionDigits: 4, minimumFractionDigits: 4 }}\n />\n );\n}\n";
594
+ //#endregion
595
+ //#region src/candlestick-chart/examples/quiet.example.tsx
596
+ var quiet_example_exports = /* @__PURE__ */ __exportAll({
597
+ Quiet: () => Quiet,
598
+ source: () => source$1
599
+ });
600
+ const DAYS = [];
601
+ function Quiet() {
602
+ const $ = c(10);
603
+ const { t } = useWords("candlestick-chart");
604
+ let t0;
605
+ if ($[0] !== t) {
606
+ t0 = t("quiet.caption");
607
+ $[0] = t;
608
+ $[1] = t0;
609
+ } else t0 = $[1];
610
+ let t1;
611
+ if ($[2] !== t) {
612
+ t1 = t("quiet.empty");
613
+ $[2] = t;
614
+ $[3] = t1;
615
+ } else t1 = $[3];
616
+ let t2;
617
+ if ($[4] !== t) {
618
+ t2 = t("daily.label");
619
+ $[4] = t;
620
+ $[5] = t2;
621
+ } else t2 = $[5];
622
+ let t3;
623
+ if ($[6] !== t0 || $[7] !== t1 || $[8] !== t2) {
624
+ t3 = /* @__PURE__ */ jsx(CandlestickChart, {
625
+ caption: t0,
626
+ categoryKey: "day",
627
+ data: DAYS,
628
+ empty: t1,
629
+ label: t2
630
+ });
631
+ $[6] = t0;
632
+ $[7] = t1;
633
+ $[8] = t2;
634
+ $[9] = t3;
635
+ } else t3 = $[9];
636
+ return t3;
637
+ }
638
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { CandlestickChart } from \"@stealthscale/component-charts\";\n\nconst DAYS: Array<{ close: number; day: string; high: number; low: number; open: number }> = [];\n\nexport function Quiet(): ReactElement {\n const { t } = useWords(\"candlestick-chart\");\n\n return (\n <CandlestickChart\n caption={t(\"quiet.caption\")}\n categoryKey=\"day\"\n data={DAYS}\n empty={t(\"quiet.empty\")}\n label={t(\"daily.label\")}\n />\n );\n}\n";
639
+ //#endregion
640
+ //#region src/candlestick-chart/examples/replay.example.tsx
641
+ var replay_example_exports = /* @__PURE__ */ __exportAll({
642
+ Replay: () => Replay,
643
+ source: () => source
644
+ });
645
+ function Replay() {
646
+ const $ = c(21);
647
+ const { t } = useWords("candlestick-chart");
648
+ const [run, setRun] = useState(0);
649
+ let t0;
650
+ if ($[0] !== t) {
651
+ t0 = t("daily.caption");
652
+ $[0] = t;
653
+ $[1] = t0;
654
+ } else t0 = $[1];
655
+ let t1;
656
+ if ($[2] !== t) {
657
+ t1 = t("daily.label");
658
+ $[2] = t;
659
+ $[3] = t1;
660
+ } else t1 = $[3];
661
+ let t2;
662
+ let t3;
663
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
664
+ t2 = {
665
+ day: "numeric",
666
+ month: "short",
667
+ timeZone: "UTC"
668
+ };
669
+ t3 = {
670
+ currency: "USD",
671
+ style: "currency"
672
+ };
673
+ $[4] = t2;
674
+ $[5] = t3;
675
+ } else {
676
+ t2 = $[4];
677
+ t3 = $[5];
678
+ }
679
+ let t4;
680
+ if ($[6] !== run || $[7] !== t0 || $[8] !== t1) {
681
+ t4 = /* @__PURE__ */ jsx(CandlestickChart, {
682
+ animate: true,
683
+ caption: t0,
684
+ categoryKey: "day",
685
+ data: ACME,
686
+ label: t1,
687
+ labelOptions: t2,
688
+ valueOptions: t3
689
+ }, run);
690
+ $[6] = run;
691
+ $[7] = t0;
692
+ $[8] = t1;
693
+ $[9] = t4;
694
+ } else t4 = $[9];
695
+ let t5;
696
+ if ($[10] !== run) {
697
+ t5 = () => {
698
+ setRun(run + 1);
699
+ };
700
+ $[10] = run;
701
+ $[11] = t5;
702
+ } else t5 = $[11];
703
+ let t6;
704
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
705
+ t6 = /* @__PURE__ */ jsx(RotateCcwIcon, {});
706
+ $[12] = t6;
707
+ } else t6 = $[12];
708
+ let t7;
709
+ if ($[13] !== t) {
710
+ t7 = t("replay.replay");
711
+ $[13] = t;
712
+ $[14] = t7;
713
+ } else t7 = $[14];
714
+ let t8;
715
+ if ($[15] !== t5 || $[16] !== t7) {
716
+ t8 = /* @__PURE__ */ jsxs(Button, {
717
+ onClick: t5,
718
+ size: "sm",
719
+ variant: "outline",
720
+ children: [t6, t7]
721
+ });
722
+ $[15] = t5;
723
+ $[16] = t7;
724
+ $[17] = t8;
725
+ } else t8 = $[17];
726
+ let t9;
727
+ if ($[18] !== t4 || $[19] !== t8) {
728
+ t9 = /* @__PURE__ */ jsxs(Stack, {
729
+ align: "flex-start",
730
+ children: [t4, t8]
731
+ });
732
+ $[18] = t4;
733
+ $[19] = t8;
734
+ $[20] = t9;
735
+ } else t9 = $[20];
736
+ return t9;
737
+ }
738
+ const source = "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 { CandlestickChart } from \"@stealthscale/component-charts\";\n\nimport { ACME } from \"./acme.ts\";\n\nexport function Replay(): ReactElement {\n const { t } = useWords(\"candlestick-chart\");\n const [run, setRun] = useState(0);\n\n return (\n <Stack align=\"flex-start\">\n <CandlestickChart\n animate\n caption={t(\"daily.caption\")}\n categoryKey=\"day\"\n data={ACME}\n key={run}\n label={t(\"daily.label\")}\n labelOptions={{ day: \"numeric\", month: \"short\", timeZone: \"UTC\" }}\n valueOptions={{ currency: \"USD\", style: \"currency\" }}\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";
739
+ //#endregion
740
+ //#region src/candlestick-chart/candlestick-chart.specimen.tsx
741
+ /**
742
+ * Catalogue page for the candlestick chart.
743
+ *
744
+ * @remarks
745
+ * The candlestick chart has no recipe of its own: the chart's recipe styles its figure, so every
746
+ * scene is hand-written. The scenes render a month of a share's daily prices, the tooltip open at
747
+ * its largest day, a currency pair to four decimals with a flat day, a dashed line at the month's
748
+ * opening price, the candles animated in with a replay, the month at a phone's width, and a
749
+ * candlestick chart without prices. Every scene renders a component from `examples/` and shows
750
+ * that file as its source. The words are keys under `candlestick-chart` in
751
+ * `locales/en/specimen/candlestick-chart.json`.
752
+ */
753
+ /**
754
+ * Hand-written scene for a month of a share's daily prices.
755
+ */
756
+ const automatic = {
757
+ about: "candlestick-chart.daily.about",
758
+ draw: () => /* @__PURE__ */ jsx(Room, {
759
+ size: "lg",
760
+ children: /* @__PURE__ */ jsx(Daily, {})
761
+ }),
762
+ example: daily_example_exports,
763
+ title: "candlestick-chart.daily.title"
764
+ };
765
+ /**
766
+ * Hand-written scene for the tooltip open at a day.
767
+ */
768
+ const tooltip = {
769
+ about: "candlestick-chart.busiest.about",
770
+ draw: () => /* @__PURE__ */ jsx(Room, {
771
+ size: "lg",
772
+ children: /* @__PURE__ */ jsx(Busiest, {})
773
+ }),
774
+ example: busiest_example_exports,
775
+ title: "candlestick-chart.busiest.title"
776
+ };
777
+ /**
778
+ * Hand-written scene for a currency pair with a flat day.
779
+ */
780
+ const decimals = {
781
+ about: "candlestick-chart.pair.about",
782
+ draw: () => /* @__PURE__ */ jsx(Room, {
783
+ size: "lg",
784
+ children: /* @__PURE__ */ jsx(Pair, {})
785
+ }),
786
+ example: pair_example_exports,
787
+ title: "candlestick-chart.pair.title"
788
+ };
789
+ /**
790
+ * Hand-written scene for a reference line at the month's opening price.
791
+ */
792
+ const referenced = {
793
+ about: "candlestick-chart.opening.about",
794
+ draw: () => /* @__PURE__ */ jsx(Room, {
795
+ size: "lg",
796
+ children: /* @__PURE__ */ jsx(Opening, {})
797
+ }),
798
+ example: opening_example_exports,
799
+ title: "candlestick-chart.opening.title"
800
+ };
801
+ /**
802
+ * Hand-written scene for the candles animated in, with a replay.
803
+ */
804
+ const animated = {
805
+ about: "candlestick-chart.replay.about",
806
+ draw: () => /* @__PURE__ */ jsx(Room, {
807
+ size: "lg",
808
+ children: /* @__PURE__ */ jsx(Replay, {})
809
+ }),
810
+ example: replay_example_exports,
811
+ title: "candlestick-chart.replay.title"
812
+ };
813
+ /**
814
+ * Hand-written scene for the month at a phone's width.
815
+ */
816
+ const narrow = {
817
+ about: "candlestick-chart.narrow.about",
818
+ draw: () => /* @__PURE__ */ jsx(Room, {
819
+ size: "xs",
820
+ children: /* @__PURE__ */ jsx(Daily, {})
821
+ }),
822
+ example: daily_example_exports,
823
+ title: "candlestick-chart.narrow.title"
824
+ };
825
+ /**
826
+ * Hand-written scene for a candlestick chart without prices.
827
+ */
828
+ const empty = {
829
+ about: "candlestick-chart.quiet.about",
830
+ draw: () => /* @__PURE__ */ jsx(Room, {
831
+ size: "md",
832
+ children: /* @__PURE__ */ jsx(Quiet, {})
833
+ }),
834
+ example: quiet_example_exports,
835
+ title: "candlestick-chart.quiet.title"
836
+ };
837
+ var candlestick_chart_specimen_default = specimen({
838
+ about: "candlestick-chart.about",
839
+ id: "components/charts/candlestick-chart",
840
+ imports: "import { candleChange, candleDirection, CandlestickChart } from \"@stealthscale/component-charts\";",
841
+ scenes: [
842
+ automatic,
843
+ tooltip,
844
+ decimals,
845
+ referenced,
846
+ animated,
847
+ narrow,
848
+ empty
849
+ ],
850
+ title: "candlestick-chart.title"
851
+ });
852
+ //#endregion
853
+ export { animated, automatic, decimals, candlestick_chart_specimen_default as default, empty, narrow, referenced, tooltip };