@classytic/stage 0.2.0 → 0.4.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 (458) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -1
  3. package/dist/_virtual/_rolldown/runtime.mjs +18 -0
  4. package/dist/assets/index.mjs +0 -1
  5. package/dist/atomic/aufbau.d.mts +144 -0
  6. package/dist/atomic/aufbau.mjs +384 -0
  7. package/dist/atomic/elements.d.mts +67 -0
  8. package/dist/atomic/elements.mjs +785 -0
  9. package/dist/atomic/emission.d.mts +112 -0
  10. package/dist/atomic/emission.mjs +179 -0
  11. package/dist/atomic/index.d.mts +8 -0
  12. package/dist/atomic/index.mjs +9 -0
  13. package/dist/atomic/periodic.d.mts +82 -0
  14. package/dist/atomic/periodic.mjs +231 -0
  15. package/dist/atomic/properties.d.mts +100 -0
  16. package/dist/atomic/properties.mjs +574 -0
  17. package/dist/atomic/shells.d.mts +137 -0
  18. package/dist/atomic/shells.mjs +170 -0
  19. package/dist/atomic/trends.d.mts +148 -0
  20. package/dist/atomic/trends.mjs +225 -0
  21. package/dist/builder/Palette.mjs +50 -89
  22. package/dist/builder/SceneBuilder.mjs +15 -73
  23. package/dist/chem/chromatography.d.mts +66 -0
  24. package/dist/chem/chromatography.mjs +63 -0
  25. package/dist/chem/complex.d.mts +114 -0
  26. package/dist/chem/complex.mjs +234 -0
  27. package/dist/chem/cycle.d.mts +75 -0
  28. package/dist/chem/cycle.mjs +145 -0
  29. package/dist/chem/equation.d.mts +86 -0
  30. package/dist/chem/equation.mjs +168 -0
  31. package/dist/chem/formula.d.mts +90 -0
  32. package/dist/chem/formula.mjs +201 -0
  33. package/dist/chem/functional-groups.d.mts +31 -0
  34. package/dist/chem/functional-groups.mjs +187 -0
  35. package/dist/chem/hazard.d.mts +94 -0
  36. package/dist/chem/hazard.mjs +329 -0
  37. package/dist/chem/index.d.mts +34 -33
  38. package/dist/chem/index.mjs +34 -28
  39. package/dist/chem/ionic.d.mts +98 -0
  40. package/dist/chem/ionic.mjs +156 -0
  41. package/dist/chem/layout.d.mts +46 -0
  42. package/dist/chem/layout.mjs +342 -0
  43. package/dist/chem/lewis.d.mts +79 -0
  44. package/dist/chem/lewis.mjs +163 -0
  45. package/dist/chem/molecular-orbital.d.mts +114 -0
  46. package/dist/chem/molecular-orbital.mjs +201 -0
  47. package/dist/chem/molecule.d.mts +154 -0
  48. package/dist/chem/molecule.mjs +282 -0
  49. package/dist/chem/nmr.d.mts +153 -0
  50. package/dist/chem/nmr.mjs +165 -0
  51. package/dist/chem/polymer.d.mts +65 -0
  52. package/dist/chem/polymer.mjs +179 -0
  53. package/dist/chem/redox.d.mts +138 -0
  54. package/dist/chem/redox.mjs +328 -0
  55. package/dist/chem/relations.d.mts +183 -0
  56. package/dist/chem/relations.mjs +299 -0
  57. package/dist/chem/skeleton.d.mts +51 -0
  58. package/dist/chem/skeleton.mjs +186 -0
  59. package/dist/chem/solution.d.mts +116 -0
  60. package/dist/chem/solution.mjs +186 -0
  61. package/dist/chem/species.d.mts +47 -0
  62. package/dist/chem/species.mjs +128 -0
  63. package/dist/chem/stereo.d.mts +108 -0
  64. package/dist/chem/stereo.mjs +286 -0
  65. package/dist/chem/stoichiometry.d.mts +95 -0
  66. package/dist/chem/stoichiometry.mjs +145 -0
  67. package/dist/chem/synthesis.d.mts +113 -0
  68. package/dist/chem/synthesis.mjs +281 -0
  69. package/dist/chem/vsepr.d.mts +80 -0
  70. package/dist/chem/vsepr.mjs +247 -0
  71. package/dist/circuit/ac.d.mts +163 -0
  72. package/dist/circuit/ac.mjs +452 -0
  73. package/dist/circuit/dc.d.mts +92 -0
  74. package/dist/circuit/dc.mjs +333 -0
  75. package/dist/circuit/index.d.mts +5 -92
  76. package/dist/circuit/index.mjs +5 -332
  77. package/dist/circuit/network.d.mts +99 -0
  78. package/dist/circuit/network.mjs +440 -0
  79. package/dist/circuit/topology.d.mts +102 -0
  80. package/dist/circuit/topology.mjs +143 -0
  81. package/dist/colour/absorption.d.mts +79 -0
  82. package/dist/colour/absorption.mjs +137 -0
  83. package/dist/colour/index.d.mts +6 -0
  84. package/dist/colour/index.mjs +7 -0
  85. package/dist/colour/name.d.mts +14 -0
  86. package/dist/colour/name.mjs +76 -0
  87. package/dist/colour/observer.d.mts +31 -0
  88. package/dist/colour/observer.mjs +46 -0
  89. package/dist/colour/spectrum.d.mts +61 -0
  90. package/dist/colour/spectrum.mjs +108 -0
  91. package/dist/colour/srgb.d.mts +49 -0
  92. package/dist/colour/srgb.mjs +108 -0
  93. package/dist/core/constants.d.mts +138 -0
  94. package/dist/core/constants.mjs +139 -0
  95. package/dist/core/index.d.mts +4 -1
  96. package/dist/core/index.mjs +4 -1
  97. package/dist/core/math.d.mts +26 -0
  98. package/dist/core/math.mjs +37 -0
  99. package/dist/core/vec3.d.mts +94 -0
  100. package/dist/core/vec3.mjs +123 -0
  101. package/dist/core/worked.d.mts +35 -0
  102. package/dist/core/worked.mjs +44 -0
  103. package/dist/electro/cell.d.mts +102 -0
  104. package/dist/electro/cell.mjs +170 -0
  105. package/dist/electro/conductivity.d.mts +157 -0
  106. package/dist/electro/conductivity.mjs +156 -0
  107. package/dist/electro/couples.d.mts +114 -0
  108. package/dist/electro/couples.mjs +334 -0
  109. package/dist/electro/electrolysis.d.mts +96 -0
  110. package/dist/electro/electrolysis.mjs +274 -0
  111. package/dist/electro/faraday.d.mts +150 -0
  112. package/dist/electro/faraday.mjs +118 -0
  113. package/dist/electro/index.d.mts +6 -0
  114. package/dist/electro/index.mjs +7 -0
  115. package/dist/finance/accounting/adjustments.d.mts +17 -0
  116. package/dist/finance/accounting/adjustments.mjs +202 -0
  117. package/dist/finance/accounting/analysis.d.mts +8 -0
  118. package/dist/finance/accounting/analysis.mjs +205 -0
  119. package/dist/finance/accounting/clubs.d.mts +21 -0
  120. package/dist/finance/accounting/clubs.mjs +217 -0
  121. package/dist/finance/accounting/company-statements.d.mts +7 -0
  122. package/dist/finance/accounting/company-statements.mjs +150 -0
  123. package/dist/finance/accounting/harness.d.mts +7 -0
  124. package/dist/finance/accounting/harness.mjs +45 -0
  125. package/dist/finance/accounting/index.d.mts +18 -0
  126. package/dist/finance/accounting/index.mjs +18 -0
  127. package/dist/finance/accounting/journalize.d.mts +16 -0
  128. package/dist/finance/accounting/journalize.mjs +128 -0
  129. package/dist/finance/accounting/manufacturing.d.mts +8 -0
  130. package/dist/finance/accounting/manufacturing.mjs +236 -0
  131. package/dist/finance/accounting/partnership.d.mts +7 -0
  132. package/dist/finance/accounting/partnership.mjs +152 -0
  133. package/dist/finance/accounting/period-case.d.mts +6 -0
  134. package/dist/finance/accounting/period-case.mjs +71 -0
  135. package/dist/finance/accounting/post.d.mts +9 -0
  136. package/dist/finance/accounting/post.mjs +84 -0
  137. package/dist/finance/accounting/precision.d.mts +9 -0
  138. package/dist/finance/accounting/precision.mjs +15 -0
  139. package/dist/finance/accounting/rules.d.mts +21 -0
  140. package/dist/finance/accounting/rules.mjs +37 -0
  141. package/dist/finance/accounting/solve.d.mts +28 -0
  142. package/dist/finance/accounting/solve.mjs +92 -0
  143. package/dist/finance/accounting/statements.d.mts +7 -0
  144. package/dist/finance/accounting/statements.mjs +142 -0
  145. package/dist/finance/accounting/types.d.mts +649 -0
  146. package/dist/finance/accounting/validate.d.mts +7 -0
  147. package/dist/finance/accounting/validate.mjs +67 -0
  148. package/dist/finance/accounting/verification.d.mts +24 -0
  149. package/dist/finance/accounting/verification.mjs +386 -0
  150. package/dist/finance/bizsim.d.mts +75 -0
  151. package/dist/finance/bizsim.mjs +296 -0
  152. package/dist/finance/index.d.mts +95 -0
  153. package/dist/finance/index.mjs +145 -0
  154. package/dist/finance/investment-math.d.mts +7 -0
  155. package/dist/finance/investment-math.mjs +18 -0
  156. package/dist/finance/management-accounting/budgeting.d.mts +7 -0
  157. package/dist/finance/management-accounting/budgeting.mjs +189 -0
  158. package/dist/finance/management-accounting/cash-budget.d.mts +7 -0
  159. package/dist/finance/management-accounting/cash-budget.mjs +154 -0
  160. package/dist/finance/management-accounting/costing.d.mts +8 -0
  161. package/dist/finance/management-accounting/costing.mjs +175 -0
  162. package/dist/finance/management-accounting/decisions.d.mts +8 -0
  163. package/dist/finance/management-accounting/decisions.mjs +164 -0
  164. package/dist/finance/management-accounting/index.d.mts +13 -0
  165. package/dist/finance/management-accounting/index.mjs +13 -0
  166. package/dist/finance/management-accounting/integrated-budget.d.mts +8 -0
  167. package/dist/finance/management-accounting/integrated-budget.mjs +67 -0
  168. package/dist/finance/management-accounting/inventory-costing.d.mts +7 -0
  169. package/dist/finance/management-accounting/inventory-costing.mjs +173 -0
  170. package/dist/finance/management-accounting/investment-appraisal.d.mts +7 -0
  171. package/dist/finance/management-accounting/investment-appraisal.mjs +148 -0
  172. package/dist/finance/management-accounting/management-case.d.mts +8 -0
  173. package/dist/finance/management-accounting/management-case.mjs +91 -0
  174. package/dist/finance/management-accounting/master-budget.d.mts +7 -0
  175. package/dist/finance/management-accounting/master-budget.mjs +137 -0
  176. package/dist/finance/management-accounting/production-costing.d.mts +8 -0
  177. package/dist/finance/management-accounting/production-costing.mjs +214 -0
  178. package/dist/finance/management-accounting/types.d.mts +644 -0
  179. package/dist/finance/management-accounting/variances.d.mts +7 -0
  180. package/dist/finance/management-accounting/variances.mjs +150 -0
  181. package/dist/index.d.mts +9 -8
  182. package/dist/index.mjs +5 -5
  183. package/dist/interaction/MovableDot.mjs +19 -0
  184. package/dist/interaction/useDraggable.mjs +24 -4
  185. package/dist/math/analysis.d.mts +61 -0
  186. package/dist/math/analysis.mjs +187 -0
  187. package/dist/math/answer-check.d.mts +50 -0
  188. package/dist/math/answer-check.mjs +106 -0
  189. package/dist/math/calculus.d.mts +17 -1
  190. package/dist/math/calculus.mjs +365 -2
  191. package/dist/math/complex.d.mts +93 -0
  192. package/dist/math/complex.mjs +239 -0
  193. package/dist/math/expr.d.mts +23 -0
  194. package/dist/math/expr.mjs +36 -0
  195. package/dist/math/index.d.mts +9 -23
  196. package/dist/math/index.mjs +9 -38
  197. package/dist/math/latex.mjs +10 -1
  198. package/dist/math/parse.mjs +1 -1
  199. package/dist/math/poly.d.mts +55 -0
  200. package/dist/math/poly.mjs +273 -0
  201. package/dist/math/rearrange.d.mts +14 -0
  202. package/dist/math/rearrange.mjs +125 -0
  203. package/dist/math/solve.d.mts +21 -0
  204. package/dist/math/solve.mjs +75 -0
  205. package/dist/networking/addressing.d.mts +26 -0
  206. package/dist/networking/addressing.mjs +33 -0
  207. package/dist/networking/cloud/access.d.mts +36 -0
  208. package/dist/networking/cloud/access.mjs +95 -0
  209. package/dist/networking/cloud/containers.d.mts +43 -0
  210. package/dist/networking/cloud/containers.mjs +54 -0
  211. package/dist/networking/cloud/edge.d.mts +17 -0
  212. package/dist/networking/cloud/edge.mjs +31 -0
  213. package/dist/networking/cloud/failure-domains.d.mts +19 -0
  214. package/dist/networking/cloud/failure-domains.mjs +22 -0
  215. package/dist/networking/cloud/geo-routing.d.mts +22 -0
  216. package/dist/networking/cloud/geo-routing.mjs +64 -0
  217. package/dist/networking/cloud/index.d.mts +18 -0
  218. package/dist/networking/cloud/index.mjs +19 -0
  219. package/dist/networking/cloud/inference-reliability.d.mts +30 -0
  220. package/dist/networking/cloud/inference-reliability.mjs +76 -0
  221. package/dist/networking/cloud/inference.d.mts +118 -0
  222. package/dist/networking/cloud/inference.mjs +179 -0
  223. package/dist/networking/cloud/infrastructure.d.mts +45 -0
  224. package/dist/networking/cloud/infrastructure.mjs +96 -0
  225. package/dist/networking/cloud/observability.d.mts +24 -0
  226. package/dist/networking/cloud/observability.mjs +34 -0
  227. package/dist/networking/cloud/orchestration.d.mts +32 -0
  228. package/dist/networking/cloud/orchestration.mjs +38 -0
  229. package/dist/networking/cloud/recovery.d.mts +21 -0
  230. package/dist/networking/cloud/recovery.mjs +27 -0
  231. package/dist/networking/cloud/releases.d.mts +42 -0
  232. package/dist/networking/cloud/releases.mjs +135 -0
  233. package/dist/networking/cloud/scaling.d.mts +25 -0
  234. package/dist/networking/cloud/scaling.mjs +65 -0
  235. package/dist/networking/cloud/secrets.d.mts +39 -0
  236. package/dist/networking/cloud/secrets.mjs +68 -0
  237. package/dist/networking/cloud/server-deployment.d.mts +29 -0
  238. package/dist/networking/cloud/server-deployment.mjs +72 -0
  239. package/dist/networking/cloud/storage.d.mts +16 -0
  240. package/dist/networking/cloud/storage.mjs +58 -0
  241. package/dist/networking/cloud/vpc.d.mts +18 -0
  242. package/dist/networking/cloud/vpc.mjs +100 -0
  243. package/dist/networking/delivery.d.mts +34 -0
  244. package/dist/networking/delivery.mjs +52 -0
  245. package/dist/networking/index.d.mts +47 -0
  246. package/dist/networking/index.mjs +47 -0
  247. package/dist/networking/ipv6.d.mts +28 -0
  248. package/dist/networking/ipv6.mjs +17 -0
  249. package/dist/networking/journeys.d.mts +83 -0
  250. package/dist/networking/journeys.mjs +161 -0
  251. package/dist/networking/models/airtime.d.mts +87 -0
  252. package/dist/networking/models/airtime.mjs +130 -0
  253. package/dist/networking/models/cellular.d.mts +157 -0
  254. package/dist/networking/models/cellular.mjs +252 -0
  255. package/dist/networking/models/encapsulation.d.mts +98 -0
  256. package/dist/networking/models/encapsulation.mjs +132 -0
  257. package/dist/networking/models/handover.d.mts +116 -0
  258. package/dist/networking/models/handover.mjs +209 -0
  259. package/dist/networking/models/handshake.d.mts +90 -0
  260. package/dist/networking/models/handshake.mjs +122 -0
  261. package/dist/networking/models/index.d.mts +14 -0
  262. package/dist/networking/models/index.mjs +15 -0
  263. package/dist/networking/models/media.d.mts +82 -0
  264. package/dist/networking/models/media.mjs +188 -0
  265. package/dist/networking/models/satellite.d.mts +86 -0
  266. package/dist/networking/models/satellite.mjs +121 -0
  267. package/dist/networking/models/spectrum.d.mts +83 -0
  268. package/dist/networking/models/spectrum.mjs +235 -0
  269. package/dist/networking/models/switch.d.mts +80 -0
  270. package/dist/networking/models/switch.mjs +155 -0
  271. package/dist/networking/models/vlan.d.mts +62 -0
  272. package/dist/networking/models/vlan.mjs +100 -0
  273. package/dist/networking/models/vpn.d.mts +66 -0
  274. package/dist/networking/models/vpn.mjs +125 -0
  275. package/dist/networking/models/wifi-privacy.d.mts +82 -0
  276. package/dist/networking/models/wifi-privacy.mjs +130 -0
  277. package/dist/networking/models/wifi.d.mts +240 -0
  278. package/dist/networking/models/wifi.mjs +562 -0
  279. package/dist/networking/nat-traversal.d.mts +24 -0
  280. package/dist/networking/nat-traversal.mjs +38 -0
  281. package/dist/networking/protocols.d.mts +17 -0
  282. package/dist/networking/protocols.mjs +57 -0
  283. package/dist/networking/queue.d.mts +12 -0
  284. package/dist/networking/queue.mjs +18 -0
  285. package/dist/networking/route-learning.d.mts +23 -0
  286. package/dist/networking/route-learning.mjs +43 -0
  287. package/dist/networking/routing.d.mts +11 -0
  288. package/dist/networking/routing.mjs +25 -0
  289. package/dist/networking/signals.d.mts +26 -0
  290. package/dist/networking/signals.mjs +35 -0
  291. package/dist/networking/subnet.d.mts +49 -0
  292. package/dist/networking/subnet.mjs +89 -0
  293. package/dist/networking/tcp-reliability.d.mts +24 -0
  294. package/dist/networking/tcp-reliability.mjs +38 -0
  295. package/dist/networking/topology/contract.d.mts +123 -0
  296. package/dist/networking/topology/index.d.mts +4 -0
  297. package/dist/networking/topology/index.mjs +4 -0
  298. package/dist/networking/topology/presets.d.mts +7 -0
  299. package/dist/networking/topology/presets.mjs +302 -0
  300. package/dist/networking/topology/simulation.d.mts +8 -0
  301. package/dist/networking/topology/simulation.mjs +179 -0
  302. package/dist/networking/wireless.d.mts +11 -0
  303. package/dist/networking/wireless.mjs +17 -0
  304. package/dist/optics/imaging.d.mts +218 -0
  305. package/dist/optics/imaging.mjs +276 -0
  306. package/dist/optics/index.d.mts +7 -0
  307. package/dist/optics/index.mjs +8 -0
  308. package/dist/optics/laws.d.mts +70 -0
  309. package/dist/optics/laws.mjs +195 -0
  310. package/dist/optics/prism.d.mts +148 -0
  311. package/dist/optics/prism.mjs +197 -0
  312. package/dist/optics/refraction.d.mts +201 -0
  313. package/dist/optics/refraction.mjs +270 -0
  314. package/dist/optics/wave-optics.d.mts +171 -0
  315. package/dist/optics/wave-optics.mjs +259 -0
  316. package/dist/physics/ac/index.d.mts +183 -0
  317. package/dist/physics/ac/index.mjs +203 -0
  318. package/dist/physics/dynamics/forces.d.mts +98 -0
  319. package/dist/physics/dynamics/forces.mjs +153 -0
  320. package/dist/physics/dynamics/friction.d.mts +76 -0
  321. package/dist/physics/dynamics/friction.mjs +119 -0
  322. package/dist/physics/dynamics/system.d.mts +68 -0
  323. package/dist/physics/dynamics/system.mjs +125 -0
  324. package/dist/physics/electrostatics/index.d.mts +169 -0
  325. package/dist/physics/electrostatics/index.mjs +249 -0
  326. package/dist/physics/energy/centre-of-mass.d.mts +115 -0
  327. package/dist/physics/energy/centre-of-mass.mjs +180 -0
  328. package/dist/physics/energy/conservation.d.mts +81 -0
  329. package/dist/physics/energy/conservation.mjs +129 -0
  330. package/dist/physics/energy/power.d.mts +90 -0
  331. package/dist/physics/energy/power.mjs +167 -0
  332. package/dist/physics/energy/spring.d.mts +73 -0
  333. package/dist/physics/energy/spring.mjs +129 -0
  334. package/dist/physics/energy/store.d.mts +63 -0
  335. package/dist/physics/energy/store.mjs +108 -0
  336. package/dist/physics/energy/theorem.d.mts +65 -0
  337. package/dist/physics/energy/theorem.mjs +113 -0
  338. package/dist/physics/energy/work.d.mts +114 -0
  339. package/dist/physics/energy/work.mjs +219 -0
  340. package/dist/physics/gravitation/body.d.mts +85 -0
  341. package/dist/physics/gravitation/body.mjs +168 -0
  342. package/dist/physics/gravitation/kepler.d.mts +127 -0
  343. package/dist/physics/gravitation/kepler.mjs +216 -0
  344. package/dist/physics/gravitation/law.d.mts +117 -0
  345. package/dist/physics/gravitation/law.mjs +175 -0
  346. package/dist/physics/gravitation/orbit.d.mts +119 -0
  347. package/dist/physics/gravitation/orbit.mjs +202 -0
  348. package/dist/physics/gravitation/potential.d.mts +114 -0
  349. package/dist/physics/gravitation/potential.mjs +202 -0
  350. package/dist/physics/gravitation/variation.d.mts +97 -0
  351. package/dist/physics/gravitation/variation.mjs +175 -0
  352. package/dist/physics/index.d.mts +35 -0
  353. package/dist/physics/index.mjs +36 -0
  354. package/dist/physics/integral-sweep.d.mts +63 -0
  355. package/dist/physics/integral-sweep.mjs +126 -0
  356. package/dist/physics/kinematics/equations.d.mts +47 -0
  357. package/dist/physics/kinematics/equations.mjs +126 -0
  358. package/dist/physics/kinematics/free-fall.d.mts +53 -0
  359. package/dist/physics/kinematics/free-fall.mjs +71 -0
  360. package/dist/physics/kinematics/given.d.mts +16 -0
  361. package/dist/physics/kinematics/given.mjs +55 -0
  362. package/dist/physics/kinematics/roots.d.mts +41 -0
  363. package/dist/physics/kinematics/roots.mjs +72 -0
  364. package/dist/physics/kinematics/solve.d.mts +52 -0
  365. package/dist/physics/kinematics/solve.mjs +172 -0
  366. package/dist/physics/magnetism/biot-savart.d.mts +161 -0
  367. package/dist/physics/magnetism/biot-savart.mjs +353 -0
  368. package/dist/physics/magnetism/flux.d.mts +94 -0
  369. package/dist/physics/magnetism/flux.mjs +313 -0
  370. package/dist/physics/magnetism/geomagnetism.d.mts +151 -0
  371. package/dist/physics/magnetism/geomagnetism.mjs +184 -0
  372. package/dist/physics/magnetism/index.d.mts +12 -0
  373. package/dist/physics/magnetism/index.mjs +74 -0
  374. package/dist/physics/magnetism/lorentz.d.mts +28 -0
  375. package/dist/physics/magnetism/lorentz.mjs +88 -0
  376. package/dist/physics/magnetism/magnetic-force.d.mts +102 -0
  377. package/dist/physics/magnetism/magnetic-force.mjs +169 -0
  378. package/dist/physics/momentum/collide.d.mts +77 -0
  379. package/dist/physics/momentum/collide.mjs +115 -0
  380. package/dist/physics/momentum/impulse.d.mts +89 -0
  381. package/dist/physics/momentum/impulse.mjs +159 -0
  382. package/dist/physics/momentum/planar.d.mts +60 -0
  383. package/dist/physics/momentum/planar.mjs +110 -0
  384. package/dist/physics/projectile.d.mts +107 -0
  385. package/dist/physics/projectile.mjs +185 -0
  386. package/dist/physics/rotation/angular.d.mts +85 -0
  387. package/dist/physics/rotation/angular.mjs +130 -0
  388. package/dist/physics/rotation/circular.d.mts +79 -0
  389. package/dist/physics/rotation/circular.mjs +131 -0
  390. package/dist/physics/rotation/inertia.d.mts +164 -0
  391. package/dist/physics/rotation/inertia.mjs +332 -0
  392. package/dist/physics/rotation/torque.d.mts +65 -0
  393. package/dist/physics/rotation/torque.mjs +134 -0
  394. package/dist/physics/vectors.d.mts +64 -0
  395. package/dist/physics/vectors.mjs +114 -0
  396. package/dist/primitives/Dot.d.mts +2 -15
  397. package/dist/primitives/Dot.mjs +6 -4
  398. package/dist/primitives/Grid.d.mts +33 -17
  399. package/dist/primitives/Grid.mjs +89 -17
  400. package/dist/primitives/Label.d.mts +1 -14
  401. package/dist/primitives/Label.mjs +3 -2
  402. package/dist/primitives/Lines.d.mts +4 -32
  403. package/dist/primitives/Lines.mjs +10 -8
  404. package/dist/primitives/Shapes.d.mts +5 -43
  405. package/dist/primitives/Shapes.mjs +12 -10
  406. package/dist/primitives/index.d.mts +2 -2
  407. package/dist/primitives/index.mjs +2 -2
  408. package/dist/primitives/props.mjs +31 -0
  409. package/dist/quantity/index.d.mts +119 -0
  410. package/dist/quantity/index.mjs +417 -0
  411. package/dist/relation/derive.d.mts +74 -0
  412. package/dist/relation/derive.mjs +73 -0
  413. package/dist/relation/index.d.mts +56 -0
  414. package/dist/relation/index.mjs +234 -0
  415. package/dist/scene/Scene.d.mts +6 -1
  416. package/dist/scene/Scene.mjs +15 -40
  417. package/dist/scene/evaluators.mjs +1 -1
  418. package/dist/sim/thermal.mjs +45 -20
  419. package/dist/thermo/calorimetry.d.mts +207 -0
  420. package/dist/thermo/calorimetry.mjs +345 -0
  421. package/dist/thermo/cycles.d.mts +142 -0
  422. package/dist/thermo/cycles.mjs +256 -0
  423. package/dist/thermo/entropy.d.mts +87 -0
  424. package/dist/thermo/entropy.mjs +140 -0
  425. package/dist/thermo/expansion.d.mts +130 -0
  426. package/dist/thermo/expansion.mjs +178 -0
  427. package/dist/thermo/gas.d.mts +197 -0
  428. package/dist/thermo/gas.mjs +279 -0
  429. package/dist/thermo/heat-transfer.d.mts +164 -0
  430. package/dist/thermo/heat-transfer.mjs +217 -0
  431. package/dist/thermo/index.d.mts +9 -82
  432. package/dist/thermo/index.mjs +9 -132
  433. package/dist/thermo/processes.d.mts +95 -0
  434. package/dist/thermo/processes.mjs +154 -0
  435. package/dist/thermo/temperature.d.mts +174 -0
  436. package/dist/thermo/temperature.mjs +236 -0
  437. package/dist/view/Stage.mjs +4 -11
  438. package/dist/waves/damping.d.mts +224 -0
  439. package/dist/waves/damping.mjs +317 -0
  440. package/dist/waves/doppler.d.mts +72 -0
  441. package/dist/waves/doppler.mjs +125 -0
  442. package/dist/waves/index.d.mts +10 -0
  443. package/dist/waves/index.mjs +10 -0
  444. package/dist/waves/pendulum.d.mts +130 -0
  445. package/dist/waves/pendulum.mjs +211 -0
  446. package/dist/waves/pitch.d.mts +125 -0
  447. package/dist/waves/pitch.mjs +158 -0
  448. package/dist/waves/shm.d.mts +170 -0
  449. package/dist/waves/shm.mjs +279 -0
  450. package/dist/waves/springs.d.mts +103 -0
  451. package/dist/waves/springs.mjs +176 -0
  452. package/dist/waves/superposition.d.mts +124 -0
  453. package/dist/waves/superposition.mjs +196 -0
  454. package/dist/waves/wave.d.mts +154 -0
  455. package/dist/waves/wave.mjs +178 -0
  456. package/package.json +103 -23
  457. package/styles.css +125 -8
  458. package/dist/assets/kit/index.mjs +0 -4
@@ -0,0 +1,186 @@
1
+ //#region src/chem/solution.ts
2
+ /**
3
+ * Solubility products at 298 K, from standard tables.
4
+ *
5
+ * Deliberately a mixed set of stoichiometries. A table of nothing but 1:1 salts would let the
6
+ * comparison trap below stay invisible, which is the one thing this data is most useful for.
7
+ */
8
+ const SOLUBILITY_PRODUCTS = [
9
+ {
10
+ formula: "AgCl",
11
+ cations: 1,
12
+ anions: 1,
13
+ ksp: 18e-11
14
+ },
15
+ {
16
+ formula: "AgBr",
17
+ cations: 1,
18
+ anions: 1,
19
+ ksp: 54e-14
20
+ },
21
+ {
22
+ formula: "AgI",
23
+ cations: 1,
24
+ anions: 1,
25
+ ksp: 85e-18
26
+ },
27
+ {
28
+ formula: "BaSO4",
29
+ cations: 1,
30
+ anions: 1,
31
+ ksp: 11e-11
32
+ },
33
+ {
34
+ formula: "CaSO4",
35
+ cations: 1,
36
+ anions: 1,
37
+ ksp: 49e-6
38
+ },
39
+ {
40
+ formula: "CaCO3",
41
+ cations: 1,
42
+ anions: 1,
43
+ ksp: 3.3e-9
44
+ },
45
+ {
46
+ formula: "PbSO4",
47
+ cations: 1,
48
+ anions: 1,
49
+ ksp: 25e-9
50
+ },
51
+ {
52
+ formula: "Ag2CrO4",
53
+ cations: 2,
54
+ anions: 1,
55
+ ksp: 11e-13
56
+ },
57
+ {
58
+ formula: "PbCl2",
59
+ cations: 1,
60
+ anions: 2,
61
+ ksp: 17e-6
62
+ },
63
+ {
64
+ formula: "PbI2",
65
+ cations: 1,
66
+ anions: 2,
67
+ ksp: 9.8e-9
68
+ },
69
+ {
70
+ formula: "Mg(OH)2",
71
+ cations: 1,
72
+ anions: 2,
73
+ ksp: 56e-13
74
+ },
75
+ {
76
+ formula: "Ca(OH)2",
77
+ cations: 1,
78
+ anions: 2,
79
+ ksp: 55e-7
80
+ },
81
+ {
82
+ formula: "Fe(OH)3",
83
+ cations: 1,
84
+ anions: 3,
85
+ ksp: 26e-40
86
+ }
87
+ ];
88
+ const saltByFormula = (formula) => SOLUBILITY_PRODUCTS.find((s) => s.formula === formula);
89
+ /**
90
+ * The solubility product a given solubility implies.
91
+ *
92
+ * Dissolving S moles of MpAq gives pS of the cation and qS of the anion, so the product is
93
+ * (pS)^p (qS)^q. The powers and the multipliers are both there, and dropping either is the usual
94
+ * way this goes wrong: silver chromate gives (2S)²(S), not S³ and not (2S)(S).
95
+ */
96
+ function kspFromSolubility(salt, solubility) {
97
+ if (solubility < 0) throw new Error("a solubility cannot be negative");
98
+ const { cations: p, anions: q } = salt;
99
+ return (p * solubility) ** p * (q * solubility) ** q;
100
+ }
101
+ /**
102
+ * The solubility a solubility product implies, in mol per cubic decimetre.
103
+ *
104
+ * The inverse of the above, solved rather than rearranged by hand, because the rearrangement is a
105
+ * different expression for every stoichiometry:
106
+ *
107
+ * Ksp = p^p q^q S^(p+q) so S = (Ksp / (p^p q^q))^(1/(p+q))
108
+ */
109
+ function solubilityFromKsp(salt) {
110
+ const { cations: p, anions: q, ksp } = salt;
111
+ return (ksp / (p ** p * q ** q)) ** (1 / (p + q));
112
+ }
113
+ /**
114
+ * The ionic product for concentrations that are actually present.
115
+ *
116
+ * The same expression as Ksp and a different quantity: Ksp is what a SATURATED solution has, this
117
+ * is what THIS solution has. Comparing them is the whole of precipitation prediction, and calling
118
+ * both of them Ksp is why that comparison so often gets skipped.
119
+ */
120
+ function ionicProduct(salt, cation, anion) {
121
+ if (cation < 0 || anion < 0) throw new Error("a concentration cannot be negative");
122
+ return cation ** salt.cations * anion ** salt.anions;
123
+ }
124
+ /**
125
+ * Whether mixing these concentrations produces a solid.
126
+ *
127
+ * Returns the reasoning, because "will it precipitate" is answered by a comparison and a learner
128
+ * who is handed only the verdict never sees which two numbers were compared.
129
+ */
130
+ function willPrecipitate(salt, cation, anion) {
131
+ const product = ionicProduct(salt, cation, anion);
132
+ const ratio = product / salt.ksp;
133
+ const verdict = ratio > 1.0001 ? "precipitate" : ratio < .9999 ? "stays dissolved" : "saturated";
134
+ const because = verdict === "precipitate" ? `the ions present give an ionic product of ${product.toExponential(2)}, above the ${salt.ksp.toExponential(2)} the solution can hold, so solid ${salt.formula} appears until the product falls back to it` : verdict === "stays dissolved" ? `the ions present give an ionic product of ${product.toExponential(2)}, below the ${salt.ksp.toExponential(2)} the solution can hold, so nothing comes out however insoluble ${salt.formula} is said to be` : `the ionic product has reached ${salt.ksp.toExponential(2)} exactly, so the solution is saturated and on the point of depositing solid`;
135
+ return {
136
+ ionicProduct: product,
137
+ ksp: salt.ksp,
138
+ verdict,
139
+ because
140
+ };
141
+ }
142
+ /**
143
+ * Solubility when one of the ions is already in the water: the common ion effect.
144
+ *
145
+ * Adding chloride to a saturated silver chloride solution pushes the equilibrium back and less
146
+ * silver chloride dissolves. The equilibrium itself has not changed; there is simply less room.
147
+ *
148
+ * Solved numerically rather than algebraically. With a common ion the equation is
149
+ * (pS + existing)^p (qS)^q = Ksp for a common cation, which is a polynomial of degree p+q with no
150
+ * tidy closed form beyond the simplest salts. It is monotonic in S, so bisection finds the root
151
+ * exactly and works for every stoichiometry rather than for the two that factorise.
152
+ */
153
+ function solubilityWithCommonIon(salt, existing, ion = "anion") {
154
+ if (existing < 0) throw new Error("an existing concentration cannot be negative");
155
+ if (existing === 0) return solubilityFromKsp(salt);
156
+ const { cations: p, anions: q, ksp } = salt;
157
+ const productAt = (s) => {
158
+ const cation = p * s + (ion === "cation" ? existing : 0);
159
+ const anion = q * s + (ion === "anion" ? existing : 0);
160
+ return cation ** p * anion ** q;
161
+ };
162
+ let low = 0;
163
+ let high = solubilityFromKsp(salt);
164
+ for (let i = 0; i < 200; i += 1) {
165
+ const mid = (low + high) / 2;
166
+ if (productAt(mid) > ksp) high = mid;
167
+ else low = mid;
168
+ }
169
+ return (low + high) / 2;
170
+ }
171
+ /**
172
+ * Compare two salts by how much of each actually dissolves.
173
+ *
174
+ * The reason this exists rather than a sort on Ksp: silver chloride's 1.8e-10 against silver
175
+ * chromate's 1.1e-12 says the chromate is a hundred times less soluble, and it is about seven times
176
+ * MORE soluble. The two numbers are products of different numbers of concentrations, so they are
177
+ * not the same kind of quantity and comparing them is meaningless.
178
+ */
179
+ function moreSoluble(a, b) {
180
+ return solubilityFromKsp(a) >= solubilityFromKsp(b) ? a : b;
181
+ }
182
+ /** Whether comparing two salts by Ksp alone would give the wrong answer. */
183
+ const kspComparisonMisleads = (a, b) => a.cations + a.anions !== b.cations + b.anions && a.ksp < b.ksp !== solubilityFromKsp(a) < solubilityFromKsp(b);
184
+
185
+ //#endregion
186
+ export { SOLUBILITY_PRODUCTS, ionicProduct, kspComparisonMisleads, kspFromSolubility, moreSoluble, saltByFormula, solubilityFromKsp, solubilityWithCommonIon, willPrecipitate };
@@ -0,0 +1,47 @@
1
+ import { parseFormula } from "./formula.mjs";
2
+
3
+ //#region src/chem/species.d.ts
4
+ interface Bonded {
5
+ readonly element: string;
6
+ readonly count: number;
7
+ }
8
+ /** A central atom and everything bonded to it: the unit a shape question is asked about. */
9
+ interface Centre {
10
+ /** As written, without the charge. */
11
+ readonly formula: string;
12
+ readonly central: string;
13
+ readonly bonded: readonly Bonded[];
14
+ /** Overall charge: +1 for an ammonium ion, -2 for a sulfate ion. */
15
+ readonly charge: number;
16
+ /** Total number of atoms bonded to the central atom. */
17
+ readonly bondedCount: number;
18
+ }
19
+ /**
20
+ * A formula split into its atom counts and its charge.
21
+ *
22
+ * The step before deciding anything about structure, shared by the shape engine, which wants a
23
+ * central atom, and the molecular orbital engine, which wants two atoms and no centre at all.
24
+ */
25
+ declare const readFormula: (input: string) => {
26
+ counts: {
27
+ element: string;
28
+ count: number;
29
+ }[];
30
+ charge: number;
31
+ };
32
+ interface CentreOptions {
33
+ /** Name the central atom instead of letting it be inferred. */
34
+ readonly central?: string;
35
+ /** Overall charge, if it is not written into the formula. */
36
+ readonly charge?: number;
37
+ }
38
+ /**
39
+ * Read a formula into a central atom and its ligands.
40
+ *
41
+ * Accepts the charge written in ("NH4+", "SO4^2-", "SO4 2-") or passed separately.
42
+ */
43
+ declare function parseCentre(input: string, options?: CentreOptions): Centre;
44
+ /** The species written out again, charge included: useful for a label. */
45
+ declare function formatCentre(centre: Centre): string;
46
+ //#endregion
47
+ export { Bonded, Centre, CentreOptions, formatCentre, parseCentre, readFormula };
@@ -0,0 +1,128 @@
1
+ import { parseFormula } from "./formula.mjs";
2
+
3
+ //#region src/chem/species.ts
4
+ /**
5
+ * A species written as a formula, parsed into a central atom and what surrounds it.
6
+ *
7
+ * ## Why a formula and not a graph
8
+ *
9
+ * The molecule engine takes SMILES and builds a graph, which is right for organic chemistry where
10
+ * the skeleton is the question. Shape questions are not like that. They are asked about a single
11
+ * central atom with things around it, written as a formula: what shape is XeF4, what is the bond
12
+ * angle in NH3, why is SF4 not tetrahedral. Making an author write a graph for those would be
13
+ * ceremony, and the formula already contains everything the answer needs.
14
+ *
15
+ * So this parses the formula directly, and the two front ends stay separate rather than one being
16
+ * forced through the other.
17
+ *
18
+ * ## Choosing the central atom
19
+ *
20
+ * The rule used here is the one that works in practice: the central atom is the non-hydrogen element
21
+ * that appears fewest times, and where two tie, the one written first. That picks O out of H2O, S
22
+ * out of SO4, Xe out of XeF4 and Cl out of ClF3. A caller who disagrees can name the central atom
23
+ * instead of having it inferred.
24
+ *
25
+ * ## What this refuses, and why refusing is the right answer
26
+ *
27
+ * Hydrogen alongside other ligands. In H2SO4 the hydrogens are bonded to oxygens, not to the
28
+ * sulfur, so treating them as ligands on the central atom would produce a confident answer to a
29
+ * question nobody asked. The formula alone cannot say where a hydrogen sits, so the parse stops and
30
+ * says so rather than guessing. H2O, NH3 and NH4+ are unaffected: there, hydrogen is the only
31
+ * ligand and there is nowhere else for it to be.
32
+ *
33
+ * Pure: no React, no pixels.
34
+ */
35
+ /**
36
+ * An element bonded to the centre, and how many of it there are.
37
+ *
38
+ * Deliberately not called a ligand: `Ligand` in this kernel already means a named donor in a
39
+ * coordination complex, which carries a charge and a denticity and an IUPAC prefix. This is a
40
+ * plainer thing, one element bonded to a central atom, and giving the two the same name would
41
+ * suggest they were interchangeable.
42
+ */
43
+ /** An explicit charge: separated from the formula by a caret or a space, so its digits are its own. */
44
+ const EXPLICIT_CHARGE = /(?:\^|\s+)(\d*)\s*([+-])\s*$/;
45
+ /** A bare sign at the end, which is a charge of one. */
46
+ const BARE_CHARGE = /([+-])\s*$/;
47
+ /**
48
+ * Split a trailing charge off a formula.
49
+ *
50
+ * A number before the sign is ambiguous and cannot be resolved by reading alone: the 4 in NH4+ is a
51
+ * subscript on the hydrogen and the 3 in Fe3+ is the charge, and nothing in the text distinguishes
52
+ * them. Guessing produced an ammonium ion with a charge of four.
53
+ *
54
+ * So the contract is explicit rather than clever. A bare sign means one: "NH4+" is the ammonium ion.
55
+ * Any other size is written with a caret or a space: "SO4^2-" or "SO4 2-". A charge can also be
56
+ * passed separately, which is the unambiguous form for anything generated rather than typed.
57
+ */
58
+ function splitCharge(input) {
59
+ const text = input.trim();
60
+ const explicit = EXPLICIT_CHARGE.exec(text);
61
+ if (explicit) {
62
+ const size = explicit[1] ? Number(explicit[1]) : 1;
63
+ return {
64
+ body: text.slice(0, explicit.index).trim(),
65
+ charge: explicit[2] === "-" ? -size : size
66
+ };
67
+ }
68
+ const bare = BARE_CHARGE.exec(text);
69
+ if (bare) return {
70
+ body: text.slice(0, bare.index).trim(),
71
+ charge: bare[1] === "-" ? -1 : 1
72
+ };
73
+ return {
74
+ body: text.replace(/\s+/g, ""),
75
+ charge: 0
76
+ };
77
+ }
78
+ /**
79
+ * A formula split into its atom counts and its charge.
80
+ *
81
+ * The step before deciding anything about structure, shared by the shape engine, which wants a
82
+ * central atom, and the molecular orbital engine, which wants two atoms and no centre at all.
83
+ */
84
+ const readFormula = (input) => {
85
+ const { body, charge } = splitCharge(input);
86
+ return {
87
+ counts: parseFormula(body),
88
+ charge
89
+ };
90
+ };
91
+ /**
92
+ * Read a formula into a central atom and its ligands.
93
+ *
94
+ * Accepts the charge written in ("NH4+", "SO4^2-", "SO4 2-") or passed separately.
95
+ */
96
+ function parseCentre(input, options = {}) {
97
+ const { body, charge: written } = splitCharge(input);
98
+ const charge = options.charge ?? written;
99
+ const counts = parseFormula(body);
100
+ const heavy = counts.filter((c) => c.element !== "H");
101
+ if (heavy.length === 0) throw new Error(`"${body}" is hydrogen only and has no central atom`);
102
+ const central = options.central ?? heavy.reduce((best, c) => c.count < best.count ? c : best, heavy[0]).element;
103
+ if (!counts.some((c) => c.element === central)) throw new Error(`"${central}" does not appear in ${body}`);
104
+ const centralCount = counts.find((c) => c.element === central).count;
105
+ if (centralCount !== 1) throw new Error(`${body} has ${centralCount} ${central} atoms, so it has no single central atom: this engine describes one centre at a time`);
106
+ const bonded = counts.filter((c) => c.element !== central).map((c) => ({
107
+ element: c.element,
108
+ count: c.count
109
+ }));
110
+ if (bonded.length === 0) throw new Error(`${body} is a single atom and has no shape`);
111
+ if (bonded.some((l) => l.element === "H") && bonded.length > 1) throw new Error(`${body} has hydrogen alongside other ligands, and a formula cannot say which atom the hydrogen is bonded to. In an oxoacid it is bonded to an oxygen, not to the central atom. Name the central atom and give the ligands directly if you mean something else.`);
112
+ return {
113
+ formula: body,
114
+ central,
115
+ bonded,
116
+ charge,
117
+ bondedCount: bonded.reduce((total, l) => total + l.count, 0)
118
+ };
119
+ }
120
+ /** The species written out again, charge included: useful for a label. */
121
+ function formatCentre(centre) {
122
+ if (centre.charge === 0) return centre.formula;
123
+ const size = Math.abs(centre.charge) === 1 ? "" : String(Math.abs(centre.charge));
124
+ return `${centre.formula}${size}${centre.charge < 0 ? "-" : "+"}`;
125
+ }
126
+
127
+ //#endregion
128
+ export { formatCentre, parseCentre, readFormula };
@@ -0,0 +1,108 @@
1
+ import { Structure } from "./molecule.mjs";
2
+
3
+ //#region src/chem/stereo.d.ts
4
+ /**
5
+ * Compare two branches by CIP priority.
6
+ *
7
+ * Returns a negative number when the first outranks the second, positive when the second does, and
8
+ * `undefined` when they cannot be separated within the spheres explored, which for a real molecule
9
+ * means they are the same branch.
10
+ *
11
+ * The comparison walks outward one sphere at a time. At each sphere both branches offer a list of
12
+ * atoms sorted heaviest first; the lists are compared position by position, and the first
13
+ * difference decides it. Only if they are identical does the walk go further out.
14
+ */
15
+ declare function comparePriority(structure: Structure, centre: number, firstAtom: number, secondAtom: number, maxSpheres?: number): number | undefined;
16
+ /**
17
+ * The same comparison, for two branches hanging off DIFFERENT atoms.
18
+ *
19
+ * Needed by the meso check, where the two branches being weighed against each other belong to the
20
+ * two ends of the molecule rather than to one centre. Passing both to {@link comparePriority} with
21
+ * a single centre let each walk escape backwards through the other's parent, so two branches that
22
+ * are plainly the same came out different and no meso form was ever found.
23
+ */
24
+ declare function compareBranches(structure: Structure, firstAtom: number, firstFrom: number, secondAtom: number, secondFrom: number, maxSpheres?: number): number | undefined;
25
+ interface RankedSubstituent {
26
+ readonly atom: number;
27
+ readonly element: string;
28
+ /** 1 is highest priority. */
29
+ readonly rank: number;
30
+ }
31
+ /**
32
+ * The substituents of an atom in priority order, highest first.
33
+ *
34
+ * Returns undefined when two of them cannot be separated, which is the honest answer: a carbon with
35
+ * two identical groups on it has no handedness, and saying so is more useful than an arbitrary
36
+ * ordering that would then produce a confident R or S for a molecule that is neither.
37
+ */
38
+ declare function rankSubstituents(structure: Structure, centre: number): RankedSubstituent[] | undefined;
39
+ interface Stereocentre {
40
+ readonly atom: number;
41
+ readonly substituents: readonly RankedSubstituent[];
42
+ }
43
+ /**
44
+ * Every carbon with four different groups on it.
45
+ *
46
+ * The definition, applied rather than paraphrased. A carbon qualifies when the four things attached
47
+ * to it can all be told apart by the priority rules, which is a stronger statement than "four
48
+ * different atoms" and is why 3-methylhexane has a stereocentre and 3-methylpentane does not: in
49
+ * the second, two of the branches are both ethyl.
50
+ */
51
+ declare function stereocentres(structure: Structure): Stereocentre[];
52
+ /**
53
+ * How many stereoisomers a molecule has, from its stereocentre count.
54
+ *
55
+ * Two arrangements at each centre, independently, so 2^n. This is the upper bound: see
56
+ * {@link stereoisomerCount} for the number a molecule with an internal mirror plane actually has.
57
+ */
58
+ declare const maximumStereoisomers: (centres: number) => number;
59
+ interface StereoisomerCount {
60
+ readonly centres: number;
61
+ /** Two arrangements at each centre, independently. */
62
+ readonly maximum: number;
63
+ /** What the molecule actually has. */
64
+ readonly actual: number;
65
+ /** True when one arrangement is its own mirror image and so is not a separate substance. */
66
+ readonly hasMeso: boolean;
67
+ readonly because: string;
68
+ }
69
+ /**
70
+ * How many stereoisomers a molecule really has.
71
+ *
72
+ * The rule of 2^n over-counts whenever the molecule has an internal mirror plane. Tartaric acid has
73
+ * two stereocentres and three isomers, not four: the arrangement with one centre left-handed and
74
+ * the other right-handed is superimposable on its own reflection, so the two that 2^n counts
75
+ * separately are one substance, and that substance is not optically active at all.
76
+ *
77
+ * Detected by asking whether the centres are mirror images of one another, which is checkable with
78
+ * the machinery already here: the branches leading away from each centre have to be
79
+ * indistinguishable, and indistinguishable is exactly what {@link comparePriority} reports when it
80
+ * cannot separate two branches.
81
+ *
82
+ * Restricted to the two-centre case, which is the one syllabuses set. A molecule with more centres
83
+ * and partial symmetry needs a full search over configurations, and this reports the maximum for
84
+ * those rather than guessing.
85
+ */
86
+ declare function stereoisomerCount(structure: Structure): StereoisomerCount;
87
+ type DoubleBondShape = 'E' | 'Z';
88
+ interface DoubleBondStereo {
89
+ readonly a: number;
90
+ readonly b: number;
91
+ /** The higher-priority substituent on each carbon. */
92
+ readonly higherOnA: number;
93
+ readonly higherOnB: number;
94
+ }
95
+ /**
96
+ * Double bonds that can show E/Z, with the higher-priority group on each end identified.
97
+ *
98
+ * A double bond has a shape worth naming only when BOTH its carbons carry two different groups. If
99
+ * either end has two of the same thing, swapping them changes nothing and there is only one
100
+ * compound, which is why 1,1-dichloroethene has no isomers and 1,2-dichloroethene has two.
101
+ *
102
+ * Which arrangement is E and which is Z cannot be read off the connection table: it depends on
103
+ * where the groups actually are in space, which a graph does not record. So this reports WHICH
104
+ * group wins on each end, and the geometry has to say the rest.
105
+ */
106
+ declare function stereogenicDoubleBonds(structure: Structure): DoubleBondStereo[];
107
+ //#endregion
108
+ export { DoubleBondShape, DoubleBondStereo, RankedSubstituent, Stereocentre, StereoisomerCount, compareBranches, comparePriority, maximumStereoisomers, rankSubstituents, stereocentres, stereogenicDoubleBonds, stereoisomerCount };