cubing 0.54.5 → 0.55.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.
@@ -1,356 +1,10 @@
1
1
  import { Texture, Object3D, Raycaster, PerspectiveCamera, Scene, WebGLRenderer } from 'three';
2
2
 
3
- type ExperimentalNotationType$1 = "auto" | "LGN";
4
- interface ExperimentalSerializationOptions$1 {
5
- notation?: ExperimentalNotationType$1;
6
- }
7
-
8
- declare enum IterationDirection$1 {
9
- Forwards = 1,
10
- Backwards = -1
11
- }
12
-
13
3
  type ExperimentalNotationType = "auto" | "LGN";
14
4
  interface ExperimentalSerializationOptions {
15
5
  notation?: ExperimentalNotationType;
16
6
  }
17
7
 
18
- declare abstract class Comparable$1 {
19
- is(c: any): boolean;
20
- as<T>(c: new (...args: any) => T): T | null;
21
- abstract isIdentical(other: Comparable$1): boolean;
22
- }
23
- interface Repeatable$1 extends Comparable$1 {
24
- experimentalExpand(iterDir?: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
25
- }
26
- declare abstract class AlgCommon$1<T extends Alg$1 | AlgNode$1> extends Comparable$1 implements Repeatable$1 {
27
- constructor();
28
- get log(): (message?: any) => void;
29
- abstract toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
30
- abstract invert(): T;
31
- abstract experimentalExpand(iterDir: IterationDirection$1): Generator<AlgLeaf$1>;
32
- }
33
-
34
- interface QuantumMoveModifications$1 {
35
- outerLayer?: number;
36
- innerLayer?: number;
37
- family?: string;
38
- }
39
- declare class QuantumMove$1 extends Comparable$1 {
40
- #private;
41
- constructor(family: string, innerLayer?: number | null, outerLayer?: number | null);
42
- static fromString(s: string): QuantumMove$1;
43
- modified(modifications: QuantumMoveModifications$1): QuantumMove$1;
44
- isIdentical(other: QuantumMove$1): boolean;
45
- /** @deprecated */
46
- get family(): string;
47
- /** @deprecated */
48
- get outerLayer(): number | null;
49
- /** @deprecated */
50
- get innerLayer(): number | null;
51
- experimentalExpand(): Generator<AlgLeaf$1>;
52
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
53
- }
54
- interface MoveModifications$1 {
55
- outerLayer?: number;
56
- innerLayer?: number;
57
- family?: string;
58
- amount?: number;
59
- }
60
- /** @category Alg Nodes */
61
- declare class Move$1 extends AlgCommon$1<Move$1> {
62
- #private;
63
- constructor(...args: [QuantumMove$1] | [QuantumMove$1, number] | [string] | [string, number]);
64
- isIdentical(other: Comparable$1): boolean;
65
- invert(): Move$1;
66
- experimentalExpand(iterDir?: IterationDirection$1): Generator<AlgLeaf$1>;
67
- get quantum(): QuantumMove$1;
68
- modified(modifications: MoveModifications$1): Move$1;
69
- static fromString(s: string): Move$1;
70
- get amount(): number;
71
- /** @deprecated */
72
- get type(): string;
73
- /** @deprecated */
74
- get family(): string;
75
- /** @deprecated */
76
- get outerLayer(): number | undefined;
77
- /** @deprecated */
78
- get innerLayer(): number | undefined;
79
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
80
- }
81
-
82
- /** @category Alg Nodes */
83
- declare class Pause$1 extends AlgCommon$1<Pause$1> {
84
- experimentalNISSGrouping?: Grouping$1;
85
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
86
- isIdentical(other: Comparable$1): boolean;
87
- invert(): Pause$1;
88
- experimentalExpand(_iterDir?: IterationDirection$1, _depth?: number): Generator<AlgLeaf$1>;
89
- }
90
-
91
- /** @category Alg Nodes */
92
- declare class Grouping$1 extends AlgCommon$1<Grouping$1> {
93
- #private;
94
- experimentalNISSPlaceholder?: Pause$1;
95
- constructor(algSource: FlexibleAlgSource$1, amount?: number);
96
- isIdentical(other: Comparable$1): boolean;
97
- get alg(): Alg$1;
98
- get amount(): number;
99
- /** @deprecated */
100
- get experimentalRepetitionSuffix(): string;
101
- invert(): Grouping$1;
102
- experimentalExpand(iterDir?: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
103
- static fromString(): Grouping$1;
104
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
105
- experimentalAsSquare1Tuple(): [moveU: Move$1, moveD: Move$1] | null;
106
- }
107
-
108
- /** @category Alg Nodes */
109
- declare class LineComment$1 extends AlgCommon$1<LineComment$1> {
110
- #private;
111
- constructor(commentText: string);
112
- get text(): string;
113
- isIdentical(other: Comparable$1): boolean;
114
- invert(): LineComment$1;
115
- experimentalExpand(_iterDir?: IterationDirection$1, _depth?: number): Generator<AlgLeaf$1>;
116
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
117
- }
118
-
119
- /** @category Alg Nodes */
120
- declare class Commutator$1 extends AlgCommon$1<Commutator$1> {
121
- #private;
122
- constructor(aSource: FlexibleAlgSource$1, bSource: FlexibleAlgSource$1);
123
- get A(): Alg$1;
124
- get B(): Alg$1;
125
- isIdentical(other: Comparable$1): boolean;
126
- invert(): Commutator$1;
127
- experimentalExpand(iterDir?: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
128
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
129
- }
130
-
131
- /** @category Alg Nodes */
132
- declare class Conjugate$1 extends AlgCommon$1<Conjugate$1> {
133
- #private;
134
- constructor(aSource: FlexibleAlgSource$1, bSource: FlexibleAlgSource$1);
135
- get A(): Alg$1;
136
- get B(): Alg$1;
137
- isIdentical(other: Comparable$1): boolean;
138
- invert(): Conjugate$1;
139
- experimentalExpand(iterDir: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
140
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
141
- }
142
-
143
- /** @category Alg Nodes */
144
- declare class Newline$1 extends AlgCommon$1<Newline$1> {
145
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
146
- isIdentical(other: Comparable$1): boolean;
147
- invert(): Newline$1;
148
- experimentalExpand(_iterDir?: IterationDirection$1, _depth?: number): Generator<AlgLeaf$1>;
149
- }
150
-
151
- /** @category Alg Nodes */
152
- type AlgLeaf$1 = Move$1 | LineComment$1 | Newline$1 | Pause$1;
153
- /** @category Alg Nodes */
154
- type AlgBranch$1 = Grouping$1 | Conjugate$1 | Commutator$1;
155
- /** @category Alg Nodes */
156
- type AlgNode$1 = AlgLeaf$1 | AlgBranch$1;
157
-
158
- declare const DEFAULT_DIRECTIONAL$1 = "any-direction";
159
- type QuantumDirectionalCancellation$1 = typeof DEFAULT_DIRECTIONAL$1 | "same-direction" | "none";
160
- type ModWrap$1 = "none" | "gravity" | "canonical-centered" | "canonical-positive" | "preserve-sign";
161
- interface AppendCancelOptions$1 {
162
- directional?: QuantumDirectionalCancellation$1;
163
- puzzleSpecificModWrap?: ModWrap$1;
164
- }
165
- interface AppendOptions$1 {
166
- cancel?: boolean | AppendCancelOptions$1;
167
- puzzleLoader?: {
168
- puzzleSpecificSimplifyOptions?: PuzzleSpecificSimplifyOptions$1;
169
- };
170
- puzzleSpecificSimplifyOptions?: PuzzleSpecificSimplifyOptions$1;
171
- }
172
- interface SimplifyOptions$1 extends AppendOptions$1 {
173
- depth?: number | null;
174
- }
175
- interface PuzzleSpecificAxisSimplifyInfo$1 {
176
- areQuantumMovesSameAxis: (quantumMove1: QuantumMove$1, quantumMove2: QuantumMove$1) => boolean;
177
- simplifySameAxisMoves: (moves: Move$1[], quantumMod: boolean) => Move$1[];
178
- }
179
- interface PuzzleSpecificSimplifyOptions$1 {
180
- quantumMoveOrder?: (quantumMove: QuantumMove$1) => number;
181
- axis?: PuzzleSpecificAxisSimplifyInfo$1;
182
- }
183
-
184
- type FlexibleAlgSource$1 = string | Iterable<AlgNode$1> | Alg$1;
185
- /**
186
- * `Alg` is a class that encapsulates a structured alg. To create an `Alg` from a string, use:
187
- *
188
- * new Alg("R U R'"); // Convenient
189
- * Alg.fromString(dynamicString); // Recommended when the string input is user-provided.
190
- *
191
- * Once you have an `Alg`, you can call methods to transform it:
192
- *
193
- * new Alg("[[R: U], R U R2']").expand().experimentalSimplify({cancel: true}).invert().log()
194
- *
195
- * To convert an `Alg` to a string, use .toString():
196
- *
197
- * new Alg("R U F").invert().toString();
198
- *
199
- * If you need to debug, you may also find it convenient to use .log():
200
- *
201
- * if (alg.isIdentical(alg.invert())) {
202
- * alg.log("A self-inverse!")
203
- * }
204
- *
205
- * For more information, see: {@link https://js.cubing.net/cubing/alg/}
206
- *
207
- * @category Alg
208
- */
209
- declare class Alg$1 extends AlgCommon$1<Alg$1> {
210
- #private;
211
- constructor(alg?: FlexibleAlgSource$1);
212
- /**
213
- * Checks whether this Alg is structurally identical to another Alg. This
214
- * essentially means that they are written identically apart from whitespace.
215
- *
216
- * const alg1 = new Alg("R U L'");
217
- * const alg2 = new Alg("L U' R'").invert();
218
- * // true
219
- * alg1.isIdentical(alg2);
220
- *
221
- * // false
222
- * new Alg("[R, U]").isIdentical(new Alg("R U R' U'"));
223
- * // true
224
- * new Alg("[R, U]").expand().isIdentical(new Alg("R U R' U'"));
225
- *
226
- * Note that .isIdentical() efficiently compares algorithms, but mainly exists
227
- * to help optimize code when the structure of an algorithm hasn't changed.
228
- * There are many ways to write the "same" alg on most puzzles, but is
229
- * *highly* recommended to avoid expanding two Alg instances to compare them,
230
- * since that can easily slow your program to a crawl if someone inputs an alg
231
- * containing a large repetition. In general, you should use `cubing/kpuzzle`
232
- * to compare if two algs have the same effect on a puzzle.
233
- *
234
- * Also note that parser annotations are not taken into account while comparing
235
- * algs:
236
- *
237
- * const alg = new Alg([new Move("R"), new Move("U2")]);
238
- * // true, even though one of the algs has parser annotations
239
- * alg.isIdentical(new Alg("R U2"))
240
- *
241
- */
242
- isIdentical(other: Comparable$1): boolean;
243
- /**
244
- * Returns the inverse of the given alg.
245
- *
246
- * Note that that this does not make any assumptions about what puzzle the alg
247
- * is for. For example, U2 is its own inverse on a cube, but U2' has the same
248
- * effect U3 (and not U2) on Megaminx:
249
- *
250
- * // Outputs: R U2' L'
251
- * new Alg("L U2 R'").invert().log();
252
- */
253
- invert(): Alg$1;
254
- /** @deprecated Use {@link Alg.expand} instead. */
255
- experimentalExpand(iterDir?: IterationDirection$1, depth?: number): Generator<AlgLeaf$1>;
256
- /**
257
- * Expands all Grouping, Commutator, and Conjugate parts nested inside the
258
- * alg.
259
- *
260
- * // F R U R' U' F'
261
- * new Alg("[F: [R, U]]").expand().log();
262
- *
263
- * // F [R, U] F'
264
- * new Alg("[F: [R, U]]").expand(({ depth: 1 }).log();
265
- *
266
- * Avoid calling this on a user-provided alg unless the user explicitly asks
267
- * to see the expanded alg. Otherwise, it's easy to make your program freeze
268
- * when someone passes in an alg like: (R U)10000000
269
- *
270
- * Generally, if you want to perform an operation on an entire alg, you'll
271
- * want to use something based on the `Traversal` mechanism, like countMoves()
272
- * from `cubing/notation`.
273
- */
274
- expand(options?: {
275
- depth?: number;
276
- }): Alg$1;
277
- /** @deprecated */
278
- experimentalLeafMoves(): Generator<Move$1>;
279
- concat(input: FlexibleAlgSource$1): Alg$1;
280
- /** @deprecated */
281
- experimentalIsEmpty(): boolean;
282
- static fromString(s: string): Alg$1;
283
- /** @deprecated */
284
- units(): Generator<AlgNode$1>;
285
- childAlgNodes(): Generator<AlgNode$1>;
286
- /** @deprecated */
287
- experimentalNumUnits(): number;
288
- experimentalNumChildAlgNodes(): number;
289
- /** @deprecated */
290
- get type(): string;
291
- /**
292
- * Converts the Alg to a string:
293
- *
294
- * const alg = new Alg([new Move("R"), new Move("U2"), new Move("L")])
295
- * // R U2 L
296
- * console.log(alg.toString())
297
- */
298
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
299
- /**
300
- * `experimentalSimplify` can perform several mostly-syntactic simplifications on an alg:
301
- *
302
- * // Logs: R' U3
303
- * import { Alg } from "cubing/alg";
304
- * new Alg("R R2' U U2").experimentalSimplify({ cancel: true }).log()
305
- *
306
- * You can pass in a `PuzzleLoader` (currently only for 3x3x3) for puzzle-specific simplifications:
307
- *
308
- * // Logs: R' U'
309
- * import { Alg } from "cubing/alg";
310
- * import { cube3x3x3 } from "cubing/puzzles";
311
- * new Alg("R R2' U U2").experimentalSimplify({ cancel: true, puzzleLoader: cube3x3x3 }).log()
312
- *
313
- * You can also cancel only moves that are in the same direction:
314
- *
315
- * // Logs: R R2' U'
316
- * import { Alg } from "cubing/alg";
317
- * import { cube3x3x3 } from "cubing/puzzles";
318
- * new Alg("R R2' U U2").experimentalSimplify({
319
- * cancel: { directional: "same-direction" },
320
- * puzzleLoader: cube3x3x3
321
- * }).log()
322
- *
323
- * Additionally, you can specify how moves are "wrapped":
324
- *
325
- * import { Alg } from "cubing/alg";
326
- * import { cube3x3x3 } from "cubing/puzzles";
327
- *
328
- * function example(puzzleSpecificModWrap) {
329
- * alg.experimentalSimplify({
330
- * cancel: { puzzleSpecificModWrap },
331
- * puzzleLoader: cube3x3x3
332
- * }).log()
333
- * }
334
- *
335
- * const alg = new Alg("R7' . R6' . R5' . R6")
336
- * example("none") // R7' . R6' . R5' . R6
337
- * example("gravity") // R . R2' . R' . R2
338
- * example("canonical-centered") // R . R2 . R' . R2
339
- * example("canonical-positive") // R . R2 . R3 . R2
340
- * example("preserve-sign") // R3' . R2' . R' . R2
341
- *
342
- * Same-axis and simultaneous move canonicalization is not implemented yet:
343
- *
344
- * // Logs: R L R
345
- * import { Alg } from "cubing/alg";
346
- * import { cube3x3x3 } from "cubing/puzzles";
347
- * new Alg("R L R").experimentalSimplify({ cancel: true, puzzleLoader: cube3x3x3 }).log()
348
- */
349
- experimentalSimplify(options?: SimplifyOptions$1): Alg$1;
350
- /** @deprecated See {@link experimentalSimplify} */
351
- simplify(options?: SimplifyOptions$1): Alg$1;
352
- }
353
-
354
8
  declare enum IterationDirection {
355
9
  Forwards = 1,
356
10
  Backwards = -1
@@ -367,7 +21,7 @@ interface Repeatable extends Comparable {
367
21
  declare abstract class AlgCommon<T extends Alg | AlgNode> extends Comparable implements Repeatable {
368
22
  constructor();
369
23
  get log(): (message?: any) => void;
370
- abstract toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
24
+ abstract toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
371
25
  abstract invert(): T;
372
26
  abstract experimentalExpand(iterDir: IterationDirection): Generator<AlgLeaf>;
373
27
  }
@@ -390,7 +44,7 @@ declare class QuantumMove extends Comparable {
390
44
  /** @deprecated */
391
45
  get innerLayer(): number | null;
392
46
  experimentalExpand(): Generator<AlgLeaf>;
393
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
47
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
394
48
  }
395
49
  interface MoveModifications {
396
50
  outerLayer?: number;
@@ -417,13 +71,13 @@ declare class Move extends AlgCommon<Move> {
417
71
  get outerLayer(): number | undefined;
418
72
  /** @deprecated */
419
73
  get innerLayer(): number | undefined;
420
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
74
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
421
75
  }
422
76
 
423
77
  /** @category Alg Nodes */
424
78
  declare class Pause extends AlgCommon<Pause> {
425
79
  experimentalNISSGrouping?: Grouping;
426
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
80
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
427
81
  isIdentical(other: Comparable): boolean;
428
82
  invert(): Pause;
429
83
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
@@ -442,7 +96,7 @@ declare class Grouping extends AlgCommon<Grouping> {
442
96
  invert(): Grouping;
443
97
  experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
444
98
  static fromString(): Grouping;
445
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
99
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
446
100
  experimentalAsSquare1Tuple(): [moveU: Move, moveD: Move] | null;
447
101
  }
448
102
 
@@ -454,7 +108,7 @@ declare class LineComment extends AlgCommon<LineComment> {
454
108
  isIdentical(other: Comparable): boolean;
455
109
  invert(): LineComment;
456
110
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
457
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
111
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
458
112
  }
459
113
 
460
114
  /** @category Alg Nodes */
@@ -466,7 +120,7 @@ declare class Commutator extends AlgCommon<Commutator> {
466
120
  isIdentical(other: Comparable): boolean;
467
121
  invert(): Commutator;
468
122
  experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
469
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
123
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
470
124
  }
471
125
 
472
126
  /** @category Alg Nodes */
@@ -478,12 +132,12 @@ declare class Conjugate extends AlgCommon<Conjugate> {
478
132
  isIdentical(other: Comparable): boolean;
479
133
  invert(): Conjugate;
480
134
  experimentalExpand(iterDir: IterationDirection, depth?: number): Generator<AlgLeaf>;
481
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
135
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
482
136
  }
483
137
 
484
138
  /** @category Alg Nodes */
485
139
  declare class Newline extends AlgCommon<Newline> {
486
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
140
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
487
141
  isIdentical(other: Comparable): boolean;
488
142
  invert(): Newline;
489
143
  experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
@@ -636,7 +290,7 @@ declare class Alg extends AlgCommon<Alg> {
636
290
  * // R U2 L
637
291
  * console.log(alg.toString())
638
292
  */
639
- toString(experimentalSerializationOptions?: ExperimentalSerializationOptions$1): string;
293
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
640
294
  /**
641
295
  * `experimentalSimplify` can perform several mostly-syntactic simplifications on an alg:
642
296
  *
@@ -692,19 +346,15 @@ declare class Alg extends AlgCommon<Alg> {
692
346
  simplify(options?: SimplifyOptions): Alg;
693
347
  }
694
348
 
695
- declare const startCharIndexKey: unique symbol;
696
- declare const endCharIndexKey: unique symbol;
697
- interface ParserIndexed {
698
- [startCharIndexKey]: number;
699
- [endCharIndexKey]: number;
700
- }
701
- type Parsed<T extends Alg | AlgNode> = T & ParserIndexed;
702
-
703
349
  interface NotationMapper {
704
350
  notationToInternal(move: Move): Move | null;
705
351
  notationToExternal(move: Move): Move | null;
706
352
  }
707
353
 
354
+ declare function parseOptions(argv: string[]): {
355
+ puzzleDescription: PuzzleDescription | null;
356
+ options: PuzzleGeometryOptions;
357
+ };
708
358
  type FaceName = string;
709
359
  type OrientationDirection = [number, number, number];
710
360
  type FaceBasedOrientationDescription = [
@@ -1020,6 +670,10 @@ declare class VisibleState extends PGTransformBase {
1020
670
  }
1021
671
 
1022
672
  type PuzzleDescriptionString = string;
673
+ declare const PGPuzzles: {
674
+ [name: string]: PuzzleDescriptionString;
675
+ };
676
+ type PuzzleName = keyof typeof PGPuzzles;
1023
677
 
1024
678
  declare class Quat {
1025
679
  a: number;
@@ -1091,6 +745,10 @@ interface StickerDat {
1091
745
  notationMapper: NotationMapper;
1092
746
  textureMapper: TextureMapper;
1093
747
  }
748
+ declare function getPG3DNamedPuzzles(): {
749
+ [s: string]: PuzzleDescriptionString;
750
+ };
751
+ declare function getPuzzleDescriptionString(puzzleName: PuzzleName): PuzzleDescriptionString;
1094
752
  declare const PUZZLE_BASE_SHAPES: readonly ["c", "t", "o", "d", "i"];
1095
753
  type PuzzleBaseShape = (typeof PUZZLE_BASE_SHAPES)[number];
1096
754
  declare const PUZZLE_CUT_TYPES: readonly ["f", "v", "e"];
@@ -1103,6 +761,9 @@ type PuzzleDescription = {
1103
761
  shape: PuzzleBaseShape;
1104
762
  cuts: PuzzleCutDescription[];
1105
763
  };
764
+ declare function parsePuzzleDescription(s: PuzzleDescriptionString): PuzzleDescription | null;
765
+ declare function getPuzzleGeometryByDesc(desc: string, options?: PuzzleGeometryOptions): PuzzleGeometry;
766
+ declare function getPuzzleGeometryByName(puzzleName: PuzzleName, options?: PuzzleGeometryOptions): PuzzleGeometry;
1106
767
  type MoveSetGeo = [string, string, string, string, number];
1107
768
  /** @category PuzzleGeometry */
1108
769
  declare class PuzzleGeometry {
@@ -2418,6 +2079,14 @@ declare global {
2418
2079
  }
2419
2080
  }
2420
2081
 
2082
+ declare const startCharIndexKey: unique symbol;
2083
+ declare const endCharIndexKey: unique symbol;
2084
+ interface ParserIndexed {
2085
+ [startCharIndexKey]: number;
2086
+ [endCharIndexKey]: number;
2087
+ }
2088
+ type Parsed<T extends Alg | AlgNode> = T & ParserIndexed;
2089
+
2421
2090
  declare class DataDown {
2422
2091
  earliestMoveIndex: number;
2423
2092
  twistyAlgViewer: TwistyAlgViewer;
@@ -2615,4 +2284,4 @@ interface PuzzleLoader {
2615
2284
  keyMapping?: () => Promise<KeyMapping>;
2616
2285
  }
2617
2286
 
2618
- export { Alg$1 as A, Commutator$1 as C, type ExperimentalNotationType as E, Grouping$1 as G, IterationDirection$1 as I, type KeyMapping as K, LineComment$1 as L, Move$1 as M, Newline$1 as N, type PuzzleSpecificSimplifyOptions$1 as P, QuantumMove$1 as Q, type SimplifyOptions$1 as S, type AlgNode$1 as a, type AlgLeaf$1 as b, type AppendOptions$1 as c, Conjugate$1 as d, Pause$1 as e, type MoveModifications$1 as f, type AlgBranch$1 as g, type AppendCancelOptions$1 as h, type ExperimentalSerializationOptions as i, type AlgLeaf as j };
2287
+ 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 };
@@ -1,6 +1,5 @@
1
- import { a as AlgNode, A as Alg, M as Move, c as AppendOptions, K as KeyMapping, b as AlgLeaf, G as Grouping, C as Commutator, d as Conjugate, e as Pause, N as Newline, L as LineComment } from '../PuzzleLoader-Ft_XlaHS.js';
2
- export { g as AlgBranch, h as AppendCancelOptions, E as ExperimentalNotationType, i as ExperimentalSerializationOptions, f as MoveModifications, P as PuzzleSpecificSimplifyOptions, Q as QuantumMove, S as SimplifyOptions } from '../PuzzleLoader-Ft_XlaHS.js';
3
- export { P as ExperimentalParsed } from '../parseAlg.d-DgyP8Jpl.js';
1
+ import { O as AlgNode, s as Alg, M as Move, R as AppendOptions, U as KeyMapping, A as AlgLeaf, W as Grouping, X as Commutator, Y as Conjugate, Z as Pause, _ as Newline, $ as LineComment } from '../PuzzleLoader-DGpDr4U9.js';
2
+ export { a1 as AlgBranch, a2 as AppendCancelOptions, a5 as ExperimentalNotationType, a4 as ExperimentalParsed, a6 as ExperimentalSerializationOptions, a0 as MoveModifications, x as PuzzleSpecificSimplifyOptions, a7 as QuantumMove, a3 as SimplifyOptions } from '../PuzzleLoader-DGpDr4U9.js';
4
3
  import 'three';
5
4
 
6
5
  /** @deprecated */
@@ -1,10 +1,7 @@
1
- import { K as KPattern } from '../KPattern.d-tlN4iAuY.js';
2
- import { a as PuzzleID, P as PuzzleLoader } from '../TwizzleLink.d-DdZRboJ4.js';
3
- import { A as Alg, M as Move } from '../PuzzleLoader-Ft_XlaHS.js';
4
- import { B as BluetoothPuzzle } from '../bluetooth-puzzle.d-kb8nnIde.js';
5
- export { A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle.d-kb8nnIde.js';
1
+ import { u as PuzzleID, t as PuzzleLoader, K as KPattern, s as Alg, M as Move } from '../PuzzleLoader-DGpDr4U9.js';
2
+ import { B as BluetoothPuzzle } from '../bluetooth-puzzle-C097rA5h.js';
3
+ export { A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-C097rA5h.js';
6
4
  import 'three';
7
- import '../parseAlg.d-DgyP8Jpl.js';
8
5
 
9
6
  declare function enableDebugLogging(enable: boolean): void;
10
7
 
@@ -1,5 +1,4 @@
1
- import { b as AlgLeaf } from './PuzzleLoader-Ft_XlaHS.js';
2
- import { K as KPattern } from './KPattern.d-tlN4iAuY.js';
1
+ import { A as AlgLeaf, K as KPattern } from './PuzzleLoader-DGpDr4U9.js';
3
2
 
4
3
  interface StreamTransformer {
5
4
  transformAlgLeaf(algLeafEvent: AlgLeafEvent): void;
@@ -1,5 +1,4 @@
1
- import { A as Alg } from './PuzzleLoader-Ft_XlaHS.js';
2
- import { K as KPattern, s as KPuzzle } from './KPattern.d-tlN4iAuY.js';
1
+ import { s as Alg, K as KPattern, v as KPuzzle } from './PuzzleLoader-DGpDr4U9.js';
3
2
 
4
3
  declare enum PrefetchLevel {
5
4
  Auto = "auto",
@@ -1,3 +1,2 @@
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';
1
+ export { K as KPattern, a9 as KPatternData, aa as KPatternOrbitData, v as KPuzzle, a8 as KPuzzleDefinition, z as KTransformation, ab as KTransformationData, ac as KTransformationOrbitData } from '../PuzzleLoader-DGpDr4U9.js';
3
2
  import 'three';
@@ -1,8 +1,5 @@
1
- import { A as Alg } from '../PuzzleLoader-Ft_XlaHS.js';
2
- import { P as PuzzleLoader } from '../TwizzleLink.d-DdZRboJ4.js';
1
+ import { s as Alg, t as PuzzleLoader } from '../PuzzleLoader-DGpDr4U9.js';
3
2
  import 'three';
4
- import '../parseAlg.d-DgyP8Jpl.js';
5
- import '../KPattern.d-tlN4iAuY.js';
6
3
 
7
4
  declare enum CommonMetric {
8
5
  OuterBlockTurnMetric = "OBTM",
@@ -1,5 +1,4 @@
1
- import '../PuzzleLoader-Ft_XlaHS.js';
2
- import { K as KPattern } from '../KPattern.d-tlN4iAuY.js';
1
+ import { K as KPattern } from '../PuzzleLoader-DGpDr4U9.js';
3
2
  import 'three';
4
3
 
5
4
  type Binary3x3x3Pattern = Uint8Array;
@@ -1,6 +1,5 @@
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';
1
+ import { P as Perm } from '../PuzzleLoader-DGpDr4U9.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 '../PuzzleLoader-DGpDr4U9.js';
4
3
  import 'three';
5
4
 
6
5
  declare function schreierSims(g: Perm[], disp: (s: string) => void): bigint;
@@ -1,8 +1,5 @@
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';
1
+ import { u as PuzzleID, t as PuzzleLoader, v as KPuzzle, d as PuzzleGeometry, E as ExperimentalStickering, w as StickeringMask, x as PuzzleSpecificSimplifyOptions, A as AlgLeaf } from '../PuzzleLoader-DGpDr4U9.js';
4
2
  import 'three';
5
- import '../parseAlg.d-DgyP8Jpl.js';
6
3
 
7
4
  interface EventInfo {
8
5
  puzzleID: PuzzleID;
@@ -1,4 +1,3 @@
1
- export { r as randomScrambleForEvent } from '../index-Ca5480OU.js';
2
- import '../PuzzleLoader-Ft_XlaHS.js';
3
- import '../KPattern.d-tlN4iAuY.js';
1
+ export { r as randomScrambleForEvent } from '../index-3pTbhXFM.js';
2
+ import '../PuzzleLoader-DGpDr4U9.js';
4
3
  import 'three';
@@ -1,6 +1,5 @@
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';
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-3pTbhXFM.js';
2
+ import { K as KPattern } from '../PuzzleLoader-DGpDr4U9.js';
4
3
  import 'three';
5
4
 
6
5
  declare function random333Pattern(): Promise<KPattern>;
@@ -1,9 +1,6 @@
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';
1
+ import '../PuzzleLoader-DGpDr4U9.js';
2
+ import { A as AlgLeafEvent, O as OrientationEvent } from '../bluetooth-puzzle-C097rA5h.js';
4
3
  import 'three';
5
- import '../parseAlg.d-DgyP8Jpl.js';
6
- import '../KPattern.d-tlN4iAuY.js';
7
4
 
8
5
  interface ProxyMoveEvent {
9
6
  event: "move";
@@ -1,9 +1,6 @@
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';
1
+ import { y as AlgIndexer, v as KPuzzle, s as Alg, M as Move, T as Timestamp, K as KPattern, z as KTransformation, D as Duration, w as StickeringMask } from '../PuzzleLoader-DGpDr4U9.js';
2
+ export { H as BackViewLayout, N as EXPERIMENTAL_PROP_NO_VALUE, L as ExperimentalMillisecondTimestamp, E as ExperimentalStickering, u as PuzzleID, F as TwistyAlgEditor, C as TwistyAlgViewer, B as TwistyPlayer, G as TwistyPlayerConfig, J as TwizzleLink, V as VisualizationFormat, I as backViewLayouts } from '../PuzzleLoader-DGpDr4U9.js';
5
3
  import 'three';
6
- import '../parseAlg.d-DgyP8Jpl.js';
7
4
 
8
5
  declare const twistyDebugGlobals: {
9
6
  shareAllNewRenderers: "auto" | "always" | "never";