cubing 0.63.3 → 0.63.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/README.md +15 -1
  2. package/alg/index.d.ts +1 -1
  3. package/bluetooth/index.d.ts +1 -1
  4. package/dist/bin/chunks/{chunk-OI3YIXMQ.js → chunk-22VWCGBC.js} +2 -2
  5. package/dist/bin/order.js +8 -4
  6. package/dist/bin/order.js.map +2 -2
  7. package/dist/bin/puzzle-geometry-bin.js +8 -4
  8. package/dist/bin/puzzle-geometry-bin.js.map +2 -2
  9. package/dist/bin/scramble.js +8 -4
  10. package/dist/bin/scramble.js.map +2 -2
  11. package/dist/bin/svg.js +56 -0
  12. package/dist/bin/svg.js.map +7 -0
  13. package/dist/lib/cubing/alg/index.d.ts +2 -84
  14. package/dist/lib/cubing/alg/index.js +1 -1
  15. package/dist/lib/cubing/bluetooth/index.d.ts +147 -134
  16. package/dist/lib/cubing/bluetooth/index.js +29 -5
  17. package/dist/lib/cubing/bluetooth/index.js.map +2 -2
  18. package/dist/lib/cubing/chunks/{big-puzzle-orientation-ZVZQJEF5.js → big-puzzle-orientation-ADWIOX6S.js} +2 -2
  19. package/dist/lib/cubing/chunks/{chunk-RINY3U6G.js → chunk-5ONX3JVC.js} +7 -2
  20. package/dist/lib/cubing/chunks/{chunk-RINY3U6G.js.map → chunk-5ONX3JVC.js.map} +1 -1
  21. package/dist/lib/cubing/chunks/{chunk-ROB5TROI.js → chunk-7LXHWXCO.js} +2 -2
  22. package/dist/lib/cubing/chunks/{chunk-FUHYAW74.js → chunk-A7FK4XKU.js} +49 -63
  23. package/dist/lib/cubing/chunks/chunk-A7FK4XKU.js.map +7 -0
  24. package/dist/lib/cubing/chunks/{chunk-FLK6AZKB.js → chunk-FUAADKXE.js} +7 -7
  25. package/dist/lib/cubing/chunks/{chunk-FLK6AZKB.js.map → chunk-FUAADKXE.js.map} +2 -2
  26. package/dist/lib/cubing/chunks/{chunk-E3YLQC45.js → chunk-GHFBZYSV.js} +2 -2
  27. package/dist/lib/cubing/chunks/chunk-GHFBZYSV.js.map +7 -0
  28. package/dist/lib/cubing/chunks/{chunk-FTE3QI5X.js → chunk-H5KMIDAF.js} +42 -47
  29. package/dist/lib/cubing/chunks/chunk-H5KMIDAF.js.map +7 -0
  30. package/dist/lib/cubing/chunks/{chunk-NGW52SHR.js → chunk-MQSQDKWH.js} +3 -3
  31. package/dist/lib/cubing/chunks/{chunk-O6HEZXGY.js → chunk-N5FJ5YIA.js} +4 -3
  32. package/dist/lib/cubing/chunks/{chunk-O6HEZXGY.js.map → chunk-N5FJ5YIA.js.map} +1 -1
  33. package/dist/lib/cubing/chunks/{chunk-ZU7PSGX4.js → chunk-UEUJSZTX.js} +4 -3
  34. package/dist/lib/cubing/chunks/{chunk-ZU7PSGX4.js.map → chunk-UEUJSZTX.js.map} +1 -1
  35. package/dist/lib/cubing/chunks/{chunk-44CFF24P.js → chunk-WMKAKGVZ.js} +46 -17
  36. package/dist/lib/cubing/chunks/chunk-WMKAKGVZ.js.map +7 -0
  37. package/dist/lib/cubing/chunks/{chunk-DQGYYYHZ.js → chunk-YR72E7KZ.js} +28 -13
  38. package/dist/lib/cubing/chunks/chunk-YR72E7KZ.js.map +7 -0
  39. package/dist/lib/cubing/chunks/{inside-L2JI2BEY.js → inside-LSPIPZY2.js} +53 -25
  40. package/dist/lib/cubing/chunks/inside-LSPIPZY2.js.map +7 -0
  41. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js +132 -0
  42. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js.map +7 -0
  43. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-XFECDWOF.js → search-dynamic-sgs-side-events-WORUZVF5.js} +6 -5
  44. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-CM33KT7L.js → search-dynamic-sgs-unofficial-5JQKPNG2.js} +6 -5
  45. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-NANDMURR.js → search-dynamic-solve-4x4x4-KIH4YATU.js} +7 -6
  46. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-UZMNOI6U.js → search-dynamic-solve-fto-I5ID5LXD.js} +2 -2
  47. package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-Y2D3C74Y.js +771 -0
  48. package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-Y2D3C74Y.js.map +7 -0
  49. package/dist/lib/cubing/chunks/search-worker-entry.js +7 -6
  50. package/dist/lib/cubing/chunks/search-worker-entry.js.map +2 -2
  51. package/dist/lib/cubing/chunks/{twips-YHXBF55O.js → twips-ZNMKGC5U.js} +4 -4
  52. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-AP2O4LGG.js +10 -0
  53. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-AP2O4LGG.js.map +7 -0
  54. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VGZIQ64W.js → twisty-dynamic-3d-4BEQ76PB.js} +22 -7
  55. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VGZIQ64W.js.map → twisty-dynamic-3d-4BEQ76PB.js.map} +2 -2
  56. package/dist/lib/cubing/index-BXHm_6gm.d.ts +2626 -0
  57. package/dist/lib/cubing/index-Cvk652Bd.d.ts +76 -0
  58. package/dist/lib/cubing/kpuzzle/index.d.ts +2 -3
  59. package/dist/lib/cubing/kpuzzle/index.js +2 -2
  60. package/dist/lib/cubing/notation/index.d.ts +18 -17
  61. package/dist/lib/cubing/notation/index.js +4 -4
  62. package/dist/lib/cubing/outside-C2ODxIX_.d.ts +39 -0
  63. package/dist/lib/cubing/protocol/index.d.ts +14 -14
  64. package/dist/lib/cubing/protocol/index.js +4 -4
  65. package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -8
  66. package/dist/lib/cubing/puzzle-geometry/index.js +33 -1
  67. package/dist/lib/cubing/puzzle-geometry/index.js.map +1 -1
  68. package/dist/lib/cubing/puzzles/index.d.ts +2 -45
  69. package/dist/lib/cubing/puzzles/index.js +4 -4
  70. package/dist/lib/cubing/scramble/index.d.ts +2 -4
  71. package/dist/lib/cubing/scramble/index.js +6 -6
  72. package/dist/lib/cubing/search/index.d.ts +4 -9
  73. package/dist/lib/cubing/search/index.js +6 -6
  74. package/dist/lib/cubing/stream/index.d.ts +2 -45
  75. package/dist/lib/cubing/stream/index.js +1 -1
  76. package/dist/lib/cubing/twisty/index.d.ts +2 -60
  77. package/dist/lib/cubing/twisty/index.js +66 -18
  78. package/dist/lib/cubing/twisty/index.js.map +2 -2
  79. package/experimental-json-schema/kpuzzle/KPatternData.schema.json +27 -29
  80. package/experimental-json-schema/kpuzzle/KPuzzleDefinition.schema.json +82 -78
  81. package/experimental-json-schema/kpuzzle/KTransformationData.schema.json +21 -22
  82. package/kpuzzle/index.d.ts +1 -1
  83. package/notation/index.d.ts +1 -1
  84. package/package.json +25 -21
  85. package/protocol/index.d.ts +1 -1
  86. package/puzzle-geometry/index.d.ts +1 -1
  87. package/puzzles/index.d.ts +1 -1
  88. package/scramble/index.d.ts +1 -1
  89. package/search/index.d.ts +1 -1
  90. package/stream/index.d.ts +1 -1
  91. package/twisty/index.d.ts +1 -1
  92. package/dist/lib/cubing/PuzzleLoader-Bp8zngUn.d.ts +0 -2362
  93. package/dist/lib/cubing/chunks/chunk-44CFF24P.js.map +0 -7
  94. package/dist/lib/cubing/chunks/chunk-DQGYYYHZ.js.map +0 -7
  95. package/dist/lib/cubing/chunks/chunk-E3YLQC45.js.map +0 -7
  96. package/dist/lib/cubing/chunks/chunk-FTE3QI5X.js.map +0 -7
  97. package/dist/lib/cubing/chunks/chunk-FUHYAW74.js.map +0 -7
  98. package/dist/lib/cubing/chunks/chunk-FZBKZ5ZB.js +0 -265
  99. package/dist/lib/cubing/chunks/chunk-LWCBAAHO.js +0 -1180
  100. package/dist/lib/cubing/chunks/chunk-LWCBAAHO.js.map +0 -7
  101. package/dist/lib/cubing/chunks/chunk-M7YKTETT.js +0 -239
  102. package/dist/lib/cubing/chunks/chunk-M7YKTETT.js.map +0 -7
  103. package/dist/lib/cubing/chunks/chunk-NGW52SHR.js.map +0 -7
  104. package/dist/lib/cubing/chunks/chunk-OUM32GEA.js +0 -239
  105. package/dist/lib/cubing/chunks/chunk-OUM32GEA.js.map +0 -7
  106. package/dist/lib/cubing/chunks/chunk-SGJ5WPE4.js +0 -1074
  107. package/dist/lib/cubing/chunks/chunk-SGJ5WPE4.js.map +0 -7
  108. package/dist/lib/cubing/chunks/chunk-TAVR35KU.js +0 -265
  109. package/dist/lib/cubing/chunks/chunk-TAVR35KU.js.map +0 -7
  110. package/dist/lib/cubing/chunks/chunk-V27EM5TJ.js +0 -1074
  111. package/dist/lib/cubing/chunks/chunk-V27EM5TJ.js.map +0 -7
  112. package/dist/lib/cubing/chunks/chunk-VRTKWZPL.js +0 -10084
  113. package/dist/lib/cubing/chunks/chunk-VRTKWZPL.js.map +0 -7
  114. package/dist/lib/cubing/chunks/chunk-VSMFYTG6.js +0 -10086
  115. package/dist/lib/cubing/chunks/chunk-VSMFYTG6.js.map +0 -7
  116. package/dist/lib/cubing/chunks/inside-IHWQVDVU.js +0 -564
  117. package/dist/lib/cubing/chunks/inside-IHWQVDVU.js.map +0 -7
  118. package/dist/lib/cubing/chunks/inside-L2JI2BEY.js.map +0 -7
  119. package/dist/lib/cubing/chunks/inside-Q56GLXG4.js +0 -556
  120. package/dist/lib/cubing/chunks/inside-Q56GLXG4.js.map +0 -7
  121. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js +0 -124
  122. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js.map +0 -7
  123. package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-GB4WAJ7I.js +0 -1891
  124. package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-MXHP7O4R.js +0 -1890
  125. package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-MXHP7O4R.js.map +0 -7
  126. package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-XFECDWOF.js.map +0 -7
  127. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-2CECFBP3.js +0 -1268
  128. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-CM33KT7L.js.map +0 -7
  129. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-Q4LLHL2O.js +0 -1267
  130. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-Q4LLHL2O.js.map +0 -7
  131. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-COSEVJBV.js +0 -2922
  132. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-COSEVJBV.js.map +0 -7
  133. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-E576AITS.js +0 -2923
  134. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-NANDMURR.js.map +0 -7
  135. package/dist/lib/cubing/chunks/twips_wasm_bg-RWVQBVBA-5YCKA6O5.js +0 -10
  136. package/dist/lib/cubing/chunks/twips_wasm_bg-RWVQBVBA-5YCKA6O5.js.map +0 -7
  137. package/dist/lib/cubing/chunks/twisty-dynamic-3d-5NZRNZ7C.js +0 -1881
  138. package/dist/lib/cubing/chunks/twisty-dynamic-3d-5NZRNZ7C.js.map +0 -7
  139. package/dist/lib/cubing/chunks/twisty-dynamic-3d-IKE4BUQG.js +0 -1883
  140. package/dist/lib/cubing/chunks/twisty-dynamic-3d-IKE4BUQG.js.map +0 -7
  141. package/dist/lib/cubing/chunks/twisty-dynamic-3d-XLUOPCLN.js +0 -1881
  142. package/dist/lib/cubing/chunks/twisty-dynamic-3d-XLUOPCLN.js.map +0 -7
  143. package/dist/lib/cubing/events-CewDA1aS.d.ts +0 -35
  144. package/dist/lib/cubing/index-DabjED-w.d.ts +0 -33
  145. /package/dist/bin/chunks/{chunk-OI3YIXMQ.js.map → chunk-22VWCGBC.js.map} +0 -0
  146. /package/dist/lib/cubing/chunks/{big-puzzle-orientation-ZVZQJEF5.js.map → big-puzzle-orientation-ADWIOX6S.js.map} +0 -0
  147. /package/dist/lib/cubing/chunks/{chunk-ROB5TROI.js.map → chunk-7LXHWXCO.js.map} +0 -0
  148. /package/dist/lib/cubing/chunks/{chunk-FZBKZ5ZB.js.map → chunk-MQSQDKWH.js.map} +0 -0
  149. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-GB4WAJ7I.js.map → search-dynamic-sgs-side-events-WORUZVF5.js.map} +0 -0
  150. /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-2CECFBP3.js.map → search-dynamic-sgs-unofficial-5JQKPNG2.js.map} +0 -0
  151. /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-E576AITS.js.map → search-dynamic-solve-4x4x4-KIH4YATU.js.map} +0 -0
  152. /package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-UZMNOI6U.js.map → search-dynamic-solve-fto-I5ID5LXD.js.map} +0 -0
  153. /package/dist/lib/cubing/chunks/{twips-YHXBF55O.js.map → twips-ZNMKGC5U.js.map} +0 -0
@@ -1,34 +1,32 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "additionalProperties": {
4
- "$ref": "#/definitions/KPatternOrbitData"
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "propertyNames": {
5
+ "type": "string"
5
6
  },
6
- "definitions": {
7
- "KPatternOrbitData": {
8
- "properties": {
9
- "orientation": {
10
- "items": {
11
- "type": "number"
12
- },
13
- "type": "array"
14
- },
15
- "orientationMod": {
16
- "description": "Each piece may have an \"orientation mod\" that means \"the orientation of\nthis piece is known mod [value]\".\n\nSuppose `.numOrientations` for this orbit has a value of N. This is\nconsidered the default value for the orientation mod of each piece in the\norbit.\n\n- Each entry must be one of the following:\n - A proper divisor of N.\n - For example: if N is 12, then one of: 1, 2, 3, 6\n - The special value 0, indicating the default value (N).\n - This indicates that the orientation of a piece is fully known, i.e.\n that its \"orientation mod\" is the default value (N). However, such a\n value is recorded as 0 instead of N, in order to make it simpler to\n implement and debug pattern logic involving the default value.\n- If `.orientationMod[i]` is a proper divisor of N (i.e. not 0), then\n `.orientation[i]` must be less than `.orientationMod[i]`. That is, the\n orientation values must be individually \"normalized\" for each piece.\n- If the `orientationMod` field is not present, then every piece is\n considered to have the default value for its \"orientation mod\".\n\nFor a \"real-world\" example of this concept, consider a traditional analog\n12-hour clock dial, like one that might hang on the wall in a school room.\nAlthough there are 24 hours in a day, A.M. and P.M. times are not\ndistinguishable on such a clock. Since 3:00 (AM) and 15:00 are not\ndistinguishable, we would read either of those times as 3:00 with an\nimplicit \"orientation mod\" of 12.\n\nFor most puzzles, however, we care about \"visual\" indistinguishability\nrather than \"temporal\" indistinguishability. To adapt the previous example,\nimagine a 24-hour clock with 24 hour marks around the dial, but where the\nhour hand is symmetric and points equally at the current hour as well as\nits diametic opposite (like a compass needle but painted all in one color).\nThis has the same set of \"valid patterns\" as a normal 12-hour clock. Such a\nclock also has an \"orientation mod\" of 12, but where the multiples of the\nmodulus have been \"unfolded\" to show their full symmetry instead of being\nimplicit.\n\nFor a non-trivial puzzle example, consider Eitan's FisherTwist, a shape mod\nof the 3x3x3 cube:\nhttps://www.hknowstore.com/locale/en-US/item.aspx?corpname=nowstore&itemid=97eb4e89-367e-4d02-b7f0-34e5e7f3cd12\n\n- The 4 equatorial centers have C₂ symmetry — it is possible to rotate any\n of these centers 180° without a visible change to the state. This means\n that the possible orientations \"loop\" after incrementing the orientation\n by 2 (two turns clockwise), and therefore the \"orientation mod\" of a\n given piece is only 2.\n - If we apply a counter-clockwise rotation to one of these centers, the\n transformation applies an orientation of 3. But the net orientation is\n recorded as a normalized value of 1 instead, because 3 (mod 2) ≡ 1 (mod\n 2).\n- The 2 polar centers (U and D) have no distinguishable rotations. This\n means that their orientation is \"known mod 1\" — any transformation of one\n of these centers is indistinguishable from another transformation of the\n same center, and all of them are mapped to a value of 0 (the only\n possible value that exists mod 1).\n\nFor 3x3x3:\n\n- When solving a normal 3x3x3, center orientations are conventionally\n ignored. This is similar to the polar center case for Eitan's\n FisherTwist, and the \"orientation mod\" of each piece is 1. This is also\n the core motivating use case.\n- For a supercube\n (https://experiments.cubing.net/cubing.js/twisty/supercube.html) or the\n general case of a \"picture cube\", all four center orientations are\n distinguishable for every center. This means all centers have the default\n orientation mod of 4. As documented above, this can be recorded with a\n `.orientationMod` of `[0, 0, 0, 0, 0, 0]`, or equivalently by omitting\n the `.orientationMod` field.\n- When modeling a real 3x3x3 speedcube, it is common to have a logo on a\n single sticker. If you want to model the exact visually distinguishable\n states of such a puzzles, it is possible to use an `.orientationMod` such\n as `[0, 1, 1, 1, 1, 1]`. For example, this can make it easy to find an\n alg for a given case \"while keeping the logo the same\", without placing\n more restrictions on other centers (which could make the search slower or\n produce longer solutions).\n\nFor those with a mathematical background, you may notice a relationship to\nthe concept of a coset (https://en.wikipedia.org/wiki/Coset). For example,\nconsider the group of patterns of a `KPuzzle` (without indistinguishable\npieces) generated by a set of transformations. We can assign each set of\npiece orbits an orientation mod value (which must be identical for all\nconstituent pieces of the same orbit). Each such choice generates a set of\nvalid `KPattern`s that forms a subgroup, and each set of valid `.orientation`\nvalues defines one coset of this set. However, note that the set of valid\n`KPattern`s does *not* form a group when there are any pieces with different\n`.orientationMod` values that share an orbit.\n\n--------\n\nNote that the concept of \"orientation mod\" exclusively applies to `KPattern`,\nnot `KTransformation`. If we tried to apply the orientation mod\ncalculations to the *transformations* of Eitan's FisherTwist, then `SWAP =\n[U, M' E2 M]` would be indistinguishable from the identity. This would mean\nthat if we calculated `SWAP` and then used this calculation for `S SWAP\nS'`, then we would conclude that it has no net effect. However, `S SWAP S'`\ndoes *not* have the same effect as doing nothing — it visibly rotates the L\nand R centers! (In mathematical terms: the set of `KTransformation`s would\nnot form a valid set of semigroup actions, due to broken associativity.)\n\nAlthough there are times that we could theoretically save some time/space\nby ignoring some information when it's not needed for working with certain\n`KTransformation`s (e.g. ignoring all center orientations for 3x3x3), it is\nmore practical for each `KTransformation` to always track the full range\nfor each piece's `.orientation`. For example:\n\n- This is simpler, both conceptually and in code.\n- This allows changing the set of moves for a puzzle, without recalculating\n cached transformations or certain lookup tables (useful for alg\n searches).\n- This allows swapping out a normal 3x3x3 in a `<twisty-player>` for a\n picture cube, without re-calculating the center orientations of the\n current alg.\n\nThese use cases may not be strictly \"necessary\", but the opposite behaviour\nmight be surprising or frustrating if someone does not expect it. So we\nimplement it this way.\n\nInformally, the `KTransformation` has the full responsibility for tracking\n\"what really happens\" — even if the effect is invisible in some cases,\nwhile the `KPattern` tracks both what \"is\" and what \"isn't\" known.",
17
- "items": {
18
- "type": "number"
19
- },
20
- "type": "array"
21
- },
22
- "pieces": {
23
- "items": {
24
- "type": "number"
25
- },
26
- "type": "array"
7
+ "additionalProperties": {
8
+ "type": "object",
9
+ "properties": {
10
+ "pieces": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "number"
27
14
  }
28
15
  },
29
- "required": ["orientation", "pieces"],
30
- "type": "object"
31
- }
32
- },
33
- "type": "object"
16
+ "orientation": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "number"
20
+ }
21
+ },
22
+ "orientationMod": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "number"
26
+ }
27
+ }
28
+ },
29
+ "required": ["pieces", "orientation"],
30
+ "additionalProperties": false
31
+ }
34
32
  }
@@ -1,97 +1,101 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "definitions": {
4
- "KPatternOrbitData": {
5
- "properties": {
6
- "orientation": {
7
- "items": {
8
- "type": "number"
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string"
7
+ },
8
+ "orbits": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "orbitName": {
14
+ "type": "string"
9
15
  },
10
- "type": "array"
11
- },
12
- "orientationMod": {
13
- "description": "Each piece may have an \"orientation mod\" that means \"the orientation of\nthis piece is known mod [value]\".\n\nSuppose `.numOrientations` for this orbit has a value of N. This is\nconsidered the default value for the orientation mod of each piece in the\norbit.\n\n- Each entry must be one of the following:\n - A proper divisor of N.\n - For example: if N is 12, then one of: 1, 2, 3, 6\n - The special value 0, indicating the default value (N).\n - This indicates that the orientation of a piece is fully known, i.e.\n that its \"orientation mod\" is the default value (N). However, such a\n value is recorded as 0 instead of N, in order to make it simpler to\n implement and debug pattern logic involving the default value.\n- If `.orientationMod[i]` is a proper divisor of N (i.e. not 0), then\n `.orientation[i]` must be less than `.orientationMod[i]`. That is, the\n orientation values must be individually \"normalized\" for each piece.\n- If the `orientationMod` field is not present, then every piece is\n considered to have the default value for its \"orientation mod\".\n\nFor a \"real-world\" example of this concept, consider a traditional analog\n12-hour clock dial, like one that might hang on the wall in a school room.\nAlthough there are 24 hours in a day, A.M. and P.M. times are not\ndistinguishable on such a clock. Since 3:00 (AM) and 15:00 are not\ndistinguishable, we would read either of those times as 3:00 with an\nimplicit \"orientation mod\" of 12.\n\nFor most puzzles, however, we care about \"visual\" indistinguishability\nrather than \"temporal\" indistinguishability. To adapt the previous example,\nimagine a 24-hour clock with 24 hour marks around the dial, but where the\nhour hand is symmetric and points equally at the current hour as well as\nits diametic opposite (like a compass needle but painted all in one color).\nThis has the same set of \"valid patterns\" as a normal 12-hour clock. Such a\nclock also has an \"orientation mod\" of 12, but where the multiples of the\nmodulus have been \"unfolded\" to show their full symmetry instead of being\nimplicit.\n\nFor a non-trivial puzzle example, consider Eitan's FisherTwist, a shape mod\nof the 3x3x3 cube:\nhttps://www.hknowstore.com/locale/en-US/item.aspx?corpname=nowstore&itemid=97eb4e89-367e-4d02-b7f0-34e5e7f3cd12\n\n- The 4 equatorial centers have C₂ symmetry — it is possible to rotate any\n of these centers 180° without a visible change to the state. This means\n that the possible orientations \"loop\" after incrementing the orientation\n by 2 (two turns clockwise), and therefore the \"orientation mod\" of a\n given piece is only 2.\n - If we apply a counter-clockwise rotation to one of these centers, the\n transformation applies an orientation of 3. But the net orientation is\n recorded as a normalized value of 1 instead, because 3 (mod 2) ≡ 1 (mod\n 2).\n- The 2 polar centers (U and D) have no distinguishable rotations. This\n means that their orientation is \"known mod 1\" — any transformation of one\n of these centers is indistinguishable from another transformation of the\n same center, and all of them are mapped to a value of 0 (the only\n possible value that exists mod 1).\n\nFor 3x3x3:\n\n- When solving a normal 3x3x3, center orientations are conventionally\n ignored. This is similar to the polar center case for Eitan's\n FisherTwist, and the \"orientation mod\" of each piece is 1. This is also\n the core motivating use case.\n- For a supercube\n (https://experiments.cubing.net/cubing.js/twisty/supercube.html) or the\n general case of a \"picture cube\", all four center orientations are\n distinguishable for every center. This means all centers have the default\n orientation mod of 4. As documented above, this can be recorded with a\n `.orientationMod` of `[0, 0, 0, 0, 0, 0]`, or equivalently by omitting\n the `.orientationMod` field.\n- When modeling a real 3x3x3 speedcube, it is common to have a logo on a\n single sticker. If you want to model the exact visually distinguishable\n states of such a puzzles, it is possible to use an `.orientationMod` such\n as `[0, 1, 1, 1, 1, 1]`. For example, this can make it easy to find an\n alg for a given case \"while keeping the logo the same\", without placing\n more restrictions on other centers (which could make the search slower or\n produce longer solutions).\n\nFor those with a mathematical background, you may notice a relationship to\nthe concept of a coset (https://en.wikipedia.org/wiki/Coset). For example,\nconsider the group of patterns of a `KPuzzle` (without indistinguishable\npieces) generated by a set of transformations. We can assign each set of\npiece orbits an orientation mod value (which must be identical for all\nconstituent pieces of the same orbit). Each such choice generates a set of\nvalid `KPattern`s that forms a subgroup, and each set of valid `.orientation`\nvalues defines one coset of this set. However, note that the set of valid\n`KPattern`s does *not* form a group when there are any pieces with different\n`.orientationMod` values that share an orbit.\n\n--------\n\nNote that the concept of \"orientation mod\" exclusively applies to `KPattern`,\nnot `KTransformation`. If we tried to apply the orientation mod\ncalculations to the *transformations* of Eitan's FisherTwist, then `SWAP =\n[U, M' E2 M]` would be indistinguishable from the identity. This would mean\nthat if we calculated `SWAP` and then used this calculation for `S SWAP\nS'`, then we would conclude that it has no net effect. However, `S SWAP S'`\ndoes *not* have the same effect as doing nothing — it visibly rotates the L\nand R centers! (In mathematical terms: the set of `KTransformation`s would\nnot form a valid set of semigroup actions, due to broken associativity.)\n\nAlthough there are times that we could theoretically save some time/space\nby ignoring some information when it's not needed for working with certain\n`KTransformation`s (e.g. ignoring all center orientations for 3x3x3), it is\nmore practical for each `KTransformation` to always track the full range\nfor each piece's `.orientation`. For example:\n\n- This is simpler, both conceptually and in code.\n- This allows changing the set of moves for a puzzle, without recalculating\n cached transformations or certain lookup tables (useful for alg\n searches).\n- This allows swapping out a normal 3x3x3 in a `<twisty-player>` for a\n picture cube, without re-calculating the center orientations of the\n current alg.\n\nThese use cases may not be strictly \"necessary\", but the opposite behaviour\nmight be surprising or frustrating if someone does not expect it. So we\nimplement it this way.\n\nInformally, the `KTransformation` has the full responsibility for tracking\n\"what really happens\" — even if the effect is invisible in some cases,\nwhile the `KPattern` tracks both what \"is\" and what \"isn't\" known.",
14
- "items": {
16
+ "numPieces": {
15
17
  "type": "number"
16
18
  },
17
- "type": "array"
18
- },
19
- "pieces": {
20
- "items": {
19
+ "numOrientations": {
21
20
  "type": "number"
22
- },
23
- "type": "array"
24
- }
25
- },
26
- "required": ["orientation", "pieces"],
27
- "type": "object"
28
- },
29
- "KPuzzleOrbitDefinition": {
30
- "properties": {
31
- "numOrientations": {
32
- "type": "number"
33
- },
34
- "numPieces": {
35
- "type": "number"
21
+ }
36
22
  },
37
- "orbitName": {
38
- "type": "string"
39
- }
40
- },
41
- "required": ["numOrientations", "numPieces", "orbitName"],
42
- "type": "object"
23
+ "required": ["orbitName", "numPieces", "numOrientations"],
24
+ "additionalProperties": false
25
+ }
43
26
  },
44
- "KTransformationOrbitData": {
45
- "properties": {
46
- "orientationDelta": {
47
- "items": {
48
- "type": "number"
49
- },
50
- "type": "array"
51
- },
52
- "permutation": {
53
- "items": {
54
- "type": "number"
55
- },
56
- "type": "array"
57
- }
58
- },
59
- "required": ["orientationDelta", "permutation"],
60
- "type": "object"
61
- }
62
- },
63
- "properties": {
64
27
  "defaultPattern": {
65
- "additionalProperties": {
66
- "$ref": "#/definitions/KPatternOrbitData"
67
- },
68
- "type": "object"
69
- },
70
- "derivedMoves": {
71
- "additionalProperties": {
28
+ "type": "object",
29
+ "propertyNames": {
72
30
  "type": "string"
73
31
  },
74
- "type": "object"
32
+ "additionalProperties": {
33
+ "type": "object",
34
+ "properties": {
35
+ "pieces": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "number"
39
+ }
40
+ },
41
+ "orientation": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "number"
45
+ }
46
+ },
47
+ "orientationMod": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "number"
51
+ }
52
+ }
53
+ },
54
+ "required": ["pieces", "orientation"],
55
+ "additionalProperties": false
56
+ }
75
57
  },
76
58
  "moves": {
59
+ "type": "object",
60
+ "propertyNames": {
61
+ "type": "string"
62
+ },
77
63
  "additionalProperties": {
78
- "additionalProperties": {
79
- "$ref": "#/definitions/KTransformationOrbitData"
64
+ "type": "object",
65
+ "propertyNames": {
66
+ "type": "string"
80
67
  },
81
- "type": "object"
82
- },
83
- "type": "object"
84
- },
85
- "name": {
86
- "type": "string"
68
+ "additionalProperties": {
69
+ "type": "object",
70
+ "properties": {
71
+ "permutation": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "number"
75
+ }
76
+ },
77
+ "orientationDelta": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "number"
81
+ }
82
+ }
83
+ },
84
+ "required": ["permutation", "orientationDelta"],
85
+ "additionalProperties": false
86
+ }
87
+ }
87
88
  },
88
- "orbits": {
89
- "items": {
90
- "$ref": "#/definitions/KPuzzleOrbitDefinition"
89
+ "derivedMoves": {
90
+ "type": "object",
91
+ "propertyNames": {
92
+ "type": "string"
91
93
  },
92
- "type": "array"
94
+ "additionalProperties": {
95
+ "type": "string"
96
+ }
93
97
  }
94
98
  },
95
- "required": ["defaultPattern", "moves", "name", "orbits"],
96
- "type": "object"
99
+ "required": ["name", "orbits", "defaultPattern", "moves"],
100
+ "additionalProperties": false
97
101
  }
@@ -1,27 +1,26 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "additionalProperties": {
4
- "$ref": "#/definitions/KTransformationOrbitData"
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "propertyNames": {
5
+ "type": "string"
5
6
  },
6
- "definitions": {
7
- "KTransformationOrbitData": {
8
- "properties": {
9
- "orientationDelta": {
10
- "items": {
11
- "type": "number"
12
- },
13
- "type": "array"
14
- },
15
- "permutation": {
16
- "items": {
17
- "type": "number"
18
- },
19
- "type": "array"
7
+ "additionalProperties": {
8
+ "type": "object",
9
+ "properties": {
10
+ "permutation": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "number"
20
14
  }
21
15
  },
22
- "required": ["orientationDelta", "permutation"],
23
- "type": "object"
24
- }
25
- },
26
- "type": "object"
16
+ "orientationDelta": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "number"
20
+ }
21
+ }
22
+ },
23
+ "required": ["permutation", "orientationDelta"],
24
+ "additionalProperties": false
25
+ }
27
26
  }
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/kpuzzle/index.d.ts";
1
+ export type * from "../dist/lib/cubing/kpuzzle/index.d.ts";
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/notation/index.d.ts";
1
+ export type * from "../dist/lib/cubing/notation/index.d.ts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cubing",
3
- "version": "0.63.3",
3
+ "version": "0.63.5",
4
4
  "description": "A collection of JavaScript cubing libraries.",
5
5
  "author": "The js.cubing.net team",
6
6
  "license": "MPL-2.0 OR GPL-3.0-or-later",
@@ -64,44 +64,45 @@
64
64
  "scramble": "dist/bin/scramble.js"
65
65
  },
66
66
  "dependencies": {
67
- "@optique/core": ">=0.9.1",
68
- "@optique/run": ">=0.9.1",
67
+ "@cubing/lazy-promise": "0.1.1",
68
+ "@optique/core": "^1.0.1",
69
+ "@optique/run": "^1.0.1",
69
70
  "@types/three": "^0.169.0",
70
- "@types/web-bluetooth": "^0.0.20",
71
+ "@types/web-bluetooth": ">=0.0.20",
71
72
  "random-uint-below": "v3.3.0",
72
73
  "three": "^0.170.0",
73
74
  "type-fest": "^5.2.0"
74
75
  },
75
76
  "devDependencies": {
76
- "@biomejs/biome": "^2.3.11",
77
- "@cubing/deploy": ">=0.4.10",
78
- "@cubing/dev-config": ">=0.9.2",
77
+ "@biomejs/biome": "^2.5.13",
78
+ "@cubing/comlink-everywhere": ">=0.1.2",
79
+ "@cubing/deploy": ">=0.4.11",
80
+ "@cubing/dev-config": ">=0.10.1",
79
81
  "@esm-bundle/chai": "^4.3.4-fix.0",
82
+ "@fontsource/ubuntu": "^5.3.0",
80
83
  "@schemastore/package": "^0.0.10",
81
- "@types/bun": "^1.3.5",
84
+ "@types/bun": "^1.3.14",
82
85
  "@types/chai": "^5.0.0",
83
- "@types/dom-speech-recognition": "^0.0.4",
86
+ "@types/dom-speech-recognition": "^0.0.8",
84
87
  "@types/mocha": "^10.0.8",
85
88
  "@types/node": "^25.0.3",
86
- "@web/dev-server-esbuild": "^1.0.2",
89
+ "@typescript/native-preview": "^7.0.0-dev.20260512.1",
90
+ "@web/dev-server-esbuild": "^2.0.0",
87
91
  "@web/test-runner": "^0.19.0",
88
92
  "@web/test-runner-playwright": "^0.11.0",
89
93
  "barely-a-dev-server": ">=0.8.3",
94
+ "bun-dedupe": "^0.0.5",
90
95
  "bun-dx": ">=0.1.3",
91
96
  "chai": "^5.1.1",
92
- "esbuild": "^0.25.0",
97
+ "esbuild": ">=0.28.1",
93
98
  "jszip": "^3.10.1",
94
99
  "mocha": "^10.7.3",
95
- "path-class": ">=0.11.0",
100
+ "path-class": ">=0.15.1",
96
101
  "playwright": "^1.58.0",
97
- "printable-shell-command": "^4.0.3",
98
- "tsup": "^8.3.0",
99
- "typedoc": "^0.28.10",
100
- "typescript": "5.9.3",
101
- "typescript-json-schema": "^0.67.1"
102
- },
103
- "overrides": {
104
- "typescript": "5.9.3"
102
+ "printable-shell-command": "^5.3.0",
103
+ "tsdown": "^0.21.10",
104
+ "typedoc": "^0.28.18",
105
+ "zod": "^4.6.2"
105
106
  },
106
107
  "files": [
107
108
  "./dist/bin/",
@@ -136,5 +137,8 @@
136
137
  "fromLocalDir": "./dist/sites/experiments.cubing.net/cubing.js/"
137
138
  }
138
139
  },
139
- "$schema": "./node_modules/@cubing/deploy/config-schema.package.json"
140
+ "$schema": "./node_modules/@cubing/deploy/config-schema.package.json",
141
+ "patchedDependencies": {
142
+ "bun-types@1.3.14": "patches/bun-types@1.3.14.patch"
143
+ }
140
144
  }
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/protocol/index.d.ts";
1
+ export type * from "../dist/lib/cubing/protocol/index.d.ts";
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/puzzle-geometry/index.d.ts";
1
+ export type * from "../dist/lib/cubing/puzzle-geometry/index.d.ts";
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/puzzles/index.d.ts";
1
+ export type * from "../dist/lib/cubing/puzzles/index.d.ts";
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/scramble/index.d.ts";
1
+ export type * from "../dist/lib/cubing/scramble/index.d.ts";
package/search/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/search/index.d.ts";
1
+ export type * from "../dist/lib/cubing/search/index.d.ts";
package/stream/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/stream/index.d.ts";
1
+ export type * from "../dist/lib/cubing/stream/index.d.ts";
package/twisty/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "../dist/lib/cubing/twisty/index.d.ts";
1
+ export type * from "../dist/lib/cubing/twisty/index.d.ts";