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,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `[[term]]` marker language, parsed without a DOM.
|
|
3
|
+
*
|
|
4
|
+
* Authored prose — tutorial steps, exercise descriptions, hints — links its
|
|
5
|
+
* jargon by wrapping it in `[[double brackets]]`. A marker may be written
|
|
6
|
+
* `[[term|displayed text]]` when the sentence needs a different wording than
|
|
7
|
+
* the glossary key. Parsing and resolution live here, in plain TypeScript, so
|
|
8
|
+
* both are unit-tested without rendering anything.
|
|
9
|
+
*/
|
|
10
|
+
/** One worked example inside a glossary entry. */
|
|
11
|
+
export interface GlossaryExample {
|
|
12
|
+
/** The construct itself: a pattern, a SMILES, a LaTeX fragment, a layer. */
|
|
13
|
+
code: string;
|
|
14
|
+
/**
|
|
15
|
+
* What the construct is shown working on, for a term whose examples take an
|
|
16
|
+
* input. Left out when the example is about notation only.
|
|
17
|
+
* @default undefined
|
|
18
|
+
*/
|
|
19
|
+
input?: string;
|
|
20
|
+
/**
|
|
21
|
+
* What this example demonstrates, in one line.
|
|
22
|
+
* @default undefined
|
|
23
|
+
*/
|
|
24
|
+
note?: string;
|
|
25
|
+
}
|
|
26
|
+
/** One glossary term, shown wherever a `[[marker]]` names it. */
|
|
27
|
+
export interface GlossaryEntry {
|
|
28
|
+
/** The term, spelled out as the heading of the tooltip. */
|
|
29
|
+
title: string;
|
|
30
|
+
/** One short paragraph — the whole definition. */
|
|
31
|
+
summary: string;
|
|
32
|
+
/** Worked examples, shown under the summary. */
|
|
33
|
+
examples: GlossaryExample[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Every term a site defines, keyed by the lowercased text inside a `[[...]]`.
|
|
37
|
+
*
|
|
38
|
+
* A key that no marker names is simply never shown, and a marker naming no key
|
|
39
|
+
* renders as plain prose — so the two sides may be written in either order.
|
|
40
|
+
*/
|
|
41
|
+
export type Glossary = Record<string, GlossaryEntry>;
|
|
42
|
+
/**
|
|
43
|
+
* One piece of parsed prose: either a run of text, or one marker.
|
|
44
|
+
*
|
|
45
|
+
* `start` is the offset of the piece in the source string, which makes it a
|
|
46
|
+
* stable and unique React key — an array index is neither.
|
|
47
|
+
*/
|
|
48
|
+
export type GlossarySegment = {
|
|
49
|
+
kind: 'text';
|
|
50
|
+
start: number;
|
|
51
|
+
text: string;
|
|
52
|
+
} | {
|
|
53
|
+
kind: 'term';
|
|
54
|
+
start: number;
|
|
55
|
+
term: string;
|
|
56
|
+
text: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Split authored prose into prose runs and markers.
|
|
60
|
+
*
|
|
61
|
+
* A marker yields the lowercased lookup `term` and the `text` to display, which
|
|
62
|
+
* are the same thing unless the marker used the `term|text` form. The term is
|
|
63
|
+
* never checked against any glossary here: an unknown term still produces a
|
|
64
|
+
* `term` segment, and the renderer falls back to showing its text as plain
|
|
65
|
+
* prose — an author may link a term months before it is written, and the page
|
|
66
|
+
* must never show the brackets. Text that never closes its brackets (`[[foo`)
|
|
67
|
+
* is not a marker at all and comes back verbatim inside a `text` segment.
|
|
68
|
+
* @param text - Authored prose, with or without markers.
|
|
69
|
+
* @returns The segments, in order, with no empty run between adjacent markers.
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseGlossaryMarkers(text: string): GlossarySegment[];
|
|
72
|
+
/**
|
|
73
|
+
* Resolve a marker term against a glossary, case-insensitively.
|
|
74
|
+
* @param glossary - The terms the site defines.
|
|
75
|
+
* @param term - The text before the pipe of a `[[marker]]`, in any case.
|
|
76
|
+
* @returns The entry, or `undefined` when no such term has been written yet.
|
|
77
|
+
*/
|
|
78
|
+
export declare function lookupGlossaryTerm(glossary: Glossary, term: string): GlossaryEntry | undefined;
|
|
79
|
+
//# sourceMappingURL=glossary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glossary.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/core/glossary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAErD;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,EAAE,CAsBpE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,GACX,aAAa,GAAG,SAAS,CAI3B"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `[[term]]` marker language, parsed without a DOM.
|
|
3
|
+
*
|
|
4
|
+
* Authored prose — tutorial steps, exercise descriptions, hints — links its
|
|
5
|
+
* jargon by wrapping it in `[[double brackets]]`. A marker may be written
|
|
6
|
+
* `[[term|displayed text]]` when the sentence needs a different wording than
|
|
7
|
+
* the glossary key. Parsing and resolution live here, in plain TypeScript, so
|
|
8
|
+
* both are unit-tested without rendering anything.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Split authored prose into prose runs and markers.
|
|
12
|
+
*
|
|
13
|
+
* A marker yields the lowercased lookup `term` and the `text` to display, which
|
|
14
|
+
* are the same thing unless the marker used the `term|text` form. The term is
|
|
15
|
+
* never checked against any glossary here: an unknown term still produces a
|
|
16
|
+
* `term` segment, and the renderer falls back to showing its text as plain
|
|
17
|
+
* prose — an author may link a term months before it is written, and the page
|
|
18
|
+
* must never show the brackets. Text that never closes its brackets (`[[foo`)
|
|
19
|
+
* is not a marker at all and comes back verbatim inside a `text` segment.
|
|
20
|
+
* @param text - Authored prose, with or without markers.
|
|
21
|
+
* @returns The segments, in order, with no empty run between adjacent markers.
|
|
22
|
+
*/
|
|
23
|
+
export function parseGlossaryMarkers(text) {
|
|
24
|
+
const segments = [];
|
|
25
|
+
// A fresh regexp per call: a /g/ literal carries `lastIndex` between calls.
|
|
26
|
+
const marker = new RegExp(MARKER_SOURCE, 'g');
|
|
27
|
+
let cursor = 0;
|
|
28
|
+
let match = marker.exec(text);
|
|
29
|
+
while (match !== null) {
|
|
30
|
+
if (match.index > cursor) {
|
|
31
|
+
segments.push({
|
|
32
|
+
kind: 'text',
|
|
33
|
+
start: cursor,
|
|
34
|
+
text: text.slice(cursor, match.index),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
segments.push(toTermSegment(match.groups?.term ?? '', match.index));
|
|
38
|
+
cursor = match.index + match[0].length;
|
|
39
|
+
match = marker.exec(text);
|
|
40
|
+
}
|
|
41
|
+
if (cursor < text.length) {
|
|
42
|
+
segments.push({ kind: 'text', start: cursor, text: text.slice(cursor) });
|
|
43
|
+
}
|
|
44
|
+
return segments;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolve a marker term against a glossary, case-insensitively.
|
|
48
|
+
* @param glossary - The terms the site defines.
|
|
49
|
+
* @param term - The text before the pipe of a `[[marker]]`, in any case.
|
|
50
|
+
* @returns The entry, or `undefined` when no such term has been written yet.
|
|
51
|
+
*/
|
|
52
|
+
export function lookupGlossaryTerm(glossary, term) {
|
|
53
|
+
const key = term.trim().toLowerCase();
|
|
54
|
+
// `[[constructor]]` and `[[tostring]]` are prose, not inherited members.
|
|
55
|
+
return Object.hasOwn(glossary, key) ? glossary[key] : undefined;
|
|
56
|
+
}
|
|
57
|
+
const MARKER_SOURCE = String.raw `\[\[(?<term>[^\]]+)\]\]`;
|
|
58
|
+
function toTermSegment(inner, start) {
|
|
59
|
+
const pipe = inner.indexOf('|');
|
|
60
|
+
const rawTerm = pipe === -1 ? inner : inner.slice(0, pipe);
|
|
61
|
+
const rawText = pipe === -1 ? inner : inner.slice(pipe + 1);
|
|
62
|
+
const term = rawTerm.trim().toLowerCase();
|
|
63
|
+
const text = rawText.trim();
|
|
64
|
+
return {
|
|
65
|
+
kind: 'term',
|
|
66
|
+
start,
|
|
67
|
+
term,
|
|
68
|
+
text: text === '' ? rawTerm.trim() : text,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=glossary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glossary.js","sourceRoot":"","sources":["../../../src/pedagogy/core/glossary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA+CH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,QAAQ,GAAsB,EAAE,CAAC;IACvC,4EAA4E;IAC5E,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,KAAK,KAAK,IAAI,EAAE,CAAC;QACtB,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,EAAE,CAAC;YACzB,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC;aACtC,CAAC,CAAC;QACL,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACvC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAAkB,EAClB,IAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACtC,yEAAyE;IACzE,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC;AAED,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA,yBAAyB,CAAC;AAE1D,SAAS,aAAa,CAAC,KAAa,EAAE,KAAa;IACjD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC5B,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,KAAK;QACL,IAAI;QACJ,IAAI,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI;KAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { Glossary, GlossaryEntry, GlossaryExample, GlossarySegment, } from './glossary.ts';
|
|
2
|
+
export { parseGlossaryMarkers } from './glossary.ts';
|
|
3
|
+
export type { ExerciseProgress, LocalStorageProgressStoreOptions, ProgressRecords, ProgressStore, ProgressSummary, } from './progress.ts';
|
|
4
|
+
export { localStorageProgressStore, progressSummary } from './progress.ts';
|
|
5
|
+
export type { BaseExercise, ExerciseLevel, ExerciseSet, ExerciseStatus, TutorialStep, } from './types.ts';
|
|
6
|
+
export type { FinishValidationOptions, TestCaseResult, ValidationResult, } from './validation.ts';
|
|
7
|
+
export { failedValidation, finishValidation } from './validation.ts';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,QAAQ,EACR,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACV,gBAAgB,EAChB,gCAAgC,EAChC,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3E,YAAY,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,uBAAuB,EACvB,cAAc,EACd,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pedagogy/core/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAQrD,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAa3E,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort JSON access to `localStorage`.
|
|
3
|
+
*
|
|
4
|
+
* A page framed in a course may have no storage at all — third-party storage is
|
|
5
|
+
* partitioned in Chrome and blocked in Safari — and a full quota must never
|
|
6
|
+
* take the page down with it. So both calls swallow everything: an unreadable
|
|
7
|
+
* entry reads as nothing stored, and a refused write is simply lost.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Read one entry back as JSON.
|
|
11
|
+
* @param key - The storage key.
|
|
12
|
+
* @returns What was parsed, or `undefined` when there is nothing readable.
|
|
13
|
+
*/
|
|
14
|
+
export declare function readJsonEntry(key: string): unknown;
|
|
15
|
+
/**
|
|
16
|
+
* Write one entry as JSON.
|
|
17
|
+
* @param key - The storage key.
|
|
18
|
+
* @param value - What to store.
|
|
19
|
+
*/
|
|
20
|
+
export declare function writeJsonEntry(key: string, value: unknown): void;
|
|
21
|
+
//# sourceMappingURL=jsonStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonStorage.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/core/jsonStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAWlD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAQhE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort JSON access to `localStorage`.
|
|
3
|
+
*
|
|
4
|
+
* A page framed in a course may have no storage at all — third-party storage is
|
|
5
|
+
* partitioned in Chrome and blocked in Safari — and a full quota must never
|
|
6
|
+
* take the page down with it. So both calls swallow everything: an unreadable
|
|
7
|
+
* entry reads as nothing stored, and a refused write is simply lost.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Read one entry back as JSON.
|
|
11
|
+
* @param key - The storage key.
|
|
12
|
+
* @returns What was parsed, or `undefined` when there is nothing readable.
|
|
13
|
+
*/
|
|
14
|
+
export function readJsonEntry(key) {
|
|
15
|
+
const storage = getStorage();
|
|
16
|
+
if (storage === null)
|
|
17
|
+
return undefined;
|
|
18
|
+
try {
|
|
19
|
+
const raw = storage.getItem(key);
|
|
20
|
+
if (raw === null)
|
|
21
|
+
return undefined;
|
|
22
|
+
return JSON.parse(raw);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
// Corrupt JSON, or a store that refuses to be read.
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Write one entry as JSON.
|
|
31
|
+
* @param key - The storage key.
|
|
32
|
+
* @param value - What to store.
|
|
33
|
+
*/
|
|
34
|
+
export function writeJsonEntry(key, value) {
|
|
35
|
+
const storage = getStorage();
|
|
36
|
+
if (storage === null)
|
|
37
|
+
return;
|
|
38
|
+
try {
|
|
39
|
+
storage.setItem(key, JSON.stringify(value));
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// Quota exceeded, or a store that refuses to be written.
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function getStorage() {
|
|
46
|
+
try {
|
|
47
|
+
const candidate = globalThis.localStorage;
|
|
48
|
+
return candidate ?? null;
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// Reading localStorage throws outright when storage is blocked.
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=jsonStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonStorage.js","sourceRoot":"","sources":["../../../src/pedagogy/core/jsonStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,SAAS,CAAC;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,oDAAoD;QACpD,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,KAAc;IACxD,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO;IAC7B,IAAI,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,yDAAyD;IAC3D,CAAC;AACH,CAAC;AAED,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,UAAU,CAAC,YAAmC,CAAC;QACjE,OAAO,SAAS,IAAI,IAAI,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,gEAAgE;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the work a student did is kept, and how it is read back.
|
|
3
|
+
*
|
|
4
|
+
* The browser is the only binding there is by default; a course hosting its own
|
|
5
|
+
* service implements the same two calls and is plugged in instead, without
|
|
6
|
+
* anything else in the page knowing where the work went.
|
|
7
|
+
*/
|
|
8
|
+
import type { ExerciseStatus } from './types.ts';
|
|
9
|
+
/** What is remembered about one exercise. */
|
|
10
|
+
export interface ExerciseProgress {
|
|
11
|
+
status: ExerciseStatus;
|
|
12
|
+
/** What the student last wrote or drew, exactly as they left it. */
|
|
13
|
+
answer: string;
|
|
14
|
+
/**
|
|
15
|
+
* How many hints of the ladder were opened. A count, not a flag per hint:
|
|
16
|
+
* the ladder grows, and "solved with two hints" is what a student reads.
|
|
17
|
+
*/
|
|
18
|
+
hintsRevealed: number;
|
|
19
|
+
/** Whether the sample answer is on screen. */
|
|
20
|
+
showSolution: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Everything a student has done, keyed by exercise id. */
|
|
23
|
+
export type ProgressRecords<TProgress = ExerciseProgress> = Record<string, TProgress>;
|
|
24
|
+
/**
|
|
25
|
+
* Where the results of the exercises are kept.
|
|
26
|
+
*
|
|
27
|
+
* A binding that answers over the network returns a promise from either call;
|
|
28
|
+
* what {@link ProgressStore.load} resolves to replaces whatever the page
|
|
29
|
+
* started from.
|
|
30
|
+
*/
|
|
31
|
+
export interface ProgressStore<TProgress = ExerciseProgress> {
|
|
32
|
+
/** How the binding names itself, for a sentence about it on the page. */
|
|
33
|
+
readonly name: string;
|
|
34
|
+
/** Give back everything that was stored. */
|
|
35
|
+
load: () => ProgressRecords<TProgress> | Promise<ProgressRecords<TProgress>>;
|
|
36
|
+
/** Keep everything, as it stands after a change. */
|
|
37
|
+
save: (records: ProgressRecords<TProgress>) => void | Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The record an exercise nobody has touched starts from.
|
|
41
|
+
* @returns A blank record.
|
|
42
|
+
*/
|
|
43
|
+
export declare function emptyProgress(): ExerciseProgress;
|
|
44
|
+
/**
|
|
45
|
+
* Read one stored record over its defaults, field by field.
|
|
46
|
+
*
|
|
47
|
+
* A stored field is taken only when it has the same shape as its default, so a
|
|
48
|
+
* payload written by an older version of the page, or a corrupted one, falls
|
|
49
|
+
* back field by field rather than wholesale — and a field added after the last
|
|
50
|
+
* save simply keeps its default. A `null` default accepts anything.
|
|
51
|
+
* @param stored - Whatever came out of the store for this exercise.
|
|
52
|
+
* @param defaults - The record a fresh exercise starts from.
|
|
53
|
+
* @returns A complete record, with nothing unreadable carried over.
|
|
54
|
+
*/
|
|
55
|
+
export declare function mergeProgressRecord<TProgress extends object>(stored: unknown, defaults: TProgress): TProgress;
|
|
56
|
+
/**
|
|
57
|
+
* Read one stored {@link ExerciseProgress}, with its two constrained fields
|
|
58
|
+
* checked rather than merely shape-matched: a status outside the three the
|
|
59
|
+
* page knows reads as `idle`, and a hint count that is negative or fractional
|
|
60
|
+
* reads as none revealed.
|
|
61
|
+
* @param stored - Whatever came out of the store for this exercise.
|
|
62
|
+
* @returns A record the page can trust.
|
|
63
|
+
*/
|
|
64
|
+
export declare function mergeExerciseProgress(stored: unknown): ExerciseProgress;
|
|
65
|
+
/** What {@link localStorageProgressStore} is built from. */
|
|
66
|
+
export interface LocalStorageProgressStoreOptions<TProgress> {
|
|
67
|
+
/** Namespace of the entry, without the version: `smiles:exercises`. */
|
|
68
|
+
key: string;
|
|
69
|
+
/**
|
|
70
|
+
* Bumped when the shape of a record changes, so a future shape can ignore
|
|
71
|
+
* today's entries instead of misreading them.
|
|
72
|
+
* @default 1
|
|
73
|
+
*/
|
|
74
|
+
version?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The record a fresh exercise starts from. When given, every stored record is
|
|
77
|
+
* read over it with {@link mergeProgressRecord}; when left out, a stored
|
|
78
|
+
* record is handed back as it was written.
|
|
79
|
+
* @default undefined
|
|
80
|
+
*/
|
|
81
|
+
defaults?: TProgress;
|
|
82
|
+
/**
|
|
83
|
+
* How the binding names itself on the page.
|
|
84
|
+
* @default 'this browser'
|
|
85
|
+
*/
|
|
86
|
+
name?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Keep the work in `localStorage`, under one namespaced and versioned entry.
|
|
90
|
+
* @param options - Which entry to use, and what a fresh record looks like.
|
|
91
|
+
* @returns The binding, ready to be handed to the page.
|
|
92
|
+
*/
|
|
93
|
+
export declare function localStorageProgressStore<TProgress extends object>(options: LocalStorageProgressStoreOptions<TProgress>): ProgressStore<TProgress>;
|
|
94
|
+
/** How far through a set of exercises a student is. */
|
|
95
|
+
export interface ProgressSummary {
|
|
96
|
+
/** How many are right. */
|
|
97
|
+
solved: number;
|
|
98
|
+
/** How many were handed in and are not right yet. */
|
|
99
|
+
attempted: number;
|
|
100
|
+
/** How many there are to do. */
|
|
101
|
+
total: number;
|
|
102
|
+
/** `solved / total`, and 0 when there is nothing to do. */
|
|
103
|
+
ratio: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Count where a student stands, for the progress bar over a set.
|
|
107
|
+
* @param records - What the store gave back.
|
|
108
|
+
* @param ids - The exercises of the set being counted. Pass them whenever the
|
|
109
|
+
* bar must read against the whole set: without them only the exercises that
|
|
110
|
+
* were touched are counted, and the bar would sit at 100% on the first answer.
|
|
111
|
+
* @returns The counts and the ratio the bar is drawn from.
|
|
112
|
+
*/
|
|
113
|
+
export declare function progressSummary<TProgress extends {
|
|
114
|
+
status: ExerciseStatus;
|
|
115
|
+
}>(records: ProgressRecords<TProgress>, ids?: readonly string[]): ProgressSummary;
|
|
116
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/core/progress.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,2DAA2D;AAC3D,MAAM,MAAM,eAAe,CAAC,SAAS,GAAG,gBAAgB,IAAI,MAAM,CAChE,MAAM,EACN,SAAS,CACV,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,SAAS,GAAG,gBAAgB;IACzD,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,eAAe,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7E,oDAAoD;IACpD,IAAI,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,gBAAgB,CAEhD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,SAAS,MAAM,EAC1D,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,SAAS,GAClB,SAAS,CAUX;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,gBAAgB,CAQvE;AAED,4DAA4D;AAC5D,MAAM,WAAW,gCAAgC,CAAC,SAAS;IACzD,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,SAAS,MAAM,EAChE,OAAO,EAAE,gCAAgC,CAAC,SAAS,CAAC,GACnD,aAAa,CAAC,SAAS,CAAC,CAsB1B;AAED,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,SAAS,SAAS;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,EAC1E,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,EACnC,GAAG,CAAC,EAAE,SAAS,MAAM,EAAE,GACtB,eAAe,CAWjB"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the work a student did is kept, and how it is read back.
|
|
3
|
+
*
|
|
4
|
+
* The browser is the only binding there is by default; a course hosting its own
|
|
5
|
+
* service implements the same two calls and is plugged in instead, without
|
|
6
|
+
* anything else in the page knowing where the work went.
|
|
7
|
+
*/
|
|
8
|
+
import { readJsonEntry, writeJsonEntry } from "./jsonStorage.js";
|
|
9
|
+
/**
|
|
10
|
+
* The record an exercise nobody has touched starts from.
|
|
11
|
+
* @returns A blank record.
|
|
12
|
+
*/
|
|
13
|
+
export function emptyProgress() {
|
|
14
|
+
return { status: 'idle', answer: '', hintsRevealed: 0, showSolution: false };
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Read one stored record over its defaults, field by field.
|
|
18
|
+
*
|
|
19
|
+
* A stored field is taken only when it has the same shape as its default, so a
|
|
20
|
+
* payload written by an older version of the page, or a corrupted one, falls
|
|
21
|
+
* back field by field rather than wholesale — and a field added after the last
|
|
22
|
+
* save simply keeps its default. A `null` default accepts anything.
|
|
23
|
+
* @param stored - Whatever came out of the store for this exercise.
|
|
24
|
+
* @param defaults - The record a fresh exercise starts from.
|
|
25
|
+
* @returns A complete record, with nothing unreadable carried over.
|
|
26
|
+
*/
|
|
27
|
+
export function mergeProgressRecord(stored, defaults) {
|
|
28
|
+
const merged = { ...defaults };
|
|
29
|
+
if (!isPlainRecord(stored))
|
|
30
|
+
return merged;
|
|
31
|
+
for (const [field, fallback] of Object.entries(defaults)) {
|
|
32
|
+
const value = stored[field];
|
|
33
|
+
if (value !== undefined && isSameShape(fallback, value)) {
|
|
34
|
+
merged[field] = value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return merged;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Read one stored {@link ExerciseProgress}, with its two constrained fields
|
|
41
|
+
* checked rather than merely shape-matched: a status outside the three the
|
|
42
|
+
* page knows reads as `idle`, and a hint count that is negative or fractional
|
|
43
|
+
* reads as none revealed.
|
|
44
|
+
* @param stored - Whatever came out of the store for this exercise.
|
|
45
|
+
* @returns A record the page can trust.
|
|
46
|
+
*/
|
|
47
|
+
export function mergeExerciseProgress(stored) {
|
|
48
|
+
const merged = mergeProgressRecord(stored, emptyProgress());
|
|
49
|
+
return {
|
|
50
|
+
...merged,
|
|
51
|
+
status: STATUSES.has(merged.status) ? merged.status : 'idle',
|
|
52
|
+
hintsRevealed: merged.hintsRevealed > 0 ? Math.floor(merged.hintsRevealed) : 0,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Keep the work in `localStorage`, under one namespaced and versioned entry.
|
|
57
|
+
* @param options - Which entry to use, and what a fresh record looks like.
|
|
58
|
+
* @returns The binding, ready to be handed to the page.
|
|
59
|
+
*/
|
|
60
|
+
export function localStorageProgressStore(options) {
|
|
61
|
+
const { key, version = 1, defaults, name = 'this browser' } = options;
|
|
62
|
+
const storageKey = `${key}:v${version}`;
|
|
63
|
+
return {
|
|
64
|
+
name,
|
|
65
|
+
load() {
|
|
66
|
+
const records = {};
|
|
67
|
+
const stored = readJsonEntry(storageKey);
|
|
68
|
+
if (!isPlainRecord(stored))
|
|
69
|
+
return records;
|
|
70
|
+
for (const [id, value] of Object.entries(stored)) {
|
|
71
|
+
if (!isPlainRecord(value))
|
|
72
|
+
continue;
|
|
73
|
+
records[id] =
|
|
74
|
+
defaults === undefined
|
|
75
|
+
? value
|
|
76
|
+
: mergeProgressRecord(value, defaults);
|
|
77
|
+
}
|
|
78
|
+
return records;
|
|
79
|
+
},
|
|
80
|
+
save(records) {
|
|
81
|
+
writeJsonEntry(storageKey, records);
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Count where a student stands, for the progress bar over a set.
|
|
87
|
+
* @param records - What the store gave back.
|
|
88
|
+
* @param ids - The exercises of the set being counted. Pass them whenever the
|
|
89
|
+
* bar must read against the whole set: without them only the exercises that
|
|
90
|
+
* were touched are counted, and the bar would sit at 100% on the first answer.
|
|
91
|
+
* @returns The counts and the ratio the bar is drawn from.
|
|
92
|
+
*/
|
|
93
|
+
export function progressSummary(records, ids) {
|
|
94
|
+
const keys = ids ?? Object.keys(records);
|
|
95
|
+
let solved = 0;
|
|
96
|
+
let attempted = 0;
|
|
97
|
+
for (const id of keys) {
|
|
98
|
+
const status = records[id]?.status;
|
|
99
|
+
if (status === 'solved')
|
|
100
|
+
solved++;
|
|
101
|
+
else if (status === 'attempted')
|
|
102
|
+
attempted++;
|
|
103
|
+
}
|
|
104
|
+
const total = keys.length;
|
|
105
|
+
return { solved, attempted, total, ratio: total === 0 ? 0 : solved / total };
|
|
106
|
+
}
|
|
107
|
+
const STATUSES = new Set([
|
|
108
|
+
'idle',
|
|
109
|
+
'attempted',
|
|
110
|
+
'solved',
|
|
111
|
+
]);
|
|
112
|
+
function isPlainRecord(value) {
|
|
113
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
114
|
+
}
|
|
115
|
+
function isSameShape(fallback, stored) {
|
|
116
|
+
if (fallback === null)
|
|
117
|
+
return true;
|
|
118
|
+
if (Array.isArray(fallback) !== Array.isArray(stored))
|
|
119
|
+
return false;
|
|
120
|
+
return typeof fallback === typeof stored && stored !== null;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/pedagogy/core/progress.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuCjE;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;AAC/E,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAe,EACf,QAAmB;IAEnB,MAAM,MAAM,GAAG,EAAE,GAAG,QAAQ,EAA6B,CAAC;IAC1D,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;QAAE,OAAO,MAAmB,CAAC;IACvD,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;YACxD,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO,MAAmB,CAAC;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAe;IACnD,MAAM,MAAM,GAAG,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;IAC5D,OAAO;QACL,GAAG,MAAM;QACT,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAC5D,aAAa,EACX,MAAM,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KAClE,CAAC;AACJ,CAAC;AA0BD;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAoD;IAEpD,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;IACtE,MAAM,UAAU,GAAG,GAAG,GAAG,KAAK,OAAO,EAAE,CAAC;IACxC,OAAO;QACL,IAAI;QACJ,IAAI;YACF,MAAM,OAAO,GAA+B,EAAE,CAAC;YAC/C,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;YACzC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;gBAAE,OAAO,OAAO,CAAC;YAC3C,KAAK,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACjD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;oBAAE,SAAS;gBACpC,OAAO,CAAC,EAAE,CAAC;oBACT,QAAQ,KAAK,SAAS;wBACpB,CAAC,CAAE,KAAmB;wBACtB,CAAC,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YAC7C,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,OAAmC;YACtC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC;AAcD;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAmC,EACnC,GAAuB;IAEvB,MAAM,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QACnC,IAAI,MAAM,KAAK,QAAQ;YAAE,MAAM,EAAE,CAAC;aAC7B,IAAI,MAAM,KAAK,WAAW;YAAE,SAAS,EAAE,CAAC;IAC/C,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,QAAQ,GAAgC,IAAI,GAAG,CAAC;IACpD,MAAM;IACN,WAAW;IACX,QAAQ;CACT,CAAC,CAAC;AAEH,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,QAAiB,EAAE,MAAe;IACrD,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IACpE,OAAO,OAAO,QAAQ,KAAK,OAAO,MAAM,IAAI,MAAM,KAAK,IAAI,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The spine every pedagogic tool shares: a level, a status, an exercise, a set
|
|
3
|
+
* of them, and one stop of a guided tour. What a given tool asks of a student
|
|
4
|
+
* differs — a regex, a SMILES, a formula — so those parts stay generic and the
|
|
5
|
+
* site adds them.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* How hard a step or an exercise is, which is also how it is coloured: green
|
|
9
|
+
* for a beginner, yellow for an intermediate, pink for an advanced one.
|
|
10
|
+
*/
|
|
11
|
+
export type ExerciseLevel = 'beginner' | 'intermediate' | 'advanced';
|
|
12
|
+
/**
|
|
13
|
+
* Where a student stands on one exercise: never handed in, handed in and not
|
|
14
|
+
* right yet, or right. The three are exclusive — a solved exercise is no longer
|
|
15
|
+
* an attempted one.
|
|
16
|
+
*/
|
|
17
|
+
export type ExerciseStatus = 'idle' | 'attempted' | 'solved';
|
|
18
|
+
/**
|
|
19
|
+
* What every exercise carries, whatever it asks for.
|
|
20
|
+
*
|
|
21
|
+
* A tool extends it with the shape of its own question and its own test cases.
|
|
22
|
+
*/
|
|
23
|
+
export interface BaseExercise {
|
|
24
|
+
/** Stable and URL-safe: it is what `/exercises/<id>` carries. */
|
|
25
|
+
id: string;
|
|
26
|
+
/** How the exercise is listed. */
|
|
27
|
+
title: string;
|
|
28
|
+
level: ExerciseLevel;
|
|
29
|
+
/** What to do, in a few sentences; may carry `[[term]]` markers. */
|
|
30
|
+
description: string;
|
|
31
|
+
/**
|
|
32
|
+
* Ordered from a nudge to almost the answer, revealed one at a time. Two to
|
|
33
|
+
* four is the useful range: never one, never six.
|
|
34
|
+
*/
|
|
35
|
+
hints: string[];
|
|
36
|
+
/** A sample answer, shown only when the student asks to see it. */
|
|
37
|
+
solution: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A named list of exercises, which is what a link hands out.
|
|
41
|
+
*
|
|
42
|
+
* The exercise type is the tool's own, so a set of SMARTS questions and a set
|
|
43
|
+
* of LaTeX formulas are the same structure holding different questions.
|
|
44
|
+
*/
|
|
45
|
+
export interface ExerciseSet<TExercise = BaseExercise> {
|
|
46
|
+
/** Stable and URL-safe. */
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
/** One line on what the set drills. */
|
|
50
|
+
description: string;
|
|
51
|
+
/**
|
|
52
|
+
* The level of the set as a whole, when it has one. A set whose level is read
|
|
53
|
+
* off its questions rather than written down leaves it out.
|
|
54
|
+
* @default undefined
|
|
55
|
+
*/
|
|
56
|
+
level?: ExerciseLevel;
|
|
57
|
+
exercises: TExercise[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* One stop in the guided tour, plus whatever the tool preloads into its live
|
|
61
|
+
* playground — a pattern and its flags, a SMILES, a structure and a layer.
|
|
62
|
+
*
|
|
63
|
+
* A step is a working configuration the student is free to edit, never a slide.
|
|
64
|
+
*/
|
|
65
|
+
export type TutorialStep<TPayload = unknown> = {
|
|
66
|
+
/** Stable and URL-safe: it is what a link to the step carries. */
|
|
67
|
+
id: string;
|
|
68
|
+
title: string;
|
|
69
|
+
/** One short paragraph; may carry `[[term]]` markers. */
|
|
70
|
+
description: string;
|
|
71
|
+
/** Which coloured group the step is listed under. */
|
|
72
|
+
level: ExerciseLevel;
|
|
73
|
+
} & TPayload;
|
|
74
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/core/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC;IACrB,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW,CAAC,SAAS,GAAG,YAAY;IACnD,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,SAAS,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,QAAQ,GAAG,OAAO,IAAI;IAC7C,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,KAAK,EAAE,aAAa,CAAC;CACtB,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The spine every pedagogic tool shares: a level, a status, an exercise, a set
|
|
3
|
+
* of them, and one stop of a guided tour. What a given tool asks of a student
|
|
4
|
+
* differs — a regex, a SMILES, a formula — so those parts stay generic and the
|
|
5
|
+
* site adds them.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/pedagogy/core/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|