motely-wasm 22.0.0 → 22.1.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.
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/dotnet/dotnet.native.js +1 -1
- package/dist/generated/imports.g.mjs +0 -2
- package/dist/generated/modules/motely/enums.g.d.mts +0 -114
- package/dist/generated/modules/motely/enums.g.mjs +0 -218
- package/dist/generated/modules/motely/wasm.g.d.mts +0 -3
- package/dist/generated/modules/motely/wasm.g.mjs +0 -1
- package/dist/generated/modules/motely.g.d.mts +0 -3
- package/dist/generated/resources.g.mjs +1 -1
- package/dist/generated/serializer.g.mjs +0 -140
- package/package.json +4 -2
- package/dist/generated/modules/motely/analysis.g.d.mts +0 -48
- package/dist/generated/modules/motely/analysis.g.mjs +0 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nathanial P. Howard
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# motely-wasm
|
|
2
|
+
|
|
3
|
+
Balatro seed search + per-seed analysis, powered by **JAML** (Jimbo's Ante Markup
|
|
4
|
+
Language). A vectorized SIMD seed-search engine ([Motely](https://github.com/OptimusPi/MotelyJAML))
|
|
5
|
+
compiled to WebAssembly via [Bootsharp](https://github.com/elringus/bootsharp).
|
|
6
|
+
|
|
7
|
+
The whole engine runs **client-side** in the browser (or Node) — no server, no GPU.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install motely-wasm
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Boot
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import bootsharp, { Motely } from "motely-wasm";
|
|
19
|
+
|
|
20
|
+
await bootsharp.boot();
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
WASM has no pthreads, so every `run*` call **blocks** the calling thread until the
|
|
24
|
+
search finishes. For a responsive UI, run it inside a Web Worker.
|
|
25
|
+
|
|
26
|
+
## JAML in, results out
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import bootsharp, { Motely } from "motely-wasm";
|
|
30
|
+
await bootsharp.boot();
|
|
31
|
+
|
|
32
|
+
const config = Motely.fromYaml(`
|
|
33
|
+
name: perkeo
|
|
34
|
+
deck: Red
|
|
35
|
+
stake: White
|
|
36
|
+
must:
|
|
37
|
+
- joker: Perkeo
|
|
38
|
+
max: 1
|
|
39
|
+
sources: [SoulCard]
|
|
40
|
+
`);
|
|
41
|
+
|
|
42
|
+
// Stream results as they're found.
|
|
43
|
+
Motely.onProgress(p => console.log("progress", p));
|
|
44
|
+
Motely.onScoredResult(r => console.log("hit", r.seed, r.score));
|
|
45
|
+
|
|
46
|
+
// Random sample of 1000 seeds; or runSequentialSearch for a bounded batch sweep.
|
|
47
|
+
Motely.runRandomSearch(config, 1000);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## API surface (module `motely/wasm`)
|
|
51
|
+
|
|
52
|
+
- **Parse / inspect:** `fromYaml`, `fromJson`, `jamlToJson`, `jsonToJaml`,
|
|
53
|
+
`explainJaml`, `createPlan`
|
|
54
|
+
- **Search:** `runSequentialSearch`, `runRandomSearch`, `runSeedListSearch`,
|
|
55
|
+
`runAestheticSearch`, `runNativeListSearch`, `runPassthroughListSearch`,
|
|
56
|
+
`nativeFilterNames`
|
|
57
|
+
- **Events:** `onProgress`, `onSeedMatch`, `onScoredResult`, `onFileChanges`
|
|
58
|
+
- **Jimmolate** (per-scored-seed JS predicate, the OG Immolate `filter(seed) => keep?`
|
|
59
|
+
model): set `jimmolatePredicate` then `jimmolateEnabled = true`
|
|
60
|
+
- **File System Access** (Bootsharp.FileSystem): `pickRoot`, `mountRoot`,
|
|
61
|
+
`unmountRoot`, `readTextFile`, `writeTextFile`
|
|
62
|
+
|
|
63
|
+
The generated TypeScript declarations under `dist/generated/modules/` are the
|
|
64
|
+
authoritative shape of every type and member.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT — see [LICENSE](./LICENSE).
|