@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,1303 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { r as ViolinPlot } 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/violin-plot/examples/endpoints.ts
11
+ /**
12
+ * Lists the response times in milliseconds of 50 requests to each of three endpoints of a shop's
13
+ * API, which the violin plot's examples share: search responds from a cache or from its index, and
14
+ * checkout and profile have one peak each.
15
+ */
16
+ /**
17
+ * Lists the search endpoint's response times: 30 cache hits near 22ms and 20 index reads near
18
+ * 167ms.
19
+ */
20
+ const SEARCH = [
21
+ 20,
22
+ 21,
23
+ 22,
24
+ 23,
25
+ 18,
26
+ 19,
27
+ 25,
28
+ 16,
29
+ 22,
30
+ 19,
31
+ 16,
32
+ 23,
33
+ 22,
34
+ 21,
35
+ 27,
36
+ 19,
37
+ 19,
38
+ 24,
39
+ 25,
40
+ 16,
41
+ 21,
42
+ 20,
43
+ 20,
44
+ 24,
45
+ 19,
46
+ 25,
47
+ 26,
48
+ 28,
49
+ 12,
50
+ 24,
51
+ 138,
52
+ 147,
53
+ 135,
54
+ 170,
55
+ 170,
56
+ 201,
57
+ 148,
58
+ 207,
59
+ 156,
60
+ 174,
61
+ 181,
62
+ 229,
63
+ 174,
64
+ 177,
65
+ 159,
66
+ 160,
67
+ 159,
68
+ 212,
69
+ 202,
70
+ 157
71
+ ];
72
+ /**
73
+ * Lists the checkout endpoint's response times.
74
+ */
75
+ const CHECKOUT = [
76
+ 96,
77
+ 89,
78
+ 89,
79
+ 80,
80
+ 70,
81
+ 62,
82
+ 87,
83
+ 107,
84
+ 91,
85
+ 100,
86
+ 73,
87
+ 72,
88
+ 119,
89
+ 115,
90
+ 93,
91
+ 87,
92
+ 77,
93
+ 79,
94
+ 68,
95
+ 102,
96
+ 89,
97
+ 84,
98
+ 103,
99
+ 96,
100
+ 64,
101
+ 69,
102
+ 89,
103
+ 72,
104
+ 85,
105
+ 104,
106
+ 72,
107
+ 85,
108
+ 98,
109
+ 92,
110
+ 98,
111
+ 79,
112
+ 107,
113
+ 94,
114
+ 100,
115
+ 101,
116
+ 86,
117
+ 112,
118
+ 92,
119
+ 94,
120
+ 104,
121
+ 76,
122
+ 85,
123
+ 97,
124
+ 78,
125
+ 80
126
+ ];
127
+ /**
128
+ * Lists the profile endpoint's response times.
129
+ */
130
+ const PROFILE = [
131
+ 68,
132
+ 108,
133
+ 52,
134
+ 30,
135
+ 57,
136
+ 41,
137
+ 79,
138
+ 123,
139
+ 91,
140
+ 41,
141
+ 40,
142
+ 74,
143
+ 57,
144
+ 73,
145
+ 49,
146
+ 36,
147
+ 77,
148
+ 41,
149
+ 44,
150
+ 77,
151
+ 115,
152
+ 40,
153
+ 65,
154
+ 121,
155
+ 55,
156
+ 61,
157
+ 66,
158
+ 55,
159
+ 67,
160
+ 113,
161
+ 71,
162
+ 90,
163
+ 69,
164
+ 96,
165
+ 92,
166
+ 78,
167
+ 67,
168
+ 112,
169
+ 42,
170
+ 37,
171
+ 53,
172
+ 75,
173
+ 61,
174
+ 91,
175
+ 38,
176
+ 55,
177
+ 39,
178
+ 103,
179
+ 31,
180
+ 119
181
+ ];
182
+ //#endregion
183
+ //#region src/violin-plot/examples/endpoints.example.tsx
184
+ var endpoints_example_exports = /* @__PURE__ */ __exportAll({
185
+ Endpoints: () => Endpoints,
186
+ source: () => source$6
187
+ });
188
+ function Endpoints() {
189
+ const $ = c(28);
190
+ const { t } = useWords("violin-plot");
191
+ let t0;
192
+ if ($[0] !== t) {
193
+ t0 = t("endpoints.caption");
194
+ $[0] = t;
195
+ $[1] = t0;
196
+ } else t0 = $[1];
197
+ let t1;
198
+ if ($[2] !== t) {
199
+ t1 = t("requests");
200
+ $[2] = t;
201
+ $[3] = t1;
202
+ } else t1 = $[3];
203
+ let t2;
204
+ if ($[4] !== t) {
205
+ t2 = t("endpoints.search");
206
+ $[4] = t;
207
+ $[5] = t2;
208
+ } else t2 = $[5];
209
+ let t3;
210
+ if ($[6] !== t2) {
211
+ t3 = {
212
+ key: "search",
213
+ label: t2,
214
+ values: SEARCH
215
+ };
216
+ $[6] = t2;
217
+ $[7] = t3;
218
+ } else t3 = $[7];
219
+ let t4;
220
+ if ($[8] !== t) {
221
+ t4 = t("endpoints.checkout");
222
+ $[8] = t;
223
+ $[9] = t4;
224
+ } else t4 = $[9];
225
+ let t5;
226
+ if ($[10] !== t4) {
227
+ t5 = {
228
+ key: "checkout",
229
+ label: t4,
230
+ values: CHECKOUT
231
+ };
232
+ $[10] = t4;
233
+ $[11] = t5;
234
+ } else t5 = $[11];
235
+ let t6;
236
+ if ($[12] !== t) {
237
+ t6 = t("endpoints.profile");
238
+ $[12] = t;
239
+ $[13] = t6;
240
+ } else t6 = $[13];
241
+ let t7;
242
+ if ($[14] !== t6) {
243
+ t7 = {
244
+ key: "profile",
245
+ label: t6,
246
+ values: PROFILE
247
+ };
248
+ $[14] = t6;
249
+ $[15] = t7;
250
+ } else t7 = $[15];
251
+ let t8;
252
+ if ($[16] !== t3 || $[17] !== t5 || $[18] !== t7) {
253
+ t8 = [
254
+ t3,
255
+ t5,
256
+ t7
257
+ ];
258
+ $[16] = t3;
259
+ $[17] = t5;
260
+ $[18] = t7;
261
+ $[19] = t8;
262
+ } else t8 = $[19];
263
+ let t9;
264
+ if ($[20] !== t) {
265
+ t9 = t("endpoints.label");
266
+ $[20] = t;
267
+ $[21] = t9;
268
+ } else t9 = $[21];
269
+ let t10;
270
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
271
+ t10 = {
272
+ style: "unit",
273
+ unit: "millisecond",
274
+ unitDisplay: "narrow"
275
+ };
276
+ $[22] = t10;
277
+ } else t10 = $[22];
278
+ let t11;
279
+ if ($[23] !== t0 || $[24] !== t1 || $[25] !== t8 || $[26] !== t9) {
280
+ t11 = /* @__PURE__ */ jsx(ViolinPlot, {
281
+ caption: t0,
282
+ countLabel: t1,
283
+ groups: t8,
284
+ label: t9,
285
+ valueOptions: t10
286
+ });
287
+ $[23] = t0;
288
+ $[24] = t1;
289
+ $[25] = t8;
290
+ $[26] = t9;
291
+ $[27] = t11;
292
+ } else t11 = $[27];
293
+ return t11;
294
+ }
295
+ const source$6 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { ViolinPlot } from \"@stealthscale/component-charts\";\n\nimport { CHECKOUT, PROFILE, SEARCH } from \"./endpoints.ts\";\n\nexport function Endpoints(): ReactElement {\n const { t } = useWords(\"violin-plot\");\n\n return (\n <ViolinPlot\n caption={t(\"endpoints.caption\")}\n countLabel={t(\"requests\")}\n groups={[\n { key: \"search\", label: t(\"endpoints.search\"), values: SEARCH },\n { key: \"checkout\", label: t(\"endpoints.checkout\"), values: CHECKOUT },\n { key: \"profile\", label: t(\"endpoints.profile\"), values: PROFILE },\n ]}\n label={t(\"endpoints.label\")}\n valueOptions={{ style: \"unit\", unit: \"millisecond\", unitDisplay: \"narrow\" }}\n />\n );\n}\n";
296
+ //#endregion
297
+ //#region src/violin-plot/examples/outline.example.tsx
298
+ var outline_example_exports = /* @__PURE__ */ __exportAll({
299
+ Outline: () => Outline,
300
+ source: () => source$5
301
+ });
302
+ function Outline() {
303
+ const $ = c(28);
304
+ const { t } = useWords("violin-plot");
305
+ let t0;
306
+ if ($[0] !== t) {
307
+ t0 = t("outline.caption");
308
+ $[0] = t;
309
+ $[1] = t0;
310
+ } else t0 = $[1];
311
+ let t1;
312
+ if ($[2] !== t) {
313
+ t1 = t("requests");
314
+ $[2] = t;
315
+ $[3] = t1;
316
+ } else t1 = $[3];
317
+ let t2;
318
+ if ($[4] !== t) {
319
+ t2 = t("endpoints.search");
320
+ $[4] = t;
321
+ $[5] = t2;
322
+ } else t2 = $[5];
323
+ let t3;
324
+ if ($[6] !== t2) {
325
+ t3 = {
326
+ key: "search",
327
+ label: t2,
328
+ values: SEARCH
329
+ };
330
+ $[6] = t2;
331
+ $[7] = t3;
332
+ } else t3 = $[7];
333
+ let t4;
334
+ if ($[8] !== t) {
335
+ t4 = t("endpoints.checkout");
336
+ $[8] = t;
337
+ $[9] = t4;
338
+ } else t4 = $[9];
339
+ let t5;
340
+ if ($[10] !== t4) {
341
+ t5 = {
342
+ key: "checkout",
343
+ label: t4,
344
+ values: CHECKOUT
345
+ };
346
+ $[10] = t4;
347
+ $[11] = t5;
348
+ } else t5 = $[11];
349
+ let t6;
350
+ if ($[12] !== t) {
351
+ t6 = t("endpoints.profile");
352
+ $[12] = t;
353
+ $[13] = t6;
354
+ } else t6 = $[13];
355
+ let t7;
356
+ if ($[14] !== t6) {
357
+ t7 = {
358
+ key: "profile",
359
+ label: t6,
360
+ values: PROFILE
361
+ };
362
+ $[14] = t6;
363
+ $[15] = t7;
364
+ } else t7 = $[15];
365
+ let t8;
366
+ if ($[16] !== t3 || $[17] !== t5 || $[18] !== t7) {
367
+ t8 = [
368
+ t3,
369
+ t5,
370
+ t7
371
+ ];
372
+ $[16] = t3;
373
+ $[17] = t5;
374
+ $[18] = t7;
375
+ $[19] = t8;
376
+ } else t8 = $[19];
377
+ let t9;
378
+ if ($[20] !== t) {
379
+ t9 = t("endpoints.label");
380
+ $[20] = t;
381
+ $[21] = t9;
382
+ } else t9 = $[21];
383
+ let t10;
384
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
385
+ t10 = {
386
+ style: "unit",
387
+ unit: "millisecond",
388
+ unitDisplay: "narrow"
389
+ };
390
+ $[22] = t10;
391
+ } else t10 = $[22];
392
+ let t11;
393
+ if ($[23] !== t0 || $[24] !== t1 || $[25] !== t8 || $[26] !== t9) {
394
+ t11 = /* @__PURE__ */ jsx(ViolinPlot, {
395
+ caption: t0,
396
+ countLabel: t1,
397
+ groups: t8,
398
+ label: t9,
399
+ quartiles: false,
400
+ valueOptions: t10
401
+ });
402
+ $[23] = t0;
403
+ $[24] = t1;
404
+ $[25] = t8;
405
+ $[26] = t9;
406
+ $[27] = t11;
407
+ } else t11 = $[27];
408
+ return t11;
409
+ }
410
+ const source$5 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { ViolinPlot } from \"@stealthscale/component-charts\";\n\nimport { CHECKOUT, PROFILE, SEARCH } from \"./endpoints.ts\";\n\nexport function Outline(): ReactElement {\n const { t } = useWords(\"violin-plot\");\n\n return (\n <ViolinPlot\n caption={t(\"outline.caption\")}\n countLabel={t(\"requests\")}\n groups={[\n { key: \"search\", label: t(\"endpoints.search\"), values: SEARCH },\n { key: \"checkout\", label: t(\"endpoints.checkout\"), values: CHECKOUT },\n { key: \"profile\", label: t(\"endpoints.profile\"), values: PROFILE },\n ]}\n label={t(\"endpoints.label\")}\n quartiles={false}\n valueOptions={{ style: \"unit\", unit: \"millisecond\", unitDisplay: \"narrow\" }}\n />\n );\n}\n";
411
+ //#endregion
412
+ //#region src/violin-plot/examples/peaks.example.tsx
413
+ var peaks_example_exports = /* @__PURE__ */ __exportAll({
414
+ Peaks: () => Peaks,
415
+ source: () => source$4
416
+ });
417
+ function Peaks() {
418
+ const $ = c(28);
419
+ const { t } = useWords("violin-plot");
420
+ let t0;
421
+ if ($[0] !== t) {
422
+ t0 = t("peaks.caption");
423
+ $[0] = t;
424
+ $[1] = t0;
425
+ } else t0 = $[1];
426
+ let t1;
427
+ if ($[2] !== t) {
428
+ t1 = t("requests");
429
+ $[2] = t;
430
+ $[3] = t1;
431
+ } else t1 = $[3];
432
+ let t2;
433
+ if ($[4] !== t) {
434
+ t2 = t("endpoints.search");
435
+ $[4] = t;
436
+ $[5] = t2;
437
+ } else t2 = $[5];
438
+ let t3;
439
+ if ($[6] !== t2) {
440
+ t3 = {
441
+ key: "search",
442
+ label: t2,
443
+ values: SEARCH
444
+ };
445
+ $[6] = t2;
446
+ $[7] = t3;
447
+ } else t3 = $[7];
448
+ let t4;
449
+ if ($[8] !== t) {
450
+ t4 = t("endpoints.checkout");
451
+ $[8] = t;
452
+ $[9] = t4;
453
+ } else t4 = $[9];
454
+ let t5;
455
+ if ($[10] !== t4) {
456
+ t5 = {
457
+ key: "checkout",
458
+ label: t4,
459
+ values: CHECKOUT
460
+ };
461
+ $[10] = t4;
462
+ $[11] = t5;
463
+ } else t5 = $[11];
464
+ let t6;
465
+ if ($[12] !== t) {
466
+ t6 = t("endpoints.profile");
467
+ $[12] = t;
468
+ $[13] = t6;
469
+ } else t6 = $[13];
470
+ let t7;
471
+ if ($[14] !== t6) {
472
+ t7 = {
473
+ key: "profile",
474
+ label: t6,
475
+ values: PROFILE
476
+ };
477
+ $[14] = t6;
478
+ $[15] = t7;
479
+ } else t7 = $[15];
480
+ let t8;
481
+ if ($[16] !== t3 || $[17] !== t5 || $[18] !== t7) {
482
+ t8 = [
483
+ t3,
484
+ t5,
485
+ t7
486
+ ];
487
+ $[16] = t3;
488
+ $[17] = t5;
489
+ $[18] = t7;
490
+ $[19] = t8;
491
+ } else t8 = $[19];
492
+ let t9;
493
+ if ($[20] !== t) {
494
+ t9 = t("endpoints.label");
495
+ $[20] = t;
496
+ $[21] = t9;
497
+ } else t9 = $[21];
498
+ let t10;
499
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
500
+ t10 = {
501
+ style: "unit",
502
+ unit: "millisecond",
503
+ unitDisplay: "narrow"
504
+ };
505
+ $[22] = t10;
506
+ } else t10 = $[22];
507
+ let t11;
508
+ if ($[23] !== t0 || $[24] !== t1 || $[25] !== t8 || $[26] !== t9) {
509
+ t11 = /* @__PURE__ */ jsx(ViolinPlot, {
510
+ caption: t0,
511
+ countLabel: t1,
512
+ defaultIndex: 0,
513
+ groups: t8,
514
+ label: t9,
515
+ valueOptions: t10
516
+ });
517
+ $[23] = t0;
518
+ $[24] = t1;
519
+ $[25] = t8;
520
+ $[26] = t9;
521
+ $[27] = t11;
522
+ } else t11 = $[27];
523
+ return t11;
524
+ }
525
+ const source$4 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { ViolinPlot } from \"@stealthscale/component-charts\";\n\nimport { CHECKOUT, PROFILE, SEARCH } from \"./endpoints.ts\";\n\nexport function Peaks(): ReactElement {\n const { t } = useWords(\"violin-plot\");\n\n return (\n <ViolinPlot\n caption={t(\"peaks.caption\")}\n countLabel={t(\"requests\")}\n defaultIndex={0}\n groups={[\n { key: \"search\", label: t(\"endpoints.search\"), values: SEARCH },\n { key: \"checkout\", label: t(\"endpoints.checkout\"), values: CHECKOUT },\n { key: \"profile\", label: t(\"endpoints.profile\"), values: PROFILE },\n ]}\n label={t(\"endpoints.label\")}\n valueOptions={{ style: \"unit\", unit: \"millisecond\", unitDisplay: \"narrow\" }}\n />\n );\n}\n";
526
+ //#endregion
527
+ //#region src/violin-plot/examples/sessions.ts
528
+ /**
529
+ * Lists the lengths in minutes of 40 sessions on each of three plans of a product, which the violin
530
+ * plot's examples share: Free and Pro sessions have one peak each, and Team sessions are short
531
+ * check-ins or long work sessions.
532
+ */
533
+ /**
534
+ * Lists the lengths of 40 Free sessions.
535
+ */
536
+ const FREE = [
537
+ 8,
538
+ 6,
539
+ 11,
540
+ 6,
541
+ 8,
542
+ 2,
543
+ 15,
544
+ 4,
545
+ 4,
546
+ 7,
547
+ 7,
548
+ 6,
549
+ 5,
550
+ 11,
551
+ 3,
552
+ 8,
553
+ 5,
554
+ 6,
555
+ 8,
556
+ 7,
557
+ 5,
558
+ 5,
559
+ 5,
560
+ 6,
561
+ 6,
562
+ 3,
563
+ 6,
564
+ 9,
565
+ 6,
566
+ 8,
567
+ 4,
568
+ 10,
569
+ 9,
570
+ 13,
571
+ 10,
572
+ 8,
573
+ 5,
574
+ 7,
575
+ 8,
576
+ 4
577
+ ];
578
+ /**
579
+ * Lists the lengths of 40 Pro sessions.
580
+ */
581
+ const PRO = [
582
+ 17,
583
+ 25,
584
+ 16,
585
+ 20,
586
+ 21,
587
+ 16,
588
+ 8,
589
+ 22,
590
+ 30,
591
+ 23,
592
+ 24,
593
+ 19,
594
+ 28,
595
+ 24,
596
+ 16,
597
+ 23,
598
+ 13,
599
+ 19,
600
+ 12,
601
+ 14,
602
+ 32,
603
+ 18,
604
+ 18,
605
+ 16,
606
+ 34,
607
+ 11,
608
+ 32,
609
+ 25,
610
+ 16,
611
+ 16,
612
+ 17,
613
+ 35,
614
+ 16,
615
+ 13,
616
+ 27,
617
+ 16,
618
+ 23,
619
+ 13,
620
+ 14,
621
+ 15
622
+ ];
623
+ /**
624
+ * Lists the lengths of 40 Team sessions: 18 check-ins near 5 minutes and 22 work sessions near 35.
625
+ */
626
+ const TEAM = [
627
+ 5,
628
+ 6,
629
+ 4,
630
+ 5,
631
+ 3,
632
+ 4,
633
+ 5,
634
+ 4,
635
+ 7,
636
+ 6,
637
+ 4,
638
+ 5,
639
+ 5,
640
+ 5,
641
+ 5,
642
+ 9,
643
+ 7,
644
+ 5,
645
+ 32,
646
+ 29,
647
+ 37,
648
+ 37,
649
+ 39,
650
+ 36,
651
+ 38,
652
+ 36,
653
+ 30,
654
+ 29,
655
+ 33,
656
+ 37,
657
+ 30,
658
+ 36,
659
+ 38,
660
+ 26,
661
+ 38,
662
+ 38,
663
+ 35,
664
+ 21,
665
+ 17,
666
+ 38
667
+ ];
668
+ //#endregion
669
+ //#region src/violin-plot/examples/plans.example.tsx
670
+ var plans_example_exports = /* @__PURE__ */ __exportAll({
671
+ Plans: () => Plans,
672
+ source: () => source$3
673
+ });
674
+ function Plans() {
675
+ const $ = c(29);
676
+ const { t } = useWords("violin-plot");
677
+ let t0;
678
+ if ($[0] !== t) {
679
+ t0 = t("plans.caption");
680
+ $[0] = t;
681
+ $[1] = t0;
682
+ } else t0 = $[1];
683
+ let t1;
684
+ if ($[2] !== t) {
685
+ t1 = t("plans.sessions");
686
+ $[2] = t;
687
+ $[3] = t1;
688
+ } else t1 = $[3];
689
+ let t2;
690
+ if ($[4] !== t) {
691
+ t2 = t("plans.free");
692
+ $[4] = t;
693
+ $[5] = t2;
694
+ } else t2 = $[5];
695
+ let t3;
696
+ if ($[6] !== t2) {
697
+ t3 = {
698
+ key: "free",
699
+ label: t2,
700
+ values: FREE
701
+ };
702
+ $[6] = t2;
703
+ $[7] = t3;
704
+ } else t3 = $[7];
705
+ let t4;
706
+ if ($[8] !== t) {
707
+ t4 = t("plans.pro");
708
+ $[8] = t;
709
+ $[9] = t4;
710
+ } else t4 = $[9];
711
+ let t5;
712
+ if ($[10] !== t4) {
713
+ t5 = {
714
+ key: "pro",
715
+ label: t4,
716
+ values: PRO
717
+ };
718
+ $[10] = t4;
719
+ $[11] = t5;
720
+ } else t5 = $[11];
721
+ let t6;
722
+ if ($[12] !== t) {
723
+ t6 = t("plans.team");
724
+ $[12] = t;
725
+ $[13] = t6;
726
+ } else t6 = $[13];
727
+ let t7;
728
+ if ($[14] !== t6) {
729
+ t7 = {
730
+ key: "team",
731
+ label: t6,
732
+ values: TEAM
733
+ };
734
+ $[14] = t6;
735
+ $[15] = t7;
736
+ } else t7 = $[15];
737
+ let t8;
738
+ if ($[16] !== t3 || $[17] !== t5 || $[18] !== t7) {
739
+ t8 = [
740
+ t3,
741
+ t5,
742
+ t7
743
+ ];
744
+ $[16] = t3;
745
+ $[17] = t5;
746
+ $[18] = t7;
747
+ $[19] = t8;
748
+ } else t8 = $[19];
749
+ let t9;
750
+ if ($[20] !== t) {
751
+ t9 = t("plans.label");
752
+ $[20] = t;
753
+ $[21] = t9;
754
+ } else t9 = $[21];
755
+ let t10;
756
+ let t11;
757
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
758
+ t10 = [0, 60];
759
+ t11 = {
760
+ style: "unit",
761
+ unit: "minute",
762
+ unitDisplay: "short"
763
+ };
764
+ $[22] = t10;
765
+ $[23] = t11;
766
+ } else {
767
+ t10 = $[22];
768
+ t11 = $[23];
769
+ }
770
+ let t12;
771
+ if ($[24] !== t0 || $[25] !== t1 || $[26] !== t8 || $[27] !== t9) {
772
+ t12 = /* @__PURE__ */ jsx(ViolinPlot, {
773
+ caption: t0,
774
+ color: "teal",
775
+ countLabel: t1,
776
+ groups: t8,
777
+ label: t9,
778
+ valueDomain: t10,
779
+ valueOptions: t11
780
+ });
781
+ $[24] = t0;
782
+ $[25] = t1;
783
+ $[26] = t8;
784
+ $[27] = t9;
785
+ $[28] = t12;
786
+ } else t12 = $[28];
787
+ return t12;
788
+ }
789
+ const source$3 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { ViolinPlot } from \"@stealthscale/component-charts\";\n\nimport { FREE, PRO, TEAM } from \"./sessions.ts\";\n\nexport function Plans(): ReactElement {\n const { t } = useWords(\"violin-plot\");\n\n return (\n <ViolinPlot\n caption={t(\"plans.caption\")}\n color=\"teal\"\n countLabel={t(\"plans.sessions\")}\n groups={[\n { key: \"free\", label: t(\"plans.free\"), values: FREE },\n { key: \"pro\", label: t(\"plans.pro\"), values: PRO },\n { key: \"team\", label: t(\"plans.team\"), values: TEAM },\n ]}\n label={t(\"plans.label\")}\n valueDomain={[0, 60]}\n valueOptions={{ style: \"unit\", unit: \"minute\", unitDisplay: \"short\" }}\n />\n );\n}\n";
790
+ //#endregion
791
+ //#region src/violin-plot/examples/quiet.example.tsx
792
+ var quiet_example_exports = /* @__PURE__ */ __exportAll({
793
+ Quiet: () => Quiet,
794
+ source: () => source$2
795
+ });
796
+ const NONE = [];
797
+ function Quiet() {
798
+ const $ = c(30);
799
+ const { t } = useWords("violin-plot");
800
+ let t0;
801
+ if ($[0] !== t) {
802
+ t0 = t("quiet.caption");
803
+ $[0] = t;
804
+ $[1] = t0;
805
+ } else t0 = $[1];
806
+ let t1;
807
+ if ($[2] !== t) {
808
+ t1 = t("requests");
809
+ $[2] = t;
810
+ $[3] = t1;
811
+ } else t1 = $[3];
812
+ let t2;
813
+ if ($[4] !== t) {
814
+ t2 = t("quiet.empty");
815
+ $[4] = t;
816
+ $[5] = t2;
817
+ } else t2 = $[5];
818
+ let t3;
819
+ if ($[6] !== t) {
820
+ t3 = t("endpoints.search");
821
+ $[6] = t;
822
+ $[7] = t3;
823
+ } else t3 = $[7];
824
+ let t4;
825
+ if ($[8] !== t3) {
826
+ t4 = {
827
+ key: "search",
828
+ label: t3,
829
+ values: NONE
830
+ };
831
+ $[8] = t3;
832
+ $[9] = t4;
833
+ } else t4 = $[9];
834
+ let t5;
835
+ if ($[10] !== t) {
836
+ t5 = t("endpoints.checkout");
837
+ $[10] = t;
838
+ $[11] = t5;
839
+ } else t5 = $[11];
840
+ let t6;
841
+ if ($[12] !== t5) {
842
+ t6 = {
843
+ key: "checkout",
844
+ label: t5,
845
+ values: NONE
846
+ };
847
+ $[12] = t5;
848
+ $[13] = t6;
849
+ } else t6 = $[13];
850
+ let t7;
851
+ if ($[14] !== t) {
852
+ t7 = t("endpoints.profile");
853
+ $[14] = t;
854
+ $[15] = t7;
855
+ } else t7 = $[15];
856
+ let t8;
857
+ if ($[16] !== t7) {
858
+ t8 = {
859
+ key: "profile",
860
+ label: t7,
861
+ values: NONE
862
+ };
863
+ $[16] = t7;
864
+ $[17] = t8;
865
+ } else t8 = $[17];
866
+ let t9;
867
+ if ($[18] !== t4 || $[19] !== t6 || $[20] !== t8) {
868
+ t9 = [
869
+ t4,
870
+ t6,
871
+ t8
872
+ ];
873
+ $[18] = t4;
874
+ $[19] = t6;
875
+ $[20] = t8;
876
+ $[21] = t9;
877
+ } else t9 = $[21];
878
+ let t10;
879
+ if ($[22] !== t) {
880
+ t10 = t("endpoints.label");
881
+ $[22] = t;
882
+ $[23] = t10;
883
+ } else t10 = $[23];
884
+ let t11;
885
+ if ($[24] !== t0 || $[25] !== t1 || $[26] !== t10 || $[27] !== t2 || $[28] !== t9) {
886
+ t11 = /* @__PURE__ */ jsx(ViolinPlot, {
887
+ caption: t0,
888
+ countLabel: t1,
889
+ empty: t2,
890
+ groups: t9,
891
+ label: t10
892
+ });
893
+ $[24] = t0;
894
+ $[25] = t1;
895
+ $[26] = t10;
896
+ $[27] = t2;
897
+ $[28] = t9;
898
+ $[29] = t11;
899
+ } else t11 = $[29];
900
+ return t11;
901
+ }
902
+ const source$2 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { ViolinPlot } from \"@stealthscale/component-charts\";\n\nconst NONE: number[] = [];\n\nexport function Quiet(): ReactElement {\n const { t } = useWords(\"violin-plot\");\n\n return (\n <ViolinPlot\n caption={t(\"quiet.caption\")}\n countLabel={t(\"requests\")}\n empty={t(\"quiet.empty\")}\n groups={[\n { key: \"search\", label: t(\"endpoints.search\"), values: NONE },\n { key: \"checkout\", label: t(\"endpoints.checkout\"), values: NONE },\n { key: \"profile\", label: t(\"endpoints.profile\"), values: NONE },\n ]}\n label={t(\"endpoints.label\")}\n />\n );\n}\n";
903
+ //#endregion
904
+ //#region src/violin-plot/examples/replay.example.tsx
905
+ var replay_example_exports = /* @__PURE__ */ __exportAll({
906
+ Replay: () => Replay,
907
+ source: () => source$1
908
+ });
909
+ function Replay() {
910
+ const $ = c(40);
911
+ const { t } = useWords("violin-plot");
912
+ const [run, setRun] = useState(0);
913
+ let t0;
914
+ if ($[0] !== t) {
915
+ t0 = t("endpoints.caption");
916
+ $[0] = t;
917
+ $[1] = t0;
918
+ } else t0 = $[1];
919
+ let t1;
920
+ if ($[2] !== t) {
921
+ t1 = t("requests");
922
+ $[2] = t;
923
+ $[3] = t1;
924
+ } else t1 = $[3];
925
+ let t2;
926
+ if ($[4] !== t) {
927
+ t2 = t("endpoints.search");
928
+ $[4] = t;
929
+ $[5] = t2;
930
+ } else t2 = $[5];
931
+ let t3;
932
+ if ($[6] !== t2) {
933
+ t3 = {
934
+ key: "search",
935
+ label: t2,
936
+ values: SEARCH
937
+ };
938
+ $[6] = t2;
939
+ $[7] = t3;
940
+ } else t3 = $[7];
941
+ let t4;
942
+ if ($[8] !== t) {
943
+ t4 = t("endpoints.checkout");
944
+ $[8] = t;
945
+ $[9] = t4;
946
+ } else t4 = $[9];
947
+ let t5;
948
+ if ($[10] !== t4) {
949
+ t5 = {
950
+ key: "checkout",
951
+ label: t4,
952
+ values: CHECKOUT
953
+ };
954
+ $[10] = t4;
955
+ $[11] = t5;
956
+ } else t5 = $[11];
957
+ let t6;
958
+ if ($[12] !== t) {
959
+ t6 = t("endpoints.profile");
960
+ $[12] = t;
961
+ $[13] = t6;
962
+ } else t6 = $[13];
963
+ let t7;
964
+ if ($[14] !== t6) {
965
+ t7 = {
966
+ key: "profile",
967
+ label: t6,
968
+ values: PROFILE
969
+ };
970
+ $[14] = t6;
971
+ $[15] = t7;
972
+ } else t7 = $[15];
973
+ let t8;
974
+ if ($[16] !== t3 || $[17] !== t5 || $[18] !== t7) {
975
+ t8 = [
976
+ t3,
977
+ t5,
978
+ t7
979
+ ];
980
+ $[16] = t3;
981
+ $[17] = t5;
982
+ $[18] = t7;
983
+ $[19] = t8;
984
+ } else t8 = $[19];
985
+ let t9;
986
+ if ($[20] !== t) {
987
+ t9 = t("endpoints.label");
988
+ $[20] = t;
989
+ $[21] = t9;
990
+ } else t9 = $[21];
991
+ let t10;
992
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
993
+ t10 = {
994
+ style: "unit",
995
+ unit: "millisecond",
996
+ unitDisplay: "narrow"
997
+ };
998
+ $[22] = t10;
999
+ } else t10 = $[22];
1000
+ let t11;
1001
+ if ($[23] !== run || $[24] !== t0 || $[25] !== t1 || $[26] !== t8 || $[27] !== t9) {
1002
+ t11 = /* @__PURE__ */ jsx(ViolinPlot, {
1003
+ animate: true,
1004
+ caption: t0,
1005
+ countLabel: t1,
1006
+ groups: t8,
1007
+ label: t9,
1008
+ valueOptions: t10
1009
+ }, run);
1010
+ $[23] = run;
1011
+ $[24] = t0;
1012
+ $[25] = t1;
1013
+ $[26] = t8;
1014
+ $[27] = t9;
1015
+ $[28] = t11;
1016
+ } else t11 = $[28];
1017
+ let t12;
1018
+ if ($[29] !== run) {
1019
+ t12 = () => {
1020
+ setRun(run + 1);
1021
+ };
1022
+ $[29] = run;
1023
+ $[30] = t12;
1024
+ } else t12 = $[30];
1025
+ let t13;
1026
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
1027
+ t13 = /* @__PURE__ */ jsx(RotateCcwIcon, {});
1028
+ $[31] = t13;
1029
+ } else t13 = $[31];
1030
+ let t14;
1031
+ if ($[32] !== t) {
1032
+ t14 = t("replay.replay");
1033
+ $[32] = t;
1034
+ $[33] = t14;
1035
+ } else t14 = $[33];
1036
+ let t15;
1037
+ if ($[34] !== t12 || $[35] !== t14) {
1038
+ t15 = /* @__PURE__ */ jsxs(Button, {
1039
+ onClick: t12,
1040
+ size: "sm",
1041
+ variant: "outline",
1042
+ children: [t13, t14]
1043
+ });
1044
+ $[34] = t12;
1045
+ $[35] = t14;
1046
+ $[36] = t15;
1047
+ } else t15 = $[36];
1048
+ let t16;
1049
+ if ($[37] !== t11 || $[38] !== t15) {
1050
+ t16 = /* @__PURE__ */ jsxs(Stack, {
1051
+ align: "flex-start",
1052
+ children: [t11, t15]
1053
+ });
1054
+ $[37] = t11;
1055
+ $[38] = t15;
1056
+ $[39] = t16;
1057
+ } else t16 = $[39];
1058
+ return t16;
1059
+ }
1060
+ const source$1 = "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 { ViolinPlot } from \"@stealthscale/component-charts\";\n\nimport { CHECKOUT, PROFILE, SEARCH } from \"./endpoints.ts\";\n\nexport function Replay(): ReactElement {\n const { t } = useWords(\"violin-plot\");\n const [run, setRun] = useState(0);\n\n return (\n <Stack align=\"flex-start\">\n <ViolinPlot\n animate\n caption={t(\"endpoints.caption\")}\n countLabel={t(\"requests\")}\n groups={[\n { key: \"search\", label: t(\"endpoints.search\"), values: SEARCH },\n { key: \"checkout\", label: t(\"endpoints.checkout\"), values: CHECKOUT },\n { key: \"profile\", label: t(\"endpoints.profile\"), values: PROFILE },\n ]}\n key={run}\n label={t(\"endpoints.label\")}\n valueOptions={{ style: \"unit\", unit: \"millisecond\", unitDisplay: \"narrow\" }}\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";
1061
+ //#endregion
1062
+ //#region src/violin-plot/examples/smooth.example.tsx
1063
+ var smooth_example_exports = /* @__PURE__ */ __exportAll({
1064
+ Smooth: () => Smooth,
1065
+ source: () => source
1066
+ });
1067
+ function Smooth() {
1068
+ const $ = c(28);
1069
+ const { t } = useWords("violin-plot");
1070
+ let t0;
1071
+ if ($[0] !== t) {
1072
+ t0 = t("smooth.caption");
1073
+ $[0] = t;
1074
+ $[1] = t0;
1075
+ } else t0 = $[1];
1076
+ let t1;
1077
+ if ($[2] !== t) {
1078
+ t1 = t("requests");
1079
+ $[2] = t;
1080
+ $[3] = t1;
1081
+ } else t1 = $[3];
1082
+ let t2;
1083
+ if ($[4] !== t) {
1084
+ t2 = t("endpoints.search");
1085
+ $[4] = t;
1086
+ $[5] = t2;
1087
+ } else t2 = $[5];
1088
+ let t3;
1089
+ if ($[6] !== t2) {
1090
+ t3 = {
1091
+ key: "search",
1092
+ label: t2,
1093
+ values: SEARCH
1094
+ };
1095
+ $[6] = t2;
1096
+ $[7] = t3;
1097
+ } else t3 = $[7];
1098
+ let t4;
1099
+ if ($[8] !== t) {
1100
+ t4 = t("endpoints.checkout");
1101
+ $[8] = t;
1102
+ $[9] = t4;
1103
+ } else t4 = $[9];
1104
+ let t5;
1105
+ if ($[10] !== t4) {
1106
+ t5 = {
1107
+ key: "checkout",
1108
+ label: t4,
1109
+ values: CHECKOUT
1110
+ };
1111
+ $[10] = t4;
1112
+ $[11] = t5;
1113
+ } else t5 = $[11];
1114
+ let t6;
1115
+ if ($[12] !== t) {
1116
+ t6 = t("endpoints.profile");
1117
+ $[12] = t;
1118
+ $[13] = t6;
1119
+ } else t6 = $[13];
1120
+ let t7;
1121
+ if ($[14] !== t6) {
1122
+ t7 = {
1123
+ key: "profile",
1124
+ label: t6,
1125
+ values: PROFILE
1126
+ };
1127
+ $[14] = t6;
1128
+ $[15] = t7;
1129
+ } else t7 = $[15];
1130
+ let t8;
1131
+ if ($[16] !== t3 || $[17] !== t5 || $[18] !== t7) {
1132
+ t8 = [
1133
+ t3,
1134
+ t5,
1135
+ t7
1136
+ ];
1137
+ $[16] = t3;
1138
+ $[17] = t5;
1139
+ $[18] = t7;
1140
+ $[19] = t8;
1141
+ } else t8 = $[19];
1142
+ let t9;
1143
+ if ($[20] !== t) {
1144
+ t9 = t("endpoints.label");
1145
+ $[20] = t;
1146
+ $[21] = t9;
1147
+ } else t9 = $[21];
1148
+ let t10;
1149
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
1150
+ t10 = {
1151
+ style: "unit",
1152
+ unit: "millisecond",
1153
+ unitDisplay: "narrow"
1154
+ };
1155
+ $[22] = t10;
1156
+ } else t10 = $[22];
1157
+ let t11;
1158
+ if ($[23] !== t0 || $[24] !== t1 || $[25] !== t8 || $[26] !== t9) {
1159
+ t11 = /* @__PURE__ */ jsx(ViolinPlot, {
1160
+ bandwidth: 60,
1161
+ caption: t0,
1162
+ countLabel: t1,
1163
+ groups: t8,
1164
+ label: t9,
1165
+ valueOptions: t10
1166
+ });
1167
+ $[23] = t0;
1168
+ $[24] = t1;
1169
+ $[25] = t8;
1170
+ $[26] = t9;
1171
+ $[27] = t11;
1172
+ } else t11 = $[27];
1173
+ return t11;
1174
+ }
1175
+ const source = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { ViolinPlot } from \"@stealthscale/component-charts\";\n\nimport { CHECKOUT, PROFILE, SEARCH } from \"./endpoints.ts\";\n\nexport function Smooth(): ReactElement {\n const { t } = useWords(\"violin-plot\");\n\n return (\n <ViolinPlot\n bandwidth={60}\n caption={t(\"smooth.caption\")}\n countLabel={t(\"requests\")}\n groups={[\n { key: \"search\", label: t(\"endpoints.search\"), values: SEARCH },\n { key: \"checkout\", label: t(\"endpoints.checkout\"), values: CHECKOUT },\n { key: \"profile\", label: t(\"endpoints.profile\"), values: PROFILE },\n ]}\n label={t(\"endpoints.label\")}\n valueOptions={{ style: \"unit\", unit: \"millisecond\", unitDisplay: \"narrow\" }}\n />\n );\n}\n";
1176
+ //#endregion
1177
+ //#region src/violin-plot/violin-plot.specimen.tsx
1178
+ /**
1179
+ * Catalogue page for the violin plot.
1180
+ *
1181
+ * @remarks
1182
+ * The violin plot has no recipe of its own: the chart's recipe styles its figure and the
1183
+ * violin's marker, so every scene is hand-written. The scenes render response times of three
1184
+ * endpoints, the tooltip open at the endpoint with two peaks, a kernel wide enough to merge them,
1185
+ * session lengths in the teal palette on a fixed axis, the outlines without the marker, the
1186
+ * violins animated in with a replay, the endpoints at a phone's width, and a violin plot without
1187
+ * values. Every scene renders a component from `examples/` and shows that file as its source. The
1188
+ * words are keys under `violin-plot` in `locales/en/specimen/violin-plot.json`.
1189
+ */
1190
+ /**
1191
+ * Hand-written scene for response times of three endpoints.
1192
+ */
1193
+ const automatic = {
1194
+ about: "violin-plot.endpoints.about",
1195
+ draw: () => /* @__PURE__ */ jsx(Room, {
1196
+ size: "lg",
1197
+ children: /* @__PURE__ */ jsx(Endpoints, {})
1198
+ }),
1199
+ example: endpoints_example_exports,
1200
+ title: "violin-plot.endpoints.title"
1201
+ };
1202
+ /**
1203
+ * Hand-written scene for the tooltip open at a group.
1204
+ */
1205
+ const tooltip = {
1206
+ about: "violin-plot.peaks.about",
1207
+ draw: () => /* @__PURE__ */ jsx(Room, {
1208
+ size: "lg",
1209
+ children: /* @__PURE__ */ jsx(Peaks, {})
1210
+ }),
1211
+ example: peaks_example_exports,
1212
+ title: "violin-plot.peaks.title"
1213
+ };
1214
+ /**
1215
+ * Hand-written scene for one wide kernel for every group.
1216
+ */
1217
+ const kernel = {
1218
+ about: "violin-plot.smooth.about",
1219
+ draw: () => /* @__PURE__ */ jsx(Room, {
1220
+ size: "lg",
1221
+ children: /* @__PURE__ */ jsx(Smooth, {})
1222
+ }),
1223
+ example: smooth_example_exports,
1224
+ title: "violin-plot.smooth.title"
1225
+ };
1226
+ /**
1227
+ * Hand-written scene for session lengths in a palette's color on a fixed axis.
1228
+ */
1229
+ const colored = {
1230
+ about: "violin-plot.plans.about",
1231
+ draw: () => /* @__PURE__ */ jsx(Room, {
1232
+ size: "lg",
1233
+ children: /* @__PURE__ */ jsx(Plans, {})
1234
+ }),
1235
+ example: plans_example_exports,
1236
+ title: "violin-plot.plans.title"
1237
+ };
1238
+ /**
1239
+ * Hand-written scene for the outlines without the marker.
1240
+ */
1241
+ const bare = {
1242
+ about: "violin-plot.outline.about",
1243
+ draw: () => /* @__PURE__ */ jsx(Room, {
1244
+ size: "lg",
1245
+ children: /* @__PURE__ */ jsx(Outline, {})
1246
+ }),
1247
+ example: outline_example_exports,
1248
+ title: "violin-plot.outline.title"
1249
+ };
1250
+ /**
1251
+ * Hand-written scene for the violins animated in, with a replay.
1252
+ */
1253
+ const animated = {
1254
+ about: "violin-plot.replay.about",
1255
+ draw: () => /* @__PURE__ */ jsx(Room, {
1256
+ size: "lg",
1257
+ children: /* @__PURE__ */ jsx(Replay, {})
1258
+ }),
1259
+ example: replay_example_exports,
1260
+ title: "violin-plot.replay.title"
1261
+ };
1262
+ /**
1263
+ * Hand-written scene for the endpoints at a phone's width.
1264
+ */
1265
+ const narrow = {
1266
+ about: "violin-plot.narrow.about",
1267
+ draw: () => /* @__PURE__ */ jsx(Room, {
1268
+ size: "xs",
1269
+ children: /* @__PURE__ */ jsx(Endpoints, {})
1270
+ }),
1271
+ example: endpoints_example_exports,
1272
+ title: "violin-plot.narrow.title"
1273
+ };
1274
+ /**
1275
+ * Hand-written scene for a violin plot without values.
1276
+ */
1277
+ const empty = {
1278
+ about: "violin-plot.quiet.about",
1279
+ draw: () => /* @__PURE__ */ jsx(Room, {
1280
+ size: "md",
1281
+ children: /* @__PURE__ */ jsx(Quiet, {})
1282
+ }),
1283
+ example: quiet_example_exports,
1284
+ title: "violin-plot.quiet.title"
1285
+ };
1286
+ var violin_plot_specimen_default = specimen({
1287
+ about: "violin-plot.about",
1288
+ id: "components/charts/violin-plot",
1289
+ imports: "import { densityPeaks, kernelDensity, silvermanBandwidth, ViolinPlot } from \"@stealthscale/component-charts\";",
1290
+ scenes: [
1291
+ automatic,
1292
+ tooltip,
1293
+ kernel,
1294
+ colored,
1295
+ bare,
1296
+ animated,
1297
+ narrow,
1298
+ empty
1299
+ ],
1300
+ title: "violin-plot.title"
1301
+ });
1302
+ //#endregion
1303
+ export { animated, automatic, bare, colored, violin_plot_specimen_default as default, empty, kernel, narrow, tooltip };