react-cheminfo 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (844) hide show
  1. package/README.md +111 -23
  2. package/lib/capsule/ui/CapsuleFilter.d.ts +61 -0
  3. package/lib/capsule/ui/CapsuleFilter.d.ts.map +1 -0
  4. package/lib/capsule/ui/CapsuleFilter.js +33 -0
  5. package/lib/capsule/ui/CapsuleFilter.js.map +1 -0
  6. package/lib/capsule/ui/index.d.ts +3 -0
  7. package/lib/capsule/ui/index.d.ts.map +1 -0
  8. package/lib/capsule/ui/index.js +2 -0
  9. package/lib/capsule/ui/index.js.map +1 -0
  10. package/lib/chrome/ui/NavLink.d.ts +27 -0
  11. package/lib/chrome/ui/NavLink.d.ts.map +1 -0
  12. package/lib/chrome/ui/NavLink.js +36 -0
  13. package/lib/chrome/ui/NavLink.js.map +1 -0
  14. package/lib/chrome/ui/NavMenuButton.d.ts +40 -0
  15. package/lib/chrome/ui/NavMenuButton.d.ts.map +1 -0
  16. package/lib/chrome/ui/NavMenuButton.js +26 -0
  17. package/lib/chrome/ui/NavMenuButton.js.map +1 -0
  18. package/lib/chrome/ui/SiteFooter.d.ts +39 -0
  19. package/lib/chrome/ui/SiteFooter.d.ts.map +1 -0
  20. package/lib/chrome/ui/SiteFooter.js +17 -0
  21. package/lib/chrome/ui/SiteFooter.js.map +1 -0
  22. package/lib/chrome/ui/SiteHeader.d.ts +59 -0
  23. package/lib/chrome/ui/SiteHeader.d.ts.map +1 -0
  24. package/lib/chrome/ui/SiteHeader.js +28 -0
  25. package/lib/chrome/ui/SiteHeader.js.map +1 -0
  26. package/lib/chrome/ui/index.d.ts +12 -0
  27. package/lib/chrome/ui/index.d.ts.map +1 -0
  28. package/lib/chrome/ui/index.js +6 -0
  29. package/lib/chrome/ui/index.js.map +1 -0
  30. package/lib/chrome/ui/navItem.d.ts +57 -0
  31. package/lib/chrome/ui/navItem.d.ts.map +1 -0
  32. package/lib/chrome/ui/navItem.js +10 -0
  33. package/lib/chrome/ui/navItem.js.map +1 -0
  34. package/lib/chrome/ui/useCompactHeader.d.ts +31 -0
  35. package/lib/chrome/ui/useCompactHeader.d.ts.map +1 -0
  36. package/lib/chrome/ui/useCompactHeader.js +50 -0
  37. package/lib/chrome/ui/useCompactHeader.js.map +1 -0
  38. package/lib/citation/core/clipboard.d.ts +12 -3
  39. package/lib/citation/core/clipboard.d.ts.map +1 -1
  40. package/lib/citation/core/clipboard.js +21 -10
  41. package/lib/citation/core/clipboard.js.map +1 -1
  42. package/lib/citation/core/download.d.ts +11 -3
  43. package/lib/citation/core/download.d.ts.map +1 -1
  44. package/lib/citation/core/download.js +17 -13
  45. package/lib/citation/core/download.js.map +1 -1
  46. package/lib/citation/core/index.d.ts +4 -3
  47. package/lib/citation/core/index.d.ts.map +1 -1
  48. package/lib/citation/core/index.js +3 -3
  49. package/lib/citation/core/index.js.map +1 -1
  50. package/lib/citation/core/works.d.ts +44 -0
  51. package/lib/citation/core/works.d.ts.map +1 -0
  52. package/lib/citation/core/works.js +51 -0
  53. package/lib/citation/core/works.js.map +1 -0
  54. package/lib/citation/ui/CitationMenu.d.ts +20 -3
  55. package/lib/citation/ui/CitationMenu.d.ts.map +1 -1
  56. package/lib/citation/ui/CitationMenu.js +60 -49
  57. package/lib/citation/ui/CitationMenu.js.map +1 -1
  58. package/lib/citation/ui/CitationPreview.d.ts +5 -2
  59. package/lib/citation/ui/CitationPreview.d.ts.map +1 -1
  60. package/lib/citation/ui/CitationPreview.js +9 -4
  61. package/lib/citation/ui/CitationPreview.js.map +1 -1
  62. package/lib/citation/ui/CiteButton.d.ts +13 -6
  63. package/lib/citation/ui/CiteButton.d.ts.map +1 -1
  64. package/lib/citation/ui/CiteButton.js +5 -4
  65. package/lib/citation/ui/CiteButton.js.map +1 -1
  66. package/lib/citation/ui/CopyFormatEntries.d.ts +31 -0
  67. package/lib/citation/ui/CopyFormatEntries.d.ts.map +1 -0
  68. package/lib/citation/ui/CopyFormatEntries.js +29 -0
  69. package/lib/citation/ui/CopyFormatEntries.js.map +1 -0
  70. package/lib/citation/ui/WorkEntry.d.ts +18 -0
  71. package/lib/citation/ui/WorkEntry.d.ts.map +1 -0
  72. package/lib/citation/ui/WorkEntry.js +32 -0
  73. package/lib/citation/ui/WorkEntry.js.map +1 -0
  74. package/lib/citation/ui/entries.d.ts +7 -7
  75. package/lib/citation/ui/entries.d.ts.map +1 -1
  76. package/lib/citation/ui/entries.js +11 -13
  77. package/lib/citation/ui/entries.js.map +1 -1
  78. package/lib/citation/ui/index.d.ts +2 -2
  79. package/lib/citation/ui/index.d.ts.map +1 -1
  80. package/lib/citation/ui/index.js.map +1 -1
  81. package/lib/citation/ui/useCopyFeedback.d.ts +20 -0
  82. package/lib/citation/ui/useCopyFeedback.d.ts.map +1 -0
  83. package/lib/citation/ui/useCopyFeedback.js +49 -0
  84. package/lib/citation/ui/useCopyFeedback.js.map +1 -0
  85. package/lib/clipboard/core/index.d.ts +2 -0
  86. package/lib/clipboard/core/index.d.ts.map +1 -0
  87. package/lib/clipboard/core/index.js +2 -0
  88. package/lib/clipboard/core/index.js.map +1 -0
  89. package/lib/clipboard/core/writeToClipboard.d.ts +12 -0
  90. package/lib/clipboard/core/writeToClipboard.d.ts.map +1 -0
  91. package/lib/clipboard/core/writeToClipboard.js +49 -0
  92. package/lib/clipboard/core/writeToClipboard.js.map +1 -0
  93. package/lib/clipboard/ui/CodeBlock.d.ts +43 -0
  94. package/lib/clipboard/ui/CodeBlock.d.ts.map +1 -0
  95. package/lib/clipboard/ui/CodeBlock.js +49 -0
  96. package/lib/clipboard/ui/CodeBlock.js.map +1 -0
  97. package/lib/clipboard/ui/CopyButton.d.ts +64 -0
  98. package/lib/clipboard/ui/CopyButton.d.ts.map +1 -0
  99. package/lib/clipboard/ui/CopyButton.js +21 -0
  100. package/lib/clipboard/ui/CopyButton.js.map +1 -0
  101. package/lib/clipboard/ui/index.d.ts +7 -0
  102. package/lib/clipboard/ui/index.d.ts.map +1 -0
  103. package/lib/clipboard/ui/index.js +4 -0
  104. package/lib/clipboard/ui/index.js.map +1 -0
  105. package/lib/clipboard/ui/useCopyToClipboard.d.ts +24 -0
  106. package/lib/clipboard/ui/useCopyToClipboard.d.ts.map +1 -0
  107. package/lib/clipboard/ui/useCopyToClipboard.js +36 -0
  108. package/lib/clipboard/ui/useCopyToClipboard.js.map +1 -0
  109. package/lib/color/core/contrast.d.ts +43 -0
  110. package/lib/color/core/contrast.d.ts.map +1 -0
  111. package/lib/color/core/contrast.js +61 -0
  112. package/lib/color/core/contrast.js.map +1 -0
  113. package/lib/color/core/hex.d.ts +26 -0
  114. package/lib/color/core/hex.d.ts.map +1 -0
  115. package/lib/color/core/hex.js +44 -0
  116. package/lib/color/core/hex.js.map +1 -0
  117. package/lib/color/core/index.d.ts +5 -0
  118. package/lib/color/core/index.d.ts.map +1 -0
  119. package/lib/color/core/index.js +3 -0
  120. package/lib/color/core/index.js.map +1 -0
  121. package/lib/color/core/scale.d.ts +52 -0
  122. package/lib/color/core/scale.d.ts.map +1 -0
  123. package/lib/color/core/scale.js +96 -0
  124. package/lib/color/core/scale.js.map +1 -0
  125. package/lib/color/ui/ColorScaleLegend.d.ts +38 -0
  126. package/lib/color/ui/ColorScaleLegend.d.ts.map +1 -0
  127. package/lib/color/ui/ColorScaleLegend.js +68 -0
  128. package/lib/color/ui/ColorScaleLegend.js.map +1 -0
  129. package/lib/color/ui/index.d.ts +3 -0
  130. package/lib/color/ui/index.d.ts.map +1 -0
  131. package/lib/color/ui/index.js +2 -0
  132. package/lib/color/ui/index.js.map +1 -0
  133. package/lib/core.d.ts +11 -0
  134. package/lib/core.d.ts.map +1 -1
  135. package/lib/core.js +11 -0
  136. package/lib/core.js.map +1 -1
  137. package/lib/credits/core/credits.d.ts +144 -0
  138. package/lib/credits/core/credits.d.ts.map +1 -0
  139. package/lib/credits/core/credits.js +156 -0
  140. package/lib/credits/core/credits.js.map +1 -0
  141. package/lib/credits/core/index.d.ts +3 -0
  142. package/lib/credits/core/index.d.ts.map +1 -0
  143. package/lib/credits/core/index.js +2 -0
  144. package/lib/credits/core/index.js.map +1 -0
  145. package/lib/credits/ui/CreditsList.d.ts +29 -0
  146. package/lib/credits/ui/CreditsList.d.ts.map +1 -0
  147. package/lib/credits/ui/CreditsList.js +33 -0
  148. package/lib/credits/ui/CreditsList.js.map +1 -0
  149. package/lib/credits/ui/index.d.ts +3 -0
  150. package/lib/credits/ui/index.d.ts.map +1 -0
  151. package/lib/credits/ui/index.js +2 -0
  152. package/lib/credits/ui/index.js.map +1 -0
  153. package/lib/delimited/core/delimiters.d.ts +31 -0
  154. package/lib/delimited/core/delimiters.d.ts.map +1 -0
  155. package/lib/delimited/core/delimiters.js +46 -0
  156. package/lib/delimited/core/delimiters.js.map +1 -0
  157. package/lib/delimited/core/index.d.ts +9 -0
  158. package/lib/delimited/core/index.d.ts.map +1 -0
  159. package/lib/delimited/core/index.js +5 -0
  160. package/lib/delimited/core/index.js.map +1 -0
  161. package/lib/delimited/core/readDelimited.d.ts +32 -0
  162. package/lib/delimited/core/readDelimited.d.ts.map +1 -0
  163. package/lib/delimited/core/readDelimited.js +122 -0
  164. package/lib/delimited/core/readDelimited.js.map +1 -0
  165. package/lib/delimited/core/rowsToDelimited.d.ts +59 -0
  166. package/lib/delimited/core/rowsToDelimited.d.ts.map +1 -0
  167. package/lib/delimited/core/rowsToDelimited.js +87 -0
  168. package/lib/delimited/core/rowsToDelimited.js.map +1 -0
  169. package/lib/delimited/core/toDelimited.d.ts +38 -0
  170. package/lib/delimited/core/toDelimited.d.ts.map +1 -0
  171. package/lib/delimited/core/toDelimited.js +45 -0
  172. package/lib/delimited/core/toDelimited.js.map +1 -0
  173. package/lib/delimited/ui/DelimitedTextDialog.d.ts +22 -0
  174. package/lib/delimited/ui/DelimitedTextDialog.d.ts.map +1 -0
  175. package/lib/delimited/ui/DelimitedTextDialog.js +17 -0
  176. package/lib/delimited/ui/DelimitedTextDialog.js.map +1 -0
  177. package/lib/delimited/ui/DelimitedTextPanel.d.ts +56 -0
  178. package/lib/delimited/ui/DelimitedTextPanel.d.ts.map +1 -0
  179. package/lib/delimited/ui/DelimitedTextPanel.js +55 -0
  180. package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -0
  181. package/lib/delimited/ui/index.d.ts +5 -0
  182. package/lib/delimited/ui/index.d.ts.map +1 -0
  183. package/lib/delimited/ui/index.js +3 -0
  184. package/lib/delimited/ui/index.js.map +1 -0
  185. package/lib/disclosure/ui/CollapsibleSection.d.ts +57 -0
  186. package/lib/disclosure/ui/CollapsibleSection.d.ts.map +1 -0
  187. package/lib/disclosure/ui/CollapsibleSection.js +60 -0
  188. package/lib/disclosure/ui/CollapsibleSection.js.map +1 -0
  189. package/lib/disclosure/ui/index.d.ts +5 -0
  190. package/lib/disclosure/ui/index.d.ts.map +1 -0
  191. package/lib/disclosure/ui/index.js +3 -0
  192. package/lib/disclosure/ui/index.js.map +1 -0
  193. package/lib/disclosure/ui/useDisclosure.d.ts +22 -0
  194. package/lib/disclosure/ui/useDisclosure.d.ts.map +1 -0
  195. package/lib/disclosure/ui/useDisclosure.js +18 -0
  196. package/lib/disclosure/ui/useDisclosure.js.map +1 -0
  197. package/lib/download/core/downloadBlob.d.ts +10 -0
  198. package/lib/download/core/downloadBlob.d.ts.map +1 -0
  199. package/lib/download/core/downloadBlob.js +20 -0
  200. package/lib/download/core/downloadBlob.js.map +1 -0
  201. package/lib/download/core/downloadText.d.ts +9 -0
  202. package/lib/download/core/downloadText.d.ts.map +1 -0
  203. package/lib/download/core/downloadText.js +14 -0
  204. package/lib/download/core/downloadText.js.map +1 -0
  205. package/lib/download/core/index.d.ts +4 -0
  206. package/lib/download/core/index.d.ts.map +1 -0
  207. package/lib/download/core/index.js +4 -0
  208. package/lib/download/core/index.js.map +1 -0
  209. package/lib/download/core/sanitizeFileName.d.ts +15 -0
  210. package/lib/download/core/sanitizeFileName.d.ts.map +1 -0
  211. package/lib/download/core/sanitizeFileName.js +33 -0
  212. package/lib/download/core/sanitizeFileName.js.map +1 -0
  213. package/lib/ecosystem/core/index.d.ts +3 -0
  214. package/lib/ecosystem/core/index.d.ts.map +1 -1
  215. package/lib/ecosystem/core/index.js +3 -0
  216. package/lib/ecosystem/core/index.js.map +1 -1
  217. package/lib/ecosystem/core/links.d.ts +11 -0
  218. package/lib/ecosystem/core/links.d.ts.map +1 -0
  219. package/lib/ecosystem/core/links.js +28 -0
  220. package/lib/ecosystem/core/links.js.map +1 -0
  221. package/lib/ecosystem/core/lookup.d.ts +32 -0
  222. package/lib/ecosystem/core/lookup.d.ts.map +1 -0
  223. package/lib/ecosystem/core/lookup.js +55 -0
  224. package/lib/ecosystem/core/lookup.js.map +1 -0
  225. package/lib/ecosystem/core/sites.d.ts +3 -1
  226. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  227. package/lib/ecosystem/core/sites.js +18 -3
  228. package/lib/ecosystem/core/sites.js.map +1 -1
  229. package/lib/ecosystem/core/tokens.d.ts +21 -0
  230. package/lib/ecosystem/core/tokens.d.ts.map +1 -0
  231. package/lib/ecosystem/core/tokens.js +42 -0
  232. package/lib/ecosystem/core/tokens.js.map +1 -0
  233. package/lib/ecosystem/ui/SiteTheme.d.ts +18 -0
  234. package/lib/ecosystem/ui/SiteTheme.d.ts.map +1 -0
  235. package/lib/ecosystem/ui/SiteTheme.js +16 -0
  236. package/lib/ecosystem/ui/SiteTheme.js.map +1 -0
  237. package/lib/ecosystem/ui/Wordmark.d.ts +30 -0
  238. package/lib/ecosystem/ui/Wordmark.d.ts.map +1 -0
  239. package/lib/ecosystem/ui/Wordmark.js +26 -0
  240. package/lib/ecosystem/ui/Wordmark.js.map +1 -0
  241. package/lib/ecosystem/ui/glyphs.js +1 -1
  242. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  243. package/lib/ecosystem/ui/index.d.ts +4 -0
  244. package/lib/ecosystem/ui/index.d.ts.map +1 -1
  245. package/lib/ecosystem/ui/index.js +2 -0
  246. package/lib/ecosystem/ui/index.js.map +1 -1
  247. package/lib/ecosystem/ui/marks.d.ts +30 -4
  248. package/lib/ecosystem/ui/marks.d.ts.map +1 -1
  249. package/lib/ecosystem/ui/marks.js +13 -3
  250. package/lib/ecosystem/ui/marks.js.map +1 -1
  251. package/lib/error/ui/ErrorBoundary.d.ts +60 -0
  252. package/lib/error/ui/ErrorBoundary.d.ts.map +1 -0
  253. package/lib/error/ui/ErrorBoundary.js +59 -0
  254. package/lib/error/ui/ErrorBoundary.js.map +1 -0
  255. package/lib/error/ui/ErrorFallback.d.ts +38 -0
  256. package/lib/error/ui/ErrorFallback.d.ts.map +1 -0
  257. package/lib/error/ui/ErrorFallback.js +16 -0
  258. package/lib/error/ui/ErrorFallback.js.map +1 -0
  259. package/lib/error/ui/index.d.ts +5 -0
  260. package/lib/error/ui/index.d.ts.map +1 -0
  261. package/lib/error/ui/index.js +3 -0
  262. package/lib/error/ui/index.js.map +1 -0
  263. package/lib/error/ui/toError.d.ts +11 -0
  264. package/lib/error/ui/toError.d.ts.map +1 -0
  265. package/lib/error/ui/toError.js +35 -0
  266. package/lib/error/ui/toError.js.map +1 -0
  267. package/lib/format/core/index.d.ts +5 -0
  268. package/lib/format/core/index.d.ts.map +1 -0
  269. package/lib/format/core/index.js +5 -0
  270. package/lib/format/core/index.js.map +1 -0
  271. package/lib/format/core/missing.d.ts +7 -0
  272. package/lib/format/core/missing.d.ts.map +1 -0
  273. package/lib/format/core/missing.js +7 -0
  274. package/lib/format/core/missing.js.map +1 -0
  275. package/lib/format/core/numbers.d.ts +40 -0
  276. package/lib/format/core/numbers.d.ts.map +1 -0
  277. package/lib/format/core/numbers.js +81 -0
  278. package/lib/format/core/numbers.js.map +1 -0
  279. package/lib/format/core/units.d.ts +17 -0
  280. package/lib/format/core/units.d.ts.map +1 -0
  281. package/lib/format/core/units.js +54 -0
  282. package/lib/format/core/units.js.map +1 -0
  283. package/lib/format/core/words.d.ts +12 -0
  284. package/lib/format/core/words.d.ts.map +1 -0
  285. package/lib/format/core/words.js +14 -0
  286. package/lib/format/core/words.js.map +1 -0
  287. package/lib/help/ui/HelpBody.d.ts +57 -0
  288. package/lib/help/ui/HelpBody.d.ts.map +1 -0
  289. package/lib/help/ui/HelpBody.js +44 -0
  290. package/lib/help/ui/HelpBody.js.map +1 -0
  291. package/lib/help/ui/HelpIcon.d.ts +33 -0
  292. package/lib/help/ui/HelpIcon.d.ts.map +1 -0
  293. package/lib/help/ui/HelpIcon.js +16 -0
  294. package/lib/help/ui/HelpIcon.js.map +1 -0
  295. package/lib/help/ui/HelpToolbarButton.d.ts +45 -0
  296. package/lib/help/ui/HelpToolbarButton.d.ts.map +1 -0
  297. package/lib/help/ui/HelpToolbarButton.js +17 -0
  298. package/lib/help/ui/HelpToolbarButton.js.map +1 -0
  299. package/lib/help/ui/HelpTooltip.d.ts +36 -0
  300. package/lib/help/ui/HelpTooltip.d.ts.map +1 -0
  301. package/lib/help/ui/HelpTooltip.js +24 -0
  302. package/lib/help/ui/HelpTooltip.js.map +1 -0
  303. package/lib/help/ui/index.d.ts +9 -0
  304. package/lib/help/ui/index.d.ts.map +1 -0
  305. package/lib/help/ui/index.js +5 -0
  306. package/lib/help/ui/index.js.map +1 -0
  307. package/lib/hooks/ui/index.d.ts +7 -0
  308. package/lib/hooks/ui/index.d.ts.map +1 -0
  309. package/lib/hooks/ui/index.js +5 -0
  310. package/lib/hooks/ui/index.js.map +1 -0
  311. package/lib/hooks/ui/listNavigation.d.ts +54 -0
  312. package/lib/hooks/ui/listNavigation.d.ts.map +1 -0
  313. package/lib/hooks/ui/listNavigation.js +77 -0
  314. package/lib/hooks/ui/listNavigation.js.map +1 -0
  315. package/lib/hooks/ui/useContainerSize.d.ts +15 -0
  316. package/lib/hooks/ui/useContainerSize.d.ts.map +1 -0
  317. package/lib/hooks/ui/useContainerSize.js +24 -0
  318. package/lib/hooks/ui/useContainerSize.js.map +1 -0
  319. package/lib/hooks/ui/useDebouncedValue.d.ts +12 -0
  320. package/lib/hooks/ui/useDebouncedValue.d.ts.map +1 -0
  321. package/lib/hooks/ui/useDebouncedValue.js +24 -0
  322. package/lib/hooks/ui/useDebouncedValue.js.map +1 -0
  323. package/lib/hooks/ui/useListKeyboardNavigation.d.ts +17 -0
  324. package/lib/hooks/ui/useListKeyboardNavigation.d.ts.map +1 -0
  325. package/lib/hooks/ui/useListKeyboardNavigation.js +25 -0
  326. package/lib/hooks/ui/useListKeyboardNavigation.js.map +1 -0
  327. package/lib/hooks/ui/useResizeObserver.d.ts +20 -0
  328. package/lib/hooks/ui/useResizeObserver.d.ts.map +1 -0
  329. package/lib/hooks/ui/useResizeObserver.js +37 -0
  330. package/lib/hooks/ui/useResizeObserver.js.map +1 -0
  331. package/lib/orbital/core/atomicGrid.d.ts +27 -0
  332. package/lib/orbital/core/atomicGrid.d.ts.map +1 -1
  333. package/lib/orbital/core/atomicGrid.js +37 -1
  334. package/lib/orbital/core/atomicGrid.js.map +1 -1
  335. package/lib/orbital/core/index.d.ts +9 -7
  336. package/lib/orbital/core/index.d.ts.map +1 -1
  337. package/lib/orbital/core/index.js +7 -6
  338. package/lib/orbital/core/index.js.map +1 -1
  339. package/lib/orbital/core/isovalue.d.ts +60 -0
  340. package/lib/orbital/core/isovalue.d.ts.map +1 -0
  341. package/lib/orbital/core/isovalue.js +128 -0
  342. package/lib/orbital/core/isovalue.js.map +1 -0
  343. package/lib/orbital/core/sample.d.ts +15 -1
  344. package/lib/orbital/core/sample.d.ts.map +1 -1
  345. package/lib/orbital/core/sample.js +10 -3
  346. package/lib/orbital/core/sample.js.map +1 -1
  347. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts +6 -1
  348. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
  349. package/lib/orbital/ui/AtomicOrbitalCanvas.js +12 -2
  350. package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
  351. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts +5 -1
  352. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
  353. package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
  354. package/lib/orbital/ui/renderVolume.d.ts +6 -3
  355. package/lib/orbital/ui/renderVolume.d.ts.map +1 -1
  356. package/lib/orbital/ui/renderVolume.js +14 -15
  357. package/lib/orbital/ui/renderVolume.js.map +1 -1
  358. package/lib/orbital/ui/viewer.d.ts +3 -1
  359. package/lib/orbital/ui/viewer.d.ts.map +1 -1
  360. package/lib/orbital/ui/viewer.js +3 -2
  361. package/lib/orbital/ui/viewer.js.map +1 -1
  362. package/lib/orbital/ui/volumeField.d.ts +5 -21
  363. package/lib/orbital/ui/volumeField.d.ts.map +1 -1
  364. package/lib/orbital/ui/volumeField.js +5 -45
  365. package/lib/orbital/ui/volumeField.js.map +1 -1
  366. package/lib/pedagogy/core/glossary.d.ts +79 -0
  367. package/lib/pedagogy/core/glossary.d.ts.map +1 -0
  368. package/lib/pedagogy/core/glossary.js +71 -0
  369. package/lib/pedagogy/core/glossary.js.map +1 -0
  370. package/lib/pedagogy/core/index.d.ts +8 -0
  371. package/lib/pedagogy/core/index.d.ts.map +1 -0
  372. package/lib/pedagogy/core/index.js +4 -0
  373. package/lib/pedagogy/core/index.js.map +1 -0
  374. package/lib/pedagogy/core/jsonStorage.d.ts +21 -0
  375. package/lib/pedagogy/core/jsonStorage.d.ts.map +1 -0
  376. package/lib/pedagogy/core/jsonStorage.js +55 -0
  377. package/lib/pedagogy/core/jsonStorage.js.map +1 -0
  378. package/lib/pedagogy/core/progress.d.ts +116 -0
  379. package/lib/pedagogy/core/progress.d.ts.map +1 -0
  380. package/lib/pedagogy/core/progress.js +122 -0
  381. package/lib/pedagogy/core/progress.js.map +1 -0
  382. package/lib/pedagogy/core/types.d.ts +74 -0
  383. package/lib/pedagogy/core/types.d.ts.map +1 -0
  384. package/lib/pedagogy/core/types.js +8 -0
  385. package/lib/pedagogy/core/types.js.map +1 -0
  386. package/lib/pedagogy/core/validation.d.ts +79 -0
  387. package/lib/pedagogy/core/validation.d.ts.map +1 -0
  388. package/lib/pedagogy/core/validation.js +47 -0
  389. package/lib/pedagogy/core/validation.js.map +1 -0
  390. package/lib/pedagogy/ui/ExerciseActions.d.ts +74 -0
  391. package/lib/pedagogy/ui/ExerciseActions.d.ts.map +1 -0
  392. package/lib/pedagogy/ui/ExerciseActions.js +22 -0
  393. package/lib/pedagogy/ui/ExerciseActions.js.map +1 -0
  394. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts +43 -0
  395. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts.map +1 -0
  396. package/lib/pedagogy/ui/ExerciseProgressHeader.js +43 -0
  397. package/lib/pedagogy/ui/ExerciseProgressHeader.js.map +1 -0
  398. package/lib/pedagogy/ui/ExerciseTags.d.ts +49 -0
  399. package/lib/pedagogy/ui/ExerciseTags.d.ts.map +1 -0
  400. package/lib/pedagogy/ui/ExerciseTags.js +22 -0
  401. package/lib/pedagogy/ui/ExerciseTags.js.map +1 -0
  402. package/lib/pedagogy/ui/GlossaryProvider.d.ts +19 -0
  403. package/lib/pedagogy/ui/GlossaryProvider.d.ts.map +1 -0
  404. package/lib/pedagogy/ui/GlossaryProvider.js +16 -0
  405. package/lib/pedagogy/ui/GlossaryProvider.js.map +1 -0
  406. package/lib/pedagogy/ui/GlossaryText.d.ts +50 -0
  407. package/lib/pedagogy/ui/GlossaryText.d.ts.map +1 -0
  408. package/lib/pedagogy/ui/GlossaryText.js +79 -0
  409. package/lib/pedagogy/ui/GlossaryText.js.map +1 -0
  410. package/lib/pedagogy/ui/HintLadder.d.ts +38 -0
  411. package/lib/pedagogy/ui/HintLadder.d.ts.map +1 -0
  412. package/lib/pedagogy/ui/HintLadder.js +33 -0
  413. package/lib/pedagogy/ui/HintLadder.js.map +1 -0
  414. package/lib/pedagogy/ui/ReferenceGrid.d.ts +31 -0
  415. package/lib/pedagogy/ui/ReferenceGrid.d.ts.map +1 -0
  416. package/lib/pedagogy/ui/ReferenceGrid.js +25 -0
  417. package/lib/pedagogy/ui/ReferenceGrid.js.map +1 -0
  418. package/lib/pedagogy/ui/ReferenceSectionBlock.d.ts +64 -0
  419. package/lib/pedagogy/ui/ReferenceSectionBlock.d.ts.map +1 -0
  420. package/lib/pedagogy/ui/ReferenceSectionBlock.js +78 -0
  421. package/lib/pedagogy/ui/ReferenceSectionBlock.js.map +1 -0
  422. package/lib/pedagogy/ui/SyntaxTooltip.d.ts +94 -0
  423. package/lib/pedagogy/ui/SyntaxTooltip.d.ts.map +1 -0
  424. package/lib/pedagogy/ui/SyntaxTooltip.js +79 -0
  425. package/lib/pedagogy/ui/SyntaxTooltip.js.map +1 -0
  426. package/lib/pedagogy/ui/TestCaseList.d.ts +35 -0
  427. package/lib/pedagogy/ui/TestCaseList.d.ts.map +1 -0
  428. package/lib/pedagogy/ui/TestCaseList.js +63 -0
  429. package/lib/pedagogy/ui/TestCaseList.js.map +1 -0
  430. package/lib/pedagogy/ui/TutorialStepStrip.d.ts +42 -0
  431. package/lib/pedagogy/ui/TutorialStepStrip.d.ts.map +1 -0
  432. package/lib/pedagogy/ui/TutorialStepStrip.js +98 -0
  433. package/lib/pedagogy/ui/TutorialStepStrip.js.map +1 -0
  434. package/lib/pedagogy/ui/exerciseMeta.d.ts +24 -0
  435. package/lib/pedagogy/ui/exerciseMeta.d.ts.map +1 -0
  436. package/lib/pedagogy/ui/exerciseMeta.js +38 -0
  437. package/lib/pedagogy/ui/exerciseMeta.js.map +1 -0
  438. package/lib/pedagogy/ui/glossaryContext.d.ts +17 -0
  439. package/lib/pedagogy/ui/glossaryContext.d.ts.map +1 -0
  440. package/lib/pedagogy/ui/glossaryContext.js +19 -0
  441. package/lib/pedagogy/ui/glossaryContext.js.map +1 -0
  442. package/lib/pedagogy/ui/index.d.ts +27 -0
  443. package/lib/pedagogy/ui/index.d.ts.map +1 -0
  444. package/lib/pedagogy/ui/index.js +15 -0
  445. package/lib/pedagogy/ui/index.js.map +1 -0
  446. package/lib/pedagogy/ui/tutorialLevels.d.ts +18 -0
  447. package/lib/pedagogy/ui/tutorialLevels.d.ts.map +1 -0
  448. package/lib/pedagogy/ui/tutorialLevels.js +14 -0
  449. package/lib/pedagogy/ui/tutorialLevels.js.map +1 -0
  450. package/lib/router/core/address.d.ts +42 -0
  451. package/lib/router/core/address.d.ts.map +1 -0
  452. package/lib/router/core/address.js +64 -0
  453. package/lib/router/core/address.js.map +1 -0
  454. package/lib/router/core/basePath.d.ts +49 -0
  455. package/lib/router/core/basePath.d.ts.map +1 -0
  456. package/lib/router/core/basePath.js +78 -0
  457. package/lib/router/core/basePath.js.map +1 -0
  458. package/lib/router/core/index.d.ts +8 -0
  459. package/lib/router/core/index.d.ts.map +1 -0
  460. package/lib/router/core/index.js +5 -0
  461. package/lib/router/core/index.js.map +1 -0
  462. package/lib/router/core/legacyHash.d.ts +45 -0
  463. package/lib/router/core/legacyHash.d.ts.map +1 -0
  464. package/lib/router/core/legacyHash.js +50 -0
  465. package/lib/router/core/legacyHash.js.map +1 -0
  466. package/lib/router/core/pageAddresses.d.ts +50 -0
  467. package/lib/router/core/pageAddresses.d.ts.map +1 -0
  468. package/lib/router/core/pageAddresses.js +56 -0
  469. package/lib/router/core/pageAddresses.js.map +1 -0
  470. package/lib/router/core/query.d.ts +41 -0
  471. package/lib/router/core/query.d.ts.map +1 -0
  472. package/lib/router/core/query.js +64 -0
  473. package/lib/router/core/query.js.map +1 -0
  474. package/lib/router/core/tabRouter.d.ts +111 -0
  475. package/lib/router/core/tabRouter.d.ts.map +1 -0
  476. package/lib/router/core/tabRouter.js +87 -0
  477. package/lib/router/core/tabRouter.js.map +1 -0
  478. package/lib/seo/core/documentMeta.d.ts +45 -0
  479. package/lib/seo/core/documentMeta.d.ts.map +1 -0
  480. package/lib/seo/core/documentMeta.js +69 -0
  481. package/lib/seo/core/documentMeta.js.map +1 -0
  482. package/lib/seo/core/index.d.ts +9 -0
  483. package/lib/seo/core/index.d.ts.map +1 -0
  484. package/lib/seo/core/index.js +5 -0
  485. package/lib/seo/core/index.js.map +1 -0
  486. package/lib/seo/core/pageMeta.d.ts +60 -0
  487. package/lib/seo/core/pageMeta.d.ts.map +1 -0
  488. package/lib/seo/core/pageMeta.js +91 -0
  489. package/lib/seo/core/pageMeta.js.map +1 -0
  490. package/lib/seo/core/routes.d.ts +52 -0
  491. package/lib/seo/core/routes.d.ts.map +1 -0
  492. package/lib/seo/core/routes.js +62 -0
  493. package/lib/seo/core/routes.js.map +1 -0
  494. package/lib/seo/core/siteFiles.d.ts +73 -0
  495. package/lib/seo/core/siteFiles.d.ts.map +1 -0
  496. package/lib/seo/core/siteFiles.js +100 -0
  497. package/lib/seo/core/siteFiles.js.map +1 -0
  498. package/lib/seo/vite/index.d.ts +5 -0
  499. package/lib/seo/vite/index.d.ts.map +1 -0
  500. package/lib/seo/vite/index.js +3 -0
  501. package/lib/seo/vite/index.js.map +1 -0
  502. package/lib/seo/vite/ogCard.d.ts +33 -0
  503. package/lib/seo/vite/ogCard.d.ts.map +1 -0
  504. package/lib/seo/vite/ogCard.js +72 -0
  505. package/lib/seo/vite/ogCard.js.map +1 -0
  506. package/lib/seo/vite/prerender.d.ts +58 -0
  507. package/lib/seo/vite/prerender.d.ts.map +1 -0
  508. package/lib/seo/vite/prerender.js +76 -0
  509. package/lib/seo/vite/prerender.js.map +1 -0
  510. package/lib/share/core/config.d.ts +63 -0
  511. package/lib/share/core/config.d.ts.map +1 -0
  512. package/lib/share/core/config.js +125 -0
  513. package/lib/share/core/config.js.map +1 -0
  514. package/lib/share/core/escape.d.ts +15 -0
  515. package/lib/share/core/escape.d.ts.map +1 -0
  516. package/lib/share/core/escape.js +22 -0
  517. package/lib/share/core/escape.js.map +1 -0
  518. package/lib/share/core/index.d.ts +9 -0
  519. package/lib/share/core/index.d.ts.map +1 -0
  520. package/lib/share/core/index.js +5 -0
  521. package/lib/share/core/index.js.map +1 -0
  522. package/lib/share/core/params.d.ts +93 -0
  523. package/lib/share/core/params.d.ts.map +1 -0
  524. package/lib/share/core/params.js +111 -0
  525. package/lib/share/core/params.js.map +1 -0
  526. package/lib/share/core/query.d.ts +30 -0
  527. package/lib/share/core/query.d.ts.map +1 -0
  528. package/lib/share/core/query.js +68 -0
  529. package/lib/share/core/query.js.map +1 -0
  530. package/lib/share/core/url.d.ts +57 -0
  531. package/lib/share/core/url.d.ts.map +1 -0
  532. package/lib/share/core/url.js +49 -0
  533. package/lib/share/core/url.js.map +1 -0
  534. package/lib/share/core/vocabulary.d.ts +51 -0
  535. package/lib/share/core/vocabulary.d.ts.map +1 -0
  536. package/lib/share/core/vocabulary.js +2 -0
  537. package/lib/share/core/vocabulary.js.map +1 -0
  538. package/lib/share/ui/HiddenPartsProvider.d.ts +19 -0
  539. package/lib/share/ui/HiddenPartsProvider.d.ts.map +1 -0
  540. package/lib/share/ui/HiddenPartsProvider.js +15 -0
  541. package/lib/share/ui/HiddenPartsProvider.js.map +1 -0
  542. package/lib/share/ui/PagePart.d.ts +18 -0
  543. package/lib/share/ui/PagePart.d.ts.map +1 -0
  544. package/lib/share/ui/PagePart.js +16 -0
  545. package/lib/share/ui/PagePart.js.map +1 -0
  546. package/lib/share/ui/ShareButton.d.ts +42 -0
  547. package/lib/share/ui/ShareButton.d.ts.map +1 -0
  548. package/lib/share/ui/ShareButton.js +18 -0
  549. package/lib/share/ui/ShareButton.js.map +1 -0
  550. package/lib/share/ui/ShareDialog.d.ts +73 -0
  551. package/lib/share/ui/ShareDialog.d.ts.map +1 -0
  552. package/lib/share/ui/ShareDialog.js +19 -0
  553. package/lib/share/ui/ShareDialog.js.map +1 -0
  554. package/lib/share/ui/ShareDialogContent.d.ts +13 -0
  555. package/lib/share/ui/ShareDialogContent.d.ts.map +1 -0
  556. package/lib/share/ui/ShareDialogContent.js +71 -0
  557. package/lib/share/ui/ShareDialogContent.js.map +1 -0
  558. package/lib/share/ui/SharePartOptions.d.ts +18 -0
  559. package/lib/share/ui/SharePartOptions.d.ts.map +1 -0
  560. package/lib/share/ui/SharePartOptions.js +22 -0
  561. package/lib/share/ui/SharePartOptions.js.map +1 -0
  562. package/lib/share/ui/draft.d.ts +13 -0
  563. package/lib/share/ui/draft.d.ts.map +1 -0
  564. package/lib/share/ui/draft.js +16 -0
  565. package/lib/share/ui/draft.js.map +1 -0
  566. package/lib/share/ui/hiddenParts.d.ts +17 -0
  567. package/lib/share/ui/hiddenParts.d.ts.map +1 -0
  568. package/lib/share/ui/hiddenParts.js +21 -0
  569. package/lib/share/ui/hiddenParts.js.map +1 -0
  570. package/lib/share/ui/index.d.ts +10 -0
  571. package/lib/share/ui/index.d.ts.map +1 -0
  572. package/lib/share/ui/index.js +6 -0
  573. package/lib/share/ui/index.js.map +1 -0
  574. package/lib/shared/ui/index.d.ts +2 -1
  575. package/lib/shared/ui/index.d.ts.map +1 -1
  576. package/lib/shared/ui/index.js +1 -1
  577. package/lib/shared/ui/index.js.map +1 -1
  578. package/lib/state/ui/index.d.ts +3 -0
  579. package/lib/state/ui/index.d.ts.map +1 -0
  580. package/lib/state/ui/index.js +2 -0
  581. package/lib/state/ui/index.js.map +1 -0
  582. package/lib/state/ui/mergeStored.d.ts +27 -0
  583. package/lib/state/ui/mergeStored.d.ts.map +1 -0
  584. package/lib/state/ui/mergeStored.js +82 -0
  585. package/lib/state/ui/mergeStored.js.map +1 -0
  586. package/lib/state/ui/persistBucket.d.ts +65 -0
  587. package/lib/state/ui/persistBucket.d.ts.map +1 -0
  588. package/lib/state/ui/persistBucket.js +90 -0
  589. package/lib/state/ui/persistBucket.js.map +1 -0
  590. package/lib/structure/core/editorValue.d.ts +69 -0
  591. package/lib/structure/core/editorValue.d.ts.map +1 -0
  592. package/lib/structure/core/editorValue.js +72 -0
  593. package/lib/structure/core/editorValue.js.map +1 -0
  594. package/lib/structure/core/fragmentQuery.d.ts +33 -0
  595. package/lib/structure/core/fragmentQuery.d.ts.map +1 -0
  596. package/lib/structure/core/fragmentQuery.js +37 -0
  597. package/lib/structure/core/fragmentQuery.js.map +1 -0
  598. package/lib/structure/core/index.d.ts +11 -0
  599. package/lib/structure/core/index.d.ts.map +1 -0
  600. package/lib/structure/core/index.js +6 -0
  601. package/lib/structure/core/index.js.map +1 -0
  602. package/lib/structure/core/molfile.d.ts +42 -0
  603. package/lib/structure/core/molfile.d.ts.map +1 -0
  604. package/lib/structure/core/molfile.js +74 -0
  605. package/lib/structure/core/molfile.js.map +1 -0
  606. package/lib/structure/core/readStructure.d.ts +37 -0
  607. package/lib/structure/core/readStructure.d.ts.map +1 -0
  608. package/lib/structure/core/readStructure.js +59 -0
  609. package/lib/structure/core/readStructure.js.map +1 -0
  610. package/lib/structure/core/structureSource.d.ts +34 -0
  611. package/lib/structure/core/structureSource.d.ts.map +1 -0
  612. package/lib/structure/core/structureSource.js +32 -0
  613. package/lib/structure/core/structureSource.js.map +1 -0
  614. package/lib/structure/core/toolbarFloor.d.ts +16 -0
  615. package/lib/structure/core/toolbarFloor.d.ts.map +1 -0
  616. package/lib/structure/core/toolbarFloor.js +27 -0
  617. package/lib/structure/core/toolbarFloor.js.map +1 -0
  618. package/lib/structure/ui/EditorCanvas.d.ts +55 -0
  619. package/lib/structure/ui/EditorCanvas.d.ts.map +1 -0
  620. package/lib/structure/ui/EditorCanvas.js +41 -0
  621. package/lib/structure/ui/EditorCanvas.js.map +1 -0
  622. package/lib/structure/ui/Structure.d.ts +122 -0
  623. package/lib/structure/ui/Structure.d.ts.map +1 -0
  624. package/lib/structure/ui/Structure.js +28 -0
  625. package/lib/structure/ui/Structure.js.map +1 -0
  626. package/lib/structure/ui/StructureEditor.d.ts +75 -0
  627. package/lib/structure/ui/StructureEditor.d.ts.map +1 -0
  628. package/lib/structure/ui/StructureEditor.js +83 -0
  629. package/lib/structure/ui/StructureEditor.js.map +1 -0
  630. package/lib/structure/ui/StructurePlaceholder.d.ts +29 -0
  631. package/lib/structure/ui/StructurePlaceholder.d.ts.map +1 -0
  632. package/lib/structure/ui/StructurePlaceholder.js +19 -0
  633. package/lib/structure/ui/StructurePlaceholder.js.map +1 -0
  634. package/lib/structure/ui/StructureSvg.d.ts +58 -0
  635. package/lib/structure/ui/StructureSvg.d.ts.map +1 -0
  636. package/lib/structure/ui/StructureSvg.js +33 -0
  637. package/lib/structure/ui/StructureSvg.js.map +1 -0
  638. package/lib/structure/ui/index.d.ts +19 -0
  639. package/lib/structure/ui/index.d.ts.map +1 -0
  640. package/lib/structure/ui/index.js +15 -0
  641. package/lib/structure/ui/index.js.map +1 -0
  642. package/lib/structure/ui/useToolbarFloor.d.ts +26 -0
  643. package/lib/structure/ui/useToolbarFloor.d.ts.map +1 -0
  644. package/lib/structure/ui/useToolbarFloor.js +70 -0
  645. package/lib/structure/ui/useToolbarFloor.js.map +1 -0
  646. package/lib/structure.d.ts +3 -0
  647. package/lib/structure.d.ts.map +1 -0
  648. package/lib/structure.js +3 -0
  649. package/lib/structure.js.map +1 -0
  650. package/lib/ui.d.ts +13 -0
  651. package/lib/ui.d.ts.map +1 -1
  652. package/lib/ui.js +13 -0
  653. package/lib/ui.js.map +1 -1
  654. package/lib/vite.d.ts +2 -0
  655. package/lib/vite.d.ts.map +1 -0
  656. package/lib/vite.js +2 -0
  657. package/lib/vite.js.map +1 -0
  658. package/lib/worker/core/errors.d.ts +15 -0
  659. package/lib/worker/core/errors.d.ts.map +1 -0
  660. package/lib/worker/core/errors.js +15 -0
  661. package/lib/worker/core/errors.js.map +1 -0
  662. package/lib/worker/core/index.d.ts +5 -0
  663. package/lib/worker/core/index.d.ts.map +1 -0
  664. package/lib/worker/core/index.js +3 -0
  665. package/lib/worker/core/index.js.map +1 -0
  666. package/lib/worker/core/messages.d.ts +48 -0
  667. package/lib/worker/core/messages.d.ts.map +1 -0
  668. package/lib/worker/core/messages.js +2 -0
  669. package/lib/worker/core/messages.js.map +1 -0
  670. package/lib/worker/core/workerChannel.d.ts +69 -0
  671. package/lib/worker/core/workerChannel.d.ts.map +1 -0
  672. package/lib/worker/core/workerChannel.js +121 -0
  673. package/lib/worker/core/workerChannel.js.map +1 -0
  674. package/package.json +22 -4
  675. package/src/capsule/ui/CapsuleFilter.tsx +119 -0
  676. package/src/capsule/ui/index.ts +2 -0
  677. package/src/chrome/ui/NavLink.tsx +88 -0
  678. package/src/chrome/ui/NavMenuButton.tsx +95 -0
  679. package/src/chrome/ui/SiteFooter.tsx +65 -0
  680. package/src/chrome/ui/SiteHeader.tsx +119 -0
  681. package/src/chrome/ui/index.ts +11 -0
  682. package/src/chrome/ui/navItem.ts +60 -0
  683. package/src/chrome/ui/useCompactHeader.ts +81 -0
  684. package/src/citation/core/clipboard.ts +27 -11
  685. package/src/citation/core/download.ts +25 -15
  686. package/src/citation/core/index.ts +8 -3
  687. package/src/citation/core/works.ts +81 -0
  688. package/src/citation/ui/CitationMenu.tsx +104 -89
  689. package/src/citation/ui/CitationPreview.tsx +18 -8
  690. package/src/citation/ui/CiteButton.tsx +24 -9
  691. package/src/citation/ui/CopyFormatEntries.tsx +84 -0
  692. package/src/citation/ui/WorkEntry.tsx +80 -0
  693. package/src/citation/ui/entries.tsx +18 -20
  694. package/src/citation/ui/index.ts +10 -2
  695. package/src/citation/ui/useCopyFeedback.ts +76 -0
  696. package/src/clipboard/core/index.ts +1 -0
  697. package/src/clipboard/core/writeToClipboard.ts +47 -0
  698. package/src/clipboard/ui/CodeBlock.tsx +110 -0
  699. package/src/clipboard/ui/CopyButton.tsx +111 -0
  700. package/src/clipboard/ui/index.ts +9 -0
  701. package/src/clipboard/ui/useCopyToClipboard.ts +57 -0
  702. package/src/color/core/contrast.ts +85 -0
  703. package/src/color/core/hex.ts +57 -0
  704. package/src/color/core/index.ts +4 -0
  705. package/src/color/core/scale.ts +132 -0
  706. package/src/color/ui/ColorScaleLegend.tsx +144 -0
  707. package/src/color/ui/index.ts +2 -0
  708. package/src/core.ts +11 -0
  709. package/src/credits/core/credits.ts +183 -0
  710. package/src/credits/core/index.ts +2 -0
  711. package/src/credits/ui/CreditsList.tsx +82 -0
  712. package/src/credits/ui/index.ts +2 -0
  713. package/src/delimited/core/delimiters.ts +64 -0
  714. package/src/delimited/core/index.ts +11 -0
  715. package/src/delimited/core/readDelimited.ts +132 -0
  716. package/src/delimited/core/rowsToDelimited.ts +135 -0
  717. package/src/delimited/core/toDelimited.ts +69 -0
  718. package/src/delimited/ui/DelimitedTextDialog.tsx +49 -0
  719. package/src/delimited/ui/DelimitedTextPanel.tsx +161 -0
  720. package/src/delimited/ui/index.ts +4 -0
  721. package/src/disclosure/ui/CollapsibleSection.tsx +150 -0
  722. package/src/disclosure/ui/index.ts +4 -0
  723. package/src/disclosure/ui/useDisclosure.ts +35 -0
  724. package/src/download/core/downloadBlob.ts +19 -0
  725. package/src/download/core/downloadText.ts +19 -0
  726. package/src/download/core/index.ts +3 -0
  727. package/src/download/core/sanitizeFileName.ts +33 -0
  728. package/src/ecosystem/core/index.ts +3 -0
  729. package/src/ecosystem/core/links.ts +29 -0
  730. package/src/ecosystem/core/lookup.ts +57 -0
  731. package/src/ecosystem/core/sites.ts +21 -4
  732. package/src/ecosystem/core/tokens.ts +47 -0
  733. package/src/ecosystem/ui/SiteTheme.tsx +23 -0
  734. package/src/ecosystem/ui/Wordmark.tsx +65 -0
  735. package/src/ecosystem/ui/glyphs.tsx +1 -1
  736. package/src/ecosystem/ui/index.ts +4 -0
  737. package/src/ecosystem/ui/marks.tsx +54 -15
  738. package/src/error/ui/ErrorBoundary.tsx +94 -0
  739. package/src/error/ui/ErrorFallback.tsx +64 -0
  740. package/src/error/ui/index.ts +4 -0
  741. package/src/error/ui/toError.ts +33 -0
  742. package/src/format/core/index.ts +9 -0
  743. package/src/format/core/missing.ts +6 -0
  744. package/src/format/core/numbers.ts +84 -0
  745. package/src/format/core/units.ts +60 -0
  746. package/src/format/core/words.ts +17 -0
  747. package/src/help/ui/HelpBody.tsx +130 -0
  748. package/src/help/ui/HelpIcon.tsx +53 -0
  749. package/src/help/ui/HelpToolbarButton.tsx +72 -0
  750. package/src/help/ui/HelpTooltip.tsx +72 -0
  751. package/src/help/ui/index.ts +8 -0
  752. package/src/hooks/ui/index.ts +6 -0
  753. package/src/hooks/ui/listNavigation.ts +116 -0
  754. package/src/hooks/ui/useContainerSize.ts +32 -0
  755. package/src/hooks/ui/useDebouncedValue.ts +29 -0
  756. package/src/hooks/ui/useListKeyboardNavigation.ts +37 -0
  757. package/src/hooks/ui/useResizeObserver.ts +50 -0
  758. package/src/orbital/core/atomicGrid.ts +53 -1
  759. package/src/orbital/core/index.ts +7 -16
  760. package/src/orbital/core/isovalue.ts +146 -0
  761. package/src/orbital/core/sample.ts +25 -5
  762. package/src/orbital/ui/AtomicOrbitalCanvas.tsx +19 -3
  763. package/src/orbital/ui/AtomicOrbitalViewer.tsx +5 -1
  764. package/src/orbital/ui/renderVolume.ts +29 -16
  765. package/src/orbital/ui/viewer.ts +6 -1
  766. package/src/orbital/ui/volumeField.ts +5 -49
  767. package/src/pedagogy/core/glossary.ts +122 -0
  768. package/src/pedagogy/core/index.ts +28 -0
  769. package/src/pedagogy/core/jsonStorage.ts +51 -0
  770. package/src/pedagogy/core/progress.ts +205 -0
  771. package/src/pedagogy/core/types.ts +78 -0
  772. package/src/pedagogy/core/validation.ts +109 -0
  773. package/src/pedagogy/ui/ExerciseActions.tsx +129 -0
  774. package/src/pedagogy/ui/ExerciseProgressHeader.tsx +135 -0
  775. package/src/pedagogy/ui/ExerciseTags.tsx +85 -0
  776. package/src/pedagogy/ui/GlossaryProvider.tsx +31 -0
  777. package/src/pedagogy/ui/GlossaryText.tsx +164 -0
  778. package/src/pedagogy/ui/HintLadder.tsx +95 -0
  779. package/src/pedagogy/ui/ReferenceGrid.tsx +69 -0
  780. package/src/pedagogy/ui/ReferenceSectionBlock.tsx +175 -0
  781. package/src/pedagogy/ui/SyntaxTooltip.tsx +222 -0
  782. package/src/pedagogy/ui/TestCaseList.tsx +122 -0
  783. package/src/pedagogy/ui/TutorialStepStrip.tsx +230 -0
  784. package/src/pedagogy/ui/exerciseMeta.ts +45 -0
  785. package/src/pedagogy/ui/glossaryContext.ts +23 -0
  786. package/src/pedagogy/ui/index.ts +37 -0
  787. package/src/pedagogy/ui/tutorialLevels.ts +27 -0
  788. package/src/router/core/address.ts +74 -0
  789. package/src/router/core/basePath.ts +76 -0
  790. package/src/router/core/index.ts +26 -0
  791. package/src/router/core/legacyHash.ts +77 -0
  792. package/src/router/core/pageAddresses.ts +106 -0
  793. package/src/router/core/query.ts +87 -0
  794. package/src/router/core/tabRouter.ts +214 -0
  795. package/src/seo/core/documentMeta.ts +92 -0
  796. package/src/seo/core/index.ts +26 -0
  797. package/src/seo/core/pageMeta.ts +127 -0
  798. package/src/seo/core/routes.ts +79 -0
  799. package/src/seo/core/siteFiles.ts +150 -0
  800. package/src/seo/vite/index.ts +4 -0
  801. package/src/seo/vite/ogCard.ts +92 -0
  802. package/src/seo/vite/prerender.ts +156 -0
  803. package/src/share/core/config.ts +165 -0
  804. package/src/share/core/escape.ts +22 -0
  805. package/src/share/core/index.ts +31 -0
  806. package/src/share/core/params.ts +176 -0
  807. package/src/share/core/query.ts +72 -0
  808. package/src/share/core/url.ts +105 -0
  809. package/src/share/core/vocabulary.ts +60 -0
  810. package/src/share/ui/HiddenPartsProvider.tsx +34 -0
  811. package/src/share/ui/PagePart.tsx +26 -0
  812. package/src/share/ui/ShareButton.tsx +84 -0
  813. package/src/share/ui/ShareDialog.tsx +114 -0
  814. package/src/share/ui/ShareDialogContent.tsx +189 -0
  815. package/src/share/ui/SharePartOptions.tsx +51 -0
  816. package/src/share/ui/draft.ts +19 -0
  817. package/src/share/ui/hiddenParts.ts +22 -0
  818. package/src/share/ui/index.ts +9 -0
  819. package/src/shared/ui/index.ts +2 -1
  820. package/src/state/ui/index.ts +6 -0
  821. package/src/state/ui/mergeStored.ts +87 -0
  822. package/src/state/ui/persistBucket.ts +147 -0
  823. package/src/structure/core/editorValue.ts +116 -0
  824. package/src/structure/core/fragmentQuery.ts +50 -0
  825. package/src/structure/core/index.ts +13 -0
  826. package/src/structure/core/molfile.ts +90 -0
  827. package/src/structure/core/readStructure.ts +73 -0
  828. package/src/structure/core/structureSource.ts +57 -0
  829. package/src/structure/core/toolbarFloor.ts +31 -0
  830. package/src/structure/ui/EditorCanvas.tsx +130 -0
  831. package/src/structure/ui/Structure.tsx +183 -0
  832. package/src/structure/ui/StructureEditor.tsx +196 -0
  833. package/src/structure/ui/StructurePlaceholder.tsx +48 -0
  834. package/src/structure/ui/StructureSvg.tsx +110 -0
  835. package/src/structure/ui/index.ts +22 -0
  836. package/src/structure/ui/useToolbarFloor.ts +93 -0
  837. package/src/structure.ts +2 -0
  838. package/src/ui.ts +13 -0
  839. package/src/vite.ts +1 -0
  840. package/src/worker/core/errors.ts +15 -0
  841. package/src/worker/core/index.ts +8 -0
  842. package/src/worker/core/messages.ts +47 -0
  843. package/src/worker/core/workerChannel.ts +218 -0
  844. package/styles/chrome.css +223 -0
@@ -0,0 +1,25 @@
1
+ import { useCallback } from 'react';
2
+ import { handleListNavigationKey } from "./listNavigation.js";
3
+ /**
4
+ * Keyboard navigation for a list or a table whose selection lives outside it.
5
+ *
6
+ * Put the returned handler on the scrolling container — which needs a
7
+ * `tabIndex` so it can hold the focus — and `ArrowUp` / `ArrowDown` move one
8
+ * entry, `PageUp` / `PageDown` move `pageStep`, and `Home` / `End` jump to the
9
+ * ends. Nothing is stored in the hook: the selection stays wherever the page
10
+ * already keeps it, and `onSelect` fires only when the index actually changes.
11
+ * @param options - See {@link ListNavigationHandlerOptions}.
12
+ * @returns The `onKeyDown` handler for the container.
13
+ */
14
+ export function useListKeyboardNavigation(options) {
15
+ const { length, selectedIndex, onSelect, pageStep } = options;
16
+ return useCallback((event) => {
17
+ handleListNavigationKey(event, {
18
+ length,
19
+ selectedIndex,
20
+ onSelect,
21
+ pageStep,
22
+ });
23
+ }, [length, selectedIndex, onSelect, pageStep]);
24
+ }
25
+ //# sourceMappingURL=useListKeyboardNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useListKeyboardNavigation.js","sourceRoot":"","sources":["../../../src/hooks/ui/useListKeyboardNavigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAK9D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAsC;IAEtC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAE9D,OAAO,WAAW,CAChB,CAAC,KAAiC,EAAE,EAAE;QACpC,uBAAuB,CAAC,KAAK,EAAE;YAC7B,MAAM;YACN,aAAa;YACb,QAAQ;YACR,QAAQ;SACT,CAAC,CAAC;IACL,CAAC,EACD,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAC5C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { RefObject } from 'react';
2
+ /** The content-box size of an element, in CSS pixels. */
3
+ export interface ElementSize {
4
+ /** Content-box width. */
5
+ width: number;
6
+ /** Content-box height. */
7
+ height: number;
8
+ }
9
+ /**
10
+ * Call `callback` whenever the observed element's content box changes size.
11
+ *
12
+ * The callback is read through a ref, so an inline arrow function may be
13
+ * passed on every render without tearing the observer down and setting it up
14
+ * again. Nothing is observed where `ResizeObserver` is missing — a server
15
+ * render, or a test rendering to a string — so the hook is safe to call there.
16
+ * @param ref - Ref holding the element to watch.
17
+ * @param callback - Receives the new content-box size.
18
+ */
19
+ export declare function useResizeObserver(ref: RefObject<Element | null>, callback: (size: ElementSize) => void): void;
20
+ //# sourceMappingURL=useResizeObserver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../src/hooks/ui/useResizeObserver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,yDAAyD;AACzD,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,EAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,GACpC,IAAI,CAyBN"}
@@ -0,0 +1,37 @@
1
+ import { useEffect, useRef } from 'react';
2
+ /**
3
+ * Call `callback` whenever the observed element's content box changes size.
4
+ *
5
+ * The callback is read through a ref, so an inline arrow function may be
6
+ * passed on every render without tearing the observer down and setting it up
7
+ * again. Nothing is observed where `ResizeObserver` is missing — a server
8
+ * render, or a test rendering to a string — so the hook is safe to call there.
9
+ * @param ref - Ref holding the element to watch.
10
+ * @param callback - Receives the new content-box size.
11
+ */
12
+ export function useResizeObserver(ref, callback) {
13
+ const callbackRef = useRef(callback);
14
+ useEffect(() => {
15
+ callbackRef.current = callback;
16
+ });
17
+ useEffect(() => {
18
+ const element = ref.current;
19
+ const Observer = globalThis.ResizeObserver;
20
+ if (element === null || Observer === undefined)
21
+ return;
22
+ const observer = new Observer((entries) => {
23
+ const entry = entries.at(-1);
24
+ if (entry === undefined)
25
+ return;
26
+ callbackRef.current({
27
+ width: entry.contentRect.width,
28
+ height: entry.contentRect.height,
29
+ });
30
+ });
31
+ observer.observe(element);
32
+ return () => {
33
+ observer.disconnect();
34
+ };
35
+ }, [ref]);
36
+ }
37
+ //# sourceMappingURL=useResizeObserver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResizeObserver.js","sourceRoot":"","sources":["../../../src/hooks/ui/useResizeObserver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAU1C;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAA8B,EAC9B,QAAqC;IAErC,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAErC,SAAS,CAAC,GAAG,EAAE;QACb,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC5B,MAAM,QAAQ,GAAG,UAAU,CAAC,cACO,CAAC;QACpC,IAAI,OAAO,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO;QACvD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7B,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO;YAChC,WAAW,CAAC,OAAO,CAAC;gBAClB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK;gBAC9B,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM;aACjC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,UAAU,EAAE,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,CAAC"}
@@ -55,4 +55,31 @@ export declare function createAtomicOrbitalEvaluator(orbital: AtomicOrbital): Or
55
55
  * @returns A cube centred on the nucleus.
56
56
  */
57
57
  export declare function atomicGridBox(orbital: AtomicOrbital, enclosedFraction?: number, padding?: number): GridBox;
58
+ /** How finely one orbital may be sampled, whatever its shape asks for. */
59
+ export interface ResolutionLimits {
60
+ /** Samples per edge no orbital drops below. */
61
+ floor: number;
62
+ /** Samples per edge no orbital exceeds. */
63
+ cap: number;
64
+ }
65
+ /**
66
+ * How finely this particular orbital has to be sampled.
67
+ *
68
+ * One resolution for a whole periodic table draws the nested orbitals badly.
69
+ * The box is sized by the outermost lobe, but a `4p` also has to separate two
70
+ * inner shells packed against the nucleus, and at 56 samples per edge xenon's
71
+ * innermost 4p lobe spans **6.6 voxels** while the outer one spans 41 — the
72
+ * inner shells come out as lumps and the outer surface visibly faceted. What
73
+ * sets the requirement is therefore the ratio between the box and the smallest
74
+ * feature in it, not the orbital's size, which is why a nodeless orbital
75
+ * (every `1s`, `2p`, `3d`, `4f`) stays on the floor and costs nothing extra.
76
+ *
77
+ * The cap is not a budget cheat: the innermost lobe of caesium's `7s` would
78
+ * need 858 samples per edge, and no uniform grid the browser can afford
79
+ * resolves it. Those orbitals are drawn as well as the cap allows.
80
+ * @param orbital - The orbital to draw.
81
+ * @param limits - See {@link ResolutionLimits}.
82
+ * @returns Samples along each edge of the cube.
83
+ */
84
+ export declare function atomicGridResolution(orbital: AtomicOrbital, limits: ResolutionLimits): number;
58
85
  //# sourceMappingURL=atomicGrid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"atomicGrid.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/atomicGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxE,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,iBAAsB,GAC9B,WAAW,CAWb;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,GACrB,gBAAgB,CAalB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,gBAAgB,SAA4B,EAC5C,OAAO,SAAkB,GACxB,OAAO,CAQT"}
1
+ {"version":3,"file":"atomicGrid.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/atomicGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAQxE,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,iBAAsB,GAC9B,WAAW,CAWb;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,GACrB,gBAAgB,CAalB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,gBAAgB,SAA4B,EAC5C,OAAO,SAAkB,GACxB,OAAO,CAQT;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,gBAAgB,GACvB,MAAM,CAUR"}
@@ -13,7 +13,7 @@
13
13
  */
14
14
  import { hydrogenicParametersOf } from "./atomicOrbitals.js";
15
15
  import { evaluateGrid } from "./grid.js";
16
- import { createRadialFunction, enclosingRadius } from "./hydrogenic.js";
16
+ import { createRadialFunction, enclosingRadius, radialNodeRadii, } from "./hydrogenic.js";
17
17
  /**
18
18
  * Sample an atomic orbital onto a cubic grid centred on its nucleus.
19
19
  * @param orbital - The orbital to draw.
@@ -60,8 +60,44 @@ export function atomicGridBox(orbital, enclosedFraction = DEFAULT_ENCLOSED_FRACT
60
60
  size: { x: 2 * half, y: 2 * half, z: 2 * half },
61
61
  };
62
62
  }
63
+ /**
64
+ * How finely this particular orbital has to be sampled.
65
+ *
66
+ * One resolution for a whole periodic table draws the nested orbitals badly.
67
+ * The box is sized by the outermost lobe, but a `4p` also has to separate two
68
+ * inner shells packed against the nucleus, and at 56 samples per edge xenon's
69
+ * innermost 4p lobe spans **6.6 voxels** while the outer one spans 41 — the
70
+ * inner shells come out as lumps and the outer surface visibly faceted. What
71
+ * sets the requirement is therefore the ratio between the box and the smallest
72
+ * feature in it, not the orbital's size, which is why a nodeless orbital
73
+ * (every `1s`, `2p`, `3d`, `4f`) stays on the floor and costs nothing extra.
74
+ *
75
+ * The cap is not a budget cheat: the innermost lobe of caesium's `7s` would
76
+ * need 858 samples per edge, and no uniform grid the browser can afford
77
+ * resolves it. Those orbitals are drawn as well as the cap allows.
78
+ * @param orbital - The orbital to draw.
79
+ * @param limits - See {@link ResolutionLimits}.
80
+ * @returns Samples along each edge of the cube.
81
+ */
82
+ export function atomicGridResolution(orbital, limits) {
83
+ const { floor, cap } = limits;
84
+ const parameters = hydrogenicParametersOf(orbital);
85
+ const innermost = radialNodeRadii(parameters)[0];
86
+ if (innermost === undefined || !(innermost > 0))
87
+ return Math.min(floor, cap);
88
+ const half = atomicGridBox(orbital).size.x / 2;
89
+ // The samples span the box edge to edge, so `resolution - 1` of them cover
90
+ // it: a lobe of radius r gets `r (resolution - 1) / half` across its diameter.
91
+ const needed = Math.ceil((INNER_LOBE_SAMPLES * half) / innermost) + 1;
92
+ return Math.min(cap, Math.max(floor, needed));
93
+ }
63
94
  /** Samples per edge; the cost is the cube of it. */
64
95
  const DEFAULT_RESOLUTION = 56;
96
+ /**
97
+ * Samples the innermost radial lobe is asked to span, edge to edge. Below
98
+ * about eight, marching cubes turns a sphere into a faceted blob.
99
+ */
100
+ const INNER_LOBE_SAMPLES = 12;
65
101
  /** A tail past this holds too little density to change the surface. */
66
102
  const DEFAULT_ENCLOSED_FRACTION = 0.985;
67
103
  /** Room for the surface to close before the box ends. */
@@ -1 +1 @@
1
- {"version":3,"file":"atomicGrid.js","sourceRoot":"","sources":["../../../src/orbital/core/atomicGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAuBxE;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAsB,EACtB,UAA6B,EAAE;IAE/B,MAAM,EACJ,UAAU,GAAG,kBAAkB,EAC/B,gBAAgB,GAAG,yBAAyB,EAC5C,OAAO,GAAG,eAAe,GAC1B,GAAG,OAAO,CAAC;IACZ,OAAO,YAAY,CACjB,4BAA4B,CAAC,OAAO,CAAC,EACrC,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,EACjD,UAAU,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAC1C,OAAsB;IAEtB,MAAM,MAAM,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC1C,8EAA8E;IAC9E,6EAA6E;IAC7E,kDAAkD;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,KAAK,C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3E,+EAA+E;IAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAChD,CAAC;AAED,oDAAoD;AACpD,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;GAGG;AACH,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,uEAAuE;AACvE,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAExC,yDAAyD;AACzD,MAAM,eAAe,GAAG,IAAI,CAAC"}
@@ -1,13 +1,15 @@
1
- export type { AtomicGridOptions } from './atomicGrid.ts';
2
- export { atomicGridBox, createAtomicOrbitalEvaluator, sampleAtomicOrbital, } from './atomicGrid.ts';
1
+ export type { ResolutionLimits } from './atomicGrid.ts';
2
+ export { atomicGridResolution } from './atomicGrid.ts';
3
3
  export type { AtomicOrbital, AtomicOrbitalOptions } from './atomicOrbitals.ts';
4
- export { atomicOrbitalsOf, defaultOrbitalId, findAtomicOrbital, hydrogenicParametersOf, orbitalId, } from './atomicOrbitals.ts';
4
+ export { atomicOrbitalsOf, defaultOrbitalId, findAtomicOrbital, hydrogenicParametersOf, } from './atomicOrbitals.ts';
5
5
  export type { Vec3 } from './constants.ts';
6
- export { BOHR_IN_ANGSTROM, ENCLOSED_WEIGHT, RYDBERG_ELECTRONVOLTS, } from './constants.ts';
6
+ export { BOHR_IN_ANGSTROM, RYDBERG_ELECTRONVOLTS } from './constants.ts';
7
7
  export type { Subshell, SubshellOccupancy } from './electronConfiguration.ts';
8
- export { ELEMENT_ANOMALIES, HIGHEST_ATOMIC_NUMBER, MADELUNG_ORDER, NOBLE_GASES, assertAtomicNumber, aufbauConfigurationOf, configurationOf, coreAtomicNumber, formatConfiguration, formatOccupancy, isAnomalous, subshellCapacity, subshellLabel, superscript, } from './electronConfiguration.ts';
8
+ export { ELEMENT_ANOMALIES, HIGHEST_ATOMIC_NUMBER, MADELUNG_ORDER, NOBLE_GASES, aufbauConfigurationOf, configurationOf, coreAtomicNumber, formatConfiguration, formatOccupancy, isAnomalous, subshellCapacity, subshellLabel, } from './electronConfiguration.ts';
9
9
  export type { GridBox, OrbitalEvaluator, OrbitalGrid } from './grid.ts';
10
10
  export { evaluateGrid, gridIndex } from './grid.ts';
11
+ export type { OrbitalContour } from './isovalue.ts';
12
+ export { enclosedReach, isocontourCutoff, orbitalContour } from './isovalue.ts';
11
13
  export type { HydrogenicParameters } from './hydrogenic.ts';
12
14
  export { createRadialFunction, enclosingRadius, meanRadius, orbitalEnergy, radialAmplitude, radialNodeCount, radialNodeRadii, radialProfile, } from './hydrogenic.ts';
13
15
  export { hundDistribution, outermostShell, withoutOutermostElectron, } from './occupancy.ts';
@@ -16,7 +18,7 @@ export { DEFAULT_PHASE_PALETTE_ID, PHASE_PALETTES } from './palette.ts';
16
18
  export type { RealHarmonic } from './realHarmonics.ts';
17
19
  export { REAL_HARMONICS, SUBSHELL_LETTERS, harmonicsOf, subshellLetter, } from './realHarmonics.ts';
18
20
  export type { AtomicSampleRequest, AtomicSampleResult, AtomicSampler, } from './sample.ts';
19
- export { runAtomicSample, sampleInProcess } from './sample.ts';
21
+ export { runAtomicSample } from './sample.ts';
20
22
  export type { Screening } from './screening.ts';
21
- export { groupRank, slaterScreening } from './screening.ts';
23
+ export { slaterScreening } from './screening.ts';
22
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,oBAA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AM,iBAAiB,CAAC;AAC5D,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACxE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,12 +1,13 @@
1
- export { atomicGridBox, createAtomicOrbitalEvaluator, sampleAtomicOrbital, } from "./atomicGrid.js";
2
- export { atomicOrbitalsOf, defaultOrbitalId, findAtomicOrbital, hydrogenicParametersOf, orbitalId, } from "./atomicOrbitals.js";
3
- export { BOHR_IN_ANGSTROM, ENCLOSED_WEIGHT, RYDBERG_ELECTRONVOLTS, } from "./constants.js";
4
- export { ELEMENT_ANOMALIES, HIGHEST_ATOMIC_NUMBER, MADELUNG_ORDER, NOBLE_GASES, assertAtomicNumber, aufbauConfigurationOf, configurationOf, coreAtomicNumber, formatConfiguration, formatOccupancy, isAnomalous, subshellCapacity, subshellLabel, superscript, } from "./electronConfiguration.js";
1
+ export { atomicGridResolution } from "./atomicGrid.js";
2
+ export { atomicOrbitalsOf, defaultOrbitalId, findAtomicOrbital, hydrogenicParametersOf, } from "./atomicOrbitals.js";
3
+ export { BOHR_IN_ANGSTROM, RYDBERG_ELECTRONVOLTS } from "./constants.js";
4
+ export { ELEMENT_ANOMALIES, HIGHEST_ATOMIC_NUMBER, MADELUNG_ORDER, NOBLE_GASES, aufbauConfigurationOf, configurationOf, coreAtomicNumber, formatConfiguration, formatOccupancy, isAnomalous, subshellCapacity, subshellLabel, } from "./electronConfiguration.js";
5
5
  export { evaluateGrid, gridIndex } from "./grid.js";
6
+ export { enclosedReach, isocontourCutoff, orbitalContour } from "./isovalue.js";
6
7
  export { createRadialFunction, enclosingRadius, meanRadius, orbitalEnergy, radialAmplitude, radialNodeCount, radialNodeRadii, radialProfile, } from "./hydrogenic.js";
7
8
  export { hundDistribution, outermostShell, withoutOutermostElectron, } from "./occupancy.js";
8
9
  export { DEFAULT_PHASE_PALETTE_ID, PHASE_PALETTES } from "./palette.js";
9
10
  export { REAL_HARMONICS, SUBSHELL_LETTERS, harmonicsOf, subshellLetter, } from "./realHarmonics.js";
10
- export { runAtomicSample, sampleInProcess } from "./sample.js";
11
- export { groupRank, slaterScreening } from "./screening.js";
11
+ export { runAtomicSample } from "./sample.js";
12
+ export { slaterScreening } from "./screening.js";
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/orbital/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,WAAW,GACZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,cAAc,GACf,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/orbital/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,aAAa,GACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,cAAc,GACf,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Choosing the value a signed wavefunction's isosurface is drawn at.
3
+ *
4
+ * The surface is named by how much of the electron it holds, not by an
5
+ * amplitude: `ENCLOSED_WEIGHT` of `∫|ψ|² dV` inside it and the tail
6
+ * outside. On a uniform grid that is a weighted quantile of the samples, and
7
+ * the isovalue is the `|ψ|` at which the quantile falls.
8
+ *
9
+ * molstar ships `computeOrbitalIsocontourValues` for the same job, and it
10
+ * cannot be used here. It abandons any field whose mean `ψ²` is under an
11
+ * absolute `1e-5` and returns no isovalue at all — a guard against degenerate
12
+ * data that instead reads the amplitude *scale*. Amplitudes are Å^(-3/2), so a
13
+ * diffuse orbital is normalised straight into that range and draws nothing:
14
+ * caesium's 6s reaches 13 Å, and 2588 of the 7460 orbitals lcao.cheminfo.org
15
+ * offers came back blank. A quantile has no scale of its own and cannot.
16
+ *
17
+ * Every pass below touches each of the million-odd samples, so all of them are
18
+ * indexed loops: `for…of` over a `Float32Array` measures 6.7× slower.
19
+ */
20
+ import type { OrbitalGrid } from './grid.ts';
21
+ /**
22
+ * The `|ψ|` whose surface encloses a given share of the sampled electron.
23
+ * @param data - The sampled amplitudes.
24
+ * @param enclosedWeight - Share of `∑ψ²` to hold inside, between 0 and 1.
25
+ * @returns The isovalue, or 0 when the field is empty — a nodeless orbital
26
+ * sampled where it has no amplitude at all.
27
+ * @throws {Error} When `enclosedWeight` is outside `(0, 1)`.
28
+ */
29
+ export declare function isocontourCutoff(data: Float32Array, enclosedWeight?: number): number;
30
+ /**
31
+ * How far from the centre of the box the drawn surface actually reaches.
32
+ *
33
+ * Molstar sizes a volume representation's bounding sphere from the whole
34
+ * sampled box, which is deliberately larger than the isosurface inside it, so a
35
+ * camera framing that sphere leaves the orbital a quarter of the frame wide.
36
+ * Measuring the samples that are really enclosed gives the camera the extent it
37
+ * has to fill.
38
+ * @param field - The sampled field.
39
+ * @param cutoff - The isovalue the surfaces are drawn at.
40
+ * @returns The reach in ångström, or 0 when nothing is enclosed.
41
+ */
42
+ export declare function enclosedReach(field: OrbitalGrid, cutoff: number): number;
43
+ /** Which isovalue each phase is drawn at, and how far the pair reaches. */
44
+ export interface OrbitalContour {
45
+ /** `|ψ|` on the surface; 0 when there is nothing to draw. */
46
+ cutoff: number;
47
+ /** Distance from the centre of the box to the outermost enclosed sample. */
48
+ reach: number;
49
+ }
50
+ /**
51
+ * The isovalue and the extent of one sampled orbital's surface pair.
52
+ *
53
+ * Both phases come from one cutoff, so they can never disagree about where the
54
+ * node between them is.
55
+ * @param field - The sampled field.
56
+ * @param enclosedWeight - Share of `∑ψ²` to hold inside.
57
+ * @returns See {@link OrbitalContour}.
58
+ */
59
+ export declare function orbitalContour(field: OrbitalGrid, enclosedWeight?: number): OrbitalContour;
60
+ //# sourceMappingURL=isovalue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isovalue.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/isovalue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,YAAY,EAClB,cAAc,GAAE,MAAwB,GACvC,MAAM,CAwCR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAuBxE;AAED,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,WAAW,EAClB,cAAc,GAAE,MAAwB,GACvC,cAAc,CAGhB"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Choosing the value a signed wavefunction's isosurface is drawn at.
3
+ *
4
+ * The surface is named by how much of the electron it holds, not by an
5
+ * amplitude: `ENCLOSED_WEIGHT` of `∫|ψ|² dV` inside it and the tail
6
+ * outside. On a uniform grid that is a weighted quantile of the samples, and
7
+ * the isovalue is the `|ψ|` at which the quantile falls.
8
+ *
9
+ * molstar ships `computeOrbitalIsocontourValues` for the same job, and it
10
+ * cannot be used here. It abandons any field whose mean `ψ²` is under an
11
+ * absolute `1e-5` and returns no isovalue at all — a guard against degenerate
12
+ * data that instead reads the amplitude *scale*. Amplitudes are Å^(-3/2), so a
13
+ * diffuse orbital is normalised straight into that range and draws nothing:
14
+ * caesium's 6s reaches 13 Å, and 2588 of the 7460 orbitals lcao.cheminfo.org
15
+ * offers came back blank. A quantile has no scale of its own and cannot.
16
+ *
17
+ * Every pass below touches each of the million-odd samples, so all of them are
18
+ * indexed loops: `for…of` over a `Float32Array` measures 6.7× slower.
19
+ */
20
+ import { ENCLOSED_WEIGHT } from "./constants.js";
21
+ /**
22
+ * The `|ψ|` whose surface encloses a given share of the sampled electron.
23
+ * @param data - The sampled amplitudes.
24
+ * @param enclosedWeight - Share of `∑ψ²` to hold inside, between 0 and 1.
25
+ * @returns The isovalue, or 0 when the field is empty — a nodeless orbital
26
+ * sampled where it has no amplitude at all.
27
+ * @throws {Error} When `enclosedWeight` is outside `(0, 1)`.
28
+ */
29
+ export function isocontourCutoff(data, enclosedWeight = ENCLOSED_WEIGHT) {
30
+ if (!(enclosedWeight > 0) || enclosedWeight >= 1) {
31
+ throw new RangeError('the enclosed weight must be in (0, 1)');
32
+ }
33
+ let total = 0;
34
+ let peak = 0;
35
+ for (let index = data.length - 1; index >= 0; index--) {
36
+ const value = data[index];
37
+ const weight = value * value;
38
+ total += weight;
39
+ if (weight > peak)
40
+ peak = weight;
41
+ }
42
+ if (!(total > 0))
43
+ return 0;
44
+ // Bins are logarithmic because a wavefunction spans decades between its peak
45
+ // and its tail while the isovalue sits far below the peak: linear bins would
46
+ // drop every sample that decides the answer into the first one.
47
+ const bins = new Float64Array(BIN_COUNT);
48
+ const peakLogarithm = Math.log2(peak);
49
+ for (let index = data.length - 1; index >= 0; index--) {
50
+ const value = data[index];
51
+ const weight = value * value;
52
+ if (weight === 0)
53
+ continue;
54
+ const bin = Math.floor((peakLogarithm - Math.log2(weight)) * BINS_PER_OCTAVE);
55
+ const clamped = bin < 0 ? 0 : Math.min(bin, BIN_COUNT - 1);
56
+ bins[clamped] = bins[clamped] + weight;
57
+ }
58
+ const target = total * enclosedWeight;
59
+ let running = 0;
60
+ for (let bin = 0; bin < BIN_COUNT; bin++) {
61
+ running += bins[bin];
62
+ // Everything above this bin's lower edge is what has just been counted.
63
+ if (running >= target) {
64
+ return Math.sqrt(peak * 2 ** (-(bin + 1) / BINS_PER_OCTAVE));
65
+ }
66
+ }
67
+ return 0;
68
+ }
69
+ /**
70
+ * How far from the centre of the box the drawn surface actually reaches.
71
+ *
72
+ * Molstar sizes a volume representation's bounding sphere from the whole
73
+ * sampled box, which is deliberately larger than the isosurface inside it, so a
74
+ * camera framing that sphere leaves the orbital a quarter of the frame wide.
75
+ * Measuring the samples that are really enclosed gives the camera the extent it
76
+ * has to fill.
77
+ * @param field - The sampled field.
78
+ * @param cutoff - The isovalue the surfaces are drawn at.
79
+ * @returns The reach in ångström, or 0 when nothing is enclosed.
80
+ */
81
+ export function enclosedReach(field, cutoff) {
82
+ if (!(cutoff > 0))
83
+ return 0;
84
+ const { data, dimensions, origin, spacing } = field;
85
+ const [countX, countY, countZ] = dimensions;
86
+ const centreX = origin.x + ((countX - 1) * spacing) / 2;
87
+ const centreY = origin.y + ((countY - 1) * spacing) / 2;
88
+ const centreZ = origin.z + ((countZ - 1) * spacing) / 2;
89
+ let furthest = 0;
90
+ let index = 0;
91
+ for (let indexX = 0; indexX < countX; indexX++) {
92
+ const dx = origin.x + indexX * spacing - centreX;
93
+ for (let indexY = 0; indexY < countY; indexY++) {
94
+ const dy = origin.y + indexY * spacing - centreY;
95
+ for (let indexZ = 0; indexZ < countZ; indexZ++) {
96
+ const value = data[index++];
97
+ if (value < cutoff && value > -cutoff)
98
+ continue;
99
+ const dz = origin.z + indexZ * spacing - centreZ;
100
+ const squared = dx * dx + dy * dy + dz * dz;
101
+ if (squared > furthest)
102
+ furthest = squared;
103
+ }
104
+ }
105
+ }
106
+ return Math.sqrt(furthest);
107
+ }
108
+ /**
109
+ * The isovalue and the extent of one sampled orbital's surface pair.
110
+ *
111
+ * Both phases come from one cutoff, so they can never disagree about where the
112
+ * node between them is.
113
+ * @param field - The sampled field.
114
+ * @param enclosedWeight - Share of `∑ψ²` to hold inside.
115
+ * @returns See {@link OrbitalContour}.
116
+ */
117
+ export function orbitalContour(field, enclosedWeight = ENCLOSED_WEIGHT) {
118
+ const cutoff = isocontourCutoff(field.data, enclosedWeight);
119
+ return { cutoff, reach: enclosedReach(field, cutoff) };
120
+ }
121
+ /**
122
+ * Bins per doubling of `ψ²`, so the isovalue lands within 2.2% in `|ψ|`.
123
+ * Finer than the grid spacing can resolve on the surface it produces.
124
+ */
125
+ const BINS_PER_OCTAVE = 16;
126
+ /** 128 octaves of `ψ²`, far past the dynamic range of a sampled orbital. */
127
+ const BIN_COUNT = 2048;
128
+ //# sourceMappingURL=isovalue.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AG,OAAO,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;AAUD;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAkB,EAClB,iBAAyB,eAAe;IAExC,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAC5D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,4EAA4E;AAC5E,MAAM,SAAS,GAAG,IAAI,CAAC"}
@@ -10,7 +10,9 @@
10
10
  * implements this contract in a worker and hands `AtomicOrbitalViewer` the
11
11
  * `sample` prop; one that does not gets the in-process version for free.
12
12
  */
13
+ import type { ResolutionLimits } from './atomicGrid.ts';
13
14
  import type { OrbitalGrid } from './grid.ts';
15
+ import type { OrbitalContour } from './isovalue.ts';
14
16
  /** Which orbital to sample, and how finely. */
15
17
  export interface AtomicSampleRequest {
16
18
  /** Proton count, 1 to 118. */
@@ -19,14 +21,26 @@ export interface AtomicSampleRequest {
19
21
  orbitalId: string;
20
22
  /**
21
23
  * Samples along each edge of the cube. The cost is the cube of this.
24
+ *
25
+ * A number fixes the resolution. {@link ResolutionLimits} lets the orbital's
26
+ * own shape pick one between the two, which is what a nested orbital needs —
27
+ * see {@link atomicGridResolution}.
22
28
  * @default 56
23
29
  */
24
- resolution?: number;
30
+ resolution?: number | ResolutionLimits;
25
31
  }
26
32
  /** What one sampling job produces. */
27
33
  export interface AtomicSampleResult {
28
34
  /** The signed field, ready for an isosurface. */
29
35
  grid: OrbitalGrid;
36
+ /**
37
+ * The isovalue both phases are drawn at, and how far the pair reaches.
38
+ *
39
+ * Measured here rather than beside the renderer: both passes are O(samples),
40
+ * and at the resolutions a nested orbital asks for that is over a million of
41
+ * them on whichever thread runs this.
42
+ */
43
+ contour: OrbitalContour;
30
44
  /** Radii of the orbital's radial nodes, ångström, ascending. */
31
45
  nodeRadii: number[];
32
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB,gEAAgE;IAChE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAiBpB;AAED,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,aAK7B,CAAC"}
1
+ {"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAO3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACxC;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB;;;;;;OAMG;IACH,OAAO,EAAE,cAAc,CAAC;IACxB,gEAAgE;IAChE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAuBpB;AAED,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,aAK7B,CAAC"}
@@ -10,9 +10,10 @@
10
10
  * implements this contract in a worker and hands `AtomicOrbitalViewer` the
11
11
  * `sample` prop; one that does not gets the in-process version for free.
12
12
  */
13
- import { sampleAtomicOrbital } from "./atomicGrid.js";
13
+ import { atomicGridResolution, sampleAtomicOrbital } from "./atomicGrid.js";
14
14
  import { atomicOrbitalsOf, findAtomicOrbital, hydrogenicParametersOf, } from "./atomicOrbitals.js";
15
15
  import { radialNodeRadii } from "./hydrogenic.js";
16
+ import { orbitalContour } from "./isovalue.js";
16
17
  /**
17
18
  * Sample one atomic orbital onto a grid.
18
19
  *
@@ -32,10 +33,16 @@ export function runAtomicSample(request) {
32
33
  .join(', ')}.`);
33
34
  }
34
35
  const options = {};
35
- if (resolution !== undefined)
36
+ if (typeof resolution === 'number') {
36
37
  options.resolution = resolution;
38
+ }
39
+ else if (resolution !== undefined) {
40
+ options.resolution = atomicGridResolution(orbital, resolution);
41
+ }
42
+ const grid = sampleAtomicOrbital(orbital, options);
37
43
  return {
38
- grid: sampleAtomicOrbital(orbital, options),
44
+ grid,
45
+ contour: orbitalContour(grid),
39
46
  nodeRadii: radialNodeRadii(hydrogenicParametersOf(orbital)),
40
47
  };
41
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../src/orbital/core/sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAuBlD;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA4B;IAE5B,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACvD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,WAAW,YAAY,mBAAmB,SAAS,YAAY,QAAQ;aACpE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;aACxB,IAAI,CAAC,IAAI,CAAC,GAAG,CACjB,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAsB,EAAE,CAAC;IACtC,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9D,OAAO;QACL,IAAI,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC;QAC3C,SAAS,EAAE,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;KAC5D,CAAC;AACJ,CAAC;AAOD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkB,KAAK,EAAE,OAAO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AC;QACpC,OAAO,CAAC,UAAU,GAAG,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACjE,CAAC;IACD,MAAM,IAAI,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;QAC7B,SAAS,EAAE,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;KAC5D,CAAC;AACJ,CAAC;AAOD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkB,KAAK,EAAE,OAAO,EAAE,EAAE;IAC9D,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC5B,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC,CAAC"}
@@ -6,6 +6,7 @@
6
6
  * reason the two components are separate files.
7
7
  */
8
8
  import type { ReactElement } from 'react';
9
+ import type { ResolutionLimits } from '../core/atomicGrid.ts';
9
10
  import type { PhasePalette } from '../core/palette.ts';
10
11
  import type { AtomicSampler } from '../core/sample.ts';
11
12
  /** Props of {@link AtomicOrbitalCanvas}. */
@@ -21,9 +22,13 @@ export interface AtomicOrbitalCanvasProps {
21
22
  palette?: PhasePalette;
22
23
  /**
23
24
  * Samples along each edge of the cube; the cost is the cube of it.
25
+ *
26
+ * A number fixes it. A {@link ResolutionLimits} pair lets each orbital's own
27
+ * shape pick a resolution between the two, which is what the orbitals with
28
+ * inner shells packed against the nucleus need.
24
29
  * @default 56
25
30
  */
26
- resolution?: number;
31
+ resolution?: number | ResolutionLimits;
27
32
  /**
28
33
  * Whether the scene turns on its own, which is what makes a still screenshot
29
34
  * of a 3D shape readable.
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicOrbitalCanvas.d.ts","sourceRoot":"","sources":["../../../src/orbital/ui/AtomicOrbit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