cubing 0.63.2 → 0.63.4

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 (111) hide show
  1. package/README.md +15 -1
  2. package/alg/index.d.ts +1 -1
  3. package/bluetooth/index.d.ts +1 -1
  4. package/dist/bin/chunks/{chunk-52ODPET6.js → chunk-E6RYEKYL.js} +2 -2
  5. package/dist/bin/order.js +8 -4
  6. package/dist/bin/order.js.map +2 -2
  7. package/dist/bin/puzzle-geometry-bin.js +8 -4
  8. package/dist/bin/puzzle-geometry-bin.js.map +2 -2
  9. package/dist/bin/scramble.js +8 -4
  10. package/dist/bin/scramble.js.map +2 -2
  11. package/dist/bin/svg.js +56 -0
  12. package/dist/bin/svg.js.map +7 -0
  13. package/dist/lib/cubing/alg/index.d.ts +2 -84
  14. package/dist/lib/cubing/alg/index.js +1 -1
  15. package/dist/lib/cubing/bluetooth/index.d.ts +147 -134
  16. package/dist/lib/cubing/bluetooth/index.js +29 -5
  17. package/dist/lib/cubing/bluetooth/index.js.map +2 -2
  18. package/dist/lib/cubing/chunks/{big-puzzle-orientation-ZVZQJEF5.js → big-puzzle-orientation-ADWIOX6S.js} +2 -2
  19. package/dist/lib/cubing/chunks/{chunk-M7YKTETT.js → chunk-53SI7XS4.js} +14 -4
  20. package/dist/lib/cubing/chunks/chunk-53SI7XS4.js.map +7 -0
  21. package/dist/lib/cubing/chunks/{chunk-RINY3U6G.js → chunk-5ONX3JVC.js} +7 -2
  22. package/dist/lib/cubing/chunks/{chunk-RINY3U6G.js.map → chunk-5ONX3JVC.js.map} +1 -1
  23. package/dist/lib/cubing/chunks/{chunk-ROB5TROI.js → chunk-7LXHWXCO.js} +2 -2
  24. package/dist/lib/cubing/chunks/{chunk-E3YLQC45.js → chunk-GHFBZYSV.js} +2 -2
  25. package/dist/lib/cubing/chunks/chunk-GHFBZYSV.js.map +7 -0
  26. package/dist/lib/cubing/chunks/{chunk-ZU7PSGX4.js → chunk-JCCXEYXU.js} +4 -3
  27. package/dist/lib/cubing/chunks/{chunk-ZU7PSGX4.js.map → chunk-JCCXEYXU.js.map} +1 -1
  28. package/dist/lib/cubing/chunks/{chunk-LWCBAAHO.js → chunk-LD4XJTCU.js} +28 -13
  29. package/dist/lib/cubing/chunks/chunk-LD4XJTCU.js.map +7 -0
  30. package/dist/lib/cubing/chunks/{chunk-O6HEZXGY.js → chunk-N5FJ5YIA.js} +4 -3
  31. package/dist/lib/cubing/chunks/{chunk-O6HEZXGY.js.map → chunk-N5FJ5YIA.js.map} +1 -1
  32. package/dist/lib/cubing/chunks/{chunk-NGW52SHR.js → chunk-S74APGTK.js} +3 -3
  33. package/dist/lib/cubing/chunks/{chunk-FLK6AZKB.js → chunk-VYAO5FCM.js} +7 -7
  34. package/dist/lib/cubing/chunks/{chunk-FLK6AZKB.js.map → chunk-VYAO5FCM.js.map} +2 -2
  35. package/dist/lib/cubing/chunks/{chunk-FUHYAW74.js → chunk-WBMKMQAL.js} +49 -63
  36. package/dist/lib/cubing/chunks/chunk-WBMKMQAL.js.map +7 -0
  37. package/dist/lib/cubing/chunks/{chunk-V27EM5TJ.js → chunk-XVZLWT3A.js} +44 -49
  38. package/dist/lib/cubing/chunks/chunk-XVZLWT3A.js.map +7 -0
  39. package/dist/lib/cubing/chunks/{inside-Q56GLXG4.js → inside-VUJSPBRA.js} +64 -28
  40. package/dist/lib/cubing/chunks/inside-VUJSPBRA.js.map +7 -0
  41. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js +132 -0
  42. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js.map +7 -0
  43. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-GB4WAJ7I.js → search-dynamic-sgs-side-events-LHAMZP5J.js} +6 -6
  44. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-2CECFBP3.js → search-dynamic-sgs-unofficial-GXKMVR4W.js} +6 -6
  45. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-E576AITS.js → search-dynamic-solve-4x4x4-N2X3RMYU.js} +7 -7
  46. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-UZMNOI6U.js → search-dynamic-solve-fto-I5ID5LXD.js} +2 -2
  47. package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-Y2D3C74Y.js +771 -0
  48. package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-Y2D3C74Y.js.map +7 -0
  49. package/dist/lib/cubing/chunks/search-worker-entry.js +7 -6
  50. package/dist/lib/cubing/chunks/search-worker-entry.js.map +2 -2
  51. package/dist/lib/cubing/chunks/{twips-YHXBF55O.js → twips-ZNMKGC5U.js} +4 -4
  52. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-AP2O4LGG.js +10 -0
  53. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-AP2O4LGG.js.map +7 -0
  54. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-IKE4BUQG.js → twisty-dynamic-3d-LSRGWTXG.js} +105 -46
  55. package/dist/lib/cubing/chunks/twisty-dynamic-3d-LSRGWTXG.js.map +7 -0
  56. package/dist/lib/cubing/index-BXHm_6gm.d.ts +2626 -0
  57. package/dist/lib/cubing/index-Cvk652Bd.d.ts +76 -0
  58. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -3
  59. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  60. package/dist/lib/cubing/notation/index.d.ts +18 -17
  61. package/dist/lib/cubing/notation/index.js +4 -4
  62. package/dist/lib/cubing/outside-CwNOEuJJ.d.ts +38 -0
  63. package/dist/lib/cubing/protocol/index.d.ts +14 -14
  64. package/dist/lib/cubing/protocol/index.js +4 -4
  65. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -8
  66. package/dist/lib/cubing/puzzle-geometry/index.js +33 -1
  67. package/dist/lib/cubing/puzzle-geometry/index.js.map +1 -1
  68. package/dist/lib/cubing/puzzles/index.d.ts +2 -45
  69. package/dist/lib/cubing/puzzles/index.js +4 -4
  70. package/dist/lib/cubing/scramble/index.d.ts +2 -4
  71. package/dist/lib/cubing/scramble/index.js +6 -6
  72. package/dist/lib/cubing/search/index.d.ts +4 -9
  73. package/dist/lib/cubing/search/index.js +6 -6
  74. package/dist/lib/cubing/stream/index.d.ts +2 -45
  75. package/dist/lib/cubing/stream/index.js +1 -1
  76. package/dist/lib/cubing/twisty/index.d.ts +2 -60
  77. package/dist/lib/cubing/twisty/index.js +101 -20
  78. package/dist/lib/cubing/twisty/index.js.map +3 -3
  79. package/kpuzzle/index.d.ts +1 -1
  80. package/notation/index.d.ts +1 -1
  81. package/package.json +19 -20
  82. package/protocol/index.d.ts +1 -1
  83. package/puzzle-geometry/index.d.ts +1 -1
  84. package/puzzles/index.d.ts +1 -1
  85. package/scramble/index.d.ts +1 -1
  86. package/search/index.d.ts +1 -1
  87. package/stream/index.d.ts +1 -1
  88. package/twisty/index.d.ts +1 -1
  89. package/dist/lib/cubing/PuzzleLoader-R-puDLmC.d.ts +0 -2352
  90. package/dist/lib/cubing/chunks/chunk-E3YLQC45.js.map +0 -7
  91. package/dist/lib/cubing/chunks/chunk-FUHYAW74.js.map +0 -7
  92. package/dist/lib/cubing/chunks/chunk-LWCBAAHO.js.map +0 -7
  93. package/dist/lib/cubing/chunks/chunk-M7YKTETT.js.map +0 -7
  94. package/dist/lib/cubing/chunks/chunk-V27EM5TJ.js.map +0 -7
  95. package/dist/lib/cubing/chunks/inside-Q56GLXG4.js.map +0 -7
  96. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js +0 -124
  97. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js.map +0 -7
  98. package/dist/lib/cubing/chunks/twips_wasm_bg-RWVQBVBA-5YCKA6O5.js +0 -10
  99. package/dist/lib/cubing/chunks/twips_wasm_bg-RWVQBVBA-5YCKA6O5.js.map +0 -7
  100. package/dist/lib/cubing/chunks/twisty-dynamic-3d-IKE4BUQG.js.map +0 -7
  101. package/dist/lib/cubing/events-IfSwQLYm.d.ts +0 -35
  102. package/dist/lib/cubing/index-btIxbuNp.d.ts +0 -33
  103. /package/dist/bin/chunks/{chunk-52ODPET6.js.map → chunk-E6RYEKYL.js.map} +0 -0
  104. /package/dist/lib/cubing/chunks/{big-puzzle-orientation-ZVZQJEF5.js.map → big-puzzle-orientation-ADWIOX6S.js.map} +0 -0
  105. /package/dist/lib/cubing/chunks/{chunk-ROB5TROI.js.map → chunk-7LXHWXCO.js.map} +0 -0
  106. /package/dist/lib/cubing/chunks/{chunk-NGW52SHR.js.map → chunk-S74APGTK.js.map} +0 -0
  107. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-GB4WAJ7I.js.map → search-dynamic-sgs-side-events-LHAMZP5J.js.map} +0 -0
  108. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-2CECFBP3.js.map → search-dynamic-sgs-unofficial-GXKMVR4W.js.map} +0 -0
  109. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-E576AITS.js.map → search-dynamic-solve-4x4x4-N2X3RMYU.js.map} +0 -0
  110. /package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-UZMNOI6U.js.map → search-dynamic-solve-fto-I5ID5LXD.js.map} +0 -0
  111. /package/dist/lib/cubing/chunks/{twips-YHXBF55O.js.map → twips-ZNMKGC5U.js.map} +0 -0
@@ -0,0 +1,2626 @@
1
+ import { Tagged } from "type-fest";
2
+ import { Object3D, PerspectiveCamera, Raycaster, Scene, Texture, WebGLRenderer } from "three/src/Three.js";
3
+
4
+ //#region src/cubing/alg/iteration.d.ts
5
+ declare enum IterationDirection {
6
+ Forwards = 1,
7
+ Backwards = -1
8
+ }
9
+ //#endregion
10
+ //#region src/cubing/alg/SerializationOptions.d.ts
11
+ type ExperimentalNotationType = "auto" | "LGN";
12
+ interface ExperimentalSerializationOptions {
13
+ notation?: ExperimentalNotationType;
14
+ }
15
+ //#endregion
16
+ //#region src/cubing/alg/common.d.ts
17
+ declare abstract class Comparable {
18
+ is(c: any): boolean;
19
+ as<T>(c: new (...args: any) => T): T | null;
20
+ abstract isIdentical(other: Comparable): boolean;
21
+ }
22
+ interface Repeatable extends Comparable {
23
+ experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
24
+ }
25
+ declare abstract class AlgCommon<T extends Alg | AlgNode> extends Comparable implements Repeatable {
26
+ constructor();
27
+ get log(): (message?: any) => void;
28
+ abstract toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
29
+ abstract invert(): T;
30
+ abstract experimentalExpand(iterDir: IterationDirection): Generator<AlgLeaf>;
31
+ }
32
+ //#endregion
33
+ //#region src/cubing/alg/alg-nodes/containers/Commutator.d.ts
34
+ /** @category Alg Nodes */
35
+ declare class Commutator extends AlgCommon<Commutator> {
36
+ #private;
37
+ constructor(aSource: FlexibleAlgSource, bSource: FlexibleAlgSource);
38
+ get A(): Alg;
39
+ get B(): Alg;
40
+ isIdentical(other: Comparable): boolean;
41
+ invert(): Commutator;
42
+ experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
43
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
44
+ }
45
+ //#endregion
46
+ //#region src/cubing/alg/alg-nodes/containers/Conjugate.d.ts
47
+ /** @category Alg Nodes */
48
+ declare class Conjugate extends AlgCommon<Conjugate> {
49
+ #private;
50
+ constructor(aSource: FlexibleAlgSource, bSource: FlexibleAlgSource);
51
+ get A(): Alg;
52
+ get B(): Alg;
53
+ isIdentical(other: Comparable): boolean;
54
+ invert(): Conjugate;
55
+ experimentalExpand(iterDir: IterationDirection, depth?: number): Generator<AlgLeaf>;
56
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
57
+ }
58
+ //#endregion
59
+ //#region src/cubing/alg/alg-nodes/leaves/Move.d.ts
60
+ interface QuantumMoveModifications {
61
+ outerLayer?: number;
62
+ innerLayer?: number;
63
+ family?: string;
64
+ }
65
+ declare class QuantumMove extends Comparable {
66
+ #private;
67
+ constructor(family: string, innerLayer?: number | null, outerLayer?: number | null);
68
+ static fromString(s: string): QuantumMove;
69
+ modified(modifications: QuantumMoveModifications): QuantumMove;
70
+ isIdentical(other: QuantumMove): boolean;
71
+ /** @deprecated */
72
+ get family(): string;
73
+ /** @deprecated */
74
+ get outerLayer(): number | null;
75
+ /** @deprecated */
76
+ get innerLayer(): number | null;
77
+ experimentalExpand(): Generator<AlgLeaf>;
78
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
79
+ }
80
+ interface MoveModifications {
81
+ outerLayer?: number;
82
+ innerLayer?: number;
83
+ family?: string;
84
+ amount?: number;
85
+ }
86
+ /** @category Alg Nodes */
87
+ declare class Move extends AlgCommon<Move> {
88
+ #private;
89
+ constructor(...args: [QuantumMove] | [QuantumMove, number] | [string] | [string, number]);
90
+ isIdentical(other: Comparable): boolean;
91
+ invert(): Move;
92
+ experimentalExpand(iterDir?: IterationDirection): Generator<AlgLeaf>;
93
+ get quantum(): QuantumMove;
94
+ modified(modifications: MoveModifications): Move;
95
+ static fromString(s: string): Move;
96
+ get amount(): number;
97
+ /** @deprecated */
98
+ get type(): string;
99
+ /** @deprecated */
100
+ get family(): string;
101
+ /** @deprecated */
102
+ get outerLayer(): number | undefined;
103
+ /** @deprecated */
104
+ get innerLayer(): number | undefined;
105
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
106
+ }
107
+ //#endregion
108
+ //#region src/cubing/alg/alg-nodes/leaves/Pause.d.ts
109
+ /** @category Alg Nodes */
110
+ declare class Pause extends AlgCommon<Pause> {
111
+ experimentalNISSGrouping?: Grouping;
112
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
113
+ isIdentical(other: Comparable): boolean;
114
+ invert(): Pause;
115
+ experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
116
+ }
117
+ //#endregion
118
+ //#region src/cubing/alg/alg-nodes/containers/Grouping.d.ts
119
+ interface GroupingModifications {
120
+ alg?: Alg;
121
+ amount?: number;
122
+ }
123
+ /** @category Alg Nodes */
124
+ declare class Grouping extends AlgCommon<Grouping> {
125
+ #private;
126
+ experimentalNISSPlaceholder?: Pause;
127
+ constructor(algSource: FlexibleAlgSource, amount?: number);
128
+ isIdentical(other: Comparable): boolean;
129
+ get alg(): Alg;
130
+ get amount(): number;
131
+ modified(modifications: GroupingModifications): Grouping;
132
+ /** @deprecated */
133
+ get experimentalRepetitionSuffix(): string;
134
+ invert(): Grouping;
135
+ experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
136
+ static fromString(): Grouping;
137
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
138
+ experimentalAsSquare1Tuple(): [moveU: Move, moveD: Move] | null;
139
+ }
140
+ //#endregion
141
+ //#region src/cubing/alg/alg-nodes/leaves/LineComment.d.ts
142
+ /** @category Alg Nodes */
143
+ declare class LineComment extends AlgCommon<LineComment> {
144
+ #private;
145
+ constructor(commentText: string);
146
+ get text(): string;
147
+ isIdentical(other: Comparable): boolean;
148
+ invert(): LineComment;
149
+ experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
150
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
151
+ }
152
+ //#endregion
153
+ //#region src/cubing/alg/alg-nodes/leaves/Newline.d.ts
154
+ /** @category Alg Nodes */
155
+ declare class Newline extends AlgCommon<Newline> {
156
+ toString(_experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
157
+ isIdentical(other: Comparable): boolean;
158
+ invert(): Newline;
159
+ experimentalExpand(_iterDir?: IterationDirection, _depth?: number): Generator<AlgLeaf>;
160
+ }
161
+ //#endregion
162
+ //#region src/cubing/alg/alg-nodes/AlgNode.d.ts
163
+ /** @category Alg Nodes */
164
+ type AlgLeaf = Move | LineComment | Newline | Pause;
165
+ /** @category Alg Nodes */
166
+ type AlgBranch = Grouping | Conjugate | Commutator;
167
+ /** @category Alg Nodes */
168
+ type AlgNode = AlgLeaf | AlgBranch;
169
+ //#endregion
170
+ //#region src/cubing/alg/alg-nodes/index.d.ts
171
+ /** @deprecated */
172
+ type Unit = AlgNode;
173
+ //#endregion
174
+ //#region src/cubing/alg/simplify/options.d.ts
175
+ declare const DEFAULT_DIRECTIONAL = "any-direction";
176
+ type QuantumDirectionalCancellation = typeof DEFAULT_DIRECTIONAL | "same-direction" | "none";
177
+ type ModWrap = "none" | "gravity" | "canonical-centered" | "canonical-positive" | "preserve-sign";
178
+ interface AppendCancelOptions {
179
+ directional?: QuantumDirectionalCancellation;
180
+ puzzleSpecificModWrap?: ModWrap;
181
+ }
182
+ interface AppendOptions {
183
+ cancel?: boolean | AppendCancelOptions;
184
+ puzzleLoader?: {
185
+ puzzleSpecificSimplifyOptions?: PuzzleSpecificSimplifyOptions;
186
+ };
187
+ puzzleSpecificSimplifyOptions?: PuzzleSpecificSimplifyOptions;
188
+ }
189
+ interface SimplifyOptions extends AppendOptions {
190
+ depth?: number | null;
191
+ }
192
+ interface PuzzleSpecificAxisSimplifyInfo {
193
+ areQuantumMovesSameAxis: (quantumMove1: QuantumMove, quantumMove2: QuantumMove) => boolean;
194
+ simplifySameAxisMoves: (moves: Move[], quantumMod: boolean) => Move[];
195
+ }
196
+ interface PuzzleSpecificSimplifyOptions {
197
+ quantumMoveOrder?: (quantumMove: QuantumMove) => number;
198
+ axis?: PuzzleSpecificAxisSimplifyInfo;
199
+ }
200
+ //#endregion
201
+ //#region src/cubing/alg/simplify/append.d.ts
202
+ declare function experimentalAppendMove(alg: Alg, addedMove: Move, options?: AppendOptions): Alg;
203
+ //#endregion
204
+ //#region src/cubing/alg/Alg.d.ts
205
+ type FlexibleAlgSource = string | Iterable<AlgNode> | Alg;
206
+ /**
207
+ * `Alg` is a class that encapsulates a structured alg. To create an `Alg` from a string, use:
208
+ *
209
+ * new Alg("R U R'"); // Convenient
210
+ * Alg.fromString(dynamicString); // Recommended when the string input is user-provided.
211
+ *
212
+ * Once you have an `Alg`, you can call methods to transform it:
213
+ *
214
+ * new Alg("[[R: U], R U R2']").expand().experimentalSimplify({cancel: true}).invert().log()
215
+ *
216
+ * To convert an `Alg` to a string, use .toString():
217
+ *
218
+ * new Alg("R U F").invert().toString();
219
+ *
220
+ * If you need to debug, you may also find it convenient to use .log():
221
+ *
222
+ * if (alg.isIdentical(alg.invert())) {
223
+ * alg.log("A self-inverse!")
224
+ * }
225
+ *
226
+ * For more information, see: {@link https://js.cubing.net/cubing/alg/}
227
+ *
228
+ * @category Alg
229
+ */
230
+ declare class Alg extends AlgCommon<Alg> {
231
+ #private;
232
+ constructor(alg?: FlexibleAlgSource);
233
+ /**
234
+ * Checks whether this Alg is structurally identical to another Alg. This
235
+ * essentially means that they are written identically apart from whitespace.
236
+ *
237
+ * const alg1 = new Alg("R U L'");
238
+ * const alg2 = new Alg("L U' R'").invert();
239
+ * // true
240
+ * alg1.isIdentical(alg2);
241
+ *
242
+ * // false
243
+ * new Alg("[R, U]").isIdentical(new Alg("R U R' U'"));
244
+ * // true
245
+ * new Alg("[R, U]").expand().isIdentical(new Alg("R U R' U'"));
246
+ *
247
+ * Note that .isIdentical() efficiently compares algorithms, but mainly exists
248
+ * to help optimize code when the structure of an algorithm hasn't changed.
249
+ * There are many ways to write the "same" alg on most puzzles, but is
250
+ * *highly* recommended to avoid expanding two Alg instances to compare them,
251
+ * since that can easily slow your program to a crawl if someone inputs an alg
252
+ * containing a large repetition. In general, you should use `cubing/kpuzzle`
253
+ * to compare if two algs have the same effect on a puzzle.
254
+ *
255
+ * Also note that parser annotations are not taken into account while comparing
256
+ * algs:
257
+ *
258
+ * const alg = new Alg([new Move("R"), new Move("U2")]);
259
+ * // true, even though one of the algs has parser annotations
260
+ * alg.isIdentical(new Alg("R U2"))
261
+ *
262
+ */
263
+ isIdentical(other: Comparable): boolean;
264
+ /**
265
+ * Returns the inverse of the given alg.
266
+ *
267
+ * Note that that this does not make any assumptions about what puzzle the alg
268
+ * is for. For example, U2 is its own inverse on a cube, but U2' has the same
269
+ * effect U3 (and not U2) on Megaminx:
270
+ *
271
+ * // Outputs: R U2' L'
272
+ * new Alg("L U2 R'").invert().log();
273
+ */
274
+ invert(): Alg;
275
+ /** @deprecated Use {@link Alg.expand} instead. */
276
+ experimentalExpand(iterDir?: IterationDirection, depth?: number): Generator<AlgLeaf>;
277
+ /**
278
+ * Expands all Grouping, Commutator, and Conjugate parts nested inside the
279
+ * alg.
280
+ *
281
+ * // F R U R' U' F'
282
+ * new Alg("[F: [R, U]]").expand().log();
283
+ *
284
+ * // F [R, U] F'
285
+ * new Alg("[F: [R, U]]").expand(({ depth: 1 }).log();
286
+ *
287
+ * Avoid calling this on a user-provided alg unless the user explicitly asks
288
+ * to see the expanded alg. Otherwise, it's easy to make your program freeze
289
+ * when someone passes in an alg like: (R U)10000000
290
+ *
291
+ * Generally, if you want to perform an operation on an entire alg, you'll
292
+ * want to use something based on the `Traversal` mechanism, like countMoves()
293
+ * from `cubing/notation`.
294
+ */
295
+ expand(options?: {
296
+ depth?: number;
297
+ }): Alg;
298
+ /** @deprecated */
299
+ experimentalLeafMoves(): Generator<Move>;
300
+ concat(input: FlexibleAlgSource): Alg;
301
+ /** @deprecated */
302
+ experimentalIsEmpty(): boolean;
303
+ static fromString(s: string): Alg;
304
+ /** @deprecated */
305
+ units(): Generator<AlgNode>;
306
+ childAlgNodes(): Generator<AlgNode>;
307
+ /** @deprecated */
308
+ experimentalNumUnits(): number;
309
+ experimentalNumChildAlgNodes(): number;
310
+ /** @deprecated */
311
+ get type(): string;
312
+ /**
313
+ * Converts the Alg to a string:
314
+ *
315
+ * const alg = new Alg([new Move("R"), new Move("U2"), new Move("L")])
316
+ * // R U2 L
317
+ * console.log(alg.toString())
318
+ */
319
+ toString(experimentalSerializationOptions?: ExperimentalSerializationOptions): string;
320
+ /**
321
+ * `experimentalSimplify` can perform several mostly-syntactic simplifications on an alg:
322
+ *
323
+ * // Logs: R' U3
324
+ * import { Alg } from "cubing/alg";
325
+ * new Alg("R R2' U U2").experimentalSimplify({ cancel: true }).log()
326
+ *
327
+ * You can pass in a `PuzzleLoader` (currently only for 3x3x3) for puzzle-specific simplifications:
328
+ *
329
+ * // Logs: R' U'
330
+ * import { Alg } from "cubing/alg";
331
+ * import { cube3x3x3 } from "cubing/puzzles";
332
+ * new Alg("R R2' U U2").experimentalSimplify({ cancel: true, puzzleLoader: cube3x3x3 }).log()
333
+ *
334
+ * You can also cancel only moves that are in the same direction:
335
+ *
336
+ * // Logs: R R2' U'
337
+ * import { Alg } from "cubing/alg";
338
+ * import { cube3x3x3 } from "cubing/puzzles";
339
+ * new Alg("R R2' U U2").experimentalSimplify({
340
+ * cancel: { directional: "same-direction" },
341
+ * puzzleLoader: cube3x3x3
342
+ * }).log()
343
+ *
344
+ * Additionally, you can specify how moves are "wrapped":
345
+ *
346
+ * import { Alg } from "cubing/alg";
347
+ * import { cube3x3x3 } from "cubing/puzzles";
348
+ *
349
+ * function example(puzzleSpecificModWrap) {
350
+ * alg.experimentalSimplify({
351
+ * cancel: { puzzleSpecificModWrap },
352
+ * puzzleLoader: cube3x3x3
353
+ * }).log()
354
+ * }
355
+ *
356
+ * const alg = new Alg("R7' . R6' . R5' . R6")
357
+ * example("none") // R7' . R6' . R5' . R6
358
+ * example("gravity") // R . R2' . R' . R2
359
+ * example("canonical-centered") // R . R2 . R' . R2
360
+ * example("canonical-positive") // R . R2 . R3 . R2
361
+ * example("preserve-sign") // R3' . R2' . R' . R2
362
+ *
363
+ * Same-axis and simultaneous move canonicalization is not implemented yet:
364
+ *
365
+ * // Logs: R L R
366
+ * import { Alg } from "cubing/alg";
367
+ * import { cube3x3x3 } from "cubing/puzzles";
368
+ * new Alg("R L R").experimentalSimplify({ cancel: true, puzzleLoader: cube3x3x3 }).log()
369
+ */
370
+ experimentalSimplify(options?: SimplifyOptions): Alg;
371
+ /** @deprecated See {@link experimentalSimplify} */
372
+ simplify(options?: SimplifyOptions): Alg;
373
+ }
374
+ //#endregion
375
+ //#region src/cubing/alg/AlgBuilder.d.ts
376
+ /** @category Alg */
377
+ declare class AlgBuilder {
378
+ #private;
379
+ push(u: AlgNode): void;
380
+ /** @deprecated */
381
+ experimentalPushAlg(alg: Alg): void;
382
+ experimentalNumAlgNodes(): number;
383
+ toAlg(): Alg;
384
+ reset(): void;
385
+ }
386
+ //#endregion
387
+ //#region src/cubing/alg/debug.d.ts
388
+ declare function setAlgDebug(options: {
389
+ caretNISSNotationEnabled?: boolean;
390
+ }): void;
391
+ //#endregion
392
+ //#region src/cubing/alg/example.d.ts
393
+ declare const Example: {
394
+ Sune: Alg;
395
+ AntiSune: Alg;
396
+ SuneCommutator: Alg;
397
+ Niklas: Alg;
398
+ EPerm: Alg;
399
+ FURURFCompact: Alg;
400
+ APermCompact: Alg;
401
+ FURURFMoves: Alg;
402
+ TPerm: Alg;
403
+ HeadlightSwaps: Alg;
404
+ TriplePause: Alg;
405
+ };
406
+ //#endregion
407
+ //#region src/cubing/alg/is.d.ts
408
+ declare function experimentalIs(v: any, c: typeof Alg | typeof Grouping | typeof LineComment | typeof Commutator | typeof Conjugate | typeof Move | typeof Newline | typeof Pause): boolean;
409
+ //#endregion
410
+ //#region src/cubing/puzzle-geometry/notation-mapping/NotationMapper.d.ts
411
+ interface NotationMapper {
412
+ notationToInternal(move: Move): Move | null;
413
+ notationToExternal(move: Move): Move | null;
414
+ }
415
+ //#endregion
416
+ //#region src/cubing/puzzle-geometry/Options.d.ts
417
+ type FaceName = string;
418
+ type OrientationDirection = [number, number, number];
419
+ type FaceBasedOrientationDescription = [[FaceName, OrientationDirection], [FaceName, OrientationDirection]];
420
+ type BaseFaceCount = 4 | 6 | 8 | 12 | 20;
421
+ type FaceBasedOrientationDescriptionLookup = Record<BaseFaceCount, FaceBasedOrientationDescription>;
422
+ declare class PuzzleGeometryFullOptions {
423
+ verbosity: number;
424
+ allMoves: boolean;
425
+ outerBlockMoves: boolean;
426
+ vertexMoves: boolean;
427
+ addRotations: boolean;
428
+ moveList: (string | Move)[] | null;
429
+ fixedOrientation: boolean;
430
+ fixedPieceType: null | "e" | "v" | "f";
431
+ orientCenters: boolean;
432
+ includeCornerOrbits: boolean;
433
+ includeCenterOrbits: boolean;
434
+ includeEdgeOrbits: boolean;
435
+ excludeOrbits: string[];
436
+ optimizeOrbits: boolean;
437
+ grayCorners: boolean;
438
+ grayCenters: boolean;
439
+ grayEdges: boolean;
440
+ puzzleOrientation: FaceBasedOrientationDescription | null;
441
+ puzzleOrientations: FaceBasedOrientationDescriptionLookup | null;
442
+ scrambleAmount: number;
443
+ constructor(options?: PuzzleGeometryOptions);
444
+ }
445
+ type PuzzleGeometryOptions = Partial<PuzzleGeometryFullOptions>;
446
+ //#endregion
447
+ //#region src/cubing/puzzle-geometry/Perm.d.ts
448
+ declare class Perm {
449
+ n: number;
450
+ p: number[];
451
+ constructor(a: number[]);
452
+ toString(): string;
453
+ mul(p2: Perm): Perm;
454
+ rmul(p2: Perm): Perm;
455
+ inv(): Perm;
456
+ compareTo(p2: Perm): number;
457
+ toGap(): string;
458
+ toMathematica(): string;
459
+ order(): number;
460
+ }
461
+ //#endregion
462
+ //#region src/cubing/puzzle-geometry/PermOriSet.d.ts
463
+ declare class PGOrbitDef {
464
+ size: number;
465
+ mod: number;
466
+ constructor(size: number, mod: number);
467
+ reassemblySize(): bigint;
468
+ }
469
+ declare class PGOrbitsDef {
470
+ orbitnames: string[];
471
+ private orbitdefs;
472
+ solved: VisibleState;
473
+ movenames: string[];
474
+ moveops: PGTransform[];
475
+ isRotation: boolean[];
476
+ forcenames: boolean[];
477
+ constructor(orbitnames: string[], orbitdefs: PGOrbitDef[], solved: VisibleState, movenames: string[], moveops: PGTransform[], isRotation: boolean[], forcenames: boolean[]);
478
+ toKTransformationData(t: PGTransform): KTransformationData;
479
+ toKPatternData(t: PGTransform): KPatternData;
480
+ static transformToKTransformationData(orbitnames: string[], t: PGTransform): KTransformationData;
481
+ private describeSet;
482
+ toKsolve(name: string, mapper?: NotationMapper): string[];
483
+ toKPuzzleDefinition(includemoves: boolean): KPuzzleDefinition;
484
+ optimize(): PGOrbitsDef;
485
+ scramble(n: number): void;
486
+ getScrambleTransformation(n: number): PGTransform;
487
+ reassemblySize(): bigint;
488
+ }
489
+ declare class PGOrbit {
490
+ perm: number[];
491
+ ori: number[];
492
+ orimod: number;
493
+ private static ktransformationCache;
494
+ static e(n: number, mod: number): PGOrbit;
495
+ constructor(perm: number[], ori: number[], orimod: number);
496
+ mul(b: PGOrbit): PGOrbit;
497
+ inv(): PGOrbit;
498
+ equal(b: PGOrbit): boolean;
499
+ killOri(): this;
500
+ toPerm(): Perm;
501
+ identicalPieces(): number[][];
502
+ order(): number;
503
+ isIdentity(): boolean;
504
+ private zeroOris;
505
+ remap(no: number[], on: number[], nv: number): PGOrbit;
506
+ remapVS(no: number[], nv: number): PGOrbit;
507
+ appendDefinition(result: string[], name: string, useVS: boolean, concise?: boolean): void;
508
+ toKTransformationOrbitData(): KTransformationOrbitData;
509
+ toKPatternOrbitData(): KPatternOrbitData;
510
+ }
511
+ declare class PGTransformBase {
512
+ orbits: PGOrbit[];
513
+ constructor(orbits: PGOrbit[]);
514
+ internalMul(b: PGTransformBase): PGOrbit[];
515
+ protected internalInv(): PGOrbit[];
516
+ equal(b: PGTransformBase): boolean;
517
+ protected killOri(): this;
518
+ toPerm(): Perm;
519
+ identicalPieces(): number[][];
520
+ order(): number;
521
+ }
522
+ declare class PGTransform extends PGTransformBase {
523
+ mul(b: PGTransform): PGTransform;
524
+ mulScalar(n: number): PGTransform;
525
+ inv(): PGTransform;
526
+ e(): PGTransform;
527
+ }
528
+ declare class VisibleState extends PGTransformBase {
529
+ mul(b: PGTransform): VisibleState;
530
+ }
531
+ //#endregion
532
+ //#region src/cubing/puzzle-geometry/pgPuzzles.d.ts
533
+ type PuzzleDescriptionString = string;
534
+ declare const pgPuzzle: {
535
+ [name: string]: PuzzleDescriptionString;
536
+ };
537
+ type PuzzleName = keyof typeof pgPuzzle;
538
+ //#endregion
539
+ //#region src/cubing/puzzle-geometry/Quat.d.ts
540
+ declare class Quat {
541
+ a: number;
542
+ b: number;
543
+ c: number;
544
+ d: number;
545
+ constructor(a: number, b: number, c: number, d: number);
546
+ mul(q: Quat): Quat;
547
+ toString(): string;
548
+ dist(q: Quat): number;
549
+ len(): number;
550
+ cross(q: Quat): Quat;
551
+ dot(q: Quat): number;
552
+ normalize(): Quat;
553
+ makenormal(): Quat;
554
+ normalizeplane(): Quat;
555
+ smul(m: number): Quat;
556
+ sum(q: Quat): Quat;
557
+ sub(q: Quat): Quat;
558
+ angle(): number;
559
+ invrot(): Quat;
560
+ det3x3(a00: number, a01: number, a02: number, a10: number, a11: number, a12: number, a20: number, a21: number, a22: number): number;
561
+ rotateplane(q: Quat): Quat;
562
+ orthogonal(): Quat;
563
+ pointrotation(b: Quat): Quat;
564
+ unproject(b: Quat): Quat;
565
+ rotatepoint(q: Quat): Quat;
566
+ rotateface(face: Quat[]): Quat[];
567
+ intersect3(p2: Quat, p3: Quat): Quat | false;
568
+ side(x: number): number;
569
+ /**
570
+ * Cuts a face by this plane, or returns null if there
571
+ * is no intersection.
572
+ * @param face The face to cut.
573
+ */
574
+ cutface(face: Quat[]): Quat[][] | null;
575
+ cutfaces(faces: Quat[][]): Quat[][];
576
+ faceside(face: Quat[]): number;
577
+ sameplane(p: Quat): boolean;
578
+ makecut(r: number): Quat;
579
+ }
580
+ //#endregion
581
+ //#region src/cubing/puzzle-geometry/PuzzleGeometry.d.ts
582
+ interface TextureMapper {
583
+ getuv(fn: number, threed: number[]): number[];
584
+ }
585
+ interface StickerDatSticker {
586
+ coords: number[];
587
+ color: string;
588
+ orbit: string;
589
+ ord: number;
590
+ ori: number;
591
+ face: number;
592
+ isDup?: boolean;
593
+ }
594
+ interface StickerDatFace {
595
+ coords: number[];
596
+ name: string;
597
+ }
598
+ type StickerDatAxis = {
599
+ coordinates: number[];
600
+ quantumMove: Move;
601
+ order: number;
602
+ };
603
+ interface StickerDat {
604
+ stickers: StickerDatSticker[];
605
+ faces: StickerDatFace[];
606
+ axis: StickerDatAxis[];
607
+ unswizzle(mv: Move): Move | null;
608
+ notationMapper: NotationMapper;
609
+ textureMapper: TextureMapper;
610
+ }
611
+ declare function getPG3DNamedPuzzles(): {
612
+ [s: string]: PuzzleDescriptionString;
613
+ };
614
+ declare function getPuzzleDescriptionString(puzzleName: PuzzleName): PuzzleDescriptionString;
615
+ declare const PUZZLE_BASE_SHAPES: readonly ["c", "t", "o", "d", "i"];
616
+ type PuzzleBaseShape = (typeof PUZZLE_BASE_SHAPES)[number];
617
+ declare const PUZZLE_CUT_TYPES: readonly ["f", "v", "e"];
618
+ type PuzzleCutType = (typeof PUZZLE_CUT_TYPES)[number];
619
+ type PuzzleCutDescription = {
620
+ cutType: PuzzleCutType;
621
+ distance: number;
622
+ };
623
+ type PuzzleDescription = {
624
+ shape: PuzzleBaseShape;
625
+ cuts: PuzzleCutDescription[];
626
+ };
627
+ declare function parsePuzzleDescription(s: PuzzleDescriptionString): PuzzleDescription | null;
628
+ declare function getPuzzleGeometryByDesc(desc: string, options?: PuzzleGeometryOptions): PuzzleGeometry;
629
+ declare function getPuzzleGeometryByName(puzzleName: PuzzleName, options?: PuzzleGeometryOptions): PuzzleGeometry;
630
+ type MoveSetGeo = [string, string, string, string, number];
631
+ /** @category PuzzleGeometry */
632
+ declare class PuzzleGeometry {
633
+ puzzleDescription: PuzzleDescription;
634
+ private rotations;
635
+ basePlaneRotations: Quat[];
636
+ private basePlanes;
637
+ private faceNames;
638
+ private facePlanes;
639
+ private edgeNames;
640
+ private vertexNames;
641
+ private geometryNormals;
642
+ private movePlanes;
643
+ private movePlanesFiltered;
644
+ movePlaneSets?: Quat[][];
645
+ private movePlaneNormals?;
646
+ movesetorders?: number[];
647
+ movesetgeos?: MoveSetGeo[];
648
+ private baseFaces;
649
+ private faces;
650
+ private faceCenterMass?;
651
+ private baseFaceCount;
652
+ stickersPerFace: number;
653
+ shortestEdge: number;
654
+ private markedFaceLookup;
655
+ cubies: number[][];
656
+ private vertexDistance;
657
+ private edgeDistance;
658
+ private faceToCubie?;
659
+ private faceToCubieOrd?;
660
+ private moveRotations?;
661
+ private faceListHash?;
662
+ private cubieSetNames?;
663
+ private cubieOrbitSizes?;
664
+ private cubieSetNums?;
665
+ private cubieOrdNums?;
666
+ private orbitOrientations?;
667
+ private cubieValueMap?;
668
+ private cubieSetCubies?;
669
+ cmovesBySlice: number[][][];
670
+ parsedMoveList?: [string | undefined, number, number, number, boolean, number][];
671
+ private duplicatedFaces;
672
+ private duplicatedCubies;
673
+ private fixedCubie;
674
+ private net;
675
+ private colors;
676
+ private swizzler;
677
+ notationMapper: NotationMapper;
678
+ private addNotationMapper;
679
+ private setReidOrSpeffzOrder;
680
+ private options;
681
+ constructor(puzzleDescription: PuzzleDescription, options: PuzzleGeometryOptions);
682
+ private keyface;
683
+ private keyface2;
684
+ private keyface3;
685
+ private findface;
686
+ private project2d;
687
+ private upperStringToBitSet;
688
+ allstickers(): void;
689
+ unswizzle(mv: Move): Move | null;
690
+ private stringToBlockMove;
691
+ parseMove(move: Move): [string | undefined, number, number, number, boolean, number];
692
+ private parsemove;
693
+ genperms(): void;
694
+ private getboundarygeometry;
695
+ private getmovesets;
696
+ private graybyori;
697
+ private skipbyori;
698
+ private skipcubie;
699
+ private header;
700
+ writegap(): string;
701
+ writemathematica(): string;
702
+ writeksolve(name?: string): string;
703
+ getKPuzzleDefinition(fortwisty?: boolean, includemoves?: boolean): KPuzzleDefinition;
704
+ getMoveFromBits(moverange: number[], amount: number, inverted: boolean, axiscmoves: number[][], setmoves: number[] | undefined, movesetorder: number): PGTransform;
705
+ private omitSet;
706
+ private diffmvsets;
707
+ getOrbitsDef(fortwisty: boolean, includemoves?: boolean): PGOrbitsDef;
708
+ getScramble(n?: number): KTransformationData;
709
+ getMovesAsPerms(): Perm[];
710
+ showcanon(disp: (s: string) => void): void;
711
+ getsolved(): Perm;
712
+ private getOrientationRotation;
713
+ private getInitial3DRotation;
714
+ private generate2dmapping;
715
+ generatesvg(w?: number, h?: number, trim?: number, threed?: boolean): string;
716
+ get3d(options?: {
717
+ stickerColors?: string[];
718
+ darkIgnoredOrbits?: boolean;
719
+ }): StickerDat;
720
+ getGeoNormal(geoname: string): number[] | undefined;
721
+ private getfaceindex;
722
+ textForTwizzleExplorer(): string;
723
+ writeSchreierSims(tw: (s: string) => void): void;
724
+ }
725
+ declare class PGNotation {
726
+ private pg;
727
+ private orbitNames;
728
+ constructor(pg: PuzzleGeometry, od: PGOrbitsDef);
729
+ lookupMove(move: Move): KTransformationData | null;
730
+ remapKPuzzleDefinition(kpuzzleDefinition: KPuzzleDefinition): KPuzzleDefinition;
731
+ }
732
+ //#endregion
733
+ //#region src/cubing/kpuzzle/KPuzzleDefinitionJSON.d.ts
734
+ type KPatternData = {
735
+ [orbitName: string]: KPatternOrbitData;
736
+ };
737
+ interface KPatternOrbitData {
738
+ pieces: number[];
739
+ orientation: number[];
740
+ /** Each piece may have an "orientation mod" that means "the orientation of
741
+ * this piece is known mod [value]".
742
+ *
743
+ * Suppose `.numOrientations` for this orbit has a value of N. This is
744
+ * considered the default value for the orientation mod of each piece in the
745
+ * orbit.
746
+ *
747
+ * - Each entry must be one of the following:
748
+ * - A proper divisor of N.
749
+ * - For example: if N is 12, then one of: 1, 2, 3, 6
750
+ * - The special value 0, indicating the default value (N).
751
+ * - This indicates that the orientation of a piece is fully known, i.e.
752
+ * that its "orientation mod" is the default value (N). However, such a
753
+ * value is recorded as 0 instead of N, in order to make it simpler to
754
+ * implement and debug pattern logic involving the default value.
755
+ * - If `.orientationMod[i]` is a proper divisor of N (i.e. not 0), then
756
+ * `.orientation[i]` must be less than `.orientationMod[i]`. That is, the
757
+ * orientation values must be individually "normalized" for each piece.
758
+ * - If the `orientationMod` field is not present, then every piece is
759
+ * considered to have the default value for its "orientation mod".
760
+ *
761
+ * For a "real-world" example of this concept, consider a traditional analog
762
+ * 12-hour clock dial, like one that might hang on the wall in a school room.
763
+ * Although there are 24 hours in a day, A.M. and P.M. times are not
764
+ * distinguishable on such a clock. Since 3:00 (AM) and 15:00 are not
765
+ * distinguishable, we would read either of those times as 3:00 with an
766
+ * implicit "orientation mod" of 12.
767
+ *
768
+ * For most puzzles, however, we care about "visual" indistinguishability
769
+ * rather than "temporal" indistinguishability. To adapt the previous example,
770
+ * imagine a 24-hour clock with 24 hour marks around the dial, but where the
771
+ * hour hand is symmetric and points equally at the current hour as well as
772
+ * its diametic opposite (like a compass needle but painted all in one color).
773
+ * This has the same set of "valid patterns" as a normal 12-hour clock. Such a
774
+ * clock also has an "orientation mod" of 12, but where the multiples of the
775
+ * modulus have been "unfolded" to show their full symmetry instead of being
776
+ * implicit.
777
+ *
778
+ * For a non-trivial puzzle example, consider Eitan's FisherTwist, a shape mod
779
+ * of the 3x3x3 cube:
780
+ * https://www.hknowstore.com/locale/en-US/item.aspx?corpname=nowstore&itemid=97eb4e89-367e-4d02-b7f0-34e5e7f3cd12
781
+ *
782
+ * - The 4 equatorial centers have C₂ symmetry — it is possible to rotate any
783
+ * of these centers 180° without a visible change to the state. This means
784
+ * that the possible orientations "loop" after incrementing the orientation
785
+ * by 2 (two turns clockwise), and therefore the "orientation mod" of a
786
+ * given piece is only 2.
787
+ * - If we apply a counter-clockwise rotation to one of these centers, the
788
+ * transformation applies an orientation of 3. But the net orientation is
789
+ * recorded as a normalized value of 1 instead, because 3 (mod 2) ≡ 1 (mod
790
+ * 2).
791
+ * - The 2 polar centers (U and D) have no distinguishable rotations. This
792
+ * means that their orientation is "known mod 1" — any transformation of one
793
+ * of these centers is indistinguishable from another transformation of the
794
+ * same center, and all of them are mapped to a value of 0 (the only
795
+ * possible value that exists mod 1).
796
+ *
797
+ * For 3x3x3:
798
+ *
799
+ * - When solving a normal 3x3x3, center orientations are conventionally
800
+ * ignored. This is similar to the polar center case for Eitan's
801
+ * FisherTwist, and the "orientation mod" of each piece is 1. This is also
802
+ * the core motivating use case.
803
+ * - For a supercube
804
+ * (https://experiments.cubing.net/cubing.js/twisty/supercube.html) or the
805
+ * general case of a "picture cube", all four center orientations are
806
+ * distinguishable for every center. This means all centers have the default
807
+ * orientation mod of 4. As documented above, this can be recorded with a
808
+ * `.orientationMod` of `[0, 0, 0, 0, 0, 0]`, or equivalently by omitting
809
+ * the `.orientationMod` field.
810
+ * - When modeling a real 3x3x3 speedcube, it is common to have a logo on a
811
+ * single sticker. If you want to model the exact visually distinguishable
812
+ * states of such a puzzles, it is possible to use an `.orientationMod` such
813
+ * as `[0, 1, 1, 1, 1, 1]`. For example, this can make it easy to find an
814
+ * alg for a given case "while keeping the logo the same", without placing
815
+ * more restrictions on other centers (which could make the search slower or
816
+ * produce longer solutions).
817
+ *
818
+ * For those with a mathematical background, you may notice a relationship to
819
+ * the concept of a coset (https://en.wikipedia.org/wiki/Coset). For example,
820
+ * consider the group of patterns of a `KPuzzle` (without indistinguishable
821
+ * pieces) generated by a set of transformations. We can assign each set of
822
+ * piece orbits an orientation mod value (which must be identical for all
823
+ * constituent pieces of the same orbit). Each such choice generates a set of
824
+ * valid `KPattern`s that forms a subgroup, and each set of valid `.orientation`
825
+ * values defines one coset of this set. However, note that the set of valid
826
+ * `KPattern`s does *not* form a group when there are any pieces with different
827
+ * `.orientationMod` values that share an orbit.
828
+ *
829
+ * --------
830
+ *
831
+ * Note that the concept of "orientation mod" exclusively applies to `KPattern`,
832
+ * not `KTransformation`. If we tried to apply the orientation mod
833
+ * calculations to the *transformations* of Eitan's FisherTwist, then `SWAP =
834
+ * [U, M' E2 M]` would be indistinguishable from the identity. This would mean
835
+ * that if we calculated `SWAP` and then used this calculation for `S SWAP
836
+ * S'`, then we would conclude that it has no net effect. However, `S SWAP S'`
837
+ * does *not* have the same effect as doing nothing — it visibly rotates the L
838
+ * and R centers! (In mathematical terms: the set of `KTransformation`s would
839
+ * not form a valid set of semigroup actions, due to broken associativity.)
840
+ *
841
+ * Although there are times that we could theoretically save some time/space
842
+ * by ignoring some information when it's not needed for working with certain
843
+ * `KTransformation`s (e.g. ignoring all center orientations for 3x3x3), it is
844
+ * more practical for each `KTransformation` to always track the full range
845
+ * for each piece's `.orientation`. For example:
846
+ *
847
+ * - This is simpler, both conceptually and in code.
848
+ * - This allows changing the set of moves for a puzzle, without recalculating
849
+ * cached transformations or certain lookup tables (useful for alg
850
+ * searches).
851
+ * - This allows swapping out a normal 3x3x3 in a `<twisty-player>` for a
852
+ * picture cube, without re-calculating the center orientations of the
853
+ * current alg.
854
+ *
855
+ * These use cases may not be strictly "necessary", but the opposite behaviour
856
+ * might be surprising or frustrating if someone does not expect it. So we
857
+ * implement it this way.
858
+ *
859
+ * Informally, the `KTransformation` has the full responsibility for tracking
860
+ * "what really happens" — even if the effect is invisible in some cases,
861
+ * while the `KPattern` tracks both what "is" and what "isn't" known.
862
+ **/
863
+ orientationMod?: number[];
864
+ }
865
+ type KTransformationData = {
866
+ [orbitName: string]: KTransformationOrbitData;
867
+ };
868
+ interface KTransformationOrbitData {
869
+ permutation: number[];
870
+ orientationDelta: number[];
871
+ }
872
+ interface KPuzzleOrbitDefinition {
873
+ orbitName: string;
874
+ numPieces: number;
875
+ numOrientations: number;
876
+ }
877
+ interface KPuzzleDefinitionJSON {
878
+ name: string;
879
+ orbits: KPuzzleOrbitDefinition[];
880
+ defaultPattern: KPatternData;
881
+ moves: {
882
+ [orbitName: string]: KTransformationData;
883
+ };
884
+ derivedMoves?: {
885
+ [derivedMove: string]: string;
886
+ };
887
+ }
888
+ //#endregion
889
+ //#region src/cubing/kpuzzle/KPuzzleDefinition.d.ts
890
+ interface KPuzzleDefinition extends KPuzzleDefinitionJSON {
891
+ experimentalIsPatternSolved?: (kpattern: KPattern, options: {
892
+ ignorePuzzleOrientation: boolean;
893
+ ignoreCenterOrientation: boolean;
894
+ }) => boolean;
895
+ }
896
+ //#endregion
897
+ //#region src/cubing/kpuzzle/KTransformation.d.ts
898
+ declare class KTransformation {
899
+ #private;
900
+ readonly kpuzzle: KPuzzle;
901
+ readonly transformationData: KTransformationData;
902
+ constructor(kpuzzle: KPuzzle, transformationData: KTransformationData);
903
+ toJSON(): any;
904
+ invert(): KTransformation;
905
+ isIdentityTransformation(): boolean;
906
+ /** @deprecated */
907
+ static experimentalConstructIdentity(kpuzzle: KPuzzle): KTransformation;
908
+ isIdentical(t2: KTransformation): boolean;
909
+ /** @deprecated */
910
+ apply(source: KTransformationSource): KTransformation;
911
+ applyTransformation(t2: KTransformation): KTransformation;
912
+ applyMove(move: Move | string): KTransformation;
913
+ applyAlg(alg: Alg | string): KTransformation;
914
+ toKPattern(): KPattern;
915
+ repetitionOrder(): number;
916
+ selfMultiply(amount: number): KTransformation;
917
+ }
918
+ //#endregion
919
+ //#region src/cubing/kpuzzle/KPuzzle.d.ts
920
+ type KTransformationSource = Alg | Move | string | KTransformation;
921
+ declare class KPuzzle {
922
+ #private;
923
+ readonly definition: KPuzzleDefinition;
924
+ private experimentalPGNotation;
925
+ constructor(definition: KPuzzleDefinition, options?: {
926
+ experimentalPGNotation?: PGNotation;
927
+ });
928
+ lookupOrbitDefinition(orbitName: string): KPuzzleOrbitDefinition;
929
+ name(): string;
930
+ identityTransformation(): KTransformation;
931
+ moveToTransformation(move: Move | string): KTransformation;
932
+ algToTransformation(alg: Alg | string): KTransformation;
933
+ /** @deprecated */
934
+ toTransformation(source: KTransformationSource): KTransformation;
935
+ defaultPattern(): KPattern;
936
+ canConvertDefaultPatternToUniqueTransformation(): boolean;
937
+ }
938
+ //#endregion
939
+ //#region src/cubing/kpuzzle/KPattern.d.ts
940
+ declare class KPattern {
941
+ readonly kpuzzle: KPuzzle;
942
+ readonly patternData: KPatternData;
943
+ constructor(kpuzzle: KPuzzle, patternData: KPatternData);
944
+ toJSON(): any;
945
+ static fromTransformation(transformation: KTransformation): KPattern;
946
+ /** @deprecated */
947
+ apply(source: KTransformationSource): KPattern;
948
+ applyTransformation(transformation: KTransformation): KPattern;
949
+ applyMove(move: Move | string): KPattern;
950
+ applyAlg(alg: Alg | string): KPattern;
951
+ isIdentical(other: KPattern): boolean;
952
+ /** @deprecated */
953
+ experimentalToTransformation(): KTransformation | null;
954
+ experimentalIsSolved(options: {
955
+ ignorePuzzleOrientation: boolean;
956
+ ignoreCenterOrientation: boolean;
957
+ }): boolean;
958
+ }
959
+ //#endregion
960
+ //#region src/cubing/puzzle-geometry/SchreierSims.d.ts
961
+ declare function schreierSims(g: Perm[], disp: (s: string) => void): bigint;
962
+ //#endregion
963
+ //#region src/cubing/twisty/controllers/AnimationTypes.d.ts
964
+ type MillisecondTimestamp = Tagged<DOMHighResTimeStamp, "MillisecondTimestamp">;
965
+ type MillisecondDuration = Tagged<number, "MillisecondDuration">;
966
+ declare enum Direction {
967
+ Forwards = 1,
968
+ Paused = 0,
969
+ Backwards = -1
970
+ }
971
+ interface MoveInProgress {
972
+ move: Move;
973
+ direction: Direction;
974
+ fraction: number;
975
+ }
976
+ type PuzzlePosition = {
977
+ pattern: KPattern;
978
+ movesInProgress: MoveInProgress[];
979
+ };
980
+ declare enum BoundaryType {
981
+ Move = "move",
982
+ EntireTimeline = "entire-timeline"
983
+ }
984
+ interface TimeRange {
985
+ start: MillisecondTimestamp;
986
+ end: MillisecondTimestamp;
987
+ }
988
+ //#endregion
989
+ //#region src/cubing/twisty/model/UserVisibleErrorTracker.d.ts
990
+ interface UserVisibleError {
991
+ errors: string[];
992
+ }
993
+ declare class UserVisibleErrorTracker extends SimpleTwistyPropSource<UserVisibleError> {
994
+ getDefaultValue(): UserVisibleError;
995
+ reset(): void;
996
+ protected canReuseValue(_v1: UserVisibleError, _v2: UserVisibleError): boolean;
997
+ }
998
+ //#endregion
999
+ //#region src/cubing/twisty/model/props/TwistyProp.d.ts
1000
+ type InputRecord = Record<string, any>;
1001
+ type InputProps<T extends InputRecord> = { [s in keyof T]: TwistyPropParent<T[s]> };
1002
+ type Generation = Tagged<number, "Generation">;
1003
+ interface SourceEventDetail<OutputType> {
1004
+ sourceProp: TwistyPropSource<OutputType, any>;
1005
+ value: Promise<OutputType>;
1006
+ generation: Generation;
1007
+ }
1008
+ type SourceEvent<T> = CustomEvent<SourceEventDetail<T>>;
1009
+ type PromiseOrValue<T> = T | Promise<T>;
1010
+ declare abstract class TwistyPropParent<T> {
1011
+ #private;
1012
+ abstract get(): Promise<T>;
1013
+ canReuse(v1: T, v2: T): boolean;
1014
+ protected canReuseValue(_v1: T, _v2: T): boolean;
1015
+ debugGetChildren(): TwistyPropDerived<any, any>[];
1016
+ protected addChild(child: TwistyPropDerived<any, any>): void;
1017
+ protected removeChild(child: TwistyPropDerived<any, any>): void;
1018
+ protected lastSourceGeneration: number;
1019
+ protected markStale(sourceEvent: SourceEvent<any>): void;
1020
+ /** @deprecated */
1021
+ addRawListener(listener: () => void, options?: {
1022
+ initial: boolean;
1023
+ }): void;
1024
+ /** @deprecated */
1025
+ removeRawListener(listener: () => void): void;
1026
+ addFreshListener(listener: (value: T) => void): void;
1027
+ removeFreshListener(listener: (value: T) => void): void;
1028
+ }
1029
+ declare abstract class TwistyPropSource<OutputType, InputType = OutputType> extends TwistyPropParent<OutputType> {
1030
+ #private;
1031
+ abstract getDefaultValue(): PromiseOrValue<OutputType>;
1032
+ constructor(initialValue?: PromiseOrValue<InputType>);
1033
+ set(input: PromiseOrValue<InputType>): void;
1034
+ get(): Promise<OutputType>;
1035
+ protected deriveFromPromiseOrValue(input: PromiseOrValue<InputType>, oldValuePromise: Promise<OutputType>): Promise<OutputType>;
1036
+ protected abstract derive(input: InputType, oldValuePromise: Promise<OutputType>): PromiseOrValue<OutputType>;
1037
+ }
1038
+ declare abstract class SimpleTwistyPropSource<SimpleType> extends TwistyPropSource<SimpleType> {
1039
+ protected derive(input: SimpleType): PromiseOrValue<SimpleType>;
1040
+ }
1041
+ declare const NO_VALUE: unique symbol;
1042
+ type NoValueType = typeof NO_VALUE;
1043
+ declare abstract class TwistyPropDerived<InputTypes extends InputRecord, OutputType> extends TwistyPropParent<OutputType> {
1044
+ #private;
1045
+ protected userVisibleErrorTracker?: UserVisibleErrorTracker | undefined;
1046
+ constructor(parents: InputProps<InputTypes>, userVisibleErrorTracker?: UserVisibleErrorTracker | undefined);
1047
+ get(): Promise<OutputType>;
1048
+ protected abstract derive(input: InputTypes): PromiseOrValue<OutputType>;
1049
+ }
1050
+ //#endregion
1051
+ //#region src/cubing/twisty/model/props/puzzle/state/AnimationTimelineLeavesRequestProp.d.ts
1052
+ interface AnimationTimelineLeaf {
1053
+ animLeaf: AlgLeaf;
1054
+ start: MillisecondTimestamp;
1055
+ end: MillisecondTimestamp;
1056
+ }
1057
+ type AnimationTimelineLeaves = AnimationTimelineLeaf[];
1058
+ declare class AnimationTimelineLeavesRequestProp extends SimpleTwistyPropSource<AnimationTimelineLeaf[] | null> {
1059
+ getDefaultValue(): AnimationTimelineLeaf[] | null;
1060
+ }
1061
+ //#endregion
1062
+ //#region src/cubing/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts
1063
+ type AnimatedLeafAlgNode = Move | Pause;
1064
+ //#endregion
1065
+ //#region src/cubing/twisty/controllers/indexer/AlgIndexer.d.ts
1066
+ interface CurrentMove {
1067
+ move: Move;
1068
+ direction: Direction;
1069
+ fraction: number;
1070
+ startTimestamp: MillisecondTimestamp;
1071
+ endTimestamp: MillisecondTimestamp;
1072
+ }
1073
+ interface CurrentMoveInfo {
1074
+ patternIndex: number;
1075
+ currentMoves: CurrentMove[];
1076
+ movesFinishing: CurrentMove[];
1077
+ movesFinished: CurrentMove[];
1078
+ movesStarting: CurrentMove[];
1079
+ latestStart: number;
1080
+ earliestEnd: number;
1081
+ }
1082
+ type LeafIndex = Tagged<number, "LeafIndex">;
1083
+ type LeafCount = Tagged<number, "LeafCount">;
1084
+ interface AlgIndexer {
1085
+ getAnimLeaf(index: LeafIndex): AnimatedLeafAlgNode | null;
1086
+ indexToMoveStartTimestamp(index: LeafIndex): MillisecondTimestamp;
1087
+ patternAtIndex(index: LeafIndex, startPattern?: KPattern): KPattern;
1088
+ transformationAtIndex(index: LeafIndex): KTransformation;
1089
+ numAnimatedLeaves(): LeafCount;
1090
+ timestampToIndex(timestamp: MillisecondTimestamp): LeafIndex;
1091
+ algDuration(): MillisecondDuration;
1092
+ moveDuration(index: LeafIndex): MillisecondDuration;
1093
+ timestampToPosition?: (timestamp: MillisecondTimestamp, startPattern?: KPattern) => PuzzlePosition;
1094
+ currentMoveInfo?: (timestamp: MillisecondTimestamp) => CurrentMoveInfo;
1095
+ }
1096
+ //#endregion
1097
+ //#region src/cubing/twisty/controllers/indexer/SimpleAlgIndexer.d.ts
1098
+ declare class SimpleAlgIndexer implements AlgIndexer {
1099
+ private kpuzzle;
1100
+ private moves;
1101
+ private durationFn;
1102
+ constructor(kpuzzle: KPuzzle, alg: Alg);
1103
+ getAnimLeaf(index: number): Move;
1104
+ indexToMoveStartTimestamp(index: number): MillisecondTimestamp;
1105
+ timestampToIndex(timestamp: MillisecondTimestamp): LeafIndex;
1106
+ patternAtIndex(index: number): KPattern;
1107
+ transformationAtIndex(index: number): KTransformation;
1108
+ algDuration(): MillisecondDuration;
1109
+ numAnimatedLeaves(): LeafCount;
1110
+ moveDuration(index: LeafIndex): MillisecondDuration;
1111
+ }
1112
+ //#endregion
1113
+ //#region src/cubing/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts
1114
+ declare class TreeAlgIndexer implements AlgIndexer {
1115
+ private kpuzzle;
1116
+ private decoration;
1117
+ private walker;
1118
+ constructor(kpuzzle: KPuzzle, alg: Alg);
1119
+ getAnimLeaf(index: LeafIndex): Move | null;
1120
+ indexToMoveStartTimestamp(index: LeafIndex): MillisecondTimestamp;
1121
+ indexToMovesInProgress(index: LeafIndex): MillisecondTimestamp;
1122
+ patternAtIndex(index: LeafIndex, startPattern?: KPattern): KPattern;
1123
+ transformationAtIndex(index: LeafIndex): KTransformation;
1124
+ numAnimatedLeaves(): LeafCount;
1125
+ timestampToIndex(timestamp: MillisecondTimestamp): LeafIndex;
1126
+ algDuration(): MillisecondDuration;
1127
+ moveDuration(index: LeafIndex): MillisecondDuration;
1128
+ }
1129
+ //#endregion
1130
+ //#region src/cubing/twisty/debug.d.ts
1131
+ declare const twistyDebugGlobals: {
1132
+ shareAllNewRenderers: "auto" | "always" | "never";
1133
+ showRenderStats: boolean;
1134
+ };
1135
+ declare function setTwistyDebug(options: Partial<typeof twistyDebugGlobals>): void;
1136
+ //#endregion
1137
+ //#region src/cubing/puzzles/stickerings/mask.d.ts
1138
+ type FaceletMeshStickeringMask = "regular" | "dim" | "oriented" | "experimentalOriented2" | "ignored" | "invisible" | "mystery";
1139
+ type FaceletStickeringMask = {
1140
+ mask: FaceletMeshStickeringMask;
1141
+ hintMask?: FaceletMeshStickeringMask;
1142
+ };
1143
+ type PieceStickeringMask = {
1144
+ facelets: (FaceletMeshStickeringMask | FaceletStickeringMask | null)[];
1145
+ };
1146
+ type OrbitStickeringMask = {
1147
+ pieces: (PieceStickeringMask | null)[];
1148
+ };
1149
+ type StickeringMask = {
1150
+ specialBehaviour?: "picture";
1151
+ name?: string;
1152
+ orbits: Record<string, OrbitStickeringMask>;
1153
+ };
1154
+ //#endregion
1155
+ //#region src/cubing/puzzles/stickerings/puzzle-stickerings.d.ts
1156
+ declare const experimentalStickerings: Record<string, {
1157
+ groups?: Partial<Record<PuzzleID, string>>;
1158
+ }>;
1159
+ //#endregion
1160
+ //#region src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts
1161
+ declare const puzzleIDs: {
1162
+ "3x3x3": boolean;
1163
+ custom: boolean;
1164
+ "2x2x2": boolean;
1165
+ "4x4x4": boolean;
1166
+ "5x5x5": boolean;
1167
+ "6x6x6": boolean;
1168
+ "7x7x7": boolean;
1169
+ "40x40x40": boolean;
1170
+ megaminx: boolean;
1171
+ pyraminx: boolean;
1172
+ square1: boolean;
1173
+ clock: boolean;
1174
+ skewb: boolean;
1175
+ fto: boolean;
1176
+ gigaminx: boolean;
1177
+ master_tetraminx: boolean;
1178
+ kilominx: boolean;
1179
+ redi_cube: boolean;
1180
+ baby_fto: boolean;
1181
+ melindas2x2x2x2: boolean;
1182
+ tri_quad: boolean;
1183
+ loopover: boolean;
1184
+ };
1185
+ type PuzzleID = keyof typeof puzzleIDs;
1186
+ declare class PuzzleIDRequestProp extends SimpleTwistyPropSource<PuzzleID | NoValueType> {
1187
+ getDefaultValue(): PuzzleID | NoValueType;
1188
+ }
1189
+ //#endregion
1190
+ //#region src/cubing/twisty/model/props/puzzle/display/StickeringRequestProp.d.ts
1191
+ type ExperimentalStickering = keyof typeof experimentalStickerings;
1192
+ declare class StickeringRequestProp extends SimpleTwistyPropSource<ExperimentalStickering | null> {
1193
+ getDefaultValue(): ExperimentalStickering | null;
1194
+ }
1195
+ //#endregion
1196
+ //#region src/cubing/twisty/model/props/viewer/BackViewProp.d.ts
1197
+ declare const backViewLayouts: {
1198
+ none: boolean;
1199
+ "side-by-side": boolean;
1200
+ "top-right": boolean;
1201
+ };
1202
+ type BackViewLayout = keyof typeof backViewLayouts;
1203
+ type BackViewLayoutWithAuto = BackViewLayout | "auto";
1204
+ declare class BackViewProp extends SimpleTwistyPropSource<BackViewLayoutWithAuto> {
1205
+ getDefaultValue(): BackViewLayoutWithAuto;
1206
+ }
1207
+ //#endregion
1208
+ //#region src/cubing/twisty/model/props/viewer/VisualizationProp.d.ts
1209
+ declare const visualizationFormats: {
1210
+ readonly "3D": true;
1211
+ readonly "2D": true;
1212
+ readonly "experimental-2D-LL": true;
1213
+ readonly "experimental-2D-LL-face": true;
1214
+ readonly PG3D: true;
1215
+ };
1216
+ type VisualizationFormat = keyof typeof visualizationFormats;
1217
+ type VisualizationFormatWithAuto = VisualizationFormat | "auto";
1218
+ declare class VisualizationFormatProp extends SimpleTwistyPropSource<VisualizationFormatWithAuto> {
1219
+ getDefaultValue(): VisualizationFormatWithAuto;
1220
+ }
1221
+ //#endregion
1222
+ //#region src/cubing/twisty/views/2D/TwistyAnimatedSVG.d.ts
1223
+ declare class TwistyAnimatedSVG {
1224
+ kpuzzle: KPuzzle;
1225
+ private showUnknownOrientations;
1226
+ wrapperElement: HTMLElement;
1227
+ svgElement: SVGElement;
1228
+ gradientDefs: SVGDefsElement;
1229
+ private originalColors;
1230
+ private gradients;
1231
+ private svgID;
1232
+ constructor(kpuzzle: KPuzzle, svgSource: string, experimentalStickeringMask?: StickeringMask, showUnknownOrientations?: boolean);
1233
+ drawPattern(pattern: KPattern, nextPattern?: KPattern, fraction?: number): void;
1234
+ draw(pattern: KPattern, nextPattern?: KPattern, fraction?: number): void;
1235
+ private newGradient;
1236
+ private elementID;
1237
+ private elementByID;
1238
+ }
1239
+ //#endregion
1240
+ //#region src/cubing/twisty/views/node-custom-element-shims.d.ts
1241
+ declare let HTMLElementShim: typeof HTMLElement;
1242
+ //#endregion
1243
+ //#region src/cubing/twisty/views/ManagedCustomElement.d.ts
1244
+ declare class ManagedCustomElement extends HTMLElementShim {
1245
+ readonly shadow: ShadowRoot;
1246
+ readonly contentWrapper: HTMLDivElement;
1247
+ constructor(options?: {
1248
+ mode?: "open" | "closed";
1249
+ });
1250
+ protected addCSS(cssSource: CSSStyleSheet): void;
1251
+ protected removeCSS(cssSource: CSSStyleSheet): void;
1252
+ addElement<T extends Node>(element: T): T;
1253
+ prependElement<T extends Node>(element: T): void;
1254
+ removeElement<T extends Node>(element: T): T;
1255
+ }
1256
+ //#endregion
1257
+ //#region src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts
1258
+ interface CatchUpMove {
1259
+ move: Move | null;
1260
+ amount: number;
1261
+ }
1262
+ declare class CatchUpMoveProp extends SimpleTwistyPropSource<CatchUpMove> {
1263
+ getDefaultValue(): CatchUpMove;
1264
+ protected canReuseValue(v1: CatchUpMove, v2: CatchUpMove): boolean;
1265
+ }
1266
+ //#endregion
1267
+ //#region src/cubing/twisty/model/props/timeline/PlayingInfoProp.d.ts
1268
+ type SimpleDirection = Direction.Forwards | Direction.Backwards;
1269
+ interface PlayingInfo {
1270
+ playing: boolean;
1271
+ direction: SimpleDirection;
1272
+ untilBoundary: BoundaryType;
1273
+ loop: boolean;
1274
+ }
1275
+ declare class PlayingInfoProp extends TwistyPropSource<PlayingInfo, Partial<PlayingInfo>> {
1276
+ getDefaultValue(): Promise<PlayingInfo>;
1277
+ protected derive(newInfo: Partial<PlayingInfo>, oldValuePromise: Promise<PlayingInfo>): Promise<PlayingInfo>;
1278
+ protected canReuseValue(v1: PlayingInfo, v2: PlayingInfo): boolean;
1279
+ }
1280
+ //#endregion
1281
+ //#region src/cubing/twisty/model/props/general/ArbitraryStringProp.d.ts
1282
+ declare class ArbitraryStringProp extends SimpleTwistyPropSource<string | null> {
1283
+ getDefaultValue(): string | null;
1284
+ }
1285
+ //#endregion
1286
+ //#region src/cubing/twisty/model/props/general/URLProp.d.ts
1287
+ declare class URLProp extends TwistyPropSource<URL | null, URL | string | null> {
1288
+ getDefaultValue(): URL | null;
1289
+ derive(input: URL | string | null): URL | null;
1290
+ }
1291
+ //#endregion
1292
+ //#region src/cubing/twisty/model/props/puzzle/state/AlgProp.d.ts
1293
+ declare class AlgIssues {
1294
+ readonly warnings: readonly string[];
1295
+ readonly errors: readonly string[];
1296
+ constructor(issues?: {
1297
+ warnings?: string[];
1298
+ errors?: string[];
1299
+ });
1300
+ add(issues?: {
1301
+ warnings?: string[];
1302
+ errors?: string[];
1303
+ }): AlgIssues;
1304
+ /** @deprecated */
1305
+ log(): void;
1306
+ }
1307
+ interface AlgWithIssues {
1308
+ alg: Alg;
1309
+ issues: AlgIssues;
1310
+ }
1311
+ declare class AlgProp extends TwistyPropSource<AlgWithIssues, Alg | string> {
1312
+ getDefaultValue(): AlgWithIssues;
1313
+ protected canReuseValue(v1: AlgWithIssues, v2: AlgWithIssues): boolean;
1314
+ protected derive(newAlg: Alg | string): Promise<AlgWithIssues>;
1315
+ }
1316
+ //#endregion
1317
+ //#region src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts
1318
+ type AlgTransformationPropInputs = {
1319
+ setupAlg: AlgWithIssues;
1320
+ kpuzzle: KPuzzle;
1321
+ };
1322
+ declare class AlgTransformationProp extends TwistyPropDerived<AlgTransformationPropInputs, KTransformation> {
1323
+ derive(input: AlgTransformationPropInputs): KTransformation;
1324
+ }
1325
+ //#endregion
1326
+ //#region src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts
1327
+ declare const setupToLocations: {
1328
+ start: boolean;
1329
+ end: boolean;
1330
+ };
1331
+ type SetupToLocation = keyof typeof setupToLocations;
1332
+ declare class SetupAnchorProp extends SimpleTwistyPropSource<SetupToLocation> {
1333
+ getDefaultValue(): SetupToLocation;
1334
+ }
1335
+ //#endregion
1336
+ //#region src/cubing/twisty/model/props/puzzle/state/AnchorTransformationProp.d.ts
1337
+ interface AnchorTransformationPropInputs {
1338
+ setupTransformation: KTransformation | null;
1339
+ setupAnchor: SetupToLocation;
1340
+ setupAlgTransformation: KTransformation;
1341
+ indexer: AlgIndexer;
1342
+ }
1343
+ declare class AnchorTransformationProp extends TwistyPropDerived<AnchorTransformationPropInputs, KTransformation> {
1344
+ derive(inputs: AnchorTransformationPropInputs): KTransformation;
1345
+ }
1346
+ //#endregion
1347
+ //#region src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts
1348
+ interface CurrentLeavesSimplifiedPropInputs {
1349
+ currentMoveInfo: CurrentMoveInfo;
1350
+ }
1351
+ interface CurrentLeavesSimplified {
1352
+ patternIndex: LeafIndex;
1353
+ movesFinishing: Move[];
1354
+ movesFinished: Move[];
1355
+ }
1356
+ declare class CurrentLeavesSimplifiedProp extends TwistyPropDerived<CurrentLeavesSimplifiedPropInputs, CurrentLeavesSimplified> {
1357
+ protected derive(inputs: CurrentLeavesSimplifiedPropInputs): CurrentLeavesSimplified;
1358
+ protected canReuseValue(v1: CurrentLeavesSimplified, v2: CurrentLeavesSimplified): boolean;
1359
+ }
1360
+ //#endregion
1361
+ //#region src/cubing/twisty/model/props/timeline/TimestampRequestProp.d.ts
1362
+ declare const smartTimestamps: {
1363
+ auto: boolean;
1364
+ start: boolean;
1365
+ end: boolean;
1366
+ anchor: boolean;
1367
+ "opposite-anchor": boolean;
1368
+ };
1369
+ type TimestampRequest = MillisecondTimestamp | keyof typeof smartTimestamps;
1370
+ declare class TimestampRequestProp extends SimpleTwistyPropSource<TimestampRequest> {
1371
+ getDefaultValue(): TimestampRequest;
1372
+ set(v: PromiseOrValue<TimestampRequest>): void;
1373
+ protected validInput(v: TimestampRequest): boolean;
1374
+ }
1375
+ //#endregion
1376
+ //#region src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts
1377
+ interface DetailedTimelineInfoInputs {
1378
+ timestampRequest: TimestampRequest;
1379
+ timeRange: TimeRange;
1380
+ setupAnchor: SetupToLocation;
1381
+ setupAlg: AlgWithIssues;
1382
+ }
1383
+ interface DetailedTimelineInfo {
1384
+ timestamp: MillisecondTimestamp;
1385
+ timeRange: TimeRange;
1386
+ atStart: boolean;
1387
+ atEnd: boolean;
1388
+ }
1389
+ declare class DetailedTimelineInfoProp extends TwistyPropDerived<DetailedTimelineInfoInputs, DetailedTimelineInfo> {
1390
+ #private;
1391
+ protected derive(inputs: DetailedTimelineInfoInputs): DetailedTimelineInfo;
1392
+ protected canReuseValue(v1: DetailedTimelineInfo, v2: DetailedTimelineInfo): boolean;
1393
+ }
1394
+ //#endregion
1395
+ //#region src/cubing/twisty/model/props/puzzle/state/CurrentMoveInfoProp.d.ts
1396
+ interface PositionPropInputs {
1397
+ indexer: AlgIndexer;
1398
+ detailedTimelineInfo: DetailedTimelineInfo;
1399
+ catchUpMove: CatchUpMove;
1400
+ }
1401
+ declare class CurrentMoveInfoProp extends TwistyPropDerived<PositionPropInputs, CurrentMoveInfo> {
1402
+ derive(inputs: PositionPropInputs): CurrentMoveInfo;
1403
+ }
1404
+ //#endregion
1405
+ //#region src/cubing/twisty/model/props/puzzle/state/CurrentPatternProp.d.ts
1406
+ interface CurrentTransformationPropInputs {
1407
+ anchoredStart: KTransformation;
1408
+ currentLeavesSimplified: CurrentLeavesSimplified;
1409
+ indexer: AlgIndexer;
1410
+ }
1411
+ declare class CurrentPatternProp extends TwistyPropDerived<CurrentTransformationPropInputs, KPattern> {
1412
+ derive(inputs: CurrentTransformationPropInputs): KPattern;
1413
+ }
1414
+ //#endregion
1415
+ //#region src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.d.ts
1416
+ type VisualizationStrategyPropInputs = {
1417
+ visualizationRequest: VisualizationFormatWithAuto;
1418
+ puzzleID: PuzzleID;
1419
+ };
1420
+ type VisualizationStrategy = "Cube3D" | "2D" | "experimental-2D-LL" | "experimental-2D-LL-face" | "PG3D";
1421
+ declare class VisualizationStrategyProp extends TwistyPropDerived<VisualizationStrategyPropInputs, VisualizationStrategy> {
1422
+ derive(inputs: VisualizationStrategyPropInputs): VisualizationStrategy;
1423
+ }
1424
+ //#endregion
1425
+ //#region src/cubing/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts
1426
+ declare const indexerStrategyNames: {
1427
+ auto: boolean;
1428
+ simple: boolean;
1429
+ tree: boolean;
1430
+ simultaneous: boolean;
1431
+ };
1432
+ type IndexerStrategyName = keyof typeof indexerStrategyNames;
1433
+ declare class IndexerConstructorRequestProp extends SimpleTwistyPropSource<IndexerStrategyName> {
1434
+ getDefaultValue(): IndexerStrategyName;
1435
+ }
1436
+ //#endregion
1437
+ //#region src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts
1438
+ type IndexerConstructor = new (kpuzzle: KPuzzle, alg: Alg, options?: {
1439
+ animationTimelineLeaves?: AnimationTimelineLeaves | null;
1440
+ }) => AlgIndexer;
1441
+ interface IndexerConstructorPropInputs {
1442
+ puzzle: PuzzleID;
1443
+ alg: AlgWithIssues;
1444
+ visualizationStrategy: VisualizationStrategy;
1445
+ indexerConstructorRequest: IndexerStrategyName;
1446
+ animationTimelineLeaves: AnimationTimelineLeaves | null;
1447
+ }
1448
+ declare class IndexerConstructorProp extends TwistyPropDerived<IndexerConstructorPropInputs, IndexerConstructor> {
1449
+ derive(inputs: IndexerConstructorPropInputs): IndexerConstructor;
1450
+ }
1451
+ //#endregion
1452
+ //#region src/cubing/twisty/model/props/puzzle/state/IndexerProp.d.ts
1453
+ type IndexerPropInputs = {
1454
+ indexerConstructor: IndexerConstructor;
1455
+ algWithIssues: AlgWithIssues;
1456
+ kpuzzle: KPuzzle;
1457
+ animationTimelineLeaves: AnimationTimelineLeaves | null;
1458
+ };
1459
+ declare class IndexerProp extends TwistyPropDerived<IndexerPropInputs, AlgIndexer> {
1460
+ derive(input: IndexerPropInputs): AlgIndexer;
1461
+ }
1462
+ //#endregion
1463
+ //#region src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts
1464
+ interface LegacyPositionPropInputs {
1465
+ currentMoveInfo: CurrentMoveInfo;
1466
+ currentPattern: KPattern;
1467
+ }
1468
+ declare class LegacyPositionProp extends TwistyPropDerived<LegacyPositionPropInputs, PuzzlePosition> {
1469
+ derive(inputs: LegacyPositionPropInputs): PuzzlePosition;
1470
+ }
1471
+ //#endregion
1472
+ //#region src/cubing/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts
1473
+ declare class PuzzleAlgProp extends TwistyPropDerived<{
1474
+ algWithIssues: AlgWithIssues;
1475
+ kpuzzle: KPuzzle;
1476
+ }, AlgWithIssues> {
1477
+ derive(inputs: {
1478
+ algWithIssues: AlgWithIssues;
1479
+ kpuzzle: KPuzzle;
1480
+ }): Promise<AlgWithIssues>;
1481
+ }
1482
+ //#endregion
1483
+ //#region src/cubing/twisty/model/props/puzzle/state/SetupTransformationProp.d.ts
1484
+ declare class SetupTransformationProp extends SimpleTwistyPropSource<KTransformation | null> {
1485
+ getDefaultValue(): KTransformation | null;
1486
+ }
1487
+ //#endregion
1488
+ //#region src/cubing/puzzles/events.d.ts
1489
+ interface EventInfo {
1490
+ puzzleID: PuzzleID;
1491
+ eventName: string;
1492
+ /** Whether/how scrambles are implemented in `randomScrambleForEvent(…)` in this version of `cubing.js` */
1493
+ scramblesImplemented: null | "random-state" | "random-moves";
1494
+ }
1495
+ declare const wcaEvents: Record<string, EventInfo>;
1496
+ /** @category Event Info */
1497
+ declare function wcaEventInfo(event: string): EventInfo | null;
1498
+ declare const twizzleEvents: Record<string, EventInfo>;
1499
+ /** @category Event Info */
1500
+ declare function eventInfo(event: string): EventInfo | null;
1501
+ //#endregion
1502
+ //#region src/cubing/puzzles/implementations/2x2x2/index.d.ts
1503
+ /** @category Specific Puzzles */
1504
+ declare const cube2x2x2: PuzzleLoader;
1505
+ //#endregion
1506
+ //#region src/cubing/puzzles/implementations/3x3x3/index.d.ts
1507
+ /** @category Specific Puzzles */
1508
+ declare const cube3x3x3: {
1509
+ id: string;
1510
+ fullName: string;
1511
+ inventedBy: string[];
1512
+ inventionYear: number;
1513
+ kpuzzle: () => Promise<KPuzzle>;
1514
+ svg: () => Promise<string>;
1515
+ llSVG: () => Promise<string>;
1516
+ llFaceSVG: () => Promise<string>;
1517
+ pg: () => Promise<PuzzleGeometry>;
1518
+ stickeringMask: (stickering: ExperimentalStickering) => Promise<StickeringMask>;
1519
+ stickerings: () => Promise<string[]>;
1520
+ puzzleSpecificSimplifyOptions: PuzzleSpecificSimplifyOptions;
1521
+ keyMapping: () => Promise<{
1522
+ [key: string]: AlgLeaf;
1523
+ [key: number]: AlgLeaf;
1524
+ }>;
1525
+ algTransformData: AlgTransformData;
1526
+ };
1527
+ //#endregion
1528
+ //#region src/cubing/puzzles/index.d.ts
1529
+ /** @category All Puzzles */
1530
+ declare const puzzles: Record<string, PuzzleLoader>;
1531
+ //#endregion
1532
+ //#region src/cubing/twisty/model/props/puzzle/structure/KPuzzleProp.d.ts
1533
+ declare class KPuzzleProp extends TwistyPropDerived<{
1534
+ puzzleLoader: PuzzleLoader;
1535
+ }, KPuzzle> {
1536
+ derive(inputs: {
1537
+ puzzleLoader: PuzzleLoader;
1538
+ }): Promise<KPuzzle>;
1539
+ }
1540
+ //#endregion
1541
+ //#region src/cubing/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts
1542
+ declare class PGPuzzleDescriptionStringProp extends SimpleTwistyPropSource<PuzzleDescriptionString | NoValueType> {
1543
+ getDefaultValue(): PuzzleDescriptionString | NoValueType;
1544
+ }
1545
+ //#endregion
1546
+ //#region src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts
1547
+ declare class PuzzleIDProp extends TwistyPropDerived<{
1548
+ puzzleLoader: PuzzleLoader;
1549
+ }, PuzzleID> {
1550
+ derive(inputs: {
1551
+ puzzleLoader: PuzzleLoader;
1552
+ }): Promise<PuzzleID>;
1553
+ }
1554
+ //#endregion
1555
+ //#region src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts
1556
+ interface PuzzleLoaderPropInputs {
1557
+ puzzleIDRequest: PuzzleID | NoValueType;
1558
+ puzzleDescriptionRequest: PuzzleDescriptionString | NoValueType;
1559
+ }
1560
+ declare class PuzzleLoaderProp extends TwistyPropDerived<PuzzleLoaderPropInputs, PuzzleLoader> {
1561
+ derive(inputs: PuzzleLoaderPropInputs): PuzzleLoader;
1562
+ }
1563
+ //#endregion
1564
+ //#region src/cubing/twisty/controllers/TwistyPlayerController.d.ts
1565
+ declare class TwistyPlayerController {
1566
+ private model;
1567
+ animationController: TwistyAnimationController;
1568
+ constructor(model: TwistyPlayerModel, delegate: TwistyAnimationControllerDelegate);
1569
+ jumpToStart(options?: {
1570
+ flash: boolean;
1571
+ }): void;
1572
+ jumpToEnd(options?: {
1573
+ flash: boolean;
1574
+ }): void;
1575
+ togglePlay(play?: boolean): void;
1576
+ visitTwizzleLink(): Promise<void>;
1577
+ }
1578
+ //#endregion
1579
+ //#region src/cubing/twisty/model/props/viewer/ViewerLinkProp.d.ts
1580
+ declare const viewerLinkPages: {
1581
+ twizzle: boolean;
1582
+ "experimental-twizzle-explorer": boolean;
1583
+ none: boolean;
1584
+ };
1585
+ type ViewerLinkPage = keyof typeof viewerLinkPages;
1586
+ type ViewerLinkPageWithAuto = ViewerLinkPage | "auto";
1587
+ declare class ViewerLinkProp extends SimpleTwistyPropSource<ViewerLinkPageWithAuto> {
1588
+ getDefaultValue(): ViewerLinkPageWithAuto;
1589
+ }
1590
+ //#endregion
1591
+ //#region src/cubing/twisty/model/props/viewer/ButtonAppearanceProp.d.ts
1592
+ declare const buttonIcons: string[];
1593
+ type ButtonIcon = (typeof buttonIcons)[number];
1594
+ interface ButtonAppearance {
1595
+ enabled: boolean;
1596
+ icon: ButtonIcon;
1597
+ title: string;
1598
+ hidden?: boolean;
1599
+ }
1600
+ type ButtonAppearances = Record<ButtonCommand, ButtonAppearance>;
1601
+ interface ButtonAppearancePropInputs {
1602
+ coarseTimelineInfo: CoarseTimelineInfo;
1603
+ viewerLink: ViewerLinkPageWithAuto;
1604
+ }
1605
+ declare class ButtonAppearanceProp extends TwistyPropDerived<ButtonAppearancePropInputs, ButtonAppearances> {
1606
+ derive(inputs: ButtonAppearancePropInputs): ButtonAppearances;
1607
+ }
1608
+ //#endregion
1609
+ //#region src/cubing/twisty/model/props/viewer/ColorSchemeRequestProp.d.ts
1610
+ declare const colorSchemes: {
1611
+ light: boolean;
1612
+ dark: boolean;
1613
+ };
1614
+ type ColorScheme = keyof typeof colorSchemes;
1615
+ type ColorSchemeWithAuto = ColorScheme | "auto";
1616
+ declare class ColorSchemeRequestProp extends SimpleTwistyPropSource<ColorSchemeWithAuto> {
1617
+ getDefaultValue(): ColorSchemeWithAuto;
1618
+ }
1619
+ //#endregion
1620
+ //#region src/cubing/twisty/views/control-panel/TwistyButtons.d.ts
1621
+ declare const buttonCommands: {
1622
+ fullscreen: boolean;
1623
+ "jump-to-start": boolean;
1624
+ "play-step-backwards": boolean;
1625
+ "play-pause": boolean;
1626
+ "play-step": boolean;
1627
+ "jump-to-end": boolean;
1628
+ "twizzle-link": boolean;
1629
+ };
1630
+ type ButtonCommand = keyof typeof buttonCommands;
1631
+ declare class TwistyButtons extends ManagedCustomElement {
1632
+ #private;
1633
+ model?: TwistyPlayerModel | undefined;
1634
+ controller?: TwistyPlayerController | undefined;
1635
+ private defaultFullscreenElement?;
1636
+ buttons: Record<ButtonCommand, TwistyButton> | null;
1637
+ constructor(model?: TwistyPlayerModel | undefined, controller?: TwistyPlayerController | undefined, defaultFullscreenElement?: HTMLElement | undefined);
1638
+ connectedCallback(): void;
1639
+ onFullscreenButton(): Promise<void>;
1640
+ update(buttonAppearances: ButtonAppearances): Promise<void>;
1641
+ updateColorScheme(colorScheme: ColorScheme): void;
1642
+ }
1643
+ declare class TwistyButton extends ManagedCustomElement {
1644
+ #private;
1645
+ htmlButton: HTMLButtonElement;
1646
+ updateColorScheme(colorScheme: ColorScheme): void;
1647
+ connectedCallback(): void;
1648
+ setIcon(iconName: ButtonIcon): void;
1649
+ }
1650
+ //#endregion
1651
+ //#region src/cubing/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts
1652
+ interface CoarseTimelineInfoInputs {
1653
+ playingInfo: PlayingInfo;
1654
+ detailedTimelineInfo: DetailedTimelineInfo;
1655
+ }
1656
+ interface CoarseTimelineInfo {
1657
+ playing: boolean;
1658
+ atStart: boolean;
1659
+ atEnd: boolean;
1660
+ }
1661
+ declare class CoarseTimelineInfoProp extends TwistyPropDerived<CoarseTimelineInfoInputs, CoarseTimelineInfo> {
1662
+ protected derive(inputs: CoarseTimelineInfoInputs): CoarseTimelineInfo;
1663
+ protected canReuseValue(v1: CoarseTimelineInfo, v2: CoarseTimelineInfo): boolean;
1664
+ }
1665
+ //#endregion
1666
+ //#region src/cubing/twisty/model/props/timeline/TempoScaleProp.d.ts
1667
+ declare class TempoScaleProp extends TwistyPropSource<number, number> {
1668
+ getDefaultValue(): number;
1669
+ derive(v: number): number;
1670
+ }
1671
+ //#endregion
1672
+ //#region src/cubing/twisty/model/props/viewer/ControlPanelProp.d.ts
1673
+ declare const controlsLocations: {
1674
+ "bottom-row": boolean;
1675
+ none: boolean;
1676
+ };
1677
+ type ControlsLocation = keyof typeof controlsLocations;
1678
+ type ControlPanelThemeWithAuto = ControlsLocation | "auto";
1679
+ declare class ControlPanelProp extends SimpleTwistyPropSource<ControlPanelThemeWithAuto> {
1680
+ getDefaultValue(): ControlPanelThemeWithAuto;
1681
+ }
1682
+ //#endregion
1683
+ //#region src/cubing/twisty/model/props/viewer/TimeRangeProp.d.ts
1684
+ declare class TimeRangeProp extends TwistyPropDerived<{
1685
+ indexer: AlgIndexer;
1686
+ }, TimeRange> {
1687
+ derive(inputs: {
1688
+ indexer: AlgIndexer;
1689
+ }): TimeRange;
1690
+ }
1691
+ //#endregion
1692
+ //#region src/cubing/twisty/model/props/puzzle/display/FaceletScaleProp.d.ts
1693
+ type FaceletScale = "auto" | number;
1694
+ declare class FaceletScaleProp extends SimpleTwistyPropSource<FaceletScale> {
1695
+ getDefaultValue(): FaceletScale;
1696
+ }
1697
+ //#endregion
1698
+ //#region src/cubing/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts
1699
+ type FoundationDisplay = "auto" | "opaque" | "none";
1700
+ declare class FoundationDisplayProp extends SimpleTwistyPropSource<FoundationDisplay> {
1701
+ getDefaultValue(): FoundationDisplay;
1702
+ }
1703
+ //#endregion
1704
+ //#region src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.d.ts
1705
+ declare const hintFaceletStyles: {
1706
+ floating: boolean;
1707
+ none: boolean;
1708
+ };
1709
+ type HintFaceletStyle = keyof typeof hintFaceletStyles;
1710
+ type HintFaceletStyleWithAuto = HintFaceletStyle | "auto";
1711
+ declare class HintFaceletProp extends SimpleTwistyPropSource<HintFaceletStyleWithAuto> {
1712
+ getDefaultValue(): HintFaceletStyleWithAuto;
1713
+ }
1714
+ //#endregion
1715
+ //#region src/cubing/twisty/model/props/puzzle/display/HintFaceletsElevationProp.d.ts
1716
+ type HintFaceletsElevationRequest = "auto" | number;
1717
+ declare class HintFaceletsElevationProp extends SimpleTwistyPropSource<"auto" | number> {
1718
+ getDefaultValue(): "auto" | number;
1719
+ }
1720
+ //#endregion
1721
+ //#region src/cubing/twisty/model/props/puzzle/display/InitialHintFaceletsAnimationProp.d.ts
1722
+ type InitialHintFaceletsAnimation = "auto" | "always" | "none";
1723
+ declare class InitialHintFaceletsAnimationProp extends SimpleTwistyPropSource<InitialHintFaceletsAnimation> {
1724
+ getDefaultValue(): InitialHintFaceletsAnimation;
1725
+ }
1726
+ //#endregion
1727
+ //#region src/cubing/twisty/model/props/puzzle/display/SpriteProp.d.ts
1728
+ type SpritePropInputs = {
1729
+ spriteURL: URL | null;
1730
+ };
1731
+ declare class SpriteProp extends TwistyPropDerived<SpritePropInputs, Texture | null> {
1732
+ derive(inputs: SpritePropInputs): Promise<Texture | null>;
1733
+ }
1734
+ //#endregion
1735
+ //#region src/cubing/twisty/model/props/puzzle/display/StickeringMaskProp.d.ts
1736
+ interface StickeringMaskPropInputs {
1737
+ stickeringMaskRequest: StickeringMask | null;
1738
+ stickeringRequest: ExperimentalStickering | null;
1739
+ puzzleLoader: PuzzleLoader;
1740
+ }
1741
+ declare class StickeringMaskProp extends TwistyPropDerived<StickeringMaskPropInputs, StickeringMask> {
1742
+ getDefaultValue(): StickeringMask;
1743
+ derive(inputs: StickeringMaskPropInputs): Promise<StickeringMask>;
1744
+ }
1745
+ //#endregion
1746
+ //#region src/cubing/twisty/model/props/puzzle/display/StickeringMaskRequestProp.d.ts
1747
+ declare class StickeringMaskRequestProp extends TwistyPropSource<StickeringMask | null, string | StickeringMask | null> {
1748
+ getDefaultValue(): StickeringMask | null;
1749
+ derive(input: string | StickeringMask | null): StickeringMask | null;
1750
+ }
1751
+ //#endregion
1752
+ //#region src/cubing/twisty/model/props/puzzle/state/DragInputProp.d.ts
1753
+ declare const dragInputModes: {
1754
+ auto: boolean;
1755
+ none: boolean;
1756
+ };
1757
+ type DragInputMode = keyof typeof dragInputModes;
1758
+ declare class DragInputProp extends SimpleTwistyPropSource<DragInputMode> {
1759
+ getDefaultValue(): DragInputMode;
1760
+ }
1761
+ //#endregion
1762
+ //#region src/cubing/twisty/model/props/puzzle/state/MovePressCancelOptions.d.ts
1763
+ declare class MovePressCancelOptions extends SimpleTwistyPropSource<AppendCancelOptions> {
1764
+ getDefaultValue(): AppendCancelOptions;
1765
+ }
1766
+ //#endregion
1767
+ //#region src/cubing/twisty/model/props/puzzle/state/MovePressInputProp.d.ts
1768
+ declare const movePressInputNames: {
1769
+ auto: boolean;
1770
+ none: boolean;
1771
+ basic: boolean;
1772
+ };
1773
+ type MovePressInput = keyof typeof movePressInputNames;
1774
+ declare class MovePressInputProp extends SimpleTwistyPropSource<MovePressInput> {
1775
+ getDefaultValue(): MovePressInput;
1776
+ }
1777
+ //#endregion
1778
+ //#region src/cubing/twisty/model/props/viewer/BackgroundProp.d.ts
1779
+ declare const backgroundThemes: {
1780
+ checkered: boolean;
1781
+ "checkered-transparent": boolean;
1782
+ none: boolean;
1783
+ };
1784
+ type BackgroundTheme = keyof typeof backgroundThemes;
1785
+ type BackgroundThemeWithAuto = BackgroundTheme | "auto";
1786
+ declare class BackgroundProp extends SimpleTwistyPropSource<BackgroundThemeWithAuto> {
1787
+ getDefaultValue(): BackgroundThemeWithAuto;
1788
+ }
1789
+ //#endregion
1790
+ //#region src/cubing/twisty/model/props/viewer/ColorSchemeProp.d.ts
1791
+ interface ColorSchemePropInputs {
1792
+ colorSchemeRequest: ColorSchemeWithAuto;
1793
+ }
1794
+ declare class ColorSchemeProp extends TwistyPropDerived<ColorSchemePropInputs, ColorScheme> {
1795
+ protected derive(inputs: ColorSchemePropInputs): ColorScheme;
1796
+ }
1797
+ //#endregion
1798
+ //#region src/cubing/twisty/model/props/viewer/DOMElementReferenceProp.d.ts
1799
+ declare class DOMElementReferenceProp extends SimpleTwistyPropSource<Element | null> {
1800
+ getDefaultValue(): Element | null;
1801
+ }
1802
+ //#endregion
1803
+ //#region src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts
1804
+ type CoordinateDegrees = number;
1805
+ interface OrbitCoordinates {
1806
+ latitude: CoordinateDegrees;
1807
+ longitude: CoordinateDegrees;
1808
+ distance: number;
1809
+ }
1810
+ type OrbitCoordinatesRequest = Partial<OrbitCoordinates> | "auto";
1811
+ declare class OrbitCoordinatesRequestProp extends TwistyPropSource<OrbitCoordinatesRequest, Partial<OrbitCoordinates> | "auto"> {
1812
+ getDefaultValue(): OrbitCoordinatesRequest;
1813
+ protected canReuseValue(v1: OrbitCoordinates, v2: OrbitCoordinates): boolean;
1814
+ protected derive(newCoordinates: Partial<OrbitCoordinates> | "auto", oldValuePromise: Promise<OrbitCoordinatesRequest>): Promise<OrbitCoordinatesRequest>;
1815
+ }
1816
+ //#endregion
1817
+ //#region src/cubing/twisty/model/props/viewer/LatitudeLimit.d.ts
1818
+ declare class LatitudeLimitProp extends SimpleTwistyPropSource<CoordinateDegrees> {
1819
+ getDefaultValue(): CoordinateDegrees;
1820
+ }
1821
+ //#endregion
1822
+ //#region src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts
1823
+ interface OrbitCoordinatesPropInputs {
1824
+ orbitCoordinatesRequest: OrbitCoordinatesRequest;
1825
+ latitudeLimit: CoordinateDegrees;
1826
+ puzzleID: PuzzleID;
1827
+ strategy: VisualizationStrategy;
1828
+ }
1829
+ declare class OrbitCoordinatesProp extends TwistyPropDerived<OrbitCoordinatesPropInputs, OrbitCoordinates> {
1830
+ canReuseValue(v1: OrbitCoordinates, v2: OrbitCoordinates): boolean;
1831
+ derive(inputs: OrbitCoordinatesPropInputs): Promise<OrbitCoordinates>;
1832
+ }
1833
+ //#endregion
1834
+ //#region src/cubing/twisty/model/TwistySceneModel.d.ts
1835
+ declare class TwistySceneModel {
1836
+ twistyPlayerModel: TwistyPlayerModel;
1837
+ background: BackgroundProp;
1838
+ colorSchemeRequest: ColorSchemeRequestProp;
1839
+ dragInput: DragInputProp;
1840
+ foundationDisplay: FoundationDisplayProp;
1841
+ foundationStickerSpriteURL: URLProp;
1842
+ fullscreenElement: DOMElementReferenceProp;
1843
+ hintFacelet: HintFaceletProp;
1844
+ hintStickerSpriteURL: URLProp;
1845
+ initialHintFaceletsAnimation: InitialHintFaceletsAnimationProp;
1846
+ hintFaceletsElevation: HintFaceletsElevationProp;
1847
+ latitudeLimit: LatitudeLimitProp;
1848
+ movePressInput: MovePressInputProp;
1849
+ movePressCancelOptions: MovePressCancelOptions;
1850
+ orbitCoordinatesRequest: OrbitCoordinatesRequestProp;
1851
+ stickeringMaskRequest: StickeringMaskRequestProp;
1852
+ stickeringRequest: StickeringRequestProp;
1853
+ faceletScale: FaceletScaleProp;
1854
+ colorScheme: ColorSchemeProp;
1855
+ foundationStickerSprite: SpriteProp;
1856
+ hintStickerSprite: SpriteProp;
1857
+ orbitCoordinates: OrbitCoordinatesProp;
1858
+ stickeringMask: StickeringMaskProp;
1859
+ constructor(twistyPlayerModel: TwistyPlayerModel);
1860
+ }
1861
+ //#endregion
1862
+ //#region src/cubing/twisty/model/TwistyPlayerModel.d.ts
1863
+ type Without<T, K extends string[]> = Pick<T, Exclude<keyof T, K[number]>>;
1864
+ declare class TwistyPlayerModel {
1865
+ userVisibleErrorTracker: UserVisibleErrorTracker;
1866
+ /******************************** Depth 0 ********************************/
1867
+ alg: AlgProp;
1868
+ backView: BackViewProp;
1869
+ controlPanel: ControlPanelProp;
1870
+ catchUpMove: CatchUpMoveProp;
1871
+ indexerConstructorRequest: IndexerConstructorRequestProp;
1872
+ playingInfo: PlayingInfoProp;
1873
+ puzzleDescriptionRequest: PGPuzzleDescriptionStringProp;
1874
+ puzzleIDRequest: PuzzleIDRequestProp;
1875
+ setupAnchor: SetupAnchorProp;
1876
+ setupAlg: AlgProp;
1877
+ setupTransformation: SetupTransformationProp;
1878
+ tempoScale: TempoScaleProp;
1879
+ timestampRequest: TimestampRequestProp;
1880
+ viewerLink: ViewerLinkProp;
1881
+ visualizationFormat: VisualizationFormatProp;
1882
+ title: ArbitraryStringProp;
1883
+ videoURL: URLProp;
1884
+ competitionID: ArbitraryStringProp;
1885
+ /**
1886
+ * `<twisty-player>` internally supports associating custom timing information
1887
+ * with moves, but there is not an API for this yet. In order to support
1888
+ * exploratory use cases for such a feature in the future, this property
1889
+ * allows setting timeline information.
1890
+ *
1891
+ * Note that this feature may not work as expected when combined with other
1892
+ * features. In particular, it will cause sync issues with an associated
1893
+ * `<twisty-alg-viewer>` depending on how the alg/moves are constructed.
1894
+ *
1895
+ * Usage example:
1896
+ *
1897
+ * ```ts
1898
+ * import { Move, Pause } from "cubing/alg";
1899
+ * import { TwistyPlayer } from "cubing/twisty";
1900
+ *
1901
+ * const player = document.body.appendChild(new TwistyPlayer());
1902
+ * player.alg = "R U' D2 R'";
1903
+ *
1904
+ * // Note that:
1905
+ * // - The leaves must match those of the alg. (No consistency checks are performed at this time.)
1906
+ * // - Leaves may overlap if they can be simultaneously animated.
1907
+ * // - There must always be at least one animating leaf at any moment. You can use a `Pause` for this if there is a gap between moves.
1908
+ * player.experimentalModel.animationTimelineLeavesRequest.set([
1909
+ * { animLeaf: new Move("R", 1), start: 0, end: 200 },
1910
+ * { animLeaf: new Pause(), start: 200, end: 218 },
1911
+ * { animLeaf: new Move("U", -1), start: 218, end: 370 },
1912
+ * { animLeaf: new Move("D", 2), start: 249, end: 520 },
1913
+ * { animLeaf: new Pause(), start: 520, end: 530 },
1914
+ * { animLeaf: new Move("R", -1), start: 530, end: 790 },
1915
+ * ]);
1916
+ * ```
1917
+ */
1918
+ animationTimelineLeavesRequest: AnimationTimelineLeavesRequestProp;
1919
+ /******************************** Depth 1 ********************************/
1920
+ puzzleLoader: PuzzleLoaderProp;
1921
+ /******************************** Depth 2 ********************************/
1922
+ kpuzzle: KPuzzleProp;
1923
+ puzzleID: PuzzleIDProp;
1924
+ /******************************** Depth 3 ********************************/
1925
+ puzzleAlg: PuzzleAlgProp;
1926
+ puzzleSetupAlg: PuzzleAlgProp;
1927
+ visualizationStrategy: VisualizationStrategyProp;
1928
+ /******************************** Depth 4 ********************************/
1929
+ indexerConstructor: IndexerConstructorProp;
1930
+ setupAlgTransformation: AlgTransformationProp;
1931
+ /******************************** Depth 5 ********************************/
1932
+ indexer: IndexerProp;
1933
+ /******************************** Depth 6 ********************************/
1934
+ anchorTransformation: AnchorTransformationProp;
1935
+ timeRange: TimeRangeProp;
1936
+ /******************************** Depth 7 ********************************/
1937
+ detailedTimelineInfo: DetailedTimelineInfoProp;
1938
+ /******************************** Depth 8 ********************************/
1939
+ coarseTimelineInfo: CoarseTimelineInfoProp;
1940
+ currentMoveInfo: CurrentMoveInfoProp;
1941
+ /******************************** Depth 9 ********************************/
1942
+ buttonAppearance: ButtonAppearanceProp;
1943
+ currentLeavesSimplified: CurrentLeavesSimplifiedProp;
1944
+ /******************************** Depth 10 ********************************/
1945
+ currentPattern: CurrentPatternProp;
1946
+ /******************************** Depth 11 ********************************/
1947
+ legacyPosition: LegacyPositionProp;
1948
+ twistySceneModel: TwistySceneModel;
1949
+ twizzleLink(): Promise<string>;
1950
+ experimentalAddAlgLeaf(algLeaf: AlgLeaf, options?: AppendOptions): void;
1951
+ experimentalAddMove(flexibleMove: Move | string, options?: Without<AppendOptions, ["puzzleLoader", "puzzleSpecificSimplifyOptions"]>): void;
1952
+ experimentalRemoveFinalChild(): void;
1953
+ }
1954
+ //#endregion
1955
+ //#region src/cubing/twisty/controllers/TwistyAnimationController.d.ts
1956
+ interface TwistyAnimationControllerDelegate {
1957
+ flash(): void;
1958
+ }
1959
+ declare class TwistyAnimationController {
1960
+ #private;
1961
+ private delegate;
1962
+ private playing;
1963
+ private direction;
1964
+ private catchUpHelper;
1965
+ private model;
1966
+ private lastDatestamp;
1967
+ private lastTimestampPromise;
1968
+ private scheduler;
1969
+ constructor(model: TwistyPlayerModel, delegate: TwistyAnimationControllerDelegate);
1970
+ onPlayingProp(playingInfo: PlayingInfo): Promise<void>;
1971
+ onCatchUpMoveProp(catchUpMove: CatchUpMove): Promise<void>;
1972
+ jumpToStart(options?: {
1973
+ flash: boolean;
1974
+ }): void;
1975
+ jumpToEnd(options?: {
1976
+ flash: boolean;
1977
+ }): void;
1978
+ playPause(): void;
1979
+ play(options?: {
1980
+ direction?: SimpleDirection;
1981
+ untilBoundary?: BoundaryType;
1982
+ autoSkipToOtherEndIfStartingAtBoundary?: boolean;
1983
+ loop?: boolean;
1984
+ }): void;
1985
+ pause(): void;
1986
+ animFrame(frameDatestamp: MillisecondTimestamp): Promise<void>;
1987
+ }
1988
+ //#endregion
1989
+ //#region src/cubing/vendor/mit/three/examples/jsm/libs/stats.modified.module.d.ts
1990
+ /**
1991
+ * @author mrdoob / http://mrdoob.com/
1992
+ * ESM conversion by Lucas Garron, 2021-12-21
1993
+ */
1994
+ declare class Stats {
1995
+ mode: number;
1996
+ dom: HTMLDivElement;
1997
+ constructor();
1998
+ addPanel(panel: StatsPanel): StatsPanel;
1999
+ showPanel(id: number): void;
2000
+ beginTime: number;
2001
+ prevTime: number;
2002
+ frames: number;
2003
+ fpsPanel: StatsPanel;
2004
+ msPanel: StatsPanel;
2005
+ memPanel: StatsPanel | null;
2006
+ REVISION: number;
2007
+ begin(): void;
2008
+ end(): number;
2009
+ update(): void;
2010
+ }
2011
+ declare class StatsPanel {
2012
+ private name;
2013
+ private fg;
2014
+ private bg;
2015
+ min: number;
2016
+ max: number;
2017
+ dom: HTMLCanvasElement;
2018
+ context: CanvasRenderingContext2D;
2019
+ constructor(name: string, fg: string, bg: string);
2020
+ update(value: number, maxValue: number): void;
2021
+ }
2022
+ //#endregion
2023
+ //#region src/cubing/twisty/controllers/RenderScheduler.d.ts
2024
+ interface Schedulable {
2025
+ scheduleRender(): void;
2026
+ }
2027
+ //#endregion
2028
+ //#region src/cubing/twisty/views/3D/DragTracker.d.ts
2029
+ interface DragMovementInfo {
2030
+ attachedInfo: Record<any, any>;
2031
+ movementX: number;
2032
+ movementY: number;
2033
+ elapsedMs: number;
2034
+ }
2035
+ interface PressInfo {
2036
+ normalizedX: number;
2037
+ normalizedY: number;
2038
+ rightClick: boolean;
2039
+ keys: {
2040
+ altKey: boolean;
2041
+ ctrlOrMetaKey: boolean;
2042
+ shiftKey: boolean;
2043
+ };
2044
+ }
2045
+ declare class DragTracker extends EventTarget {
2046
+ #private;
2047
+ readonly target: HTMLElement;
2048
+ constructor(target: HTMLElement);
2049
+ start(): void;
2050
+ stop(): void;
2051
+ addTargetListener(eventType: string, listener: ((e: MouseEvent) => any) | ((e: PointerEvent) => any)): void;
2052
+ private onPointerDown;
2053
+ private onPointerMove;
2054
+ private onPointerUp;
2055
+ }
2056
+ //#endregion
2057
+ //#region src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts
2058
+ interface Twisty3DPuzzle extends Object3D {
2059
+ onPositionChange(position: PuzzlePosition): void;
2060
+ setStickeringMask(stickeringMask: StickeringMask): void;
2061
+ }
2062
+ //#endregion
2063
+ //#region src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts
2064
+ declare class Twisty3DPuzzleWrapper extends EventTarget implements Schedulable {
2065
+ #private;
2066
+ private model;
2067
+ schedulable: Schedulable;
2068
+ private puzzleLoader;
2069
+ private visualizationStrategy;
2070
+ constructor(model: TwistyPlayerModel, schedulable: Schedulable, puzzleLoader: PuzzleLoader, visualizationStrategy: VisualizationStrategy);
2071
+ disconnect(): void;
2072
+ scheduleRender(): void;
2073
+ twisty3DPuzzle(): Promise<Twisty3DPuzzle>;
2074
+ raycastMove(raycasterPromise: Promise<Raycaster>, transformations: {
2075
+ invert: boolean;
2076
+ depth?: "secondSlice" | "rotation" | "none";
2077
+ }): Promise<void>;
2078
+ }
2079
+ //#endregion
2080
+ //#region src/cubing/twisty/views/3D/Twisty3DSceneWrapper.d.ts
2081
+ declare class Twisty3DSceneWrapper extends ManagedCustomElement implements Schedulable {
2082
+ #private;
2083
+ model?: TwistyPlayerModel | undefined;
2084
+ disconnect(): void;
2085
+ constructor(model?: TwistyPlayerModel | undefined);
2086
+ connectedCallback(): Promise<void>;
2087
+ setBackView(backView: BackViewLayout): void;
2088
+ onPress(e: CustomEvent<{
2089
+ pressInfo: PressInfo;
2090
+ cameraPromise: Promise<PerspectiveCamera>;
2091
+ }>): Promise<void>;
2092
+ scene(): Promise<Scene>;
2093
+ addVantage(vantage: Twisty3DVantage): void;
2094
+ removeVantage(vantage: Twisty3DVantage): void;
2095
+ experimentalVantages(): Iterable<Twisty3DVantage>;
2096
+ scheduleRender(): void;
2097
+ setCurrentTwisty3DPuzzleWrapper(scene: Scene, twisty3DPuzzleWrapper: Twisty3DPuzzleWrapper): Promise<void>;
2098
+ /** @deprecated */
2099
+ experimentalTwisty3DPuzzleWrapper(): Promise<Twisty3DPuzzleWrapper>;
2100
+ onPuzzle(inputs: [puzzleLoader: PuzzleLoader, visualizationStrategy: VisualizationStrategy]): Promise<void>;
2101
+ }
2102
+ //#endregion
2103
+ //#region src/cubing/twisty/views/3D/TwistyOrbitControls.d.ts
2104
+ declare class TwistyOrbitControls {
2105
+ private model;
2106
+ private mirror;
2107
+ private canvas;
2108
+ private dragTracker;
2109
+ /** @deprecated */
2110
+ experimentalInertia: boolean;
2111
+ private onMovementBound;
2112
+ experimentalHasBeenMoved: boolean;
2113
+ constructor(model: TwistyPlayerModel, mirror: boolean, canvas: HTMLCanvasElement, dragTracker: DragTracker);
2114
+ temperMovement(f: number): number;
2115
+ onMove(e: CustomEvent<DragMovementInfo>): void;
2116
+ onMovement(movementX: number, movementY: number): {
2117
+ temperedX: number;
2118
+ temperedY: number;
2119
+ };
2120
+ onUp(e: CustomEvent<DragMovementInfo>): void;
2121
+ }
2122
+ //#endregion
2123
+ //#region src/cubing/twisty/views/3D/Twisty3DVantage.d.ts
2124
+ declare class Twisty3DVantage extends ManagedCustomElement {
2125
+ #private;
2126
+ private model?;
2127
+ private options?;
2128
+ scene: Twisty3DSceneWrapper | null;
2129
+ stats: Stats | null;
2130
+ private rendererIsShared;
2131
+ loadingElement: HTMLDivElement | null;
2132
+ constructor(model?: TwistyPlayerModel | undefined, scene?: Twisty3DSceneWrapper, options?: {
2133
+ backView?: boolean;
2134
+ } | undefined);
2135
+ connectedCallback(): Promise<void>;
2136
+ clearCanvas(): Promise<void>;
2137
+ renderer(): Promise<WebGLRenderer>;
2138
+ canvasInfo(): Promise<{
2139
+ canvas: HTMLCanvasElement;
2140
+ context: CanvasRenderingContext2D;
2141
+ }>;
2142
+ camera(): Promise<PerspectiveCamera>;
2143
+ orbitControls(): Promise<TwistyOrbitControls>;
2144
+ addListener<T>(prop: TwistyPropParent<T>, listener: (value: T) => void): void;
2145
+ disconnect(): void;
2146
+ experimentalNextRenderFinishedCallback(callback: () => void): void;
2147
+ render(): Promise<void>;
2148
+ scheduleRender(): void;
2149
+ }
2150
+ //#endregion
2151
+ //#region src/cubing/twisty/views/TwistyPlayerSettable.d.ts
2152
+ declare abstract class TwistyPlayerSettable extends ManagedCustomElement {
2153
+ experimentalModel: TwistyPlayerModel;
2154
+ set alg(newAlg: Alg | string);
2155
+ get alg(): never;
2156
+ set experimentalSetupAlg(newSetup: Alg | string);
2157
+ get experimentalSetupAlg(): never;
2158
+ set experimentalSetupAnchor(anchor: SetupToLocation);
2159
+ get experimentalSetupAnchor(): never;
2160
+ set puzzle(puzzleID: PuzzleID);
2161
+ get puzzle(): never;
2162
+ set experimentalPuzzleDescription(puzzleDescription: PuzzleDescriptionString);
2163
+ get experimentalPuzzleDescription(): never;
2164
+ set timestamp(timestamp: TimestampRequest);
2165
+ get timestamp(): never;
2166
+ set hintFacelets(hintFaceletStyle: HintFaceletStyleWithAuto);
2167
+ get hintFacelets(): never;
2168
+ set experimentalStickering(stickering: ExperimentalStickering);
2169
+ get experimentalStickering(): never;
2170
+ set experimentalStickeringMaskOrbits(stickeringMask: string | StickeringMask);
2171
+ get experimentalStickeringMaskOrbits(): never;
2172
+ set experimentalFaceletScale(faceletScale: FaceletScale);
2173
+ get experimentalFaceletScale(): never;
2174
+ set backView(backView: BackViewLayoutWithAuto);
2175
+ get backView(): never;
2176
+ set background(backgroundTheme: BackgroundThemeWithAuto);
2177
+ get background(): never;
2178
+ set colorScheme(colorScheme: ColorSchemeWithAuto);
2179
+ get colorScheme(): never;
2180
+ set controlPanel(newControlPanel: ControlPanelThemeWithAuto);
2181
+ get controlPanel(): never;
2182
+ set visualization(visualizationFormat: VisualizationFormatWithAuto);
2183
+ get visualization(): never;
2184
+ set experimentalTitle(title: string | null);
2185
+ get experimentalTitle(): never;
2186
+ set experimentalVideoURL(videoURL: string | null);
2187
+ get experimentalVideoURL(): never;
2188
+ set experimentalCompetitionID(competitionID: string | null);
2189
+ get experimentalCompetitionID(): never;
2190
+ set viewerLink(viewerLinkPage: ViewerLinkPageWithAuto);
2191
+ get viewerLink(): never;
2192
+ set experimentalMovePressInput(movePressInput: MovePressInput);
2193
+ get experimentalMovePressInput(): never;
2194
+ set experimentalMovePressCancelOptions(movePressCancelOptions: AppendCancelOptions);
2195
+ get experimentalMovePressCancelOptions(): never;
2196
+ set cameraLatitude(latitude: number);
2197
+ get cameraLatitude(): never;
2198
+ set cameraLongitude(longitude: number);
2199
+ get cameraLongitude(): never;
2200
+ set cameraDistance(distance: number);
2201
+ get cameraDistance(): never;
2202
+ set cameraLatitudeLimit(latitudeLimit: number);
2203
+ get cameraLatitudeLimit(): never;
2204
+ set indexer(indexer: IndexerStrategyName);
2205
+ get indexer(): never;
2206
+ set tempoScale(newTempoScale: number);
2207
+ get tempoScale(): never;
2208
+ set experimentalSprite(url: string | URL);
2209
+ get experimentalSprite(): never;
2210
+ set experimentalHintSprite(url: string | URL);
2211
+ get experimentalHintSprite(): never;
2212
+ set fullscreenElement(element: Element | null);
2213
+ get fullscreenElement(): never;
2214
+ set experimentalInitialHintFaceletsAnimation(anim: InitialHintFaceletsAnimation);
2215
+ get experimentalInitialHintFaceletsAnimation(): never;
2216
+ set experimentalHintFaceletsElevation(elevation: "auto" | number);
2217
+ get experimentalHintFaceletsElevation(): never;
2218
+ set experimentalDragInput(dragInputMode: DragInputMode);
2219
+ get experimentalDragInput(): never;
2220
+ experimentalGet: ExperimentalGetters;
2221
+ }
2222
+ declare class ExperimentalGetters {
2223
+ private model;
2224
+ constructor(model: TwistyPlayerModel);
2225
+ alg(): Promise<Alg>;
2226
+ setupAlg(): Promise<Alg>;
2227
+ puzzleID(): Promise<PuzzleID>;
2228
+ timestamp(): Promise<MillisecondTimestamp>;
2229
+ }
2230
+ //#endregion
2231
+ //#region src/cubing/twisty/views/TwistyPlayer.d.ts
2232
+ /**
2233
+ * The config argument passed to {@link TwistyPlayer} when calling the
2234
+ * constructor. This interface type be useful for avoiding bugs when you would
2235
+ * like to create a {@link TwistyPlayer} using a dynamic config, or by combining
2236
+ * configs.
2237
+ *
2238
+ * ```js
2239
+ * import { TwistyPlayer, type TwistyPlayerConfig } from "cubing/twisty";
2240
+ *
2241
+ * const MY_DEFAULT_CONFIG: TwistyPlayerConfig = {
2242
+ * puzzle: "megaminx",
2243
+ * alg: "R U R'"
2244
+ * };
2245
+ * export function createTwistyPlayer(overrideConfig: TwistyPlayerConfig) {
2246
+ * const options = { ...MY_DEFAULT_CONFIG, ...overrideConfig };
2247
+ * return new TwistyPlayer(options);
2248
+ * }
2249
+ *
2250
+ * // Example: if the current page is https://alpha.twizzle.net/edit/?alg=M2+E2+S2
2251
+ * // then this gives us the "alg" param value "M2 E2 S2".
2252
+ * const myOverrideConfig: TwistyPlayerConfig = {};
2253
+ * const algParam = new URL(location.href).searchParams.get("alg");
2254
+ * if (algParam) {
2255
+ * myOverrideConfig.alg = algParam;
2256
+ * }
2257
+ * createTwistyPlayer(myOverrideConfig);
2258
+ * ```
2259
+ *
2260
+ * @category TwistyPlayer
2261
+ */
2262
+ interface TwistyPlayerConfig {
2263
+ alg?: Alg | string;
2264
+ experimentalSetupAlg?: Alg | string;
2265
+ experimentalSetupAnchor?: SetupToLocation;
2266
+ puzzle?: PuzzleID;
2267
+ experimentalPuzzleDescription?: PuzzleDescriptionString;
2268
+ visualization?: VisualizationFormatWithAuto;
2269
+ hintFacelets?: HintFaceletStyleWithAuto;
2270
+ experimentalStickering?: ExperimentalStickering | null;
2271
+ experimentalStickeringMaskOrbits?: StickeringMask | string;
2272
+ background?: BackgroundThemeWithAuto;
2273
+ colorScheme?: ColorSchemeWithAuto;
2274
+ controlPanel?: ControlPanelThemeWithAuto;
2275
+ backView?: BackViewLayoutWithAuto;
2276
+ experimentalInitialHintFaceletsAnimation?: InitialHintFaceletsAnimation;
2277
+ experimentalFaceletScale?: FaceletScale;
2278
+ experimentalHintFaceletsElevation?: HintFaceletsElevationRequest;
2279
+ viewerLink?: ViewerLinkPageWithAuto;
2280
+ experimentalMovePressInput?: MovePressInput;
2281
+ experimentalDragInput?: DragInputMode;
2282
+ experimentalTitle?: string | null;
2283
+ experimentalVideoURL?: string;
2284
+ experimentalCompetitionID?: string;
2285
+ cameraLatitude?: number;
2286
+ cameraLongitude?: number;
2287
+ cameraDistance?: number;
2288
+ cameraLatitudeLimit?: number;
2289
+ tempoScale?: number;
2290
+ experimentalSprite?: string | null;
2291
+ experimentalHintSprite?: string | null;
2292
+ experimentalMovePressCancelOptions?: AppendCancelOptions;
2293
+ }
2294
+ declare const intersectedCallback: unique symbol;
2295
+ /**
2296
+ * TwistyPlayer is the heart of `cubing.js`. It can be used to display a puzzle on a web page like this:
2297
+ *
2298
+ * <script src="path/to/cubing/twisty" type="module"></script>
2299
+ * <twisty-player alg="R U R'"></twisty-player>
2300
+ *
2301
+ * You can also construct it directly in JavaScript:
2302
+ *
2303
+ * ```js
2304
+ * import { TwistyPlayer } from "cubing/twisty";
2305
+ * const twistyPlayer = new TwistyPlayer({alg: "R U R'"});
2306
+ * // Once the page has loaded, you can do this:
2307
+ * document.body.appendChild(twistyPlayer);
2308
+ * ```
2309
+ *
2310
+ * See {@link https://js.cubing.net/cubing/} for more examples.
2311
+ *
2312
+ * @category TwistyPlayer
2313
+ */
2314
+ declare class TwistyPlayer extends TwistyPlayerSettable implements TwistyAnimationControllerDelegate {
2315
+ #private;
2316
+ controller: TwistyPlayerController;
2317
+ buttons?: TwistyButtons;
2318
+ experimentalCanvasClickCallback: (...args: any) => void;
2319
+ constructor(config?: TwistyPlayerConfig);
2320
+ connectedCallback(): void;
2321
+ [intersectedCallback](): Promise<void>;
2322
+ /** @deprecated */
2323
+ experimentalSetFlashLevel(newLevel: "auto" | "none"): void;
2324
+ flash(): void;
2325
+ experimentalCurrentVantages(): Promise<Iterable<Twisty3DVantage>>;
2326
+ experimentalCurrentCanvases(): Promise<HTMLCanvasElement[]>;
2327
+ /**
2328
+ * Get the first available puzzle `Object3D`. This can be inserted into
2329
+ * another `three.js` scene, essentially "adopting" it from the
2330
+ * `TwistyPlayer`'s scenes while still allowing the `TwistyPlayer` to animate
2331
+ * it. The function returns a `Promise` that returns if and when the
2332
+ * `Object3D` is available, and accepts a callback that is called whenever a
2333
+ * render is scheduled for the puzzle (essentially, if something about the
2334
+ * puzzle has changed, like its appearance or current animated state).
2335
+ *
2336
+ * Note:
2337
+ * - This may never resolve if the player never creates the relevant 3D object
2338
+ * under the hood (e.g. if the config is set to 2D, or is not valid for
2339
+ * rendering a puzzle)
2340
+ * - The architecture of `cubing.js` may change significantly, so it is not
2341
+ * guaranteed that a `three.js` `Object3D` will be available from the main
2342
+ * thread in the future.
2343
+ * - This function only returns the current `three.js` puzzle object (once one
2344
+ * exists). If you change e.g. the `puzzle` config for the player, then the
2345
+ * object will currently become stale. This may be replaced with more
2346
+ * convenient behaviour in the future.
2347
+ *
2348
+ * @deprecated */
2349
+ experimentalCurrentThreeJSPuzzleObject(puzzleRenderScheduledCallback?: () => void): Promise<Object3D>;
2350
+ jumpToStart(options?: {
2351
+ flash: boolean;
2352
+ }): void;
2353
+ jumpToEnd(options?: {
2354
+ flash: boolean;
2355
+ }): void;
2356
+ play(): void;
2357
+ pause(): void;
2358
+ togglePlay(play?: boolean): void;
2359
+ experimentalAddMove(flexibleMove: Move | string, options?: AppendOptions): void;
2360
+ experimentalAddAlgLeaf(algLeaf: AlgLeaf, options?: AppendOptions): void;
2361
+ static get observedAttributes(): string[];
2362
+ experimentalRemoveFinalChild(): void;
2363
+ attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): void;
2364
+ experimentalScreenshot(options?: {
2365
+ width: number;
2366
+ height: number;
2367
+ }): Promise<string>;
2368
+ experimentalDownloadScreenshot(filename?: string): Promise<void>;
2369
+ }
2370
+ declare global {
2371
+ interface HTMLElementTagNameMap {
2372
+ "twisty-player": TwistyPlayer;
2373
+ }
2374
+ }
2375
+ //#endregion
2376
+ //#region src/cubing/alg/parseAlg.d.ts
2377
+ declare const startCharIndexKey: unique symbol;
2378
+ declare const endCharIndexKey: unique symbol;
2379
+ interface ParserIndexed {
2380
+ [startCharIndexKey]: number;
2381
+ [endCharIndexKey]: number;
2382
+ }
2383
+ type Parsed<T extends Alg | AlgNode> = T & ParserIndexed;
2384
+ //#endregion
2385
+ //#region src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.d.ts
2386
+ type AnimatedLeafAlgNodeInfo = {
2387
+ leaf: Parsed<AnimatedLeafAlgNode>;
2388
+ idx: LeafIndex;
2389
+ };
2390
+ type OrderedLeafTokens = AnimatedLeafAlgNodeInfo[];
2391
+ //#endregion
2392
+ //#region src/cubing/twisty/views/TwistyAlgEditor/model.d.ts
2393
+ declare class TwistyAlgEditorValueProp extends SimpleTwistyPropSource<string> {
2394
+ getDefaultValue(): string;
2395
+ }
2396
+ interface AlgEditorAlgWithIssuesPropInput {
2397
+ value: string;
2398
+ }
2399
+ declare class AlgEditorAlgWithIssuesProp extends TwistyPropDerived<AlgEditorAlgWithIssuesPropInput, AlgWithIssues> {
2400
+ derive(input: AlgEditorAlgWithIssuesPropInput): AlgWithIssues;
2401
+ }
2402
+ interface SelectionInfoPropInput {
2403
+ selectionStart: number;
2404
+ selectionEnd: number;
2405
+ }
2406
+ interface SelectionInfo extends SelectionInfoPropInput {
2407
+ endChangedMostRecently: boolean;
2408
+ }
2409
+ declare class TwistyAlgEditorSelectionProp extends TwistyPropSource<SelectionInfo, SelectionInfoPropInput> {
2410
+ getDefaultValue(): {
2411
+ selectionStart: number;
2412
+ selectionEnd: number;
2413
+ endChangedMostRecently: boolean;
2414
+ };
2415
+ derive(input: SelectionInfoPropInput, oldValue: Promise<SelectionInfo>): Promise<SelectionInfo>;
2416
+ }
2417
+ interface TargetCharPropInputs {
2418
+ selectionInfo: SelectionInfo;
2419
+ }
2420
+ declare class TargetCharProp extends TwistyPropDerived<TargetCharPropInputs, number> {
2421
+ derive(inputs: TargetCharPropInputs): number;
2422
+ }
2423
+ interface LeafTokensPropInputs {
2424
+ algWithIssues: AlgWithIssues;
2425
+ }
2426
+ declare class LeafTokensProp extends TwistyPropDerived<LeafTokensPropInputs, OrderedLeafTokens> {
2427
+ derive(inputs: LeafTokensPropInputs): OrderedLeafTokens;
2428
+ }
2429
+ interface LeafToHighlightPropInputs {
2430
+ targetChar: number;
2431
+ leafTokens: OrderedLeafTokens;
2432
+ }
2433
+ type HighlightWhere = "before" | "start" | "inside" | "end" | "after";
2434
+ interface HighlightInfo {
2435
+ leafInfo: AnimatedLeafAlgNodeInfo;
2436
+ where: HighlightWhere;
2437
+ }
2438
+ declare class LeafToHighlightProp extends TwistyPropDerived<LeafToHighlightPropInputs, HighlightInfo | null> {
2439
+ derive(inputs: LeafToHighlightPropInputs): HighlightInfo | null;
2440
+ }
2441
+ declare class TwistyAlgEditorModel {
2442
+ valueProp: TwistyAlgEditorValueProp;
2443
+ selectionProp: TwistyAlgEditorSelectionProp;
2444
+ targetCharProp: TargetCharProp;
2445
+ algEditorAlgWithIssues: AlgEditorAlgWithIssuesProp;
2446
+ leafTokensProp: LeafTokensProp;
2447
+ leafToHighlight: LeafToHighlightProp;
2448
+ }
2449
+ //#endregion
2450
+ //#region src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts
2451
+ type TwistyPlayerAlgProp = "alg" | "setupAlg";
2452
+ /** @category Other Custom Elements */
2453
+ declare class TwistyAlgEditor extends ManagedCustomElement {
2454
+ #private;
2455
+ model: TwistyAlgEditorModel;
2456
+ debugNeverRequestTimestamp: boolean;
2457
+ constructor(options?: {
2458
+ twistyPlayer?: TwistyPlayer;
2459
+ twistyPlayerProp?: TwistyPlayerAlgProp;
2460
+ });
2461
+ connectedCallback(): void;
2462
+ set algString(s: string);
2463
+ get algString(): string;
2464
+ set placeholder(placeholderText: string);
2465
+ onInput(): void;
2466
+ onSelectionChange(): Promise<void>;
2467
+ onBlur(): Promise<void>;
2468
+ setAlgIssueClassForPuzzle(issues: "none" | "warning" | "error"): void;
2469
+ highlightLeaf(leaf: Parsed<Move | Pause> | null): void;
2470
+ get twistyPlayer(): TwistyPlayer | null;
2471
+ set twistyPlayer(twistyPlayer: TwistyPlayer | null);
2472
+ protected attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): void;
2473
+ static get observedAttributes(): string[];
2474
+ }
2475
+ declare global {
2476
+ interface HTMLElementTagNameMap {
2477
+ "twisty-alg-editor": TwistyAlgEditor;
2478
+ }
2479
+ }
2480
+ //#endregion
2481
+ //#region src/cubing/twisty/views/TwistyAlgViewer.d.ts
2482
+ interface DataDown {
2483
+ earliestMoveIndex: LeafIndex;
2484
+ twistyAlgViewer: TwistyAlgViewer;
2485
+ direction: IterationDirection;
2486
+ }
2487
+ interface DataUp {
2488
+ moveCount: number;
2489
+ element: TwistyAlgWrapperElem | TwistyAlgLeafElem;
2490
+ }
2491
+ declare class TwistyAlgLeafElem extends ManagedCustomElement {
2492
+ algOrAlgNode: Alg | AlgNode;
2493
+ constructor(className: string, text: string, dataDown: DataDown, algOrAlgNode: Alg | AlgNode, offsetIntoMove: boolean, clickable: boolean);
2494
+ pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2495
+ setCurrentMove(current: boolean): void;
2496
+ }
2497
+ declare class TwistyAlgWrapperElem extends HTMLElementShim {
2498
+ algOrAlgNode: Alg | AlgNode;
2499
+ private queue;
2500
+ constructor(className: string, algOrAlgNode: Alg | AlgNode);
2501
+ addString(str: string): void;
2502
+ addElem(dataUp: DataUp): number;
2503
+ flushQueue(direction?: IterationDirection): void;
2504
+ pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2505
+ }
2506
+ declare class MoveHighlighter {
2507
+ moveCharIndexMap: Map<number, TwistyAlgLeafElem>;
2508
+ currentElem: TwistyAlgLeafElem | null;
2509
+ addMove(charIndex: number, elem: TwistyAlgLeafElem): void;
2510
+ set(move: Parsed<Move> | null): void;
2511
+ }
2512
+ /** @category Other Custom Elements */
2513
+ declare class TwistyAlgViewer extends HTMLElementShim {
2514
+ #private;
2515
+ highlighter: MoveHighlighter;
2516
+ lastClickTimestamp: number | null;
2517
+ constructor(options?: {
2518
+ twistyPlayer?: TwistyPlayer;
2519
+ });
2520
+ protected connectedCallback(): void;
2521
+ private setAlg;
2522
+ get twistyPlayer(): TwistyPlayer | null;
2523
+ set twistyPlayer(twistyPlayer: TwistyPlayer | null);
2524
+ jumpToIndex(index: LeafIndex, offsetIntoMove: boolean): Promise<void>;
2525
+ protected attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): Promise<void>;
2526
+ static get observedAttributes(): string[];
2527
+ }
2528
+ declare global {
2529
+ interface HTMLElementTagNameMap {
2530
+ "twisty-alg-viewer": TwistyAlgViewer;
2531
+ }
2532
+ }
2533
+ //#endregion
2534
+ //#region src/cubing/twisty/views/twizzle/TwizzleLink.d.ts
2535
+ declare class TwizzleLink extends ManagedCustomElement {
2536
+ #private;
2537
+ private options?;
2538
+ twistyPlayer: TwistyPlayer | null;
2539
+ a: HTMLAnchorElement | null;
2540
+ constructor(options?: {
2541
+ cdnForumTweaks?: boolean;
2542
+ colorScheme?: ColorSchemeWithAuto;
2543
+ } | undefined);
2544
+ connectedCallback(): Promise<void>;
2545
+ }
2546
+ declare global {
2547
+ interface HTMLElementTagNameMap {
2548
+ "twizzle-link": TwizzleLink;
2549
+ }
2550
+ }
2551
+ //#endregion
2552
+ //#region src/cubing/puzzles/PuzzleLoader.d.ts
2553
+ type KeyMapping = {
2554
+ [keyCode: string]: AlgLeaf;
2555
+ };
2556
+ type AlgTransformData = Record<string, {
2557
+ replaceMovesByFamily: Record<string, string>;
2558
+ invertExceptByFamily?: Set<string>;
2559
+ }>;
2560
+ interface PuzzleLoader {
2561
+ id: string;
2562
+ fullName: string;
2563
+ inventedBy?: string[];
2564
+ inventionYear?: number;
2565
+ /** @deprecated */
2566
+ def?: never;
2567
+ kpuzzle: () => Promise<KPuzzle>;
2568
+ svg: () => Promise<string>;
2569
+ llSVG?: () => Promise<string>;
2570
+ llFaceSVG?: () => Promise<string>;
2571
+ pg?: () => Promise<PuzzleGeometry>;
2572
+ basePG?: () => Promise<PuzzleGeometry>;
2573
+ stickeringMask?: (stickering: ExperimentalStickering) => Promise<StickeringMask>;
2574
+ stickerings?: () => Promise<ExperimentalStickering[]>;
2575
+ puzzleSpecificSimplifyOptions?: PuzzleSpecificSimplifyOptions;
2576
+ puzzleSpecificSimplifyOptionsPromise?: Promise<PuzzleSpecificSimplifyOptions>;
2577
+ keyMapping?: () => Promise<KeyMapping>;
2578
+ algTransformData?: AlgTransformData;
2579
+ }
2580
+ //#endregion
2581
+ //#region src/cubing/alg/keyboard.d.ts
2582
+ declare function keyToMove(keyMapping: KeyMapping | undefined, e: KeyboardEvent): AlgLeaf | null;
2583
+ //#endregion
2584
+ //#region src/cubing/alg/traversal.d.ts
2585
+ declare abstract class TraversalDownUp<DataDown, DataAlgUp, DataAlgNodeUp = DataAlgUp> {
2586
+ traverseAlgNode(algNode: AlgNode, dataDown: DataDown): DataAlgNodeUp;
2587
+ traverseIntoAlgNode(algNode: AlgNode, dataDown: DataDown): AlgNode;
2588
+ abstract traverseAlg(alg: Alg, dataDown: DataDown): DataAlgUp;
2589
+ abstract traverseGrouping(grouping: Grouping, dataDown: DataDown): DataAlgNodeUp;
2590
+ abstract traverseMove(move: Move, dataDown: DataDown): DataAlgNodeUp;
2591
+ abstract traverseCommutator(commutator: Commutator, dataDown: DataDown): DataAlgNodeUp;
2592
+ abstract traverseConjugate(conjugate: Conjugate, dataDown: DataDown): DataAlgNodeUp;
2593
+ abstract traversePause(pause: Pause, dataDown: DataDown): DataAlgNodeUp;
2594
+ abstract traverseNewline(newline: Newline, dataDown: DataDown): DataAlgNodeUp;
2595
+ abstract traverseLineComment(comment: LineComment, dataDown: DataDown): DataAlgNodeUp;
2596
+ }
2597
+ declare abstract class TraversalUp<DataAlgUp, DataAlgNodeUp = DataAlgUp> extends TraversalDownUp<undefined, DataAlgUp, DataAlgNodeUp> {
2598
+ traverseAlgNode(algNode: AlgNode): DataAlgNodeUp;
2599
+ traverseIntoAlgNode(algNode: AlgNode): AlgNode;
2600
+ abstract traverseAlg(alg: Alg): DataAlgUp;
2601
+ abstract traverseGrouping(grouping: Grouping): DataAlgNodeUp;
2602
+ abstract traverseMove(move: Move): DataAlgNodeUp;
2603
+ abstract traverseCommutator(commutator: Commutator): DataAlgNodeUp;
2604
+ abstract traverseConjugate(conjugate: Conjugate): DataAlgNodeUp;
2605
+ abstract traversePause(pause: Pause): DataAlgNodeUp;
2606
+ abstract traverseNewline(newline: Newline): DataAlgNodeUp;
2607
+ abstract traverseLineComment(comment: LineComment): DataAlgNodeUp;
2608
+ }
2609
+ declare function functionFromTraversal<DataDown, DataAlgUp, ConstructorArgs extends unknown[]>(traversalConstructor: {
2610
+ new (...args: ConstructorArgs): TraversalDownUp<DataDown, DataAlgUp, any>;
2611
+ }, constructorArgs?: ConstructorArgs): undefined extends DataDown ? (alg: Alg) => DataAlgUp : (alg: Alg, v: DataDown) => DataAlgUp;
2612
+ //#endregion
2613
+ //#region src/cubing/alg/url.d.ts
2614
+ interface AlgCubingNetOptions {
2615
+ alg?: Alg;
2616
+ setup?: Alg;
2617
+ title?: string;
2618
+ puzzle?: "1x1x1" | "2x2x2" | "3x3x3" | "4x4x4" | "5x5x5" | "6x6x6" | "7x7x7" | "8x8x8" | "9x9x9" | "10x10x10" | "11x11x11" | "12x12x12" | "13x13x13" | "14x14x14" | "16x16x16" | "17x17x17";
2619
+ stage?: "full" | "cross" | "F2L" | "LL" | "OLL" | "PLL" | "CLS" | "ELS" | "L6E" | "CMLL" | "WV" | "ZBLL" | "void";
2620
+ view?: "editor" | "playback" | "fullscreen";
2621
+ type?: "moves" | "reconstruction" | "alg" | "reconstruction-end-with-setup";
2622
+ }
2623
+ /** @deprecated */
2624
+ declare function experimentalAlgCubingNetLink(options: AlgCubingNetOptions): string;
2625
+ //#endregion
2626
+ export { PuzzleDescription as $, SimpleAlgIndexer as A, Move as At, KTransformation as B, VisualizationFormat as C, AlgLeaf as Ct, PuzzleID as D, Grouping as Dt, ExperimentalStickering as E, LineComment as Et, MillisecondDuration as F, ExperimentalNotationType as Ft, KTransformationData as G, KPatternData as H, MillisecondTimestamp as I, ExperimentalSerializationOptions as It, PUZZLE_BASE_SHAPES as J, KTransformationOrbitData as K, schreierSims as L, LeafCount as M, QuantumMove as Mt, LeafIndex as N, Conjugate as Nt, setTwistyDebug as O, GroupingModifications as Ot, NO_VALUE as P, Commutator as Pt, PuzzleCutType as Q, KPattern as R, TwistyAnimatedSVG as S, AlgBranch as St, backViewLayouts as T, Newline as Tt, KPatternOrbitData as U, KPuzzleDefinition as V, KPuzzleOrbitDefinition as W, PuzzleBaseShape as X, PUZZLE_CUT_TYPES as Y, PuzzleCutDescription as Z, cube2x2x2 as _, experimentalAppendMove as _t, functionFromTraversal as a, getPG3DNamedPuzzles as at, wcaEventInfo as b, SimplifyOptions as bt, PuzzleLoader as c, getPuzzleGeometryByName as ct, TwistyAlgEditor as d, PuzzleGeometryOptions as dt, PuzzleGeometry as et, Parsed as f, experimentalIs as ft, cube3x3x3 as g, Alg as gt, puzzles as h, AlgBuilder as ht, TraversalUp as i, StickerDatSticker as it, AlgIndexer as j, MoveModifications as jt, TreeAlgIndexer as k, Pause as kt, TwizzleLink as l, parsePuzzleDescription as lt, TwistyPlayerConfig as m, setAlgDebug as mt, experimentalAlgCubingNetLink as n, StickerDatAxis as nt, keyToMove as o, getPuzzleDescriptionString as ot, TwistyPlayer as p, Example as pt, PGNotation as q, TraversalDownUp as r, StickerDatFace as rt, KeyMapping as s, getPuzzleGeometryByDesc as st, AlgCubingNetOptions as t, StickerDat as tt, TwistyAlgViewer as u, Quat as ut, eventInfo as v, AppendCancelOptions as vt, BackViewLayout as w, AlgNode as wt, wcaEvents as x, Unit as xt, twizzleEvents as y, PuzzleSpecificSimplifyOptions as yt, KPuzzle as z };