cubing 0.61.3 → 0.62.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.
Files changed (86) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/chunks/{chunk-5WXNSJ2M.js → chunk-STSENBFQ.js} +2 -2
  3. package/dist/bin/order.js +1 -1
  4. package/dist/bin/puzzle-geometry-bin.js +1 -1
  5. package/dist/bin/scramble.js +1 -1
  6. package/dist/lib/cubing/{PuzzleLoader-CkghxdIL.d.ts → PuzzleLoader-B2JfN7uX.d.ts} +7 -7
  7. package/dist/lib/cubing/alg/index.d.ts +2 -2
  8. package/dist/lib/cubing/alg/index.js +1 -1
  9. package/dist/lib/cubing/bluetooth/index.d.ts +23 -4
  10. package/dist/lib/cubing/bluetooth/index.js +13 -10
  11. package/dist/lib/cubing/bluetooth/index.js.map +2 -2
  12. package/dist/lib/cubing/chunks/{big-puzzle-orientation-3GQ3L26S.js → big-puzzle-orientation-ZVZQJEF5.js} +2 -2
  13. package/dist/lib/cubing/chunks/{chunk-T3SF7NHB.js → chunk-2AUSVPAU.js} +3 -3
  14. package/dist/lib/cubing/chunks/{chunk-T3SF7NHB.js.map → chunk-2AUSVPAU.js.map} +2 -2
  15. package/dist/lib/cubing/chunks/{chunk-ZGT5MZSV.js → chunk-5F7JRCTP.js} +5 -5
  16. package/dist/lib/cubing/chunks/{chunk-MZKROP74.js → chunk-FLK6AZKB.js} +4 -4
  17. package/dist/lib/cubing/chunks/{chunk-MZKROP74.js.map → chunk-FLK6AZKB.js.map} +1 -1
  18. package/dist/lib/cubing/chunks/{chunk-QSGI7DXX.js → chunk-FUHYAW74.js} +4 -4
  19. package/dist/lib/cubing/chunks/{chunk-QSGI7DXX.js.map → chunk-FUHYAW74.js.map} +1 -1
  20. package/dist/lib/cubing/chunks/{chunk-XITTJ75E.js → chunk-LIVDX4MD.js} +79 -35
  21. package/dist/lib/cubing/chunks/chunk-LIVDX4MD.js.map +7 -0
  22. package/dist/lib/cubing/chunks/{chunk-3PS5LIPR.js → chunk-LWCBAAHO.js} +15 -9
  23. package/dist/lib/cubing/chunks/{chunk-3PS5LIPR.js.map → chunk-LWCBAAHO.js.map} +2 -2
  24. package/dist/lib/cubing/chunks/{chunk-WI337PMF.js → chunk-NGW52SHR.js} +3 -3
  25. package/dist/lib/cubing/chunks/{chunk-7D7ZUWUK.js → chunk-O6HEZXGY.js} +1 -1
  26. package/dist/lib/cubing/chunks/chunk-O6HEZXGY.js.map +7 -0
  27. package/dist/lib/cubing/chunks/{chunk-WAYEJXCG.js → chunk-RINY3U6G.js} +2 -2
  28. package/dist/lib/cubing/chunks/{chunk-AVOUJS6N.js → chunk-ROB5TROI.js} +2 -2
  29. package/dist/lib/cubing/chunks/{chunk-ZKJKRQKY.js → chunk-XO3JAA3V.js} +1 -2
  30. package/dist/lib/cubing/chunks/chunk-XO3JAA3V.js.map +7 -0
  31. package/dist/lib/cubing/chunks/{chunk-LCJT5ROJ.js → chunk-ZU7PSGX4.js} +3 -3
  32. package/dist/lib/cubing/chunks/chunk-ZU7PSGX4.js.map +7 -0
  33. package/dist/lib/cubing/chunks/{inside-FGQBCNHY.js → inside-TJAQBDDY.js} +16 -16
  34. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-E5KVBK2Y.js → search-dynamic-sgs-side-events-GB4WAJ7I.js} +6 -6
  35. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-IFHNOIEL.js → search-dynamic-sgs-unofficial-2CECFBP3.js} +6 -6
  36. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-OBPW4YC2.js → search-dynamic-solve-4x4x4-NRWKTCNT.js} +8 -8
  37. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-HZREG6ZH.js → search-dynamic-solve-fto-UZMNOI6U.js} +2 -2
  38. package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-GCNVEBDJ.js → search-dynamic-solve-kilominx-CD57C3C4.js} +2 -2
  39. package/dist/lib/cubing/chunks/search-worker-entry.js +5 -7
  40. package/dist/lib/cubing/chunks/search-worker-entry.js.map +2 -2
  41. package/dist/lib/cubing/chunks/{twips-OVT324QJ.js → twips-YHXBF55O.js} +2 -2
  42. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-O6UL3R7C.js → twisty-dynamic-3d-IKE4BUQG.js} +9 -9
  43. package/dist/lib/cubing/chunks/twisty-dynamic-3d-IKE4BUQG.js.map +7 -0
  44. package/dist/lib/cubing/events-BDkOaqlG.d.ts +35 -0
  45. package/dist/lib/cubing/{index-B_8W-2zR.d.ts → index-DWA95mSl.d.ts} +1 -1
  46. package/dist/lib/cubing/kpuzzle/index.d.ts +1 -1
  47. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  48. package/dist/lib/cubing/notation/index.d.ts +1 -1
  49. package/dist/lib/cubing/notation/index.js +4 -4
  50. package/dist/lib/cubing/protocol/index.d.ts +1 -1
  51. package/dist/lib/cubing/protocol/index.js +4 -4
  52. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -2
  53. package/dist/lib/cubing/puzzle-geometry/index.js +1 -1
  54. package/dist/lib/cubing/puzzle-geometry/index.js.map +1 -1
  55. package/dist/lib/cubing/puzzles/index.d.ts +1 -1
  56. package/dist/lib/cubing/puzzles/index.js +4 -4
  57. package/dist/lib/cubing/scramble/index.d.ts +2 -2
  58. package/dist/lib/cubing/scramble/index.js +7 -7
  59. package/dist/lib/cubing/search/index.d.ts +3 -3
  60. package/dist/lib/cubing/search/index.js +7 -7
  61. package/dist/lib/cubing/stream/index.d.ts +4 -16
  62. package/dist/lib/cubing/stream/index.js +1 -1
  63. package/dist/lib/cubing/stream/index.js.map +2 -2
  64. package/dist/lib/cubing/twisty/index.d.ts +2 -2
  65. package/dist/lib/cubing/twisty/index.js +70 -62
  66. package/dist/lib/cubing/twisty/index.js.map +2 -2
  67. package/package.json +3 -3
  68. package/dist/lib/cubing/bluetooth-puzzle-c-_IBAdu.d.ts +0 -43
  69. package/dist/lib/cubing/chunks/chunk-7D7ZUWUK.js.map +0 -7
  70. package/dist/lib/cubing/chunks/chunk-LCJT5ROJ.js.map +0 -7
  71. package/dist/lib/cubing/chunks/chunk-XITTJ75E.js.map +0 -7
  72. package/dist/lib/cubing/chunks/chunk-ZKJKRQKY.js.map +0 -7
  73. package/dist/lib/cubing/chunks/twisty-dynamic-3d-O6UL3R7C.js.map +0 -7
  74. /package/dist/bin/chunks/{chunk-5WXNSJ2M.js.map → chunk-STSENBFQ.js.map} +0 -0
  75. /package/dist/lib/cubing/chunks/{big-puzzle-orientation-3GQ3L26S.js.map → big-puzzle-orientation-ZVZQJEF5.js.map} +0 -0
  76. /package/dist/lib/cubing/chunks/{chunk-ZGT5MZSV.js.map → chunk-5F7JRCTP.js.map} +0 -0
  77. /package/dist/lib/cubing/chunks/{chunk-WI337PMF.js.map → chunk-NGW52SHR.js.map} +0 -0
  78. /package/dist/lib/cubing/chunks/{chunk-WAYEJXCG.js.map → chunk-RINY3U6G.js.map} +0 -0
  79. /package/dist/lib/cubing/chunks/{chunk-AVOUJS6N.js.map → chunk-ROB5TROI.js.map} +0 -0
  80. /package/dist/lib/cubing/chunks/{inside-FGQBCNHY.js.map → inside-TJAQBDDY.js.map} +0 -0
  81. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-E5KVBK2Y.js.map → search-dynamic-sgs-side-events-GB4WAJ7I.js.map} +0 -0
  82. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-IFHNOIEL.js.map → search-dynamic-sgs-unofficial-2CECFBP3.js.map} +0 -0
  83. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-OBPW4YC2.js.map → search-dynamic-solve-4x4x4-NRWKTCNT.js.map} +0 -0
  84. /package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-HZREG6ZH.js.map → search-dynamic-solve-fto-UZMNOI6U.js.map} +0 -0
  85. /package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-GCNVEBDJ.js.map → search-dynamic-solve-kilominx-CD57C3C4.js.map} +0 -0
  86. /package/dist/lib/cubing/chunks/{twips-OVT324QJ.js.map → twips-YHXBF55O.js.map} +0 -0
package/README.md CHANGED
@@ -66,7 +66,7 @@ make dev
66
66
  # Now visit http://cubing.localhost:3333
67
67
  ```
68
68
 
69
- To quickly check any changes for issues, try `make test-fast`. Run `make test` for more thorough testing options.
69
+ To quickly check any changes for issues, try `make check-fast`. Run `make check` to run all possible checks.
70
70
 
71
71
  ### Developing on Windows
72
72
 
@@ -5,10 +5,10 @@ import "path-class";
5
5
  var packageVersion = (
6
6
  // biome-ignore lint/suspicious/noTsIgnore: This comment is stil present in the compiled file, where an error is *not* expected.
7
7
  /** @ts-ignore Populated by `esbuild` at compile time. */
8
- "0.61.3"
8
+ "0.62.0"
9
9
  );
10
10
 
11
11
  export {
12
12
  packageVersion
13
13
  };
14
- //# sourceMappingURL=chunk-5WXNSJ2M.js.map
14
+ //# sourceMappingURL=chunk-STSENBFQ.js.map
package/dist/bin/order.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env -S node --
2
2
  import {
3
3
  packageVersion
4
- } from "./chunks/chunk-5WXNSJ2M.js";
4
+ } from "./chunks/chunk-STSENBFQ.js";
5
5
 
6
6
  // src/bin/order.ts
7
7
  import { argv } from "node:process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env -S node --
2
2
  import {
3
3
  packageVersion
4
- } from "./chunks/chunk-5WXNSJ2M.js";
4
+ } from "./chunks/chunk-STSENBFQ.js";
5
5
 
6
6
  // src/bin/puzzle-geometry-bin.ts
7
7
  import { argv } from "node:process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env -S node --
2
2
  import {
3
3
  packageVersion
4
- } from "./chunks/chunk-5WXNSJ2M.js";
4
+ } from "./chunks/chunk-STSENBFQ.js";
5
5
 
6
6
  // src/bin/scramble.ts
7
7
  import { argv } from "node:process";
@@ -1,16 +1,16 @@
1
1
  import { Tagged } from 'type-fest';
2
2
  import { Texture, Object3D, Raycaster, PerspectiveCamera, Scene, WebGLRenderer } from 'three/src/Three.js';
3
3
 
4
- type ExperimentalNotationType = "auto" | "LGN";
5
- interface ExperimentalSerializationOptions {
6
- notation?: ExperimentalNotationType;
7
- }
8
-
9
4
  declare enum IterationDirection {
10
5
  Forwards = 1,
11
6
  Backwards = -1
12
7
  }
13
8
 
9
+ type ExperimentalNotationType = "auto" | "LGN";
10
+ interface ExperimentalSerializationOptions {
11
+ notation?: ExperimentalNotationType;
12
+ }
13
+
14
14
  declare abstract class Comparable {
15
15
  is(c: any): boolean;
16
16
  as<T>(c: new (...args: any) => T): T | null;
@@ -1757,7 +1757,7 @@ declare class TwistyAnimationController {
1757
1757
  untilBoundary?: BoundaryType;
1758
1758
  autoSkipToOtherEndIfStartingAtBoundary?: boolean;
1759
1759
  loop?: boolean;
1760
- }): Promise<void>;
1760
+ }): void;
1761
1761
  pause(): void;
1762
1762
  animFrame(frameDatestamp: MillisecondTimestamp): Promise<void>;
1763
1763
  }
@@ -2082,7 +2082,7 @@ declare class TwistyPlayer extends TwistyPlayerSettable implements TwistyAnimati
2082
2082
  buttons?: TwistyButtons;
2083
2083
  experimentalCanvasClickCallback: (...args: any) => void;
2084
2084
  constructor(config?: TwistyPlayerConfig);
2085
- connectedCallback(): Promise<void>;
2085
+ connectedCallback(): void;
2086
2086
  [intersectedCallback](): Promise<void>;
2087
2087
  /** @deprecated */
2088
2088
  experimentalSetFlashLevel(newLevel: "auto" | "none"): void;
@@ -1,5 +1,5 @@
1
- import { R as AlgNode, r as Alg, M as Move, U as AppendOptions, W as Grouping, X as LineComment, Y as Commutator, Z as Conjugate, _ as Newline, $ as Pause, a0 as KeyMapping, A as AlgLeaf } from '../PuzzleLoader-CkghxdIL.js';
2
- export { a1 as AlgBranch, a7 as AppendCancelOptions, a5 as ExperimentalNotationType, a4 as ExperimentalParsed, a6 as ExperimentalSerializationOptions, a2 as GroupingModifications, a3 as MoveModifications, w as PuzzleSpecificSimplifyOptions, a9 as QuantumMove, a8 as SimplifyOptions } from '../PuzzleLoader-CkghxdIL.js';
1
+ import { R as AlgNode, r as Alg, M as Move, U as AppendOptions, W as Grouping, X as LineComment, Y as Commutator, Z as Conjugate, _ as Newline, $ as Pause, a0 as KeyMapping, A as AlgLeaf } from '../PuzzleLoader-B2JfN7uX.js';
2
+ export { a1 as AlgBranch, a7 as AppendCancelOptions, a5 as ExperimentalNotationType, a4 as ExperimentalParsed, a6 as ExperimentalSerializationOptions, a2 as GroupingModifications, a3 as MoveModifications, w as PuzzleSpecificSimplifyOptions, a9 as QuantumMove, a8 as SimplifyOptions } from '../PuzzleLoader-B2JfN7uX.js';
3
3
  import 'type-fest';
4
4
  import 'three/src/Three.js';
5
5
 
@@ -18,7 +18,7 @@ import {
18
18
  functionFromTraversal,
19
19
  keyToMove,
20
20
  setAlgDebug
21
- } from "../chunks/chunk-7D7ZUWUK.js";
21
+ } from "../chunks/chunk-O6HEZXGY.js";
22
22
  export {
23
23
  Alg,
24
24
  AlgBuilder,
@@ -1,11 +1,30 @@
1
- import { t as PuzzleID, s as PuzzleLoader, a0 as KeyMapping, K as KPattern, r as Alg, M as Move, z as MillisecondTimestamp } from '../PuzzleLoader-CkghxdIL.js';
2
- import { B as BluetoothPuzzle } from '../bluetooth-puzzle-c-_IBAdu.js';
3
- export { A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-c-_IBAdu.js';
1
+ import { A as AlgLeafEvent, O as OrientationEvent } from '../events-BDkOaqlG.js';
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-B2JfN7uX.js';
4
3
  import 'type-fest';
5
4
  import 'three/src/Three.js';
6
5
 
7
6
  declare function enableDebugLogging(enable: boolean): void;
8
7
 
8
+ interface StreamTransformer {
9
+ transformAlgLeaf(algLeafEvent: AlgLeafEvent): void;
10
+ transformOrientation(orientationEvent: OrientationEvent): void;
11
+ }
12
+
13
+ /** @category Smart Puzzles */
14
+ declare abstract class BluetoothPuzzle extends EventTarget {
15
+ transformers: StreamTransformer[];
16
+ protected listeners: Array<(e: AlgLeafEvent) => void>;
17
+ protected orientationListeners: Array<(e: OrientationEvent) => void>;
18
+ abstract name(): string | undefined;
19
+ abstract disconnect(): void;
20
+ getPattern(): Promise<KPattern>;
21
+ addAlgLeafListener(listener: (e: AlgLeafEvent) => void): void;
22
+ addOrientationListener(listener: (e: OrientationEvent) => void): void;
23
+ experimentalAddBasicRotationTransformer(): void;
24
+ protected dispatchAlgLeaf(algLeaf: AlgLeafEvent): void;
25
+ protected dispatchOrientation(orientationEvent: OrientationEvent): void;
26
+ }
27
+
9
28
  /** @category Keyboard Puzzles */
10
29
  declare class KeyboardPuzzle extends BluetoothPuzzle {
11
30
  private target;
@@ -154,4 +173,4 @@ type BluetoothTimer = GanTimer;
154
173
  /** @category Timers */
155
174
  declare function connectSmartTimer(options?: BluetoothConnectOptions): Promise<BluetoothTimer>;
156
175
 
157
- export { BluetoothPuzzle, type BluetoothRobot, type BluetoothTimer, GanCube, GiiKERCube, GoCube, KeyboardPuzzle, connectSmartPuzzle, connectSmartRobot, connectSmartTimer, debugKeyboardConnect, enableDebugLogging };
176
+ export { BluetoothPuzzle, type BluetoothRobot, type BluetoothTimer, GanCube, GiiKERCube, GoCube, KeyboardPuzzle, AlgLeafEvent as MoveEvent, OrientationEvent, connectSmartPuzzle, connectSmartRobot, connectSmartTimer, debugKeyboardConnect, enableDebugLogging };
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  binaryComponentsToReid3x3x3,
3
3
  twizzleBinaryToBinaryComponents
4
- } from "../chunks/chunk-WI337PMF.js";
4
+ } from "../chunks/chunk-NGW52SHR.js";
5
5
  import {
6
6
  puzzles
7
- } from "../chunks/chunk-MZKROP74.js";
7
+ } from "../chunks/chunk-FLK6AZKB.js";
8
8
  import {
9
9
  cube3x3x3,
10
10
  experimental3x3x3KPuzzle
11
- } from "../chunks/chunk-QSGI7DXX.js";
11
+ } from "../chunks/chunk-FUHYAW74.js";
12
12
  import {
13
13
  KPattern
14
- } from "../chunks/chunk-WAYEJXCG.js";
14
+ } from "../chunks/chunk-RINY3U6G.js";
15
15
  import {
16
16
  Alg,
17
17
  Move,
18
18
  experimentalAppendMove,
19
19
  keyToMove
20
- } from "../chunks/chunk-7D7ZUWUK.js";
20
+ } from "../chunks/chunk-O6HEZXGY.js";
21
21
 
22
22
  // src/cubing/bluetooth/debug.ts
23
23
  var DEBUG_LOGGING_ENABLED = false;
@@ -261,7 +261,7 @@ async function importKey(keyBytes) {
261
261
  );
262
262
  }
263
263
  async function unsafeEncryptBlockWithIV(key, plaintextBlock, iv) {
264
- const cryptoResult = await window.crypto.subtle.encrypt(
264
+ const cryptoResult = await globalThis.crypto.subtle.encrypt(
265
265
  {
266
266
  name: AES_CBC,
267
267
  iv
@@ -286,7 +286,7 @@ async function unsafeDecryptBlock(key, ciphertextBlock) {
286
286
  const cbcCiphertext = new Uint8Array(2 * blockSize);
287
287
  cbcCiphertext.set(new Uint8Array(ciphertextBlock), 0);
288
288
  cbcCiphertext.set(new Uint8Array(paddingBlock), blockSize);
289
- const cryptoResult = await window.crypto.subtle.decrypt(
289
+ const cryptoResult = await globalThis.crypto.subtle.decrypt(
290
290
  {
291
291
  name: AES_CBC,
292
292
  iv: zeros
@@ -1605,9 +1605,12 @@ var QiyiCube = class _QiyiCube extends BluetoothPuzzle {
1605
1605
  this.kpuzzle = kpuzzle;
1606
1606
  this.aesKey = aesKey;
1607
1607
  this.server = server;
1608
- this.startNotifications().then(this.sendAppHello.bind(this));
1609
1608
  this.allTimeStamps = /* @__PURE__ */ new Set();
1610
1609
  this.allTimeStampsQueue = [];
1610
+ void (async () => {
1611
+ await this.startNotifications();
1612
+ void this.sendAppHello();
1613
+ })();
1611
1614
  }
1612
1615
  latestTimestamp;
1613
1616
  allTimeStamps;
@@ -2195,7 +2198,7 @@ var GanTimer = class _GanTimer extends EventTarget {
2195
2198
  }
2196
2199
  }
2197
2200
  this.previousDetail = detail;
2198
- this.poll();
2201
+ void this.poll();
2199
2202
  }
2200
2203
  onDisconnect() {
2201
2204
  this.dispatchEvent(new CustomEvent("disconnect"));
@@ -2212,7 +2215,7 @@ var GanTimer = class _GanTimer extends EventTarget {
2212
2215
  }
2213
2216
  startPolling() {
2214
2217
  this.polling = true;
2215
- this.poll();
2218
+ void this.poll();
2216
2219
  }
2217
2220
  stopPolling() {
2218
2221
  this.polling = false;