jaml-ui 0.3.0 → 0.3.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 +1 -3
- package/dist/components/AnalyzerExplorer.d.ts +44 -0
- package/dist/components/AnalyzerExplorer.js +451 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/motely.d.ts +1 -0
- package/dist/motely.js +1 -0
- package/dist/motelyDisplay.d.ts +629 -0
- package/dist/motelyDisplay.js +187 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# jaml-ui
|
|
2
2
|
|
|
3
|
-
Balatro
|
|
4
|
-
|
|
5
|
-
`jaml-ui` is the shared UI layer for Balatro/JAML surfaces: low-level renderers, asset helpers, visual JAML previews, and a lightweight browser-first JAML IDE shell.
|
|
3
|
+
React components and utilities for Balatro/JAML. Pair with **`motely-wasm`** when you need the engine (peer). Update both in consumers with normal **`pnpm update`** / semver like any other deps.
|
|
6
4
|
|
|
7
5
|
## Package shape
|
|
8
6
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type AnalyzerShopItem } from "./GameCard.js";
|
|
2
|
+
export interface AnalyzerBadge {
|
|
3
|
+
label: string;
|
|
4
|
+
tone?: "default" | "accent" | "muted";
|
|
5
|
+
}
|
|
6
|
+
export interface AnalyzerFact {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AnalyzerItem extends AnalyzerShopItem {
|
|
11
|
+
desired?: boolean;
|
|
12
|
+
badges?: AnalyzerBadge[];
|
|
13
|
+
detail?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AnalyzerAnteView {
|
|
16
|
+
ante: number;
|
|
17
|
+
boss?: string;
|
|
18
|
+
voucher?: string;
|
|
19
|
+
smallBlindTag?: string;
|
|
20
|
+
bigBlindTag?: string;
|
|
21
|
+
packs?: string[];
|
|
22
|
+
shop?: AnalyzerItem[];
|
|
23
|
+
facts?: AnalyzerFact[];
|
|
24
|
+
}
|
|
25
|
+
export interface AnalyzerHighlight {
|
|
26
|
+
id: string;
|
|
27
|
+
ante: number;
|
|
28
|
+
title: string;
|
|
29
|
+
subtitle?: string;
|
|
30
|
+
desired?: boolean;
|
|
31
|
+
item?: AnalyzerItem;
|
|
32
|
+
boss?: string;
|
|
33
|
+
voucher?: string;
|
|
34
|
+
tag?: string;
|
|
35
|
+
badges?: AnalyzerBadge[];
|
|
36
|
+
}
|
|
37
|
+
export interface AnalyzerExplorerProps {
|
|
38
|
+
antes: AnalyzerAnteView[];
|
|
39
|
+
highlights?: AnalyzerHighlight[];
|
|
40
|
+
visibleAntes?: number;
|
|
41
|
+
totalAntes?: number;
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function AnalyzerExplorer({ antes, highlights, visibleAntes, totalAntes, className, }: AnalyzerExplorerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { JamlBoss, JamlGameCard, JamlTag, JamlVoucher, resolveAnalyzerShopItem, } from "./GameCard.js";
|
|
5
|
+
export function AnalyzerExplorer({ antes, highlights = [], visibleAntes, totalAntes, className = "", }) {
|
|
6
|
+
const [currentAnte, setCurrentAnte] = useState(antes[0]?.ante ?? 0);
|
|
7
|
+
const scrollRef = useRef(null);
|
|
8
|
+
const anteRefs = useRef(new Map());
|
|
9
|
+
const highlightRefs = useRef(new Map());
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setCurrentAnte(antes[0]?.ante ?? 0);
|
|
12
|
+
}, [antes]);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const root = scrollRef.current;
|
|
15
|
+
if (!root) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const observer = new IntersectionObserver((entries) => {
|
|
19
|
+
const mostVisibleEntry = entries
|
|
20
|
+
.filter((entry) => entry.isIntersecting)
|
|
21
|
+
.sort((left, right) => right.intersectionRatio - left.intersectionRatio)[0];
|
|
22
|
+
if (!mostVisibleEntry) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const ante = Number(mostVisibleEntry.target.dataset.ante);
|
|
26
|
+
if (!Number.isNaN(ante)) {
|
|
27
|
+
setCurrentAnte(ante);
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
root,
|
|
31
|
+
threshold: [0.45, 0.72, 0.9],
|
|
32
|
+
});
|
|
33
|
+
for (const [, element] of anteRefs.current) {
|
|
34
|
+
observer.observe(element);
|
|
35
|
+
}
|
|
36
|
+
return () => observer.disconnect();
|
|
37
|
+
}, [antes]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const activeHighlight = highlights.find((highlight) => highlight.ante === currentAnte);
|
|
40
|
+
if (!activeHighlight) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const element = highlightRefs.current.get(activeHighlight.id);
|
|
44
|
+
element?.scrollIntoView({
|
|
45
|
+
behavior: "smooth",
|
|
46
|
+
inline: "center",
|
|
47
|
+
block: "nearest",
|
|
48
|
+
});
|
|
49
|
+
}, [currentAnte, highlights]);
|
|
50
|
+
const scrollToAnte = useCallback((ante) => {
|
|
51
|
+
anteRefs.current.get(ante)?.scrollIntoView({
|
|
52
|
+
behavior: "smooth",
|
|
53
|
+
block: "start",
|
|
54
|
+
});
|
|
55
|
+
}, []);
|
|
56
|
+
const currentAnteIndex = antes.findIndex((ante) => ante.ante === currentAnte);
|
|
57
|
+
const previousAnte = currentAnteIndex > 0 ? antes[currentAnteIndex - 1]?.ante ?? null : null;
|
|
58
|
+
const nextAnte = currentAnteIndex >= 0 && currentAnteIndex < antes.length - 1 ? antes[currentAnteIndex + 1]?.ante ?? null : null;
|
|
59
|
+
const shownAntes = visibleAntes ?? antes.length;
|
|
60
|
+
const availableAntes = totalAntes ?? shownAntes;
|
|
61
|
+
return (_jsxs("div", { className: className, style: styles.root, children: [highlights.length > 0 ? (_jsxs("section", { style: styles.highlightSection, children: [_jsxs("div", { style: styles.highlightHeader, children: [_jsx("span", { style: styles.highlightTitle, children: "Highlights" }), _jsx("span", { style: styles.highlightSubtitle, children: "Swipe, tap, jump" })] }), _jsx("div", { style: styles.highlightRail, children: highlights.map((highlight) => {
|
|
62
|
+
const isActive = highlight.ante === currentAnte;
|
|
63
|
+
return (_jsxs("button", { ref: (element) => {
|
|
64
|
+
if (element) {
|
|
65
|
+
highlightRefs.current.set(highlight.id, element);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
highlightRefs.current.delete(highlight.id);
|
|
69
|
+
}
|
|
70
|
+
}, type: "button", onClick: () => scrollToAnte(highlight.ante), style: isActive ? styles.highlightCardActive : styles.highlightCard, children: [_jsx("div", { style: styles.highlightVisual, children: renderHighlightVisual(highlight) }), _jsxs("div", { style: styles.highlightMeta, children: [_jsxs("span", { style: styles.highlightAnte, children: ["Ante ", highlight.ante] }), _jsx("span", { style: styles.highlightLabel, children: highlight.title }), highlight.subtitle ? (_jsx("span", { style: styles.highlightDescription, children: highlight.subtitle })) : null, _jsx(BadgeRow, { badges: highlight.badges, desired: highlight.desired })] })] }, highlight.id));
|
|
71
|
+
}) })] })) : null, _jsxs("div", { style: styles.navBar, children: [_jsx("button", { type: "button", onClick: () => previousAnte !== null && scrollToAnte(previousAnte), disabled: previousAnte === null, style: {
|
|
72
|
+
...styles.navButton,
|
|
73
|
+
opacity: previousAnte !== null ? 1 : 0.25,
|
|
74
|
+
}, children: "\u25B2" }), _jsxs("div", { style: styles.navLabel, children: ["Ante ", currentAnte, _jsxs("span", { style: styles.navSubLabel, children: ["of ", shownAntes, availableAntes > shownAntes ? ` / ${availableAntes}` : ""] })] }), _jsx("button", { type: "button", onClick: () => nextAnte !== null && scrollToAnte(nextAnte), disabled: nextAnte === null, style: {
|
|
75
|
+
...styles.navButton,
|
|
76
|
+
opacity: nextAnte !== null ? 1 : 0.25,
|
|
77
|
+
}, children: "\u25BC" })] }), _jsx("div", { ref: scrollRef, style: styles.scrollRegion, children: antes.map((ante) => (_jsx("div", { "data-ante": ante.ante, ref: (element) => {
|
|
78
|
+
if (element) {
|
|
79
|
+
anteRefs.current.set(ante.ante, element);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
anteRefs.current.delete(ante.ante);
|
|
83
|
+
}
|
|
84
|
+
}, style: styles.antePage, children: _jsx(AnteSection, { ante: ante }) }, ante.ante))) })] }));
|
|
85
|
+
}
|
|
86
|
+
function AnteSection({ ante }) {
|
|
87
|
+
return (_jsxs("section", { style: styles.anteSection, children: [_jsxs("div", { style: styles.anteHeader, children: [_jsxs("span", { style: styles.anteHeading, children: ["Ante ", ante.ante] }), ante.boss ? (_jsxs("div", { style: styles.bossRow, children: [_jsx(JamlBoss, { bossName: ante.boss, scale: 0.62 }), _jsx("span", { style: styles.bossName, children: ante.boss })] })) : null] }), ante.smallBlindTag || ante.bigBlindTag ? (_jsxs(AnalyzerRow, { label: "Tags", children: [ante.smallBlindTag ? (_jsx(CompactCard, { label: "Small", visual: _jsx(JamlTag, { tagName: ante.smallBlindTag, scale: 0.58, hoverTilt: true }), text: ante.smallBlindTag })) : null, ante.bigBlindTag ? (_jsx(CompactCard, { label: "Big", visual: _jsx(JamlTag, { tagName: ante.bigBlindTag, scale: 0.58, hoverTilt: true }), text: ante.bigBlindTag })) : null] })) : null, ante.voucher ? (_jsx(AnalyzerRow, { label: "Voucher", children: _jsx(CompactCard, { visual: _jsx(JamlVoucher, { voucherName: ante.voucher, scale: 0.58, hoverTilt: true }), text: ante.voucher }) })) : null, ante.shop && ante.shop.length > 0 ? (_jsx(AnalyzerRow, { label: "Shop", dense: true, children: ante.shop.map((item) => (_jsx(ResolvedItemCard, { item: item }, `${ante.ante}-${item.id}-${item.name}`))) })) : null, ante.packs && ante.packs.length > 0 ? (_jsx(AnalyzerRow, { label: "Packs", children: ante.packs.map((pack) => (_jsx("div", { style: styles.packChip, children: pack }, `${ante.ante}-${pack}`))) })) : null, ante.facts && ante.facts.length > 0 ? (_jsx(AnalyzerRow, { label: "Facts", children: ante.facts.map((fact) => (_jsxs("div", { style: styles.factCard, children: [_jsx("span", { style: styles.factLabel, children: fact.label }), _jsx("span", { style: styles.factValue, children: fact.value })] }, `${ante.ante}-${fact.label}-${fact.value}`))) })) : null] }));
|
|
88
|
+
}
|
|
89
|
+
function AnalyzerRow({ label, children, dense = false, }) {
|
|
90
|
+
return (_jsxs("div", { style: styles.row, children: [_jsx("div", { style: styles.rowLabel, children: label }), _jsx("div", { style: dense ? styles.denseGrid : styles.cardFlow, children: children })] }));
|
|
91
|
+
}
|
|
92
|
+
function CompactCard({ label, visual, text, }) {
|
|
93
|
+
return (_jsxs("div", { style: styles.compactCard, children: [label ? _jsx("span", { style: styles.compactLabel, children: label }) : null, visual, _jsx("span", { style: styles.itemText, children: text })] }));
|
|
94
|
+
}
|
|
95
|
+
function ResolvedItemCard({ item }) {
|
|
96
|
+
const resolved = resolveAnalyzerShopItem(item, 0.58);
|
|
97
|
+
const wrapperStyle = item.desired ? styles.itemCardDesired : styles.itemCard;
|
|
98
|
+
if (resolved.kind === "joker" || resolved.kind === "consumable" || resolved.kind === "playing") {
|
|
99
|
+
return (_jsxs("div", { style: wrapperStyle, children: [_jsx(JamlGameCard, { card: resolved.card, type: resolved.type, hoverTilt: true }), _jsx("span", { style: styles.itemText, children: item.name }), _jsx(BadgeRow, { badges: item.badges, desired: item.desired }), item.detail ? _jsx("span", { style: styles.itemDetail, children: item.detail }) : null] }));
|
|
100
|
+
}
|
|
101
|
+
if (resolved.kind === "voucher") {
|
|
102
|
+
return (_jsxs("div", { style: wrapperStyle, children: [_jsx(JamlVoucher, { voucherName: resolved.voucherName, scale: 0.58, hoverTilt: true }), _jsx("span", { style: styles.itemText, children: item.name }), _jsx(BadgeRow, { badges: item.badges, desired: item.desired }), item.detail ? _jsx("span", { style: styles.itemDetail, children: item.detail }) : null] }));
|
|
103
|
+
}
|
|
104
|
+
return (_jsxs("div", { style: wrapperStyle, children: [_jsx("div", { style: styles.packChip, children: item.name }), _jsx(BadgeRow, { badges: item.badges, desired: item.desired }), item.detail ? _jsx("span", { style: styles.itemDetail, children: item.detail }) : null] }));
|
|
105
|
+
}
|
|
106
|
+
function BadgeRow({ badges, desired = false }) {
|
|
107
|
+
const combinedBadges = desired
|
|
108
|
+
? [{ label: "desired", tone: "accent" }, ...(badges ?? [])]
|
|
109
|
+
: (badges ?? []);
|
|
110
|
+
if (combinedBadges.length === 0) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return (_jsx("div", { style: styles.badgeRow, children: combinedBadges.map((badge) => {
|
|
114
|
+
const badgeStyle = badge.tone === "accent"
|
|
115
|
+
? styles.badgeAccent
|
|
116
|
+
: badge.tone === "muted"
|
|
117
|
+
? styles.badgeMuted
|
|
118
|
+
: styles.badge;
|
|
119
|
+
return (_jsx("span", { style: badgeStyle, children: badge.label }, `${badge.label}-${badge.tone ?? "default"}`));
|
|
120
|
+
}) }));
|
|
121
|
+
}
|
|
122
|
+
function renderHighlightVisual(highlight) {
|
|
123
|
+
if (highlight.item) {
|
|
124
|
+
return _jsx(ResolvedItemCard, { item: highlight.item });
|
|
125
|
+
}
|
|
126
|
+
if (highlight.boss) {
|
|
127
|
+
return _jsx(JamlBoss, { bossName: highlight.boss, scale: 0.92, hoverTilt: true });
|
|
128
|
+
}
|
|
129
|
+
if (highlight.voucher) {
|
|
130
|
+
return _jsx(JamlVoucher, { voucherName: highlight.voucher, scale: 0.92, hoverTilt: true });
|
|
131
|
+
}
|
|
132
|
+
if (highlight.tag) {
|
|
133
|
+
return _jsx(JamlTag, { tagName: highlight.tag, scale: 0.92, hoverTilt: true });
|
|
134
|
+
}
|
|
135
|
+
return _jsx("div", { style: styles.packChip, children: highlight.title });
|
|
136
|
+
}
|
|
137
|
+
const styles = {
|
|
138
|
+
root: {
|
|
139
|
+
display: "flex",
|
|
140
|
+
flexDirection: "column",
|
|
141
|
+
height: "100%",
|
|
142
|
+
minHeight: 0,
|
|
143
|
+
},
|
|
144
|
+
highlightSection: {
|
|
145
|
+
padding: "10px 16px 8px",
|
|
146
|
+
borderBottom: "1px solid #1a1a34",
|
|
147
|
+
background: "#0f0f22",
|
|
148
|
+
},
|
|
149
|
+
highlightHeader: {
|
|
150
|
+
display: "flex",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "space-between",
|
|
153
|
+
gap: 12,
|
|
154
|
+
marginBottom: 8,
|
|
155
|
+
},
|
|
156
|
+
highlightTitle: {
|
|
157
|
+
fontSize: 11,
|
|
158
|
+
color: "#6f6fa1",
|
|
159
|
+
textTransform: "uppercase",
|
|
160
|
+
letterSpacing: "0.08em",
|
|
161
|
+
},
|
|
162
|
+
highlightSubtitle: {
|
|
163
|
+
fontSize: 11,
|
|
164
|
+
color: "#6f6fa1",
|
|
165
|
+
},
|
|
166
|
+
highlightRail: {
|
|
167
|
+
display: "flex",
|
|
168
|
+
gap: 10,
|
|
169
|
+
overflowX: "auto",
|
|
170
|
+
paddingBottom: 4,
|
|
171
|
+
scrollSnapType: "x mandatory",
|
|
172
|
+
},
|
|
173
|
+
highlightCard: {
|
|
174
|
+
minWidth: 150,
|
|
175
|
+
maxWidth: 150,
|
|
176
|
+
display: "flex",
|
|
177
|
+
flexDirection: "column",
|
|
178
|
+
gap: 6,
|
|
179
|
+
padding: 8,
|
|
180
|
+
borderRadius: 12,
|
|
181
|
+
border: "1px solid #2a2a55",
|
|
182
|
+
background: "#131326",
|
|
183
|
+
scrollSnapAlign: "center",
|
|
184
|
+
cursor: "pointer",
|
|
185
|
+
},
|
|
186
|
+
highlightCardActive: {
|
|
187
|
+
minWidth: 150,
|
|
188
|
+
maxWidth: 150,
|
|
189
|
+
display: "flex",
|
|
190
|
+
flexDirection: "column",
|
|
191
|
+
gap: 6,
|
|
192
|
+
padding: 8,
|
|
193
|
+
borderRadius: 12,
|
|
194
|
+
border: "1px solid rgba(245,200,66,0.45)",
|
|
195
|
+
background: "rgba(245,200,66,0.08)",
|
|
196
|
+
scrollSnapAlign: "center",
|
|
197
|
+
cursor: "pointer",
|
|
198
|
+
},
|
|
199
|
+
highlightVisual: {
|
|
200
|
+
display: "flex",
|
|
201
|
+
justifyContent: "center",
|
|
202
|
+
alignItems: "flex-start",
|
|
203
|
+
minHeight: 88,
|
|
204
|
+
},
|
|
205
|
+
highlightMeta: {
|
|
206
|
+
display: "flex",
|
|
207
|
+
flexDirection: "column",
|
|
208
|
+
gap: 3,
|
|
209
|
+
alignItems: "flex-start",
|
|
210
|
+
},
|
|
211
|
+
highlightAnte: {
|
|
212
|
+
fontSize: 10,
|
|
213
|
+
color: "#a855f7",
|
|
214
|
+
fontWeight: 700,
|
|
215
|
+
textTransform: "uppercase",
|
|
216
|
+
letterSpacing: "0.08em",
|
|
217
|
+
},
|
|
218
|
+
highlightLabel: {
|
|
219
|
+
fontSize: 12,
|
|
220
|
+
color: "#ececff",
|
|
221
|
+
fontWeight: 700,
|
|
222
|
+
lineHeight: 1.2,
|
|
223
|
+
textAlign: "left",
|
|
224
|
+
},
|
|
225
|
+
highlightDescription: {
|
|
226
|
+
fontSize: 11,
|
|
227
|
+
color: "#8e8eb6",
|
|
228
|
+
lineHeight: 1.2,
|
|
229
|
+
textAlign: "left",
|
|
230
|
+
},
|
|
231
|
+
navBar: {
|
|
232
|
+
display: "flex",
|
|
233
|
+
alignItems: "center",
|
|
234
|
+
justifyContent: "center",
|
|
235
|
+
gap: 12,
|
|
236
|
+
padding: "8px 16px",
|
|
237
|
+
background: "#0f0f22",
|
|
238
|
+
borderBottom: "1px solid #1a1a34",
|
|
239
|
+
},
|
|
240
|
+
navButton: {
|
|
241
|
+
background: "none",
|
|
242
|
+
border: "1px solid #2a2a55",
|
|
243
|
+
borderRadius: 6,
|
|
244
|
+
color: "#9898c0",
|
|
245
|
+
fontSize: 14,
|
|
246
|
+
padding: "4px 10px",
|
|
247
|
+
cursor: "pointer",
|
|
248
|
+
},
|
|
249
|
+
navLabel: {
|
|
250
|
+
fontSize: 12,
|
|
251
|
+
fontWeight: 700,
|
|
252
|
+
color: "#a855f7",
|
|
253
|
+
textTransform: "uppercase",
|
|
254
|
+
letterSpacing: "0.08em",
|
|
255
|
+
minWidth: 130,
|
|
256
|
+
textAlign: "center",
|
|
257
|
+
},
|
|
258
|
+
navSubLabel: {
|
|
259
|
+
color: "#5a5a88",
|
|
260
|
+
fontWeight: 500,
|
|
261
|
+
textTransform: "none",
|
|
262
|
+
letterSpacing: "normal",
|
|
263
|
+
fontSize: 11,
|
|
264
|
+
marginLeft: 4,
|
|
265
|
+
},
|
|
266
|
+
scrollRegion: {
|
|
267
|
+
flex: 1,
|
|
268
|
+
overflowY: "auto",
|
|
269
|
+
overflowX: "hidden",
|
|
270
|
+
scrollSnapType: "y mandatory",
|
|
271
|
+
scrollBehavior: "smooth",
|
|
272
|
+
},
|
|
273
|
+
antePage: {
|
|
274
|
+
scrollSnapAlign: "start",
|
|
275
|
+
scrollSnapStop: "always",
|
|
276
|
+
minHeight: "100%",
|
|
277
|
+
boxSizing: "border-box",
|
|
278
|
+
paddingBottom: 16,
|
|
279
|
+
borderBottom: "1px solid #1a1a34",
|
|
280
|
+
},
|
|
281
|
+
anteSection: {
|
|
282
|
+
paddingBottom: 8,
|
|
283
|
+
},
|
|
284
|
+
anteHeader: {
|
|
285
|
+
display: "flex",
|
|
286
|
+
alignItems: "center",
|
|
287
|
+
gap: 12,
|
|
288
|
+
padding: "8px 16px",
|
|
289
|
+
},
|
|
290
|
+
anteHeading: {
|
|
291
|
+
fontSize: 12,
|
|
292
|
+
fontWeight: 700,
|
|
293
|
+
color: "#a855f7",
|
|
294
|
+
textTransform: "uppercase",
|
|
295
|
+
letterSpacing: "0.1em",
|
|
296
|
+
},
|
|
297
|
+
bossRow: {
|
|
298
|
+
display: "flex",
|
|
299
|
+
alignItems: "center",
|
|
300
|
+
gap: 6,
|
|
301
|
+
},
|
|
302
|
+
bossName: {
|
|
303
|
+
fontSize: 13,
|
|
304
|
+
color: "#e84040",
|
|
305
|
+
fontWeight: 600,
|
|
306
|
+
},
|
|
307
|
+
row: {
|
|
308
|
+
padding: "4px 16px 8px",
|
|
309
|
+
},
|
|
310
|
+
rowLabel: {
|
|
311
|
+
fontSize: 10,
|
|
312
|
+
color: "#5a5a88",
|
|
313
|
+
textTransform: "uppercase",
|
|
314
|
+
letterSpacing: "0.07em",
|
|
315
|
+
marginBottom: 6,
|
|
316
|
+
},
|
|
317
|
+
cardFlow: {
|
|
318
|
+
display: "flex",
|
|
319
|
+
flexWrap: "wrap",
|
|
320
|
+
gap: 8,
|
|
321
|
+
alignItems: "flex-start",
|
|
322
|
+
},
|
|
323
|
+
denseGrid: {
|
|
324
|
+
display: "grid",
|
|
325
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(82px, 1fr))",
|
|
326
|
+
gap: 8,
|
|
327
|
+
alignItems: "start",
|
|
328
|
+
},
|
|
329
|
+
compactCard: {
|
|
330
|
+
display: "flex",
|
|
331
|
+
flexDirection: "column",
|
|
332
|
+
alignItems: "center",
|
|
333
|
+
gap: 4,
|
|
334
|
+
minWidth: 62,
|
|
335
|
+
},
|
|
336
|
+
compactLabel: {
|
|
337
|
+
padding: "2px 6px",
|
|
338
|
+
borderRadius: 999,
|
|
339
|
+
background: "#18182e",
|
|
340
|
+
color: "#7f7fa7",
|
|
341
|
+
border: "1px solid #2a2a55",
|
|
342
|
+
fontSize: 9,
|
|
343
|
+
fontWeight: 700,
|
|
344
|
+
textTransform: "uppercase",
|
|
345
|
+
letterSpacing: "0.05em",
|
|
346
|
+
},
|
|
347
|
+
itemCard: {
|
|
348
|
+
display: "flex",
|
|
349
|
+
flexDirection: "column",
|
|
350
|
+
alignItems: "center",
|
|
351
|
+
gap: 4,
|
|
352
|
+
width: "100%",
|
|
353
|
+
minWidth: 0,
|
|
354
|
+
},
|
|
355
|
+
itemCardDesired: {
|
|
356
|
+
display: "flex",
|
|
357
|
+
flexDirection: "column",
|
|
358
|
+
alignItems: "center",
|
|
359
|
+
gap: 4,
|
|
360
|
+
width: "100%",
|
|
361
|
+
minWidth: 0,
|
|
362
|
+
padding: "4px 4px 6px",
|
|
363
|
+
borderRadius: 10,
|
|
364
|
+
border: "1px solid rgba(245,200,66,0.4)",
|
|
365
|
+
background: "rgba(245,200,66,0.08)",
|
|
366
|
+
},
|
|
367
|
+
itemText: {
|
|
368
|
+
fontSize: 10,
|
|
369
|
+
color: "#8e8eb6",
|
|
370
|
+
textAlign: "center",
|
|
371
|
+
lineHeight: 1.2,
|
|
372
|
+
maxWidth: 84,
|
|
373
|
+
overflow: "hidden",
|
|
374
|
+
textOverflow: "ellipsis",
|
|
375
|
+
whiteSpace: "nowrap",
|
|
376
|
+
},
|
|
377
|
+
itemDetail: {
|
|
378
|
+
fontSize: 10,
|
|
379
|
+
color: "#d8d8ea",
|
|
380
|
+
textAlign: "center",
|
|
381
|
+
lineHeight: 1.2,
|
|
382
|
+
},
|
|
383
|
+
badgeRow: {
|
|
384
|
+
display: "flex",
|
|
385
|
+
flexWrap: "wrap",
|
|
386
|
+
gap: 4,
|
|
387
|
+
justifyContent: "center",
|
|
388
|
+
},
|
|
389
|
+
badge: {
|
|
390
|
+
padding: "2px 6px",
|
|
391
|
+
borderRadius: 999,
|
|
392
|
+
background: "#202043",
|
|
393
|
+
color: "#c7c7ef",
|
|
394
|
+
border: "1px solid #35356d",
|
|
395
|
+
fontSize: 9,
|
|
396
|
+
fontWeight: 700,
|
|
397
|
+
textTransform: "uppercase",
|
|
398
|
+
letterSpacing: "0.05em",
|
|
399
|
+
},
|
|
400
|
+
badgeAccent: {
|
|
401
|
+
padding: "2px 6px",
|
|
402
|
+
borderRadius: 999,
|
|
403
|
+
background: "rgba(245,200,66,0.2)",
|
|
404
|
+
color: "#f5c842",
|
|
405
|
+
border: "1px solid rgba(245,200,66,0.35)",
|
|
406
|
+
fontSize: 9,
|
|
407
|
+
fontWeight: 700,
|
|
408
|
+
textTransform: "uppercase",
|
|
409
|
+
letterSpacing: "0.05em",
|
|
410
|
+
},
|
|
411
|
+
badgeMuted: {
|
|
412
|
+
padding: "2px 6px",
|
|
413
|
+
borderRadius: 999,
|
|
414
|
+
background: "#18182e",
|
|
415
|
+
color: "#7f7fa7",
|
|
416
|
+
border: "1px solid #2a2a55",
|
|
417
|
+
fontSize: 9,
|
|
418
|
+
fontWeight: 700,
|
|
419
|
+
textTransform: "uppercase",
|
|
420
|
+
letterSpacing: "0.05em",
|
|
421
|
+
},
|
|
422
|
+
packChip: {
|
|
423
|
+
fontSize: 12,
|
|
424
|
+
color: "#5a5a88",
|
|
425
|
+
background: "#131326",
|
|
426
|
+
border: "1px solid #2a2a55",
|
|
427
|
+
borderRadius: 6,
|
|
428
|
+
padding: "4px 8px",
|
|
429
|
+
},
|
|
430
|
+
factCard: {
|
|
431
|
+
display: "flex",
|
|
432
|
+
flexDirection: "column",
|
|
433
|
+
gap: 2,
|
|
434
|
+
minWidth: 110,
|
|
435
|
+
padding: "8px 10px",
|
|
436
|
+
borderRadius: 10,
|
|
437
|
+
background: "#131326",
|
|
438
|
+
border: "1px solid #2a2a55",
|
|
439
|
+
},
|
|
440
|
+
factLabel: {
|
|
441
|
+
fontSize: 10,
|
|
442
|
+
color: "#7f7fa7",
|
|
443
|
+
textTransform: "uppercase",
|
|
444
|
+
letterSpacing: "0.07em",
|
|
445
|
+
},
|
|
446
|
+
factValue: {
|
|
447
|
+
fontSize: 12,
|
|
448
|
+
color: "#ececff",
|
|
449
|
+
fontWeight: 700,
|
|
450
|
+
},
|
|
451
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { JAML_ASSET_FILES, clearJamlAssetBaseUrl, getDefaultJamlAssetUrlMap, res
|
|
|
2
2
|
export { Layer, type LayerOptions } from "./render/Layer.js";
|
|
3
3
|
export { JamlCardRenderer, type JamlCardRendererProps } from "./render/CanvasRenderer.js";
|
|
4
4
|
export { JamlGameCard, JamlVoucher, JamlTag, JamlBoss, resolveAnalyzerShopItem, type JamlGameCardProps, type AnalyzerShopItem, type AnalyzerResolvedItem, } from "./components/GameCard.js";
|
|
5
|
+
export { AnalyzerExplorer, type AnalyzerAnteView, type AnalyzerBadge, type AnalyzerExplorerProps, type AnalyzerFact, type AnalyzerHighlight, type AnalyzerItem, } from "./components/AnalyzerExplorer.js";
|
|
5
6
|
export { JamlMapPreview, type JamlMapPreviewProps } from "./components/JamlMapPreview.js";
|
|
6
7
|
export { JamlIde, type JamlIdeProps, type JamlIdeSearchResult, } from "./components/JamlIde.js";
|
|
7
8
|
export { JamlIdeToolbar, type JamlIdeMode, type JamlIdeToolbarProps, } from "./components/JamlIdeToolbar.js";
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { JAML_ASSET_FILES, clearJamlAssetBaseUrl, getDefaultJamlAssetUrlMap, res
|
|
|
3
3
|
export { Layer } from "./render/Layer.js";
|
|
4
4
|
export { JamlCardRenderer } from "./render/CanvasRenderer.js";
|
|
5
5
|
export { JamlGameCard, JamlVoucher, JamlTag, JamlBoss, resolveAnalyzerShopItem, } from "./components/GameCard.js";
|
|
6
|
+
export { AnalyzerExplorer, } from "./components/AnalyzerExplorer.js";
|
|
6
7
|
export { JamlMapPreview } from "./components/JamlMapPreview.js";
|
|
7
8
|
export { JamlIde, } from "./components/JamlIde.js";
|
|
8
9
|
export { JamlIdeToolbar, } from "./components/JamlIdeToolbar.js";
|
package/dist/motely.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { decodeMotelyItem, decodeMotelyItemToJamlCard, motelyItemTypeName, motelyItemCategory, motelyItemDisplayName, motelyItemRenderCategory, motelyItemEditionName, motelyItemSealName, motelyItemEnhancementName, motelyPlayingCardRankName, motelyPlayingCardSuitName, decodeMotelyItemName, resolveMotelyItemType, warmMotelyItemCache, motelyItemCacheSize, type DecodedMotelyItem, type MotelyItemInput, type MotelyJamlCard, type MotelyRenderableCategory, type MotelyRuntimeItem, } from "./decode/motelyItemDecoder.js";
|
|
2
|
+
export { MOTELY_DISPLAY_SCHEMA, motelyBossDisplayName, motelyBossDisplayNameFromKey, motelyBossKeyFromDisplayName, motelyBoosterPackDisplayName, motelyBoosterPackDisplayNameFromKey, motelyBoosterPackKeyFromDisplayName, motelyItemDisplayNameFromKey, motelyItemDisplayNameFromValue, motelyTagDisplayName, motelyTagDisplayNameFromKey, motelyTagKeyFromDisplayName, motelyVoucherDisplayName, motelyVoucherDisplayNameFromKey, motelyVoucherKeyFromDisplayName, type MotelyBoosterPackKey, type MotelyBossKey, type MotelyDisplaySchema, type MotelyTagKey, type MotelyVoucherKey, } from "./motelyDisplay.js";
|
package/dist/motely.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
export { decodeMotelyItem, decodeMotelyItemToJamlCard, motelyItemTypeName, motelyItemCategory, motelyItemDisplayName, motelyItemRenderCategory, motelyItemEditionName, motelyItemSealName, motelyItemEnhancementName, motelyPlayingCardRankName, motelyPlayingCardSuitName, decodeMotelyItemName, resolveMotelyItemType, warmMotelyItemCache, motelyItemCacheSize, } from "./decode/motelyItemDecoder.js";
|
|
3
|
+
export { MOTELY_DISPLAY_SCHEMA, motelyBossDisplayName, motelyBossDisplayNameFromKey, motelyBossKeyFromDisplayName, motelyBoosterPackDisplayName, motelyBoosterPackDisplayNameFromKey, motelyBoosterPackKeyFromDisplayName, motelyItemDisplayNameFromKey, motelyItemDisplayNameFromValue, motelyTagDisplayName, motelyTagDisplayNameFromKey, motelyTagKeyFromDisplayName, motelyVoucherDisplayName, motelyVoucherDisplayNameFromKey, motelyVoucherKeyFromDisplayName, } from "./motelyDisplay.js";
|
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
type MotelyLabelEntry<K extends string = string> = Readonly<{
|
|
2
|
+
key: K;
|
|
3
|
+
label: string;
|
|
4
|
+
}>;
|
|
5
|
+
type EntryKey<T extends readonly MotelyLabelEntry[]> = T[number]["key"];
|
|
6
|
+
declare const BOSS_ENTRIES: readonly [{
|
|
7
|
+
readonly key: "AmberAcorn";
|
|
8
|
+
readonly label: "Amber Acorn";
|
|
9
|
+
}, {
|
|
10
|
+
readonly key: "CeruleanBell";
|
|
11
|
+
readonly label: "Cerulean Bell";
|
|
12
|
+
}, {
|
|
13
|
+
readonly key: "CrimsonHeart";
|
|
14
|
+
readonly label: "Crimson Heart";
|
|
15
|
+
}, {
|
|
16
|
+
readonly key: "VerdantLeaf";
|
|
17
|
+
readonly label: "Verdant Leaf";
|
|
18
|
+
}, {
|
|
19
|
+
readonly key: "VioletVessel";
|
|
20
|
+
readonly label: "Violet Vessel";
|
|
21
|
+
}, {
|
|
22
|
+
readonly key: "TheArm";
|
|
23
|
+
readonly label: "The Arm";
|
|
24
|
+
}, {
|
|
25
|
+
readonly key: "TheClub";
|
|
26
|
+
readonly label: "The Club";
|
|
27
|
+
}, {
|
|
28
|
+
readonly key: "TheEye";
|
|
29
|
+
readonly label: "The Eye";
|
|
30
|
+
}, {
|
|
31
|
+
readonly key: "TheFish";
|
|
32
|
+
readonly label: "The Fish";
|
|
33
|
+
}, {
|
|
34
|
+
readonly key: "TheFlint";
|
|
35
|
+
readonly label: "The Flint";
|
|
36
|
+
}, {
|
|
37
|
+
readonly key: "TheGoad";
|
|
38
|
+
readonly label: "The Goad";
|
|
39
|
+
}, {
|
|
40
|
+
readonly key: "TheHead";
|
|
41
|
+
readonly label: "The Head";
|
|
42
|
+
}, {
|
|
43
|
+
readonly key: "TheHook";
|
|
44
|
+
readonly label: "The Hook";
|
|
45
|
+
}, {
|
|
46
|
+
readonly key: "TheHouse";
|
|
47
|
+
readonly label: "The House";
|
|
48
|
+
}, {
|
|
49
|
+
readonly key: "TheManacle";
|
|
50
|
+
readonly label: "The Manacle";
|
|
51
|
+
}, {
|
|
52
|
+
readonly key: "TheMark";
|
|
53
|
+
readonly label: "The Mark";
|
|
54
|
+
}, {
|
|
55
|
+
readonly key: "TheMouth";
|
|
56
|
+
readonly label: "The Mouth";
|
|
57
|
+
}, {
|
|
58
|
+
readonly key: "TheNeedle";
|
|
59
|
+
readonly label: "The Needle";
|
|
60
|
+
}, {
|
|
61
|
+
readonly key: "TheOx";
|
|
62
|
+
readonly label: "The Ox";
|
|
63
|
+
}, {
|
|
64
|
+
readonly key: "ThePillar";
|
|
65
|
+
readonly label: "The Pillar";
|
|
66
|
+
}, {
|
|
67
|
+
readonly key: "ThePlant";
|
|
68
|
+
readonly label: "The Plant";
|
|
69
|
+
}, {
|
|
70
|
+
readonly key: "ThePsychic";
|
|
71
|
+
readonly label: "The Psychic";
|
|
72
|
+
}, {
|
|
73
|
+
readonly key: "TheSerpent";
|
|
74
|
+
readonly label: "The Serpent";
|
|
75
|
+
}, {
|
|
76
|
+
readonly key: "TheTooth";
|
|
77
|
+
readonly label: "The Tooth";
|
|
78
|
+
}, {
|
|
79
|
+
readonly key: "TheWall";
|
|
80
|
+
readonly label: "The Wall";
|
|
81
|
+
}, {
|
|
82
|
+
readonly key: "TheWater";
|
|
83
|
+
readonly label: "The Water";
|
|
84
|
+
}, {
|
|
85
|
+
readonly key: "TheWheel";
|
|
86
|
+
readonly label: "The Wheel";
|
|
87
|
+
}, {
|
|
88
|
+
readonly key: "TheWindow";
|
|
89
|
+
readonly label: "The Window";
|
|
90
|
+
}];
|
|
91
|
+
declare const VOUCHER_ENTRIES: readonly [{
|
|
92
|
+
readonly key: "Overstock";
|
|
93
|
+
readonly label: "Overstock";
|
|
94
|
+
}, {
|
|
95
|
+
readonly key: "OverstockPlus";
|
|
96
|
+
readonly label: "Overstock Plus";
|
|
97
|
+
}, {
|
|
98
|
+
readonly key: "ClearanceSale";
|
|
99
|
+
readonly label: "Clearance Sale";
|
|
100
|
+
}, {
|
|
101
|
+
readonly key: "Liquidation";
|
|
102
|
+
readonly label: "Liquidation";
|
|
103
|
+
}, {
|
|
104
|
+
readonly key: "Hone";
|
|
105
|
+
readonly label: "Hone";
|
|
106
|
+
}, {
|
|
107
|
+
readonly key: "GlowUp";
|
|
108
|
+
readonly label: "Glow Up";
|
|
109
|
+
}, {
|
|
110
|
+
readonly key: "RerollSurplus";
|
|
111
|
+
readonly label: "Reroll Surplus";
|
|
112
|
+
}, {
|
|
113
|
+
readonly key: "RerollGlut";
|
|
114
|
+
readonly label: "Reroll Glut";
|
|
115
|
+
}, {
|
|
116
|
+
readonly key: "CrystalBall";
|
|
117
|
+
readonly label: "Crystal Ball";
|
|
118
|
+
}, {
|
|
119
|
+
readonly key: "OmenGlobe";
|
|
120
|
+
readonly label: "Omen Globe";
|
|
121
|
+
}, {
|
|
122
|
+
readonly key: "Telescope";
|
|
123
|
+
readonly label: "Telescope";
|
|
124
|
+
}, {
|
|
125
|
+
readonly key: "Observatory";
|
|
126
|
+
readonly label: "Observatory";
|
|
127
|
+
}, {
|
|
128
|
+
readonly key: "Grabber";
|
|
129
|
+
readonly label: "Grabber";
|
|
130
|
+
}, {
|
|
131
|
+
readonly key: "NachoTong";
|
|
132
|
+
readonly label: "Nacho Tong";
|
|
133
|
+
}, {
|
|
134
|
+
readonly key: "Wasteful";
|
|
135
|
+
readonly label: "Wasteful";
|
|
136
|
+
}, {
|
|
137
|
+
readonly key: "Recyclomancy";
|
|
138
|
+
readonly label: "Recyclomancy";
|
|
139
|
+
}, {
|
|
140
|
+
readonly key: "TarotMerchant";
|
|
141
|
+
readonly label: "Tarot Merchant";
|
|
142
|
+
}, {
|
|
143
|
+
readonly key: "TarotTycoon";
|
|
144
|
+
readonly label: "Tarot Tycoon";
|
|
145
|
+
}, {
|
|
146
|
+
readonly key: "PlanetMerchant";
|
|
147
|
+
readonly label: "Planet Merchant";
|
|
148
|
+
}, {
|
|
149
|
+
readonly key: "PlanetTycoon";
|
|
150
|
+
readonly label: "Planet Tycoon";
|
|
151
|
+
}, {
|
|
152
|
+
readonly key: "SeedMoney";
|
|
153
|
+
readonly label: "Seed Money";
|
|
154
|
+
}, {
|
|
155
|
+
readonly key: "MoneyTree";
|
|
156
|
+
readonly label: "Money Tree";
|
|
157
|
+
}, {
|
|
158
|
+
readonly key: "Blank";
|
|
159
|
+
readonly label: "Blank";
|
|
160
|
+
}, {
|
|
161
|
+
readonly key: "Antimatter";
|
|
162
|
+
readonly label: "Antimatter";
|
|
163
|
+
}, {
|
|
164
|
+
readonly key: "MagicTrick";
|
|
165
|
+
readonly label: "Magic Trick";
|
|
166
|
+
}, {
|
|
167
|
+
readonly key: "Illusion";
|
|
168
|
+
readonly label: "Illusion";
|
|
169
|
+
}, {
|
|
170
|
+
readonly key: "Hieroglyph";
|
|
171
|
+
readonly label: "Hieroglyph";
|
|
172
|
+
}, {
|
|
173
|
+
readonly key: "Petroglyph";
|
|
174
|
+
readonly label: "Petroglyph";
|
|
175
|
+
}, {
|
|
176
|
+
readonly key: "DirectorsCut";
|
|
177
|
+
readonly label: "Director's Cut";
|
|
178
|
+
}, {
|
|
179
|
+
readonly key: "Retcon";
|
|
180
|
+
readonly label: "Retcon";
|
|
181
|
+
}, {
|
|
182
|
+
readonly key: "PaintBrush";
|
|
183
|
+
readonly label: "Paint Brush";
|
|
184
|
+
}, {
|
|
185
|
+
readonly key: "Palette";
|
|
186
|
+
readonly label: "Palette";
|
|
187
|
+
}];
|
|
188
|
+
declare const TAG_ENTRIES: readonly [{
|
|
189
|
+
readonly key: "UncommonTag";
|
|
190
|
+
readonly label: "Uncommon Tag";
|
|
191
|
+
}, {
|
|
192
|
+
readonly key: "RareTag";
|
|
193
|
+
readonly label: "Rare Tag";
|
|
194
|
+
}, {
|
|
195
|
+
readonly key: "NegativeTag";
|
|
196
|
+
readonly label: "Negative Tag";
|
|
197
|
+
}, {
|
|
198
|
+
readonly key: "FoilTag";
|
|
199
|
+
readonly label: "Foil Tag";
|
|
200
|
+
}, {
|
|
201
|
+
readonly key: "HolographicTag";
|
|
202
|
+
readonly label: "Holographic Tag";
|
|
203
|
+
}, {
|
|
204
|
+
readonly key: "PolychromeTag";
|
|
205
|
+
readonly label: "Polychrome Tag";
|
|
206
|
+
}, {
|
|
207
|
+
readonly key: "InvestmentTag";
|
|
208
|
+
readonly label: "Investment Tag";
|
|
209
|
+
}, {
|
|
210
|
+
readonly key: "VoucherTag";
|
|
211
|
+
readonly label: "Voucher Tag";
|
|
212
|
+
}, {
|
|
213
|
+
readonly key: "BossTag";
|
|
214
|
+
readonly label: "Boss Tag";
|
|
215
|
+
}, {
|
|
216
|
+
readonly key: "StandardTag";
|
|
217
|
+
readonly label: "Standard Tag";
|
|
218
|
+
}, {
|
|
219
|
+
readonly key: "CharmTag";
|
|
220
|
+
readonly label: "Charm Tag";
|
|
221
|
+
}, {
|
|
222
|
+
readonly key: "MeteorTag";
|
|
223
|
+
readonly label: "Meteor Tag";
|
|
224
|
+
}, {
|
|
225
|
+
readonly key: "BuffoonTag";
|
|
226
|
+
readonly label: "Buffoon Tag";
|
|
227
|
+
}, {
|
|
228
|
+
readonly key: "HandyTag";
|
|
229
|
+
readonly label: "Handy Tag";
|
|
230
|
+
}, {
|
|
231
|
+
readonly key: "GarbageTag";
|
|
232
|
+
readonly label: "Garbage Tag";
|
|
233
|
+
}, {
|
|
234
|
+
readonly key: "EtherealTag";
|
|
235
|
+
readonly label: "Ethereal Tag";
|
|
236
|
+
}, {
|
|
237
|
+
readonly key: "CouponTag";
|
|
238
|
+
readonly label: "Coupon Tag";
|
|
239
|
+
}, {
|
|
240
|
+
readonly key: "DoubleTag";
|
|
241
|
+
readonly label: "Double Tag";
|
|
242
|
+
}, {
|
|
243
|
+
readonly key: "JuggleTag";
|
|
244
|
+
readonly label: "Juggle Tag";
|
|
245
|
+
}, {
|
|
246
|
+
readonly key: "D6Tag";
|
|
247
|
+
readonly label: "D6 Tag";
|
|
248
|
+
}, {
|
|
249
|
+
readonly key: "TopupTag";
|
|
250
|
+
readonly label: "Top-up Tag";
|
|
251
|
+
}, {
|
|
252
|
+
readonly key: "SpeedTag";
|
|
253
|
+
readonly label: "Speed Tag";
|
|
254
|
+
}, {
|
|
255
|
+
readonly key: "OrbitalTag";
|
|
256
|
+
readonly label: "Orbital Tag";
|
|
257
|
+
}, {
|
|
258
|
+
readonly key: "EconomyTag";
|
|
259
|
+
readonly label: "Economy Tag";
|
|
260
|
+
}];
|
|
261
|
+
declare const BOOSTER_PACK_ENTRIES: readonly [{
|
|
262
|
+
readonly key: "Arcana";
|
|
263
|
+
readonly label: "Arcana Pack";
|
|
264
|
+
}, {
|
|
265
|
+
readonly key: "JumboArcana";
|
|
266
|
+
readonly label: "Jumbo Arcana Pack";
|
|
267
|
+
}, {
|
|
268
|
+
readonly key: "MegaArcana";
|
|
269
|
+
readonly label: "Mega Arcana Pack";
|
|
270
|
+
}, {
|
|
271
|
+
readonly key: "Celestial";
|
|
272
|
+
readonly label: "Celestial Pack";
|
|
273
|
+
}, {
|
|
274
|
+
readonly key: "JumboCelestial";
|
|
275
|
+
readonly label: "Jumbo Celestial Pack";
|
|
276
|
+
}, {
|
|
277
|
+
readonly key: "MegaCelestial";
|
|
278
|
+
readonly label: "Mega Celestial Pack";
|
|
279
|
+
}, {
|
|
280
|
+
readonly key: "Standard";
|
|
281
|
+
readonly label: "Standard Pack";
|
|
282
|
+
}, {
|
|
283
|
+
readonly key: "JumboStandard";
|
|
284
|
+
readonly label: "Jumbo Standard Pack";
|
|
285
|
+
}, {
|
|
286
|
+
readonly key: "MegaStandard";
|
|
287
|
+
readonly label: "Mega Standard Pack";
|
|
288
|
+
}, {
|
|
289
|
+
readonly key: "Buffoon";
|
|
290
|
+
readonly label: "Buffoon Pack";
|
|
291
|
+
}, {
|
|
292
|
+
readonly key: "JumboBuffoon";
|
|
293
|
+
readonly label: "Jumbo Buffoon Pack";
|
|
294
|
+
}, {
|
|
295
|
+
readonly key: "MegaBuffoon";
|
|
296
|
+
readonly label: "Mega Buffoon Pack";
|
|
297
|
+
}, {
|
|
298
|
+
readonly key: "Spectral";
|
|
299
|
+
readonly label: "Spectral Pack";
|
|
300
|
+
}, {
|
|
301
|
+
readonly key: "JumboSpectral";
|
|
302
|
+
readonly label: "Jumbo Spectral Pack";
|
|
303
|
+
}, {
|
|
304
|
+
readonly key: "MegaSpectral";
|
|
305
|
+
readonly label: "Mega Spectral Pack";
|
|
306
|
+
}];
|
|
307
|
+
export declare const MOTELY_DISPLAY_SCHEMA: {
|
|
308
|
+
readonly bosses: readonly [{
|
|
309
|
+
readonly key: "AmberAcorn";
|
|
310
|
+
readonly label: "Amber Acorn";
|
|
311
|
+
}, {
|
|
312
|
+
readonly key: "CeruleanBell";
|
|
313
|
+
readonly label: "Cerulean Bell";
|
|
314
|
+
}, {
|
|
315
|
+
readonly key: "CrimsonHeart";
|
|
316
|
+
readonly label: "Crimson Heart";
|
|
317
|
+
}, {
|
|
318
|
+
readonly key: "VerdantLeaf";
|
|
319
|
+
readonly label: "Verdant Leaf";
|
|
320
|
+
}, {
|
|
321
|
+
readonly key: "VioletVessel";
|
|
322
|
+
readonly label: "Violet Vessel";
|
|
323
|
+
}, {
|
|
324
|
+
readonly key: "TheArm";
|
|
325
|
+
readonly label: "The Arm";
|
|
326
|
+
}, {
|
|
327
|
+
readonly key: "TheClub";
|
|
328
|
+
readonly label: "The Club";
|
|
329
|
+
}, {
|
|
330
|
+
readonly key: "TheEye";
|
|
331
|
+
readonly label: "The Eye";
|
|
332
|
+
}, {
|
|
333
|
+
readonly key: "TheFish";
|
|
334
|
+
readonly label: "The Fish";
|
|
335
|
+
}, {
|
|
336
|
+
readonly key: "TheFlint";
|
|
337
|
+
readonly label: "The Flint";
|
|
338
|
+
}, {
|
|
339
|
+
readonly key: "TheGoad";
|
|
340
|
+
readonly label: "The Goad";
|
|
341
|
+
}, {
|
|
342
|
+
readonly key: "TheHead";
|
|
343
|
+
readonly label: "The Head";
|
|
344
|
+
}, {
|
|
345
|
+
readonly key: "TheHook";
|
|
346
|
+
readonly label: "The Hook";
|
|
347
|
+
}, {
|
|
348
|
+
readonly key: "TheHouse";
|
|
349
|
+
readonly label: "The House";
|
|
350
|
+
}, {
|
|
351
|
+
readonly key: "TheManacle";
|
|
352
|
+
readonly label: "The Manacle";
|
|
353
|
+
}, {
|
|
354
|
+
readonly key: "TheMark";
|
|
355
|
+
readonly label: "The Mark";
|
|
356
|
+
}, {
|
|
357
|
+
readonly key: "TheMouth";
|
|
358
|
+
readonly label: "The Mouth";
|
|
359
|
+
}, {
|
|
360
|
+
readonly key: "TheNeedle";
|
|
361
|
+
readonly label: "The Needle";
|
|
362
|
+
}, {
|
|
363
|
+
readonly key: "TheOx";
|
|
364
|
+
readonly label: "The Ox";
|
|
365
|
+
}, {
|
|
366
|
+
readonly key: "ThePillar";
|
|
367
|
+
readonly label: "The Pillar";
|
|
368
|
+
}, {
|
|
369
|
+
readonly key: "ThePlant";
|
|
370
|
+
readonly label: "The Plant";
|
|
371
|
+
}, {
|
|
372
|
+
readonly key: "ThePsychic";
|
|
373
|
+
readonly label: "The Psychic";
|
|
374
|
+
}, {
|
|
375
|
+
readonly key: "TheSerpent";
|
|
376
|
+
readonly label: "The Serpent";
|
|
377
|
+
}, {
|
|
378
|
+
readonly key: "TheTooth";
|
|
379
|
+
readonly label: "The Tooth";
|
|
380
|
+
}, {
|
|
381
|
+
readonly key: "TheWall";
|
|
382
|
+
readonly label: "The Wall";
|
|
383
|
+
}, {
|
|
384
|
+
readonly key: "TheWater";
|
|
385
|
+
readonly label: "The Water";
|
|
386
|
+
}, {
|
|
387
|
+
readonly key: "TheWheel";
|
|
388
|
+
readonly label: "The Wheel";
|
|
389
|
+
}, {
|
|
390
|
+
readonly key: "TheWindow";
|
|
391
|
+
readonly label: "The Window";
|
|
392
|
+
}];
|
|
393
|
+
readonly vouchers: readonly [{
|
|
394
|
+
readonly key: "Overstock";
|
|
395
|
+
readonly label: "Overstock";
|
|
396
|
+
}, {
|
|
397
|
+
readonly key: "OverstockPlus";
|
|
398
|
+
readonly label: "Overstock Plus";
|
|
399
|
+
}, {
|
|
400
|
+
readonly key: "ClearanceSale";
|
|
401
|
+
readonly label: "Clearance Sale";
|
|
402
|
+
}, {
|
|
403
|
+
readonly key: "Liquidation";
|
|
404
|
+
readonly label: "Liquidation";
|
|
405
|
+
}, {
|
|
406
|
+
readonly key: "Hone";
|
|
407
|
+
readonly label: "Hone";
|
|
408
|
+
}, {
|
|
409
|
+
readonly key: "GlowUp";
|
|
410
|
+
readonly label: "Glow Up";
|
|
411
|
+
}, {
|
|
412
|
+
readonly key: "RerollSurplus";
|
|
413
|
+
readonly label: "Reroll Surplus";
|
|
414
|
+
}, {
|
|
415
|
+
readonly key: "RerollGlut";
|
|
416
|
+
readonly label: "Reroll Glut";
|
|
417
|
+
}, {
|
|
418
|
+
readonly key: "CrystalBall";
|
|
419
|
+
readonly label: "Crystal Ball";
|
|
420
|
+
}, {
|
|
421
|
+
readonly key: "OmenGlobe";
|
|
422
|
+
readonly label: "Omen Globe";
|
|
423
|
+
}, {
|
|
424
|
+
readonly key: "Telescope";
|
|
425
|
+
readonly label: "Telescope";
|
|
426
|
+
}, {
|
|
427
|
+
readonly key: "Observatory";
|
|
428
|
+
readonly label: "Observatory";
|
|
429
|
+
}, {
|
|
430
|
+
readonly key: "Grabber";
|
|
431
|
+
readonly label: "Grabber";
|
|
432
|
+
}, {
|
|
433
|
+
readonly key: "NachoTong";
|
|
434
|
+
readonly label: "Nacho Tong";
|
|
435
|
+
}, {
|
|
436
|
+
readonly key: "Wasteful";
|
|
437
|
+
readonly label: "Wasteful";
|
|
438
|
+
}, {
|
|
439
|
+
readonly key: "Recyclomancy";
|
|
440
|
+
readonly label: "Recyclomancy";
|
|
441
|
+
}, {
|
|
442
|
+
readonly key: "TarotMerchant";
|
|
443
|
+
readonly label: "Tarot Merchant";
|
|
444
|
+
}, {
|
|
445
|
+
readonly key: "TarotTycoon";
|
|
446
|
+
readonly label: "Tarot Tycoon";
|
|
447
|
+
}, {
|
|
448
|
+
readonly key: "PlanetMerchant";
|
|
449
|
+
readonly label: "Planet Merchant";
|
|
450
|
+
}, {
|
|
451
|
+
readonly key: "PlanetTycoon";
|
|
452
|
+
readonly label: "Planet Tycoon";
|
|
453
|
+
}, {
|
|
454
|
+
readonly key: "SeedMoney";
|
|
455
|
+
readonly label: "Seed Money";
|
|
456
|
+
}, {
|
|
457
|
+
readonly key: "MoneyTree";
|
|
458
|
+
readonly label: "Money Tree";
|
|
459
|
+
}, {
|
|
460
|
+
readonly key: "Blank";
|
|
461
|
+
readonly label: "Blank";
|
|
462
|
+
}, {
|
|
463
|
+
readonly key: "Antimatter";
|
|
464
|
+
readonly label: "Antimatter";
|
|
465
|
+
}, {
|
|
466
|
+
readonly key: "MagicTrick";
|
|
467
|
+
readonly label: "Magic Trick";
|
|
468
|
+
}, {
|
|
469
|
+
readonly key: "Illusion";
|
|
470
|
+
readonly label: "Illusion";
|
|
471
|
+
}, {
|
|
472
|
+
readonly key: "Hieroglyph";
|
|
473
|
+
readonly label: "Hieroglyph";
|
|
474
|
+
}, {
|
|
475
|
+
readonly key: "Petroglyph";
|
|
476
|
+
readonly label: "Petroglyph";
|
|
477
|
+
}, {
|
|
478
|
+
readonly key: "DirectorsCut";
|
|
479
|
+
readonly label: "Director's Cut";
|
|
480
|
+
}, {
|
|
481
|
+
readonly key: "Retcon";
|
|
482
|
+
readonly label: "Retcon";
|
|
483
|
+
}, {
|
|
484
|
+
readonly key: "PaintBrush";
|
|
485
|
+
readonly label: "Paint Brush";
|
|
486
|
+
}, {
|
|
487
|
+
readonly key: "Palette";
|
|
488
|
+
readonly label: "Palette";
|
|
489
|
+
}];
|
|
490
|
+
readonly tags: readonly [{
|
|
491
|
+
readonly key: "UncommonTag";
|
|
492
|
+
readonly label: "Uncommon Tag";
|
|
493
|
+
}, {
|
|
494
|
+
readonly key: "RareTag";
|
|
495
|
+
readonly label: "Rare Tag";
|
|
496
|
+
}, {
|
|
497
|
+
readonly key: "NegativeTag";
|
|
498
|
+
readonly label: "Negative Tag";
|
|
499
|
+
}, {
|
|
500
|
+
readonly key: "FoilTag";
|
|
501
|
+
readonly label: "Foil Tag";
|
|
502
|
+
}, {
|
|
503
|
+
readonly key: "HolographicTag";
|
|
504
|
+
readonly label: "Holographic Tag";
|
|
505
|
+
}, {
|
|
506
|
+
readonly key: "PolychromeTag";
|
|
507
|
+
readonly label: "Polychrome Tag";
|
|
508
|
+
}, {
|
|
509
|
+
readonly key: "InvestmentTag";
|
|
510
|
+
readonly label: "Investment Tag";
|
|
511
|
+
}, {
|
|
512
|
+
readonly key: "VoucherTag";
|
|
513
|
+
readonly label: "Voucher Tag";
|
|
514
|
+
}, {
|
|
515
|
+
readonly key: "BossTag";
|
|
516
|
+
readonly label: "Boss Tag";
|
|
517
|
+
}, {
|
|
518
|
+
readonly key: "StandardTag";
|
|
519
|
+
readonly label: "Standard Tag";
|
|
520
|
+
}, {
|
|
521
|
+
readonly key: "CharmTag";
|
|
522
|
+
readonly label: "Charm Tag";
|
|
523
|
+
}, {
|
|
524
|
+
readonly key: "MeteorTag";
|
|
525
|
+
readonly label: "Meteor Tag";
|
|
526
|
+
}, {
|
|
527
|
+
readonly key: "BuffoonTag";
|
|
528
|
+
readonly label: "Buffoon Tag";
|
|
529
|
+
}, {
|
|
530
|
+
readonly key: "HandyTag";
|
|
531
|
+
readonly label: "Handy Tag";
|
|
532
|
+
}, {
|
|
533
|
+
readonly key: "GarbageTag";
|
|
534
|
+
readonly label: "Garbage Tag";
|
|
535
|
+
}, {
|
|
536
|
+
readonly key: "EtherealTag";
|
|
537
|
+
readonly label: "Ethereal Tag";
|
|
538
|
+
}, {
|
|
539
|
+
readonly key: "CouponTag";
|
|
540
|
+
readonly label: "Coupon Tag";
|
|
541
|
+
}, {
|
|
542
|
+
readonly key: "DoubleTag";
|
|
543
|
+
readonly label: "Double Tag";
|
|
544
|
+
}, {
|
|
545
|
+
readonly key: "JuggleTag";
|
|
546
|
+
readonly label: "Juggle Tag";
|
|
547
|
+
}, {
|
|
548
|
+
readonly key: "D6Tag";
|
|
549
|
+
readonly label: "D6 Tag";
|
|
550
|
+
}, {
|
|
551
|
+
readonly key: "TopupTag";
|
|
552
|
+
readonly label: "Top-up Tag";
|
|
553
|
+
}, {
|
|
554
|
+
readonly key: "SpeedTag";
|
|
555
|
+
readonly label: "Speed Tag";
|
|
556
|
+
}, {
|
|
557
|
+
readonly key: "OrbitalTag";
|
|
558
|
+
readonly label: "Orbital Tag";
|
|
559
|
+
}, {
|
|
560
|
+
readonly key: "EconomyTag";
|
|
561
|
+
readonly label: "Economy Tag";
|
|
562
|
+
}];
|
|
563
|
+
readonly boosterPacks: readonly [{
|
|
564
|
+
readonly key: "Arcana";
|
|
565
|
+
readonly label: "Arcana Pack";
|
|
566
|
+
}, {
|
|
567
|
+
readonly key: "JumboArcana";
|
|
568
|
+
readonly label: "Jumbo Arcana Pack";
|
|
569
|
+
}, {
|
|
570
|
+
readonly key: "MegaArcana";
|
|
571
|
+
readonly label: "Mega Arcana Pack";
|
|
572
|
+
}, {
|
|
573
|
+
readonly key: "Celestial";
|
|
574
|
+
readonly label: "Celestial Pack";
|
|
575
|
+
}, {
|
|
576
|
+
readonly key: "JumboCelestial";
|
|
577
|
+
readonly label: "Jumbo Celestial Pack";
|
|
578
|
+
}, {
|
|
579
|
+
readonly key: "MegaCelestial";
|
|
580
|
+
readonly label: "Mega Celestial Pack";
|
|
581
|
+
}, {
|
|
582
|
+
readonly key: "Standard";
|
|
583
|
+
readonly label: "Standard Pack";
|
|
584
|
+
}, {
|
|
585
|
+
readonly key: "JumboStandard";
|
|
586
|
+
readonly label: "Jumbo Standard Pack";
|
|
587
|
+
}, {
|
|
588
|
+
readonly key: "MegaStandard";
|
|
589
|
+
readonly label: "Mega Standard Pack";
|
|
590
|
+
}, {
|
|
591
|
+
readonly key: "Buffoon";
|
|
592
|
+
readonly label: "Buffoon Pack";
|
|
593
|
+
}, {
|
|
594
|
+
readonly key: "JumboBuffoon";
|
|
595
|
+
readonly label: "Jumbo Buffoon Pack";
|
|
596
|
+
}, {
|
|
597
|
+
readonly key: "MegaBuffoon";
|
|
598
|
+
readonly label: "Mega Buffoon Pack";
|
|
599
|
+
}, {
|
|
600
|
+
readonly key: "Spectral";
|
|
601
|
+
readonly label: "Spectral Pack";
|
|
602
|
+
}, {
|
|
603
|
+
readonly key: "JumboSpectral";
|
|
604
|
+
readonly label: "Jumbo Spectral Pack";
|
|
605
|
+
}, {
|
|
606
|
+
readonly key: "MegaSpectral";
|
|
607
|
+
readonly label: "Mega Spectral Pack";
|
|
608
|
+
}];
|
|
609
|
+
};
|
|
610
|
+
export type MotelyDisplaySchema = typeof MOTELY_DISPLAY_SCHEMA;
|
|
611
|
+
export type MotelyBossKey = EntryKey<typeof BOSS_ENTRIES>;
|
|
612
|
+
export type MotelyVoucherKey = EntryKey<typeof VOUCHER_ENTRIES>;
|
|
613
|
+
export type MotelyTagKey = EntryKey<typeof TAG_ENTRIES>;
|
|
614
|
+
export type MotelyBoosterPackKey = EntryKey<typeof BOOSTER_PACK_ENTRIES>;
|
|
615
|
+
export declare function motelyBossDisplayNameFromKey(key: string): string;
|
|
616
|
+
export declare function motelyVoucherDisplayNameFromKey(key: string): string;
|
|
617
|
+
export declare function motelyTagDisplayNameFromKey(key: string): string;
|
|
618
|
+
export declare function motelyBoosterPackDisplayNameFromKey(key: string): string;
|
|
619
|
+
export declare function motelyItemDisplayNameFromKey(key: string): string;
|
|
620
|
+
export declare function motelyBossDisplayName(value: number): string;
|
|
621
|
+
export declare function motelyVoucherDisplayName(value: number): string;
|
|
622
|
+
export declare function motelyTagDisplayName(value: number): string;
|
|
623
|
+
export declare function motelyBoosterPackDisplayName(value: number): string;
|
|
624
|
+
export declare function motelyItemDisplayNameFromValue(value: number): string;
|
|
625
|
+
export declare function motelyBossKeyFromDisplayName(label: string): MotelyBossKey | null;
|
|
626
|
+
export declare function motelyVoucherKeyFromDisplayName(label: string): MotelyVoucherKey | null;
|
|
627
|
+
export declare function motelyTagKeyFromDisplayName(label: string): MotelyTagKey | null;
|
|
628
|
+
export declare function motelyBoosterPackKeyFromDisplayName(label: string): MotelyBoosterPackKey | null;
|
|
629
|
+
export {};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Motely } from "motely-wasm";
|
|
2
|
+
import { getItemDisplayName } from "./utils/itemUtils.js";
|
|
3
|
+
const BOSS_ENTRIES = [
|
|
4
|
+
{ key: "AmberAcorn", label: "Amber Acorn" },
|
|
5
|
+
{ key: "CeruleanBell", label: "Cerulean Bell" },
|
|
6
|
+
{ key: "CrimsonHeart", label: "Crimson Heart" },
|
|
7
|
+
{ key: "VerdantLeaf", label: "Verdant Leaf" },
|
|
8
|
+
{ key: "VioletVessel", label: "Violet Vessel" },
|
|
9
|
+
{ key: "TheArm", label: "The Arm" },
|
|
10
|
+
{ key: "TheClub", label: "The Club" },
|
|
11
|
+
{ key: "TheEye", label: "The Eye" },
|
|
12
|
+
{ key: "TheFish", label: "The Fish" },
|
|
13
|
+
{ key: "TheFlint", label: "The Flint" },
|
|
14
|
+
{ key: "TheGoad", label: "The Goad" },
|
|
15
|
+
{ key: "TheHead", label: "The Head" },
|
|
16
|
+
{ key: "TheHook", label: "The Hook" },
|
|
17
|
+
{ key: "TheHouse", label: "The House" },
|
|
18
|
+
{ key: "TheManacle", label: "The Manacle" },
|
|
19
|
+
{ key: "TheMark", label: "The Mark" },
|
|
20
|
+
{ key: "TheMouth", label: "The Mouth" },
|
|
21
|
+
{ key: "TheNeedle", label: "The Needle" },
|
|
22
|
+
{ key: "TheOx", label: "The Ox" },
|
|
23
|
+
{ key: "ThePillar", label: "The Pillar" },
|
|
24
|
+
{ key: "ThePlant", label: "The Plant" },
|
|
25
|
+
{ key: "ThePsychic", label: "The Psychic" },
|
|
26
|
+
{ key: "TheSerpent", label: "The Serpent" },
|
|
27
|
+
{ key: "TheTooth", label: "The Tooth" },
|
|
28
|
+
{ key: "TheWall", label: "The Wall" },
|
|
29
|
+
{ key: "TheWater", label: "The Water" },
|
|
30
|
+
{ key: "TheWheel", label: "The Wheel" },
|
|
31
|
+
{ key: "TheWindow", label: "The Window" },
|
|
32
|
+
];
|
|
33
|
+
const VOUCHER_ENTRIES = [
|
|
34
|
+
{ key: "Overstock", label: "Overstock" },
|
|
35
|
+
{ key: "OverstockPlus", label: "Overstock Plus" },
|
|
36
|
+
{ key: "ClearanceSale", label: "Clearance Sale" },
|
|
37
|
+
{ key: "Liquidation", label: "Liquidation" },
|
|
38
|
+
{ key: "Hone", label: "Hone" },
|
|
39
|
+
{ key: "GlowUp", label: "Glow Up" },
|
|
40
|
+
{ key: "RerollSurplus", label: "Reroll Surplus" },
|
|
41
|
+
{ key: "RerollGlut", label: "Reroll Glut" },
|
|
42
|
+
{ key: "CrystalBall", label: "Crystal Ball" },
|
|
43
|
+
{ key: "OmenGlobe", label: "Omen Globe" },
|
|
44
|
+
{ key: "Telescope", label: "Telescope" },
|
|
45
|
+
{ key: "Observatory", label: "Observatory" },
|
|
46
|
+
{ key: "Grabber", label: "Grabber" },
|
|
47
|
+
{ key: "NachoTong", label: "Nacho Tong" },
|
|
48
|
+
{ key: "Wasteful", label: "Wasteful" },
|
|
49
|
+
{ key: "Recyclomancy", label: "Recyclomancy" },
|
|
50
|
+
{ key: "TarotMerchant", label: "Tarot Merchant" },
|
|
51
|
+
{ key: "TarotTycoon", label: "Tarot Tycoon" },
|
|
52
|
+
{ key: "PlanetMerchant", label: "Planet Merchant" },
|
|
53
|
+
{ key: "PlanetTycoon", label: "Planet Tycoon" },
|
|
54
|
+
{ key: "SeedMoney", label: "Seed Money" },
|
|
55
|
+
{ key: "MoneyTree", label: "Money Tree" },
|
|
56
|
+
{ key: "Blank", label: "Blank" },
|
|
57
|
+
{ key: "Antimatter", label: "Antimatter" },
|
|
58
|
+
{ key: "MagicTrick", label: "Magic Trick" },
|
|
59
|
+
{ key: "Illusion", label: "Illusion" },
|
|
60
|
+
{ key: "Hieroglyph", label: "Hieroglyph" },
|
|
61
|
+
{ key: "Petroglyph", label: "Petroglyph" },
|
|
62
|
+
{ key: "DirectorsCut", label: "Director's Cut" },
|
|
63
|
+
{ key: "Retcon", label: "Retcon" },
|
|
64
|
+
{ key: "PaintBrush", label: "Paint Brush" },
|
|
65
|
+
{ key: "Palette", label: "Palette" },
|
|
66
|
+
];
|
|
67
|
+
const TAG_ENTRIES = [
|
|
68
|
+
{ key: "UncommonTag", label: "Uncommon Tag" },
|
|
69
|
+
{ key: "RareTag", label: "Rare Tag" },
|
|
70
|
+
{ key: "NegativeTag", label: "Negative Tag" },
|
|
71
|
+
{ key: "FoilTag", label: "Foil Tag" },
|
|
72
|
+
{ key: "HolographicTag", label: "Holographic Tag" },
|
|
73
|
+
{ key: "PolychromeTag", label: "Polychrome Tag" },
|
|
74
|
+
{ key: "InvestmentTag", label: "Investment Tag" },
|
|
75
|
+
{ key: "VoucherTag", label: "Voucher Tag" },
|
|
76
|
+
{ key: "BossTag", label: "Boss Tag" },
|
|
77
|
+
{ key: "StandardTag", label: "Standard Tag" },
|
|
78
|
+
{ key: "CharmTag", label: "Charm Tag" },
|
|
79
|
+
{ key: "MeteorTag", label: "Meteor Tag" },
|
|
80
|
+
{ key: "BuffoonTag", label: "Buffoon Tag" },
|
|
81
|
+
{ key: "HandyTag", label: "Handy Tag" },
|
|
82
|
+
{ key: "GarbageTag", label: "Garbage Tag" },
|
|
83
|
+
{ key: "EtherealTag", label: "Ethereal Tag" },
|
|
84
|
+
{ key: "CouponTag", label: "Coupon Tag" },
|
|
85
|
+
{ key: "DoubleTag", label: "Double Tag" },
|
|
86
|
+
{ key: "JuggleTag", label: "Juggle Tag" },
|
|
87
|
+
{ key: "D6Tag", label: "D6 Tag" },
|
|
88
|
+
{ key: "TopupTag", label: "Top-up Tag" },
|
|
89
|
+
{ key: "SpeedTag", label: "Speed Tag" },
|
|
90
|
+
{ key: "OrbitalTag", label: "Orbital Tag" },
|
|
91
|
+
{ key: "EconomyTag", label: "Economy Tag" },
|
|
92
|
+
];
|
|
93
|
+
const BOOSTER_PACK_ENTRIES = [
|
|
94
|
+
{ key: "Arcana", label: "Arcana Pack" },
|
|
95
|
+
{ key: "JumboArcana", label: "Jumbo Arcana Pack" },
|
|
96
|
+
{ key: "MegaArcana", label: "Mega Arcana Pack" },
|
|
97
|
+
{ key: "Celestial", label: "Celestial Pack" },
|
|
98
|
+
{ key: "JumboCelestial", label: "Jumbo Celestial Pack" },
|
|
99
|
+
{ key: "MegaCelestial", label: "Mega Celestial Pack" },
|
|
100
|
+
{ key: "Standard", label: "Standard Pack" },
|
|
101
|
+
{ key: "JumboStandard", label: "Jumbo Standard Pack" },
|
|
102
|
+
{ key: "MegaStandard", label: "Mega Standard Pack" },
|
|
103
|
+
{ key: "Buffoon", label: "Buffoon Pack" },
|
|
104
|
+
{ key: "JumboBuffoon", label: "Jumbo Buffoon Pack" },
|
|
105
|
+
{ key: "MegaBuffoon", label: "Mega Buffoon Pack" },
|
|
106
|
+
{ key: "Spectral", label: "Spectral Pack" },
|
|
107
|
+
{ key: "JumboSpectral", label: "Jumbo Spectral Pack" },
|
|
108
|
+
{ key: "MegaSpectral", label: "Mega Spectral Pack" },
|
|
109
|
+
];
|
|
110
|
+
const BOSS_VALUE_MASK = 0xff;
|
|
111
|
+
const ITEM_VALUE_MASK = 0xffff;
|
|
112
|
+
export const MOTELY_DISPLAY_SCHEMA = {
|
|
113
|
+
bosses: BOSS_ENTRIES,
|
|
114
|
+
vouchers: VOUCHER_ENTRIES,
|
|
115
|
+
tags: TAG_ENTRIES,
|
|
116
|
+
boosterPacks: BOOSTER_PACK_ENTRIES,
|
|
117
|
+
};
|
|
118
|
+
function createLabelLookup(entries) {
|
|
119
|
+
return {
|
|
120
|
+
keyToLabel: new Map(entries.map((entry) => [entry.key, entry.label])),
|
|
121
|
+
labelToKey: new Map(entries.map((entry) => [entry.label, entry.key])),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const bossLookup = createLabelLookup(BOSS_ENTRIES);
|
|
125
|
+
const voucherLookup = createLabelLookup(VOUCHER_ENTRIES);
|
|
126
|
+
const tagLookup = createLabelLookup(TAG_ENTRIES);
|
|
127
|
+
const boosterPackLookup = createLabelLookup(BOOSTER_PACK_ENTRIES);
|
|
128
|
+
function spaceSplit(value) {
|
|
129
|
+
return value.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
|
|
130
|
+
}
|
|
131
|
+
function displayNameFromKey(lookup, key, fallback) {
|
|
132
|
+
return lookup.keyToLabel.get(key) ?? fallback;
|
|
133
|
+
}
|
|
134
|
+
function keyFromDisplayName(lookup, label) {
|
|
135
|
+
return lookup.labelToKey.get(label) ?? null;
|
|
136
|
+
}
|
|
137
|
+
function runtimeEnumKey(enumObject, value) {
|
|
138
|
+
const key = enumObject[String(value)];
|
|
139
|
+
return typeof key === "string" && key.length > 0 ? key : null;
|
|
140
|
+
}
|
|
141
|
+
export function motelyBossDisplayNameFromKey(key) {
|
|
142
|
+
return displayNameFromKey(bossLookup, key, spaceSplit(key));
|
|
143
|
+
}
|
|
144
|
+
export function motelyVoucherDisplayNameFromKey(key) {
|
|
145
|
+
return displayNameFromKey(voucherLookup, key, spaceSplit(key));
|
|
146
|
+
}
|
|
147
|
+
export function motelyTagDisplayNameFromKey(key) {
|
|
148
|
+
return displayNameFromKey(tagLookup, key, spaceSplit(key));
|
|
149
|
+
}
|
|
150
|
+
export function motelyBoosterPackDisplayNameFromKey(key) {
|
|
151
|
+
return displayNameFromKey(boosterPackLookup, key, `${spaceSplit(key)} Pack`);
|
|
152
|
+
}
|
|
153
|
+
export function motelyItemDisplayNameFromKey(key) {
|
|
154
|
+
return getItemDisplayName(key);
|
|
155
|
+
}
|
|
156
|
+
export function motelyBossDisplayName(value) {
|
|
157
|
+
const key = runtimeEnumKey(Motely.MotelyBossBlind, value & BOSS_VALUE_MASK);
|
|
158
|
+
return key === null ? `boss#${value}` : motelyBossDisplayNameFromKey(key);
|
|
159
|
+
}
|
|
160
|
+
export function motelyVoucherDisplayName(value) {
|
|
161
|
+
const key = runtimeEnumKey(Motely.MotelyVoucher, value);
|
|
162
|
+
return key === null ? `voucher#${value}` : motelyVoucherDisplayNameFromKey(key);
|
|
163
|
+
}
|
|
164
|
+
export function motelyTagDisplayName(value) {
|
|
165
|
+
const key = runtimeEnumKey(Motely.MotelyTag, value);
|
|
166
|
+
return key === null ? `tag#${value}` : motelyTagDisplayNameFromKey(key);
|
|
167
|
+
}
|
|
168
|
+
export function motelyBoosterPackDisplayName(value) {
|
|
169
|
+
const key = runtimeEnumKey(Motely.MotelyBoosterPack, value);
|
|
170
|
+
return key === null ? `pack#${value}` : motelyBoosterPackDisplayNameFromKey(key);
|
|
171
|
+
}
|
|
172
|
+
export function motelyItemDisplayNameFromValue(value) {
|
|
173
|
+
const key = runtimeEnumKey(Motely.MotelyItemType, value & ITEM_VALUE_MASK);
|
|
174
|
+
return key === null ? `item#${value}` : motelyItemDisplayNameFromKey(key);
|
|
175
|
+
}
|
|
176
|
+
export function motelyBossKeyFromDisplayName(label) {
|
|
177
|
+
return keyFromDisplayName(bossLookup, label);
|
|
178
|
+
}
|
|
179
|
+
export function motelyVoucherKeyFromDisplayName(label) {
|
|
180
|
+
return keyFromDisplayName(voucherLookup, label);
|
|
181
|
+
}
|
|
182
|
+
export function motelyTagKeyFromDisplayName(label) {
|
|
183
|
+
return keyFromDisplayName(tagLookup, label);
|
|
184
|
+
}
|
|
185
|
+
export function motelyBoosterPackKeyFromDisplayName(label) {
|
|
186
|
+
return keyFromDisplayName(boosterPackLookup, label);
|
|
187
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jaml-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Balatro rendering components, sprite metadata, and optional Motely helpers for React apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"author": "pifreak",
|
|
61
61
|
"license": "MIT",
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"motely-wasm": "^10.2.0",
|
|
63
|
+
"motely-wasm": "^10.2.0 || ^11.0.0",
|
|
64
64
|
"react": "^18.2.0 || ^19.0.0",
|
|
65
65
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
66
66
|
},
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/react": "^19.2.14",
|
|
74
74
|
"@types/react-dom": "^19.2.3",
|
|
75
|
-
"motely-wasm": "^
|
|
75
|
+
"motely-wasm": "^11.3.2",
|
|
76
76
|
"react": "^19.2.4",
|
|
77
77
|
"react-dom": "^19.2.4",
|
|
78
78
|
"typescript": "^5.9.3"
|