motely-wasm 22.2.0 → 22.2.2
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/dist/dotnet/dotnet.native.js +1 -1
- package/dist/generated/instances.g.mjs +34 -0
- package/dist/generated/modules/index.g.d.mts +32 -11
- package/dist/generated/modules/index.g.mjs +43 -7
- package/dist/generated/resources.g.mjs +1 -1
- package/dist/generated/serializer.g.mjs +20 -17
- package/package.json +6 -2
|
@@ -4,6 +4,40 @@ import { instances as $i } from "../instances.mjs";
|
|
|
4
4
|
import $s, { serialize } from "./serializer.g.mjs";
|
|
5
5
|
import * as index from "./modules/index.g.mjs";
|
|
6
6
|
|
|
7
|
+
$i.Motely_Filters_Jaml_JamlConfig = class JS_Export_Motely_Filters_Jaml_JamlConfig {
|
|
8
|
+
constructor(_id) { this._id = _id; }
|
|
9
|
+
get id() { return index.JamlConfig.getId(this._id); }
|
|
10
|
+
set id(value) { index.JamlConfig.setId(this._id, value); }
|
|
11
|
+
get name() { return index.JamlConfig.getName(this._id); }
|
|
12
|
+
set name(value) { index.JamlConfig.setName(this._id, value); }
|
|
13
|
+
get description() { return index.JamlConfig.getDescription(this._id); }
|
|
14
|
+
set description(value) { index.JamlConfig.setDescription(this._id, value); }
|
|
15
|
+
get author() { return index.JamlConfig.getAuthor(this._id); }
|
|
16
|
+
set author(value) { index.JamlConfig.setAuthor(this._id, value); }
|
|
17
|
+
get deck() { return index.JamlConfig.getDeck(this._id); }
|
|
18
|
+
set deck(value) { index.JamlConfig.setDeck(this._id, value); }
|
|
19
|
+
get stake() { return index.JamlConfig.getStake(this._id); }
|
|
20
|
+
set stake(value) { index.JamlConfig.setStake(this._id, value); }
|
|
21
|
+
get seeds() { return index.JamlConfig.getSeeds(this._id); }
|
|
22
|
+
set seeds(value) { index.JamlConfig.setSeeds(this._id, value); }
|
|
23
|
+
get must() { return index.JamlConfig.getMust(this._id); }
|
|
24
|
+
set must(value) { index.JamlConfig.setMust(this._id, value); }
|
|
25
|
+
get should() { return index.JamlConfig.getShould(this._id); }
|
|
26
|
+
set should(value) { index.JamlConfig.setShould(this._id, value); }
|
|
27
|
+
get mustNot() { return index.JamlConfig.getMustNot(this._id); }
|
|
28
|
+
set mustNot(value) { index.JamlConfig.setMustNot(this._id, value); }
|
|
29
|
+
};
|
|
30
|
+
$i.Motely_Filters_Jaml_IJamlClause = class JS_Export_Motely_Filters_Jaml_IJamlClause {
|
|
31
|
+
constructor(_id) { this._id = _id; }
|
|
32
|
+
get label() { return index.IJamlClause.getLabel(this._id); }
|
|
33
|
+
set label(value) { index.IJamlClause.setLabel(this._id, value); }
|
|
34
|
+
get min() { return index.IJamlClause.getMin(this._id); }
|
|
35
|
+
set min(value) { index.IJamlClause.setMin(this._id, value); }
|
|
36
|
+
get max() { return index.IJamlClause.getMax(this._id); }
|
|
37
|
+
set max(value) { index.IJamlClause.setMax(this._id, value); }
|
|
38
|
+
get score() { return index.IJamlClause.getScore(this._id); }
|
|
39
|
+
set score(value) { index.IJamlClause.setScore(this._id, value); }
|
|
40
|
+
};
|
|
7
41
|
$i.Motely_Filters_JamlSearchPlan = class JS_Export_Motely_Filters_JamlSearchPlan {
|
|
8
42
|
constructor(_id) { this._id = _id; }
|
|
9
43
|
get scoreTallyColumnCount() { return index.JamlSearchPlan.getScoreTallyColumnCount(this._id); }
|
|
@@ -4,25 +4,47 @@ export namespace MotelyWasm {
|
|
|
4
4
|
export function getVersion(): string;
|
|
5
5
|
}
|
|
6
6
|
export namespace MotelyJaml {
|
|
7
|
-
export function
|
|
8
|
-
export function
|
|
7
|
+
export function fromYaml(jaml: string): JamlConfig;
|
|
8
|
+
export function fromJson(json: string): JamlConfig;
|
|
9
|
+
export function validate(jaml: string): string | null;
|
|
10
|
+
export function createPlan(jaml: JamlConfig): JamlSearchPlan;
|
|
9
11
|
export function nativeFilterNames(): Array<string>;
|
|
10
12
|
}
|
|
11
13
|
export namespace MotelyJamlyzer {
|
|
12
|
-
export function analyzeSeeds(
|
|
14
|
+
export function analyzeSeeds(jaml: JamlConfig): Array<MotelyJamlyzerSeedResult>;
|
|
15
|
+
export function analyzeSeedsPaged(jaml: JamlConfig, eventRolls: number): Array<MotelyJamlyzerSeedResult>;
|
|
16
|
+
export function resumeSeeds(jaml: JamlConfig, resumeFrom: MotelyJamlyzerStreamStates, eventRolls: number): Array<MotelyJamlyzerSeedResult>;
|
|
13
17
|
}
|
|
14
18
|
export namespace MotelySearch {
|
|
15
19
|
export const onProgress: $bcl.Event<[obj: MotelyProgress]>;
|
|
16
20
|
export const onSeedMatch: $bcl.Event<[obj: string]>;
|
|
17
21
|
export const onScoredResult: $bcl.Event<[obj: MotelyScoredSeedResult]>;
|
|
18
|
-
export function searchList(
|
|
19
|
-
export function searchSequential(
|
|
20
|
-
export function searchRandom(
|
|
22
|
+
export function searchList(jaml: JamlConfig): Promise<void>;
|
|
23
|
+
export function searchSequential(jaml: JamlConfig, startBatchIndex: bigint, endBatchIndex: bigint, batchCharacterCount: number): Promise<void>;
|
|
24
|
+
export function searchRandom(jaml: JamlConfig, count: number): Promise<void>;
|
|
21
25
|
}
|
|
22
26
|
export namespace Jimmolate {
|
|
23
27
|
export let enabled: boolean;
|
|
24
28
|
export let findSeed: (seed: string, deck: MotelyDeck, stake: MotelyStake) => boolean;
|
|
25
29
|
}
|
|
30
|
+
export interface JamlConfig {
|
|
31
|
+
id: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
author?: string;
|
|
35
|
+
deck: MotelyDeck;
|
|
36
|
+
stake: MotelyStake;
|
|
37
|
+
seeds: Array<string>;
|
|
38
|
+
must: Array<IJamlClause>;
|
|
39
|
+
should: Array<IJamlClause>;
|
|
40
|
+
mustNot: Array<IJamlClause>;
|
|
41
|
+
}
|
|
42
|
+
export interface IJamlClause {
|
|
43
|
+
label?: string;
|
|
44
|
+
min: number;
|
|
45
|
+
max?: number;
|
|
46
|
+
score: number;
|
|
47
|
+
}
|
|
26
48
|
export interface JamlSearchPlan {
|
|
27
49
|
scoreTallyColumnCount: number;
|
|
28
50
|
tallyLabels: Array<string>;
|
|
@@ -256,11 +278,10 @@ export type MotelyJamlyzerStreamStates = Readonly<{
|
|
|
256
278
|
theWheel: number;
|
|
257
279
|
misprint: number;
|
|
258
280
|
}>;
|
|
259
|
-
export type MotelyItem = Readonly<{
|
|
260
|
-
value: number;
|
|
261
|
-
}>;
|
|
262
281
|
export type MotelyScoredSeedResult = Readonly<{
|
|
263
|
-
seed: string;
|
|
264
282
|
score: number;
|
|
265
|
-
|
|
283
|
+
seed: string;
|
|
284
|
+
}>;
|
|
285
|
+
export type MotelyItem = Readonly<{
|
|
286
|
+
value: number;
|
|
266
287
|
}>;
|
|
@@ -8,12 +8,16 @@ export const MotelyWasm = {
|
|
|
8
8
|
getVersion: () => exports.Motely_Wasm_MotelyWasm_GetVersion()
|
|
9
9
|
};
|
|
10
10
|
export const MotelyJaml = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
fromYaml: (jaml) => $i.resolve(exports.Motely_Wasm_MotelyJaml_FromYaml(jaml), $i.Motely_Filters_Jaml_JamlConfig),
|
|
12
|
+
fromJson: (json) => $i.resolve(exports.Motely_Wasm_MotelyJaml_FromJson(json), $i.Motely_Filters_Jaml_JamlConfig),
|
|
13
|
+
validate: (jaml) => exports.Motely_Wasm_MotelyJaml_Validate(jaml),
|
|
14
|
+
createPlan: (jaml) => $i.resolve(exports.Motely_Wasm_MotelyJaml_CreatePlan($i.import(jaml)), $i.Motely_Filters_JamlSearchPlan),
|
|
13
15
|
nativeFilterNames: () => deserialize(exports.Motely_Wasm_MotelyJaml_NativeFilterNames(), $s.System_StringArray)
|
|
14
16
|
};
|
|
15
17
|
export const MotelyJamlyzer = {
|
|
16
|
-
analyzeSeeds: (
|
|
18
|
+
analyzeSeeds: (jaml) => deserialize(exports.Motely_Wasm_MotelyJamlyzer_AnalyzeSeeds($i.import(jaml)), $s.Motely_Analysis_MotelyJamlyzerSeedResultArray),
|
|
19
|
+
analyzeSeedsPaged: (jaml, eventRolls) => deserialize(exports.Motely_Wasm_MotelyJamlyzer_AnalyzeSeedsPaged($i.import(jaml), eventRolls), $s.Motely_Analysis_MotelyJamlyzerSeedResultArray),
|
|
20
|
+
resumeSeeds: (jaml, resumeFrom, eventRolls) => deserialize(exports.Motely_Wasm_MotelyJamlyzer_ResumeSeeds($i.import(jaml), serialize(resumeFrom, $s.Motely_Analysis_MotelyJamlyzerStreamStates), eventRolls), $s.Motely_Analysis_MotelyJamlyzerSeedResultArray)
|
|
17
21
|
};
|
|
18
22
|
export const MotelySearch = {
|
|
19
23
|
onProgress: new Event(),
|
|
@@ -21,10 +25,10 @@ export const MotelySearch = {
|
|
|
21
25
|
onSeedMatch: new Event(),
|
|
22
26
|
broadcastOnSeedMatchSerialized: (obj) => MotelySearch.onSeedMatch.broadcast(obj),
|
|
23
27
|
onScoredResult: new Event(),
|
|
24
|
-
broadcastOnScoredResultSerialized: (obj) => MotelySearch.onScoredResult.broadcast(deserialize(obj, $s.
|
|
25
|
-
searchList: (
|
|
26
|
-
searchSequential: (
|
|
27
|
-
searchRandom: (
|
|
28
|
+
broadcastOnScoredResultSerialized: (obj) => MotelySearch.onScoredResult.broadcast(deserialize(obj, $s.Motely_Filters_MotelyScoredSeedResult)),
|
|
29
|
+
searchList: async (jaml) => await exports.Motely_Wasm_MotelySearch_SearchList($i.import(jaml)),
|
|
30
|
+
searchSequential: async (jaml, startBatchIndex, endBatchIndex, batchCharacterCount) => await exports.Motely_Wasm_MotelySearch_SearchSequential($i.import(jaml), startBatchIndex, endBatchIndex, batchCharacterCount),
|
|
31
|
+
searchRandom: async (jaml, count) => await exports.Motely_Wasm_MotelySearch_SearchRandom($i.import(jaml), count)
|
|
28
32
|
};
|
|
29
33
|
export const Jimmolate = {
|
|
30
34
|
get enabled() { return exports.Motely_Wasm_Jimmolate_GetEnabled(); },
|
|
@@ -33,6 +37,38 @@ export const Jimmolate = {
|
|
|
33
37
|
set findSeed(handler) { this.findSeedHandler = handler; this.findSeedSerializedHandler = (seed, deck, stake) => this.findSeedHandler(seed, deserialize(deck, $s.Motely_Enums_MotelyDeck), deserialize(stake, $s.Motely_Enums_MotelyStake)); },
|
|
34
38
|
get findSeedSerialized() { return this.findSeedSerializedHandler; }
|
|
35
39
|
};
|
|
40
|
+
export const JamlConfig = {
|
|
41
|
+
getId(_id) { return exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetId(_id); },
|
|
42
|
+
setId(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetId(_id, value); },
|
|
43
|
+
getName(_id) { return exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetName(_id) ?? undefined; },
|
|
44
|
+
setName(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetName(_id, value); },
|
|
45
|
+
getDescription(_id) { return exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetDescription(_id) ?? undefined; },
|
|
46
|
+
setDescription(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetDescription(_id, value); },
|
|
47
|
+
getAuthor(_id) { return exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetAuthor(_id) ?? undefined; },
|
|
48
|
+
setAuthor(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetAuthor(_id, value); },
|
|
49
|
+
getDeck(_id) { return deserialize(exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetDeck(_id), $s.Motely_Enums_MotelyDeck); },
|
|
50
|
+
setDeck(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetDeck(_id, serialize(value, $s.Motely_Enums_MotelyDeck)); },
|
|
51
|
+
getStake(_id) { return deserialize(exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetStake(_id), $s.Motely_Enums_MotelyStake); },
|
|
52
|
+
setStake(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetStake(_id, serialize(value, $s.Motely_Enums_MotelyStake)); },
|
|
53
|
+
getSeeds(_id) { return deserialize(exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetSeeds(_id), $s.System_Collections_Generic_List_Of_System_String); },
|
|
54
|
+
setSeeds(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetSeeds(_id, serialize(value, $s.System_Collections_Generic_List_Of_System_String)); },
|
|
55
|
+
getMust(_id) { return deserialize(exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetMust(_id), $s.System_Collections_Generic_List_Of_Motely_Filters_Jaml_IJamlClause); },
|
|
56
|
+
setMust(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetMust(_id, serialize(value, $s.System_Collections_Generic_List_Of_Motely_Filters_Jaml_IJamlClause)); },
|
|
57
|
+
getShould(_id) { return deserialize(exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetShould(_id), $s.System_Collections_Generic_List_Of_Motely_Filters_Jaml_IJamlClause); },
|
|
58
|
+
setShould(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetShould(_id, serialize(value, $s.System_Collections_Generic_List_Of_Motely_Filters_Jaml_IJamlClause)); },
|
|
59
|
+
getMustNot(_id) { return deserialize(exports.JS_Export_Motely_Filters_Jaml_JamlConfig_GetMustNot(_id), $s.System_Collections_Generic_List_Of_Motely_Filters_Jaml_IJamlClause); },
|
|
60
|
+
setMustNot(_id, value) { exports.JS_Export_Motely_Filters_Jaml_JamlConfig_SetMustNot(_id, serialize(value, $s.System_Collections_Generic_List_Of_Motely_Filters_Jaml_IJamlClause)); }
|
|
61
|
+
};
|
|
62
|
+
export const IJamlClause = {
|
|
63
|
+
getLabel(_id) { return exports.JS_Export_Motely_Filters_Jaml_IJamlClause_GetLabel(_id) ?? undefined; },
|
|
64
|
+
setLabel(_id, value) { exports.JS_Export_Motely_Filters_Jaml_IJamlClause_SetLabel(_id, value); },
|
|
65
|
+
getMin(_id) { return exports.JS_Export_Motely_Filters_Jaml_IJamlClause_GetMin(_id); },
|
|
66
|
+
setMin(_id, value) { exports.JS_Export_Motely_Filters_Jaml_IJamlClause_SetMin(_id, value); },
|
|
67
|
+
getMax(_id) { return exports.JS_Export_Motely_Filters_Jaml_IJamlClause_GetMax(_id) ?? undefined; },
|
|
68
|
+
setMax(_id, value) { exports.JS_Export_Motely_Filters_Jaml_IJamlClause_SetMax(_id, value); },
|
|
69
|
+
getScore(_id) { return exports.JS_Export_Motely_Filters_Jaml_IJamlClause_GetScore(_id); },
|
|
70
|
+
setScore(_id, value) { exports.JS_Export_Motely_Filters_Jaml_IJamlClause_SetScore(_id, value); }
|
|
71
|
+
};
|
|
36
72
|
export const JamlSearchPlan = {
|
|
37
73
|
getScoreTallyColumnCount(_id) { return exports.JS_Export_Motely_Filters_JamlSearchPlan_GetScoreTallyColumnCount(_id); },
|
|
38
74
|
setScoreTallyColumnCount(_id, value) { exports.JS_Export_Motely_Filters_JamlSearchPlan_SetScoreTallyColumnCount(_id, value); },
|