cubing 0.56.0 → 0.57.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 (88) hide show
  1. package/dist/bin/chunks/{chunk-DFQMTDRG.js → chunk-J53ID3VX.js} +2 -2
  2. package/dist/bin/chunks/chunk-J53ID3VX.js.map +7 -0
  3. package/dist/bin/order.js +1 -1
  4. package/dist/bin/order.js.map +2 -2
  5. package/dist/bin/puzzle-geometry-bin.js +1 -1
  6. package/dist/bin/puzzle-geometry-bin.js.map +2 -2
  7. package/dist/bin/scramble.js +1 -1
  8. package/dist/lib/cubing/{PuzzleLoader-DWqO9l1G.d.ts → PuzzleLoader-Dd4G1VlU.d.ts} +355 -312
  9. package/dist/lib/cubing/alg/index.d.ts +8 -8
  10. package/dist/lib/cubing/alg/index.js +1 -1
  11. package/dist/lib/cubing/bluetooth/index.d.ts +7 -8
  12. package/dist/lib/cubing/bluetooth/index.js +68 -54
  13. package/dist/lib/cubing/bluetooth/index.js.map +3 -3
  14. package/dist/lib/cubing/{bluetooth-puzzle-C6TIIh-Z.d.ts → bluetooth-puzzle-FIXncgc8.d.ts} +1 -1
  15. package/dist/lib/cubing/chunks/big-puzzle-orientation-IZASZS5A.js +70 -0
  16. package/dist/lib/cubing/chunks/big-puzzle-orientation-IZASZS5A.js.map +7 -0
  17. package/dist/lib/cubing/chunks/{chunk-TQF5J7MH.js → chunk-3YVVF3KK.js} +79 -79
  18. package/dist/lib/cubing/chunks/chunk-3YVVF3KK.js.map +7 -0
  19. package/dist/lib/cubing/chunks/{chunk-XPH22PGR.js → chunk-CGV5LY7H.js} +2 -2
  20. package/dist/lib/cubing/chunks/chunk-CGV5LY7H.js.map +7 -0
  21. package/dist/lib/cubing/chunks/{chunk-KO64SKMG.js → chunk-DWN2US56.js} +11 -11
  22. package/dist/lib/cubing/chunks/chunk-DWN2US56.js.map +7 -0
  23. package/dist/lib/cubing/chunks/{chunk-MA47PABE.js → chunk-EVYENG3X.js} +40 -42
  24. package/dist/lib/cubing/chunks/chunk-EVYENG3X.js.map +7 -0
  25. package/dist/lib/cubing/chunks/{chunk-BQNTAVTA.js → chunk-GKM2CK6T.js} +2 -2
  26. package/dist/lib/cubing/chunks/{chunk-WOAANT6Y.js → chunk-J6NSY47E.js} +114 -21
  27. package/dist/lib/cubing/chunks/chunk-J6NSY47E.js.map +7 -0
  28. package/dist/lib/cubing/chunks/{chunk-YFGRXDD4.js → chunk-KAXXPFNE.js} +4 -4
  29. package/dist/lib/cubing/chunks/{chunk-YFGRXDD4.js.map → chunk-KAXXPFNE.js.map} +2 -2
  30. package/dist/lib/cubing/chunks/{chunk-YQVHA4F6.js → chunk-MITU5GJ5.js} +55 -51
  31. package/dist/lib/cubing/chunks/{chunk-YQVHA4F6.js.map → chunk-MITU5GJ5.js.map} +3 -3
  32. package/dist/lib/cubing/chunks/{chunk-M4T7GO54.js → chunk-SNKS5WOA.js} +92 -70
  33. package/dist/lib/cubing/chunks/chunk-SNKS5WOA.js.map +7 -0
  34. package/dist/lib/cubing/chunks/{chunk-2SBMIHZV.js → chunk-SWKNZGJF.js} +100 -108
  35. package/dist/lib/cubing/chunks/chunk-SWKNZGJF.js.map +7 -0
  36. package/dist/lib/cubing/chunks/{inside-KAVAZETT.js → inside-AF5A42Y6.js} +18 -18
  37. package/dist/lib/cubing/chunks/{inside-KAVAZETT.js.map → inside-AF5A42Y6.js.map} +2 -2
  38. package/dist/lib/cubing/chunks/{puzzles-dynamic-side-events-AHFPWEBD.js → puzzles-dynamic-side-events-BOGUHF4Q.js} +1660 -1660
  39. package/dist/lib/cubing/chunks/{puzzles-dynamic-side-events-AHFPWEBD.js.map → puzzles-dynamic-side-events-BOGUHF4Q.js.map} +3 -3
  40. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-FTWMZ5ZJ.js → search-dynamic-sgs-side-events-PVOJWVJF.js} +7 -7
  41. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-FTWMZ5ZJ.js.map → search-dynamic-sgs-side-events-PVOJWVJF.js.map} +2 -2
  42. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-ZYGVRJQK.js → search-dynamic-sgs-unofficial-HRR5D2US.js} +648 -648
  43. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-HRR5D2US.js.map +7 -0
  44. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-6MKLH6KJ.js → search-dynamic-solve-4x4x4-3CROPIQD.js} +7 -7
  45. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-5YRST2XM.js → search-dynamic-solve-fto-NKAFVO65.js} +2 -2
  46. package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-W64XQPBF.js → search-dynamic-solve-kilominx-EDGE5SP4.js} +2 -2
  47. package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
  48. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-QGRCHB6L.js → twisty-dynamic-3d-EIIPCTEF.js} +63 -57
  49. package/dist/lib/cubing/chunks/twisty-dynamic-3d-EIIPCTEF.js.map +7 -0
  50. package/dist/lib/cubing/chunks/{twsearch-ITWEA5PO.js → twsearch-TGLVN7TI.js} +2 -2
  51. package/dist/lib/cubing/{index-g0IQg962.d.ts → index-Drw5ySJm.d.ts} +2 -2
  52. package/dist/lib/cubing/kpuzzle/index.d.ts +1 -1
  53. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  54. package/dist/lib/cubing/notation/index.d.ts +3 -3
  55. package/dist/lib/cubing/notation/index.js +4 -4
  56. package/dist/lib/cubing/protocol/index.d.ts +1 -1
  57. package/dist/lib/cubing/protocol/index.js +4 -4
  58. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -2
  59. package/dist/lib/cubing/puzzle-geometry/index.js +456 -438
  60. package/dist/lib/cubing/puzzle-geometry/index.js.map +3 -3
  61. package/dist/lib/cubing/puzzles/index.d.ts +1 -1
  62. package/dist/lib/cubing/puzzles/index.js +4 -4
  63. package/dist/lib/cubing/scramble/index.d.ts +2 -2
  64. package/dist/lib/cubing/scramble/index.js +6 -6
  65. package/dist/lib/cubing/search/index.d.ts +2 -2
  66. package/dist/lib/cubing/search/index.js +6 -6
  67. package/dist/lib/cubing/stream/index.d.ts +22 -22
  68. package/dist/lib/cubing/stream/index.js +41 -41
  69. package/dist/lib/cubing/stream/index.js.map +3 -3
  70. package/dist/lib/cubing/twisty/index.d.ts +8 -8
  71. package/dist/lib/cubing/twisty/index.js +3678 -3638
  72. package/dist/lib/cubing/twisty/index.js.map +4 -4
  73. package/package.json +13 -7
  74. package/dist/bin/chunks/chunk-DFQMTDRG.js.map +0 -7
  75. package/dist/lib/cubing/chunks/chunk-2SBMIHZV.js.map +0 -7
  76. package/dist/lib/cubing/chunks/chunk-KO64SKMG.js.map +0 -7
  77. package/dist/lib/cubing/chunks/chunk-M4T7GO54.js.map +0 -7
  78. package/dist/lib/cubing/chunks/chunk-MA47PABE.js.map +0 -7
  79. package/dist/lib/cubing/chunks/chunk-TQF5J7MH.js.map +0 -7
  80. package/dist/lib/cubing/chunks/chunk-WOAANT6Y.js.map +0 -7
  81. package/dist/lib/cubing/chunks/chunk-XPH22PGR.js.map +0 -7
  82. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-ZYGVRJQK.js.map +0 -7
  83. package/dist/lib/cubing/chunks/twisty-dynamic-3d-QGRCHB6L.js.map +0 -7
  84. /package/dist/lib/cubing/chunks/{chunk-BQNTAVTA.js.map → chunk-GKM2CK6T.js.map} +0 -0
  85. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-6MKLH6KJ.js.map → search-dynamic-solve-4x4x4-3CROPIQD.js.map} +0 -0
  86. /package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-5YRST2XM.js.map → search-dynamic-solve-fto-NKAFVO65.js.map} +0 -0
  87. /package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-W64XQPBF.js.map → search-dynamic-solve-kilominx-EDGE5SP4.js.map} +0 -0
  88. /package/dist/lib/cubing/chunks/{twsearch-ITWEA5PO.js.map → twsearch-TGLVN7TI.js.map} +0 -0
@@ -26,6 +26,30 @@ declare abstract class AlgCommon<T extends Alg | AlgNode> extends Comparable imp
26
26
  abstract experimentalExpand(iterDir: IterationDirection): Generator<AlgLeaf>;
27
27
  }
28
28
 
29
+ /** @category Alg Nodes */
30
+ declare class Commutator extends AlgCommon<Commutator> {
31
+ #private;
32
+ constructor(aSource: FlexibleAlgSource, bSource: FlexibleAlgSource);
33
+ get A(): Alg;
34
+ get B(): Alg;
35
+ isIdentical(other: Comparable): boolean;
36
+ invert(): Commutator;
37
+ experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
38
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
39
+ }
40
+
41
+ /** @category Alg Nodes */
42
+ declare class Conjugate extends AlgCommon<Conjugate> {
43
+ #private;
44
+ constructor(aSource: FlexibleAlgSource, bSource: FlexibleAlgSource);
45
+ get A(): Alg;
46
+ get B(): Alg;
47
+ isIdentical(other: Comparable): boolean;
48
+ invert(): Conjugate;
49
+ experimentalExpand(iterDir: IterationDirection, depth?: number): Generator<AlgLeaf>;
50
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
51
+ }
52
+
29
53
  interface QuantumMoveModifications {
30
54
  outerLayer?: number;
31
55
  innerLayer?: number;
@@ -44,7 +68,7 @@ declare class QuantumMove extends Comparable {
44
68
  /** @deprecated */
45
69
  get innerLayer(): number | null;
46
70
  experimentalExpand(): Generator<AlgLeaf>;
47
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
71
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
48
72
  }
49
73
  interface MoveModifications {
50
74
  outerLayer?: number;
@@ -77,7 +101,7 @@ declare class Move extends AlgCommon<Move> {
77
101
  /** @category Alg Nodes */
78
102
  declare class Pause extends AlgCommon<Pause> {
79
103
  experimentalNISSGrouping?: Grouping;
80
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
104
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
81
105
  isIdentical(other: Comparable): boolean;
82
106
  invert(): Pause;
83
107
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
@@ -108,36 +132,12 @@ declare class LineComment extends AlgCommon<LineComment> {
108
132
  isIdentical(other: Comparable): boolean;
109
133
  invert(): LineComment;
110
134
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
111
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
112
- }
113
-
114
- /** @category Alg Nodes */
115
- declare class Commutator extends AlgCommon<Commutator> {
116
- #private;
117
- constructor(aSource: FlexibleAlgSource, bSource: FlexibleAlgSource);
118
- get A(): Alg;
119
- get B(): Alg;
120
- isIdentical(other: Comparable): boolean;
121
- invert(): Commutator;
122
- experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
123
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
124
- }
125
-
126
- /** @category Alg Nodes */
127
- declare class Conjugate extends AlgCommon<Conjugate> {
128
- #private;
129
- constructor(aSource: FlexibleAlgSource, bSource: FlexibleAlgSource);
130
- get A(): Alg;
131
- get B(): Alg;
132
- isIdentical(other: Comparable): boolean;
133
- invert(): Conjugate;
134
- experimentalExpand(iterDir: IterationDirection, depth?: number): Generator<AlgLeaf>;
135
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
135
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
136
136
  }
137
137
 
138
138
  /** @category Alg Nodes */
139
139
  declare class Newline extends AlgCommon<Newline> {
140
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
140
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
141
141
  isIdentical(other: Comparable): boolean;
142
142
  invert(): Newline;
143
143
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
@@ -408,47 +408,6 @@ declare class Perm {
408
408
  order(): number;
409
409
  }
410
410
 
411
- declare class KTransformation {
412
- #private;
413
- readonly kpuzzle: KPuzzle;
414
- readonly transformationData: KTransformationData;
415
- constructor(kpuzzle: KPuzzle, transformationData: KTransformationData);
416
- toJSON(): any;
417
- invert(): KTransformation;
418
- isIdentityTransformation(): boolean;
419
- /** @deprecated */
420
- static experimentalConstructIdentity(kpuzzle: KPuzzle): KTransformation;
421
- isIdentical(t2: KTransformation): boolean;
422
- /** @deprecated */
423
- apply(source: KTransformationSource): KTransformation;
424
- applyTransformation(t2: KTransformation): KTransformation;
425
- applyMove(move: Move | string): KTransformation;
426
- applyAlg(alg: Alg | string): KTransformation;
427
- toKPattern(): KPattern;
428
- repetitionOrder(): number;
429
- selfMultiply(amount: number): KTransformation;
430
- }
431
-
432
- declare class KPattern {
433
- readonly kpuzzle: KPuzzle;
434
- readonly patternData: KPatternData;
435
- constructor(kpuzzle: KPuzzle, patternData: KPatternData);
436
- toJSON(): any;
437
- static fromTransformation(transformation: KTransformation): KPattern;
438
- /** @deprecated */
439
- apply(source: KTransformationSource): KPattern;
440
- applyTransformation(transformation: KTransformation): KPattern;
441
- applyMove(move: Move | string): KPattern;
442
- applyAlg(alg: Alg | string): KPattern;
443
- isIdentical(other: KPattern): boolean;
444
- /** @deprecated */
445
- experimentalToTransformation(): KTransformation | null;
446
- experimentalIsSolved(options: {
447
- ignorePuzzleOrientation: boolean;
448
- ignoreCenterOrientation: boolean;
449
- }): boolean;
450
- }
451
-
452
411
  type KPatternData = Record<string, KPatternOrbitData>;
453
412
  interface KPatternOrbitData {
454
413
  pieces: number[];
@@ -769,42 +728,42 @@ type MoveSetGeo = [string, string, string, string, number];
769
728
  declare class PuzzleGeometry {
770
729
  puzzleDescription: PuzzleDescription;
771
730
  private rotations;
772
- baseplanerot: Quat[];
773
- private baseplanes;
774
- private facenames;
775
- private faceplanes;
776
- private edgenames;
777
- private vertexnames;
778
- private geonormals;
779
- private moveplanes;
780
- private moveplanes2;
781
- moveplanesets: Quat[][];
782
- private moveplanenormals;
783
- movesetorders: number[];
784
- movesetgeos: MoveSetGeo[];
785
- private basefaces;
731
+ basePlaneRotations: Quat[];
732
+ private basePlanes;
733
+ private faceNames;
734
+ private facePlanes;
735
+ private edgeNames;
736
+ private vertexNames;
737
+ private geometryNormals;
738
+ private movePlanes;
739
+ private movePlanesFiltered;
740
+ movePlaneSets?: Quat[][];
741
+ private movePlaneNormals?;
742
+ movesetorders?: number[];
743
+ movesetgeos?: MoveSetGeo[];
744
+ private baseFaces;
786
745
  private faces;
787
- private facecentermass;
746
+ private faceCenterMass?;
788
747
  private baseFaceCount;
789
- stickersperface: number;
790
- shortedge: number;
791
- private markedface;
748
+ stickersPerFace: number;
749
+ shortestEdge: number;
750
+ private markedFaceLookup;
792
751
  cubies: number[][];
793
- private vertexdistance;
794
- private edgedistance;
795
- private facetocubie;
796
- private facetoord;
797
- private moverotations;
798
- private facelisthash;
799
- private cubiesetnames;
800
- private cubieords;
801
- private cubiesetnums;
802
- private cubieordnums;
803
- private orbitoris;
804
- private cubievaluemap;
805
- private cubiesetcubies;
806
- cmovesbyslice: number[][][];
807
- parsedmovelist: [
752
+ private vertexDistance;
753
+ private edgeDistance;
754
+ private faceToCubie?;
755
+ private faceToCubieOrd?;
756
+ private moveRotations?;
757
+ private faceListHash?;
758
+ private cubieSetNames?;
759
+ private cubieOrbitSizes?;
760
+ private cubieSetNums?;
761
+ private cubieOrdNums?;
762
+ private orbitOrientations?;
763
+ private cubieValueMap?;
764
+ private cubieSetCubies?;
765
+ cmovesBySlice: number[][][];
766
+ parsedMoveList?: [
808
767
  string | undefined,
809
768
  number,
810
769
  number,
@@ -823,7 +782,6 @@ declare class PuzzleGeometry {
823
782
  private setReidOrSpeffzOrder;
824
783
  private options;
825
784
  constructor(puzzleDescription: PuzzleDescription, options: PuzzleGeometryOptions);
826
- create(puzzleDescription: PuzzleDescription): void;
827
785
  private keyface;
828
786
  private keyface2;
829
787
  private keyface3;
@@ -875,6 +833,27 @@ declare class PGNotation {
875
833
  remapKPuzzleDefinition(kpuzzleDefinition: KPuzzleDefinition): KPuzzleDefinition;
876
834
  }
877
835
 
836
+ declare class KTransformation {
837
+ #private;
838
+ readonly kpuzzle: KPuzzle;
839
+ readonly transformationData: KTransformationData;
840
+ constructor(kpuzzle: KPuzzle, transformationData: KTransformationData);
841
+ toJSON(): any;
842
+ invert(): KTransformation;
843
+ isIdentityTransformation(): boolean;
844
+ /** @deprecated */
845
+ static experimentalConstructIdentity(kpuzzle: KPuzzle): KTransformation;
846
+ isIdentical(t2: KTransformation): boolean;
847
+ /** @deprecated */
848
+ apply(source: KTransformationSource): KTransformation;
849
+ applyTransformation(t2: KTransformation): KTransformation;
850
+ applyMove(move: Move | string): KTransformation;
851
+ applyAlg(alg: Alg | string): KTransformation;
852
+ toKPattern(): KPattern;
853
+ repetitionOrder(): number;
854
+ selfMultiply(amount: number): KTransformation;
855
+ }
856
+
878
857
  type KTransformationSource = Alg | Move | string | KTransformation;
879
858
  declare class KPuzzle {
880
859
  #private;
@@ -894,26 +873,25 @@ declare class KPuzzle {
894
873
  canConvertDefaultPatternToUniqueTransformation(): boolean;
895
874
  }
896
875
 
897
- declare const experimentalStickerings: Record<string, {
898
- groups?: Partial<Record<PuzzleID, string>>;
899
- }>;
900
-
901
- type FaceletMeshStickeringMask = "regular" | "dim" | "oriented" | "experimentalOriented2" | "ignored" | "invisible" | "mystery";
902
- type FaceletStickeringMask = {
903
- mask: FaceletMeshStickeringMask;
904
- hintMask?: FaceletMeshStickeringMask;
905
- };
906
- type PieceStickeringMask = {
907
- facelets: (FaceletMeshStickeringMask | FaceletStickeringMask | null)[];
908
- };
909
- type OrbitStickeringMask = {
910
- pieces: (PieceStickeringMask | null)[];
911
- };
912
- type StickeringMask = {
913
- specialBehaviour?: "picture";
914
- name?: string;
915
- orbits: Record<string, OrbitStickeringMask>;
916
- };
876
+ declare class KPattern {
877
+ readonly kpuzzle: KPuzzle;
878
+ readonly patternData: KPatternData;
879
+ constructor(kpuzzle: KPuzzle, patternData: KPatternData);
880
+ toJSON(): any;
881
+ static fromTransformation(transformation: KTransformation): KPattern;
882
+ /** @deprecated */
883
+ apply(source: KTransformationSource): KPattern;
884
+ applyTransformation(transformation: KTransformation): KPattern;
885
+ applyMove(move: Move | string): KPattern;
886
+ applyAlg(alg: Alg | string): KPattern;
887
+ isIdentical(other: KPattern): boolean;
888
+ /** @deprecated */
889
+ experimentalToTransformation(): KTransformation | null;
890
+ experimentalIsSolved(options: {
891
+ ignorePuzzleOrientation: boolean;
892
+ ignoreCenterOrientation: boolean;
893
+ }): boolean;
894
+ }
917
895
 
918
896
  type MillisecondTimestamp = number;
919
897
  type Duration = MillisecondTimestamp;
@@ -941,6 +919,58 @@ interface TimeRange {
941
919
  end: MillisecondTimestamp;
942
920
  }
943
921
 
922
+ type AnimatedLeafAlgNode = Move | Pause;
923
+
924
+ interface CurrentMove {
925
+ move: Move;
926
+ direction: Direction;
927
+ fraction: number;
928
+ startTimestamp: MillisecondTimestamp;
929
+ endTimestamp: MillisecondTimestamp;
930
+ }
931
+ interface CurrentMoveInfo {
932
+ patternIndex: number;
933
+ currentMoves: CurrentMove[];
934
+ movesFinishing: CurrentMove[];
935
+ movesFinished: CurrentMove[];
936
+ movesStarting: CurrentMove[];
937
+ latestStart: number;
938
+ earliestEnd: number;
939
+ }
940
+ interface AlgIndexer {
941
+ getAnimLeaf(index: number): AnimatedLeafAlgNode | null;
942
+ indexToMoveStartTimestamp(index: number): Timestamp;
943
+ patternAtIndex(index: number, startPattern?: KPattern): KPattern;
944
+ transformationAtIndex(index: number): KTransformation;
945
+ numAnimatedLeaves(): number;
946
+ timestampToIndex(timestamp: Timestamp): number;
947
+ algDuration(): Duration;
948
+ moveDuration(index: number): number;
949
+ timestampToPosition?: (timestamp: Timestamp, startPattern?: KPattern) => PuzzlePosition;
950
+ currentMoveInfo?: (timestamp: Timestamp) => CurrentMoveInfo;
951
+ }
952
+
953
+ type FaceletMeshStickeringMask = "regular" | "dim" | "oriented" | "experimentalOriented2" | "ignored" | "invisible" | "mystery";
954
+ type FaceletStickeringMask = {
955
+ mask: FaceletMeshStickeringMask;
956
+ hintMask?: FaceletMeshStickeringMask;
957
+ };
958
+ type PieceStickeringMask = {
959
+ facelets: (FaceletMeshStickeringMask | FaceletStickeringMask | null)[];
960
+ };
961
+ type OrbitStickeringMask = {
962
+ pieces: (PieceStickeringMask | null)[];
963
+ };
964
+ type StickeringMask = {
965
+ specialBehaviour?: "picture";
966
+ name?: string;
967
+ orbits: Record<string, OrbitStickeringMask>;
968
+ };
969
+
970
+ declare const experimentalStickerings: Record<string, {
971
+ groups?: Partial<Record<PuzzleID, string>>;
972
+ }>;
973
+
944
974
  interface UserVisibleError {
945
975
  errors: string[];
946
976
  }
@@ -992,14 +1022,96 @@ declare abstract class TwistyPropSource<OutputType, InputType = OutputType> exte
992
1022
  declare abstract class SimpleTwistyPropSource<SimpleType> extends TwistyPropSource<SimpleType> {
993
1023
  protected derive(input: SimpleType): PromiseOrValue<SimpleType>;
994
1024
  }
995
- declare const NO_VALUE: unique symbol;
996
- type NoValueType = typeof NO_VALUE;
997
- declare abstract class TwistyPropDerived<InputTypes extends InputRecord, OutputType> extends TwistyPropParent<OutputType> {
998
- #private;
999
- protected userVisibleErrorTracker?: UserVisibleErrorTracker | undefined;
1000
- constructor(parents: InputProps<InputTypes>, userVisibleErrorTracker?: UserVisibleErrorTracker | undefined);
1001
- get(): Promise<OutputType>;
1002
- protected abstract derive(input: InputTypes): PromiseOrValue<OutputType>;
1025
+ declare const NO_VALUE: unique symbol;
1026
+ type NoValueType = typeof NO_VALUE;
1027
+ declare abstract class TwistyPropDerived<InputTypes extends InputRecord, OutputType> extends TwistyPropParent<OutputType> {
1028
+ #private;
1029
+ protected userVisibleErrorTracker?: UserVisibleErrorTracker | undefined;
1030
+ constructor(parents: InputProps<InputTypes>, userVisibleErrorTracker?: UserVisibleErrorTracker | undefined);
1031
+ get(): Promise<OutputType>;
1032
+ protected abstract derive(input: InputTypes): PromiseOrValue<OutputType>;
1033
+ }
1034
+
1035
+ declare const puzzleIDs: {
1036
+ "3x3x3": boolean;
1037
+ custom: boolean;
1038
+ "2x2x2": boolean;
1039
+ "4x4x4": boolean;
1040
+ "5x5x5": boolean;
1041
+ "6x6x6": boolean;
1042
+ "7x7x7": boolean;
1043
+ "40x40x40": boolean;
1044
+ megaminx: boolean;
1045
+ pyraminx: boolean;
1046
+ square1: boolean;
1047
+ clock: boolean;
1048
+ skewb: boolean;
1049
+ fto: boolean;
1050
+ gigaminx: boolean;
1051
+ master_tetraminx: boolean;
1052
+ kilominx: boolean;
1053
+ redi_cube: boolean;
1054
+ baby_fto: boolean;
1055
+ melindas2x2x2x2: boolean;
1056
+ tri_quad: boolean;
1057
+ loopover: boolean;
1058
+ };
1059
+ type PuzzleID = keyof typeof puzzleIDs;
1060
+ declare class PuzzleIDRequestProp extends SimpleTwistyPropSource<PuzzleID | NoValueType> {
1061
+ getDefaultValue(): PuzzleID | NoValueType;
1062
+ }
1063
+
1064
+ type ExperimentalStickering = keyof typeof experimentalStickerings;
1065
+ declare class StickeringRequestProp extends SimpleTwistyPropSource<ExperimentalStickering | null> {
1066
+ getDefaultValue(): ExperimentalStickering | null;
1067
+ }
1068
+
1069
+ declare const backViewLayouts: {
1070
+ none: boolean;
1071
+ "side-by-side": boolean;
1072
+ "top-right": boolean;
1073
+ };
1074
+ type BackViewLayout = keyof typeof backViewLayouts;
1075
+ type BackViewLayoutWithAuto = BackViewLayout | "auto";
1076
+ declare class BackViewProp extends SimpleTwistyPropSource<BackViewLayoutWithAuto> {
1077
+ getDefaultValue(): BackViewLayoutWithAuto;
1078
+ }
1079
+
1080
+ declare const visualizationFormats: {
1081
+ readonly "3D": true;
1082
+ readonly "2D": true;
1083
+ readonly "experimental-2D-LL": true;
1084
+ readonly "experimental-2D-LL-face": true;
1085
+ readonly PG3D: true;
1086
+ };
1087
+ type VisualizationFormat = keyof typeof visualizationFormats;
1088
+ type VisualizationFormatWithAuto = VisualizationFormat | "auto";
1089
+ declare class VisualizationFormatProp extends SimpleTwistyPropSource<VisualizationFormatWithAuto> {
1090
+ getDefaultValue(): VisualizationFormatWithAuto;
1091
+ }
1092
+
1093
+ declare let HTMLElementShim: typeof HTMLElement;
1094
+
1095
+ declare class ManagedCustomElement extends HTMLElementShim {
1096
+ readonly shadow: ShadowRoot;
1097
+ readonly contentWrapper: HTMLDivElement;
1098
+ constructor(options?: {
1099
+ mode?: "open" | "closed";
1100
+ });
1101
+ protected addCSS(cssSource: CSSStyleSheet): void;
1102
+ protected removeCSS(cssSource: CSSStyleSheet): void;
1103
+ addElement<T extends Node>(element: T): T;
1104
+ prependElement<T extends Node>(element: T): void;
1105
+ removeElement<T extends Node>(element: T): T;
1106
+ }
1107
+
1108
+ interface CatchUpMove {
1109
+ move: Move | null;
1110
+ amount: number;
1111
+ }
1112
+ declare class CatchUpMoveProp extends SimpleTwistyPropSource<CatchUpMove> {
1113
+ getDefaultValue(): CatchUpMove;
1114
+ protected canReuseValue(v1: CatchUpMove, v2: CatchUpMove): boolean;
1003
1115
  }
1004
1116
 
1005
1117
  type SimpleDirection = Direction.Forwards | Direction.Backwards;
@@ -1056,37 +1168,6 @@ declare class AlgTransformationProp extends TwistyPropDerived<AlgTransformationP
1056
1168
  derive(input: AlgTransformationPropInputs): KTransformation;
1057
1169
  }
1058
1170
 
1059
- type AnimatedLeafAlgNode = Move | Pause;
1060
-
1061
- interface CurrentMove {
1062
- move: Move;
1063
- direction: Direction;
1064
- fraction: number;
1065
- startTimestamp: MillisecondTimestamp;
1066
- endTimestamp: MillisecondTimestamp;
1067
- }
1068
- interface CurrentMoveInfo {
1069
- patternIndex: number;
1070
- currentMoves: CurrentMove[];
1071
- movesFinishing: CurrentMove[];
1072
- movesFinished: CurrentMove[];
1073
- movesStarting: CurrentMove[];
1074
- latestStart: number;
1075
- earliestEnd: number;
1076
- }
1077
- interface AlgIndexer {
1078
- getAnimLeaf(index: number): AnimatedLeafAlgNode | null;
1079
- indexToMoveStartTimestamp(index: number): Timestamp;
1080
- patternAtIndex(index: number, startPattern?: KPattern): KPattern;
1081
- transformationAtIndex(index: number): KTransformation;
1082
- numAnimatedLeaves(): number;
1083
- timestampToIndex(timestamp: Timestamp): number;
1084
- algDuration(): Duration;
1085
- moveDuration(index: number): number;
1086
- timestampToPosition?: (timestamp: Timestamp, startPattern?: KPattern) => PuzzlePosition;
1087
- currentMoveInfo?: (timestamp: Timestamp) => CurrentMoveInfo;
1088
- }
1089
-
1090
1171
  declare const setupToLocations: {
1091
1172
  start: boolean;
1092
1173
  end: boolean;
@@ -1116,15 +1197,6 @@ declare class AnimationTimelineLeavesRequestProp extends SimpleTwistyPropSource<
1116
1197
  getDefaultValue(): AnimationTimelineLeaf[] | null;
1117
1198
  }
1118
1199
 
1119
- interface CatchUpMove {
1120
- move: Move | null;
1121
- amount: number;
1122
- }
1123
- declare class CatchUpMoveProp extends SimpleTwistyPropSource<CatchUpMove> {
1124
- getDefaultValue(): CatchUpMove;
1125
- protected canReuseValue(v1: CatchUpMove, v2: CatchUpMove): boolean;
1126
- }
1127
-
1128
1200
  interface CurrentLeavesSimplifiedPropInputs {
1129
1201
  currentMoveInfo: CurrentMoveInfo;
1130
1202
  }
@@ -1188,19 +1260,6 @@ declare class CurrentPatternProp extends TwistyPropDerived<CurrentTransformation
1188
1260
  derive(inputs: CurrentTransformationPropInputs): KPattern;
1189
1261
  }
1190
1262
 
1191
- declare const visualizationFormats: {
1192
- readonly "3D": true;
1193
- readonly "2D": true;
1194
- readonly "experimental-2D-LL": true;
1195
- readonly "experimental-2D-LL-face": true;
1196
- readonly PG3D: true;
1197
- };
1198
- type VisualizationFormat = keyof typeof visualizationFormats;
1199
- type VisualizationFormatWithAuto = VisualizationFormat | "auto";
1200
- declare class VisualizationFormatProp extends SimpleTwistyPropSource<VisualizationFormatWithAuto> {
1201
- getDefaultValue(): VisualizationFormatWithAuto;
1202
- }
1203
-
1204
1263
  type VisualizationStrategyPropInputs = {
1205
1264
  visualizationRequest: VisualizationFormatWithAuto;
1206
1265
  puzzleID: PuzzleID;
@@ -1210,35 +1269,6 @@ declare class VisualizationStrategyProp extends TwistyPropDerived<VisualizationS
1210
1269
  derive(inputs: VisualizationStrategyPropInputs): VisualizationStrategy;
1211
1270
  }
1212
1271
 
1213
- declare const puzzleIDs: {
1214
- "3x3x3": boolean;
1215
- custom: boolean;
1216
- "2x2x2": boolean;
1217
- "4x4x4": boolean;
1218
- "5x5x5": boolean;
1219
- "6x6x6": boolean;
1220
- "7x7x7": boolean;
1221
- "40x40x40": boolean;
1222
- megaminx: boolean;
1223
- pyraminx: boolean;
1224
- square1: boolean;
1225
- clock: boolean;
1226
- skewb: boolean;
1227
- fto: boolean;
1228
- gigaminx: boolean;
1229
- master_tetraminx: boolean;
1230
- kilominx: boolean;
1231
- redi_cube: boolean;
1232
- baby_fto: boolean;
1233
- melindas2x2x2x2: boolean;
1234
- tri_quad: boolean;
1235
- loopover: boolean;
1236
- };
1237
- type PuzzleID = keyof typeof puzzleIDs;
1238
- declare class PuzzleIDRequestProp extends SimpleTwistyPropSource<PuzzleID | NoValueType> {
1239
- getDefaultValue(): PuzzleID | NoValueType;
1240
- }
1241
-
1242
1272
  declare const indexerStrategyNames: {
1243
1273
  auto: boolean;
1244
1274
  simple: boolean;
@@ -1324,19 +1354,18 @@ declare class PuzzleLoaderProp extends TwistyPropDerived<PuzzleLoaderPropInputs,
1324
1354
  derive(inputs: PuzzleLoaderPropInputs): PuzzleLoader;
1325
1355
  }
1326
1356
 
1327
- declare let HTMLElementShim: typeof HTMLElement;
1328
-
1329
- declare class ManagedCustomElement extends HTMLElementShim {
1330
- readonly shadow: ShadowRoot;
1331
- readonly contentWrapper: HTMLDivElement;
1332
- constructor(options?: {
1333
- mode?: "open" | "closed";
1334
- });
1335
- protected addCSS(cssSource: CSSStyleSheet): void;
1336
- protected removeCSS(cssSource: CSSStyleSheet): void;
1337
- addElement<T extends Node>(element: T): T;
1338
- prependElement<T extends Node>(element: T): void;
1339
- removeElement<T extends Node>(element: T): T;
1357
+ declare class TwistyPlayerController {
1358
+ private model;
1359
+ animationController: TwistyAnimationController;
1360
+ constructor(model: TwistyPlayerModel, delegate: TwistyAnimationControllerDelegate);
1361
+ jumpToStart(options?: {
1362
+ flash: boolean;
1363
+ }): void;
1364
+ jumpToEnd(options?: {
1365
+ flash: boolean;
1366
+ }): void;
1367
+ togglePlay(play?: boolean): void;
1368
+ visitTwizzleLink(): Promise<void>;
1340
1369
  }
1341
1370
 
1342
1371
  declare const viewerLinkPages: {
@@ -1367,20 +1396,6 @@ declare class ButtonAppearanceProp extends TwistyPropDerived<ButtonAppearancePro
1367
1396
  derive(inputs: ButtonAppearancePropInputs): ButtonAppearances;
1368
1397
  }
1369
1398
 
1370
- declare class TwistyPlayerController {
1371
- private model;
1372
- animationController: TwistyAnimationController;
1373
- constructor(model: TwistyPlayerModel, delegate: TwistyAnimationControllerDelegate);
1374
- jumpToStart(options?: {
1375
- flash: boolean;
1376
- }): void;
1377
- jumpToEnd(options?: {
1378
- flash: boolean;
1379
- }): void;
1380
- togglePlay(play?: boolean): void;
1381
- visitTwizzleLink(): Promise<void>;
1382
- }
1383
-
1384
1399
  declare const colorSchemes: {
1385
1400
  light: boolean;
1386
1401
  dark: boolean;
@@ -1440,17 +1455,6 @@ declare class TempoScaleProp extends TwistyPropSource<number, number> {
1440
1455
  derive(v: number): number;
1441
1456
  }
1442
1457
 
1443
- declare const backViewLayouts: {
1444
- none: boolean;
1445
- "side-by-side": boolean;
1446
- "top-right": boolean;
1447
- };
1448
- type BackViewLayout = keyof typeof backViewLayouts;
1449
- type BackViewLayoutWithAuto = BackViewLayout | "auto";
1450
- declare class BackViewProp extends SimpleTwistyPropSource<BackViewLayoutWithAuto> {
1451
- getDefaultValue(): BackViewLayoutWithAuto;
1452
- }
1453
-
1454
1458
  declare const controlsLocations: {
1455
1459
  "bottom-row": boolean;
1456
1460
  none: boolean;
@@ -1501,11 +1505,6 @@ declare class SpriteProp extends TwistyPropDerived<SpritePropInputs, Texture | n
1501
1505
  derive(inputs: SpritePropInputs): Promise<Texture | null>;
1502
1506
  }
1503
1507
 
1504
- type ExperimentalStickering = keyof typeof experimentalStickerings;
1505
- declare class StickeringRequestProp extends SimpleTwistyPropSource<ExperimentalStickering | null> {
1506
- getDefaultValue(): ExperimentalStickering | null;
1507
- }
1508
-
1509
1508
  interface StickeringMaskPropInputs {
1510
1509
  stickeringMaskRequest: StickeringMask | null;
1511
1510
  stickeringRequest: ExperimentalStickering | null;
@@ -1623,6 +1622,7 @@ declare class TwistySceneModel {
1623
1622
  type Without<T, K extends string[]> = Pick<T, Exclude<keyof T, K[number]>>;
1624
1623
  declare class TwistyPlayerModel {
1625
1624
  userVisibleErrorTracker: UserVisibleErrorTracker;
1625
+ /******************************** Depth 0 ********************************/
1626
1626
  alg: AlgProp;
1627
1627
  backView: BackViewProp;
1628
1628
  controlPanel: ControlPanelProp;
@@ -1641,24 +1641,68 @@ declare class TwistyPlayerModel {
1641
1641
  title: ArbitraryStringProp;
1642
1642
  videoURL: URLProp;
1643
1643
  competitionID: ArbitraryStringProp;
1644
+ /**
1645
+ * `<twisty-player>` interally supports associating custom timing information
1646
+ * for this move, but there is not an API for this yet. In order to support
1647
+ * exploratory use cases for such a feature in the future, this property
1648
+ * allows setting timeline information.
1649
+ *
1650
+ * Note that this feature may not work as expected when combined with other
1651
+ * features. In particular, it will cause sync issues with an associated
1652
+ * `<twisty-alg-viewer>` depending on how the alg/moves are constructed.
1653
+ *
1654
+ * Usage example:
1655
+ *
1656
+ * ```ts
1657
+ * import { Move, Pause } from "cubing/alg";
1658
+ * import { TwistyPlayer } from "cubing/twisty";
1659
+ *
1660
+ * const player = document.body.appendChild(new TwistyPlayer());
1661
+ * player.alg = "R U' D2 R'";
1662
+ *
1663
+ * // Note that:
1664
+ * // - The leaves must match those of the alg. (No consistency checks are performed at this time.)
1665
+ * // - Leaves may overlap if they can be simultaneously animated.
1666
+ * // - There must always be at least one animating leaf at any moment. You can use a `Pause` for this if there is a gap between moves.
1667
+ * player.experimentalModel.animationTimelineLeavesRequest.set([
1668
+ * { animLeaf: new Move("R", 1), start: 0, end: 200 },
1669
+ * { animLeaf: new Pause(), start: 200, end: 218 },
1670
+ * { animLeaf: new Move("U", -1), start: 218, end: 370 },
1671
+ * { animLeaf: new Move("D", 2), start: 249, end: 520 },
1672
+ * { animLeaf: new Pause(), start: 520, end: 530 },
1673
+ * { animLeaf: new Move("R", -1), start: 530, end: 790 },
1674
+ * ]);
1675
+ * ```
1676
+ */
1644
1677
  animationTimelineLeavesRequest: AnimationTimelineLeavesRequestProp;
1678
+ /******************************** Depth 1 ********************************/
1645
1679
  puzzleLoader: PuzzleLoaderProp;
1680
+ /******************************** Depth 2 ********************************/
1646
1681
  kpuzzle: KPuzzleProp;
1647
1682
  puzzleID: PuzzleIDProp;
1683
+ /******************************** Depth 3 ********************************/
1648
1684
  puzzleAlg: PuzzleAlgProp;
1649
1685
  puzzleSetupAlg: PuzzleAlgProp;
1650
1686
  visualizationStrategy: VisualizationStrategyProp;
1687
+ /******************************** Depth 4 ********************************/
1651
1688
  indexerConstructor: IndexerConstructorProp;
1652
1689
  setupAlgTransformation: AlgTransformationProp;
1690
+ /******************************** Depth 5 ********************************/
1653
1691
  indexer: IndexerProp;
1692
+ /******************************** Depth 6 ********************************/
1654
1693
  anchorTransformation: AnchorTransformationProp;
1655
1694
  timeRange: TimeRangeProp;
1695
+ /******************************** Depth 7 ********************************/
1656
1696
  detailedTimelineInfo: DetailedTimelineInfoProp;
1697
+ /******************************** Depth 8 ********************************/
1657
1698
  coarseTimelineInfo: CoarseTimelineInfoProp;
1658
1699
  currentMoveInfo: CurrentMoveInfoProp;
1700
+ /******************************** Depth 9 ********************************/
1659
1701
  buttonAppearance: ButtonAppearanceProp;
1660
1702
  currentLeavesSimplified: CurrentLeavesSimplifiedProp;
1703
+ /******************************** Depth 10 ********************************/
1661
1704
  currentPattern: CurrentPatternProp;
1705
+ /******************************** Depth 11 ********************************/
1662
1706
  legacyPosition: LegacyPositionProp;
1663
1707
  twistySceneModel: TwistySceneModel;
1664
1708
  twizzleLink(): Promise<string>;
@@ -1762,7 +1806,7 @@ declare class DragTracker extends EventTarget {
1762
1806
  constructor(target: HTMLElement);
1763
1807
  start(): void;
1764
1808
  stop(): void;
1765
- addTargetListener(eventType: string, listener: (e: MouseEvent) => any): void;
1809
+ addTargetListener(eventType: string, listener: ((e: MouseEvent) => any) | ((e: PointerEvent) => any)): void;
1766
1810
  private onPointerDown;
1767
1811
  private onPointerMove;
1768
1812
  private onPointerUp;
@@ -1796,7 +1840,6 @@ declare class Twisty3DSceneWrapper extends ManagedCustomElement implements Sched
1796
1840
  constructor(model?: TwistyPlayerModel | undefined);
1797
1841
  connectedCallback(): Promise<void>;
1798
1842
  setBackView(backView: BackViewLayout): void;
1799
- onBackView(backView: BackViewLayout): void;
1800
1843
  onPress(e: CustomEvent<{
1801
1844
  pressInfo: PressInfo;
1802
1845
  cameraPromise: Promise<PerspectiveCamera>;
@@ -2021,7 +2064,7 @@ declare const intersectedCallback: unique symbol;
2021
2064
  declare class TwistyPlayer extends TwistyPlayerSettable implements TwistyAnimationControllerDelegate {
2022
2065
  #private;
2023
2066
  controller: TwistyPlayerController;
2024
- buttons: TwistyButtons;
2067
+ buttons?: TwistyButtons;
2025
2068
  experimentalCanvasClickCallback: (...args: any) => void;
2026
2069
  constructor(config?: TwistyPlayerConfig);
2027
2070
  connectedCallback(): Promise<void>;
@@ -2088,58 +2131,6 @@ interface ParserIndexed {
2088
2131
  }
2089
2132
  type Parsed<T extends Alg | AlgNode> = T & ParserIndexed;
2090
2133
 
2091
- declare class DataDown {
2092
- earliestMoveIndex: number;
2093
- twistyAlgViewer: TwistyAlgViewer;
2094
- direction: IterationDirection;
2095
- }
2096
- declare class DataUp {
2097
- moveCount: number;
2098
- element: TwistyAlgWrapperElem | TwistyAlgLeafElem;
2099
- }
2100
- declare class TwistyAlgLeafElem extends ManagedCustomElement {
2101
- algOrAlgNode: Alg | AlgNode;
2102
- constructor(className: string, text: string, dataDown: DataDown, algOrAlgNode: Alg | AlgNode, offsetIntoMove: boolean, clickable: boolean);
2103
- pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2104
- setCurrentMove(current: boolean): void;
2105
- }
2106
- declare class TwistyAlgWrapperElem extends HTMLElementShim {
2107
- algOrAlgNode: Alg | AlgNode;
2108
- private queue;
2109
- constructor(className: string, algOrAlgNode: Alg | AlgNode);
2110
- addString(str: string): void;
2111
- addElem(dataUp: DataUp): number;
2112
- flushQueue(direction?: IterationDirection): void;
2113
- pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2114
- }
2115
- declare class MoveHighlighter {
2116
- moveCharIndexMap: Map<number, TwistyAlgLeafElem>;
2117
- currentElem: TwistyAlgLeafElem | null;
2118
- addMove(charIndex: number, elem: TwistyAlgLeafElem): void;
2119
- set(move: Parsed<Move> | null): void;
2120
- }
2121
- /** @category Other Custom Elements */
2122
- declare class TwistyAlgViewer extends HTMLElementShim {
2123
- #private;
2124
- highlighter: MoveHighlighter;
2125
- lastClickTimestamp: number | null;
2126
- constructor(options?: {
2127
- twistyPlayer?: TwistyPlayer;
2128
- });
2129
- protected connectedCallback(): void;
2130
- private setAlg;
2131
- get twistyPlayer(): TwistyPlayer | null;
2132
- set twistyPlayer(twistyPlayer: TwistyPlayer | null);
2133
- jumpToIndex(index: number, offsetIntoMove: boolean): Promise<void>;
2134
- protected attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): Promise<void>;
2135
- static get observedAttributes(): string[];
2136
- }
2137
- declare global {
2138
- interface HTMLElementTagNameMap {
2139
- "twisty-alg-viewer": TwistyAlgViewer;
2140
- }
2141
- }
2142
-
2143
2134
  type AnimatedLeafAlgNodeInfo = {
2144
2135
  leaf: Parsed<AnimatedLeafAlgNode>;
2145
2136
  idx: number;
@@ -2246,6 +2237,58 @@ declare global {
2246
2237
  }
2247
2238
  }
2248
2239
 
2240
+ interface DataDown {
2241
+ earliestMoveIndex: number;
2242
+ twistyAlgViewer: TwistyAlgViewer;
2243
+ direction: IterationDirection;
2244
+ }
2245
+ interface DataUp {
2246
+ moveCount: number;
2247
+ element: TwistyAlgWrapperElem | TwistyAlgLeafElem;
2248
+ }
2249
+ declare class TwistyAlgLeafElem extends ManagedCustomElement {
2250
+ algOrAlgNode: Alg | AlgNode;
2251
+ constructor(className: string, text: string, dataDown: DataDown, algOrAlgNode: Alg | AlgNode, offsetIntoMove: boolean, clickable: boolean);
2252
+ pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2253
+ setCurrentMove(current: boolean): void;
2254
+ }
2255
+ declare class TwistyAlgWrapperElem extends HTMLElementShim {
2256
+ algOrAlgNode: Alg | AlgNode;
2257
+ private queue;
2258
+ constructor(className: string, algOrAlgNode: Alg | AlgNode);
2259
+ addString(str: string): void;
2260
+ addElem(dataUp: DataUp): number;
2261
+ flushQueue(direction?: IterationDirection): void;
2262
+ pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2263
+ }
2264
+ declare class MoveHighlighter {
2265
+ moveCharIndexMap: Map<number, TwistyAlgLeafElem>;
2266
+ currentElem: TwistyAlgLeafElem | null;
2267
+ addMove(charIndex: number, elem: TwistyAlgLeafElem): void;
2268
+ set(move: Parsed<Move> | null): void;
2269
+ }
2270
+ /** @category Other Custom Elements */
2271
+ declare class TwistyAlgViewer extends HTMLElementShim {
2272
+ #private;
2273
+ highlighter: MoveHighlighter;
2274
+ lastClickTimestamp: number | null;
2275
+ constructor(options?: {
2276
+ twistyPlayer?: TwistyPlayer;
2277
+ });
2278
+ protected connectedCallback(): void;
2279
+ private setAlg;
2280
+ get twistyPlayer(): TwistyPlayer | null;
2281
+ set twistyPlayer(twistyPlayer: TwistyPlayer | null);
2282
+ jumpToIndex(index: number, offsetIntoMove: boolean): Promise<void>;
2283
+ protected attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): Promise<void>;
2284
+ static get observedAttributes(): string[];
2285
+ }
2286
+ declare global {
2287
+ interface HTMLElementTagNameMap {
2288
+ "twisty-alg-viewer": TwistyAlgViewer;
2289
+ }
2290
+ }
2291
+
2249
2292
  declare class TwizzleLink extends ManagedCustomElement {
2250
2293
  #private;
2251
2294
  private options?;
@@ -2285,4 +2328,4 @@ interface PuzzleLoader {
2285
2328
  keyMapping?: () => Promise<KeyMapping>;
2286
2329
  }
2287
2330
 
2288
- export { LineComment as $, type AlgLeaf as A, TwistyPlayer as B, TwistyAlgViewer as C, type Duration as D, type ExperimentalStickering as E, TwistyAlgEditor as F, type TwistyPlayerConfig as G, type BackViewLayout as H, backViewLayouts as I, TwizzleLink as J, KPattern as K, type MillisecondTimestamp as L, Move as M, NO_VALUE as N, type AlgNode as O, Perm as P, Quat as Q, type AppendOptions as R, type StickerDat as S, type Timestamp as T, type KeyMapping as U, type VisualizationFormat as V, Grouping as W, Commutator as X, Conjugate as Y, Pause as Z, Newline as _, getPuzzleGeometryByDesc as a, type MoveModifications as a0, type AlgBranch as a1, type AppendCancelOptions as a2, type SimplifyOptions as a3, type Parsed as a4, type ExperimentalNotationType as a5, type ExperimentalSerializationOptions as a6, QuantumMove as a7, type KPuzzleDefinition as a8, type KPatternData as a9, type KPatternOrbitData as aa, type KTransformationData as ab, type KTransformationOrbitData as ac, getPuzzleGeometryByName as b, getPG3DNamedPuzzles as c, PuzzleGeometry as d, type StickerDatAxis as e, type StickerDatFace as f, getPuzzleDescriptionString as g, type StickerDatSticker as h, parseOptions as i, type PuzzleGeometryOptions as j, PGNotation as k, type PuzzleCutDescription as l, type PuzzleDescription as m, PUZZLE_CUT_TYPES as n, type PuzzleCutType as o, parsePuzzleDescription as p, PUZZLE_BASE_SHAPES as q, type PuzzleBaseShape as r, Alg as s, type PuzzleLoader as t, type PuzzleID as u, KPuzzle as v, type StickeringMask as w, type PuzzleSpecificSimplifyOptions as x, type AlgIndexer as y, KTransformation as z };
2331
+ export { type KeyMapping as $, type AlgLeaf as A, type MillisecondTimestamp as B, type BackViewLayout as C, type Duration as D, type ExperimentalStickering as E, backViewLayouts as F, TwistyAlgEditor as G, TwistyAlgViewer as H, type TwistyPlayerConfig as I, TwistyPlayer as J, KPattern as K, TwizzleLink as L, Move as M, NO_VALUE as N, type AlgNode as O, Perm as P, Quat as Q, type AppendOptions as R, type StickerDat as S, type Timestamp as T, Grouping as U, type VisualizationFormat as V, LineComment as W, Commutator as X, Conjugate as Y, Newline as Z, Pause as _, type PuzzleGeometryOptions as a, type AlgBranch as a0, type MoveModifications as a1, type Parsed as a2, type ExperimentalNotationType as a3, type ExperimentalSerializationOptions as a4, type AppendCancelOptions as a5, type SimplifyOptions as a6, QuantumMove as a7, type KPatternData as a8, type KPatternOrbitData as a9, type KPuzzleDefinition as aa, type KTransformationData as ab, type KTransformationOrbitData as ac, type StickerDatAxis as b, type StickerDatFace as c, type StickerDatSticker as d, getPuzzleDescriptionString as e, getPuzzleGeometryByDesc as f, getPG3DNamedPuzzles as g, getPuzzleGeometryByName as h, PGNotation as i, PUZZLE_BASE_SHAPES as j, PUZZLE_CUT_TYPES as k, type PuzzleBaseShape as l, type PuzzleCutDescription as m, type PuzzleCutType as n, type PuzzleDescription as o, parseOptions as p, PuzzleGeometry as q, parsePuzzleDescription as r, Alg as s, type PuzzleLoader as t, type PuzzleID as u, KPuzzle as v, type StickeringMask as w, type PuzzleSpecificSimplifyOptions as x, type AlgIndexer as y, KTransformation as z };