jaml-ui 0.24.20 → 0.25.2

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 (233) hide show
  1. package/README.md +0 -13
  2. package/assets/WeeJokerExampleDAilyGame.png +0 -0
  3. package/assets/balatro-stake-chips.png +0 -0
  4. package/dist/assets.d.ts +1 -2
  5. package/dist/chunks/Layer-BBPJFHfs.js +17 -0
  6. package/dist/chunks/Layer-BBPJFHfs.js.map +1 -0
  7. package/dist/chunks/assets-RWUiFSTc.js +37 -0
  8. package/dist/chunks/assets-RWUiFSTc.js.map +1 -0
  9. package/dist/chunks/motelyItemDecoder-CueyZ0XD.js +6039 -0
  10. package/dist/chunks/motelyItemDecoder-CueyZ0XD.js.map +1 -0
  11. package/dist/chunks/spriteMapper-CFjN0_TV.js +2415 -0
  12. package/dist/chunks/spriteMapper-CFjN0_TV.js.map +1 -0
  13. package/dist/chunks/tokens-B65Fzble.js +57 -0
  14. package/dist/chunks/tokens-B65Fzble.js.map +1 -0
  15. package/dist/chunks/ui-5cBy3zAm.js +1387 -0
  16. package/dist/chunks/ui-5cBy3zAm.js.map +1 -0
  17. package/dist/components/AnalyzerExplorer.d.ts +1 -1
  18. package/dist/components/CardFan.d.ts +1 -1
  19. package/dist/components/CardList.d.ts +1 -1
  20. package/dist/components/DeckSprite.d.ts +1 -1
  21. package/dist/components/JamlAestheticSelector.d.ts +1 -1
  22. package/dist/components/JamlAnalyzerFullscreen.d.ts +5 -5
  23. package/dist/components/JamlCurator.d.ts +1 -6
  24. package/dist/components/JamlIde.d.ts +5 -5
  25. package/dist/components/JamlSeedInput.d.ts +1 -1
  26. package/dist/components/JamlSpeedometer.d.ts +1 -1
  27. package/dist/components/MotelyVersionBadge.d.ts +1 -1
  28. package/dist/components/Standardcard.d.ts +1 -1
  29. package/dist/components/jamlMap/CategoryPicker.d.ts +3 -3
  30. package/dist/components/jamlMap/JamlMapEditor.d.ts +1 -1
  31. package/dist/components/jamlMap/JokerPicker.d.ts +1 -1
  32. package/dist/components/jamlMap/MysterySlot.d.ts +2 -2
  33. package/dist/components/jamlMap/index.d.ts +4 -4
  34. package/dist/core.d.ts +5 -5
  35. package/dist/core.js +27 -5
  36. package/dist/core.js.map +1 -0
  37. package/dist/decode/motelyItemDecoder.d.ts +0 -10
  38. package/dist/decode/motelySprite.d.ts +1 -1
  39. package/dist/fonts/m6x11plus.otf +0 -0
  40. package/dist/hooks/analyzerStreamRegistry.d.ts +2 -2
  41. package/dist/hooks/useAnalyzer.d.ts +3 -3
  42. package/dist/hooks/useSearch.d.ts +2 -2
  43. package/dist/index.d.ts +29 -31
  44. package/dist/index.js +16721 -34
  45. package/dist/index.js.map +1 -0
  46. package/dist/lib/const.d.ts +2 -2
  47. package/dist/lib/hooks/useDragScroll.d.ts +1 -1
  48. package/dist/lib/hooks/useJamlFilter.d.ts +2 -2
  49. package/dist/lib/hooks/useSeedAnalyzer.d.ts +2 -2
  50. package/dist/lib/utils.d.ts +1 -1
  51. package/dist/motely.d.ts +4 -3
  52. package/dist/motely.js +65 -3
  53. package/dist/motely.js.map +1 -0
  54. package/dist/motelyBoot.d.ts +2 -0
  55. package/dist/motelyDisplay.d.ts +0 -2
  56. package/dist/r3f/Card3D.d.ts +2 -2
  57. package/dist/r3f/JimboBillboard.d.ts +1 -1
  58. package/dist/r3f.js +235 -3
  59. package/dist/r3f.js.map +1 -0
  60. package/dist/render/CanvasRenderer.d.ts +1 -1
  61. package/dist/sprites/spriteData.d.ts +1 -6
  62. package/dist/sprites/spriteMapper.d.ts +1 -1
  63. package/dist/ui/JimboBadge.d.ts +1 -1
  64. package/dist/ui/JimboFloating.d.ts +1 -1
  65. package/dist/ui/JimboIconButton.d.ts +1 -1
  66. package/dist/ui/JimboSelect.d.ts +1 -1
  67. package/dist/ui/footer.d.ts +2 -3
  68. package/dist/ui/hooks.d.ts +1 -1
  69. package/dist/ui/ide/DeckSprite.d.ts +1 -1
  70. package/dist/ui/jimbo.css +2 -1856
  71. package/dist/ui/jimboApp.d.ts +1 -1
  72. package/dist/ui/jimboFilterBar.d.ts +1 -1
  73. package/dist/ui/jimboFlankNav.d.ts +1 -1
  74. package/dist/ui/jimboInfoCard.d.ts +1 -1
  75. package/dist/ui/jimboInset.d.ts +1 -1
  76. package/dist/ui/jimboStatGrid.d.ts +1 -1
  77. package/dist/ui/jimboText.d.ts +1 -1
  78. package/dist/ui/jimboTooltip.d.ts +2 -2
  79. package/dist/ui/mascot/SeedMascot.d.ts +2 -2
  80. package/dist/ui/panel.d.ts +1 -1
  81. package/dist/ui/radial/RadialBadge.d.ts +1 -2
  82. package/dist/ui/radial/RadialButton.d.ts +1 -2
  83. package/dist/ui/radial/RadialMenu.d.ts +2 -2
  84. package/dist/ui/radial/RadialPill.d.ts +1 -2
  85. package/dist/ui/radial/index.d.ts +16 -16
  86. package/dist/ui/radial/radialMenuStore.d.ts +1 -1
  87. package/dist/ui/showcase.d.ts +1 -1
  88. package/dist/ui/sprites.d.ts +2 -2
  89. package/dist/ui.d.ts +0 -1
  90. package/dist/ui.js +3 -36
  91. package/dist/utils/gameCardUtils.d.ts +1 -1
  92. package/dist/utils/jamlVisualFilter.d.ts +1 -7
  93. package/package.json +13 -25
  94. package/dist/assets.js +0 -48
  95. package/dist/components/AnalyzerExplorer.js +0 -391
  96. package/dist/components/CardFan.js +0 -80
  97. package/dist/components/CardList.js +0 -5
  98. package/dist/components/DeckSprite.js +0 -75
  99. package/dist/components/GameCard.js +0 -355
  100. package/dist/components/JamlAestheticSelector.js +0 -22
  101. package/dist/components/JamlAnalyzerFullscreen.js +0 -263
  102. package/dist/components/JamlCodeEditor.js +0 -137
  103. package/dist/components/JamlCurator.js +0 -64
  104. package/dist/components/JamlCurator.stories.d.ts +0 -6
  105. package/dist/components/JamlCurator.stories.js +0 -14
  106. package/dist/components/JamlIde.js +0 -193
  107. package/dist/components/JamlIdeToolbar.js +0 -23
  108. package/dist/components/JamlIdeVisual.js +0 -218
  109. package/dist/components/JamlMapPreview.js +0 -121
  110. package/dist/components/JamlSeedInput.js +0 -26
  111. package/dist/components/JamlSpeedometer.js +0 -70
  112. package/dist/components/Jimbolate.js +0 -17
  113. package/dist/components/MotelyVersionBadge.js +0 -19
  114. package/dist/components/PaginatedFilterBrowser.js +0 -54
  115. package/dist/components/RunConfigModal.js +0 -59
  116. package/dist/components/Standardcard.js +0 -80
  117. package/dist/components/jamlMap/CategoryPicker.js +0 -135
  118. package/dist/components/jamlMap/JamlMapEditor.js +0 -304
  119. package/dist/components/jamlMap/JamlMapEditor.stories.d.ts +0 -7
  120. package/dist/components/jamlMap/JamlMapEditor.stories.js +0 -26
  121. package/dist/components/jamlMap/JamlMapEditorDemo.d.ts +0 -8
  122. package/dist/components/jamlMap/JamlMapEditorDemo.js +0 -323
  123. package/dist/components/jamlMap/JokerPicker.js +0 -113
  124. package/dist/components/jamlMap/MysterySlot.js +0 -128
  125. package/dist/components/jamlMap/MysterySlot.stories.d.ts +0 -7
  126. package/dist/components/jamlMap/MysterySlot.stories.js +0 -31
  127. package/dist/components/jamlMap/index.js +0 -4
  128. package/dist/decode/motelyItemDecoder.js +0 -164
  129. package/dist/decode/motelySprite.js +0 -84
  130. package/dist/hooks/analyzerStreamRegistry.js +0 -96
  131. package/dist/hooks/searchWorker.d.ts +0 -1
  132. package/dist/hooks/searchWorker.js +0 -119
  133. package/dist/hooks/searchWorkerCode.d.ts +0 -1
  134. package/dist/hooks/searchWorkerCode.js +0 -85
  135. package/dist/hooks/useAnalyzer.js +0 -91
  136. package/dist/hooks/useIntersectionObserver.js +0 -52
  137. package/dist/hooks/useSearch.js +0 -161
  138. package/dist/hooks/useShopStream.js +0 -85
  139. package/dist/lib/SpriteMapper.js +0 -48
  140. package/dist/lib/cardParser.js +0 -67
  141. package/dist/lib/classes/BuyMetaData.js +0 -1
  142. package/dist/lib/config.js +0 -15
  143. package/dist/lib/const.js +0 -521
  144. package/dist/lib/data/constants.js +0 -14
  145. package/dist/lib/hooks/useDragScroll.js +0 -48
  146. package/dist/lib/hooks/useJamlFilter.js +0 -219
  147. package/dist/lib/hooks/useSeedAnalyzer.js +0 -50
  148. package/dist/lib/jaml/jamlCompletion.js +0 -13
  149. package/dist/lib/jaml/jamlData.js +0 -6
  150. package/dist/lib/jaml/jamlObjectives.js +0 -97
  151. package/dist/lib/jaml/jamlParser.js +0 -47
  152. package/dist/lib/jaml/jamlPresets.js +0 -61
  153. package/dist/lib/jaml/jamlSchema.js +0 -91
  154. package/dist/lib/parseDailyRitual.js +0 -70
  155. package/dist/lib/tts/getRevealPos.js +0 -16
  156. package/dist/lib/tts/splitTtsDisplay.js +0 -35
  157. package/dist/lib/types.js +0 -1
  158. package/dist/lib/utils.js +0 -5
  159. package/dist/motelyDisplay.js +0 -59
  160. package/dist/r3f/Card3D.js +0 -72
  161. package/dist/r3f/JimboBillboard.js +0 -32
  162. package/dist/r3f/JimboText3D.js +0 -8
  163. package/dist/render/CanvasRenderer.js +0 -11
  164. package/dist/render/Layer.js +0 -18
  165. package/dist/sprites/spriteData.js +0 -100
  166. package/dist/sprites/spriteMapper.js +0 -75
  167. package/dist/stories/Button.d.ts +0 -15
  168. package/dist/stories/Button.js +0 -7
  169. package/dist/stories/Button.stories.d.ts +0 -24
  170. package/dist/stories/Button.stories.js +0 -50
  171. package/dist/stories/Header.d.ts +0 -12
  172. package/dist/stories/Header.js +0 -4
  173. package/dist/stories/Header.stories.d.ts +0 -18
  174. package/dist/stories/Header.stories.js +0 -26
  175. package/dist/stories/Page.d.ts +0 -3
  176. package/dist/stories/Page.js +0 -8
  177. package/dist/stories/Page.stories.d.ts +0 -12
  178. package/dist/stories/Page.stories.js +0 -24
  179. package/dist/ui/Jimbo.stories.d.ts +0 -7
  180. package/dist/ui/Jimbo.stories.js +0 -28
  181. package/dist/ui/JimboBadge.js +0 -8
  182. package/dist/ui/JimboFloating.js +0 -17
  183. package/dist/ui/JimboIconButton.js +0 -28
  184. package/dist/ui/JimboInputModal.js +0 -66
  185. package/dist/ui/JimboSelect.js +0 -43
  186. package/dist/ui/JimboToggleList.js +0 -5
  187. package/dist/ui/PanelSplitter.js +0 -78
  188. package/dist/ui/codeBlock.js +0 -14
  189. package/dist/ui/footer.js +0 -20
  190. package/dist/ui/hooks.js +0 -634
  191. package/dist/ui/ide/AgnosticSeedCard.d.ts +0 -19
  192. package/dist/ui/ide/AgnosticSeedCard.js +0 -48
  193. package/dist/ui/ide/DeckSprite.js +0 -2
  194. package/dist/ui/ide/JamlBuilder.d.ts +0 -1
  195. package/dist/ui/ide/JamlBuilder.js +0 -112
  196. package/dist/ui/ide/JamlEditor.js +0 -486
  197. package/dist/ui/ide/JamlEditorMonaco.d.ts +0 -8
  198. package/dist/ui/ide/JamlEditorMonaco.js +0 -78
  199. package/dist/ui/ide/WasmStatus.d.ts +0 -1
  200. package/dist/ui/ide/WasmStatus.js +0 -42
  201. package/dist/ui/jimboApp.js +0 -15
  202. package/dist/ui/jimboBackground.js +0 -27
  203. package/dist/ui/jimboCopyRow.js +0 -18
  204. package/dist/ui/jimboFilterBar.js +0 -16
  205. package/dist/ui/jimboFlankNav.js +0 -18
  206. package/dist/ui/jimboInfoCard.js +0 -26
  207. package/dist/ui/jimboInset.js +0 -9
  208. package/dist/ui/jimboSectionHeader.js +0 -9
  209. package/dist/ui/jimboStatGrid.js +0 -9
  210. package/dist/ui/jimboTabs.js +0 -22
  211. package/dist/ui/jimboText.js +0 -33
  212. package/dist/ui/jimboTooltip.js +0 -39
  213. package/dist/ui/jimboWordmark.js +0 -9
  214. package/dist/ui/mascot/JammySpeechBox.js +0 -30
  215. package/dist/ui/mascot/SeedMascot.js +0 -17
  216. package/dist/ui/mascot/index.js +0 -3
  217. package/dist/ui/mascot/menuConfig.js +0 -12
  218. package/dist/ui/panel.js +0 -24
  219. package/dist/ui/radial/RadialBadge.js +0 -43
  220. package/dist/ui/radial/RadialBreadcrumb.js +0 -18
  221. package/dist/ui/radial/RadialButton.js +0 -102
  222. package/dist/ui/radial/RadialMenu.js +0 -168
  223. package/dist/ui/radial/RadialPill.js +0 -15
  224. package/dist/ui/radial/index.js +0 -18
  225. package/dist/ui/radial/radialMenuStore.js +0 -122
  226. package/dist/ui/radial/radialMenuViewport.js +0 -59
  227. package/dist/ui/radial/useRadialMenu.js +0 -107
  228. package/dist/ui/showcase.js +0 -20
  229. package/dist/ui/sprites.js +0 -77
  230. package/dist/ui/tokens.js +0 -64
  231. package/dist/utils/gameCardUtils.js +0 -15
  232. package/dist/utils/jamlMapPreview.js +0 -106
  233. package/dist/utils/jamlVisualFilter.js +0 -210
@@ -1,218 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useRef } from "react";
4
- import { useJamlIdeDrag } from "../ui/hooks.js";
5
- import { JimboColorOption } from "../ui/tokens.js";
6
- import { JimboSprite } from "../ui/sprites.js";
7
- const C = JimboColorOption;
8
- const ZONE_META = {
9
- must: { label: "Must", hint: "Seed must contain all of these.", color: C.BLUE, accent: "#4db5ff" },
10
- should: { label: "Should", hint: "Bonus points per match.", color: C.RED, accent: "#ff8076" },
11
- mustnot: { label: "Must Not", hint: "Rejected if any appear.", color: C.ORANGE, accent: "#ffb84d" },
12
- };
13
- function clauseSpriteSheet(type) {
14
- if (type === "joker" ||
15
- type === "souljoker" ||
16
- type === "rareJoker" ||
17
- type === "commonJoker" ||
18
- type === "uncommonJoker" ||
19
- type === "legendaryJoker" ||
20
- type === "mixedJoker")
21
- return "Jokers";
22
- if (type === "voucher")
23
- return "Vouchers";
24
- if (type === "tag" ||
25
- type === "tags" ||
26
- type === "smallBlindTag" ||
27
- type === "bigBlindTag" ||
28
- type === "smallblindtag" ||
29
- type === "bigblindtag")
30
- return "tags";
31
- if (type === "boss")
32
- return "BlindChips";
33
- if (type === "tarot" ||
34
- type === "tarotCard" ||
35
- type === "spectral" ||
36
- type === "spectralCard" ||
37
- type === "planet" ||
38
- type === "planetCard")
39
- return "Tarots";
40
- return undefined;
41
- }
42
- function ClauseSprite({ clause, size = 40 }) {
43
- const sheet = clauseSpriteSheet(clause.type);
44
- if (!sheet)
45
- return null;
46
- return _jsx(JimboSprite, { name: clause.value, sheet: sheet, width: size });
47
- }
48
- function ClauseCard({ clause, zone, onRemove, onEdit, onDragStart, }) {
49
- const z = ZONE_META[zone];
50
- return (_jsxs("div", { onClick: onEdit, onMouseDown: (e) => onDragStart(e, clause, zone), onTouchStart: (e) => onDragStart(e, clause, zone), style: {
51
- position: "relative",
52
- background: C.DARK_GREY,
53
- border: `2px solid ${z.color}`,
54
- borderRadius: 6,
55
- padding: "8px 8px 8px 6px",
56
- display: "flex",
57
- alignItems: "center",
58
- gap: 8,
59
- minWidth: 0,
60
- cursor: "pointer",
61
- userSelect: "none",
62
- touchAction: "none",
63
- boxShadow: `0 2px 0 ${C.BLACK}`,
64
- }, children: [_jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: 44, height: 50, flexShrink: 0 }, children: _jsx(ClauseSprite, { clause: clause, size: 40 }) }), _jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [_jsx("div", { style: {
65
- fontFamily: "m6x11plus, ui-monospace, monospace",
66
- fontSize: 13,
67
- color: C.WHITE,
68
- letterSpacing: 0.5,
69
- whiteSpace: "nowrap",
70
- overflow: "hidden",
71
- textOverflow: "ellipsis",
72
- }, children: clause.label || clause.value }), _jsxs("div", { style: { display: "flex", gap: 3, marginTop: 3, alignItems: "center", flexWrap: "wrap" }, children: [clause.antes && clause.antes.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { style: { fontFamily: "m6x11plus, ui-monospace, monospace", fontSize: 8, color: C.GREY, letterSpacing: 1 }, children: "A" }), clause.antes.map((a) => (_jsx("div", { style: {
73
- fontFamily: "m6x11plus, ui-monospace, monospace",
74
- fontSize: 9,
75
- padding: "1px 4px",
76
- background: C.DARKEST,
77
- color: z.accent,
78
- borderRadius: 3,
79
- letterSpacing: 0.5,
80
- lineHeight: 1,
81
- }, children: a }, a)))] })), zone === "should" && clause.score != null && (_jsxs("div", { style: {
82
- marginLeft: 4,
83
- fontFamily: "m6x11plus, ui-monospace, monospace",
84
- fontSize: 9,
85
- padding: "1px 5px",
86
- background: C.RED,
87
- color: C.WHITE,
88
- borderRadius: 3,
89
- letterSpacing: 0.5,
90
- lineHeight: 1,
91
- }, children: ["+", clause.score] }))] })] }), _jsx("button", { onMouseDown: (e) => e.stopPropagation(), onTouchStart: (e) => e.stopPropagation(), onClick: (e) => {
92
- e.stopPropagation();
93
- onRemove();
94
- }, "aria-label": `Remove ${clause.label || clause.value}`, style: {
95
- width: 22,
96
- height: 22,
97
- flexShrink: 0,
98
- border: `2px solid ${C.BLACK}`,
99
- borderRadius: 4,
100
- background: C.RED,
101
- color: C.WHITE,
102
- fontFamily: "m6x11plus, ui-monospace, monospace",
103
- fontSize: 12,
104
- lineHeight: 1,
105
- cursor: "pointer",
106
- padding: 0,
107
- boxShadow: `inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 ${C.BLACK}`,
108
- }, children: "\u00D7" })] }));
109
- }
110
- function MysteryAddTile({ zone, onTap }) {
111
- const z = ZONE_META[zone];
112
- return (_jsxs("div", { onClick: onTap, style: {
113
- cursor: onTap ? "pointer" : "default",
114
- opacity: onTap ? 1 : 0.55,
115
- border: `2px dashed ${z.color}`,
116
- borderRadius: 6,
117
- padding: "12px 8px",
118
- display: "flex",
119
- alignItems: "center",
120
- justifyContent: "center",
121
- gap: 10,
122
- background: `${z.color}0d`,
123
- minHeight: 60,
124
- }, children: [_jsx("div", { style: {
125
- width: 40,
126
- height: 40,
127
- display: "flex",
128
- alignItems: "center",
129
- justifyContent: "center",
130
- background: C.DARKEST,
131
- border: `2px solid ${z.color}`,
132
- borderRadius: 6,
133
- fontFamily: "m6x11plus, ui-monospace, monospace",
134
- fontSize: 24,
135
- color: z.color,
136
- }, children: "?" }), _jsxs("div", { style: {
137
- fontFamily: "m6x11plus, ui-monospace, monospace",
138
- fontSize: 12,
139
- color: z.accent,
140
- }, children: ["Add to ", z.label] })] }));
141
- }
142
- function ZoneRail({ zone, clauses, onAdd, onRemove, onEdit, onDragStart, highlight, }) {
143
- const z = ZONE_META[zone];
144
- return (_jsxs("div", { "data-zone": zone, style: {
145
- border: `2px dashed ${highlight ? z.color : "transparent"}`,
146
- borderRadius: 6,
147
- padding: 6,
148
- background: highlight ? `${z.color}11` : "transparent",
149
- }, children: [_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 6 }, children: [_jsx("div", { style: {
150
- fontFamily: "m6x11plus, ui-monospace, monospace",
151
- fontSize: 12,
152
- padding: "2px 6px",
153
- background: z.color,
154
- color: C.WHITE,
155
- borderRadius: 3,
156
- boxShadow: `0 2px 0 ${C.BLACK}`,
157
- }, children: z.label }), _jsx("div", { style: { flex: 1, height: 2, background: `${z.color}55`, borderRadius: 1 } }), _jsx("div", { style: { fontFamily: "m6x11plus, ui-monospace, monospace", fontSize: 8, color: C.GREY }, children: clauses.length })] }), _jsx("div", { style: { fontFamily: "m6x11plus, ui-monospace, monospace", fontSize: 9, color: C.GREY, letterSpacing: 0.5, marginBottom: 8 }, children: z.hint }), _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [clauses.map((c) => (_jsx(ClauseCard, { clause: c, zone: zone, onRemove: () => onRemove(c.id), onEdit: () => onEdit(c), onDragStart: onDragStart }, c.id))), _jsx(MysteryAddTile, { zone: zone, onTap: onAdd })] })] }));
158
- }
159
- function TopMatter({ filter, onChange, }) {
160
- return (_jsxs("div", { className: "j-inner-panel", style: { padding: 10 }, children: [_jsx("input", { value: filter.name ?? "", placeholder: "Untitled", onChange: (e) => onChange({ ...filter, name: e.target.value }), style: {
161
- display: "block",
162
- width: "100%",
163
- background: "transparent",
164
- border: "none",
165
- outline: "none",
166
- fontFamily: "m6x11plus, ui-monospace, monospace",
167
- fontSize: 18,
168
- color: C.WHITE,
169
- letterSpacing: 1,
170
- padding: 0,
171
- marginBottom: 4,
172
- } }), _jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [_jsx("div", { style: { fontFamily: "m6x11plus, ui-monospace, monospace", fontSize: 10, color: C.WHITE }, children: "By" }), _jsx("input", { value: filter.author ?? "", placeholder: "anonymous", onChange: (e) => onChange({ ...filter, author: e.target.value }), style: {
173
- flex: 1,
174
- background: "transparent",
175
- border: "none",
176
- outline: "none",
177
- fontFamily: "m6x11plus, ui-monospace, monospace",
178
- fontSize: 12,
179
- color: C.GOLD_TEXT,
180
- padding: 0,
181
- } })] }), _jsx("input", { value: filter.description ?? "", placeholder: "description", onChange: (e) => onChange({ ...filter, description: e.target.value }), style: {
182
- display: "block",
183
- width: "100%",
184
- marginTop: 6,
185
- background: "transparent",
186
- border: "none",
187
- outline: "none",
188
- fontFamily: "m6x11plus, ui-monospace, monospace",
189
- fontSize: 11,
190
- color: C.WHITE,
191
- opacity: 0.8,
192
- lineHeight: 1.35,
193
- padding: 0,
194
- } })] }));
195
- }
196
- export function JamlIdeVisual({ filter, onChange, onEditClause, onAddClause }) {
197
- const rootRef = useRef(null);
198
- const { drag, hoverZone, onDragStart } = useJamlIdeDrag(filter, onChange, rootRef);
199
- const removeClause = (zone, id) => {
200
- onChange({ ...filter, [zone]: filter[zone].filter((c) => c.id !== id) });
201
- };
202
- return (_jsxs("div", { ref: rootRef, style: {
203
- display: "flex",
204
- flexDirection: "column",
205
- gap: 14,
206
- padding: 10,
207
- background: C.DARKEST,
208
- color: C.WHITE,
209
- }, children: [_jsx(TopMatter, { filter: filter, onChange: onChange }), _jsxs("div", { style: { display: "flex", gap: 10 }, children: [_jsx("div", { style: { flex: 1, minWidth: 0 }, children: _jsx(ZoneRail, { zone: "must", clauses: filter.must, onAdd: onAddClause ? () => onAddClause("must") : undefined, onRemove: (id) => removeClause("must", id), onEdit: (c) => onEditClause?.("must", c), onDragStart: onDragStart, highlight: hoverZone === "must" }) }), _jsx("div", { style: { flex: 1, minWidth: 0 }, children: _jsx(ZoneRail, { zone: "mustnot", clauses: filter.mustnot, onAdd: onAddClause ? () => onAddClause("mustnot") : undefined, onRemove: (id) => removeClause("mustnot", id), onEdit: (c) => onEditClause?.("mustnot", c), onDragStart: onDragStart, highlight: hoverZone === "mustnot" }) })] }), _jsx(ZoneRail, { zone: "should", clauses: filter.should, onAdd: onAddClause ? () => onAddClause("should") : undefined, onRemove: (id) => removeClause("should", id), onEdit: (c) => onEditClause?.("should", c), onDragStart: onDragStart, highlight: hoverZone === "should" }), drag && (_jsx("div", { style: {
210
- position: "fixed",
211
- left: drag.x - drag.offX,
212
- top: drag.y - drag.offY,
213
- pointerEvents: "none",
214
- zIndex: 999,
215
- filter: `drop-shadow(0 4px 6px ${C.BLACK}99)`,
216
- opacity: 0.92,
217
- }, children: _jsx(ClauseCard, { clause: drag.clause, zone: drag.fromZone, onRemove: () => { }, onEdit: () => { }, onDragStart: () => { } }) }))] }));
218
- }
@@ -1,121 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useMemo } from "react";
4
- import { JimboSprite } from "../ui/sprites.js";
5
- import { JimboColorOption } from "../ui/tokens.js";
6
- import { extractVisualJamlItems, } from "../utils/jamlMapPreview.js";
7
- const C = JimboColorOption;
8
- const ZONES = {
9
- must: { label: "Must", color: C.BLUE, glow: C.BLUE },
10
- should: { label: "Should", color: C.RED, glow: C.GOLD },
11
- mustNot: { label: "Must Not", color: C.ORANGE, glow: C.ORANGE },
12
- };
13
- const SECTION_ORDER = ["must", "should", "mustNot"];
14
- const SHEET_FOR_VISUAL = {
15
- joker: "Jokers",
16
- consumable: "Tarots",
17
- voucher: "Vouchers",
18
- tag: "tags",
19
- boss: "BlindChips",
20
- };
21
- /**
22
- * Pulsing glow animation for hits.
23
- * Design ref: assets/...DesignsV2/src/v2/GlowRing.css
24
- */
25
- const GLOW_ANIMATION = `
26
- @keyframes j-glow-pulse {
27
- 0% { box-shadow: 0 0 0 1px var(--glow-color), 0 0 4px var(--glow-color); opacity: 0.8; }
28
- 50% { box-shadow: 0 0 0 2px var(--glow-color), 0 0 12px var(--glow-color); opacity: 1; }
29
- 100% { box-shadow: 0 0 0 1px var(--glow-color), 0 0 4px var(--glow-color); opacity: 0.8; }
30
- }
31
- `;
32
- function ClausePill({ item, glow, matchCount }) {
33
- const isHit = matchCount > 0;
34
- const hasData = matchCount !== undefined && matchCount >= 0;
35
- return (_jsxs("div", { style: {
36
- display: "flex",
37
- alignItems: "center",
38
- gap: 6,
39
- background: isHit ? `${glow}33` : C.DARKEST,
40
- border: `2px solid ${isHit ? glow : C.PANEL_EDGE}`,
41
- borderRadius: 4,
42
- padding: "3px 8px",
43
- position: "relative",
44
- opacity: isHit ? 1 : 0.6,
45
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
46
- // @ts-ignore -- CSS custom property
47
- "--glow-color": glow,
48
- animation: isHit ? "j-glow-pulse 1.6s ease-in-out infinite" : "none",
49
- }, title: `${item.clauseKey}: ${item.value}${hasData ? ` (Found: ${matchCount})` : ""}`, children: [_jsx("style", { children: GLOW_ANIMATION }), _jsx(JimboSprite, { name: item.value, sheet: SHEET_FOR_VISUAL[item.visualType], width: 26 }), _jsx("div", { style: {
50
- fontSize: 10,
51
- color: C.WHITE,
52
- letterSpacing: 0.5,
53
- textShadow: "1px 1px 0 rgba(0,0,0,.8)",
54
- }, children: item.value }), isHit && (_jsx("div", { style: {
55
- position: "absolute",
56
- top: -6,
57
- right: -6,
58
- background: C.GREEN,
59
- color: C.WHITE,
60
- fontSize: 7,
61
- padding: "1px 3px",
62
- borderRadius: 3,
63
- border: `1px solid ${C.BLACK}`,
64
- boxShadow: `0 1px 0 ${C.BLACK}`,
65
- }, children: matchCount > 1 ? `x${matchCount}` : "✓" }))] }));
66
- }
67
- function ZoneRail({ zone, items, matchMap, compact = false }) {
68
- const meta = ZONES[zone];
69
- return (_jsxs("div", { style: {
70
- border: `2px dashed ${meta.color}55`,
71
- borderRadius: 6,
72
- padding: compact ? 4 : 8,
73
- }, children: [_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 6 }, children: [_jsx("div", { style: {
74
- fontSize: compact ? 8 : 10,
75
- letterSpacing: 2,
76
- padding: "2px 8px",
77
- background: meta.color,
78
- color: C.WHITE,
79
- borderRadius: 3,
80
- textShadow: "1px 1px 0 rgba(0,0,0,.8)",
81
- }, children: meta.label }), _jsx("div", { style: { flex: 1, height: 1, background: `${meta.color}44` } }), _jsx("div", { style: { fontSize: 8, color: C.GREY }, children: items.length })] }), _jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 6 }, children: items.length === 0 ? (_jsx("div", { style: { fontSize: 10, color: C.GREY, padding: 10, fontStyle: "italic" }, children: "drop clauses here" })) : (items.map((item) => {
82
- // Match logic: the engine labels usually look like "must: joker: Blueprint"
83
- // or "must: rareJoker: Blueprint". We try to match the item value and section.
84
- const labelKey = `${item.section}: ${item.clauseKey}: ${item.value}`;
85
- const count = matchMap[labelKey] ?? -1;
86
- return (_jsx(ClausePill, { item: item, glow: meta.glow, matchCount: count }, item.id));
87
- })) })] }));
88
- }
89
- export function JamlMapPreview({ jaml, className = "", emptyMessage = "No visual JAML clauses found yet.", tallyColumns, tallyLabels, compact = false, }) {
90
- const groups = useMemo(() => extractVisualJamlItems(jaml), [jaml]);
91
- const totalItems = SECTION_ORDER.reduce((sum, s) => sum + groups[s].length, 0);
92
- const matchMap = useMemo(() => {
93
- const map = {};
94
- if (tallyColumns && tallyLabels) {
95
- tallyLabels.forEach((label, i) => {
96
- map[label] = tallyColumns[i] ?? 0;
97
- });
98
- }
99
- return map;
100
- }, [tallyColumns, tallyLabels]);
101
- if (totalItems === 0) {
102
- return (_jsx("div", { className: className, style: {
103
- background: C.DARKEST,
104
- border: `2px solid ${C.PANEL_EDGE}`,
105
- borderRadius: 6,
106
- padding: compact ? 8 : 16,
107
- color: C.GREY,
108
- fontSize: 11,
109
- fontStyle: "italic",
110
- textAlign: "center",
111
- }, children: emptyMessage }));
112
- }
113
- return (_jsx("div", { className: className, style: {
114
- display: "flex",
115
- flexDirection: "column",
116
- gap: compact ? 6 : 10,
117
- padding: compact ? 6 : 10,
118
- background: C.DARKEST,
119
- color: C.WHITE,
120
- }, children: SECTION_ORDER.map((section) => (_jsx(ZoneRail, { zone: section, items: groups[section], matchMap: matchMap, compact: compact }, section))) }));
121
- }
@@ -1,26 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState } from "react";
4
- import { JimboText } from "../ui/jimboText.js";
5
- const SEED_PATTERN = /^[A-Z0-9]{0,8}$/;
6
- /**
7
- * Balatro-styled seed input field.
8
- * Validates 1-8 uppercase alphanumeric characters.
9
- * All styling via jimbo.css `.j-seed-input` classes — zero inline styles.
10
- */
11
- export function JamlSeedInput({ value, onChange, placeholder = "Enter seed (e.g. J4SPZMWW)", className, style }) {
12
- const [internal, setInternal] = useState(value ?? "");
13
- const display = value ?? internal;
14
- const isValid = display.length === 0 || SEED_PATTERN.test(display);
15
- // Validation state drives data-valid attribute for CSS border color
16
- const validState = display.length === 0 ? "partial"
17
- : !isValid ? "false"
18
- : display.length === 8 ? "true"
19
- : "partial";
20
- const handleChange = (e) => {
21
- const raw = e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 8);
22
- setInternal(raw);
23
- onChange?.(raw);
24
- };
25
- return (_jsxs("div", { className: `j-seed-input ${className ?? ""}`, style: style, children: [_jsx(JimboText, { size: "xs", tone: "grey", children: "Seed" }), _jsx("input", { type: "text", className: "j-seed-input__field", "data-valid": validState, value: display, onChange: handleChange, placeholder: placeholder, maxLength: 8, spellCheck: false, autoComplete: "off" }), display.length > 0 && display.length < 8 && (_jsxs("span", { className: "j-seed-input__hint", children: [8 - display.length, " more characters"] }))] }));
26
- }
@@ -1,70 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { JimboText } from "../ui/jimboText.js";
4
- function formatCount(value) {
5
- return Number(value).toLocaleString();
6
- }
7
- function formatSpeed(value) {
8
- if (!Number.isFinite(value) || value <= 0)
9
- return "—";
10
- if (value >= 1_000_000)
11
- return `${(value / 1_000_000).toFixed(1)}M/s`;
12
- if (value >= 1_000)
13
- return `${(value / 1_000).toFixed(1)}K/s`;
14
- return `${Math.round(value)}/s`;
15
- }
16
- /**
17
- * Compact live-search stats strip — NOT a car speedometer.
18
- * Three stat cells in a row: speed | searched | matches.
19
- * Uses j-stat-grid CSS class from jimbo.css.
20
- */
21
- export function JamlSpeedometer({ seedsPerSecond, totalSearched, matchingSeeds, status, className = "", style, }) {
22
- const active = status === "running" || status === "booting";
23
- const statusTone = status === "error"
24
- ? "red"
25
- : status === "completed"
26
- ? "green"
27
- : status === "cancelled"
28
- ? "orange"
29
- : active
30
- ? "gold"
31
- : "grey";
32
- const statusLabel = status === "booting"
33
- ? "booting"
34
- : status === "running"
35
- ? "searching"
36
- : status === "completed"
37
- ? "done"
38
- : status === "cancelled"
39
- ? "cancelled"
40
- : status === "error"
41
- ? "error"
42
- : "idle";
43
- const rootStyle = {
44
- display: "flex",
45
- alignItems: "center",
46
- flexWrap: "wrap",
47
- gap: 8,
48
- padding: "8px 10px",
49
- borderRadius: 12,
50
- border: "1px solid var(--j-panel-edge, rgba(255,255,255,0.12))",
51
- background: "rgba(0,0,0,0.28)",
52
- ...style,
53
- };
54
- const dotStyle = {
55
- width: 8,
56
- height: 8,
57
- borderRadius: 999,
58
- background: status === "error"
59
- ? "var(--j-red, #ff4c40)"
60
- : status === "completed"
61
- ? "var(--j-green, #429f79)"
62
- : status === "cancelled"
63
- ? "var(--j-orange, #ff9800)"
64
- : active
65
- ? "var(--j-gold, #e4b643)"
66
- : "var(--j-grey, #8b8b8b)",
67
- flexShrink: 0,
68
- };
69
- return (_jsxs("div", { className: className, style: rootStyle, children: [_jsx("span", { style: dotStyle, "aria-hidden": "true" }), _jsx(JimboText, { size: "sm", tone: statusTone, children: statusLabel }), _jsx(JimboText, { size: "sm", tone: active ? "gold" : "grey", children: formatSpeed(seedsPerSecond) }), _jsxs(JimboText, { size: "sm", tone: "white", children: [formatCount(totalSearched), " searched"] }), _jsxs(JimboText, { size: "sm", tone: Number(matchingSeeds) > 0 ? "green" : "grey", children: [formatCount(matchingSeeds), " matches"] })] }));
70
- }
@@ -1,17 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState, useRef } from "react";
4
- import { JimboPanel, JimboButton } from "../ui/panel.js";
5
- import { JimboText } from "../ui/jimboText.js";
6
- import { JimboColorOption } from "../ui/tokens.js";
7
- export function Jimbolate({ jaml, onTest, result, error }) {
8
- const [seed, setSeed] = useState("");
9
- const inputRef = useRef(null);
10
- const handleTest = () => {
11
- const s = seed.trim().toUpperCase();
12
- if (!s)
13
- return;
14
- onTest(s);
15
- };
16
- return (_jsxs("div", { style: { padding: 10, display: "flex", flexDirection: "column", gap: 8 }, children: [_jsx(JimboPanel, { children: _jsxs("div", { style: { display: "flex", gap: 6 }, children: [_jsx("input", { ref: inputRef, className: "j-seed-input__field", type: "text", placeholder: "Enter seed...", value: seed, maxLength: 12, onChange: (e) => setSeed(e.target.value.toUpperCase()), onKeyDown: (e) => e.key === "Enter" && handleTest(), style: { flex: 1, fontSize: 15, padding: "6px 10px", letterSpacing: "0.1em", textTransform: "uppercase" } }), _jsx(JimboButton, { tone: result === "running" ? "red" : "orange", size: "sm", onClick: handleTest, disabled: !seed.trim() || !jaml.trim(), children: result === "running" ? "..." : "Test" })] }) }), result === "match" && (_jsxs(JimboPanel, { style: { background: `${JimboColorOption.GREEN_TEXT}22`, textAlign: "center" }, children: [_jsx(JimboText, { size: "xl", tone: "gold", style: { letterSpacing: 3, display: "block", marginBottom: 4 }, children: seed }), _jsx(JimboText, { size: "md", tone: "green", children: "MATCH" })] })), result === "nomatch" && (_jsxs(JimboPanel, { style: { textAlign: "center" }, children: [_jsx(JimboText, { size: "xl", tone: "grey", style: { letterSpacing: 3, display: "block", marginBottom: 4 }, children: seed }), _jsx(JimboText, { size: "md", tone: "red", children: "no match" })] })), result === "error" && (_jsx(JimboPanel, { children: _jsx(JimboText, { size: "xs", tone: "red", style: { display: "block", textAlign: "center" }, children: error ?? "Error" }) })), result === "idle" && !jaml.trim() && (_jsx(JimboPanel, { children: _jsx(JimboText, { size: "xs", tone: "grey", style: { display: "block", textAlign: "center" }, children: "Write a JAML filter in the JAML tab first" }) }))] }));
17
- }
@@ -1,19 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { JimboText } from '../ui/jimboText.js';
4
- /**
5
- * Badge showing the loaded motely-wasm version + optional SIMD / threads
6
- * capability indicators. All styling via jimbo.css `.j-motely-badge`.
7
- */
8
- export function MotelyVersionBadge({ caps, version, minimal = false, loading = false, className = '', style, }) {
9
- if (loading) {
10
- return (_jsx("span", { className: `j-motely-badge ${className}`, style: style, children: _jsx(JimboText, { size: "xs", tone: "grey", children: "Initializing\u2026" }) }));
11
- }
12
- const resolved = caps?.version ?? version ?? '?';
13
- const simd = caps?.simd;
14
- const threads = caps?.threads;
15
- if (minimal) {
16
- return (_jsxs("span", { className: `j-motely-badge ${className}`, style: style, children: [_jsxs(JimboText, { size: "xs", tone: "grey", children: ["v", resolved] }), simd ? _jsx(JimboText, { size: "xs", tone: "blue", title: "SIMD enabled", children: "\u26A1" }) : null, threads ? _jsx(JimboText, { size: "xs", tone: "green", title: "Multi-threaded", children: "\uD83E\uDDF5" }) : null] }));
17
- }
18
- return (_jsxs("div", { className: `j-motely-badge j-motely-badge--chip ${className}`, style: style, children: [_jsxs(JimboText, { size: "xs", tone: "gold", uppercase: true, children: ["motely v", resolved] }), simd ? _jsx(JimboText, { size: "xs", tone: "blue", title: "SIMD enabled", children: "\u26A1" }) : null, threads ? _jsx(JimboText, { size: "xs", tone: "green", title: "Multi-threaded", children: "\uD83E\uDDF5" }) : null] }));
19
- }
@@ -1,54 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { JimboButton, JimboPanel } from "../ui/panel.js";
4
- import { JimboText } from "../ui/jimboText.js";
5
- import { JimboFlankNav } from "../ui/jimboFlankNav.js";
6
- import { JimboColorOption } from "../ui/tokens.js";
7
- const C = JimboColorOption;
8
- export function PaginatedFilterBrowser({ filters, itemsPerPage = 120, // matching Balatro challenges layout pages
9
- onSelectFilter, onMainAction, onSecondaryAction, onDeleteFilter, mainActionText = "SELECT", secondaryActionText = "EDIT", showSecondary = false, showDelete = false, emptyText = "No items found.", }) {
10
- const [currentPage, setCurrentPage] = useState(0);
11
- const [selectedId, setSelectedId] = useState(null);
12
- const totalPages = Math.max(1, Math.ceil(filters.length / itemsPerPage));
13
- // Bound current page just in case filters array shrinks
14
- const safePage = Math.min(currentPage, totalPages - 1);
15
- const pageFilters = filters.slice(safePage * itemsPerPage, (safePage + 1) * itemsPerPage);
16
- const selectedFilter = filters.find((f) => f.id === selectedId) || null;
17
- const handlePrevPage = () => setCurrentPage((p) => Math.max(0, p - 1));
18
- const handleNextPage = () => setCurrentPage((p) => Math.min(totalPages - 1, p + 1));
19
- return (_jsxs("div", { className: "j-flex-col j-gap-md", style: {
20
- width: "100%",
21
- height: "100%",
22
- boxSizing: "border-box",
23
- overflow: "hidden",
24
- }, children: [_jsxs(JimboPanel, { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: [_jsxs("div", { style: { flex: 1, overflowY: "auto", position: "relative" }, className: "hide-scrollbar j-flex-col j-items-center j-gap-xs", children: [pageFilters.map((filter) => {
25
- const isSelected = selectedId === filter.id;
26
- return (_jsxs("div", { style: {
27
- position: "relative",
28
- width: "100%",
29
- maxWidth: 240, // Matches filter-list-item MinWidth=210 approx
30
- display: "flex",
31
- justifyContent: "center",
32
- }, children: [isSelected && (_jsx("div", { className: "j-animate-jimbo-bounce", style: {
33
- position: "absolute",
34
- left: -20, // push out to left
35
- top: "50%",
36
- transform: "translateY(-50%)",
37
- width: 0,
38
- height: 0,
39
- borderTop: "8px solid transparent",
40
- borderBottom: "8px solid transparent",
41
- borderLeft: `12px solid ${C.GOLD}`, // Balatro usually uses gold/white for selection triangle
42
- filter: `drop-shadow(2px 2px 2px rgba(0,0,0,0.5))`,
43
- } })), _jsx("div", { style: { width: "100%" }, children: _jsx(JimboButton, { tone: isSelected ? "red" : "grey", size: "sm", style: { width: "100%" }, onClick: () => {
44
- setSelectedId(filter.id);
45
- onSelectFilter?.(filter);
46
- }, children: filter.name }) })] }, filter.id));
47
- }), pageFilters.length === 0 && (_jsx("div", { className: "j-p-md", children: _jsx(JimboText, { size: "sm", tone: "grey", className: "j-text-center", children: emptyText }) }))] }), _jsx("div", { className: "j-flex j-justify-center j-mt-md", style: { flexShrink: 0 }, children: _jsx(JimboFlankNav, { canPrev: safePage > 0, canNext: safePage < totalPages - 1, onPrev: handlePrevPage, onNext: handleNextPage, children: _jsx("div", { style: {
48
- background: C.RED,
49
- padding: "8px 24px",
50
- borderRadius: 8,
51
- minWidth: 100,
52
- boxShadow: `inset 0 2px 4px rgba(255,255,255,0.2), 0 4px 8px rgba(0,0,0,0.4)`,
53
- }, className: "j-flex j-justify-center j-items-center", children: _jsxs(JimboText, { size: "sm", tone: "white", className: "j-text-center", style: { textShadow: "1px 2px 2px rgba(0,0,0,0.5)" }, children: [safePage + 1, " / ", totalPages] }) }) }) })] }), _jsx(JimboPanel, { style: { flexShrink: 0, minHeight: 180, display: "flex", flexDirection: "column", justifyContent: "center" }, children: !selectedFilter ? (_jsx(JimboText, { size: "md", tone: "grey", className: "j-text-center", children: "Select an item to view details" })) : (_jsxs("div", { className: "j-flex-col j-gap-sm j-items-center", style: { width: "100%" }, children: [_jsx(JimboText, { size: "lg", tone: "gold", className: "j-text-center", children: selectedFilter.name }), _jsx(JimboText, { size: "sm", tone: "white", className: "j-text-center", children: selectedFilter.description }), _jsxs("div", { className: "j-flex-col j-gap-xs j-items-center j-mt-xs", style: { opacity: 0.7 }, children: [selectedFilter.authorText && _jsx(JimboText, { size: "xs", tone: "grey", children: selectedFilter.authorText }), selectedFilter.dateText && _jsx(JimboText, { size: "xs", tone: "grey", children: selectedFilter.dateText }), selectedFilter.statsText && _jsx(JimboText, { size: "xs", tone: "grey", children: selectedFilter.statsText })] }), _jsxs("div", { className: "j-flex j-gap-sm j-mt-md j-justify-center j-flex-wrap", children: [_jsx(JimboButton, { tone: "blue", size: "sm", onClick: () => onMainAction?.(selectedFilter), children: mainActionText }), showSecondary && onSecondaryAction && (_jsx(JimboButton, { tone: "orange", size: "sm", onClick: () => onSecondaryAction(selectedFilter), children: secondaryActionText })), showDelete && onDeleteFilter && (_jsx(JimboButton, { tone: "red", size: "sm", onClick: () => onDeleteFilter(selectedFilter), children: "DELETE" }))] })] })) })] }));
54
- }
@@ -1,59 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useState } from "react";
3
- import { JimboModal, JimboButton } from "../ui/panel.js";
4
- import { JimboText } from "../ui/jimboText.js";
5
- import { DECK_OPTIONS, STAKE_OPTIONS } from "../lib/data/constants.js";
6
- import { DeckSprite } from "./DeckSprite.js";
7
- import { StakeSprite } from "../ui/sprites.js";
8
- const DECK_DESCRIPTIONS = {
9
- "Red": "+1 discard every round",
10
- "Blue": "+1 hand every round",
11
- "Yellow": "Start with extra $10",
12
- "Green": "At end of each Round:\n$2 per remaining Hand,\n$1 per remaining Discard.\nEarn no Interest",
13
- "Black": "+1 Joker slot\n-1 hand every round",
14
- "Magic": "Start run with the\nCrystal Ball voucher\nand 2 copies of The Fool",
15
- "Nebula": "Start run with the\nTelescope voucher\n-1 consumable slot",
16
- "Ghost": "Spectral cards may\nappear in the shop,\nstart with a Hex card",
17
- "Abandoned": "Start run with no\nFace Cards in your deck",
18
- "Checkered": "Start run with\n26 Spades and\n26 Hearts in deck",
19
- "Zodiac": "Start run with\nTarot Merchant,\nPlanet Merchant,\nand Overstock vouchers",
20
- "Painted": "+2 hand size,\n-1 Joker slot",
21
- "Anaglyph": "After defeating each\nBoss Blind, gain a\nDouble Tag",
22
- "Plasma": "Balance Chips and\nMult when calculating\nscore for played hand.\nX2 base Blind size",
23
- "Erratic": "All Ranks and Suits\nin deck are randomized",
24
- };
25
- const STAKE_DESCRIPTIONS = {
26
- "White": "Base Difficulty",
27
- "Red": "Small Blind gives\nno reward money",
28
- "Green": "Required score scales\nfaster for each Ante",
29
- "Black": "Shop can have Jokers\nwith Eternal",
30
- "Blue": "-1 Discard",
31
- "Purple": "Required score scales\nfaster for each Ante",
32
- "Orange": "Shop can have Jokers\nwith Perishable",
33
- "Gold": "-1 hand size\nShop can have Jokers\nwith Rental",
34
- };
35
- export function RunConfigModal({ open, onClose, deck, stake, onChange, }) {
36
- const [activeDeck, setActiveDeck] = useState(deck);
37
- const [activeStake, setActiveStake] = useState(stake);
38
- // Sync state if props change when opened
39
- React.useEffect(() => {
40
- if (open) {
41
- // eslint-disable-next-line react-hooks/set-state-in-effect
42
- setActiveDeck(deck);
43
- setActiveStake(stake);
44
- }
45
- }, [open, deck, stake]);
46
- if (!open)
47
- return null;
48
- const deckIdx = DECK_OPTIONS.indexOf(activeDeck) >= 0 ? DECK_OPTIONS.indexOf(activeDeck) : 0;
49
- const stakeIdx = STAKE_OPTIONS.indexOf(activeStake) >= 0 ? STAKE_OPTIONS.indexOf(activeStake) : 0;
50
- const nextDeck = () => setActiveDeck(DECK_OPTIONS[(deckIdx + 1) % DECK_OPTIONS.length]);
51
- const prevDeck = () => setActiveDeck(DECK_OPTIONS[(deckIdx - 1 + DECK_OPTIONS.length) % DECK_OPTIONS.length]);
52
- const nextStake = () => setActiveStake(STAKE_OPTIONS[(stakeIdx + 1) % STAKE_OPTIONS.length]);
53
- const prevStake = () => setActiveStake(STAKE_OPTIONS[(stakeIdx - 1 + STAKE_OPTIONS.length) % STAKE_OPTIONS.length]);
54
- const handleApply = () => {
55
- onChange(activeDeck, activeStake);
56
- onClose();
57
- };
58
- return (_jsxs(JimboModal, { open: open, onClose: onClose, title: "Run Config", children: [_jsxs("div", { className: "j-flex j-items-center j-gap-sm", children: [_jsx(JimboButton, { tone: "red", size: "sm", onClick: prevDeck, children: "<" }), _jsxs("div", { className: "j-flex-col j-items-center j-gap-xs", style: { flex: 1 }, children: [_jsx(DeckSprite, { deck: activeDeck, size: 64 }), _jsxs(JimboText, { size: "md", tone: "white", children: [activeDeck, " Deck"] }), _jsx(JimboText, { size: "micro", tone: "grey", className: "j-text-center", style: { whiteSpace: "pre-line" }, children: DECK_DESCRIPTIONS[activeDeck] || "Standard 52 card deck" })] }), _jsx(JimboButton, { tone: "red", size: "sm", onClick: nextDeck, children: ">" })] }), _jsxs("div", { className: "j-flex j-items-center j-gap-sm", style: { marginTop: 8 }, children: [_jsx(JimboButton, { tone: "red", size: "sm", onClick: prevStake, children: "<" }), _jsxs("div", { className: "j-flex-col j-items-center j-gap-xs", style: { flex: 1 }, children: [_jsx(StakeSprite, { stake: activeStake, width: 48 }), _jsxs(JimboText, { size: "md", tone: "white", children: [activeStake, " Stake"] }), _jsx(JimboText, { size: "micro", tone: "grey", className: "j-text-center", style: { whiteSpace: "pre-line" }, children: STAKE_DESCRIPTIONS[activeStake] || "Base Difficulty" })] }), _jsx(JimboButton, { tone: "red", size: "sm", onClick: nextStake, children: ">" })] }), _jsxs("div", { className: "j-flex-col j-gap-sm", style: { marginTop: 8 }, children: [_jsx(JimboButton, { tone: "blue", size: "lg", fullWidth: true, onClick: handleApply, children: "Apply" }), _jsx(JimboButton, { tone: "orange", size: "lg", fullWidth: true, onClick: onClose, children: "Back" })] })] }));
59
- }