jaml-ui 0.26.3 → 0.26.5
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 +22 -7
- package/dist/assets/searchPoolWorker-CejAnH4a.js +35 -0
- package/dist/assets/searchPoolWorker-CejAnH4a.js.map +1 -0
- package/dist/chunks/motelyItemDecoder-Bg12hhB2.js +248 -0
- package/dist/chunks/motelyItemDecoder-Bg12hhB2.js.map +1 -0
- package/dist/chunks/searchPoolWorker-CTtPOuxF.js +8 -0
- package/dist/chunks/searchPoolWorker-CTtPOuxF.js.map +1 -0
- package/dist/chunks/{ui-BRMCKSX4.js → ui-0liG4zOw.js} +2 -2
- package/dist/chunks/{ui-BRMCKSX4.js.map → ui-0liG4zOw.js.map} +1 -1
- package/dist/components/JamlIde.d.ts +8 -1
- package/dist/components/JamlIdeToolbar.d.ts +3 -1
- package/dist/components/jamlMap/CategoryPicker.d.ts +1 -0
- package/dist/components/jamlMap/JokerPicker.d.ts +1 -0
- package/dist/config.d.ts +7 -0
- package/dist/hooks/searchPoolWorker.d.ts +60 -0
- package/dist/hooks/searchWorker.d.ts +1 -0
- package/dist/hooks/useAnalyzer.d.ts +17 -16
- package/dist/hooks/useJamlLibrary.d.ts +13 -0
- package/dist/hooks/useMotelyRuntime.d.ts +11 -0
- package/dist/hooks/useSearch.d.ts +5 -6
- package/dist/hooks/useSearchPool.d.ts +42 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +3320 -3989
- package/dist/index.js.map +1 -1
- package/dist/lib/hooks/useSeedAnalyzer.d.ts +10 -3
- package/dist/motely.d.ts +3 -1
- package/dist/motely.js +42 -5
- package/dist/motely.js.map +1 -1
- package/dist/motelyBoot.d.ts +13 -0
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui/mascot/SeedMascot.d.ts +1 -1
- package/dist/ui/mascot/index.d.ts +3 -3
- package/dist/ui/radial/RadialBadge.d.ts +1 -1
- package/dist/ui/radial/RadialMenu.d.ts +1 -1
- package/dist/ui/radial/index.d.ts +16 -16
- package/dist/ui.js +1 -1
- package/package.json +18 -13
- package/assets/WeeJokerExampleDAilyGame.png +0 -0
- package/dist/chunks/motelyItemDecoder-HsR2riGq.js +0 -149
- package/dist/chunks/motelyItemDecoder-HsR2riGq.js.map +0 -1
- package/dist/components/JamlAnalyzerFullscreen.d.ts +0 -30
- package/dist/hooks/analyzerStreamRegistry.d.ts +0 -35
|
@@ -20,6 +20,7 @@ export interface CategoryPickerConfig {
|
|
|
20
20
|
export interface CategoryPickerProps {
|
|
21
21
|
config: CategoryPickerConfig;
|
|
22
22
|
onSelect: (selection: SlotSelection) => void;
|
|
23
|
+
onCancel?: () => void;
|
|
23
24
|
}
|
|
24
25
|
export declare function CategoryPicker({ config, onSelect }: CategoryPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
export declare const VOUCHER_PICKER_CONFIG: CategoryPickerConfig;
|
|
@@ -2,5 +2,6 @@ import { SlotSelection } from './MysterySlot.js';
|
|
|
2
2
|
export type JokerRarity = "common" | "uncommon" | "rare" | "legendary";
|
|
3
3
|
export interface JokerPickerProps {
|
|
4
4
|
onSelect: (selection: SlotSelection) => void;
|
|
5
|
+
onCancel?: () => void;
|
|
5
6
|
}
|
|
6
7
|
export declare function JokerPicker({ onSelect }: JokerPickerProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare let jamlAssetBaseUrl: string;
|
|
2
|
+
export declare let motelyEnums: any;
|
|
3
|
+
export declare function setJamlAssetBaseUrl(url: string): void;
|
|
4
|
+
export declare function setMotelyDisplayEnums(motely: any): void;
|
|
5
|
+
export declare function setMotelyDecoderEnums(motely: any): void;
|
|
6
|
+
export declare function getJamlAssetBaseUrl(): string;
|
|
7
|
+
export declare function getMotelyEnums(): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type PoolSearchMode = "random" | "seedlist" | "sequential" | "aesthetic";
|
|
2
|
+
export interface PoolStartMessage {
|
|
3
|
+
type: "start";
|
|
4
|
+
workerIndex: number;
|
|
5
|
+
workerCount: number;
|
|
6
|
+
mode: PoolSearchMode;
|
|
7
|
+
jaml: string;
|
|
8
|
+
count?: number;
|
|
9
|
+
seeds?: string[];
|
|
10
|
+
batchCharacterCount?: number;
|
|
11
|
+
startBatchIndex?: string;
|
|
12
|
+
endBatchIndex?: string;
|
|
13
|
+
aesthetic?: number;
|
|
14
|
+
deck?: number;
|
|
15
|
+
stake?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface PoolStopMessage {
|
|
18
|
+
type: "stop";
|
|
19
|
+
}
|
|
20
|
+
export type PoolInboundMessage = PoolStartMessage | PoolStopMessage;
|
|
21
|
+
export interface PoolReadyMessage {
|
|
22
|
+
type: "ready";
|
|
23
|
+
}
|
|
24
|
+
export interface PoolResultMessage {
|
|
25
|
+
type: "result";
|
|
26
|
+
workerIndex: number;
|
|
27
|
+
seed: string;
|
|
28
|
+
score: number;
|
|
29
|
+
tallyColumns: number[];
|
|
30
|
+
}
|
|
31
|
+
export interface PoolMatchMessage {
|
|
32
|
+
type: "match";
|
|
33
|
+
workerIndex: number;
|
|
34
|
+
seed: string;
|
|
35
|
+
}
|
|
36
|
+
export interface PoolProgressMessage {
|
|
37
|
+
type: "progress";
|
|
38
|
+
workerIndex: number;
|
|
39
|
+
searched: number;
|
|
40
|
+
matching: number;
|
|
41
|
+
percent: number;
|
|
42
|
+
seedsPerMs: number;
|
|
43
|
+
}
|
|
44
|
+
export interface PoolCompleteMessage {
|
|
45
|
+
type: "complete";
|
|
46
|
+
workerIndex: number;
|
|
47
|
+
status: "Completed" | "Cancelled";
|
|
48
|
+
total: number;
|
|
49
|
+
matched: number;
|
|
50
|
+
}
|
|
51
|
+
export interface PoolCancelledMessage {
|
|
52
|
+
type: "cancelled";
|
|
53
|
+
workerIndex: number;
|
|
54
|
+
}
|
|
55
|
+
export interface PoolErrorMessage {
|
|
56
|
+
type: "error";
|
|
57
|
+
workerIndex: number;
|
|
58
|
+
message: string;
|
|
59
|
+
}
|
|
60
|
+
export type PoolOutboundMessage = PoolReadyMessage | PoolResultMessage | PoolMatchMessage | PoolProgressMessage | PoolCompleteMessage | PoolCancelledMessage | PoolErrorMessage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MotelySeedAnalysis } from 'motely-wasm/motely/analysis';
|
|
2
2
|
import { AnalyzerAnteView } from '../components/AnalyzerExplorer.js';
|
|
3
3
|
export type AnalyzerStatus = "idle" | "running" | "done" | "error";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
runStates: Record<number, MotelyJsRunState>;
|
|
12
|
-
desiredNames: ReadonlySet<string>;
|
|
13
|
-
seed: string;
|
|
14
|
-
deck: string;
|
|
15
|
-
stake: string;
|
|
4
|
+
export interface UseAnalyzerState {
|
|
5
|
+
antes: AnalyzerAnteView[];
|
|
6
|
+
score: number | null;
|
|
7
|
+
status: AnalyzerStatus;
|
|
8
|
+
error: string | null;
|
|
9
|
+
tallyLabels: string[];
|
|
10
|
+
rawAnalysis: MotelySeedAnalysis | null;
|
|
16
11
|
}
|
|
17
12
|
export declare function useAnalyzer(): {
|
|
18
13
|
antes: AnalyzerAnteView[];
|
|
14
|
+
score: number | null;
|
|
19
15
|
status: AnalyzerStatus;
|
|
20
16
|
error: string | null;
|
|
21
|
-
analyze: (seed: string,
|
|
17
|
+
analyze: (seed: string, jaml: string) => void;
|
|
22
18
|
clearError: () => void;
|
|
23
|
-
live: AnalyzerLive | null;
|
|
24
|
-
tallyColumns: number[][];
|
|
25
19
|
tallyLabels: string[];
|
|
20
|
+
rawAnalysis: Readonly<{
|
|
21
|
+
error?: string;
|
|
22
|
+
antes: Array<import('motely-wasm/motely/analysis').MotelyAnteAnalysis>;
|
|
23
|
+
deck?: import('motely-wasm/motely').MotelyDeck;
|
|
24
|
+
erraticDeckComposition?: string;
|
|
25
|
+
erraticDeckBreakdown?: string;
|
|
26
|
+
}> | null;
|
|
26
27
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type JamlLibraryStatus = "idle" | "unsupported" | "mounting" | "ready" | "error";
|
|
2
|
+
export interface UseJamlLibraryState {
|
|
3
|
+
status: JamlLibraryStatus;
|
|
4
|
+
rootId: string | null;
|
|
5
|
+
files: string[];
|
|
6
|
+
error: string | null;
|
|
7
|
+
mount: () => Promise<void>;
|
|
8
|
+
unmount: () => Promise<void>;
|
|
9
|
+
loadFile: (uri: string) => Promise<string>;
|
|
10
|
+
saveFile: (uri: string, content: string) => Promise<void>;
|
|
11
|
+
refresh: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useJamlLibrary(): UseJamlLibraryState;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MotelyRuntimeStatus } from '../motelyBoot.js';
|
|
2
|
+
export interface UseMotelyRuntimeState {
|
|
3
|
+
status: MotelyRuntimeStatus;
|
|
4
|
+
ready: boolean;
|
|
5
|
+
error: string | null;
|
|
6
|
+
fsReady: boolean;
|
|
7
|
+
fsError: string | null;
|
|
8
|
+
ensureReady: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useMotelyRuntime(): UseMotelyRuntimeState;
|
|
11
|
+
export declare function useMotelyRuntimeOwner(): void;
|
|
@@ -3,6 +3,7 @@ export interface SearchResult {
|
|
|
3
3
|
score: number;
|
|
4
4
|
tallyColumns?: number[];
|
|
5
5
|
}
|
|
6
|
+
export type SearchMode = "aesthetic" | "seedlist" | "random";
|
|
6
7
|
export type SearchStatus = "idle" | "running" | "completed" | "cancelled" | "error";
|
|
7
8
|
export interface UseSearchState {
|
|
8
9
|
results: SearchResult[];
|
|
@@ -14,14 +15,12 @@ export interface UseSearchState {
|
|
|
14
15
|
tallyLabels: string[];
|
|
15
16
|
}
|
|
16
17
|
export declare function useSearch(): {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
startKeyword: (jaml: string, keywords: string, padding?: string) => void;
|
|
21
|
-
startSequential: (jaml: string, startSeed: string, endSeed?: string) => void;
|
|
18
|
+
startAesthetic: (jaml: string, aesthetic: number) => Promise<void>;
|
|
19
|
+
startSeedList: (jaml: string, seeds: string[]) => Promise<void>;
|
|
20
|
+
startRandom: (jaml: string, count: number) => Promise<void>;
|
|
22
21
|
cancel: () => void;
|
|
22
|
+
reset: () => void;
|
|
23
23
|
clearError: () => void;
|
|
24
|
-
fetchTallyLabels: (jaml: string) => void;
|
|
25
24
|
results: SearchResult[];
|
|
26
25
|
totalSearched: bigint;
|
|
27
26
|
matchingSeeds: bigint;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { JamlAesthetic } from 'motely-wasm/motely/filters';
|
|
2
|
+
import { SearchResult, SearchStatus } from './useSearch.js';
|
|
3
|
+
export interface UseSearchPoolState {
|
|
4
|
+
results: SearchResult[];
|
|
5
|
+
totalSearched: bigint;
|
|
6
|
+
matchingSeeds: bigint;
|
|
7
|
+
status: SearchStatus;
|
|
8
|
+
error: string | null;
|
|
9
|
+
seedsPerSecond: number;
|
|
10
|
+
tallyLabels: string[];
|
|
11
|
+
workerCount: number;
|
|
12
|
+
}
|
|
13
|
+
export interface UseSearchPoolOptions {
|
|
14
|
+
workerCount?: number;
|
|
15
|
+
resultCap?: number;
|
|
16
|
+
terminationGraceMs?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface StartPoolOptions {
|
|
19
|
+
aesthetic?: number;
|
|
20
|
+
seeds?: string[];
|
|
21
|
+
count?: number;
|
|
22
|
+
batchCharacterCount?: number;
|
|
23
|
+
deck?: number;
|
|
24
|
+
stake?: number;
|
|
25
|
+
}
|
|
26
|
+
export declare function useSearchPool(options?: UseSearchPoolOptions): {
|
|
27
|
+
startRandom: (jaml: string, count: number, opts?: StartPoolOptions) => Promise<void>;
|
|
28
|
+
startSeedList: (jaml: string, seeds: string[], opts?: StartPoolOptions) => Promise<void>;
|
|
29
|
+
startSequential: (jaml: string, batchCharacterCount: number, opts?: StartPoolOptions) => Promise<void>;
|
|
30
|
+
startAesthetic: (jaml: string, aesthetic: JamlAesthetic | number, opts?: StartPoolOptions) => Promise<void>;
|
|
31
|
+
cancel: () => void;
|
|
32
|
+
reset: () => void;
|
|
33
|
+
clearError: () => void;
|
|
34
|
+
results: SearchResult[];
|
|
35
|
+
totalSearched: bigint;
|
|
36
|
+
matchingSeeds: bigint;
|
|
37
|
+
status: SearchStatus;
|
|
38
|
+
error: string | null;
|
|
39
|
+
seedsPerSecond: number;
|
|
40
|
+
tallyLabels: string[];
|
|
41
|
+
workerCount: number;
|
|
42
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ export { Layer, type LayerOptions } from './render/Layer.js';
|
|
|
3
3
|
export { JamlCardRenderer, type JamlCardRendererProps } from './render/CanvasRenderer.js';
|
|
4
4
|
export { JamlGameCard, JamlVoucher, JamlTag, JamlBoss, resolveAnalyzerShopItem, type JamlGameCardProps, type AnalyzerShopItem, type AnalyzerResolvedItem, } from './components/GameCard.js';
|
|
5
5
|
export { AnalyzerExplorer, type AnalyzerAnteView, type AnalyzerBadge, type AnalyzerExplorerProps, type AnalyzerFact, type AnalyzerHighlight, type AnalyzerItem, } from './components/AnalyzerExplorer.js';
|
|
6
|
-
export { JamlAnalyzerFullscreen, type JamlAnalyzerFullscreenProps, } from './components/JamlAnalyzerFullscreen.js';
|
|
7
|
-
export { ANALYZER_STREAM_META, DEFAULT_ENABLED_STREAMS, type AnalyzerStreamKey, type AnalyzerStreamMeta, } from './hooks/analyzerStreamRegistry.js';
|
|
8
6
|
export { JamlMapPreview, type JamlMapPreviewProps } from './components/JamlMapPreview.js';
|
|
9
7
|
export { JamlIde, type JamlIdeProps, type JamlIdeSearchResult, type JamlVisualFilter, type JamlVisualClause, type JamlZone, } from './components/JamlIde.js';
|
|
10
8
|
export { JamlCurator } from './components/JamlCurator.js';
|
|
@@ -21,10 +19,14 @@ export { JamlSpeedometer, type JamlSpeedometerProps, type JamlSpeedometerStatus,
|
|
|
21
19
|
export { Showcase, type ShowcaseFilter, type ShowcaseLiveStats, type ShowcaseProps, type ShowcaseRecentFind, } from './ui/showcase.js';
|
|
22
20
|
export { extractVisualJamlItems, type JamlPreviewGroups, type JamlPreviewItem, type JamlPreviewSection, type JamlPreviewVisualType, } from './utils/jamlMapPreview.js';
|
|
23
21
|
export { useMotelyStream, type StreamItem, type StreamState } from './hooks/useShopStream.js';
|
|
24
|
-
export { useSearch, type SearchResult, type SearchStatus, type UseSearchState, } from './hooks/useSearch.js';
|
|
25
|
-
export {
|
|
22
|
+
export { useSearch, type SearchResult, type SearchMode, type SearchStatus, type UseSearchState, } from './hooks/useSearch.js';
|
|
23
|
+
export { useSearchPool, type StartPoolOptions, type UseSearchPoolOptions, type UseSearchPoolState, } from './hooks/useSearchPool.js';
|
|
24
|
+
export { useAnalyzer, type AnalyzerStatus, } from './hooks/useAnalyzer.js';
|
|
25
|
+
export { useJamlLibrary, type JamlLibraryStatus, type UseJamlLibraryState, } from './hooks/useJamlLibrary.js';
|
|
26
|
+
export { useMotelyRuntime, useMotelyRuntimeOwner, type UseMotelyRuntimeState, } from './hooks/useMotelyRuntime.js';
|
|
26
27
|
export { motelyItemRenderCategory } from './decode/motelyItemDecoder.js';
|
|
27
28
|
export { PaginatedFilterBrowser, type PaginatedFilterBrowserProps, type FilterItem, } from './components/PaginatedFilterBrowser.js';
|
|
28
29
|
export { JamlAestheticSelector, type JamlAestheticSelectorProps, type JamlAestheticOption, } from './components/JamlAestheticSelector.js';
|
|
29
30
|
export { JamlSeedInput, type JamlSeedInputProps, } from './components/JamlSeedInput.js';
|
|
31
|
+
export { setJamlAssetBaseUrl, setMotelyDisplayEnums, setMotelyDecoderEnums, getJamlAssetBaseUrl, getMotelyEnums, } from './config.js';
|
|
30
32
|
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';
|