cubing 0.49.0 → 0.49.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 (67) hide show
  1. package/dist/lib/cubing/{Alg.d-T-vs-GDG.d.ts → Alg.d-B5bAxd5U.d.ts} +1 -1
  2. package/dist/lib/cubing/{KPattern.d-eWxoJtl0.d.ts → KPattern.d-Iv89gNss.d.ts} +1 -1
  3. package/dist/lib/cubing/{TwizzleLink.d-S18moNia.d.ts → TwizzleLink.d-DAfRlszz.d.ts} +7 -7
  4. package/dist/lib/cubing/alg/index.d.ts +3 -3
  5. package/dist/lib/cubing/alg/index.js +1 -1
  6. package/dist/lib/cubing/bluetooth/index.d.ts +4 -5
  7. package/dist/lib/cubing/bluetooth/index.js +7 -6
  8. package/dist/lib/cubing/bluetooth/index.js.map +2 -2
  9. package/dist/lib/cubing/{bluetooth-puzzle.d-NEYj0B8F.d.ts → bluetooth-puzzle.d-BfcciXFF.d.ts} +2 -3
  10. package/dist/lib/cubing/chunks/{chunk-3W5GXH7H.js → chunk-4K67JPLC.js} +4 -4
  11. package/dist/lib/cubing/chunks/{chunk-YGLO3POD.js → chunk-5QBTMAXK.js} +3 -3
  12. package/dist/lib/cubing/chunks/{chunk-H5G52ETP.js → chunk-EF6G34T7.js} +139 -140
  13. package/dist/lib/cubing/chunks/{chunk-H5G52ETP.js.map → chunk-EF6G34T7.js.map} +1 -1
  14. package/dist/lib/cubing/chunks/{chunk-GEMIB7TF.js → chunk-H57WKFBE.js} +2 -2
  15. package/dist/lib/cubing/chunks/{chunk-HPIYOMRJ.js → chunk-JNIAXRNE.js} +2 -2
  16. package/dist/lib/cubing/chunks/{chunk-7WLUEIZX.js → chunk-OW4IHAI4.js} +3 -3
  17. package/dist/lib/cubing/chunks/{chunk-2ZDYUAXG.js → chunk-RAOTPMYY.js} +3 -3
  18. package/dist/lib/cubing/chunks/{chunk-Q222EQJR.js → chunk-VVXSTWUD.js} +17 -19
  19. package/dist/lib/cubing/chunks/{chunk-Q222EQJR.js.map → chunk-VVXSTWUD.js.map} +1 -1
  20. package/dist/lib/cubing/chunks/{chunk-QYBDWFY6.js → chunk-W2Z7MAP2.js} +5 -5
  21. package/dist/lib/cubing/chunks/{chunk-VQIVSUL2.js → chunk-Y3BVWVFU.js} +2 -2
  22. package/dist/lib/cubing/chunks/{inside-XY43FEWJ.js → inside-BKENXSSR.js} +14 -14
  23. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-2RPLAYOZ.js → search-dynamic-sgs-side-events-OOIOU5SK.js} +6 -6
  24. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-SOS5BTCL.js → search-dynamic-sgs-unofficial-COV225SC.js} +6 -6
  25. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-R4SVOZSB.js → search-dynamic-solve-4x4x4-EWVB2ON7.js} +57 -59
  26. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-R4SVOZSB.js.map → search-dynamic-solve-4x4x4-EWVB2ON7.js.map} +1 -1
  27. package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-BN4POKYF.js → search-dynamic-solve-kilominx-RAZM75GA.js} +2 -2
  28. package/dist/lib/cubing/chunks/{search-dynamic-solve-sq1-NGOQHFV4.js → search-dynamic-solve-sq1-YESVPPLF.js} +27 -28
  29. package/dist/lib/cubing/chunks/{search-dynamic-solve-sq1-NGOQHFV4.js.map → search-dynamic-solve-sq1-YESVPPLF.js.map} +1 -1
  30. package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
  31. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VWNC3JXN.js → twisty-dynamic-3d-TINH44QH.js} +6 -6
  32. package/dist/lib/cubing/chunks/{twsearch-6KUSKPX2.js → twsearch-XKCR3E3R.js} +2 -2
  33. package/dist/lib/cubing/{index-t97giMqB.d.ts → index-BhH6DKdK.d.ts} +2 -2
  34. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -2
  35. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  36. package/dist/lib/cubing/notation/index.d.ts +4 -4
  37. package/dist/lib/cubing/notation/index.js +4 -4
  38. package/dist/lib/cubing/{parseAlg.d-tIlAma60.d.ts → parseAlg.d-HDV9mtha.d.ts} +1 -1
  39. package/dist/lib/cubing/protocol/index.d.ts +2 -2
  40. package/dist/lib/cubing/protocol/index.js +4 -4
  41. package/dist/lib/cubing/puzzle-geometry/index.d.ts +3 -3
  42. package/dist/lib/cubing/puzzle-geometry/index.js +1 -1
  43. package/dist/lib/cubing/puzzles/index.d.ts +4 -875
  44. package/dist/lib/cubing/puzzles/index.js +4 -4
  45. package/dist/lib/cubing/scramble/index.d.ts +3 -3
  46. package/dist/lib/cubing/scramble/index.js +6 -6
  47. package/dist/lib/cubing/search/index.d.ts +3 -3
  48. package/dist/lib/cubing/search/index.js +6 -6
  49. package/dist/lib/cubing/stream/index.d.ts +3 -3
  50. package/dist/lib/cubing/stream/index.js +1 -1
  51. package/dist/lib/cubing/twisty/index.d.ts +5 -5
  52. package/dist/lib/cubing/twisty/index.js +6 -6
  53. package/package.json +16 -15
  54. /package/dist/lib/cubing/chunks/{chunk-3W5GXH7H.js.map → chunk-4K67JPLC.js.map} +0 -0
  55. /package/dist/lib/cubing/chunks/{chunk-YGLO3POD.js.map → chunk-5QBTMAXK.js.map} +0 -0
  56. /package/dist/lib/cubing/chunks/{chunk-GEMIB7TF.js.map → chunk-H57WKFBE.js.map} +0 -0
  57. /package/dist/lib/cubing/chunks/{chunk-HPIYOMRJ.js.map → chunk-JNIAXRNE.js.map} +0 -0
  58. /package/dist/lib/cubing/chunks/{chunk-7WLUEIZX.js.map → chunk-OW4IHAI4.js.map} +0 -0
  59. /package/dist/lib/cubing/chunks/{chunk-2ZDYUAXG.js.map → chunk-RAOTPMYY.js.map} +0 -0
  60. /package/dist/lib/cubing/chunks/{chunk-QYBDWFY6.js.map → chunk-W2Z7MAP2.js.map} +0 -0
  61. /package/dist/lib/cubing/chunks/{chunk-VQIVSUL2.js.map → chunk-Y3BVWVFU.js.map} +0 -0
  62. /package/dist/lib/cubing/chunks/{inside-XY43FEWJ.js.map → inside-BKENXSSR.js.map} +0 -0
  63. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-2RPLAYOZ.js.map → search-dynamic-sgs-side-events-OOIOU5SK.js.map} +0 -0
  64. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-SOS5BTCL.js.map → search-dynamic-sgs-unofficial-COV225SC.js.map} +0 -0
  65. /package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-BN4POKYF.js.map → search-dynamic-solve-kilominx-RAZM75GA.js.map} +0 -0
  66. /package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VWNC3JXN.js.map → twisty-dynamic-3d-TINH44QH.js.map} +0 -0
  67. /package/dist/lib/cubing/chunks/{twsearch-6KUSKPX2.js.map → twsearch-XKCR3E3R.js.map} +0 -0
@@ -351,169 +351,168 @@ var AlgParser = class {
351
351
  );
352
352
  }
353
353
  };
354
- mainLoop:
355
- while (this.#idx < this.#input.length) {
356
- const savedCharIndex = this.#idx;
357
- if (stopBefore.includes(this.#input[this.#idx])) {
358
- return addCharIndices(algBuilder.toAlg(), algStartIdx, algEndIdx);
354
+ mainLoop: while (this.#idx < this.#input.length) {
355
+ const savedCharIndex = this.#idx;
356
+ if (stopBefore.includes(this.#input[this.#idx])) {
357
+ return addCharIndices(algBuilder.toAlg(), algStartIdx, algEndIdx);
358
+ }
359
+ if (this.tryConsumeNext(" ")) {
360
+ crowded = false;
361
+ if (algBuilder.experimentalNumAlgNodes() === 0) {
362
+ algStartIdx = this.#idx;
359
363
  }
360
- if (this.tryConsumeNext(" ")) {
361
- crowded = false;
362
- if (algBuilder.experimentalNumAlgNodes() === 0) {
363
- algStartIdx = this.#idx;
364
- }
365
- continue mainLoop;
366
- } else if (MOVE_START_REGEX.test(this.#input[this.#idx])) {
367
- mustNotBeCrowded(savedCharIndex);
368
- const move = this.parseMoveImpl();
369
- algBuilder.push(move);
364
+ continue mainLoop;
365
+ } else if (MOVE_START_REGEX.test(this.#input[this.#idx])) {
366
+ mustNotBeCrowded(savedCharIndex);
367
+ const move = this.parseMoveImpl();
368
+ algBuilder.push(move);
369
+ crowded = true;
370
+ algEndIdx = this.#idx;
371
+ continue mainLoop;
372
+ } else if (this.tryConsumeNext("(")) {
373
+ mustNotBeCrowded(savedCharIndex);
374
+ const sq1PairStartMatch = this.tryRegex(SQUARE1_PAIR_START_REGEX);
375
+ if (sq1PairStartMatch) {
376
+ const topAmountString = sq1PairStartMatch[1];
377
+ const savedCharIndexD = this.#idx;
378
+ const sq1PairEndMatch = this.parseRegex(SQUARE1_PAIR_END_REGEX);
379
+ const uMove = addCharIndices(
380
+ new Move(new QuantumMove("U_SQ_"), parseInt(topAmountString)),
381
+ savedCharIndex + 1,
382
+ savedCharIndex + 1 + topAmountString.length
383
+ );
384
+ const dMove = addCharIndices(
385
+ new Move(new QuantumMove("D_SQ_"), parseInt(sq1PairEndMatch[1])),
386
+ savedCharIndexD,
387
+ this.#idx - 1
388
+ );
389
+ const alg = addCharIndices(
390
+ new Alg([uMove, dMove]),
391
+ savedCharIndex + 1,
392
+ this.#idx - 1
393
+ );
394
+ algBuilder.push(
395
+ addCharIndices(new Grouping(alg), savedCharIndex, this.#idx)
396
+ );
370
397
  crowded = true;
371
398
  algEndIdx = this.#idx;
372
399
  continue mainLoop;
373
- } else if (this.tryConsumeNext("(")) {
374
- mustNotBeCrowded(savedCharIndex);
375
- const sq1PairStartMatch = this.tryRegex(SQUARE1_PAIR_START_REGEX);
376
- if (sq1PairStartMatch) {
377
- const topAmountString = sq1PairStartMatch[1];
378
- const savedCharIndexD = this.#idx;
379
- const sq1PairEndMatch = this.parseRegex(SQUARE1_PAIR_END_REGEX);
380
- const uMove = addCharIndices(
381
- new Move(new QuantumMove("U_SQ_"), parseInt(topAmountString)),
382
- savedCharIndex + 1,
383
- savedCharIndex + 1 + topAmountString.length
384
- );
385
- const dMove = addCharIndices(
386
- new Move(new QuantumMove("D_SQ_"), parseInt(sq1PairEndMatch[1])),
387
- savedCharIndexD,
388
- this.#idx - 1
389
- );
390
- const alg = addCharIndices(
391
- new Alg([uMove, dMove]),
392
- savedCharIndex + 1,
393
- this.#idx - 1
394
- );
395
- algBuilder.push(
396
- addCharIndices(new Grouping(alg), savedCharIndex, this.#idx)
397
- );
398
- crowded = true;
399
- algEndIdx = this.#idx;
400
- continue mainLoop;
401
- } else {
402
- const alg = this.parseAlgWithStopping([")"]);
403
- this.mustConsumeNext(")");
404
- const amount = this.parseAmount();
405
- algBuilder.push(
406
- addCharIndices(
407
- new Grouping(alg, amount),
408
- savedCharIndex,
409
- this.#idx
410
- )
411
- );
412
- crowded = true;
413
- algEndIdx = this.#idx;
414
- continue mainLoop;
415
- }
416
- } else if (this.tryConsumeNext("^")) {
417
- if (!algDebugGlobals.caretNISSNotationEnabled) {
418
- throw new Error(
419
- "Alg contained a caret but caret NISS notation is not enabled."
420
- );
421
- }
422
- this.mustConsumeNext("(");
400
+ } else {
423
401
  const alg = this.parseAlgWithStopping([")"]);
424
- this.popNext();
425
- const grouping = new Grouping(alg, -1);
426
- const placeholder = new Pause();
427
- grouping.experimentalNISSPlaceholder = placeholder;
428
- placeholder.experimentalNISSGrouping = grouping;
429
- this.#nissQueue.push(grouping);
430
- algBuilder.push(placeholder);
431
- } else if (this.tryConsumeNext("[")) {
432
- mustNotBeCrowded(savedCharIndex);
433
- const A = this.parseAlgWithStopping([",", ":"]);
434
- const separator = this.popNext();
435
- const B = this.parseAlgWithStopping(["]"]);
436
- this.mustConsumeNext("]");
437
- let unrepeated;
438
- switch (separator) {
439
- case ":": {
440
- unrepeated = addCharIndices(
441
- new Conjugate(A, B),
442
- savedCharIndex,
443
- this.#idx
444
- );
445
- crowded = true;
446
- algEndIdx = this.#idx;
447
- break;
448
- }
449
- case ",": {
450
- unrepeated = addCharIndices(
451
- new Commutator(A, B),
452
- savedCharIndex,
453
- this.#idx
454
- );
455
- crowded = true;
456
- algEndIdx = this.#idx;
457
- break;
458
- }
459
- default:
460
- throw new Error("unexpected parsing error");
461
- }
462
- const afterClosingBracketIdx = this.#idx;
402
+ this.mustConsumeNext(")");
463
403
  const amount = this.parseAmount();
464
- if (amount === 1) {
465
- algBuilder.push(unrepeated);
466
- } else {
467
- const unrepeatedAlg = addCharIndices(
468
- new Alg([unrepeated]),
469
- savedCharIndex,
470
- afterClosingBracketIdx
471
- );
472
- const grouping = addCharIndices(
473
- new Grouping(unrepeatedAlg, amount),
404
+ algBuilder.push(
405
+ addCharIndices(
406
+ new Grouping(alg, amount),
474
407
  savedCharIndex,
475
408
  this.#idx
476
- );
477
- algBuilder.push(grouping);
478
- }
409
+ )
410
+ );
479
411
  crowded = true;
480
412
  algEndIdx = this.#idx;
481
413
  continue mainLoop;
482
- } else if (this.tryConsumeNext("\n")) {
483
- algBuilder.push(
484
- addCharIndices(new Newline(), savedCharIndex, this.#idx)
414
+ }
415
+ } else if (this.tryConsumeNext("^")) {
416
+ if (!algDebugGlobals.caretNISSNotationEnabled) {
417
+ throw new Error(
418
+ "Alg contained a caret but caret NISS notation is not enabled."
485
419
  );
486
- crowded = false;
487
- algEndIdx = this.#idx;
488
- continue mainLoop;
489
- } else if (this.tryConsumeNext("/")) {
490
- if (this.tryConsumeNext("/")) {
491
- mustNotBeCrowded(savedCharIndex);
492
- const [text] = this.parseRegex(COMMENT_TEXT_REGEX);
493
- algBuilder.push(
494
- addCharIndices(new LineComment(text), savedCharIndex, this.#idx)
420
+ }
421
+ this.mustConsumeNext("(");
422
+ const alg = this.parseAlgWithStopping([")"]);
423
+ this.popNext();
424
+ const grouping = new Grouping(alg, -1);
425
+ const placeholder = new Pause();
426
+ grouping.experimentalNISSPlaceholder = placeholder;
427
+ placeholder.experimentalNISSGrouping = grouping;
428
+ this.#nissQueue.push(grouping);
429
+ algBuilder.push(placeholder);
430
+ } else if (this.tryConsumeNext("[")) {
431
+ mustNotBeCrowded(savedCharIndex);
432
+ const A = this.parseAlgWithStopping([",", ":"]);
433
+ const separator = this.popNext();
434
+ const B = this.parseAlgWithStopping(["]"]);
435
+ this.mustConsumeNext("]");
436
+ let unrepeated;
437
+ switch (separator) {
438
+ case ":": {
439
+ unrepeated = addCharIndices(
440
+ new Conjugate(A, B),
441
+ savedCharIndex,
442
+ this.#idx
495
443
  );
496
- crowded = false;
444
+ crowded = true;
497
445
  algEndIdx = this.#idx;
498
- continue mainLoop;
499
- } else {
500
- algBuilder.push(
501
- addCharIndices(new Move("_SLASH_"), savedCharIndex, this.#idx)
446
+ break;
447
+ }
448
+ case ",": {
449
+ unrepeated = addCharIndices(
450
+ new Commutator(A, B),
451
+ savedCharIndex,
452
+ this.#idx
502
453
  );
503
454
  crowded = true;
504
455
  algEndIdx = this.#idx;
505
- continue mainLoop;
456
+ break;
506
457
  }
507
- } else if (this.tryConsumeNext(".")) {
458
+ default:
459
+ throw new Error("unexpected parsing error");
460
+ }
461
+ const afterClosingBracketIdx = this.#idx;
462
+ const amount = this.parseAmount();
463
+ if (amount === 1) {
464
+ algBuilder.push(unrepeated);
465
+ } else {
466
+ const unrepeatedAlg = addCharIndices(
467
+ new Alg([unrepeated]),
468
+ savedCharIndex,
469
+ afterClosingBracketIdx
470
+ );
471
+ const grouping = addCharIndices(
472
+ new Grouping(unrepeatedAlg, amount),
473
+ savedCharIndex,
474
+ this.#idx
475
+ );
476
+ algBuilder.push(grouping);
477
+ }
478
+ crowded = true;
479
+ algEndIdx = this.#idx;
480
+ continue mainLoop;
481
+ } else if (this.tryConsumeNext("\n")) {
482
+ algBuilder.push(
483
+ addCharIndices(new Newline(), savedCharIndex, this.#idx)
484
+ );
485
+ crowded = false;
486
+ algEndIdx = this.#idx;
487
+ continue mainLoop;
488
+ } else if (this.tryConsumeNext("/")) {
489
+ if (this.tryConsumeNext("/")) {
508
490
  mustNotBeCrowded(savedCharIndex);
509
- algBuilder.push(addCharIndices(new Pause(), savedCharIndex, this.#idx));
510
- crowded = true;
491
+ const [text] = this.parseRegex(COMMENT_TEXT_REGEX);
492
+ algBuilder.push(
493
+ addCharIndices(new LineComment(text), savedCharIndex, this.#idx)
494
+ );
495
+ crowded = false;
511
496
  algEndIdx = this.#idx;
512
497
  continue mainLoop;
513
498
  } else {
514
- throw new Error(`Unexpected character: ${this.popNext()}`);
499
+ algBuilder.push(
500
+ addCharIndices(new Move("_SLASH_"), savedCharIndex, this.#idx)
501
+ );
502
+ crowded = true;
503
+ algEndIdx = this.#idx;
504
+ continue mainLoop;
515
505
  }
506
+ } else if (this.tryConsumeNext(".")) {
507
+ mustNotBeCrowded(savedCharIndex);
508
+ algBuilder.push(addCharIndices(new Pause(), savedCharIndex, this.#idx));
509
+ crowded = true;
510
+ algEndIdx = this.#idx;
511
+ continue mainLoop;
512
+ } else {
513
+ throw new Error(`Unexpected character: ${this.popNext()}`);
516
514
  }
515
+ }
517
516
  if (this.#idx !== this.#input.length) {
518
517
  throw new Error("did not finish parsing?");
519
518
  }
@@ -1878,4 +1877,4 @@ export {
1878
1877
  keyToMove,
1879
1878
  experimentalAlgCubingNetLink
1880
1879
  };
1881
- //# sourceMappingURL=chunk-H5G52ETP.js.map
1880
+ //# sourceMappingURL=chunk-EF6G34T7.js.map