@rednaxela101/cubing 0.63.5

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 (136) hide show
  1. package/README.md +120 -0
  2. package/alg/index.d.ts +1 -0
  3. package/bluetooth/index.d.ts +1 -0
  4. package/dist/bin/chunks/chunk-22VWCGBC.js +13 -0
  5. package/dist/bin/chunks/chunk-22VWCGBC.js.map +7 -0
  6. package/dist/bin/order.js +59 -0
  7. package/dist/bin/order.js.map +7 -0
  8. package/dist/bin/puzzle-geometry-bin.js +407 -0
  9. package/dist/bin/puzzle-geometry-bin.js.map +7 -0
  10. package/dist/bin/scramble.js +188 -0
  11. package/dist/bin/scramble.js.map +7 -0
  12. package/dist/bin/svg.js +56 -0
  13. package/dist/bin/svg.js.map +7 -0
  14. package/dist/lib/cubing/alg/index.d.ts +2 -0
  15. package/dist/lib/cubing/alg/index.js +43 -0
  16. package/dist/lib/cubing/alg/index.js.map +7 -0
  17. package/dist/lib/cubing/bluetooth/index.d.ts +189 -0
  18. package/dist/lib/cubing/bluetooth/index.js +2271 -0
  19. package/dist/lib/cubing/bluetooth/index.js.map +7 -0
  20. package/dist/lib/cubing/chunks/big-puzzle-orientation-BA6QHO5C.js +68 -0
  21. package/dist/lib/cubing/chunks/big-puzzle-orientation-BA6QHO5C.js.map +7 -0
  22. package/dist/lib/cubing/chunks/chunk-2VJB4TMH.js +1774 -0
  23. package/dist/lib/cubing/chunks/chunk-2VJB4TMH.js.map +7 -0
  24. package/dist/lib/cubing/chunks/chunk-52ZXJEUO.js +665 -0
  25. package/dist/lib/cubing/chunks/chunk-52ZXJEUO.js.map +7 -0
  26. package/dist/lib/cubing/chunks/chunk-56VZAEPF.js +274 -0
  27. package/dist/lib/cubing/chunks/chunk-56VZAEPF.js.map +7 -0
  28. package/dist/lib/cubing/chunks/chunk-7GUL3OBQ.js +9 -0
  29. package/dist/lib/cubing/chunks/chunk-7GUL3OBQ.js.map +7 -0
  30. package/dist/lib/cubing/chunks/chunk-7L7BJSIM.js +21 -0
  31. package/dist/lib/cubing/chunks/chunk-7L7BJSIM.js.map +7 -0
  32. package/dist/lib/cubing/chunks/chunk-AESPJKN6.js +265 -0
  33. package/dist/lib/cubing/chunks/chunk-AESPJKN6.js.map +7 -0
  34. package/dist/lib/cubing/chunks/chunk-C2Q347XS.js +89 -0
  35. package/dist/lib/cubing/chunks/chunk-C2Q347XS.js.map +7 -0
  36. package/dist/lib/cubing/chunks/chunk-CGBMJBU3.js +1195 -0
  37. package/dist/lib/cubing/chunks/chunk-CGBMJBU3.js.map +7 -0
  38. package/dist/lib/cubing/chunks/chunk-HZQONEMD.js +249 -0
  39. package/dist/lib/cubing/chunks/chunk-HZQONEMD.js.map +7 -0
  40. package/dist/lib/cubing/chunks/chunk-IAGCVPL3.js +1069 -0
  41. package/dist/lib/cubing/chunks/chunk-IAGCVPL3.js.map +7 -0
  42. package/dist/lib/cubing/chunks/chunk-NAPITA3L.js +1 -0
  43. package/dist/lib/cubing/chunks/chunk-NAPITA3L.js.map +7 -0
  44. package/dist/lib/cubing/chunks/chunk-XPDJUSZ7.js +1876 -0
  45. package/dist/lib/cubing/chunks/chunk-XPDJUSZ7.js.map +7 -0
  46. package/dist/lib/cubing/chunks/chunk-YSI6PF35.js +619 -0
  47. package/dist/lib/cubing/chunks/chunk-YSI6PF35.js.map +7 -0
  48. package/dist/lib/cubing/chunks/inside-LG2EAKCL.js +557 -0
  49. package/dist/lib/cubing/chunks/inside-LG2EAKCL.js.map +7 -0
  50. package/dist/lib/cubing/chunks/puzzles-dynamic-2x2x2-JYJJXB4V.js +142 -0
  51. package/dist/lib/cubing/chunks/puzzles-dynamic-2x2x2-JYJJXB4V.js.map +7 -0
  52. package/dist/lib/cubing/chunks/puzzles-dynamic-3x3x3-FYXD7SIU.js +365 -0
  53. package/dist/lib/cubing/chunks/puzzles-dynamic-3x3x3-FYXD7SIU.js.map +7 -0
  54. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js +132 -0
  55. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js.map +7 -0
  56. package/dist/lib/cubing/chunks/puzzles-dynamic-5x5x5-JUNRX27W.js +277 -0
  57. package/dist/lib/cubing/chunks/puzzles-dynamic-5x5x5-JUNRX27W.js.map +7 -0
  58. package/dist/lib/cubing/chunks/puzzles-dynamic-clock-USGQTDPO.js +836 -0
  59. package/dist/lib/cubing/chunks/puzzles-dynamic-clock-USGQTDPO.js.map +7 -0
  60. package/dist/lib/cubing/chunks/puzzles-dynamic-fto-WJHMLYCJ.js +100 -0
  61. package/dist/lib/cubing/chunks/puzzles-dynamic-fto-WJHMLYCJ.js.map +7 -0
  62. package/dist/lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js +224 -0
  63. package/dist/lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js.map +7 -0
  64. package/dist/lib/cubing/chunks/puzzles-dynamic-pyraminx-7UWX4HHI.js +93 -0
  65. package/dist/lib/cubing/chunks/puzzles-dynamic-pyraminx-7UWX4HHI.js.map +7 -0
  66. package/dist/lib/cubing/chunks/puzzles-dynamic-square1-PQEKBPFN.js +842 -0
  67. package/dist/lib/cubing/chunks/puzzles-dynamic-square1-PQEKBPFN.js.map +7 -0
  68. package/dist/lib/cubing/chunks/search-dynamic-sgs-2x2x2-XFKQ4VJS.js +125 -0
  69. package/dist/lib/cubing/chunks/search-dynamic-sgs-2x2x2-XFKQ4VJS.js.map +7 -0
  70. package/dist/lib/cubing/chunks/search-dynamic-sgs-megaminx-ZDOOLEDW.js +1564 -0
  71. package/dist/lib/cubing/chunks/search-dynamic-sgs-megaminx-ZDOOLEDW.js.map +7 -0
  72. package/dist/lib/cubing/chunks/search-dynamic-sgs-pyraminx-W6UJWBYY.js +108 -0
  73. package/dist/lib/cubing/chunks/search-dynamic-sgs-pyraminx-W6UJWBYY.js.map +7 -0
  74. package/dist/lib/cubing/chunks/search-dynamic-sgs-skewb-FXGKV4KD.js +125 -0
  75. package/dist/lib/cubing/chunks/search-dynamic-sgs-skewb-FXGKV4KD.js.map +7 -0
  76. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-YK6HA7BK.js +644 -0
  77. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-YK6HA7BK.js.map +7 -0
  78. package/dist/lib/cubing/chunks/search-dynamic-solve-3x3x3-DLMAGPXS.js +2549 -0
  79. package/dist/lib/cubing/chunks/search-dynamic-solve-3x3x3-DLMAGPXS.js.map +7 -0
  80. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-NONXQHOJ.js +2923 -0
  81. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-NONXQHOJ.js.map +7 -0
  82. package/dist/lib/cubing/chunks/search-dynamic-solve-fto-3GQ2HLSW.js +1405 -0
  83. package/dist/lib/cubing/chunks/search-dynamic-solve-fto-3GQ2HLSW.js.map +7 -0
  84. package/dist/lib/cubing/chunks/search-worker-entry.js +19 -0
  85. package/dist/lib/cubing/chunks/search-worker-entry.js.map +7 -0
  86. package/dist/lib/cubing/chunks/square1-stickerings-W2ZLZWIN.js +73 -0
  87. package/dist/lib/cubing/chunks/square1-stickerings-W2ZLZWIN.js.map +7 -0
  88. package/dist/lib/cubing/chunks/twips-2RNTWYNZ.js +433 -0
  89. package/dist/lib/cubing/chunks/twips-2RNTWYNZ.js.map +7 -0
  90. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-23XTPLIK.js +10 -0
  91. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-23XTPLIK.js.map +7 -0
  92. package/dist/lib/cubing/chunks/twisty-dynamic-3d-JO6OGKOF.js +2424 -0
  93. package/dist/lib/cubing/chunks/twisty-dynamic-3d-JO6OGKOF.js.map +7 -0
  94. package/dist/lib/cubing/index-BX6f56uo.d.ts +76 -0
  95. package/dist/lib/cubing/index-CcRu94bx.d.ts +2622 -0
  96. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -0
  97. package/dist/lib/cubing/kpuzzle/index.js +12 -0
  98. package/dist/lib/cubing/kpuzzle/index.js.map +7 -0
  99. package/dist/lib/cubing/notation/index.d.ts +32 -0
  100. package/dist/lib/cubing/notation/index.js +20 -0
  101. package/dist/lib/cubing/notation/index.js.map +7 -0
  102. package/dist/lib/cubing/outside-BCzgSYQ_.d.ts +38 -0
  103. package/dist/lib/cubing/protocol/index.d.ts +28 -0
  104. package/dist/lib/cubing/protocol/index.js +20 -0
  105. package/dist/lib/cubing/protocol/index.js.map +7 -0
  106. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -0
  107. package/dist/lib/cubing/puzzle-geometry/index.js +5024 -0
  108. package/dist/lib/cubing/puzzle-geometry/index.js.map +7 -0
  109. package/dist/lib/cubing/puzzles/index.d.ts +2 -0
  110. package/dist/lib/cubing/puzzles/index.js +23 -0
  111. package/dist/lib/cubing/puzzles/index.js.map +7 -0
  112. package/dist/lib/cubing/scramble/index.d.ts +2 -0
  113. package/dist/lib/cubing/scramble/index.js +16 -0
  114. package/dist/lib/cubing/scramble/index.js.map +7 -0
  115. package/dist/lib/cubing/search/index.d.ts +7 -0
  116. package/dist/lib/cubing/search/index.js +37 -0
  117. package/dist/lib/cubing/search/index.js.map +7 -0
  118. package/dist/lib/cubing/stream/index.d.ts +2 -0
  119. package/dist/lib/cubing/stream/index.js +111 -0
  120. package/dist/lib/cubing/stream/index.js.map +7 -0
  121. package/dist/lib/cubing/twisty/index.d.ts +2 -0
  122. package/dist/lib/cubing/twisty/index.js +6236 -0
  123. package/dist/lib/cubing/twisty/index.js.map +7 -0
  124. package/experimental-json-schema/kpuzzle/KPatternData.schema.json +34 -0
  125. package/experimental-json-schema/kpuzzle/KPuzzleDefinition.schema.json +97 -0
  126. package/experimental-json-schema/kpuzzle/KTransformationData.schema.json +27 -0
  127. package/kpuzzle/index.d.ts +1 -0
  128. package/notation/index.d.ts +1 -0
  129. package/package.json +146 -0
  130. package/protocol/index.d.ts +1 -0
  131. package/puzzle-geometry/index.d.ts +1 -0
  132. package/puzzles/index.d.ts +1 -0
  133. package/scramble/index.d.ts +1 -0
  134. package/search/index.d.ts +1 -0
  135. package/stream/index.d.ts +1 -0
  136. package/twisty/index.d.ts +1 -0
@@ -0,0 +1,2622 @@
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 "@rednaxela101/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 "@rednaxela101/cubing/alg";
331
+ * import { cube3x3x3 } from "@rednaxela101/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 "@rednaxela101/cubing/alg";
338
+ * import { cube3x3x3 } from "@rednaxela101/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 "@rednaxela101/cubing/alg";
347
+ * import { cube3x3x3 } from "@rednaxela101/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 "@rednaxela101/cubing/alg";
367
+ * import { cube3x3x3 } from "@rednaxela101/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
+ megaminx: boolean;
1170
+ pyraminx: boolean;
1171
+ square1: boolean;
1172
+ clock: boolean;
1173
+ skewb: boolean;
1174
+ fto: boolean;
1175
+ };
1176
+ type PuzzleID = keyof typeof puzzleIDs;
1177
+ declare class PuzzleIDRequestProp extends SimpleTwistyPropSource<PuzzleID | NoValueType> {
1178
+ getDefaultValue(): PuzzleID | NoValueType;
1179
+ }
1180
+ //#endregion
1181
+ //#region src/cubing/twisty/model/props/puzzle/display/StickeringRequestProp.d.ts
1182
+ type ExperimentalStickering = keyof typeof experimentalStickerings;
1183
+ declare class StickeringRequestProp extends SimpleTwistyPropSource<ExperimentalStickering | null> {
1184
+ getDefaultValue(): ExperimentalStickering | null;
1185
+ }
1186
+ //#endregion
1187
+ //#region src/cubing/twisty/model/props/viewer/BackViewProp.d.ts
1188
+ declare const backViewLayouts: {
1189
+ none: boolean;
1190
+ "side-by-side": boolean;
1191
+ "top-right": boolean;
1192
+ };
1193
+ type BackViewLayout = keyof typeof backViewLayouts;
1194
+ type BackViewLayoutWithAuto = BackViewLayout | "auto";
1195
+ declare class BackViewProp extends SimpleTwistyPropSource<BackViewLayoutWithAuto> {
1196
+ getDefaultValue(): BackViewLayoutWithAuto;
1197
+ }
1198
+ //#endregion
1199
+ //#region src/cubing/twisty/model/props/viewer/VisualizationProp.d.ts
1200
+ declare const visualizationFormats: {
1201
+ readonly "3D": true;
1202
+ readonly "2D": true;
1203
+ readonly "experimental-2D-LL": true;
1204
+ readonly "experimental-2D-LL-face": true;
1205
+ readonly PG3D: true;
1206
+ };
1207
+ type VisualizationFormat = keyof typeof visualizationFormats;
1208
+ type VisualizationFormatWithAuto = VisualizationFormat | "auto";
1209
+ declare class VisualizationFormatProp extends SimpleTwistyPropSource<VisualizationFormatWithAuto> {
1210
+ getDefaultValue(): VisualizationFormatWithAuto;
1211
+ }
1212
+ //#endregion
1213
+ //#region src/cubing/twisty/views/2D/TwistyAnimatedSVG.d.ts
1214
+ declare class TwistyAnimatedSVG {
1215
+ #private;
1216
+ kpuzzle: KPuzzle;
1217
+ private showUnknownOrientations;
1218
+ wrapperElement: HTMLElement;
1219
+ svgElement: SVGElement;
1220
+ gradientDefs: SVGDefsElement;
1221
+ private originalColors;
1222
+ private gradients;
1223
+ private svgID;
1224
+ private faceletStrokeWidth;
1225
+ private pieceSeparators;
1226
+ private bondedPieces;
1227
+ constructor(kpuzzle: KPuzzle, svgSource: string, experimentalStickeringMask?: StickeringMask, showUnknownOrientations?: boolean);
1228
+ drawPattern(pattern: KPattern, nextPattern?: KPattern, fraction?: number): void;
1229
+ draw(pattern: KPattern, nextPattern?: KPattern, fraction?: number): void;
1230
+ private faceletStyle;
1231
+ private newGradient;
1232
+ private elementID;
1233
+ private elementByID;
1234
+ }
1235
+ //#endregion
1236
+ //#region src/cubing/twisty/views/node-custom-element-shims.d.ts
1237
+ declare let HTMLElementShim: typeof HTMLElement;
1238
+ //#endregion
1239
+ //#region src/cubing/twisty/views/ManagedCustomElement.d.ts
1240
+ declare class ManagedCustomElement extends HTMLElementShim {
1241
+ readonly shadow: ShadowRoot;
1242
+ readonly contentWrapper: HTMLDivElement;
1243
+ constructor(options?: {
1244
+ mode?: "open" | "closed";
1245
+ });
1246
+ protected addCSS(cssSource: CSSStyleSheet): void;
1247
+ protected removeCSS(cssSource: CSSStyleSheet): void;
1248
+ addElement<T extends Node>(element: T): T;
1249
+ prependElement<T extends Node>(element: T): void;
1250
+ removeElement<T extends Node>(element: T): T;
1251
+ }
1252
+ //#endregion
1253
+ //#region src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts
1254
+ interface CatchUpMove {
1255
+ move: Move | null;
1256
+ amount: number;
1257
+ }
1258
+ declare class CatchUpMoveProp extends SimpleTwistyPropSource<CatchUpMove> {
1259
+ getDefaultValue(): CatchUpMove;
1260
+ protected canReuseValue(v1: CatchUpMove, v2: CatchUpMove): boolean;
1261
+ }
1262
+ //#endregion
1263
+ //#region src/cubing/twisty/model/props/timeline/PlayingInfoProp.d.ts
1264
+ type SimpleDirection = Direction.Forwards | Direction.Backwards;
1265
+ interface PlayingInfo {
1266
+ playing: boolean;
1267
+ direction: SimpleDirection;
1268
+ untilBoundary: BoundaryType;
1269
+ loop: boolean;
1270
+ }
1271
+ declare class PlayingInfoProp extends TwistyPropSource<PlayingInfo, Partial<PlayingInfo>> {
1272
+ getDefaultValue(): Promise<PlayingInfo>;
1273
+ protected derive(newInfo: Partial<PlayingInfo>, oldValuePromise: Promise<PlayingInfo>): Promise<PlayingInfo>;
1274
+ protected canReuseValue(v1: PlayingInfo, v2: PlayingInfo): boolean;
1275
+ }
1276
+ //#endregion
1277
+ //#region src/cubing/twisty/model/props/general/ArbitraryStringProp.d.ts
1278
+ declare class ArbitraryStringProp extends SimpleTwistyPropSource<string | null> {
1279
+ getDefaultValue(): string | null;
1280
+ }
1281
+ //#endregion
1282
+ //#region src/cubing/twisty/model/props/general/URLProp.d.ts
1283
+ declare class URLProp extends TwistyPropSource<URL | null, URL | string | null> {
1284
+ getDefaultValue(): URL | null;
1285
+ derive(input: URL | string | null): URL | null;
1286
+ }
1287
+ //#endregion
1288
+ //#region src/cubing/twisty/model/props/puzzle/state/AlgProp.d.ts
1289
+ declare class AlgIssues {
1290
+ readonly warnings: readonly string[];
1291
+ readonly errors: readonly string[];
1292
+ constructor(issues?: {
1293
+ warnings?: string[];
1294
+ errors?: string[];
1295
+ });
1296
+ add(issues?: {
1297
+ warnings?: string[];
1298
+ errors?: string[];
1299
+ }): AlgIssues;
1300
+ /** @deprecated */
1301
+ log(): void;
1302
+ }
1303
+ interface AlgWithIssues {
1304
+ alg: Alg;
1305
+ issues: AlgIssues;
1306
+ }
1307
+ declare class AlgProp extends TwistyPropSource<AlgWithIssues, Alg | string> {
1308
+ getDefaultValue(): AlgWithIssues;
1309
+ protected canReuseValue(v1: AlgWithIssues, v2: AlgWithIssues): boolean;
1310
+ protected derive(newAlg: Alg | string): Promise<AlgWithIssues>;
1311
+ }
1312
+ //#endregion
1313
+ //#region src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts
1314
+ type AlgTransformationPropInputs = {
1315
+ setupAlg: AlgWithIssues;
1316
+ kpuzzle: KPuzzle;
1317
+ };
1318
+ declare class AlgTransformationProp extends TwistyPropDerived<AlgTransformationPropInputs, KTransformation> {
1319
+ derive(input: AlgTransformationPropInputs): KTransformation;
1320
+ }
1321
+ //#endregion
1322
+ //#region src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts
1323
+ declare const setupToLocations: {
1324
+ start: boolean;
1325
+ end: boolean;
1326
+ };
1327
+ type SetupToLocation = keyof typeof setupToLocations;
1328
+ declare class SetupAnchorProp extends SimpleTwistyPropSource<SetupToLocation> {
1329
+ getDefaultValue(): SetupToLocation;
1330
+ }
1331
+ //#endregion
1332
+ //#region src/cubing/twisty/model/props/puzzle/state/AnchorTransformationProp.d.ts
1333
+ interface AnchorTransformationPropInputs {
1334
+ setupTransformation: KTransformation | null;
1335
+ setupAnchor: SetupToLocation;
1336
+ setupAlgTransformation: KTransformation;
1337
+ indexer: AlgIndexer;
1338
+ }
1339
+ declare class AnchorTransformationProp extends TwistyPropDerived<AnchorTransformationPropInputs, KTransformation> {
1340
+ derive(inputs: AnchorTransformationPropInputs): KTransformation;
1341
+ }
1342
+ //#endregion
1343
+ //#region src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts
1344
+ interface CurrentLeavesSimplifiedPropInputs {
1345
+ currentMoveInfo: CurrentMoveInfo;
1346
+ }
1347
+ interface CurrentLeavesSimplified {
1348
+ patternIndex: LeafIndex;
1349
+ movesFinishing: Move[];
1350
+ movesFinished: Move[];
1351
+ }
1352
+ declare class CurrentLeavesSimplifiedProp extends TwistyPropDerived<CurrentLeavesSimplifiedPropInputs, CurrentLeavesSimplified> {
1353
+ protected derive(inputs: CurrentLeavesSimplifiedPropInputs): CurrentLeavesSimplified;
1354
+ protected canReuseValue(v1: CurrentLeavesSimplified, v2: CurrentLeavesSimplified): boolean;
1355
+ }
1356
+ //#endregion
1357
+ //#region src/cubing/twisty/model/props/timeline/TimestampRequestProp.d.ts
1358
+ declare const smartTimestamps: {
1359
+ auto: boolean;
1360
+ start: boolean;
1361
+ end: boolean;
1362
+ anchor: boolean;
1363
+ "opposite-anchor": boolean;
1364
+ };
1365
+ type TimestampRequest = MillisecondTimestamp | keyof typeof smartTimestamps;
1366
+ declare class TimestampRequestProp extends SimpleTwistyPropSource<TimestampRequest> {
1367
+ getDefaultValue(): TimestampRequest;
1368
+ set(v: PromiseOrValue<TimestampRequest>): void;
1369
+ protected validInput(v: TimestampRequest): boolean;
1370
+ }
1371
+ //#endregion
1372
+ //#region src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts
1373
+ interface DetailedTimelineInfoInputs {
1374
+ timestampRequest: TimestampRequest;
1375
+ timeRange: TimeRange;
1376
+ setupAnchor: SetupToLocation;
1377
+ setupAlg: AlgWithIssues;
1378
+ }
1379
+ interface DetailedTimelineInfo {
1380
+ timestamp: MillisecondTimestamp;
1381
+ timeRange: TimeRange;
1382
+ atStart: boolean;
1383
+ atEnd: boolean;
1384
+ }
1385
+ declare class DetailedTimelineInfoProp extends TwistyPropDerived<DetailedTimelineInfoInputs, DetailedTimelineInfo> {
1386
+ #private;
1387
+ protected derive(inputs: DetailedTimelineInfoInputs): DetailedTimelineInfo;
1388
+ protected canReuseValue(v1: DetailedTimelineInfo, v2: DetailedTimelineInfo): boolean;
1389
+ }
1390
+ //#endregion
1391
+ //#region src/cubing/twisty/model/props/puzzle/state/CurrentMoveInfoProp.d.ts
1392
+ interface PositionPropInputs {
1393
+ indexer: AlgIndexer;
1394
+ detailedTimelineInfo: DetailedTimelineInfo;
1395
+ catchUpMove: CatchUpMove;
1396
+ }
1397
+ declare class CurrentMoveInfoProp extends TwistyPropDerived<PositionPropInputs, CurrentMoveInfo> {
1398
+ derive(inputs: PositionPropInputs): CurrentMoveInfo;
1399
+ }
1400
+ //#endregion
1401
+ //#region src/cubing/twisty/model/props/puzzle/state/CurrentPatternProp.d.ts
1402
+ interface CurrentTransformationPropInputs {
1403
+ anchoredStart: KTransformation;
1404
+ currentLeavesSimplified: CurrentLeavesSimplified;
1405
+ indexer: AlgIndexer;
1406
+ }
1407
+ declare class CurrentPatternProp extends TwistyPropDerived<CurrentTransformationPropInputs, KPattern> {
1408
+ derive(inputs: CurrentTransformationPropInputs): KPattern;
1409
+ }
1410
+ //#endregion
1411
+ //#region src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.d.ts
1412
+ type VisualizationStrategyPropInputs = {
1413
+ visualizationRequest: VisualizationFormatWithAuto;
1414
+ puzzleID: PuzzleID;
1415
+ };
1416
+ type VisualizationStrategy = "Cube3D" | "2D" | "experimental-2D-LL" | "experimental-2D-LL-face" | "PG3D" | "Square1_3D";
1417
+ declare class VisualizationStrategyProp extends TwistyPropDerived<VisualizationStrategyPropInputs, VisualizationStrategy> {
1418
+ derive(inputs: VisualizationStrategyPropInputs): VisualizationStrategy;
1419
+ }
1420
+ //#endregion
1421
+ //#region src/cubing/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts
1422
+ declare const indexerStrategyNames: {
1423
+ auto: boolean;
1424
+ simple: boolean;
1425
+ tree: boolean;
1426
+ simultaneous: boolean;
1427
+ };
1428
+ type IndexerStrategyName = keyof typeof indexerStrategyNames;
1429
+ declare class IndexerConstructorRequestProp extends SimpleTwistyPropSource<IndexerStrategyName> {
1430
+ getDefaultValue(): IndexerStrategyName;
1431
+ }
1432
+ //#endregion
1433
+ //#region src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts
1434
+ type IndexerConstructor = new (kpuzzle: KPuzzle, alg: Alg, options?: {
1435
+ animationTimelineLeaves?: AnimationTimelineLeaves | null;
1436
+ }) => AlgIndexer;
1437
+ interface IndexerConstructorPropInputs {
1438
+ puzzle: PuzzleID;
1439
+ alg: AlgWithIssues;
1440
+ visualizationStrategy: VisualizationStrategy;
1441
+ indexerConstructorRequest: IndexerStrategyName;
1442
+ animationTimelineLeaves: AnimationTimelineLeaves | null;
1443
+ }
1444
+ declare class IndexerConstructorProp extends TwistyPropDerived<IndexerConstructorPropInputs, IndexerConstructor> {
1445
+ derive(inputs: IndexerConstructorPropInputs): IndexerConstructor;
1446
+ }
1447
+ //#endregion
1448
+ //#region src/cubing/twisty/model/props/puzzle/state/IndexerProp.d.ts
1449
+ type IndexerPropInputs = {
1450
+ indexerConstructor: IndexerConstructor;
1451
+ algWithIssues: AlgWithIssues;
1452
+ kpuzzle: KPuzzle;
1453
+ animationTimelineLeaves: AnimationTimelineLeaves | null;
1454
+ };
1455
+ declare class IndexerProp extends TwistyPropDerived<IndexerPropInputs, AlgIndexer> {
1456
+ derive(input: IndexerPropInputs): AlgIndexer;
1457
+ }
1458
+ //#endregion
1459
+ //#region src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts
1460
+ interface LegacyPositionPropInputs {
1461
+ currentMoveInfo: CurrentMoveInfo;
1462
+ currentPattern: KPattern;
1463
+ }
1464
+ declare class LegacyPositionProp extends TwistyPropDerived<LegacyPositionPropInputs, PuzzlePosition> {
1465
+ derive(inputs: LegacyPositionPropInputs): PuzzlePosition;
1466
+ }
1467
+ //#endregion
1468
+ //#region src/cubing/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts
1469
+ declare class PuzzleAlgProp extends TwistyPropDerived<{
1470
+ algWithIssues: AlgWithIssues;
1471
+ kpuzzle: KPuzzle;
1472
+ }, AlgWithIssues> {
1473
+ derive(inputs: {
1474
+ algWithIssues: AlgWithIssues;
1475
+ kpuzzle: KPuzzle;
1476
+ }): Promise<AlgWithIssues>;
1477
+ }
1478
+ //#endregion
1479
+ //#region src/cubing/twisty/model/props/puzzle/state/SetupTransformationProp.d.ts
1480
+ declare class SetupTransformationProp extends SimpleTwistyPropSource<KTransformation | null> {
1481
+ getDefaultValue(): KTransformation | null;
1482
+ }
1483
+ //#endregion
1484
+ //#region src/cubing/puzzles/events.d.ts
1485
+ interface EventInfo {
1486
+ puzzleID: PuzzleID;
1487
+ eventName: string;
1488
+ /** Whether/how scrambles are implemented in `randomScrambleForEvent(…)` in this version of `cubing.js` */
1489
+ scramblesImplemented: null | "random-state" | "random-moves";
1490
+ }
1491
+ declare const wcaEvents: Record<string, EventInfo>;
1492
+ /** @category Event Info */
1493
+ declare function wcaEventInfo(event: string): EventInfo | null;
1494
+ declare const twizzleEvents: Record<string, EventInfo>;
1495
+ /** @category Event Info */
1496
+ declare function eventInfo(event: string): EventInfo | null;
1497
+ //#endregion
1498
+ //#region src/cubing/puzzles/implementations/2x2x2/index.d.ts
1499
+ /** @category Specific Puzzles */
1500
+ declare const cube2x2x2: PuzzleLoader;
1501
+ //#endregion
1502
+ //#region src/cubing/puzzles/implementations/3x3x3/index.d.ts
1503
+ /** @category Specific Puzzles */
1504
+ declare const cube3x3x3: {
1505
+ id: string;
1506
+ fullName: string;
1507
+ inventedBy: string[];
1508
+ inventionYear: number;
1509
+ kpuzzle: () => Promise<KPuzzle>;
1510
+ svg: () => Promise<string>;
1511
+ llSVG: () => Promise<string>;
1512
+ llFaceSVG: () => Promise<string>;
1513
+ pg: () => Promise<PuzzleGeometry>;
1514
+ stickeringMask: (stickering: ExperimentalStickering) => Promise<StickeringMask>;
1515
+ stickerings: () => Promise<string[]>;
1516
+ puzzleSpecificSimplifyOptions: PuzzleSpecificSimplifyOptions;
1517
+ keyMapping: () => Promise<{
1518
+ [key: string]: AlgLeaf;
1519
+ [key: number]: AlgLeaf;
1520
+ }>;
1521
+ algTransformData: AlgTransformData;
1522
+ };
1523
+ //#endregion
1524
+ //#region src/cubing/puzzles/index.d.ts
1525
+ /** @category All Puzzles */
1526
+ declare const puzzles: Record<string, PuzzleLoader>;
1527
+ //#endregion
1528
+ //#region src/cubing/twisty/model/props/puzzle/structure/KPuzzleProp.d.ts
1529
+ declare class KPuzzleProp extends TwistyPropDerived<{
1530
+ puzzleLoader: PuzzleLoader;
1531
+ }, KPuzzle> {
1532
+ derive(inputs: {
1533
+ puzzleLoader: PuzzleLoader;
1534
+ }): Promise<KPuzzle>;
1535
+ }
1536
+ //#endregion
1537
+ //#region src/cubing/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts
1538
+ declare class PGPuzzleDescriptionStringProp extends SimpleTwistyPropSource<PuzzleDescriptionString | NoValueType> {
1539
+ getDefaultValue(): PuzzleDescriptionString | NoValueType;
1540
+ }
1541
+ //#endregion
1542
+ //#region src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts
1543
+ declare class PuzzleIDProp extends TwistyPropDerived<{
1544
+ puzzleLoader: PuzzleLoader;
1545
+ }, PuzzleID> {
1546
+ derive(inputs: {
1547
+ puzzleLoader: PuzzleLoader;
1548
+ }): Promise<PuzzleID>;
1549
+ }
1550
+ //#endregion
1551
+ //#region src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts
1552
+ interface PuzzleLoaderPropInputs {
1553
+ puzzleIDRequest: PuzzleID | NoValueType;
1554
+ puzzleDescriptionRequest: PuzzleDescriptionString | NoValueType;
1555
+ }
1556
+ declare class PuzzleLoaderProp extends TwistyPropDerived<PuzzleLoaderPropInputs, PuzzleLoader> {
1557
+ derive(inputs: PuzzleLoaderPropInputs): PuzzleLoader;
1558
+ }
1559
+ //#endregion
1560
+ //#region src/cubing/twisty/controllers/TwistyPlayerController.d.ts
1561
+ declare class TwistyPlayerController {
1562
+ private model;
1563
+ animationController: TwistyAnimationController;
1564
+ constructor(model: TwistyPlayerModel, delegate: TwistyAnimationControllerDelegate);
1565
+ jumpToStart(options?: {
1566
+ flash: boolean;
1567
+ }): void;
1568
+ jumpToEnd(options?: {
1569
+ flash: boolean;
1570
+ }): void;
1571
+ togglePlay(play?: boolean): void;
1572
+ visitTwizzleLink(): Promise<void>;
1573
+ }
1574
+ //#endregion
1575
+ //#region src/cubing/twisty/model/props/viewer/ViewerLinkProp.d.ts
1576
+ declare const viewerLinkPages: {
1577
+ twizzle: boolean;
1578
+ "experimental-twizzle-explorer": boolean;
1579
+ none: boolean;
1580
+ };
1581
+ type ViewerLinkPage = keyof typeof viewerLinkPages;
1582
+ type ViewerLinkPageWithAuto = ViewerLinkPage | "auto";
1583
+ declare class ViewerLinkProp extends SimpleTwistyPropSource<ViewerLinkPageWithAuto> {
1584
+ getDefaultValue(): ViewerLinkPageWithAuto;
1585
+ }
1586
+ //#endregion
1587
+ //#region src/cubing/twisty/model/props/viewer/ButtonAppearanceProp.d.ts
1588
+ declare const buttonIcons: string[];
1589
+ type ButtonIcon = (typeof buttonIcons)[number];
1590
+ interface ButtonAppearance {
1591
+ enabled: boolean;
1592
+ icon: ButtonIcon;
1593
+ title: string;
1594
+ hidden?: boolean;
1595
+ }
1596
+ type ButtonAppearances = Record<ButtonCommand, ButtonAppearance>;
1597
+ interface ButtonAppearancePropInputs {
1598
+ coarseTimelineInfo: CoarseTimelineInfo;
1599
+ viewerLink: ViewerLinkPageWithAuto;
1600
+ }
1601
+ declare class ButtonAppearanceProp extends TwistyPropDerived<ButtonAppearancePropInputs, ButtonAppearances> {
1602
+ derive(inputs: ButtonAppearancePropInputs): ButtonAppearances;
1603
+ }
1604
+ //#endregion
1605
+ //#region src/cubing/twisty/model/props/viewer/ColorSchemeRequestProp.d.ts
1606
+ declare const colorSchemes: {
1607
+ light: boolean;
1608
+ dark: boolean;
1609
+ };
1610
+ type ColorScheme = keyof typeof colorSchemes;
1611
+ type ColorSchemeWithAuto = ColorScheme | "auto";
1612
+ declare class ColorSchemeRequestProp extends SimpleTwistyPropSource<ColorSchemeWithAuto> {
1613
+ getDefaultValue(): ColorSchemeWithAuto;
1614
+ }
1615
+ //#endregion
1616
+ //#region src/cubing/twisty/views/control-panel/TwistyButtons.d.ts
1617
+ declare const buttonCommands: {
1618
+ fullscreen: boolean;
1619
+ "jump-to-start": boolean;
1620
+ "play-step-backwards": boolean;
1621
+ "play-pause": boolean;
1622
+ "play-step": boolean;
1623
+ "jump-to-end": boolean;
1624
+ "twizzle-link": boolean;
1625
+ };
1626
+ type ButtonCommand = keyof typeof buttonCommands;
1627
+ declare class TwistyButtons extends ManagedCustomElement {
1628
+ #private;
1629
+ model?: TwistyPlayerModel | undefined;
1630
+ controller?: TwistyPlayerController | undefined;
1631
+ private defaultFullscreenElement?;
1632
+ buttons: Record<ButtonCommand, TwistyButton> | null;
1633
+ constructor(model?: TwistyPlayerModel | undefined, controller?: TwistyPlayerController | undefined, defaultFullscreenElement?: HTMLElement | undefined);
1634
+ connectedCallback(): void;
1635
+ onFullscreenButton(): Promise<void>;
1636
+ update(buttonAppearances: ButtonAppearances): Promise<void>;
1637
+ updateColorScheme(colorScheme: ColorScheme): void;
1638
+ }
1639
+ declare class TwistyButton extends ManagedCustomElement {
1640
+ #private;
1641
+ htmlButton: HTMLButtonElement;
1642
+ updateColorScheme(colorScheme: ColorScheme): void;
1643
+ connectedCallback(): void;
1644
+ setIcon(iconName: ButtonIcon): void;
1645
+ }
1646
+ //#endregion
1647
+ //#region src/cubing/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts
1648
+ interface CoarseTimelineInfoInputs {
1649
+ playingInfo: PlayingInfo;
1650
+ detailedTimelineInfo: DetailedTimelineInfo;
1651
+ }
1652
+ interface CoarseTimelineInfo {
1653
+ playing: boolean;
1654
+ atStart: boolean;
1655
+ atEnd: boolean;
1656
+ }
1657
+ declare class CoarseTimelineInfoProp extends TwistyPropDerived<CoarseTimelineInfoInputs, CoarseTimelineInfo> {
1658
+ protected derive(inputs: CoarseTimelineInfoInputs): CoarseTimelineInfo;
1659
+ protected canReuseValue(v1: CoarseTimelineInfo, v2: CoarseTimelineInfo): boolean;
1660
+ }
1661
+ //#endregion
1662
+ //#region src/cubing/twisty/model/props/timeline/TempoScaleProp.d.ts
1663
+ declare class TempoScaleProp extends TwistyPropSource<number, number> {
1664
+ getDefaultValue(): number;
1665
+ derive(v: number): number;
1666
+ }
1667
+ //#endregion
1668
+ //#region src/cubing/twisty/model/props/viewer/ControlPanelProp.d.ts
1669
+ declare const controlsLocations: {
1670
+ "bottom-row": boolean;
1671
+ none: boolean;
1672
+ };
1673
+ type ControlsLocation = keyof typeof controlsLocations;
1674
+ type ControlPanelThemeWithAuto = ControlsLocation | "auto";
1675
+ declare class ControlPanelProp extends SimpleTwistyPropSource<ControlPanelThemeWithAuto> {
1676
+ getDefaultValue(): ControlPanelThemeWithAuto;
1677
+ }
1678
+ //#endregion
1679
+ //#region src/cubing/twisty/model/props/viewer/TimeRangeProp.d.ts
1680
+ declare class TimeRangeProp extends TwistyPropDerived<{
1681
+ indexer: AlgIndexer;
1682
+ }, TimeRange> {
1683
+ derive(inputs: {
1684
+ indexer: AlgIndexer;
1685
+ }): TimeRange;
1686
+ }
1687
+ //#endregion
1688
+ //#region src/cubing/twisty/model/props/puzzle/display/FaceletScaleProp.d.ts
1689
+ type FaceletScale = "auto" | number;
1690
+ declare class FaceletScaleProp extends SimpleTwistyPropSource<FaceletScale> {
1691
+ getDefaultValue(): FaceletScale;
1692
+ }
1693
+ //#endregion
1694
+ //#region src/cubing/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts
1695
+ type FoundationDisplay = "auto" | "opaque" | "none";
1696
+ declare class FoundationDisplayProp extends SimpleTwistyPropSource<FoundationDisplay> {
1697
+ getDefaultValue(): FoundationDisplay;
1698
+ }
1699
+ //#endregion
1700
+ //#region src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.d.ts
1701
+ declare const hintFaceletStyles: {
1702
+ floating: boolean;
1703
+ none: boolean;
1704
+ };
1705
+ type HintFaceletStyle = keyof typeof hintFaceletStyles;
1706
+ type HintFaceletStyleWithAuto = HintFaceletStyle | "auto";
1707
+ declare class HintFaceletProp extends SimpleTwistyPropSource<HintFaceletStyleWithAuto> {
1708
+ getDefaultValue(): HintFaceletStyleWithAuto;
1709
+ }
1710
+ //#endregion
1711
+ //#region src/cubing/twisty/model/props/puzzle/display/HintFaceletsElevationProp.d.ts
1712
+ type HintFaceletsElevationRequest = "auto" | number;
1713
+ declare class HintFaceletsElevationProp extends SimpleTwistyPropSource<"auto" | number> {
1714
+ getDefaultValue(): "auto" | number;
1715
+ }
1716
+ //#endregion
1717
+ //#region src/cubing/twisty/model/props/puzzle/display/InitialHintFaceletsAnimationProp.d.ts
1718
+ type InitialHintFaceletsAnimation = "auto" | "always" | "none";
1719
+ declare class InitialHintFaceletsAnimationProp extends SimpleTwistyPropSource<InitialHintFaceletsAnimation> {
1720
+ getDefaultValue(): InitialHintFaceletsAnimation;
1721
+ }
1722
+ //#endregion
1723
+ //#region src/cubing/twisty/model/props/puzzle/display/SpriteProp.d.ts
1724
+ type SpritePropInputs = {
1725
+ spriteURL: URL | null;
1726
+ };
1727
+ declare class SpriteProp extends TwistyPropDerived<SpritePropInputs, Texture | null> {
1728
+ derive(inputs: SpritePropInputs): Promise<Texture | null>;
1729
+ }
1730
+ //#endregion
1731
+ //#region src/cubing/twisty/model/props/puzzle/display/StickeringMaskProp.d.ts
1732
+ interface StickeringMaskPropInputs {
1733
+ stickeringMaskRequest: StickeringMask | null;
1734
+ stickeringRequest: ExperimentalStickering | null;
1735
+ puzzleLoader: PuzzleLoader;
1736
+ }
1737
+ declare class StickeringMaskProp extends TwistyPropDerived<StickeringMaskPropInputs, StickeringMask> {
1738
+ getDefaultValue(): StickeringMask;
1739
+ derive(inputs: StickeringMaskPropInputs): Promise<StickeringMask>;
1740
+ }
1741
+ //#endregion
1742
+ //#region src/cubing/twisty/model/props/puzzle/display/StickeringMaskRequestProp.d.ts
1743
+ declare class StickeringMaskRequestProp extends TwistyPropSource<StickeringMask | null, string | StickeringMask | null> {
1744
+ getDefaultValue(): StickeringMask | null;
1745
+ derive(input: string | StickeringMask | null): StickeringMask | null;
1746
+ }
1747
+ //#endregion
1748
+ //#region src/cubing/twisty/model/props/puzzle/state/DragInputProp.d.ts
1749
+ declare const dragInputModes: {
1750
+ auto: boolean;
1751
+ none: boolean;
1752
+ };
1753
+ type DragInputMode = keyof typeof dragInputModes;
1754
+ declare class DragInputProp extends SimpleTwistyPropSource<DragInputMode> {
1755
+ getDefaultValue(): DragInputMode;
1756
+ }
1757
+ //#endregion
1758
+ //#region src/cubing/twisty/model/props/puzzle/state/MovePressCancelOptions.d.ts
1759
+ declare class MovePressCancelOptions extends SimpleTwistyPropSource<AppendCancelOptions> {
1760
+ getDefaultValue(): AppendCancelOptions;
1761
+ }
1762
+ //#endregion
1763
+ //#region src/cubing/twisty/model/props/puzzle/state/MovePressInputProp.d.ts
1764
+ declare const movePressInputNames: {
1765
+ auto: boolean;
1766
+ none: boolean;
1767
+ basic: boolean;
1768
+ };
1769
+ type MovePressInput = keyof typeof movePressInputNames;
1770
+ declare class MovePressInputProp extends SimpleTwistyPropSource<MovePressInput> {
1771
+ getDefaultValue(): MovePressInput;
1772
+ }
1773
+ //#endregion
1774
+ //#region src/cubing/twisty/model/props/viewer/BackgroundProp.d.ts
1775
+ declare const backgroundThemes: {
1776
+ checkered: boolean;
1777
+ "checkered-transparent": boolean;
1778
+ none: boolean;
1779
+ };
1780
+ type BackgroundTheme = keyof typeof backgroundThemes;
1781
+ type BackgroundThemeWithAuto = BackgroundTheme | "auto";
1782
+ declare class BackgroundProp extends SimpleTwistyPropSource<BackgroundThemeWithAuto> {
1783
+ getDefaultValue(): BackgroundThemeWithAuto;
1784
+ }
1785
+ //#endregion
1786
+ //#region src/cubing/twisty/model/props/viewer/ColorSchemeProp.d.ts
1787
+ interface ColorSchemePropInputs {
1788
+ colorSchemeRequest: ColorSchemeWithAuto;
1789
+ }
1790
+ declare class ColorSchemeProp extends TwistyPropDerived<ColorSchemePropInputs, ColorScheme> {
1791
+ protected derive(inputs: ColorSchemePropInputs): ColorScheme;
1792
+ }
1793
+ //#endregion
1794
+ //#region src/cubing/twisty/model/props/viewer/DOMElementReferenceProp.d.ts
1795
+ declare class DOMElementReferenceProp extends SimpleTwistyPropSource<Element | null> {
1796
+ getDefaultValue(): Element | null;
1797
+ }
1798
+ //#endregion
1799
+ //#region src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts
1800
+ type CoordinateDegrees = number;
1801
+ interface OrbitCoordinates {
1802
+ latitude: CoordinateDegrees;
1803
+ longitude: CoordinateDegrees;
1804
+ distance: number;
1805
+ }
1806
+ type OrbitCoordinatesRequest = Partial<OrbitCoordinates> | "auto";
1807
+ declare class OrbitCoordinatesRequestProp extends TwistyPropSource<OrbitCoordinatesRequest, Partial<OrbitCoordinates> | "auto"> {
1808
+ getDefaultValue(): OrbitCoordinatesRequest;
1809
+ protected canReuseValue(v1: OrbitCoordinates, v2: OrbitCoordinates): boolean;
1810
+ protected derive(newCoordinates: Partial<OrbitCoordinates> | "auto", oldValuePromise: Promise<OrbitCoordinatesRequest>): Promise<OrbitCoordinatesRequest>;
1811
+ }
1812
+ //#endregion
1813
+ //#region src/cubing/twisty/model/props/viewer/LatitudeLimit.d.ts
1814
+ declare class LatitudeLimitProp extends SimpleTwistyPropSource<CoordinateDegrees> {
1815
+ getDefaultValue(): CoordinateDegrees;
1816
+ }
1817
+ //#endregion
1818
+ //#region src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts
1819
+ interface OrbitCoordinatesPropInputs {
1820
+ orbitCoordinatesRequest: OrbitCoordinatesRequest;
1821
+ latitudeLimit: CoordinateDegrees;
1822
+ puzzleID: PuzzleID;
1823
+ strategy: VisualizationStrategy;
1824
+ }
1825
+ declare class OrbitCoordinatesProp extends TwistyPropDerived<OrbitCoordinatesPropInputs, OrbitCoordinates> {
1826
+ canReuseValue(v1: OrbitCoordinates, v2: OrbitCoordinates): boolean;
1827
+ derive(inputs: OrbitCoordinatesPropInputs): Promise<OrbitCoordinates>;
1828
+ }
1829
+ //#endregion
1830
+ //#region src/cubing/twisty/model/TwistySceneModel.d.ts
1831
+ declare class TwistySceneModel {
1832
+ twistyPlayerModel: TwistyPlayerModel;
1833
+ background: BackgroundProp;
1834
+ colorSchemeRequest: ColorSchemeRequestProp;
1835
+ dragInput: DragInputProp;
1836
+ foundationDisplay: FoundationDisplayProp;
1837
+ foundationStickerSpriteURL: URLProp;
1838
+ fullscreenElement: DOMElementReferenceProp;
1839
+ hintFacelet: HintFaceletProp;
1840
+ hintStickerSpriteURL: URLProp;
1841
+ initialHintFaceletsAnimation: InitialHintFaceletsAnimationProp;
1842
+ hintFaceletsElevation: HintFaceletsElevationProp;
1843
+ latitudeLimit: LatitudeLimitProp;
1844
+ movePressInput: MovePressInputProp;
1845
+ movePressCancelOptions: MovePressCancelOptions;
1846
+ orbitCoordinatesRequest: OrbitCoordinatesRequestProp;
1847
+ stickeringMaskRequest: StickeringMaskRequestProp;
1848
+ stickeringRequest: StickeringRequestProp;
1849
+ faceletScale: FaceletScaleProp;
1850
+ colorScheme: ColorSchemeProp;
1851
+ foundationStickerSprite: SpriteProp;
1852
+ hintStickerSprite: SpriteProp;
1853
+ orbitCoordinates: OrbitCoordinatesProp;
1854
+ stickeringMask: StickeringMaskProp;
1855
+ constructor(twistyPlayerModel: TwistyPlayerModel);
1856
+ }
1857
+ //#endregion
1858
+ //#region src/cubing/twisty/model/TwistyPlayerModel.d.ts
1859
+ type Without<T, K extends string[]> = Pick<T, Exclude<keyof T, K[number]>>;
1860
+ declare class TwistyPlayerModel {
1861
+ userVisibleErrorTracker: UserVisibleErrorTracker;
1862
+ /******************************** Depth 0 ********************************/
1863
+ alg: AlgProp;
1864
+ backView: BackViewProp;
1865
+ controlPanel: ControlPanelProp;
1866
+ catchUpMove: CatchUpMoveProp;
1867
+ indexerConstructorRequest: IndexerConstructorRequestProp;
1868
+ playingInfo: PlayingInfoProp;
1869
+ puzzleDescriptionRequest: PGPuzzleDescriptionStringProp;
1870
+ puzzleIDRequest: PuzzleIDRequestProp;
1871
+ setupAnchor: SetupAnchorProp;
1872
+ setupAlg: AlgProp;
1873
+ setupTransformation: SetupTransformationProp;
1874
+ tempoScale: TempoScaleProp;
1875
+ timestampRequest: TimestampRequestProp;
1876
+ viewerLink: ViewerLinkProp;
1877
+ visualizationFormat: VisualizationFormatProp;
1878
+ title: ArbitraryStringProp;
1879
+ videoURL: URLProp;
1880
+ competitionID: ArbitraryStringProp;
1881
+ /**
1882
+ * `<twisty-player>` internally supports associating custom timing information
1883
+ * with moves, but there is not an API for this yet. In order to support
1884
+ * exploratory use cases for such a feature in the future, this property
1885
+ * allows setting timeline information.
1886
+ *
1887
+ * Note that this feature may not work as expected when combined with other
1888
+ * features. In particular, it will cause sync issues with an associated
1889
+ * `<twisty-alg-viewer>` depending on how the alg/moves are constructed.
1890
+ *
1891
+ * Usage example:
1892
+ *
1893
+ * ```ts
1894
+ * import { Move, Pause } from "@rednaxela101/cubing/alg";
1895
+ * import { TwistyPlayer } from "@rednaxela101/cubing/twisty";
1896
+ *
1897
+ * const player = document.body.appendChild(new TwistyPlayer());
1898
+ * player.alg = "R U' D2 R'";
1899
+ *
1900
+ * // Note that:
1901
+ * // - The leaves must match those of the alg. (No consistency checks are performed at this time.)
1902
+ * // - Leaves may overlap if they can be simultaneously animated.
1903
+ * // - 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.
1904
+ * player.experimentalModel.animationTimelineLeavesRequest.set([
1905
+ * { animLeaf: new Move("R", 1), start: 0, end: 200 },
1906
+ * { animLeaf: new Pause(), start: 200, end: 218 },
1907
+ * { animLeaf: new Move("U", -1), start: 218, end: 370 },
1908
+ * { animLeaf: new Move("D", 2), start: 249, end: 520 },
1909
+ * { animLeaf: new Pause(), start: 520, end: 530 },
1910
+ * { animLeaf: new Move("R", -1), start: 530, end: 790 },
1911
+ * ]);
1912
+ * ```
1913
+ */
1914
+ animationTimelineLeavesRequest: AnimationTimelineLeavesRequestProp;
1915
+ /******************************** Depth 1 ********************************/
1916
+ puzzleLoader: PuzzleLoaderProp;
1917
+ /******************************** Depth 2 ********************************/
1918
+ kpuzzle: KPuzzleProp;
1919
+ puzzleID: PuzzleIDProp;
1920
+ /******************************** Depth 3 ********************************/
1921
+ puzzleAlg: PuzzleAlgProp;
1922
+ puzzleSetupAlg: PuzzleAlgProp;
1923
+ visualizationStrategy: VisualizationStrategyProp;
1924
+ /******************************** Depth 4 ********************************/
1925
+ indexerConstructor: IndexerConstructorProp;
1926
+ setupAlgTransformation: AlgTransformationProp;
1927
+ /******************************** Depth 5 ********************************/
1928
+ indexer: IndexerProp;
1929
+ /******************************** Depth 6 ********************************/
1930
+ anchorTransformation: AnchorTransformationProp;
1931
+ timeRange: TimeRangeProp;
1932
+ /******************************** Depth 7 ********************************/
1933
+ detailedTimelineInfo: DetailedTimelineInfoProp;
1934
+ /******************************** Depth 8 ********************************/
1935
+ coarseTimelineInfo: CoarseTimelineInfoProp;
1936
+ currentMoveInfo: CurrentMoveInfoProp;
1937
+ /******************************** Depth 9 ********************************/
1938
+ buttonAppearance: ButtonAppearanceProp;
1939
+ currentLeavesSimplified: CurrentLeavesSimplifiedProp;
1940
+ /******************************** Depth 10 ********************************/
1941
+ currentPattern: CurrentPatternProp;
1942
+ /******************************** Depth 11 ********************************/
1943
+ legacyPosition: LegacyPositionProp;
1944
+ twistySceneModel: TwistySceneModel;
1945
+ twizzleLink(): Promise<string>;
1946
+ experimentalAddAlgLeaf(algLeaf: AlgLeaf, options?: AppendOptions): void;
1947
+ experimentalAddMove(flexibleMove: Move | string, options?: Without<AppendOptions, ["puzzleLoader", "puzzleSpecificSimplifyOptions"]>): void;
1948
+ experimentalRemoveFinalChild(): void;
1949
+ }
1950
+ //#endregion
1951
+ //#region src/cubing/twisty/controllers/TwistyAnimationController.d.ts
1952
+ interface TwistyAnimationControllerDelegate {
1953
+ flash(): void;
1954
+ }
1955
+ declare class TwistyAnimationController {
1956
+ #private;
1957
+ private delegate;
1958
+ private playing;
1959
+ private direction;
1960
+ private catchUpHelper;
1961
+ private model;
1962
+ private lastDatestamp;
1963
+ private lastTimestampPromise;
1964
+ private scheduler;
1965
+ constructor(model: TwistyPlayerModel, delegate: TwistyAnimationControllerDelegate);
1966
+ onPlayingProp(playingInfo: PlayingInfo): Promise<void>;
1967
+ onCatchUpMoveProp(catchUpMove: CatchUpMove): Promise<void>;
1968
+ jumpToStart(options?: {
1969
+ flash: boolean;
1970
+ }): void;
1971
+ jumpToEnd(options?: {
1972
+ flash: boolean;
1973
+ }): void;
1974
+ playPause(): void;
1975
+ play(options?: {
1976
+ direction?: SimpleDirection;
1977
+ untilBoundary?: BoundaryType;
1978
+ autoSkipToOtherEndIfStartingAtBoundary?: boolean;
1979
+ loop?: boolean;
1980
+ }): void;
1981
+ pause(): void;
1982
+ animFrame(frameDatestamp: MillisecondTimestamp): Promise<void>;
1983
+ }
1984
+ //#endregion
1985
+ //#region src/cubing/vendor/mit/three/examples/jsm/libs/stats.modified.module.d.ts
1986
+ /**
1987
+ * @author mrdoob / http://mrdoob.com/
1988
+ * ESM conversion by Lucas Garron, 2021-12-21
1989
+ */
1990
+ declare class Stats {
1991
+ mode: number;
1992
+ dom: HTMLDivElement;
1993
+ constructor();
1994
+ addPanel(panel: StatsPanel): StatsPanel;
1995
+ showPanel(id: number): void;
1996
+ beginTime: number;
1997
+ prevTime: number;
1998
+ frames: number;
1999
+ fpsPanel: StatsPanel;
2000
+ msPanel: StatsPanel;
2001
+ memPanel: StatsPanel | null;
2002
+ REVISION: number;
2003
+ begin(): void;
2004
+ end(): number;
2005
+ update(): void;
2006
+ }
2007
+ declare class StatsPanel {
2008
+ private name;
2009
+ private fg;
2010
+ private bg;
2011
+ min: number;
2012
+ max: number;
2013
+ dom: HTMLCanvasElement;
2014
+ context: CanvasRenderingContext2D;
2015
+ constructor(name: string, fg: string, bg: string);
2016
+ update(value: number, maxValue: number): void;
2017
+ }
2018
+ //#endregion
2019
+ //#region src/cubing/twisty/controllers/RenderScheduler.d.ts
2020
+ interface Schedulable {
2021
+ scheduleRender(): void;
2022
+ }
2023
+ //#endregion
2024
+ //#region src/cubing/twisty/views/3D/DragTracker.d.ts
2025
+ interface DragMovementInfo {
2026
+ attachedInfo: Record<any, any>;
2027
+ movementX: number;
2028
+ movementY: number;
2029
+ elapsedMs: number;
2030
+ }
2031
+ interface PressInfo {
2032
+ normalizedX: number;
2033
+ normalizedY: number;
2034
+ rightClick: boolean;
2035
+ keys: {
2036
+ altKey: boolean;
2037
+ ctrlOrMetaKey: boolean;
2038
+ shiftKey: boolean;
2039
+ };
2040
+ }
2041
+ declare class DragTracker extends EventTarget {
2042
+ #private;
2043
+ readonly target: HTMLElement;
2044
+ constructor(target: HTMLElement);
2045
+ start(): void;
2046
+ stop(): void;
2047
+ addTargetListener(eventType: string, listener: ((e: MouseEvent) => any) | ((e: PointerEvent) => any)): void;
2048
+ private onPointerDown;
2049
+ private onPointerMove;
2050
+ private onPointerUp;
2051
+ }
2052
+ //#endregion
2053
+ //#region src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts
2054
+ interface Twisty3DPuzzle extends Object3D {
2055
+ onPositionChange(position: PuzzlePosition): void;
2056
+ setStickeringMask(stickeringMask: StickeringMask): void;
2057
+ }
2058
+ //#endregion
2059
+ //#region src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts
2060
+ declare class Twisty3DPuzzleWrapper extends EventTarget implements Schedulable {
2061
+ #private;
2062
+ private model;
2063
+ schedulable: Schedulable;
2064
+ private puzzleLoader;
2065
+ private visualizationStrategy;
2066
+ constructor(model: TwistyPlayerModel, schedulable: Schedulable, puzzleLoader: PuzzleLoader, visualizationStrategy: VisualizationStrategy);
2067
+ disconnect(): void;
2068
+ scheduleRender(): void;
2069
+ twisty3DPuzzle(): Promise<Twisty3DPuzzle>;
2070
+ raycastMove(raycasterPromise: Promise<Raycaster>, transformations: {
2071
+ invert: boolean;
2072
+ depth?: "secondSlice" | "rotation" | "none";
2073
+ }): Promise<void>;
2074
+ }
2075
+ //#endregion
2076
+ //#region src/cubing/twisty/views/3D/Twisty3DSceneWrapper.d.ts
2077
+ declare class Twisty3DSceneWrapper extends ManagedCustomElement implements Schedulable {
2078
+ #private;
2079
+ model?: TwistyPlayerModel | undefined;
2080
+ disconnect(): void;
2081
+ constructor(model?: TwistyPlayerModel | undefined);
2082
+ connectedCallback(): Promise<void>;
2083
+ setBackView(backView: BackViewLayout): void;
2084
+ onPress(e: CustomEvent<{
2085
+ pressInfo: PressInfo;
2086
+ cameraPromise: Promise<PerspectiveCamera>;
2087
+ }>): Promise<void>;
2088
+ scene(): Promise<Scene>;
2089
+ addVantage(vantage: Twisty3DVantage): void;
2090
+ removeVantage(vantage: Twisty3DVantage): void;
2091
+ experimentalVantages(): Iterable<Twisty3DVantage>;
2092
+ scheduleRender(): void;
2093
+ setCurrentTwisty3DPuzzleWrapper(scene: Scene, twisty3DPuzzleWrapper: Twisty3DPuzzleWrapper): Promise<void>;
2094
+ /** @deprecated */
2095
+ experimentalTwisty3DPuzzleWrapper(): Promise<Twisty3DPuzzleWrapper>;
2096
+ onPuzzle(inputs: [puzzleLoader: PuzzleLoader, visualizationStrategy: VisualizationStrategy]): Promise<void>;
2097
+ }
2098
+ //#endregion
2099
+ //#region src/cubing/twisty/views/3D/TwistyOrbitControls.d.ts
2100
+ declare class TwistyOrbitControls {
2101
+ private model;
2102
+ private mirror;
2103
+ private canvas;
2104
+ private dragTracker;
2105
+ /** @deprecated */
2106
+ experimentalInertia: boolean;
2107
+ private onMovementBound;
2108
+ experimentalHasBeenMoved: boolean;
2109
+ constructor(model: TwistyPlayerModel, mirror: boolean, canvas: HTMLCanvasElement, dragTracker: DragTracker);
2110
+ temperMovement(f: number): number;
2111
+ onMove(e: CustomEvent<DragMovementInfo>): void;
2112
+ onMovement(movementX: number, movementY: number): {
2113
+ temperedX: number;
2114
+ temperedY: number;
2115
+ };
2116
+ onUp(e: CustomEvent<DragMovementInfo>): void;
2117
+ }
2118
+ //#endregion
2119
+ //#region src/cubing/twisty/views/3D/Twisty3DVantage.d.ts
2120
+ declare class Twisty3DVantage extends ManagedCustomElement {
2121
+ #private;
2122
+ private model?;
2123
+ private options?;
2124
+ scene: Twisty3DSceneWrapper | null;
2125
+ stats: Stats | null;
2126
+ private rendererIsShared;
2127
+ loadingElement: HTMLDivElement | null;
2128
+ constructor(model?: TwistyPlayerModel | undefined, scene?: Twisty3DSceneWrapper, options?: {
2129
+ backView?: boolean;
2130
+ } | undefined);
2131
+ connectedCallback(): Promise<void>;
2132
+ clearCanvas(): Promise<void>;
2133
+ renderer(): Promise<WebGLRenderer>;
2134
+ canvasInfo(): Promise<{
2135
+ canvas: HTMLCanvasElement;
2136
+ context: CanvasRenderingContext2D;
2137
+ }>;
2138
+ camera(): Promise<PerspectiveCamera>;
2139
+ orbitControls(): Promise<TwistyOrbitControls>;
2140
+ addListener<T>(prop: TwistyPropParent<T>, listener: (value: T) => void): void;
2141
+ disconnect(): void;
2142
+ experimentalNextRenderFinishedCallback(callback: () => void): void;
2143
+ render(): Promise<void>;
2144
+ scheduleRender(): void;
2145
+ }
2146
+ //#endregion
2147
+ //#region src/cubing/twisty/views/TwistyPlayerSettable.d.ts
2148
+ declare abstract class TwistyPlayerSettable extends ManagedCustomElement {
2149
+ experimentalModel: TwistyPlayerModel;
2150
+ set alg(newAlg: Alg | string);
2151
+ get alg(): never;
2152
+ set experimentalSetupAlg(newSetup: Alg | string);
2153
+ get experimentalSetupAlg(): never;
2154
+ set experimentalSetupAnchor(anchor: SetupToLocation);
2155
+ get experimentalSetupAnchor(): never;
2156
+ set puzzle(puzzleID: PuzzleID);
2157
+ get puzzle(): never;
2158
+ set experimentalPuzzleDescription(puzzleDescription: PuzzleDescriptionString);
2159
+ get experimentalPuzzleDescription(): never;
2160
+ set timestamp(timestamp: TimestampRequest);
2161
+ get timestamp(): never;
2162
+ set hintFacelets(hintFaceletStyle: HintFaceletStyleWithAuto);
2163
+ get hintFacelets(): never;
2164
+ set experimentalStickering(stickering: ExperimentalStickering);
2165
+ get experimentalStickering(): never;
2166
+ set experimentalStickeringMaskOrbits(stickeringMask: string | StickeringMask);
2167
+ get experimentalStickeringMaskOrbits(): never;
2168
+ set experimentalFaceletScale(faceletScale: FaceletScale);
2169
+ get experimentalFaceletScale(): never;
2170
+ set backView(backView: BackViewLayoutWithAuto);
2171
+ get backView(): never;
2172
+ set background(backgroundTheme: BackgroundThemeWithAuto);
2173
+ get background(): never;
2174
+ set colorScheme(colorScheme: ColorSchemeWithAuto);
2175
+ get colorScheme(): never;
2176
+ set controlPanel(newControlPanel: ControlPanelThemeWithAuto);
2177
+ get controlPanel(): never;
2178
+ set visualization(visualizationFormat: VisualizationFormatWithAuto);
2179
+ get visualization(): never;
2180
+ set experimentalTitle(title: string | null);
2181
+ get experimentalTitle(): never;
2182
+ set experimentalVideoURL(videoURL: string | null);
2183
+ get experimentalVideoURL(): never;
2184
+ set experimentalCompetitionID(competitionID: string | null);
2185
+ get experimentalCompetitionID(): never;
2186
+ set viewerLink(viewerLinkPage: ViewerLinkPageWithAuto);
2187
+ get viewerLink(): never;
2188
+ set experimentalMovePressInput(movePressInput: MovePressInput);
2189
+ get experimentalMovePressInput(): never;
2190
+ set experimentalMovePressCancelOptions(movePressCancelOptions: AppendCancelOptions);
2191
+ get experimentalMovePressCancelOptions(): never;
2192
+ set cameraLatitude(latitude: number);
2193
+ get cameraLatitude(): never;
2194
+ set cameraLongitude(longitude: number);
2195
+ get cameraLongitude(): never;
2196
+ set cameraDistance(distance: number);
2197
+ get cameraDistance(): never;
2198
+ set cameraLatitudeLimit(latitudeLimit: number);
2199
+ get cameraLatitudeLimit(): never;
2200
+ set indexer(indexer: IndexerStrategyName);
2201
+ get indexer(): never;
2202
+ set tempoScale(newTempoScale: number);
2203
+ get tempoScale(): never;
2204
+ set experimentalSprite(url: string | URL);
2205
+ get experimentalSprite(): never;
2206
+ set experimentalHintSprite(url: string | URL);
2207
+ get experimentalHintSprite(): never;
2208
+ set fullscreenElement(element: Element | null);
2209
+ get fullscreenElement(): never;
2210
+ set experimentalInitialHintFaceletsAnimation(anim: InitialHintFaceletsAnimation);
2211
+ get experimentalInitialHintFaceletsAnimation(): never;
2212
+ set experimentalHintFaceletsElevation(elevation: "auto" | number);
2213
+ get experimentalHintFaceletsElevation(): never;
2214
+ set experimentalDragInput(dragInputMode: DragInputMode);
2215
+ get experimentalDragInput(): never;
2216
+ experimentalGet: ExperimentalGetters;
2217
+ }
2218
+ declare class ExperimentalGetters {
2219
+ private model;
2220
+ constructor(model: TwistyPlayerModel);
2221
+ alg(): Promise<Alg>;
2222
+ setupAlg(): Promise<Alg>;
2223
+ puzzleID(): Promise<PuzzleID>;
2224
+ timestamp(): Promise<MillisecondTimestamp>;
2225
+ }
2226
+ //#endregion
2227
+ //#region src/cubing/twisty/views/TwistyPlayer.d.ts
2228
+ /**
2229
+ * The config argument passed to {@link TwistyPlayer} when calling the
2230
+ * constructor. This interface type be useful for avoiding bugs when you would
2231
+ * like to create a {@link TwistyPlayer} using a dynamic config, or by combining
2232
+ * configs.
2233
+ *
2234
+ * ```js
2235
+ * import { TwistyPlayer, type TwistyPlayerConfig } from "@rednaxela101/cubing/twisty";
2236
+ *
2237
+ * const MY_DEFAULT_CONFIG: TwistyPlayerConfig = {
2238
+ * puzzle: "megaminx",
2239
+ * alg: "R U R'"
2240
+ * };
2241
+ * export function createTwistyPlayer(overrideConfig: TwistyPlayerConfig) {
2242
+ * const options = { ...MY_DEFAULT_CONFIG, ...overrideConfig };
2243
+ * return new TwistyPlayer(options);
2244
+ * }
2245
+ *
2246
+ * // Example: if the current page is https://alpha.twizzle.net/edit/?alg=M2+E2+S2
2247
+ * // then this gives us the "alg" param value "M2 E2 S2".
2248
+ * const myOverrideConfig: TwistyPlayerConfig = {};
2249
+ * const algParam = new URL(location.href).searchParams.get("alg");
2250
+ * if (algParam) {
2251
+ * myOverrideConfig.alg = algParam;
2252
+ * }
2253
+ * createTwistyPlayer(myOverrideConfig);
2254
+ * ```
2255
+ *
2256
+ * @category TwistyPlayer
2257
+ */
2258
+ interface TwistyPlayerConfig {
2259
+ alg?: Alg | string;
2260
+ experimentalSetupAlg?: Alg | string;
2261
+ experimentalSetupAnchor?: SetupToLocation;
2262
+ puzzle?: PuzzleID;
2263
+ experimentalPuzzleDescription?: PuzzleDescriptionString;
2264
+ visualization?: VisualizationFormatWithAuto;
2265
+ hintFacelets?: HintFaceletStyleWithAuto;
2266
+ experimentalStickering?: ExperimentalStickering | null;
2267
+ experimentalStickeringMaskOrbits?: StickeringMask | string;
2268
+ background?: BackgroundThemeWithAuto;
2269
+ colorScheme?: ColorSchemeWithAuto;
2270
+ controlPanel?: ControlPanelThemeWithAuto;
2271
+ backView?: BackViewLayoutWithAuto;
2272
+ experimentalInitialHintFaceletsAnimation?: InitialHintFaceletsAnimation;
2273
+ experimentalFaceletScale?: FaceletScale;
2274
+ experimentalHintFaceletsElevation?: HintFaceletsElevationRequest;
2275
+ viewerLink?: ViewerLinkPageWithAuto;
2276
+ experimentalMovePressInput?: MovePressInput;
2277
+ experimentalDragInput?: DragInputMode;
2278
+ experimentalTitle?: string | null;
2279
+ experimentalVideoURL?: string;
2280
+ experimentalCompetitionID?: string;
2281
+ cameraLatitude?: number;
2282
+ cameraLongitude?: number;
2283
+ cameraDistance?: number;
2284
+ cameraLatitudeLimit?: number;
2285
+ tempoScale?: number;
2286
+ experimentalSprite?: string | null;
2287
+ experimentalHintSprite?: string | null;
2288
+ experimentalMovePressCancelOptions?: AppendCancelOptions;
2289
+ }
2290
+ declare const intersectedCallback: unique symbol;
2291
+ /**
2292
+ * TwistyPlayer is the heart of `cubing.js`. It can be used to display a puzzle on a web page like this:
2293
+ *
2294
+ * <script src="path/to/cubing/twisty" type="module"></script>
2295
+ * <twisty-player alg="R U R'"></twisty-player>
2296
+ *
2297
+ * You can also construct it directly in JavaScript:
2298
+ *
2299
+ * ```js
2300
+ * import { TwistyPlayer } from "@rednaxela101/cubing/twisty";
2301
+ * const twistyPlayer = new TwistyPlayer({alg: "R U R'"});
2302
+ * // Once the page has loaded, you can do this:
2303
+ * document.body.appendChild(twistyPlayer);
2304
+ * ```
2305
+ *
2306
+ * See {@link https://js.cubing.net/cubing/} for more examples.
2307
+ *
2308
+ * @category TwistyPlayer
2309
+ */
2310
+ declare class TwistyPlayer extends TwistyPlayerSettable implements TwistyAnimationControllerDelegate {
2311
+ #private;
2312
+ controller: TwistyPlayerController;
2313
+ buttons?: TwistyButtons;
2314
+ experimentalCanvasClickCallback: (...args: any) => void;
2315
+ constructor(config?: TwistyPlayerConfig);
2316
+ connectedCallback(): void;
2317
+ [intersectedCallback](): Promise<void>;
2318
+ /** @deprecated */
2319
+ experimentalSetFlashLevel(newLevel: "auto" | "none"): void;
2320
+ flash(): void;
2321
+ experimentalCurrentVantages(): Promise<Iterable<Twisty3DVantage>>;
2322
+ experimentalCurrentCanvases(): Promise<HTMLCanvasElement[]>;
2323
+ /**
2324
+ * Get the first available puzzle `Object3D`. This can be inserted into
2325
+ * another `three.js` scene, essentially "adopting" it from the
2326
+ * `TwistyPlayer`'s scenes while still allowing the `TwistyPlayer` to animate
2327
+ * it. The function returns a `Promise` that returns if and when the
2328
+ * `Object3D` is available, and accepts a callback that is called whenever a
2329
+ * render is scheduled for the puzzle (essentially, if something about the
2330
+ * puzzle has changed, like its appearance or current animated state).
2331
+ *
2332
+ * Note:
2333
+ * - This may never resolve if the player never creates the relevant 3D object
2334
+ * under the hood (e.g. if the config is set to 2D, or is not valid for
2335
+ * rendering a puzzle)
2336
+ * - The architecture of `cubing.js` may change significantly, so it is not
2337
+ * guaranteed that a `three.js` `Object3D` will be available from the main
2338
+ * thread in the future.
2339
+ * - This function only returns the current `three.js` puzzle object (once one
2340
+ * exists). If you change e.g. the `puzzle` config for the player, then the
2341
+ * object will currently become stale. This may be replaced with more
2342
+ * convenient behaviour in the future.
2343
+ *
2344
+ * @deprecated */
2345
+ experimentalCurrentThreeJSPuzzleObject(puzzleRenderScheduledCallback?: () => void): Promise<Object3D>;
2346
+ jumpToStart(options?: {
2347
+ flash: boolean;
2348
+ }): void;
2349
+ jumpToEnd(options?: {
2350
+ flash: boolean;
2351
+ }): void;
2352
+ play(): void;
2353
+ pause(): void;
2354
+ togglePlay(play?: boolean): void;
2355
+ experimentalAddMove(flexibleMove: Move | string, options?: AppendOptions): void;
2356
+ experimentalAddAlgLeaf(algLeaf: AlgLeaf, options?: AppendOptions): void;
2357
+ static get observedAttributes(): string[];
2358
+ experimentalRemoveFinalChild(): void;
2359
+ attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): void;
2360
+ experimentalScreenshot(options?: {
2361
+ width: number;
2362
+ height: number;
2363
+ }): Promise<string>;
2364
+ experimentalDownloadScreenshot(filename?: string): Promise<void>;
2365
+ }
2366
+ declare global {
2367
+ interface HTMLElementTagNameMap {
2368
+ "twisty-player": TwistyPlayer;
2369
+ }
2370
+ }
2371
+ //#endregion
2372
+ //#region src/cubing/alg/parseAlg.d.ts
2373
+ declare const startCharIndexKey: unique symbol;
2374
+ declare const endCharIndexKey: unique symbol;
2375
+ interface ParserIndexed {
2376
+ [startCharIndexKey]: number;
2377
+ [endCharIndexKey]: number;
2378
+ }
2379
+ type Parsed<T extends Alg | AlgNode> = T & ParserIndexed;
2380
+ //#endregion
2381
+ //#region src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.d.ts
2382
+ type AnimatedLeafAlgNodeInfo = {
2383
+ leaf: Parsed<AnimatedLeafAlgNode>;
2384
+ idx: LeafIndex;
2385
+ };
2386
+ type OrderedLeafTokens = AnimatedLeafAlgNodeInfo[];
2387
+ //#endregion
2388
+ //#region src/cubing/twisty/views/TwistyAlgEditor/model.d.ts
2389
+ declare class TwistyAlgEditorValueProp extends SimpleTwistyPropSource<string> {
2390
+ getDefaultValue(): string;
2391
+ }
2392
+ interface AlgEditorAlgWithIssuesPropInput {
2393
+ value: string;
2394
+ }
2395
+ declare class AlgEditorAlgWithIssuesProp extends TwistyPropDerived<AlgEditorAlgWithIssuesPropInput, AlgWithIssues> {
2396
+ derive(input: AlgEditorAlgWithIssuesPropInput): AlgWithIssues;
2397
+ }
2398
+ interface SelectionInfoPropInput {
2399
+ selectionStart: number;
2400
+ selectionEnd: number;
2401
+ }
2402
+ interface SelectionInfo extends SelectionInfoPropInput {
2403
+ endChangedMostRecently: boolean;
2404
+ }
2405
+ declare class TwistyAlgEditorSelectionProp extends TwistyPropSource<SelectionInfo, SelectionInfoPropInput> {
2406
+ getDefaultValue(): {
2407
+ selectionStart: number;
2408
+ selectionEnd: number;
2409
+ endChangedMostRecently: boolean;
2410
+ };
2411
+ derive(input: SelectionInfoPropInput, oldValue: Promise<SelectionInfo>): Promise<SelectionInfo>;
2412
+ }
2413
+ interface TargetCharPropInputs {
2414
+ selectionInfo: SelectionInfo;
2415
+ }
2416
+ declare class TargetCharProp extends TwistyPropDerived<TargetCharPropInputs, number> {
2417
+ derive(inputs: TargetCharPropInputs): number;
2418
+ }
2419
+ interface LeafTokensPropInputs {
2420
+ algWithIssues: AlgWithIssues;
2421
+ }
2422
+ declare class LeafTokensProp extends TwistyPropDerived<LeafTokensPropInputs, OrderedLeafTokens> {
2423
+ derive(inputs: LeafTokensPropInputs): OrderedLeafTokens;
2424
+ }
2425
+ interface LeafToHighlightPropInputs {
2426
+ targetChar: number;
2427
+ leafTokens: OrderedLeafTokens;
2428
+ }
2429
+ type HighlightWhere = "before" | "start" | "inside" | "end" | "after";
2430
+ interface HighlightInfo {
2431
+ leafInfo: AnimatedLeafAlgNodeInfo;
2432
+ where: HighlightWhere;
2433
+ }
2434
+ declare class LeafToHighlightProp extends TwistyPropDerived<LeafToHighlightPropInputs, HighlightInfo | null> {
2435
+ derive(inputs: LeafToHighlightPropInputs): HighlightInfo | null;
2436
+ }
2437
+ declare class TwistyAlgEditorModel {
2438
+ valueProp: TwistyAlgEditorValueProp;
2439
+ selectionProp: TwistyAlgEditorSelectionProp;
2440
+ targetCharProp: TargetCharProp;
2441
+ algEditorAlgWithIssues: AlgEditorAlgWithIssuesProp;
2442
+ leafTokensProp: LeafTokensProp;
2443
+ leafToHighlight: LeafToHighlightProp;
2444
+ }
2445
+ //#endregion
2446
+ //#region src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts
2447
+ type TwistyPlayerAlgProp = "alg" | "setupAlg";
2448
+ /** @category Other Custom Elements */
2449
+ declare class TwistyAlgEditor extends ManagedCustomElement {
2450
+ #private;
2451
+ model: TwistyAlgEditorModel;
2452
+ debugNeverRequestTimestamp: boolean;
2453
+ constructor(options?: {
2454
+ twistyPlayer?: TwistyPlayer;
2455
+ twistyPlayerProp?: TwistyPlayerAlgProp;
2456
+ });
2457
+ connectedCallback(): void;
2458
+ set algString(s: string);
2459
+ get algString(): string;
2460
+ set placeholder(placeholderText: string);
2461
+ onInput(): void;
2462
+ onSelectionChange(): Promise<void>;
2463
+ onBlur(): Promise<void>;
2464
+ setAlgIssueClassForPuzzle(issues: "none" | "warning" | "error"): void;
2465
+ highlightLeaf(leaf: Parsed<Move | Pause> | null): void;
2466
+ get twistyPlayer(): TwistyPlayer | null;
2467
+ set twistyPlayer(twistyPlayer: TwistyPlayer | null);
2468
+ protected attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): void;
2469
+ static get observedAttributes(): string[];
2470
+ }
2471
+ declare global {
2472
+ interface HTMLElementTagNameMap {
2473
+ "twisty-alg-editor": TwistyAlgEditor;
2474
+ }
2475
+ }
2476
+ //#endregion
2477
+ //#region src/cubing/twisty/views/TwistyAlgViewer.d.ts
2478
+ interface DataDown {
2479
+ earliestMoveIndex: LeafIndex;
2480
+ twistyAlgViewer: TwistyAlgViewer;
2481
+ direction: IterationDirection;
2482
+ }
2483
+ interface DataUp {
2484
+ moveCount: number;
2485
+ element: TwistyAlgWrapperElem | TwistyAlgLeafElem;
2486
+ }
2487
+ declare class TwistyAlgLeafElem extends ManagedCustomElement {
2488
+ algOrAlgNode: Alg | AlgNode;
2489
+ constructor(className: string, text: string, dataDown: DataDown, algOrAlgNode: Alg | AlgNode, offsetIntoMove: boolean, clickable: boolean);
2490
+ pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2491
+ setCurrentMove(current: boolean): void;
2492
+ }
2493
+ declare class TwistyAlgWrapperElem extends HTMLElementShim {
2494
+ algOrAlgNode: Alg | AlgNode;
2495
+ private queue;
2496
+ constructor(className: string, algOrAlgNode: Alg | AlgNode);
2497
+ addString(str: string): void;
2498
+ addElem(dataUp: DataUp): number;
2499
+ flushQueue(direction?: IterationDirection): void;
2500
+ pathToIndex(_index: number): (TwistyAlgWrapperElem | TwistyAlgLeafElem)[];
2501
+ }
2502
+ declare class MoveHighlighter {
2503
+ moveCharIndexMap: Map<number, TwistyAlgLeafElem>;
2504
+ currentElem: TwistyAlgLeafElem | null;
2505
+ addMove(charIndex: number, elem: TwistyAlgLeafElem): void;
2506
+ set(move: Parsed<Move> | null): void;
2507
+ }
2508
+ /** @category Other Custom Elements */
2509
+ declare class TwistyAlgViewer extends HTMLElementShim {
2510
+ #private;
2511
+ highlighter: MoveHighlighter;
2512
+ lastClickTimestamp: number | null;
2513
+ constructor(options?: {
2514
+ twistyPlayer?: TwistyPlayer;
2515
+ });
2516
+ protected connectedCallback(): void;
2517
+ private setAlg;
2518
+ get twistyPlayer(): TwistyPlayer | null;
2519
+ set twistyPlayer(twistyPlayer: TwistyPlayer | null);
2520
+ jumpToIndex(index: LeafIndex, offsetIntoMove: boolean): Promise<void>;
2521
+ protected attributeChangedCallback(attributeName: string, _oldValue: string, newValue: string): Promise<void>;
2522
+ static get observedAttributes(): string[];
2523
+ }
2524
+ declare global {
2525
+ interface HTMLElementTagNameMap {
2526
+ "twisty-alg-viewer": TwistyAlgViewer;
2527
+ }
2528
+ }
2529
+ //#endregion
2530
+ //#region src/cubing/twisty/views/twizzle/TwizzleLink.d.ts
2531
+ declare class TwizzleLink extends ManagedCustomElement {
2532
+ #private;
2533
+ private options?;
2534
+ twistyPlayer: TwistyPlayer | null;
2535
+ a: HTMLAnchorElement | null;
2536
+ constructor(options?: {
2537
+ cdnForumTweaks?: boolean;
2538
+ colorScheme?: ColorSchemeWithAuto;
2539
+ } | undefined);
2540
+ connectedCallback(): Promise<void>;
2541
+ }
2542
+ declare global {
2543
+ interface HTMLElementTagNameMap {
2544
+ "twizzle-link": TwizzleLink;
2545
+ }
2546
+ }
2547
+ //#endregion
2548
+ //#region src/cubing/puzzles/PuzzleLoader.d.ts
2549
+ type KeyMapping = {
2550
+ [keyCode: string]: AlgLeaf;
2551
+ };
2552
+ type AlgTransformData = Record<string, {
2553
+ replaceMovesByFamily: Record<string, string>;
2554
+ invertExceptByFamily?: Set<string>;
2555
+ }>;
2556
+ interface PuzzleLoader {
2557
+ id: string;
2558
+ fullName: string;
2559
+ inventedBy?: string[];
2560
+ inventionYear?: number;
2561
+ /** @deprecated */
2562
+ def?: never;
2563
+ kpuzzle: () => Promise<KPuzzle>;
2564
+ svg: () => Promise<string>;
2565
+ llSVG?: () => Promise<string>;
2566
+ llFaceSVG?: () => Promise<string>;
2567
+ pg?: () => Promise<PuzzleGeometry>;
2568
+ basePG?: () => Promise<PuzzleGeometry>;
2569
+ stickeringMask?: (stickering: ExperimentalStickering) => Promise<StickeringMask>;
2570
+ stickerings?: () => Promise<ExperimentalStickering[]>;
2571
+ puzzleSpecificSimplifyOptions?: PuzzleSpecificSimplifyOptions;
2572
+ puzzleSpecificSimplifyOptionsPromise?: Promise<PuzzleSpecificSimplifyOptions>;
2573
+ keyMapping?: () => Promise<KeyMapping>;
2574
+ algTransformData?: AlgTransformData;
2575
+ }
2576
+ //#endregion
2577
+ //#region src/cubing/alg/keyboard.d.ts
2578
+ declare function keyToMove(keyMapping: KeyMapping | undefined, e: KeyboardEvent): AlgLeaf | null;
2579
+ //#endregion
2580
+ //#region src/cubing/alg/traversal.d.ts
2581
+ declare abstract class TraversalDownUp<DataDown, DataAlgUp, DataAlgNodeUp = DataAlgUp> {
2582
+ traverseAlgNode(algNode: AlgNode, dataDown: DataDown): DataAlgNodeUp;
2583
+ traverseIntoAlgNode(algNode: AlgNode, dataDown: DataDown): AlgNode;
2584
+ abstract traverseAlg(alg: Alg, dataDown: DataDown): DataAlgUp;
2585
+ abstract traverseGrouping(grouping: Grouping, dataDown: DataDown): DataAlgNodeUp;
2586
+ abstract traverseMove(move: Move, dataDown: DataDown): DataAlgNodeUp;
2587
+ abstract traverseCommutator(commutator: Commutator, dataDown: DataDown): DataAlgNodeUp;
2588
+ abstract traverseConjugate(conjugate: Conjugate, dataDown: DataDown): DataAlgNodeUp;
2589
+ abstract traversePause(pause: Pause, dataDown: DataDown): DataAlgNodeUp;
2590
+ abstract traverseNewline(newline: Newline, dataDown: DataDown): DataAlgNodeUp;
2591
+ abstract traverseLineComment(comment: LineComment, dataDown: DataDown): DataAlgNodeUp;
2592
+ }
2593
+ declare abstract class TraversalUp<DataAlgUp, DataAlgNodeUp = DataAlgUp> extends TraversalDownUp<undefined, DataAlgUp, DataAlgNodeUp> {
2594
+ traverseAlgNode(algNode: AlgNode): DataAlgNodeUp;
2595
+ traverseIntoAlgNode(algNode: AlgNode): AlgNode;
2596
+ abstract traverseAlg(alg: Alg): DataAlgUp;
2597
+ abstract traverseGrouping(grouping: Grouping): DataAlgNodeUp;
2598
+ abstract traverseMove(move: Move): DataAlgNodeUp;
2599
+ abstract traverseCommutator(commutator: Commutator): DataAlgNodeUp;
2600
+ abstract traverseConjugate(conjugate: Conjugate): DataAlgNodeUp;
2601
+ abstract traversePause(pause: Pause): DataAlgNodeUp;
2602
+ abstract traverseNewline(newline: Newline): DataAlgNodeUp;
2603
+ abstract traverseLineComment(comment: LineComment): DataAlgNodeUp;
2604
+ }
2605
+ declare function functionFromTraversal<DataDown, DataAlgUp, ConstructorArgs extends unknown[]>(traversalConstructor: {
2606
+ new (...args: ConstructorArgs): TraversalDownUp<DataDown, DataAlgUp, any>;
2607
+ }, constructorArgs?: ConstructorArgs): undefined extends DataDown ? (alg: Alg) => DataAlgUp : (alg: Alg, v: DataDown) => DataAlgUp;
2608
+ //#endregion
2609
+ //#region src/cubing/alg/url.d.ts
2610
+ interface AlgCubingNetOptions {
2611
+ alg?: Alg;
2612
+ setup?: Alg;
2613
+ title?: string;
2614
+ puzzle?: "1x1x1" | "2x2x2" | "3x3x3" | "4x4x4" | "5x5x5" | "6x6x6" | "7x7x7" | "8x8x8" | "9x9x9" | "10x10x10" | "11x11x11" | "12x12x12" | "13x13x13" | "14x14x14" | "16x16x16" | "17x17x17";
2615
+ stage?: "full" | "cross" | "F2L" | "LL" | "OLL" | "PLL" | "CLS" | "ELS" | "L6E" | "CMLL" | "WV" | "ZBLL" | "void";
2616
+ view?: "editor" | "playback" | "fullscreen";
2617
+ type?: "moves" | "reconstruction" | "alg" | "reconstruction-end-with-setup";
2618
+ }
2619
+ /** @deprecated */
2620
+ declare function experimentalAlgCubingNetLink(options: AlgCubingNetOptions): string;
2621
+ //#endregion
2622
+ 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 };