ms-toollib 1.4.19-alpha → 1.5.2-alpha
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/ms_toollib.d.ts +90 -15
- package/ms_toollib.js +641 -368
- package/ms_toollib_bg.wasm +0 -0
- package/package.json +1 -1
package/ms_toollib.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
export function cal_op(js_board: any): number;
|
|
5
|
-
export function cal_probability_onboard(js_board: any, mine_num: number): any;
|
|
6
|
-
export function laymine(row: number, column: number, mine_num: number, x0: number, y0: number): any;
|
|
7
|
-
export function laymine_op(row: number, column: number, mine_num: number, x0: number, y0: number): any;
|
|
8
|
-
export function laymine_solvable(row: number, column: number, mine_num: number, x0: number, y0: number, max_times: number): any;
|
|
9
|
-
export function is_solvable(js_board: any, x0: number, y0: number): boolean;
|
|
10
|
-
export function valid_time_period(software: string): TimePeriod;
|
|
3
|
+
|
|
11
4
|
export class AvfVideo {
|
|
12
5
|
/**
|
|
13
6
|
** Return copy of self without private attributes.
|
|
@@ -18,8 +11,9 @@ export class AvfVideo {
|
|
|
18
11
|
*/
|
|
19
12
|
toString(): string;
|
|
20
13
|
free(): void;
|
|
14
|
+
[Symbol.dispose](): void;
|
|
21
15
|
constructor(data: Uint8Array, file_name: string);
|
|
22
|
-
|
|
16
|
+
parse(): void;
|
|
23
17
|
analyse(): void;
|
|
24
18
|
is_valid(): number;
|
|
25
19
|
readonly raw_data: Uint8Array;
|
|
@@ -97,8 +91,10 @@ export class AvfVideo {
|
|
|
97
91
|
readonly pix_size: number;
|
|
98
92
|
set current_time(value: number);
|
|
99
93
|
}
|
|
94
|
+
|
|
100
95
|
export class Board {
|
|
101
96
|
free(): void;
|
|
97
|
+
[Symbol.dispose](): void;
|
|
102
98
|
constructor(board: any);
|
|
103
99
|
readonly bbbv: number;
|
|
104
100
|
readonly op: number;
|
|
@@ -113,12 +109,38 @@ export class Board {
|
|
|
113
109
|
readonly cell7: number;
|
|
114
110
|
readonly cell8: number;
|
|
115
111
|
}
|
|
112
|
+
|
|
113
|
+
export class BoardEvent {
|
|
114
|
+
free(): void;
|
|
115
|
+
[Symbol.dispose](): void;
|
|
116
|
+
constructor(board: string, row_id: number, column_id: number);
|
|
117
|
+
readonly board: string;
|
|
118
|
+
readonly row_id: number;
|
|
119
|
+
readonly column_id: number;
|
|
120
|
+
}
|
|
121
|
+
|
|
116
122
|
export class CursorPos {
|
|
117
123
|
private constructor();
|
|
118
124
|
free(): void;
|
|
125
|
+
[Symbol.dispose](): void;
|
|
119
126
|
x: number;
|
|
120
127
|
y: number;
|
|
121
128
|
}
|
|
129
|
+
|
|
130
|
+
export class Event {
|
|
131
|
+
private constructor();
|
|
132
|
+
free(): void;
|
|
133
|
+
[Symbol.dispose](): void;
|
|
134
|
+
is_mouse(): boolean;
|
|
135
|
+
is_game_state(): boolean;
|
|
136
|
+
is_board(): boolean;
|
|
137
|
+
is_index(): boolean;
|
|
138
|
+
unwrap_mouse(): MouseEvent;
|
|
139
|
+
unwrap_board(): BoardEvent;
|
|
140
|
+
unwrap_index(): IndexEvent;
|
|
141
|
+
unwrap_game_state(): GameStateEvent;
|
|
142
|
+
}
|
|
143
|
+
|
|
122
144
|
export class EvfVideo {
|
|
123
145
|
/**
|
|
124
146
|
** Return copy of self without private attributes.
|
|
@@ -129,8 +151,9 @@ export class EvfVideo {
|
|
|
129
151
|
*/
|
|
130
152
|
toString(): string;
|
|
131
153
|
free(): void;
|
|
154
|
+
[Symbol.dispose](): void;
|
|
132
155
|
constructor(data: Uint8Array, file_name: string);
|
|
133
|
-
|
|
156
|
+
parse(): void;
|
|
134
157
|
analyse(): void;
|
|
135
158
|
is_valid(): number;
|
|
136
159
|
readonly raw_data: Uint8Array;
|
|
@@ -208,8 +231,10 @@ export class EvfVideo {
|
|
|
208
231
|
readonly pix_size: number;
|
|
209
232
|
set current_time(value: number);
|
|
210
233
|
}
|
|
234
|
+
|
|
211
235
|
export class GameBoard {
|
|
212
236
|
free(): void;
|
|
237
|
+
[Symbol.dispose](): void;
|
|
213
238
|
constructor(mine_num: number);
|
|
214
239
|
game_board: any;
|
|
215
240
|
readonly poss: any;
|
|
@@ -218,9 +243,26 @@ export class GameBoard {
|
|
|
218
243
|
readonly enum_not_mine: any;
|
|
219
244
|
readonly enum_is_mine: any;
|
|
220
245
|
}
|
|
246
|
+
|
|
247
|
+
export class GameStateEvent {
|
|
248
|
+
free(): void;
|
|
249
|
+
[Symbol.dispose](): void;
|
|
250
|
+
constructor(game_state: string);
|
|
251
|
+
readonly game_state: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export class IndexEvent {
|
|
255
|
+
free(): void;
|
|
256
|
+
[Symbol.dispose](): void;
|
|
257
|
+
constructor(key: string, value: any);
|
|
258
|
+
readonly key: string;
|
|
259
|
+
readonly value: any;
|
|
260
|
+
}
|
|
261
|
+
|
|
221
262
|
export class KeyDynamicParams {
|
|
222
263
|
private constructor();
|
|
223
264
|
free(): void;
|
|
265
|
+
[Symbol.dispose](): void;
|
|
224
266
|
readonly left: number;
|
|
225
267
|
readonly right: number;
|
|
226
268
|
readonly double: number;
|
|
@@ -232,8 +274,10 @@ export class KeyDynamicParams {
|
|
|
232
274
|
readonly op_solved: number;
|
|
233
275
|
readonly isl_solved: number;
|
|
234
276
|
}
|
|
277
|
+
|
|
235
278
|
export class MinesweeperBoard {
|
|
236
279
|
free(): void;
|
|
280
|
+
[Symbol.dispose](): void;
|
|
237
281
|
constructor(board: any);
|
|
238
282
|
step(e: string, x: number, y: number): void;
|
|
239
283
|
step_flow(js_operation: any): void;
|
|
@@ -253,6 +297,16 @@ export class MinesweeperBoard {
|
|
|
253
297
|
readonly game_board_state: number;
|
|
254
298
|
readonly mouse_state: number;
|
|
255
299
|
}
|
|
300
|
+
|
|
301
|
+
export class MouseEvent {
|
|
302
|
+
free(): void;
|
|
303
|
+
[Symbol.dispose](): void;
|
|
304
|
+
constructor(mouse: string, x: number, y: number);
|
|
305
|
+
readonly mouse: string;
|
|
306
|
+
readonly x: number;
|
|
307
|
+
readonly y: number;
|
|
308
|
+
}
|
|
309
|
+
|
|
256
310
|
export class MvfVideo {
|
|
257
311
|
/**
|
|
258
312
|
** Return copy of self without private attributes.
|
|
@@ -263,8 +317,9 @@ export class MvfVideo {
|
|
|
263
317
|
*/
|
|
264
318
|
toString(): string;
|
|
265
319
|
free(): void;
|
|
320
|
+
[Symbol.dispose](): void;
|
|
266
321
|
constructor(data: Uint8Array, file_name: string);
|
|
267
|
-
|
|
322
|
+
parse(): void;
|
|
268
323
|
analyse(): void;
|
|
269
324
|
is_valid(): number;
|
|
270
325
|
readonly raw_data: Uint8Array;
|
|
@@ -342,6 +397,7 @@ export class MvfVideo {
|
|
|
342
397
|
readonly pix_size: number;
|
|
343
398
|
set current_time(value: number);
|
|
344
399
|
}
|
|
400
|
+
|
|
345
401
|
export class RmvVideo {
|
|
346
402
|
/**
|
|
347
403
|
** Return copy of self without private attributes.
|
|
@@ -352,8 +408,9 @@ export class RmvVideo {
|
|
|
352
408
|
*/
|
|
353
409
|
toString(): string;
|
|
354
410
|
free(): void;
|
|
411
|
+
[Symbol.dispose](): void;
|
|
355
412
|
constructor(data: Uint8Array, file_name: string);
|
|
356
|
-
|
|
413
|
+
parse(): void;
|
|
357
414
|
analyse(): void;
|
|
358
415
|
is_valid(): number;
|
|
359
416
|
readonly raw_data: Uint8Array;
|
|
@@ -431,19 +488,21 @@ export class RmvVideo {
|
|
|
431
488
|
readonly pix_size: number;
|
|
432
489
|
set current_time(value: number);
|
|
433
490
|
}
|
|
491
|
+
|
|
434
492
|
export class TimePeriod {
|
|
435
493
|
private constructor();
|
|
436
494
|
free(): void;
|
|
495
|
+
[Symbol.dispose](): void;
|
|
437
496
|
start_time: string;
|
|
438
497
|
end_time: string;
|
|
439
498
|
}
|
|
499
|
+
|
|
440
500
|
export class VideoActionStateRecorder {
|
|
441
501
|
private constructor();
|
|
442
502
|
free(): void;
|
|
503
|
+
[Symbol.dispose](): void;
|
|
443
504
|
readonly time: number;
|
|
444
|
-
readonly
|
|
445
|
-
readonly y: number;
|
|
446
|
-
readonly mouse: string;
|
|
505
|
+
readonly event: Event;
|
|
447
506
|
readonly useful_level: number;
|
|
448
507
|
readonly prior_game_board: GameBoard;
|
|
449
508
|
readonly next_game_board: GameBoard;
|
|
@@ -452,3 +511,19 @@ export class VideoActionStateRecorder {
|
|
|
452
511
|
readonly mouse_state: number;
|
|
453
512
|
readonly key_dynamic_params: KeyDynamicParams;
|
|
454
513
|
}
|
|
514
|
+
|
|
515
|
+
export function cal_bbbv(js_board: any): number;
|
|
516
|
+
|
|
517
|
+
export function cal_op(js_board: any): number;
|
|
518
|
+
|
|
519
|
+
export function cal_probability_onboard(js_board: any, mine_num: number): any;
|
|
520
|
+
|
|
521
|
+
export function is_solvable(js_board: any, x0: number, y0: number): boolean;
|
|
522
|
+
|
|
523
|
+
export function laymine(row: number, column: number, mine_num: number, x0: number, y0: number): any;
|
|
524
|
+
|
|
525
|
+
export function laymine_op(row: number, column: number, mine_num: number, x0: number, y0: number): any;
|
|
526
|
+
|
|
527
|
+
export function laymine_solvable(row: number, column: number, mine_num: number, x0: number, y0: number, max_times: number): any;
|
|
528
|
+
|
|
529
|
+
export function valid_time_period(software: string): TimePeriod;
|