cubing 0.54.5 → 0.55.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 (36) hide show
  1. package/dist/lib/cubing/{PuzzleLoader-Ft_XlaHS.d.ts → KPattern-BXlfgC6b.d.ts} +75 -406
  2. package/dist/lib/cubing/alg/index.d.ts +2 -3
  3. package/dist/lib/cubing/bluetooth/index.d.ts +3 -6
  4. package/dist/lib/cubing/{bluetooth-puzzle.d-kb8nnIde.d.ts → bluetooth-puzzle-CkZw4jC6.d.ts} +1 -2
  5. package/dist/lib/cubing/chunks/{chunk-YUHH4EXE.js → chunk-6WYRN27C.js} +5 -4
  6. package/dist/lib/cubing/chunks/chunk-6WYRN27C.js.map +7 -0
  7. package/dist/lib/cubing/chunks/{chunk-WOKS3P3I.js → chunk-JS5PDZ4D.js} +5 -4
  8. package/dist/lib/cubing/chunks/chunk-JS5PDZ4D.js.map +7 -0
  9. package/dist/lib/cubing/chunks/{chunk-GOT3GVLG.js → chunk-RDSQRW3G.js} +1 -11
  10. package/dist/lib/cubing/chunks/chunk-RDSQRW3G.js.map +7 -0
  11. package/dist/lib/cubing/chunks/{inside-WZQKNOJH.js → inside-KP7ZR25G.js} +4 -4
  12. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-OZZLMKCB.js → search-dynamic-solve-4x4x4-JXJRJXQ6.js} +3 -3
  13. package/dist/lib/cubing/chunks/search-worker-entry.js +3 -3
  14. package/dist/lib/cubing/{index-Ca5480OU.d.ts → index-BaPEgEPZ.d.ts} +1 -2
  15. package/dist/lib/cubing/kpuzzle/index.d.ts +1 -2
  16. package/dist/lib/cubing/notation/index.d.ts +1 -4
  17. package/dist/lib/cubing/protocol/index.d.ts +1 -2
  18. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -3
  19. package/dist/lib/cubing/puzzles/index.d.ts +1 -4
  20. package/dist/lib/cubing/scramble/index.d.ts +2 -3
  21. package/dist/lib/cubing/scramble/index.js +2 -2
  22. package/dist/lib/cubing/search/index.d.ts +2 -3
  23. package/dist/lib/cubing/search/index.js +2 -2
  24. package/dist/lib/cubing/stream/index.d.ts +2 -5
  25. package/dist/lib/cubing/twisty/index.d.ts +2 -5
  26. package/dist/lib/cubing/twisty/index.js +8 -2
  27. package/dist/lib/cubing/twisty/index.js.map +2 -2
  28. package/package.json +3 -3
  29. package/dist/lib/cubing/KPattern.d-tlN4iAuY.d.ts +0 -550
  30. package/dist/lib/cubing/TwizzleLink.d-DdZRboJ4.d.ts +0 -1389
  31. package/dist/lib/cubing/chunks/chunk-GOT3GVLG.js.map +0 -7
  32. package/dist/lib/cubing/chunks/chunk-WOKS3P3I.js.map +0 -7
  33. package/dist/lib/cubing/chunks/chunk-YUHH4EXE.js.map +0 -7
  34. package/dist/lib/cubing/parseAlg.d-DgyP8Jpl.d.ts +0 -11
  35. /package/dist/lib/cubing/chunks/{inside-WZQKNOJH.js.map → inside-KP7ZR25G.js.map} +0 -0
  36. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-OZZLMKCB.js.map → search-dynamic-solve-4x4x4-JXJRJXQ6.js.map} +0 -0
@@ -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 = [
@@ -758,47 +408,6 @@ declare class Perm {
758
408
  order(): number;
759
409
  }
760
410
 
761
- declare class KTransformation {
762
- #private;
763
- readonly kpuzzle: KPuzzle;
764
- readonly transformationData: KTransformationData;
765
- constructor(kpuzzle: KPuzzle, transformationData: KTransformationData);
766
- toJSON(): any;
767
- invert(): KTransformation;
768
- isIdentityTransformation(): boolean;
769
- /** @deprecated */
770
- static experimentalConstructIdentity(kpuzzle: KPuzzle): KTransformation;
771
- isIdentical(t2: KTransformation): boolean;
772
- /** @deprecated */
773
- apply(source: KTransformationSource): KTransformation;
774
- applyTransformation(t2: KTransformation): KTransformation;
775
- applyMove(move: Move | string): KTransformation;
776
- applyAlg(alg: Alg | string): KTransformation;
777
- toKPattern(): KPattern;
778
- repetitionOrder(): number;
779
- selfMultiply(amount: number): KTransformation;
780
- }
781
-
782
- declare class KPattern {
783
- readonly kpuzzle: KPuzzle;
784
- readonly patternData: KPatternData;
785
- constructor(kpuzzle: KPuzzle, patternData: KPatternData);
786
- toJSON(): any;
787
- static fromTransformation(transformation: KTransformation): KPattern;
788
- /** @deprecated */
789
- apply(source: KTransformationSource): KPattern;
790
- applyTransformation(transformation: KTransformation): KPattern;
791
- applyMove(move: Move | string): KPattern;
792
- applyAlg(alg: Alg | string): KPattern;
793
- isIdentical(other: KPattern): boolean;
794
- /** @deprecated */
795
- experimentalToTransformation(): KTransformation | null;
796
- experimentalIsSolved(options: {
797
- ignorePuzzleOrientation: boolean;
798
- ignoreCenterOrientation: boolean;
799
- }): boolean;
800
- }
801
-
802
411
  type KPatternData = Record<string, KPatternOrbitData>;
803
412
  interface KPatternOrbitData {
804
413
  pieces: number[];
@@ -1020,6 +629,10 @@ declare class VisibleState extends PGTransformBase {
1020
629
  }
1021
630
 
1022
631
  type PuzzleDescriptionString = string;
632
+ declare const PGPuzzles: {
633
+ [name: string]: PuzzleDescriptionString;
634
+ };
635
+ type PuzzleName = keyof typeof PGPuzzles;
1023
636
 
1024
637
  declare class Quat {
1025
638
  a: number;
@@ -1091,6 +704,10 @@ interface StickerDat {
1091
704
  notationMapper: NotationMapper;
1092
705
  textureMapper: TextureMapper;
1093
706
  }
707
+ declare function getPG3DNamedPuzzles(): {
708
+ [s: string]: PuzzleDescriptionString;
709
+ };
710
+ declare function getPuzzleDescriptionString(puzzleName: PuzzleName): PuzzleDescriptionString;
1094
711
  declare const PUZZLE_BASE_SHAPES: readonly ["c", "t", "o", "d", "i"];
1095
712
  type PuzzleBaseShape = (typeof PUZZLE_BASE_SHAPES)[number];
1096
713
  declare const PUZZLE_CUT_TYPES: readonly ["f", "v", "e"];
@@ -1103,6 +720,9 @@ type PuzzleDescription = {
1103
720
  shape: PuzzleBaseShape;
1104
721
  cuts: PuzzleCutDescription[];
1105
722
  };
723
+ declare function parsePuzzleDescription(s: PuzzleDescriptionString): PuzzleDescription | null;
724
+ declare function getPuzzleGeometryByDesc(desc: string, options?: PuzzleGeometryOptions): PuzzleGeometry;
725
+ declare function getPuzzleGeometryByName(puzzleName: PuzzleName, options?: PuzzleGeometryOptions): PuzzleGeometry;
1106
726
  type MoveSetGeo = [string, string, string, string, number];
1107
727
  /** @category PuzzleGeometry */
1108
728
  declare class PuzzleGeometry {
@@ -1213,6 +833,27 @@ declare class PGNotation {
1213
833
  remapKPuzzleDefinition(kpuzzleDefinition: KPuzzleDefinition): KPuzzleDefinition;
1214
834
  }
1215
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
+
1216
857
  type KTransformationSource = Alg | Move | string | KTransformation;
1217
858
  declare class KPuzzle {
1218
859
  #private;
@@ -2418,6 +2059,14 @@ declare global {
2418
2059
  }
2419
2060
  }
2420
2061
 
2062
+ declare const startCharIndexKey: unique symbol;
2063
+ declare const endCharIndexKey: unique symbol;
2064
+ interface ParserIndexed {
2065
+ [startCharIndexKey]: number;
2066
+ [endCharIndexKey]: number;
2067
+ }
2068
+ type Parsed<T extends Alg | AlgNode> = T & ParserIndexed;
2069
+
2421
2070
  declare class DataDown {
2422
2071
  earliestMoveIndex: number;
2423
2072
  twistyAlgViewer: TwistyAlgViewer;
@@ -2615,4 +2264,24 @@ interface PuzzleLoader {
2615
2264
  keyMapping?: () => Promise<KeyMapping>;
2616
2265
  }
2617
2266
 
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 };
2267
+ declare class KPattern {
2268
+ readonly kpuzzle: KPuzzle;
2269
+ readonly patternData: KPatternData;
2270
+ constructor(kpuzzle: KPuzzle, patternData: KPatternData);
2271
+ toJSON(): any;
2272
+ static fromTransformation(transformation: KTransformation): KPattern;
2273
+ /** @deprecated */
2274
+ apply(source: KTransformationSource): KPattern;
2275
+ applyTransformation(transformation: KTransformation): KPattern;
2276
+ applyMove(move: Move | string): KPattern;
2277
+ applyAlg(alg: Alg | string): KPattern;
2278
+ isIdentical(other: KPattern): boolean;
2279
+ /** @deprecated */
2280
+ experimentalToTransformation(): KTransformation | null;
2281
+ experimentalIsSolved(options: {
2282
+ ignorePuzzleOrientation: boolean;
2283
+ ignoreCenterOrientation: boolean;
2284
+ }): boolean;
2285
+ }
2286
+
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 '../KPattern-BXlfgC6b.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 '../KPattern-BXlfgC6b.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 '../KPattern-BXlfgC6b.js';
2
+ import { B as BluetoothPuzzle } from '../bluetooth-puzzle-CkZw4jC6.js';
3
+ export { A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-CkZw4jC6.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 './KPattern-BXlfgC6b.js';
3
2
 
4
3
  interface StreamTransformer {
5
4
  transformAlgLeaf(algLeafEvent: AlgLeafEvent): void;
@@ -1,13 +1,14 @@
1
1
  import {
2
- getBuiltinModule,
3
2
  node_adapter_default
4
- } from "./chunk-GOT3GVLG.js";
3
+ } from "./chunk-RDSQRW3G.js";
5
4
 
6
5
  // src/cubing/vendor/apache/comlink-everywhere/inside/index.ts
7
6
  import { expose as comlinkExpose } from "comlink";
8
7
  var useNodeWorkarounds = typeof globalThis.Worker === "undefined" && typeof globalThis.WorkerNavigator === "undefined";
9
8
  async function nodeEndpointPort() {
10
- const { parentPort } = await getBuiltinModule("node:worker_threads");
9
+ const { parentPort } = globalThis.process.getBuiltinModule(
10
+ "node:worker_threads"
11
+ );
11
12
  return node_adapter_default(
12
13
  parentPort
13
14
  );
@@ -26,4 +27,4 @@ export {
26
27
  nodeEndpointPort,
27
28
  expose
28
29
  };
29
- //# sourceMappingURL=chunk-YUHH4EXE.js.map
30
+ //# sourceMappingURL=chunk-6WYRN27C.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cubing/vendor/apache/comlink-everywhere/inside/index.ts"],
4
+ "sourcesContent": ["import { expose as comlinkExpose } from \"comlink\";\nimport nodeEndpoint from \"../node-adapter\";\n\nconst useNodeWorkarounds =\n typeof globalThis.Worker === \"undefined\" &&\n typeof (globalThis as any).WorkerNavigator === \"undefined\";\n\nexport async function nodeEndpointPort(): Promise<\n Worker & {\n nodeWorker?: import(\"node:worker_threads\").Worker;\n }\n> {\n const { parentPort } = globalThis.process.getBuiltinModule(\n \"node:worker_threads\",\n );\n return nodeEndpoint(\n parentPort as unknown as import(\"node:worker_threads\").Worker,\n );\n}\n\nexport function expose(api: any) {\n if (useNodeWorkarounds) {\n (async () => {\n comlinkExpose(api, await nodeEndpointPort());\n })();\n } else {\n comlinkExpose(api);\n }\n}\n"],
5
+ "mappings": ";;;;;AAAA,SAAS,UAAU,qBAAqB;AAGxC,IAAM,qBACJ,OAAO,WAAW,WAAW,eAC7B,OAAQ,WAAmB,oBAAoB;AAEjD,eAAsB,mBAIpB;AACA,QAAM,EAAE,WAAW,IAAI,WAAW,QAAQ;AAAA,IACxC;AAAA,EACF;AACA,SAAO;AAAA,IACL;AAAA,EACF;AACF;AAEO,SAAS,OAAO,KAAU;AAC/B,MAAI,oBAAoB;AACtB,KAAC,YAAY;AACX,oBAAc,KAAK,MAAM,iBAAiB,CAAC;AAAA,IAC7C,GAAG;AAAA,EACL,OAAO;AACL,kBAAc,GAAG;AAAA,EACnB;AACF;",
6
+ "names": []
7
+ }