cubing 0.21.1 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (528) hide show
  1. package/README.md +4 -7
  2. package/{src/cubing/kpuzzle → dist}/.DS_Store +0 -0
  3. package/dist/bin/order.js +16675 -0
  4. package/dist/bin/order.js.map +7 -0
  5. package/dist/bin/puzzle-geometry-bin.js +13 -9
  6. package/dist/bin/puzzle-geometry-bin.js.map +2 -2
  7. package/dist/bundle-global/cubing.bundle-global.js +555 -298
  8. package/dist/esm/3d-M7GBIT3X.js +21 -0
  9. package/dist/esm/3d-M7GBIT3X.js.map +7 -0
  10. package/dist/esm/alg/index.js +1 -1
  11. package/dist/esm/bluetooth/index.js +10 -8
  12. package/dist/esm/bluetooth/index.js.map +3 -3
  13. package/dist/esm/{chunk-RE7MIN5R.js → chunk-4IUYLRHT.js} +2 -2
  14. package/dist/esm/{chunk-RE7MIN5R.js.map → chunk-4IUYLRHT.js.map} +0 -0
  15. package/dist/esm/{chunk-CSVAFZSB.js → chunk-6BZSKSG7.js} +724 -735
  16. package/dist/esm/chunk-6BZSKSG7.js.map +7 -0
  17. package/dist/esm/{chunk-BU5PUJK3.js → chunk-EWRBHQFX.js} +1 -1
  18. package/dist/esm/{chunk-BU5PUJK3.js.map → chunk-EWRBHQFX.js.map} +1 -1
  19. package/dist/esm/{chunk-APIIMJG6.js → chunk-GF76PWEV.js} +450 -1052
  20. package/dist/esm/chunk-GF76PWEV.js.map +7 -0
  21. package/dist/esm/{chunk-MUQMBH2S.js → chunk-R3HRHYIW.js} +16 -4
  22. package/dist/esm/chunk-R3HRHYIW.js.map +7 -0
  23. package/dist/esm/{chunk-YV3RT5PX.js → chunk-X6JHXPDX.js} +2 -2
  24. package/dist/esm/{chunk-YV3RT5PX.js.map → chunk-X6JHXPDX.js.map} +0 -0
  25. package/dist/esm/esm-test-worker.js +2 -2
  26. package/dist/esm/esm-test-worker.js.map +2 -2
  27. package/dist/esm/kpuzzle/index.js +2 -2
  28. package/dist/esm/{node-WEHVBEKP.js → node-HFBX5WHK.js} +2 -2
  29. package/dist/esm/{node-WEHVBEKP.js.map → node-HFBX5WHK.js.map} +1 -1
  30. package/dist/esm/{node-BSAQKO3G.js → node-SP4L2AKI.js} +2 -2
  31. package/dist/esm/{node-BSAQKO3G.js.map → node-SP4L2AKI.js.map} +1 -1
  32. package/dist/esm/notation/index.js +2 -2
  33. package/dist/esm/protocol/index.js +2 -2
  34. package/dist/esm/puzzle-geometry/index.js +14 -10
  35. package/dist/esm/puzzle-geometry/index.js.map +2 -2
  36. package/dist/esm/puzzles/index.js +3 -3
  37. package/dist/esm/scramble/index.js +4 -4
  38. package/dist/esm/search/index.js +4 -4
  39. package/dist/esm/stream/index.js +1 -1
  40. package/dist/esm/twisty/index.js +729 -2346
  41. package/dist/esm/twisty/index.js.map +3 -3
  42. package/dist/esm/worker-inside-generated-string-RQYYANYQ.js +3107 -0
  43. package/dist/esm/worker-inside-generated-string-RQYYANYQ.js.map +7 -0
  44. package/dist/types/alg/index.d.ts +1 -0
  45. package/dist/types/alg/index.d.ts.map +1 -1
  46. package/dist/types/alg/units/leaves/Move.d.ts +1 -1
  47. package/dist/types/alg/units/leaves/Move.d.ts.map +1 -1
  48. package/dist/types/bluetooth/smart-puzzle/gan.d.ts.map +1 -1
  49. package/dist/types/cubing.bundle-global.d.ts +1 -24
  50. package/dist/types/cubing.bundle-global.d.ts.map +1 -1
  51. package/dist/types/cubing.bundle-global.exports.d.ts +25 -0
  52. package/dist/types/cubing.bundle-global.exports.d.ts.map +1 -0
  53. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +3 -0
  54. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +1 -1
  55. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +7 -3
  56. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +1 -1
  57. package/dist/types/puzzle-geometry/index.d.ts +1 -1
  58. package/dist/types/puzzle-geometry/index.d.ts.map +1 -1
  59. package/dist/types/puzzles/index.d.ts +1 -1
  60. package/dist/types/puzzles/index.d.ts.map +1 -1
  61. package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +1 -1
  62. package/dist/types/search/inside/api.d.ts.map +1 -1
  63. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts +1 -1
  64. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts.map +1 -1
  65. package/dist/types/search/inside/solve/puzzles/fto.d.ts +6 -0
  66. package/dist/types/search/inside/solve/puzzles/fto.d.ts.map +1 -0
  67. package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts +5 -0
  68. package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts.map +1 -0
  69. package/dist/types/search/inside/solve/tremble.d.ts.map +1 -1
  70. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  71. package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
  72. package/dist/types/twisty/{old/animation/cursor/CursorTypes.d.ts → controllers/AnimationTypes.d.ts} +10 -3
  73. package/dist/types/twisty/controllers/AnimationTypes.d.ts.map +1 -0
  74. package/dist/types/twisty/{old/animation → controllers}/RenderScheduler.d.ts +0 -0
  75. package/dist/types/twisty/controllers/RenderScheduler.d.ts.map +1 -0
  76. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +1 -1
  77. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -1
  78. package/dist/types/twisty/{old/animation → controllers}/easing.d.ts +0 -0
  79. package/dist/types/twisty/controllers/easing.d.ts.map +1 -0
  80. package/dist/types/twisty/{old/animation → controllers}/indexer/AlgDuration.d.ts +2 -2
  81. package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts.map +1 -0
  82. package/dist/types/twisty/{old/animation → controllers}/indexer/AlgIndexer.d.ts +3 -3
  83. package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts.map +1 -0
  84. package/dist/types/twisty/{old/animation → controllers}/indexer/SimpleAlgIndexer.d.ts +3 -3
  85. package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts.map +1 -0
  86. package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +3 -3
  87. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +1 -0
  88. package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +3 -3
  89. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +1 -0
  90. package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/simul-moves.d.ts +2 -2
  91. package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts.map +1 -0
  92. package/dist/types/twisty/{old/animation → controllers}/indexer/tree/AlgWalker.d.ts +2 -2
  93. package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts.map +1 -0
  94. package/dist/types/twisty/{old/animation → controllers}/indexer/tree/TreeAlgIndexer.d.ts +3 -3
  95. package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts.map +1 -0
  96. package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts +3 -0
  97. package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts.map +1 -0
  98. package/dist/types/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.d.ts +2 -2
  99. package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts.map +1 -0
  100. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +1 -2
  101. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +1 -1
  102. package/dist/types/twisty/index.d.ts +9 -12
  103. package/dist/types/twisty/index.d.ts.map +1 -1
  104. package/dist/types/twisty/model/TwistyPlayerModel.d.ts +11 -0
  105. package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -1
  106. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +1 -1
  107. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -1
  108. package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts +6 -0
  109. package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts.map +1 -0
  110. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +5 -1
  111. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -1
  112. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +46 -1
  113. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -1
  114. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +2 -2
  115. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -1
  116. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +1 -1
  117. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -1
  118. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +1 -1
  119. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -1
  120. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +1 -1
  121. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -1
  122. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +5 -2
  123. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -1
  124. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +2 -2
  125. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -1
  126. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +2 -2
  127. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -1
  128. package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts +11 -0
  129. package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts.map +1 -0
  130. package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts +10 -0
  131. package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts.map +1 -0
  132. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +5 -1
  133. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -1
  134. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +1 -1
  135. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -1
  136. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +19 -1
  137. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -1
  138. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +1 -1
  139. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -1
  140. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +2 -3
  141. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -1
  142. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +1 -1
  143. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -1
  144. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +1 -1
  145. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -1
  146. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +6 -1
  147. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -1
  148. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +5 -1
  149. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -1
  150. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +5 -1
  151. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -1
  152. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +18 -5
  153. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -1
  154. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +6 -6
  155. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -1
  156. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +2 -2
  157. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -1
  158. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +5 -1
  159. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -1
  160. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +7 -1
  161. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -1
  162. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +1 -1
  163. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -1
  164. package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts +3 -0
  165. package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts.map +1 -0
  166. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +4 -6
  167. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +1 -1
  168. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +1 -1
  169. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +1 -1
  170. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +2 -2
  171. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +1 -1
  172. package/dist/types/twisty/views/3D/DragTracker.d.ts +28 -0
  173. package/dist/types/twisty/views/3D/DragTracker.d.ts.map +1 -0
  174. package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -1
  175. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +6 -1
  176. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -1
  177. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +9 -4
  178. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -1
  179. package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts +3 -0
  180. package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts.map +1 -0
  181. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +12 -8
  182. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -1
  183. package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts +24 -0
  184. package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts.map +1 -0
  185. package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts +5 -0
  186. package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts.map +1 -0
  187. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts +4 -4
  188. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +1 -1
  189. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +17 -10
  190. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +1 -1
  191. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts +1 -1
  192. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +1 -1
  193. package/dist/types/twisty/{old/dom/element → views}/ClassListManager.d.ts +0 -0
  194. package/dist/types/twisty/views/ClassListManager.d.ts.map +1 -0
  195. package/dist/types/twisty/{old/dom/element → views}/ManagedCustomElement.d.ts +0 -0
  196. package/dist/types/twisty/views/ManagedCustomElement.d.ts.map +1 -0
  197. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +1 -1
  198. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +1 -1
  199. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +1 -1
  200. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +1 -1
  201. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +2 -1
  202. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -1
  203. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +1 -1
  204. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +1 -1
  205. package/dist/types/twisty/views/TwistyAlgViewer.d.ts +2 -2
  206. package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +1 -1
  207. package/dist/types/twisty/views/TwistyPlayer.css.d.ts +3 -0
  208. package/dist/types/twisty/views/TwistyPlayer.css.d.ts.map +1 -0
  209. package/dist/types/twisty/views/TwistyPlayer.d.ts +7 -3
  210. package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -1
  211. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +7 -4
  212. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -1
  213. package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts +3 -0
  214. package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts.map +1 -0
  215. package/dist/types/twisty/{old/dom/viewers → views}/canvas.d.ts +0 -0
  216. package/dist/types/twisty/views/canvas.d.ts.map +1 -0
  217. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts +4 -0
  218. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts.map +1 -0
  219. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +1 -1
  220. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -1
  221. package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts +3 -0
  222. package/dist/types/twisty/{old/dom/controls → views/control-panel}/TwistyScrubber.css.d.ts.map +1 -1
  223. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +1 -1
  224. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -1
  225. package/dist/types/twisty/{old/dom/element → views}/node-custom-element-shims.d.ts +0 -0
  226. package/dist/types/twisty/views/node-custom-element-shims.d.ts.map +1 -0
  227. package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts +3 -0
  228. package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts.map +1 -0
  229. package/dist/types/twisty/{old/dom → views}/stream/TwistyStreamSource.d.ts +1 -1
  230. package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts.map +1 -0
  231. package/dist/types/{search/vendor → vendor}/comlink-everywhere/inside/index.d.ts +0 -0
  232. package/dist/types/vendor/comlink-everywhere/inside/index.d.ts.map +1 -0
  233. package/dist/types/{search/vendor → vendor}/comlink-everywhere/inside/node.d.ts +0 -0
  234. package/dist/types/vendor/comlink-everywhere/inside/node.d.ts.map +1 -0
  235. package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/index.d.ts +0 -0
  236. package/dist/types/vendor/comlink-everywhere/outside/index.d.ts.map +1 -0
  237. package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/node.d.ts +0 -0
  238. package/dist/types/vendor/comlink-everywhere/outside/node.d.ts.map +1 -0
  239. package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/lib/mathlib.d.ts +0 -0
  240. package/dist/types/vendor/cstimer/src/js/lib/mathlib.d.ts.map +1 -0
  241. package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/scramble/scramble_444.d.ts +1 -1
  242. package/dist/types/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +1 -0
  243. package/dist/types/{search/inside/solve/vendor → vendor}/min2phase/gwt.d.ts +0 -0
  244. package/dist/types/vendor/min2phase/gwt.d.ts.map +1 -0
  245. package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/get-random-values.d.ts +0 -0
  246. package/dist/types/vendor/random-uint-below/get-random-values.d.ts.map +1 -0
  247. package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/index.d.ts +1 -1
  248. package/dist/types/vendor/random-uint-below/index.d.ts.map +1 -0
  249. package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/random-choice.d.ts +0 -0
  250. package/dist/types/vendor/random-uint-below/random-choice.d.ts.map +1 -0
  251. package/dist/types/{search/inside/solve/vendor/random-uint-below/random-int.d.ts → vendor/random-uint-below/random53BitValue.d.ts} +1 -1
  252. package/dist/types/vendor/random-uint-below/random53BitValue.d.ts.map +1 -0
  253. package/dist/types/{search/inside/solve/vendor → vendor}/sq12phase/scramble_sq1.d.ts +0 -0
  254. package/dist/types/vendor/sq12phase/scramble_sq1.d.ts.map +1 -0
  255. package/dist/types/{bluetooth/smart-puzzle → vendor/unsafe-raw-aes}/unsafe-raw-aes.d.ts +0 -0
  256. package/dist/types/vendor/unsafe-raw-aes/unsafe-raw-aes.d.ts.map +1 -0
  257. package/docs/.DS_Store +0 -0
  258. package/docs/cubing/.DS_Store +0 -0
  259. package/docs/cubing/api/index.html +11 -52
  260. package/docs/cubing/index.html +67 -27
  261. package/docs/main.css +7 -6
  262. package/package.json +8 -9
  263. package/src/cubing/.DS_Store +0 -0
  264. package/src/cubing/alg/index.ts +1 -0
  265. package/src/cubing/alg/units/leaves/Move.ts +1 -1
  266. package/src/cubing/bluetooth/smart-puzzle/gan.ts +4 -1
  267. package/src/cubing/bluetooth/smart-timer/GanTimer.ts +1 -1
  268. package/src/cubing/cubing.bundle-global.exports.ts +25 -0
  269. package/src/cubing/cubing.bundle-global.ts +3 -27
  270. package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +4 -0
  271. package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +20 -8
  272. package/src/cubing/puzzle-geometry/index.ts +2 -2
  273. package/src/cubing/puzzles/.DS_Store +0 -0
  274. package/src/cubing/puzzles/implementations/.DS_Store +0 -0
  275. package/src/cubing/puzzles/index.ts +1 -1
  276. package/src/cubing/puzzles/stickerings/cube-stickerings.ts +18 -0
  277. package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +1 -1
  278. package/src/cubing/search/.DS_Store +0 -0
  279. package/src/cubing/search/esm-test-worker.js +1 -1
  280. package/src/cubing/search/inside/.DS_Store +0 -0
  281. package/src/cubing/search/inside/api.ts +3 -0
  282. package/src/cubing/search/inside/entry.js +1 -1
  283. package/src/cubing/search/inside/inside-worker.ts +1 -1
  284. package/src/cubing/search/inside/solve/.DS_Store +0 -0
  285. package/src/cubing/search/inside/solve/addOrientationSuffix.ts +1 -1
  286. package/src/cubing/{alg → search/inside/solve/puzzles}/.DS_Store +0 -0
  287. package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +1 -1
  288. package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +2 -2
  289. package/src/cubing/search/inside/solve/puzzles/4x4x4.ts +2 -2
  290. package/src/cubing/search/inside/solve/puzzles/big-cubes.ts +1 -1
  291. package/src/cubing/search/inside/solve/puzzles/clock.ts +1 -1
  292. package/src/cubing/search/inside/solve/puzzles/{FTO.sgs → fto.sgs.json.ts} +116 -80
  293. package/src/cubing/search/inside/solve/puzzles/fto.ts +58 -0
  294. package/src/cubing/search/inside/solve/puzzles/sq1.ts +1 -1
  295. package/src/cubing/search/inside/solve/puzzles/wca-minx.ts +1 -1
  296. package/src/cubing/search/inside/solve/tremble.ts +2 -1
  297. package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
  298. package/src/cubing/search/instantiator.ts +1 -1
  299. package/src/cubing/search/worker-inside-generated-string.js +1 -1
  300. package/src/cubing/twisty/.DS_Store +0 -0
  301. package/src/cubing/{alg/units → twisty/controllers}/.DS_Store +0 -0
  302. package/src/cubing/twisty/{old/animation/cursor/CursorTypes.ts → controllers/AnimationTypes.ts} +11 -2
  303. package/src/cubing/twisty/{old/animation → controllers}/RenderScheduler.ts +0 -0
  304. package/src/cubing/twisty/controllers/TwistyAnimationController.ts +4 -4
  305. package/src/cubing/twisty/controllers/animation/.DS_Store +0 -0
  306. package/src/cubing/twisty/{old/animation → controllers}/easing.ts +0 -0
  307. package/src/cubing/{stream → twisty/controllers/indexer}/.DS_Store +0 -0
  308. package/src/cubing/twisty/{old/animation → controllers}/indexer/AlgDuration.ts +2 -2
  309. package/src/cubing/twisty/{old/animation → controllers}/indexer/AlgIndexer.ts +4 -4
  310. package/src/cubing/twisty/{old/animation → controllers}/indexer/SimpleAlgIndexer.ts +4 -4
  311. package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +3 -3
  312. package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +3 -3
  313. package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/simul-moves.ts +2 -2
  314. package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/AlgWalker.ts +4 -4
  315. package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/TreeAlgIndexer.ts +3 -3
  316. package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/chunkAlgs.ts +2 -2
  317. package/src/cubing/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -0
  318. package/src/cubing/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.ts +2 -2
  319. package/src/cubing/twisty/heavy-code-imports/.DS_Store +0 -0
  320. package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +2 -12
  321. package/src/cubing/twisty/index.ts +12 -19
  322. package/src/cubing/twisty/model/.DS_Store +0 -0
  323. package/src/cubing/twisty/model/TwistyPlayerModel.ts +38 -7
  324. package/src/cubing/twisty/model/props/.DS_Store +0 -0
  325. package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +3 -3
  326. package/src/cubing/twisty/model/props/puzzle/.DS_Store +0 -0
  327. package/src/cubing/twisty/model/props/puzzle/display/FoundationDisplayProp.ts +9 -0
  328. package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +6 -1
  329. package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +49 -1
  330. package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +1 -1
  331. package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +2 -2
  332. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +2 -2
  333. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +1 -1
  334. package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +1 -1
  335. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +12 -5
  336. package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +2 -2
  337. package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +2 -2
  338. package/src/cubing/twisty/model/props/puzzle/state/MovePressInputProp.ts +14 -0
  339. package/src/cubing/twisty/model/props/puzzle/state/NaiveMoveCountProp.ts +20 -0
  340. package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +7 -1
  341. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +1 -1
  342. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +20 -1
  343. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +1 -1
  344. package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +5 -3
  345. package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +1 -4
  346. package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +1 -1
  347. package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +7 -1
  348. package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +6 -1
  349. package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +5 -1
  350. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +83 -12
  351. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +8 -8
  352. package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +2 -2
  353. package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +5 -1
  354. package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +8 -1
  355. package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +1 -1
  356. package/src/cubing/twisty/old/.DS_Store +0 -0
  357. package/src/cubing/twisty/old/animation/.DS_Store +0 -0
  358. package/src/cubing/twisty/old/dom/.DS_Store +0 -0
  359. package/src/cubing/twisty/views/.DS_Store +0 -0
  360. package/src/cubing/twisty/{old/dom/viewers/Twisty2DSVGView.css.ts → views/2D/Twisty2DPuzzle.css.ts} +1 -1
  361. package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +8 -12
  362. package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +1 -1
  363. package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +4 -4
  364. package/src/cubing/{bluetooth → twisty/views/3D}/.DS_Store +0 -0
  365. package/src/cubing/twisty/views/3D/DragTracker.ts +184 -0
  366. package/src/cubing/twisty/views/3D/RendererPool.ts +2 -1
  367. package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +51 -5
  368. package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +51 -10
  369. package/src/cubing/twisty/{old/dom/viewers/Twisty3DCanvas.css.ts → views/3D/Twisty3DVantage.css.ts} +2 -2
  370. package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +103 -35
  371. package/src/cubing/twisty/views/3D/TwistyOrbitControls.spec.ts +213 -0
  372. package/src/cubing/twisty/views/3D/TwistyOrbitControls.ts +176 -0
  373. package/src/cubing/twisty/views/3D/puzzles/Cube3D.ts +5 -9
  374. package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +127 -37
  375. package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +1 -1
  376. package/src/cubing/twisty/{old/dom/element → views}/ClassListManager.ts +0 -0
  377. package/src/cubing/twisty/{old/dom/element → views}/ManagedCustomElement.ts +0 -0
  378. package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +1 -1
  379. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.ts +1 -1
  380. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +11 -4
  381. package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +1 -1
  382. package/src/cubing/twisty/views/TwistyAlgViewer.ts +4 -4
  383. package/src/cubing/twisty/{old/dom → views}/TwistyPlayer.css.ts +4 -1
  384. package/src/cubing/twisty/views/TwistyPlayer.ts +16 -25
  385. package/src/cubing/twisty/views/TwistyPlayerSettable.ts +14 -10
  386. package/src/cubing/twisty/{old/dom/viewers → views}/TwistyViewerWrapper.css.ts +1 -1
  387. package/src/cubing/twisty/{old/dom/viewers → views}/canvas.ts +0 -0
  388. package/src/cubing/twisty/{old/dom/controls/buttons.css.ts → views/control-panel/TwistyButtonsV2.css.ts} +1 -1
  389. package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +5 -8
  390. package/src/cubing/twisty/{old/dom/controls → views/control-panel}/TwistyScrubber.css.ts +1 -1
  391. package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +3 -3
  392. package/src/cubing/twisty/{old/dom/element → views}/node-custom-element-shims.ts +2 -2
  393. package/src/cubing/twisty/{old/dom → views}/stream/TwistyStreamSource.css.ts +1 -1
  394. package/src/cubing/twisty/{old/dom → views}/stream/TwistyStreamSource.ts +9 -9
  395. package/src/cubing/vendor/.DS_Store +0 -0
  396. package/src/cubing/{twisty/old/animation/indexer → vendor/comlink-everywhere}/.DS_Store +0 -0
  397. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/comlink-everywhere.webloc +0 -0
  398. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/index.d.ts +0 -0
  399. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/index.js +0 -0
  400. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/node.js +0 -0
  401. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/index.d.ts +0 -0
  402. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/index.js +0 -0
  403. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/node.js +0 -0
  404. package/src/cubing/vendor/cstimer/.DS_Store +0 -0
  405. package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/LICENSE +0 -0
  406. package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/src/js/lib/mathlib.ts +0 -0
  407. package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/src/js/scramble/scramble_444.ts +3 -3
  408. package/src/cubing/{search/inside/solve/vendor → vendor}/min2phase/gwt.d.ts +0 -0
  409. package/src/cubing/{search/inside/solve/vendor → vendor}/min2phase/gwt.js +0 -0
  410. package/src/cubing/vendor/random-uint-below/get-random-values.ts +23 -0
  411. package/src/cubing/{search/inside/solve/vendor → vendor}/random-uint-below/index.ts +2 -2
  412. package/src/cubing/{search/inside/solve/vendor → vendor}/random-uint-below/random-choice.ts +1 -1
  413. package/src/cubing/{search/inside/solve/vendor/random-uint-below/random-int.ts → vendor/random-uint-below/random53BitValue.ts} +0 -0
  414. package/src/cubing/{search/inside/solve/vendor → vendor}/sq12phase/scramble_sq1.js +0 -0
  415. package/src/cubing/{bluetooth/smart-puzzle → vendor/unsafe-raw-aes}/unsafe-raw-aes.ts +18 -20
  416. package/dist/esm/3d-B25DP5PE.js +0 -39
  417. package/dist/esm/3d-B25DP5PE.js.map +0 -7
  418. package/dist/esm/chunk-APIIMJG6.js.map +0 -7
  419. package/dist/esm/chunk-CSVAFZSB.js.map +0 -7
  420. package/dist/esm/chunk-MUQMBH2S.js.map +0 -7
  421. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js +0 -2831
  422. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +0 -7
  423. package/dist/types/bluetooth/smart-puzzle/unsafe-raw-aes.d.ts.map +0 -1
  424. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts.map +0 -1
  425. package/dist/types/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +0 -1
  426. package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts.map +0 -1
  427. package/dist/types/search/inside/solve/vendor/random-uint-below/get-random-values.d.ts.map +0 -1
  428. package/dist/types/search/inside/solve/vendor/random-uint-below/index.d.ts.map +0 -1
  429. package/dist/types/search/inside/solve/vendor/random-uint-below/random-choice.d.ts.map +0 -1
  430. package/dist/types/search/inside/solve/vendor/random-uint-below/random-int.d.ts.map +0 -1
  431. package/dist/types/search/inside/solve/vendor/sq12phase/scramble_sq1.d.ts.map +0 -1
  432. package/dist/types/search/vendor/comlink-everywhere/inside/index.d.ts.map +0 -1
  433. package/dist/types/search/vendor/comlink-everywhere/inside/node.d.ts.map +0 -1
  434. package/dist/types/search/vendor/comlink-everywhere/outside/index.d.ts.map +0 -1
  435. package/dist/types/search/vendor/comlink-everywhere/outside/node.d.ts.map +0 -1
  436. package/dist/types/twisty/old/animation/RenderScheduler.d.ts.map +0 -1
  437. package/dist/types/twisty/old/animation/Timeline.d.ts +0 -72
  438. package/dist/types/twisty/old/animation/Timeline.d.ts.map +0 -1
  439. package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts +0 -53
  440. package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts.map +0 -1
  441. package/dist/types/twisty/old/animation/cursor/CursorTypes.d.ts.map +0 -1
  442. package/dist/types/twisty/old/animation/easing.d.ts.map +0 -1
  443. package/dist/types/twisty/old/animation/indexer/AlgDuration.d.ts.map +0 -1
  444. package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +0 -1
  445. package/dist/types/twisty/old/animation/indexer/SimpleAlgIndexer.d.ts.map +0 -1
  446. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
  447. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +0 -1
  448. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
  449. package/dist/types/twisty/old/animation/indexer/tree/AlgWalker.d.ts.map +0 -1
  450. package/dist/types/twisty/old/animation/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
  451. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts +0 -3
  452. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts.map +0 -1
  453. package/dist/types/twisty/old/animation/stream/timeline-move-calculation-draft.d.ts.map +0 -1
  454. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts +0 -3
  455. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts.map +0 -1
  456. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts +0 -52
  457. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts.map +0 -1
  458. package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts +0 -3
  459. package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +0 -1
  460. package/dist/types/twisty/old/dom/TwistyPlayer.d.ts +0 -92
  461. package/dist/types/twisty/old/dom/TwistyPlayer.d.ts.map +0 -1
  462. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts +0 -5
  463. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts.map +0 -1
  464. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts +0 -165
  465. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +0 -1
  466. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts +0 -2
  467. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts.map +0 -1
  468. package/dist/types/twisty/old/dom/controls/TwistyScrubber.css.d.ts +0 -3
  469. package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts +0 -14
  470. package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts.map +0 -1
  471. package/dist/types/twisty/old/dom/controls/buttons.css.d.ts +0 -4
  472. package/dist/types/twisty/old/dom/controls/buttons.css.d.ts.map +0 -1
  473. package/dist/types/twisty/old/dom/controls/buttons.d.ts +0 -40
  474. package/dist/types/twisty/old/dom/controls/buttons.d.ts.map +0 -1
  475. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts +0 -5
  476. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts.map +0 -1
  477. package/dist/types/twisty/old/dom/element/ClassListManager.d.ts.map +0 -1
  478. package/dist/types/twisty/old/dom/element/ElementConfig.d.ts +0 -49
  479. package/dist/types/twisty/old/dom/element/ElementConfig.d.ts.map +0 -1
  480. package/dist/types/twisty/old/dom/element/ManagedCustomElement.d.ts.map +0 -1
  481. package/dist/types/twisty/old/dom/element/node-custom-element-shims.d.ts.map +0 -1
  482. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts +0 -3
  483. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts.map +0 -1
  484. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.d.ts.map +0 -1
  485. package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts +0 -26
  486. package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts.map +0 -1
  487. package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts +0 -3
  488. package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts.map +0 -1
  489. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts +0 -3
  490. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts.map +0 -1
  491. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts +0 -41
  492. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +0 -1
  493. package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts +0 -59
  494. package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts.map +0 -1
  495. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts +0 -4
  496. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts.map +0 -1
  497. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts +0 -3
  498. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts.map +0 -1
  499. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts +0 -18
  500. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts.map +0 -1
  501. package/dist/types/twisty/old/dom/viewers/canvas.d.ts.map +0 -1
  502. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +0 -41
  503. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +0 -1
  504. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts +0 -5
  505. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts.map +0 -1
  506. package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts +0 -9
  507. package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
  508. package/src/cubing/search/inside/solve/vendor/random-uint-below/get-random-values.ts +0 -38
  509. package/src/cubing/twisty/old/animation/Timeline.ts +0 -378
  510. package/src/cubing/twisty/old/animation/cursor/AlgCursor.ts +0 -252
  511. package/src/cubing/twisty/old/dom/TwistyAlgViewerV1.css.ts +0 -25
  512. package/src/cubing/twisty/old/dom/TwistyAlgViewerV1.ts +0 -516
  513. package/src/cubing/twisty/old/dom/TwistyPlayer.spec.ts +0 -25
  514. package/src/cubing/twisty/old/dom/TwistyPlayer.ts +0 -927
  515. package/src/cubing/twisty/old/dom/TwistyPlayerConfig.ts +0 -378
  516. package/src/cubing/twisty/old/dom/controls/TwistyControlElement.ts +0 -1
  517. package/src/cubing/twisty/old/dom/controls/TwistyScrubber.ts +0 -53
  518. package/src/cubing/twisty/old/dom/controls/buttons.spec.ts +0 -37
  519. package/src/cubing/twisty/old/dom/controls/buttons.ts +0 -326
  520. package/src/cubing/twisty/old/dom/element/ElementConfig.ts +0 -180
  521. package/src/cubing/twisty/old/dom/viewers/Twisty2DSVG.ts +0 -118
  522. package/src/cubing/twisty/old/dom/viewers/Twisty3DCanvas.ts +0 -256
  523. package/src/cubing/twisty/old/dom/viewers/TwistyOrbitControls.ts +0 -420
  524. package/src/cubing/twisty/old/dom/viewers/TwistyViewerElement.ts +0 -5
  525. package/src/cubing/twisty/old/dom/viewers/TwistyViewerWrapper.ts +0 -45
  526. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +0 -209
  527. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +0 -270
  528. package/src/cubing/twisty/views/3D/puzzles/TwistyTestBox.ts +0 -22
@@ -1,378 +0,0 @@
1
- import { RenderScheduler } from "./RenderScheduler";
2
- import type { AlgCursor, TimeRange } from "./cursor/AlgCursor";
3
- import {
4
- BoundaryType,
5
- Direction,
6
- directionScalar,
7
- MillisecondTimestamp,
8
- } from "./cursor/CursorTypes";
9
-
10
- // YouTube keeps playing on jump, but it also stays frozen while the cursor is
11
- // down. So I think it would be good for this to be false, but only if we
12
- // implement a "start jumping" event that pauses until "finish jumping" while
13
- // the scrubber is active.
14
- const PAUSE_ON_JUMP = true;
15
-
16
- // TODO: We use symbols to avoid exposing `number` values. Is this performant enough? Should/can we use symbols?
17
- export enum TimelineAction {
18
- StartingToPlay = "StartingToPlay", // TODO playing backwards.
19
- Pausing = "Pausing",
20
- Jumping = "Jumping",
21
- }
22
-
23
- // TODO: We use symbols to avoid exposing `number` values. Is this performant enough? Should/can we use symbols?
24
- export enum TimestampLocationType {
25
- StartOfTimeline = "Start",
26
- EndOfTimeline = "End",
27
- StartOfMove = "StartOfMove",
28
- EndOfMove = "EndOfMove",
29
- MiddleOfMove = "MiddleOfMove",
30
- BetweenMoves = "BetweenMoves",
31
- }
32
-
33
- export interface TimelineActionEvent {
34
- action: TimelineAction;
35
- locationType: TimestampLocationType;
36
- }
37
-
38
- // This should be used by classes that (directly or indirectly) update puzzle
39
- // state based on a timestamp. It fires every time the timestamp is changed for
40
- // a new render (e.g. 60 times a second during animation), and only fires if the
41
- // timestamp has changed since the last call. This means you can use it as a
42
- // reliable callback telling you when to schedule a new render.
43
- export interface TimelineTimestampListener {
44
- onTimelineTimestampChange(timestamp: MillisecondTimestamp): void;
45
- onTimeRangeChange(timeRange: TimeRange): void;
46
- }
47
-
48
- // This should be used by classes that (directly or indirectly) update UI (e.g.
49
- // pause/play buttons).
50
- //
51
- // Note: the action events of a `Timeline` are not necessarily coordinated with
52
- // the timestamp events, since timestamp events are tied to animation frames.
53
- // For example, if you receive a "pausing" event, the final frame may already
54
- // have been drawn, or may be drawn in the near future.
55
- export interface TimelineActionListener {
56
- onTimelineAction(actionEvent: TimelineActionEvent): void;
57
- }
58
-
59
- export interface TimelineTimestampDispatcher {
60
- addTimestampListener(timestampListener: TimelineTimestampListener): void;
61
- }
62
-
63
- export interface TimelineActionDispatcher {
64
- addActionListener(actionListener: TimelineActionListener): void;
65
- }
66
-
67
- // `performance.now()` is rounded for security concerns, so it's usually not
68
- // accurate to the millisecond. So we round it, which lets us work with whole ms
69
- // everywhere.
70
- function getNow(): MillisecondTimestamp {
71
- return Math.round(performance.now());
72
- }
73
-
74
- export class Timeline
75
- implements TimelineTimestampDispatcher, TimelineActionDispatcher
76
- {
77
- animating: boolean = false;
78
- tempoScale: number = 1;
79
- private cursors: Set<AlgCursor> = new Set();
80
- private timestampListeners: Set<TimelineTimestampListener> = new Set();
81
- private actionListeners: Set<TimelineActionListener> = new Set();
82
- timestamp: number = 0;
83
- lastAnimFrameNow: DOMHighResTimeStamp = 0;
84
- lastAnimFrameTimestamp: MillisecondTimestamp;
85
- private scheduler: RenderScheduler;
86
-
87
- direction: Direction.Backwards | Direction.Forwards = Direction.Forwards; // TODO: handle pausing here?
88
-
89
- boundaryType: BoundaryType = BoundaryType.EntireTimeline;
90
- cachedNextBoundary: MillisecondTimestamp;
91
-
92
- constructor() {
93
- const animFrame = (_now: MillisecondTimestamp): void => {
94
- if (this.animating) {
95
- const now = getNow(); // TODO: See if we can use the rAF value without monotonicity issues.;
96
- this.timestamp =
97
- this.timestamp +
98
- this.tempoScale *
99
- directionScalar(this.direction) *
100
- (now - this.lastAnimFrameNow);
101
- this.lastAnimFrameNow = now;
102
-
103
- const atOrPastBoundary =
104
- this.direction === Direction.Backwards
105
- ? this.timestamp <= this.cachedNextBoundary
106
- : this.timestamp >= this.cachedNextBoundary;
107
- if (atOrPastBoundary) {
108
- this.timestamp = this.cachedNextBoundary;
109
- if (this.animating) {
110
- this.animating = false;
111
- this.dispatchAction(TimelineAction.Pausing);
112
- }
113
- }
114
- }
115
-
116
- if (this.timestamp !== this.lastAnimFrameTimestamp) {
117
- this.dispatchTimestamp();
118
- this.lastAnimFrameTimestamp = this.timestamp;
119
- }
120
-
121
- if (this.animating) {
122
- this.scheduler.requestAnimFrame();
123
- }
124
- };
125
- this.scheduler = new RenderScheduler(animFrame);
126
- }
127
-
128
- public addCursor(cursor: AlgCursor): void {
129
- this.cursors.add(cursor);
130
- this.dispatchTimeRange();
131
- }
132
-
133
- removeCursor(cursor: AlgCursor): void {
134
- this.cursors.delete(cursor);
135
- this.clampTimestampToRange();
136
- this.dispatchTimeRange();
137
- }
138
-
139
- // TODO: test
140
- private clampTimestampToRange(): void {
141
- const timeRange = this.timeRange();
142
- if (this.timestamp < timeRange.start) {
143
- this.setTimestamp(timeRange.start);
144
- }
145
- if (this.timestamp > timeRange.end) {
146
- this.setTimestamp(timeRange.end);
147
- }
148
- }
149
-
150
- // In the future, this might do some calculations or caching.
151
- public onCursorChange(_cursor: AlgCursor): void {
152
- if (this.timestamp > this.maxTimestamp()) {
153
- this.timestamp = this.maxTimestamp();
154
- }
155
- this.dispatchTimeRange();
156
- }
157
-
158
- timeRange(): TimeRange {
159
- let start = 0;
160
- let end = 0;
161
- for (const cursor of this.cursors) {
162
- const cursorTimeRange = cursor.timeRange();
163
- start = Math.min(start, cursorTimeRange.start);
164
- end = Math.max(end, cursorTimeRange.end);
165
- }
166
-
167
- return { start, end };
168
- }
169
-
170
- minTimestamp(): number {
171
- // TODO: Calculate and cache this value every time there's a new cursor.
172
- return this.timeRange().start;
173
- }
174
-
175
- maxTimestamp(): number {
176
- // TODO: Calculate and cache this value every time there's a new cursor.
177
- return this.timeRange().end;
178
- }
179
-
180
- private dispatchTimeRange(): void {
181
- const timeRange = this.timeRange();
182
- for (const listener of this.cursors) {
183
- // TODO: dedup in case the timestamp hasn't changed sine last time.
184
- listener.onTimeRangeChange(timeRange);
185
- }
186
- // TODO: Combine loops without extra memory?
187
- for (const listener of this.timestampListeners) {
188
- // TODO: dedup in case the timestamp hasn't changed sine last time.
189
- listener.onTimeRangeChange(timeRange);
190
- }
191
- }
192
-
193
- private dispatchTimestamp(): void {
194
- for (const listener of this.cursors) {
195
- // TODO: dedup in case the timestamp hasn't changed sine last time.
196
- listener.onTimelineTimestampChange(this.timestamp);
197
- }
198
- // TODO: Combine loops without extra memory?
199
- for (const listener of this.timestampListeners) {
200
- // TODO: dedup in case the timestamp hasn't changed sine last time.
201
- listener.onTimelineTimestampChange(this.timestamp);
202
- }
203
- }
204
-
205
- addTimestampListener(timestampListener: TimelineTimestampListener): void {
206
- this.timestampListeners.add(timestampListener);
207
- }
208
-
209
- removeTimestampListener(timestampListener: TimelineTimestampListener): void {
210
- this.timestampListeners.delete(timestampListener);
211
- }
212
-
213
- addActionListener(actionListener: TimelineActionListener): void {
214
- this.actionListeners.add(actionListener);
215
- }
216
-
217
- removeActionListener(actionListener: TimelineActionListener): void {
218
- this.actionListeners.delete(actionListener);
219
- }
220
-
221
- play(): void {
222
- this.experimentalPlay(Direction.Forwards, BoundaryType.EntireTimeline);
223
- }
224
-
225
- experimentalPlay(
226
- direction: Direction.Backwards | Direction.Forwards,
227
- boundaryType: BoundaryType = BoundaryType.EntireTimeline,
228
- ): void {
229
- this.direction = direction;
230
- this.boundaryType = boundaryType;
231
- const nextBoundary = this.nextBoundary(
232
- this.timestamp,
233
- direction,
234
- this.boundaryType,
235
- );
236
- if (nextBoundary === null) {
237
- return; // Nowhere to end, so we don't animate.
238
- }
239
- this.cachedNextBoundary = nextBoundary;
240
- if (!this.animating) {
241
- this.animating = true;
242
- this.lastAnimFrameNow = getNow();
243
- this.dispatchAction(TimelineAction.StartingToPlay);
244
- this.scheduler.requestAnimFrame();
245
- }
246
- }
247
-
248
- // Non-inclusive
249
- private nextBoundary(
250
- timestamp: MillisecondTimestamp,
251
- direction: Direction.Backwards | Direction.Forwards,
252
- boundaryType: BoundaryType = BoundaryType.EntireTimeline,
253
- ): MillisecondTimestamp | null {
254
- switch (boundaryType) {
255
- case BoundaryType.EntireTimeline: {
256
- switch (direction) {
257
- case Direction.Backwards:
258
- return timestamp <= this.minTimestamp()
259
- ? null
260
- : this.minTimestamp();
261
- case Direction.Forwards:
262
- return timestamp >= this.maxTimestamp()
263
- ? null
264
- : this.maxTimestamp();
265
- default:
266
- throw new Error("invalid direction");
267
- }
268
- }
269
- case BoundaryType.Move: {
270
- let result: null | MillisecondTimestamp = null;
271
- for (const cursor of this.cursors) {
272
- const boundaryTimestamp = cursor.moveBoundary(timestamp, direction);
273
- if (boundaryTimestamp !== null) {
274
- switch (direction) {
275
- case Direction.Backwards: {
276
- result = Math.min(
277
- result ?? boundaryTimestamp,
278
- boundaryTimestamp,
279
- );
280
- break;
281
- }
282
- case Direction.Forwards: {
283
- result = Math.max(
284
- result ?? boundaryTimestamp,
285
- boundaryTimestamp,
286
- );
287
- break;
288
- }
289
- default:
290
- throw new Error("invalid direction");
291
- }
292
- }
293
- }
294
- return result;
295
- }
296
- default:
297
- throw new Error("invalid boundary type");
298
- }
299
- }
300
-
301
- // One more render may be dispatched after this.
302
- pause(): void {
303
- // TODO: error if already paused?
304
- if (this.animating) {
305
- this.animating = false;
306
- this.dispatchAction(TimelineAction.Pausing);
307
- this.scheduler.requestAnimFrame();
308
- }
309
- }
310
-
311
- playPause(): void {
312
- if (this.animating) {
313
- this.pause();
314
- } else {
315
- if (this.timestamp >= this.maxTimestamp()) {
316
- this.timestamp = 0;
317
- }
318
- this.experimentalPlay(Direction.Forwards, BoundaryType.EntireTimeline);
319
- }
320
- }
321
-
322
- setTimestamp(timestamp: MillisecondTimestamp): void {
323
- const oldTimestamp = this.timestamp;
324
- this.timestamp = timestamp;
325
- this.lastAnimFrameNow = getNow();
326
-
327
- if (oldTimestamp !== timestamp) {
328
- this.dispatchAction(TimelineAction.Jumping);
329
- this.scheduler.requestAnimFrame();
330
- }
331
-
332
- if (PAUSE_ON_JUMP) {
333
- this.animating = false;
334
- this.dispatchAction(TimelineAction.Pausing);
335
- }
336
- }
337
-
338
- jumpToStart(): void {
339
- this.setTimestamp(this.minTimestamp());
340
- }
341
-
342
- jumpToEnd(): void {
343
- this.setTimestamp(this.maxTimestamp());
344
- }
345
-
346
- /** @deprecated */
347
- experimentalJumpToLastMove(): void {
348
- let max: MillisecondTimestamp = 0;
349
- for (const cursor of this.cursors) {
350
- max = Math.max(
351
- max,
352
- cursor.experimentalTimestampForStartOfLastMove() ?? 0,
353
- );
354
- }
355
- this.setTimestamp(max);
356
- }
357
-
358
- private dispatchAction(event: TimelineAction): void {
359
- let locationType = TimestampLocationType.MiddleOfMove; // TODO
360
- switch (this.timestamp) {
361
- // TODO
362
- case this.minTimestamp():
363
- locationType = TimestampLocationType.StartOfTimeline;
364
- break;
365
- case this.maxTimestamp():
366
- locationType = TimestampLocationType.EndOfTimeline;
367
- break;
368
- }
369
-
370
- const actionEvent: TimelineActionEvent = {
371
- action: event,
372
- locationType,
373
- };
374
- for (const listener of this.actionListeners) {
375
- listener.onTimelineAction(actionEvent);
376
- }
377
- }
378
- }
@@ -1,252 +0,0 @@
1
- /* eslint-disable no-case-declarations */
2
- // TODO: private vs. public properties/methods.
3
- // TODO: optional construtor arguments for DOM elements
4
- // TODO: figure out what can be moved into a worker using OffscreenCanvas https://developers.google.com/web/updates/2018/08/offscreen-canvas
5
-
6
- /* eslint-disable @typescript-eslint/no-empty-interface */
7
-
8
- // start of imports
9
- import { Alg, Move, Pause } from "../../../../alg";
10
- import {
11
- KPuzzle,
12
- KPuzzleDefinition,
13
- Transformation,
14
- } from "../../../../kpuzzle";
15
- import { KPuzzleWrapper } from "../../../views/3D/puzzles/KPuzzleWrapper";
16
- import type { AlgIndexer } from "../indexer/AlgIndexer";
17
- import { TreeAlgIndexer } from "../indexer/tree/TreeAlgIndexer";
18
- import type { Timeline, TimelineTimestampListener } from "../Timeline";
19
- import {
20
- Direction,
21
- directionScalar,
22
- MillisecondTimestamp,
23
- PuzzlePosition,
24
- } from "./CursorTypes";
25
- // end of imports
26
-
27
- // Model
28
-
29
- export interface PositionListener {
30
- onPositionChange(position: PuzzlePosition): void;
31
- }
32
-
33
- export interface PositionDispatcher {
34
- addPositionListener(positionListener: PositionListener): void;
35
- }
36
-
37
- export interface TimeRange {
38
- start: MillisecondTimestamp;
39
- end: MillisecondTimestamp;
40
- }
41
-
42
- export type IndexerConstructor = new (
43
- puzzle: KPuzzleWrapper,
44
- alg: Alg,
45
- ) => AlgIndexer<KPuzzleWrapper>;
46
-
47
- export class AlgCursor
48
- implements TimelineTimestampListener, PositionDispatcher
49
- {
50
- private indexer: AlgIndexer<KPuzzleWrapper>;
51
- private positionListeners: Set<PositionListener> = new Set(); // TODO: accessor instead of direct access
52
- private ksolvePuzzle: KPuzzleWrapper;
53
- private startState: Transformation;
54
- private indexerConstructor: IndexerConstructor = TreeAlgIndexer;
55
- constructor(
56
- private timeline: Timeline,
57
- private def: KPuzzleDefinition,
58
- private alg: Alg,
59
- startStateAlg?: Alg, // TODO: accept actual start state
60
- indexerConstructor?: IndexerConstructor,
61
- ) {
62
- this.ksolvePuzzle = new KPuzzleWrapper(def);
63
- if (indexerConstructor) {
64
- this.indexerConstructor = indexerConstructor;
65
- }
66
- this.instantiateIndexer(alg);
67
- this.startState = startStateAlg
68
- ? this.algToState(startStateAlg)
69
- : this.ksolvePuzzle.startState();
70
- timeline.addTimestampListener(this);
71
- }
72
-
73
- setStartState(startState: Transformation): void {
74
- this.startState = startState;
75
- this.dispatchPositionForTimestamp(this.timeline.timestamp);
76
- }
77
-
78
- /** @deprecated */
79
- public experimentalSetIndexer(indexerConstructor: IndexerConstructor): void {
80
- this.indexerConstructor = indexerConstructor;
81
- this.instantiateIndexer(this.alg);
82
- this.timeline.onCursorChange(this);
83
- this.dispatchPositionForTimestamp(this.timeline.timestamp);
84
- }
85
-
86
- private instantiateIndexer(alg: Alg): void {
87
- this.indexer = new this.indexerConstructor(this.ksolvePuzzle, alg);
88
- }
89
-
90
- /** @deprecated */
91
- algToState(s: Alg): Transformation {
92
- const kpuzzle = new KPuzzle(this.def);
93
- kpuzzle.applyAlg(s);
94
- return this.ksolvePuzzle.combine(this.def.startPieces, kpuzzle.state);
95
- }
96
-
97
- timeRange(): TimeRange {
98
- return {
99
- start: 0,
100
- end: this.indexer.algDuration(),
101
- };
102
- }
103
-
104
- /** @deprecated */
105
- experimentalTimestampForStartOfLastMove(): MillisecondTimestamp {
106
- const numMoves = this.indexer.numAnimatedLeaves();
107
- if (numMoves > 0) {
108
- return this.indexer.indexToMoveStartTimestamp(numMoves - 1);
109
- }
110
- return 0;
111
- }
112
-
113
- addPositionListener(positionListener: PositionListener): void {
114
- this.positionListeners.add(positionListener);
115
- this.dispatchPositionForTimestamp(this.timeline.timestamp, [
116
- positionListener,
117
- ]); // TODO: should this be a separate dispatch, or should the listener manually ask for the position?
118
- }
119
-
120
- removePositionListener(positionListener: PositionListener): void {
121
- this.positionListeners.delete(positionListener);
122
- }
123
-
124
- onTimelineTimestampChange(timestamp: MillisecondTimestamp): void {
125
- this.dispatchPositionForTimestamp(timestamp);
126
- }
127
-
128
- private dispatchPositionForTimestamp(
129
- timestamp: MillisecondTimestamp,
130
- listeners: PositionListener[] | Set<PositionListener> = this
131
- .positionListeners,
132
- ): void {
133
- let position: PuzzlePosition;
134
- if (this.indexer.timestampToPosition) {
135
- position = this.indexer.timestampToPosition(timestamp, this.startState);
136
- } else {
137
- const idx = this.indexer.timestampToIndex(timestamp);
138
- const state = this.indexer.stateAtIndex(
139
- idx,
140
- this.startState,
141
- ) as Transformation; // TODO
142
- position = {
143
- state,
144
- movesInProgress: [],
145
- };
146
-
147
- if (this.indexer.numAnimatedLeaves() > 0) {
148
- const move = this.indexer.getAnimLeaf(idx)?.as(Move);
149
- if (!move) {
150
- return; // TODO
151
- }
152
- const fraction =
153
- (timestamp - this.indexer.indexToMoveStartTimestamp(idx)) /
154
- this.indexer.moveDuration(idx);
155
- if (fraction === 1) {
156
- // TODO: push this into the indexer
157
- position.state = this.ksolvePuzzle.combine(
158
- state,
159
- this.ksolvePuzzle.stateFromMove(move),
160
- ) as Transformation;
161
- } else if (fraction > 0) {
162
- if (move) {
163
- position.movesInProgress.push({
164
- move,
165
- direction: Direction.Forwards,
166
- fraction,
167
- });
168
- }
169
- }
170
- }
171
- }
172
-
173
- for (const listener of listeners) {
174
- listener.onPositionChange(position);
175
- }
176
- }
177
-
178
- onTimeRangeChange(_timeRange: TimeRange): void {
179
- // nothing to do
180
- }
181
-
182
- setAlg(alg: Alg, indexerConstructor?: IndexerConstructor): void {
183
- indexerConstructor ??= this.indexerConstructor;
184
- if (
185
- alg.isIdentical(this.alg) &&
186
- this.indexerConstructor === indexerConstructor
187
- ) {
188
- // TODO: this is a hacky optimization.
189
- return;
190
- }
191
- this.indexerConstructor = indexerConstructor;
192
- this.alg = alg;
193
- this.instantiateIndexer(alg);
194
- this.timeline.onCursorChange(this);
195
- this.dispatchPositionForTimestamp(this.timeline.timestamp);
196
- // TODO: Handle state change.
197
- }
198
-
199
- moveBoundary(
200
- timestamp: MillisecondTimestamp,
201
- direction: Direction.Backwards | Direction.Forwards,
202
- ): MillisecondTimestamp | null {
203
- if (this.indexer.numAnimatedLeaves() === 0) {
204
- return null;
205
- }
206
- // TODO: define semantics of indexing edge cases and remove this hack.
207
- const offsetHack = directionScalar(direction) * 0.001;
208
- const idx = this.indexer.timestampToIndex(timestamp + offsetHack);
209
- const moveStart = this.indexer.indexToMoveStartTimestamp(idx);
210
-
211
- if (direction === Direction.Backwards) {
212
- return timestamp >= moveStart ? moveStart : null;
213
- } else {
214
- const moveEnd = moveStart + this.indexer.moveDuration(idx);
215
- return timestamp <= moveEnd ? moveEnd : null;
216
- }
217
- }
218
-
219
- setPuzzle(
220
- def: KPuzzleDefinition,
221
- alg: Alg = this.alg,
222
- startStateAlg?: Alg,
223
- ): void {
224
- this.ksolvePuzzle = new KPuzzleWrapper(def);
225
- this.def = def;
226
- this.indexer = new this.indexerConstructor(this.ksolvePuzzle, alg);
227
- if (alg !== this.alg) {
228
- this.timeline.onCursorChange(this);
229
- }
230
- this.setStartState(
231
- startStateAlg
232
- ? this.algToState(startStateAlg)
233
- : this.ksolvePuzzle.startState(),
234
- );
235
- this.alg = alg;
236
- }
237
-
238
- /** @deprecated */
239
- experimentalTimestampFromIndex(index: number): MillisecondTimestamp {
240
- return this.indexer.indexToMoveStartTimestamp(index);
241
- }
242
-
243
- /** @deprecated */
244
- experimentalIndexFromTimestamp(timestamp: MillisecondTimestamp): number {
245
- return this.indexer.timestampToIndex(timestamp);
246
- }
247
-
248
- /** @deprecated */
249
- experimentalLeafAtIndex(index: number): Move | Pause | null {
250
- return this.indexer.getAnimLeaf(index);
251
- }
252
- }
@@ -1,25 +0,0 @@
1
- import { CSSSource } from "./element/ManagedCustomElement";
2
-
3
- export const twistyAlgViewerCSS = new CSSSource(`
4
- :host {
5
- display: inline-grid;
6
- }
7
-
8
- a:not(:hover) {
9
- color: inherit;
10
- text-decoration: none;
11
- }
12
-
13
- twisty-alg-leaf-elem.twisty-alg-comment {
14
- color: rgba(0, 0, 0, 0.4);
15
- }
16
-
17
- .wrapper.current-move {
18
- background: rgba(66, 133, 244, 0.3);
19
- margin-left: -0.1em;
20
- margin-right: -0.1em;
21
- padding-left: 0.1em;
22
- padding-right: 0.1em;
23
- border-radius: 0.1em;
24
- }
25
- `);