jaml-ui 0.21.3 → 0.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/DESIGN.md +36 -6
  2. package/dist/components/JamlAnalyzerFullscreen.d.ts +1 -1
  3. package/dist/components/JamlAnalyzerFullscreen.js +5 -81
  4. package/dist/components/JamlCurator.js +1 -1
  5. package/dist/components/JamlSpeedometer.d.ts +7 -2
  6. package/dist/components/JamlSpeedometer.js +8 -15
  7. package/dist/components/jamlMap/JamlMapEditor.js +42 -38
  8. package/dist/components/jamlMap/JokerPicker.js +2 -2
  9. package/dist/components/jamlMap/MysterySlot.js +4 -4
  10. package/dist/hooks/useSearch.d.ts +2 -1
  11. package/dist/hooks/useSearch.js +111 -8
  12. package/dist/lib/SpriteMapper.d.ts +10 -0
  13. package/dist/lib/SpriteMapper.js +48 -0
  14. package/dist/lib/cardParser.d.ts +8 -0
  15. package/dist/lib/cardParser.js +65 -0
  16. package/dist/lib/classes/BuyMetaData.d.ts +11 -0
  17. package/dist/lib/classes/BuyMetaData.js +1 -0
  18. package/dist/lib/config.d.ts +13 -0
  19. package/dist/lib/config.js +15 -0
  20. package/dist/lib/const.d.ts +61 -0
  21. package/dist/lib/const.js +521 -0
  22. package/dist/lib/data/constants.d.ts +11 -0
  23. package/dist/lib/data/constants.js +17 -0
  24. package/dist/lib/hooks/useDragScroll.d.ts +4 -0
  25. package/dist/lib/hooks/useDragScroll.js +48 -0
  26. package/dist/lib/hooks/useJamlFilter.d.ts +48 -0
  27. package/dist/lib/hooks/useJamlFilter.js +219 -0
  28. package/dist/lib/hooks/useSeedAnalyzer.d.ts +6 -0
  29. package/dist/lib/hooks/useSeedAnalyzer.js +48 -0
  30. package/dist/lib/jaml/jamlCompletion.d.ts +12 -0
  31. package/dist/lib/jaml/jamlCompletion.js +13 -0
  32. package/dist/lib/jaml/jamlData.d.ts +3 -0
  33. package/dist/lib/jaml/jamlData.js +8 -0
  34. package/dist/lib/jaml/jamlObjectives.d.ts +13 -0
  35. package/dist/lib/jaml/jamlObjectives.js +97 -0
  36. package/dist/lib/jaml/jamlParser.d.ts +14 -0
  37. package/dist/lib/jaml/jamlParser.js +47 -0
  38. package/dist/lib/jaml/jamlPresets.d.ts +8 -0
  39. package/dist/lib/jaml/jamlPresets.js +61 -0
  40. package/dist/lib/jaml/jamlSchema.d.ts +54 -0
  41. package/dist/lib/jaml/jamlSchema.js +91 -0
  42. package/dist/lib/parseDailyRitual.d.ts +45 -0
  43. package/dist/lib/parseDailyRitual.js +69 -0
  44. package/dist/lib/tts/getRevealPos.d.ts +5 -0
  45. package/dist/lib/tts/getRevealPos.js +16 -0
  46. package/dist/lib/tts/splitTtsDisplay.d.ts +19 -0
  47. package/dist/lib/tts/splitTtsDisplay.js +35 -0
  48. package/dist/lib/types.d.ts +121 -0
  49. package/dist/lib/types.js +1 -0
  50. package/dist/lib/utils.d.ts +2 -0
  51. package/dist/lib/utils.js +5 -0
  52. package/dist/ui/JimboIconButton.d.ts +10 -0
  53. package/dist/ui/JimboIconButton.js +28 -0
  54. package/dist/ui/JimboInputModal.d.ts +13 -0
  55. package/dist/ui/JimboInputModal.js +60 -0
  56. package/dist/ui/JimboSelect.d.ts +18 -0
  57. package/dist/ui/JimboSelect.js +43 -0
  58. package/dist/ui/PanelSplitter.d.ts +7 -0
  59. package/dist/ui/PanelSplitter.js +76 -0
  60. package/dist/ui/ide/AgnosticSeedCard.d.ts +19 -0
  61. package/dist/ui/ide/AgnosticSeedCard.js +48 -0
  62. package/dist/ui/ide/DeckSprite.d.ts +1 -0
  63. package/dist/ui/ide/DeckSprite.js +2 -0
  64. package/dist/ui/ide/JamlBuilder.d.ts +1 -0
  65. package/dist/ui/ide/JamlBuilder.js +112 -0
  66. package/dist/ui/ide/JamlEditor.d.ts +7 -0
  67. package/dist/ui/ide/JamlEditor.js +496 -0
  68. package/dist/ui/ide/JamlEditorMonaco.d.ts +8 -0
  69. package/dist/ui/ide/JamlEditorMonaco.js +78 -0
  70. package/dist/ui/ide/WasmStatus.d.ts +1 -0
  71. package/dist/ui/ide/WasmStatus.js +42 -0
  72. package/dist/ui/jimbo.css +336 -31
  73. package/dist/ui/jimboApp.d.ts +12 -0
  74. package/dist/ui/jimboApp.js +15 -0
  75. package/dist/ui/jimboInfoCard.d.ts +31 -0
  76. package/dist/ui/jimboInfoCard.js +26 -0
  77. package/dist/ui/jimboInset.d.ts +9 -0
  78. package/dist/ui/jimboInset.js +9 -0
  79. package/dist/ui/jimboSectionHeader.d.ts +11 -0
  80. package/dist/ui/jimboSectionHeader.js +9 -0
  81. package/dist/ui/jimboStatGrid.d.ts +13 -0
  82. package/dist/ui/jimboStatGrid.js +9 -0
  83. package/dist/ui/jimboWordmark.d.ts +10 -0
  84. package/dist/ui/jimboWordmark.js +9 -0
  85. package/dist/ui/mascot/JammySpeechBox.d.ts +9 -0
  86. package/dist/ui/mascot/JammySpeechBox.js +30 -0
  87. package/dist/ui/mascot/SeedMascot.d.ts +37 -0
  88. package/dist/ui/mascot/SeedMascot.js +17 -0
  89. package/dist/ui/mascot/index.d.ts +3 -0
  90. package/dist/ui/mascot/index.js +3 -0
  91. package/dist/ui/mascot/menuConfig.d.ts +102 -0
  92. package/dist/ui/mascot/menuConfig.js +12 -0
  93. package/dist/ui/panel.d.ts +1 -1
  94. package/dist/ui/panel.js +3 -21
  95. package/dist/ui/radial/RadialBadge.d.ts +17 -0
  96. package/dist/ui/radial/RadialBadge.js +43 -0
  97. package/dist/ui/radial/RadialBreadcrumb.d.ts +12 -0
  98. package/dist/ui/radial/RadialBreadcrumb.js +18 -0
  99. package/dist/ui/radial/RadialButton.d.ts +61 -0
  100. package/dist/ui/radial/RadialButton.js +102 -0
  101. package/dist/ui/radial/RadialMenu.d.ts +38 -0
  102. package/dist/ui/radial/RadialMenu.js +168 -0
  103. package/dist/ui/radial/RadialPill.d.ts +18 -0
  104. package/dist/ui/radial/RadialPill.js +15 -0
  105. package/dist/ui/radial/index.d.ts +16 -0
  106. package/dist/ui/radial/index.js +18 -0
  107. package/dist/ui/radial/radialMenuStore.d.ts +31 -0
  108. package/dist/ui/radial/radialMenuStore.js +122 -0
  109. package/dist/ui/radial/radialMenuViewport.d.ts +6 -0
  110. package/dist/ui/radial/radialMenuViewport.js +59 -0
  111. package/dist/ui/radial/useRadialMenu.d.ts +35 -0
  112. package/dist/ui/radial/useRadialMenu.js +107 -0
  113. package/dist/ui/showcase.d.ts +14 -6
  114. package/dist/ui/showcase.js +13 -21
  115. package/dist/ui/tokens.d.ts +5 -19
  116. package/dist/ui/tokens.js +5 -21
  117. package/dist/ui.d.ts +14 -0
  118. package/dist/ui.js +15 -0
  119. package/package.json +145 -146
@@ -0,0 +1,10 @@
1
+ interface SpritePos {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ export interface SpriteData {
6
+ pos: SpritePos;
7
+ type: 'Jokers' | 'Tarots' | 'Vouchers' | 'Boosters' | 'Enhancers' | 'Editions' | 'BlindChips' | 'Shop' | 'tags';
8
+ }
9
+ export declare function getSpriteData(name: string): SpriteData;
10
+ export {};
@@ -0,0 +1,48 @@
1
+ import { jokers, tarotsAndPlanets, vouchers, boosterPacks, jokerFaces, consumablesFaces, bosses, tags } from './const';
2
+ // Consolidate all item arrays into a single map for O(1) lookup
3
+ const ITEM_MAP = new Map();
4
+ function addToMap(items, type) {
5
+ items.forEach(item => {
6
+ if (item.name && item.pos) {
7
+ const data = { pos: item.pos, type };
8
+ ITEM_MAP.set(item.name, data);
9
+ ITEM_MAP.set(item.name.toLowerCase(), data);
10
+ ITEM_MAP.set(item.name.replace(/ /g, ''), data);
11
+ ITEM_MAP.set(item.name.replace(/ /g, '').toLowerCase(), data);
12
+ }
13
+ });
14
+ }
15
+ // Populate the map with explicit types
16
+ addToMap(jokers, 'Jokers');
17
+ addToMap(tarotsAndPlanets, 'Tarots');
18
+ addToMap(vouchers, 'Vouchers');
19
+ addToMap(boosterPacks, 'Boosters');
20
+ addToMap(bosses, 'BlindChips');
21
+ addToMap(tags, 'tags');
22
+ // Explicit overrides/faces
23
+ addToMap(jokerFaces, 'Jokers');
24
+ addToMap(consumablesFaces, 'Tarots');
25
+ export function getSpriteData(name) {
26
+ // 1. Try stripping common prefixes used by some analyzers (e.g., "Planet | Venus")
27
+ const cleanedName = name.replace(/^(Joker|Tarot|Planet|Voucher|Pack|Edition|Tag) [|:] /i, "").trim();
28
+ // 2. Precise lookup
29
+ if (ITEM_MAP.has(cleanedName))
30
+ return ITEM_MAP.get(cleanedName);
31
+ if (ITEM_MAP.has(name))
32
+ return ITEM_MAP.get(name);
33
+ // 3. Normalized lookups
34
+ const variants = [
35
+ cleanedName.toLowerCase(),
36
+ cleanedName.replace(/ /g, ''),
37
+ cleanedName.replace(/ /g, '').toLowerCase(),
38
+ name.toLowerCase(),
39
+ name.replace(/ /g, ''),
40
+ name.replace(/ /g, '').toLowerCase()
41
+ ];
42
+ for (const v of variants) {
43
+ if (ITEM_MAP.has(v))
44
+ return ITEM_MAP.get(v);
45
+ }
46
+ // Default Fallback
47
+ return { pos: { x: 0, y: 0 }, type: 'Jokers' };
48
+ }
@@ -0,0 +1,8 @@
1
+ export interface ParsedCard {
2
+ rank: string;
3
+ suit: string;
4
+ enhancement: string | null;
5
+ seal: string | null;
6
+ edition: string | null;
7
+ }
8
+ export declare function parseCardToken(item: any): ParsedCard | null;
@@ -0,0 +1,65 @@
1
+ const ENHANCEMENTS = ["Bonus", "Mult", "Wild", "Lucky", "Glass", "Steel", "Stone", "Gold"];
2
+ const SEALS = ["Gold", "Purple", "Red", "Blue"];
3
+ const EDITIONS = ["Foil", "Holographic", "Polychrome", "Negative"];
4
+ const RANKS = ["2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"];
5
+ const SUITS = ["Hearts", "Clubs", "Diamonds", "Spades"];
6
+ // Internal Balatro short codes
7
+ const RANK_MAP = {
8
+ "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "10": "10",
9
+ "T": "10", "J": "Jack", "Q": "Queen", "K": "King", "A": "Ace"
10
+ };
11
+ const SUIT_MAP = {
12
+ "H": "Hearts", "C": "Clubs", "D": "Diamonds", "S": "Spades"
13
+ };
14
+ export function parseCardToken(item) {
15
+ if (!item)
16
+ return null;
17
+ // 1. If it's already an object with rank/suit
18
+ if (typeof item === 'object' && (item.rank || item.base)) {
19
+ let rank = item.rank || item.base?.[2] || item.base?.[0]; // Handle different analyzer versions
20
+ let suit = item.suit || item.base?.[0];
21
+ // Normalize
22
+ rank = RANK_MAP[rank] || rank;
23
+ suit = SUIT_MAP[suit] || suit;
24
+ if (suit && !suit.endsWith('s'))
25
+ suit += 's';
26
+ return {
27
+ rank: rank || "Ace",
28
+ suit: suit || "Spades",
29
+ enhancement: item.enhancement || item.modifier || null,
30
+ seal: item.seal || null,
31
+ edition: item.edition || null
32
+ };
33
+ }
34
+ // 2. If it's a string token
35
+ if (typeof item === 'string') {
36
+ const str = item.trim();
37
+ // Handle rank_suit format e.g. "2_C"
38
+ if (str.includes('_')) {
39
+ const [r, s] = str.split('_');
40
+ const rank = RANK_MAP[r.toUpperCase()] || r;
41
+ const suit = SUIT_MAP[s.toUpperCase()] || s;
42
+ return { rank, suit, enhancement: null, seal: null, edition: null };
43
+ }
44
+ // Handle "Rank of Suit" format
45
+ const parts = str.toLowerCase().split(' ');
46
+ const ofIndex = parts.indexOf('of');
47
+ if (ofIndex > 0 && ofIndex < parts.length - 1) {
48
+ let rank = parts[ofIndex - 1];
49
+ let suit = parts[ofIndex + 1];
50
+ // Normalize
51
+ rank = rank.charAt(0).toUpperCase() + rank.slice(1);
52
+ suit = suit.charAt(0).toUpperCase() + suit.slice(1);
53
+ if (!suit.endsWith('s'))
54
+ suit += 's';
55
+ return {
56
+ rank: RANK_MAP[rank.toUpperCase()] || rank,
57
+ suit: SUIT_MAP[suit.toUpperCase()] || suit,
58
+ enhancement: parts.find(p => ENHANCEMENTS.some(e => e.toLowerCase() === p)) || null,
59
+ seal: parts.find(p => SEALS.some(s => s.toLowerCase() === p)) || null,
60
+ edition: parts.find(p => EDITIONS.some(e => e.toLowerCase() === p)) || null
61
+ };
62
+ }
63
+ }
64
+ return null;
65
+ }
@@ -0,0 +1,11 @@
1
+ export interface BuyMetaData {
2
+ name?: string;
3
+ ante?: number;
4
+ blind?: string;
5
+ card?: {
6
+ type?: string;
7
+ base?: string | string[];
8
+ [key: string]: any;
9
+ };
10
+ [key: string]: any;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare const ritualConfig: {
2
+ title: string;
3
+ tagline: string;
4
+ id: string;
5
+ defaultObjective: string;
6
+ /**
7
+ * The Weepoch (Jan 30, 2026)
8
+ * This is the canonical start date for Day 1.
9
+ */
10
+ epochDate: string;
11
+ readonly epoch: number;
12
+ };
13
+ export declare const EPOCH: number;
@@ -0,0 +1,15 @@
1
+ export const ritualConfig = {
2
+ title: "The Daily Wee",
3
+ tagline: "A curated daily Balatro ritual",
4
+ id: "TheDailyWee",
5
+ defaultObjective: "Wee Joker",
6
+ /**
7
+ * The Weepoch (Jan 30, 2026)
8
+ * This is the canonical start date for Day 1.
9
+ */
10
+ epochDate: "2026-02-02T00:00:00Z",
11
+ get epoch() {
12
+ return new Date(this.epochDate).getTime();
13
+ }
14
+ };
15
+ export const EPOCH = ritualConfig.epoch;
@@ -0,0 +1,61 @@
1
+ import type { ReactNode } from "react";
2
+ import type { BuyMetaData } from "./classes/BuyMetaData.ts";
3
+ export declare const jokers: any;
4
+ export declare const jokerFaces: any;
5
+ export declare const consumablesFaces: any;
6
+ export declare const boosterPacks: any;
7
+ export declare const tarotsAndPlanets: any;
8
+ export declare const tags: any;
9
+ export declare const vouchers: any;
10
+ export declare const bosses: any;
11
+ export declare const editionMap: any;
12
+ export declare const stickerMap: any;
13
+ export declare const options: any;
14
+ export declare const blinds: any;
15
+ export declare const blindsCamelCase: string[];
16
+ export declare const SeedsWithLegendary: Array<string>;
17
+ export declare const popularSeeds: Array<string>;
18
+ export interface AnalyzeOptions {
19
+ showCardSpoilers: boolean;
20
+ buys: {
21
+ [key: string]: BuyMetaData;
22
+ };
23
+ sells: {
24
+ [key: string]: BuyMetaData;
25
+ };
26
+ updates: Array<{
27
+ [key: string]: any;
28
+ }>;
29
+ unlocks: Array<string>;
30
+ events: Array<Event>;
31
+ }
32
+ export interface BuyWrapperProps {
33
+ children: ReactNode;
34
+ bottomOffset?: number;
35
+ topOffset?: number;
36
+ metaData?: BuyMetaData;
37
+ horizontal?: boolean;
38
+ }
39
+ export declare enum LOCATIONS {
40
+ SHOP = "SHOP",
41
+ PACK = "PACK",
42
+ MISC = "MISC",
43
+ VOUCHER = "VOUCHER"
44
+ }
45
+ export declare enum LOCATION_TYPES {
46
+ SHOP = "SHOP",
47
+ PACK = "PACK",
48
+ CARD = "CARD"
49
+ }
50
+ export interface CardEvent {
51
+ name: string;
52
+ ante: number;
53
+ blind: string;
54
+ }
55
+ export declare const EVENT_UNLOCKS: {
56
+ name: string;
57
+ condition: string;
58
+ }[];
59
+ export declare const tagDescriptions: {
60
+ [key: string]: string;
61
+ };