cubing 0.63.3 → 0.63.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 +15 -1
- package/alg/index.d.ts +1 -1
- package/bluetooth/index.d.ts +1 -1
- package/dist/bin/chunks/{chunk-OI3YIXMQ.js → chunk-22VWCGBC.js} +2 -2
- package/dist/bin/order.js +8 -4
- package/dist/bin/order.js.map +2 -2
- package/dist/bin/puzzle-geometry-bin.js +8 -4
- package/dist/bin/puzzle-geometry-bin.js.map +2 -2
- package/dist/bin/scramble.js +8 -4
- package/dist/bin/scramble.js.map +2 -2
- package/dist/bin/svg.js +56 -0
- package/dist/bin/svg.js.map +7 -0
- package/dist/lib/cubing/alg/index.d.ts +2 -84
- package/dist/lib/cubing/alg/index.js +1 -1
- package/dist/lib/cubing/bluetooth/index.d.ts +147 -134
- package/dist/lib/cubing/bluetooth/index.js +29 -5
- package/dist/lib/cubing/bluetooth/index.js.map +2 -2
- package/dist/lib/cubing/chunks/{big-puzzle-orientation-ZVZQJEF5.js → big-puzzle-orientation-ADWIOX6S.js} +2 -2
- package/dist/lib/cubing/chunks/{chunk-RINY3U6G.js → chunk-5ONX3JVC.js} +7 -2
- package/dist/lib/cubing/chunks/{chunk-RINY3U6G.js.map → chunk-5ONX3JVC.js.map} +1 -1
- package/dist/lib/cubing/chunks/{chunk-ROB5TROI.js → chunk-7LXHWXCO.js} +2 -2
- package/dist/lib/cubing/chunks/{chunk-FUHYAW74.js → chunk-A7FK4XKU.js} +49 -63
- package/dist/lib/cubing/chunks/chunk-A7FK4XKU.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-FLK6AZKB.js → chunk-FUAADKXE.js} +7 -7
- package/dist/lib/cubing/chunks/{chunk-FLK6AZKB.js.map → chunk-FUAADKXE.js.map} +2 -2
- package/dist/lib/cubing/chunks/{chunk-E3YLQC45.js → chunk-GHFBZYSV.js} +2 -2
- package/dist/lib/cubing/chunks/chunk-GHFBZYSV.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-FTE3QI5X.js → chunk-H5KMIDAF.js} +42 -47
- package/dist/lib/cubing/chunks/chunk-H5KMIDAF.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-NGW52SHR.js → chunk-MQSQDKWH.js} +3 -3
- package/dist/lib/cubing/chunks/{chunk-O6HEZXGY.js → chunk-N5FJ5YIA.js} +4 -3
- package/dist/lib/cubing/chunks/{chunk-O6HEZXGY.js.map → chunk-N5FJ5YIA.js.map} +1 -1
- package/dist/lib/cubing/chunks/{chunk-ZU7PSGX4.js → chunk-UEUJSZTX.js} +4 -3
- package/dist/lib/cubing/chunks/{chunk-ZU7PSGX4.js.map → chunk-UEUJSZTX.js.map} +1 -1
- package/dist/lib/cubing/chunks/{chunk-44CFF24P.js → chunk-WMKAKGVZ.js} +46 -17
- package/dist/lib/cubing/chunks/chunk-WMKAKGVZ.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-DQGYYYHZ.js → chunk-YR72E7KZ.js} +28 -13
- package/dist/lib/cubing/chunks/chunk-YR72E7KZ.js.map +7 -0
- package/dist/lib/cubing/chunks/{inside-L2JI2BEY.js → inside-LSPIPZY2.js} +53 -25
- package/dist/lib/cubing/chunks/inside-LSPIPZY2.js.map +7 -0
- package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js +132 -0
- package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js.map +7 -0
- package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-XFECDWOF.js → search-dynamic-sgs-side-events-WORUZVF5.js} +6 -5
- package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-CM33KT7L.js → search-dynamic-sgs-unofficial-5JQKPNG2.js} +6 -5
- package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-NANDMURR.js → search-dynamic-solve-4x4x4-KIH4YATU.js} +7 -6
- package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-UZMNOI6U.js → search-dynamic-solve-fto-I5ID5LXD.js} +2 -2
- package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-Y2D3C74Y.js +771 -0
- package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-Y2D3C74Y.js.map +7 -0
- package/dist/lib/cubing/chunks/search-worker-entry.js +7 -6
- package/dist/lib/cubing/chunks/search-worker-entry.js.map +2 -2
- package/dist/lib/cubing/chunks/{twips-YHXBF55O.js → twips-ZNMKGC5U.js} +4 -4
- package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-AP2O4LGG.js +10 -0
- package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-AP2O4LGG.js.map +7 -0
- package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VGZIQ64W.js → twisty-dynamic-3d-4BEQ76PB.js} +22 -7
- package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VGZIQ64W.js.map → twisty-dynamic-3d-4BEQ76PB.js.map} +2 -2
- package/dist/lib/cubing/index-BXHm_6gm.d.ts +2626 -0
- package/dist/lib/cubing/index-Cvk652Bd.d.ts +76 -0
- package/dist/lib/cubing/kpuzzle/index.d.ts +2 -3
- package/dist/lib/cubing/kpuzzle/index.js +2 -2
- package/dist/lib/cubing/notation/index.d.ts +18 -17
- package/dist/lib/cubing/notation/index.js +4 -4
- package/dist/lib/cubing/outside-C2ODxIX_.d.ts +39 -0
- package/dist/lib/cubing/protocol/index.d.ts +14 -14
- package/dist/lib/cubing/protocol/index.js +4 -4
- package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -8
- package/dist/lib/cubing/puzzle-geometry/index.js +33 -1
- package/dist/lib/cubing/puzzle-geometry/index.js.map +1 -1
- package/dist/lib/cubing/puzzles/index.d.ts +2 -45
- package/dist/lib/cubing/puzzles/index.js +4 -4
- package/dist/lib/cubing/scramble/index.d.ts +2 -4
- package/dist/lib/cubing/scramble/index.js +6 -6
- package/dist/lib/cubing/search/index.d.ts +4 -9
- package/dist/lib/cubing/search/index.js +6 -6
- package/dist/lib/cubing/stream/index.d.ts +2 -45
- package/dist/lib/cubing/stream/index.js +1 -1
- package/dist/lib/cubing/twisty/index.d.ts +2 -60
- package/dist/lib/cubing/twisty/index.js +66 -18
- package/dist/lib/cubing/twisty/index.js.map +2 -2
- package/experimental-json-schema/kpuzzle/KPatternData.schema.json +27 -29
- package/experimental-json-schema/kpuzzle/KPuzzleDefinition.schema.json +82 -78
- package/experimental-json-schema/kpuzzle/KTransformationData.schema.json +21 -22
- package/kpuzzle/index.d.ts +1 -1
- package/notation/index.d.ts +1 -1
- package/package.json +25 -21
- package/protocol/index.d.ts +1 -1
- package/puzzle-geometry/index.d.ts +1 -1
- package/puzzles/index.d.ts +1 -1
- package/scramble/index.d.ts +1 -1
- package/search/index.d.ts +1 -1
- package/stream/index.d.ts +1 -1
- package/twisty/index.d.ts +1 -1
- package/dist/lib/cubing/PuzzleLoader-Bp8zngUn.d.ts +0 -2362
- package/dist/lib/cubing/chunks/chunk-44CFF24P.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-DQGYYYHZ.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-E3YLQC45.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-FTE3QI5X.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-FUHYAW74.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-FZBKZ5ZB.js +0 -265
- package/dist/lib/cubing/chunks/chunk-LWCBAAHO.js +0 -1180
- package/dist/lib/cubing/chunks/chunk-LWCBAAHO.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-M7YKTETT.js +0 -239
- package/dist/lib/cubing/chunks/chunk-M7YKTETT.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-NGW52SHR.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-OUM32GEA.js +0 -239
- package/dist/lib/cubing/chunks/chunk-OUM32GEA.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-SGJ5WPE4.js +0 -1074
- package/dist/lib/cubing/chunks/chunk-SGJ5WPE4.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-TAVR35KU.js +0 -265
- package/dist/lib/cubing/chunks/chunk-TAVR35KU.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-V27EM5TJ.js +0 -1074
- package/dist/lib/cubing/chunks/chunk-V27EM5TJ.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-VRTKWZPL.js +0 -10084
- package/dist/lib/cubing/chunks/chunk-VRTKWZPL.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-VSMFYTG6.js +0 -10086
- package/dist/lib/cubing/chunks/chunk-VSMFYTG6.js.map +0 -7
- package/dist/lib/cubing/chunks/inside-IHWQVDVU.js +0 -564
- package/dist/lib/cubing/chunks/inside-IHWQVDVU.js.map +0 -7
- package/dist/lib/cubing/chunks/inside-L2JI2BEY.js.map +0 -7
- package/dist/lib/cubing/chunks/inside-Q56GLXG4.js +0 -556
- package/dist/lib/cubing/chunks/inside-Q56GLXG4.js.map +0 -7
- package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js +0 -124
- package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-GB4WAJ7I.js +0 -1891
- package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-MXHP7O4R.js +0 -1890
- package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-MXHP7O4R.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-XFECDWOF.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-2CECFBP3.js +0 -1268
- package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-CM33KT7L.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-Q4LLHL2O.js +0 -1267
- package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-Q4LLHL2O.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-COSEVJBV.js +0 -2922
- package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-COSEVJBV.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-E576AITS.js +0 -2923
- package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-NANDMURR.js.map +0 -7
- package/dist/lib/cubing/chunks/twips_wasm_bg-RWVQBVBA-5YCKA6O5.js +0 -10
- package/dist/lib/cubing/chunks/twips_wasm_bg-RWVQBVBA-5YCKA6O5.js.map +0 -7
- package/dist/lib/cubing/chunks/twisty-dynamic-3d-5NZRNZ7C.js +0 -1881
- package/dist/lib/cubing/chunks/twisty-dynamic-3d-5NZRNZ7C.js.map +0 -7
- package/dist/lib/cubing/chunks/twisty-dynamic-3d-IKE4BUQG.js +0 -1883
- package/dist/lib/cubing/chunks/twisty-dynamic-3d-IKE4BUQG.js.map +0 -7
- package/dist/lib/cubing/chunks/twisty-dynamic-3d-XLUOPCLN.js +0 -1881
- package/dist/lib/cubing/chunks/twisty-dynamic-3d-XLUOPCLN.js.map +0 -7
- package/dist/lib/cubing/events-CewDA1aS.d.ts +0 -35
- package/dist/lib/cubing/index-DabjED-w.d.ts +0 -33
- /package/dist/bin/chunks/{chunk-OI3YIXMQ.js.map → chunk-22VWCGBC.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{big-puzzle-orientation-ZVZQJEF5.js.map → big-puzzle-orientation-ADWIOX6S.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-ROB5TROI.js.map → chunk-7LXHWXCO.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-FZBKZ5ZB.js.map → chunk-MQSQDKWH.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-GB4WAJ7I.js.map → search-dynamic-sgs-side-events-WORUZVF5.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-2CECFBP3.js.map → search-dynamic-sgs-unofficial-5JQKPNG2.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-E576AITS.js.map → search-dynamic-solve-4x4x4-KIH4YATU.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-UZMNOI6U.js.map → search-dynamic-solve-fto-I5ID5LXD.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{twips-YHXBF55O.js.map → twips-ZNMKGC5U.js.map} +0 -0
|
@@ -1,176 +1,189 @@
|
|
|
1
|
-
|
|
2
|
-
import { K as KPattern, t as PuzzleID, s as PuzzleLoader, a0 as KeyMapping, r as Alg, M as Move, z as MillisecondTimestamp } from '../PuzzleLoader-Bp8zngUn.js';
|
|
3
|
-
import 'type-fest';
|
|
4
|
-
import 'three/src/Three.js';
|
|
1
|
+
/// <reference types="web-bluetooth" />
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
import { At as Move, D as PuzzleID, I as MillisecondTimestamp, R as KPattern, c as PuzzleLoader, gt as Alg, s as KeyMapping } from "../index-BXHm_6gm.js";
|
|
4
|
+
import { a as OrientationEvent, i as AlgLeafEvent } from "../index-Cvk652Bd.js";
|
|
7
5
|
|
|
6
|
+
//#region src/cubing/bluetooth/debug.d.ts
|
|
7
|
+
declare function enableDebugLogging(enable: boolean): void;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/cubing/bluetooth/transformer.d.ts
|
|
8
10
|
interface StreamTransformer {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
transformAlgLeaf(algLeafEvent: AlgLeafEvent): void;
|
|
12
|
+
transformOrientation(orientationEvent: OrientationEvent): void;
|
|
11
13
|
}
|
|
12
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts
|
|
13
16
|
/** @category Smart Puzzles */
|
|
14
17
|
declare abstract class BluetoothPuzzle extends EventTarget {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
transformers: StreamTransformer[];
|
|
19
|
+
protected listeners: Array<(e: AlgLeafEvent) => void>;
|
|
20
|
+
protected orientationListeners: Array<(e: OrientationEvent) => void>;
|
|
21
|
+
abstract name(): string | undefined;
|
|
22
|
+
abstract disconnect(): void;
|
|
23
|
+
getPattern(): Promise<KPattern>;
|
|
24
|
+
addAlgLeafListener(listener: (e: AlgLeafEvent) => void): void;
|
|
25
|
+
addOrientationListener(listener: (e: OrientationEvent) => void): void;
|
|
26
|
+
experimentalAddBasicRotationTransformer(): void;
|
|
27
|
+
protected dispatchAlgLeaf(algLeaf: AlgLeafEvent): void;
|
|
28
|
+
protected dispatchOrientation(orientationEvent: OrientationEvent): void;
|
|
26
29
|
}
|
|
27
|
-
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/cubing/bluetooth/keyboard.d.ts
|
|
28
32
|
/** @category Keyboard Puzzles */
|
|
29
33
|
declare class KeyboardPuzzle extends BluetoothPuzzle {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
private target;
|
|
35
|
+
private keyMappingAndPatternPromise;
|
|
36
|
+
listener: EventListener;
|
|
37
|
+
constructor(target: Element, puzzle?: PuzzleID | PuzzleLoader);
|
|
38
|
+
name(): string | undefined;
|
|
39
|
+
setPuzzleInternal(puzzle: PuzzleID | PuzzleLoader): Promise<[KeyMapping | undefined, KPattern]>;
|
|
40
|
+
disconnect(): void;
|
|
41
|
+
getPattern(): Promise<KPattern>;
|
|
42
|
+
private onKeyDown;
|
|
39
43
|
}
|
|
40
44
|
/** @category Keyboard Puzzles */
|
|
41
45
|
declare function debugKeyboardConnect(target?: any, puzzle?: PuzzleID | PuzzleLoader): Promise<KeyboardPuzzle>;
|
|
42
|
-
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/cubing/bluetooth/connect/index.d.ts
|
|
43
48
|
/******** connect() ********/
|
|
44
49
|
interface BluetoothConnectOptions {
|
|
45
|
-
|
|
50
|
+
acceptAllDevices?: boolean;
|
|
46
51
|
}
|
|
47
|
-
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/cubing/bluetooth/smart-puzzle/connect.d.ts
|
|
48
54
|
/** @category Smart Puzzles */
|
|
49
55
|
declare function connectSmartPuzzle(options?: BluetoothConnectOptions): Promise<BluetoothPuzzle>;
|
|
50
|
-
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/cubing/bluetooth/smart-puzzle/gan.d.ts
|
|
51
58
|
/** @category Smart Puzzles */
|
|
52
59
|
declare class GanCube extends BluetoothPuzzle {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
60
|
+
private kpuzzle;
|
|
61
|
+
private service;
|
|
62
|
+
private server;
|
|
63
|
+
private physicalStateCharacteristic;
|
|
64
|
+
private lastMoveCounter;
|
|
65
|
+
private aesKey;
|
|
66
|
+
static connect(server: BluetoothRemoteGATTServer): Promise<GanCube>;
|
|
67
|
+
INTERVAL_MS: number;
|
|
68
|
+
private intervalHandle;
|
|
69
|
+
private pattern;
|
|
70
|
+
private cachedFaceletStatus1Characteristic;
|
|
71
|
+
private cachedFaceletStatus2Characteristic;
|
|
72
|
+
private cachedActualAngleAndBatteryCharacteristic;
|
|
73
|
+
private constructor();
|
|
74
|
+
name(): string | undefined;
|
|
75
|
+
disconnect(): void;
|
|
76
|
+
startTrackingMoves(): void;
|
|
77
|
+
stopTrackingMoves(): void;
|
|
78
|
+
intervalHandler(): Promise<void>;
|
|
79
|
+
getBattery(): Promise<number>;
|
|
80
|
+
getPattern(): Promise<KPattern>;
|
|
81
|
+
faceletStatus1Characteristic(): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
82
|
+
faceletStatus2Characteristic(): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
83
|
+
actualAngleAndBatteryCharacteristic(): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
84
|
+
reset(): Promise<void>;
|
|
85
|
+
readFaceletStatus1Characteristic(): Promise<ArrayBufferLike>;
|
|
86
|
+
readFaceletStatus2Characteristic(): Promise<string>;
|
|
87
|
+
readActualAngleAndBatteryCharacteristic(): Promise<ArrayBufferLike>;
|
|
81
88
|
}
|
|
82
|
-
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/cubing/bluetooth/smart-puzzle/giiker.d.ts
|
|
83
91
|
/** @category Smart Puzzles */
|
|
84
92
|
declare class GiiKERCube extends BluetoothPuzzle {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
private server;
|
|
94
|
+
private cubeCharacteristic;
|
|
95
|
+
private originalValue?;
|
|
96
|
+
static connect(server: BluetoothRemoteGATTServer): Promise<GiiKERCube>;
|
|
97
|
+
private constructor();
|
|
98
|
+
name(): string | undefined;
|
|
99
|
+
disconnect(): void;
|
|
100
|
+
getPattern(): Promise<KPattern>;
|
|
101
|
+
private getBit;
|
|
102
|
+
private toReid333;
|
|
103
|
+
private onCubeCharacteristicChanged;
|
|
104
|
+
private isRepeatedInitialValue;
|
|
97
105
|
}
|
|
98
|
-
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/cubing/bluetooth/smart-puzzle/gocube.d.ts
|
|
99
108
|
/** @category Smart Puzzles */
|
|
100
109
|
declare class GoCube extends BluetoothPuzzle {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
private server;
|
|
111
|
+
goCubeStateCharacteristic: BluetoothRemoteGATTCharacteristic;
|
|
112
|
+
static connect(server: BluetoothRemoteGATTServer): Promise<GoCube>;
|
|
113
|
+
private recorded;
|
|
114
|
+
private homeQuatInverse;
|
|
115
|
+
private lastRawQuat;
|
|
116
|
+
private currentQuat;
|
|
117
|
+
private lastTarget;
|
|
118
|
+
private alg;
|
|
119
|
+
private constructor();
|
|
120
|
+
disconnect(): void;
|
|
121
|
+
reset(): void;
|
|
122
|
+
resetAlg(alg?: Alg): void;
|
|
123
|
+
resetOrientation(): void;
|
|
124
|
+
name(): string | undefined;
|
|
125
|
+
private onCubeCharacteristicChanged;
|
|
117
126
|
}
|
|
118
|
-
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/cubing/bluetooth/smart-robot/GanRobot.d.ts
|
|
119
129
|
interface GanRobotOptions {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
xAngle: boolean;
|
|
131
|
+
singleMoveFixHack: boolean;
|
|
132
|
+
bufferQueue: number;
|
|
133
|
+
postSleep: number;
|
|
124
134
|
}
|
|
125
135
|
/** @category Robots */
|
|
126
136
|
declare class GanRobot extends EventTarget {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
137
|
+
private server;
|
|
138
|
+
private statusCharacteristic;
|
|
139
|
+
private moveCharacteristic;
|
|
140
|
+
experimentalDebugOnSend: ((alg: Alg) => void) | null;
|
|
141
|
+
experimentalDebugLog: typeof console.log;
|
|
142
|
+
experimentalOptions: GanRobotOptions;
|
|
143
|
+
constructor(_service: BluetoothRemoteGATTService, server: BluetoothRemoteGATTServer, device: BluetoothDevice, statusCharacteristic: BluetoothRemoteGATTCharacteristic, moveCharacteristic: BluetoothRemoteGATTCharacteristic);
|
|
144
|
+
static connect(server: BluetoothRemoteGATTServer, device: BluetoothDevice): Promise<GanRobot>;
|
|
145
|
+
name(): string | undefined;
|
|
146
|
+
disconnect(): void;
|
|
147
|
+
onDisconnect(): void;
|
|
148
|
+
private algNodeToNibble;
|
|
149
|
+
private writeNibbles;
|
|
150
|
+
private getStatus;
|
|
151
|
+
locked: boolean;
|
|
152
|
+
processQueue(): void;
|
|
153
|
+
private moveQueue;
|
|
154
|
+
private queueMoves;
|
|
155
|
+
applyMoves(moves: Iterable<Move>): Promise<void>;
|
|
146
156
|
}
|
|
147
|
-
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/cubing/bluetooth/smart-robot/index.d.ts
|
|
148
159
|
/** @category Robots */
|
|
149
160
|
type BluetoothRobot = GanRobot;
|
|
150
161
|
/** @category Robots */
|
|
151
162
|
declare function connectSmartRobot(options?: BluetoothConnectOptions): Promise<BluetoothRobot>;
|
|
152
|
-
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/cubing/bluetooth/smart-timer/GanTimer.d.ts
|
|
153
165
|
/** @category Timers */
|
|
154
166
|
declare class GanTimer extends EventTarget {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
private server;
|
|
168
|
+
private timeCharacteristic;
|
|
169
|
+
private polling;
|
|
170
|
+
private previousDetail;
|
|
171
|
+
constructor(_service: BluetoothRemoteGATTService, server: BluetoothRemoteGATTServer, device: BluetoothDevice, timeCharacteristic: BluetoothRemoteGATTCharacteristic);
|
|
172
|
+
static connect(server: BluetoothRemoteGATTServer, device: BluetoothDevice): Promise<GanTimer>;
|
|
173
|
+
disconnect(): void;
|
|
174
|
+
poll(): Promise<void>;
|
|
175
|
+
onDisconnect(): void;
|
|
176
|
+
getTimeCharacteristic(): Promise<Uint8Array<ArrayBufferLike>>;
|
|
177
|
+
getTime(): Promise<MillisecondTimestamp>;
|
|
178
|
+
decodeTimeMs(bytes: Uint8Array): MillisecondTimestamp;
|
|
179
|
+
startPolling(): void;
|
|
180
|
+
stopPolling(): void;
|
|
169
181
|
}
|
|
170
|
-
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/cubing/bluetooth/smart-timer/index.d.ts
|
|
171
184
|
/** @category Timers */
|
|
172
185
|
type BluetoothTimer = GanTimer;
|
|
173
186
|
/** @category Timers */
|
|
174
187
|
declare function connectSmartTimer(options?: BluetoothConnectOptions): Promise<BluetoothTimer>;
|
|
175
|
-
|
|
176
|
-
export { BluetoothPuzzle, type BluetoothRobot, type BluetoothTimer, GanCube, GiiKERCube, GoCube, KeyboardPuzzle, AlgLeafEvent as MoveEvent, OrientationEvent, connectSmartPuzzle, connectSmartRobot, connectSmartTimer, debugKeyboardConnect, enableDebugLogging };
|
|
188
|
+
//#endregion
|
|
189
|
+
export { type BluetoothPuzzle, type BluetoothRobot, type BluetoothTimer, GanCube, GiiKERCube, GoCube, KeyboardPuzzle, type AlgLeafEvent as MoveEvent, type OrientationEvent, connectSmartPuzzle, connectSmartRobot, connectSmartTimer, debugKeyboardConnect, enableDebugLogging };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
binaryComponentsToReid3x3x3,
|
|
3
3
|
twizzleBinaryToBinaryComponents
|
|
4
|
-
} from "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-MQSQDKWH.js";
|
|
5
5
|
import {
|
|
6
6
|
puzzles
|
|
7
|
-
} from "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-FUAADKXE.js";
|
|
8
8
|
import {
|
|
9
9
|
cube3x3x3,
|
|
10
10
|
experimental3x3x3KPuzzle
|
|
11
|
-
} from "../chunks/chunk-
|
|
11
|
+
} from "../chunks/chunk-A7FK4XKU.js";
|
|
12
12
|
import {
|
|
13
13
|
KPattern
|
|
14
|
-
} from "../chunks/chunk-
|
|
14
|
+
} from "../chunks/chunk-5ONX3JVC.js";
|
|
15
15
|
import {
|
|
16
16
|
Alg,
|
|
17
17
|
Move,
|
|
18
18
|
experimentalAppendMove,
|
|
19
19
|
keyToMove
|
|
20
|
-
} from "../chunks/chunk-
|
|
20
|
+
} from "../chunks/chunk-N5FJ5YIA.js";
|
|
21
21
|
|
|
22
22
|
// src/cubing/bluetooth/debug.ts
|
|
23
23
|
var DEBUG_LOGGING_ENABLED = false;
|
|
@@ -142,6 +142,7 @@ var KeyboardPuzzle = class extends BluetoothPuzzle {
|
|
|
142
142
|
target.addEventListener("keydown", this.listener);
|
|
143
143
|
this.keyMappingAndPatternPromise = this.setPuzzleInternal(puzzle);
|
|
144
144
|
}
|
|
145
|
+
target;
|
|
145
146
|
keyMappingAndPatternPromise;
|
|
146
147
|
listener;
|
|
147
148
|
name() {
|
|
@@ -424,6 +425,8 @@ var PhysicalState = class _PhysicalState {
|
|
|
424
425
|
throw new Error("Unexpected array length");
|
|
425
426
|
}
|
|
426
427
|
}
|
|
428
|
+
dataView;
|
|
429
|
+
timeStamp;
|
|
427
430
|
static async read(characteristic, aesKey) {
|
|
428
431
|
const value = await decryptPattern(
|
|
429
432
|
new Uint8Array((await characteristic.readValue()).buffer),
|
|
@@ -571,6 +574,12 @@ var GanCube = class _GanCube extends BluetoothPuzzle {
|
|
|
571
574
|
this.pattern = kpuzzle.defaultPattern();
|
|
572
575
|
this.startTrackingMoves();
|
|
573
576
|
}
|
|
577
|
+
kpuzzle;
|
|
578
|
+
service;
|
|
579
|
+
server;
|
|
580
|
+
physicalStateCharacteristic;
|
|
581
|
+
lastMoveCounter;
|
|
582
|
+
aesKey;
|
|
574
583
|
// We have to perform async operations before we call the constructor.
|
|
575
584
|
static async connect(server) {
|
|
576
585
|
const ganCubeService = await server.getPrimaryService(UUIDs.ganCubeService);
|
|
@@ -833,6 +842,9 @@ var GiiKERCube = class _GiiKERCube extends BluetoothPuzzle {
|
|
|
833
842
|
this.cubeCharacteristic = cubeCharacteristic;
|
|
834
843
|
this.originalValue = originalValue;
|
|
835
844
|
}
|
|
845
|
+
server;
|
|
846
|
+
cubeCharacteristic;
|
|
847
|
+
originalValue;
|
|
836
848
|
static async connect(server) {
|
|
837
849
|
const cubeService = await server.getPrimaryService(UUIDs2.cubeService);
|
|
838
850
|
debugLog("Service:", cubeService);
|
|
@@ -999,6 +1011,8 @@ var GoCube = class _GoCube extends BluetoothPuzzle {
|
|
|
999
1011
|
this.server = server;
|
|
1000
1012
|
this.goCubeStateCharacteristic = goCubeStateCharacteristic;
|
|
1001
1013
|
}
|
|
1014
|
+
server;
|
|
1015
|
+
goCubeStateCharacteristic;
|
|
1002
1016
|
// We have to perform async operations before we call the constructor.
|
|
1003
1017
|
static async connect(server) {
|
|
1004
1018
|
const service = await server.getPrimaryService(UUIDs3.goCubeService);
|
|
@@ -1119,6 +1133,8 @@ var HeykubeCube = class _HeykubeCube extends BluetoothPuzzle {
|
|
|
1119
1133
|
this.stateCharacteristic.startNotifications();
|
|
1120
1134
|
this.startTrackingMoves();
|
|
1121
1135
|
}
|
|
1136
|
+
server;
|
|
1137
|
+
stateCharacteristic;
|
|
1122
1138
|
// We have to perform async operations before we call the constructor.
|
|
1123
1139
|
static async connect(server, device) {
|
|
1124
1140
|
const service = await server.getPrimaryService(UUIDs4.heykubeService);
|
|
@@ -1612,6 +1628,9 @@ var QiyiCube = class _QiyiCube extends BluetoothPuzzle {
|
|
|
1612
1628
|
void this.sendAppHello();
|
|
1613
1629
|
})();
|
|
1614
1630
|
}
|
|
1631
|
+
kpuzzle;
|
|
1632
|
+
aesKey;
|
|
1633
|
+
server;
|
|
1615
1634
|
latestTimestamp;
|
|
1616
1635
|
allTimeStamps;
|
|
1617
1636
|
// Without this set, moves are constantly duplicated
|
|
@@ -1946,6 +1965,9 @@ var GanRobot = class _GanRobot extends EventTarget {
|
|
|
1946
1965
|
this.onDisconnect.bind(this)
|
|
1947
1966
|
);
|
|
1948
1967
|
}
|
|
1968
|
+
server;
|
|
1969
|
+
statusCharacteristic;
|
|
1970
|
+
moveCharacteristic;
|
|
1949
1971
|
experimentalDebugOnSend = null;
|
|
1950
1972
|
experimentalDebugLog = () => {
|
|
1951
1973
|
};
|
|
@@ -2145,6 +2167,8 @@ var GanTimer = class _GanTimer extends EventTarget {
|
|
|
2145
2167
|
this.onDisconnect.bind(this)
|
|
2146
2168
|
);
|
|
2147
2169
|
}
|
|
2170
|
+
server;
|
|
2171
|
+
timeCharacteristic;
|
|
2148
2172
|
polling = false;
|
|
2149
2173
|
previousDetail = null;
|
|
2150
2174
|
// We have to perform async operations before we call the constructor.
|