jaml-ui 2.4.0 → 3.0.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.
- package/README.md +38 -225
- package/dist/chunks/Layer-B5y9UIAt.js +19 -0
- package/dist/chunks/Layer-B5y9UIAt.js.map +1 -0
- package/dist/chunks/motelySprite-BYsaes3N.js +753 -0
- package/dist/chunks/motelySprite-BYsaes3N.js.map +1 -0
- package/dist/chunks/spriteMapper-BiDkbZrD.js +480 -0
- package/dist/chunks/spriteMapper-BiDkbZrD.js.map +1 -0
- package/dist/components/DeckSprite.d.ts +1 -1
- package/dist/components/GameCard.d.ts +5 -4
- package/dist/components/JamlyzerView.d.ts +9 -0
- package/dist/components/StandardCard.d.ts +4 -3
- package/dist/core.d.ts +0 -1
- package/dist/core.js +38 -23
- package/dist/core.js.map +1 -1
- package/dist/decode/motelyItemDecoder.d.ts +5 -0
- package/dist/index.d.ts +6 -26
- package/dist/index.js +3177 -22506
- package/dist/index.js.map +1 -1
- package/dist/json-render/builders/analyzer.d.ts +23 -0
- package/dist/json-render/builders/encyclopedia.d.ts +14 -0
- package/dist/json-render/builders/search.d.ts +24 -0
- package/dist/json-render/catalog.d.ts +204 -0
- package/dist/json-render/components/domain.d.ts +58 -0
- package/dist/json-render/components/game.d.ts +18 -0
- package/dist/json-render/components/layout.d.ts +51 -0
- package/dist/json-render/components/mascot.d.ts +22 -0
- package/dist/json-render/components/reference.d.ts +38 -0
- package/dist/json-render/engine.d.ts +38 -0
- package/dist/json-render/index.d.ts +30 -0
- package/dist/json-render/knowledge/bosses.d.ts +18 -0
- package/dist/json-render/knowledge/decks.d.ts +22 -0
- package/dist/json-render/knowledge/jokers.d.ts +23 -0
- package/dist/json-render/knowledge/synergies.d.ts +21 -0
- package/dist/json-render/registry.d.ts +14 -0
- package/dist/motely.d.ts +1 -4
- package/dist/motely.js +23 -154
- package/dist/motely.js.map +1 -1
- package/dist/render/CanvasRenderer.d.ts +2 -1
- package/dist/render/useJamlCardRenderer.d.ts +15 -0
- package/dist/ui/jimbo.css +1 -2
- package/dist/ui.d.ts +0 -40
- package/dist/ui.js +58 -3
- package/dist/ui.js.map +1 -0
- package/package.json +23 -68
- package/dist/assets/searchPoolWorker-BdrYmnig.js +0 -2
- package/dist/assets/searchPoolWorker-BdrYmnig.js.map +0 -1
- package/dist/chunks/jamlSeeds-CKHvpjhC.js +0 -66
- package/dist/chunks/jamlSeeds-CKHvpjhC.js.map +0 -1
- package/dist/chunks/runtime-Dx5VPTsV.js +0 -2031
- package/dist/chunks/runtime-Dx5VPTsV.js.map +0 -1
- package/dist/chunks/searchPoolWorker-CEK2FyxS.js +0 -11
- package/dist/chunks/searchPoolWorker-CEK2FyxS.js.map +0 -1
- package/dist/chunks/spriteMapper-C8uYedXB.js +0 -2455
- package/dist/chunks/spriteMapper-C8uYedXB.js.map +0 -1
- package/dist/chunks/ui-BK5rM4AS.js +0 -3479
- package/dist/chunks/ui-BK5rM4AS.js.map +0 -1
- package/dist/components/CardFan.d.ts +0 -13
- package/dist/components/JamlAestheticSelector.d.ts +0 -12
- package/dist/components/JamlCodeEditor.d.ts +0 -7
- package/dist/components/JamlIde.d.ts +0 -44
- package/dist/components/JamlIdeToolbar.d.ts +0 -14
- package/dist/components/JamlIdeVisual.d.ts +0 -32
- package/dist/components/JamlMapPreview.d.ts +0 -11
- package/dist/components/JamlSeedInput.d.ts +0 -24
- package/dist/components/JamlSeedSpinner.d.ts +0 -9
- package/dist/components/JamlSpeedometer.d.ts +0 -16
- package/dist/components/Jamlyzer.d.ts +0 -8
- package/dist/components/JimmolateEditor.d.ts +0 -47
- package/dist/components/MotelyHello.d.ts +0 -5
- package/dist/components/MotelyVersionBadge.d.ts +0 -28
- package/dist/components/PaginatedFilterBrowser.d.ts +0 -26
- package/dist/components/RunConfigModal.d.ts +0 -8
- package/dist/components/SeedFinderApp.d.ts +0 -7
- package/dist/components/jamlMap/CategoryPicker.d.ts +0 -32
- package/dist/components/jamlMap/JamlMapEditor.d.ts +0 -14
- package/dist/components/jamlMap/JokerPicker.d.ts +0 -8
- package/dist/components/jamlMap/MysterySlot.d.ts +0 -37
- package/dist/components/jamlMap/index.d.ts +0 -4
- package/dist/components/jamlMap/jokerRarity.d.ts +0 -6
- package/dist/components/jamlSeedUtils.d.ts +0 -1
- package/dist/hooks/searchPoolWorker.d.ts +0 -61
- package/dist/hooks/searchWorker.d.ts +0 -1
- package/dist/hooks/useAnalyzer.d.ts +0 -15
- package/dist/hooks/useIntersectionObserver.d.ts +0 -14
- package/dist/hooks/useJamlLibrary.d.ts +0 -13
- package/dist/hooks/useSearch.d.ts +0 -32
- package/dist/hooks/useSearchPool.d.ts +0 -43
- package/dist/hooks/useShopStream.d.ts +0 -22
- package/dist/lib/SpriteMapper.d.ts +0 -10
- package/dist/lib/cardParser.d.ts +0 -8
- package/dist/lib/classes/BuyMetaData.d.ts +0 -11
- package/dist/lib/config.d.ts +0 -13
- package/dist/lib/const.d.ts +0 -70
- package/dist/lib/data/constants.d.ts +0 -11
- package/dist/lib/hooks/useDragScroll.d.ts +0 -4
- package/dist/lib/hooks/useJamlFilter.d.ts +0 -48
- package/dist/lib/hooks/useSeedAnalyzer.d.ts +0 -17
- package/dist/lib/jaml/jamlCompletion.d.ts +0 -12
- package/dist/lib/jaml/jamlData.d.ts +0 -4
- package/dist/lib/jaml/jamlLangCodemirror.d.ts +0 -22
- package/dist/lib/jaml/jamlObjectives.d.ts +0 -13
- package/dist/lib/jaml/jamlParser.d.ts +0 -14
- package/dist/lib/jaml/jamlPresets.d.ts +0 -8
- package/dist/lib/jaml/jamlSchema.d.ts +0 -19
- package/dist/lib/jaml/jamlSeeds.d.ts +0 -7
- package/dist/lib/motely/runtime.d.ts +0 -13
- package/dist/lib/parseDailyRitual.d.ts +0 -45
- package/dist/lib/tts/getRevealPos.d.ts +0 -5
- package/dist/lib/tts/splitTtsDisplay.d.ts +0 -19
- package/dist/lib/types.d.ts +0 -122
- package/dist/motelyDisplay.d.ts +0 -10
- package/dist/r3f/Card3D.d.ts +0 -48
- package/dist/r3f/CardTable.d.ts +0 -35
- package/dist/r3f.d.ts +0 -2
- package/dist/r3f.js +0 -275
- package/dist/r3f.js.map +0 -1
- package/dist/ui/JimboBadge.d.ts +0 -12
- package/dist/ui/JimboBalatroFooter.d.ts +0 -16
- package/dist/ui/JimboCookLever.d.ts +0 -30
- package/dist/ui/JimboCopyButton.d.ts +0 -27
- package/dist/ui/JimboDeckAndStakeSelectorModal.d.ts +0 -30
- package/dist/ui/JimboDualChip.d.ts +0 -17
- package/dist/ui/JimboIconButton.d.ts +0 -15
- package/dist/ui/JimboInlineEdit.d.ts +0 -16
- package/dist/ui/JimboInputModal.d.ts +0 -13
- package/dist/ui/JimboListItem.d.ts +0 -11
- package/dist/ui/JimboPanelSpinner.d.ts +0 -15
- package/dist/ui/JimboPicker.d.ts +0 -28
- package/dist/ui/JimboSeedCopyChip.d.ts +0 -16
- package/dist/ui/JimboSelect.d.ts +0 -30
- package/dist/ui/JimboSlider.d.ts +0 -11
- package/dist/ui/JimboSpinner.d.ts +0 -18
- package/dist/ui/JimboStepper.d.ts +0 -22
- package/dist/ui/JimboTextInput.d.ts +0 -5
- package/dist/ui/JimboToggleList.d.ts +0 -12
- package/dist/ui/JimboValueBadge.d.ts +0 -19
- package/dist/ui/codeBlock.d.ts +0 -11
- package/dist/ui/hooks.d.ts +0 -126
- package/dist/ui/ide/JamlEditor.d.ts +0 -7
- package/dist/ui/jimboApp.d.ts +0 -9
- package/dist/ui/jimboBackground.d.ts +0 -17
- package/dist/ui/jimboCopyRow.d.ts +0 -9
- package/dist/ui/jimboFilterBar.d.ts +0 -22
- package/dist/ui/jimboFlankNav.d.ts +0 -17
- package/dist/ui/jimboInfoCard.d.ts +0 -31
- package/dist/ui/jimboInset.d.ts +0 -9
- package/dist/ui/jimboLayout.d.ts +0 -25
- package/dist/ui/jimboLink.d.ts +0 -12
- package/dist/ui/jimboSectionHeader.d.ts +0 -11
- package/dist/ui/jimboStatGrid.d.ts +0 -13
- package/dist/ui/jimboTabs.d.ts +0 -21
- package/dist/ui/jimboText.d.ts +0 -25
- package/dist/ui/jimboTooltip.d.ts +0 -33
- package/dist/ui/jimboWordmark.d.ts +0 -10
- package/dist/ui/mascot/JammySpeechBox.d.ts +0 -9
- package/dist/ui/mascot/SeedMascot.d.ts +0 -37
- package/dist/ui/mascot/index.d.ts +0 -3
- package/dist/ui/mascot/menuConfig.d.ts +0 -102
- package/dist/ui/panel.d.ts +0 -32
- package/dist/ui/radial/RadialBadge.d.ts +0 -16
- package/dist/ui/radial/RadialBreadcrumb.d.ts +0 -12
- package/dist/ui/radial/RadialButton.d.ts +0 -60
- package/dist/ui/radial/RadialMenu.d.ts +0 -38
- package/dist/ui/radial/RadialPill.d.ts +0 -17
- package/dist/ui/radial/index.d.ts +0 -16
- package/dist/ui/radial/radialMenuStore.d.ts +0 -31
- package/dist/ui/radial/radialMenuViewport.d.ts +0 -6
- package/dist/ui/radial/useRadialMenu.d.ts +0 -35
- package/dist/ui/sprites.d.ts +0 -25
- package/dist/utils/jamlMapPreview.d.ts +0 -12
- package/dist/utils/jamlVisualFilter.d.ts +0 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JsonNode } from '../engine.js';
|
|
2
|
+
/**
|
|
3
|
+
* Build a json-render spec for seed analysis results.
|
|
4
|
+
*
|
|
5
|
+
* Shows the full breakdown of a single seed: jokers, shop, blinds, etc.
|
|
6
|
+
*/
|
|
7
|
+
export interface AnalyzerResult {
|
|
8
|
+
seed: string;
|
|
9
|
+
jokers: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
edition?: string;
|
|
12
|
+
seal?: string;
|
|
13
|
+
isEternal?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
shopItems?: Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
edition?: string;
|
|
19
|
+
}>;
|
|
20
|
+
score?: number;
|
|
21
|
+
notes?: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare function buildAnalyzerSpec(result: AnalyzerResult): JsonNode;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JsonNode } from '../engine.js';
|
|
2
|
+
/**
|
|
3
|
+
* Build a json-render spec for the encyclopedia view.
|
|
4
|
+
*
|
|
5
|
+
* Shows joker info, synergies, and strategy advice for a set of jokers.
|
|
6
|
+
*/
|
|
7
|
+
export interface EncyclopediaParams {
|
|
8
|
+
jokers: string[];
|
|
9
|
+
decks?: string[];
|
|
10
|
+
stakes?: string[];
|
|
11
|
+
bosses?: string[];
|
|
12
|
+
showStrategies?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildEncyclopediaSpec(params: EncyclopediaParams): JsonNode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JsonNode } from '../engine.js';
|
|
2
|
+
/**
|
|
3
|
+
* Build a json-render spec for search results.
|
|
4
|
+
*
|
|
5
|
+
* Pure function. Converts raw Motely search data into a JsonNode tree.
|
|
6
|
+
* The tree renders into a full search UI via `render(spec, registry)`.
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchResult {
|
|
9
|
+
seed: string;
|
|
10
|
+
score: number;
|
|
11
|
+
highlights?: string[];
|
|
12
|
+
jokers?: string[];
|
|
13
|
+
edition?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SearchParams {
|
|
16
|
+
status: "idle" | "running" | "completed" | "error";
|
|
17
|
+
seedsSearched?: string;
|
|
18
|
+
matchesFound?: number;
|
|
19
|
+
seedsPerSecond?: number;
|
|
20
|
+
elapsed?: string;
|
|
21
|
+
error?: string | null;
|
|
22
|
+
results: SearchResult[];
|
|
23
|
+
}
|
|
24
|
+
export declare function buildSearchSpec(params: SearchParams): JsonNode;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { BadgeTone } from './components/layout.js';
|
|
2
|
+
/**
|
|
3
|
+
* Balatro Catalog — Component vocabulary for AI-generated UI.
|
|
4
|
+
*
|
|
5
|
+
* Type-safe at compile time. Zero runtime overhead.
|
|
6
|
+
* The AI sees these names + descriptions + prop shapes.
|
|
7
|
+
*/
|
|
8
|
+
export declare const balatroCatalog: {
|
|
9
|
+
Panel: {
|
|
10
|
+
props: {
|
|
11
|
+
title?: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
variant?: "default" | "accent" | "muted";
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
Stack: {
|
|
19
|
+
props: {
|
|
20
|
+
gap?: number;
|
|
21
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
Grid: {
|
|
27
|
+
props: {
|
|
28
|
+
columns?: number;
|
|
29
|
+
gap?: number;
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
Text: {
|
|
35
|
+
props: {
|
|
36
|
+
body: string;
|
|
37
|
+
variant?: "title" | "body" | "muted" | "accent" | "error";
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
Spacer: {
|
|
43
|
+
props: {
|
|
44
|
+
size?: number;
|
|
45
|
+
};
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
Divider: {
|
|
49
|
+
props: {
|
|
50
|
+
className?: string;
|
|
51
|
+
};
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
Badge: {
|
|
55
|
+
props: {
|
|
56
|
+
label: string;
|
|
57
|
+
tone?: "red" | "blue" | "green" | "orange" | "gold" | "purple" | "grey";
|
|
58
|
+
className?: string;
|
|
59
|
+
};
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
SearchStats: {
|
|
63
|
+
props: {
|
|
64
|
+
status: "idle" | "running" | "completed" | "error";
|
|
65
|
+
seedsSearched?: string;
|
|
66
|
+
matchesFound?: number;
|
|
67
|
+
seedsPerSecond?: number;
|
|
68
|
+
elapsed?: string;
|
|
69
|
+
};
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
ErrorBanner: {
|
|
73
|
+
props: {
|
|
74
|
+
message: string;
|
|
75
|
+
onDismiss?: boolean;
|
|
76
|
+
};
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
LoadingPulse: {
|
|
80
|
+
props: {
|
|
81
|
+
text?: string;
|
|
82
|
+
};
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
SeedCard: {
|
|
86
|
+
props: {
|
|
87
|
+
seed: string;
|
|
88
|
+
score?: number;
|
|
89
|
+
rank?: number;
|
|
90
|
+
highlights?: string[];
|
|
91
|
+
jokers?: string[];
|
|
92
|
+
edition?: string;
|
|
93
|
+
onClick?: boolean;
|
|
94
|
+
};
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
SeedList: {
|
|
98
|
+
props: {
|
|
99
|
+
seeds: string[];
|
|
100
|
+
scores?: number[];
|
|
101
|
+
total?: number;
|
|
102
|
+
pageSize?: number;
|
|
103
|
+
};
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
JokerBadge: {
|
|
107
|
+
props: {
|
|
108
|
+
name: string;
|
|
109
|
+
edition?: "Foil" | "Holographic" | "Polychrome" | "Negative";
|
|
110
|
+
rarity?: "Common" | "Uncommon" | "Rare" | "Legendary";
|
|
111
|
+
};
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
EditionBadge: {
|
|
115
|
+
props: {
|
|
116
|
+
edition: "Foil" | "Holographic" | "Polychrome" | "Negative";
|
|
117
|
+
};
|
|
118
|
+
description: string;
|
|
119
|
+
};
|
|
120
|
+
JamlGameCard: {
|
|
121
|
+
props: {
|
|
122
|
+
type: "joker" | "consumable" | "playing";
|
|
123
|
+
card: {
|
|
124
|
+
name: string;
|
|
125
|
+
edition?: string;
|
|
126
|
+
seal?: string;
|
|
127
|
+
isEternal?: boolean;
|
|
128
|
+
isPerishable?: boolean;
|
|
129
|
+
isRental?: boolean;
|
|
130
|
+
scale?: number;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
description: string;
|
|
134
|
+
};
|
|
135
|
+
JammyMascot: {
|
|
136
|
+
props: {
|
|
137
|
+
mood?: "idle" | "happy" | "surprised";
|
|
138
|
+
size?: number;
|
|
139
|
+
menuItems?: {
|
|
140
|
+
label: string;
|
|
141
|
+
action: string;
|
|
142
|
+
tone?: BadgeTone;
|
|
143
|
+
}[];
|
|
144
|
+
onMenuAction?: boolean;
|
|
145
|
+
};
|
|
146
|
+
description: string;
|
|
147
|
+
};
|
|
148
|
+
JammyOrbitalMenu: {
|
|
149
|
+
props: {
|
|
150
|
+
items: {
|
|
151
|
+
label: string;
|
|
152
|
+
action: string;
|
|
153
|
+
tone?: BadgeTone;
|
|
154
|
+
}[];
|
|
155
|
+
radius?: number;
|
|
156
|
+
};
|
|
157
|
+
description: string;
|
|
158
|
+
};
|
|
159
|
+
JokerCard: {
|
|
160
|
+
props: {
|
|
161
|
+
name: string;
|
|
162
|
+
showSynergies?: boolean;
|
|
163
|
+
};
|
|
164
|
+
description: string;
|
|
165
|
+
};
|
|
166
|
+
SynergyCard: {
|
|
167
|
+
props: {
|
|
168
|
+
name: string;
|
|
169
|
+
};
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
BossBlindCard: {
|
|
173
|
+
props: {
|
|
174
|
+
name: string;
|
|
175
|
+
};
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
DeckCard: {
|
|
179
|
+
props: {
|
|
180
|
+
name: string;
|
|
181
|
+
};
|
|
182
|
+
description: string;
|
|
183
|
+
};
|
|
184
|
+
StakeCard: {
|
|
185
|
+
props: {
|
|
186
|
+
name: string;
|
|
187
|
+
};
|
|
188
|
+
description: string;
|
|
189
|
+
};
|
|
190
|
+
StrategyAdvisor: {
|
|
191
|
+
props: {
|
|
192
|
+
jokers: string[];
|
|
193
|
+
};
|
|
194
|
+
description: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
export type BalatroCatalog = typeof balatroCatalog;
|
|
198
|
+
export type BalatroComponentName = keyof BalatroCatalog;
|
|
199
|
+
/**
|
|
200
|
+
* Extract the props type for a given catalog component.
|
|
201
|
+
*/
|
|
202
|
+
export type CatalogProps<K extends BalatroComponentName> = BalatroCatalog[K] extends {
|
|
203
|
+
props: infer P;
|
|
204
|
+
} ? P : never;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Domain components — SearchStats, ErrorBanner, LoadingPulse, SeedCard, etc.
|
|
4
|
+
*
|
|
5
|
+
* These are Balatro-specific UI components used by the json-render system.
|
|
6
|
+
* All use CSS tokens and the layout primitives above.
|
|
7
|
+
*/
|
|
8
|
+
export interface SearchStatsProps {
|
|
9
|
+
status: "idle" | "running" | "completed" | "error";
|
|
10
|
+
seedsSearched?: string;
|
|
11
|
+
matchesFound?: number;
|
|
12
|
+
seedsPerSecond?: number;
|
|
13
|
+
elapsed?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const SearchStats: FC<SearchStatsProps>;
|
|
17
|
+
export interface ErrorBannerProps {
|
|
18
|
+
message: string;
|
|
19
|
+
onDismiss?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const ErrorBanner: FC<ErrorBannerProps>;
|
|
23
|
+
export interface LoadingPulseProps {
|
|
24
|
+
text?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const LoadingPulse: FC<LoadingPulseProps>;
|
|
28
|
+
export interface SeedCardProps {
|
|
29
|
+
seed: string;
|
|
30
|
+
score?: number;
|
|
31
|
+
rank?: number;
|
|
32
|
+
highlights?: string[];
|
|
33
|
+
jokers?: string[];
|
|
34
|
+
edition?: string;
|
|
35
|
+
onClick?: boolean;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const SeedCard: FC<SeedCardProps>;
|
|
39
|
+
export interface SeedListProps {
|
|
40
|
+
seeds: string[];
|
|
41
|
+
scores?: number[];
|
|
42
|
+
total?: number;
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const SeedList: FC<SeedListProps>;
|
|
47
|
+
export interface JokerBadgeProps {
|
|
48
|
+
name: string;
|
|
49
|
+
edition?: "Foil" | "Holographic" | "Polychrome" | "Negative";
|
|
50
|
+
rarity?: "Common" | "Uncommon" | "Rare" | "Legendary";
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare const JokerBadge: FC<JokerBadgeProps>;
|
|
54
|
+
export interface EditionBadgeProps {
|
|
55
|
+
edition: "Foil" | "Holographic" | "Polychrome" | "Negative";
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const EditionBadge: FC<EditionBadgeProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Game Card wrapper — bridges json-render to jaml-ui's sprite system.
|
|
4
|
+
*/
|
|
5
|
+
export interface JamlGameCardProps {
|
|
6
|
+
type: "joker" | "consumable" | "playing";
|
|
7
|
+
card: {
|
|
8
|
+
name: string;
|
|
9
|
+
edition?: string;
|
|
10
|
+
seal?: string;
|
|
11
|
+
isEternal?: boolean;
|
|
12
|
+
isPerishable?: boolean;
|
|
13
|
+
isRental?: boolean;
|
|
14
|
+
scale?: number;
|
|
15
|
+
};
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const JamlGameCard: FC<JamlGameCardProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Layout primitives — Panel, Stack, Grid, Text, Spacer, Divider, Badge.
|
|
4
|
+
*
|
|
5
|
+
* All use CSS custom properties from jimbo-tokens.css.
|
|
6
|
+
* No external classes. No BEM. Just inline styles + tokens.
|
|
7
|
+
*/
|
|
8
|
+
export interface PanelProps {
|
|
9
|
+
title?: string;
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
variant?: "default" | "accent" | "muted";
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const Panel: React.FC<PanelProps>;
|
|
16
|
+
export interface StackProps {
|
|
17
|
+
gap?: number;
|
|
18
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
19
|
+
className?: string;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare const Stack: React.FC<StackProps>;
|
|
23
|
+
export interface GridProps {
|
|
24
|
+
columns?: number;
|
|
25
|
+
gap?: number;
|
|
26
|
+
className?: string;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare const Grid: React.FC<GridProps>;
|
|
30
|
+
export interface TextProps {
|
|
31
|
+
body: string;
|
|
32
|
+
variant?: "title" | "body" | "muted" | "accent" | "error";
|
|
33
|
+
className?: string;
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export declare const Text: React.FC<TextProps>;
|
|
37
|
+
export interface SpacerProps {
|
|
38
|
+
size?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare const Spacer: React.FC<SpacerProps>;
|
|
41
|
+
export interface DividerProps {
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const Divider: React.FC<DividerProps>;
|
|
45
|
+
export type BadgeTone = "red" | "blue" | "green" | "orange" | "gold" | "purple" | "grey";
|
|
46
|
+
export interface BadgeProps {
|
|
47
|
+
label: string;
|
|
48
|
+
tone?: BadgeTone;
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { BadgeTone } from './layout.js';
|
|
3
|
+
export interface JammyOrbitalMenuItem {
|
|
4
|
+
label: string;
|
|
5
|
+
action: string;
|
|
6
|
+
tone?: BadgeTone;
|
|
7
|
+
}
|
|
8
|
+
export interface JammyOrbitalMenuProps {
|
|
9
|
+
items: JammyOrbitalMenuItem[];
|
|
10
|
+
onAction?: (action: string) => void;
|
|
11
|
+
radius?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const JammyOrbitalMenu: FC<JammyOrbitalMenuProps>;
|
|
15
|
+
export interface JammyMascotProps {
|
|
16
|
+
mood?: "idle" | "happy" | "surprised";
|
|
17
|
+
size?: number;
|
|
18
|
+
menuItems?: JammyOrbitalMenuItem[];
|
|
19
|
+
onMenuAction?: (action: string) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const JammyMascot: FC<JammyMascotProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Reference Components — Encyclopedia UI for Balatro entities.
|
|
4
|
+
*
|
|
5
|
+
* All components query the knowledge base and render rich info cards.
|
|
6
|
+
* Zero external dependencies. Pure React + CSS tokens.
|
|
7
|
+
*/
|
|
8
|
+
export interface JokerCardProps {
|
|
9
|
+
name: string;
|
|
10
|
+
showSynergies?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const JokerCard: FC<JokerCardProps>;
|
|
14
|
+
export interface SynergyCardProps {
|
|
15
|
+
name: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const SynergyCard: FC<SynergyCardProps>;
|
|
19
|
+
export interface BossBlindCardProps {
|
|
20
|
+
name: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const BossBlindCard: FC<BossBlindCardProps>;
|
|
24
|
+
export interface DeckCardProps {
|
|
25
|
+
name: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const DeckCard: FC<DeckCardProps>;
|
|
29
|
+
export interface StakeCardProps {
|
|
30
|
+
name: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const StakeCard: FC<StakeCardProps>;
|
|
34
|
+
export interface StrategyAdvisorProps {
|
|
35
|
+
jokers: string[];
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const StrategyAdvisor: FC<StrategyAdvisorProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* json-render — Zero-dependency JSON-to-React engine.
|
|
4
|
+
*
|
|
5
|
+
* A JsonNode is a plain JSON object describing a UI tree.
|
|
6
|
+
* A Registry maps type names to React components.
|
|
7
|
+
* render() walks the tree and returns React nodes.
|
|
8
|
+
*/
|
|
9
|
+
export interface JsonNode {
|
|
10
|
+
type: string;
|
|
11
|
+
props?: Record<string, unknown>;
|
|
12
|
+
children?: JsonNode[];
|
|
13
|
+
}
|
|
14
|
+
export type ComponentProps<P = Record<string, unknown>> = P & {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
export type Registry = Record<string, React.ComponentType<any>>;
|
|
18
|
+
/**
|
|
19
|
+
* Render a JsonNode tree using the provided Registry.
|
|
20
|
+
*
|
|
21
|
+
* Unknown types log a warning and render null (graceful degradation).
|
|
22
|
+
* Each child gets a stable key from its index in the children array.
|
|
23
|
+
*/
|
|
24
|
+
export declare function render(node: JsonNode, registry: Registry): ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Render a list of JsonNode trees.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderList(nodes: JsonNode[], registry: Registry): ReactNode[];
|
|
29
|
+
/**
|
|
30
|
+
* Type-safe catalog builder.
|
|
31
|
+
*
|
|
32
|
+
* Just returns the catalog object as-is, but enforces types at compile time.
|
|
33
|
+
* No runtime overhead. No zod. Just TypeScript.
|
|
34
|
+
*/
|
|
35
|
+
export declare function defineCatalog<C extends Record<string, {
|
|
36
|
+
props?: object;
|
|
37
|
+
description?: string;
|
|
38
|
+
}>>(catalog: C): C;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { render, renderList, defineCatalog } from './engine.js';
|
|
2
|
+
export type { JsonNode, ComponentProps, Registry } from './engine.js';
|
|
3
|
+
export { balatroCatalog } from './catalog.js';
|
|
4
|
+
export type { BalatroCatalog, BalatroComponentName, CatalogProps } from './catalog.js';
|
|
5
|
+
export { balatroRegistry } from './registry.js';
|
|
6
|
+
export type { BalatroRegistry } from './registry.js';
|
|
7
|
+
export { Panel, Stack, Grid, Text, Spacer, Divider, Badge, } from './components/layout.js';
|
|
8
|
+
export type { PanelProps, StackProps, GridProps, TextProps, SpacerProps, DividerProps, BadgeProps, } from './components/layout.js';
|
|
9
|
+
export { SearchStats, ErrorBanner, LoadingPulse, SeedCard, SeedList, JokerBadge, EditionBadge, } from './components/domain.js';
|
|
10
|
+
export type { SearchStatsProps, ErrorBannerProps, LoadingPulseProps, SeedCardProps, SeedListProps, JokerBadgeProps, EditionBadgeProps, } from './components/domain.js';
|
|
11
|
+
export { JamlGameCard } from './components/game.js';
|
|
12
|
+
export type { JamlGameCardProps } from './components/game.js';
|
|
13
|
+
export { JammyMascot, JammyOrbitalMenu } from './components/mascot.js';
|
|
14
|
+
export type { JammyMascotProps, JammyOrbitalMenuProps, JammyOrbitalMenuItem, } from './components/mascot.js';
|
|
15
|
+
export { JokerCard, SynergyCard, BossBlindCard, DeckCard, StakeCard, StrategyAdvisor, } from './components/reference.js';
|
|
16
|
+
export type { JokerCardProps, SynergyCardProps, BossBlindCardProps, DeckCardProps, StakeCardProps, StrategyAdvisorProps, } from './components/reference.js';
|
|
17
|
+
export { buildSearchSpec } from './builders/search.js';
|
|
18
|
+
export type { SearchResult, SearchParams } from './builders/search.js';
|
|
19
|
+
export { buildEncyclopediaSpec } from './builders/encyclopedia.js';
|
|
20
|
+
export type { EncyclopediaParams } from './builders/encyclopedia.js';
|
|
21
|
+
export { buildAnalyzerSpec } from './builders/analyzer.js';
|
|
22
|
+
export type { AnalyzerResult } from './builders/analyzer.js';
|
|
23
|
+
export { JOKERS, getJoker, getJokersByCategory, getSynergies } from './knowledge/jokers.js';
|
|
24
|
+
export type { JokerInfo, JokerRarity, JokerCategory } from './knowledge/jokers.js';
|
|
25
|
+
export { SYNERGIES, findSynergies, findSynergiesByTag, getRecommendedSynergies } from './knowledge/synergies.js';
|
|
26
|
+
export type { SynergyInfo } from './knowledge/synergies.js';
|
|
27
|
+
export { DECKS, STAKES, getDeck, getStake } from './knowledge/decks.js';
|
|
28
|
+
export type { DeckInfo, StakeInfo } from './knowledge/decks.js';
|
|
29
|
+
export { BOSSES, FINISHERS, getBoss, getBossesByCategory, getAllBosses } from './knowledge/bosses.js';
|
|
30
|
+
export type { BossInfo, BossCategory } from './knowledge/bosses.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Balatro Boss Blind Knowledge Base
|
|
3
|
+
*/
|
|
4
|
+
export type BossCategory = "Debuffer" | "Restrictor" | "Obfuscator" | "Scaler" | "Economic";
|
|
5
|
+
export interface BossInfo {
|
|
6
|
+
name: string;
|
|
7
|
+
jamlKey: string;
|
|
8
|
+
category: BossCategory;
|
|
9
|
+
effect: string;
|
|
10
|
+
counters: string[];
|
|
11
|
+
jamlAvoid: string;
|
|
12
|
+
threatLevel: "Low" | "Medium" | "High" | "Lethal";
|
|
13
|
+
}
|
|
14
|
+
export declare const BOSSES: Record<string, BossInfo>;
|
|
15
|
+
export declare const FINISHERS: BossInfo[];
|
|
16
|
+
export declare function getBoss(name: string): BossInfo | undefined;
|
|
17
|
+
export declare function getBossesByCategory(category: BossCategory): BossInfo[];
|
|
18
|
+
export declare function getAllBosses(): BossInfo[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Balatro Deck & Stake Knowledge Base
|
|
3
|
+
*/
|
|
4
|
+
export interface DeckInfo {
|
|
5
|
+
name: string;
|
|
6
|
+
jamlKey: string;
|
|
7
|
+
effect: string;
|
|
8
|
+
strategy: string;
|
|
9
|
+
synergies: string[];
|
|
10
|
+
difficulty: "Easy" | "Medium" | "Hard";
|
|
11
|
+
}
|
|
12
|
+
export declare const DECKS: Record<string, DeckInfo>;
|
|
13
|
+
export interface StakeInfo {
|
|
14
|
+
name: string;
|
|
15
|
+
jamlKey: string;
|
|
16
|
+
effect: string;
|
|
17
|
+
strategy: string;
|
|
18
|
+
difficulty: "Easy" | "Medium" | "Hard" | "Expert";
|
|
19
|
+
}
|
|
20
|
+
export declare const STAKES: StakeInfo[];
|
|
21
|
+
export declare function getDeck(name: string): DeckInfo | undefined;
|
|
22
|
+
export declare function getStake(name: string): StakeInfo | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Balatro Joker Knowledge Base
|
|
3
|
+
* Extracted from the Master Encyclopedia for json-render reference components.
|
|
4
|
+
*/
|
|
5
|
+
export type JokerRarity = "Common" | "Uncommon" | "Rare" | "Legendary";
|
|
6
|
+
export type JokerCategory = "Copy" | "X-Mult" | "Flat" | "Economy" | "Retrigger" | "Utility";
|
|
7
|
+
export interface JokerInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
rarity: JokerRarity;
|
|
10
|
+
cost: number;
|
|
11
|
+
effect: string;
|
|
12
|
+
category: JokerCategory;
|
|
13
|
+
synergies: string[];
|
|
14
|
+
strategy: string;
|
|
15
|
+
jamlKey: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const JOKERS: Record<string, JokerInfo>;
|
|
18
|
+
/** Get joker info by name. Returns undefined if not found. */
|
|
19
|
+
export declare function getJoker(name: string): JokerInfo | undefined;
|
|
20
|
+
/** Get all jokers in a category. */
|
|
21
|
+
export declare function getJokersByCategory(category: JokerCategory): JokerInfo[];
|
|
22
|
+
/** Get jokers that synergize with a given joker. */
|
|
23
|
+
export declare function getSynergies(jokerName: string): JokerInfo[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Balatro Synergy Knowledge Base
|
|
3
|
+
* Meta combinations and their mathematical breakdowns.
|
|
4
|
+
*/
|
|
5
|
+
export interface SynergyInfo {
|
|
6
|
+
name: string;
|
|
7
|
+
jokers: string[];
|
|
8
|
+
description: string;
|
|
9
|
+
math: string;
|
|
10
|
+
setup: string[];
|
|
11
|
+
difficulty: "Easy" | "Medium" | "Hard" | "Legendary";
|
|
12
|
+
bossCounters: string[];
|
|
13
|
+
tags: string[];
|
|
14
|
+
}
|
|
15
|
+
export declare const SYNERGIES: SynergyInfo[];
|
|
16
|
+
/** Find synergies that involve a specific joker. */
|
|
17
|
+
export declare function findSynergies(jokerName: string): SynergyInfo[];
|
|
18
|
+
/** Find synergies by tag. */
|
|
19
|
+
export declare function findSynergiesByTag(tag: string): SynergyInfo[];
|
|
20
|
+
/** Get recommended synergies for a set of jokers. */
|
|
21
|
+
export declare function getRecommendedSynergies(jokerNames: string[]): SynergyInfo[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Registry } from './engine.js';
|
|
2
|
+
/**
|
|
3
|
+
* Balatro Component Registry
|
|
4
|
+
*
|
|
5
|
+
* Maps catalog component names to real React implementations.
|
|
6
|
+
* This is the ONLY place where catalog names are bound to code.
|
|
7
|
+
* Add new components here → they instantly work in json-render specs.
|
|
8
|
+
*/
|
|
9
|
+
export declare const balatroRegistry: Registry;
|
|
10
|
+
/**
|
|
11
|
+
* Type-safe registry helper.
|
|
12
|
+
* Ensures all catalog names have a matching component at compile time.
|
|
13
|
+
*/
|
|
14
|
+
export type BalatroRegistry = typeof balatroRegistry;
|
package/dist/motely.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export { default as bootsharp } from 'motely-wasm';
|
|
2
|
-
export
|
|
2
|
+
export * as Motely from 'motely-wasm';
|
|
3
3
|
export { decodeMotelyItem, decodeMotelyItemToJamlCard, motelyItemTypeName, motelyItemCategory, motelyItemDisplayName, motelyItemRenderCategory, motelyItemEditionName, motelyItemSealName, motelyItemEnhancementName, motelyStandardcardRankName, motelyStandardcardSuitName, decodeMotelyItemName, resolveMotelyItemType, type DecodedMotelyItem, type MotelyItemInput, type MotelyJamlCard, type MotelyRenderableCategory, type MotelyRuntimeItem, } from './decode/motelyItemDecoder.js';
|
|
4
4
|
export { motelyItemToSprite, getMotelySpriteByName, type MotelySpriteData, } from './decode/motelySprite.js';
|
|
5
|
-
export { motelyBossDisplayName, motelyBossDisplayNameFromKey, motelyBoosterPackDisplayName, motelyBoosterPackDisplayNameFromKey, motelyItemDisplayNameFromKey, motelyItemDisplayNameFromValue, motelyTagDisplayName, motelyTagDisplayNameFromKey, motelyVoucherDisplayName, motelyVoucherDisplayNameFromKey, } from './motelyDisplay.js';
|
|
6
|
-
export { useJamlLibrary, type JamlLibraryStatus, type UseJamlLibraryState, } from './hooks/useJamlLibrary.js';
|
|
7
|
-
export { ensureMotelyReady, MOTELY_BIN_PATH, type MotelyRuntimeStatus, } from './lib/motely/runtime.js';
|