jaml-ui 4.0.1 → 4.1.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.
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { MotelyJamlyzerSeedResult } from 'motely-wasm';
3
+ import { ParsedJamlClause } from '../lib/jaml/parseClauses.js';
4
+ export interface JamlyzerBulkProps {
5
+ results: MotelyJamlyzerSeedResult[];
6
+ /** Raw JAML text; used to derive clause identities if `clauses` is not provided. */
7
+ jamlText?: string;
8
+ /** Pre-parsed clauses (alternative to `jamlText`). */
9
+ clauses?: ParsedJamlClause[];
10
+ /** Per-seed per-should-clause tally values, in JAML order. */
11
+ tallies?: (number[] | Int32Array)[];
12
+ /** Optional deck/stake applied to every seed in the bulk view. */
13
+ deck?: number;
14
+ stake?: number;
15
+ }
16
+ export declare function JamlyzerBulk({ results, jamlText, clauses: clausesProp, tallies, deck, stake }: JamlyzerBulkProps): React.JSX.Element;
@@ -1,9 +1,19 @@
1
1
  import { default as React } from 'react';
2
2
  import { MotelyJamlyzerSeedResult, MotelyDeck, MotelyStake } from 'motely-wasm';
3
+ import { ParsedJamlClause } from '../lib/jaml/parseClauses.js';
3
4
  export interface JamlyzerViewProps {
4
5
  result: MotelyJamlyzerSeedResult;
5
6
  deck?: MotelyDeck;
6
7
  stake?: MotelyStake;
8
+ /** @deprecated Ante rail is now driven by the returned `antes` data, including ante 0. */
7
9
  maxAnte?: number;
10
+ /** Raw JAML text used to derive clause identities for highlighting. */
11
+ jamlText?: string;
12
+ /** Pre-parsed clauses (alternative to `jamlText`). */
13
+ clauses?: ParsedJamlClause[];
14
+ /** Per-should-clause tally values, in JAML order. */
15
+ tallies?: number[] | Int32Array;
16
+ /** Called when the user hovers a clause in the scoreboard. */
17
+ onHoverClause?: (clause: ParsedJamlClause | null) => void;
8
18
  }
9
- export declare function JamlyzerView({ result, deck, stake, maxAnte }: JamlyzerViewProps): React.JSX.Element;
19
+ export declare function JamlyzerView({ result, deck, stake, jamlText, clauses: clausesProp, tallies, onHoverClause }: JamlyzerViewProps): React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export { JamlCardRenderer, type JamlCardRendererProps, } from './render/CanvasRenderer.js';
2
2
  export { JamlGameCard, JamlVoucher, JamlTag, JamlBoss, resolveAnalyzerShopItem, type JamlGameCardProps, type AnalyzerShopItem, type AnalyzerResolvedItem, } from './components/GameCard.js';
3
3
  export { JamlyzerView, type JamlyzerViewProps, } from './components/JamlyzerView.js';
4
+ export { JamlyzerBulk, type JamlyzerBulkProps, } from './components/JamlyzerBulk.js';
5
+ export { parseJamlClauses, type ParsedJamlClause, type JamlClauseKind, type JamlItemType, type ParsedJamlFilters, matchClauseToItem, matchClauseToAnte, matchMotelyItemToClause, } from './lib/jaml/parseClauses.js';
4
6
  export { DeckSprite, DECK_SPRITE_POS, STAKE_SPRITE_POS, type DeckSpriteProps, } from './components/DeckSprite.js';
5
7
  export { StandardCard } from './components/StandardCard.js';
6
8
  export { CardSuit, CardRank, CardEnhancement, CardSeal, CardEdition, } from './components/cardEnums.js';