cubing 0.54.3 → 0.54.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.
Files changed (41) hide show
  1. package/dist/lib/cubing/{KPattern.d-B8PBnjzZ.d.ts → KPattern.d-tlN4iAuY.d.ts} +1 -1
  2. package/dist/lib/cubing/{PuzzleLoader-BYI7PA7C.d.ts → PuzzleLoader-Ft_XlaHS.d.ts} +17 -2
  3. package/dist/lib/cubing/{TwizzleLink.d-Bxv5QZmG.d.ts → TwizzleLink.d-DdZRboJ4.d.ts} +19 -4
  4. package/dist/lib/cubing/alg/index.d.ts +3 -3
  5. package/dist/lib/cubing/bluetooth/index.d.ts +6 -6
  6. package/dist/lib/cubing/{bluetooth-puzzle.d-SLdses2g.d.ts → bluetooth-puzzle.d-kb8nnIde.d.ts} +2 -2
  7. package/dist/lib/cubing/chunks/{chunk-6JKLFI75.js → chunk-55STZK6V.js} +2 -2
  8. package/dist/lib/cubing/chunks/{chunk-6JKLFI75.js.map → chunk-55STZK6V.js.map} +2 -2
  9. package/dist/lib/cubing/chunks/{chunk-FSEFHZZJ.js → chunk-WOKS3P3I.js} +1 -1
  10. package/dist/lib/cubing/chunks/{inside-6QEBA5VI.js → inside-WZQKNOJH.js} +3 -3
  11. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-5KMGO47S.js → search-dynamic-solve-4x4x4-OZZLMKCB.js} +2 -2
  12. package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
  13. package/dist/lib/cubing/chunks/{twsearch-YXEBHYHP.js → twsearch-HWA5BU3S.js} +11 -3
  14. package/dist/lib/cubing/chunks/twsearch-HWA5BU3S.js.map +7 -0
  15. package/dist/lib/cubing/chunks/twsearch_wasm_bg-BI4JVWGR-OGWODKOA.js +10 -0
  16. package/dist/lib/cubing/chunks/twsearch_wasm_bg-BI4JVWGR-OGWODKOA.js.map +7 -0
  17. package/dist/lib/cubing/{index-C0GtBTdp.d.ts → index-Ca5480OU.d.ts} +2 -2
  18. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -2
  19. package/dist/lib/cubing/notation/index.d.ts +4 -4
  20. package/dist/lib/cubing/{parseAlg.d-BMkZo3Y-.d.ts → parseAlg.d-DgyP8Jpl.d.ts} +1 -1
  21. package/dist/lib/cubing/protocol/index.d.ts +2 -2
  22. package/dist/lib/cubing/puzzle-geometry/index.d.ts +3 -3
  23. package/dist/lib/cubing/puzzles/index.d.ts +4 -4
  24. package/dist/lib/cubing/scramble/index.d.ts +3 -3
  25. package/dist/lib/cubing/scramble/index.js +1 -1
  26. package/dist/lib/cubing/search/index.d.ts +3 -3
  27. package/dist/lib/cubing/search/index.js +1 -1
  28. package/dist/lib/cubing/stream/index.d.ts +5 -5
  29. package/dist/lib/cubing/twisty/index.d.ts +5 -5
  30. package/dist/lib/cubing/twisty/index.js +22 -51
  31. package/dist/lib/cubing/twisty/index.js.map +3 -3
  32. package/experimental-json-schema/kpuzzle/KPatternData.schema.json +42 -0
  33. package/experimental-json-schema/kpuzzle/KPuzzleDefinition.schema.json +114 -0
  34. package/experimental-json-schema/kpuzzle/KTransformationData.schema.json +36 -0
  35. package/package.json +2 -1
  36. package/dist/lib/cubing/chunks/twsearch-YXEBHYHP.js.map +0 -7
  37. package/dist/lib/cubing/chunks/twsearch_wasm_bg-LRRAZVO4-B6TQCFO6.js +0 -10
  38. package/dist/lib/cubing/chunks/twsearch_wasm_bg-LRRAZVO4-B6TQCFO6.js.map +0 -7
  39. /package/dist/lib/cubing/chunks/{chunk-FSEFHZZJ.js.map → chunk-WOKS3P3I.js.map} +0 -0
  40. /package/dist/lib/cubing/chunks/{inside-6QEBA5VI.js.map → inside-WZQKNOJH.js.map} +0 -0
  41. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-5KMGO47S.js.map → search-dynamic-solve-4x4x4-OZZLMKCB.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { A as Alg } from './PuzzleLoader-BYI7PA7C.js';
2
- import { K as KPattern, s as KPuzzle } from './KPattern.d-B8PBnjzZ.js';
1
+ import { A as Alg } from './PuzzleLoader-Ft_XlaHS.js';
2
+ import { K as KPattern, s as KPuzzle } from './KPattern.d-tlN4iAuY.js';
3
3
 
4
4
  declare enum PrefetchLevel {
5
5
  Auto = "auto",
@@ -1,3 +1,3 @@
1
- export { K as KPattern, w as KPatternData, x as KPatternOrbitData, s as KPuzzle, v as KPuzzleDefinition, t as KTransformation, y as KTransformationData, z as KTransformationOrbitData } from '../KPattern.d-B8PBnjzZ.js';
2
- import '../PuzzleLoader-BYI7PA7C.js';
1
+ export { K as KPattern, w as KPatternData, x as KPatternOrbitData, s as KPuzzle, v as KPuzzleDefinition, t as KTransformation, y as KTransformationData, z as KTransformationOrbitData } from '../KPattern.d-tlN4iAuY.js';
2
+ import '../PuzzleLoader-Ft_XlaHS.js';
3
3
  import 'three';
@@ -1,8 +1,8 @@
1
- import { A as Alg } from '../PuzzleLoader-BYI7PA7C.js';
2
- import { P as PuzzleLoader } from '../TwizzleLink.d-Bxv5QZmG.js';
1
+ import { A as Alg } from '../PuzzleLoader-Ft_XlaHS.js';
2
+ import { P as PuzzleLoader } from '../TwizzleLink.d-DdZRboJ4.js';
3
3
  import 'three';
4
- import '../parseAlg.d-BMkZo3Y-.js';
5
- import '../KPattern.d-B8PBnjzZ.js';
4
+ import '../parseAlg.d-DgyP8Jpl.js';
5
+ import '../KPattern.d-tlN4iAuY.js';
6
6
 
7
7
  declare enum CommonMetric {
8
8
  OuterBlockTurnMetric = "OBTM",
@@ -1,4 +1,4 @@
1
- import { A as Alg, a as AlgNode } from './PuzzleLoader-BYI7PA7C.js';
1
+ import { A as Alg, a as AlgNode } from './PuzzleLoader-Ft_XlaHS.js';
2
2
 
3
3
  declare const startCharIndexKey: unique symbol;
4
4
  declare const endCharIndexKey: unique symbol;
@@ -1,5 +1,5 @@
1
- import '../PuzzleLoader-BYI7PA7C.js';
2
- import { K as KPattern } from '../KPattern.d-B8PBnjzZ.js';
1
+ import '../PuzzleLoader-Ft_XlaHS.js';
2
+ import { K as KPattern } from '../KPattern.d-tlN4iAuY.js';
3
3
  import 'three';
4
4
 
5
5
  type Binary3x3x3Pattern = Uint8Array;
@@ -1,6 +1,6 @@
1
- import { P as Perm } from '../KPattern.d-B8PBnjzZ.js';
2
- export { q as EXPERIMENTAL_PUZZLE_BASE_SHAPES, n as EXPERIMENTAL_PUZZLE_CUT_TYPES, k as ExperimentalPGNotation, r as ExperimentalPuzzleBaseShape, l as ExperimentalPuzzleCutDescription, o as ExperimentalPuzzleCutType, m as ExperimentalPuzzleDescription, j as ExperimentalPuzzleGeometryOptions, d as PuzzleGeometry, Q as Quat, S as StickerDat, e as StickerDatAxis, f as StickerDatFace, h as StickerDatSticker, c as getPG3DNamedPuzzles, g as getPuzzleDescriptionString, a as getPuzzleGeometryByDesc, b as getPuzzleGeometryByName, i as parseOptions, p as parsePuzzleDescription } from '../KPattern.d-B8PBnjzZ.js';
3
- import '../PuzzleLoader-BYI7PA7C.js';
1
+ import { P as Perm } from '../KPattern.d-tlN4iAuY.js';
2
+ export { q as EXPERIMENTAL_PUZZLE_BASE_SHAPES, n as EXPERIMENTAL_PUZZLE_CUT_TYPES, k as ExperimentalPGNotation, r as ExperimentalPuzzleBaseShape, l as ExperimentalPuzzleCutDescription, o as ExperimentalPuzzleCutType, m as ExperimentalPuzzleDescription, j as ExperimentalPuzzleGeometryOptions, d as PuzzleGeometry, Q as Quat, S as StickerDat, e as StickerDatAxis, f as StickerDatFace, h as StickerDatSticker, c as getPG3DNamedPuzzles, g as getPuzzleDescriptionString, a as getPuzzleGeometryByDesc, b as getPuzzleGeometryByName, i as parseOptions, p as parsePuzzleDescription } from '../KPattern.d-tlN4iAuY.js';
3
+ import '../PuzzleLoader-Ft_XlaHS.js';
4
4
  import 'three';
5
5
 
6
6
  declare function schreierSims(g: Perm[], disp: (s: string) => void): bigint;
@@ -1,8 +1,8 @@
1
- import { a as PuzzleID, P as PuzzleLoader, E as ExperimentalStickering, S as StickeringMask } from '../TwizzleLink.d-Bxv5QZmG.js';
2
- import { P as PuzzleSpecificSimplifyOptions, b as AlgLeaf } from '../PuzzleLoader-BYI7PA7C.js';
3
- import { s as KPuzzle, d as PuzzleGeometry } from '../KPattern.d-B8PBnjzZ.js';
1
+ import { a as PuzzleID, P as PuzzleLoader, E as ExperimentalStickering, S as StickeringMask } from '../TwizzleLink.d-DdZRboJ4.js';
2
+ import { P as PuzzleSpecificSimplifyOptions, b as AlgLeaf } from '../PuzzleLoader-Ft_XlaHS.js';
3
+ import { s as KPuzzle, d as PuzzleGeometry } from '../KPattern.d-tlN4iAuY.js';
4
4
  import 'three';
5
- import '../parseAlg.d-BMkZo3Y-.js';
5
+ import '../parseAlg.d-DgyP8Jpl.js';
6
6
 
7
7
  interface EventInfo {
8
8
  puzzleID: PuzzleID;
@@ -1,4 +1,4 @@
1
- export { r as randomScrambleForEvent } from '../index-C0GtBTdp.js';
2
- import '../PuzzleLoader-BYI7PA7C.js';
3
- import '../KPattern.d-B8PBnjzZ.js';
1
+ export { r as randomScrambleForEvent } from '../index-Ca5480OU.js';
2
+ import '../PuzzleLoader-Ft_XlaHS.js';
3
+ import '../KPattern.d-tlN4iAuY.js';
4
4
  import 'three';
@@ -1,7 +1,7 @@
1
1
  import "../chunks/chunk-NAPITA3L.js";
2
2
  import {
3
3
  randomScrambleForEvent
4
- } from "../chunks/chunk-FSEFHZZJ.js";
4
+ } from "../chunks/chunk-WOKS3P3I.js";
5
5
  import "../chunks/chunk-Y5U55NHQ.js";
6
6
  import "../chunks/chunk-7GUL3OBQ.js";
7
7
  import "../chunks/chunk-GOT3GVLG.js";
@@ -1,6 +1,6 @@
1
- export { a as experimentalSolve2x2x2, e as experimentalSolve3x3x3IgnoringCenters, f as experimentalSolveTwsearch, d as setSearchDebug, c as solveMegaminx, b as solvePyraminx, s as solveSkewb } from '../index-C0GtBTdp.js';
2
- import '../PuzzleLoader-BYI7PA7C.js';
3
- import { K as KPattern } from '../KPattern.d-B8PBnjzZ.js';
1
+ export { a as experimentalSolve2x2x2, e as experimentalSolve3x3x3IgnoringCenters, f as experimentalSolveTwsearch, d as setSearchDebug, c as solveMegaminx, b as solvePyraminx, s as solveSkewb } from '../index-Ca5480OU.js';
2
+ import '../PuzzleLoader-Ft_XlaHS.js';
3
+ import { K as KPattern } from '../KPattern.d-tlN4iAuY.js';
4
4
  import 'three';
5
5
 
6
6
  declare function random333Pattern(): Promise<KPattern>;
@@ -6,7 +6,7 @@ import {
6
6
  solvePyraminx,
7
7
  solveSkewb,
8
8
  solveTwsearch
9
- } from "../chunks/chunk-FSEFHZZJ.js";
9
+ } from "../chunks/chunk-WOKS3P3I.js";
10
10
  import {
11
11
  random333Pattern
12
12
  } from "../chunks/chunk-Y5U55NHQ.js";
@@ -1,9 +1,9 @@
1
- import '../PuzzleLoader-BYI7PA7C.js';
2
- import '../TwizzleLink.d-Bxv5QZmG.js';
3
- import { A as AlgLeafEvent, O as OrientationEvent } from '../bluetooth-puzzle.d-SLdses2g.js';
1
+ import '../PuzzleLoader-Ft_XlaHS.js';
2
+ import '../TwizzleLink.d-DdZRboJ4.js';
3
+ import { A as AlgLeafEvent, O as OrientationEvent } from '../bluetooth-puzzle.d-kb8nnIde.js';
4
4
  import 'three';
5
- import '../parseAlg.d-BMkZo3Y-.js';
6
- import '../KPattern.d-B8PBnjzZ.js';
5
+ import '../parseAlg.d-DgyP8Jpl.js';
6
+ import '../KPattern.d-tlN4iAuY.js';
7
7
 
8
8
  interface ProxyMoveEvent {
9
9
  event: "move";
@@ -1,9 +1,9 @@
1
- import { A as AlgIndexer, T as Timestamp, D as Duration, S as StickeringMask } from '../TwizzleLink.d-Bxv5QZmG.js';
2
- export { B as BackViewLayout, N as EXPERIMENTAL_PROP_NO_VALUE, M as ExperimentalMillisecondTimestamp, E as ExperimentalStickering, a as PuzzleID, d as TwistyAlgEditor, c as TwistyAlgViewer, b as TwistyPlayer, e as TwistyPlayerConfig, g as TwizzleLink, V as VisualizationFormat, f as backViewLayouts } from '../TwizzleLink.d-Bxv5QZmG.js';
3
- import { A as Alg, M as Move } from '../PuzzleLoader-BYI7PA7C.js';
4
- import { s as KPuzzle, K as KPattern, t as KTransformation } from '../KPattern.d-B8PBnjzZ.js';
1
+ import { A as AlgIndexer, T as Timestamp, D as Duration, S as StickeringMask } from '../TwizzleLink.d-DdZRboJ4.js';
2
+ export { B as BackViewLayout, N as EXPERIMENTAL_PROP_NO_VALUE, M as ExperimentalMillisecondTimestamp, E as ExperimentalStickering, a as PuzzleID, d as TwistyAlgEditor, c as TwistyAlgViewer, b as TwistyPlayer, e as TwistyPlayerConfig, g as TwizzleLink, V as VisualizationFormat, f as backViewLayouts } from '../TwizzleLink.d-DdZRboJ4.js';
3
+ import { A as Alg, M as Move } from '../PuzzleLoader-Ft_XlaHS.js';
4
+ import { s as KPuzzle, K as KPattern, t as KTransformation } from '../KPattern.d-tlN4iAuY.js';
5
5
  import 'three';
6
- import '../parseAlg.d-BMkZo3Y-.js';
6
+ import '../parseAlg.d-DgyP8Jpl.js';
7
7
 
8
8
  declare const twistyDebugGlobals: {
9
9
  shareAllNewRenderers: "auto" | "always" | "never";
@@ -2008,6 +2008,13 @@ var AnchorTransformationProp = class extends TwistyPropDerived {
2008
2008
  }
2009
2009
  };
2010
2010
 
2011
+ // src/cubing/twisty/model/props/puzzle/state/AnimationTimelineLeavesRequestProp.ts
2012
+ var AnimationTimelineLeavesRequestProp = class extends SimpleTwistyPropSource {
2013
+ getDefaultValue() {
2014
+ return null;
2015
+ }
2016
+ };
2017
+
2011
2018
  // src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.ts
2012
2019
  var CatchUpMoveProp = class extends SimpleTwistyPropSource {
2013
2020
  getDefaultValue() {
@@ -2377,57 +2384,11 @@ function simulMoves(a) {
2377
2384
  }
2378
2385
 
2379
2386
  // src/cubing/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts
2380
- var demos = {
2381
- "y' y' U' E D R2 r2 F2 B2 U E D' R2 L2' z2 S2 U U D D S2 F2' B2": [
2382
- { animLeaf: new Move("y", -1), start: 0, end: 1e3 },
2383
- { animLeaf: new Move("y", -1), start: 1e3, end: 2e3 },
2384
- { animLeaf: new Move("U", -1), start: 1e3, end: 1600 },
2385
- { animLeaf: new Move("E", 1), start: 1200, end: 1800 },
2386
- { animLeaf: new Move("D"), start: 1400, end: 2e3 },
2387
- { animLeaf: new Move("R", 2), start: 2e3, end: 3500 },
2388
- { animLeaf: new Move("r", 2), start: 2e3, end: 3500 },
2389
- { animLeaf: new Move("F", 2), start: 3500, end: 4200 },
2390
- { animLeaf: new Move("B", 2), start: 3800, end: 4500 },
2391
- { animLeaf: new Move("U", 1), start: 4500, end: 5500 },
2392
- { animLeaf: new Move("E", 1), start: 4500, end: 5500 },
2393
- { animLeaf: new Move("D", -1), start: 4500, end: 5500 },
2394
- { animLeaf: new Move("R", 2), start: 5500, end: 6500 },
2395
- { animLeaf: new Move("L", -2), start: 5500, end: 6500 },
2396
- { animLeaf: new Move("z", 2), start: 5500, end: 6500 },
2397
- { animLeaf: new Move("S", 2), start: 6500, end: 7500 },
2398
- { animLeaf: new Move("U"), start: 7500, end: 8e3 },
2399
- { animLeaf: new Move("D"), start: 7750, end: 8250 },
2400
- { animLeaf: new Move("U"), start: 8e3, end: 8500 },
2401
- { animLeaf: new Move("D"), start: 8250, end: 8750 },
2402
- { animLeaf: new Move("S", 2), start: 8750, end: 9250 },
2403
- { animLeaf: new Move("F", -2), start: 8750, end: 1e4 },
2404
- { animLeaf: new Move("B", 2), start: 8750, end: 1e4 }
2405
- ],
2406
- "M' R' U' D' M R": [
2407
- { animLeaf: new Move("M", -1), start: 0, end: 1e3 },
2408
- { animLeaf: new Move("R", -1), start: 0, end: 1e3 },
2409
- { animLeaf: new Move("U", -1), start: 1e3, end: 2e3 },
2410
- { animLeaf: new Move("D", -1), start: 1e3, end: 2e3 },
2411
- { animLeaf: new Move("M"), start: 2e3, end: 3e3 },
2412
- { animLeaf: new Move("R"), start: 2e3, end: 3e3 }
2413
- ],
2414
- "U' E' r E r2' E r U E": [
2415
- { animLeaf: new Move("U", -1), start: 0, end: 1e3 },
2416
- { animLeaf: new Move("E", -1), start: 0, end: 1e3 },
2417
- { animLeaf: new Move("r"), start: 1e3, end: 2500 },
2418
- { animLeaf: new Move("E"), start: 2500, end: 3500 },
2419
- { animLeaf: new Move("r", -2), start: 3500, end: 5e3 },
2420
- { animLeaf: new Move("E"), start: 5e3, end: 6e3 },
2421
- { animLeaf: new Move("r"), start: 6e3, end: 7e3 },
2422
- { animLeaf: new Move("U"), start: 7e3, end: 8e3 },
2423
- { animLeaf: new Move("E"), start: 7e3, end: 8e3 }
2424
- ]
2425
- };
2426
2387
  var SimultaneousMoveIndexer = class {
2427
2388
  // TODO: Allow custom `durationFn`.
2428
- constructor(kpuzzle, alg) {
2389
+ constructor(kpuzzle, alg, options) {
2429
2390
  this.kpuzzle = kpuzzle;
2430
- this.animLeaves = demos[alg.toString()] ?? simulMoves(alg);
2391
+ this.animLeaves = options?.animationTimelineLeaves ?? simulMoves(alg);
2431
2392
  }
2432
2393
  animLeaves;
2433
2394
  getAnimLeaf(index) {
@@ -3047,6 +3008,9 @@ var IndexerConstructorProp = class extends TwistyPropDerived {
3047
3008
  derive(inputs) {
3048
3009
  switch (inputs.indexerConstructorRequest) {
3049
3010
  case "auto":
3011
+ if (inputs.animationTimelineLeaves !== null) {
3012
+ return SimultaneousMoveIndexer;
3013
+ }
3050
3014
  if (countLeavesInExpansionForSimultaneousMoveIndexer(inputs.alg.alg) <= SIMULTANEOUS_INDEXER_MAX_EXPANDED_LEAVES && inputs.puzzle === "3x3x3" && inputs.visualizationStrategy === "Cube3D") {
3051
3015
  return SimultaneousMoveIndexer;
3052
3016
  } else {
@@ -3074,7 +3038,11 @@ var IndexerConstructorRequestProp = class extends SimpleTwistyPropSource {
3074
3038
  // src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts
3075
3039
  var IndexerProp = class extends TwistyPropDerived {
3076
3040
  derive(input) {
3077
- return new input.indexerConstructor(input.kpuzzle, input.algWithIssues.alg);
3041
+ return new input.indexerConstructor(
3042
+ input.kpuzzle,
3043
+ input.algWithIssues.alg,
3044
+ { animationTimelineLeaves: input.animationTimelineLeaves }
3045
+ );
3078
3046
  }
3079
3047
  };
3080
3048
 
@@ -3769,6 +3737,7 @@ var TwistyPlayerModel = class {
3769
3737
  title = new ArbitraryStringProp();
3770
3738
  videoURL = new URLProp();
3771
3739
  competitionID = new ArbitraryStringProp();
3740
+ animationTimelineLeavesRequest = new AnimationTimelineLeavesRequestProp();
3772
3741
  // Depth 1
3773
3742
  puzzleLoader = new PuzzleLoaderProp(
3774
3743
  {
@@ -3798,7 +3767,8 @@ var TwistyPlayerModel = class {
3798
3767
  alg: this.alg,
3799
3768
  puzzle: this.puzzleID,
3800
3769
  visualizationStrategy: this.visualizationStrategy,
3801
- indexerConstructorRequest: this.indexerConstructorRequest
3770
+ indexerConstructorRequest: this.indexerConstructorRequest,
3771
+ animationTimelineLeaves: this.animationTimelineLeavesRequest
3802
3772
  });
3803
3773
  setupAlgTransformation = new AlgTransformationProp({
3804
3774
  setupAlg: this.puzzleSetupAlg,
@@ -3808,7 +3778,8 @@ var TwistyPlayerModel = class {
3808
3778
  indexer = new IndexerProp({
3809
3779
  indexerConstructor: this.indexerConstructor,
3810
3780
  algWithIssues: this.puzzleAlg,
3811
- kpuzzle: this.kpuzzle
3781
+ kpuzzle: this.kpuzzle,
3782
+ animationTimelineLeaves: this.animationTimelineLeavesRequest
3812
3783
  });
3813
3784
  // Depth 6
3814
3785
  anchorTransformation = new AnchorTransformationProp({