cubing 0.26.7 → 0.28.1

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 (107) hide show
  1. package/README.md +3 -1
  2. package/dist/esm/alg/index.js +7 -11
  3. package/dist/esm/bluetooth/index.js +15 -16
  4. package/dist/esm/bluetooth/index.js.map +2 -2
  5. package/dist/esm/{chunk-J4SZZ5OP.js → chunk-32FWPPTW.js} +3 -3
  6. package/dist/esm/chunk-32FWPPTW.js.map +7 -0
  7. package/dist/esm/{chunk-YEXEZWAK.js → chunk-67VJZGH2.js} +3 -3
  8. package/dist/esm/{chunk-YEXEZWAK.js.map → chunk-67VJZGH2.js.map} +1 -1
  9. package/dist/esm/{chunk-ITRA3DUQ.js → chunk-7D7LW3WQ.js} +2 -2
  10. package/dist/esm/{chunk-ITRA3DUQ.js.map → chunk-7D7LW3WQ.js.map} +1 -1
  11. package/dist/esm/{chunk-GBMX6FHY.js → chunk-ALBEW4DJ.js} +1 -1
  12. package/dist/esm/{chunk-GBMX6FHY.js.map → chunk-ALBEW4DJ.js.map} +1 -1
  13. package/dist/esm/{chunk-FCB447RN.js → chunk-CSBUJ64Q.js} +197 -128
  14. package/dist/esm/chunk-CSBUJ64Q.js.map +7 -0
  15. package/dist/esm/{chunk-WQK6XWML.js → chunk-F4WWCPVE.js} +2 -2
  16. package/dist/esm/{chunk-WQK6XWML.js.map → chunk-F4WWCPVE.js.map} +1 -1
  17. package/dist/esm/{chunk-YBDBUTYE.js → chunk-GVPTO3OF.js} +1 -1
  18. package/dist/esm/{chunk-YBDBUTYE.js.map → chunk-GVPTO3OF.js.map} +1 -1
  19. package/dist/esm/chunk-LSVR2HCG.js +1111 -0
  20. package/dist/esm/chunk-LSVR2HCG.js.map +7 -0
  21. package/dist/esm/{chunk-KSNW26OV.js → chunk-MWKALF6W.js} +7 -7
  22. package/dist/esm/{chunk-KSNW26OV.js.map → chunk-MWKALF6W.js.map} +1 -1
  23. package/dist/esm/{chunk-GLII3KIK.js → chunk-NPHUBFZ6.js} +6 -6
  24. package/dist/esm/chunk-NPHUBFZ6.js.map +7 -0
  25. package/dist/esm/{chunk-BEXHMXCT.js → chunk-RHC3DIN3.js} +1 -1
  26. package/dist/esm/{chunk-BEXHMXCT.js.map → chunk-RHC3DIN3.js.map} +1 -1
  27. package/dist/esm/{chunk-NYAPGKCW.js → chunk-V55YSWJY.js} +1 -1
  28. package/dist/esm/{chunk-NYAPGKCW.js.map → chunk-V55YSWJY.js.map} +1 -1
  29. package/dist/esm/{chunk-P637ZWHR.js → chunk-WAL36PO3.js} +7 -7
  30. package/dist/esm/{chunk-P637ZWHR.js.map → chunk-WAL36PO3.js.map} +1 -1
  31. package/dist/esm/{chunk-ASOUBXFO.js → chunk-YSVFZVG4.js} +14 -14
  32. package/dist/esm/chunk-YSVFZVG4.js.map +7 -0
  33. package/dist/esm/{chunk-QK4WH7WZ.js → chunk-ZY3RTFFS.js} +5 -5
  34. package/dist/esm/chunk-ZY3RTFFS.js.map +7 -0
  35. package/dist/esm/kpuzzle/index.js +2 -2
  36. package/dist/esm/notation/index.js +2 -2
  37. package/dist/esm/protocol/index.js +8 -8
  38. package/dist/esm/puzzle-geometry/index.js +4369 -14
  39. package/dist/esm/puzzle-geometry/index.js.map +3 -3
  40. package/dist/esm/puzzles/index.js +4 -4
  41. package/dist/esm/{puzzles-dynamic-side-events-HOXBZYWI.js → puzzles-dynamic-side-events-WZI4Y3N6.js} +1 -1
  42. package/dist/esm/{puzzles-dynamic-side-events-HOXBZYWI.js.map → puzzles-dynamic-side-events-WZI4Y3N6.js.map} +1 -1
  43. package/dist/esm/{puzzles-dynamic-unofficial-MGVOFUDR.js → puzzles-dynamic-unofficial-FUG3JBMH.js} +1 -1
  44. package/dist/esm/{puzzles-dynamic-unofficial-MGVOFUDR.js.map → puzzles-dynamic-unofficial-FUG3JBMH.js.map} +1 -1
  45. package/dist/esm/scramble/index.js +5 -5
  46. package/dist/esm/search/index.js +10 -10
  47. package/dist/esm/{search-dynamic-sgs-side-events-OUCE5RN6.js → search-dynamic-sgs-side-events-R3HDJ5XQ.js} +10 -12
  48. package/dist/esm/search-dynamic-sgs-side-events-R3HDJ5XQ.js.map +7 -0
  49. package/dist/esm/{search-dynamic-sgs-unofficial-KS2IT3DM.js → search-dynamic-sgs-unofficial-FQNKGHVO.js} +7 -7
  50. package/dist/esm/{search-dynamic-sgs-unofficial-KS2IT3DM.js.map → search-dynamic-sgs-unofficial-FQNKGHVO.js.map} +1 -1
  51. package/dist/esm/{search-dynamic-solve-3x3x3-K4TG7P3X.js → search-dynamic-solve-3x3x3-K42IWMQV.js} +1 -1
  52. package/dist/esm/{search-dynamic-solve-3x3x3-K4TG7P3X.js.map → search-dynamic-solve-3x3x3-K42IWMQV.js.map} +1 -1
  53. package/dist/esm/{search-dynamic-solve-4x4x4-6IIZNXXP.js → search-dynamic-solve-4x4x4-XRV4NBMQ.js} +8 -8
  54. package/dist/esm/{search-dynamic-solve-4x4x4-6IIZNXXP.js.map → search-dynamic-solve-4x4x4-XRV4NBMQ.js.map} +1 -1
  55. package/dist/esm/{search-dynamic-solve-fto-WROONLZS.js → search-dynamic-solve-fto-O6UXF7EC.js} +2 -2
  56. package/dist/esm/{search-dynamic-solve-fto-WROONLZS.js.map → search-dynamic-solve-fto-O6UXF7EC.js.map} +1 -1
  57. package/dist/esm/{search-dynamic-solve-kilominx-UEFJENHO.js → search-dynamic-solve-kilominx-G4MLGWNS.js} +3 -3
  58. package/dist/esm/{search-dynamic-solve-kilominx-UEFJENHO.js.map → search-dynamic-solve-kilominx-G4MLGWNS.js.map} +1 -1
  59. package/dist/esm/{search-dynamic-solve-master_tetraminx-3R2CJUKW.js → search-dynamic-solve-master_tetraminx-3RKD3IAN.js} +2 -2
  60. package/dist/esm/{search-dynamic-solve-master_tetraminx-3R2CJUKW.js.map → search-dynamic-solve-master_tetraminx-3RKD3IAN.js.map} +1 -1
  61. package/dist/esm/{search-dynamic-solve-sq1-RS5HN6AH.js → search-dynamic-solve-sq1-WIJEGVLP.js} +2 -2
  62. package/dist/esm/{search-dynamic-solve-sq1-RS5HN6AH.js.map → search-dynamic-solve-sq1-WIJEGVLP.js.map} +1 -1
  63. package/dist/esm/search-worker-inside-generated-string-IZCKWXUA.js +3768 -0
  64. package/dist/esm/search-worker-inside-generated-string-IZCKWXUA.js.map +7 -0
  65. package/dist/esm/{search-worker-js-entry-4A3O552B.js → search-worker-js-entry-WBEKNBB7.js} +21 -21
  66. package/dist/esm/search-worker-js-entry-WBEKNBB7.js.map +7 -0
  67. package/dist/esm/{search-worker-ts-entry-NUFPSU6U.js → search-worker-ts-entry-XQWMEOC4.js} +5 -5
  68. package/dist/esm/{search-worker-ts-entry-NUFPSU6U.js.map → search-worker-ts-entry-XQWMEOC4.js.map} +1 -1
  69. package/dist/esm/stream/index.js +4 -4
  70. package/dist/esm/stream/index.js.map +1 -1
  71. package/dist/esm/twisty/index.js +95 -813
  72. package/dist/esm/twisty/index.js.map +3 -3
  73. package/dist/esm/{twisty-dynamic-3d-YI5E4NWB.js → twisty-dynamic-3d-QOX7IEXC.js} +52 -17
  74. package/dist/esm/twisty-dynamic-3d-QOX7IEXC.js.map +7 -0
  75. package/dist/types/{Alg-5cf4b166.d.ts → Alg-e2a80975.d.ts} +66 -53
  76. package/dist/types/{KState-836cc3c7.d.ts → KState-a2f0e651.d.ts} +2 -1
  77. package/dist/types/{TwizzleLink-4f0a162d.d.ts → TwizzleLink-dcf51446.d.ts} +20 -16
  78. package/dist/types/alg/index.d.ts +16 -7
  79. package/dist/types/bluetooth/index.d.ts +17 -7
  80. package/dist/types/{bluetooth-puzzle-b1d62cb5.d.ts → bluetooth-puzzle-3670a6a1.d.ts} +6 -9
  81. package/dist/types/kpuzzle/index.d.ts +2 -2
  82. package/dist/types/notation/index.d.ts +1 -1
  83. package/dist/types/{outside-a6c8f46b.d.ts → outside-0ce1b145.d.ts} +2 -2
  84. package/dist/types/parseAlg-db0dec6c.d.ts +9 -0
  85. package/dist/types/protocol/index.d.ts +7 -3
  86. package/dist/types/puzzle-geometry/index.d.ts +3 -3
  87. package/dist/types/puzzles/index.d.ts +10 -5
  88. package/dist/types/scramble/index.d.ts +3 -3
  89. package/dist/types/search/index.d.ts +3 -3
  90. package/dist/types/stream/index.d.ts +4 -4
  91. package/dist/types/twisty/index.d.ts +13 -6
  92. package/package.json +29 -26
  93. package/dist/esm/chunk-ASOUBXFO.js.map +0 -7
  94. package/dist/esm/chunk-FCB447RN.js.map +0 -7
  95. package/dist/esm/chunk-GLII3KIK.js.map +0 -7
  96. package/dist/esm/chunk-J4SZZ5OP.js.map +0 -7
  97. package/dist/esm/chunk-KT3AIQTR.js +0 -4386
  98. package/dist/esm/chunk-KT3AIQTR.js.map +0 -7
  99. package/dist/esm/chunk-LKISJU2L.js +0 -339
  100. package/dist/esm/chunk-LKISJU2L.js.map +0 -7
  101. package/dist/esm/chunk-QK4WH7WZ.js.map +0 -7
  102. package/dist/esm/search-dynamic-sgs-side-events-OUCE5RN6.js.map +0 -7
  103. package/dist/esm/search-worker-inside-generated-string-GNBQVERX.js +0 -3768
  104. package/dist/esm/search-worker-inside-generated-string-GNBQVERX.js.map +0 -7
  105. package/dist/esm/search-worker-js-entry-4A3O552B.js.map +0 -7
  106. package/dist/esm/twisty-dynamic-3d-YI5E4NWB.js.map +0 -7
  107. package/dist/types/parse-9db7ee51.d.ts +0 -9
@@ -1,4 +1,4 @@
1
- import { M as Move, A as Alg } from './Alg-5cf4b166';
1
+ import { M as Move, a as Alg } from './Alg-e2a80975.js';
2
2
 
3
3
  declare type KTransformationData = Record<string, KTransformationOrbitData>;
4
4
  interface KTransformationOrbitData {
@@ -272,6 +272,7 @@ declare type PuzzleDescription = {
272
272
  declare function parsePuzzleDescription(s: PuzzleDescriptionString): PuzzleDescription | null;
273
273
  declare function getPuzzleGeometryByDesc(desc: string, options?: PuzzleGeometryOptions): PuzzleGeometry;
274
274
  declare function getPuzzleGeometryByName(puzzleName: PuzzleName, options?: PuzzleGeometryOptions): PuzzleGeometry;
275
+ /** @category PuzzleGeometry */
275
276
  declare class PuzzleGeometry {
276
277
  puzzleDescription: PuzzleDescription;
277
278
  private rotations;
@@ -1,7 +1,7 @@
1
1
  import { Texture, Object3D, Raycaster, PerspectiveCamera, Scene, WebGLRenderer } from 'three';
2
- import { M as Move, A as Alg, P as Pause, U as Unit, I as IterationDirection } from './Alg-5cf4b166';
3
- import { P as Parsed } from './parse-9db7ee51';
4
- import { K as KState, e as KTransformation, a as KPuzzle, w as PuzzleDescriptionString, j as PuzzleGeometry } from './KState-836cc3c7';
2
+ import { M as Move, a as Alg, P as Pause, A as AlgNode, I as IterationDirection } from './Alg-e2a80975.js';
3
+ import { P as Parsed } from './parseAlg-db0dec6c.js';
4
+ import { K as KState, e as KTransformation, a as KPuzzle, w as PuzzleDescriptionString, j as PuzzleGeometry } from './KState-a2f0e651.js';
5
5
 
6
6
  declare type MillisecondTimestamp = number;
7
7
  declare type Duration = MillisecondTimestamp;
@@ -144,7 +144,7 @@ declare class AlgTransformationProp extends TwistyPropDerived<AlgTransformationP
144
144
  derive(input: AlgTransformationPropInputs): KTransformation;
145
145
  }
146
146
 
147
- declare type AnimatedLeafUnit = Move | Pause;
147
+ declare type AnimatedLeafAlgNode = Move | Pause;
148
148
 
149
149
  interface CurrentMove {
150
150
  move: Move;
@@ -163,7 +163,7 @@ interface CurrentMoveInfo {
163
163
  earliestEnd: number;
164
164
  }
165
165
  interface AlgIndexer {
166
- getAnimLeaf(index: number): AnimatedLeafUnit | null;
166
+ getAnimLeaf(index: number): AnimatedLeafAlgNode | null;
167
167
  indexToMoveStartTimestamp(index: number): Timestamp;
168
168
  stateAtIndex(index: number, startSTate?: KState): KState;
169
169
  transformationAtIndex(index: number): KTransformation;
@@ -886,8 +886,6 @@ declare class TwistyOrbitControls {
886
886
  onUp(e: CustomEvent<DragMovementInfo>): void;
887
887
  }
888
888
 
889
- declare function debugShowRenderStats(enable: boolean): void;
890
- declare function experimentalForceNewRendererSharing(share: boolean | null): void;
891
889
  declare class Twisty3DVantage extends ManagedCustomElement {
892
890
  #private;
893
891
  private model?;
@@ -980,6 +978,7 @@ declare class ExperimentalGetters {
980
978
  timestamp(): Promise<MillisecondTimestamp>;
981
979
  }
982
980
 
981
+ /** @category TwistyPlayer */
983
982
  interface TwistyPlayerConfig {
984
983
  alg?: Alg | string;
985
984
  experimentalSetupAlg?: Alg | string;
@@ -1020,6 +1019,8 @@ interface TwistyPlayerConfig {
1020
1019
  * document.body.appendChild(twistyPlayer);
1021
1020
  *
1022
1021
  * See {@link https://js.cubing.net/cubing/} for more examples.
1022
+ *
1023
+ * @category TwistyPlayer
1023
1024
  */
1024
1025
  declare class TwistyPlayer extends TwistyPlayerSettable implements TwistyAnimationControllerDelegate {
1025
1026
  #private;
@@ -1071,15 +1072,15 @@ declare class DataUp {
1071
1072
  element: TwistyAlgWrapperElem | TwistyAlgLeafElem;
1072
1073
  }
1073
1074
  declare class TwistyAlgLeafElem extends ManagedCustomElement {
1074
- algOrUnit: Alg | Unit;
1075
- constructor(className: string, text: string, dataDown: DataDown, algOrUnit: Alg | Unit, offsetIntoMove: boolean, clickable: boolean);
1075
+ algOrAlgNode: Alg | AlgNode;
1076
+ constructor(className: string, text: string, dataDown: DataDown, algOrAlgNode: Alg | AlgNode, offsetIntoMove: boolean, clickable: boolean);
1076
1077
  pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
1077
1078
  setCurrentMove(current: boolean): void;
1078
1079
  }
1079
1080
  declare class TwistyAlgWrapperElem extends HTMLElementShim {
1080
- algOrUnit: Alg | Unit;
1081
+ algOrAlgNode: Alg | AlgNode;
1081
1082
  private queue;
1082
- constructor(className: string, algOrUnit: Alg | Unit);
1083
+ constructor(className: string, algOrAlgNode: Alg | AlgNode);
1083
1084
  addString(str: string): void;
1084
1085
  addElem(dataUp: DataUp): number;
1085
1086
  flushQueue(direction?: IterationDirection): void;
@@ -1091,6 +1092,7 @@ declare class MoveHighlighter {
1091
1092
  addMove(charIndex: number, elem: TwistyAlgLeafElem): void;
1092
1093
  set(move: Parsed<Move> | null): void;
1093
1094
  }
1095
+ /** @category Other Custom Elements */
1094
1096
  declare class TwistyAlgViewer extends HTMLElementShim {
1095
1097
  #private;
1096
1098
  highlighter: MoveHighlighter;
@@ -1112,11 +1114,11 @@ declare global {
1112
1114
  }
1113
1115
  }
1114
1116
 
1115
- declare type AnimatedLeafUnitInfo = {
1116
- leaf: Parsed<AnimatedLeafUnit>;
1117
+ declare type AnimatedLeafAlgNodeInfo = {
1118
+ leaf: Parsed<AnimatedLeafAlgNode>;
1117
1119
  idx: number;
1118
1120
  };
1119
- declare type OrderedLeafTokens = AnimatedLeafUnitInfo[];
1121
+ declare type OrderedLeafTokens = AnimatedLeafAlgNodeInfo[];
1120
1122
 
1121
1123
  declare class TwistyAlgEditorValueProp extends SimpleTwistyPropSource<string> {
1122
1124
  getDefaultValue(): string;
@@ -1160,7 +1162,7 @@ interface LeafToHighlightPropInputs {
1160
1162
  }
1161
1163
  declare type HighlightWhere = "before" | "start" | "inside" | "end" | "after";
1162
1164
  interface HighlightInfo {
1163
- leafInfo: AnimatedLeafUnitInfo;
1165
+ leafInfo: AnimatedLeafAlgNodeInfo;
1164
1166
  where: HighlightWhere;
1165
1167
  }
1166
1168
  declare class LeafToHighlightProp extends TwistyPropDerived<LeafToHighlightPropInputs, HighlightInfo | null> {
@@ -1189,6 +1191,7 @@ declare class TwistyAlgEditorModel {
1189
1191
  */
1190
1192
 
1191
1193
  declare type TwistyPlayerAlgProp = "alg" | "setupAlg";
1194
+ /** @category Other Custom Elements */
1192
1195
  declare class TwistyAlgEditor extends ManagedCustomElement {
1193
1196
  #private;
1194
1197
  model: TwistyAlgEditorModel;
@@ -1216,6 +1219,7 @@ declare global {
1216
1219
  }
1217
1220
  }
1218
1221
 
1222
+ /** @category Other Custom Elements */
1219
1223
  declare class TwizzleLink extends ManagedCustomElement {
1220
1224
  #private;
1221
1225
  twistyPlayer: TwistyPlayer | null;
@@ -1231,4 +1235,4 @@ declare global {
1231
1235
  }
1232
1236
  }
1233
1237
 
1234
- export { AlgIndexer as A, BackViewLayout as B, Duration as D, ExperimentalStickering as E, MillisecondTimestamp as M, NO_VALUE as N, PuzzleID as P, Timestamp as T, VisualizationFormat as V, PuzzleLoader as a, PuzzleAppearance as b, TwistyPlayer as c, TwistyAlgViewer as d, TwistyAlgEditor as e, TwistyPlayerConfig as f, experimentalForceNewRendererSharing as g, backViewLayouts as h, TwizzleLink as i, debugShowRenderStats as j };
1238
+ export { AlgIndexer as A, BackViewLayout as B, Duration as D, ExperimentalStickering as E, MillisecondTimestamp as M, NO_VALUE as N, PuzzleID as P, Timestamp as T, VisualizationFormat as V, PuzzleLoader as a, PuzzleAppearance as b, TwistyPlayer as c, TwistyAlgViewer as d, TwistyAlgEditor as e, TwistyPlayerConfig as f, backViewLayouts as g, TwizzleLink as h };
@@ -1,13 +1,17 @@
1
- import { U as Unit, A as Alg, M as Move, G as Grouping, L as LineComment, C as Commutator, a as Conjugate, N as Newline, P as Pause } from '../Alg-5cf4b166';
2
- export { A as Alg, C as Commutator, a as Conjugate, I as ExperimentalIterationDirection, G as Grouping, L as LineComment, M as Move, c as MoveModifications, N as Newline, P as Pause, Q as QuantumMove, T as TraversalDownUp, b as TraversalUp, U as Unit, e as experimentalDirect, d as experimentalDirectedGenerator } from '../Alg-5cf4b166';
3
- export { P as ExperimentalParsed } from '../parse-9db7ee51';
1
+ import { A as AlgNode, a as Alg, M as Move, G as Grouping, L as LineComment, C as Commutator, b as Conjugate, N as Newline, P as Pause } from '../Alg-e2a80975.js';
2
+ export { a as Alg, A as AlgNode, C as Commutator, b as Conjugate, G as Grouping, L as LineComment, M as Move, d as MoveModifications, N as Newline, P as Pause, Q as QuantumMove, T as TraversalDownUp, c as TraversalUp } from '../Alg-e2a80975.js';
3
+ export { P as ExperimentalParsed } from '../parseAlg-db0dec6c.js';
4
4
 
5
+ /** @deprecated */
6
+ declare type Unit = AlgNode;
7
+
8
+ /** @category Alg */
5
9
  declare class AlgBuilder {
6
10
  #private;
7
- push(u: Unit): void;
11
+ push(u: AlgNode): void;
8
12
  /** @deprecated */
9
13
  experimentalPushAlg(alg: Alg): void;
10
- experimentalNumUnits(): number;
14
+ experimentalNumAlgNodes(): number;
11
15
  toAlg(): Alg;
12
16
  reset(): void;
13
17
  }
@@ -37,7 +41,8 @@ interface AlgCubingNetOptions {
37
41
  view?: "editor" | "playback" | "fullscreen";
38
42
  type?: "moves" | "reconstruction" | "alg" | "reconstruction-end-with-setup";
39
43
  }
40
- declare function algCubingNetLink(options: AlgCubingNetOptions): string;
44
+ /** @deprecated */
45
+ declare function experimentalAlgCubingNetLink(options: AlgCubingNetOptions): string;
41
46
 
42
47
  declare function experimentalAppendMove(alg: Alg, newMove: Move, options?: {
43
48
  coalesce?: boolean;
@@ -46,4 +51,8 @@ declare function experimentalAppendMove(alg: Alg, newMove: Move, options?: {
46
51
 
47
52
  declare function experimentalIs(v: any, c: typeof Alg | typeof Grouping | typeof LineComment | typeof Commutator | typeof Conjugate | typeof Move | typeof Newline | typeof Pause): boolean;
48
53
 
49
- export { AlgBuilder, AlgCubingNetOptions, Example, algCubingNetLink, experimentalAppendMove, experimentalIs, keyToMove };
54
+ declare function setAlgDebug(options: {
55
+ caratNISSNotationEnabled?: boolean;
56
+ }): void;
57
+
58
+ export { AlgBuilder, AlgCubingNetOptions, Example, Unit, experimentalAlgCubingNetLink, experimentalAppendMove, experimentalIs, keyToMove, setAlgDebug };
@@ -1,10 +1,11 @@
1
- import { K as KState } from '../KState-836cc3c7';
2
- import { B as BluetoothPuzzle } from '../bluetooth-puzzle-b1d62cb5';
3
- export { a as BluetoothConfig, B as BluetoothPuzzle, M as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-b1d62cb5';
4
- import { M as Move, A as Alg } from '../Alg-5cf4b166';
1
+ import { K as KState } from '../KState-a2f0e651.js';
2
+ import { B as BluetoothPuzzle } from '../bluetooth-puzzle-3670a6a1.js';
3
+ export { B as BluetoothPuzzle, M as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-3670a6a1.js';
4
+ import { a as Alg, M as Move } from '../Alg-e2a80975.js';
5
5
 
6
6
  declare function enableDebugLogging(enable: boolean): void;
7
7
 
8
+ /** @category Keyboard Puzzles */
8
9
  declare class KeyboardPuzzle extends BluetoothPuzzle {
9
10
  private target;
10
11
  private puzzle;
@@ -16,6 +17,7 @@ declare class KeyboardPuzzle extends BluetoothPuzzle {
16
17
  getState(): Promise<KState>;
17
18
  private onKeyDown;
18
19
  }
20
+ /** @category Keyboard Puzzles */
19
21
  declare function debugKeyboardConnect(target?: any): Promise<KeyboardPuzzle>;
20
22
 
21
23
  /******** connect() ********/
@@ -23,8 +25,10 @@ interface BluetoothConnectOptions {
23
25
  acceptAllDevices?: boolean;
24
26
  }
25
27
 
28
+ /** @category Smart Puzzles */
26
29
  declare function connectSmartPuzzle(options?: BluetoothConnectOptions): Promise<BluetoothPuzzle>;
27
30
 
31
+ /** @category Smart Puzzles */
28
32
  declare class GanCube extends BluetoothPuzzle {
29
33
  private kpuzzle;
30
34
  private service;
@@ -56,8 +60,7 @@ declare class GanCube extends BluetoothPuzzle {
56
60
  readActualAngleAndBatteryCharacteristic(): Promise<ArrayBuffer>;
57
61
  }
58
62
 
59
- declare function giikerMoveToAlgMove(face: number, amount: number): Move;
60
-
63
+ /** @category Smart Puzzles */
61
64
  declare class GiiKERCube extends BluetoothPuzzle {
62
65
  private server;
63
66
  private cubeCharacteristic;
@@ -73,6 +76,7 @@ declare class GiiKERCube extends BluetoothPuzzle {
73
76
  private isRepeatedInitialValue;
74
77
  }
75
78
 
79
+ /** @category Smart Puzzles */
76
80
  declare class GoCube extends BluetoothPuzzle {
77
81
  private server;
78
82
  goCubeStateCharacteristic: BluetoothRemoteGATTCharacteristic;
@@ -98,6 +102,7 @@ interface GanRobotOptions {
98
102
  bufferQueue: number;
99
103
  postSleep: number;
100
104
  }
105
+ /** @category Robots */
101
106
  declare class GanRobot extends EventTarget {
102
107
  private server;
103
108
  private statusCharacteristic;
@@ -120,9 +125,12 @@ declare class GanRobot extends EventTarget {
120
125
  applyMoves(moves: Iterable<Move>): Promise<void>;
121
126
  }
122
127
 
128
+ /** @category Robots */
123
129
  declare type BluetoothRobot = GanRobot;
130
+ /** @category Robots */
124
131
  declare function connectSmartRobot(options?: BluetoothConnectOptions): Promise<BluetoothRobot>;
125
132
 
133
+ /** @category Timers */
126
134
  declare class GanTimer extends EventTarget {
127
135
  private server;
128
136
  private timeCharacteristic;
@@ -140,7 +148,9 @@ declare class GanTimer extends EventTarget {
140
148
  stopPolling(): void;
141
149
  }
142
150
 
151
+ /** @category Timers */
143
152
  declare type BluetoothTimer = GanTimer;
153
+ /** @category Timers */
144
154
  declare function connectSmartTimer(options?: BluetoothConnectOptions): Promise<BluetoothTimer>;
145
155
 
146
- export { BluetoothRobot, BluetoothTimer, GanCube, GiiKERCube, GoCube, KeyboardPuzzle, connectSmartPuzzle, connectSmartRobot, connectSmartTimer, debugKeyboardConnect, enableDebugLogging, giikerMoveToAlgMove as giikerMoveToAlgMoveForTesting };
156
+ export { BluetoothRobot, BluetoothTimer, GanCube, GiiKERCube, GoCube, KeyboardPuzzle, connectSmartPuzzle, connectSmartRobot, connectSmartTimer, debugKeyboardConnect, enableDebugLogging };
@@ -1,5 +1,5 @@
1
- import { M as Move } from './Alg-5cf4b166';
2
- import { K as KState } from './KState-836cc3c7';
1
+ import { M as Move } from './Alg-e2a80975.js';
2
+ import { K as KState } from './KState-a2f0e651.js';
3
3
 
4
4
  interface StreamTransformer {
5
5
  transformMove(moveEvent: MoveEvent): void;
@@ -7,6 +7,7 @@ interface StreamTransformer {
7
7
  }
8
8
 
9
9
  /******** BluetoothPuzzle ********/
10
+ /** @category Smart Puzzles */
10
11
  interface MoveEvent {
11
12
  latestMove: Move;
12
13
  timeStamp: number;
@@ -14,6 +15,7 @@ interface MoveEvent {
14
15
  state?: KState;
15
16
  quaternion?: any;
16
17
  }
18
+ /** @category Smart Puzzles */
17
19
  interface OrientationEvent {
18
20
  quaternion: {
19
21
  x: number;
@@ -24,12 +26,7 @@ interface OrientationEvent {
24
26
  timeStamp: number;
25
27
  debug?: Record<string, unknown>;
26
28
  }
27
- interface BluetoothConfig<T> {
28
- connect: (server: BluetoothRemoteGATTServer, device?: BluetoothDevice) => Promise<T>;
29
- prefixes: string[];
30
- filters: BluetoothLEScanFilter[];
31
- optionalServices: BluetoothServiceUUID[];
32
- }
29
+ /** @category Smart Puzzles */
33
30
  declare abstract class BluetoothPuzzle extends EventTarget {
34
31
  transformers: StreamTransformer[];
35
32
  protected listeners: Array<(e: MoveEvent) => void>;
@@ -44,4 +41,4 @@ declare abstract class BluetoothPuzzle extends EventTarget {
44
41
  protected dispatchOrientation(orientationEvent: OrientationEvent): void;
45
42
  }
46
43
 
47
- export { BluetoothPuzzle as B, MoveEvent as M, OrientationEvent as O, BluetoothConfig as a };
44
+ export { BluetoothPuzzle as B, MoveEvent as M, OrientationEvent as O };
@@ -1,2 +1,2 @@
1
- export { a as KPuzzle, b as KPuzzleDefinition, K as KState, c as KStateData, e as KTransformation, d as KTransformationData } from '../KState-836cc3c7';
2
- import '../Alg-5cf4b166';
1
+ export { a as KPuzzle, b as KPuzzleDefinition, K as KState, c as KStateData, e as KTransformation, d as KTransformationData } from '../KState-a2f0e651.js';
2
+ import '../Alg-e2a80975.js';
@@ -1,4 +1,4 @@
1
- import { A as Alg } from '../Alg-5cf4b166';
1
+ import { a as Alg } from '../Alg-e2a80975.js';
2
2
 
3
3
  declare const countMoves: (alg: Alg) => number;
4
4
  declare const countMovesETM: (alg: Alg) => number;
@@ -1,5 +1,5 @@
1
- import { A as Alg } from './Alg-5cf4b166';
2
- import { K as KState } from './KState-836cc3c7';
1
+ import { a as Alg } from './Alg-e2a80975.js';
2
+ import { K as KState } from './KState-a2f0e651.js';
3
3
 
4
4
  declare enum PrefetchLevel {
5
5
  Auto = "auto",
@@ -0,0 +1,9 @@
1
+ import { a as Alg, A as AlgNode } from './Alg-e2a80975.js';
2
+
3
+ interface ParserIndexed {
4
+ startCharIndex: number;
5
+ endCharIndex: number;
6
+ }
7
+ declare type Parsed<T extends Alg | AlgNode> = T & ParserIndexed;
8
+
9
+ export { Parsed as P };
@@ -1,5 +1,5 @@
1
- import { K as KState } from '../KState-836cc3c7';
2
- import '../Alg-5cf4b166';
1
+ import { K as KState } from '../KState-a2f0e651.js';
2
+ import '../Alg-e2a80975.js';
3
3
 
4
4
  declare type Binary3x3x3State = ArrayBuffer;
5
5
  interface Binary3x3x3Components {
@@ -12,12 +12,16 @@ interface Binary3x3x3Components {
12
12
  moSupport: number;
13
13
  moMask: number;
14
14
  }
15
+ /** @category Binary 3x3x3 Format */
15
16
  declare function reid3x3x3ToTwizzleBinary(state: KState): Binary3x3x3State;
17
+ /** @category Binary 3x3x3 Format */
16
18
  declare function twizzleBinaryToBinaryComponents(buffer: ArrayBuffer): Binary3x3x3Components;
19
+ /** @category Binary 3x3x3 Format */
17
20
  declare function binaryComponentsToReid3x3x3(components: Binary3x3x3Components): KState;
21
+ /** @category Binary 3x3x3 Format */
18
22
  declare function twizzleBinaryToReid3x3x3(buffy: ArrayBuffer): KState;
19
23
 
20
24
  declare function bufferToSpacedHex(buffer: ArrayBuffer): string;
21
25
  declare function spacedHexToBuffer(hex: string): Uint8Array;
22
26
 
23
- export { bufferToSpacedHex, binaryComponentsToReid3x3x3 as experimentalBinaryComponentsToReid3x3x3, twizzleBinaryToBinaryComponents as experimentalTwizzleBinaryToBinaryComponents, reid3x3x3ToTwizzleBinary, spacedHexToBuffer, twizzleBinaryToReid3x3x3 };
27
+ export { binaryComponentsToReid3x3x3 as experimentalBinaryComponentsToReid3x3x3, bufferToSpacedHex as experimentalBufferToSpacedHex, reid3x3x3ToTwizzleBinary as experimentalReid3x3x3ToTwizzleBinary, spacedHexToBuffer as experimentalSpacedHexToBuffer, twizzleBinaryToBinaryComponents as experimentalTwizzleBinaryToBinaryComponents, twizzleBinaryToReid3x3x3 as experimentalTwizzleBinaryToReid3x3x3 };
@@ -1,6 +1,6 @@
1
- import { P as Perm } from '../KState-836cc3c7';
2
- export { u as EXPERIMENTAL_PUZZLE_BASE_SHAPES, s as EXPERIMENTAL_PUZZLE_CUT_TYPES, o as ExperimentalPGNotation, v as ExperimentalPuzzleBaseShape, q as ExperimentalPuzzleCutDescription, t as ExperimentalPuzzleCutType, r as ExperimentalPuzzleDescription, j as PuzzleGeometry, Q as Quat, S as StickerDat, k as StickerDatAxis, l as StickerDatFace, m as StickerDatSticker, i as getPG3DNamedPuzzles, g as getPuzzleDescriptionString, f as getPuzzleGeometryByDesc, h as getPuzzleGeometryByName, n as parseOptions, p as parsePuzzleDescription } from '../KState-836cc3c7';
3
- import '../Alg-5cf4b166';
1
+ import { P as Perm } from '../KState-a2f0e651.js';
2
+ export { u as EXPERIMENTAL_PUZZLE_BASE_SHAPES, s as EXPERIMENTAL_PUZZLE_CUT_TYPES, o as ExperimentalPGNotation, v as ExperimentalPuzzleBaseShape, q as ExperimentalPuzzleCutDescription, t as ExperimentalPuzzleCutType, r as ExperimentalPuzzleDescription, j as PuzzleGeometry, Q as Quat, S as StickerDat, k as StickerDatAxis, l as StickerDatFace, m as StickerDatSticker, i as getPG3DNamedPuzzles, g as getPuzzleDescriptionString, f as getPuzzleGeometryByDesc, h as getPuzzleGeometryByName, n as parseOptions, p as parsePuzzleDescription } from '../KState-a2f0e651.js';
3
+ import '../Alg-e2a80975.js';
4
4
 
5
5
  declare function schreierSims(g: Perm[], disp: (s: string) => void): bigint;
6
6
 
@@ -1,21 +1,26 @@
1
- import { P as PuzzleID, a as PuzzleLoader } from '../TwizzleLink-4f0a162d';
2
- export { a as PuzzleLoader } from '../TwizzleLink-4f0a162d';
1
+ import { P as PuzzleID, a as PuzzleLoader } from '../TwizzleLink-dcf51446.js';
2
+ export { a as PuzzleLoader } from '../TwizzleLink-dcf51446.js';
3
3
  import 'three';
4
- import '../Alg-5cf4b166';
5
- import '../parse-9db7ee51';
6
- import '../KState-836cc3c7';
4
+ import '../Alg-e2a80975.js';
5
+ import '../parseAlg-db0dec6c.js';
6
+ import '../KState-a2f0e651.js';
7
7
 
8
8
  interface EventInfo {
9
9
  puzzleID: PuzzleID;
10
10
  eventName: string;
11
11
  }
12
+ /** @category Event Info */
12
13
  declare function wcaEventInfo(event: string): EventInfo | null;
14
+ /** @category Event Info */
13
15
  declare function eventInfo(event: string): EventInfo | null;
14
16
 
17
+ /** @category Specific Puzzles */
15
18
  declare const cube2x2x2: PuzzleLoader;
16
19
 
20
+ /** @category Specific Puzzles */
17
21
  declare const cube3x3x3: PuzzleLoader;
18
22
 
23
+ /** @category All Puzzles */
19
24
  declare const puzzles: Record<string, PuzzleLoader>;
20
25
 
21
26
  export { cube2x2x2, cube3x3x3, eventInfo, puzzles, wcaEventInfo };
@@ -1,3 +1,3 @@
1
- export { r as randomScrambleForEvent } from '../outside-a6c8f46b';
2
- import '../Alg-5cf4b166';
3
- import '../KState-836cc3c7';
1
+ export { r as randomScrambleForEvent } from '../outside-0ce1b145.js';
2
+ import '../Alg-e2a80975.js';
3
+ import '../KState-a2f0e651.js';
@@ -1,6 +1,6 @@
1
- export { a as experimentalSolve2x2x2, e as experimentalSolve3x3x3IgnoringCenters, d as setDebug, c as solveMegaminx, b as solvePyraminx, s as solveSkewb } from '../outside-a6c8f46b';
2
- import { K as KState } from '../KState-836cc3c7';
3
- import '../Alg-5cf4b166';
1
+ export { a as experimentalSolve2x2x2, e as experimentalSolve3x3x3IgnoringCenters, d as setDebug, c as solveMegaminx, b as solvePyraminx, s as solveSkewb } from '../outside-0ce1b145.js';
2
+ import { K as KState } from '../KState-a2f0e651.js';
3
+ import '../Alg-e2a80975.js';
4
4
 
5
5
  declare function random333State(): Promise<KState>;
6
6
 
@@ -1,6 +1,6 @@
1
- import { M as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-b1d62cb5';
2
- import '../Alg-5cf4b166';
3
- import '../KState-836cc3c7';
1
+ import { M as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-3670a6a1.js';
2
+ import '../Alg-e2a80975.js';
3
+ import '../KState-a2f0e651.js';
4
4
 
5
5
  interface ProxyMoveEvent {
6
6
  event: "move";
@@ -53,4 +53,4 @@ declare class TwizzleStreamServer {
53
53
  connect(streamID: string): TwizzleStream;
54
54
  }
55
55
 
56
- export { ProxyEvent, ProxyMoveEvent, ProxyOrientationEvent, ProxyResetEvent, TwizzleStreamServer, WebSocketProxyReceiver, WebSocketProxySender };
56
+ export { ProxyEvent as ExperimentalProxyEvent, ProxyMoveEvent as ExperimentalProxyMoveEvent, ProxyOrientationEvent as ExperimentalProxyOrientationEvent, ProxyResetEvent as ExperimentalProxyResetEvent, TwizzleStreamServer as ExperimentalTwizzleStreamServer, WebSocketProxyReceiver as ExperimentalWebSocketProxyReceiver, WebSocketProxySender as ExperimentalWebSocketProxySender };
@@ -1,9 +1,16 @@
1
- import { A as AlgIndexer, T as Timestamp, D as Duration, b as PuzzleAppearance } from '../TwizzleLink-4f0a162d';
2
- export { A as AlgIndexer, B as BackViewLayout, N as EXPERIMENTAL_PROP_NO_VALUE, M as ExperimentalMillisecondTimestamp, E as ExperimentalStickering, P as PuzzleID, e as TwistyAlgEditor, d as TwistyAlgViewer, c as TwistyPlayer, f as TwistyPlayerConfig, i as TwizzleLink, V as VisualizationFormat, h as backViewLayouts, j as experimentalDebugShowRenderStats, g as experimentalForceNewRendererSharing } from '../TwizzleLink-4f0a162d';
3
- import { A as Alg, M as Move } from '../Alg-5cf4b166';
4
- import { a as KPuzzle, K as KState, e as KTransformation } from '../KState-836cc3c7';
1
+ import { A as AlgIndexer, T as Timestamp, D as Duration, b as PuzzleAppearance } from '../TwizzleLink-dcf51446.js';
2
+ export { A as AlgIndexer, B as BackViewLayout, N as EXPERIMENTAL_PROP_NO_VALUE, M as ExperimentalMillisecondTimestamp, E as ExperimentalStickering, P as PuzzleID, e as TwistyAlgEditor, d as TwistyAlgViewer, c as TwistyPlayer, f as TwistyPlayerConfig, h as TwizzleLink, V as VisualizationFormat, g as backViewLayouts } from '../TwizzleLink-dcf51446.js';
3
+ import { a as Alg, M as Move } from '../Alg-e2a80975.js';
4
+ import { a as KPuzzle, K as KState, e as KTransformation } from '../KState-a2f0e651.js';
5
5
  import 'three';
6
- import '../parse-9db7ee51';
6
+ import '../parseAlg-db0dec6c.js';
7
+
8
+ declare const twistyDebugGlobals: {
9
+ animateRaiseHintFacelets: boolean;
10
+ shareAllNewRenderers: "auto" | "always" | "never";
11
+ showRenderStats: boolean;
12
+ };
13
+ declare function setTwistyDebug(options: Partial<typeof twistyDebugGlobals>): void;
7
14
 
8
15
  declare class SimpleAlgIndexer implements AlgIndexer {
9
16
  private kpuzzle;
@@ -52,4 +59,4 @@ declare class KPuzzleSVGWrapper {
52
59
  private elementByID;
53
60
  }
54
61
 
55
- export { KPuzzleSVGWrapper as ExperimentalKPuzzleSVGWrapper, SimpleAlgIndexer, TreeAlgIndexer };
62
+ export { KPuzzleSVGWrapper as ExperimentalKPuzzleSVGWrapper, SimpleAlgIndexer, TreeAlgIndexer, setTwistyDebug };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cubing",
3
- "version": "0.26.7",
3
+ "version": "0.28.1",
4
4
  "description": "A collection of JavaScript cubing libraries.",
5
5
  "author": "The js.cubing.net team",
6
6
  "type": "module",
@@ -53,35 +53,37 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@types/three": "^0.137.0",
57
- "@types/web-bluetooth": "^0.0.12",
56
+ "@types/three": "^0.141.0",
57
+ "@types/web-bluetooth": "^0.0.14",
58
58
  "comlink": "^4.3.1",
59
59
  "three": "^0.142.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@babel/eslint-parser": "^7.17.0",
63
- "@babel/preset-env": "^7.16.11",
64
- "@babel/preset-typescript": "^7.16.7",
62
+ "@babel/eslint-parser": "^7.18.9",
63
+ "@babel/preset-env": "^7.18.9",
64
+ "@babel/preset-typescript": "^7.18.6",
65
65
  "@types/dom-speech-recognition": "^0.0.1",
66
- "@types/jest": "^27.4.0",
67
- "@types/node": "^17.0.18",
68
- "@typescript-eslint/eslint-plugin": "^5.12.0",
69
- "@typescript-eslint/parser": "^5.12.0",
70
- "babel-jest": "^27.5.1",
71
- "barely-a-dev-server": "^0.2.6",
72
- "esbuild": "^0.14.22",
73
- "eslint": "^8.9.0",
74
- "eslint-config-prettier": "^8.3.0",
75
- "eslint-plugin-html": "^6.2.0",
76
- "eslint-plugin-prettier": "^4.0.0",
77
- "jest": "^27.5.1",
78
- "jszip": "^3.7.1",
79
- "peggy": "^1.2.0",
80
- "prettier": "^2.5.1",
81
- "puppeteer": "^13.3.2",
82
- "tsup": "^5.12.1",
83
- "typescript": "^4.6.0-dev.20220131",
84
- "yargs": "^17.3.1"
66
+ "@types/jest": "^28.1.6",
67
+ "@types/node": "^18.0.6",
68
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
69
+ "@typescript-eslint/parser": "^5.30.7",
70
+ "babel-jest": "^28.1.3",
71
+ "barely-a-dev-server": "^0.3.0",
72
+ "esbuild": "^0.14.49",
73
+ "eslint": "^8.20.0",
74
+ "eslint-config-prettier": "^8.5.0",
75
+ "eslint-plugin-html": "^7.0.0",
76
+ "eslint-plugin-prettier": "^4.2.1",
77
+ "jest": "^28.1.3",
78
+ "jest-environment-jsdom": "^28.1.3",
79
+ "jszip": "^3.10.0",
80
+ "peggy": "^2.0.1",
81
+ "prettier": "^2.7.1",
82
+ "puppeteer": "^15.4.0",
83
+ "tsup": "^6.1.3",
84
+ "typedoc": "^0.23.8",
85
+ "typescript": "^4.7.4",
86
+ "yargs": "^17.5.1"
85
87
  },
86
88
  "minimalDevDependencies": [
87
89
  "barely-a-dev-server",
@@ -89,7 +91,7 @@
89
91
  "jszip"
90
92
  ],
91
93
  "engines": {
92
- "node": "^14.18 || ^16.13 || >=18"
94
+ "node": "^16.13 || >=18"
93
95
  },
94
96
  "files": [
95
97
  "/LICENSE.md",
@@ -110,6 +112,7 @@
110
112
  "build-sites": "npm run build-site-twizzle && npm run build-site-experiments",
111
113
  "build-site-twizzle": "node ./script/build/main.js twizzle",
112
114
  "build-site-experiments": "node ./script/build/main.js experiments",
115
+ "build-site-typedoc": "npx typedoc src/cubing/*/index.ts",
113
116
  "build-search-worker": "node ./script/build/main.js search-worker",
114
117
  "generate-js": "npm run generate-js-parsers && npm run generate-js-svg",
115
118
  "generate-js-parsers": "npx peggy --format es src/cubing/kpuzzle/parser/parser-peggy.peggy",