cubing 0.20.2 → 0.21.0-pre12

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 (770) hide show
  1. package/README.md +6 -9
  2. package/dist/.DS_Store +0 -0
  3. package/dist/bin/puzzle-geometry-bin.js +1124 -1128
  4. package/dist/bin/puzzle-geometry-bin.js.map +3 -3
  5. package/dist/bundle-global/cubing.bundle-global.js +3978 -3587
  6. package/dist/esm/.DS_Store +0 -0
  7. package/dist/esm/{2x2x2.kpuzzle.json_-ZLJSYD5K.js → 2x2x2.kpuzzle.json-JOGUSQ4N.js} +3 -3
  8. package/dist/esm/{2x2x2.kpuzzle.json_-ZLJSYD5K.js.map → 2x2x2.kpuzzle.json-JOGUSQ4N.js.map} +1 -1
  9. package/dist/esm/{2x2x2.kpuzzle.svg-BNXPAM3A.js → 2x2x2.kpuzzle.svg-CQF2FTV7.js} +2 -2
  10. package/dist/esm/{2x2x2.kpuzzle.svg-BNXPAM3A.js.map → 2x2x2.kpuzzle.svg-CQF2FTV7.js.map} +0 -0
  11. package/dist/esm/3d-JZD3V366.js +39 -0
  12. package/dist/esm/3d-JZD3V366.js.map +7 -0
  13. package/dist/esm/{3x3x3-ll.kpuzzle.svg-EC42JHOH.js → 3x3x3-ll.kpuzzle.svg-53CBPG5O.js} +2 -2
  14. package/dist/esm/{3x3x3-ll.kpuzzle.svg-EC42JHOH.js.map → 3x3x3-ll.kpuzzle.svg-53CBPG5O.js.map} +0 -0
  15. package/dist/esm/{3x3x3.kpuzzle.svg-DUKG2WHC.js → 3x3x3.kpuzzle.svg-ERSSH66P.js} +2 -2
  16. package/dist/esm/{3x3x3.kpuzzle.svg-DUKG2WHC.js.map → 3x3x3.kpuzzle.svg-ERSSH66P.js.map} +0 -0
  17. package/dist/esm/alg/index.js +2 -2
  18. package/dist/esm/bluetooth/index.js +13 -11
  19. package/dist/esm/bluetooth/index.js.map +2 -2
  20. package/dist/esm/chunk-5DN4DAAX.js +2512 -0
  21. package/dist/esm/chunk-5DN4DAAX.js.map +7 -0
  22. package/dist/esm/{chunk-KKSDHNLH.js → chunk-7GADUDIG.js} +49 -71
  23. package/dist/esm/chunk-7GADUDIG.js.map +7 -0
  24. package/dist/esm/{chunk-YNB7QLBF.js → chunk-BU5PUJK3.js} +9 -10
  25. package/dist/esm/chunk-BU5PUJK3.js.map +7 -0
  26. package/dist/esm/chunk-CQS6JZ7G.js +762 -0
  27. package/dist/esm/chunk-CQS6JZ7G.js.map +7 -0
  28. package/dist/esm/{chunk-2GRKPQQL.js → chunk-RE7MIN5R.js} +2 -2
  29. package/dist/esm/{chunk-2GRKPQQL.js.map → chunk-RE7MIN5R.js.map} +0 -0
  30. package/dist/esm/{chunk-WJ7AVUI7.js → chunk-WO2AXYFE.js} +12 -1
  31. package/dist/esm/{chunk-WJ7AVUI7.js.map → chunk-WO2AXYFE.js.map} +0 -0
  32. package/dist/esm/{chunk-CWVB5RRW.js → chunk-YV3RT5PX.js} +625 -1282
  33. package/dist/esm/chunk-YV3RT5PX.js.map +7 -0
  34. package/dist/esm/{clock.kpuzzle.json_-PXORG6YF.js → clock.kpuzzle.json-EKWRMHJM.js} +3 -3
  35. package/dist/esm/{clock.kpuzzle.json_-PXORG6YF.js.map → clock.kpuzzle.json-EKWRMHJM.js.map} +1 -1
  36. package/dist/esm/{clock.kpuzzle.svg-E52B5OQV.js → clock.kpuzzle.svg-B7TMN3SY.js} +2 -2
  37. package/dist/esm/{clock.kpuzzle.svg-E52B5OQV.js.map → clock.kpuzzle.svg-B7TMN3SY.js.map} +0 -0
  38. package/dist/esm/esm-test-worker.js +2 -2
  39. package/dist/esm/esm-test-worker.js.map +1 -1
  40. package/dist/esm/kpuzzle/index.js +5 -3
  41. package/dist/esm/{node-SIGYKAZG.js → node-BSAQKO3G.js} +2 -2
  42. package/dist/esm/{node-SIGYKAZG.js.map → node-BSAQKO3G.js.map} +0 -0
  43. package/dist/esm/{node-BHGOVUN3.js → node-WEHVBEKP.js} +2 -2
  44. package/dist/esm/{node-BHGOVUN3.js.map → node-WEHVBEKP.js.map} +0 -0
  45. package/dist/esm/notation/index.js +3 -3
  46. package/dist/esm/protocol/index.js +3 -3
  47. package/dist/esm/puzzle-geometry/index.js +1085 -1179
  48. package/dist/esm/puzzle-geometry/index.js.map +3 -3
  49. package/dist/esm/puzzles/index.js +10 -4
  50. package/dist/esm/{pyraminx.kpuzzle.svg-QKUJX37T.js → pyraminx.kpuzzle.svg-QBBMZVDY.js} +2 -2
  51. package/dist/esm/{pyraminx.kpuzzle.svg-QKUJX37T.js.map → pyraminx.kpuzzle.svg-QBBMZVDY.js.map} +0 -0
  52. package/dist/esm/scramble/index.js +5 -4
  53. package/dist/esm/search/index.js +7 -4
  54. package/dist/esm/{sq1-hyperorbit.kpuzzle.json_-7KW5LSXC.js → sq1-hyperorbit.kpuzzle.json-N3FGCPML.js} +3 -3
  55. package/dist/esm/{sq1-hyperorbit.kpuzzle.json_-7KW5LSXC.js.map → sq1-hyperorbit.kpuzzle.json-N3FGCPML.js.map} +1 -1
  56. package/dist/esm/{sq1-hyperorbit.kpuzzle.svg-7Y7N37NN.js → sq1-hyperorbit.kpuzzle.svg-ID57EER7.js} +2 -2
  57. package/dist/esm/{sq1-hyperorbit.kpuzzle.svg-7Y7N37NN.js.map → sq1-hyperorbit.kpuzzle.svg-ID57EER7.js.map} +0 -0
  58. package/dist/esm/stream/index.js +3 -3
  59. package/dist/esm/stream/index.js.map +2 -2
  60. package/dist/esm/twisty/index.js +4442 -3214
  61. package/dist/esm/twisty/index.js.map +3 -3
  62. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js +2831 -0
  63. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +7 -0
  64. package/dist/types/alg/Alg.d.ts +88 -0
  65. package/dist/types/alg/Alg.d.ts.map +1 -1
  66. package/dist/types/alg/Alg.spec.d.ts +2 -0
  67. package/dist/types/alg/Alg.spec.d.ts.map +1 -0
  68. package/dist/types/alg/common.d.ts.map +1 -1
  69. package/dist/types/alg/operation.spec.d.ts +2 -0
  70. package/dist/types/alg/operation.spec.d.ts.map +1 -0
  71. package/dist/types/alg/parse.spec.d.ts +2 -0
  72. package/dist/types/alg/parse.spec.d.ts.map +1 -0
  73. package/dist/types/alg/test/alg-comparison.d.ts.map +1 -1
  74. package/dist/types/alg/test/alg.spec.d.ts +2 -0
  75. package/dist/types/alg/test/alg.spec.d.ts.map +1 -0
  76. package/dist/types/alg/units/leaves/LineComment.spec.d.ts +2 -0
  77. package/dist/types/alg/units/leaves/LineComment.spec.d.ts.map +1 -0
  78. package/dist/types/alg/units/leaves/Move.spec.d.ts +2 -0
  79. package/dist/types/alg/units/leaves/Move.spec.d.ts.map +1 -0
  80. package/dist/types/alg/url.spec.d.ts +2 -0
  81. package/dist/types/alg/url.spec.d.ts.map +1 -0
  82. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts +1 -1
  83. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts.map +1 -1
  84. package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts +5 -0
  85. package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts.map +1 -0
  86. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts +3 -0
  87. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts.map +1 -0
  88. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts +2 -0
  89. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts.map +1 -0
  90. package/dist/types/kpuzzle/canon.spec.d.ts +2 -0
  91. package/dist/types/kpuzzle/canon.spec.d.ts.map +1 -0
  92. package/dist/types/kpuzzle/index.d.ts +1 -0
  93. package/dist/types/kpuzzle/index.d.ts.map +1 -1
  94. package/dist/types/kpuzzle/kpuzzle.spec.d.ts +2 -0
  95. package/dist/types/kpuzzle/kpuzzle.spec.d.ts.map +1 -0
  96. package/dist/types/kpuzzle/prunetable.spec.d.ts +2 -0
  97. package/dist/types/kpuzzle/prunetable.spec.d.ts.map +1 -0
  98. package/dist/types/kpuzzle/svg.d.ts.map +1 -1
  99. package/dist/types/kpuzzle/transformations.spec.d.ts +2 -0
  100. package/dist/types/kpuzzle/transformations.spec.d.ts.map +1 -0
  101. package/dist/types/protocol/binary/binary3x3x3.spec.d.ts +2 -0
  102. package/dist/types/protocol/binary/binary3x3x3.spec.d.ts.map +1 -0
  103. package/dist/types/protocol/binary/hex.spec.d.ts +2 -0
  104. package/dist/types/protocol/binary/hex.spec.d.ts.map +1 -0
  105. package/dist/types/protocol/binary/orbit-indexing.spec.d.ts +2 -0
  106. package/dist/types/protocol/binary/orbit-indexing.spec.d.ts.map +1 -0
  107. package/dist/types/puzzle-geometry/Options.d.ts +45 -1
  108. package/dist/types/puzzle-geometry/Options.d.ts.map +1 -1
  109. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +2 -0
  110. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +1 -0
  111. package/dist/types/puzzle-geometry/PermOriSet.d.ts +39 -39
  112. package/dist/types/puzzle-geometry/PermOriSet.d.ts.map +1 -1
  113. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +118 -110
  114. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +1 -1
  115. package/dist/types/puzzle-geometry/Quat.d.ts +0 -11
  116. package/dist/types/puzzle-geometry/Quat.d.ts.map +1 -1
  117. package/dist/types/puzzle-geometry/Quat.spec.d.ts +2 -0
  118. package/dist/types/puzzle-geometry/Quat.spec.d.ts.map +1 -0
  119. package/dist/types/puzzle-geometry/SchreierSims.d.ts.map +1 -1
  120. package/dist/types/puzzle-geometry/index.d.ts +2 -4
  121. package/dist/types/puzzle-geometry/index.d.ts.map +1 -1
  122. package/dist/types/puzzle-geometry/interfaces.d.ts +1 -21
  123. package/dist/types/puzzle-geometry/interfaces.d.ts.map +1 -1
  124. package/dist/types/puzzle-geometry/orientcenters.spec.d.ts +2 -0
  125. package/dist/types/puzzle-geometry/orientcenters.spec.d.ts.map +1 -0
  126. package/dist/types/puzzles/async/async-pg3d.d.ts.map +1 -1
  127. package/dist/types/puzzles/customPGPuzzleLoader.d.ts +12 -0
  128. package/dist/types/puzzles/customPGPuzzleLoader.d.ts.map +1 -0
  129. package/dist/types/puzzles/implementations/2x2x2/{2x2x2.kpuzzle.json_.d.ts → 2x2x2.kpuzzle.json.d.ts} +1 -1
  130. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts.map +1 -0
  131. package/dist/types/puzzles/implementations/3x3x3/index.d.ts.map +1 -1
  132. package/dist/types/puzzles/implementations/clock/{clock.kpuzzle.json_.d.ts → clock.kpuzzle.json.d.ts} +1 -1
  133. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts.map +1 -0
  134. package/dist/types/puzzles/implementations/fto/index.d.ts +2 -2
  135. package/dist/types/puzzles/implementations/fto/index.d.ts.map +1 -1
  136. package/dist/types/puzzles/implementations/pyraminx/{pyraminx.kpuzzle.json_.d.ts → pyraminx.kpuzzle.json.d.ts} +1 -1
  137. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts.map +1 -0
  138. package/dist/types/puzzles/implementations/square1/index.d.ts.map +1 -1
  139. package/dist/types/puzzles/implementations/square1/{sq1-hyperorbit.kpuzzle.json_.d.ts → sq1-hyperorbit.kpuzzle.json.d.ts} +1 -1
  140. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts.map +1 -0
  141. package/dist/types/puzzles/index.d.ts +4 -2
  142. package/dist/types/puzzles/index.d.ts.map +1 -1
  143. package/dist/types/puzzles/stickerings/appearance.d.ts +9 -9
  144. package/dist/types/puzzles/stickerings/appearance.d.ts.map +1 -1
  145. package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +1 -1
  146. package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +1 -1
  147. package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts +3 -0
  148. package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts.map +1 -0
  149. package/dist/types/search/index.d.ts +1 -1
  150. package/dist/types/search/index.d.ts.map +1 -1
  151. package/dist/types/search/inside/api.d.ts +2 -1
  152. package/dist/types/search/inside/api.d.ts.map +1 -1
  153. package/dist/types/search/inside/api.spec.d.ts +2 -0
  154. package/dist/types/search/inside/api.spec.d.ts.map +1 -0
  155. package/dist/types/search/inside/solve/parseSGS.d.ts.map +1 -1
  156. package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts.map +1 -1
  157. package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts.map +1 -1
  158. package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts.map +1 -1
  159. package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts +2 -0
  160. package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts.map +1 -0
  161. package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts.map +1 -1
  162. package/dist/types/search/inside/solve/tremble.d.ts.map +1 -1
  163. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts +4 -31
  164. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts.map +1 -1
  165. package/dist/types/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +1 -1
  166. package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts +3 -0
  167. package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts.map +1 -0
  168. package/dist/types/search/inside/solve/vendor/random-uint-below/get-random-values.d.ts.map +1 -1
  169. package/dist/types/search/inside/solve/vendor/random-uint-below/random-int.d.ts.map +1 -1
  170. package/dist/types/search/inside/solve/vendor/sq12phase/scramble_sq1.d.ts.map +1 -1
  171. package/dist/types/search/instantiator.d.ts.map +1 -1
  172. package/dist/types/search/outside.d.ts +4 -2
  173. package/dist/types/search/outside.d.ts.map +1 -1
  174. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  175. package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
  176. package/dist/types/stream/twizzle/TwizzleStream.d.ts +9 -8
  177. package/dist/types/stream/twizzle/TwizzleStream.d.ts.map +1 -1
  178. package/dist/types/stream/websocket-proxy.d.ts +1 -1
  179. package/dist/types/stream/websocket-proxy.d.ts.map +1 -1
  180. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +34 -0
  181. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -0
  182. package/dist/types/twisty/controllers/TwistyPlayerController.d.ts +16 -0
  183. package/dist/types/twisty/controllers/TwistyPlayerController.d.ts.map +1 -0
  184. package/dist/types/twisty/heavy-code-imports/3d.d.ts +3 -0
  185. package/dist/types/twisty/heavy-code-imports/3d.d.ts.map +1 -0
  186. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +12 -0
  187. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +1 -0
  188. package/dist/types/twisty/index.d.ts +20 -15
  189. package/dist/types/twisty/index.d.ts.map +1 -1
  190. package/dist/types/twisty/model/PromiseFreshener.d.ts +14 -0
  191. package/dist/types/twisty/model/PromiseFreshener.d.ts.map +1 -0
  192. package/dist/types/twisty/model/TwistyPlayerModel.d.ts +84 -0
  193. package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -0
  194. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +11 -0
  195. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts.map +1 -0
  196. package/dist/types/twisty/model/helpers.d.ts +5 -0
  197. package/dist/types/twisty/model/helpers.d.ts.map +1 -0
  198. package/dist/types/twisty/model/props/TwistyProp.d.ts +60 -0
  199. package/dist/types/twisty/model/props/TwistyProp.d.ts.map +1 -0
  200. package/dist/types/twisty/model/props/TwistyProp.spec.d.ts +5 -0
  201. package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +1 -0
  202. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +28 -0
  203. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -0
  204. package/dist/types/twisty/model/props/general/URLProp.d.ts +6 -0
  205. package/dist/types/twisty/model/props/general/URLProp.d.ts.map +1 -0
  206. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +7 -0
  207. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -0
  208. package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts +10 -0
  209. package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts.map +1 -0
  210. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +6 -0
  211. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -0
  212. package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts +27 -0
  213. package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +1 -0
  214. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts +14 -0
  215. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +1 -0
  216. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +15 -0
  217. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -0
  218. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +12 -0
  219. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -0
  220. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +17 -0
  221. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -0
  222. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +15 -0
  223. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -0
  224. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +17 -0
  225. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -0
  226. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts +12 -0
  227. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts.map +1 -0
  228. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +15 -0
  229. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -0
  230. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +12 -0
  231. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -0
  232. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts +13 -0
  233. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts.map +1 -0
  234. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +6 -0
  235. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -0
  236. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts +11 -0
  237. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts.map +1 -0
  238. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +6 -0
  239. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts.map +1 -0
  240. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +11 -0
  241. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -0
  242. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +6 -0
  243. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -0
  244. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +13 -0
  245. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -0
  246. package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts +25 -0
  247. package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +1 -0
  248. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +23 -0
  249. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -0
  250. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +15 -0
  251. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -0
  252. package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts +6 -0
  253. package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +1 -0
  254. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +16 -0
  255. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -0
  256. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +7 -0
  257. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -0
  258. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +7 -0
  259. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -0
  260. package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts +22 -0
  261. package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +1 -0
  262. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +7 -0
  263. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -0
  264. package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts +6 -0
  265. package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +1 -0
  266. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +16 -0
  267. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -0
  268. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +15 -0
  269. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -0
  270. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +11 -0
  271. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -0
  272. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +7 -0
  273. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -0
  274. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +7 -0
  275. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -0
  276. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +13 -0
  277. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -0
  278. package/dist/types/twisty/{animation → old/animation}/RenderScheduler.d.ts +3 -0
  279. package/dist/types/twisty/old/animation/RenderScheduler.d.ts.map +1 -0
  280. package/dist/types/twisty/{animation → old/animation}/Timeline.d.ts +0 -0
  281. package/dist/types/twisty/old/animation/Timeline.d.ts.map +1 -0
  282. package/dist/types/twisty/{animation → old/animation}/cursor/AlgCursor.d.ts +4 -4
  283. package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts.map +1 -0
  284. package/dist/types/twisty/{animation → old/animation}/cursor/CursorTypes.d.ts +4 -4
  285. package/dist/types/twisty/old/animation/cursor/CursorTypes.d.ts.map +1 -0
  286. package/dist/types/twisty/{animation → old/animation}/easing.d.ts +0 -0
  287. package/dist/types/twisty/old/animation/easing.d.ts.map +1 -0
  288. package/dist/types/twisty/{animation → old/animation}/indexer/AlgDuration.d.ts +1 -1
  289. package/dist/types/twisty/old/animation/indexer/AlgDuration.d.ts.map +1 -0
  290. package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts +36 -0
  291. package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +1 -0
  292. package/dist/types/twisty/{animation → old/animation}/indexer/SimpleAlgIndexer.d.ts +3 -3
  293. package/dist/types/twisty/old/animation/indexer/SimpleAlgIndexer.d.ts.map +1 -0
  294. package/dist/types/twisty/{animation → old/animation}/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +6 -5
  295. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +1 -0
  296. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +22 -0
  297. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +1 -0
  298. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts +26 -0
  299. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +1 -0
  300. package/dist/types/twisty/{animation → old/animation}/indexer/tree/AlgWalker.d.ts +2 -2
  301. package/dist/types/twisty/old/animation/indexer/tree/AlgWalker.d.ts.map +1 -0
  302. package/dist/types/twisty/{animation → old/animation}/indexer/tree/TreeAlgIndexer.d.ts +3 -3
  303. package/dist/types/twisty/old/animation/indexer/tree/TreeAlgIndexer.d.ts.map +1 -0
  304. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts +3 -0
  305. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts.map +1 -0
  306. package/dist/types/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.d.ts +1 -1
  307. package/dist/types/twisty/old/animation/stream/timeline-move-calculation-draft.d.ts.map +1 -0
  308. package/dist/types/twisty/{dom/TwistyAlgViewer.css_.d.ts → old/dom/TwistyAlgViewerV1.css.d.ts} +1 -1
  309. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts.map +1 -0
  310. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts +52 -0
  311. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts.map +1 -0
  312. package/dist/types/twisty/{dom/TwistyPlayer.css_.d.ts → old/dom/TwistyPlayer.css.d.ts} +1 -1
  313. package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +1 -0
  314. package/dist/types/twisty/{dom → old/dom}/TwistyPlayer.d.ts +8 -8
  315. package/dist/types/twisty/old/dom/TwistyPlayer.d.ts.map +1 -0
  316. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts +5 -0
  317. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts.map +1 -0
  318. package/dist/types/twisty/{dom → old/dom}/TwistyPlayerConfig.d.ts +10 -5
  319. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +1 -0
  320. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts +2 -0
  321. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts.map +1 -0
  322. package/dist/types/twisty/{dom/controls/TwistyScrubber.css_.d.ts → old/dom/controls/TwistyScrubber.css.d.ts} +1 -1
  323. package/dist/types/twisty/old/dom/controls/TwistyScrubber.css.d.ts.map +1 -0
  324. package/dist/types/twisty/{dom → old/dom}/controls/TwistyScrubber.d.ts +1 -1
  325. package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts.map +1 -0
  326. package/dist/types/twisty/{dom/controls/buttons.css_.d.ts → old/dom/controls/buttons.css.d.ts} +1 -1
  327. package/dist/types/twisty/old/dom/controls/buttons.css.d.ts.map +1 -0
  328. package/dist/types/twisty/{dom → old/dom}/controls/buttons.d.ts +1 -1
  329. package/dist/types/twisty/old/dom/controls/buttons.d.ts.map +1 -0
  330. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts +5 -0
  331. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts.map +1 -0
  332. package/dist/types/twisty/{dom → old/dom}/element/ClassListManager.d.ts +0 -0
  333. package/dist/types/twisty/old/dom/element/ClassListManager.d.ts.map +1 -0
  334. package/dist/types/twisty/{dom → old/dom}/element/ElementConfig.d.ts +1 -1
  335. package/dist/types/twisty/old/dom/element/ElementConfig.d.ts.map +1 -0
  336. package/dist/types/twisty/{dom → old/dom}/element/ManagedCustomElement.d.ts +0 -0
  337. package/dist/types/twisty/old/dom/element/ManagedCustomElement.d.ts.map +1 -0
  338. package/dist/types/twisty/{dom → old/dom}/element/node-custom-element-shims.d.ts +0 -0
  339. package/dist/types/twisty/old/dom/element/node-custom-element-shims.d.ts.map +1 -0
  340. package/dist/types/twisty/{dom/stream/TwistyStreamSource.css_.d.ts → old/dom/stream/TwistyStreamSource.css.d.ts} +1 -1
  341. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts.map +1 -0
  342. package/dist/types/twisty/{dom → old/dom}/stream/TwistyStreamSource.d.ts +0 -0
  343. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.d.ts.map +1 -0
  344. package/dist/types/twisty/{dom → old/dom}/viewers/Twisty2DSVG.d.ts +2 -2
  345. package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts.map +1 -0
  346. package/dist/types/twisty/{dom/viewers/Twisty2DSVGView.css_.d.ts → old/dom/viewers/Twisty2DSVGView.css.d.ts} +1 -1
  347. package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts.map +1 -0
  348. package/dist/types/twisty/{dom/viewers/Twisty3DCanvas.css_.d.ts → old/dom/viewers/Twisty3DCanvas.css.d.ts} +1 -1
  349. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts.map +1 -0
  350. package/dist/types/twisty/{dom → old/dom}/viewers/Twisty3DCanvas.d.ts +1 -2
  351. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +1 -0
  352. package/dist/types/twisty/{dom → old/dom}/viewers/TwistyOrbitControls.d.ts +0 -0
  353. package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts.map +1 -0
  354. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts +4 -0
  355. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts.map +1 -0
  356. package/dist/types/twisty/{dom/viewers/TwistyViewerWrapper.css_.d.ts → old/dom/viewers/TwistyViewerWrapper.css.d.ts} +1 -1
  357. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts.map +1 -0
  358. package/dist/types/twisty/{dom → old/dom}/viewers/TwistyViewerWrapper.d.ts +0 -0
  359. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts.map +1 -0
  360. package/dist/types/twisty/old/dom/viewers/canvas.d.ts +3 -0
  361. package/dist/types/twisty/old/dom/viewers/canvas.d.ts.map +1 -0
  362. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +29 -0
  363. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +1 -0
  364. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +16 -0
  365. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +1 -0
  366. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +20 -0
  367. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +1 -0
  368. package/dist/types/twisty/views/3D/RendererPool.d.ts +4 -0
  369. package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -0
  370. package/dist/types/twisty/{3D → views/3D}/TAU.d.ts +0 -0
  371. package/dist/types/twisty/views/3D/TAU.d.ts.map +1 -0
  372. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +17 -0
  373. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -0
  374. package/dist/types/twisty/{3D → views/3D}/Twisty3DRenderTarget.d.ts +0 -0
  375. package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts.map +1 -0
  376. package/dist/types/twisty/{3D → views/3D}/Twisty3DScene.d.ts +0 -0
  377. package/dist/types/twisty/views/3D/Twisty3DScene.d.ts.map +1 -0
  378. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +28 -0
  379. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -0
  380. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +32 -0
  381. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -0
  382. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +41 -0
  383. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +1 -0
  384. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts +5 -0
  385. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts.map +1 -0
  386. package/dist/types/twisty/{3D → views/3D}/puzzles/Cube3D.d.ts +11 -7
  387. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +1 -0
  388. package/dist/types/twisty/{3D → views/3D}/puzzles/KPuzzleWrapper.d.ts +2 -2
  389. package/dist/types/twisty/views/3D/puzzles/KPuzzleWrapper.d.ts.map +1 -0
  390. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +57 -0
  391. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +1 -0
  392. package/dist/types/twisty/{3D → views/3D}/puzzles/Twisty3DPuzzle.d.ts +1 -1
  393. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +1 -0
  394. package/dist/types/twisty/{3D → views/3D}/puzzles/TwistyTestBox.d.ts +2 -2
  395. package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +1 -0
  396. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +18 -0
  397. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +1 -0
  398. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +3 -0
  399. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +1 -0
  400. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +40 -0
  401. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -0
  402. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts +5 -0
  403. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts.map +1 -0
  404. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +61 -0
  405. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +1 -0
  406. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +3 -0
  407. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +1 -0
  408. package/dist/types/twisty/{dom → views}/TwistyAlgViewer.d.ts +6 -6
  409. package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +1 -0
  410. package/dist/types/twisty/views/TwistyPlayer.d.ts +97 -0
  411. package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -0
  412. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +71 -0
  413. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -0
  414. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +33 -0
  415. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -0
  416. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +14 -0
  417. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -0
  418. package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts +15 -0
  419. package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts.map +1 -0
  420. package/dist/types/twisty/views/document.d.ts +2 -0
  421. package/dist/types/twisty/views/document.d.ts.map +1 -0
  422. package/dist/types/twisty/views/screenshot.d.ts +12 -0
  423. package/dist/types/twisty/views/screenshot.d.ts.map +1 -0
  424. package/dist/types/vendor/p-lazy/p-lazy.d.ts +10 -0
  425. package/dist/types/vendor/p-lazy/p-lazy.d.ts.map +1 -0
  426. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +33 -0
  427. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts.map +1 -0
  428. package/docs/.DS_Store +0 -0
  429. package/docs/cubing/.DS_Store +0 -0
  430. package/docs/cubing/alg/index.html +37 -23
  431. package/docs/cubing/index.html +56 -252
  432. package/docs/cubing/scramble/index.html +122 -0
  433. package/docs/cubing/twisty/index.html +329 -0
  434. package/docs/main.css +15 -3
  435. package/package.json +83 -57
  436. package/src/cubing/.DS_Store +0 -0
  437. package/src/cubing/alg/.DS_Store +0 -0
  438. package/src/cubing/alg/Alg.ts +89 -0
  439. package/src/cubing/alg/common.ts +4 -2
  440. package/src/cubing/alg/iteration.ts +1 -1
  441. package/src/cubing/alg/parse.ts +2 -0
  442. package/src/cubing/alg/test/alg-comparison.ts +1 -0
  443. package/src/cubing/alg/units/.DS_Store +0 -0
  444. package/src/cubing/alg/units/Unit.ts +0 -3
  445. package/src/cubing/alg/units/containers/Commutator.ts +1 -1
  446. package/src/cubing/alg/units/leaves/Move.ts +4 -4
  447. package/src/cubing/bluetooth/.DS_Store +0 -0
  448. package/src/cubing/bluetooth/connect/index.ts +1 -1
  449. package/src/cubing/bluetooth/smart-puzzle/Heykube.ts +1 -1
  450. package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +1 -1
  451. package/src/cubing/bluetooth/smart-puzzle/gan.ts +5 -5
  452. package/src/cubing/bluetooth/smart-puzzle/giiker.ts +2 -2
  453. package/src/cubing/bluetooth/smart-puzzle/gocube.ts +5 -5
  454. package/src/cubing/bluetooth/smart-robot/GanRobot.ts +5 -5
  455. package/src/cubing/bluetooth/smart-timer/GanTimer.ts +2 -2
  456. package/src/cubing/kpuzzle/.DS_Store +0 -0
  457. package/src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.ts +40 -0
  458. package/src/cubing/{puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.ts → kpuzzle/3x3x3/3x3x3.kpuzzle.json.ts} +11 -6
  459. package/src/cubing/kpuzzle/canon.spec.ts +6 -11
  460. package/src/cubing/kpuzzle/canonicalize.ts +1 -1
  461. package/src/cubing/kpuzzle/definition_types.ts +0 -3
  462. package/src/cubing/kpuzzle/index.ts +1 -0
  463. package/src/cubing/kpuzzle/prunetable.spec.ts +2 -4
  464. package/src/cubing/kpuzzle/puzzle-orientation.ts +1 -1
  465. package/src/cubing/kpuzzle/svg.ts +4 -9
  466. package/src/cubing/kpuzzle/transformations.ts +1 -1
  467. package/src/cubing/protocol/binary/binary3x3x3.spec.ts +5 -2
  468. package/src/cubing/protocol/binary/hex.ts +4 -4
  469. package/src/cubing/protocol/binary/orbit-indexing.ts +2 -2
  470. package/src/cubing/protocol/binary/puzzle-orientation.ts +2 -2
  471. package/src/cubing/puzzle-geometry/Options.ts +151 -22
  472. package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +24 -28
  473. package/src/cubing/puzzle-geometry/PermOriSet.ts +99 -98
  474. package/src/cubing/puzzle-geometry/PlatonicGenerator.ts +1 -1
  475. package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +836 -867
  476. package/src/cubing/puzzle-geometry/Quat.ts +1 -68
  477. package/src/cubing/puzzle-geometry/SchreierSims.ts +2 -13
  478. package/src/cubing/puzzle-geometry/index.ts +2 -11
  479. package/src/cubing/puzzle-geometry/interfaces.ts +1 -27
  480. package/src/cubing/puzzle-geometry/orientcenters.spec.ts +24 -30
  481. package/src/cubing/puzzles/.DS_Store +0 -0
  482. package/src/cubing/puzzles/PuzzleLoader.ts +1 -1
  483. package/src/cubing/puzzles/async/async-pg3d.ts +5 -8
  484. package/src/cubing/puzzles/customPGPuzzleLoader.ts +60 -0
  485. package/src/cubing/puzzles/implementations/.DS_Store +0 -0
  486. package/src/cubing/puzzles/implementations/2x2x2/{2x2x2.kpuzzle.json_.ts → 2x2x2.kpuzzle.json.ts} +0 -0
  487. package/src/cubing/puzzles/implementations/2x2x2/index.ts +1 -1
  488. package/src/cubing/puzzles/implementations/3x3x3/index.ts +2 -3
  489. package/src/cubing/puzzles/implementations/clock/{clock.kpuzzle.json_.ts → clock.kpuzzle.json.ts} +0 -0
  490. package/src/cubing/puzzles/implementations/clock/index.ts +1 -1
  491. package/src/cubing/puzzles/implementations/fto/index.ts +19 -11
  492. package/src/cubing/puzzles/implementations/pyraminx/{pyraminx.kpuzzle.json_.ts → pyraminx.kpuzzle.json.ts} +0 -0
  493. package/src/cubing/puzzles/implementations/square1/index.ts +1 -2
  494. package/src/cubing/puzzles/implementations/square1/{sq1-hyperorbit.kpuzzle.json_.ts → sq1-hyperorbit.kpuzzle.json.ts} +0 -0
  495. package/src/cubing/puzzles/index.ts +30 -20
  496. package/src/cubing/puzzles/stickerings/appearance.ts +10 -9
  497. package/src/cubing/puzzles/stickerings/cube-stickerings.ts +8 -0
  498. package/src/cubing/puzzles/stickerings/fto-stickerings.ts +9 -0
  499. package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +61 -0
  500. package/src/cubing/search/.DS_Store +0 -0
  501. package/src/cubing/search/.gitignore +1 -2
  502. package/src/cubing/search/esm-test-worker.js +1 -1
  503. package/src/cubing/search/index.ts +1 -0
  504. package/src/cubing/search/inside/api.spec.ts +1 -0
  505. package/src/cubing/search/inside/api.ts +6 -1
  506. package/src/cubing/search/inside/solve/parseSGS.ts +7 -11
  507. package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +3 -3
  508. package/src/cubing/search/inside/solve/puzzles/3x3x3/filter.ts +0 -6
  509. package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +0 -2
  510. package/src/cubing/search/inside/solve/puzzles/FTO.sgs +264 -0
  511. package/src/cubing/search/inside/solve/puzzles/megaminx.sgs.json.ts +4 -6
  512. package/src/cubing/search/inside/solve/puzzles/skewb.sgs.json.ts +4 -6
  513. package/src/cubing/search/inside/solve/tremble.ts +6 -9
  514. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.ts +20 -822
  515. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.ts +177 -252
  516. package/src/cubing/search/inside/solve/vendor/min2phase/gwt.js +62 -222
  517. package/src/cubing/search/inside/solve/vendor/random-uint-below/get-random-values.ts +4 -5
  518. package/src/cubing/search/inside/solve/vendor/random-uint-below/random-int.ts +9 -11
  519. package/src/cubing/search/inside/solve/vendor/sq12phase/scramble_sq1.js +13 -582
  520. package/src/cubing/search/instantiator.ts +11 -7
  521. package/src/cubing/search/outside.ts +8 -2
  522. package/src/cubing/search/worker-inside-generated-string.js +1 -1
  523. package/src/cubing/stream/.DS_Store +0 -0
  524. package/src/cubing/stream/process/ReorientedStream.ts +1 -1
  525. package/src/cubing/stream/twizzle/TwizzleStream.ts +11 -8
  526. package/src/cubing/stream/websocket-proxy.ts +1 -3
  527. package/src/cubing/twisty/.DS_Store +0 -0
  528. package/src/cubing/twisty/controllers/TwistyAnimationController.ts +248 -0
  529. package/src/cubing/twisty/controllers/TwistyPlayerController.ts +38 -0
  530. package/src/cubing/twisty/heavy-code-imports/3d.ts +18 -0
  531. package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +41 -0
  532. package/src/cubing/twisty/index.ts +24 -17
  533. package/src/cubing/twisty/model/.DS_Store +0 -0
  534. package/src/cubing/twisty/model/PromiseFreshener.ts +49 -0
  535. package/src/cubing/twisty/model/TwistyPlayerModel.ts +222 -0
  536. package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +22 -0
  537. package/src/cubing/twisty/model/helpers.ts +47 -0
  538. package/src/cubing/{search/vendor → twisty/model/props}/.DS_Store +0 -0
  539. package/src/cubing/twisty/model/props/TwistyProp.spec.ts +38 -0
  540. package/src/cubing/twisty/model/props/TwistyProp.ts +366 -0
  541. package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +370 -0
  542. package/src/cubing/twisty/model/props/general/URLProp.ts +14 -0
  543. package/src/cubing/{solve → twisty/model/props/puzzle}/.DS_Store +0 -0
  544. package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +10 -0
  545. package/src/cubing/twisty/model/props/puzzle/display/SpriteProp.ts +43 -0
  546. package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +8 -0
  547. package/src/cubing/twisty/model/props/puzzle/state/AlgProp.ts +91 -0
  548. package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +28 -0
  549. package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +44 -0
  550. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +91 -0
  551. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +48 -0
  552. package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +46 -0
  553. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +46 -0
  554. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.ts +15 -0
  555. package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +24 -0
  556. package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +22 -0
  557. package/src/cubing/twisty/model/props/puzzle/state/PuzzleAlgProp.ts +28 -0
  558. package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +8 -0
  559. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDefProp.ts +14 -0
  560. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.ts +14 -0
  561. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +12 -0
  562. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +17 -0
  563. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +38 -0
  564. package/src/cubing/twisty/model/props/timeline/CoarseTimelineInfoProp.ts +45 -0
  565. package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +76 -0
  566. package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +51 -0
  567. package/src/cubing/twisty/model/props/timeline/TempoScaleProp.ts +13 -0
  568. package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +38 -0
  569. package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +10 -0
  570. package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +10 -0
  571. package/src/cubing/twisty/model/props/viewer/ButtonAppearanceProp.ts +86 -0
  572. package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +10 -0
  573. package/src/cubing/twisty/model/props/viewer/LatitudeLimit.ts +11 -0
  574. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +56 -0
  575. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +69 -0
  576. package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +15 -0
  577. package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +10 -0
  578. package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +10 -0
  579. package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +45 -0
  580. package/src/cubing/twisty/old/.DS_Store +0 -0
  581. package/src/cubing/twisty/old/animation/.DS_Store +0 -0
  582. package/src/cubing/twisty/{animation → old/animation}/RenderScheduler.ts +5 -0
  583. package/src/cubing/twisty/{animation → old/animation}/Timeline.ts +0 -0
  584. package/src/cubing/twisty/{animation → old/animation}/cursor/AlgCursor.ts +15 -8
  585. package/src/cubing/twisty/{animation → old/animation}/cursor/CursorTypes.ts +4 -4
  586. package/src/cubing/twisty/{animation → old/animation}/easing.ts +0 -0
  587. package/src/cubing/{search/inside → twisty/old/animation/indexer}/.DS_Store +0 -0
  588. package/src/cubing/twisty/{animation → old/animation}/indexer/AlgDuration.ts +1 -1
  589. package/src/cubing/twisty/old/animation/indexer/AlgIndexer.ts +86 -0
  590. package/src/cubing/twisty/{animation → old/animation}/indexer/SimpleAlgIndexer.ts +9 -6
  591. package/src/cubing/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +181 -0
  592. package/src/cubing/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +243 -0
  593. package/src/cubing/twisty/{animation → old/animation}/indexer/simultaneous-moves/simul-moves.ts +46 -34
  594. package/src/cubing/twisty/{animation → old/animation}/indexer/tree/AlgWalker.ts +6 -3
  595. package/src/cubing/twisty/{animation → old/animation}/indexer/tree/TreeAlgIndexer.ts +8 -5
  596. package/src/cubing/twisty/{animation → old/animation}/indexer/tree/chunkAlgs.ts +2 -2
  597. package/src/cubing/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -0
  598. package/src/cubing/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.ts +2 -2
  599. package/src/cubing/twisty/old/dom/.DS_Store +0 -0
  600. package/src/cubing/twisty/{dom/TwistyAlgViewer.css_.ts → old/dom/TwistyAlgViewerV1.css.ts} +0 -0
  601. package/src/cubing/twisty/{dom/TwistyAlgViewer.ts → old/dom/TwistyAlgViewerV1.ts} +43 -36
  602. package/src/cubing/twisty/{dom/TwistyPlayer.css_.ts → old/dom/TwistyPlayer.css.ts} +28 -1
  603. package/src/cubing/twisty/{dom → old/dom}/TwistyPlayer.spec.ts +5 -6
  604. package/src/cubing/twisty/{dom → old/dom}/TwistyPlayer.ts +36 -43
  605. package/src/cubing/twisty/{dom → old/dom}/TwistyPlayerConfig.ts +27 -10
  606. package/src/cubing/twisty/{dom/controls/TwistyControlElement.ts.ts → old/dom/controls/TwistyControlElement.ts} +0 -0
  607. package/src/cubing/twisty/{dom/controls/TwistyScrubber.css_.ts → old/dom/controls/TwistyScrubber.css.ts} +0 -0
  608. package/src/cubing/twisty/{dom → old/dom}/controls/TwistyScrubber.ts +3 -3
  609. package/src/cubing/twisty/{dom/controls/buttons.css_.ts → old/dom/controls/buttons.css.ts} +14 -1
  610. package/src/cubing/twisty/{dom → old/dom}/controls/buttons.spec.ts +1 -1
  611. package/src/cubing/twisty/{dom → old/dom}/controls/buttons.ts +15 -15
  612. package/src/cubing/twisty/{dom → old/dom}/element/ClassListManager.ts +0 -0
  613. package/src/cubing/twisty/{dom → old/dom}/element/ElementConfig.ts +1 -1
  614. package/src/cubing/twisty/{dom → old/dom}/element/ManagedCustomElement.ts +0 -0
  615. package/src/cubing/twisty/{dom → old/dom}/element/node-custom-element-shims.ts +0 -0
  616. package/src/cubing/twisty/{dom/stream/TwistyStreamSource.css_.ts → old/dom/stream/TwistyStreamSource.css.ts} +0 -0
  617. package/src/cubing/twisty/{dom → old/dom}/stream/TwistyStreamSource.ts +8 -8
  618. package/src/cubing/twisty/{dom → old/dom}/viewers/Twisty2DSVG.ts +7 -9
  619. package/src/cubing/twisty/{dom/viewers/Twisty2DSVGView.css_.ts → old/dom/viewers/Twisty2DSVGView.css.ts} +0 -0
  620. package/src/cubing/twisty/{dom/viewers/Twisty3DCanvas.css_.ts → old/dom/viewers/Twisty3DCanvas.css.ts} +0 -0
  621. package/src/cubing/twisty/{dom → old/dom}/viewers/Twisty3DCanvas.ts +5 -12
  622. package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyOrbitControls.ts +53 -20
  623. package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyViewerElement.ts +1 -1
  624. package/src/cubing/twisty/{dom/viewers/TwistyViewerWrapper.css_.ts → old/dom/viewers/TwistyViewerWrapper.css.ts} +0 -0
  625. package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyViewerWrapper.ts +1 -1
  626. package/src/cubing/twisty/old/dom/viewers/canvas.ts +9 -0
  627. package/src/cubing/twisty/views/.DS_Store +0 -0
  628. package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +150 -0
  629. package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +52 -0
  630. package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +77 -0
  631. package/src/cubing/twisty/views/3D/RendererPool.ts +53 -0
  632. package/src/cubing/twisty/{3D → views/3D}/TAU.ts +0 -0
  633. package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +168 -0
  634. package/src/cubing/twisty/{3D → views/3D}/Twisty3DRenderTarget.ts +0 -0
  635. package/src/cubing/twisty/{3D → views/3D}/Twisty3DScene.ts +0 -0
  636. package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +144 -0
  637. package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +244 -0
  638. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +209 -0
  639. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +270 -0
  640. package/src/cubing/twisty/{3D → views/3D}/puzzles/Cube3D.ts +36 -15
  641. package/src/cubing/twisty/{3D → views/3D}/puzzles/KPuzzleWrapper.ts +4 -5
  642. package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +988 -0
  643. package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +6 -0
  644. package/src/cubing/twisty/{3D → views/3D}/puzzles/TwistyTestBox.ts +2 -2
  645. package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +116 -0
  646. package/src/cubing/twisty/{dom/TwistyAlgEditor.css_.ts → views/TwistyAlgEditor/TwistyAlgEditor.css.ts} +3 -1
  647. package/src/cubing/twisty/{dom → views/TwistyAlgEditor}/TwistyAlgEditor.spec.ts +7 -6
  648. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +360 -0
  649. package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +179 -0
  650. package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +25 -0
  651. package/src/cubing/twisty/views/TwistyAlgViewer.ts +502 -0
  652. package/src/cubing/twisty/views/TwistyPlayer.ts +327 -0
  653. package/src/cubing/twisty/views/TwistyPlayerSettable.ts +111 -0
  654. package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +159 -0
  655. package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +145 -0
  656. package/src/cubing/twisty/views/control-panel/webkit-fullscreen.ts +44 -0
  657. package/src/cubing/twisty/views/document.ts +4 -0
  658. package/src/cubing/twisty/views/screenshot.ts +90 -0
  659. package/src/cubing/vendor/.DS_Store +0 -0
  660. package/src/cubing/vendor/p-lazy/license +9 -0
  661. package/src/cubing/vendor/p-lazy/p-lazy.ts +52 -0
  662. package/src/cubing/vendor/p-lazy/readme.md +54 -0
  663. package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +179 -0
  664. package/dist/esm/chunk-CWVB5RRW.js.map +0 -7
  665. package/dist/esm/chunk-KKSDHNLH.js.map +0 -7
  666. package/dist/esm/chunk-YNB7QLBF.js.map +0 -7
  667. package/dist/esm/worker-inside-generated-string-LT4NV55Q.js +0 -2826
  668. package/dist/esm/worker-inside-generated-string-LT4NV55Q.js.map +0 -7
  669. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json_.d.ts.map +0 -1
  670. package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.d.ts +0 -3
  671. package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.d.ts.map +0 -1
  672. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json_.d.ts.map +0 -1
  673. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json_.d.ts.map +0 -1
  674. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json_.d.ts.map +0 -1
  675. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.d.ts +0 -3
  676. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.d.ts.map +0 -1
  677. package/dist/types/twisty/3D/TAU.d.ts.map +0 -1
  678. package/dist/types/twisty/3D/Twisty3DRenderTarget.d.ts.map +0 -1
  679. package/dist/types/twisty/3D/Twisty3DScene.d.ts.map +0 -1
  680. package/dist/types/twisty/3D/puzzles/Cube3D.d.ts.map +0 -1
  681. package/dist/types/twisty/3D/puzzles/KPuzzleWrapper.d.ts.map +0 -1
  682. package/dist/types/twisty/3D/puzzles/PG3D.d.ts +0 -51
  683. package/dist/types/twisty/3D/puzzles/PG3D.d.ts.map +0 -1
  684. package/dist/types/twisty/3D/puzzles/Twisty3DPuzzle.d.ts.map +0 -1
  685. package/dist/types/twisty/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
  686. package/dist/types/twisty/animation/RenderScheduler.d.ts.map +0 -1
  687. package/dist/types/twisty/animation/Timeline.d.ts.map +0 -1
  688. package/dist/types/twisty/animation/cursor/AlgCursor.d.ts.map +0 -1
  689. package/dist/types/twisty/animation/cursor/CursorTypes.d.ts.map +0 -1
  690. package/dist/types/twisty/animation/easing.d.ts.map +0 -1
  691. package/dist/types/twisty/animation/indexer/AlgDuration.d.ts.map +0 -1
  692. package/dist/types/twisty/animation/indexer/AlgIndexer.d.ts +0 -15
  693. package/dist/types/twisty/animation/indexer/AlgIndexer.d.ts.map +0 -1
  694. package/dist/types/twisty/animation/indexer/SimpleAlgIndexer.d.ts.map +0 -1
  695. package/dist/types/twisty/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
  696. package/dist/types/twisty/animation/indexer/simultaneous-moves/simul-moves.d.ts +0 -25
  697. package/dist/types/twisty/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
  698. package/dist/types/twisty/animation/indexer/tree/AlgWalker.d.ts.map +0 -1
  699. package/dist/types/twisty/animation/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
  700. package/dist/types/twisty/animation/indexer/tree/chunkAlgs.d.ts +0 -3
  701. package/dist/types/twisty/animation/indexer/tree/chunkAlgs.d.ts.map +0 -1
  702. package/dist/types/twisty/animation/stream/timeline-move-calculation-draft.d.ts.map +0 -1
  703. package/dist/types/twisty/dom/TwistyAlgEditor.css_.d.ts +0 -3
  704. package/dist/types/twisty/dom/TwistyAlgEditor.css_.d.ts.map +0 -1
  705. package/dist/types/twisty/dom/TwistyAlgEditor.d.ts +0 -27
  706. package/dist/types/twisty/dom/TwistyAlgEditor.d.ts.map +0 -1
  707. package/dist/types/twisty/dom/TwistyAlgEditorStartCharSearch.d.ts +0 -26
  708. package/dist/types/twisty/dom/TwistyAlgEditorStartCharSearch.d.ts.map +0 -1
  709. package/dist/types/twisty/dom/TwistyAlgViewer.css_.d.ts.map +0 -1
  710. package/dist/types/twisty/dom/TwistyAlgViewer.d.ts.map +0 -1
  711. package/dist/types/twisty/dom/TwistyPlayer.css_.d.ts.map +0 -1
  712. package/dist/types/twisty/dom/TwistyPlayer.d.ts.map +0 -1
  713. package/dist/types/twisty/dom/TwistyPlayerConfig.d.ts.map +0 -1
  714. package/dist/types/twisty/dom/controls/TwistyControlElement.ts.d.ts +0 -2
  715. package/dist/types/twisty/dom/controls/TwistyControlElement.ts.d.ts.map +0 -1
  716. package/dist/types/twisty/dom/controls/TwistyScrubber.css_.d.ts.map +0 -1
  717. package/dist/types/twisty/dom/controls/TwistyScrubber.d.ts.map +0 -1
  718. package/dist/types/twisty/dom/controls/buttons.css_.d.ts.map +0 -1
  719. package/dist/types/twisty/dom/controls/buttons.d.ts.map +0 -1
  720. package/dist/types/twisty/dom/element/ClassListManager.d.ts.map +0 -1
  721. package/dist/types/twisty/dom/element/ElementConfig.d.ts.map +0 -1
  722. package/dist/types/twisty/dom/element/ManagedCustomElement.d.ts.map +0 -1
  723. package/dist/types/twisty/dom/element/node-custom-element-shims.d.ts.map +0 -1
  724. package/dist/types/twisty/dom/stream/TwistyStreamSource.css_.d.ts.map +0 -1
  725. package/dist/types/twisty/dom/stream/TwistyStreamSource.d.ts.map +0 -1
  726. package/dist/types/twisty/dom/viewers/Twisty2DSVG.d.ts.map +0 -1
  727. package/dist/types/twisty/dom/viewers/Twisty2DSVGView.css_.d.ts.map +0 -1
  728. package/dist/types/twisty/dom/viewers/Twisty3DCanvas.css_.d.ts.map +0 -1
  729. package/dist/types/twisty/dom/viewers/Twisty3DCanvas.d.ts.map +0 -1
  730. package/dist/types/twisty/dom/viewers/TwistyOrbitControls.d.ts.map +0 -1
  731. package/dist/types/twisty/dom/viewers/TwistyViewerElement.d.ts +0 -4
  732. package/dist/types/twisty/dom/viewers/TwistyViewerElement.d.ts.map +0 -1
  733. package/dist/types/twisty/dom/viewers/TwistyViewerWrapper.css_.d.ts.map +0 -1
  734. package/dist/types/twisty/dom/viewers/TwistyViewerWrapper.d.ts.map +0 -1
  735. package/dist/types/twisty/dom/viewers/canvas.d.ts +0 -2
  736. package/dist/types/twisty/dom/viewers/canvas.d.ts.map +0 -1
  737. package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -2
  738. package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts.map +0 -1
  739. package/dist/types/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts +0 -21
  740. package/dist/types/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts.map +0 -1
  741. package/src/cubing/protocol/.DS_Store +0 -0
  742. package/src/cubing/puzzle-geometry/.DS_Store +0 -0
  743. package/src/cubing/search/inside/solve/.DS_Store +0 -0
  744. package/src/cubing/search/inside/solve/puzzles/.DS_Store +0 -0
  745. package/src/cubing/search/inside/solve/puzzles/3x3x3/.DS_Store +0 -0
  746. package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
  747. package/src/cubing/search/inside/solve/vendor/cstimer/.DS_Store +0 -0
  748. package/src/cubing/search/inside/solve/vendor/cstimer/src/.DS_Store +0 -0
  749. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/.DS_Store +0 -0
  750. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/.DS_Store +0 -0
  751. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.ts +0 -13
  752. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lib/.DS_Store +0 -0
  753. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/scramble/.DS_Store +0 -0
  754. package/src/cubing/search/inside/solve/vendor/sgs/.DS_Store +0 -0
  755. package/src/cubing/search/inside/solve/vendor/sgs/src/.DS_Store +0 -0
  756. package/src/cubing/search/inside/solve/vendor/sgs/src/test/.DS_Store +0 -0
  757. package/src/cubing/search/vendor/comlink-everywhere/.DS_Store +0 -0
  758. package/src/cubing/twisty/3D/puzzles/PG3D.ts +0 -600
  759. package/src/cubing/twisty/3D/puzzles/Twisty3DPuzzle.ts +0 -9
  760. package/src/cubing/twisty/3D/puzzles/mkbhd.svg +0 -5
  761. package/src/cubing/twisty/animation/indexer/AlgIndexer.ts +0 -25
  762. package/src/cubing/twisty/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +0 -168
  763. package/src/cubing/twisty/dom/TwistyAlgEditor.ts +0 -373
  764. package/src/cubing/twisty/dom/TwistyAlgEditorStartCharSearch.ts +0 -138
  765. package/src/cubing/twisty/dom/viewers/canvas.ts +0 -4
  766. package/src/cubing/twisty/views/3D/.DS_Store +0 -0
  767. package/src/cubing/vendor/three/.DS_Store +0 -0
  768. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.ts +0 -2
  769. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts +0 -24
  770. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.wrapped.js +0 -178
@@ -0,0 +1,327 @@
1
+ import type { ExperimentalStickering } from "..";
2
+ import { Alg, Move } from "../../alg";
3
+ import type { PuzzleDescriptionString } from "../../puzzle-geometry/PGPuzzles";
4
+ import type { TwistyAnimationControllerDelegate } from "../controllers/TwistyAnimationController";
5
+ import { TwistyPlayerController } from "../controllers/TwistyPlayerController";
6
+ import type { BackgroundThemeWithAuto } from "../model/props/viewer/BackgroundProp";
7
+ import type { BackViewLayoutWithAuto } from "../model/props/viewer/BackViewProp";
8
+ import type { ControlPanelThemeWithAuto } from "../model/props/viewer/ControlPanelProp";
9
+ import type { HintFaceletStyleWithAuto } from "../model/props/puzzle/display/HintFaceletProp";
10
+ import type { ViewerLinkPageWithAuto } from "../model/props/viewer/ViewerLinkProp";
11
+ import type { VisualizationFormatWithAuto } from "../model/props/viewer/VisualizationProp";
12
+ import type { VisualizationStrategy } from "../model/props/viewer/VisualizationStrategyProp";
13
+ import { ClassListManager } from "../old/dom/element/ClassListManager";
14
+ import { customElementsShim } from "../old/dom/element/node-custom-element-shims";
15
+ import { twistyPlayerCSS } from "../old/dom/TwistyPlayer.css";
16
+ import {
17
+ controlsLocations,
18
+ PuzzleID,
19
+ SetupToLocation,
20
+ } from "../old/dom/TwistyPlayerConfig";
21
+ import { Twisty2DSceneWrapper } from "./2D/Twisty2DSceneWrapper";
22
+ import { Twisty3DSceneWrapper } from "./3D/Twisty3DSceneWrapper";
23
+ import { TwistyButtonsV2 } from "./control-panel/TwistyButtonsV2";
24
+ import { TwistyScrubberV2 } from "./control-panel/TwistyScrubberV2";
25
+ import { downloadURL, getDefaultFilename, screenshot } from "./screenshot";
26
+ import { TwistyPlayerSettable } from "./TwistyPlayerSettable";
27
+
28
+ // TODO: I couldn't figure out how to use use more specific types. Ideally, we'd
29
+ // enforce consistency with the model.
30
+ export const twistyPlayerAttributeMap = {
31
+ // TODO: We assume each of these can be set using a string or will be automatically converted by JS (e.g. numbers). Can we enforce
32
+ // that with types? Do we need to add a translation mechanism for things we
33
+ // don't want to leave settable as strings?
34
+ // TODO: Enum validation.
35
+
36
+ // Alg
37
+ "alg": "alg",
38
+ "experimental-setup-alg": "experimentalSetupAlg",
39
+
40
+ // String-based
41
+ "experimental-setup-anchor": "experimentalSetupAnchor",
42
+ "puzzle": "puzzle",
43
+ "experimental-puzzle-description": "experimentalPuzzleDescription",
44
+ "visualization": "visualization",
45
+ "hint-facelets": "hintFacelets",
46
+ "experimental-stickering": "experimentalStickering",
47
+ "background": "background",
48
+ "control-panel": "controlPanel",
49
+ "back-view": "backView",
50
+ // "indexer": "indexer",
51
+ "viewer-link": "viewerLink",
52
+
53
+ // Number-based
54
+ "camera-latitude": "cameraLatitude",
55
+ "camera-longitude": "cameraLongitude",
56
+ "camera-distance": "cameraDistance",
57
+ "camera-latitude-limit": "cameraLatitudeLimit",
58
+ "tempo-scale": "tempoScale",
59
+
60
+ // URL-based
61
+ "experimental-sprite": "experimentalSprite",
62
+ "experimental-hint-sprite": "experimentalHintSprite",
63
+ };
64
+
65
+ export type TwistyPlayerAttribute = keyof typeof twistyPlayerAttributeMap;
66
+
67
+ const configKeys: Record<TwistyPlayerAttribute, true> = Object.fromEntries(
68
+ Object.values(twistyPlayerAttributeMap).map((s) => [s, true]),
69
+ ) as any;
70
+
71
+ // TODO: Find a way to share this def with `attributeMap`.
72
+ export interface TwistyPlayerConfig {
73
+ // Alg
74
+ alg?: Alg | string;
75
+ experimentalSetupAlg?: Alg | string;
76
+
77
+ // String-based
78
+ experimentalSetupAnchor?: SetupToLocation; // TODO: "auto"
79
+ puzzle?: PuzzleID;
80
+ experimentalPuzzleDescription?: PuzzleDescriptionString;
81
+ visualization?: VisualizationFormatWithAuto;
82
+ hintFacelets?: HintFaceletStyleWithAuto;
83
+ experimentalStickering?: ExperimentalStickering;
84
+ background?: BackViewLayoutWithAuto;
85
+ controlPanel?: ControlPanelThemeWithAuto;
86
+ backView?: BackViewLayoutWithAuto;
87
+ // "indexer"?: "indexer";
88
+ viewerLink?: ViewerLinkPageWithAuto;
89
+
90
+ // Number-based
91
+ cameraLatitude?: number;
92
+ cameraLongitude?: number;
93
+ cameraDistance?: number;
94
+ cameraLatitudeLimit?: number;
95
+ tempoScale?: number;
96
+
97
+ // URL-based
98
+ experimentalSprite?: string | null;
99
+ experimentalHintSprite?: string | null;
100
+ }
101
+
102
+ /**
103
+ * TwistyPlayer is the heart of `cubing.js`. It can be used to display a puzzle on a web page like this:
104
+ *
105
+ * <script src="path/to/cubing/twisty" type="module"></script>
106
+ * <twisty-player alg="R U R'"></twisty-player>
107
+ *
108
+ * You can also construct it directly in JavaScript:
109
+ *
110
+ * import { TwistyPlayer } from "cubing/twisty";
111
+ * const twistyPlayer = new TwistyPlayer({alg: "R U R'"});
112
+ * // Once the page has loaded, you can do this:
113
+ * document.body.appendChild(twistyPlayer);
114
+ *
115
+ * See {@link https://js.cubing.net/cubing/} for more examples.
116
+ */
117
+ export class TwistyPlayer
118
+ extends TwistyPlayerSettable
119
+ implements TwistyAnimationControllerDelegate
120
+ {
121
+ controller: TwistyPlayerController = new TwistyPlayerController(
122
+ this.experimentalModel,
123
+ this,
124
+ );
125
+
126
+ buttons: TwistyButtonsV2;
127
+
128
+ constructor(config: TwistyPlayerConfig = {}) {
129
+ super();
130
+
131
+ // TODO: double-check that these are all getting set sync without causing extra work.
132
+ for (const [propName, value] of Object.entries(config)) {
133
+ if (!configKeys[propName as TwistyPlayerAttribute]) {
134
+ console.warn(`Invalid config passed to TwistyPlayer: ${propName}`);
135
+ break;
136
+ }
137
+ (this as any)[propName] = value;
138
+ }
139
+ }
140
+
141
+ #controlsManager: ClassListManager<ControlPanelThemeWithAuto> =
142
+ new ClassListManager<ControlPanelThemeWithAuto>(
143
+ this,
144
+ "controls-",
145
+ (["auto"] as ControlPanelThemeWithAuto[]).concat(
146
+ Object.keys(controlsLocations) as ControlPanelThemeWithAuto[],
147
+ ),
148
+ );
149
+
150
+ #visualizationWrapperElem = document.createElement("div"); // TODO: Better pattern.
151
+ #errorElem = document.createElement("div"); // TODO: Better pattern.
152
+ async connectedCallback(): Promise<void> {
153
+ this.addCSS(twistyPlayerCSS);
154
+
155
+ this.addElement(this.#visualizationWrapperElem).classList.add(
156
+ "visualization-wrapper",
157
+ );
158
+ this.addElement(this.#errorElem).classList.add("error-elem");
159
+ this.#errorElem.textContent = "Error";
160
+ this.experimentalModel.userVisibleErrorTracker.addFreshListener(
161
+ (userVisibleError) => {
162
+ const errorString: string | null = userVisibleError.errors[0] ?? null;
163
+ this.contentWrapper.classList.toggle("error", !!errorString);
164
+ if (errorString) {
165
+ this.#errorElem.textContent = errorString;
166
+ }
167
+ },
168
+ );
169
+
170
+ const scrubber = new TwistyScrubberV2(this.experimentalModel);
171
+ this.contentWrapper.appendChild(scrubber);
172
+
173
+ this.buttons = new TwistyButtonsV2(
174
+ this.experimentalModel,
175
+ this.controller,
176
+ this,
177
+ );
178
+ this.contentWrapper.appendChild(this.buttons);
179
+
180
+ this.experimentalModel.backgroundProp.addFreshListener(
181
+ (backgroundTheme: BackgroundThemeWithAuto) => {
182
+ this.contentWrapper.classList.toggle(
183
+ "checkered",
184
+ backgroundTheme !== "none",
185
+ );
186
+ },
187
+ );
188
+
189
+ this.experimentalModel.controlPanelProp.addFreshListener(
190
+ (controlPanel: ControlPanelThemeWithAuto) => {
191
+ this.#controlsManager.setValue(controlPanel);
192
+ },
193
+ );
194
+
195
+ this.experimentalModel.visualizationStrategyProp.addFreshListener(
196
+ this.#setVisualizationWrapper.bind(this),
197
+ );
198
+
199
+ this.experimentalModel.puzzleIDProp.addFreshListener(this.flash.bind(this));
200
+ }
201
+
202
+ flash() {
203
+ this.#visualizationWrapper?.animate([{ opacity: 0.25 }, { opacity: 1 }], {
204
+ duration: 250,
205
+ });
206
+ }
207
+
208
+ #visualizationWrapper: Twisty2DSceneWrapper | Twisty3DSceneWrapper | null =
209
+ null;
210
+
211
+ #visualizationStrategy: VisualizationStrategy | null = null;
212
+ #setVisualizationWrapper(strategy: VisualizationStrategy): void {
213
+ if (strategy !== this.#visualizationStrategy) {
214
+ this.#visualizationWrapper?.remove();
215
+ this.#visualizationWrapper?.disconnect();
216
+ let newWrapper: Twisty2DSceneWrapper | Twisty3DSceneWrapper;
217
+ switch (strategy) {
218
+ case "2D":
219
+ case "experimental-2D-LL":
220
+ newWrapper = new Twisty2DSceneWrapper(
221
+ this.experimentalModel,
222
+ strategy,
223
+ );
224
+ break;
225
+ case "Cube3D":
226
+ case "PG3D":
227
+ // TODO: Properly wire this up so we can set PG3D for the cube.
228
+ newWrapper = new Twisty3DSceneWrapper(this.experimentalModel);
229
+ break;
230
+ default:
231
+ throw new Error("Invalid visualization");
232
+ }
233
+ this.#visualizationWrapperElem.appendChild(newWrapper);
234
+ this.#visualizationWrapper = newWrapper;
235
+ this.#visualizationStrategy = strategy;
236
+ }
237
+ }
238
+
239
+ jumpToStart(options?: { flash: boolean }): void {
240
+ this.controller.jumpToStart(options);
241
+ }
242
+
243
+ jumpToEnd(options?: { flash: boolean }): void {
244
+ this.controller.jumpToEnd(options);
245
+ }
246
+
247
+ play(): void {
248
+ this.controller.togglePlay(true);
249
+ }
250
+
251
+ pause(): void {
252
+ this.controller.togglePlay(false);
253
+ }
254
+
255
+ // Inspiration:
256
+ // - https://developer.mozilla.org/en-US/docs/Web/API/Element/toggleAttribute (`force` argument)
257
+ // - https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/toggle (`force` argument)
258
+ // We still provide `play()` and `pause()` individually for convenience, though.
259
+ togglePlay(play?: boolean): void {
260
+ this.controller.togglePlay(play);
261
+ }
262
+
263
+ // TODO: Animate the new move.
264
+ experimentalAddMove(move: Move): void {
265
+ (async () => {
266
+ const alg = (await this.experimentalModel.algProp.get()).alg;
267
+ this.experimentalModel.algProp.set(new Alg(alg.concat([move])));
268
+ this.experimentalModel.timestampRequestProp.set("end");
269
+ })();
270
+ }
271
+
272
+ static get observedAttributes(): string[] {
273
+ return Object.keys(twistyPlayerAttributeMap);
274
+ }
275
+
276
+ attributeChangedCallback(
277
+ attributeName: string,
278
+ _oldValue: string,
279
+ newValue: string,
280
+ ): void {
281
+ const setterName =
282
+ twistyPlayerAttributeMap[attributeName as TwistyPlayerAttribute];
283
+ if (!setterName) {
284
+ return;
285
+ }
286
+
287
+ (this as any)[setterName] = newValue;
288
+ }
289
+
290
+ // TODO: Make this more ergonomic and flexible.
291
+ // TODO: dimensions.
292
+ async experimentalScreenshot(options?: {
293
+ width: number;
294
+ height: number;
295
+ }): Promise<string> {
296
+ return (await screenshot(this.experimentalModel, options)).dataURL;
297
+ }
298
+
299
+ // TODO: Make this more ergonomic and flexible.
300
+ // TODO: dimensions.
301
+ async experimentalDownloadScreenshot(filename?: string): Promise<void> {
302
+ if (
303
+ ["2D", "experimental-2D-LL"].includes(
304
+ await this.experimentalModel.visualizationStrategyProp.get(),
305
+ )
306
+ ) {
307
+ // TODO: This has lots of async issues. It should also go into the screenshot impl file.
308
+ const wrapper2D = this.#visualizationWrapper as Twisty2DSceneWrapper;
309
+ const twisty2DPuzzle = await wrapper2D
310
+ .currentTwisty2DPuzzleWrapper()!
311
+ .twisty2DPuzzle();
312
+ const str = new XMLSerializer().serializeToString(
313
+ twisty2DPuzzle.svg.element,
314
+ );
315
+ const url = URL.createObjectURL(new Blob([str]));
316
+ downloadURL(
317
+ url,
318
+ filename ?? (await getDefaultFilename(this.experimentalModel)),
319
+ "svg",
320
+ );
321
+ } else {
322
+ await (await screenshot(this.experimentalModel)).download(filename);
323
+ }
324
+ }
325
+ }
326
+
327
+ customElementsShim.define("twisty-player", TwistyPlayer);
@@ -0,0 +1,111 @@
1
+ import type { Alg } from "../../alg";
2
+ import type { PuzzleDescriptionString } from "../../puzzle-geometry/PGPuzzles";
3
+ import type { ExperimentalStickering } from "../../twisty";
4
+ import type { BackgroundThemeWithAuto } from "../model/props/viewer/BackgroundProp";
5
+ import type { BackViewLayoutWithAuto } from "../model/props/viewer/BackViewProp";
6
+ import type { ControlPanelThemeWithAuto } from "../model/props/viewer/ControlPanelProp";
7
+ import type { HintFaceletStyleWithAuto } from "../model/props/puzzle/display/HintFaceletProp";
8
+ import type { IndexerStrategyName } from "../model/props/puzzle/state/IndexerConstructorRequestProp";
9
+ import type { TimestampRequest } from "../model/props/timeline/TimestampRequestProp";
10
+ import type { ViewerLinkPageWithAuto } from "../model/props/viewer/ViewerLinkProp";
11
+ import type { VisualizationFormatWithAuto } from "../model/props/viewer/VisualizationProp";
12
+ import { TwistyPlayerModel } from "../model/TwistyPlayerModel";
13
+ import type { MillisecondTimestamp } from "../old/animation/cursor/CursorTypes";
14
+ import { ManagedCustomElement } from "../old/dom/element/ManagedCustomElement";
15
+ import type { PuzzleID, SetupToLocation } from "../old/dom/TwistyPlayerConfig";
16
+
17
+ function err(propName: string): Error {
18
+ return new Error(
19
+ `Cannot get \`.${propName}\` directly from a \`TwistyPlayer\`.`,
20
+ );
21
+ }
22
+
23
+ // prettier-ignore
24
+ export abstract class TwistyPlayerSettable extends ManagedCustomElement {
25
+ experimentalModel: TwistyPlayerModel = new TwistyPlayerModel();
26
+
27
+ set alg(newAlg: Alg | string) { this.experimentalModel.algProp.set(newAlg); }
28
+ get alg(): never { throw err("alg"); }
29
+
30
+ set experimentalSetupAlg(newSetup: Alg | string) { this.experimentalModel.setupProp.set(newSetup); }
31
+ get experimentalSetupAlg(): never { throw err("setup"); }
32
+
33
+ set experimentalSetupAnchor(anchor: SetupToLocation) { this.experimentalModel.setupAnchorProp.set(anchor); }
34
+ get experimentalSetupAnchor(): never { throw err("anchor"); }
35
+
36
+ set puzzle(puzzleID: PuzzleID) { this.experimentalModel.puzzleIDRequestProp.set(puzzleID); }
37
+ get puzzle(): never { throw err("puzzle"); }
38
+
39
+ set experimentalPuzzleDescription(puzzleDescription: PuzzleDescriptionString) { this.experimentalModel.puzzleDescriptionRequestProp.set(puzzleDescription); }
40
+ get experimentalPuzzleDescription(): never { throw err("experimentalPuzzleDescription"); }
41
+
42
+ set timestamp(timestamp: TimestampRequest) { this.experimentalModel.timestampRequestProp.set(timestamp); }
43
+ get timestamp(): never { throw err("timestamp"); }
44
+
45
+ set hintFacelets(hintFaceletStyle: HintFaceletStyleWithAuto) { this.experimentalModel.hintFaceletProp.set(hintFaceletStyle); }
46
+ get hintFacelets(): never { throw err("hintFacelets"); }
47
+
48
+ set experimentalStickering(stickering: ExperimentalStickering) { this.experimentalModel.stickeringProp.set(stickering); }
49
+ get experimentalStickering(): never { throw err("stickering"); }
50
+
51
+ set backView(backView: BackViewLayoutWithAuto) { this.experimentalModel.backViewProp.set(backView); }
52
+ get backView(): never { throw err("backView"); }
53
+
54
+ set background(backgroundTheme: BackgroundThemeWithAuto) { this.experimentalModel.backgroundProp.set(backgroundTheme); }
55
+ get background(): never { throw err("background"); }
56
+
57
+ set controlPanel(newControlPanel: ControlPanelThemeWithAuto) { this.experimentalModel.controlPanelProp.set(newControlPanel); }
58
+ get controlPanel(): never { throw new Error( "Cannot get `.controlPanel` directly from a `TwistyPlayer`."); }
59
+
60
+ set visualization(visualizationFormat: VisualizationFormatWithAuto) { this.experimentalModel.visualizationFormatProp.set(visualizationFormat); }
61
+ get visualization(): never { throw new Error( "Cannot get `.visualization` directly from a `TwistyPlayer`."); }
62
+
63
+ set viewerLink(viewerLinkPage: ViewerLinkPageWithAuto) { this.experimentalModel.viewerLinkProp.set(viewerLinkPage); }
64
+ get viewerLink(): never { throw err("viewerLink"); }
65
+
66
+ set cameraLatitude(latitude: number) { this.experimentalModel.orbitCoordinatesRequestProp.set({ latitude }); }
67
+ get cameraLatitude(): never { throw new Error( "Cannot get `.cameraLatitude` directly from a `TwistyPlayer`."); }
68
+
69
+ set cameraLongitude(longitude: number) { this.experimentalModel.orbitCoordinatesRequestProp.set({ longitude }); }
70
+ get cameraLongitude(): never { throw new Error( "Cannot get `.cameraLongitude` directly from a `TwistyPlayer`."); }
71
+
72
+ set cameraDistance(distance: number) { this.experimentalModel.orbitCoordinatesRequestProp.set({ distance }); }
73
+ get cameraDistance(): never { throw new Error( "Cannot get `.cameraDistance` directly from a `TwistyPlayer`."); }
74
+
75
+ set cameraLatitudeLimit(latitudeLimit: number) { this.experimentalModel.latitudeLimitProp.set(latitudeLimit); }
76
+ get cameraLatitudeLimit(): never { throw new Error( "Cannot get `.cameraLatitudeLimit` directly from a `TwistyPlayer`."); }
77
+
78
+ set indexer(indexer: IndexerStrategyName) { this.experimentalModel.indexerConstructorRequestProp.set(indexer); }
79
+ get indexer(): never { throw err("indexer"); }
80
+
81
+ set tempoScale(newTempoScale: number) { this.experimentalModel.tempoScaleProp.set(newTempoScale); }
82
+ get tempoScale(): never { throw err("tempoScale"); }
83
+
84
+ set experimentalSprite(url: string | URL) { this.experimentalModel.foundationStickerSpriteURL.set(url); }
85
+ get experimentalSprite(): never { throw err("experimentalSprite"); }
86
+
87
+ set experimentalHintSprite(url: string | URL) { this.experimentalModel.hintStickerSpriteURL.set(url); }
88
+ get experimentalHintSprite(): never { throw err("experimentalHintSprite"); }
89
+
90
+ experimentalGet = new ExperimentalGetters(this.experimentalModel)
91
+ }
92
+
93
+ class ExperimentalGetters {
94
+ constructor(private model: TwistyPlayerModel) {}
95
+
96
+ async alg(): Promise<Alg> {
97
+ return (await this.model.algProp.get()).alg;
98
+ }
99
+
100
+ async setupAlg(): Promise<Alg> {
101
+ return (await this.model.setupProp.get()).alg;
102
+ }
103
+
104
+ puzzleID(): Promise<PuzzleID> {
105
+ return this.model.puzzleIDProp.get();
106
+ }
107
+
108
+ async timestamp(): Promise<MillisecondTimestamp> {
109
+ return (await this.model.detailedTimelineInfoProp.get()).timestamp;
110
+ }
111
+ }
@@ -0,0 +1,159 @@
1
+ import {
2
+ BoundaryType,
3
+ Direction,
4
+ } from "../../old/animation/cursor/CursorTypes";
5
+ import { buttonCSS, buttonGridCSS } from "../../old/dom/controls/buttons.css";
6
+ import { ClassListManager } from "../../old/dom/element/ClassListManager";
7
+ import { ManagedCustomElement } from "../../old/dom/element/ManagedCustomElement";
8
+ import { customElementsShim } from "../../old/dom/element/node-custom-element-shims";
9
+ import {
10
+ ButtonAppearances,
11
+ ButtonIcon,
12
+ buttonIcons,
13
+ } from "../../model/props/viewer/ButtonAppearanceProp";
14
+ import type { TwistyPlayerModel } from "../../model/TwistyPlayerModel";
15
+ import type { TwistyPlayerController } from "../../controllers/TwistyPlayerController";
16
+ import {
17
+ documentExitFullscreen,
18
+ documentFullscreenElement,
19
+ requestFullscreen,
20
+ } from "./webkit-fullscreen";
21
+
22
+ const buttonCommands = {
23
+ "fullscreen": true,
24
+ "jump-to-start": true,
25
+ "play-step-backwards": true,
26
+ "play-pause": true,
27
+ "play-step": true,
28
+ "jump-to-end": true,
29
+ "twizzle-link": true,
30
+ };
31
+
32
+ export type ButtonCommand = keyof typeof buttonCommands;
33
+
34
+ export class TwistyButtonsV2 extends ManagedCustomElement {
35
+ buttons: Record<ButtonCommand, TwistyButtonV2> | null = null;
36
+
37
+ // TODO: Privacy
38
+ constructor(
39
+ public model?: TwistyPlayerModel,
40
+ public controller?: TwistyPlayerController,
41
+ private fullscreenElement?: HTMLElement,
42
+ ) {
43
+ super();
44
+ }
45
+
46
+ connectedCallback(): void {
47
+ this.addCSS(buttonGridCSS);
48
+ const buttons: Partial<Record<ButtonCommand, TwistyButtonV2>> = {};
49
+ for (const command in buttonCommands) {
50
+ const button = new TwistyButtonV2();
51
+ buttons[command as ButtonCommand] = button;
52
+ // Why does this still fire with the `disabled` attribute?
53
+ button.addEventListener("click", () =>
54
+ this.#onCommand(command as ButtonCommand),
55
+ );
56
+ this.addElement(button);
57
+ }
58
+ this.buttons = buttons as Record<ButtonCommand, TwistyButtonV2>;
59
+
60
+ this.model?.buttonAppearanceProp.addFreshListener(this.update.bind(this));
61
+ }
62
+
63
+ #onCommand(command: ButtonCommand) {
64
+ switch (command) {
65
+ case "fullscreen":
66
+ this.onFullscreenButton();
67
+ break;
68
+ case "jump-to-start":
69
+ this.controller?.jumpToStart({ flash: true });
70
+ break;
71
+ case "play-step-backwards":
72
+ this.controller?.animationController.play({
73
+ direction: Direction.Backwards,
74
+ untilBoundary: BoundaryType.Move,
75
+ });
76
+ break;
77
+ case "play-pause":
78
+ this.controller?.togglePlay();
79
+ break;
80
+ case "play-step":
81
+ this.controller?.animationController.play({
82
+ direction: Direction.Forwards,
83
+ untilBoundary: BoundaryType.Move,
84
+ });
85
+ break;
86
+ case "jump-to-end":
87
+ this.controller?.jumpToEnd({ flash: true });
88
+ break;
89
+ case "twizzle-link":
90
+ this.controller?.visitTwizzleLink();
91
+ break;
92
+ default:
93
+ throw new Error("Missing command");
94
+ }
95
+ }
96
+
97
+ // TODO: Should we have a prop, or a way to query if we're fullscreen?
98
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
99
+ async onFullscreenButton(): Promise<void> {
100
+ if (!this.fullscreenElement) {
101
+ throw new Error("Attempted to go fullscreen without an element.");
102
+ }
103
+
104
+ if (documentFullscreenElement() === this.fullscreenElement) {
105
+ documentExitFullscreen();
106
+ } else {
107
+ // TODO: Propagate button info to `ButtonAppearanceProp`.
108
+ this.buttons?.fullscreen.setIcon("exit-fullscreen");
109
+
110
+ requestFullscreen(this.fullscreenElement);
111
+
112
+ const onFullscreen = (): void => {
113
+ if (documentFullscreenElement() !== this.fullscreenElement) {
114
+ this.buttons?.fullscreen.setIcon("enter-fullscreen");
115
+ window.removeEventListener("fullscreenchange", onFullscreen);
116
+ }
117
+ };
118
+ window.addEventListener("fullscreenchange", onFullscreen);
119
+ }
120
+ }
121
+
122
+ async update(buttonAppearances: ButtonAppearances): Promise<void> {
123
+ // TODO: Check that we have every command?
124
+ for (const command in buttonCommands) {
125
+ // TODO: Why doesn't `command` have the type `ButtonCommand`?
126
+ const button = this.buttons![command as ButtonCommand];
127
+ // TODO: track individual changes?
128
+ const info = buttonAppearances[command as ButtonCommand];
129
+ button.button.disabled = !info.enabled;
130
+ button.button.title = info.title;
131
+ button.setIcon(info.icon);
132
+ button.hidden = !!info.hidden;
133
+ // button.textContent = info.icon;
134
+ }
135
+ }
136
+ }
137
+
138
+ customElementsShim.define("twisty-buttons-v2", TwistyButtonsV2);
139
+
140
+ class TwistyButtonV2 extends ManagedCustomElement {
141
+ button: HTMLButtonElement = document.createElement("button"); // TODO: async?
142
+
143
+ connectedCallback() {
144
+ this.addCSS(buttonCSS);
145
+ this.addElement(this.button);
146
+ }
147
+
148
+ #iconManager: ClassListManager<ButtonIcon> = new ClassListManager(
149
+ this,
150
+ "svg-",
151
+ buttonIcons,
152
+ );
153
+
154
+ setIcon(iconName: ButtonIcon): void {
155
+ this.#iconManager.setValue(iconName);
156
+ }
157
+ }
158
+
159
+ customElementsShim.define("twisty-button-v2", TwistyButtonV2);