cubing 0.54.4 → 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.
Files changed (38) hide show
  1. package/dist/lib/cubing/{PuzzleLoader-BYI7PA7C.d.ts → PuzzleLoader-DGpDr4U9.d.ts} +50 -366
  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-SLdses2g.d.ts → bluetooth-puzzle-C097rA5h.d.ts} +1 -2
  5. package/dist/lib/cubing/chunks/{chunk-6JKLFI75.js → chunk-55STZK6V.js} +2 -2
  6. package/dist/lib/cubing/chunks/{chunk-6JKLFI75.js.map → chunk-55STZK6V.js.map} +2 -2
  7. package/dist/lib/cubing/chunks/{chunk-FSEFHZZJ.js → chunk-WOKS3P3I.js} +1 -1
  8. package/dist/lib/cubing/chunks/{inside-6QEBA5VI.js → inside-WZQKNOJH.js} +3 -3
  9. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-5KMGO47S.js → search-dynamic-solve-4x4x4-OZZLMKCB.js} +2 -2
  10. package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
  11. package/dist/lib/cubing/chunks/{twsearch-YXEBHYHP.js → twsearch-HWA5BU3S.js} +11 -3
  12. package/dist/lib/cubing/chunks/twsearch-HWA5BU3S.js.map +7 -0
  13. package/dist/lib/cubing/chunks/twsearch_wasm_bg-BI4JVWGR-OGWODKOA.js +10 -0
  14. package/dist/lib/cubing/chunks/twsearch_wasm_bg-BI4JVWGR-OGWODKOA.js.map +7 -0
  15. package/dist/lib/cubing/{index-C0GtBTdp.d.ts → index-3pTbhXFM.d.ts} +1 -2
  16. package/dist/lib/cubing/kpuzzle/index.d.ts +1 -2
  17. package/dist/lib/cubing/notation/index.d.ts +1 -4
  18. package/dist/lib/cubing/protocol/index.d.ts +1 -2
  19. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -3
  20. package/dist/lib/cubing/puzzles/index.d.ts +1 -4
  21. package/dist/lib/cubing/scramble/index.d.ts +2 -3
  22. package/dist/lib/cubing/scramble/index.js +1 -1
  23. package/dist/lib/cubing/search/index.d.ts +2 -3
  24. package/dist/lib/cubing/search/index.js +1 -1
  25. package/dist/lib/cubing/stream/index.d.ts +2 -5
  26. package/dist/lib/cubing/twisty/index.d.ts +2 -5
  27. package/dist/lib/cubing/twisty/index.js +22 -51
  28. package/dist/lib/cubing/twisty/index.js.map +3 -3
  29. package/package.json +2 -1
  30. package/dist/lib/cubing/KPattern.d-B8PBnjzZ.d.ts +0 -550
  31. package/dist/lib/cubing/TwizzleLink.d-Bxv5QZmG.d.ts +0 -1374
  32. package/dist/lib/cubing/chunks/twsearch-YXEBHYHP.js.map +0 -7
  33. package/dist/lib/cubing/chunks/twsearch_wasm_bg-LRRAZVO4-B6TQCFO6.js +0 -10
  34. package/dist/lib/cubing/chunks/twsearch_wasm_bg-LRRAZVO4-B6TQCFO6.js.map +0 -7
  35. package/dist/lib/cubing/parseAlg.d-BMkZo3Y-.d.ts +0 -11
  36. /package/dist/lib/cubing/chunks/{chunk-FSEFHZZJ.js.map → chunk-WOKS3P3I.js.map} +0 -0
  37. /package/dist/lib/cubing/chunks/{inside-6QEBA5VI.js.map → inside-WZQKNOJH.js.map} +0 -0
  38. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-5KMGO47S.js.map → search-dynamic-solve-4x4x4-OZZLMKCB.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cubing",
3
- "version": "0.54.4",
3
+ "version": "0.55.0",
4
4
  "description": "A collection of JavaScript cubing libraries.",
5
5
  "author": "The js.cubing.net team",
6
6
  "type": "module",
@@ -81,6 +81,7 @@
81
81
  "jszip": "^3.10.1",
82
82
  "mocha": "^10.7.3",
83
83
  "playwright": "^1.47.2",
84
+ "printable-shell-command": "v0.1.3",
84
85
  "tsup": "^8.3.0",
85
86
  "typedoc": "^0.26.7",
86
87
  "typescript": "^5.6.2"
@@ -1,550 +0,0 @@
1
- import { M as Move, A as Alg } from './PuzzleLoader-BYI7PA7C.js';
2
-
3
- type KPatternData = Record<string, KPatternOrbitData>;
4
- interface KPatternOrbitData {
5
- pieces: number[];
6
- orientation: number[];
7
- /** Each piece may have an "orientation mod" that means "the orientation of
8
- * this piece is known mod [value]".
9
- *
10
- * Suppose `.numOrientations` for this orbit has a value of N. This is
11
- * considered the default value for the orientation mod of each piece in the
12
- * orbit.
13
- *
14
- * - Each entry must be one of the following:
15
- * - A proper divisor of N.
16
- * - For example: if N is 12, then one of: 1, 2, 3, 6
17
- * - The special value 0, indicating the default value (N).
18
- * - This indicates that the orientation of a piece is fully known, i.e.
19
- * that its "orientation mod" is the default value (N). However, such a
20
- * value is recorded as 0 instead of N, in order to make it simpler to
21
- * implement and debug pattern logic involving the default value.
22
- * - If `.orientationMod[i]` is a proper divisor of N (i.e. not 0), then
23
- * `.orientation[i]` must be less than `.orientationMod[i]`. That is, the
24
- * orientation values must be individually "normalized" for each piece.
25
- * - If the `orientationMod` field is not present, then every piece is
26
- * considered to have the default value for its "orientation mod".
27
- *
28
- * For a "real-world" example of this concept, consider a traditional analog
29
- * 12-hour clock dial, like one that might hang on the wall in a school room.
30
- * Although there are 24 hours in a day, A.M. and P.M. times are not
31
- * distinguishable on such a clock. Since 3:00 (AM) and 15:00 are not
32
- * distinguishable, we would read either of those times as 3:00 with an
33
- * implicit "orientation mod" of 12.
34
- *
35
- * For most puzzles, however, we care about "visual" indistinguishability
36
- * rather than "temporal" indistinguishability. To adapt the previous example,
37
- * imagine a 24-hour clock with 24 hour marks around the dial, but where the
38
- * hour hand is symmetric and points equally at the current hour as well as
39
- * its diametic opposite (like a compass needle but painted all in one color).
40
- * This has the same set of "valid patterns" as a normal 12-hour clock. Such a
41
- * clock also has an "orientation mod" of 12, but where the multiples of the
42
- * modulus have been "unfolded" to show their full symmetry instead of being
43
- * implicit.
44
- *
45
- * For a non-trivial puzzle example, consider Eitan's FisherTwist, a shape mod
46
- * of the 3x3x3 cube:
47
- * https://www.hknowstore.com/locale/en-US/item.aspx?corpname=nowstore&itemid=97eb4e89-367e-4d02-b7f0-34e5e7f3cd12
48
- *
49
- * - The 4 equatorial centers have C₂ symmetry — it is possible to rotate any
50
- * of these centers 180° without a visible change to the state. This means
51
- * that the possible orientations "loop" after incrementing the orientation
52
- * by 2 (two turns clockwise), and therefore the "orientation mod" of a
53
- * given piece is only 2.
54
- * - If we apply a counter-clockwise rotation to one of these centers, the
55
- * transformation applies an orientation of 3. But the net orientation is
56
- * recorded as a normalized value of 1 instead, because 3 (mod 2) ≡ 1 (mod
57
- * 2).
58
- * - The 2 polar centers (U and D) have no distinguishable rotations. This
59
- * means that their orientation is "known mod 1" — any transformation of one
60
- * of these centers is indistinguishable from another transformation of the
61
- * same center, and all of them are mapped to a value of 0 (the only
62
- * possible value that exists mod 1).
63
- *
64
- * For 3x3x3:
65
- *
66
- * - When solving a normal 3x3x3, center orientations are conventionally
67
- * ignored. This is similar to the polar center case for Eitan's
68
- * FisherTwist, and the "orientation mod" of each piece is 1. This is also
69
- * the core motivating use case.
70
- * - For a supercube
71
- * (https://experiments.cubing.net/cubing.js/twisty/supercube.html) or the
72
- * general case of a "picture cube", all four center orientations are
73
- * distinguishable for every center. This means all centers have the default
74
- * orientation mod of 4. As documented above, this can be recorded with a
75
- * `.orientationMod` of `[0, 0, 0, 0, 0, 0]`, or equivalently by omitting
76
- * the `.orientationMod` field.
77
- * - When modeling a real 3x3x3 speedcube, it is common to have a logo on a
78
- * single sticker. If you want to model the exact visually distinguishable
79
- * states of such a puzzles, it is possible to use an `.orientationMod` such
80
- * as `[0, 1, 1, 1, 1, 1]`. For example, this can make it easy to find an
81
- * alg for a given case "while keeping the logo the same", without placing
82
- * more restrictions on other centers (which could make the search slower or
83
- * produce longer solutions).
84
- *
85
- * For those with a mathematical background, you may notice a relationship to
86
- * the concept of a coset (https://en.wikipedia.org/wiki/Coset). For example,
87
- * consider the group of patterns of a `KPuzzle` (without indistinguishable
88
- * pieces) generated by a set of transformations. We can assign each set of
89
- * piece orbits an orientation mod value (which must be identical for all
90
- * constituent pieces of the same orbit). Each such choice generates a set of
91
- * valid `KPattern`s that forms a subgroup, and each set of valid `.orientation`
92
- * values defines one coset of this set. However, note that the set of valid
93
- * `KPattern`s does *not* form a group when there are any pieces with different
94
- * `.orientationMod` values that share an orbit.
95
- *
96
- * --------
97
- *
98
- * Note that the concept of "orientation mod" exclusively applies to `KPattern`,
99
- * not `KTransformation`. If we tried to apply the orientation mod
100
- * calculations to the *transformations* of Eitan's FisherTwist, then `SWAP =
101
- * [U, M' E2 M]` would be indistinguishable from the identity. This would mean
102
- * that if we calculated `SWAP` and then used this calculation for `S SWAP
103
- * S'`, then we would conclude that it has no net effect. However, `S SWAP S'`
104
- * does *not* have the same effect as doing nothing — it visibly rotates the L
105
- * and R centers! (In mathematical terms: the set of `KTransformation`s would
106
- * not form a valid set of semigroup actions, due to broken associativity.)
107
- *
108
- * Although there are times that we could theoretically save some time/space
109
- * by ignoring some information when it's not needed for working with certain
110
- * `KTransformation`s (e.g. ignoring all center orientations for 3x3x3), it is
111
- * more practical for each `KTransformation` to always track the full range
112
- * for each piece's `.orientation`. For example:
113
- *
114
- * - This is simpler, both conceptually and in code.
115
- * - This allows changing the set of moves for a puzzle, without recalculating
116
- * cached transformations or certain lookup tables (useful for alg
117
- * searches).
118
- * - This allows swapping out a normal 3x3x3 in a `<twisty-player>` for a
119
- * picture cube, without re-calculating the center orientations of the
120
- * current alg.
121
- *
122
- * These use cases may not be strictly "necessary", but the opposite behaviour
123
- * might be surprising or frustrating if someone does not expect it. So we
124
- * implement it this way.
125
- *
126
- * Informally, the `KTransformation` has the full responsibility for tracking
127
- * "what really happens" — even if the effect is invisible in some cases,
128
- * while the `KPattern` tracks both what "is" and what "isn't" known.
129
- **/
130
- orientationMod?: number[];
131
- }
132
- type KTransformationData = Record<string, KTransformationOrbitData>;
133
- interface KTransformationOrbitData {
134
- permutation: number[];
135
- orientationDelta: number[];
136
- }
137
- interface KPuzzleOrbitDefinition {
138
- orbitName: string;
139
- numPieces: number;
140
- numOrientations: number;
141
- }
142
- interface KPuzzleDefinition {
143
- name: string;
144
- orbits: KPuzzleOrbitDefinition[];
145
- defaultPattern: KPatternData;
146
- moves: Record<string, KTransformationData>;
147
- derivedMoves?: Record<string, string>;
148
- experimentalIsPatternSolved?: (kpattern: KPattern, options: {
149
- ignorePuzzleOrientation: boolean;
150
- ignoreCenterOrientation: boolean;
151
- }) => boolean;
152
- }
153
-
154
- declare class KTransformation {
155
- #private;
156
- readonly kpuzzle: KPuzzle;
157
- readonly transformationData: KTransformationData;
158
- constructor(kpuzzle: KPuzzle, transformationData: KTransformationData);
159
- toJSON(): any;
160
- invert(): KTransformation;
161
- isIdentityTransformation(): boolean;
162
- /** @deprecated */
163
- static experimentalConstructIdentity(kpuzzle: KPuzzle): KTransformation;
164
- isIdentical(t2: KTransformation): boolean;
165
- /** @deprecated */
166
- apply(source: KTransformationSource): KTransformation;
167
- applyTransformation(t2: KTransformation): KTransformation;
168
- applyMove(move: Move | string): KTransformation;
169
- applyAlg(alg: Alg | string): KTransformation;
170
- toKPattern(): KPattern;
171
- repetitionOrder(): number;
172
- selfMultiply(amount: number): KTransformation;
173
- }
174
-
175
- interface NotationMapper {
176
- notationToInternal(move: Move): Move | null;
177
- notationToExternal(move: Move): Move | null;
178
- }
179
-
180
- declare function parseOptions(argv: string[]): {
181
- puzzleDescription: PuzzleDescription | null;
182
- options: PuzzleGeometryOptions;
183
- };
184
- type FaceName = string;
185
- type OrientationDirection = [number, number, number];
186
- type FaceBasedOrientationDescription = [
187
- [
188
- FaceName,
189
- OrientationDirection
190
- ],
191
- [
192
- FaceName,
193
- OrientationDirection
194
- ]
195
- ];
196
- type BaseFaceCount = 4 | 6 | 8 | 12 | 20;
197
- type FaceBasedOrientationDescriptionLookup = Record<BaseFaceCount, FaceBasedOrientationDescription>;
198
- declare class PuzzleGeometryFullOptions {
199
- verbosity: number;
200
- allMoves: boolean;
201
- outerBlockMoves: boolean;
202
- vertexMoves: boolean;
203
- addRotations: boolean;
204
- moveList: string[] | null;
205
- fixedOrientation: boolean;
206
- fixedPieceType: null | "e" | "v" | "f";
207
- orientCenters: boolean;
208
- includeCornerOrbits: boolean;
209
- includeCenterOrbits: boolean;
210
- includeEdgeOrbits: boolean;
211
- excludeOrbits: string[];
212
- optimizeOrbits: boolean;
213
- grayCorners: boolean;
214
- grayCenters: boolean;
215
- grayEdges: boolean;
216
- puzzleOrientation: FaceBasedOrientationDescription | null;
217
- puzzleOrientations: FaceBasedOrientationDescriptionLookup | null;
218
- scrambleAmount: number;
219
- constructor(options?: PuzzleGeometryOptions);
220
- }
221
- type PuzzleGeometryOptions = Partial<PuzzleGeometryFullOptions>;
222
-
223
- declare class Perm {
224
- n: number;
225
- p: number[];
226
- constructor(a: number[]);
227
- toString(): string;
228
- mul(p2: Perm): Perm;
229
- rmul(p2: Perm): Perm;
230
- inv(): Perm;
231
- compareTo(p2: Perm): number;
232
- toGap(): string;
233
- toMathematica(): string;
234
- order(): number;
235
- }
236
-
237
- declare class PGOrbitDef {
238
- size: number;
239
- mod: number;
240
- constructor(size: number, mod: number);
241
- reassemblySize(): bigint;
242
- }
243
- declare class PGOrbitsDef {
244
- orbitnames: string[];
245
- private orbitdefs;
246
- solved: VisibleState;
247
- movenames: string[];
248
- moveops: PGTransform[];
249
- isRotation: boolean[];
250
- forcenames: boolean[];
251
- constructor(orbitnames: string[], orbitdefs: PGOrbitDef[], solved: VisibleState, movenames: string[], moveops: PGTransform[], isRotation: boolean[], forcenames: boolean[]);
252
- toKTransformationData(t: PGTransform): KTransformationData;
253
- toKPatternData(t: PGTransform): KPatternData;
254
- static transformToKTransformationData(orbitnames: string[], t: PGTransform): KTransformationData;
255
- private describeSet;
256
- toKsolve(name: string, mapper?: NotationMapper): string[];
257
- toKPuzzleDefinition(includemoves: boolean): KPuzzleDefinition;
258
- optimize(): PGOrbitsDef;
259
- scramble(n: number): void;
260
- getScrambleTransformation(n: number): PGTransform;
261
- reassemblySize(): bigint;
262
- }
263
- declare class PGOrbit {
264
- perm: number[];
265
- ori: number[];
266
- orimod: number;
267
- private static ktransformationCache;
268
- static e(n: number, mod: number): PGOrbit;
269
- constructor(perm: number[], ori: number[], orimod: number);
270
- mul(b: PGOrbit): PGOrbit;
271
- inv(): PGOrbit;
272
- equal(b: PGOrbit): boolean;
273
- killOri(): this;
274
- toPerm(): Perm;
275
- identicalPieces(): number[][];
276
- order(): number;
277
- isIdentity(): boolean;
278
- private zeroOris;
279
- remap(no: number[], on: number[], nv: number): PGOrbit;
280
- remapVS(no: number[], nv: number): PGOrbit;
281
- appendDefinition(result: string[], name: string, useVS: boolean, concise?: boolean): void;
282
- toKTransformationOrbitData(): KTransformationOrbitData;
283
- toKPatternOrbitData(): KPatternOrbitData;
284
- }
285
- declare class PGTransformBase {
286
- orbits: PGOrbit[];
287
- constructor(orbits: PGOrbit[]);
288
- internalMul(b: PGTransformBase): PGOrbit[];
289
- protected internalInv(): PGOrbit[];
290
- equal(b: PGTransformBase): boolean;
291
- protected killOri(): this;
292
- toPerm(): Perm;
293
- identicalPieces(): number[][];
294
- order(): number;
295
- }
296
- declare class PGTransform extends PGTransformBase {
297
- mul(b: PGTransform): PGTransform;
298
- mulScalar(n: number): PGTransform;
299
- inv(): PGTransform;
300
- e(): PGTransform;
301
- }
302
- declare class VisibleState extends PGTransformBase {
303
- mul(b: PGTransform): VisibleState;
304
- }
305
-
306
- type PuzzleDescriptionString = string;
307
- declare const PGPuzzles: {
308
- [name: string]: PuzzleDescriptionString;
309
- };
310
- type PuzzleName = keyof typeof PGPuzzles;
311
-
312
- declare class Quat {
313
- a: number;
314
- b: number;
315
- c: number;
316
- d: number;
317
- constructor(a: number, b: number, c: number, d: number);
318
- mul(q: Quat): Quat;
319
- toString(): string;
320
- dist(q: Quat): number;
321
- len(): number;
322
- cross(q: Quat): Quat;
323
- dot(q: Quat): number;
324
- normalize(): Quat;
325
- makenormal(): Quat;
326
- normalizeplane(): Quat;
327
- smul(m: number): Quat;
328
- sum(q: Quat): Quat;
329
- sub(q: Quat): Quat;
330
- angle(): number;
331
- invrot(): Quat;
332
- det3x3(a00: number, a01: number, a02: number, a10: number, a11: number, a12: number, a20: number, a21: number, a22: number): number;
333
- rotateplane(q: Quat): Quat;
334
- orthogonal(): Quat;
335
- pointrotation(b: Quat): Quat;
336
- unproject(b: Quat): Quat;
337
- rotatepoint(q: Quat): Quat;
338
- rotateface(face: Quat[]): Quat[];
339
- intersect3(p2: Quat, p3: Quat): Quat | false;
340
- side(x: number): number;
341
- /**
342
- * Cuts a face by this plane, or returns null if there
343
- * is no intersection.
344
- * @param face The face to cut.
345
- */
346
- cutface(face: Quat[]): Quat[][] | null;
347
- cutfaces(faces: Quat[][]): Quat[][];
348
- faceside(face: Quat[]): number;
349
- sameplane(p: Quat): boolean;
350
- makecut(r: number): Quat;
351
- }
352
-
353
- interface TextureMapper {
354
- getuv(fn: number, threed: number[]): number[];
355
- }
356
- interface StickerDatSticker {
357
- coords: number[];
358
- color: string;
359
- orbit: string;
360
- ord: number;
361
- ori: number;
362
- face: number;
363
- isDup?: boolean;
364
- }
365
- interface StickerDatFace {
366
- coords: number[];
367
- name: string;
368
- }
369
- type StickerDatAxis = {
370
- coordinates: number[];
371
- quantumMove: Move;
372
- order: number;
373
- };
374
- interface StickerDat {
375
- stickers: StickerDatSticker[];
376
- faces: StickerDatFace[];
377
- axis: StickerDatAxis[];
378
- unswizzle(mv: Move): Move | null;
379
- notationMapper: NotationMapper;
380
- textureMapper: TextureMapper;
381
- }
382
- declare function getPG3DNamedPuzzles(): {
383
- [s: string]: PuzzleDescriptionString;
384
- };
385
- declare function getPuzzleDescriptionString(puzzleName: PuzzleName): PuzzleDescriptionString;
386
- declare const PUZZLE_BASE_SHAPES: readonly ["c", "t", "o", "d", "i"];
387
- type PuzzleBaseShape = (typeof PUZZLE_BASE_SHAPES)[number];
388
- declare const PUZZLE_CUT_TYPES: readonly ["f", "v", "e"];
389
- type PuzzleCutType = (typeof PUZZLE_CUT_TYPES)[number];
390
- type PuzzleCutDescription = {
391
- cutType: PuzzleCutType;
392
- distance: number;
393
- };
394
- type PuzzleDescription = {
395
- shape: PuzzleBaseShape;
396
- cuts: PuzzleCutDescription[];
397
- };
398
- declare function parsePuzzleDescription(s: PuzzleDescriptionString): PuzzleDescription | null;
399
- declare function getPuzzleGeometryByDesc(desc: string, options?: PuzzleGeometryOptions): PuzzleGeometry;
400
- declare function getPuzzleGeometryByName(puzzleName: PuzzleName, options?: PuzzleGeometryOptions): PuzzleGeometry;
401
- type MoveSetGeo = [string, string, string, string, number];
402
- /** @category PuzzleGeometry */
403
- declare class PuzzleGeometry {
404
- puzzleDescription: PuzzleDescription;
405
- private rotations;
406
- baseplanerot: Quat[];
407
- private baseplanes;
408
- private facenames;
409
- private faceplanes;
410
- private edgenames;
411
- private vertexnames;
412
- private geonormals;
413
- private moveplanes;
414
- private moveplanes2;
415
- moveplanesets: Quat[][];
416
- private moveplanenormals;
417
- movesetorders: number[];
418
- movesetgeos: MoveSetGeo[];
419
- private basefaces;
420
- private faces;
421
- private facecentermass;
422
- private baseFaceCount;
423
- stickersperface: number;
424
- shortedge: number;
425
- private markedface;
426
- cubies: number[][];
427
- private vertexdistance;
428
- private edgedistance;
429
- private facetocubie;
430
- private facetoord;
431
- private moverotations;
432
- private facelisthash;
433
- private cubiesetnames;
434
- private cubieords;
435
- private cubiesetnums;
436
- private cubieordnums;
437
- private orbitoris;
438
- private cubievaluemap;
439
- private cubiesetcubies;
440
- cmovesbyslice: number[][][];
441
- parsedmovelist: [
442
- string | undefined,
443
- number,
444
- number,
445
- number,
446
- boolean,
447
- number
448
- ][];
449
- private duplicatedFaces;
450
- private duplicatedCubies;
451
- private fixedCubie;
452
- private net;
453
- private colors;
454
- private swizzler;
455
- notationMapper: NotationMapper;
456
- private addNotationMapper;
457
- private setReidOrder;
458
- private options;
459
- constructor(puzzleDescription: PuzzleDescription, options: PuzzleGeometryOptions);
460
- create(puzzleDescription: PuzzleDescription): void;
461
- private keyface;
462
- private keyface2;
463
- private keyface3;
464
- private findface;
465
- private project2d;
466
- allstickers(): void;
467
- unswizzle(mv: Move): Move | null;
468
- private stringToBlockMove;
469
- parseMove(move: Move): [string | undefined, number, number, number, boolean, number];
470
- private parsemove;
471
- genperms(): void;
472
- private getboundarygeometry;
473
- private getmovesets;
474
- private graybyori;
475
- private skipbyori;
476
- private skipcubie;
477
- private header;
478
- writegap(): string;
479
- writemathematica(): string;
480
- writeksolve(name?: string): string;
481
- getKPuzzleDefinition(fortwisty?: boolean, includemoves?: boolean): KPuzzleDefinition;
482
- getMoveFromBits(moverange: number[], amount: number, inverted: boolean, axiscmoves: number[][], setmoves: number[] | undefined, movesetorder: number): PGTransform;
483
- private omitSet;
484
- private diffmvsets;
485
- getOrbitsDef(fortwisty: boolean, includemoves?: boolean): PGOrbitsDef;
486
- getScramble(n?: number): KTransformationData;
487
- getMovesAsPerms(): Perm[];
488
- showcanon(disp: (s: string) => void): void;
489
- getsolved(): Perm;
490
- private getOrientationRotation;
491
- private getInitial3DRotation;
492
- private generate2dmapping;
493
- generatesvg(w?: number, h?: number, trim?: number, threed?: boolean): string;
494
- get3d(options?: {
495
- stickerColors?: string[];
496
- darkIgnoredOrbits?: boolean;
497
- }): StickerDat;
498
- getGeoNormal(geoname: string): number[] | undefined;
499
- private getfaceindex;
500
- textForTwizzleExplorer(): string;
501
- writeSchreierSims(tw: (s: string) => void): void;
502
- }
503
- declare class PGNotation {
504
- private pg;
505
- private orbitNames;
506
- constructor(pg: PuzzleGeometry, od: PGOrbitsDef);
507
- lookupMove(move: Move): KTransformationData | null;
508
- remapKPuzzleDefinition(kpuzzleDefinition: KPuzzleDefinition): KPuzzleDefinition;
509
- }
510
-
511
- type KTransformationSource = Alg | Move | string | KTransformation;
512
- declare class KPuzzle {
513
- #private;
514
- readonly definition: KPuzzleDefinition;
515
- private experimentalPGNotation;
516
- constructor(definition: KPuzzleDefinition, options?: {
517
- experimentalPGNotation?: PGNotation;
518
- });
519
- lookupOrbitDefinition(orbitName: string): KPuzzleOrbitDefinition;
520
- name(): string;
521
- identityTransformation(): KTransformation;
522
- moveToTransformation(move: Move | string): KTransformation;
523
- algToTransformation(alg: Alg | string): KTransformation;
524
- /** @deprecated */
525
- toTransformation(source: KTransformationSource): KTransformation;
526
- defaultPattern(): KPattern;
527
- canConvertDefaultPatternToUniqueTransformation(): boolean;
528
- }
529
-
530
- declare class KPattern {
531
- readonly kpuzzle: KPuzzle;
532
- readonly patternData: KPatternData;
533
- constructor(kpuzzle: KPuzzle, patternData: KPatternData);
534
- toJSON(): any;
535
- static fromTransformation(transformation: KTransformation): KPattern;
536
- /** @deprecated */
537
- apply(source: KTransformationSource): KPattern;
538
- applyTransformation(transformation: KTransformation): KPattern;
539
- applyMove(move: Move | string): KPattern;
540
- applyAlg(alg: Alg | string): KPattern;
541
- isIdentical(other: KPattern): boolean;
542
- /** @deprecated */
543
- experimentalToTransformation(): KTransformation | null;
544
- experimentalIsSolved(options: {
545
- ignorePuzzleOrientation: boolean;
546
- ignoreCenterOrientation: boolean;
547
- }): boolean;
548
- }
549
-
550
- export { KPattern as K, Perm as P, Quat as Q, type StickerDat as S, getPuzzleGeometryByDesc as a, 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, KPuzzle as s, KTransformation as t, type PuzzleDescriptionString as u, type KPuzzleDefinition as v, type KPatternData as w, type KPatternOrbitData as x, type KTransformationData as y, type KTransformationOrbitData as z };