jaml-ui 2.3.1 → 2.5.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/dist/assets/searchPoolWorker-DA5uFkl3.js +2 -0
- package/dist/assets/searchPoolWorker-DA5uFkl3.js.map +1 -0
- package/dist/chunks/{jamlSeeds-CKHvpjhC.js → jamlSeeds-CRthre97.js} +23 -20
- package/dist/chunks/{jamlSeeds-CKHvpjhC.js.map → jamlSeeds-CRthre97.js.map} +1 -1
- package/dist/chunks/runtime-D7eHq1kP.js +2060 -0
- package/dist/chunks/{runtime-Dx5VPTsV.js.map → runtime-D7eHq1kP.js.map} +1 -1
- package/dist/chunks/{searchPoolWorker-CEK2FyxS.js → searchPoolWorker-649yzf3l.js} +2 -2
- package/dist/chunks/searchPoolWorker-649yzf3l.js.map +1 -0
- package/dist/chunks/spriteMapper-BqG15k6f.js +2496 -0
- package/dist/chunks/{spriteMapper-C8uYedXB.js.map → spriteMapper-BqG15k6f.js.map} +1 -1
- package/dist/chunks/{ui-BK5rM4AS.js → ui-DwggmAYr.js} +1084 -1164
- package/dist/chunks/ui-DwggmAYr.js.map +1 -0
- package/dist/components/JamlAestheticSelector.d.ts +1 -1
- package/dist/components/JamlCurator.d.ts +1 -0
- package/dist/components/JamlIdeVisual.d.ts +0 -2
- package/dist/components/JimmolateEditor.d.ts +1 -1
- package/dist/components/SeedFinderApp.d.ts +1 -1
- package/dist/core.js +13 -10
- package/dist/core.js.map +1 -1
- package/dist/hooks/useAnalyzer.d.ts +1 -6
- package/dist/hooks/useSearch.d.ts +3 -4
- package/dist/hooks/useSearchPool.d.ts +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +8436 -5646
- 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 +179 -0
- package/dist/json-render/components/domain.d.ts +58 -0
- package/dist/json-render/components/game.d.ts +22 -0
- package/dist/json-render/components/layout.d.ts +50 -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 +28 -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/lib/hooks/useSeedAnalyzer.d.ts +2 -14
- package/dist/lib/motely/runtime.d.ts +31 -4
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/utils.d.ts +2 -0
- package/dist/motely.d.ts +3 -3
- package/dist/motely.js +93 -73
- package/dist/motely.js.map +1 -1
- package/dist/ui/JimboPanelSplitter.d.ts +8 -0
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui/showcase.d.ts +38 -0
- package/dist/ui.d.ts +0 -1
- package/dist/ui.js +2 -2
- package/package.json +39 -44
- package/dist/assets/searchPoolWorker-BdrYmnig.js +0 -2
- package/dist/assets/searchPoolWorker-BdrYmnig.js.map +0 -1
- package/dist/chunks/runtime-Dx5VPTsV.js +0 -2031
- package/dist/chunks/searchPoolWorker-CEK2FyxS.js.map +0 -1
- package/dist/chunks/spriteMapper-C8uYedXB.js +0 -2455
- package/dist/chunks/ui-BK5rM4AS.js.map +0 -1
- 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/JimboCookLever.d.ts +0 -30
|
@@ -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,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Balatro Catalog — Component vocabulary for AI-generated UI.
|
|
3
|
+
*
|
|
4
|
+
* Type-safe at compile time. Zero runtime overhead.
|
|
5
|
+
* The AI sees these names + descriptions + prop shapes.
|
|
6
|
+
*/
|
|
7
|
+
export declare const balatroCatalog: {
|
|
8
|
+
Panel: {
|
|
9
|
+
props: {
|
|
10
|
+
title?: string;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
variant?: "default" | "accent" | "muted";
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
Stack: {
|
|
18
|
+
props: {
|
|
19
|
+
gap?: number;
|
|
20
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
Grid: {
|
|
26
|
+
props: {
|
|
27
|
+
columns?: number;
|
|
28
|
+
gap?: number;
|
|
29
|
+
className?: string;
|
|
30
|
+
};
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
Text: {
|
|
34
|
+
props: {
|
|
35
|
+
body: string;
|
|
36
|
+
variant?: "title" | "body" | "muted" | "accent" | "error";
|
|
37
|
+
className?: string;
|
|
38
|
+
};
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
Spacer: {
|
|
42
|
+
props: {
|
|
43
|
+
size?: number;
|
|
44
|
+
};
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
Divider: {
|
|
48
|
+
props: {
|
|
49
|
+
className?: string;
|
|
50
|
+
};
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
Badge: {
|
|
54
|
+
props: {
|
|
55
|
+
label: string;
|
|
56
|
+
tone?: "red" | "blue" | "green" | "orange" | "gold" | "purple" | "grey";
|
|
57
|
+
className?: string;
|
|
58
|
+
};
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
SearchStats: {
|
|
62
|
+
props: {
|
|
63
|
+
status: "idle" | "running" | "completed" | "error";
|
|
64
|
+
seedsSearched?: string;
|
|
65
|
+
matchesFound?: number;
|
|
66
|
+
seedsPerSecond?: number;
|
|
67
|
+
elapsed?: string;
|
|
68
|
+
};
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
ErrorBanner: {
|
|
72
|
+
props: {
|
|
73
|
+
message: string;
|
|
74
|
+
onDismiss?: boolean;
|
|
75
|
+
};
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
LoadingPulse: {
|
|
79
|
+
props: {
|
|
80
|
+
text?: string;
|
|
81
|
+
};
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
SeedCard: {
|
|
85
|
+
props: {
|
|
86
|
+
seed: string;
|
|
87
|
+
score?: number;
|
|
88
|
+
rank?: number;
|
|
89
|
+
highlights?: string[];
|
|
90
|
+
jokers?: string[];
|
|
91
|
+
edition?: string;
|
|
92
|
+
onClick?: boolean;
|
|
93
|
+
};
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
SeedList: {
|
|
97
|
+
props: {
|
|
98
|
+
seeds: string[];
|
|
99
|
+
scores?: number[];
|
|
100
|
+
total?: number;
|
|
101
|
+
pageSize?: number;
|
|
102
|
+
};
|
|
103
|
+
description: string;
|
|
104
|
+
};
|
|
105
|
+
JokerBadge: {
|
|
106
|
+
props: {
|
|
107
|
+
name: string;
|
|
108
|
+
edition?: "Foil" | "Holographic" | "Polychrome" | "Negative";
|
|
109
|
+
rarity?: "Common" | "Uncommon" | "Rare" | "Legendary";
|
|
110
|
+
};
|
|
111
|
+
description: string;
|
|
112
|
+
};
|
|
113
|
+
EditionBadge: {
|
|
114
|
+
props: {
|
|
115
|
+
edition: "Foil" | "Holographic" | "Polychrome" | "Negative";
|
|
116
|
+
};
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
JamlGameCard: {
|
|
120
|
+
props: {
|
|
121
|
+
type: "joker" | "consumable" | "playing";
|
|
122
|
+
card: {
|
|
123
|
+
name: string;
|
|
124
|
+
edition?: string;
|
|
125
|
+
seal?: string;
|
|
126
|
+
isEternal?: boolean;
|
|
127
|
+
isPerishable?: boolean;
|
|
128
|
+
isRental?: boolean;
|
|
129
|
+
};
|
|
130
|
+
scale?: number;
|
|
131
|
+
};
|
|
132
|
+
description: string;
|
|
133
|
+
};
|
|
134
|
+
JokerCard: {
|
|
135
|
+
props: {
|
|
136
|
+
name: string;
|
|
137
|
+
showSynergies?: boolean;
|
|
138
|
+
};
|
|
139
|
+
description: string;
|
|
140
|
+
};
|
|
141
|
+
SynergyCard: {
|
|
142
|
+
props: {
|
|
143
|
+
name: string;
|
|
144
|
+
};
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
BossBlindCard: {
|
|
148
|
+
props: {
|
|
149
|
+
name: string;
|
|
150
|
+
};
|
|
151
|
+
description: string;
|
|
152
|
+
};
|
|
153
|
+
DeckCard: {
|
|
154
|
+
props: {
|
|
155
|
+
name: string;
|
|
156
|
+
};
|
|
157
|
+
description: string;
|
|
158
|
+
};
|
|
159
|
+
StakeCard: {
|
|
160
|
+
props: {
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
description: string;
|
|
164
|
+
};
|
|
165
|
+
StrategyAdvisor: {
|
|
166
|
+
props: {
|
|
167
|
+
jokers: string[];
|
|
168
|
+
};
|
|
169
|
+
description: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
export type BalatroCatalog = typeof balatroCatalog;
|
|
173
|
+
export type BalatroComponentName = keyof BalatroCatalog;
|
|
174
|
+
/**
|
|
175
|
+
* Extract the props type for a given catalog component.
|
|
176
|
+
*/
|
|
177
|
+
export type CatalogProps<K extends BalatroComponentName> = BalatroCatalog[K] extends {
|
|
178
|
+
props: infer P;
|
|
179
|
+
} ? P : never;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { default as React } 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: React.FC<SearchStatsProps>;
|
|
17
|
+
export interface ErrorBannerProps {
|
|
18
|
+
message: string;
|
|
19
|
+
onDismiss?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const ErrorBanner: React.FC<ErrorBannerProps>;
|
|
23
|
+
export interface LoadingPulseProps {
|
|
24
|
+
text?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const LoadingPulse: React.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: React.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: React.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: React.FC<JokerBadgeProps>;
|
|
54
|
+
export interface EditionBadgeProps {
|
|
55
|
+
edition: "Foil" | "Holographic" | "Polychrome" | "Negative";
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const EditionBadge: React.FC<EditionBadgeProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Game Card wrapper — bridges json-render to jaml-ui's sprite system.
|
|
4
|
+
*
|
|
5
|
+
* We lazily import the real JamlGameCard so json-render has no hard dependency
|
|
6
|
+
* on jaml-ui's heavy sprite imports. The consumer must import this component
|
|
7
|
+
* AND have jaml-ui available in their bundle.
|
|
8
|
+
*/
|
|
9
|
+
export interface JamlGameCardProps {
|
|
10
|
+
type: "joker" | "consumable" | "playing";
|
|
11
|
+
card: {
|
|
12
|
+
name: string;
|
|
13
|
+
edition?: string;
|
|
14
|
+
seal?: string;
|
|
15
|
+
isEternal?: boolean;
|
|
16
|
+
isPerishable?: boolean;
|
|
17
|
+
isRental?: boolean;
|
|
18
|
+
};
|
|
19
|
+
scale?: number;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const JamlGameCard: React.FC<JamlGameCardProps>;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 interface BadgeProps {
|
|
46
|
+
label: string;
|
|
47
|
+
tone?: "red" | "blue" | "green" | "orange" | "gold" | "purple" | "grey";
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } 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: React.FC<JokerCardProps>;
|
|
14
|
+
export interface SynergyCardProps {
|
|
15
|
+
name: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const SynergyCard: React.FC<SynergyCardProps>;
|
|
19
|
+
export interface BossBlindCardProps {
|
|
20
|
+
name: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const BossBlindCard: React.FC<BossBlindCardProps>;
|
|
24
|
+
export interface DeckCardProps {
|
|
25
|
+
name: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const DeckCard: React.FC<DeckCardProps>;
|
|
29
|
+
export interface StakeCardProps {
|
|
30
|
+
name: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const StakeCard: React.FC<StakeCardProps>;
|
|
34
|
+
export interface StrategyAdvisorProps {
|
|
35
|
+
jokers: string[];
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const StrategyAdvisor: React.FC<StrategyAdvisorProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } 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?: React.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): React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Render a list of JsonNode trees.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderList(nodes: JsonNode[], registry: Registry): React.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,28 @@
|
|
|
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 { JokerCard, SynergyCard, BossBlindCard, DeckCard, StakeCard, StrategyAdvisor, } from './components/reference.js';
|
|
14
|
+
export type { JokerCardProps, SynergyCardProps, BossBlindCardProps, DeckCardProps, StakeCardProps, StrategyAdvisorProps, } from './components/reference.js';
|
|
15
|
+
export { buildSearchSpec } from './builders/search.js';
|
|
16
|
+
export type { SearchResult, SearchParams } from './builders/search.js';
|
|
17
|
+
export { buildEncyclopediaSpec } from './builders/encyclopedia.js';
|
|
18
|
+
export type { EncyclopediaParams } from './builders/encyclopedia.js';
|
|
19
|
+
export { buildAnalyzerSpec } from './builders/analyzer.js';
|
|
20
|
+
export type { AnalyzerResult } from './builders/analyzer.js';
|
|
21
|
+
export { JOKERS, getJoker, getJokersByCategory, getSynergies } from './knowledge/jokers.js';
|
|
22
|
+
export type { JokerInfo, JokerRarity, JokerCategory } from './knowledge/jokers.js';
|
|
23
|
+
export { SYNERGIES, findSynergies, findSynergiesByTag, getRecommendedSynergies } from './knowledge/synergies.js';
|
|
24
|
+
export type { SynergyInfo } from './knowledge/synergies.js';
|
|
25
|
+
export { DECKS, STAKES, getDeck, getStake } from './knowledge/decks.js';
|
|
26
|
+
export type { DeckInfo, StakeInfo } from './knowledge/decks.js';
|
|
27
|
+
export { BOSSES, FINISHERS, getBoss, getBossesByCategory, getAllBosses } from './knowledge/bosses.js';
|
|
28
|
+
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;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type MotelyApi = typeof MotelyNamespace;
|
|
4
|
-
/** Per-seed result shape, reassembled from the split motely-wasm 21.1 API
|
|
5
|
-
* (the old jamlyzer(config) bundled score + analysis per seed). */
|
|
6
|
-
export interface SeedAnalyzerResult {
|
|
7
|
-
seed: string;
|
|
8
|
-
score: number;
|
|
9
|
-
tallies: number[];
|
|
10
|
-
analysis: JamlyzerSnapshot;
|
|
11
|
-
}
|
|
12
|
-
export declare function useSeedAnalyzer(motely: MotelyApi | null, seed: string | null, jaml?: string): {
|
|
13
|
-
data: SeedAnalyzerResult | null;
|
|
1
|
+
export declare function useSeedAnalyzer(seed: string | null, jaml?: string): {
|
|
2
|
+
data: any;
|
|
14
3
|
loading: boolean;
|
|
15
4
|
error: string | null;
|
|
16
5
|
};
|
|
17
|
-
export {};
|
|
@@ -1,13 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JamlAesthetic, JamlConfig, MotelyJamlyzerSeedResult } from 'motely-wasm';
|
|
2
2
|
export type MotelyRuntimeStatus = "idle" | "booting" | "ready" | "error";
|
|
3
|
-
export
|
|
3
|
+
export declare function parseJaml(jaml: string): JamlConfig;
|
|
4
|
+
/** Column labels for a parsed filter's score tallies (was `MotelyJamlyzerResult.tallyLabels`). */
|
|
5
|
+
export declare function tallyLabelsFor(config: JamlConfig): string[];
|
|
6
|
+
type JimmolateProbe = (seed: string, deck: number, stake: number) => boolean;
|
|
4
7
|
/** Swap the active Jimmolate predicate. Safe before or after boot. */
|
|
5
8
|
export declare function setJimmolateProbe(pred: JimmolateProbe): void;
|
|
6
9
|
/** Reset the probe to pass-through (the engine's default: every survivor matches). */
|
|
7
10
|
export declare function clearJimmolateProbe(): void;
|
|
11
|
+
/** Turn the Jimmolate predicate layer on/off (was `Program.enableJimmolate()`). */
|
|
12
|
+
export declare function enableJimmolate(on?: boolean): void;
|
|
13
|
+
export type EngineSearchMode = "aesthetic" | "seedlist" | "random" | "sequential";
|
|
14
|
+
export interface RunSearchOptions {
|
|
15
|
+
seeds?: string[];
|
|
16
|
+
count?: number;
|
|
17
|
+
aesthetic?: JamlAesthetic | number;
|
|
18
|
+
startBatchIndex?: bigint;
|
|
19
|
+
endBatchIndex?: bigint;
|
|
20
|
+
batchCharacterCount?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function aestheticSeeds(aesthetic: JamlAesthetic | number): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Run a search to completion against an already-parsed config.
|
|
25
|
+
*
|
|
26
|
+
* v23 searches are fire-and-forget Promises (no IMotelySearch handle, no
|
|
27
|
+
* mid-search cancel). Subscribe to MotelySearch.onProgress / onScoredResult /
|
|
28
|
+
* onSeedMatch BEFORE calling this; the returned Promise resolves when the engine
|
|
29
|
+
* finishes. Callers cancel by tearing down their runtime (e.g. terminating the
|
|
30
|
+
* worker) — there is no engine-level cancel in v23.
|
|
31
|
+
*/
|
|
32
|
+
export declare function runSearch(config: JamlConfig, mode: EngineSearchMode, opts?: RunSearchOptions): Promise<void>;
|
|
33
|
+
/** Analyze one or more seeds against a parsed config (was `Program.jamlyzer`). */
|
|
34
|
+
export declare function analyzeSeeds(config: JamlConfig): MotelyJamlyzerSeedResult[];
|
|
8
35
|
export declare const MOTELY_BIN_PATH = "/motely-wasm/bin";
|
|
9
|
-
/** True once the optional File System extension was bound before boot. */
|
|
10
36
|
export declare function isFileSystemReady(): boolean;
|
|
11
|
-
/** The
|
|
37
|
+
/** The reason the File System Access API is unavailable, or null when it's ready. */
|
|
12
38
|
export declare function getFileSystemError(): unknown;
|
|
13
39
|
export declare function ensureMotelyReady(): Promise<void>;
|
|
40
|
+
export {};
|
package/dist/lib/types.d.ts
CHANGED