jaml-ui 2.1.0 → 2.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.
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface JamlyzerProps {
3
+ /** Full JAML document. Seeds come from the top-level `seeds:` array via Motely. */
4
+ jaml: string;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }
8
+ export declare function Jamlyzer({ jaml, className, style }: JamlyzerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ export type AnalyzerStatus = "idle" | "running" | "done" | "error";
2
+ export declare function useAnalyzer(): {
3
+ score: number | null;
4
+ status: AnalyzerStatus;
5
+ error: string | null;
6
+ analyze: (seed: string, jaml: string) => void;
7
+ clearError: () => void;
8
+ tallyLabels: string[];
9
+ rawAnalysis: Readonly<{
10
+ error?: string;
11
+ deck: import('motely-wasm/motely/enums').MotelyDeck;
12
+ antes: Array<import('motely-wasm/motely/analysis').JamlyzerAnte>;
13
+ rolls: import('motely-wasm/motely/analysis').JamlyzerRolls;
14
+ }> | null;
15
+ };
@@ -1,3 +1,4 @@
1
+ import { JimmolateProbe } from '../lib/motely/runtime.js';
1
2
  export interface SearchResult {
2
3
  seed: string;
3
4
  score: number;
@@ -15,9 +16,9 @@ export interface UseSearchState {
15
16
  tallyLabels: string[];
16
17
  }
17
18
  export declare function useSearch(): {
18
- startAesthetic: (jaml: string, aesthetic: number) => Promise<void>;
19
- startSeedList: (jaml: string, seeds: string[]) => Promise<void>;
20
- startRandom: (jaml: string, count: number) => Promise<void>;
19
+ startAesthetic: (jaml: string, aesthetic: number, predicate?: JimmolateProbe) => Promise<void>;
20
+ startSeedList: (jaml: string, seeds: string[], predicate?: JimmolateProbe) => Promise<void>;
21
+ startRandom: (jaml: string, count: number, predicate?: JimmolateProbe) => Promise<void>;
21
22
  cancel: () => void;
22
23
  reset: () => void;
23
24
  clearError: () => void;
package/dist/index.d.ts CHANGED
@@ -17,11 +17,13 @@ export { extractVisualJamlItems, type JamlPreviewGroups, type JamlPreviewItem, t
17
17
  export { useMotelyStream, type StreamItem, type StreamState } from './hooks/useShopStream.js';
18
18
  export { useSearch, type SearchResult, type SearchMode, type SearchStatus, type UseSearchState, } from './hooks/useSearch.js';
19
19
  export { useSearchPool, type StartPoolOptions, type UseSearchPoolOptions, type UseSearchPoolState, } from './hooks/useSearchPool.js';
20
+ export { useAnalyzer, type AnalyzerStatus, } from './hooks/useAnalyzer.js';
20
21
  export { PaginatedFilterBrowser, type PaginatedFilterBrowserProps, type FilterItem, } from './components/PaginatedFilterBrowser.js';
21
22
  export { JamlAestheticSelector, type JamlAestheticSelectorProps, } from './components/JamlAestheticSelector.js';
22
23
  export { JamlAesthetic } from 'motely-wasm/motely/filters/jaml';
23
24
  export { JamlSeedInput, type JamlSeedInputProps, type JamlSeedInputVariant, } from './components/JamlSeedInput.js';
24
25
  export { normalizeJamlSeed } from './components/jamlSeedUtils.js';
25
26
  export { JamlSeedSpinner, type JamlSeedSpinnerProps, } from './components/JamlSeedSpinner.js';
27
+ export { Jamlyzer, type JamlyzerProps } from './components/Jamlyzer.js';
26
28
  export { RunConfigModal, type RunConfigModalProps } from './components/RunConfigModal.js';
27
29
  export { JamlMapEditor, JokerPicker, MysterySlot, CategoryPicker, type JamlMapEditorProps, type JokerPickerProps, type JokerRarity, type MysterySlotProps, type SlotCategory, type SlotSelection, type CategoryPickerConfig, type CategoryPickerProps, VOUCHER_PICKER_CONFIG, TAG_PICKER_CONFIG, BOSS_PICKER_CONFIG, TAROT_PICKER_CONFIG, PLANET_PICKER_CONFIG, SPECTRAL_PICKER_CONFIG, PACK_PICKER_CONFIG, } from './components/jamlMap/index.js';