jaml-ui 0.14.4 → 0.17.0
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/DESIGN.md +9 -11
- package/dist/assets.d.ts +7 -0
- package/dist/assets.js +11 -0
- package/dist/components/AnalyzerExplorer.d.ts +4 -1
- package/dist/components/AnalyzerExplorer.js +14 -48
- package/dist/components/GameCard.js +8 -7
- package/dist/components/JamlAestheticSelector.d.ts +4 -0
- package/dist/components/JamlAestheticSelector.js +6 -19
- package/dist/components/JamlAnalyzerFullscreen.d.ts +7 -1
- package/dist/components/JamlAnalyzerFullscreen.js +18 -47
- package/dist/components/JamlIde.js +12 -24
- package/dist/components/JamlIdeVisual.js +3 -56
- package/dist/components/JamlMapPreview.d.ts +6 -1
- package/dist/components/JamlMapPreview.js +99 -21
- package/dist/components/JamlSeedInput.d.ts +5 -0
- package/dist/components/JamlSeedInput.js +11 -14
- package/dist/components/MotelyVersionBadge.d.ts +1 -3
- package/dist/components/MotelyVersionBadge.js +4 -16
- package/dist/components/jamlMap/JamlMapEditorDemo.d.ts +8 -0
- package/dist/components/jamlMap/JamlMapEditorDemo.js +170 -0
- package/dist/components/jamlMap/JokerPicker.d.ts +7 -0
- package/dist/components/jamlMap/JokerPicker.js +258 -0
- package/dist/components/jamlMap/MysterySlot.d.ts +32 -0
- package/dist/components/jamlMap/MysterySlot.js +109 -0
- package/dist/components/jamlMap/index.d.ts +3 -0
- package/dist/components/jamlMap/index.js +3 -0
- package/dist/core.d.ts +0 -2
- package/dist/core.js +0 -2
- package/dist/decode/motelyItemDecoder.d.ts +10 -23
- package/dist/decode/motelyItemDecoder.js +103 -248
- package/dist/decode/motelySprite.d.ts +19 -0
- package/dist/decode/motelySprite.js +84 -0
- package/dist/hooks/analyzerStreamRegistry.js +30 -82
- package/dist/hooks/useAnalyzer.d.ts +10 -3
- package/dist/hooks/useAnalyzer.js +11 -6
- package/dist/hooks/useIntersectionObserver.d.ts +14 -0
- package/dist/hooks/useIntersectionObserver.js +50 -0
- package/dist/index.d.ts +3 -8
- package/dist/index.js +2 -7
- package/dist/motely.d.ts +2 -1
- package/dist/motely.js +2 -1
- package/dist/motelyDisplay.d.ts +4 -623
- package/dist/motelyDisplay.js +26 -165
- package/dist/r3f/Card3D.d.ts +2 -2
- package/dist/r3f/Card3D.js +13 -46
- package/dist/r3f/JimboBillboard.d.ts +10 -0
- package/dist/r3f/JimboBillboard.js +29 -0
- package/dist/r3f/JimboText3D.d.ts +9 -0
- package/dist/r3f/JimboText3D.js +8 -0
- package/dist/r3f.d.ts +2 -0
- package/dist/r3f.js +2 -0
- package/dist/render/CanvasRenderer.js +7 -171
- package/dist/sprites/spriteData.d.ts +1 -0
- package/dist/sprites/spriteData.js +1 -0
- package/dist/sprites/spriteMapper.d.ts +78 -1
- package/dist/sprites/spriteMapper.js +52 -0
- package/dist/ui/JimboBadge.d.ts +13 -0
- package/dist/ui/JimboBadge.js +8 -0
- package/dist/ui/JimboFloating.d.ts +8 -0
- package/dist/ui/JimboFloating.js +17 -0
- package/dist/ui/JimboToggleList.d.ts +11 -0
- package/dist/ui/JimboToggleList.js +5 -0
- package/dist/ui/codeBlock.js +2 -3
- package/dist/ui/footer.d.ts +4 -0
- package/dist/ui/footer.js +6 -4
- package/dist/ui/hooks.d.ts +89 -0
- package/dist/ui/hooks.js +551 -0
- package/dist/ui/jimboBackground.js +2 -131
- package/dist/ui/jimboCopyRow.d.ts +4 -0
- package/dist/ui/jimboCopyRow.js +5 -22
- package/dist/ui/jimboFilterBar.d.ts +1 -4
- package/dist/ui/jimboFilterBar.js +2 -61
- package/dist/ui/jimboFlankNav.d.ts +1 -2
- package/dist/ui/jimboFlankNav.js +5 -30
- package/dist/ui/jimboTabs.d.ts +1 -5
- package/dist/ui/jimboTabs.js +6 -41
- package/dist/ui/jimboText.d.ts +1 -1
- package/dist/ui/jimboText.js +15 -32
- package/dist/ui/jimboTooltip.d.ts +1 -12
- package/dist/ui/jimboTooltip.js +6 -82
- package/dist/ui/panel.d.ts +3 -1
- package/dist/ui/panel.js +11 -47
- package/dist/ui/showcase.d.ts +4 -0
- package/dist/ui/showcase.js +9 -36
- package/dist/ui/sprites.d.ts +14 -0
- package/dist/ui/sprites.js +54 -13
- package/dist/ui.d.ts +4 -0
- package/dist/ui.js +5 -0
- package/package.json +130 -122
- package/dist/components/JamlSpeedometer.d.ts +0 -11
- package/dist/components/JamlSpeedometer.js +0 -54
- package/dist/decode/packedBalatroItem.d.ts +0 -13
- package/dist/decode/packedBalatroItem.js +0 -26
- package/dist/hooks/loadMotelyWasm.d.ts +0 -7
- package/dist/hooks/loadMotelyWasm.js +0 -16
- package/dist/utils/itemUtils.d.ts +0 -11
- package/dist/utils/itemUtils.js +0 -71
package/dist/utils/itemUtils.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/** Map MotelyItemType enum names to display-friendly strings */
|
|
2
|
-
export function getItemDisplayName(enumKey) {
|
|
3
|
-
// Convert PascalCase to spaced: "GreedyJoker" -> "Greedy Joker"
|
|
4
|
-
// Handle special cases first
|
|
5
|
-
const specials = {
|
|
6
|
-
ChaostheClown: "Chaos the Clown",
|
|
7
|
-
OopsAll6s: "Oops! All 6s",
|
|
8
|
-
EightBall: "8 Ball",
|
|
9
|
-
DNA: "DNA",
|
|
10
|
-
MrBones: "Mr. Bones",
|
|
11
|
-
ToDoList: "To Do List",
|
|
12
|
-
Cloud9: "Cloud 9",
|
|
13
|
-
SockAndBuskin: "Sock and Buskin",
|
|
14
|
-
TheSoul: "The Soul",
|
|
15
|
-
BlackHole: "Black Hole",
|
|
16
|
-
PlanetX: "Planet X",
|
|
17
|
-
};
|
|
18
|
-
if (specials[enumKey])
|
|
19
|
-
return specials[enumKey];
|
|
20
|
-
// Standard cards: C2 = 2 of Clubs, D10 = 10 of Diamonds, etc.
|
|
21
|
-
const suitMap = { C: "♣", D: "♦", H: "♥", S: "♠" };
|
|
22
|
-
const cardMatch = enumKey.match(/^([CDHS])([2-9JQKA]|10)$/);
|
|
23
|
-
if (cardMatch) {
|
|
24
|
-
const [, suit, rank] = cardMatch;
|
|
25
|
-
const rankName = { J: "Jack", Q: "Queen", K: "King", A: "Ace" }[rank] ?? rank;
|
|
26
|
-
return `${rankName} ${suitMap[suit]}`;
|
|
27
|
-
}
|
|
28
|
-
// General PascalCase split
|
|
29
|
-
return enumKey.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
|
|
30
|
-
}
|
|
31
|
-
const TAROT_NAMES = new Set([
|
|
32
|
-
"TheFool", "TheMagician", "TheHighPriestess", "TheEmpress", "TheEmperor",
|
|
33
|
-
"TheHierophant", "TheLovers", "TheChariot", "Justice", "TheHermit",
|
|
34
|
-
"TheWheelOfFortune", "Strength", "TheHangedMan", "Death", "Temperance",
|
|
35
|
-
"TheDevil", "TheTower", "TheStar", "TheMoon", "TheSun", "Judgement", "TheWorld",
|
|
36
|
-
]);
|
|
37
|
-
const PLANET_NAMES = new Set([
|
|
38
|
-
"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn",
|
|
39
|
-
"Uranus", "Neptune", "Pluto", "PlanetX", "Ceres", "Eris",
|
|
40
|
-
]);
|
|
41
|
-
const SPECTRAL_NAMES = new Set([
|
|
42
|
-
"Familiar", "Grim", "Incantation", "Talisman", "Aura", "Wraith",
|
|
43
|
-
"Sigil", "Ouija", "Ectoplasm", "Immolate", "Ankh", "DejaVu",
|
|
44
|
-
"Hex", "Trance", "Medium", "Cryptid", "TheSoul", "BlackHole",
|
|
45
|
-
]);
|
|
46
|
-
export function getItemCategory(enumKey) {
|
|
47
|
-
if (/^[CDHS]([2-9JQKA]|10)$/.test(enumKey))
|
|
48
|
-
return "playing";
|
|
49
|
-
if (TAROT_NAMES.has(enumKey))
|
|
50
|
-
return "tarot";
|
|
51
|
-
if (PLANET_NAMES.has(enumKey))
|
|
52
|
-
return "planet";
|
|
53
|
-
if (SPECTRAL_NAMES.has(enumKey))
|
|
54
|
-
return "spectral";
|
|
55
|
-
// Everything else between the standard cards and Invalid is a joker
|
|
56
|
-
return "joker";
|
|
57
|
-
}
|
|
58
|
-
export const CATEGORY_COLORS = {
|
|
59
|
-
joker: { bg: "bg-purple-900/30", border: "border-purple-500/50", text: "text-purple-200" },
|
|
60
|
-
tarot: { bg: "bg-blue-900/30", border: "border-blue-500/50", text: "text-blue-200" },
|
|
61
|
-
planet: { bg: "bg-amber-900/30", border: "border-amber-500/50", text: "text-amber-200" },
|
|
62
|
-
spectral: { bg: "bg-cyan-900/30", border: "border-cyan-500/50", text: "text-cyan-200" },
|
|
63
|
-
playing: { bg: "bg-neutral-100 dark:bg-neutral-800", border: "border-neutral-300 dark:border-neutral-600", text: "text-neutral-900 dark:text-neutral-100" },
|
|
64
|
-
unknown: { bg: "bg-neutral-900/30", border: "border-neutral-500/50", text: "text-neutral-300" },
|
|
65
|
-
};
|
|
66
|
-
/** Suit color for standard cards */
|
|
67
|
-
export function getSuitColor(enumKey) {
|
|
68
|
-
if (enumKey.startsWith("H") || enumKey.startsWith("D"))
|
|
69
|
-
return "text-red-500";
|
|
70
|
-
return "text-neutral-900 dark:text-neutral-100";
|
|
71
|
-
}
|