cubing 0.65.0 → 0.65.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.
Files changed (81) hide show
  1. package/dist/bin/chunks/{chunk-NPXQ2ZXZ.js → chunk-Z5QOJAME.js} +3 -3
  2. package/dist/bin/chunks/chunk-Z5QOJAME.js.map +7 -0
  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/bin/svg.js +1 -1
  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 +25 -26
  10. package/dist/lib/cubing/bluetooth/index.js +5 -5
  11. package/dist/lib/cubing/chunks/{big-puzzle-orientation-G75BXW2W.js → big-puzzle-orientation-7WHPJCCO.js} +2 -2
  12. package/dist/lib/cubing/chunks/{chunk-DTYBGCI3.js → chunk-2BVL5OQE.js} +8 -6
  13. package/dist/lib/cubing/chunks/chunk-2BVL5OQE.js.map +7 -0
  14. package/dist/lib/cubing/chunks/{chunk-KHUP3BPA.js → chunk-2IA2R7XV.js} +4 -4
  15. package/dist/lib/cubing/chunks/{chunk-5LBACZOM.js → chunk-5FXQPBXH.js} +4 -4
  16. package/dist/lib/cubing/chunks/{chunk-GO2SL6SC.js → chunk-6K433TB5.js} +3 -3
  17. package/dist/lib/cubing/chunks/{chunk-THRYJMRP.js → chunk-BQPY6252.js} +2 -2
  18. package/dist/lib/cubing/chunks/{chunk-O2QJENHE.js → chunk-IRY6MBI2.js} +3 -3
  19. package/dist/lib/cubing/chunks/{chunk-7MYDNYZ3.js → chunk-MFKLAFPQ.js} +6 -4
  20. package/dist/lib/cubing/chunks/chunk-MFKLAFPQ.js.map +7 -0
  21. package/dist/lib/cubing/chunks/{chunk-UWJ575HH.js → chunk-MIHF623Z.js} +3 -3
  22. package/dist/lib/cubing/chunks/{chunk-YFNXHRNE.js → chunk-UP5VP7GL.js} +60 -7
  23. package/dist/lib/cubing/chunks/chunk-UP5VP7GL.js.map +7 -0
  24. package/dist/lib/cubing/chunks/{chunk-ALR6ZQFC.js → chunk-YSAQ6DRT.js} +2 -2
  25. package/dist/lib/cubing/chunks/{inside-A7LIP56H.js → inside-N5WSMI7I.js} +25 -20
  26. package/dist/lib/cubing/chunks/inside-N5WSMI7I.js.map +7 -0
  27. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-YSB3MWLK.js → search-dynamic-sgs-side-events-5EIXNDVI.js} +6 -6
  28. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-OLK64DE6.js → search-dynamic-sgs-unofficial-Y7SIOVIX.js} +6 -6
  29. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-Y7SIOVIX.js.map +7 -0
  30. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-WWFUMIDG.js → search-dynamic-solve-4x4x4-FRAX3IPQ.js} +7 -7
  31. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-FRAX3IPQ.js.map +7 -0
  32. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-ZZKLTONP.js → search-dynamic-solve-fto-TI4TFL6X.js} +2 -2
  33. package/dist/lib/cubing/chunks/search-dynamic-solve-fto-TI4TFL6X.js.map +7 -0
  34. package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-PUF4PRHS.js → search-dynamic-solve-kilominx-UKFT6I42.js} +2 -2
  35. package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-UKFT6I42.js.map +7 -0
  36. package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
  37. package/dist/lib/cubing/chunks/{twips-LHO3IYJC.js → twips-UCWWA2WI.js} +2 -2
  38. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-A2G22YLA.js → twisty-dynamic-3d-O5TGOSAO.js} +105 -90
  39. package/dist/lib/cubing/chunks/twisty-dynamic-3d-O5TGOSAO.js.map +7 -0
  40. package/dist/lib/cubing/{index-C2x6Sc62.d.ts → index-BQdS3h4z.d.ts} +165 -161
  41. package/dist/lib/cubing/{index-Doa1gNE4.d.ts → index-COSxNAgV.d.ts} +4 -5
  42. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -2
  43. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  44. package/dist/lib/cubing/notation/index.d.ts +4 -5
  45. package/dist/lib/cubing/notation/index.js +4 -4
  46. package/dist/lib/cubing/{outside-nf-4k7Tp.d.ts → outside-BRtF0DA2.d.ts} +12 -9
  47. package/dist/lib/cubing/protocol/index.d.ts +3 -4
  48. package/dist/lib/cubing/protocol/index.js +4 -4
  49. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -2
  50. package/dist/lib/cubing/puzzle-geometry/index.js +1 -1
  51. package/dist/lib/cubing/puzzles/index.d.ts +2 -2
  52. package/dist/lib/cubing/puzzles/index.js +4 -4
  53. package/dist/lib/cubing/scramble/index.d.ts +1 -1
  54. package/dist/lib/cubing/scramble/index.js +6 -6
  55. package/dist/lib/cubing/search/index.d.ts +4 -5
  56. package/dist/lib/cubing/search/index.js +6 -6
  57. package/dist/lib/cubing/stream/index.d.ts +2 -2
  58. package/dist/lib/cubing/stream/index.js +1 -1
  59. package/dist/lib/cubing/twisty/index.d.ts +2 -2
  60. package/dist/lib/cubing/twisty/index.js +6 -6
  61. package/package.json +11 -10
  62. package/dist/bin/chunks/chunk-NPXQ2ZXZ.js.map +0 -7
  63. package/dist/lib/cubing/chunks/chunk-7MYDNYZ3.js.map +0 -7
  64. package/dist/lib/cubing/chunks/chunk-DTYBGCI3.js.map +0 -7
  65. package/dist/lib/cubing/chunks/chunk-YFNXHRNE.js.map +0 -7
  66. package/dist/lib/cubing/chunks/inside-A7LIP56H.js.map +0 -7
  67. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-OLK64DE6.js.map +0 -7
  68. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-WWFUMIDG.js.map +0 -7
  69. package/dist/lib/cubing/chunks/search-dynamic-solve-fto-ZZKLTONP.js.map +0 -7
  70. package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-PUF4PRHS.js.map +0 -7
  71. package/dist/lib/cubing/chunks/twisty-dynamic-3d-A2G22YLA.js.map +0 -7
  72. /package/dist/lib/cubing/chunks/{big-puzzle-orientation-G75BXW2W.js.map → big-puzzle-orientation-7WHPJCCO.js.map} +0 -0
  73. /package/dist/lib/cubing/chunks/{chunk-KHUP3BPA.js.map → chunk-2IA2R7XV.js.map} +0 -0
  74. /package/dist/lib/cubing/chunks/{chunk-5LBACZOM.js.map → chunk-5FXQPBXH.js.map} +0 -0
  75. /package/dist/lib/cubing/chunks/{chunk-GO2SL6SC.js.map → chunk-6K433TB5.js.map} +0 -0
  76. /package/dist/lib/cubing/chunks/{chunk-THRYJMRP.js.map → chunk-BQPY6252.js.map} +0 -0
  77. /package/dist/lib/cubing/chunks/{chunk-O2QJENHE.js.map → chunk-IRY6MBI2.js.map} +0 -0
  78. /package/dist/lib/cubing/chunks/{chunk-UWJ575HH.js.map → chunk-MIHF623Z.js.map} +0 -0
  79. /package/dist/lib/cubing/chunks/{chunk-ALR6ZQFC.js.map → chunk-YSAQ6DRT.js.map} +0 -0
  80. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-YSB3MWLK.js.map → search-dynamic-sgs-side-events-5EIXNDVI.js.map} +0 -0
  81. /package/dist/lib/cubing/chunks/{twips-LHO3IYJC.js.map → twips-UCWWA2WI.js.map} +0 -0
@@ -1,6 +1,5 @@
1
- import { Ct as AlgLeaf, R as KPattern } from "./index-C2x6Sc62.js";
2
-
3
- //#region src/cubing/stream/events.d.ts
1
+ import { R as KPattern, St as AlgLeaf } from "./index-BQdS3h4z.js";
2
+ //#region ../src/cubing/stream/events.d.ts
4
3
  /** @category Smart Puzzles */
5
4
  interface AlgLeafEvent {
6
5
  latestAlgLeaf: AlgLeaf;
@@ -33,7 +32,7 @@ interface ProxyResetEvent {
33
32
  }
34
33
  type ProxyEvent = ProxyMoveEvent | ProxyOrientationEvent | ProxyResetEvent;
35
34
  //#endregion
36
- //#region src/cubing/stream/twizzle/TwizzleStream.d.ts
35
+ //#region ../src/cubing/stream/twizzle/TwizzleStream.d.ts
37
36
  declare class TwizzleStream extends EventTarget {
38
37
  socket: WebSocket;
39
38
  constructor(url: string);
@@ -52,7 +51,7 @@ declare class TwizzleStreamServer {
52
51
  connect(streamID: string): TwizzleStream;
53
52
  }
54
53
  //#endregion
55
- //#region src/cubing/stream/websocket-proxy.d.ts
54
+ //#region ../src/cubing/stream/websocket-proxy.d.ts
56
55
  declare class WebSocketProxySender {
57
56
  protected websocket: WebSocket;
58
57
  constructor(url: string);
@@ -1,2 +1,2 @@
1
- import { B as KTransformation, G as KTransformationData, H as KPatternData, K as KTransformationOrbitData, R as KPattern, U as KPatternOrbitData, V as KPuzzleDefinition, W as KPuzzleOrbitDefinition, z as KPuzzle } from "../index-C2x6Sc62.js";
2
- export { KPattern, KPatternData, KPatternOrbitData, KPuzzle, KPuzzleDefinition, KPuzzleOrbitDefinition, KTransformation, KTransformationData, KTransformationOrbitData };
1
+ import { B as KTransformation, G as KTransformationData, H as KPatternData, K as KTransformationOrbitData, R as KPattern, U as KPatternOrbitData, V as KPuzzleDefinition, W as KPuzzleOrbitDefinition, z as KPuzzle } from "../index-BQdS3h4z.js";
2
+ export { KPattern, type KPatternData, type KPatternOrbitData, KPuzzle, type KPuzzleDefinition, type KPuzzleOrbitDefinition, KTransformation, type KTransformationData, type KTransformationOrbitData };
@@ -2,8 +2,8 @@ import {
2
2
  KPattern,
3
3
  KPuzzle,
4
4
  KTransformation
5
- } from "../chunks/chunk-THRYJMRP.js";
6
- import "../chunks/chunk-YFNXHRNE.js";
5
+ } from "../chunks/chunk-BQPY6252.js";
6
+ import "../chunks/chunk-UP5VP7GL.js";
7
7
  export {
8
8
  KPattern,
9
9
  KPuzzle,
@@ -1,9 +1,8 @@
1
- import { M as LeafCount, c as PuzzleLoader, gt as Alg } from "../index-C2x6Sc62.js";
2
-
3
- //#region src/cubing/notation/CountAnimatedLeaves.d.ts
1
+ import { M as LeafCount, c as PuzzleLoader, gt as Alg } from "../index-BQdS3h4z.js";
2
+ //#region ../src/cubing/notation/CountAnimatedLeaves.d.ts
4
3
  declare const countAnimatedLeaves: (alg: Alg) => LeafCount;
5
4
  //#endregion
6
- //#region src/cubing/notation/commonMetrics.d.ts
5
+ //#region ../src/cubing/notation/commonMetrics.d.ts
7
6
  type CommonMetric = (typeof CommonMetric)[keyof typeof CommonMetric];
8
7
  declare const CommonMetric: {
9
8
  OuterBlockTurnMetric: string;
@@ -21,7 +20,7 @@ declare const CommonMetricAlias: {
21
20
  SliceTurnMetric: string;
22
21
  };
23
22
  //#endregion
24
- //#region src/cubing/notation/CountMoves.d.ts
23
+ //#region ../src/cubing/notation/CountMoves.d.ts
25
24
  declare const countMoves: (alg: Alg) => number;
26
25
  declare const countMovesETM: (alg: Alg) => number;
27
26
  /**
@@ -5,10 +5,10 @@ import {
5
5
  countMetricMoves,
6
6
  countMoves,
7
7
  countMovesETM
8
- } from "../chunks/chunk-UWJ575HH.js";
9
- import "../chunks/chunk-5LBACZOM.js";
10
- import "../chunks/chunk-THRYJMRP.js";
11
- import "../chunks/chunk-YFNXHRNE.js";
8
+ } from "../chunks/chunk-MIHF623Z.js";
9
+ import "../chunks/chunk-5FXQPBXH.js";
10
+ import "../chunks/chunk-BQPY6252.js";
11
+ import "../chunks/chunk-UP5VP7GL.js";
12
12
  export {
13
13
  CommonMetric as ExperimentalCommonMetric,
14
14
  CommonMetricAlias as ExperimentalCommonMetricAlias,
@@ -1,15 +1,17 @@
1
- import { R as KPattern, gt as Alg, z as KPuzzle } from "./index-C2x6Sc62.js";
2
- //#region src/cubing/search/inside/solve/puzzles/3x3x3/index.d.ts
1
+ import { R as KPattern, gt as Alg, z as KPuzzle } from "./index-BQdS3h4z.js";
2
+ import "@cubing/lazy-promise";
3
+ //#region ../src/cubing/search/inside/solve/puzzles/3x3x3/index.d.ts
3
4
  declare function random333Pattern(): Promise<KPattern>;
4
5
  //#endregion
5
- //#region src/cubing/search/inside/api.d.ts
6
- declare enum PrefetchLevel {
7
- Auto = "auto",
8
- None = "none",
9
- Immediate = "immediate"
10
- }
6
+ //#region ../src/cubing/search/inside/api.d.ts
7
+ type PrefetchLevel = (typeof PrefetchLevel)[keyof typeof PrefetchLevel];
8
+ declare const PrefetchLevel: {
9
+ Auto: string;
10
+ None: string;
11
+ Immediate: string;
12
+ };
11
13
  //#endregion
12
- //#region src/cubing/search/outside.d.ts
14
+ //#region ../src/cubing/search/outside.d.ts
13
15
  declare function randomScrambleForEvent(eventID: string): Promise<Alg>;
14
16
  declare function deriveScrambleForEvent(derivationSeedHex: string, derivationSaltHierarchy: string[], eventID: string): Promise<Alg>;
15
17
  declare function experimentalSolve3x3x3IgnoringCenters(pattern: KPattern): Promise<Alg>;
@@ -31,6 +33,7 @@ interface SearchOutsideDebugGlobals {
31
33
  showWorkerInstantiationWarnings: boolean;
32
34
  forceTwipsForScrambles: boolean;
33
35
  allowLegacyPatternsForWorkerInstantiation: boolean;
36
+ allowNodeStyleWorkers: boolean;
34
37
  prioritizeEsbuildWorkaroundForWorkerInstantiation: boolean;
35
38
  allowDerivedScrambles: boolean;
36
39
  }
@@ -1,6 +1,5 @@
1
- import { R as KPattern } from "../index-C2x6Sc62.js";
2
-
3
- //#region src/cubing/protocol/binary/binary3x3x3.d.ts
1
+ import { R as KPattern } from "../index-BQdS3h4z.js";
2
+ //#region ../src/cubing/protocol/binary/binary3x3x3.d.ts
4
3
  type Binary3x3x3Pattern = Uint8Array;
5
4
  interface Binary3x3x3Components {
6
5
  epLex: number;
@@ -21,7 +20,7 @@ declare function binaryComponentsToReid3x3x3(components: Binary3x3x3Components):
21
20
  /** @category Binary 3x3x3 Format */
22
21
  declare function twizzleBinaryToReid3x3x3(buffy: ArrayBuffer | Uint8Array): KPattern;
23
22
  //#endregion
24
- //#region src/cubing/protocol/binary/hex.d.ts
23
+ //#region ../src/cubing/protocol/binary/hex.d.ts
25
24
  declare function bufferToSpacedHex(buffer: ArrayBuffer | Uint8Array): string;
26
25
  declare function spacedHexToBuffer(hex: string): Uint8Array;
27
26
  //#endregion
@@ -5,10 +5,10 @@ import {
5
5
  spacedHexToBuffer,
6
6
  twizzleBinaryToBinaryComponents,
7
7
  twizzleBinaryToReid3x3x3
8
- } from "../chunks/chunk-O2QJENHE.js";
9
- import "../chunks/chunk-5LBACZOM.js";
10
- import "../chunks/chunk-THRYJMRP.js";
11
- import "../chunks/chunk-YFNXHRNE.js";
8
+ } from "../chunks/chunk-IRY6MBI2.js";
9
+ import "../chunks/chunk-5FXQPBXH.js";
10
+ import "../chunks/chunk-BQPY6252.js";
11
+ import "../chunks/chunk-UP5VP7GL.js";
12
12
  export {
13
13
  binaryComponentsToReid3x3x3 as experimentalBinaryComponentsToReid3x3x3,
14
14
  bufferToSpacedHex as experimentalBufferToSpacedHex,
@@ -1,2 +1,2 @@
1
- import { $ as PuzzleDescription, J as PUZZLE_BASE_SHAPES, L as schreierSims, Q as PuzzleCutType, X as PuzzleBaseShape, Y as PUZZLE_CUT_TYPES, Z as PuzzleCutDescription, at as getPG3DNamedPuzzles, ct as getPuzzleGeometryByName, dt as PuzzleGeometryOptions, et as PuzzleGeometry, it as StickerDatSticker, lt as parsePuzzleDescription, nt as StickerDatAxis, ot as getPuzzleDescriptionString, q as PGNotation, rt as StickerDatFace, st as getPuzzleGeometryByDesc, tt as StickerDat, ut as Quat } from "../index-C2x6Sc62.js";
2
- export { PUZZLE_BASE_SHAPES as EXPERIMENTAL_PUZZLE_BASE_SHAPES, PUZZLE_CUT_TYPES as EXPERIMENTAL_PUZZLE_CUT_TYPES, PGNotation as ExperimentalPGNotation, PuzzleBaseShape as ExperimentalPuzzleBaseShape, PuzzleCutDescription as ExperimentalPuzzleCutDescription, PuzzleCutType as ExperimentalPuzzleCutType, PuzzleDescription as ExperimentalPuzzleDescription, PuzzleGeometryOptions as ExperimentalPuzzleGeometryOptions, PuzzleGeometry, Quat, StickerDat, StickerDatAxis, StickerDatFace, StickerDatSticker, getPG3DNamedPuzzles, getPuzzleDescriptionString, getPuzzleGeometryByDesc, getPuzzleGeometryByName, parsePuzzleDescription, schreierSims };
1
+ import { $ as PuzzleDescription, J as PUZZLE_BASE_SHAPES, L as schreierSims, Q as PuzzleCutType, X as PuzzleBaseShape, Y as PUZZLE_CUT_TYPES, Z as PuzzleCutDescription, at as getPG3DNamedPuzzles, ct as getPuzzleGeometryByName, dt as PuzzleGeometryOptions, et as PuzzleGeometry, it as StickerDatSticker, lt as parsePuzzleDescription, nt as StickerDatAxis, ot as getPuzzleDescriptionString, q as PGNotation, rt as StickerDatFace, st as getPuzzleGeometryByDesc, tt as StickerDat, ut as Quat } from "../index-BQdS3h4z.js";
2
+ export { PUZZLE_BASE_SHAPES as EXPERIMENTAL_PUZZLE_BASE_SHAPES, PUZZLE_CUT_TYPES as EXPERIMENTAL_PUZZLE_CUT_TYPES, PGNotation as ExperimentalPGNotation, type PuzzleBaseShape as ExperimentalPuzzleBaseShape, type PuzzleCutDescription as ExperimentalPuzzleCutDescription, type PuzzleCutType as ExperimentalPuzzleCutType, type PuzzleDescription as ExperimentalPuzzleDescription, type PuzzleGeometryOptions as ExperimentalPuzzleGeometryOptions, PuzzleGeometry, Quat, type StickerDat, type StickerDatAxis, type StickerDatFace, type StickerDatSticker, getPG3DNamedPuzzles, getPuzzleDescriptionString, getPuzzleGeometryByDesc, getPuzzleGeometryByName, parsePuzzleDescription, schreierSims };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Move,
3
3
  QuantumMove
4
- } from "../chunks/chunk-YFNXHRNE.js";
4
+ } from "../chunks/chunk-UP5VP7GL.js";
5
5
 
6
6
  // src/cubing/puzzle-geometry/colors.ts
7
7
  var PGColors = {
@@ -1,2 +1,2 @@
1
- import { _ as cube2x2x2, b as wcaEventInfo, c as PuzzleLoader, g as cube3x3x3, h as puzzles, v as eventInfo, x as wcaEvents, y as twizzleEvents } from "../index-C2x6Sc62.js";
2
- export { PuzzleLoader, cube2x2x2, cube3x3x3, eventInfo, puzzles, twizzleEvents, wcaEventInfo, wcaEvents };
1
+ import { _ as cube2x2x2, b as wcaEventInfo, c as PuzzleLoader, g as cube3x3x3, h as puzzles, v as eventInfo, x as wcaEvents, y as twizzleEvents } from "../index-BQdS3h4z.js";
2
+ export { type PuzzleLoader, cube2x2x2, cube3x3x3, eventInfo, puzzles, twizzleEvents, wcaEventInfo, wcaEvents };
@@ -5,12 +5,12 @@ import {
5
5
  twizzleEvents,
6
6
  wcaEventInfo,
7
7
  wcaEvents
8
- } from "../chunks/chunk-KHUP3BPA.js";
8
+ } from "../chunks/chunk-2IA2R7XV.js";
9
9
  import {
10
10
  cube3x3x3
11
- } from "../chunks/chunk-5LBACZOM.js";
12
- import "../chunks/chunk-THRYJMRP.js";
13
- import "../chunks/chunk-YFNXHRNE.js";
11
+ } from "../chunks/chunk-5FXQPBXH.js";
12
+ import "../chunks/chunk-BQPY6252.js";
13
+ import "../chunks/chunk-UP5VP7GL.js";
14
14
  export {
15
15
  cube2x2x2,
16
16
  cube3x3x3,
@@ -1,2 +1,2 @@
1
- import { i as randomScrambleForEvent, t as deriveScrambleForEvent } from "../outside-nf-4k7Tp.js";
1
+ import { i as randomScrambleForEvent, t as deriveScrambleForEvent } from "../outside-BRtF0DA2.js";
2
2
  export { deriveScrambleForEvent as experimentalDeriveScrambleForEvent, randomScrambleForEvent };
@@ -2,13 +2,13 @@ import "../chunks/chunk-NAPITA3L.js";
2
2
  import {
3
3
  deriveScrambleForEvent,
4
4
  randomScrambleForEvent
5
- } from "../chunks/chunk-7MYDNYZ3.js";
6
- import "../chunks/chunk-DTYBGCI3.js";
5
+ } from "../chunks/chunk-MFKLAFPQ.js";
6
+ import "../chunks/chunk-2BVL5OQE.js";
7
7
  import "../chunks/chunk-7GUL3OBQ.js";
8
- import "../chunks/chunk-KHUP3BPA.js";
9
- import "../chunks/chunk-5LBACZOM.js";
10
- import "../chunks/chunk-THRYJMRP.js";
11
- import "../chunks/chunk-YFNXHRNE.js";
8
+ import "../chunks/chunk-2IA2R7XV.js";
9
+ import "../chunks/chunk-5FXQPBXH.js";
10
+ import "../chunks/chunk-BQPY6252.js";
11
+ import "../chunks/chunk-UP5VP7GL.js";
12
12
  export {
13
13
  deriveScrambleForEvent as experimentalDeriveScrambleForEvent,
14
14
  randomScrambleForEvent
@@ -1,7 +1,6 @@
1
- import { a as setSearchDebug, c as solveSkewb, l as solveTwips, n as experimentalSolve2x2x2, o as solveMegaminx, r as experimentalSolve3x3x3IgnoringCenters, s as solvePyraminx, u as random333Pattern } from "../outside-nf-4k7Tp.js";
2
-
3
- //#region src/cubing/search/index.d.ts
1
+ import { a as setSearchDebug, c as solveSkewb, l as solveTwips, n as experimentalSolve2x2x2, o as solveMegaminx, r as experimentalSolve3x3x3IgnoringCenters, s as solvePyraminx, u as random333Pattern } from "../outside-BRtF0DA2.js";
2
+ //#region ../src/cubing/search/index.d.ts
4
3
  /** @deprecated */
5
- declare const experimentalSolveTwsearch: typeof solveTwips;
4
+ export declare const experimentalSolveTwsearch: typeof solveTwips;
6
5
  //#endregion
7
- export { experimentalSolve2x2x2, experimentalSolve3x3x3IgnoringCenters, solveTwips as experimentalSolveTwips, experimentalSolveTwsearch, random333Pattern, setSearchDebug, solveMegaminx, solvePyraminx, solveSkewb };
6
+ export { experimentalSolve2x2x2, experimentalSolve3x3x3IgnoringCenters, solveTwips as experimentalSolveTwips, random333Pattern, setSearchDebug, solveMegaminx, solvePyraminx, solveSkewb };
@@ -6,15 +6,15 @@ import {
6
6
  solvePyraminx,
7
7
  solveSkewb,
8
8
  solveTwips
9
- } from "../chunks/chunk-7MYDNYZ3.js";
9
+ } from "../chunks/chunk-MFKLAFPQ.js";
10
10
  import {
11
11
  random333Pattern
12
- } from "../chunks/chunk-DTYBGCI3.js";
12
+ } from "../chunks/chunk-2BVL5OQE.js";
13
13
  import "../chunks/chunk-7GUL3OBQ.js";
14
- import "../chunks/chunk-KHUP3BPA.js";
15
- import "../chunks/chunk-5LBACZOM.js";
16
- import "../chunks/chunk-THRYJMRP.js";
17
- import "../chunks/chunk-YFNXHRNE.js";
14
+ import "../chunks/chunk-2IA2R7XV.js";
15
+ import "../chunks/chunk-5FXQPBXH.js";
16
+ import "../chunks/chunk-BQPY6252.js";
17
+ import "../chunks/chunk-UP5VP7GL.js";
18
18
 
19
19
  // src/cubing/search/index.ts
20
20
  var experimentalSolveTwsearch = (...args) => {
@@ -1,2 +1,2 @@
1
- import { a as OrientationEvent, c as ProxyOrientationEvent, i as AlgLeafEvent, l as ProxyResetEvent, n as WebSocketProxySender, o as ProxyEvent, r as TwizzleStreamServer, s as ProxyMoveEvent, t as WebSocketProxyReceiver } from "../index-Doa1gNE4.js";
2
- export { AlgLeafEvent as ExperimentalAlgLeafEvent, OrientationEvent as ExperimentalOrientationEvent, ProxyEvent as ExperimentalProxyEvent, ProxyMoveEvent as ExperimentalProxyMoveEvent, ProxyOrientationEvent as ExperimentalProxyOrientationEvent, ProxyResetEvent as ExperimentalProxyResetEvent, TwizzleStreamServer as ExperimentalTwizzleStreamServer, WebSocketProxyReceiver as ExperimentalWebSocketProxyReceiver, WebSocketProxySender as ExperimentalWebSocketProxySender };
1
+ import { a as OrientationEvent, c as ProxyOrientationEvent, i as AlgLeafEvent, l as ProxyResetEvent, n as WebSocketProxySender, o as ProxyEvent, r as TwizzleStreamServer, s as ProxyMoveEvent, t as WebSocketProxyReceiver } from "../index-COSxNAgV.js";
2
+ export { type AlgLeafEvent as ExperimentalAlgLeafEvent, type OrientationEvent as ExperimentalOrientationEvent, type ProxyEvent as ExperimentalProxyEvent, type ProxyMoveEvent as ExperimentalProxyMoveEvent, type ProxyOrientationEvent as ExperimentalProxyOrientationEvent, type ProxyResetEvent as ExperimentalProxyResetEvent, TwizzleStreamServer as ExperimentalTwizzleStreamServer, WebSocketProxyReceiver as ExperimentalWebSocketProxyReceiver, WebSocketProxySender as ExperimentalWebSocketProxySender };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Move,
3
3
  QuantumMove
4
- } from "../chunks/chunk-YFNXHRNE.js";
4
+ } from "../chunks/chunk-UP5VP7GL.js";
5
5
 
6
6
  // src/cubing/stream/twizzle/TwizzleStream.ts
7
7
  var TwizzleStream = class extends EventTarget {
@@ -1,2 +1,2 @@
1
- import { A as SimpleAlgIndexer, C as VisualizationFormat, D as PuzzleID, E as ExperimentalStickering, F as MillisecondDuration, I as MillisecondTimestamp, M as LeafCount, N as LeafIndex, O as setTwistyDebug, P as NO_VALUE, S as TwistyAnimatedSVG, T as backViewLayouts, d as TwistyAlgEditor, j as AlgIndexer, k as TreeAlgIndexer, l as TwizzleLink, m as TwistyPlayerConfig, p as TwistyPlayer, u as TwistyAlgViewer, w as BackViewLayout } from "../index-C2x6Sc62.js";
2
- export { AlgIndexer, BackViewLayout, NO_VALUE as EXPERIMENTAL_PROP_NO_VALUE, LeafCount as ExperimentalLeafCount, LeafIndex as ExperimentalLeafIndex, MillisecondDuration as ExperimentalMillisecondDuration, MillisecondTimestamp as ExperimentalMillisecondTimestamp, TwistyAnimatedSVG as ExperimentalSVGAnimator, ExperimentalStickering, PuzzleID, SimpleAlgIndexer, TreeAlgIndexer, TwistyAlgEditor, TwistyAlgViewer, TwistyPlayer, TwistyPlayerConfig, TwizzleLink, VisualizationFormat, backViewLayouts, setTwistyDebug };
1
+ import { A as SimpleAlgIndexer, C as VisualizationFormat, D as PuzzleID, E as ExperimentalStickering, F as MillisecondDuration, I as MillisecondTimestamp, M as LeafCount, N as LeafIndex, O as setTwistyDebug, P as NO_VALUE, S as TwistyAnimatedSVG, T as backViewLayouts, d as TwistyAlgEditor, j as AlgIndexer, k as TreeAlgIndexer, l as TwizzleLink, m as TwistyPlayerConfig, p as TwistyPlayer, u as TwistyAlgViewer, w as BackViewLayout } from "../index-BQdS3h4z.js";
2
+ export { type AlgIndexer, type BackViewLayout, NO_VALUE as EXPERIMENTAL_PROP_NO_VALUE, type LeafCount as ExperimentalLeafCount, type LeafIndex as ExperimentalLeafIndex, type MillisecondDuration as ExperimentalMillisecondDuration, type MillisecondTimestamp as ExperimentalMillisecondTimestamp, TwistyAnimatedSVG as ExperimentalSVGAnimator, type ExperimentalStickering, type PuzzleID, SimpleAlgIndexer, TreeAlgIndexer, TwistyAlgEditor, TwistyAlgViewer, TwistyPlayer, type TwistyPlayerConfig, TwizzleLink, type VisualizationFormat, backViewLayouts, setTwistyDebug };
@@ -18,24 +18,24 @@ import {
18
18
  rawRenderPooled,
19
19
  setCameraFromOrbitCoordinates,
20
20
  setTwistyDebug
21
- } from "../chunks/chunk-GO2SL6SC.js";
21
+ } from "../chunks/chunk-6K433TB5.js";
22
22
  import {
23
23
  CommonMetric,
24
24
  countAnimatedLeaves,
25
25
  countLeavesInExpansionForSimultaneousMoveIndexer,
26
26
  countMetricMoves
27
- } from "../chunks/chunk-UWJ575HH.js";
27
+ } from "../chunks/chunk-MIHF623Z.js";
28
28
  import {
29
29
  puzzles
30
- } from "../chunks/chunk-KHUP3BPA.js";
30
+ } from "../chunks/chunk-2IA2R7XV.js";
31
31
  import {
32
32
  PieceStickering,
33
33
  cube3x3x3,
34
34
  customPGPuzzleLoader,
35
35
  getPartialAppendOptionsForPuzzleSpecificSimplifyOptions,
36
36
  getPieceStickeringMask
37
- } from "../chunks/chunk-5LBACZOM.js";
38
- import "../chunks/chunk-THRYJMRP.js";
37
+ } from "../chunks/chunk-5FXQPBXH.js";
38
+ import "../chunks/chunk-BQPY6252.js";
39
39
  import {
40
40
  Alg,
41
41
  AlgBuilder,
@@ -55,7 +55,7 @@ import {
55
55
  functionFromTraversal,
56
56
  offsetMod,
57
57
  startCharIndexKey
58
- } from "../chunks/chunk-YFNXHRNE.js";
58
+ } from "../chunks/chunk-UP5VP7GL.js";
59
59
 
60
60
  // src/cubing/twisty/controllers/indexer/AlgDuration.ts
61
61
  function defaultDurationForAmount(amount) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cubing",
3
- "version": "0.65.0",
3
+ "version": "0.65.2",
4
4
  "description": "A collection of JavaScript cubing libraries.",
5
5
  "author": "The js.cubing.net team",
6
6
  "license": "MPL-2.0 OR GPL-3.0-or-later",
@@ -13,6 +13,10 @@
13
13
  "node": ">=22.3.0",
14
14
  "bun": ">=1.3.0"
15
15
  },
16
+ "enginesForDev": {
17
+ "node": ">=26.10.0",
18
+ "bun": ">=1.4.3"
19
+ },
16
20
  "type": "module",
17
21
  "exports": {
18
22
  "./alg": {
@@ -75,13 +79,13 @@
75
79
  },
76
80
  "devDependencies": {
77
81
  "@biomejs/biome": "^2.5.13",
78
- "@cubing/comlink-everywhere": ">=0.1.2",
82
+ "@cubing/comlink-everywhere": ">=0.1.3",
79
83
  "@cubing/deploy": ">=0.4.11",
80
- "@cubing/dev-config": ">=0.10.1",
84
+ "@cubing/dev-config": ">=0.11.3",
85
+ "@cubing/thirdparty-fonts": "^0.1.0",
81
86
  "@esm-bundle/chai": "^4.3.4-fix.0",
82
- "@fontsource/ubuntu": "^5.3.0",
83
87
  "@schemastore/package": "^0.0.10",
84
- "@types/bun": "^1.3.14",
88
+ "@types/bun": "^1.4.3",
85
89
  "@types/chai": "^5.0.0",
86
90
  "@types/dom-speech-recognition": "^0.0.8",
87
91
  "@types/mocha": "^10.0.8",
@@ -100,7 +104,7 @@
100
104
  "path-class": ">=0.15.1",
101
105
  "playwright": "^1.58.0",
102
106
  "printable-shell-command": "^5.3.0",
103
- "tsdown": "^0.21.10",
107
+ "tsdown": ">=0.23.1",
104
108
  "typedoc": "^0.28.18",
105
109
  "zod": "^4.6.2"
106
110
  },
@@ -137,8 +141,5 @@
137
141
  "fromLocalDir": "./dist/sites/experiments.cubing.net/cubing.js/"
138
142
  }
139
143
  },
140
- "$schema": "./node_modules/@cubing/deploy/config-schema.package.json",
141
- "patchedDependencies": {
142
- "bun-types@1.3.14": "patches/bun-types@1.3.14.patch"
143
- }
144
+ "$schema": "./node_modules/@cubing/deploy/config-schema.package.json"
144
145
  }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/metadata/packageVersion.ts"],
4
- "sourcesContent": ["export const packageVersion: string =\n // biome-ignore lint/suspicious/noTsIgnore: This comment is stil present in the compiled file, where an error is *not* expected.\n /** @ts-ignore Populated by `esbuild` at compile time. */\n globalThis.PACKAGE_VERSION ??\n // We don't want to pull in the dynamic code into the import graph, so we use\n // dynamic import here. This entire fallback expression should get compiled\n // out by `esbuild`.\n (await import(\"./packageVersionDynamic.ts\")).version;\n"],
5
- "mappings": ";;;AAAO,IAAM;AAAA;AAAA;AAAA,EAGX;AAAA;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/cubing/search/worker-workarounds/index.ts", "../../../../src/cubing/search/instantiator.ts", "../../../../src/cubing/search/outside.ts"],
4
- "sourcesContent": ["import { exposeAPI } from \"./worker-guard.ts\";\n\nexport function searchWorkerURLImportMetaResolve(): string {\n // Note:\n // - We have to hardcode the expected path of the entry file in the ESM build, due to lack of `esbuild` support: https://github.com/evanw/esbuild/issues/2866\n // - This URL is based on the assumption that the code from this file ends up in a shared chunk in the `esm` build. This is not guaranteed by `esbuild`, but it consistently happens for our codebase.\n // - We inline the value (instead of using a constant), to maximize compatibility for hardcoded syntax detection in bundlers.\n return import.meta.resolve(\"./search-worker-entry.js\");\n}\n\nexport function searchWorkerURLNewURLImportMetaURL(): URL {\n // Note:\n // - We have to hardcode the expected path of the entry file in the ESM build, due to lack of `esbuild` support: https://github.com/evanw/esbuild/issues/795\n // - This URL is based on the assumption that the code from this file ends up in a shared chunk in the `esm` build. This is not guaranteed by `esbuild`, but it consistently happens for our codebase.\n // - We inline the value (instead of using a constant), to maximize compatibility for hardcoded syntax detection in bundlers.\n return new URL(\"./search-worker-entry.js\", import.meta.url);\n}\n\n// Workaround for `esbuild`: https://github.com/evanw/esbuild/issues/312#issuecomment-1092195778\nexport async function searchWorkerURLEsbuildWorkaround(): Promise<string> {\n exposeAPI.expose = false;\n return (await import(\"./search-worker-entry.js\")).WORKER_ENTRY_FILE_URL;\n}\n\nexport function instantiateSearchWorkerURLNewURLImportMetaURL(): Worker {\n return new Worker(new URL(\"./search-worker-entry.js\", import.meta.url), {\n type: \"module\",\n });\n}\n", "import type { Worker as NodeWorker } from \"node:worker_threads\";\nimport { PortableWorker, wrap } from \"@cubing/comlink-everywhere\";\nimport type { WorkerAPI } from \"./inside/api.ts\";\nimport { searchOutsideDebugGlobals } from \"./outside.ts\";\nimport {\n searchWorkerURLEsbuildWorkaround,\n searchWorkerURLImportMetaResolve,\n searchWorkerURLNewURLImportMetaURL,\n} from \"./worker-workarounds/index.ts\";\n\nfunction wrapAPI(worker: Worker | NodeWorker): WorkerAPI {\n return wrap<WorkerAPI>(worker);\n}\n\nasync function instantiateModuleWorker(\n workerEntryFileURL: string | URL,\n): Promise<WorkerAPI> {\n // biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO\n return new Promise<WorkerAPI>(async (resolve, reject) => {\n try {\n const worker = new PortableWorker(workerEntryFileURL);\n\n // TODO: Remove this once we can remove the workarounds for lack of `import.meta.resolve(\u2026)` support.\n const onFirstMessage = (messageData: string) => {\n if (messageData === \"comlink-exposed\") {\n // We need to clear the timeout so that we don't prevent `node` from exiting in the meantime.\n resolve(wrapAPI(worker));\n } else {\n reject(\n new Error(`wrong module instantiation message ${messageData}`),\n );\n }\n };\n\n const onError = (e: ErrorEvent) => {\n reject(e);\n };\n\n if (\"once\" in worker /* hack to detect `node` */) {\n // We have to use `once` so the `unref()` from `comlink-everywhere` allows the process to quit as expected.\n worker.once(\"message\", onFirstMessage);\n } else {\n worker.addEventListener(\"error\", onError, {\n once: true,\n });\n worker.addEventListener(\n \"message\",\n (e: MessageEvent) => onFirstMessage(e.data),\n {\n once: true,\n },\n );\n }\n } catch (e) {\n reject(e);\n }\n });\n}\n\nexport const allWorkerAPIPromises: Promise<WorkerAPI>[] = [];\n\nexport async function instantiateWorkerAPI(): Promise<WorkerAPI> {\n const workerAPIPromise = instantiateWorkerImplementation();\n allWorkerAPIPromises.push(workerAPIPromise);\n const insideAPI = await workerAPIPromise;\n insideAPI.setDebugMeasurePerf(searchOutsideDebugGlobals.logPerf);\n insideAPI.setDebugForceTwipsForScrambles(\n searchOutsideDebugGlobals.forceTwipsForScrambles,\n );\n insideAPI.setScramblePrefetchLevel(\n searchOutsideDebugGlobals.scramblePrefetchLevel,\n );\n return workerAPIPromise;\n}\n\ntype FallbackStrategyInfo = [\n fn: () => Promise<WorkerAPI>,\n description: string,\n warnOnSuccess: null | string,\n];\n\nfunction fallbackOrder(): FallbackStrategyInfo[] {\n const importMetaResolveStrategy: FallbackStrategyInfo = [\n async () => instantiateModuleWorker(searchWorkerURLImportMetaResolve()),\n \"using `import.meta.resolve(\u2026)\",\n null,\n ];\n const esbuildWorkaroundStrategy: FallbackStrategyInfo = [\n async () =>\n instantiateModuleWorker(await searchWorkerURLEsbuildWorkaround()),\n \"using the `esbuild` workaround\",\n // TODO: we will hopefully discontinue the `esbuild` workaround at some\n // point, but `esbuild` has been stuck for 3 years on this issue. Because\n // `esbuild` and Vite (which uses `esbuild`) are now dominating the\n // ecosystem, this just causes a warning for a lot of devs/users that they\n // can't do anything about. As frustrating as the situation is, the\n // workaround is semantically fine (even if it's convoluted) and is\n // preserved by `esbuild`-based flows in practice. So we suppress the\n // warning in the medium-term but maintain long-term hope that we can\n // remove it (and the other fallbacks as well).\n null,\n ];\n const newURLStrategy: FallbackStrategyInfo = [\n async () => instantiateModuleWorker(searchWorkerURLNewURLImportMetaURL()),\n \"using `new URL(\u2026, import.meta.url)`\",\n \"will\",\n ];\n\n if (!searchOutsideDebugGlobals.allowLegacyPatternsForWorkerInstantiation) {\n return [importMetaResolveStrategy];\n }\n if (\n searchOutsideDebugGlobals.prioritizeEsbuildWorkaroundForWorkerInstantiation\n ) {\n return [\n esbuildWorkaroundStrategy,\n importMetaResolveStrategy,\n newURLStrategy,\n ];\n }\n return [importMetaResolveStrategy, esbuildWorkaroundStrategy, newURLStrategy];\n}\n\nasync function instantiateWorkerImplementation(): Promise<WorkerAPI> {\n if (globalThis.location?.protocol === \"file:\") {\n console.warn(\n \"This current web page is loaded from the local filesystem (a URL that starts with `file://`). In this situation, `cubing.js` may be unable to generate scrambles or perform searches in some browsers. See: https://js.cubing.net/cubing/scramble/#file-server-required\",\n );\n }\n\n function failed(methodDescription?: string) {\n return `Module worker instantiation${\n methodDescription ? ` ${methodDescription}` : \"\"\n } failed`;\n }\n\n for (const [fn, description, warnOnSuccess] of fallbackOrder()) {\n try {\n const worker = await fn();\n if (warnOnSuccess) {\n if (searchOutsideDebugGlobals.showWorkerInstantiationWarnings) {\n console.warn(\n `Module worker instantiation required ${description}. \\`cubing.js\\` ${warnOnSuccess} not support this fallback in the future.`,\n );\n }\n }\n return worker;\n } catch (e) {\n if (searchOutsideDebugGlobals.showWorkerInstantiationWarnings) {\n console.warn(`${failed(description)}, falling back.`, e);\n }\n }\n }\n\n throw new Error(\n `Module worker instantiation failed. There are no more fallbacks available.`,\n );\n}\n", "import { Alg } from \"../alg/index.ts\";\nimport type { KPuzzle } from \"../kpuzzle/index.ts\";\n// import { preInitialize222 } from \"../implementations/2x2x2\";\nimport type { KPattern } from \"../kpuzzle/KPattern.ts\";\nimport type { PrefetchLevel, WorkerAPI } from \"./inside/api.ts\";\nimport type { TwipsOptions } from \"./inside/solve/twips.ts\";\nimport { allWorkerAPIPromises, instantiateWorkerAPI } from \"./instantiator.ts\";\n\nlet cachedWorkerInstance: Promise<WorkerAPI> | undefined;\nfunction getCachedWorkerInstance(): Promise<WorkerAPI> {\n return (cachedWorkerInstance ??= instantiateWorkerAPI());\n}\n\nexport async function mapToAllWorkers(\n f: (worker: WorkerAPI) => void,\n): Promise<void> {\n await Promise.all(\n allWorkerAPIPromises.map(async (worker) => {\n f(await worker);\n }),\n );\n}\n\n// Pre-initialize the scrambler for the given event. (Otherwise, an event is\n// initialized the first time you ask for a scramble for that event.)\n//\n// Some typical numbers for a fast computer:\n// - 3x3x3 initialization: 200ms\n// - Each 3x3x3 scramble: 50ms\n// - 4x4x4 initialization: 2500ms\n// - Each 4x4x4 scramble: 300ms to 800ms\n//\n// It is safe to immediately call for a scramble\n// any time after starting pre-initialization, or to call for them without\n// pre-initializing. Pre-initializing essentially gives the scramble worker a\n// head start in case a scramble doesn't get requested immediately.\n//\n// Note that events cannot be pre-initialized in parallel. Attempting to\n// pre-initialize multiple events will initialize them consecutively. Scrambles\n// for a given event cannot be computed while another event is being initialized.\nexport function _preInitializationHintForEvent(\n eventID: string,\n // callback?: () => void\n): void {\n switch (eventID) {\n case \"333oh\":\n _preInitializationHintForEvent(\"333\");\n return;\n }\n void (async () => {\n await (await getCachedWorkerInstance()).initialize(eventID);\n })();\n}\n\nexport async function randomScrambleForEvent(eventID: string): Promise<Alg> {\n const worker = searchOutsideDebugGlobals.forceNewWorkerForEveryScramble\n ? await instantiateWorkerAPI()\n : await getCachedWorkerInstance();\n const scrambleString = await worker.randomScrambleStringForEvent(eventID);\n\n return Alg.fromString(scrambleString);\n}\n\nexport async function deriveScrambleForEvent(\n derivationSeedHex: string,\n derivationSaltHierarchy: string[],\n eventID: string,\n): Promise<Alg> {\n if (!searchOutsideDebugGlobals.allowDerivedScrambles) {\n throw new Error(\"Derived scrambles are not allowed.\");\n }\n const worker = searchOutsideDebugGlobals.forceNewWorkerForEveryScramble\n ? await instantiateWorkerAPI()\n : await getCachedWorkerInstance();\n const scrambleString = await worker.deriveScrambleStringForEvent(\n derivationSeedHex,\n derivationSaltHierarchy,\n eventID,\n );\n return Alg.fromString(scrambleString);\n}\n\nexport async function experimentalSolve3x3x3IgnoringCenters(\n pattern: KPattern,\n): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(await cwi.solve333ToString(pattern.patternData));\n}\n\nexport async function experimentalSolve2x2x2(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(await cwi.solve222ToString(pattern.patternData));\n}\n\nexport async function solveSkewb(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(await cwi.solveSkewbToString(pattern.patternData));\n}\n\nexport async function solvePyraminx(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(await cwi.solvePyraminxToString(pattern.patternData));\n}\n\nexport async function solveMegaminx(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(await cwi.solveMegaminxToString(pattern.patternData));\n}\n\nexport interface SolveTwipsOptions {\n generatorMoves?: string[];\n targetPattern?: KPattern;\n minDepth?: number;\n maxDepth?: number;\n}\n\nexport async function solveTwips(\n kpuzzle: KPuzzle,\n pattern: KPattern,\n options?: SolveTwipsOptions,\n): Promise<Alg> {\n const { targetPattern, ...otherOptions } = options ?? {};\n const apiOptions: TwipsOptions = otherOptions;\n if (targetPattern) {\n apiOptions.targetPattern = targetPattern.patternData;\n }\n const { ...def } = kpuzzle.definition;\n delete def.experimentalIsPatternSolved;\n // delete def.derivedMoves;\n const dedicatedWorker = await instantiateWorkerAPI();\n try {\n return Alg.fromString(\n // TODO: unnecessary because we terminate the worker?\n await dedicatedWorker.solveTwipsToString(\n def,\n pattern.patternData,\n apiOptions,\n ),\n );\n } finally {\n console.log(\"Search ended, terminating dedicated `twips` worker.\");\n // TODO: support re-using the same worker for multiple searches..\n // dedicatedWorker.terminate?.(); // TODO\n }\n}\n\ninterface SearchOutsideDebugGlobals {\n logPerf: boolean;\n scramblePrefetchLevel: `${PrefetchLevel}`;\n forceNewWorkerForEveryScramble: boolean;\n showWorkerInstantiationWarnings: boolean;\n forceTwipsForScrambles: boolean;\n // Allow fallbacks from `import.meta.resolve(\u2026)`.\n allowLegacyPatternsForWorkerInstantiation: boolean;\n // This can prevent a request to `search-worker-entry.js` when it doesn't exist, if the library semantics have been mangled by `esbuild`.\n prioritizeEsbuildWorkaroundForWorkerInstantiation: boolean;\n allowDerivedScrambles: boolean;\n}\n\nexport const searchOutsideDebugGlobals: SearchOutsideDebugGlobals = {\n logPerf: true,\n scramblePrefetchLevel: \"auto\",\n forceNewWorkerForEveryScramble: false,\n forceTwipsForScrambles: false,\n showWorkerInstantiationWarnings: false,\n prioritizeEsbuildWorkaroundForWorkerInstantiation: false,\n allowLegacyPatternsForWorkerInstantiation: true,\n allowDerivedScrambles: false,\n};\n\nexport function setSearchDebug(\n options: Partial<SearchOutsideDebugGlobals>,\n): void {\n const { logPerf, forceTwipsForScrambles, scramblePrefetchLevel } = options;\n if (typeof logPerf !== \"undefined\") {\n searchOutsideDebugGlobals.logPerf = logPerf;\n void mapToAllWorkers((worker) => worker.setDebugMeasurePerf(logPerf));\n }\n if (typeof forceTwipsForScrambles !== \"undefined\") {\n searchOutsideDebugGlobals.forceTwipsForScrambles = forceTwipsForScrambles;\n void mapToAllWorkers((worker) =>\n worker.setDebugMeasurePerf(forceTwipsForScrambles),\n );\n }\n if (typeof scramblePrefetchLevel !== \"undefined\") {\n searchOutsideDebugGlobals.scramblePrefetchLevel = scramblePrefetchLevel;\n void mapToAllWorkers((worker) =>\n worker.setScramblePrefetchLevel(scramblePrefetchLevel as PrefetchLevel),\n );\n }\n for (const booleanField of [\n \"forceNewWorkerForEveryScramble\",\n \"showWorkerInstantiationWarnings\",\n \"prioritizeEsbuildWorkaroundForWorkerInstantiation\",\n \"allowLegacyPatternsForWorkerInstantiation\",\n \"allowDerivedScrambles\",\n ] as const) {\n if (booleanField in options) {\n searchOutsideDebugGlobals[booleanField] =\n options[booleanField] ?? searchOutsideDebugGlobals[booleanField];\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;AAEO,SAAS,mCAA2C;AAKzD,SAAO,YAAY,QAAQ,0BAA0B;AACvD;AAEO,SAAS,qCAA0C;AAKxD,SAAO,IAAI,IAAI,4BAA4B,YAAY,GAAG;AAC5D;AAGA,eAAsB,m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