cubing 0.21.2 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (581) hide show
  1. package/README.md +5 -8
  2. package/alg/package.json +1 -3
  3. package/bluetooth/package.json +1 -3
  4. package/dist/bin/order.js +16675 -0
  5. package/dist/bin/order.js.map +7 -0
  6. package/dist/bin/puzzle-geometry-bin.js +13 -9
  7. package/dist/bin/puzzle-geometry-bin.js.map +2 -2
  8. package/dist/bundle-global/cubing.bundle-global.js +3285 -291
  9. package/dist/esm/2x2x2.sgs.json-FRBWMMA7.js +122 -0
  10. package/dist/esm/2x2x2.sgs.json-FRBWMMA7.js.map +7 -0
  11. package/dist/esm/3d-Q4WSD4BC.js +21 -0
  12. package/dist/esm/3d-Q4WSD4BC.js.map +7 -0
  13. package/dist/esm/alg/index.js +1 -1
  14. package/dist/esm/bluetooth/index.d.ts +1 -1
  15. package/dist/esm/bluetooth/index.js +10 -8
  16. package/dist/esm/bluetooth/index.js.map +3 -3
  17. package/dist/esm/chunk-37EHU3GZ.js +66 -0
  18. package/dist/esm/chunk-37EHU3GZ.js.map +7 -0
  19. package/dist/esm/{chunk-RE7MIN5R.js → chunk-4IUYLRHT.js} +2 -2
  20. package/dist/esm/{chunk-RE7MIN5R.js.map → chunk-4IUYLRHT.js.map} +0 -0
  21. package/dist/esm/chunk-BJIOROQC.js +18 -0
  22. package/dist/esm/chunk-BJIOROQC.js.map +7 -0
  23. package/dist/esm/{chunk-MUQMBH2S.js → chunk-DK6PXBB2.js} +16 -4
  24. package/dist/esm/chunk-DK6PXBB2.js.map +7 -0
  25. package/dist/esm/chunk-DPMEZY7V.js +1552 -0
  26. package/dist/esm/chunk-DPMEZY7V.js.map +7 -0
  27. package/dist/esm/{chunk-BU5PUJK3.js → chunk-EWRBHQFX.js} +1 -1
  28. package/dist/esm/{chunk-BU5PUJK3.js.map → chunk-EWRBHQFX.js.map} +1 -1
  29. package/dist/esm/chunk-FK2SCC3Z.js +499 -0
  30. package/dist/esm/chunk-FK2SCC3Z.js.map +7 -0
  31. package/dist/esm/chunk-JZWB7AIU.js +115 -0
  32. package/dist/esm/chunk-JZWB7AIU.js.map +7 -0
  33. package/dist/esm/chunk-MLOCDLUF.js +226 -0
  34. package/dist/esm/chunk-MLOCDLUF.js.map +7 -0
  35. package/dist/esm/{chunk-APIIMJG6.js → chunk-N3RNWU5T.js} +450 -1052
  36. package/dist/esm/chunk-N3RNWU5T.js.map +7 -0
  37. package/dist/esm/chunk-PUPUQWJC.js +4065 -0
  38. package/dist/esm/chunk-PUPUQWJC.js.map +7 -0
  39. package/dist/esm/{chunk-YV3RT5PX.js → chunk-X6JHXPDX.js} +2 -2
  40. package/dist/esm/{chunk-YV3RT5PX.js.map → chunk-X6JHXPDX.js.map} +0 -0
  41. package/dist/esm/chunk-XVZOMB6J.js +89 -0
  42. package/dist/esm/chunk-XVZOMB6J.js.map +7 -0
  43. package/dist/esm/chunk-Z6X7HTPP.js +103 -0
  44. package/dist/esm/chunk-Z6X7HTPP.js.map +7 -0
  45. package/dist/esm/entry-L6CE2HLF.js +531 -0
  46. package/dist/esm/entry-L6CE2HLF.js.map +7 -0
  47. package/dist/esm/esm-test-worker.js +3 -14
  48. package/dist/esm/esm-test-worker.js.map +3 -3
  49. package/dist/esm/fto.sgs.json-62YNULOK.js +649 -0
  50. package/dist/esm/fto.sgs.json-62YNULOK.js.map +7 -0
  51. package/dist/esm/gwt-B7CBESZR.js +1669 -0
  52. package/dist/esm/gwt-B7CBESZR.js.map +7 -0
  53. package/dist/esm/kpuzzle/index.js +2 -2
  54. package/dist/esm/megaminx.sgs.json-PRL46G5J.js +16 -0
  55. package/dist/esm/megaminx.sgs.json-PRL46G5J.js.map +7 -0
  56. package/dist/esm/module-entry-J2N3UZP7.js +18 -0
  57. package/dist/esm/module-entry-J2N3UZP7.js.map +7 -0
  58. package/dist/esm/{node-BSAQKO3G.js → node-SP4L2AKI.js} +2 -2
  59. package/dist/esm/{node-BSAQKO3G.js.map → node-SP4L2AKI.js.map} +1 -1
  60. package/dist/esm/{node-WEHVBEKP.js → node-W3AD4HBK.js} +3 -2
  61. package/dist/esm/node-W3AD4HBK.js.map +7 -0
  62. package/dist/esm/notation/index.js +2 -2
  63. package/dist/esm/protocol/index.js +2 -2
  64. package/dist/esm/puzzle-geometry/index.js +13 -4049
  65. package/dist/esm/puzzle-geometry/index.js.map +3 -3
  66. package/dist/esm/puzzles/index.js +3 -3
  67. package/dist/esm/pyraminx.sgs.json-7QMPT5XP.js +14 -0
  68. package/dist/esm/pyraminx.sgs.json-7QMPT5XP.js.map +7 -0
  69. package/dist/esm/scramble/index.js +6 -4
  70. package/dist/esm/scramble_444-JP3CWLJM.js +2572 -0
  71. package/dist/esm/scramble_444-JP3CWLJM.js.map +7 -0
  72. package/dist/esm/scramble_sq1-PQ2AYBFW.js +706 -0
  73. package/dist/esm/scramble_sq1-PQ2AYBFW.js.map +7 -0
  74. package/dist/esm/search/index.js +8 -5
  75. package/dist/esm/skewb.sgs.json-FWHYACJG.js +16 -0
  76. package/dist/esm/skewb.sgs.json-FWHYACJG.js.map +7 -0
  77. package/dist/esm/stream/index.js +1 -1
  78. package/dist/esm/twisty/index.js +721 -2343
  79. package/dist/esm/twisty/index.js.map +3 -3
  80. package/dist/esm/worker-inside-generated-string-OWJA5IIQ.js +3450 -0
  81. package/dist/esm/worker-inside-generated-string-OWJA5IIQ.js.map +7 -0
  82. package/dist/types/alg/index.d.ts +1 -0
  83. package/dist/types/alg/index.d.ts.map +1 -1
  84. package/dist/types/alg/units/leaves/Move.d.ts +1 -1
  85. package/dist/types/alg/units/leaves/Move.d.ts.map +1 -1
  86. package/dist/types/bluetooth/smart-puzzle/gan.d.ts.map +1 -1
  87. package/dist/types/cubing.bundle-global.exports.d.ts +25 -0
  88. package/dist/types/cubing.bundle-global.exports.d.ts.map +1 -0
  89. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +3 -0
  90. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +1 -1
  91. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +7 -3
  92. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +1 -1
  93. package/dist/types/puzzle-geometry/index.d.ts +1 -1
  94. package/dist/types/puzzle-geometry/index.d.ts.map +1 -1
  95. package/dist/types/puzzles/index.d.ts +1 -1
  96. package/dist/types/puzzles/index.d.ts.map +1 -1
  97. package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +1 -1
  98. package/dist/types/search/inside/api.d.ts.map +1 -1
  99. package/dist/types/search/inside/module-entry-path-getter.d.ts +2 -0
  100. package/dist/types/search/inside/module-entry-path-getter.d.ts.map +1 -0
  101. package/dist/types/search/inside/module-entry.d.ts +2 -0
  102. package/dist/types/search/inside/module-entry.d.ts.map +1 -0
  103. package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts.map +1 -1
  104. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts +2 -1
  105. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts.map +1 -1
  106. package/dist/types/search/inside/solve/puzzles/fto.d.ts +6 -0
  107. package/dist/types/search/inside/solve/puzzles/fto.d.ts.map +1 -0
  108. package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts +5 -0
  109. package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts.map +1 -0
  110. package/dist/types/search/inside/solve/puzzles/sq1.d.ts.map +1 -1
  111. package/dist/types/search/inside/solve/tremble.d.ts.map +1 -1
  112. package/dist/types/search/instantiator.d.ts +1 -2
  113. package/dist/types/search/instantiator.d.ts.map +1 -1
  114. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  115. package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
  116. package/dist/types/twisty/{old/animation/cursor/CursorTypes.d.ts → controllers/AnimationTypes.d.ts} +10 -3
  117. package/dist/types/twisty/controllers/AnimationTypes.d.ts.map +1 -0
  118. package/dist/types/twisty/{old/animation → controllers}/RenderScheduler.d.ts +0 -0
  119. package/dist/types/twisty/controllers/RenderScheduler.d.ts.map +1 -0
  120. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +1 -1
  121. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -1
  122. package/dist/types/twisty/{old/animation → controllers}/easing.d.ts +0 -0
  123. package/dist/types/twisty/controllers/easing.d.ts.map +1 -0
  124. package/dist/types/twisty/{old/animation → controllers}/indexer/AlgDuration.d.ts +2 -2
  125. package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts.map +1 -0
  126. package/dist/types/twisty/{old/animation → controllers}/indexer/AlgIndexer.d.ts +3 -3
  127. package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts.map +1 -0
  128. package/dist/types/twisty/{old/animation → controllers}/indexer/SimpleAlgIndexer.d.ts +3 -3
  129. package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts.map +1 -0
  130. package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +3 -3
  131. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +1 -0
  132. package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +3 -3
  133. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +1 -0
  134. package/dist/types/twisty/{old/animation → controllers}/indexer/simultaneous-moves/simul-moves.d.ts +2 -2
  135. package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts.map +1 -0
  136. package/dist/types/twisty/{old/animation → controllers}/indexer/tree/AlgWalker.d.ts +2 -2
  137. package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts.map +1 -0
  138. package/dist/types/twisty/{old/animation → controllers}/indexer/tree/TreeAlgIndexer.d.ts +3 -3
  139. package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts.map +1 -0
  140. package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts +3 -0
  141. package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts.map +1 -0
  142. package/dist/types/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.d.ts +2 -2
  143. package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts.map +1 -0
  144. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +1 -2
  145. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +1 -1
  146. package/dist/types/twisty/index.d.ts +8 -11
  147. package/dist/types/twisty/index.d.ts.map +1 -1
  148. package/dist/types/twisty/model/TwistyPlayerModel.d.ts +11 -0
  149. package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -1
  150. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +1 -1
  151. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -1
  152. package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts +6 -0
  153. package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts.map +1 -0
  154. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +5 -1
  155. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -1
  156. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +46 -1
  157. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -1
  158. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +2 -2
  159. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -1
  160. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +1 -1
  161. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -1
  162. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +1 -1
  163. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -1
  164. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +1 -1
  165. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -1
  166. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +5 -2
  167. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -1
  168. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +2 -2
  169. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -1
  170. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +2 -2
  171. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -1
  172. package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts +11 -0
  173. package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts.map +1 -0
  174. package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts +10 -0
  175. package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts.map +1 -0
  176. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +5 -1
  177. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -1
  178. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +1 -1
  179. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -1
  180. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +19 -1
  181. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -1
  182. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +1 -1
  183. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -1
  184. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +2 -3
  185. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -1
  186. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +1 -1
  187. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -1
  188. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +1 -1
  189. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -1
  190. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +6 -1
  191. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -1
  192. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +5 -1
  193. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -1
  194. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +5 -1
  195. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -1
  196. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +18 -5
  197. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -1
  198. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +6 -6
  199. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -1
  200. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +2 -2
  201. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -1
  202. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +5 -1
  203. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -1
  204. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +7 -1
  205. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -1
  206. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +1 -1
  207. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -1
  208. package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts +3 -0
  209. package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts.map +1 -0
  210. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +4 -6
  211. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +1 -1
  212. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +1 -1
  213. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +1 -1
  214. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +2 -2
  215. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +1 -1
  216. package/dist/types/twisty/views/3D/DragTracker.d.ts +28 -0
  217. package/dist/types/twisty/views/3D/DragTracker.d.ts.map +1 -0
  218. package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -1
  219. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +6 -1
  220. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -1
  221. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +9 -4
  222. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -1
  223. package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts +3 -0
  224. package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts.map +1 -0
  225. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +11 -7
  226. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -1
  227. package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts +24 -0
  228. package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts.map +1 -0
  229. package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts +5 -0
  230. package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts.map +1 -0
  231. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts +4 -4
  232. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +1 -1
  233. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +17 -10
  234. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +1 -1
  235. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts +1 -1
  236. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +1 -1
  237. package/dist/types/twisty/{old/dom/element → views}/ClassListManager.d.ts +0 -0
  238. package/dist/types/twisty/views/ClassListManager.d.ts.map +1 -0
  239. package/dist/types/twisty/{old/dom/element → views}/ManagedCustomElement.d.ts +0 -0
  240. package/dist/types/twisty/views/ManagedCustomElement.d.ts.map +1 -0
  241. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +1 -1
  242. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +1 -1
  243. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +1 -1
  244. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +1 -1
  245. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +2 -1
  246. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -1
  247. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +1 -1
  248. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +1 -1
  249. package/dist/types/twisty/views/TwistyAlgViewer.d.ts +2 -2
  250. package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +1 -1
  251. package/dist/types/twisty/views/TwistyPlayer.css.d.ts +3 -0
  252. package/dist/types/twisty/views/TwistyPlayer.css.d.ts.map +1 -0
  253. package/dist/types/twisty/views/TwistyPlayer.d.ts +7 -3
  254. package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -1
  255. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +7 -4
  256. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -1
  257. package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts +3 -0
  258. package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts.map +1 -0
  259. package/dist/types/twisty/{old/dom/viewers → views}/canvas.d.ts +0 -0
  260. package/dist/types/twisty/views/canvas.d.ts.map +1 -0
  261. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts +4 -0
  262. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts.map +1 -0
  263. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +1 -1
  264. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -1
  265. package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts +3 -0
  266. package/dist/types/twisty/{old/dom/controls → views/control-panel}/TwistyScrubber.css.d.ts.map +1 -1
  267. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +1 -1
  268. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -1
  269. package/dist/types/twisty/{old/dom/element → views}/node-custom-element-shims.d.ts +0 -0
  270. package/dist/types/twisty/views/node-custom-element-shims.d.ts.map +1 -0
  271. package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts +3 -0
  272. package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts.map +1 -0
  273. package/dist/types/twisty/{old/dom → views}/stream/TwistyStreamSource.d.ts +1 -1
  274. package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts.map +1 -0
  275. package/dist/types/{search/vendor → vendor}/comlink-everywhere/inside/index.d.ts +0 -0
  276. package/dist/types/vendor/comlink-everywhere/inside/index.d.ts.map +1 -0
  277. package/dist/types/{search/vendor → vendor}/comlink-everywhere/inside/node.d.ts +0 -0
  278. package/dist/types/vendor/comlink-everywhere/inside/node.d.ts.map +1 -0
  279. package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/index.d.ts +0 -0
  280. package/dist/types/vendor/comlink-everywhere/outside/index.d.ts.map +1 -0
  281. package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/node.d.ts +0 -0
  282. package/dist/types/vendor/comlink-everywhere/outside/node.d.ts.map +1 -0
  283. package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/lib/mathlib.d.ts +0 -0
  284. package/dist/types/vendor/cstimer/src/js/lib/mathlib.d.ts.map +1 -0
  285. package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/scramble/scramble_444.d.ts +1 -1
  286. package/dist/types/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +1 -0
  287. package/dist/types/{search/inside/solve/vendor → vendor}/min2phase/gwt.d.ts +0 -0
  288. package/dist/types/vendor/min2phase/gwt.d.ts.map +1 -0
  289. package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/get-random-values.d.ts +0 -0
  290. package/dist/types/vendor/random-uint-below/get-random-values.d.ts.map +1 -0
  291. package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/index.d.ts +1 -1
  292. package/dist/types/vendor/random-uint-below/index.d.ts.map +1 -0
  293. package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/random-choice.d.ts +0 -0
  294. package/dist/types/vendor/random-uint-below/random-choice.d.ts.map +1 -0
  295. package/dist/types/{search/inside/solve/vendor/random-uint-below/random-int.d.ts → vendor/random-uint-below/random53BitValue.d.ts} +1 -1
  296. package/dist/types/vendor/random-uint-below/random53BitValue.d.ts.map +1 -0
  297. package/dist/types/{search/inside/solve/vendor → vendor}/sq12phase/scramble_sq1.d.ts +0 -0
  298. package/dist/types/vendor/sq12phase/scramble_sq1.d.ts.map +1 -0
  299. package/dist/types/{bluetooth/smart-puzzle → vendor/unsafe-raw-aes}/unsafe-raw-aes.d.ts +0 -0
  300. package/dist/types/vendor/unsafe-raw-aes/unsafe-raw-aes.d.ts.map +1 -0
  301. package/docs/.DS_Store +0 -0
  302. package/docs/cubing/.DS_Store +0 -0
  303. package/docs/cubing/api/index.html +11 -52
  304. package/docs/cubing/index.html +67 -27
  305. package/docs/main.css +7 -6
  306. package/kpuzzle/package.json +1 -3
  307. package/notation/package.json +1 -3
  308. package/package.json +9 -14
  309. package/protocol/package.json +1 -3
  310. package/puzzle-geometry/package.json +1 -3
  311. package/puzzles/package.json +1 -3
  312. package/scramble/package.json +1 -3
  313. package/search/package.json +1 -3
  314. package/src/cubing/.DS_Store +0 -0
  315. package/src/cubing/alg/index.ts +1 -0
  316. package/src/cubing/alg/units/leaves/Move.ts +1 -1
  317. package/src/cubing/bluetooth/smart-puzzle/gan.ts +4 -1
  318. package/src/cubing/bluetooth/smart-timer/GanTimer.ts +1 -1
  319. package/src/cubing/cubing.bundle-global.exports.ts +25 -0
  320. package/src/cubing/cubing.bundle-global.ts +3 -31
  321. package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +4 -0
  322. package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +20 -8
  323. package/src/cubing/puzzle-geometry/index.ts +2 -2
  324. package/src/cubing/puzzles/index.ts +1 -1
  325. package/src/cubing/puzzles/stickerings/cube-stickerings.ts +18 -0
  326. package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +1 -1
  327. package/src/cubing/{twisty/views/3D → search}/.DS_Store +0 -0
  328. package/src/cubing/search/esm-test-worker.js +1 -1
  329. package/src/cubing/{twisty → search/inside}/.DS_Store +0 -0
  330. package/src/cubing/search/inside/api.ts +3 -0
  331. package/src/cubing/search/inside/entry.js +1 -1
  332. package/src/cubing/search/inside/inside-worker.ts +1 -1
  333. package/src/cubing/search/inside/module-entry-path-getter.ts +5 -0
  334. package/src/cubing/search/inside/module-entry.ts +20 -0
  335. package/src/cubing/search/inside/solve/addOrientationSuffix.ts +1 -1
  336. package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +1 -1
  337. package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +14 -4
  338. package/src/cubing/search/inside/solve/puzzles/4x4x4.ts +19 -5
  339. package/src/cubing/search/inside/solve/puzzles/big-cubes.ts +1 -1
  340. package/src/cubing/search/inside/solve/puzzles/clock.ts +1 -1
  341. package/src/cubing/search/inside/solve/puzzles/fto.sgs.json.ts +643 -0
  342. package/src/cubing/search/inside/solve/puzzles/fto.ts +58 -0
  343. package/src/cubing/search/inside/solve/puzzles/sq1.ts +12 -2
  344. package/src/cubing/search/inside/solve/puzzles/wca-minx.ts +1 -1
  345. package/src/cubing/search/inside/solve/tremble.ts +2 -1
  346. package/src/cubing/search/instantiator.ts +76 -41
  347. package/src/cubing/search/worker-inside-generated-string.js +1 -1
  348. package/src/cubing/twisty/{old/animation/cursor/CursorTypes.ts → controllers/AnimationTypes.ts} +11 -2
  349. package/src/cubing/twisty/{old/animation → controllers}/RenderScheduler.ts +0 -0
  350. package/src/cubing/twisty/controllers/TwistyAnimationController.ts +4 -4
  351. package/src/cubing/twisty/{old/animation → controllers}/easing.ts +0 -0
  352. package/src/cubing/twisty/{old/animation → controllers}/indexer/AlgDuration.ts +2 -2
  353. package/src/cubing/twisty/{old/animation → controllers}/indexer/AlgIndexer.ts +4 -4
  354. package/src/cubing/twisty/{old/animation → controllers}/indexer/SimpleAlgIndexer.ts +4 -4
  355. package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +3 -3
  356. package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +3 -3
  357. package/src/cubing/twisty/{old/animation → controllers}/indexer/simultaneous-moves/simul-moves.ts +2 -2
  358. package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/AlgWalker.ts +4 -4
  359. package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/TreeAlgIndexer.ts +3 -3
  360. package/src/cubing/twisty/{old/animation → controllers}/indexer/tree/chunkAlgs.ts +2 -2
  361. package/src/cubing/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -0
  362. package/src/cubing/twisty/{old/animation → controllers}/stream/timeline-move-calculation-draft.ts +2 -2
  363. package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +2 -12
  364. package/src/cubing/twisty/index.ts +11 -18
  365. package/src/cubing/twisty/model/TwistyPlayerModel.ts +38 -7
  366. package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +3 -3
  367. package/src/cubing/twisty/model/props/puzzle/display/FoundationDisplayProp.ts +9 -0
  368. package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +6 -1
  369. package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +49 -1
  370. package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +1 -1
  371. package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +2 -2
  372. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +2 -2
  373. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +1 -1
  374. package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +1 -1
  375. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +12 -5
  376. package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +2 -2
  377. package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +2 -2
  378. package/src/cubing/twisty/model/props/puzzle/state/MovePressInputProp.ts +14 -0
  379. package/src/cubing/twisty/model/props/puzzle/state/NaiveMoveCountProp.ts +20 -0
  380. package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +7 -1
  381. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +1 -1
  382. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +20 -1
  383. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +1 -1
  384. package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +5 -3
  385. package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +1 -4
  386. package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +1 -1
  387. package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +7 -1
  388. package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +6 -1
  389. package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +5 -1
  390. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +83 -12
  391. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +8 -8
  392. package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +2 -2
  393. package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +5 -1
  394. package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +8 -1
  395. package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +1 -1
  396. package/src/cubing/twisty/{old/dom/viewers/Twisty2DSVGView.css.ts → views/2D/Twisty2DPuzzle.css.ts} +1 -1
  397. package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +8 -12
  398. package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +1 -1
  399. package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +4 -4
  400. package/src/cubing/twisty/views/3D/DragTracker.ts +184 -0
  401. package/src/cubing/twisty/views/3D/RendererPool.ts +2 -1
  402. package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +51 -5
  403. package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +51 -10
  404. package/src/cubing/twisty/{old/dom/viewers/Twisty3DCanvas.css.ts → views/3D/Twisty3DVantage.css.ts} +2 -2
  405. package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +88 -30
  406. package/src/cubing/twisty/views/3D/TwistyOrbitControls.spec.ts +213 -0
  407. package/src/cubing/twisty/views/3D/TwistyOrbitControls.ts +176 -0
  408. package/src/cubing/twisty/views/3D/puzzles/Cube3D.ts +5 -9
  409. package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +127 -37
  410. package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +1 -1
  411. package/src/cubing/twisty/{old/dom/element → views}/ClassListManager.ts +0 -0
  412. package/src/cubing/twisty/{old/dom/element → views}/ManagedCustomElement.ts +0 -0
  413. package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +1 -1
  414. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.ts +1 -1
  415. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +11 -4
  416. package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +1 -1
  417. package/src/cubing/twisty/views/TwistyAlgViewer.ts +4 -4
  418. package/src/cubing/twisty/{old/dom → views}/TwistyPlayer.css.ts +4 -1
  419. package/src/cubing/twisty/views/TwistyPlayer.ts +16 -25
  420. package/src/cubing/twisty/views/TwistyPlayerSettable.ts +14 -10
  421. package/src/cubing/twisty/{old/dom/viewers → views}/TwistyViewerWrapper.css.ts +1 -1
  422. package/src/cubing/twisty/{old/dom/viewers → views}/canvas.ts +0 -0
  423. package/src/cubing/twisty/{old/dom/controls/buttons.css.ts → views/control-panel/TwistyButtonsV2.css.ts} +1 -1
  424. package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +5 -8
  425. package/src/cubing/twisty/{old/dom/controls → views/control-panel}/TwistyScrubber.css.ts +1 -1
  426. package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +3 -3
  427. package/src/cubing/twisty/{old/dom/element → views}/node-custom-element-shims.ts +2 -2
  428. package/src/cubing/twisty/{old/dom → views}/stream/TwistyStreamSource.css.ts +1 -1
  429. package/src/cubing/twisty/{old/dom → views}/stream/TwistyStreamSource.ts +9 -9
  430. package/{dist/types → src/cubing/vendor}/.DS_Store +0 -0
  431. package/{dist → src/cubing/vendor/comlink-everywhere}/.DS_Store +0 -0
  432. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/comlink-everywhere.webloc +0 -0
  433. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/index.d.ts +0 -0
  434. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/index.js +0 -0
  435. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/inside/node.js +0 -0
  436. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/index.d.ts +0 -0
  437. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/index.js +0 -0
  438. package/src/cubing/{search/vendor → vendor}/comlink-everywhere/outside/node.js +1 -0
  439. package/src/cubing/vendor/cstimer/.DS_Store +0 -0
  440. package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/LICENSE +0 -0
  441. package/src/cubing/vendor/cstimer/src/.DS_Store +0 -0
  442. package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/src/js/lib/mathlib.ts +0 -0
  443. package/src/cubing/{search/inside/solve/vendor → vendor}/cstimer/src/js/scramble/scramble_444.ts +3 -3
  444. package/src/cubing/{search/inside/solve/vendor → vendor}/min2phase/gwt.d.ts +0 -0
  445. package/src/cubing/{search/inside/solve/vendor → vendor}/min2phase/gwt.js +0 -0
  446. package/src/cubing/vendor/random-uint-below/get-random-values.ts +23 -0
  447. package/src/cubing/{search/inside/solve/vendor → vendor}/random-uint-below/index.ts +2 -2
  448. package/src/cubing/{search/inside/solve/vendor → vendor}/random-uint-below/random-choice.ts +1 -1
  449. package/src/cubing/{search/inside/solve/vendor/random-uint-below/random-int.ts → vendor/random-uint-below/random53BitValue.ts} +1 -1
  450. package/src/cubing/{search/inside/solve/vendor → vendor}/sq12phase/scramble_sq1.js +2 -2
  451. package/src/cubing/vendor/three/.DS_Store +0 -0
  452. package/src/cubing/vendor/three/examples/.DS_Store +0 -0
  453. package/src/cubing/{bluetooth/smart-puzzle → vendor/unsafe-raw-aes}/unsafe-raw-aes.ts +18 -20
  454. package/stream/package.json +1 -3
  455. package/twisty/package.json +1 -3
  456. package/alg/index.d.ts +0 -1
  457. package/bluetooth/index.d.ts +0 -1
  458. package/dist/esm/3d-B25DP5PE.js +0 -39
  459. package/dist/esm/3d-B25DP5PE.js.map +0 -7
  460. package/dist/esm/chunk-APIIMJG6.js.map +0 -7
  461. package/dist/esm/chunk-CSVAFZSB.js +0 -1379
  462. package/dist/esm/chunk-CSVAFZSB.js.map +0 -7
  463. package/dist/esm/chunk-MUQMBH2S.js.map +0 -7
  464. package/dist/esm/index.d.ts +0 -1
  465. package/dist/esm/node-WEHVBEKP.js.map +0 -7
  466. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js +0 -2831
  467. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +0 -7
  468. package/dist/types/bluetooth/smart-puzzle/unsafe-raw-aes.d.ts.map +0 -1
  469. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts.map +0 -1
  470. package/dist/types/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +0 -1
  471. package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts.map +0 -1
  472. package/dist/types/search/inside/solve/vendor/random-uint-below/get-random-values.d.ts.map +0 -1
  473. package/dist/types/search/inside/solve/vendor/random-uint-below/index.d.ts.map +0 -1
  474. package/dist/types/search/inside/solve/vendor/random-uint-below/random-choice.d.ts.map +0 -1
  475. package/dist/types/search/inside/solve/vendor/random-uint-below/random-int.d.ts.map +0 -1
  476. package/dist/types/search/inside/solve/vendor/sq12phase/scramble_sq1.d.ts.map +0 -1
  477. package/dist/types/search/vendor/comlink-everywhere/inside/index.d.ts.map +0 -1
  478. package/dist/types/search/vendor/comlink-everywhere/inside/node.d.ts.map +0 -1
  479. package/dist/types/search/vendor/comlink-everywhere/outside/index.d.ts.map +0 -1
  480. package/dist/types/search/vendor/comlink-everywhere/outside/node.d.ts.map +0 -1
  481. package/dist/types/twisty/old/animation/RenderScheduler.d.ts.map +0 -1
  482. package/dist/types/twisty/old/animation/Timeline.d.ts +0 -72
  483. package/dist/types/twisty/old/animation/Timeline.d.ts.map +0 -1
  484. package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts +0 -53
  485. package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts.map +0 -1
  486. package/dist/types/twisty/old/animation/cursor/CursorTypes.d.ts.map +0 -1
  487. package/dist/types/twisty/old/animation/easing.d.ts.map +0 -1
  488. package/dist/types/twisty/old/animation/indexer/AlgDuration.d.ts.map +0 -1
  489. package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +0 -1
  490. package/dist/types/twisty/old/animation/indexer/SimpleAlgIndexer.d.ts.map +0 -1
  491. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
  492. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +0 -1
  493. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
  494. package/dist/types/twisty/old/animation/indexer/tree/AlgWalker.d.ts.map +0 -1
  495. package/dist/types/twisty/old/animation/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
  496. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts +0 -3
  497. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts.map +0 -1
  498. package/dist/types/twisty/old/animation/stream/timeline-move-calculation-draft.d.ts.map +0 -1
  499. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts +0 -3
  500. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts.map +0 -1
  501. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts +0 -52
  502. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts.map +0 -1
  503. package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts +0 -3
  504. package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +0 -1
  505. package/dist/types/twisty/old/dom/TwistyPlayer.d.ts +0 -92
  506. package/dist/types/twisty/old/dom/TwistyPlayer.d.ts.map +0 -1
  507. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts +0 -5
  508. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts.map +0 -1
  509. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts +0 -165
  510. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +0 -1
  511. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts +0 -2
  512. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts.map +0 -1
  513. package/dist/types/twisty/old/dom/controls/TwistyScrubber.css.d.ts +0 -3
  514. package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts +0 -14
  515. package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts.map +0 -1
  516. package/dist/types/twisty/old/dom/controls/buttons.css.d.ts +0 -4
  517. package/dist/types/twisty/old/dom/controls/buttons.css.d.ts.map +0 -1
  518. package/dist/types/twisty/old/dom/controls/buttons.d.ts +0 -40
  519. package/dist/types/twisty/old/dom/controls/buttons.d.ts.map +0 -1
  520. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts +0 -5
  521. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts.map +0 -1
  522. package/dist/types/twisty/old/dom/element/ClassListManager.d.ts.map +0 -1
  523. package/dist/types/twisty/old/dom/element/ElementConfig.d.ts +0 -49
  524. package/dist/types/twisty/old/dom/element/ElementConfig.d.ts.map +0 -1
  525. package/dist/types/twisty/old/dom/element/ManagedCustomElement.d.ts.map +0 -1
  526. package/dist/types/twisty/old/dom/element/node-custom-element-shims.d.ts.map +0 -1
  527. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts +0 -3
  528. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts.map +0 -1
  529. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.d.ts.map +0 -1
  530. package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts +0 -26
  531. package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts.map +0 -1
  532. package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts +0 -3
  533. package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts.map +0 -1
  534. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts +0 -3
  535. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts.map +0 -1
  536. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts +0 -41
  537. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +0 -1
  538. package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts +0 -59
  539. package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts.map +0 -1
  540. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts +0 -4
  541. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts.map +0 -1
  542. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts +0 -3
  543. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts.map +0 -1
  544. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts +0 -18
  545. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts.map +0 -1
  546. package/dist/types/twisty/old/dom/viewers/canvas.d.ts.map +0 -1
  547. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +0 -41
  548. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +0 -1
  549. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts +0 -5
  550. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts.map +0 -1
  551. package/kpuzzle/index.d.ts +0 -1
  552. package/notation/index.d.ts +0 -1
  553. package/protocol/index.d.ts +0 -1
  554. package/puzzle-geometry/index.d.ts +0 -1
  555. package/puzzles/index.d.ts +0 -1
  556. package/scramble/index.d.ts +0 -1
  557. package/search/index.d.ts +0 -1
  558. package/src/cubing/search/inside/solve/puzzles/FTO.sgs +0 -264
  559. package/src/cubing/search/inside/solve/vendor/random-uint-below/get-random-values.ts +0 -38
  560. package/src/cubing/twisty/old/animation/Timeline.ts +0 -378
  561. package/src/cubing/twisty/old/animation/cursor/AlgCursor.ts +0 -252
  562. package/src/cubing/twisty/old/dom/TwistyAlgViewerV1.css.ts +0 -25
  563. package/src/cubing/twisty/old/dom/TwistyAlgViewerV1.ts +0 -516
  564. package/src/cubing/twisty/old/dom/TwistyPlayer.spec.ts +0 -25
  565. package/src/cubing/twisty/old/dom/TwistyPlayer.ts +0 -927
  566. package/src/cubing/twisty/old/dom/TwistyPlayerConfig.ts +0 -378
  567. package/src/cubing/twisty/old/dom/controls/TwistyControlElement.ts +0 -1
  568. package/src/cubing/twisty/old/dom/controls/TwistyScrubber.ts +0 -53
  569. package/src/cubing/twisty/old/dom/controls/buttons.spec.ts +0 -37
  570. package/src/cubing/twisty/old/dom/controls/buttons.ts +0 -326
  571. package/src/cubing/twisty/old/dom/element/ElementConfig.ts +0 -180
  572. package/src/cubing/twisty/old/dom/viewers/Twisty2DSVG.ts +0 -118
  573. package/src/cubing/twisty/old/dom/viewers/Twisty3DCanvas.ts +0 -256
  574. package/src/cubing/twisty/old/dom/viewers/TwistyOrbitControls.ts +0 -420
  575. package/src/cubing/twisty/old/dom/viewers/TwistyViewerElement.ts +0 -5
  576. package/src/cubing/twisty/old/dom/viewers/TwistyViewerWrapper.ts +0 -45
  577. package/src/cubing/twisty/views/.DS_Store +0 -0
  578. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +0 -209
  579. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +0 -270
  580. package/stream/index.d.ts +0 -1
  581. package/twisty/index.d.ts +0 -1
@@ -1,264 +0,0 @@
1
- SubgroupSizes 12 12 11 12 12 11 10 9 11 8 10 9 7 8 10 10 6 9 8 5 7 6 5 4 4 8 7 3 6 6 2 5 3 4 3
2
-
3
- Alg BB
4
- Alg BB'
5
- Alg U
6
- Alg U'
7
- Alg BB BL
8
- Alg BB BL'
9
- Alg BB' BR
10
- Alg BB' BR'
11
- Alg U R'
12
- Alg U' L
13
- Alg BB BL' D
14
-
15
- Alg R
16
- Alg R'
17
- Alg R D
18
- Alg R D'
19
- Alg R BR
20
- Alg R BR'
21
- Alg R' F
22
- Alg R' L
23
- Alg R' L'
24
- Alg BB L BB'
25
- Alg U L' U'
26
-
27
- Alg BB U BB'
28
- Alg BB U' BB'
29
- Alg BB R BB'
30
- Alg BB R' BB'
31
- Alg BB' U' BB
32
- Alg BB' U BB L
33
- Alg BB' U BB L'
34
- Alg BB' U' BB BL'
35
- Alg BB U' BB' BR
36
- Alg BB' R' BB F
37
-
38
- Alg BR
39
- Alg BR'
40
- Alg BR BL
41
- Alg BR BL'
42
- Alg BR' F
43
- Alg BR' F'
44
- Alg BR' D
45
- Alg BB BR BB'
46
- Alg U F U'
47
- Alg BR BL L
48
- Alg BR' D BR'
49
-
50
- Alg BB' BL BB
51
- Alg BB' BL' BB
52
- Alg BR D' BR'
53
- Alg BB' BL BB D'
54
- Alg BB' BL BB BL
55
- Alg BB' BL BB BL'
56
- Alg BB' BL L BB
57
- Alg BB' BL' BB F'
58
- Alg BB' BL' BB L'
59
- Alg BB' BL' BB BL'
60
- Alg BB' BL' L BL' BB
61
-
62
- Alg R' BR R
63
- Alg R' BR' R
64
- Alg BR BL' D BR
65
- Alg R' BR D R
66
- Alg R' BR D' R
67
- Alg R' BR R BL
68
- Alg BB' D' BL D BB
69
- Alg BR BB D' BB' BR'
70
- Alg BR BL' D BR L'
71
- Alg BR BL' D BL BR
72
-
73
- Alg U BR U'
74
- Alg U BR' U'
75
- Alg U' R U
76
- Alg U' R' U
77
- Alg U BR BB' U'
78
- Alg U BR' U' D
79
- Alg U BR' U' D'
80
- Alg U' R F' U
81
- Alg U' R' U L'
82
-
83
- Alg U BB U'
84
- Alg U BB' U'
85
- Alg U BB U' L
86
- Alg U BB U' L'
87
- Alg U BB' U' BL'
88
- Alg U BB U' L F
89
- Alg U BB U' L F'
90
- Alg U BB' U' BL' D'
91
-
92
- Alg BB BL' L BL BB'
93
- Alg BB BL' L' BL BB'
94
- Alg U BB' D BB U'
95
- Alg U BB' D' BB U'
96
- Alg U R D R' U'
97
- Alg U R D' R' U'
98
- Alg R' F L F' R
99
- Alg R' F L' F' R
100
- Alg BB L' BB F' D BB
101
- Alg U BB' D' BB U' D
102
-
103
- Alg F
104
- Alg F'
105
- Alg F D
106
- Alg F D'
107
- Alg F' L
108
- Alg F' L'
109
- Alg F D' BL
110
-
111
- Alg F BL F'
112
- Alg F BL' F'
113
- Alg BR' BL BR
114
- Alg BR' BL' BR
115
- Alg F BR F' BR'
116
- Alg F BL F' BL'
117
- Alg F BL' F' L
118
- Alg F BL' L' F'
119
- Alg F BR' BL BR F'
120
-
121
- Alg F' BL F
122
- Alg F' BL' F
123
- Alg U BL U'
124
- Alg U BL' U'
125
- Alg F U' F' U
126
- Alg F' BL F D'
127
- Alg F' BL F BL'
128
- Alg F' BL D F
129
-
130
- Alg L
131
- Alg L'
132
- Alg L BL
133
- Alg L BL'
134
- Alg F' D F
135
- Alg L BL D
136
-
137
- Alg L' BL L
138
- Alg L' BL' L
139
- Alg L' BL D L
140
- Alg L' BL D' L
141
- Alg L' BL L BL'
142
- Alg L' BL D' L BL
143
- Alg L' BL D' L BL'
144
-
145
- Alg L D L'
146
- Alg L D' L'
147
- Alg R' D R
148
- Alg R' D' R
149
- Alg L D L' D'
150
- Alg L R L' R'
151
- Alg L' BB' L BB
152
- Alg R' D R BL
153
- Alg L BL' L' BL L'
154
-
155
- Alg U L' D L U'
156
- Alg U BB D BB' U'
157
- Alg U L' D' L U'
158
- Alg U BB D' BB' U'
159
- Alg R' D' BL' D R
160
- Alg U BB D' BB' U' D
161
- Alg U BB' L BB L' U'
162
- Alg U BB D BB' U' BL'
163
- Alg U BB D' BB' L' D' L U'
164
-
165
- Alg F L F'
166
- Alg F L' F'
167
- Alg F L F' D
168
- Alg F L F' D'
169
- Alg F L' F' BL'
170
-
171
- Alg L BL' D BL L'
172
- Alg L BL' D' BL L'
173
- Alg F D L D' L' F'
174
- Alg F L D L' D' F'
175
- Alg F L' BB' L BB F'
176
- Alg F' D' R' D R F
177
- Alg F D L D' L' F' BL'
178
- Alg F' R' BB' R' BB R' F
179
-
180
- Alg BB D BB'
181
- Alg BB D' BB'
182
- Alg L' D L
183
- Alg L' D' L
184
- Alg BB D BB' D'
185
- Alg BB' L BB L'
186
- Alg BB D BB' D' BL
187
-
188
- Alg D
189
- Alg D'
190
- Alg D BL
191
- Alg D BL'
192
-
193
- Alg D BL' D BL D'
194
- Alg D BL' D' BL D'
195
- Alg BB D R D' R' BB'
196
- Alg BB R D R' D' BB'
197
- Alg D BL' D BL D' BL
198
- Alg D BL' D BL D' BL'
199
-
200
- Alg D BL D BL' D'
201
- Alg D BL D' BL' D'
202
- Alg BB' BL' BB BR D' BR'
203
- Alg D BL D BL' D' BL
204
- Alg D BL D BL' D' BL'
205
-
206
- Alg D' BL D
207
- Alg D' BL' D
208
- Alg D' BL D BL
209
- Alg D' BL D BL'
210
-
211
- Alg BB D' BB' BL BB D BB'
212
- Alg BB D' BB' BL' BB D BB'
213
- Alg D' BL' D BL D' BL D
214
-
215
- Alg BB R' BB' BL BB R BB'
216
- Alg BB R' BB' BL' BB R BB'
217
- Alg L R L' BL' L R' L'
218
-
219
- Alg F BL' BB' BL F' BL' BB
220
- Alg F' R' F BL F' R F
221
- Alg F' R' F BL' F' R F
222
- Alg BR R BR' BL' BR R' BR'
223
- Alg F L' BL U BL' U' L F'
224
- Alg F' U' F D F' U F D'
225
- Alg F BL F' D F BL' F' BL D'
226
-
227
- Alg F D F U' F' U D' F'
228
- Alg F D F' BL F BL' D' F'
229
- Alg F U D BL' U' BL D' F'
230
- Alg F U' D F U F' D' F'
231
- Alg F' BR L F BR' F' L' F
232
- Alg U R BL' F BL F' R' U'
233
-
234
- Alg BL
235
- Alg BL'
236
-
237
- Alg F U BL U' BL' F'
238
- Alg F BL U BL' U' F'
239
- Alg U BL BR BL' BR' U'
240
- Alg BR F BL F' BL' BR'
241
- Alg F U' F' U BL' U BL U'
242
-
243
- Alg F U' F' D F U F' D'
244
- Alg BB' U' F U BB U' F' U
245
- Alg D F U' F' D' F U F'
246
- Alg BR' U BR D' BR' U' BR D
247
- Alg D' BR BL' F BL' F' BL BR' BL D
248
-
249
- Alg U BR' U' BR BL' BR BL BR'
250
-
251
- Alg F L F' BL D F' D' F BL' L'
252
- Alg F' BR F BR' L BL' BR' BL BR L'
253
- Alg BB BR' U R BR' R' BR U' BB' BR
254
- Alg U BR' U' BR L' BL BR BL' BR' L
255
-
256
- Alg F BL F' BL F BL F' BL
257
- Alg F BL' F' BL' F BL' F' BL'
258
-
259
- Alg F' D BR F' R F R' BR' F D'
260
- Alg BB BL U' L U L' BL' U BB' U'
261
- Alg U BB U' BL L U' L' U BL' BB'
262
-
263
- Alg F BL F' BL' BB F' BR F BR' BB'
264
- Alg BB BR F' BR' BB' F BL F BL' F'
@@ -1,38 +0,0 @@
1
- export type GetRandomValuesFunction = (arr: Uint32Array) => void;
2
-
3
- // This is a workaround for a `node` segfault.
4
- // In theory, imports are cached and safe to import multiple times: https://nodejs.org/api/esm.html#esm_urls
5
- // In practice, a rapid series of inline imports inside a worker causes a segfault(!) in `node`.
6
- // So we cach a single import reference. We avoid populating it until we first need it, so that we don't attempt to perform the import in environments that don't need or have it (e.g. browsers, `deno`).
7
- let cryptoPromise: Promise<typeof import("crypto")> | null = null;
8
-
9
- // We could use top-level await to define this more statically, but that has limited transpilation support.
10
- export async function getRandomValuesFactory(): Promise<GetRandomValuesFunction> {
11
- const hasWebCrypto =
12
- typeof crypto !== "undefined" &&
13
- typeof crypto.getRandomValues !== "undefined";
14
-
15
- if (hasWebCrypto) {
16
- return crypto.getRandomValues.bind(crypto) as GetRandomValuesFunction;
17
- } else {
18
- const nodeCrypto = await (cryptoPromise ??= import("crypto"));
19
- return (arr: Uint32Array) => {
20
- if (!(arr instanceof Uint32Array)) {
21
- throw new Error(
22
- "The getRandomValues() shim only takes unsigned 32-bit int arrays",
23
- );
24
- }
25
- const bytes = nodeCrypto.randomBytes(arr.length * 4);
26
- const uint32_list = [];
27
- for (let i = 0; i < arr.length; i++) {
28
- uint32_list.push(
29
- (bytes[i * 4 + 0] << 24) +
30
- (bytes[i * 4 + 1] << 16) +
31
- (bytes[i * 4 + 2] << 8) +
32
- (bytes[i * 4 + 3] << 0),
33
- );
34
- }
35
- arr.set(uint32_list);
36
- };
37
- }
38
- }
@@ -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
- }