react-cheminfo 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.
- package/README.md +139 -10
- package/lib/capsule/ui/CapsuleFilter.d.ts +61 -0
- package/lib/capsule/ui/CapsuleFilter.d.ts.map +1 -0
- package/lib/capsule/ui/CapsuleFilter.js +33 -0
- package/lib/capsule/ui/CapsuleFilter.js.map +1 -0
- package/lib/capsule/ui/index.d.ts +3 -0
- package/lib/capsule/ui/index.d.ts.map +1 -0
- package/lib/capsule/ui/index.js +2 -0
- package/lib/capsule/ui/index.js.map +1 -0
- package/lib/chrome/ui/NavLink.d.ts +27 -0
- package/lib/chrome/ui/NavLink.d.ts.map +1 -0
- package/lib/chrome/ui/NavLink.js +36 -0
- package/lib/chrome/ui/NavLink.js.map +1 -0
- package/lib/chrome/ui/NavMenuButton.d.ts +40 -0
- package/lib/chrome/ui/NavMenuButton.d.ts.map +1 -0
- package/lib/chrome/ui/NavMenuButton.js +26 -0
- package/lib/chrome/ui/NavMenuButton.js.map +1 -0
- package/lib/chrome/ui/SiteFooter.d.ts +39 -0
- package/lib/chrome/ui/SiteFooter.d.ts.map +1 -0
- package/lib/chrome/ui/SiteFooter.js +17 -0
- package/lib/chrome/ui/SiteFooter.js.map +1 -0
- package/lib/chrome/ui/SiteHeader.d.ts +59 -0
- package/lib/chrome/ui/SiteHeader.d.ts.map +1 -0
- package/lib/chrome/ui/SiteHeader.js +28 -0
- package/lib/chrome/ui/SiteHeader.js.map +1 -0
- package/lib/chrome/ui/index.d.ts +12 -0
- package/lib/chrome/ui/index.d.ts.map +1 -0
- package/lib/chrome/ui/index.js +6 -0
- package/lib/chrome/ui/index.js.map +1 -0
- package/lib/chrome/ui/navItem.d.ts +57 -0
- package/lib/chrome/ui/navItem.d.ts.map +1 -0
- package/lib/chrome/ui/navItem.js +10 -0
- package/lib/chrome/ui/navItem.js.map +1 -0
- package/lib/chrome/ui/useCompactHeader.d.ts +31 -0
- package/lib/chrome/ui/useCompactHeader.d.ts.map +1 -0
- package/lib/chrome/ui/useCompactHeader.js +50 -0
- package/lib/chrome/ui/useCompactHeader.js.map +1 -0
- package/lib/citation/core/clipboard.d.ts +12 -3
- package/lib/citation/core/clipboard.d.ts.map +1 -1
- package/lib/citation/core/clipboard.js +21 -10
- package/lib/citation/core/clipboard.js.map +1 -1
- package/lib/citation/core/download.d.ts +11 -3
- package/lib/citation/core/download.d.ts.map +1 -1
- package/lib/citation/core/download.js +17 -13
- package/lib/citation/core/download.js.map +1 -1
- package/lib/citation/core/index.d.ts +4 -3
- package/lib/citation/core/index.d.ts.map +1 -1
- package/lib/citation/core/index.js +3 -3
- package/lib/citation/core/index.js.map +1 -1
- package/lib/citation/core/works.d.ts +44 -0
- package/lib/citation/core/works.d.ts.map +1 -0
- package/lib/citation/core/works.js +51 -0
- package/lib/citation/core/works.js.map +1 -0
- package/lib/citation/ui/CitationMenu.d.ts +20 -3
- package/lib/citation/ui/CitationMenu.d.ts.map +1 -1
- package/lib/citation/ui/CitationMenu.js +60 -49
- package/lib/citation/ui/CitationMenu.js.map +1 -1
- package/lib/citation/ui/CitationPreview.d.ts +5 -2
- package/lib/citation/ui/CitationPreview.d.ts.map +1 -1
- package/lib/citation/ui/CitationPreview.js +9 -4
- package/lib/citation/ui/CitationPreview.js.map +1 -1
- package/lib/citation/ui/CiteButton.d.ts +13 -6
- package/lib/citation/ui/CiteButton.d.ts.map +1 -1
- package/lib/citation/ui/CiteButton.js +5 -4
- package/lib/citation/ui/CiteButton.js.map +1 -1
- package/lib/citation/ui/CopyFormatEntries.d.ts +31 -0
- package/lib/citation/ui/CopyFormatEntries.d.ts.map +1 -0
- package/lib/citation/ui/CopyFormatEntries.js +29 -0
- package/lib/citation/ui/CopyFormatEntries.js.map +1 -0
- package/lib/citation/ui/WorkEntry.d.ts +18 -0
- package/lib/citation/ui/WorkEntry.d.ts.map +1 -0
- package/lib/citation/ui/WorkEntry.js +32 -0
- package/lib/citation/ui/WorkEntry.js.map +1 -0
- package/lib/citation/ui/entries.d.ts +7 -7
- package/lib/citation/ui/entries.d.ts.map +1 -1
- package/lib/citation/ui/entries.js +11 -13
- package/lib/citation/ui/entries.js.map +1 -1
- package/lib/citation/ui/index.d.ts +2 -2
- package/lib/citation/ui/index.d.ts.map +1 -1
- package/lib/citation/ui/index.js.map +1 -1
- package/lib/citation/ui/useCopyFeedback.d.ts +20 -0
- package/lib/citation/ui/useCopyFeedback.d.ts.map +1 -0
- package/lib/citation/ui/useCopyFeedback.js +49 -0
- package/lib/citation/ui/useCopyFeedback.js.map +1 -0
- package/lib/clipboard/core/index.d.ts +2 -0
- package/lib/clipboard/core/index.d.ts.map +1 -0
- package/lib/clipboard/core/index.js +2 -0
- package/lib/clipboard/core/index.js.map +1 -0
- package/lib/clipboard/core/writeToClipboard.d.ts +12 -0
- package/lib/clipboard/core/writeToClipboard.d.ts.map +1 -0
- package/lib/clipboard/core/writeToClipboard.js +49 -0
- package/lib/clipboard/core/writeToClipboard.js.map +1 -0
- package/lib/clipboard/ui/CodeBlock.d.ts +43 -0
- package/lib/clipboard/ui/CodeBlock.d.ts.map +1 -0
- package/lib/clipboard/ui/CodeBlock.js +49 -0
- package/lib/clipboard/ui/CodeBlock.js.map +1 -0
- package/lib/clipboard/ui/CopyButton.d.ts +64 -0
- package/lib/clipboard/ui/CopyButton.d.ts.map +1 -0
- package/lib/clipboard/ui/CopyButton.js +21 -0
- package/lib/clipboard/ui/CopyButton.js.map +1 -0
- package/lib/clipboard/ui/index.d.ts +7 -0
- package/lib/clipboard/ui/index.d.ts.map +1 -0
- package/lib/clipboard/ui/index.js +4 -0
- package/lib/clipboard/ui/index.js.map +1 -0
- package/lib/clipboard/ui/useCopyToClipboard.d.ts +24 -0
- package/lib/clipboard/ui/useCopyToClipboard.d.ts.map +1 -0
- package/lib/clipboard/ui/useCopyToClipboard.js +36 -0
- package/lib/clipboard/ui/useCopyToClipboard.js.map +1 -0
- package/lib/color/core/contrast.d.ts +43 -0
- package/lib/color/core/contrast.d.ts.map +1 -0
- package/lib/color/core/contrast.js +61 -0
- package/lib/color/core/contrast.js.map +1 -0
- package/lib/color/core/hex.d.ts +26 -0
- package/lib/color/core/hex.d.ts.map +1 -0
- package/lib/color/core/hex.js +44 -0
- package/lib/color/core/hex.js.map +1 -0
- package/lib/color/core/index.d.ts +5 -0
- package/lib/color/core/index.d.ts.map +1 -0
- package/lib/color/core/index.js +3 -0
- package/lib/color/core/index.js.map +1 -0
- package/lib/color/core/scale.d.ts +52 -0
- package/lib/color/core/scale.d.ts.map +1 -0
- package/lib/color/core/scale.js +96 -0
- package/lib/color/core/scale.js.map +1 -0
- package/lib/color/ui/ColorScaleLegend.d.ts +38 -0
- package/lib/color/ui/ColorScaleLegend.d.ts.map +1 -0
- package/lib/color/ui/ColorScaleLegend.js +68 -0
- package/lib/color/ui/ColorScaleLegend.js.map +1 -0
- package/lib/color/ui/index.d.ts +3 -0
- package/lib/color/ui/index.d.ts.map +1 -0
- package/lib/color/ui/index.js +2 -0
- package/lib/color/ui/index.js.map +1 -0
- package/lib/core.d.ts +12 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +12 -0
- package/lib/core.js.map +1 -1
- package/lib/credits/core/credits.d.ts +144 -0
- package/lib/credits/core/credits.d.ts.map +1 -0
- package/lib/credits/core/credits.js +156 -0
- package/lib/credits/core/credits.js.map +1 -0
- package/lib/credits/core/index.d.ts +3 -0
- package/lib/credits/core/index.d.ts.map +1 -0
- package/lib/credits/core/index.js +2 -0
- package/lib/credits/core/index.js.map +1 -0
- package/lib/credits/ui/CreditsList.d.ts +29 -0
- package/lib/credits/ui/CreditsList.d.ts.map +1 -0
- package/lib/credits/ui/CreditsList.js +33 -0
- package/lib/credits/ui/CreditsList.js.map +1 -0
- package/lib/credits/ui/index.d.ts +3 -0
- package/lib/credits/ui/index.d.ts.map +1 -0
- package/lib/credits/ui/index.js +2 -0
- package/lib/credits/ui/index.js.map +1 -0
- package/lib/delimited/core/delimiters.d.ts +31 -0
- package/lib/delimited/core/delimiters.d.ts.map +1 -0
- package/lib/delimited/core/delimiters.js +46 -0
- package/lib/delimited/core/delimiters.js.map +1 -0
- package/lib/delimited/core/index.d.ts +9 -0
- package/lib/delimited/core/index.d.ts.map +1 -0
- package/lib/delimited/core/index.js +5 -0
- package/lib/delimited/core/index.js.map +1 -0
- package/lib/delimited/core/readDelimited.d.ts +32 -0
- package/lib/delimited/core/readDelimited.d.ts.map +1 -0
- package/lib/delimited/core/readDelimited.js +122 -0
- package/lib/delimited/core/readDelimited.js.map +1 -0
- package/lib/delimited/core/rowsToDelimited.d.ts +59 -0
- package/lib/delimited/core/rowsToDelimited.d.ts.map +1 -0
- package/lib/delimited/core/rowsToDelimited.js +87 -0
- package/lib/delimited/core/rowsToDelimited.js.map +1 -0
- package/lib/delimited/core/toDelimited.d.ts +38 -0
- package/lib/delimited/core/toDelimited.d.ts.map +1 -0
- package/lib/delimited/core/toDelimited.js +45 -0
- package/lib/delimited/core/toDelimited.js.map +1 -0
- package/lib/delimited/ui/DelimitedTextDialog.d.ts +22 -0
- package/lib/delimited/ui/DelimitedTextDialog.d.ts.map +1 -0
- package/lib/delimited/ui/DelimitedTextDialog.js +17 -0
- package/lib/delimited/ui/DelimitedTextDialog.js.map +1 -0
- package/lib/delimited/ui/DelimitedTextPanel.d.ts +56 -0
- package/lib/delimited/ui/DelimitedTextPanel.d.ts.map +1 -0
- package/lib/delimited/ui/DelimitedTextPanel.js +55 -0
- package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -0
- package/lib/delimited/ui/index.d.ts +5 -0
- package/lib/delimited/ui/index.d.ts.map +1 -0
- package/lib/delimited/ui/index.js +3 -0
- package/lib/delimited/ui/index.js.map +1 -0
- package/lib/disclosure/ui/CollapsibleSection.d.ts +57 -0
- package/lib/disclosure/ui/CollapsibleSection.d.ts.map +1 -0
- package/lib/disclosure/ui/CollapsibleSection.js +60 -0
- package/lib/disclosure/ui/CollapsibleSection.js.map +1 -0
- package/lib/disclosure/ui/index.d.ts +5 -0
- package/lib/disclosure/ui/index.d.ts.map +1 -0
- package/lib/disclosure/ui/index.js +3 -0
- package/lib/disclosure/ui/index.js.map +1 -0
- package/lib/disclosure/ui/useDisclosure.d.ts +22 -0
- package/lib/disclosure/ui/useDisclosure.d.ts.map +1 -0
- package/lib/disclosure/ui/useDisclosure.js +18 -0
- package/lib/disclosure/ui/useDisclosure.js.map +1 -0
- package/lib/download/core/downloadBlob.d.ts +10 -0
- package/lib/download/core/downloadBlob.d.ts.map +1 -0
- package/lib/download/core/downloadBlob.js +20 -0
- package/lib/download/core/downloadBlob.js.map +1 -0
- package/lib/download/core/downloadText.d.ts +9 -0
- package/lib/download/core/downloadText.d.ts.map +1 -0
- package/lib/download/core/downloadText.js +14 -0
- package/lib/download/core/downloadText.js.map +1 -0
- package/lib/download/core/index.d.ts +4 -0
- package/lib/download/core/index.d.ts.map +1 -0
- package/lib/download/core/index.js +4 -0
- package/lib/download/core/index.js.map +1 -0
- package/lib/download/core/sanitizeFileName.d.ts +15 -0
- package/lib/download/core/sanitizeFileName.d.ts.map +1 -0
- package/lib/download/core/sanitizeFileName.js +33 -0
- package/lib/download/core/sanitizeFileName.js.map +1 -0
- package/lib/ecosystem/core/index.d.ts +3 -0
- package/lib/ecosystem/core/index.d.ts.map +1 -1
- package/lib/ecosystem/core/index.js +3 -0
- package/lib/ecosystem/core/index.js.map +1 -1
- package/lib/ecosystem/core/links.d.ts +11 -0
- package/lib/ecosystem/core/links.d.ts.map +1 -0
- package/lib/ecosystem/core/links.js +28 -0
- package/lib/ecosystem/core/links.js.map +1 -0
- package/lib/ecosystem/core/lookup.d.ts +21 -0
- package/lib/ecosystem/core/lookup.d.ts.map +1 -0
- package/lib/ecosystem/core/lookup.js +40 -0
- package/lib/ecosystem/core/lookup.js.map +1 -0
- package/lib/ecosystem/core/sites.d.ts +3 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +33 -0
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/core/tokens.d.ts +21 -0
- package/lib/ecosystem/core/tokens.d.ts.map +1 -0
- package/lib/ecosystem/core/tokens.js +42 -0
- package/lib/ecosystem/core/tokens.js.map +1 -0
- package/lib/ecosystem/ui/SiteTheme.d.ts +18 -0
- package/lib/ecosystem/ui/SiteTheme.d.ts.map +1 -0
- package/lib/ecosystem/ui/SiteTheme.js +16 -0
- package/lib/ecosystem/ui/SiteTheme.js.map +1 -0
- package/lib/ecosystem/ui/Wordmark.d.ts +30 -0
- package/lib/ecosystem/ui/Wordmark.d.ts.map +1 -0
- package/lib/ecosystem/ui/Wordmark.js +26 -0
- package/lib/ecosystem/ui/Wordmark.js.map +1 -0
- package/lib/ecosystem/ui/glyphs.d.ts +16 -0
- package/lib/ecosystem/ui/glyphs.d.ts.map +1 -0
- package/lib/ecosystem/ui/glyphs.js +41 -0
- package/lib/ecosystem/ui/glyphs.js.map +1 -0
- package/lib/ecosystem/ui/index.d.ts +4 -0
- package/lib/ecosystem/ui/index.d.ts.map +1 -1
- package/lib/ecosystem/ui/index.js +2 -0
- package/lib/ecosystem/ui/index.js.map +1 -1
- package/lib/ecosystem/ui/marks.d.ts +30 -4
- package/lib/ecosystem/ui/marks.d.ts.map +1 -1
- package/lib/ecosystem/ui/marks.js +15 -36
- package/lib/ecosystem/ui/marks.js.map +1 -1
- package/lib/error/ui/ErrorBoundary.d.ts +60 -0
- package/lib/error/ui/ErrorBoundary.d.ts.map +1 -0
- package/lib/error/ui/ErrorBoundary.js +59 -0
- package/lib/error/ui/ErrorBoundary.js.map +1 -0
- package/lib/error/ui/ErrorFallback.d.ts +38 -0
- package/lib/error/ui/ErrorFallback.d.ts.map +1 -0
- package/lib/error/ui/ErrorFallback.js +16 -0
- package/lib/error/ui/ErrorFallback.js.map +1 -0
- package/lib/error/ui/index.d.ts +5 -0
- package/lib/error/ui/index.d.ts.map +1 -0
- package/lib/error/ui/index.js +3 -0
- package/lib/error/ui/index.js.map +1 -0
- package/lib/error/ui/toError.d.ts +11 -0
- package/lib/error/ui/toError.d.ts.map +1 -0
- package/lib/error/ui/toError.js +35 -0
- package/lib/error/ui/toError.js.map +1 -0
- package/lib/format/core/index.d.ts +5 -0
- package/lib/format/core/index.d.ts.map +1 -0
- package/lib/format/core/index.js +5 -0
- package/lib/format/core/index.js.map +1 -0
- package/lib/format/core/missing.d.ts +7 -0
- package/lib/format/core/missing.d.ts.map +1 -0
- package/lib/format/core/missing.js +7 -0
- package/lib/format/core/missing.js.map +1 -0
- package/lib/format/core/numbers.d.ts +40 -0
- package/lib/format/core/numbers.d.ts.map +1 -0
- package/lib/format/core/numbers.js +81 -0
- package/lib/format/core/numbers.js.map +1 -0
- package/lib/format/core/units.d.ts +17 -0
- package/lib/format/core/units.d.ts.map +1 -0
- package/lib/format/core/units.js +54 -0
- package/lib/format/core/units.js.map +1 -0
- package/lib/format/core/words.d.ts +12 -0
- package/lib/format/core/words.d.ts.map +1 -0
- package/lib/format/core/words.js +14 -0
- package/lib/format/core/words.js.map +1 -0
- package/lib/help/ui/HelpBody.d.ts +57 -0
- package/lib/help/ui/HelpBody.d.ts.map +1 -0
- package/lib/help/ui/HelpBody.js +44 -0
- package/lib/help/ui/HelpBody.js.map +1 -0
- package/lib/help/ui/HelpIcon.d.ts +33 -0
- package/lib/help/ui/HelpIcon.d.ts.map +1 -0
- package/lib/help/ui/HelpIcon.js +16 -0
- package/lib/help/ui/HelpIcon.js.map +1 -0
- package/lib/help/ui/HelpToolbarButton.d.ts +45 -0
- package/lib/help/ui/HelpToolbarButton.d.ts.map +1 -0
- package/lib/help/ui/HelpToolbarButton.js +17 -0
- package/lib/help/ui/HelpToolbarButton.js.map +1 -0
- package/lib/help/ui/HelpTooltip.d.ts +36 -0
- package/lib/help/ui/HelpTooltip.d.ts.map +1 -0
- package/lib/help/ui/HelpTooltip.js +24 -0
- package/lib/help/ui/HelpTooltip.js.map +1 -0
- package/lib/help/ui/index.d.ts +9 -0
- package/lib/help/ui/index.d.ts.map +1 -0
- package/lib/help/ui/index.js +5 -0
- package/lib/help/ui/index.js.map +1 -0
- package/lib/hooks/ui/index.d.ts +7 -0
- package/lib/hooks/ui/index.d.ts.map +1 -0
- package/lib/hooks/ui/index.js +5 -0
- package/lib/hooks/ui/index.js.map +1 -0
- package/lib/hooks/ui/listNavigation.d.ts +54 -0
- package/lib/hooks/ui/listNavigation.d.ts.map +1 -0
- package/lib/hooks/ui/listNavigation.js +77 -0
- package/lib/hooks/ui/listNavigation.js.map +1 -0
- package/lib/hooks/ui/useContainerSize.d.ts +15 -0
- package/lib/hooks/ui/useContainerSize.d.ts.map +1 -0
- package/lib/hooks/ui/useContainerSize.js +24 -0
- package/lib/hooks/ui/useContainerSize.js.map +1 -0
- package/lib/hooks/ui/useDebouncedValue.d.ts +12 -0
- package/lib/hooks/ui/useDebouncedValue.d.ts.map +1 -0
- package/lib/hooks/ui/useDebouncedValue.js +24 -0
- package/lib/hooks/ui/useDebouncedValue.js.map +1 -0
- package/lib/hooks/ui/useListKeyboardNavigation.d.ts +17 -0
- package/lib/hooks/ui/useListKeyboardNavigation.d.ts.map +1 -0
- package/lib/hooks/ui/useListKeyboardNavigation.js +25 -0
- package/lib/hooks/ui/useListKeyboardNavigation.js.map +1 -0
- package/lib/hooks/ui/useResizeObserver.d.ts +20 -0
- package/lib/hooks/ui/useResizeObserver.d.ts.map +1 -0
- package/lib/hooks/ui/useResizeObserver.js +37 -0
- package/lib/hooks/ui/useResizeObserver.js.map +1 -0
- package/lib/orbital/core/atomicGrid.d.ts +85 -0
- package/lib/orbital/core/atomicGrid.d.ts.map +1 -0
- package/lib/orbital/core/atomicGrid.js +105 -0
- package/lib/orbital/core/atomicGrid.js.map +1 -0
- package/lib/orbital/core/atomicOrbitals.d.ts +97 -0
- package/lib/orbital/core/atomicOrbitals.d.ts.map +1 -0
- package/lib/orbital/core/atomicOrbitals.js +135 -0
- package/lib/orbital/core/atomicOrbitals.js.map +1 -0
- package/lib/orbital/core/constants.d.ts +33 -0
- package/lib/orbital/core/constants.d.ts.map +1 -0
- package/lib/orbital/core/constants.js +21 -0
- package/lib/orbital/core/constants.js.map +1 -0
- package/lib/orbital/core/electronConfiguration.d.ts +106 -0
- package/lib/orbital/core/electronConfiguration.d.ts.map +1 -0
- package/lib/orbital/core/electronConfiguration.js +207 -0
- package/lib/orbital/core/electronConfiguration.js.map +1 -0
- package/lib/orbital/core/grid.d.ts +60 -0
- package/lib/orbital/core/grid.d.ts.map +1 -0
- package/lib/orbital/core/grid.js +81 -0
- package/lib/orbital/core/grid.js.map +1 -0
- package/lib/orbital/core/hydrogenic.d.ts +99 -0
- package/lib/orbital/core/hydrogenic.d.ts.map +1 -0
- package/lib/orbital/core/hydrogenic.js +181 -0
- package/lib/orbital/core/hydrogenic.js.map +1 -0
- package/lib/orbital/core/index.d.ts +24 -0
- package/lib/orbital/core/index.d.ts.map +1 -0
- package/lib/orbital/core/index.js +13 -0
- package/lib/orbital/core/index.js.map +1 -0
- package/lib/orbital/core/isovalue.d.ts +60 -0
- package/lib/orbital/core/isovalue.d.ts.map +1 -0
- package/lib/orbital/core/isovalue.js +128 -0
- package/lib/orbital/core/isovalue.js.map +1 -0
- package/lib/orbital/core/numerics.d.ts +39 -0
- package/lib/orbital/core/numerics.d.ts.map +1 -0
- package/lib/orbital/core/numerics.js +75 -0
- package/lib/orbital/core/numerics.js.map +1 -0
- package/lib/orbital/core/occupancy.d.ts +44 -0
- package/lib/orbital/core/occupancy.d.ts.map +1 -0
- package/lib/orbital/core/occupancy.js +85 -0
- package/lib/orbital/core/occupancy.js.map +1 -0
- package/lib/orbital/core/palette.d.ts +36 -0
- package/lib/orbital/core/palette.d.ts.map +1 -0
- package/lib/orbital/core/palette.js +37 -0
- package/lib/orbital/core/palette.js.map +1 -0
- package/lib/orbital/core/realHarmonics.d.ts +57 -0
- package/lib/orbital/core/realHarmonics.d.ts.map +1 -0
- package/lib/orbital/core/realHarmonics.js +144 -0
- package/lib/orbital/core/realHarmonics.js.map +1 -0
- package/lib/orbital/core/sample.d.ts +66 -0
- package/lib/orbital/core/sample.d.ts.map +1 -0
- package/lib/orbital/core/sample.js +61 -0
- package/lib/orbital/core/sample.js.map +1 -0
- package/lib/orbital/core/screening.d.ts +46 -0
- package/lib/orbital/core/screening.d.ts.map +1 -0
- package/lib/orbital/core/screening.js +72 -0
- package/lib/orbital/core/screening.js.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts +62 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.js +115 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.d.ts +77 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.js +49 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -0
- package/lib/orbital/ui/camera.d.ts +36 -0
- package/lib/orbital/ui/camera.d.ts.map +1 -0
- package/lib/orbital/ui/camera.js +98 -0
- package/lib/orbital/ui/camera.js.map +1 -0
- package/lib/orbital/ui/capability.d.ts +28 -0
- package/lib/orbital/ui/capability.d.ts.map +1 -0
- package/lib/orbital/ui/capability.js +77 -0
- package/lib/orbital/ui/capability.js.map +1 -0
- package/lib/orbital/ui/index.d.ts +17 -0
- package/lib/orbital/ui/index.d.ts.map +1 -0
- package/lib/orbital/ui/index.js +13 -0
- package/lib/orbital/ui/index.js.map +1 -0
- package/lib/orbital/ui/renderVolume.d.ts +60 -0
- package/lib/orbital/ui/renderVolume.d.ts.map +1 -0
- package/lib/orbital/ui/renderVolume.js +119 -0
- package/lib/orbital/ui/renderVolume.js.map +1 -0
- package/lib/orbital/ui/viewer.d.ts +88 -0
- package/lib/orbital/ui/viewer.d.ts.map +1 -0
- package/lib/orbital/ui/viewer.js +156 -0
- package/lib/orbital/ui/viewer.js.map +1 -0
- package/lib/orbital/ui/volumeField.d.ts +33 -0
- package/lib/orbital/ui/volumeField.d.ts.map +1 -0
- package/lib/orbital/ui/volumeField.js +68 -0
- package/lib/orbital/ui/volumeField.js.map +1 -0
- package/lib/orbital.d.ts +11 -0
- package/lib/orbital.d.ts.map +1 -0
- package/lib/orbital.js +11 -0
- package/lib/orbital.js.map +1 -0
- package/lib/pedagogy/core/glossary.d.ts +79 -0
- package/lib/pedagogy/core/glossary.d.ts.map +1 -0
- package/lib/pedagogy/core/glossary.js +71 -0
- package/lib/pedagogy/core/glossary.js.map +1 -0
- package/lib/pedagogy/core/index.d.ts +8 -0
- package/lib/pedagogy/core/index.d.ts.map +1 -0
- package/lib/pedagogy/core/index.js +4 -0
- package/lib/pedagogy/core/index.js.map +1 -0
- package/lib/pedagogy/core/jsonStorage.d.ts +21 -0
- package/lib/pedagogy/core/jsonStorage.d.ts.map +1 -0
- package/lib/pedagogy/core/jsonStorage.js +55 -0
- package/lib/pedagogy/core/jsonStorage.js.map +1 -0
- package/lib/pedagogy/core/progress.d.ts +116 -0
- package/lib/pedagogy/core/progress.d.ts.map +1 -0
- package/lib/pedagogy/core/progress.js +122 -0
- package/lib/pedagogy/core/progress.js.map +1 -0
- package/lib/pedagogy/core/types.d.ts +74 -0
- package/lib/pedagogy/core/types.d.ts.map +1 -0
- package/lib/pedagogy/core/types.js +8 -0
- package/lib/pedagogy/core/types.js.map +1 -0
- package/lib/pedagogy/core/validation.d.ts +79 -0
- package/lib/pedagogy/core/validation.d.ts.map +1 -0
- package/lib/pedagogy/core/validation.js +47 -0
- package/lib/pedagogy/core/validation.js.map +1 -0
- package/lib/pedagogy/ui/ExerciseActions.d.ts +74 -0
- package/lib/pedagogy/ui/ExerciseActions.d.ts.map +1 -0
- package/lib/pedagogy/ui/ExerciseActions.js +22 -0
- package/lib/pedagogy/ui/ExerciseActions.js.map +1 -0
- package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts +43 -0
- package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts.map +1 -0
- package/lib/pedagogy/ui/ExerciseProgressHeader.js +43 -0
- package/lib/pedagogy/ui/ExerciseProgressHeader.js.map +1 -0
- package/lib/pedagogy/ui/ExerciseTags.d.ts +49 -0
- package/lib/pedagogy/ui/ExerciseTags.d.ts.map +1 -0
- package/lib/pedagogy/ui/ExerciseTags.js +22 -0
- package/lib/pedagogy/ui/ExerciseTags.js.map +1 -0
- package/lib/pedagogy/ui/GlossaryProvider.d.ts +19 -0
- package/lib/pedagogy/ui/GlossaryProvider.d.ts.map +1 -0
- package/lib/pedagogy/ui/GlossaryProvider.js +16 -0
- package/lib/pedagogy/ui/GlossaryProvider.js.map +1 -0
- package/lib/pedagogy/ui/GlossaryText.d.ts +50 -0
- package/lib/pedagogy/ui/GlossaryText.d.ts.map +1 -0
- package/lib/pedagogy/ui/GlossaryText.js +79 -0
- package/lib/pedagogy/ui/GlossaryText.js.map +1 -0
- package/lib/pedagogy/ui/HintLadder.d.ts +38 -0
- package/lib/pedagogy/ui/HintLadder.d.ts.map +1 -0
- package/lib/pedagogy/ui/HintLadder.js +33 -0
- package/lib/pedagogy/ui/HintLadder.js.map +1 -0
- package/lib/pedagogy/ui/ReferenceGrid.d.ts +31 -0
- package/lib/pedagogy/ui/ReferenceGrid.d.ts.map +1 -0
- package/lib/pedagogy/ui/ReferenceGrid.js +25 -0
- package/lib/pedagogy/ui/ReferenceGrid.js.map +1 -0
- package/lib/pedagogy/ui/ReferenceSectionBlock.d.ts +64 -0
- package/lib/pedagogy/ui/ReferenceSectionBlock.d.ts.map +1 -0
- package/lib/pedagogy/ui/ReferenceSectionBlock.js +78 -0
- package/lib/pedagogy/ui/ReferenceSectionBlock.js.map +1 -0
- package/lib/pedagogy/ui/SyntaxTooltip.d.ts +94 -0
- package/lib/pedagogy/ui/SyntaxTooltip.d.ts.map +1 -0
- package/lib/pedagogy/ui/SyntaxTooltip.js +79 -0
- package/lib/pedagogy/ui/SyntaxTooltip.js.map +1 -0
- package/lib/pedagogy/ui/TestCaseList.d.ts +35 -0
- package/lib/pedagogy/ui/TestCaseList.d.ts.map +1 -0
- package/lib/pedagogy/ui/TestCaseList.js +63 -0
- package/lib/pedagogy/ui/TestCaseList.js.map +1 -0
- package/lib/pedagogy/ui/TutorialStepStrip.d.ts +42 -0
- package/lib/pedagogy/ui/TutorialStepStrip.d.ts.map +1 -0
- package/lib/pedagogy/ui/TutorialStepStrip.js +98 -0
- package/lib/pedagogy/ui/TutorialStepStrip.js.map +1 -0
- package/lib/pedagogy/ui/exerciseMeta.d.ts +24 -0
- package/lib/pedagogy/ui/exerciseMeta.d.ts.map +1 -0
- package/lib/pedagogy/ui/exerciseMeta.js +38 -0
- package/lib/pedagogy/ui/exerciseMeta.js.map +1 -0
- package/lib/pedagogy/ui/glossaryContext.d.ts +17 -0
- package/lib/pedagogy/ui/glossaryContext.d.ts.map +1 -0
- package/lib/pedagogy/ui/glossaryContext.js +19 -0
- package/lib/pedagogy/ui/glossaryContext.js.map +1 -0
- package/lib/pedagogy/ui/index.d.ts +27 -0
- package/lib/pedagogy/ui/index.d.ts.map +1 -0
- package/lib/pedagogy/ui/index.js +15 -0
- package/lib/pedagogy/ui/index.js.map +1 -0
- package/lib/pedagogy/ui/tutorialLevels.d.ts +18 -0
- package/lib/pedagogy/ui/tutorialLevels.d.ts.map +1 -0
- package/lib/pedagogy/ui/tutorialLevels.js +14 -0
- package/lib/pedagogy/ui/tutorialLevels.js.map +1 -0
- package/lib/router/core/address.d.ts +42 -0
- package/lib/router/core/address.d.ts.map +1 -0
- package/lib/router/core/address.js +64 -0
- package/lib/router/core/address.js.map +1 -0
- package/lib/router/core/basePath.d.ts +49 -0
- package/lib/router/core/basePath.d.ts.map +1 -0
- package/lib/router/core/basePath.js +78 -0
- package/lib/router/core/basePath.js.map +1 -0
- package/lib/router/core/index.d.ts +8 -0
- package/lib/router/core/index.d.ts.map +1 -0
- package/lib/router/core/index.js +5 -0
- package/lib/router/core/index.js.map +1 -0
- package/lib/router/core/legacyHash.d.ts +45 -0
- package/lib/router/core/legacyHash.d.ts.map +1 -0
- package/lib/router/core/legacyHash.js +50 -0
- package/lib/router/core/legacyHash.js.map +1 -0
- package/lib/router/core/pageAddresses.d.ts +50 -0
- package/lib/router/core/pageAddresses.d.ts.map +1 -0
- package/lib/router/core/pageAddresses.js +56 -0
- package/lib/router/core/pageAddresses.js.map +1 -0
- package/lib/router/core/query.d.ts +41 -0
- package/lib/router/core/query.d.ts.map +1 -0
- package/lib/router/core/query.js +64 -0
- package/lib/router/core/query.js.map +1 -0
- package/lib/router/core/tabRouter.d.ts +111 -0
- package/lib/router/core/tabRouter.d.ts.map +1 -0
- package/lib/router/core/tabRouter.js +87 -0
- package/lib/router/core/tabRouter.js.map +1 -0
- package/lib/seo/core/documentMeta.d.ts +45 -0
- package/lib/seo/core/documentMeta.d.ts.map +1 -0
- package/lib/seo/core/documentMeta.js +69 -0
- package/lib/seo/core/documentMeta.js.map +1 -0
- package/lib/seo/core/index.d.ts +3 -0
- package/lib/seo/core/index.d.ts.map +1 -0
- package/lib/seo/core/index.js +2 -0
- package/lib/seo/core/index.js.map +1 -0
- package/lib/share/core/config.d.ts +63 -0
- package/lib/share/core/config.d.ts.map +1 -0
- package/lib/share/core/config.js +125 -0
- package/lib/share/core/config.js.map +1 -0
- package/lib/share/core/escape.d.ts +15 -0
- package/lib/share/core/escape.d.ts.map +1 -0
- package/lib/share/core/escape.js +22 -0
- package/lib/share/core/escape.js.map +1 -0
- package/lib/share/core/index.d.ts +9 -0
- package/lib/share/core/index.d.ts.map +1 -0
- package/lib/share/core/index.js +5 -0
- package/lib/share/core/index.js.map +1 -0
- package/lib/share/core/params.d.ts +93 -0
- package/lib/share/core/params.d.ts.map +1 -0
- package/lib/share/core/params.js +111 -0
- package/lib/share/core/params.js.map +1 -0
- package/lib/share/core/query.d.ts +30 -0
- package/lib/share/core/query.d.ts.map +1 -0
- package/lib/share/core/query.js +68 -0
- package/lib/share/core/query.js.map +1 -0
- package/lib/share/core/url.d.ts +57 -0
- package/lib/share/core/url.d.ts.map +1 -0
- package/lib/share/core/url.js +49 -0
- package/lib/share/core/url.js.map +1 -0
- package/lib/share/core/vocabulary.d.ts +51 -0
- package/lib/share/core/vocabulary.d.ts.map +1 -0
- package/lib/share/core/vocabulary.js +2 -0
- package/lib/share/core/vocabulary.js.map +1 -0
- package/lib/share/ui/HiddenPartsProvider.d.ts +19 -0
- package/lib/share/ui/HiddenPartsProvider.d.ts.map +1 -0
- package/lib/share/ui/HiddenPartsProvider.js +15 -0
- package/lib/share/ui/HiddenPartsProvider.js.map +1 -0
- package/lib/share/ui/PagePart.d.ts +18 -0
- package/lib/share/ui/PagePart.d.ts.map +1 -0
- package/lib/share/ui/PagePart.js +16 -0
- package/lib/share/ui/PagePart.js.map +1 -0
- package/lib/share/ui/ShareButton.d.ts +42 -0
- package/lib/share/ui/ShareButton.d.ts.map +1 -0
- package/lib/share/ui/ShareButton.js +18 -0
- package/lib/share/ui/ShareButton.js.map +1 -0
- package/lib/share/ui/ShareDialog.d.ts +73 -0
- package/lib/share/ui/ShareDialog.d.ts.map +1 -0
- package/lib/share/ui/ShareDialog.js +19 -0
- package/lib/share/ui/ShareDialog.js.map +1 -0
- package/lib/share/ui/ShareDialogContent.d.ts +13 -0
- package/lib/share/ui/ShareDialogContent.d.ts.map +1 -0
- package/lib/share/ui/ShareDialogContent.js +71 -0
- package/lib/share/ui/ShareDialogContent.js.map +1 -0
- package/lib/share/ui/SharePartOptions.d.ts +18 -0
- package/lib/share/ui/SharePartOptions.d.ts.map +1 -0
- package/lib/share/ui/SharePartOptions.js +22 -0
- package/lib/share/ui/SharePartOptions.js.map +1 -0
- package/lib/share/ui/draft.d.ts +13 -0
- package/lib/share/ui/draft.d.ts.map +1 -0
- package/lib/share/ui/draft.js +16 -0
- package/lib/share/ui/draft.js.map +1 -0
- package/lib/share/ui/hiddenParts.d.ts +17 -0
- package/lib/share/ui/hiddenParts.d.ts.map +1 -0
- package/lib/share/ui/hiddenParts.js +21 -0
- package/lib/share/ui/hiddenParts.js.map +1 -0
- package/lib/share/ui/index.d.ts +10 -0
- package/lib/share/ui/index.d.ts.map +1 -0
- package/lib/share/ui/index.js +6 -0
- package/lib/share/ui/index.js.map +1 -0
- package/lib/shared/ui/index.d.ts +2 -1
- package/lib/shared/ui/index.d.ts.map +1 -1
- package/lib/shared/ui/index.js +1 -1
- package/lib/shared/ui/index.js.map +1 -1
- package/lib/state/ui/index.d.ts +3 -0
- package/lib/state/ui/index.d.ts.map +1 -0
- package/lib/state/ui/index.js +2 -0
- package/lib/state/ui/index.js.map +1 -0
- package/lib/state/ui/mergeStored.d.ts +27 -0
- package/lib/state/ui/mergeStored.d.ts.map +1 -0
- package/lib/state/ui/mergeStored.js +82 -0
- package/lib/state/ui/mergeStored.js.map +1 -0
- package/lib/state/ui/persistBucket.d.ts +65 -0
- package/lib/state/ui/persistBucket.d.ts.map +1 -0
- package/lib/state/ui/persistBucket.js +90 -0
- package/lib/state/ui/persistBucket.js.map +1 -0
- package/lib/structure/core/editorValue.d.ts +69 -0
- package/lib/structure/core/editorValue.d.ts.map +1 -0
- package/lib/structure/core/editorValue.js +72 -0
- package/lib/structure/core/editorValue.js.map +1 -0
- package/lib/structure/core/fragmentQuery.d.ts +33 -0
- package/lib/structure/core/fragmentQuery.d.ts.map +1 -0
- package/lib/structure/core/fragmentQuery.js +37 -0
- package/lib/structure/core/fragmentQuery.js.map +1 -0
- package/lib/structure/core/index.d.ts +11 -0
- package/lib/structure/core/index.d.ts.map +1 -0
- package/lib/structure/core/index.js +6 -0
- package/lib/structure/core/index.js.map +1 -0
- package/lib/structure/core/molfile.d.ts +42 -0
- package/lib/structure/core/molfile.d.ts.map +1 -0
- package/lib/structure/core/molfile.js +74 -0
- package/lib/structure/core/molfile.js.map +1 -0
- package/lib/structure/core/readStructure.d.ts +37 -0
- package/lib/structure/core/readStructure.d.ts.map +1 -0
- package/lib/structure/core/readStructure.js +59 -0
- package/lib/structure/core/readStructure.js.map +1 -0
- package/lib/structure/core/structureSource.d.ts +34 -0
- package/lib/structure/core/structureSource.d.ts.map +1 -0
- package/lib/structure/core/structureSource.js +32 -0
- package/lib/structure/core/structureSource.js.map +1 -0
- package/lib/structure/core/toolbarFloor.d.ts +16 -0
- package/lib/structure/core/toolbarFloor.d.ts.map +1 -0
- package/lib/structure/core/toolbarFloor.js +27 -0
- package/lib/structure/core/toolbarFloor.js.map +1 -0
- package/lib/structure/ui/EditorCanvas.d.ts +55 -0
- package/lib/structure/ui/EditorCanvas.d.ts.map +1 -0
- package/lib/structure/ui/EditorCanvas.js +41 -0
- package/lib/structure/ui/EditorCanvas.js.map +1 -0
- package/lib/structure/ui/Structure.d.ts +122 -0
- package/lib/structure/ui/Structure.d.ts.map +1 -0
- package/lib/structure/ui/Structure.js +28 -0
- package/lib/structure/ui/Structure.js.map +1 -0
- package/lib/structure/ui/StructureEditor.d.ts +75 -0
- package/lib/structure/ui/StructureEditor.d.ts.map +1 -0
- package/lib/structure/ui/StructureEditor.js +83 -0
- package/lib/structure/ui/StructureEditor.js.map +1 -0
- package/lib/structure/ui/StructurePlaceholder.d.ts +29 -0
- package/lib/structure/ui/StructurePlaceholder.d.ts.map +1 -0
- package/lib/structure/ui/StructurePlaceholder.js +19 -0
- package/lib/structure/ui/StructurePlaceholder.js.map +1 -0
- package/lib/structure/ui/StructureSvg.d.ts +58 -0
- package/lib/structure/ui/StructureSvg.d.ts.map +1 -0
- package/lib/structure/ui/StructureSvg.js +33 -0
- package/lib/structure/ui/StructureSvg.js.map +1 -0
- package/lib/structure/ui/index.d.ts +19 -0
- package/lib/structure/ui/index.d.ts.map +1 -0
- package/lib/structure/ui/index.js +15 -0
- package/lib/structure/ui/index.js.map +1 -0
- package/lib/structure/ui/useToolbarFloor.d.ts +26 -0
- package/lib/structure/ui/useToolbarFloor.d.ts.map +1 -0
- package/lib/structure/ui/useToolbarFloor.js +70 -0
- package/lib/structure/ui/useToolbarFloor.js.map +1 -0
- package/lib/structure.d.ts +3 -0
- package/lib/structure.d.ts.map +1 -0
- package/lib/structure.js +3 -0
- package/lib/structure.js.map +1 -0
- package/lib/ui.d.ts +13 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +13 -0
- package/lib/ui.js.map +1 -1
- package/lib/worker/core/errors.d.ts +15 -0
- package/lib/worker/core/errors.d.ts.map +1 -0
- package/lib/worker/core/errors.js +15 -0
- package/lib/worker/core/errors.js.map +1 -0
- package/lib/worker/core/index.d.ts +5 -0
- package/lib/worker/core/index.d.ts.map +1 -0
- package/lib/worker/core/index.js +3 -0
- package/lib/worker/core/index.js.map +1 -0
- package/lib/worker/core/messages.d.ts +48 -0
- package/lib/worker/core/messages.d.ts.map +1 -0
- package/lib/worker/core/messages.js +2 -0
- package/lib/worker/core/messages.js.map +1 -0
- package/lib/worker/core/workerChannel.d.ts +69 -0
- package/lib/worker/core/workerChannel.d.ts.map +1 -0
- package/lib/worker/core/workerChannel.js +121 -0
- package/lib/worker/core/workerChannel.js.map +1 -0
- package/package.json +25 -4
- package/src/capsule/ui/CapsuleFilter.tsx +119 -0
- package/src/capsule/ui/index.ts +2 -0
- package/src/chrome/ui/NavLink.tsx +88 -0
- package/src/chrome/ui/NavMenuButton.tsx +95 -0
- package/src/chrome/ui/SiteFooter.tsx +65 -0
- package/src/chrome/ui/SiteHeader.tsx +119 -0
- package/src/chrome/ui/index.ts +11 -0
- package/src/chrome/ui/navItem.ts +60 -0
- package/src/chrome/ui/useCompactHeader.ts +81 -0
- package/src/citation/core/clipboard.ts +27 -11
- package/src/citation/core/download.ts +25 -15
- package/src/citation/core/index.ts +8 -3
- package/src/citation/core/works.ts +81 -0
- package/src/citation/ui/CitationMenu.tsx +104 -89
- package/src/citation/ui/CitationPreview.tsx +18 -8
- package/src/citation/ui/CiteButton.tsx +24 -9
- package/src/citation/ui/CopyFormatEntries.tsx +84 -0
- package/src/citation/ui/WorkEntry.tsx +80 -0
- package/src/citation/ui/entries.tsx +18 -20
- package/src/citation/ui/index.ts +10 -2
- package/src/citation/ui/useCopyFeedback.ts +76 -0
- package/src/clipboard/core/index.ts +1 -0
- package/src/clipboard/core/writeToClipboard.ts +47 -0
- package/src/clipboard/ui/CodeBlock.tsx +110 -0
- package/src/clipboard/ui/CopyButton.tsx +111 -0
- package/src/clipboard/ui/index.ts +9 -0
- package/src/clipboard/ui/useCopyToClipboard.ts +57 -0
- package/src/color/core/contrast.ts +85 -0
- package/src/color/core/hex.ts +57 -0
- package/src/color/core/index.ts +4 -0
- package/src/color/core/scale.ts +132 -0
- package/src/color/ui/ColorScaleLegend.tsx +144 -0
- package/src/color/ui/index.ts +2 -0
- package/src/core.ts +12 -0
- package/src/credits/core/credits.ts +183 -0
- package/src/credits/core/index.ts +2 -0
- package/src/credits/ui/CreditsList.tsx +82 -0
- package/src/credits/ui/index.ts +2 -0
- package/src/delimited/core/delimiters.ts +64 -0
- package/src/delimited/core/index.ts +11 -0
- package/src/delimited/core/readDelimited.ts +132 -0
- package/src/delimited/core/rowsToDelimited.ts +135 -0
- package/src/delimited/core/toDelimited.ts +69 -0
- package/src/delimited/ui/DelimitedTextDialog.tsx +49 -0
- package/src/delimited/ui/DelimitedTextPanel.tsx +161 -0
- package/src/delimited/ui/index.ts +4 -0
- package/src/disclosure/ui/CollapsibleSection.tsx +150 -0
- package/src/disclosure/ui/index.ts +4 -0
- package/src/disclosure/ui/useDisclosure.ts +35 -0
- package/src/download/core/downloadBlob.ts +19 -0
- package/src/download/core/downloadText.ts +19 -0
- package/src/download/core/index.ts +3 -0
- package/src/download/core/sanitizeFileName.ts +33 -0
- package/src/ecosystem/core/index.ts +3 -0
- package/src/ecosystem/core/links.ts +29 -0
- package/src/ecosystem/core/lookup.ts +41 -0
- package/src/ecosystem/core/sites.ts +38 -1
- package/src/ecosystem/core/tokens.ts +47 -0
- package/src/ecosystem/ui/SiteTheme.tsx +23 -0
- package/src/ecosystem/ui/Wordmark.tsx +65 -0
- package/src/ecosystem/ui/glyphs.tsx +246 -0
- package/src/ecosystem/ui/index.ts +4 -0
- package/src/ecosystem/ui/marks.tsx +56 -214
- package/src/error/ui/ErrorBoundary.tsx +94 -0
- package/src/error/ui/ErrorFallback.tsx +64 -0
- package/src/error/ui/index.ts +4 -0
- package/src/error/ui/toError.ts +33 -0
- package/src/format/core/index.ts +9 -0
- package/src/format/core/missing.ts +6 -0
- package/src/format/core/numbers.ts +84 -0
- package/src/format/core/units.ts +60 -0
- package/src/format/core/words.ts +17 -0
- package/src/help/ui/HelpBody.tsx +130 -0
- package/src/help/ui/HelpIcon.tsx +53 -0
- package/src/help/ui/HelpToolbarButton.tsx +72 -0
- package/src/help/ui/HelpTooltip.tsx +72 -0
- package/src/help/ui/index.ts +8 -0
- package/src/hooks/ui/index.ts +6 -0
- package/src/hooks/ui/listNavigation.ts +116 -0
- package/src/hooks/ui/useContainerSize.ts +32 -0
- package/src/hooks/ui/useDebouncedValue.ts +29 -0
- package/src/hooks/ui/useListKeyboardNavigation.ts +37 -0
- package/src/hooks/ui/useResizeObserver.ts +50 -0
- package/src/orbital/core/atomicGrid.ts +167 -0
- package/src/orbital/core/atomicOrbitals.ts +212 -0
- package/src/orbital/core/constants.ts +36 -0
- package/src/orbital/core/electronConfiguration.ts +242 -0
- package/src/orbital/core/grid.ts +126 -0
- package/src/orbital/core/hydrogenic.ts +222 -0
- package/src/orbital/core/index.ts +63 -0
- package/src/orbital/core/isovalue.ts +146 -0
- package/src/orbital/core/numerics.ts +79 -0
- package/src/orbital/core/occupancy.ts +100 -0
- package/src/orbital/core/palette.ts +56 -0
- package/src/orbital/core/realHarmonics.ts +172 -0
- package/src/orbital/core/sample.ts +111 -0
- package/src/orbital/core/screening.ts +90 -0
- package/src/orbital/ui/AtomicOrbitalCanvas.tsx +197 -0
- package/src/orbital/ui/AtomicOrbitalViewer.tsx +154 -0
- package/src/orbital/ui/camera.ts +125 -0
- package/src/orbital/ui/capability.ts +102 -0
- package/src/orbital/ui/index.ts +17 -0
- package/src/orbital/ui/renderVolume.ts +203 -0
- package/src/orbital/ui/viewer.ts +191 -0
- package/src/orbital/ui/volumeField.ts +84 -0
- package/src/orbital.ts +11 -0
- package/src/pedagogy/core/glossary.ts +122 -0
- package/src/pedagogy/core/index.ts +28 -0
- package/src/pedagogy/core/jsonStorage.ts +51 -0
- package/src/pedagogy/core/progress.ts +205 -0
- package/src/pedagogy/core/types.ts +78 -0
- package/src/pedagogy/core/validation.ts +109 -0
- package/src/pedagogy/ui/ExerciseActions.tsx +129 -0
- package/src/pedagogy/ui/ExerciseProgressHeader.tsx +135 -0
- package/src/pedagogy/ui/ExerciseTags.tsx +85 -0
- package/src/pedagogy/ui/GlossaryProvider.tsx +31 -0
- package/src/pedagogy/ui/GlossaryText.tsx +164 -0
- package/src/pedagogy/ui/HintLadder.tsx +95 -0
- package/src/pedagogy/ui/ReferenceGrid.tsx +69 -0
- package/src/pedagogy/ui/ReferenceSectionBlock.tsx +175 -0
- package/src/pedagogy/ui/SyntaxTooltip.tsx +222 -0
- package/src/pedagogy/ui/TestCaseList.tsx +122 -0
- package/src/pedagogy/ui/TutorialStepStrip.tsx +230 -0
- package/src/pedagogy/ui/exerciseMeta.ts +45 -0
- package/src/pedagogy/ui/glossaryContext.ts +23 -0
- package/src/pedagogy/ui/index.ts +37 -0
- package/src/pedagogy/ui/tutorialLevels.ts +27 -0
- package/src/router/core/address.ts +74 -0
- package/src/router/core/basePath.ts +76 -0
- package/src/router/core/index.ts +26 -0
- package/src/router/core/legacyHash.ts +77 -0
- package/src/router/core/pageAddresses.ts +106 -0
- package/src/router/core/query.ts +87 -0
- package/src/router/core/tabRouter.ts +214 -0
- package/src/seo/core/documentMeta.ts +92 -0
- package/src/seo/core/index.ts +6 -0
- package/src/share/core/config.ts +165 -0
- package/src/share/core/escape.ts +22 -0
- package/src/share/core/index.ts +31 -0
- package/src/share/core/params.ts +176 -0
- package/src/share/core/query.ts +72 -0
- package/src/share/core/url.ts +105 -0
- package/src/share/core/vocabulary.ts +60 -0
- package/src/share/ui/HiddenPartsProvider.tsx +34 -0
- package/src/share/ui/PagePart.tsx +26 -0
- package/src/share/ui/ShareButton.tsx +84 -0
- package/src/share/ui/ShareDialog.tsx +114 -0
- package/src/share/ui/ShareDialogContent.tsx +189 -0
- package/src/share/ui/SharePartOptions.tsx +51 -0
- package/src/share/ui/draft.ts +19 -0
- package/src/share/ui/hiddenParts.ts +22 -0
- package/src/share/ui/index.ts +9 -0
- package/src/shared/ui/index.ts +2 -1
- package/src/state/ui/index.ts +6 -0
- package/src/state/ui/mergeStored.ts +87 -0
- package/src/state/ui/persistBucket.ts +147 -0
- package/src/structure/core/editorValue.ts +116 -0
- package/src/structure/core/fragmentQuery.ts +50 -0
- package/src/structure/core/index.ts +13 -0
- package/src/structure/core/molfile.ts +90 -0
- package/src/structure/core/readStructure.ts +73 -0
- package/src/structure/core/structureSource.ts +57 -0
- package/src/structure/core/toolbarFloor.ts +31 -0
- package/src/structure/ui/EditorCanvas.tsx +130 -0
- package/src/structure/ui/Structure.tsx +183 -0
- package/src/structure/ui/StructureEditor.tsx +196 -0
- package/src/structure/ui/StructurePlaceholder.tsx +48 -0
- package/src/structure/ui/StructureSvg.tsx +110 -0
- package/src/structure/ui/index.ts +22 -0
- package/src/structure/ui/useToolbarFloor.ts +93 -0
- package/src/structure.ts +2 -0
- package/src/ui.ts +13 -0
- package/src/worker/core/errors.ts +15 -0
- package/src/worker/core/index.ts +8 -0
- package/src/worker/core/messages.ts +47 -0
- package/src/worker/core/workerChannel.ts +218 -0
- package/styles/chrome.css +223 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A debounced echo of a fast-changing value.
|
|
4
|
+
*
|
|
5
|
+
* The returned value only catches up once the source has been still for
|
|
6
|
+
* `delayMs`, so a memo, a request or a canvas redraw downstream runs when the
|
|
7
|
+
* user pauses instead of on every keystroke or slider step.
|
|
8
|
+
* @param value - The live value to follow.
|
|
9
|
+
* @param delayMs - Quiet period, in milliseconds, before the value settles. Defaults to `250`.
|
|
10
|
+
* @returns The value as it stood `delayMs` after the last change.
|
|
11
|
+
*/
|
|
12
|
+
export function useDebouncedValue(value, delayMs = 250) {
|
|
13
|
+
const [debounced, setDebounced] = useState(value);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const handle = setTimeout(() => {
|
|
16
|
+
setDebounced(value);
|
|
17
|
+
}, delayMs);
|
|
18
|
+
return () => {
|
|
19
|
+
clearTimeout(handle);
|
|
20
|
+
};
|
|
21
|
+
}, [value, delayMs]);
|
|
22
|
+
return debounced;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=useDebouncedValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebouncedValue.js","sourceRoot":"","sources":["../../../src/hooks/ui/useDebouncedValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAa,EACb,OAAO,GAAG,GAAG;IAEb,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,EAAE;YAC7B,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EAAE,OAAO,CAAC,CAAC;QACZ,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAErB,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KeyboardEvent } from 'react';
|
|
2
|
+
import type { ListNavigationHandlerOptions } from './listNavigation.ts';
|
|
3
|
+
/** See {@link ListNavigationHandlerOptions}. */
|
|
4
|
+
export type ListKeyboardNavigationOptions = ListNavigationHandlerOptions;
|
|
5
|
+
/**
|
|
6
|
+
* Keyboard navigation for a list or a table whose selection lives outside it.
|
|
7
|
+
*
|
|
8
|
+
* Put the returned handler on the scrolling container — which needs a
|
|
9
|
+
* `tabIndex` so it can hold the focus — and `ArrowUp` / `ArrowDown` move one
|
|
10
|
+
* entry, `PageUp` / `PageDown` move `pageStep`, and `Home` / `End` jump to the
|
|
11
|
+
* ends. Nothing is stored in the hook: the selection stays wherever the page
|
|
12
|
+
* already keeps it, and `onSelect` fires only when the index actually changes.
|
|
13
|
+
* @param options - See {@link ListNavigationHandlerOptions}.
|
|
14
|
+
* @returns The `onKeyDown` handler for the container.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useListKeyboardNavigation(options: ListKeyboardNavigationOptions): (event: KeyboardEvent<HTMLElement>) => void;
|
|
17
|
+
//# sourceMappingURL=useListKeyboardNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListKeyboardNavigation.d.ts","sourceRoot":"","sources":["../../../src/hooks/ui/useListKeyboardNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAGxE,gDAAgD;AAChD,MAAM,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,6BAA6B,GACrC,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAc7C"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sampling one atomic orbital onto the scalar field the isosurface renderer
|
|
3
|
+
* consumes.
|
|
4
|
+
*
|
|
5
|
+
* The box is sized from the orbital itself rather than fixed: a 1s on fluorine
|
|
6
|
+
* and a 4f on caesium differ by more than an order of magnitude in extent, and a
|
|
7
|
+
* box that suits one either buries the other in empty space or slices its lobes
|
|
8
|
+
* off at a face. {@link enclosingRadius} gives the sphere holding almost all of
|
|
9
|
+
* the electron, and the cube is drawn around that.
|
|
10
|
+
*
|
|
11
|
+
* Pure: no React, no molstar. `src/viewer` turns the returned field into a
|
|
12
|
+
* surface, and the worker calls this off the main thread.
|
|
13
|
+
*/
|
|
14
|
+
import type { AtomicOrbital } from './atomicOrbitals.ts';
|
|
15
|
+
import type { GridBox, OrbitalEvaluator, OrbitalGrid } from './grid.ts';
|
|
16
|
+
/** How finely, and how far out, an orbital is sampled. */
|
|
17
|
+
export interface AtomicGridOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Samples along each edge of the cube. The cost is the cube of this, and 56
|
|
20
|
+
* resolves the radial node of a 3s while staying near 30 ms.
|
|
21
|
+
* @default 56
|
|
22
|
+
*/
|
|
23
|
+
resolution?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Share of `∫ r²R² dr` the box must contain before padding.
|
|
26
|
+
* @default 0.985
|
|
27
|
+
*/
|
|
28
|
+
enclosedFraction?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Multiplier applied to the enclosing radius, so the surface closes inside
|
|
31
|
+
* the box instead of touching a face.
|
|
32
|
+
* @default 1.15
|
|
33
|
+
*/
|
|
34
|
+
padding?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sample an atomic orbital onto a cubic grid centred on its nucleus.
|
|
38
|
+
* @param orbital - The orbital to draw.
|
|
39
|
+
* @param options - See {@link AtomicGridOptions}.
|
|
40
|
+
* @returns The signed field, its layout and its statistics.
|
|
41
|
+
* @throws {Error} When the resolution is below 2.
|
|
42
|
+
*/
|
|
43
|
+
export declare function sampleAtomicOrbital(orbital: AtomicOrbital, options?: AtomicGridOptions): OrbitalGrid;
|
|
44
|
+
/**
|
|
45
|
+
* Build `ψ(x, y, z) = R(r) Y(x, y, z)` for one orbital, centred on the origin.
|
|
46
|
+
* @param orbital - The orbital to evaluate.
|
|
47
|
+
* @returns An allocation-free evaluator in ångström, returning Å^(-3/2).
|
|
48
|
+
*/
|
|
49
|
+
export declare function createAtomicOrbitalEvaluator(orbital: AtomicOrbital): OrbitalEvaluator;
|
|
50
|
+
/**
|
|
51
|
+
* The cube one orbital is sampled over.
|
|
52
|
+
* @param orbital - The orbital to fit.
|
|
53
|
+
* @param enclosedFraction - Share of the electron to contain.
|
|
54
|
+
* @param padding - Multiplier applied to the enclosing radius.
|
|
55
|
+
* @returns A cube centred on the nucleus.
|
|
56
|
+
*/
|
|
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;
|
|
85
|
+
//# sourceMappingURL=atomicGrid.d.ts.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sampling one atomic orbital onto the scalar field the isosurface renderer
|
|
3
|
+
* consumes.
|
|
4
|
+
*
|
|
5
|
+
* The box is sized from the orbital itself rather than fixed: a 1s on fluorine
|
|
6
|
+
* and a 4f on caesium differ by more than an order of magnitude in extent, and a
|
|
7
|
+
* box that suits one either buries the other in empty space or slices its lobes
|
|
8
|
+
* off at a face. {@link enclosingRadius} gives the sphere holding almost all of
|
|
9
|
+
* the electron, and the cube is drawn around that.
|
|
10
|
+
*
|
|
11
|
+
* Pure: no React, no molstar. `src/viewer` turns the returned field into a
|
|
12
|
+
* surface, and the worker calls this off the main thread.
|
|
13
|
+
*/
|
|
14
|
+
import { hydrogenicParametersOf } from "./atomicOrbitals.js";
|
|
15
|
+
import { evaluateGrid } from "./grid.js";
|
|
16
|
+
import { createRadialFunction, enclosingRadius, radialNodeRadii, } from "./hydrogenic.js";
|
|
17
|
+
/**
|
|
18
|
+
* Sample an atomic orbital onto a cubic grid centred on its nucleus.
|
|
19
|
+
* @param orbital - The orbital to draw.
|
|
20
|
+
* @param options - See {@link AtomicGridOptions}.
|
|
21
|
+
* @returns The signed field, its layout and its statistics.
|
|
22
|
+
* @throws {Error} When the resolution is below 2.
|
|
23
|
+
*/
|
|
24
|
+
export function sampleAtomicOrbital(orbital, options = {}) {
|
|
25
|
+
const { resolution = DEFAULT_RESOLUTION, enclosedFraction = DEFAULT_ENCLOSED_FRACTION, padding = DEFAULT_PADDING, } = options;
|
|
26
|
+
return evaluateGrid(createAtomicOrbitalEvaluator(orbital), atomicGridBox(orbital, enclosedFraction, padding), resolution);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build `ψ(x, y, z) = R(r) Y(x, y, z)` for one orbital, centred on the origin.
|
|
30
|
+
* @param orbital - The orbital to evaluate.
|
|
31
|
+
* @returns An allocation-free evaluator in ångström, returning Å^(-3/2).
|
|
32
|
+
*/
|
|
33
|
+
export function createAtomicOrbitalEvaluator(orbital) {
|
|
34
|
+
const radial = createRadialFunction(hydrogenicParametersOf(orbital));
|
|
35
|
+
const angular = orbital.harmonic.evaluate;
|
|
36
|
+
// Every ℓ > 0 harmonic divides by the radius, and the nucleus is a grid point
|
|
37
|
+
// whenever the resolution is odd, so the singularity is real and is answered
|
|
38
|
+
// here: only an s orbital has amplitude at r = 0.
|
|
39
|
+
const atNucleus = orbital.l === 0 ? radial(0) * angular(0, 0, 0, 1) : 0;
|
|
40
|
+
return (x, y, z) => {
|
|
41
|
+
const squared = x * x + y * y + z * z;
|
|
42
|
+
if (squared === 0)
|
|
43
|
+
return atNucleus;
|
|
44
|
+
const radius = Math.sqrt(squared);
|
|
45
|
+
return radial(radius) * angular(x, y, z, radius);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The cube one orbital is sampled over.
|
|
50
|
+
* @param orbital - The orbital to fit.
|
|
51
|
+
* @param enclosedFraction - Share of the electron to contain.
|
|
52
|
+
* @param padding - Multiplier applied to the enclosing radius.
|
|
53
|
+
* @returns A cube centred on the nucleus.
|
|
54
|
+
*/
|
|
55
|
+
export function atomicGridBox(orbital, enclosedFraction = DEFAULT_ENCLOSED_FRACTION, padding = DEFAULT_PADDING) {
|
|
56
|
+
const half = enclosingRadius(hydrogenicParametersOf(orbital), enclosedFraction) *
|
|
57
|
+
padding;
|
|
58
|
+
return {
|
|
59
|
+
origin: { x: -half, y: -half, z: -half },
|
|
60
|
+
size: { x: 2 * half, y: 2 * half, z: 2 * half },
|
|
61
|
+
};
|
|
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
|
+
}
|
|
94
|
+
/** Samples per edge; the cost is the cube of it. */
|
|
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;
|
|
101
|
+
/** A tail past this holds too little density to change the surface. */
|
|
102
|
+
const DEFAULT_ENCLOSED_FRACTION = 0.985;
|
|
103
|
+
/** Room for the surface to close before the box ends. */
|
|
104
|
+
const DEFAULT_PADDING = 1.15;
|
|
105
|
+
//# sourceMappingURL=atomicGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomicGrid.js","sourceRoot":"","sources":["../../../src/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,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"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every orbital of one element, assembled from the four parts that describe it.
|
|
3
|
+
*
|
|
4
|
+
* The configuration says which subshells hold electrons, Slater's rules say how
|
|
5
|
+
* strongly each is bound, the hydrogen-like radial function gives it a size and
|
|
6
|
+
* its radial nodes, and a real spherical harmonic gives it a shape. This module
|
|
7
|
+
* is only the join — it computes nothing itself, which is what keeps each of
|
|
8
|
+
* those four testable on its own.
|
|
9
|
+
*
|
|
10
|
+
* Electrons inside a subshell are spread by Hund's rule: every orbital of the
|
|
11
|
+
* subshell takes one before any takes a second. That is why nitrogen shows
|
|
12
|
+
* three singly-occupied 2p orbitals and oxygen one pair and two singles.
|
|
13
|
+
*/
|
|
14
|
+
import type { HydrogenicParameters } from './hydrogenic.ts';
|
|
15
|
+
import type { RealHarmonic } from './realHarmonics.ts';
|
|
16
|
+
/** One atomic orbital of one element: a shape, a size and an occupancy. */
|
|
17
|
+
export interface AtomicOrbital {
|
|
18
|
+
/** Url-safe and unique within the element, e.g. `3dx2-y2`. */
|
|
19
|
+
id: string;
|
|
20
|
+
n: number;
|
|
21
|
+
/** Angular momentum quantum number: 0 = s, 1 = p, 2 = d, 3 = f. */
|
|
22
|
+
l: number;
|
|
23
|
+
/** Which of the `2ℓ + 1` real harmonics of the subshell. */
|
|
24
|
+
harmonic: RealHarmonic;
|
|
25
|
+
/** Subshell name without the subscript, e.g. `3d`. */
|
|
26
|
+
shell: string;
|
|
27
|
+
/** Electrons in this one orbital: 0, 1 or 2, after Hund's rule. */
|
|
28
|
+
electrons: number;
|
|
29
|
+
/** Electrons in the whole subshell. */
|
|
30
|
+
subshellElectrons: number;
|
|
31
|
+
/** Effective nuclear charge from Slater's rules. */
|
|
32
|
+
effectiveCharge: number;
|
|
33
|
+
/** Shielding `S` those rules produced. */
|
|
34
|
+
shielding: number;
|
|
35
|
+
/** `−13.6 Z_eff²/n²`, electronvolts. */
|
|
36
|
+
energy: number;
|
|
37
|
+
/** `n − ℓ − 1` spheres on which the wavefunction changes sign. */
|
|
38
|
+
radialNodes: number;
|
|
39
|
+
/** ℓ planes or cones on which it changes sign. */
|
|
40
|
+
angularNodes: number;
|
|
41
|
+
/** `⟨r⟩`, ångström. */
|
|
42
|
+
meanRadius: number;
|
|
43
|
+
/** True when the subshell is empty in the ground state. */
|
|
44
|
+
isVirtual: boolean;
|
|
45
|
+
/** True when this is the outermost occupied shell. */
|
|
46
|
+
isValence: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Options for {@link atomicOrbitalsOf}. */
|
|
49
|
+
export interface AtomicOrbitalOptions {
|
|
50
|
+
/**
|
|
51
|
+
* Highest principal quantum number to include. Defaults to one shell past
|
|
52
|
+
* the outermost occupied one, and never below 4 — a hydrogen atom whose list
|
|
53
|
+
* stopped at 2p would be missing exactly the 3d and 4f pictures it is famous
|
|
54
|
+
* for.
|
|
55
|
+
* @default max(4, outermost occupied n + 1), capped at 7
|
|
56
|
+
*/
|
|
57
|
+
maximumShell?: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Every orbital of an element, in Madelung (roughly energetic) order.
|
|
61
|
+
* @param atomicNumber - Proton count, 1 to 118.
|
|
62
|
+
* @param options - See {@link AtomicOrbitalOptions}.
|
|
63
|
+
* @returns The orbitals, occupied ones first in filling order and the empty
|
|
64
|
+
* ones after them in the same order.
|
|
65
|
+
* @throws {Error} When the atomic number is outside the periodic table.
|
|
66
|
+
*/
|
|
67
|
+
export declare function atomicOrbitalsOf(atomicNumber: number, options?: AtomicOrbitalOptions): AtomicOrbital[];
|
|
68
|
+
/**
|
|
69
|
+
* Find one orbital of an element by its id.
|
|
70
|
+
* @param orbitals - What {@link atomicOrbitalsOf} returned.
|
|
71
|
+
* @param id - Orbital id, e.g. `2px`.
|
|
72
|
+
* @returns The orbital, or `null` when the id names none.
|
|
73
|
+
*/
|
|
74
|
+
export declare function findAtomicOrbital(orbitals: readonly AtomicOrbital[], id: string): AtomicOrbital | null;
|
|
75
|
+
/**
|
|
76
|
+
* The hydrogen-like parameters an orbital is drawn from.
|
|
77
|
+
* @param orbital - The orbital.
|
|
78
|
+
* @returns Its principal quantum number, ℓ and effective charge.
|
|
79
|
+
*/
|
|
80
|
+
export declare function hydrogenicParametersOf(orbital: AtomicOrbital): HydrogenicParameters;
|
|
81
|
+
/**
|
|
82
|
+
* The id of one orbital, as it appears in a URL.
|
|
83
|
+
* @param n - Principal quantum number.
|
|
84
|
+
* @param l - Angular momentum quantum number.
|
|
85
|
+
* @param harmonic - Which real harmonic of the subshell.
|
|
86
|
+
* @returns The id, e.g. `4fxyz`.
|
|
87
|
+
*/
|
|
88
|
+
export declare function orbitalId(n: number, l: number, harmonic: RealHarmonic): string;
|
|
89
|
+
/**
|
|
90
|
+
* The orbital a student should land on when they pick an element: the first
|
|
91
|
+
* one of the outermost occupied subshell, which is what the element's chemistry
|
|
92
|
+
* is about.
|
|
93
|
+
* @param orbitals - What {@link atomicOrbitalsOf} returned.
|
|
94
|
+
* @returns Its id, or `null` when the list is empty.
|
|
95
|
+
*/
|
|
96
|
+
export declare function defaultOrbitalId(orbitals: readonly AtomicOrbital[]): string | null;
|
|
97
|
+
//# sourceMappingURL=atomicOrbitals.d.ts.map
|
|
@@ -0,0 +1 @@
|
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,EAAE,EAClC,EAAE,EAAE,MAAM,GACT,aAAa,GAAG,IAAI,CAKtB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,aAAa,GACrB,oBAAoB,CAEtB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,YAAY,GACrB,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,aAAa,EAAE,GACjC,MAAM,GAAG,IAAI,CAaf"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every orbital of one element, assembled from the four parts that describe it.
|
|
3
|
+
*
|
|
4
|
+
* The configuration says which subshells hold electrons, Slater's rules say how
|
|
5
|
+
* strongly each is bound, the hydrogen-like radial function gives it a size and
|
|
6
|
+
* its radial nodes, and a real spherical harmonic gives it a shape. This module
|
|
7
|
+
* is only the join — it computes nothing itself, which is what keeps each of
|
|
8
|
+
* those four testable on its own.
|
|
9
|
+
*
|
|
10
|
+
* Electrons inside a subshell are spread by Hund's rule: every orbital of the
|
|
11
|
+
* subshell takes one before any takes a second. That is why nitrogen shows
|
|
12
|
+
* three singly-occupied 2p orbitals and oxygen one pair and two singles.
|
|
13
|
+
*/
|
|
14
|
+
import { MADELUNG_ORDER, configurationOf, subshellLabel, } from "./electronConfiguration.js";
|
|
15
|
+
import { meanRadius, orbitalEnergy, radialNodeCount } from "./hydrogenic.js";
|
|
16
|
+
import { MINIMUM_CHARGE, defaultMaximumShell, hundDistribution, outermostShell, withoutOutermostElectron, } from "./occupancy.js";
|
|
17
|
+
import { harmonicsOf, subshellLetter } from "./realHarmonics.js";
|
|
18
|
+
import { slaterScreening } from "./screening.js";
|
|
19
|
+
/**
|
|
20
|
+
* Every orbital of an element, in Madelung (roughly energetic) order.
|
|
21
|
+
* @param atomicNumber - Proton count, 1 to 118.
|
|
22
|
+
* @param options - See {@link AtomicOrbitalOptions}.
|
|
23
|
+
* @returns The orbitals, occupied ones first in filling order and the empty
|
|
24
|
+
* ones after them in the same order.
|
|
25
|
+
* @throws {Error} When the atomic number is outside the periodic table.
|
|
26
|
+
*/
|
|
27
|
+
export function atomicOrbitalsOf(atomicNumber, options = {}) {
|
|
28
|
+
const configuration = configurationOf(atomicNumber);
|
|
29
|
+
const valenceShell = outermostShell(configuration);
|
|
30
|
+
const { maximumShell = defaultMaximumShell(valenceShell) } = options;
|
|
31
|
+
const occupancies = new Map();
|
|
32
|
+
for (const entry of configuration) {
|
|
33
|
+
occupancies.set(`${entry.n}.${entry.l}`, entry.electrons);
|
|
34
|
+
}
|
|
35
|
+
const promoted = withoutOutermostElectron(configuration);
|
|
36
|
+
const orbitals = [];
|
|
37
|
+
for (const subshell of MADELUNG_ORDER) {
|
|
38
|
+
if (subshell.n > maximumShell)
|
|
39
|
+
continue;
|
|
40
|
+
const subshellElectrons = occupancies.get(`${subshell.n}.${subshell.l}`) ?? 0;
|
|
41
|
+
// An empty orbital is the one an electron would be *promoted* into, so the
|
|
42
|
+
// electron doing the promoting is not also left behind to screen it. This
|
|
43
|
+
// is what makes hydrogen's 3s and 4f come out as the exact hydrogen
|
|
44
|
+
// orbitals every textbook draws, rather than as unbound ones: screened by
|
|
45
|
+
// its own single electron, hydrogen's 3s would see a nuclear charge of zero.
|
|
46
|
+
const screening = slaterScreening(atomicNumber, subshellElectrons === 0 ? promoted : configuration, subshell);
|
|
47
|
+
// Slater's rules can still over-screen a far virtual orbital; a charge at
|
|
48
|
+
// or below zero has no bound radial function at all.
|
|
49
|
+
const charge = Math.max(screening.effectiveCharge, MINIMUM_CHARGE);
|
|
50
|
+
const parameters = {
|
|
51
|
+
n: subshell.n,
|
|
52
|
+
l: subshell.l,
|
|
53
|
+
charge,
|
|
54
|
+
};
|
|
55
|
+
const harmonics = harmonicsOf(subshell.l);
|
|
56
|
+
const spread = hundDistribution(subshellElectrons, harmonics.length);
|
|
57
|
+
for (let index = 0; index < harmonics.length; index++) {
|
|
58
|
+
const harmonic = harmonics[index];
|
|
59
|
+
orbitals.push({
|
|
60
|
+
id: orbitalId(subshell.n, subshell.l, harmonic),
|
|
61
|
+
n: subshell.n,
|
|
62
|
+
l: subshell.l,
|
|
63
|
+
harmonic,
|
|
64
|
+
shell: subshellLabel(subshell),
|
|
65
|
+
electrons: spread[index],
|
|
66
|
+
subshellElectrons,
|
|
67
|
+
effectiveCharge: charge,
|
|
68
|
+
shielding: screening.shielding,
|
|
69
|
+
energy: orbitalEnergy(parameters),
|
|
70
|
+
radialNodes: radialNodeCount(parameters),
|
|
71
|
+
angularNodes: subshell.l,
|
|
72
|
+
meanRadius: meanRadius(parameters),
|
|
73
|
+
isVirtual: subshellElectrons === 0,
|
|
74
|
+
isValence: subshellElectrons > 0 && subshell.n === valenceShell,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return orbitals;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Find one orbital of an element by its id.
|
|
82
|
+
* @param orbitals - What {@link atomicOrbitalsOf} returned.
|
|
83
|
+
* @param id - Orbital id, e.g. `2px`.
|
|
84
|
+
* @returns The orbital, or `null` when the id names none.
|
|
85
|
+
*/
|
|
86
|
+
export function findAtomicOrbital(orbitals, id) {
|
|
87
|
+
for (const orbital of orbitals) {
|
|
88
|
+
if (orbital.id === id)
|
|
89
|
+
return orbital;
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The hydrogen-like parameters an orbital is drawn from.
|
|
95
|
+
* @param orbital - The orbital.
|
|
96
|
+
* @returns Its principal quantum number, ℓ and effective charge.
|
|
97
|
+
*/
|
|
98
|
+
export function hydrogenicParametersOf(orbital) {
|
|
99
|
+
return { n: orbital.n, l: orbital.l, charge: orbital.effectiveCharge };
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The id of one orbital, as it appears in a URL.
|
|
103
|
+
* @param n - Principal quantum number.
|
|
104
|
+
* @param l - Angular momentum quantum number.
|
|
105
|
+
* @param harmonic - Which real harmonic of the subshell.
|
|
106
|
+
* @returns The id, e.g. `4fxyz`.
|
|
107
|
+
*/
|
|
108
|
+
export function orbitalId(n, l, harmonic) {
|
|
109
|
+
return `${n}${subshellLetter(l)}${harmonic.key}`;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The orbital a student should land on when they pick an element: the first
|
|
113
|
+
* one of the outermost occupied subshell, which is what the element's chemistry
|
|
114
|
+
* is about.
|
|
115
|
+
* @param orbitals - What {@link atomicOrbitalsOf} returned.
|
|
116
|
+
* @returns Its id, or `null` when the list is empty.
|
|
117
|
+
*/
|
|
118
|
+
export function defaultOrbitalId(orbitals) {
|
|
119
|
+
let candidate = null;
|
|
120
|
+
for (const orbital of orbitals) {
|
|
121
|
+
if (orbital.electrons === 0)
|
|
122
|
+
continue;
|
|
123
|
+
if (candidate === null) {
|
|
124
|
+
candidate = orbital;
|
|
125
|
+
}
|
|
126
|
+
else if (orbital.n > candidate.n) {
|
|
127
|
+
candidate = orbital;
|
|
128
|
+
}
|
|
129
|
+
else if (orbital.n === candidate.n && orbital.l > candidate.l) {
|
|
130
|
+
candidate = orbital;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return (candidate ?? orbitals[0])?.id ?? null;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=atomicOrbitals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomicOrbitals.js","sourceRoot":"","sources":["../../../src/orbital/core/atomicOrbitals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACL,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CAAC;IACH,CAAC;IACD,OAAO,CAAC,SAAS,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,IAAI,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two physical constants the orbital maths is written in, and the units
|
|
3
|
+
* everything else here follows.
|
|
4
|
+
*
|
|
5
|
+
* Distances are **ångström** and amplitudes **Å^(-3/2)** throughout, so
|
|
6
|
+
* `∫|ψ|² dV` over a grid measured in ångström is one and nothing has to be
|
|
7
|
+
* converted on the way to a renderer. The Bohr radius therefore appears exactly
|
|
8
|
+
* once, in `hydrogenic.ts`.
|
|
9
|
+
*/
|
|
10
|
+
/** The Bohr radius in ångström (CODATA 2018). */
|
|
11
|
+
export declare const BOHR_IN_ANGSTROM = 0.529177210903;
|
|
12
|
+
/** One rydberg in electronvolts (CODATA 2018). */
|
|
13
|
+
export declare const RYDBERG_ELECTRONVOLTS = 13.605693122994;
|
|
14
|
+
/**
|
|
15
|
+
* Share of an orbital's weight the default isosurface encloses.
|
|
16
|
+
*
|
|
17
|
+
* 0.85 is the contour a textbook draws: tight enough that the lobes are
|
|
18
|
+
* separate shapes, loose enough that the outer one of a 3s is still there.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ENCLOSED_WEIGHT = 0.85;
|
|
21
|
+
/**
|
|
22
|
+
* A point in space, ångström.
|
|
23
|
+
*
|
|
24
|
+
* Declared here rather than taken from a geometry package: three numbers are
|
|
25
|
+
* not worth a dependency, and this one crosses a worker boundary as a plain
|
|
26
|
+
* object.
|
|
27
|
+
*/
|
|
28
|
+
export interface Vec3 {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
z: number;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,iBAAoB,CAAC;AAElD,kDAAkD;AAClD,eAAO,MAAM,qBAAqB,kBAAqB,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX"}
|