jaml-ui 0.14.1 → 0.14.2

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/index.d.ts CHANGED
@@ -28,4 +28,3 @@ export { useAnalyzer, type AnalyzerStatus, type AnalyzerLive, type MotelyJsRunSt
28
28
  export { JamlSpeedometer, type JamlSpeedometerProps, } from "./components/JamlSpeedometer.js";
29
29
  export { JamlAestheticSelector, type JamlAestheticSelectorProps, type JamlAestheticOption, } from "./components/JamlAestheticSelector.js";
30
30
  export { JamlSeedInput, type JamlSeedInputProps, } from "./components/JamlSeedInput.js";
31
- export { initJamlFileSystem } from "./utils/fileSystem.js";
package/dist/index.js CHANGED
@@ -29,4 +29,3 @@ export { useAnalyzer, } from "./hooks/useAnalyzer.js";
29
29
  export { JamlSpeedometer, } from "./components/JamlSpeedometer.js";
30
30
  export { JamlAestheticSelector, } from "./components/JamlAestheticSelector.js";
31
31
  export { JamlSeedInput, } from "./components/JamlSeedInput.js";
32
- export { initJamlFileSystem } from "./utils/fileSystem.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaml-ui",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
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",
@@ -109,8 +109,7 @@
109
109
  "@vitejs/plugin-react": "^5.0.4",
110
110
  "monaco-editor": "^0.55.1",
111
111
  "motely-wasm": "link:../JammySeedFinder/src/MotelyJAML/Motely.Wasm/bin/motely-wasm",
112
- "@rewaffle/bootsharp-file-system": "link:D:/extra/bootsharp/dist/packages/file-system",
113
- "react": "^19.2.4",
112
+ "react": "^19.2.4",
114
113
  "react-dom": "^19.2.4",
115
114
  "react-icons": "^5.6.0",
116
115
  "three": "^0.184.0",
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- export type CardSuit = 'Hearts' | 'Diamonds' | 'Clubs' | 'Spades' | 'hearts' | 'diamonds' | 'clubs' | 'spades';
3
- export type CardRank = 'Ace' | 'King' | 'Queen' | 'Jack' | '10' | '9' | '8' | '7' | '6' | '5' | '4' | '3' | '2' | 'A' | 'K' | 'Q' | 'J';
4
- export type CardEnhancement = 'bonus' | 'mult' | 'wild' | 'glass' | 'steel' | 'stone' | 'gold' | 'lucky' | null;
5
- export type CardSeal = 'gold' | 'red' | 'blue' | 'purple' | null;
6
- export type CardEdition = 'Foil' | 'Holographic' | 'Polychrome' | 'Negative' | null;
7
- interface RealPlayingCardProps {
8
- suit: CardSuit;
9
- rank: CardRank;
10
- enhancement?: CardEnhancement;
11
- seal?: CardSeal;
12
- edition?: CardEdition;
13
- className?: string;
14
- size?: number;
15
- style?: React.CSSProperties;
16
- }
17
- export declare function RealPlayingCard({ suit, rank, enhancement, seal, edition, className, size, style }: RealPlayingCardProps): import("react/jsx-runtime").JSX.Element | null;
18
- export {};
@@ -1,80 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { resolveJamlAssetUrl } from '../assets.js';
4
- import { RANK_MAP, SUIT_MAP, ENHANCER_MAP, SEAL_MAP, EDITION_MAP } from '../sprites/spriteData.js';
5
- function cn(...classes) { return classes.filter(Boolean).join(" "); }
6
- const CARD_WIDTH = 71;
7
- const CARD_HEIGHT = 95;
8
- const RANK_ALIAS = { A: 'Ace', K: 'King', Q: 'Queen', J: 'Jack' };
9
- const pascal = (s) => s[0].toUpperCase() + s.slice(1).toLowerCase();
10
- export function RealPlayingCard({ suit, rank, enhancement, seal, edition, className, size = 71, style }) {
11
- const rankKey = RANK_ALIAS[rank] ?? rank;
12
- const suitKey = pascal(suit);
13
- const col = RANK_MAP[rankKey];
14
- const row = SUIT_MAP[suitKey];
15
- if (col === undefined || row === undefined) {
16
- console.warn(`Invalid card: ${rank} of ${suit}`);
17
- return null;
18
- }
19
- const scale = size / CARD_WIDTH;
20
- const finalH = size * (CARD_HEIGHT / CARD_WIDTH);
21
- // Base card position
22
- const bgX = -col * CARD_WIDTH;
23
- const bgY = -row * CARD_HEIGHT;
24
- // Enhancement background (if any) — ENHANCER_MAP is PascalCase, prop is lowercase
25
- const enhPos = enhancement ? ENHANCER_MAP[pascal(enhancement)] ?? { x: 0, y: 0 } : { x: 0, y: 0 };
26
- const enhBgX = -enhPos.x * CARD_WIDTH;
27
- const enhBgY = -enhPos.y * CARD_HEIGHT;
28
- // Seal overlay — SEAL_MAP is keyed by "Gold"/"Red"/"Blue"/"Purple"
29
- const sealPos = seal ? SEAL_MAP[pascal(seal)] ?? null : null;
30
- const sealBgX = sealPos ? -sealPos.x * CARD_WIDTH : 0;
31
- const sealBgY = sealPos ? -sealPos.y * CARD_HEIGHT : 0;
32
- // Edition overlay — EDITION_MAP gives column index on 5-wide editions sheet
33
- const editionCol = edition ? EDITION_MAP[edition] : undefined;
34
- const editionBgX = editionCol !== undefined ? -editionCol * CARD_WIDTH : 0;
35
- const editionBgY = 0;
36
- const isNegative = edition === 'Negative';
37
- const baseFilter = isNegative ? 'invert(0.94)' : 'none';
38
- const enhancersUrl = resolveJamlAssetUrl('enhancers');
39
- const deckUrl = resolveJamlAssetUrl('deck');
40
- const editionsUrl = resolveJamlAssetUrl('editions');
41
- return (_jsxs("div", { className: cn('relative overflow-hidden inline-block select-none', className), style: {
42
- width: size,
43
- height: finalH,
44
- imageRendering: 'pixelated',
45
- ...style
46
- }, title: `${rank} of ${suit}${enhancement ? ` (${enhancement})` : ''}${seal ? ` [${seal} seal]` : ''}${edition ? ` {${edition}}` : ''}`, children: [_jsx("div", { className: "absolute inset-0", style: {
47
- backgroundImage: `url(${enhancersUrl})`,
48
- backgroundPosition: `${enhBgX}px ${enhBgY}px`,
49
- width: CARD_WIDTH,
50
- height: CARD_HEIGHT,
51
- transform: `scale(${scale})`,
52
- transformOrigin: 'top left',
53
- backgroundRepeat: 'no-repeat',
54
- } }), _jsx("div", { className: "absolute inset-0 z-[1]", style: {
55
- backgroundImage: `url(${deckUrl})`,
56
- backgroundPosition: `${bgX}px ${bgY}px`,
57
- width: CARD_WIDTH,
58
- height: CARD_HEIGHT,
59
- transform: `scale(${scale})`,
60
- transformOrigin: 'top left',
61
- backgroundRepeat: 'no-repeat',
62
- filter: baseFilter
63
- } }), edition && edition !== 'Negative' && (_jsx("div", { className: "absolute inset-0 z-[2] mix-blend-screen opacity-60", style: {
64
- backgroundImage: `url(${editionsUrl})`,
65
- backgroundPosition: `${editionBgX}px ${editionBgY}px`,
66
- width: CARD_WIDTH,
67
- height: CARD_HEIGHT,
68
- transform: `scale(${scale})`,
69
- transformOrigin: 'top left',
70
- backgroundRepeat: 'no-repeat',
71
- } })), seal && (_jsx("div", { className: "absolute inset-0 z-[3]", style: {
72
- backgroundImage: `url(${enhancersUrl})`,
73
- backgroundPosition: `${sealBgX}px ${sealBgY}px`,
74
- width: CARD_WIDTH,
75
- height: CARD_HEIGHT,
76
- transform: `scale(${scale})`,
77
- transformOrigin: 'top left',
78
- backgroundRepeat: 'no-repeat',
79
- } })), isNegative && (_jsx("div", { className: "absolute inset-0 z-[4] bg-red-500/10 pointer-events-none mix-blend-overlay" }))] }));
80
- }