jaml-ui 0.22.1 → 0.22.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.
@@ -1,47 +1,47 @@
1
- import motely, { MotelyWasm, MotelyWasmEvents } from "motely-wasm";
1
+ import motely, { Motely } from "motely-wasm";
2
2
  // Boot motely immediately when this module is loaded
3
3
  motely.boot().catch(console.error);
4
4
  let activeSearch = null;
5
5
  self.addEventListener('message', function (e) {
6
6
  const msg = e.data;
7
7
  if (msg.type === 'start') {
8
- const validation = MotelyWasm.validateJaml(msg.jaml);
8
+ const validation = Motely.MotelyWasm.validateJaml(msg.jaml);
9
9
  if (validation !== 'valid') {
10
10
  self.postMessage({ type: 'error', message: validation });
11
11
  return;
12
12
  }
13
13
  function cleanup() {
14
- MotelyWasmEvents.notifyResult = () => { };
15
- MotelyWasmEvents.notifyProgress = () => { };
16
- MotelyWasmEvents.notifyComplete = () => { };
14
+ Motely.MotelyWasmEvents.notifyResult = () => { };
15
+ Motely.MotelyWasmEvents.notifyProgress = () => { };
16
+ Motely.MotelyWasmEvents.notifyComplete = () => { };
17
17
  activeSearch = null;
18
18
  }
19
- MotelyWasmEvents.notifyResult = function (seed, score, tallyColumns) {
19
+ Motely.MotelyWasmEvents.notifyResult = function (seed, score, tallyColumns) {
20
20
  self.postMessage({ type: 'result', seed, score, tallyColumns: Array.from(tallyColumns) });
21
21
  };
22
- MotelyWasmEvents.notifyProgress = function (searched, matching) {
22
+ Motely.MotelyWasmEvents.notifyProgress = function (searched, matching) {
23
23
  self.postMessage({ type: 'progress', searched: searched.toString(), matching: matching.toString() });
24
24
  };
25
- MotelyWasmEvents.notifyComplete = function (status, searched, matched) {
25
+ Motely.MotelyWasmEvents.notifyComplete = function (status, searched, matched) {
26
26
  cleanup();
27
27
  self.postMessage({ type: 'complete', status, searched: searched.toString(), matched: matched.toString() });
28
28
  };
29
29
  try {
30
30
  const mode = msg.mode || 'random';
31
31
  if (mode === 'random') {
32
- activeSearch = MotelyWasm.startRandomSearch(msg.jaml, msg.count);
32
+ activeSearch = Motely.MotelyWasm.startRandomSearch(msg.jaml, msg.count);
33
33
  }
34
34
  else if (mode === 'aesthetic') {
35
- activeSearch = MotelyWasm.startAestheticSearch(msg.jaml, msg.aesthetic);
35
+ activeSearch = Motely.MotelyWasm.startAestheticSearch(msg.jaml, msg.aesthetic);
36
36
  }
37
37
  else if (mode === 'seedList') {
38
- activeSearch = MotelyWasm.startSeedListSearch(msg.jaml, msg.seeds);
38
+ activeSearch = Motely.MotelyWasm.startSeedListSearch(msg.jaml, msg.seeds);
39
39
  }
40
40
  else if (mode === 'keyword') {
41
- activeSearch = MotelyWasm.startKeywordSearch(msg.jaml, msg.keywords, msg.padding || '');
41
+ activeSearch = Motely.MotelyWasm.startKeywordSearch(msg.jaml, msg.keywords, msg.padding || '');
42
42
  }
43
43
  else if (mode === 'sequential') {
44
- activeSearch = MotelyWasm.startSequentialSearch(msg.jaml, msg.batchCharCount, BigInt(msg.startBatch), BigInt(msg.endBatch));
44
+ activeSearch = Motely.MotelyWasm.startSequentialSearch(msg.jaml, msg.batchCharCount, BigInt(msg.startBatch), BigInt(msg.endBatch));
45
45
  }
46
46
  }
47
47
  catch (err) {
@@ -58,7 +58,7 @@ self.addEventListener('message', function (e) {
58
58
  }
59
59
  else if (msg.type === 'get_tally_labels') {
60
60
  try {
61
- const labels = MotelyWasm.getTallyLabels(msg.jaml);
61
+ const labels = Motely.MotelyWasm.getTallyLabels(msg.jaml);
62
62
  self.postMessage({ type: 'tally_labels', labels: Array.from(labels) });
63
63
  }
64
64
  catch (err) {
@@ -1,4 +1,4 @@
1
- import type { MotelyWasm as MotelyWasmType, Motely as MotelyEnumsType } from "motely-wasm";
1
+ import { Motely } from "motely-wasm";
2
2
  import type { AnalyzerAnteView } from "../components/AnalyzerExplorer.js";
3
3
  export type AnalyzerStatus = "idle" | "running" | "done" | "error";
4
4
  export type MotelyJsRunState = {
@@ -12,12 +12,12 @@ export type MotelyJsRunState = {
12
12
  * into their main bundle.
13
13
  */
14
14
  export interface MotelyRuntime {
15
- MotelyWasm: typeof MotelyWasmType;
16
- Motely: typeof MotelyEnumsType;
15
+ MotelyWasm: typeof Motely.MotelyWasm;
16
+ Motely: typeof Motely;
17
17
  }
18
18
  export interface AnalyzerLive {
19
- ctx: ReturnType<typeof MotelyWasmType.createSearchContext>;
20
- Motely: typeof MotelyEnumsType;
19
+ ctx: ReturnType<typeof Motely.MotelyWasm.createSearchContext>;
20
+ Motely: typeof Motely;
21
21
  runStates: Record<number, MotelyJsRunState>;
22
22
  desiredNames: ReadonlySet<string>;
23
23
  seed: string;
@@ -1,10 +1,10 @@
1
- import type { MotelyWasm as MotelyWasmType, Motely as MotelyEnumsType, Analysis } from "motely-wasm";
1
+ import { Motely } from "motely-wasm";
2
2
  export interface MotelyRuntime {
3
- MotelyWasm: typeof MotelyWasmType;
4
- Motely: typeof MotelyEnumsType;
3
+ MotelyWasm: typeof Motely.MotelyWasm;
4
+ Motely: typeof Motely;
5
5
  }
6
6
  export declare function useSeedAnalyzer(runtime: MotelyRuntime | null, seed: string | null): {
7
- data: Analysis.MotelyLegacyTextAnalyzer | null | undefined;
7
+ data: Motely.Analysis.MotelyLegacyTextAnalyzer | null | undefined;
8
8
  loading: boolean;
9
9
  error: string | null;
10
10
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState, useEffect } from 'react';
4
- import motely, { MotelyWasm } from 'motely-wasm';
4
+ import motely, { Motely } from 'motely-wasm';
5
5
  import { cn } from '../../lib/utils';
6
6
  import { DeckSprite } from './DeckSprite';
7
7
  import { Loader2, Sparkles } from 'lucide-react';
@@ -17,7 +17,7 @@ export function AgnosticSeedCard({ seed, deckSlug = 'Erratic', stakeSlug = 'Whit
17
17
  try {
18
18
  await motely.boot();
19
19
  const jaml = `version: 1\nconfig:\n deck: ${deckSlug}\n stake: ${stakeSlug}\n`;
20
- const rawData = MotelyWasm.analyzeJamlSeeds(jaml, [seed]);
20
+ const rawData = Motely.MotelyWasm.analyzeJamlSeeds(jaml, [seed]);
21
21
  if (rawData && rawData.seeds.length > 0) {
22
22
  const seedData = rawData.seeds[0];
23
23
  // The UI needs score and matches. The WASM provides score and tallies, but no matches yet.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from 'react';
4
- import motely, { MotelyWasm } from 'motely-wasm';
4
+ import motely, { Motely } from 'motely-wasm';
5
5
  import { Cpu, Loader2, CheckCircle2, XCircle } from 'lucide-react';
6
6
  import { cn } from '../../lib/utils';
7
7
  export function WasmStatus() {
@@ -16,7 +16,7 @@ export function WasmStatus() {
16
16
  await motely.boot();
17
17
  if (cancelled)
18
18
  return;
19
- setVersion(MotelyWasm.getVersion());
19
+ setVersion(Motely.MotelyWasm.getVersion());
20
20
  setStatus('ready');
21
21
  }
22
22
  catch (err) {
package/jaml.schema.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://www.seedfinder.app/jaml.schema.json",
4
- "version": "14.3.3",
4
+ "version": "14.4.0",
5
5
  "title": "JAML — Jimbo's Ante Markup Language",
6
6
  "description": "JSON Schema for JAML (.jaml), Motely's Balatro seed search language. Use it for validation, completions, and editor tooling.",
7
7
  "type": "object",
package/package.json CHANGED
@@ -1,145 +1,144 @@
1
- {
2
- "name": "jaml-ui",
3
- "version": "0.22.1",
4
- "description": "Balatro rendering components, sprite metadata, and optional Motely helpers for React apps.",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/index.js",
11
- "require": "./dist/index.js",
12
- "types": "./dist/index.d.ts",
13
- "default": "./dist/index.js"
14
- },
15
- "./motely": {
16
- "import": "./dist/motely.js",
17
- "require": "./dist/motely.js",
18
- "types": "./dist/motely.d.ts",
19
- "default": "./dist/motely.js"
20
- },
21
- "./fonts.css": "./fonts.css",
22
- "./jaml.schema.json": "./jaml.schema.json"
23
- },
24
- "sideEffects": [
25
- "./fonts.css"
26
- ],
27
- "files": [
28
- "dist",
29
- "assets/*.png",
30
- "assets/fonts",
31
- "fonts.css",
32
- "dist/ui/jimbo.css",
33
- "jaml.schema.json",
34
- "README.md",
35
- "DESIGN.md",
36
- "LICENSE"
37
- ],
38
- "scripts": {
39
- "build": "tsc --pretty false && node -e \"const fs=require('fs');fs.mkdirSync('dist/ui',{recursive:true});fs.copyFileSync('src/ui/jimbo.css','dist/ui/jimbo.css');fs.copyFileSync('node_modules/motely-wasm/jaml.schema.json','jaml.schema.json');\"",
40
- "dev": "tsc --watch",
41
- "demo": "vite --config demo/vite.config.ts",
42
- "typecheck": "tsc --noEmit --pretty false",
43
- "prepack": "npm run build",
44
- "storybook": "storybook dev -p 6006",
45
- "build-storybook": "storybook build",
46
- "lint": "eslint ."
47
- },
48
- "engines": {
49
- "node": ">=18"
50
- },
51
- "publishConfig": {
52
- "access": "public"
53
- },
54
- "repository": {
55
- "type": "git",
56
- "url": "https://github.com/OptimusPi/jaml-ui"
57
- },
58
- "homepage": "https://github.com/OptimusPi/jaml-ui#readme",
59
- "bugs": {
60
- "url": "https://github.com/OptimusPi/jaml-ui/issues"
61
- },
62
- "keywords": [
63
- "balatro",
64
- "jaml",
65
- "motely",
66
- "seed",
67
- "card",
68
- "sprite",
69
- "ui"
70
- ],
71
- "author": "pifreak",
72
- "license": "MIT",
73
- "peerDependencies": {
74
- "@monaco-editor/react": ">=4.0.0",
75
- "@react-spring/three": ">=9.0.0",
76
- "@react-three/drei": ">=9.0.0",
77
- "@react-three/fiber": ">=8.0.0",
78
- "monaco-editor": ">=0.50.0",
79
- "motely-wasm": "^14.3.3",
80
- "react": "^18.2.0 || ^19.0.0",
81
- "react-dom": "^18.2.0 || ^19.0.0",
82
- "react-icons": ">=5.0.0",
83
- "three": ">=0.150.0"
84
- },
85
- "peerDependenciesMeta": {
86
- "@react-spring/three": {
87
- "optional": true
88
- },
89
- "@react-three/fiber": {
90
- "optional": true
91
- },
92
- "motely-wasm": {
93
- "optional": true
94
- },
95
- "react-icons": {
96
- "optional": true
97
- },
98
- "three": {
99
- "optional": true
100
- },
101
- "@react-three/drei": {
102
- "optional": true
103
- }
104
- },
105
- "devDependencies": {
106
- "@chromatic-com/storybook": "^5.1.2",
107
- "@google/design.md": "^0.1.1",
108
- "@monaco-editor/react": "^4.7.0",
109
- "@react-spring/three": "^10.0.3",
110
- "@react-three/fiber": "^9.6.0",
111
- "@storybook/addon-a11y": "^10.3.6",
112
- "@storybook/addon-docs": "^10.3.6",
113
- "@storybook/addon-onboarding": "^10.3.6",
114
- "@storybook/addon-vitest": "^10.3.6",
115
- "@storybook/react-vite": "^10.3.6",
116
- "@types/node": "^25.6.0",
117
- "@types/react": "^19.2.14",
118
- "@types/react-dom": "^19.2.3",
119
- "@types/three": "^0.184.0",
120
- "@vitejs/plugin-react": "^5.0.4",
121
- "@vitest/browser-playwright": "^4.1.5",
122
- "@vitest/coverage-v8": "^4.1.5",
123
- "monaco-editor": "^0.55.1",
124
- "motely-wasm": "^14.3.3",
125
- "playwright": "^1.59.1",
126
- "react": "^19.2.4",
127
- "react-dom": "^19.2.4",
128
- "react-icons": "^5.6.0",
129
- "storybook": "^10.3.6",
130
- "three": "^0.184.0",
131
- "typescript": "^5.9.3",
132
- "vite": "^8.0.9",
133
- "vitest": "^4.1.5"
134
- },
135
- "dependencies": {
136
- "@json-render/core": "^0.18.0",
137
- "@react-three/drei": ">=9.0.0",
138
- "@types/js-yaml": "^4.0.9",
139
- "clsx": "^2.1.1",
140
- "js-yaml": "^4.1.1",
141
- "lucide-react": "^1.14.0",
142
- "tailwind-merge": "^2.6.1",
143
- "zustand": "^5.0.0"
144
- }
145
- }
1
+ {
2
+ "name": "jaml-ui",
3
+ "version": "0.22.2",
4
+ "description": "Balatro rendering components, sprite metadata, and optional Motely helpers for React apps.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./motely": {
16
+ "import": "./dist/motely.js",
17
+ "require": "./dist/motely.js",
18
+ "types": "./dist/motely.d.ts",
19
+ "default": "./dist/motely.js"
20
+ },
21
+ "./fonts.css": "./fonts.css",
22
+ "./jaml.schema.json": "./jaml.schema.json"
23
+ },
24
+ "sideEffects": [
25
+ "./fonts.css"
26
+ ],
27
+ "files": [
28
+ "dist",
29
+ "assets/*.png",
30
+ "assets/fonts",
31
+ "fonts.css",
32
+ "dist/ui/jimbo.css",
33
+ "jaml.schema.json",
34
+ "README.md",
35
+ "DESIGN.md",
36
+ "LICENSE"
37
+ ],
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://github.com/OptimusPi/jaml-ui"
47
+ },
48
+ "homepage": "https://github.com/OptimusPi/jaml-ui#readme",
49
+ "bugs": {
50
+ "url": "https://github.com/OptimusPi/jaml-ui/issues"
51
+ },
52
+ "keywords": [
53
+ "balatro",
54
+ "jaml",
55
+ "motely",
56
+ "seed",
57
+ "card",
58
+ "sprite",
59
+ "ui"
60
+ ],
61
+ "author": "pifreak",
62
+ "license": "MIT",
63
+ "peerDependencies": {
64
+ "@monaco-editor/react": ">=4.0.0",
65
+ "@react-spring/three": ">=9.0.0",
66
+ "@react-three/drei": ">=9.0.0",
67
+ "@react-three/fiber": ">=8.0.0",
68
+ "monaco-editor": ">=0.50.0",
69
+ "motely-wasm": "^14.4.0",
70
+ "react": "^18.2.0 || ^19.0.0",
71
+ "react-dom": "^18.2.0 || ^19.0.0",
72
+ "react-icons": ">=5.0.0",
73
+ "three": ">=0.150.0"
74
+ },
75
+ "peerDependenciesMeta": {
76
+ "@react-spring/three": {
77
+ "optional": true
78
+ },
79
+ "@react-three/fiber": {
80
+ "optional": true
81
+ },
82
+ "motely-wasm": {
83
+ "optional": true
84
+ },
85
+ "react-icons": {
86
+ "optional": true
87
+ },
88
+ "three": {
89
+ "optional": true
90
+ },
91
+ "@react-three/drei": {
92
+ "optional": true
93
+ }
94
+ },
95
+ "devDependencies": {
96
+ "@chromatic-com/storybook": "^5.1.2",
97
+ "@google/design.md": "^0.1.1",
98
+ "@monaco-editor/react": "^4.7.0",
99
+ "@react-spring/three": "^10.0.3",
100
+ "@react-three/fiber": "^9.6.0",
101
+ "@storybook/addon-a11y": "^10.3.6",
102
+ "@storybook/addon-docs": "^10.3.6",
103
+ "@storybook/addon-onboarding": "^10.3.6",
104
+ "@storybook/addon-vitest": "^10.3.6",
105
+ "@storybook/react-vite": "^10.3.6",
106
+ "@types/node": "^25.6.0",
107
+ "@types/react": "^19.2.14",
108
+ "@types/react-dom": "^19.2.3",
109
+ "@types/three": "^0.184.0",
110
+ "@vitejs/plugin-react": "^5.0.4",
111
+ "@vitest/browser-playwright": "^4.1.5",
112
+ "@vitest/coverage-v8": "^4.1.5",
113
+ "monaco-editor": "^0.55.1",
114
+ "motely-wasm": "^14.4.0",
115
+ "playwright": "^1.59.1",
116
+ "react": "^19.2.4",
117
+ "react-dom": "^19.2.4",
118
+ "react-icons": "^5.6.0",
119
+ "storybook": "^10.3.6",
120
+ "three": "^0.184.0",
121
+ "typescript": "^5.9.3",
122
+ "vite": "^8.0.9",
123
+ "vitest": "^4.1.5"
124
+ },
125
+ "dependencies": {
126
+ "@json-render/core": "^0.18.0",
127
+ "@react-three/drei": ">=9.0.0",
128
+ "@types/js-yaml": "^4.0.9",
129
+ "clsx": "^2.1.1",
130
+ "js-yaml": "^4.1.1",
131
+ "lucide-react": "^1.14.0",
132
+ "tailwind-merge": "^2.6.1",
133
+ "zustand": "^5.0.0"
134
+ },
135
+ "scripts": {
136
+ "build": "tsc --pretty false && node -e \"const fs=require('fs');fs.mkdirSync('dist/ui',{recursive:true});fs.copyFileSync('src/ui/jimbo.css','dist/ui/jimbo.css');fs.copyFileSync('node_modules/motely-wasm/jaml.schema.json','jaml.schema.json');\"",
137
+ "dev": "tsc --watch",
138
+ "demo": "vite --config demo/vite.config.ts",
139
+ "typecheck": "tsc --noEmit --pretty false",
140
+ "storybook": "storybook dev -p 6006",
141
+ "build-storybook": "storybook build",
142
+ "lint": "eslint ."
143
+ }
144
+ }