jaml-ui 0.17.0 → 0.17.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.
@@ -0,0 +1,11 @@
1
+ export type JamlSpeedometerStatus = "idle" | "booting" | "running" | "completed" | "cancelled" | "error";
2
+ export interface JamlSpeedometerProps {
3
+ seedsPerSecond: number;
4
+ totalSearched: bigint | number;
5
+ matchingSeeds: bigint | number;
6
+ status: JamlSpeedometerStatus;
7
+ }
8
+ /**
9
+ * Compact live-search stats strip for MCP/app chrome.
10
+ */
11
+ export declare function JamlSpeedometer({ seedsPerSecond, totalSearched, matchingSeeds, status, }: JamlSpeedometerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { JimboColorOption } from "../ui/tokens.js";
4
+ const C = JimboColorOption;
5
+ function formatCount(value) {
6
+ return Number(value).toLocaleString();
7
+ }
8
+ function formatSpeed(value) {
9
+ if (!Number.isFinite(value) || value <= 0)
10
+ return "0/s";
11
+ if (value >= 1_000_000)
12
+ return `${(value / 1_000_000).toFixed(1)}M/s`;
13
+ if (value >= 1_000)
14
+ return `${(value / 1_000).toFixed(1)}K/s`;
15
+ return `${Math.round(value)}/s`;
16
+ }
17
+ /**
18
+ * Compact live-search stats strip for MCP/app chrome.
19
+ */
20
+ export function JamlSpeedometer({ seedsPerSecond, totalSearched, matchingSeeds, status, }) {
21
+ const active = status === "running" || status === "booting";
22
+ const tone = status === "error" ? C.RED : active ? C.GOLD : C.GREY;
23
+ return (_jsxs("div", { style: {
24
+ display: "flex",
25
+ alignItems: "center",
26
+ gap: 8,
27
+ color: tone,
28
+ fontSize: 11,
29
+ fontFamily: "var(--font-sans, m6x11plus), monospace",
30
+ whiteSpace: "nowrap",
31
+ }, children: [_jsx("span", { children: status }), _jsx("span", { children: formatSpeed(seedsPerSecond) }), _jsxs("span", { children: [formatCount(totalSearched), " searched"] }), _jsxs("span", { children: [formatCount(matchingSeeds), " matches"] })] }));
32
+ }
package/dist/index.d.ts CHANGED
@@ -16,6 +16,8 @@ export { CardFan, type CardFanProps } from "./components/CardFan.js";
16
16
  export { RealStandardcard, type CardSuit, type CardRank, type CardEnhancement, type CardSeal, type CardEdition, } from "./components/Standardcard.js";
17
17
  export { DeckSprite, DECK_SPRITE_POS, STAKE_SPRITE_POS, type DeckSpriteProps, } from "./components/DeckSprite.js";
18
18
  export { MotelyVersionBadge, type MotelyVersionBadgeProps, type MotelyCapabilities, } from "./components/MotelyVersionBadge.js";
19
+ export { JamlSpeedometer, type JamlSpeedometerProps, type JamlSpeedometerStatus, } from "./components/JamlSpeedometer.js";
20
+ export { Showcase, type ShowcaseFilter, type ShowcaseLiveStats, type ShowcaseProps, type ShowcaseRecentFind, } from "./ui/showcase.js";
19
21
  export { extractVisualJamlItems, type JamlPreviewGroups, type JamlPreviewItem, type JamlPreviewSection, type JamlPreviewVisualType, } from "./utils/jamlMapPreview.js";
20
22
  export { useMotelyStream, type StreamItem, type StreamState } from "./hooks/useShopStream.js";
21
23
  export { useSearch, type SearchResult, type SearchStatus, type UseSearchState, } from "./hooks/useSearch.js";
package/dist/index.js CHANGED
@@ -17,6 +17,8 @@ export { CardFan } from "./components/CardFan.js";
17
17
  export { RealStandardcard, } from "./components/Standardcard.js";
18
18
  export { DeckSprite, DECK_SPRITE_POS, STAKE_SPRITE_POS, } from "./components/DeckSprite.js";
19
19
  export { MotelyVersionBadge, } from "./components/MotelyVersionBadge.js";
20
+ export { JamlSpeedometer, } from "./components/JamlSpeedometer.js";
21
+ export { Showcase, } from "./ui/showcase.js";
20
22
  export { extractVisualJamlItems, } from "./utils/jamlMapPreview.js";
21
23
  export { useMotelyStream } from "./hooks/useShopStream.js";
22
24
  export { useSearch, } from "./hooks/useSearch.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaml-ui",
3
- "version": "0.17.0",
3
+ "version": "0.17.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",
@@ -116,7 +116,7 @@
116
116
  "@types/three": "^0.184.0",
117
117
  "@vitejs/plugin-react": "^5.0.4",
118
118
  "monaco-editor": "^0.55.1",
119
- "motely-wasm": "^14.3.1",
119
+ "motely-wasm": "^14.2.41",
120
120
  "react": "^19.2.4",
121
121
  "react-dom": "^19.2.4",
122
122
  "react-icons": "^5.6.0",