@kumix/ui 0.4.4 → 0.5.0

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 (89) hide show
  1. package/README.md +14 -12
  2. package/dist/components/agents/approval-card/index.js +0 -1
  3. package/dist/components/agents/approval-card/index.js.map +1 -1
  4. package/dist/components/agents/prompt-input.js +0 -1
  5. package/dist/components/agents/prompt-input.js.map +1 -1
  6. package/dist/components/charts/bar-chart/context.d.ts.map +1 -1
  7. package/dist/components/charts/line-chart/context.d.ts.map +1 -1
  8. package/dist/components/charts/returns-calendar.d.ts.map +1 -1
  9. package/dist/components/charts/treemap.d.ts.map +1 -1
  10. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
  11. package/dist/components/motion/bouncy-accordion.js +20 -34
  12. package/dist/components/motion/bouncy-accordion.js.map +1 -1
  13. package/dist/components/motion/crash/crash-balloon.d.ts +9 -0
  14. package/dist/components/motion/crash/crash-balloon.d.ts.map +1 -0
  15. package/dist/components/motion/crash/crash-balloon.js +829 -0
  16. package/dist/components/motion/crash/crash-balloon.js.map +1 -0
  17. package/dist/components/motion/crash/crash-parts.d.ts +59 -0
  18. package/dist/components/motion/crash/crash-parts.d.ts.map +1 -0
  19. package/dist/components/motion/crash/crash-parts.js +2 -0
  20. package/dist/components/motion/crash/crash-tower.d.ts +9 -0
  21. package/dist/components/motion/crash/crash-tower.d.ts.map +1 -0
  22. package/dist/components/motion/crash/crash-tower.js +370 -0
  23. package/dist/components/motion/crash/crash-tower.js.map +1 -0
  24. package/dist/components/motion/crash.d.ts +9 -0
  25. package/dist/components/motion/crash.d.ts.map +1 -0
  26. package/dist/components/motion/crash.js +590 -0
  27. package/dist/components/motion/crash.js.map +1 -0
  28. package/dist/components/motion/feedback-widget.js +0 -1
  29. package/dist/components/motion/feedback-widget.js.map +1 -1
  30. package/dist/components/motion/liquid.js +2 -2
  31. package/dist/components/motion/liquid.js.map +1 -1
  32. package/dist/components/motion/mines.d.ts +41 -0
  33. package/dist/components/motion/mines.d.ts.map +1 -0
  34. package/dist/components/motion/mines.js +762 -0
  35. package/dist/components/motion/mines.js.map +1 -0
  36. package/dist/components/motion/plinko.d.ts +59 -0
  37. package/dist/components/motion/plinko.d.ts.map +1 -0
  38. package/dist/components/motion/plinko.js +385 -0
  39. package/dist/components/motion/plinko.js.map +1 -0
  40. package/dist/components/motion/signup-form.js +0 -1
  41. package/dist/components/motion/signup-form.js.map +1 -1
  42. package/dist/components/motion/swap.d.ts +1 -1
  43. package/dist/components/motion/tooltip.d.ts +2 -2
  44. package/dist/components/motion/tooltip.d.ts.map +1 -1
  45. package/dist/components/motion/wallet-card/index.js +0 -1
  46. package/dist/components/motion/wallet-card/index.js.map +1 -1
  47. package/dist/components/reui/alert.d.ts +1 -1
  48. package/dist/components/reui/badge.d.ts +1 -1
  49. package/dist/components/reui/code-block/code-block.d.ts +1 -0
  50. package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
  51. package/dist/components/reui/data-grid/data-grid-table.d.ts +1 -1
  52. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
  53. package/dist/components/reui/frame.d.ts +1 -1
  54. package/dist/components/reui/icon-tile.d.ts +1 -1
  55. package/dist/components/reui/tree.d.ts +1 -0
  56. package/dist/components/reui/tree.d.ts.map +1 -1
  57. package/dist/components/ui/badge.d.ts +1 -1
  58. package/dist/components/ui/bubble.d.ts +1 -1
  59. package/dist/components/ui/button.d.ts +2 -2
  60. package/dist/components/ui/empty.d.ts +1 -1
  61. package/dist/components/ui/item.d.ts +1 -1
  62. package/dist/components/ui/marker.d.ts +1 -1
  63. package/dist/components/ui/tabs.d.ts +1 -1
  64. package/dist/crash-parts-CUv5gFYQ.js +1053 -0
  65. package/dist/crash-parts-CUv5gFYQ.js.map +1 -0
  66. package/dist/{ease-CHhXKlG3.d.ts → ease-DjhlGGZO.d.ts} +4 -2
  67. package/dist/ease-DjhlGGZO.d.ts.map +1 -0
  68. package/dist/hooks/use-highlighted-code.d.ts +1 -1
  69. package/dist/hooks/use-highlighted-code.d.ts.map +1 -1
  70. package/dist/lib/audio-context.d.ts +11 -0
  71. package/dist/lib/audio-context.d.ts.map +1 -0
  72. package/dist/lib/audio-context.js +37 -0
  73. package/dist/lib/audio-context.js.map +1 -0
  74. package/dist/lib/ease.d.ts +2 -2
  75. package/dist/lib/ease.js +8 -1
  76. package/dist/lib/ease.js.map +1 -1
  77. package/dist/lib/game-sounds.d.ts +18 -0
  78. package/dist/lib/game-sounds.d.ts.map +1 -0
  79. package/dist/lib/game-sounds.js +142 -0
  80. package/dist/lib/game-sounds.js.map +1 -0
  81. package/dist/lib/tick-sound.d.ts +4 -3
  82. package/dist/lib/tick-sound.d.ts.map +1 -1
  83. package/dist/lib/tick-sound.js +30 -37
  84. package/dist/lib/tick-sound.js.map +1 -1
  85. package/dist/tooltip-CNEYdIX3.d.ts.map +1 -1
  86. package/dist/use-crash-game-B3RHxFkm.d.ts +108 -0
  87. package/dist/use-crash-game-B3RHxFkm.d.ts.map +1 -0
  88. package/package.json +7 -7
  89. package/dist/ease-CHhXKlG3.d.ts.map +0 -1
@@ -0,0 +1,590 @@
1
+ "use client";
2
+ import { EASE_IN, EASE_OUT } from "../../lib/ease.js";
3
+ import { S as useCrashGame, _ as crashPoint, a as PRIMARY_TEXT, b as growth, d as wrap, f as BURST, g as SWAP, i as MINI_REPLAY, m as GROWTH, n as CrashShell, o as Parachute, p as EXIT, r as MINI, s as STAGE_LABEL, t as CHUTE, u as niceAtLeast, v as formatMultiplier, x as timeAt, y as formatShort } from "../../crash-parts-CUv5gFYQ.js";
4
+ import { useId } from "react";
5
+ import { cn } from "@kumix/utils";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { AnimatePresence, motion } from "motion/react";
8
+ // src/components/motion/crash.tsx
9
+ const W = 400;
10
+ const H = 280;
11
+ const PAD = {
12
+ left: 18,
13
+ right: 40,
14
+ top: 20,
15
+ bottom: 24
16
+ };
17
+ const X_MIN = 8;
18
+ const Y_MIN = 2.2;
19
+ const HEAD_X = .82;
20
+ const HEAD_Y = .72;
21
+ /**
22
+ * A crash game: a paper plane flies the multiplier up a curve until it
23
+ * crashes at a random point. Cash out before it does. After a cash out the
24
+ * flight keeps going, so the player sees what they left on the table.
25
+ */
26
+ function Crash({ "aria-label": ariaLabel = "Crash", className, ...options }) {
27
+ const game = useCrashGame(options);
28
+ return /* @__PURE__ */ jsx(CrashShell, {
29
+ game,
30
+ "aria-label": ariaLabel,
31
+ className,
32
+ miniature: (props) => /* @__PURE__ */ jsx(MiniFlight, { ...props }),
33
+ children: /* @__PURE__ */ jsx(Graph, {
34
+ t: game.t,
35
+ cashed: game.cashed,
36
+ crashed: game.crashed,
37
+ round: game.round,
38
+ reduce: game.reduce,
39
+ skipping: game.skipping,
40
+ target: game.target
41
+ })
42
+ });
43
+ }
44
+ /** The flight: a curve from 1× at 0s to the current multiplier, on axes that grow with it. */
45
+ function Graph({ t, cashed, crashed, round, reduce, target, skipping }) {
46
+ const fill = `crash-fill-${useId().replace(/:/g, "")}`;
47
+ const m = growth(t);
48
+ const xMax = Math.max(X_MIN, t / HEAD_X);
49
+ const yMax = Math.max(Y_MIN, 1 + (m - 1) / HEAD_Y);
50
+ const x = (seconds) => PAD.left + seconds / xMax * (W - PAD.left - PAD.right);
51
+ const y = (value) => H - PAD.bottom - (value - 1) / (yMax - 1) * (H - PAD.top - PAD.bottom);
52
+ const base = y(1);
53
+ const path = (from, to) => {
54
+ let d = "";
55
+ for (let i = 0; i <= 48; i++) {
56
+ const s = from + (to - from) * i / 48;
57
+ d += `${i === 0 ? "M" : "L"}${x(s).toFixed(2)},${y(growth(s)).toFixed(2)}`;
58
+ }
59
+ return d;
60
+ };
61
+ const cashT = cashed === null ? null : timeAt(cashed);
62
+ const flown = cashT === null ? t : Math.min(t, cashT);
63
+ const line = path(0, flown);
64
+ const area = `${line}L${x(flown).toFixed(2)},${base}L${x(0)},${base}Z`;
65
+ const lost = crashed && cashed === null;
66
+ const missed = cashT !== null && t > cashT && !crashed ? path(cashT, t) : null;
67
+ const yStep = niceAtLeast((yMax - 1) / 4);
68
+ const yTicks = [1];
69
+ for (let k = Math.ceil(1 / yStep + 1e-9); k * yStep <= yMax + 1e-9; k++) if (k * yStep - 1 >= yStep * .5) yTicks.push(+(k * yStep).toFixed(6));
70
+ const xStep = niceAtLeast(xMax / 4);
71
+ const xTicks = Array.from({ length: Math.floor(xMax / xStep + 1e-9) }, (_, i) => (i + 1) * xStep);
72
+ const head = {
73
+ x: x(t),
74
+ y: y(m)
75
+ };
76
+ const slope = Math.atan2(-((H - PAD.top - PAD.bottom) / (yMax - 1)) * GROWTH * m, (W - PAD.left - PAD.right) / xMax);
77
+ const flying = t > 0 && !crashed;
78
+ const bob = flying && !reduce ? Math.sin(t * 6) * 3 : 0;
79
+ const takeOff = reduce ? t > 0 ? 1 : 0 : Math.min(1, t / .6);
80
+ const bank = Math.max(-70, slope * 180 / Math.PI) * takeOff + bob;
81
+ const travel = reduce ? 0 : 30 * t + 9 * Math.min(t, 20) ** 2 + 360 * Math.max(0, t - 20);
82
+ const near = travel;
83
+ const far = travel * .35;
84
+ const streakLength = 4 + Math.min(14, (30 + 18 * Math.min(t, 20)) * .035);
85
+ const marker = cashT === null || cashed === null ? null : {
86
+ x: x(cashT),
87
+ y: y(cashed)
88
+ };
89
+ const targetLine = target === null ? null : {
90
+ y: y(Math.min(target, yMax)),
91
+ above: target > yMax,
92
+ label: formatShort(target)
93
+ };
94
+ return /* @__PURE__ */ jsxs("svg", {
95
+ "aria-hidden": "true",
96
+ viewBox: `0 0 ${W} ${H}`,
97
+ className: "block w-full",
98
+ children: [
99
+ /* @__PURE__ */ jsxs("defs", { children: [
100
+ /* @__PURE__ */ jsxs("linearGradient", {
101
+ id: fill,
102
+ x1: "0",
103
+ y1: "0",
104
+ x2: "0",
105
+ y2: "1",
106
+ children: [/* @__PURE__ */ jsx("stop", {
107
+ offset: "0",
108
+ stopColor: "currentColor",
109
+ stopOpacity: .22
110
+ }), /* @__PURE__ */ jsx("stop", {
111
+ offset: "1",
112
+ stopColor: "currentColor",
113
+ stopOpacity: 0
114
+ })]
115
+ }),
116
+ /* @__PURE__ */ jsxs("linearGradient", {
117
+ id: `${fill}-fade`,
118
+ x1: "0",
119
+ y1: "0",
120
+ x2: "1",
121
+ y2: "0",
122
+ children: [/* @__PURE__ */ jsx("stop", {
123
+ offset: "0.2",
124
+ stopColor: "white",
125
+ stopOpacity: 0
126
+ }), /* @__PURE__ */ jsx("stop", {
127
+ offset: "0.6",
128
+ stopColor: "white",
129
+ stopOpacity: 1
130
+ })]
131
+ }),
132
+ /* @__PURE__ */ jsx("mask", {
133
+ id: `${fill}-grid`,
134
+ maskUnits: "userSpaceOnUse",
135
+ x: 0,
136
+ y: 0,
137
+ width: W,
138
+ height: H,
139
+ children: /* @__PURE__ */ jsx("rect", {
140
+ width: W,
141
+ height: H,
142
+ fill: `url(#${fill}-fade)`
143
+ })
144
+ })
145
+ ] }),
146
+ /* @__PURE__ */ jsxs("g", {
147
+ className: cn("transition-opacity duration-200", flying && !skipping ? "opacity-100" : "opacity-0"),
148
+ children: [FAR.map((dot) => /* @__PURE__ */ jsx("circle", {
149
+ cx: wrap(dot.x - far, W),
150
+ cy: dot.y,
151
+ r: 1,
152
+ className: "fill-foreground/15"
153
+ }, dot.id)), NEAR.map((streak) => {
154
+ const from = wrap(streak.x - near, W);
155
+ return /* @__PURE__ */ jsx("line", {
156
+ x1: from,
157
+ x2: from + streakLength,
158
+ y1: streak.y,
159
+ y2: streak.y,
160
+ strokeWidth: 1.5,
161
+ strokeLinecap: "round",
162
+ className: "stroke-foreground/10"
163
+ }, streak.id);
164
+ })]
165
+ }),
166
+ /* @__PURE__ */ jsx("g", {
167
+ className: cn(STAGE_LABEL, "text-muted-foreground tabular-nums"),
168
+ children: /* @__PURE__ */ jsxs(AnimatePresence, {
169
+ initial: false,
170
+ children: [yTicks.map((value) => /* @__PURE__ */ jsxs(motion.g, {
171
+ initial: { opacity: 0 },
172
+ animate: { opacity: 1 },
173
+ exit: {
174
+ opacity: 0,
175
+ transition: EXIT
176
+ },
177
+ transition: {
178
+ duration: .15,
179
+ ease: EASE_OUT
180
+ },
181
+ children: [/* @__PURE__ */ jsx("line", {
182
+ x1: PAD.left,
183
+ x2: W - PAD.right,
184
+ y1: y(value),
185
+ y2: y(value),
186
+ mask: value === 1 ? void 0 : `url(#${fill}-grid)`,
187
+ className: value === 1 ? "stroke-border" : "stroke-foreground/[0.07]"
188
+ }), /* @__PURE__ */ jsx("text", {
189
+ x: 398,
190
+ y: y(value),
191
+ dy: "0.32em",
192
+ textAnchor: "end",
193
+ className: "fill-current",
194
+ children: formatShort(value)
195
+ })]
196
+ }, `y${formatShort(value)}`)), xTicks.map((value) => /* @__PURE__ */ jsx(motion.g, {
197
+ initial: { opacity: 0 },
198
+ animate: { opacity: 1 },
199
+ exit: {
200
+ opacity: 0,
201
+ transition: EXIT
202
+ },
203
+ transition: {
204
+ duration: .15,
205
+ ease: EASE_OUT
206
+ },
207
+ children: /* @__PURE__ */ jsx("text", {
208
+ x: x(value),
209
+ y: 272,
210
+ textAnchor: "middle",
211
+ className: "fill-current",
212
+ children: `${+value.toFixed(1)}s`
213
+ })
214
+ }, `x${+value.toFixed(1)}`))]
215
+ })
216
+ }),
217
+ /* @__PURE__ */ jsx(AnimatePresence, { children: targetLine ? /* @__PURE__ */ jsxs(motion.g, {
218
+ className: "text-primary",
219
+ initial: { opacity: 0 },
220
+ animate: { opacity: 1 },
221
+ exit: {
222
+ opacity: 0,
223
+ transition: EXIT
224
+ },
225
+ transition: {
226
+ duration: .15,
227
+ ease: EASE_OUT
228
+ },
229
+ children: [targetLine.above ? null : /* @__PURE__ */ jsx("line", {
230
+ opacity: .75,
231
+ x1: PAD.left,
232
+ x2: W - PAD.right,
233
+ y1: targetLine.y,
234
+ y2: targetLine.y,
235
+ stroke: "currentColor",
236
+ strokeWidth: 1.5,
237
+ strokeDasharray: "5 4",
238
+ mask: `url(#${fill}-grid)`
239
+ }), /* @__PURE__ */ jsx("text", {
240
+ x: W - PAD.right - 4,
241
+ y: targetLine.above ? PAD.top + 4 : targetLine.y - 6,
242
+ textAnchor: "end",
243
+ className: cn("fill-current font-medium tabular-nums", STAGE_LABEL, PRIMARY_TEXT),
244
+ children: `Auto ${targetLine.label}${targetLine.above ? " ↑" : ""}`
245
+ })]
246
+ }, "target") : null }),
247
+ /* @__PURE__ */ jsxs("g", {
248
+ className: cn("transition-colors duration-150", lost ? "text-rose-500" : "text-primary"),
249
+ children: [/* @__PURE__ */ jsx("path", {
250
+ d: area,
251
+ fill: `url(#${fill})`
252
+ }), /* @__PURE__ */ jsx("path", {
253
+ d: line,
254
+ fill: "none",
255
+ stroke: "currentColor",
256
+ strokeWidth: 3,
257
+ strokeLinecap: "round",
258
+ strokeLinejoin: "round"
259
+ })]
260
+ }),
261
+ /* @__PURE__ */ jsx(AnimatePresence, { children: missed ? /* @__PURE__ */ jsx(motion.path, {
262
+ d: missed,
263
+ fill: "none",
264
+ strokeWidth: 2,
265
+ strokeDasharray: "4 5",
266
+ strokeLinecap: "round",
267
+ className: "stroke-muted-foreground/50",
268
+ initial: { opacity: 0 },
269
+ animate: { opacity: 1 },
270
+ exit: {
271
+ opacity: 0,
272
+ transition: EXIT
273
+ },
274
+ transition: {
275
+ duration: .15,
276
+ ease: EASE_OUT
277
+ }
278
+ }, `missed-${round}`) : null }),
279
+ marker ? /* @__PURE__ */ jsxs("g", {
280
+ transform: `translate(${marker.x.toFixed(2)},${marker.y.toFixed(2)})`,
281
+ children: [reduce ? null : /* @__PURE__ */ jsx(motion.g, {
282
+ style: {
283
+ transformBox: "fill-box",
284
+ transformOrigin: "50% 0%"
285
+ },
286
+ initial: {
287
+ y: 2,
288
+ rotate: -12,
289
+ opacity: 0
290
+ },
291
+ animate: {
292
+ y: 40,
293
+ rotate: [
294
+ -12,
295
+ 9,
296
+ -6,
297
+ 4,
298
+ 0
299
+ ],
300
+ opacity: [
301
+ 0,
302
+ 1,
303
+ 1,
304
+ 0
305
+ ]
306
+ },
307
+ transition: CHUTE,
308
+ children: /* @__PURE__ */ jsx(motion.g, {
309
+ initial: { scale: .6 },
310
+ animate: { scale: 1 },
311
+ transition: SWAP,
312
+ children: /* @__PURE__ */ jsx(Parachute, {})
313
+ })
314
+ }, `chute-${round}`), /* @__PURE__ */ jsx(motion.circle, {
315
+ r: 4.5,
316
+ strokeWidth: 2.5,
317
+ className: "fill-card stroke-primary",
318
+ initial: reduce ? { opacity: 0 } : {
319
+ opacity: 0,
320
+ scale: .25
321
+ },
322
+ animate: {
323
+ opacity: 1,
324
+ scale: 1
325
+ },
326
+ transition: SWAP
327
+ }, round)]
328
+ }) : null,
329
+ /* @__PURE__ */ jsxs("g", {
330
+ transform: `translate(${head.x.toFixed(2)},${head.y.toFixed(2)})`,
331
+ className: cn("transition-colors duration-150", lost ? "text-rose-500" : cashed !== null ? "text-muted-foreground" : "text-primary"),
332
+ children: [
333
+ crashed && !reduce ? /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx(motion.circle, {
334
+ fill: "none",
335
+ stroke: "currentColor",
336
+ strokeWidth: 2,
337
+ vectorEffect: "non-scaling-stroke",
338
+ r: 28,
339
+ initial: {
340
+ scale: 5 / 28,
341
+ opacity: .7
342
+ },
343
+ animate: {
344
+ scale: 1,
345
+ opacity: 0
346
+ },
347
+ transition: BURST
348
+ }), SHREDS.map((shred) => /* @__PURE__ */ jsx(motion.path, {
349
+ d: "M0,-2.5L3,2L-3,2Z",
350
+ fill: "currentColor",
351
+ initial: {
352
+ x: 0,
353
+ y: 0,
354
+ rotate: 0,
355
+ opacity: 1
356
+ },
357
+ animate: {
358
+ x: shred.x,
359
+ y: shred.y,
360
+ rotate: shred.spin,
361
+ opacity: 0
362
+ },
363
+ transition: BURST
364
+ }, shred.id))] }, `burst-${round}`) : null,
365
+ /* @__PURE__ */ jsx(motion.g, {
366
+ initial: false,
367
+ animate: crashed ? reduce ? { opacity: 0 } : {
368
+ x: 16,
369
+ y: 70,
370
+ rotate: 150,
371
+ scale: .75,
372
+ opacity: [
373
+ 1,
374
+ 1,
375
+ 0
376
+ ]
377
+ } : {
378
+ x: 0,
379
+ y: 0,
380
+ rotate: 0,
381
+ scale: 1,
382
+ opacity: 1
383
+ },
384
+ transition: crashed && !reduce ? TUMBLE : {
385
+ duration: .2,
386
+ ease: EASE_OUT
387
+ },
388
+ children: /* @__PURE__ */ jsx("g", {
389
+ transform: `rotate(${bank.toFixed(2)}) translate(0,-3)`,
390
+ children: /* @__PURE__ */ jsx(PaperPlane, {})
391
+ })
392
+ }, `plane-${round}`),
393
+ crashed ? /* @__PURE__ */ jsxs(motion.g, {
394
+ initial: reduce ? { opacity: 0 } : {
395
+ opacity: 0,
396
+ scale: .25
397
+ },
398
+ animate: {
399
+ opacity: 1,
400
+ scale: 1
401
+ },
402
+ transition: {
403
+ ...SWAP,
404
+ delay: reduce ? 0 : .35
405
+ },
406
+ children: [/* @__PURE__ */ jsx("circle", {
407
+ r: 7,
408
+ fill: "currentColor",
409
+ opacity: .15
410
+ }), /* @__PURE__ */ jsx("path", {
411
+ d: "M-3,-3L3,3M3,-3L-3,3",
412
+ stroke: "currentColor",
413
+ strokeWidth: 2,
414
+ strokeLinecap: "round"
415
+ })]
416
+ }, `end-${round}`) : null
417
+ ]
418
+ })
419
+ ]
420
+ });
421
+ }
422
+ const TUMBLE = {
423
+ duration: .6,
424
+ ease: EASE_IN,
425
+ opacity: {
426
+ duration: .6,
427
+ times: [
428
+ 0,
429
+ .6,
430
+ 1
431
+ ]
432
+ }
433
+ };
434
+ const SHREDS = Array.from({ length: 7 }, (_, i) => {
435
+ const angle = (-160 + i * 50 + i % 2 * 14) * Math.PI / 180;
436
+ const reach = 20 + i % 3 * 8;
437
+ return {
438
+ id: i,
439
+ x: Math.cos(angle) * reach,
440
+ y: Math.sin(angle) * reach + 12,
441
+ spin: (i % 2 ? 1 : -1) * (140 + i * 30)
442
+ };
443
+ });
444
+ const PLOT_H = H - PAD.top - PAD.bottom;
445
+ const FAR = Array.from({ length: 22 }, (_, i) => ({
446
+ id: i,
447
+ x: i * 97.3 % W,
448
+ y: PAD.top + i * 53.7 % PLOT_H
449
+ }));
450
+ const NEAR = Array.from({ length: 9 }, (_, i) => ({
451
+ id: i,
452
+ x: i * 151.9 % W,
453
+ y: PAD.top + 8 + i * 71.3 % (PLOT_H - 16)
454
+ }));
455
+ /** A folded paper plane, nose to the right, about 26 units long. */
456
+ function PaperPlane() {
457
+ return /* @__PURE__ */ jsxs("g", { children: [
458
+ /* @__PURE__ */ jsx("path", {
459
+ d: "M13,0L-4,-1L-8,6Z",
460
+ fill: "currentColor",
461
+ opacity: .55
462
+ }),
463
+ /* @__PURE__ */ jsx("path", {
464
+ d: "M13,0L-11,-9L-4,-1Z",
465
+ fill: "currentColor"
466
+ }),
467
+ /* @__PURE__ */ jsx("path", {
468
+ d: "M13,0L-4,-1",
469
+ className: "stroke-card/40",
470
+ strokeWidth: .75
471
+ })
472
+ ] });
473
+ }
474
+ /**
475
+ * The round's flight in miniature, on its own axes so a skip to a huge crash
476
+ * still reads: the curve replays up to your cash out, runs on dashed to the
477
+ * crash, and ends in a cross; a missed target is a dashed line above.
478
+ */
479
+ function MiniFlight({ crash, cashed, target, reduce }) {
480
+ const top = Math.max(crash, target ?? 1, 1.01);
481
+ const end = timeAt(top);
482
+ const x = (seconds) => 4 + seconds / end * (MINI.width - 8);
483
+ const y = (value) => MINI.height - 4 - (value - 1) / (top - 1) * (MINI.height - 8);
484
+ const path = (from, to) => {
485
+ let d = "";
486
+ for (let i = 0; i <= 24; i++) {
487
+ const s = from + (to - from) * i / 24;
488
+ d += `${i === 0 ? "M" : "L"}${x(s).toFixed(2)},${y(growth(s)).toFixed(2)}`;
489
+ }
490
+ return d;
491
+ };
492
+ const crashT = timeAt(crash);
493
+ const cashT = cashed === null ? null : timeAt(cashed);
494
+ const draw = (delay) => ({
495
+ initial: { pathLength: reduce ? 1 : 0 },
496
+ animate: { pathLength: 1 },
497
+ transition: {
498
+ ...MINI_REPLAY,
499
+ delay: reduce ? 0 : delay
500
+ }
501
+ });
502
+ return /* @__PURE__ */ jsxs("svg", {
503
+ "aria-hidden": "true",
504
+ viewBox: `0 0 ${MINI.width} ${MINI.height}`,
505
+ width: MINI.width,
506
+ height: MINI.height,
507
+ className: "shrink-0 overflow-visible",
508
+ children: [
509
+ /* @__PURE__ */ jsx("line", {
510
+ x1: 4,
511
+ x2: MINI.width - 4,
512
+ y1: MINI.height - 4,
513
+ y2: MINI.height - 4,
514
+ className: "stroke-border"
515
+ }),
516
+ target !== null ? /* @__PURE__ */ jsx("line", {
517
+ x1: 4,
518
+ x2: MINI.width - 4,
519
+ y1: y(target),
520
+ y2: y(target),
521
+ strokeDasharray: "2 3",
522
+ className: "stroke-muted-foreground/60"
523
+ }) : null,
524
+ cashT === null ? /* @__PURE__ */ jsx(motion.path, {
525
+ d: path(0, crashT),
526
+ fill: "none",
527
+ strokeWidth: 2,
528
+ strokeLinecap: "round",
529
+ className: "stroke-rose-500",
530
+ ...draw(.3)
531
+ }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
532
+ /* @__PURE__ */ jsx(motion.path, {
533
+ d: path(0, cashT),
534
+ fill: "none",
535
+ strokeWidth: 2,
536
+ strokeLinecap: "round",
537
+ className: "stroke-primary",
538
+ ...draw(.3)
539
+ }),
540
+ /* @__PURE__ */ jsx(motion.path, {
541
+ d: path(cashT, crashT),
542
+ fill: "none",
543
+ strokeWidth: 1.5,
544
+ strokeDasharray: "2 3",
545
+ strokeLinecap: "round",
546
+ className: "stroke-muted-foreground/60",
547
+ initial: { opacity: 0 },
548
+ animate: { opacity: 1 },
549
+ transition: {
550
+ duration: .25,
551
+ ease: EASE_OUT,
552
+ delay: reduce ? 0 : .8
553
+ }
554
+ }),
555
+ /* @__PURE__ */ jsx("circle", {
556
+ cx: x(cashT),
557
+ cy: y(cashed ?? 1),
558
+ r: 3,
559
+ strokeWidth: 1.5,
560
+ className: "fill-card stroke-primary"
561
+ })
562
+ ] }),
563
+ /* @__PURE__ */ jsx(motion.path, {
564
+ d: `M${x(crashT) - 2.5},${y(crash) - 2.5}l5,5m0,-5l-5,5`,
565
+ strokeWidth: 1.75,
566
+ strokeLinecap: "round",
567
+ className: "stroke-rose-500",
568
+ initial: reduce ? { opacity: 0 } : {
569
+ opacity: 0,
570
+ scale: .25
571
+ },
572
+ animate: {
573
+ opacity: 1,
574
+ scale: 1
575
+ },
576
+ style: {
577
+ transformBox: "fill-box",
578
+ transformOrigin: "center"
579
+ },
580
+ transition: {
581
+ ...SWAP,
582
+ delay: reduce ? 0 : .85
583
+ }
584
+ })
585
+ ]
586
+ });
587
+ }
588
+ export { Crash, crashPoint, formatMultiplier };
589
+
590
+ //# sourceMappingURL=crash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crash.js","names":[],"sources":["../../../src/components/motion/crash.tsx"],"sourcesContent":["\"use client\";\n\nimport { useId } from \"react\";\nimport { AnimatePresence, motion, type Transition } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_IN, EASE_OUT } from \"../../lib/ease\";\nimport {\n CHUTE,\n type CrashMiniatureProps,\n CrashShell,\n MINI,\n MINI_REPLAY,\n niceAtLeast,\n Parachute,\n PRIMARY_TEXT,\n STAGE_LABEL,\n STAGE_W,\n wrap,\n} from \"./crash/crash-parts\";\nimport {\n BURST,\n type CrashProps,\n EXIT,\n formatShort,\n GROWTH,\n growth,\n SWAP,\n timeAt,\n useCrashGame,\n} from \"./crash/use-crash-game\";\n\nexport {\n type CrashProps,\n type CrashReveal,\n crashPoint,\n formatMultiplier,\n} from \"./crash/use-crash-game\";\n\n// Graph geometry in SVG units, matching the shell's 10:7 stage.\nconst W = STAGE_W;\nconst H = 280;\n// The y labels sit in the right pad; the left pad clears the parked plane's tail.\nconst PAD = { left: 18, right: 40, top: 20, bottom: 24 };\n// The axes start at 8s and 2.2×, then grow so the head stays near 82% across\n// and 72% up, which keeps them continuous with no rescale jumps.\nconst X_MIN = 8;\n// 2.2×, not lower: while the axes are fixed the head must stay under the\n// readout's corner (top 40%, left 45%) even on a narrow stage.\nconst Y_MIN = 2.2;\nconst HEAD_X = 0.82;\nconst HEAD_Y = 0.72;\n\n/**\n * A crash game: a paper plane flies the multiplier up a curve until it\n * crashes at a random point. Cash out before it does. After a cash out the\n * flight keeps going, so the player sees what they left on the table.\n */\nexport function Crash({ \"aria-label\": ariaLabel = \"Crash\", className, ...options }: CrashProps) {\n const game = useCrashGame(options);\n // The shell pins the readout top left: an exponential curve never reaches\n // that corner, so the flight can't run under the numbers.\n return (\n <CrashShell\n game={game}\n aria-label={ariaLabel}\n className={className}\n miniature={(props) => <MiniFlight {...props} />}\n >\n <Graph\n t={game.t}\n cashed={game.cashed}\n crashed={game.crashed}\n round={game.round}\n reduce={game.reduce}\n skipping={game.skipping}\n target={game.target}\n />\n </CrashShell>\n );\n}\n\ninterface GraphProps {\n t: number;\n cashed: number | null;\n crashed: boolean;\n round: number;\n reduce: boolean;\n skipping: boolean;\n target: number | null;\n}\n\n/** The flight: a curve from 1× at 0s to the current multiplier, on axes that grow with it. */\nfunction Graph({ t, cashed, crashed, round, reduce, target, skipping }: GraphProps) {\n const fill = `crash-fill-${useId().replace(/:/g, \"\")}`;\n const m = growth(t);\n const xMax = Math.max(X_MIN, t / HEAD_X);\n const yMax = Math.max(Y_MIN, 1 + (m - 1) / HEAD_Y);\n const x = (seconds: number) => PAD.left + (seconds / xMax) * (W - PAD.left - PAD.right);\n const y = (value: number) =>\n H - PAD.bottom - ((value - 1) / (yMax - 1)) * (H - PAD.top - PAD.bottom);\n const base = y(1);\n\n // Sampled densely enough that the bend reads as smooth at any scale.\n const path = (from: number, to: number) => {\n let d = \"\";\n for (let i = 0; i <= 48; i++) {\n const s = from + ((to - from) * i) / 48;\n d += `${i === 0 ? \"M\" : \"L\"}${x(s).toFixed(2)},${y(growth(s)).toFixed(2)}`;\n }\n return d;\n };\n const cashT = cashed === null ? null : timeAt(cashed);\n const flown = cashT === null ? t : Math.min(t, cashT);\n const line = path(0, flown);\n const area = `${line}L${x(flown).toFixed(2)},${base}L${x(0)},${base}Z`;\n const lost = crashed && cashed === null;\n const missed = cashT !== null && t > cashT && !crashed ? path(cashT, t) : null;\n\n const yStep = niceAtLeast((yMax - 1) / 4);\n // 1× plus round multiples of the step (500×, 1K×, not 501×), skipping one\n // too close to the baseline. The epsilon keeps 0.8 / 0.2 from flooring to 3.\n const yTicks = [1];\n for (let k = Math.ceil(1 / yStep + 1e-9); k * yStep <= yMax + 1e-9; k++) {\n if (k * yStep - 1 >= yStep * 0.5) yTicks.push(+(k * yStep).toFixed(6));\n }\n const xStep = niceAtLeast(xMax / 4);\n const xTicks = Array.from({ length: Math.floor(xMax / xStep + 1e-9) }, (_, i) => (i + 1) * xStep);\n\n const head = { x: x(t), y: y(m) };\n // Bank along the curve's on-screen slope, levelling out on the runway at\n // 0s and easing up over the first 0.6s of take-off. A slight bob keeps it\n // airborne; reduced motion drops the bob and the take-off ease, so the\n // plane just points along the curve.\n const slope = Math.atan2(\n -((H - PAD.top - PAD.bottom) / (yMax - 1)) * GROWTH * m,\n (W - PAD.left - PAD.right) / xMax,\n );\n const flying = t > 0 && !crashed;\n const bob = flying && !reduce ? Math.sin(t * 6) * 3 : 0;\n const takeOff = reduce ? (t > 0 ? 1 : 0) : Math.min(1, t / 0.6);\n const bank = Math.max(-70, (slope * 180) / Math.PI) * takeOff + bob;\n\n const travel = reduce ? 0 : 30 * t + 9 * Math.min(t, 20) ** 2 + 360 * Math.max(0, t - 20);\n const near = travel;\n const far = travel * 0.35;\n const streakLength = 4 + Math.min(14, (30 + 18 * Math.min(t, 20)) * 0.035);\n const marker = cashT === null || cashed === null ? null : { x: x(cashT), y: y(cashed) };\n\n const targetLine =\n target === null\n ? null\n : { y: y(Math.min(target, yMax)), above: target > yMax, label: formatShort(target) };\n\n return (\n <svg aria-hidden=\"true\" viewBox={`0 0 ${W} ${H}`} className=\"block w-full\">\n <defs>\n <linearGradient id={fill} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" stopColor=\"currentColor\" stopOpacity={0.22} />\n <stop offset=\"1\" stopColor=\"currentColor\" stopOpacity={0} />\n </linearGradient>\n {/* Grid lines fade in from the left, leaving the readout's corner clear. */}\n <linearGradient id={`${fill}-fade`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n <stop offset=\"0.2\" stopColor=\"white\" stopOpacity={0} />\n <stop offset=\"0.6\" stopColor=\"white\" stopOpacity={1} />\n </linearGradient>\n <mask id={`${fill}-grid`} maskUnits=\"userSpaceOnUse\" x={0} y={0} width={W} height={H}>\n <rect width={W} height={H} fill={`url(#${fill}-fade)`} />\n </mask>\n </defs>\n\n {/* Speed field: far dots and near streaks stream past, faster as the\n plane climbs. Positions derive from t, so a skip would only\n flicker; it fades out then. Shown only in flight, so a parked or\n crashed graph is clean. */}\n <g\n className={cn(\n \"transition-opacity duration-200\",\n flying && !skipping ? \"opacity-100\" : \"opacity-0\",\n )}\n >\n {FAR.map((dot) => (\n <circle\n key={dot.id}\n cx={wrap(dot.x - far, W)}\n cy={dot.y}\n r={1}\n className=\"fill-foreground/15\"\n />\n ))}\n {NEAR.map((streak) => {\n const from = wrap(streak.x - near, W);\n return (\n <line\n key={streak.id}\n x1={from}\n x2={from + streakLength}\n y1={streak.y}\n y2={streak.y}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n className=\"stroke-foreground/10\"\n />\n );\n })}\n </g>\n\n <g className={cn(STAGE_LABEL, \"text-muted-foreground tabular-nums\")}>\n <AnimatePresence initial={false}>\n {yTicks.map((value) => (\n <motion.g\n key={`y${formatShort(value)}`}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, transition: EXIT }}\n transition={{ duration: 0.15, ease: EASE_OUT }}\n >\n <line\n x1={PAD.left}\n x2={W - PAD.right}\n y1={y(value)}\n y2={y(value)}\n mask={value === 1 ? undefined : `url(#${fill}-grid)`}\n className={value === 1 ? \"stroke-border\" : \"stroke-foreground/[0.07]\"}\n />\n {/* Labels on the right, past the head, which stays at 82% across.\n Right-aligned, so a label grown for a narrow stage stays on it. */}\n <text x={W - 2} y={y(value)} dy=\"0.32em\" textAnchor=\"end\" className=\"fill-current\">\n {formatShort(value)}\n </text>\n </motion.g>\n ))}\n {xTicks.map((value) => (\n // Motion reads `x` as a transform, so the position sits on a plain text.\n <motion.g\n key={`x${+value.toFixed(1)}`}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, transition: EXIT }}\n transition={{ duration: 0.15, ease: EASE_OUT }}\n >\n <text x={x(value)} y={H - 8} textAnchor=\"middle\" className=\"fill-current\">\n {`${+value.toFixed(1)}s`}\n </text>\n </motion.g>\n ))}\n </AnimatePresence>\n </g>\n\n <AnimatePresence>\n {targetLine ? (\n // The auto target, ahead of the plane: a dashed line that fades in\n // from the left like the grid, or a caret at the top while it is\n // still above the axes. It fades out once it pays.\n <motion.g\n key=\"target\"\n className=\"text-primary\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, transition: EXIT }}\n transition={{ duration: 0.15, ease: EASE_OUT }}\n >\n {targetLine.above ? null : (\n <line\n opacity={0.75}\n x1={PAD.left}\n x2={W - PAD.right}\n y1={targetLine.y}\n y2={targetLine.y}\n stroke=\"currentColor\"\n strokeWidth={1.5}\n strokeDasharray=\"5 4\"\n mask={`url(#${fill}-grid)`}\n />\n )}\n <text\n x={W - PAD.right - 4}\n y={targetLine.above ? PAD.top + 4 : targetLine.y - 6}\n textAnchor=\"end\"\n className={cn(\"fill-current font-medium tabular-nums\", STAGE_LABEL, PRIMARY_TEXT)}\n >\n {`Auto ${targetLine.label}${targetLine.above ? \" ↑\" : \"\"}`}\n </text>\n </motion.g>\n ) : null}\n </AnimatePresence>\n\n <g className={cn(\"transition-colors duration-150\", lost ? \"text-rose-500\" : \"text-primary\")}>\n <path d={area} fill={`url(#${fill})`} />\n <path\n d={line}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <AnimatePresence>\n {missed ? (\n // After a cash out the plane's trail shows what was left on the\n // table while it flies on; it clears at the crash so a finished\n // graph doesn't keep a stray line behind the result.\n <motion.path\n key={`missed-${round}`}\n d={missed}\n fill=\"none\"\n strokeWidth={2}\n strokeDasharray=\"4 5\"\n strokeLinecap=\"round\"\n className=\"stroke-muted-foreground/50\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, transition: EXIT }}\n transition={{ duration: 0.15, ease: EASE_OUT }}\n />\n ) : null}\n </AnimatePresence>\n\n {marker ? (\n <g transform={`translate(${marker.x.toFixed(2)},${marker.y.toFixed(2)})`}>\n {reduce ? null : (\n // The player bails out: a parachute opens at the cash point and\n // drifts down, swaying, before it fades.\n <motion.g\n key={`chute-${round}`}\n // Swings like a pendulum from the canopy, not round its middle.\n style={{ transformBox: \"fill-box\", transformOrigin: \"50% 0%\" }}\n initial={{ y: 2, rotate: -12, opacity: 0 }}\n animate={{ y: 40, rotate: [-12, 9, -6, 4, 0], opacity: [0, 1, 1, 0] }}\n transition={CHUTE}\n >\n <motion.g initial={{ scale: 0.6 }} animate={{ scale: 1 }} transition={SWAP}>\n <Parachute />\n </motion.g>\n </motion.g>\n )}\n {/* The badge in the readout names the value; the curve marks where. */}\n <motion.circle\n key={round}\n r={4.5}\n strokeWidth={2.5}\n className=\"fill-card stroke-primary\"\n initial={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.25 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={SWAP}\n />\n </g>\n ) : null}\n\n <g\n transform={`translate(${head.x.toFixed(2)},${head.y.toFixed(2)})`}\n className={cn(\n \"transition-colors duration-150\",\n // Red only for a loss, like the readout.\n lost ? \"text-rose-500\" : cashed !== null ? \"text-muted-foreground\" : \"text-primary\",\n )}\n >\n {crashed && !reduce ? (\n <g key={`burst-${round}`}>\n <motion.circle\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n vectorEffect=\"non-scaling-stroke\"\n r={28}\n initial={{ scale: 5 / 28, opacity: 0.7 }}\n animate={{ scale: 1, opacity: 0 }}\n transition={BURST}\n />\n {SHREDS.map((shred) => (\n <motion.path\n key={shred.id}\n d=\"M0,-2.5L3,2L-3,2Z\"\n fill=\"currentColor\"\n initial={{ x: 0, y: 0, rotate: 0, opacity: 1 }}\n animate={{ x: shred.x, y: shred.y, rotate: shred.spin, opacity: 0 }}\n transition={BURST}\n />\n ))}\n </g>\n ) : null}\n {/* Screen-space fall on the outside, the plane's bank inside it. */}\n <motion.g\n key={`plane-${round}`}\n initial={false}\n animate={\n crashed\n ? reduce\n ? { opacity: 0 }\n : { x: 16, y: 70, rotate: 150, scale: 0.75, opacity: [1, 1, 0] }\n : { x: 0, y: 0, rotate: 0, scale: 1, opacity: 1 }\n }\n transition={crashed && !reduce ? TUMBLE : { duration: 0.2, ease: EASE_OUT }}\n >\n <g transform={`rotate(${bank.toFixed(2)}) translate(0,-3)`}>\n <PaperPlane />\n </g>\n </motion.g>\n {crashed ? (\n // Where the flight ended, left behind once the plane has fallen, so\n // a finished graph still says how far it got.\n <motion.g\n key={`end-${round}`}\n initial={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.25 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ ...SWAP, delay: reduce ? 0 : 0.35 }}\n >\n <circle r={7} fill=\"currentColor\" opacity={0.15} />\n <path\n d=\"M-3,-3L3,3M3,-3L-3,3\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n />\n </motion.g>\n ) : null}\n </g>\n </svg>\n );\n}\n\n// The crashed plane tumbles and drops out of the sky, accelerating.\nconst TUMBLE: Transition = {\n duration: 0.6,\n ease: EASE_IN,\n opacity: { duration: 0.6, times: [0, 0.6, 1] },\n};\n\n// Paper shreds thrown out by the crash, spread round the head and pulled\n// down a little, as if by gravity. Fixed, so every crash is the same shape.\nconst SHREDS = Array.from({ length: 7 }, (_, i) => {\n const angle = ((-160 + i * 50 + (i % 2) * 14) * Math.PI) / 180;\n const reach = 20 + (i % 3) * 8;\n return {\n id: i,\n x: Math.cos(angle) * reach,\n y: Math.sin(angle) * reach + 12,\n spin: (i % 2 ? 1 : -1) * (140 + i * 30),\n };\n});\n\n// Speed field points, scattered over the plot by fixed strides.\nconst PLOT_H = H - PAD.top - PAD.bottom;\nconst FAR = Array.from({ length: 22 }, (_, i) => ({\n id: i,\n x: (i * 97.3) % W,\n y: PAD.top + ((i * 53.7) % PLOT_H),\n}));\nconst NEAR = Array.from({ length: 9 }, (_, i) => ({\n id: i,\n x: (i * 151.9) % W,\n y: PAD.top + 8 + ((i * 71.3) % (PLOT_H - 16)),\n}));\n\n/** A folded paper plane, nose to the right, about 26 units long. */\nfunction PaperPlane() {\n return (\n <g>\n <path d=\"M13,0L-4,-1L-8,6Z\" fill=\"currentColor\" opacity={0.55} />\n <path d=\"M13,0L-11,-9L-4,-1Z\" fill=\"currentColor\" />\n <path d=\"M13,0L-4,-1\" className=\"stroke-card/40\" strokeWidth={0.75} />\n </g>\n );\n}\n\n/**\n * The round's flight in miniature, on its own axes so a skip to a huge crash\n * still reads: the curve replays up to your cash out, runs on dashed to the\n * crash, and ends in a cross; a missed target is a dashed line above.\n */\nfunction MiniFlight({ crash, cashed, target, reduce }: CrashMiniatureProps) {\n const top = Math.max(crash, target ?? 1, 1.01);\n const end = timeAt(top);\n const x = (seconds: number) => 4 + (seconds / end) * (MINI.width - 8);\n const y = (value: number) => MINI.height - 4 - ((value - 1) / (top - 1)) * (MINI.height - 8);\n const path = (from: number, to: number) => {\n let d = \"\";\n for (let i = 0; i <= 24; i++) {\n const s = from + ((to - from) * i) / 24;\n d += `${i === 0 ? \"M\" : \"L\"}${x(s).toFixed(2)},${y(growth(s)).toFixed(2)}`;\n }\n return d;\n };\n const crashT = timeAt(crash);\n const cashT = cashed === null ? null : timeAt(cashed);\n const draw = (delay: number) => ({\n initial: { pathLength: reduce ? 1 : 0 },\n animate: { pathLength: 1 },\n transition: { ...MINI_REPLAY, delay: reduce ? 0 : delay },\n });\n return (\n <svg\n aria-hidden=\"true\"\n viewBox={`0 0 ${MINI.width} ${MINI.height}`}\n width={MINI.width}\n height={MINI.height}\n className=\"shrink-0 overflow-visible\"\n >\n <line\n x1={4}\n x2={MINI.width - 4}\n y1={MINI.height - 4}\n y2={MINI.height - 4}\n className=\"stroke-border\"\n />\n {target !== null ? (\n <line\n x1={4}\n x2={MINI.width - 4}\n y1={y(target)}\n y2={y(target)}\n strokeDasharray=\"2 3\"\n className=\"stroke-muted-foreground/60\"\n />\n ) : null}\n {cashT === null ? (\n <motion.path\n d={path(0, crashT)}\n fill=\"none\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n className=\"stroke-rose-500\"\n {...draw(0.3)}\n />\n ) : (\n <>\n <motion.path\n d={path(0, cashT)}\n fill=\"none\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n className=\"stroke-primary\"\n {...draw(0.3)}\n />\n <motion.path\n d={path(cashT, crashT)}\n fill=\"none\"\n strokeWidth={1.5}\n strokeDasharray=\"2 3\"\n strokeLinecap=\"round\"\n className=\"stroke-muted-foreground/60\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.25, ease: EASE_OUT, delay: reduce ? 0 : 0.8 }}\n />\n <circle\n cx={x(cashT)}\n cy={y(cashed ?? 1)}\n r={3}\n strokeWidth={1.5}\n className=\"fill-card stroke-primary\"\n />\n </>\n )}\n <motion.path\n d={`M${x(crashT) - 2.5},${y(crash) - 2.5}l5,5m0,-5l-5,5`}\n strokeWidth={1.75}\n strokeLinecap=\"round\"\n className=\"stroke-rose-500\"\n initial={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.25 }}\n animate={{ opacity: 1, scale: 1 }}\n style={{ transformBox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,eAAc;IACd,WAAU;IACV,SAAS,SAAS,EAAE,SAAS,EAAE,IAAI;KAAE,SAAS;KAAG,OAAO;IAAK;IAC7D,SAAS;KAAE,SAAS;KAAG,OAAO;IAAE;IAChC,OAAO;KAAE,cAAc;KAAY,iBAAiB;IAAS;IAC7D,YAAY;KAAE,GAAG;KAAM,OAAO,SAAS,IAAI;IAAK;GACjD,CAAA;EACE;;AAET"}
@@ -2,7 +2,6 @@
2
2
  import { EASE_OUT } from "../../lib/ease.js";
3
3
  import { Button } from "./button/base.js";
4
4
  import { StatefulButton } from "./button/stateful.js";
5
- import "./button/index.js";
6
5
  import { useCallback, useEffect, useId, useRef, useState } from "react";
7
6
  import { cn } from "@kumix/utils";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";