motely-wasm 16.0.0 → 16.0.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/README.md CHANGED
@@ -16,7 +16,7 @@ npm install motely-wasm
16
16
  ## Boot & search
17
17
 
18
18
  ```ts
19
- import motely, { MotelyWasm, MotelyWasmEvents } from "motely-wasm";
19
+ import motely, { Motely } from "motely-wasm";
20
20
 
21
21
  await motely.boot();
22
22
 
@@ -33,15 +33,15 @@ should:
33
33
  `;
34
34
 
35
35
  // Events are mutable handler slots — assign your callback, do NOT call .subscribe().
36
- MotelyWasmEvents.notifyResult = (seed, score, tallyColumns) => console.log(seed, score, tallyColumns);
37
- MotelyWasmEvents.notifyProgress = (seedsSearched, matchingSeeds) => { /* … */ };
38
- MotelyWasmEvents.notifyComplete = (status, totalSeedsSearched, matchingSeeds) => { /* … */ };
36
+ Motely.MotelyWasmEvents.notifyResult = (seed, score, tallyColumns) => console.log(seed, score, tallyColumns);
37
+ Motely.MotelyWasmEvents.notifyProgress = (seedsSearched, matchingSeeds) => { /* … */ };
38
+ Motely.MotelyWasmEvents.notifyComplete = (status, totalSeedsSearched, matchingSeeds) => { /* … */ };
39
39
 
40
- const search = MotelyWasm.startRandomSearch(jaml, 10_000);
40
+ const search = Motely.MotelyWasm.startRandomSearch(jaml, 10_000);
41
41
  // later: search.cancel(); search.dispose();
42
42
  ```
43
43
 
44
- > JAML is **not** YAMLit's the Motely filter language. The schema ships at [`motely-wasm/jaml.schema.json`](./jaml.schema.json) and is also returned at runtime by `MotelyWasm.getJamlSchema()`.
44
+ > JAML is the Motely filter language YAML-based, with a strict schema. The schema ships at [`motely-wasm/jaml.schema.json`](./jaml.schema.json) and is also returned at runtime by `Motely.MotelyWasm.getJamlSchema()`.
45
45
 
46
46
  ## Search modes
47
47
 
@@ -53,12 +53,12 @@ const search = MotelyWasm.startRandomSearch(jaml, 10_000);
53
53
  | `startKeywordSearch(jaml, keywordsCsv, paddingChars)` | Match seeds containing keywords (CSV input, padding controls anchoring). |
54
54
  | `startAestheticSearch(jaml, JamlAesthetic)` | Curated themed pools: `Palindrome`, `Psychosis`, `Gross`, `Nsfw`, `Funny`, `Balatro`. |
55
55
 
56
- All searches return an `IMotelyWasmSearch` with `getSnapshot()`, `cancel()`, `waitForCompletion()`, `dispose()`. Hits are streamed through `MotelyWasmEvents.notifyResult`.
56
+ All searches return an `IMotelyWasmSearch` with `getSnapshot()`, `cancel()`, `waitForCompletion()`, `dispose()`. Hits are streamed through `Motely.MotelyWasmEvents.notifyResult`.
57
57
 
58
58
  ## Single-seed inspection
59
59
 
60
60
  ```ts
61
- const ctx = MotelyWasm.createSearchContext("DPADD313", JamlDeck.Red, JamlStake.White);
61
+ const ctx = Motely.MotelyWasm.createSearchContext("DPADD313", Motely.JamlDeck.Red, Motely.JamlStake.White);
62
62
  const boss = ctx.getBossForAnte(1);
63
63
  // + voucher / tag / booster / shop item / joker / tarot / spectral / planet streams,
64
64
  // each with a *Chunk variant for batched pulls.
@@ -71,13 +71,14 @@ For environments where bundling 11 MB of WASM into every deployment artifact is
71
71
 
72
72
  ```ts
73
73
  const mod = await import(
74
- "https://unpkg.com/motely-wasm@16.0.0/index.mjs"
74
+ "https://unpkg.com/motely-wasm@16.0.1/index.mjs"
75
75
  );
76
76
  await mod.default.boot();
77
- const { MotelyWasm, MotelyWasmEvents } = mod;
77
+ const { Motely } = mod;
78
+ // access via Motely.MotelyWasm.startRandomSearch(...) and Motely.MotelyWasmEvents.notifyResult = ...
78
79
  ```
79
80
 
80
- Equivalent jsDelivr URL: `https://cdn.jsdelivr.net/npm/motely-wasm@16.0.0/index.mjs`. **Pin the version** — `@latest` defeats long-term browser caching.
81
+ Equivalent jsDelivr URL: `https://cdn.jsdelivr.net/npm/motely-wasm@16.0.1/index.mjs`. **Pin the version** — `@latest` defeats long-term browser caching.
81
82
 
82
83
  ### Content Security Policy
83
84
 
@@ -91,13 +92,16 @@ connect-src https://unpkg.com https://cdn.jsdelivr.net
91
92
  ## Types
92
93
 
93
94
  ```ts
94
- import type {
95
- IMotelyWasmSearch,
96
- IMotelyWasmSearchContext,
97
- MotelyWasmSearchSnapshot,
98
- MotelyWasmSearchCompletion,
99
- JamlDeck, JamlStake, JamlAesthetic,
100
- } from "motely-wasm";
95
+ import type { Motely } from "motely-wasm";
96
+
97
+ // All types live under the Motely namespace — use them directly. Examples:
98
+ // Motely.IMotelyWasmSearch
99
+ // Motely.IMotelyWasmSearchContext
100
+ // Motely.MotelyWasmSearchSnapshot
101
+ // Motely.MotelyWasmSearchCompletion
102
+ // Motely.JamlDeck
103
+ // Motely.JamlStake
104
+ // Motely.Filters.JamlAesthetic
101
105
  ```
102
106
 
103
107
  The generated `types/bindings.g.d.ts` is the source of truth — Bootsharp emits it from the C# interfaces, so it never drifts from runtime behavior.