jaml-ui 0.24.19 → 0.25.1

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 (235) hide show
  1. package/DESIGN.md +2 -2
  2. package/README.md +0 -13
  3. package/assets/WeeJokerExampleDAilyGame.png +0 -0
  4. package/assets/balatro-stake-chips.png +0 -0
  5. package/dist/assets.d.ts +1 -2
  6. package/dist/chunks/Layer-BBPJFHfs.js +17 -0
  7. package/dist/chunks/Layer-BBPJFHfs.js.map +1 -0
  8. package/dist/chunks/assets-RWUiFSTc.js +37 -0
  9. package/dist/chunks/assets-RWUiFSTc.js.map +1 -0
  10. package/dist/chunks/motelyItemDecoder-CueyZ0XD.js +6039 -0
  11. package/dist/chunks/motelyItemDecoder-CueyZ0XD.js.map +1 -0
  12. package/dist/chunks/spriteMapper-CFjN0_TV.js +2415 -0
  13. package/dist/chunks/spriteMapper-CFjN0_TV.js.map +1 -0
  14. package/dist/chunks/tokens-B65Fzble.js +57 -0
  15. package/dist/chunks/tokens-B65Fzble.js.map +1 -0
  16. package/dist/chunks/ui-5cBy3zAm.js +1387 -0
  17. package/dist/chunks/ui-5cBy3zAm.js.map +1 -0
  18. package/dist/components/AnalyzerExplorer.d.ts +1 -1
  19. package/dist/components/CardFan.d.ts +1 -1
  20. package/dist/components/CardList.d.ts +1 -1
  21. package/dist/components/DeckSprite.d.ts +1 -1
  22. package/dist/components/JamlAestheticSelector.d.ts +1 -1
  23. package/dist/components/JamlAnalyzerFullscreen.d.ts +5 -5
  24. package/dist/components/JamlCurator.d.ts +1 -1
  25. package/dist/components/JamlIde.d.ts +5 -5
  26. package/dist/components/JamlSeedInput.d.ts +1 -1
  27. package/dist/components/JamlSpeedometer.d.ts +1 -1
  28. package/dist/components/MotelyVersionBadge.d.ts +1 -1
  29. package/dist/components/Standardcard.d.ts +1 -1
  30. package/dist/components/jamlMap/CategoryPicker.d.ts +3 -3
  31. package/dist/components/jamlMap/JamlMapEditor.d.ts +1 -1
  32. package/dist/components/jamlMap/JokerPicker.d.ts +1 -1
  33. package/dist/components/jamlMap/MysterySlot.d.ts +2 -2
  34. package/dist/components/jamlMap/index.d.ts +4 -4
  35. package/dist/core.d.ts +5 -5
  36. package/dist/core.js +27 -5
  37. package/dist/core.js.map +1 -0
  38. package/dist/decode/motelyItemDecoder.d.ts +0 -10
  39. package/dist/decode/motelySprite.d.ts +1 -1
  40. package/dist/fonts/m6x11plus.otf +0 -0
  41. package/dist/hooks/analyzerStreamRegistry.d.ts +2 -2
  42. package/dist/hooks/useAnalyzer.d.ts +2 -2
  43. package/dist/hooks/useSearch.d.ts +2 -2
  44. package/dist/index.d.ts +29 -31
  45. package/dist/index.js +16725 -34
  46. package/dist/index.js.map +1 -0
  47. package/dist/lib/const.d.ts +2 -2
  48. package/dist/lib/hooks/useDragScroll.d.ts +1 -1
  49. package/dist/lib/hooks/useJamlFilter.d.ts +2 -2
  50. package/dist/lib/hooks/useSeedAnalyzer.d.ts +2 -2
  51. package/dist/lib/utils.d.ts +1 -1
  52. package/dist/motely.d.ts +4 -3
  53. package/dist/motely.js +65 -3
  54. package/dist/motely.js.map +1 -0
  55. package/dist/motelyBoot.d.ts +2 -0
  56. package/dist/motelyDisplay.d.ts +0 -2
  57. package/dist/r3f/Card3D.d.ts +2 -2
  58. package/dist/r3f/JimboBillboard.d.ts +1 -1
  59. package/dist/r3f.js +235 -3
  60. package/dist/r3f.js.map +1 -0
  61. package/dist/render/CanvasRenderer.d.ts +1 -1
  62. package/dist/sprites/spriteData.d.ts +1 -6
  63. package/dist/sprites/spriteMapper.d.ts +1 -1
  64. package/dist/ui/JimboBadge.d.ts +1 -1
  65. package/dist/ui/JimboFloating.d.ts +1 -1
  66. package/dist/ui/JimboIconButton.d.ts +1 -1
  67. package/dist/ui/JimboSelect.d.ts +1 -1
  68. package/dist/ui/footer.d.ts +2 -3
  69. package/dist/ui/hooks.d.ts +1 -1
  70. package/dist/ui/ide/DeckSprite.d.ts +1 -1
  71. package/dist/ui/jimbo.css +2 -1837
  72. package/dist/ui/jimboApp.d.ts +1 -1
  73. package/dist/ui/jimboBackground.d.ts +4 -4
  74. package/dist/ui/jimboFilterBar.d.ts +1 -1
  75. package/dist/ui/jimboFlankNav.d.ts +1 -1
  76. package/dist/ui/jimboInfoCard.d.ts +1 -1
  77. package/dist/ui/jimboInset.d.ts +1 -1
  78. package/dist/ui/jimboStatGrid.d.ts +1 -1
  79. package/dist/ui/jimboText.d.ts +1 -1
  80. package/dist/ui/jimboTooltip.d.ts +2 -2
  81. package/dist/ui/mascot/SeedMascot.d.ts +2 -2
  82. package/dist/ui/panel.d.ts +1 -1
  83. package/dist/ui/radial/RadialBadge.d.ts +1 -2
  84. package/dist/ui/radial/RadialButton.d.ts +1 -2
  85. package/dist/ui/radial/RadialMenu.d.ts +2 -2
  86. package/dist/ui/radial/RadialPill.d.ts +1 -2
  87. package/dist/ui/radial/index.d.ts +16 -16
  88. package/dist/ui/radial/radialMenuStore.d.ts +1 -1
  89. package/dist/ui/showcase.d.ts +1 -1
  90. package/dist/ui/sprites.d.ts +2 -2
  91. package/dist/ui.d.ts +0 -1
  92. package/dist/ui.js +3 -36
  93. package/dist/utils/gameCardUtils.d.ts +1 -1
  94. package/dist/utils/jamlVisualFilter.d.ts +1 -7
  95. package/package.json +18 -30
  96. package/dist/assets.js +0 -48
  97. package/dist/components/AnalyzerExplorer.js +0 -391
  98. package/dist/components/CardFan.js +0 -80
  99. package/dist/components/CardList.js +0 -5
  100. package/dist/components/DeckSprite.js +0 -75
  101. package/dist/components/GameCard.js +0 -355
  102. package/dist/components/JamlAestheticSelector.js +0 -22
  103. package/dist/components/JamlAnalyzerFullscreen.js +0 -263
  104. package/dist/components/JamlCodeEditor.js +0 -137
  105. package/dist/components/JamlCurator.js +0 -64
  106. package/dist/components/JamlCurator.stories.d.ts +0 -6
  107. package/dist/components/JamlCurator.stories.js +0 -14
  108. package/dist/components/JamlIde.js +0 -193
  109. package/dist/components/JamlIdeToolbar.js +0 -23
  110. package/dist/components/JamlIdeVisual.js +0 -218
  111. package/dist/components/JamlMapPreview.js +0 -121
  112. package/dist/components/JamlSeedInput.js +0 -26
  113. package/dist/components/JamlSpeedometer.js +0 -70
  114. package/dist/components/Jimbolate.js +0 -17
  115. package/dist/components/MotelyVersionBadge.js +0 -19
  116. package/dist/components/PaginatedFilterBrowser.js +0 -54
  117. package/dist/components/RunConfigModal.js +0 -59
  118. package/dist/components/Standardcard.js +0 -80
  119. package/dist/components/jamlMap/CategoryPicker.js +0 -135
  120. package/dist/components/jamlMap/JamlMapEditor.js +0 -304
  121. package/dist/components/jamlMap/JamlMapEditor.stories.d.ts +0 -7
  122. package/dist/components/jamlMap/JamlMapEditor.stories.js +0 -26
  123. package/dist/components/jamlMap/JamlMapEditorDemo.d.ts +0 -8
  124. package/dist/components/jamlMap/JamlMapEditorDemo.js +0 -323
  125. package/dist/components/jamlMap/JokerPicker.js +0 -113
  126. package/dist/components/jamlMap/MysterySlot.js +0 -128
  127. package/dist/components/jamlMap/MysterySlot.stories.d.ts +0 -7
  128. package/dist/components/jamlMap/MysterySlot.stories.js +0 -31
  129. package/dist/components/jamlMap/index.js +0 -4
  130. package/dist/decode/motelyItemDecoder.js +0 -164
  131. package/dist/decode/motelySprite.js +0 -84
  132. package/dist/hooks/analyzerStreamRegistry.js +0 -96
  133. package/dist/hooks/searchWorker.d.ts +0 -1
  134. package/dist/hooks/searchWorker.js +0 -119
  135. package/dist/hooks/searchWorkerCode.d.ts +0 -1
  136. package/dist/hooks/searchWorkerCode.js +0 -85
  137. package/dist/hooks/useAnalyzer.js +0 -91
  138. package/dist/hooks/useIntersectionObserver.js +0 -52
  139. package/dist/hooks/useSearch.js +0 -161
  140. package/dist/hooks/useShopStream.js +0 -85
  141. package/dist/lib/SpriteMapper.js +0 -48
  142. package/dist/lib/cardParser.js +0 -67
  143. package/dist/lib/classes/BuyMetaData.js +0 -1
  144. package/dist/lib/config.js +0 -15
  145. package/dist/lib/const.js +0 -521
  146. package/dist/lib/data/constants.js +0 -14
  147. package/dist/lib/hooks/useDragScroll.js +0 -48
  148. package/dist/lib/hooks/useJamlFilter.js +0 -219
  149. package/dist/lib/hooks/useSeedAnalyzer.js +0 -50
  150. package/dist/lib/jaml/jamlCompletion.js +0 -13
  151. package/dist/lib/jaml/jamlData.js +0 -6
  152. package/dist/lib/jaml/jamlObjectives.js +0 -97
  153. package/dist/lib/jaml/jamlParser.js +0 -47
  154. package/dist/lib/jaml/jamlPresets.js +0 -61
  155. package/dist/lib/jaml/jamlSchema.js +0 -91
  156. package/dist/lib/parseDailyRitual.js +0 -70
  157. package/dist/lib/tts/getRevealPos.js +0 -16
  158. package/dist/lib/tts/splitTtsDisplay.js +0 -35
  159. package/dist/lib/types.js +0 -1
  160. package/dist/lib/utils.js +0 -5
  161. package/dist/motelyDisplay.js +0 -59
  162. package/dist/r3f/Card3D.js +0 -72
  163. package/dist/r3f/JimboBillboard.js +0 -32
  164. package/dist/r3f/JimboText3D.js +0 -8
  165. package/dist/render/CanvasRenderer.js +0 -11
  166. package/dist/render/Layer.js +0 -18
  167. package/dist/sprites/spriteData.js +0 -100
  168. package/dist/sprites/spriteMapper.js +0 -75
  169. package/dist/stories/Button.d.ts +0 -15
  170. package/dist/stories/Button.js +0 -7
  171. package/dist/stories/Button.stories.d.ts +0 -24
  172. package/dist/stories/Button.stories.js +0 -50
  173. package/dist/stories/Header.d.ts +0 -12
  174. package/dist/stories/Header.js +0 -4
  175. package/dist/stories/Header.stories.d.ts +0 -18
  176. package/dist/stories/Header.stories.js +0 -26
  177. package/dist/stories/Page.d.ts +0 -3
  178. package/dist/stories/Page.js +0 -8
  179. package/dist/stories/Page.stories.d.ts +0 -12
  180. package/dist/stories/Page.stories.js +0 -24
  181. package/dist/ui/Jimbo.stories.d.ts +0 -7
  182. package/dist/ui/Jimbo.stories.js +0 -28
  183. package/dist/ui/JimboBadge.js +0 -8
  184. package/dist/ui/JimboFloating.js +0 -17
  185. package/dist/ui/JimboIconButton.js +0 -28
  186. package/dist/ui/JimboInputModal.js +0 -66
  187. package/dist/ui/JimboSelect.js +0 -43
  188. package/dist/ui/JimboToggleList.js +0 -5
  189. package/dist/ui/PanelSplitter.js +0 -78
  190. package/dist/ui/codeBlock.js +0 -14
  191. package/dist/ui/footer.js +0 -20
  192. package/dist/ui/hooks.js +0 -634
  193. package/dist/ui/ide/AgnosticSeedCard.d.ts +0 -19
  194. package/dist/ui/ide/AgnosticSeedCard.js +0 -48
  195. package/dist/ui/ide/DeckSprite.js +0 -2
  196. package/dist/ui/ide/JamlBuilder.d.ts +0 -1
  197. package/dist/ui/ide/JamlBuilder.js +0 -112
  198. package/dist/ui/ide/JamlEditor.js +0 -486
  199. package/dist/ui/ide/JamlEditorMonaco.d.ts +0 -8
  200. package/dist/ui/ide/JamlEditorMonaco.js +0 -78
  201. package/dist/ui/ide/WasmStatus.d.ts +0 -1
  202. package/dist/ui/ide/WasmStatus.js +0 -42
  203. package/dist/ui/jimboApp.js +0 -15
  204. package/dist/ui/jimboBackground.js +0 -26
  205. package/dist/ui/jimboCopyRow.js +0 -18
  206. package/dist/ui/jimboFilterBar.js +0 -16
  207. package/dist/ui/jimboFlankNav.js +0 -18
  208. package/dist/ui/jimboInfoCard.js +0 -26
  209. package/dist/ui/jimboInset.js +0 -9
  210. package/dist/ui/jimboSectionHeader.js +0 -9
  211. package/dist/ui/jimboStatGrid.js +0 -9
  212. package/dist/ui/jimboTabs.js +0 -22
  213. package/dist/ui/jimboText.js +0 -33
  214. package/dist/ui/jimboTooltip.js +0 -39
  215. package/dist/ui/jimboWordmark.js +0 -9
  216. package/dist/ui/mascot/JammySpeechBox.js +0 -30
  217. package/dist/ui/mascot/SeedMascot.js +0 -17
  218. package/dist/ui/mascot/index.js +0 -3
  219. package/dist/ui/mascot/menuConfig.js +0 -12
  220. package/dist/ui/panel.js +0 -24
  221. package/dist/ui/radial/RadialBadge.js +0 -43
  222. package/dist/ui/radial/RadialBreadcrumb.js +0 -18
  223. package/dist/ui/radial/RadialButton.js +0 -102
  224. package/dist/ui/radial/RadialMenu.js +0 -168
  225. package/dist/ui/radial/RadialPill.js +0 -15
  226. package/dist/ui/radial/index.js +0 -18
  227. package/dist/ui/radial/radialMenuStore.js +0 -122
  228. package/dist/ui/radial/radialMenuViewport.js +0 -59
  229. package/dist/ui/radial/useRadialMenu.js +0 -107
  230. package/dist/ui/showcase.js +0 -20
  231. package/dist/ui/sprites.js +0 -77
  232. package/dist/ui/tokens.js +0 -64
  233. package/dist/utils/gameCardUtils.js +0 -15
  234. package/dist/utils/jamlMapPreview.js +0 -106
  235. package/dist/utils/jamlVisualFilter.js +0 -210
@@ -0,0 +1,1387 @@
1
+ import { n as e } from "./assets-RWUiFSTc.js";
2
+ import { n as t, t as n } from "./tokens-B65Fzble.js";
3
+ import { n as r, p as i, r as a, t as o } from "./spriteMapper-CFjN0_TV.js";
4
+ import s, { memo as c, useCallback as l, useEffect as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
5
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
6
+ //#region src/ui/hooks.ts
7
+ function _(e) {
8
+ return new Promise((t) => {
9
+ let n = new window.Image();
10
+ n.addEventListener("load", () => t(n)), n.addEventListener("error", () => t(null)), n.src = e;
11
+ });
12
+ }
13
+ function v(e, t, n, r, i) {
14
+ if (!n || !r || !r?.pos) return 0;
15
+ let a = n.width / r.columns, o = n.height / r.rows, s = e.style;
16
+ if (r.order === 0 && (e.width = a, e.height = o, s.width = `${a}px`, s.height = `${o}px`), s.imageRendering = "pixelated", t.imageSmoothingEnabled = !0, t.save(), r.animated && i) {
17
+ let e = i, n = Math.sin(e / 1e3) * 3, r = Math.sin(e / 1500) * 1.5;
18
+ t.globalAlpha = .65 + (Math.sin(e / 2e3) + 1) * .075, t.translate(r, n);
19
+ }
20
+ return t.drawImage(n, r.pos.x * a, r.pos.y * o, a, o, 0, 0, e.width, e.height), t.restore(), a / o;
21
+ }
22
+ function y(e) {
23
+ let t = f(null);
24
+ return u(() => {
25
+ if (!e || !t.current) return;
26
+ let r, i = Date.now(), a = t.current, o = () => {
27
+ let e = (Date.now() - i) % n.SWAY_DURATION / n.SWAY_DURATION * Math.PI * 2;
28
+ a.style.transform = `translate(${Math.sin(e) * n.SWAY_AMOUNT * .3}px, ${Math.sin(e * .8) * n.SWAY_AMOUNT}px)`, r = requestAnimationFrame(o);
29
+ };
30
+ return r = requestAnimationFrame(o), () => {
31
+ cancelAnimationFrame(r), a && (a.style.transform = "");
32
+ };
33
+ }, [e]), t;
34
+ }
35
+ function b() {
36
+ let e = f(null);
37
+ return u(() => {
38
+ let t = e.current;
39
+ if (!t) return;
40
+ let n = t.getContext("webgl");
41
+ if (!n) return;
42
+ let r = (e, t) => {
43
+ let r = n.createShader(e);
44
+ return r ? (n.shaderSource(r, t), n.compileShader(r), n.getShaderParameter(r, n.COMPILE_STATUS) ? r : (console.error("[JimboBackground] shader compile error:", n.getShaderInfoLog(r)), n.deleteShader(r), null)) : null;
45
+ }, i = r(n.VERTEX_SHADER, "\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n "), a = r(n.FRAGMENT_SHADER, "\n precision mediump float;\n\n uniform float u_time;\n uniform vec2 u_resolution;\n\n const float SPIN_ROTATION = -2.0;\n const float SPIN_SPEED = 4.5;\n const vec4 COLOUR_1 = vec4(1.0, 0.2, 0.2, 1.0);\n const vec4 COLOUR_2 = vec4(0.0, 0.5, 1.0, 1.0);\n const vec4 COLOUR_3 = vec4(0.05, 0.08, 0.1, 1.0);\n const float CONTRAST = 4.5;\n const float LIGTHING = 0.5;\n const float SPIN_AMOUNT = 0.35;\n const float PIXEL_FILTER = 1024.0;\n const float PI = 3.14159265359;\n\n void main() {\n vec2 screenSize = u_resolution;\n float pixel_size = length(screenSize.xy) / PIXEL_FILTER;\n vec2 uv = (floor(gl_FragCoord.xy*(1.0/pixel_size))*pixel_size - 0.5*screenSize.xy)/length(screenSize.xy);\n float uv_len = length(uv);\n\n float speed = (SPIN_ROTATION * 0.2) + 302.2;\n float new_pixel_angle = atan(uv.y, uv.x) + speed - 20.0*(1.0*SPIN_AMOUNT*uv_len + (1.0 - 1.0*SPIN_AMOUNT));\n\n vec2 mid = (screenSize.xy/length(screenSize.xy))/2.0;\n uv = (vec2((uv_len * cos(new_pixel_angle) + mid.x), (uv_len * sin(new_pixel_angle) + mid.y)) - mid);\n\n uv *= 30.0;\n speed = u_time * SPIN_SPEED;\n vec2 uv2 = vec2(uv.x, uv.y);\n\n for(int i=0; i < 5; i++) {\n uv2 += sin(max(uv.x, uv.y)) + uv;\n uv += 0.5*vec2(cos(5.1123314 + 0.353*uv2.y + speed*0.131121), sin(uv2.x - 0.113*speed));\n uv -= 1.0*cos(uv.x + uv.y) - 1.0*sin(uv.x*0.711 - uv.y);\n }\n\n float contrast_mod = (0.25*CONTRAST + 0.5*SPIN_AMOUNT + 1.2);\n float paint_res = min(2.0, max(0.0, length(uv)*(0.035)*contrast_mod));\n float c1p = max(0.0, 1.0 - contrast_mod*abs(1.0 - paint_res));\n float c2p = max(0.0, 1.0 - contrast_mod*abs(paint_res));\n float c3p = 1.0 - min(1.0, c1p + c2p);\n float light = (LIGTHING - 0.2)*max(c1p*5.0 - 4.0, 0.0) + LIGTHING*max(c2p*5.0 - 4.0, 0.0);\n\n vec4 finalCol = (0.3/CONTRAST)*COLOUR_1 + (1.0 - 0.3/CONTRAST)*(COLOUR_1*c1p + COLOUR_2*c2p + vec4(c3p*COLOUR_3.rgb, c3p*COLOUR_1.a)) + light;\n\n gl_FragColor = finalCol;\n }\n ");
46
+ if (!i || !a) return;
47
+ let o = n.createProgram();
48
+ if (!o) return;
49
+ if (n.attachShader(o, i), n.attachShader(o, a), n.linkProgram(o), !n.getProgramParameter(o, n.LINK_STATUS)) {
50
+ console.error("[JimboBackground] program link error:", n.getProgramInfoLog(o));
51
+ return;
52
+ }
53
+ n.useProgram(o);
54
+ let s = n.createBuffer();
55
+ n.bindBuffer(n.ARRAY_BUFFER, s), n.bufferData(n.ARRAY_BUFFER, new Float32Array([
56
+ -1,
57
+ -1,
58
+ 1,
59
+ -1,
60
+ -1,
61
+ 1,
62
+ -1,
63
+ 1,
64
+ 1,
65
+ -1,
66
+ 1,
67
+ 1
68
+ ]), n.STATIC_DRAW);
69
+ let c = n.getAttribLocation(o, "position");
70
+ n.enableVertexAttribArray(c), n.vertexAttribPointer(c, 2, n.FLOAT, !1, 0, 0);
71
+ let l = n.getUniformLocation(o, "u_time"), u = n.getUniformLocation(o, "u_resolution"), d = Date.now(), f, p = () => {
72
+ let e = t.clientWidth, r = t.clientHeight;
73
+ (t.width !== e || t.height !== r) && (t.width = e, t.height = r, n.viewport(0, 0, n.drawingBufferWidth, n.drawingBufferHeight));
74
+ let i = (Date.now() - d) / 1e3;
75
+ n.uniform1f(l, i), n.uniform2f(u, t.width, t.height), n.drawArrays(n.TRIANGLES, 0, 6), f = requestAnimationFrame(p);
76
+ };
77
+ return p(), () => {
78
+ cancelAnimationFrame(f), n.deleteProgram(o), n.deleteShader(i), n.deleteShader(a), n.deleteBuffer(s);
79
+ };
80
+ }, []), e;
81
+ }
82
+ function x({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r = !1 }) {
83
+ let [i, a] = p(!1), [o, s] = p(null), c = f(null), d = f(null), m = f(null), h = l(() => {
84
+ r || (m.current && clearTimeout(m.current), m.current = setTimeout(() => a(!0), n));
85
+ }, [r, n]), g = l(() => {
86
+ m.current && clearTimeout(m.current), a(!1), s(null);
87
+ }, []), _ = l(() => {
88
+ let e = c.current, n = d.current;
89
+ if (!e || !n) return;
90
+ let r = e.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.top, o = t === "top" ? "top" : t === "bottom" ? "bottom" : a >= i.height + 12 ? "top" : "bottom", l = r.left + r.width / 2 - i.width / 2, u = o === "top" ? r.top - i.height - 8 : r.bottom + 8;
91
+ s({
92
+ left: Math.max(8, Math.min(window.innerWidth - i.width - 8, l)),
93
+ top: u,
94
+ align: o
95
+ });
96
+ }, [t]);
97
+ return u(() => {
98
+ if (!i || e !== "snap") return;
99
+ let t = requestAnimationFrame(_);
100
+ return window.addEventListener("resize", _), window.addEventListener("scroll", _, !0), () => {
101
+ cancelAnimationFrame(t), window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
102
+ };
103
+ }, [
104
+ i,
105
+ e,
106
+ _
107
+ ]), u(() => () => {
108
+ m.current && clearTimeout(m.current);
109
+ }, []), {
110
+ visible: i,
111
+ pos: o,
112
+ targetRef: c,
113
+ tooltipRef: d,
114
+ show: h,
115
+ hide: g,
116
+ handleMouseMove: l((t) => {
117
+ e === "mouse" && s({
118
+ left: t.clientX + 12,
119
+ top: t.clientY + 16,
120
+ align: "bottom"
121
+ });
122
+ }, [e])
123
+ };
124
+ }
125
+ function S({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
126
+ let r = f(null), a = f(/* @__PURE__ */ new Map()), [o, s] = p(3 / 4), [, c] = p(0), l = f(null), [d, m] = p(0), [h, g] = p(!1), [y, b] = p("none"), x = e?.some((e) => e.animated);
127
+ return u(() => {
128
+ let e = !1, t = a.current;
129
+ return (async () => {
130
+ let n = Array.from(new Set(Object.values(i).map((e) => e.src))), r = await Promise.all(n.map((e) => _(e)));
131
+ e || (r.forEach((e, r) => {
132
+ e && t.set(n[r], e);
133
+ }), c((e) => e + 1));
134
+ })().catch((e) => console.error("[JamlCardRenderer]", e)), () => {
135
+ e = !0, t.clear();
136
+ };
137
+ }, []), u(() => {
138
+ if (!x) return;
139
+ let e, t = (n) => {
140
+ e ||= n;
141
+ let r = n - e;
142
+ (!l.current || n - 100 > l.current) && (l.current = n, m(r)), l.current = requestAnimationFrame(t);
143
+ };
144
+ return l.current = requestAnimationFrame(t), () => {
145
+ l.current && cancelAnimationFrame(l.current);
146
+ };
147
+ }, [x]), u(() => {
148
+ let n = r.current;
149
+ if (!n || !e || e.length === 0) return;
150
+ let i = n.getContext("2d");
151
+ if (!i) return;
152
+ let o = !1;
153
+ return i.clearRect(0, 0, n.width, n.height), [...e].sort((e, t) => e.order - t.order).forEach((e) => {
154
+ if (a.current.has(e.source)) {
155
+ let t = a.current.get(e.source);
156
+ if (!t) return;
157
+ let r = v(n, i, t, e, x ? d : void 0);
158
+ e.order === 0 && s(r);
159
+ return;
160
+ }
161
+ _(e.source).then((t) => {
162
+ if (o || !t) return;
163
+ let r = v(n, i, t, e, x ? d : void 0);
164
+ a.current.set(e.source, t), e.order === 0 && s(r), c((e) => e + 1);
165
+ });
166
+ }), n.style.filter = t ? "invert(0.94)" : "none", () => {
167
+ o = !0;
168
+ };
169
+ }, [
170
+ e,
171
+ d,
172
+ t,
173
+ x
174
+ ]), {
175
+ canvasRef: r,
176
+ containerStyle: {
177
+ aspectRatio: String(o),
178
+ width: "100%",
179
+ display: "flex",
180
+ perspective: n ? "1000px" : void 0,
181
+ userSelect: "none",
182
+ WebkitUserSelect: "none"
183
+ },
184
+ canvasStyle: {
185
+ transition: n && !h ? "transform 0.4s ease, box-shadow 0.4s ease-out" : "transform 0.1s ease-out",
186
+ transform: n ? h ? y : "none" : void 0,
187
+ transformStyle: n ? "preserve-3d" : void 0,
188
+ transformOrigin: n ? "center center" : void 0,
189
+ borderRadius: "6px",
190
+ boxShadow: n && h ? "0 2px 12px rgba(0,0,0,0.3)" : "0 2px 8px rgba(0,0,0,0.2)",
191
+ imageRendering: "pixelated",
192
+ pointerEvents: "none"
193
+ },
194
+ handlers: {
195
+ onPointerEnter: n ? (e) => {
196
+ !n || e.pointerType === "touch" || g(!0);
197
+ } : void 0,
198
+ onPointerLeave: n ? () => {
199
+ n && (g(!1), b("none"));
200
+ } : void 0,
201
+ onPointerMove: n ? (e) => {
202
+ if (!n || e.pointerType === "touch") return;
203
+ let t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, i = e.clientY - t.top, a = r / t.width * 12 - 6;
204
+ b(`perspective(1000px) rotateX(${i / t.height * -16 + 8}deg) rotateY(${a}deg) scale(1.05) translateY(-2px)`);
205
+ } : void 0
206
+ }
207
+ };
208
+ }
209
+ function C(e, t = {}) {
210
+ let [n, r] = p(e[0]?.ante ?? 0), [i, a] = p(e[0]?.ante), o = f(null), s = f(/* @__PURE__ */ new Map());
211
+ return e[0]?.ante !== i && (a(e[0]?.ante), e.length > 0 && r(e[0].ante)), u(() => {
212
+ let n = o.current;
213
+ if (!n || e.length === 0) return;
214
+ let i = new IntersectionObserver((e) => {
215
+ let t = e.filter((e) => e.isIntersecting).sort((e, t) => t.intersectionRatio - e.intersectionRatio)[0];
216
+ if (t) {
217
+ let e = Number(t.target.dataset.ante);
218
+ Number.isNaN(e) || r(e);
219
+ }
220
+ }, {
221
+ root: n,
222
+ threshold: t.threshold ?? [
223
+ .4,
224
+ .6,
225
+ .8
226
+ ]
227
+ });
228
+ return s.current.forEach((e) => i.observe(e)), () => i.disconnect();
229
+ }, [e, t.threshold]), {
230
+ currentAnte: n,
231
+ scrollRef: o,
232
+ scrollToAnte: l((e) => {
233
+ let t = s.current.get(e);
234
+ t && t.scrollIntoView({
235
+ behavior: "smooth",
236
+ block: "start"
237
+ });
238
+ }, []),
239
+ registerAnteRef: l((e, t) => {
240
+ t ? s.current.set(e, t) : s.current.delete(e);
241
+ }, [])
242
+ };
243
+ }
244
+ function ee(e, t, n) {
245
+ let [r, i] = p(null), [a, o] = p(null), [s, c] = p(null), d = l((e, t, n) => {
246
+ let r = "touches" in e ? e.touches[0] : e, i = e.currentTarget.getBoundingClientRect();
247
+ o({
248
+ clause: t,
249
+ fromZone: n,
250
+ x: r.clientX,
251
+ y: r.clientY,
252
+ offX: r.clientX - i.left,
253
+ offY: r.clientY - i.top
254
+ }), c(null);
255
+ }, []);
256
+ return u(() => {
257
+ if (!a && !r) return;
258
+ let l = (e) => {
259
+ let t = "touches" in e ? e : null, s = t ? t.touches[0] : e;
260
+ if (!s) return;
261
+ let l = r;
262
+ if (!l && a) {
263
+ let e = s.clientX - a.x, t = s.clientY - a.y;
264
+ if (Math.hypot(e, t) < 8) return;
265
+ l = {
266
+ ...a,
267
+ x: s.clientX,
268
+ y: s.clientY
269
+ }, o(null), i(l);
270
+ } else l && (l = {
271
+ ...l,
272
+ x: s.clientX,
273
+ y: s.clientY
274
+ }, i(l));
275
+ if (!l) return;
276
+ t?.cancelable && t.preventDefault();
277
+ let u = n.current?.querySelectorAll("[data-zone]") ?? [], d = null;
278
+ for (let e of u) {
279
+ let t = e.getBoundingClientRect();
280
+ if (s.clientX >= t.left && s.clientX <= t.right && s.clientY >= t.top && s.clientY <= t.bottom) {
281
+ d = e.getAttribute("data-zone");
282
+ break;
283
+ }
284
+ }
285
+ c(d);
286
+ }, u = () => {
287
+ if (r && s && s !== r.fromZone) {
288
+ let n = s;
289
+ t({
290
+ ...e,
291
+ [r.fromZone]: e[r.fromZone].filter((e) => e.id !== r.clause.id),
292
+ [n]: [...e[n], { ...r.clause }]
293
+ });
294
+ }
295
+ o(null), i(null), c(null);
296
+ };
297
+ return window.addEventListener("mousemove", l), window.addEventListener("mouseup", u), window.addEventListener("touchmove", l, { passive: !1 }), window.addEventListener("touchend", u), () => {
298
+ window.removeEventListener("mousemove", l), window.removeEventListener("mouseup", u), window.removeEventListener("touchmove", l), window.removeEventListener("touchend", u);
299
+ };
300
+ }, [
301
+ a,
302
+ r,
303
+ s,
304
+ e,
305
+ t,
306
+ n
307
+ ]), {
308
+ drag: r,
309
+ hoverZone: s,
310
+ onDragStart: d
311
+ };
312
+ }
313
+ //#endregion
314
+ //#region src/ui/sprites.tsx
315
+ function w({ name: t, sheet: n, width: i = 40, height: s, style: c }) {
316
+ let l = a(t), u = n ?? l?.type ?? "Jokers", d = o[u], f = r(u), p = l?.pos ?? f.pos, m = i;
317
+ [
318
+ "Jokers",
319
+ "Tarots",
320
+ "Vouchers",
321
+ "Boosters",
322
+ "Decks",
323
+ "Enhancers",
324
+ "Editions"
325
+ ].includes(u) && (m = Math.round(i * 95 / 71));
326
+ let g = s ?? m;
327
+ if (!d) return null;
328
+ let _ = i * d.cols, v = g * d.rows, y = -(p.x * i), b = -(p.y * g);
329
+ return /* @__PURE__ */ h("div", { style: {
330
+ width: i,
331
+ height: g,
332
+ flexShrink: 0,
333
+ backgroundImage: `url(${e(d.assetKey)})`,
334
+ backgroundSize: `${_}px ${v}px`,
335
+ backgroundPosition: `${y}px ${b}px`,
336
+ backgroundRepeat: "no-repeat",
337
+ imageRendering: "pixelated",
338
+ ...c
339
+ } });
340
+ }
341
+ var te = [
342
+ "White",
343
+ "Red",
344
+ "Green",
345
+ "Black",
346
+ "Blue",
347
+ "Purple",
348
+ "Orange",
349
+ "Gold"
350
+ ];
351
+ function ne({ stake: t, width: n = 29, height: r, style: i }) {
352
+ let a = te.indexOf(t.replace(" Stake", "")), o = a >= 0 ? a : 0, s = o % 5, c = Math.floor(o / 5), l = r ?? n, u = n * 5, d = l * 2;
353
+ return /* @__PURE__ */ h("div", { style: {
354
+ width: n,
355
+ height: l,
356
+ flexShrink: 0,
357
+ backgroundImage: `url(${e("stakes")})`,
358
+ backgroundSize: `${u}px ${d}px`,
359
+ backgroundPosition: `-${s * n}px -${c * l}px`,
360
+ backgroundRepeat: "no-repeat",
361
+ imageRendering: "pixelated",
362
+ ...i
363
+ } });
364
+ }
365
+ var re = {
366
+ Red: 0,
367
+ Blue: 1,
368
+ Yellow: 2,
369
+ Green: 3,
370
+ Black: 0,
371
+ Magic: 1,
372
+ Nebula: 2,
373
+ Ghost: 3
374
+ };
375
+ function ie({ deck: t, width: n = 71, height: r, style: i }) {
376
+ let a = re[t.replace(" Deck", "")] ?? 0, o = r ?? n * 95 / 71, s = n * 13, c = o * 4;
377
+ return /* @__PURE__ */ h("div", { style: {
378
+ width: n,
379
+ height: o,
380
+ flexShrink: 0,
381
+ backgroundImage: `url(${e("deck")})`,
382
+ backgroundSize: `${s}px ${c}px`,
383
+ backgroundPosition: `-${12 * n}px -${a * o}px`,
384
+ backgroundRepeat: "no-repeat",
385
+ imageRendering: "pixelated",
386
+ ...i
387
+ } });
388
+ }
389
+ //#endregion
390
+ //#region src/ui/jimboText.tsx
391
+ function T({ tone: e = "default", size: t = "md", shadow: n = !0, uppercase: r = !1, dance: i = !1, letterSpacing: a, as: o = "span", className: s = "", style: c, children: l, ...u }) {
392
+ let d = `j-text--${t}`, f = `j-text--${e}`, p = n ? "" : "j-text--no-shadow", m = r ? "j-text--upper" : "", g = i ? "j-text--dance-container" : "", _ = {};
393
+ a == null ? r && a == null && (_.letterSpacing = 2) : _.letterSpacing = a, c && Object.assign(_, c);
394
+ let v = l;
395
+ return i && typeof l == "string" && (v = l.split("").map((e, t) => /* @__PURE__ */ h("span", {
396
+ className: "j-font-dance-char",
397
+ style: { animationDelay: `${t * -.15}s` },
398
+ children: e === " " ? "\xA0" : e
399
+ }, t))), /* @__PURE__ */ h(o, {
400
+ className: `j-text ${d} ${f} ${p} ${m} ${g} ${s}`.trim(),
401
+ style: Object.keys(_).length > 0 ? _ : void 0,
402
+ ...u,
403
+ children: v
404
+ });
405
+ }
406
+ //#endregion
407
+ //#region src/ui/panel.tsx
408
+ var E = c(({ children: e, className: t = "", sway: n = !1, onBack: r, hideBack: i = !1, style: a, ...o }) => /* @__PURE__ */ g("div", {
409
+ ref: y(n),
410
+ className: `j-panel ${t}`,
411
+ style: a,
412
+ ...o,
413
+ children: [/* @__PURE__ */ h("div", {
414
+ className: "j-panel__body",
415
+ children: e
416
+ }), r && !i && /* @__PURE__ */ h("div", {
417
+ className: "j-panel__back",
418
+ children: /* @__PURE__ */ h(k, { onClick: r })
419
+ })]
420
+ }));
421
+ E.displayName = "JimboPanel";
422
+ var D = c(({ children: e, className: t = "", style: n, ...r }) => /* @__PURE__ */ h("div", {
423
+ className: `j-inner-panel ${t}`,
424
+ style: n,
425
+ ...r,
426
+ children: e
427
+ }));
428
+ D.displayName = "JimboInnerPanel";
429
+ function O({ tone: e = "orange", size: t = "md", fullWidth: n = !1, disabled: r = !1, uppercase: i = !1, onClick: a, style: o, className: s = "", children: c }) {
430
+ let l = t === "xs" ? "xs" : t === "sm" ? "sm" : t === "lg" ? "lg" : "md";
431
+ return /* @__PURE__ */ h("button", {
432
+ type: "button",
433
+ className: `j-btn j-btn--${e} j-btn--${t} ${n ? "j-btn--full" : ""} ${r ? "j-btn--disabled" : ""} ${s}`,
434
+ disabled: r,
435
+ onClick: a,
436
+ style: o,
437
+ children: /* @__PURE__ */ h("div", {
438
+ className: "j-btn__face",
439
+ children: /* @__PURE__ */ h(T, {
440
+ size: l,
441
+ uppercase: i,
442
+ children: c
443
+ })
444
+ })
445
+ });
446
+ }
447
+ function k({ onClick: e }) {
448
+ return /* @__PURE__ */ h("div", {
449
+ className: "j-flex j-justify-center j-w-full",
450
+ style: { padding: "4px 0" },
451
+ children: /* @__PURE__ */ h(O, {
452
+ tone: "orange",
453
+ size: "md",
454
+ fullWidth: !0,
455
+ onClick: e,
456
+ className: "j-back-btn",
457
+ children: "Back"
458
+ })
459
+ });
460
+ }
461
+ function A({ children: e, open: t, onClose: n, title: r, className: i, showBack: a = !0 }) {
462
+ return t ? /* @__PURE__ */ h("div", {
463
+ className: "j-modal-overlay",
464
+ children: /* @__PURE__ */ g(E, {
465
+ onBack: a ? n : void 0,
466
+ className: `j-modal ${i ?? ""}`,
467
+ children: [r && /* @__PURE__ */ h(T, {
468
+ as: "h2",
469
+ size: "lg",
470
+ className: "j-modal__title",
471
+ children: r
472
+ }), e]
473
+ })
474
+ }) : null;
475
+ }
476
+ //#endregion
477
+ //#region src/ui/jimboTabs.tsx
478
+ function ae({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
479
+ return /* @__PURE__ */ h("div", {
480
+ className: `j-tabs ${r}`,
481
+ style: i,
482
+ children: e.map((e) => /* @__PURE__ */ h(oe, {
483
+ label: e.label,
484
+ active: t === e.id,
485
+ onClick: () => n(e.id)
486
+ }, e.id))
487
+ });
488
+ }
489
+ function oe({ label: e, active: t, onClick: n }) {
490
+ return /* @__PURE__ */ g("div", {
491
+ className: "j-tab",
492
+ "data-active": t,
493
+ children: [/* @__PURE__ */ h("div", {
494
+ className: "j-tab__indicator",
495
+ "data-active": t,
496
+ "aria-hidden": !0,
497
+ children: /* @__PURE__ */ h("svg", {
498
+ width: 14,
499
+ height: 10,
500
+ viewBox: "0 0 14 10",
501
+ children: /* @__PURE__ */ h("polygon", { points: "7,10 0,0 14,0" })
502
+ })
503
+ }), /* @__PURE__ */ h("button", {
504
+ type: "button",
505
+ className: "j-tab__btn",
506
+ "data-active": t,
507
+ onClick: n,
508
+ children: /* @__PURE__ */ h(T, {
509
+ size: "sm",
510
+ tone: "default",
511
+ children: e
512
+ })
513
+ })]
514
+ });
515
+ }
516
+ function se({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
517
+ return /* @__PURE__ */ h("div", {
518
+ className: `j-vtabs ${r}`,
519
+ style: i,
520
+ children: e.map((e) => {
521
+ let r = t === e.id;
522
+ return /* @__PURE__ */ h("button", {
523
+ type: "button",
524
+ className: "j-vtab",
525
+ "data-active": r,
526
+ onClick: () => n(e.id),
527
+ children: /* @__PURE__ */ h(T, {
528
+ size: "sm",
529
+ tone: r ? "default" : "grey",
530
+ children: e.label
531
+ })
532
+ }, e.id);
533
+ })
534
+ });
535
+ }
536
+ //#endregion
537
+ //#region src/ui/JimboFloating.tsx
538
+ function ce({ anchor: e = "top-right", offset: t = 12, zIndex: n = 20, children: r }) {
539
+ let i = {
540
+ position: "absolute",
541
+ zIndex: n
542
+ };
543
+ return e.includes("top") && (i.top = t), e.includes("bottom") && (i.bottom = t), e.includes("left") && (i.left = t), e.includes("right") && (i.right = t), e.includes("center") && (i.left = "50%", i.transform = "translateX(-50%)"), /* @__PURE__ */ h("div", {
544
+ style: i,
545
+ children: r
546
+ });
547
+ }
548
+ //#endregion
549
+ //#region src/ui/JimboToggleList.tsx
550
+ function le({ items: e, onToggle: t, title: n }) {
551
+ return /* @__PURE__ */ h(E, { children: /* @__PURE__ */ g("div", {
552
+ className: "j-toggle-list",
553
+ children: [n && /* @__PURE__ */ h("div", {
554
+ className: "j-toggle-list__title",
555
+ children: n
556
+ }), e.map((e) => /* @__PURE__ */ g("button", {
557
+ type: "button",
558
+ className: "j-toggle-item",
559
+ onClick: () => t(e.id),
560
+ children: [/* @__PURE__ */ h("div", {
561
+ className: "j-toggle-check",
562
+ "data-on": e.on
563
+ }), e.label]
564
+ }, e.id))]
565
+ }) });
566
+ }
567
+ //#endregion
568
+ //#region src/ui/JimboBadge.tsx
569
+ function ue({ size: e = "sm", tone: t = "dark", className: n, children: r }) {
570
+ return /* @__PURE__ */ h("span", {
571
+ className: `j-badge j-badge--${e} j-badge--${t} ${n ?? ""}`,
572
+ children: r
573
+ });
574
+ }
575
+ //#endregion
576
+ //#region src/ui/jimboFlankNav.tsx
577
+ function de({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel: i = "Previous", nextLabel: a = "Next", children: o, className: s = "", style: c }) {
578
+ return /* @__PURE__ */ g("div", {
579
+ className: `j-flank ${s}`,
580
+ style: c,
581
+ children: [
582
+ /* @__PURE__ */ h(j, {
583
+ direction: "left",
584
+ onClick: e,
585
+ disabled: !n,
586
+ "aria-label": i
587
+ }),
588
+ /* @__PURE__ */ h("div", {
589
+ className: "j-flank__content",
590
+ children: o
591
+ }),
592
+ /* @__PURE__ */ h(j, {
593
+ direction: "right",
594
+ onClick: t,
595
+ disabled: !r,
596
+ "aria-label": a
597
+ })
598
+ ]
599
+ });
600
+ }
601
+ function j({ direction: e, onClick: t, disabled: n, "aria-label": r }) {
602
+ let [i, a] = s.useState(!1);
603
+ return /* @__PURE__ */ h("button", {
604
+ type: "button",
605
+ className: "j-flank__btn",
606
+ "data-pressed": i && !n,
607
+ onClick: t,
608
+ disabled: n,
609
+ "aria-label": r,
610
+ title: r,
611
+ onMouseDown: () => !n && a(!0),
612
+ onMouseUp: () => a(!1),
613
+ onMouseLeave: () => a(!1),
614
+ onTouchStart: () => !n && a(!0),
615
+ onTouchEnd: () => a(!1),
616
+ children: /* @__PURE__ */ h(fe, { direction: e })
617
+ });
618
+ }
619
+ function fe({ direction: e }) {
620
+ return /* @__PURE__ */ h("svg", {
621
+ width: 28,
622
+ height: 28,
623
+ viewBox: "0 0 28 28",
624
+ fill: "none",
625
+ stroke: "currentColor",
626
+ strokeWidth: 2,
627
+ strokeLinecap: "round",
628
+ strokeLinejoin: "round",
629
+ "aria-hidden": !0,
630
+ children: /* @__PURE__ */ h("polyline", { points: e === "left" ? "18,4 8,14 18,24" : "10,4 20,14 10,24" })
631
+ });
632
+ }
633
+ //#endregion
634
+ //#region src/ui/jimboFilterBar.tsx
635
+ function M({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...", searchLabel: r = "Search", sort: i, onSortChange: a, sortLabel: o = "Sort By", sortOptions: s, className: c = "", style: l }) {
636
+ return /* @__PURE__ */ g("div", {
637
+ className: `j-filter-bar ${c}`,
638
+ style: l,
639
+ children: [t ? /* @__PURE__ */ g("div", {
640
+ className: "j-filter-bar__field",
641
+ children: [/* @__PURE__ */ h("div", {
642
+ className: "j-filter-bar__pill",
643
+ children: /* @__PURE__ */ h(T, {
644
+ size: "xs",
645
+ children: r
646
+ })
647
+ }), /* @__PURE__ */ g("div", {
648
+ className: "j-relative",
649
+ children: [/* @__PURE__ */ h("div", {
650
+ className: "j-filter-bar__search-icon",
651
+ children: /* @__PURE__ */ h(N, {})
652
+ }), /* @__PURE__ */ h("input", {
653
+ type: "text",
654
+ value: e ?? "",
655
+ onChange: (e) => t(e.target.value),
656
+ placeholder: n,
657
+ className: "j-filter-bar__input"
658
+ })]
659
+ })]
660
+ }) : null, s && a ? /* @__PURE__ */ g("div", {
661
+ className: "j-filter-bar__field",
662
+ children: [/* @__PURE__ */ h("div", {
663
+ className: "j-filter-bar__pill",
664
+ children: /* @__PURE__ */ h(T, {
665
+ size: "xs",
666
+ children: o
667
+ })
668
+ }), /* @__PURE__ */ g("div", {
669
+ className: "j-relative",
670
+ children: [/* @__PURE__ */ h("select", {
671
+ value: i ?? s[0]?.value,
672
+ onChange: (e) => a(e.target.value),
673
+ className: "j-filter-bar__select",
674
+ children: s.map((e) => /* @__PURE__ */ h("option", {
675
+ value: e.value,
676
+ children: e.label
677
+ }, e.value))
678
+ }), /* @__PURE__ */ h("div", {
679
+ className: "j-filter-bar__sort-icon",
680
+ children: /* @__PURE__ */ h(P, {})
681
+ })]
682
+ })]
683
+ }) : null]
684
+ });
685
+ }
686
+ function N() {
687
+ return /* @__PURE__ */ g("svg", {
688
+ width: 24,
689
+ height: 24,
690
+ viewBox: "0 0 24 24",
691
+ fill: "none",
692
+ stroke: "currentColor",
693
+ strokeWidth: 3,
694
+ strokeLinecap: "round",
695
+ strokeLinejoin: "round",
696
+ "aria-hidden": !0,
697
+ children: [/* @__PURE__ */ h("circle", {
698
+ cx: 11,
699
+ cy: 11,
700
+ r: 8
701
+ }), /* @__PURE__ */ h("line", {
702
+ x1: 21,
703
+ y1: 21,
704
+ x2: 16.65,
705
+ y2: 16.65
706
+ })]
707
+ });
708
+ }
709
+ function P() {
710
+ return /* @__PURE__ */ g("svg", {
711
+ width: 20,
712
+ height: 20,
713
+ viewBox: "0 0 24 24",
714
+ fill: "none",
715
+ stroke: "currentColor",
716
+ strokeWidth: 2.5,
717
+ strokeLinecap: "round",
718
+ strokeLinejoin: "round",
719
+ "aria-hidden": !0,
720
+ children: [
721
+ /* @__PURE__ */ h("polyline", { points: "7 4 7 20" }),
722
+ /* @__PURE__ */ h("polyline", { points: "3 8 7 4 11 8" }),
723
+ /* @__PURE__ */ h("polyline", { points: "17 20 17 4" }),
724
+ /* @__PURE__ */ h("polyline", { points: "21 16 17 20 13 16" })
725
+ ]
726
+ });
727
+ }
728
+ //#endregion
729
+ //#region src/ui/footer.tsx
730
+ var F = [
731
+ {
732
+ char: "♥️",
733
+ kf: "jaml-heart"
734
+ },
735
+ {
736
+ char: "♠️",
737
+ kf: "jaml-spade"
738
+ },
739
+ {
740
+ char: "♦️",
741
+ kf: "jaml-diamond"
742
+ },
743
+ {
744
+ char: "♣️",
745
+ kf: "jaml-club"
746
+ }
747
+ ];
748
+ function I({ className: e = "" }) {
749
+ return /* @__PURE__ */ g("div", {
750
+ className: `j-footer ${e}`,
751
+ children: [/* @__PURE__ */ h("div", {
752
+ className: "j-footer__bar",
753
+ children: /* @__PURE__ */ g("p", {
754
+ className: "j-footer__text",
755
+ children: [
756
+ /* @__PURE__ */ g("span", { children: ["Not affiliated with LocalThunk or PlayStack •", " "] }),
757
+ /* @__PURE__ */ h("a", {
758
+ href: "https://store.steampowered.com/app/2379780/Balatro/",
759
+ target: "_blank",
760
+ rel: "noopener noreferrer",
761
+ className: "j-footer__link",
762
+ children: "BUY BALATRO"
763
+ }),
764
+ /* @__PURE__ */ g("span", { children: [
765
+ " ",
766
+ "• Created with",
767
+ " "
768
+ ] }),
769
+ /* @__PURE__ */ g("span", {
770
+ className: "j-footer__suits",
771
+ children: [
772
+ /* @__PURE__ */ h("span", {
773
+ className: "j-footer__suit-stage",
774
+ children: F.map(({ char: e, kf: t }) => /* @__PURE__ */ h("span", {
775
+ className: "j-footer__suit-char",
776
+ style: { animationName: t },
777
+ children: e
778
+ }, e))
779
+ }),
780
+ " ",
781
+ "for the Balatro community"
782
+ ]
783
+ })
784
+ ]
785
+ })
786
+ }), /* @__PURE__ */ h("style", { children: "\n @keyframes jaml-heart { 0%{opacity:0;transform:scale(1)} 1%{opacity:1;transform:scale(1.45)} 3.5%{opacity:1;transform:scale(1)} 61.5%{opacity:1;transform:scale(1)} 62%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-spade { 0%,61.5%{opacity:0} 62%{opacity:1;transform:scale(1.45)} 64.5%{opacity:1;transform:scale(1)} 71.5%{opacity:1} 72%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-diamond { 0%,71.5%{opacity:0} 72%{opacity:1;transform:scale(1.45)} 74.5%{opacity:1;transform:scale(1)} 81.5%{opacity:1} 82%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-club { 0%,81.5%{opacity:0} 82%{opacity:1;transform:scale(1.45)} 84.5%{opacity:1;transform:scale(1)} 95%{opacity:1} 96%{opacity:0} 100%{opacity:0} }\n " })]
787
+ });
788
+ }
789
+ //#endregion
790
+ //#region src/ui/jimboBackground.tsx
791
+ function L() {
792
+ return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("canvas", {
793
+ ref: b(),
794
+ "aria-hidden": !0,
795
+ style: {
796
+ position: "fixed",
797
+ inset: 0,
798
+ width: "100%",
799
+ height: "100%",
800
+ zIndex: -10,
801
+ pointerEvents: "none"
802
+ }
803
+ }), /* @__PURE__ */ h(I, {})] });
804
+ }
805
+ //#endregion
806
+ //#region src/ui/jimboTooltip.tsx
807
+ function R(e, t) {
808
+ typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
809
+ }
810
+ function z({ content: e, children: t, mode: n = "snap", placement: r = "auto", delay: i = 80, maxWidth: a = 280, disabled: o = !1 }) {
811
+ let { visible: c, pos: u, targetRef: d, tooltipRef: f, show: p, hide: _, handleMouseMove: v } = x({
812
+ mode: n,
813
+ placement: r,
814
+ delay: i,
815
+ disabled: o
816
+ }), y = s.Children.only(t), b = y.ref, S = l((e) => {
817
+ d.current = e, R(b, e);
818
+ }, [b, d]);
819
+ return /* @__PURE__ */ g(m, { children: [s.cloneElement(y, {
820
+ ref: S,
821
+ onMouseEnter: (e) => {
822
+ p(), y.props.onMouseEnter?.(e);
823
+ },
824
+ onMouseLeave: (e) => {
825
+ _(), y.props.onMouseLeave?.(e);
826
+ },
827
+ onFocus: (e) => {
828
+ p(), y.props.onFocus?.(e);
829
+ },
830
+ onBlur: (e) => {
831
+ _(), y.props.onBlur?.(e);
832
+ },
833
+ onMouseMove: (e) => {
834
+ v(e), y.props.onMouseMove?.(e);
835
+ }
836
+ }), c ? /* @__PURE__ */ h("div", {
837
+ ref: f,
838
+ role: "tooltip",
839
+ className: "j-tooltip",
840
+ style: {
841
+ left: u?.left ?? -9999,
842
+ top: u?.top ?? -9999,
843
+ maxWidth: a,
844
+ opacity: +!!u
845
+ },
846
+ children: e
847
+ }) : null] });
848
+ }
849
+ //#endregion
850
+ //#region src/ui/codeBlock.tsx
851
+ function B({ code: e, language: t, filename: n, className: r = "" }) {
852
+ let [i, a] = p(!1);
853
+ return /* @__PURE__ */ g("div", {
854
+ className: `j-code-block ${r}`,
855
+ children: [/* @__PURE__ */ g("div", {
856
+ className: "j-code-block__header",
857
+ children: [/* @__PURE__ */ g("div", {
858
+ className: "j-code-block__meta",
859
+ children: [n && /* @__PURE__ */ h("span", {
860
+ className: "j-code-block__filename",
861
+ children: n
862
+ }), t && /* @__PURE__ */ h("span", {
863
+ className: "j-code-block__lang",
864
+ children: t
865
+ })]
866
+ }), /* @__PURE__ */ h("button", {
867
+ onClick: () => {
868
+ navigator.clipboard.writeText(e), a(!0), setTimeout(() => a(!1), 2e3);
869
+ },
870
+ title: "Copy",
871
+ className: "j-code-block__copy",
872
+ "data-copied": i,
873
+ children: i ? /* @__PURE__ */ h("svg", {
874
+ width: "14",
875
+ height: "14",
876
+ viewBox: "0 0 24 24",
877
+ fill: "none",
878
+ stroke: "currentColor",
879
+ strokeWidth: "2.5",
880
+ strokeLinecap: "round",
881
+ strokeLinejoin: "round",
882
+ children: /* @__PURE__ */ h("polyline", { points: "20 6 9 17 4 12" })
883
+ }) : /* @__PURE__ */ g("svg", {
884
+ width: "14",
885
+ height: "14",
886
+ viewBox: "0 0 24 24",
887
+ fill: "none",
888
+ stroke: "currentColor",
889
+ strokeWidth: "2",
890
+ strokeLinecap: "round",
891
+ strokeLinejoin: "round",
892
+ children: [/* @__PURE__ */ h("rect", {
893
+ x: "9",
894
+ y: "9",
895
+ width: "13",
896
+ height: "13",
897
+ rx: "2"
898
+ }), /* @__PURE__ */ h("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })]
899
+ })
900
+ })]
901
+ }), /* @__PURE__ */ h("pre", {
902
+ className: "j-code-block__pre",
903
+ children: /* @__PURE__ */ h("code", { children: e })
904
+ })]
905
+ });
906
+ }
907
+ //#endregion
908
+ //#region src/ui/jimboApp.tsx
909
+ function V({ children: e, fluid: t, className: n = "", ...r }) {
910
+ return /* @__PURE__ */ h("div", {
911
+ className: `j-app${t ? " j-app--fluid" : ""} ${n}`.trim(),
912
+ ...r,
913
+ children: e
914
+ });
915
+ }
916
+ function pe({ children: e, className: t = "", ...n }) {
917
+ return /* @__PURE__ */ h("div", {
918
+ className: `j-app__scroll ${t}`,
919
+ ...n,
920
+ children: e
921
+ });
922
+ }
923
+ function H({ children: e, className: t = "", ...n }) {
924
+ return /* @__PURE__ */ h("div", {
925
+ className: `j-app__footer ${t}`,
926
+ ...n,
927
+ children: e
928
+ });
929
+ }
930
+ //#endregion
931
+ //#region src/ui/jimboSectionHeader.tsx
932
+ function U({ label: e, tone: t = "blue", className: n = "" }) {
933
+ return /* @__PURE__ */ g("div", {
934
+ className: `j-section-header ${n}`,
935
+ children: [/* @__PURE__ */ h("div", {
936
+ className: `j-section-header__tag j-bg--${t}`,
937
+ children: e
938
+ }), /* @__PURE__ */ h("div", { className: `j-section-header__rule j-bg--${t}` })]
939
+ });
940
+ }
941
+ //#endregion
942
+ //#region src/ui/jimboInfoCard.tsx
943
+ function W({ tone: e, children: t, className: n = "", ...r }) {
944
+ return /* @__PURE__ */ h("div", {
945
+ className: `j-info-card ${e ? `j-border--${e}` : ""} ${n}`,
946
+ style: e ? { borderColor: void 0 } : void 0,
947
+ ...r,
948
+ children: t
949
+ });
950
+ }
951
+ function G({ children: e, className: t = "" }) {
952
+ return /* @__PURE__ */ h("div", {
953
+ className: `j-info-card__body ${t}`,
954
+ children: e
955
+ });
956
+ }
957
+ function K({ children: e, className: t = "" }) {
958
+ return /* @__PURE__ */ h("div", {
959
+ className: `j-info-card__title ${t}`,
960
+ children: e
961
+ });
962
+ }
963
+ function q({ children: e, className: t = "" }) {
964
+ return /* @__PURE__ */ h("div", {
965
+ className: `j-info-card__sub ${t}`,
966
+ children: e
967
+ });
968
+ }
969
+ function J({ children: e, className: t = "" }) {
970
+ return /* @__PURE__ */ h("div", {
971
+ className: `j-info-card__aside ${t}`,
972
+ children: e
973
+ });
974
+ }
975
+ //#endregion
976
+ //#region src/ui/showcase.tsx
977
+ function me({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n = [], recentFinds: r = [], mcpInfo: i, onNewSearch: a, onBrowseFilters: o, onFilterClick: s }) {
978
+ return /* @__PURE__ */ g(V, { children: [
979
+ /* @__PURE__ */ g("div", {
980
+ style: {
981
+ padding: "12px 12px 8px",
982
+ display: "flex",
983
+ flexDirection: "column",
984
+ gap: 6
985
+ },
986
+ children: [
987
+ /* @__PURE__ */ g("div", {
988
+ className: "j-text-center",
989
+ children: [/* @__PURE__ */ h(T, {
990
+ size: "lg",
991
+ tone: "gold",
992
+ children: e
993
+ }), /* @__PURE__ */ h(T, {
994
+ size: "micro",
995
+ tone: "grey",
996
+ style: { letterSpacing: 3 },
997
+ children: t
998
+ })]
999
+ }),
1000
+ i && /* @__PURE__ */ g("div", {
1001
+ className: "j-flex j-justify-between",
1002
+ style: {
1003
+ padding: "3px 8px",
1004
+ background: "var(--j-dark-grey)",
1005
+ borderRadius: 4,
1006
+ border: "1px solid var(--j-panel-edge)"
1007
+ },
1008
+ children: [/* @__PURE__ */ h(T, {
1009
+ size: "micro",
1010
+ tone: "purple",
1011
+ children: i.engine
1012
+ }), /* @__PURE__ */ h(T, {
1013
+ size: "micro",
1014
+ tone: "grey",
1015
+ children: i.features
1016
+ })]
1017
+ }),
1018
+ n.length > 0 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(U, {
1019
+ label: "Filters",
1020
+ tone: "blue"
1021
+ }), /* @__PURE__ */ h("div", {
1022
+ className: "j-flex-col",
1023
+ style: { gap: 4 },
1024
+ children: n.slice(0, 4).map((e, t) => /* @__PURE__ */ g(W, {
1025
+ tone: e.tone,
1026
+ onClick: () => s?.(e, t),
1027
+ style: { cursor: s ? "pointer" : void 0 },
1028
+ children: [
1029
+ /* @__PURE__ */ h("div", {
1030
+ className: "j-flex j-gap-xs",
1031
+ children: e.sample.slice(0, 2).map((e, t) => /* @__PURE__ */ h("div", {
1032
+ style: {
1033
+ width: 22,
1034
+ height: 28,
1035
+ display: "flex",
1036
+ alignItems: "center",
1037
+ justifyContent: "center"
1038
+ },
1039
+ children: /* @__PURE__ */ h(w, {
1040
+ name: e,
1041
+ width: 20
1042
+ })
1043
+ }, t))
1044
+ }),
1045
+ /* @__PURE__ */ g(G, { children: [/* @__PURE__ */ h(K, { children: e.name }), /* @__PURE__ */ g(q, { children: ["by ", e.author] })] }),
1046
+ /* @__PURE__ */ h(J, { children: /* @__PURE__ */ h(T, {
1047
+ size: "xs",
1048
+ tone: e.tone === "gold" ? "gold" : e.tone,
1049
+ children: e.hits
1050
+ }) })
1051
+ ]
1052
+ }, t))
1053
+ })] }),
1054
+ r.length > 0 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(U, {
1055
+ label: "Recent",
1056
+ tone: "green"
1057
+ }), /* @__PURE__ */ h("div", {
1058
+ style: { lineHeight: 1.5 },
1059
+ children: r.slice(0, 3).map((e, t) => /* @__PURE__ */ g("div", {
1060
+ className: "j-flex j-gap-sm",
1061
+ children: [
1062
+ /* @__PURE__ */ h(T, {
1063
+ size: "micro",
1064
+ tone: "gold",
1065
+ children: e.seed
1066
+ }),
1067
+ /* @__PURE__ */ h(T, {
1068
+ size: "micro",
1069
+ tone: "grey",
1070
+ children: e.filterName
1071
+ }),
1072
+ e.score > 0 && /* @__PURE__ */ g(T, {
1073
+ size: "micro",
1074
+ tone: "green",
1075
+ children: ["+", e.score]
1076
+ })
1077
+ ]
1078
+ }, t))
1079
+ })] })
1080
+ ]
1081
+ }),
1082
+ /* @__PURE__ */ g(H, { children: [/* @__PURE__ */ h(O, {
1083
+ tone: "green",
1084
+ fullWidth: !0,
1085
+ size: "lg",
1086
+ onClick: a,
1087
+ children: "New Search"
1088
+ }), /* @__PURE__ */ h(O, {
1089
+ tone: "blue",
1090
+ fullWidth: !0,
1091
+ size: "lg",
1092
+ onClick: o,
1093
+ children: "Browse Filters"
1094
+ })] }),
1095
+ /* @__PURE__ */ h(I, {})
1096
+ ] });
1097
+ }
1098
+ //#endregion
1099
+ //#region src/ui/jimboCopyRow.tsx
1100
+ function he({ value: e, label: t }) {
1101
+ let [n, r] = p(!1);
1102
+ function i() {
1103
+ navigator.clipboard.writeText(e).then(() => {
1104
+ r(!0), setTimeout(() => r(!1), 1500);
1105
+ });
1106
+ }
1107
+ return /* @__PURE__ */ g("div", {
1108
+ className: "j-copy-row",
1109
+ children: [t && /* @__PURE__ */ h(T, {
1110
+ size: "xs",
1111
+ tone: "grey",
1112
+ className: "j-copy-row__label",
1113
+ children: t
1114
+ }), /* @__PURE__ */ g("div", {
1115
+ className: "j-copy-row__field",
1116
+ children: [/* @__PURE__ */ h("div", {
1117
+ className: "j-copy-row__value",
1118
+ children: /* @__PURE__ */ h(T, {
1119
+ size: "sm",
1120
+ children: e
1121
+ })
1122
+ }), /* @__PURE__ */ h("button", {
1123
+ type: "button",
1124
+ className: "j-copy-row__btn",
1125
+ "data-copied": n,
1126
+ onClick: i,
1127
+ children: n ? "Copied" : "Copy"
1128
+ })]
1129
+ })]
1130
+ });
1131
+ }
1132
+ //#endregion
1133
+ //#region src/ui/jimboWordmark.tsx
1134
+ function ge({ title: e, subtitle: t, className: n = "" }) {
1135
+ return /* @__PURE__ */ g("div", {
1136
+ className: `j-wordmark ${n}`,
1137
+ children: [/* @__PURE__ */ h("div", {
1138
+ className: "j-wordmark__title",
1139
+ children: e
1140
+ }), t && /* @__PURE__ */ h("div", {
1141
+ className: "j-wordmark__sub",
1142
+ children: t
1143
+ })]
1144
+ });
1145
+ }
1146
+ //#endregion
1147
+ //#region src/ui/jimboStatGrid.tsx
1148
+ function _e({ items: e, className: t = "", ...n }) {
1149
+ return /* @__PURE__ */ h("div", {
1150
+ className: `j-stat-grid ${t}`,
1151
+ ...n,
1152
+ children: e.map((e) => /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("div", {
1153
+ className: "j-stat-grid__value",
1154
+ children: e.value
1155
+ }), /* @__PURE__ */ h("div", {
1156
+ className: "j-stat-grid__label",
1157
+ children: e.label
1158
+ })] }, e.label))
1159
+ });
1160
+ }
1161
+ //#endregion
1162
+ //#region src/ui/jimboInset.tsx
1163
+ function Y({ children: e, className: t = "", ...n }) {
1164
+ return /* @__PURE__ */ h("div", {
1165
+ className: `j-inset ${t}`,
1166
+ ...n,
1167
+ children: e
1168
+ });
1169
+ }
1170
+ //#endregion
1171
+ //#region src/ui/JimboIconButton.tsx
1172
+ var X = t;
1173
+ function ve({ onClick: e, title: t, "aria-label": n, disabled: r = !1, size: i = "md", children: a }) {
1174
+ let [o, s] = p(!1), c = i === "sm" ? 26 : 30;
1175
+ return /* @__PURE__ */ h("button", {
1176
+ "aria-label": n ?? t,
1177
+ disabled: r,
1178
+ onClick: () => !r && e?.(),
1179
+ onMouseEnter: () => s(!0),
1180
+ onMouseLeave: () => s(!1),
1181
+ style: {
1182
+ width: c,
1183
+ height: c,
1184
+ display: "inline-flex",
1185
+ alignItems: "center",
1186
+ justifyContent: "center",
1187
+ background: o && !r ? X.DARK_GREY : X.DARKEST,
1188
+ color: X.WHITE,
1189
+ border: `1px solid ${X.PANEL_EDGE}`,
1190
+ borderRadius: 4,
1191
+ cursor: r ? "not-allowed" : "pointer",
1192
+ opacity: r ? .55 : 1,
1193
+ padding: 0,
1194
+ fontSize: 14,
1195
+ lineHeight: 1,
1196
+ transition: "background 80ms ease"
1197
+ },
1198
+ title: t,
1199
+ type: "button",
1200
+ children: a
1201
+ });
1202
+ }
1203
+ //#endregion
1204
+ //#region src/ui/JimboInputModal.tsx
1205
+ var Z = t;
1206
+ function ye({ open: e, title: t, message: n, placeholder: r, initialValue: i = "", confirmLabel: a = "Confirm", cancelLabel: o = "Cancel", validate: s, onConfirm: c, onCancel: l }) {
1207
+ let [d, m] = p(i), [_, v] = p(null), y = f(null), [b, x] = p(e);
1208
+ e !== b && (x(e), e && (m(i), v(null))), u(() => {
1209
+ if (e) {
1210
+ let e = setTimeout(() => y.current?.focus(), 30);
1211
+ return () => clearTimeout(e);
1212
+ }
1213
+ }, [e]);
1214
+ function S() {
1215
+ let e = s?.(d) ?? null;
1216
+ if (e) {
1217
+ v(e);
1218
+ return;
1219
+ }
1220
+ c(d);
1221
+ }
1222
+ return /* @__PURE__ */ g(A, {
1223
+ onClose: l,
1224
+ open: e,
1225
+ title: t,
1226
+ children: [
1227
+ n && /* @__PURE__ */ h(T, {
1228
+ size: "sm",
1229
+ style: {
1230
+ display: "block",
1231
+ marginBottom: 8
1232
+ },
1233
+ tone: "grey",
1234
+ children: n
1235
+ }),
1236
+ /* @__PURE__ */ h("input", {
1237
+ "aria-invalid": _ ? "true" : "false",
1238
+ onChange: (e) => {
1239
+ m(e.target.value), _ && v(null);
1240
+ },
1241
+ onKeyDown: (e) => {
1242
+ e.key === "Enter" && S(), e.key === "Escape" && l();
1243
+ },
1244
+ placeholder: r,
1245
+ ref: y,
1246
+ style: {
1247
+ width: "100%",
1248
+ padding: "8px 10px",
1249
+ background: Z.DARKEST,
1250
+ color: Z.WHITE,
1251
+ border: `1px solid ${_ ? Z.RED : Z.PANEL_EDGE}`,
1252
+ borderRadius: 4,
1253
+ fontSize: 13,
1254
+ fontFamily: "m6x11plus, monospace",
1255
+ letterSpacing: 1,
1256
+ outline: "none",
1257
+ boxSizing: "border-box"
1258
+ },
1259
+ type: "text",
1260
+ value: d
1261
+ }),
1262
+ _ && /* @__PURE__ */ h(T, {
1263
+ size: "sm",
1264
+ style: {
1265
+ display: "block",
1266
+ marginTop: 6
1267
+ },
1268
+ tone: "red",
1269
+ children: _
1270
+ }),
1271
+ /* @__PURE__ */ g("div", {
1272
+ style: {
1273
+ display: "flex",
1274
+ justifyContent: "flex-end",
1275
+ gap: 8,
1276
+ marginTop: 14
1277
+ },
1278
+ children: [/* @__PURE__ */ h(O, {
1279
+ onClick: l,
1280
+ size: "sm",
1281
+ tone: "red",
1282
+ children: o
1283
+ }), /* @__PURE__ */ h(O, {
1284
+ onClick: S,
1285
+ size: "sm",
1286
+ tone: "blue",
1287
+ children: a
1288
+ })]
1289
+ })
1290
+ ]
1291
+ });
1292
+ }
1293
+ //#endregion
1294
+ //#region src/ui/JimboSelect.tsx
1295
+ var Q = t;
1296
+ function be({ value: e, options: t, onChange: n, placeholder: r, disabled: i = !1, fullWidth: a = !0, size: o = "md", style: s, "aria-label": c }) {
1297
+ let l;
1298
+ l = t.length === 0 ? [] : typeof t[0] == "string" ? t.map((e) => ({ value: e })) : t;
1299
+ let u = o === "sm" ? "4px 8px" : "6px 10px", d = o === "sm" ? 11 : 12;
1300
+ return /* @__PURE__ */ g("select", {
1301
+ "aria-label": c,
1302
+ disabled: i,
1303
+ onChange: (e) => n(e.target.value),
1304
+ style: {
1305
+ width: a ? "100%" : void 0,
1306
+ padding: u,
1307
+ background: Q.DARKEST,
1308
+ color: Q.WHITE,
1309
+ border: `1px solid ${Q.PANEL_EDGE}`,
1310
+ borderRadius: 4,
1311
+ fontSize: d,
1312
+ fontFamily: "m6x11plus, monospace",
1313
+ cursor: i ? "not-allowed" : "pointer",
1314
+ opacity: i ? .55 : 1,
1315
+ appearance: "none",
1316
+ backgroundImage: "linear-gradient(45deg, transparent 50%, " + Q.GOLD_TEXT + " 50%), linear-gradient(135deg, " + Q.GOLD_TEXT + " 50%, transparent 50%)",
1317
+ backgroundPosition: "calc(100% - 12px) 50%, calc(100% - 7px) 50%",
1318
+ backgroundSize: "5px 5px, 5px 5px",
1319
+ backgroundRepeat: "no-repeat",
1320
+ paddingRight: 22,
1321
+ ...s
1322
+ },
1323
+ value: e,
1324
+ children: [r !== void 0 && /* @__PURE__ */ h("option", {
1325
+ disabled: !0,
1326
+ value: "",
1327
+ children: r
1328
+ }), l.map((e) => /* @__PURE__ */ h("option", {
1329
+ disabled: e.disabled,
1330
+ value: e.value,
1331
+ children: e.label ?? e.value
1332
+ }, e.value))]
1333
+ });
1334
+ }
1335
+ //#endregion
1336
+ //#region src/ui/PanelSplitter.tsx
1337
+ var $ = t;
1338
+ function xe({ orientation: e = "vertical", onDrag: t, onKeyAdjust: n, "aria-label": r }) {
1339
+ let i = f(!1), a = f(0), o = f(t);
1340
+ d(() => {
1341
+ o.current = t;
1342
+ });
1343
+ let s = l((t) => {
1344
+ t.preventDefault(), t.target.setPointerCapture(t.pointerId), i.current = !0, a.current = e === "vertical" ? t.clientX : t.clientY;
1345
+ }, [e]);
1346
+ u(() => {
1347
+ function t(t) {
1348
+ if (!i.current) return;
1349
+ let n = e === "vertical" ? t.clientX : t.clientY, r = n - a.current;
1350
+ r !== 0 && (a.current = n, o.current(r));
1351
+ }
1352
+ function n() {
1353
+ i.current = !1;
1354
+ }
1355
+ return window.addEventListener("pointermove", t), window.addEventListener("pointerup", n), window.addEventListener("pointercancel", n), () => {
1356
+ window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", n), window.removeEventListener("pointercancel", n);
1357
+ };
1358
+ }, [e]);
1359
+ let c = e === "vertical";
1360
+ return /* @__PURE__ */ h("button", {
1361
+ "aria-label": r ?? "Resize panel",
1362
+ onKeyDown: (e) => {
1363
+ n && (c && e.key === "ArrowLeft" && n(-16), c && e.key === "ArrowRight" && n(16), !c && e.key === "ArrowUp" && n(-16), !c && e.key === "ArrowDown" && n(16));
1364
+ },
1365
+ onPointerDown: s,
1366
+ style: {
1367
+ all: "unset",
1368
+ display: "block",
1369
+ flex: "0 0 auto",
1370
+ width: c ? 6 : void 0,
1371
+ height: c ? void 0 : 6,
1372
+ cursor: c ? "col-resize" : "row-resize",
1373
+ background: $.PANEL_EDGE,
1374
+ borderLeft: c ? `1px solid ${$.BLACK}` : void 0,
1375
+ borderRight: c ? `1px solid ${$.BLACK}` : void 0,
1376
+ borderTop: c ? void 0 : `1px solid ${$.BLACK}`,
1377
+ borderBottom: c ? void 0 : `1px solid ${$.BLACK}`,
1378
+ touchAction: "none",
1379
+ userSelect: "none"
1380
+ },
1381
+ type: "button"
1382
+ });
1383
+ }
1384
+ //#endregion
1385
+ export { k as A, S as B, M as C, ce as D, le as E, T as F, ie as I, w as L, D as M, A as N, ae as O, E as P, ne as R, I as S, ue as T, ee as V, H as _, Y as a, z as b, he as c, J as d, G as f, V as g, U as h, ve as i, O as j, se as k, me as l, K as m, be as n, _e as o, q as p, ye as r, ge as s, xe as t, W as u, pe as v, de as w, L as x, B as y, C as z };
1386
+
1387
+ //# sourceMappingURL=ui-5cBy3zAm.js.map