@spotlab/range 0.1.0 → 0.2.0

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
@@ -10,8 +10,13 @@ import { initRange, parseRange, formatRange } from "@spotlab/range";
10
10
  await initRange(); // once, at startup; idempotent, returns the same promise
11
11
  const hands = parseRange("AKs:0.5,QQ"); // synchronous from here on
12
12
  formatRange(hands); // "AKs:0.5,QQ"
13
+ formatRange(parseRange("AA,KK,QQ,A5s-A2s:0.5")); // "QQ+,A5s-A2s:0.5"
13
14
  ```
14
15
 
16
+ The grammar (hand tokens, combos, suitless combos, `22+` / `TT-77` shorthand)
17
+ and the canonical rendering rules are documented in the
18
+ [`spotlab-range` README](../../crates/spotlab-range#grammar).
19
+
15
20
  ## Why an explicit `initRange()`
16
21
 
17
22
  Instantiating a wasm module is asynchronous, and top-level `await` is not
package/dist/index.d.ts CHANGED
@@ -4,8 +4,7 @@ export declare const RANKS: readonly string[];
4
4
  export declare const SUITS: readonly string[];
5
5
  export declare const COMBOS: readonly string[];
6
6
  export { SpotlabInputError, RangeInitError, RangeNotInitializedError, } from './errors.js';
7
- export { Hand } from './types.js';
8
- export type { HandFrequency } from './types.js';
7
+ export type { Hand, HandFrequency } from './types.js';
9
8
  /** Parse a range string into its expanded hand-keyed form. */
10
9
  export declare function parseRange(input: string): HandFrequency[];
11
10
  /** Render a hand-keyed range back to its compacted string form. */