react-cheminfo 0.25.0 → 0.27.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 +73 -2
- package/bin/check-deploy.mjs +14 -4
- package/bin/check-messages.mjs +229 -0
- package/lib/about/ui/AboutBuild.d.ts.map +1 -1
- package/lib/about/ui/AboutBuild.js +15 -4
- package/lib/about/ui/AboutBuild.js.map +1 -1
- package/lib/about/ui/AboutCitations.d.ts.map +1 -1
- package/lib/about/ui/AboutCitations.js +3 -1
- package/lib/about/ui/AboutCitations.js.map +1 -1
- package/lib/about/ui/AboutPage.d.ts.map +1 -1
- package/lib/about/ui/AboutPage.js +9 -1
- package/lib/about/ui/AboutPage.js.map +1 -1
- package/lib/about/ui/AboutProvidedBy.d.ts.map +1 -1
- package/lib/about/ui/AboutProvidedBy.js +8 -3
- package/lib/about/ui/AboutProvidedBy.js.map +1 -1
- package/lib/capsule/ui/Capsule.d.ts +30 -0
- package/lib/capsule/ui/Capsule.d.ts.map +1 -0
- package/lib/capsule/ui/Capsule.js +12 -0
- package/lib/capsule/ui/Capsule.js.map +1 -0
- package/lib/capsule/ui/CapsuleFilter.d.ts +19 -3
- package/lib/capsule/ui/CapsuleFilter.d.ts.map +1 -1
- package/lib/capsule/ui/CapsuleFilter.js +14 -44
- package/lib/capsule/ui/CapsuleFilter.js.map +1 -1
- package/lib/capsule/ui/capsuleFilterCapsules.d.ts +15 -0
- package/lib/capsule/ui/capsuleFilterCapsules.d.ts.map +1 -0
- package/lib/capsule/ui/capsuleFilterCapsules.js +47 -0
- package/lib/capsule/ui/capsuleFilterCapsules.js.map +1 -0
- package/lib/chart/ui/ChartTrackingLayer.d.ts.map +1 -1
- package/lib/chart/ui/ChartTrackingLayer.js +4 -2
- package/lib/chart/ui/ChartTrackingLayer.js.map +1 -1
- package/lib/chrome/ui/SiteHeader.d.ts +1 -1
- package/lib/chrome/ui/SiteHeader.d.ts.map +1 -1
- package/lib/chrome/ui/SiteHeader.js +4 -2
- package/lib/chrome/ui/SiteHeader.js.map +1 -1
- package/lib/citation/ui/CitationMenu.d.ts +1 -1
- package/lib/citation/ui/CitationMenu.d.ts.map +1 -1
- package/lib/citation/ui/CitationMenu.js +7 -3
- package/lib/citation/ui/CitationMenu.js.map +1 -1
- package/lib/citation/ui/CiteButton.d.ts +1 -1
- package/lib/citation/ui/CiteButton.d.ts.map +1 -1
- package/lib/citation/ui/CiteButton.js +3 -1
- package/lib/citation/ui/CiteButton.js.map +1 -1
- package/lib/citation/ui/CopyFormatEntries.d.ts.map +1 -1
- package/lib/citation/ui/CopyFormatEntries.js +3 -1
- package/lib/citation/ui/CopyFormatEntries.js.map +1 -1
- package/lib/citation/ui/WorkEntry.d.ts.map +1 -1
- package/lib/citation/ui/WorkEntry.js +3 -1
- package/lib/citation/ui/WorkEntry.js.map +1 -1
- package/lib/citation/ui/entries.d.ts.map +1 -1
- package/lib/citation/ui/entries.js +8 -2
- package/lib/citation/ui/entries.js.map +1 -1
- package/lib/citation/ui/useCopyFeedback.d.ts.map +1 -1
- package/lib/citation/ui/useCopyFeedback.js +9 -4
- package/lib/citation/ui/useCopyFeedback.js.map +1 -1
- package/lib/clipboard/ui/ClickToCopy.d.ts.map +1 -1
- package/lib/clipboard/ui/ClickToCopy.js +12 -6
- package/lib/clipboard/ui/ClickToCopy.js.map +1 -1
- package/lib/clipboard/ui/CopyButton.d.ts +3 -3
- package/lib/clipboard/ui/CopyButton.d.ts.map +1 -1
- package/lib/clipboard/ui/CopyButton.js +7 -4
- package/lib/clipboard/ui/CopyButton.js.map +1 -1
- package/lib/color/ui/ColorScaleEditor.d.ts.map +1 -1
- package/lib/color/ui/ColorScaleEditor.js +15 -10
- package/lib/color/ui/ColorScaleEditor.js.map +1 -1
- package/lib/color/ui/ColorScaleEntry.d.ts.map +1 -1
- package/lib/color/ui/ColorScaleEntry.js +4 -2
- package/lib/color/ui/ColorScaleEntry.js.map +1 -1
- package/lib/color/ui/ColorScaleLegend.d.ts.map +1 -1
- package/lib/color/ui/ColorScaleLegend.js +7 -1
- package/lib/color/ui/ColorScaleLegend.js.map +1 -1
- package/lib/color/ui/ColorScaleSelect.d.ts.map +1 -1
- package/lib/color/ui/ColorScaleSelect.js +8 -4
- package/lib/color/ui/ColorScaleSelect.js.map +1 -1
- package/lib/confirm/ui/ConfirmButton.d.ts +2 -2
- package/lib/confirm/ui/ConfirmButton.d.ts.map +1 -1
- package/lib/confirm/ui/ConfirmButton.js +4 -2
- package/lib/confirm/ui/ConfirmButton.js.map +1 -1
- package/lib/core.d.ts +1 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +1 -0
- package/lib/core.js.map +1 -1
- package/lib/credits/ui/CreditsList.d.ts.map +1 -1
- package/lib/credits/ui/CreditsList.js +3 -1
- package/lib/credits/ui/CreditsList.js.map +1 -1
- package/lib/delimited/ui/DelimitedTextDialog.d.ts.map +1 -1
- package/lib/delimited/ui/DelimitedTextDialog.js +5 -2
- package/lib/delimited/ui/DelimitedTextDialog.js.map +1 -1
- package/lib/delimited/ui/DelimitedTextPanel.d.ts.map +1 -1
- package/lib/delimited/ui/DelimitedTextPanel.js +8 -8
- package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -1
- package/lib/deploy/core/checkDeploy.d.ts +3 -1
- package/lib/deploy/core/checkDeploy.d.ts.map +1 -1
- package/lib/deploy/core/checkDeploy.js +7 -1
- package/lib/deploy/core/checkDeploy.js.map +1 -1
- package/lib/deploy/core/index.d.ts +1 -0
- package/lib/deploy/core/index.d.ts.map +1 -1
- package/lib/deploy/core/index.js +1 -0
- package/lib/deploy/core/index.js.map +1 -1
- package/lib/deploy/core/pageCache.d.ts +24 -0
- package/lib/deploy/core/pageCache.d.ts.map +1 -0
- package/lib/deploy/core/pageCache.js +91 -0
- package/lib/deploy/core/pageCache.js.map +1 -0
- package/lib/deploy/core/types.d.ts +1 -1
- package/lib/deploy/core/types.d.ts.map +1 -1
- package/lib/deploy/core/types.js.map +1 -1
- package/lib/download/ui/FigureDownload.d.ts +2 -2
- package/lib/download/ui/FigureDownload.d.ts.map +1 -1
- package/lib/download/ui/FigureDownload.js +4 -2
- package/lib/download/ui/FigureDownload.js.map +1 -1
- package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
- package/lib/download/ui/FigureDownloadPanel.js +24 -18
- package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
- package/lib/ecosystem/ui/EcosystemButton.d.ts +1 -1
- package/lib/ecosystem/ui/EcosystemButton.d.ts.map +1 -1
- package/lib/ecosystem/ui/EcosystemButton.js +4 -2
- package/lib/ecosystem/ui/EcosystemButton.js.map +1 -1
- package/lib/ecosystem/ui/EcosystemLinks.d.ts +1 -1
- package/lib/ecosystem/ui/EcosystemLinks.d.ts.map +1 -1
- package/lib/ecosystem/ui/EcosystemLinks.js +5 -2
- package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -1
- package/lib/ecosystem/ui/EcosystemMenu.d.ts.map +1 -1
- package/lib/ecosystem/ui/EcosystemMenu.js +3 -1
- package/lib/ecosystem/ui/EcosystemMenu.js.map +1 -1
- package/lib/ecosystem/ui/SiteGroupSection.d.ts.map +1 -1
- package/lib/ecosystem/ui/SiteGroupSection.js +3 -1
- package/lib/ecosystem/ui/SiteGroupSection.js.map +1 -1
- package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -1
- package/lib/ecosystem/ui/SiteTile.js +3 -1
- package/lib/ecosystem/ui/SiteTile.js.map +1 -1
- package/lib/error/ui/ErrorFallback.d.ts +2 -2
- package/lib/error/ui/ErrorFallback.d.ts.map +1 -1
- package/lib/error/ui/ErrorFallback.js +4 -2
- package/lib/error/ui/ErrorFallback.js.map +1 -1
- package/lib/help/ui/HelpBody.d.ts.map +1 -1
- package/lib/help/ui/HelpBody.js +3 -1
- package/lib/help/ui/HelpBody.js.map +1 -1
- package/lib/help/ui/HelpIcon.d.ts +2 -1
- package/lib/help/ui/HelpIcon.d.ts.map +1 -1
- package/lib/help/ui/HelpIcon.js +4 -2
- package/lib/help/ui/HelpIcon.js.map +1 -1
- package/lib/help/ui/HelpToolbarButton.d.ts.map +1 -1
- package/lib/help/ui/HelpToolbarButton.js +3 -1
- package/lib/help/ui/HelpToolbarButton.js.map +1 -1
- package/lib/help/ui/helpName.d.ts +5 -1
- package/lib/help/ui/helpName.d.ts.map +1 -1
- package/lib/help/ui/helpName.js +4 -2
- package/lib/help/ui/helpName.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +21 -0
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -0
- package/lib/i18n/core/chromeCatalog.js +29 -0
- package/lib/i18n/core/chromeCatalog.js.map +1 -0
- package/lib/i18n/core/index.d.ts +12 -0
- package/lib/i18n/core/index.d.ts.map +1 -0
- package/lib/i18n/core/index.js +6 -0
- package/lib/i18n/core/index.js.map +1 -0
- package/lib/i18n/core/languages.d.ts +32 -0
- package/lib/i18n/core/languages.d.ts.map +1 -0
- package/lib/i18n/core/languages.js +41 -0
- package/lib/i18n/core/languages.js.map +1 -0
- package/lib/i18n/core/messageCatalog.d.ts +113 -0
- package/lib/i18n/core/messageCatalog.d.ts.map +1 -0
- package/lib/i18n/core/messageCatalog.js +135 -0
- package/lib/i18n/core/messageCatalog.js.map +1 -0
- package/lib/i18n/core/messageValues.d.ts +3 -0
- package/lib/i18n/core/messageValues.d.ts.map +1 -0
- package/lib/i18n/core/messageValues.js +2 -0
- package/lib/i18n/core/messageValues.js.map +1 -0
- package/lib/i18n/core/session.d.ts +51 -0
- package/lib/i18n/core/session.d.ts.map +1 -0
- package/lib/i18n/core/session.js +64 -0
- package/lib/i18n/core/session.js.map +1 -0
- package/lib/i18n/core/translateSetup.d.ts +28 -0
- package/lib/i18n/core/translateSetup.d.ts.map +1 -0
- package/lib/i18n/core/translateSetup.js +30 -0
- package/lib/i18n/core/translateSetup.js.map +1 -0
- package/lib/i18n/ui/LanguageSelect.d.ts +37 -0
- package/lib/i18n/ui/LanguageSelect.d.ts.map +1 -0
- package/lib/i18n/ui/LanguageSelect.js +27 -0
- package/lib/i18n/ui/LanguageSelect.js.map +1 -0
- package/lib/i18n/ui/index.d.ts +6 -0
- package/lib/i18n/ui/index.d.ts.map +1 -0
- package/lib/i18n/ui/index.js +4 -0
- package/lib/i18n/ui/index.js.map +1 -0
- package/lib/i18n/ui/useLanguage.d.ts +23 -0
- package/lib/i18n/ui/useLanguage.d.ts.map +1 -0
- package/lib/i18n/ui/useLanguage.js +36 -0
- package/lib/i18n/ui/useLanguage.js.map +1 -0
- package/lib/i18n/ui/useT.d.ts +47 -0
- package/lib/i18n/ui/useT.d.ts.map +1 -0
- package/lib/i18n/ui/useT.js +51 -0
- package/lib/i18n/ui/useT.js.map +1 -0
- package/lib/locales/de.json +442 -0
- package/lib/locales/en.json +442 -0
- package/lib/locales/es.json +442 -0
- package/lib/locales/fr.json +442 -0
- package/lib/molecule3d/core/gestures.d.ts +10 -0
- package/lib/molecule3d/core/gestures.d.ts.map +1 -1
- package/lib/molecule3d/core/gestures.js +39 -7
- package/lib/molecule3d/core/gestures.js.map +1 -1
- package/lib/molecule3d/ui/Molecule3DExport.d.ts.map +1 -1
- package/lib/molecule3d/ui/Molecule3DExport.js +3 -1
- package/lib/molecule3d/ui/Molecule3DExport.js.map +1 -1
- package/lib/molecule3d/ui/Molecule3DHelp.d.ts.map +1 -1
- package/lib/molecule3d/ui/Molecule3DHelp.js +7 -2
- package/lib/molecule3d/ui/Molecule3DHelp.js.map +1 -1
- package/lib/molecule3d/ui/Molecule3DOptions.d.ts.map +1 -1
- package/lib/molecule3d/ui/Molecule3DOptions.js +9 -9
- package/lib/molecule3d/ui/Molecule3DOptions.js.map +1 -1
- package/lib/molecule3d/ui/Molecule3DSurfaceColors.d.ts.map +1 -1
- package/lib/molecule3d/ui/Molecule3DSurfaceColors.js +8 -8
- package/lib/molecule3d/ui/Molecule3DSurfaceColors.js.map +1 -1
- package/lib/molecule3d/ui/Molecule3DToolbar.d.ts.map +1 -1
- package/lib/molecule3d/ui/Molecule3DToolbar.js +15 -10
- package/lib/molecule3d/ui/Molecule3DToolbar.js.map +1 -1
- package/lib/molecule3d/ui/MoleculeViewer3D.d.ts.map +1 -1
- package/lib/molecule3d/ui/MoleculeViewer3D.js +6 -3
- package/lib/molecule3d/ui/MoleculeViewer3D.js.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalCanvas.js +3 -1
- package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalControls.d.ts.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalControls.js +12 -15
- package/lib/orbital/ui/AtomicOrbitalControls.js.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalViewer.js +6 -3
- package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
- package/lib/orbital/ui/capability.d.ts +4 -0
- package/lib/orbital/ui/capability.d.ts.map +1 -1
- package/lib/orbital/ui/capability.js +4 -0
- package/lib/orbital/ui/capability.js.map +1 -1
- package/lib/overlay/ui/OverlayBar.d.ts +1 -1
- package/lib/overlay/ui/OverlayBar.d.ts.map +1 -1
- package/lib/overlay/ui/OverlayBar.js +6 -3
- package/lib/overlay/ui/OverlayBar.js.map +1 -1
- package/lib/overlay/ui/OverlayInfo.d.ts +1 -1
- package/lib/overlay/ui/OverlayInfo.d.ts.map +1 -1
- package/lib/overlay/ui/OverlayInfo.js +5 -2
- package/lib/overlay/ui/OverlayInfo.js.map +1 -1
- package/lib/overlay/ui/OverlayPanel.d.ts +9 -2
- package/lib/overlay/ui/OverlayPanel.d.ts.map +1 -1
- package/lib/overlay/ui/OverlayPanel.js +5 -11
- package/lib/overlay/ui/OverlayPanel.js.map +1 -1
- package/lib/overlay/ui/OverlayReadout.d.ts.map +1 -1
- package/lib/overlay/ui/OverlayReadout.js +3 -1
- package/lib/overlay/ui/OverlayReadout.js.map +1 -1
- package/lib/pedagogy/ui/ExerciseActions.d.ts +1 -1
- package/lib/pedagogy/ui/ExerciseActions.d.ts.map +1 -1
- package/lib/pedagogy/ui/ExerciseActions.js +9 -2
- package/lib/pedagogy/ui/ExerciseActions.js.map +1 -1
- package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts +1 -1
- package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts.map +1 -1
- package/lib/pedagogy/ui/ExerciseProgressHeader.js +9 -5
- package/lib/pedagogy/ui/ExerciseProgressHeader.js.map +1 -1
- package/lib/pedagogy/ui/GlossaryIndex.d.ts +1 -1
- package/lib/pedagogy/ui/GlossaryIndex.d.ts.map +1 -1
- package/lib/pedagogy/ui/GlossaryIndex.js +6 -8
- package/lib/pedagogy/ui/GlossaryIndex.js.map +1 -1
- package/lib/pedagogy/ui/HintLadder.d.ts +2 -2
- package/lib/pedagogy/ui/HintLadder.d.ts.map +1 -1
- package/lib/pedagogy/ui/HintLadder.js +8 -2
- package/lib/pedagogy/ui/HintLadder.js.map +1 -1
- package/lib/pedagogy/ui/SyntaxTooltip.d.ts +4 -4
- package/lib/pedagogy/ui/SyntaxTooltip.d.ts.map +1 -1
- package/lib/pedagogy/ui/SyntaxTooltip.js +4 -2
- package/lib/pedagogy/ui/SyntaxTooltip.js.map +1 -1
- package/lib/pedagogy/ui/TutorialStepStrip.d.ts.map +1 -1
- package/lib/pedagogy/ui/TutorialStepStrip.js +7 -2
- package/lib/pedagogy/ui/TutorialStepStrip.js.map +1 -1
- package/lib/periodic/ui/CategoryLegend.d.ts.map +1 -1
- package/lib/periodic/ui/CategoryLegend.js +3 -1
- package/lib/periodic/ui/CategoryLegend.js.map +1 -1
- package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
- package/lib/periodic/ui/ElementCell.js +7 -1
- package/lib/periodic/ui/ElementCell.js.map +1 -1
- package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTable.js +3 -1
- package/lib/periodic/ui/PeriodicTable.js.map +1 -1
- package/lib/periodic/ui/PeriodicTableChrome.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTableChrome.js +4 -2
- package/lib/periodic/ui/PeriodicTableChrome.js.map +1 -1
- package/lib/share/ui/ShareButton.d.ts +2 -2
- package/lib/share/ui/ShareButton.d.ts.map +1 -1
- package/lib/share/ui/ShareButton.js +5 -2
- package/lib/share/ui/ShareButton.js.map +1 -1
- package/lib/share/ui/ShareConfigOptions.d.ts.map +1 -1
- package/lib/share/ui/ShareConfigOptions.js +4 -2
- package/lib/share/ui/ShareConfigOptions.js.map +1 -1
- package/lib/share/ui/ShareDialog.d.ts.map +1 -1
- package/lib/share/ui/ShareDialog.js +3 -1
- package/lib/share/ui/ShareDialog.js.map +1 -1
- package/lib/share/ui/ShareDialogContent.d.ts.map +1 -1
- package/lib/share/ui/ShareDialogContent.js +10 -1
- package/lib/share/ui/ShareDialogContent.js.map +1 -1
- package/lib/share/ui/SharePresetTabs.d.ts.map +1 -1
- package/lib/share/ui/SharePresetTabs.js +3 -1
- package/lib/share/ui/SharePresetTabs.js.map +1 -1
- package/lib/slides/ui/BackToSlides.d.ts.map +1 -1
- package/lib/slides/ui/BackToSlides.js +4 -2
- package/lib/slides/ui/BackToSlides.js.map +1 -1
- package/lib/slides/ui/EmbedSlide.d.ts.map +1 -1
- package/lib/slides/ui/EmbedSlide.js +3 -1
- package/lib/slides/ui/EmbedSlide.js.map +1 -1
- package/lib/slides/ui/Slide.d.ts.map +1 -1
- package/lib/slides/ui/Slide.js +3 -1
- package/lib/slides/ui/Slide.js.map +1 -1
- package/lib/slides/ui/SlideshowBar.d.ts.map +1 -1
- package/lib/slides/ui/SlideshowBar.js +5 -3
- package/lib/slides/ui/SlideshowBar.js.map +1 -1
- package/lib/slides/ui/TalkList.d.ts +1 -1
- package/lib/slides/ui/TalkList.d.ts.map +1 -1
- package/lib/slides/ui/TalkList.js +4 -2
- package/lib/slides/ui/TalkList.js.map +1 -1
- package/lib/structure/core/editorGuide.d.ts +14 -0
- package/lib/structure/core/editorGuide.d.ts.map +1 -1
- package/lib/structure/core/editorGuide.js +117 -19
- package/lib/structure/core/editorGuide.js.map +1 -1
- package/lib/structure/core/editorToolbar.d.ts +3 -1
- package/lib/structure/core/editorToolbar.d.ts.map +1 -1
- package/lib/structure/core/editorToolbar.js +44 -23
- package/lib/structure/core/editorToolbar.js.map +1 -1
- package/lib/structure/ui/EditorHelpButton.d.ts.map +1 -1
- package/lib/structure/ui/EditorHelpButton.js +3 -2
- package/lib/structure/ui/EditorHelpButton.js.map +1 -1
- package/lib/structure/ui/StructureEditor.d.ts.map +1 -1
- package/lib/structure/ui/StructureEditor.js +3 -1
- package/lib/structure/ui/StructureEditor.js.map +1 -1
- package/lib/structure/ui/StructureEditorHelp.d.ts.map +1 -1
- package/lib/structure/ui/StructureEditorHelp.js +12 -3
- package/lib/structure/ui/StructureEditorHelp.js.map +1 -1
- package/lib/structure/ui/ToolbarTooltip.d.ts.map +1 -1
- package/lib/structure/ui/ToolbarTooltip.js +5 -3
- package/lib/structure/ui/ToolbarTooltip.js.map +1 -1
- package/lib/ui.d.ts +1 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +1 -0
- package/lib/ui.js.map +1 -1
- package/package.json +4 -2
- package/src/about/ui/AboutBuild.tsx +23 -16
- package/src/about/ui/AboutCitations.tsx +3 -1
- package/src/about/ui/AboutPage.tsx +38 -12
- package/src/about/ui/AboutProvidedBy.tsx +13 -3
- package/src/capsule/ui/Capsule.tsx +48 -0
- package/src/capsule/ui/CapsuleFilter.tsx +38 -114
- package/src/capsule/ui/capsuleFilterCapsules.tsx +110 -0
- package/src/chart/ui/ChartTrackingLayer.tsx +4 -2
- package/src/chrome/ui/SiteHeader.tsx +5 -3
- package/src/citation/ui/CitationMenu.tsx +9 -5
- package/src/citation/ui/CiteButton.tsx +4 -2
- package/src/citation/ui/CopyFormatEntries.tsx +3 -1
- package/src/citation/ui/WorkEntry.tsx +5 -3
- package/src/citation/ui/entries.tsx +9 -2
- package/src/citation/ui/useCopyFeedback.ts +11 -4
- package/src/clipboard/ui/ClickToCopy.tsx +15 -5
- package/src/clipboard/ui/CopyButton.tsx +14 -10
- package/src/color/ui/ColorScaleEditor.tsx +17 -15
- package/src/color/ui/ColorScaleEntry.tsx +7 -3
- package/src/color/ui/ColorScaleLegend.tsx +7 -1
- package/src/color/ui/ColorScaleSelect.tsx +12 -6
- package/src/confirm/ui/ConfirmButton.tsx +9 -11
- package/src/core.ts +1 -0
- package/src/credits/ui/CreditsList.tsx +5 -1
- package/src/delimited/ui/DelimitedTextDialog.tsx +10 -10
- package/src/delimited/ui/DelimitedTextPanel.tsx +19 -12
- package/src/deploy/core/checkDeploy.ts +7 -1
- package/src/deploy/core/index.ts +1 -0
- package/src/deploy/core/pageCache.ts +120 -0
- package/src/deploy/core/types.ts +2 -1
- package/src/download/ui/FigureDownload.tsx +7 -5
- package/src/download/ui/FigureDownloadPanel.tsx +31 -25
- package/src/ecosystem/ui/EcosystemButton.tsx +5 -3
- package/src/ecosystem/ui/EcosystemLinks.tsx +10 -10
- package/src/ecosystem/ui/EcosystemMenu.tsx +3 -1
- package/src/ecosystem/ui/SiteGroupSection.tsx +6 -2
- package/src/ecosystem/ui/SiteTile.tsx +6 -2
- package/src/error/ui/ErrorFallback.tsx +13 -12
- package/src/help/ui/HelpBody.tsx +4 -2
- package/src/help/ui/HelpIcon.tsx +6 -3
- package/src/help/ui/HelpToolbarButton.tsx +4 -1
- package/src/help/ui/helpName.ts +10 -2
- package/src/i18n/core/chromeCatalog.ts +35 -0
- package/src/i18n/core/index.ts +26 -0
- package/src/i18n/core/languages.ts +46 -0
- package/src/i18n/core/messageCatalog.ts +202 -0
- package/src/i18n/core/messageValues.ts +2 -0
- package/src/i18n/core/session.ts +82 -0
- package/src/i18n/core/translateSetup.ts +47 -0
- package/src/i18n/ui/LanguageSelect.tsx +72 -0
- package/src/i18n/ui/index.ts +9 -0
- package/src/i18n/ui/useLanguage.ts +48 -0
- package/src/i18n/ui/useT.ts +90 -0
- package/src/locales/de.json +442 -0
- package/src/locales/en.json +442 -0
- package/src/locales/es.json +442 -0
- package/src/locales/fr.json +442 -0
- package/src/molecule3d/core/gestures.ts +44 -7
- package/src/molecule3d/ui/Molecule3DExport.tsx +3 -1
- package/src/molecule3d/ui/Molecule3DHelp.tsx +17 -6
- package/src/molecule3d/ui/Molecule3DOptions.tsx +13 -13
- package/src/molecule3d/ui/Molecule3DSurfaceColors.tsx +16 -13
- package/src/molecule3d/ui/Molecule3DToolbar.tsx +29 -18
- package/src/molecule3d/ui/MoleculeViewer3D.tsx +13 -8
- package/src/orbital/ui/AtomicOrbitalCanvas.tsx +3 -1
- package/src/orbital/ui/AtomicOrbitalControls.tsx +15 -20
- package/src/orbital/ui/AtomicOrbitalViewer.tsx +13 -13
- package/src/orbital/ui/capability.ts +10 -0
- package/src/overlay/ui/OverlayBar.tsx +7 -4
- package/src/overlay/ui/OverlayInfo.tsx +6 -3
- package/src/overlay/ui/OverlayPanel.tsx +10 -7
- package/src/overlay/ui/OverlayReadout.tsx +3 -1
- package/src/pedagogy/ui/ExerciseActions.tsx +16 -6
- package/src/pedagogy/ui/ExerciseProgressHeader.tsx +13 -11
- package/src/pedagogy/ui/GlossaryIndex.tsx +11 -12
- package/src/pedagogy/ui/HintLadder.tsx +15 -12
- package/src/pedagogy/ui/SyntaxTooltip.tsx +9 -7
- package/src/pedagogy/ui/TutorialStepStrip.tsx +8 -3
- package/src/periodic/ui/CategoryLegend.tsx +6 -1
- package/src/periodic/ui/ElementCell.tsx +7 -1
- package/src/periodic/ui/PeriodicTable.tsx +3 -1
- package/src/periodic/ui/PeriodicTableChrome.tsx +4 -2
- package/src/share/ui/ShareButton.tsx +8 -5
- package/src/share/ui/ShareConfigOptions.tsx +6 -7
- package/src/share/ui/ShareDialog.tsx +3 -1
- package/src/share/ui/ShareDialogContent.tsx +20 -10
- package/src/share/ui/SharePresetTabs.tsx +3 -1
- package/src/slides/ui/BackToSlides.tsx +4 -2
- package/src/slides/ui/EmbedSlide.tsx +3 -3
- package/src/slides/ui/Slide.tsx +3 -1
- package/src/slides/ui/SlideshowBar.tsx +12 -4
- package/src/slides/ui/TalkList.tsx +8 -10
- package/src/structure/core/editorGuide.ts +126 -19
- package/src/structure/core/editorToolbar.ts +52 -24
- package/src/structure/ui/EditorHelpButton.tsx +9 -4
- package/src/structure/ui/StructureEditor.tsx +7 -1
- package/src/structure/ui/StructureEditorHelp.tsx +34 -11
- package/src/structure/ui/ToolbarTooltip.tsx +8 -4
- package/src/ui.ts +1 -0
|
@@ -8,6 +8,7 @@ import { SegmentedControl, Slider } from '@blueprintjs/core';
|
|
|
8
8
|
import type { CSSProperties, ReactElement } from 'react';
|
|
9
9
|
|
|
10
10
|
import { formatDecimal } from '../../format/core/numbers.ts';
|
|
11
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
11
12
|
import type { Molecule3DSettings } from '../core/settings.ts';
|
|
12
13
|
import {
|
|
13
14
|
MOLECULE_3D_RANGES,
|
|
@@ -33,6 +34,7 @@ export interface Molecule3DOptionsProps {
|
|
|
33
34
|
*/
|
|
34
35
|
export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
|
|
35
36
|
const { settings, onChange, polarSurfaceArea } = props;
|
|
37
|
+
const t = useChromeT();
|
|
36
38
|
|
|
37
39
|
return (
|
|
38
40
|
<div style={PANEL_STYLE}>
|
|
@@ -40,7 +42,13 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
|
|
|
40
42
|
fill
|
|
41
43
|
size="small"
|
|
42
44
|
intent="primary"
|
|
43
|
-
options={
|
|
45
|
+
options={REPRESENTATIONS.map((representation) => ({
|
|
46
|
+
value: representation,
|
|
47
|
+
label: t.or(
|
|
48
|
+
`molecule3d.representation.${representation}`,
|
|
49
|
+
REPRESENTATION_LABELS[representation],
|
|
50
|
+
),
|
|
51
|
+
}))}
|
|
44
52
|
value={settings.representation}
|
|
45
53
|
onValueChange={(value) => {
|
|
46
54
|
if (isRepresentationId(value)) {
|
|
@@ -50,7 +58,7 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
|
|
|
50
58
|
/>
|
|
51
59
|
<div style={GRID_STYLE}>
|
|
52
60
|
<SliderRow
|
|
53
|
-
label=
|
|
61
|
+
label={t('molecule3d.size')}
|
|
54
62
|
range={MOLECULE_3D_RANGES.sizeFactor}
|
|
55
63
|
digits={1}
|
|
56
64
|
value={settings.sizeFactor}
|
|
@@ -60,7 +68,7 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
|
|
|
60
68
|
}}
|
|
61
69
|
/>
|
|
62
70
|
<SliderRow
|
|
63
|
-
label=
|
|
71
|
+
label={t('molecule3d.surfaceOpacity')}
|
|
64
72
|
range={MOLECULE_3D_RANGES.surfaceAlpha}
|
|
65
73
|
digits={2}
|
|
66
74
|
value={settings.surfaceAlpha}
|
|
@@ -71,8 +79,8 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
|
|
|
71
79
|
}}
|
|
72
80
|
/>
|
|
73
81
|
<SliderRow
|
|
74
|
-
label=
|
|
75
|
-
title={
|
|
82
|
+
label={t('molecule3d.solventProbe')}
|
|
83
|
+
title={t('molecule3d.solventProbeHelp')}
|
|
76
84
|
range={MOLECULE_3D_RANGES.probeRadius}
|
|
77
85
|
digits={1}
|
|
78
86
|
value={settings.probeRadius}
|
|
@@ -132,14 +140,6 @@ function SliderRow(props: SliderRowProps): ReactElement {
|
|
|
132
140
|
);
|
|
133
141
|
}
|
|
134
142
|
|
|
135
|
-
const REPRESENTATION_OPTIONS = REPRESENTATIONS.map((representation) => ({
|
|
136
|
-
value: representation,
|
|
137
|
-
label: REPRESENTATION_LABELS[representation],
|
|
138
|
-
}));
|
|
139
|
-
|
|
140
|
-
const PROBE_HELP =
|
|
141
|
-
'Radius of the solvent sphere rolled over the atoms. 1.4 Å is a water molecule; a larger probe smooths the surface and closes the narrow pockets.';
|
|
142
|
-
|
|
143
143
|
const PANEL_STYLE: CSSProperties = {
|
|
144
144
|
display: 'flex',
|
|
145
145
|
flexDirection: 'column',
|
|
@@ -9,6 +9,7 @@ import type { CSSProperties, ReactElement } from 'react';
|
|
|
9
9
|
import { ColorPickerDropdown } from 'react-science/ui';
|
|
10
10
|
|
|
11
11
|
import { formatDecimal } from '../../format/core/numbers.ts';
|
|
12
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
12
13
|
import type { Molecule3DSettings } from '../core/settings.ts';
|
|
13
14
|
import {
|
|
14
15
|
SURFACE_CHARGE_COLORS,
|
|
@@ -34,17 +35,24 @@ export function Molecule3DSurfaceColors(
|
|
|
34
35
|
props: Molecule3DSurfaceColorsProps,
|
|
35
36
|
): ReactElement {
|
|
36
37
|
const { settings, onChange, polarSurfaceArea } = props;
|
|
38
|
+
const t = useChromeT();
|
|
37
39
|
const disabled = !settings.showSurface;
|
|
38
40
|
const { surfaceColoring, surfaceColor } = settings;
|
|
39
41
|
|
|
40
42
|
return (
|
|
41
43
|
<div style={SECTION_STYLE}>
|
|
42
|
-
<span style={LABEL_STYLE}>
|
|
44
|
+
<span style={LABEL_STYLE}>{t('molecule3d.surfaceColour')}</span>
|
|
43
45
|
<SegmentedControl
|
|
44
46
|
fill
|
|
45
47
|
size="small"
|
|
46
48
|
disabled={disabled}
|
|
47
|
-
options={
|
|
49
|
+
options={SURFACE_COLORINGS.map((coloring) => ({
|
|
50
|
+
value: coloring,
|
|
51
|
+
label: t.or(
|
|
52
|
+
`molecule3d.coloring.${coloring}`,
|
|
53
|
+
SURFACE_COLORING_LABELS[coloring],
|
|
54
|
+
),
|
|
55
|
+
}))}
|
|
48
56
|
value={surfaceColoring}
|
|
49
57
|
onValueChange={(value) => {
|
|
50
58
|
if (isSurfaceColoringId(value)) {
|
|
@@ -54,7 +62,7 @@ export function Molecule3DSurfaceColors(
|
|
|
54
62
|
/>
|
|
55
63
|
{surfaceColoring === 'uniform' && (
|
|
56
64
|
<span style={ROW_STYLE}>
|
|
57
|
-
<span style={LABEL_STYLE}>
|
|
65
|
+
<span style={LABEL_STYLE}>{t('molecule3d.colour')}</span>
|
|
58
66
|
{disabled ? (
|
|
59
67
|
<span style={{ ...SWATCH_STYLE, background: surfaceColor }} />
|
|
60
68
|
) : (
|
|
@@ -76,11 +84,14 @@ export function Molecule3DSurfaceColors(
|
|
|
76
84
|
<span style={ROW_STYLE} data-testid="molecule3d-polarity-legend">
|
|
77
85
|
<LegendItem color={SURFACE_CHARGE_COLORS.positive} label="δ+" />
|
|
78
86
|
<LegendItem color={SURFACE_CHARGE_COLORS.negative} label="δ−" />
|
|
79
|
-
<LegendItem
|
|
87
|
+
<LegendItem
|
|
88
|
+
color={SURFACE_CHARGE_COLORS.neutral}
|
|
89
|
+
label={t('molecule3d.neutral')}
|
|
90
|
+
/>
|
|
80
91
|
</span>
|
|
81
92
|
<span
|
|
82
93
|
style={LABEL_STYLE}
|
|
83
|
-
title={
|
|
94
|
+
title={t('molecule3d.tpsaHelp')}
|
|
84
95
|
data-testid="molecule3d-tpsa-value"
|
|
85
96
|
>
|
|
86
97
|
TPSA:{' '}
|
|
@@ -103,14 +114,6 @@ function LegendItem(props: { color: string; label: string }): ReactElement {
|
|
|
103
114
|
);
|
|
104
115
|
}
|
|
105
116
|
|
|
106
|
-
const COLORING_OPTIONS = SURFACE_COLORINGS.map((coloring) => ({
|
|
107
|
-
value: coloring,
|
|
108
|
-
label: SURFACE_COLORING_LABELS[coloring],
|
|
109
|
-
}));
|
|
110
|
-
|
|
111
|
-
const TPSA_HELP =
|
|
112
|
-
'Topological polar surface area (Ertl): the area contributed by nitrogen, oxygen and their hydrogens, computed from the structure by openchemlib. It does not depend on the conformer or the probe.';
|
|
113
|
-
|
|
114
117
|
const SECTION_STYLE: CSSProperties = {
|
|
115
118
|
display: 'flex',
|
|
116
119
|
flexDirection: 'column',
|
|
@@ -9,6 +9,7 @@ import { Card } from '@blueprintjs/core';
|
|
|
9
9
|
import type { CSSProperties, ReactElement } from 'react';
|
|
10
10
|
import { Toolbar } from 'react-science/ui';
|
|
11
11
|
|
|
12
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
12
13
|
import type { MeasurementKind } from '../core/measurement.ts';
|
|
13
14
|
import {
|
|
14
15
|
MEASUREMENT_ATOM_COUNTS,
|
|
@@ -62,6 +63,7 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
62
63
|
options,
|
|
63
64
|
exportPanel,
|
|
64
65
|
} = props;
|
|
66
|
+
const t = useChromeT();
|
|
65
67
|
const hasView =
|
|
66
68
|
tools.spin ||
|
|
67
69
|
tools.surface ||
|
|
@@ -74,12 +76,12 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
74
76
|
<div style={COLUMN_STYLE}>
|
|
75
77
|
{hasView && (
|
|
76
78
|
<Card elevation={1} style={CARD_STYLE}>
|
|
77
|
-
<Toolbar vertical aria-label=
|
|
79
|
+
<Toolbar vertical aria-label={t('molecule3d.view')}>
|
|
78
80
|
{tools.reset && (
|
|
79
81
|
<Toolbar.Item
|
|
80
82
|
icon="zoom-to-fit"
|
|
81
|
-
aria-label=
|
|
82
|
-
tooltip=
|
|
83
|
+
aria-label={t('molecule3d.resetView')}
|
|
84
|
+
tooltip={t('molecule3d.resetView')}
|
|
83
85
|
tooltipProps={TOOLTIP_PROPS}
|
|
84
86
|
onClick={onResetView}
|
|
85
87
|
/>
|
|
@@ -88,8 +90,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
88
90
|
<Toolbar.Item
|
|
89
91
|
icon="refresh"
|
|
90
92
|
active={spinning}
|
|
91
|
-
aria-label=
|
|
92
|
-
tooltip=
|
|
93
|
+
aria-label={t('molecule3d.spin')}
|
|
94
|
+
tooltip={t('molecule3d.spin')}
|
|
93
95
|
tooltipProps={TOOLTIP_PROPS}
|
|
94
96
|
onClick={() => {
|
|
95
97
|
onSpinningChange(!spinning);
|
|
@@ -100,8 +102,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
100
102
|
<Toolbar.Item
|
|
101
103
|
icon={<SurfaceIcon />}
|
|
102
104
|
active={showSurface}
|
|
103
|
-
aria-label=
|
|
104
|
-
tooltip=
|
|
105
|
+
aria-label={t('molecule3d.surface')}
|
|
106
|
+
tooltip={t('molecule3d.molecularSurface')}
|
|
105
107
|
tooltipProps={TOOLTIP_PROPS}
|
|
106
108
|
onClick={() => {
|
|
107
109
|
onShowSurfaceChange(!showSurface);
|
|
@@ -114,8 +116,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
114
116
|
content={options}
|
|
115
117
|
itemProps={{
|
|
116
118
|
icon: 'cog',
|
|
117
|
-
'aria-label': '
|
|
118
|
-
tooltip: '
|
|
119
|
+
'aria-label': t('molecule3d.displayOptions'),
|
|
120
|
+
tooltip: t('molecule3d.displayOptions'),
|
|
119
121
|
tooltipProps: TOOLTIP_PROPS,
|
|
120
122
|
}}
|
|
121
123
|
/>
|
|
@@ -126,8 +128,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
126
128
|
content={exportPanel}
|
|
127
129
|
itemProps={{
|
|
128
130
|
icon: 'download',
|
|
129
|
-
'aria-label': '
|
|
130
|
-
tooltip: '
|
|
131
|
+
'aria-label': t('molecule3d.exportImage'),
|
|
132
|
+
tooltip: t('molecule3d.exportImage'),
|
|
131
133
|
tooltipProps: TOOLTIP_PROPS,
|
|
132
134
|
}}
|
|
133
135
|
/>
|
|
@@ -138,8 +140,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
138
140
|
content={<Molecule3DHelp />}
|
|
139
141
|
itemProps={{
|
|
140
142
|
icon: 'help',
|
|
141
|
-
'aria-label': '
|
|
142
|
-
tooltip: '
|
|
143
|
+
'aria-label': t('structure.mouseAndKeyboard'),
|
|
144
|
+
tooltip: t('structure.mouseAndKeyboard'),
|
|
143
145
|
tooltipProps: TOOLTIP_PROPS,
|
|
144
146
|
}}
|
|
145
147
|
/>
|
|
@@ -149,14 +151,23 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
149
151
|
)}
|
|
150
152
|
{tools.measure && (
|
|
151
153
|
<Card elevation={1} style={CARD_STYLE}>
|
|
152
|
-
<Toolbar vertical aria-label=
|
|
154
|
+
<Toolbar vertical aria-label={t('molecule3d.measure')}>
|
|
153
155
|
{MEASUREMENT_KINDS.map((kind) => (
|
|
154
156
|
<Toolbar.Item
|
|
155
157
|
key={kind}
|
|
156
158
|
icon={<MeasureIcon kind={kind} />}
|
|
157
159
|
active={measureKind === kind}
|
|
158
|
-
aria-label={
|
|
159
|
-
|
|
160
|
+
aria-label={t.or(
|
|
161
|
+
`molecule3d.measurement.${kind}`,
|
|
162
|
+
MEASUREMENT_LABELS[kind],
|
|
163
|
+
)}
|
|
164
|
+
tooltip={t('molecule3d.measurementTooltip', {
|
|
165
|
+
what: t.or(
|
|
166
|
+
`molecule3d.measurement.${kind}`,
|
|
167
|
+
MEASUREMENT_LABELS[kind],
|
|
168
|
+
),
|
|
169
|
+
atoms: MEASUREMENT_ATOM_COUNTS[kind],
|
|
170
|
+
})}
|
|
160
171
|
tooltipProps={TOOLTIP_PROPS}
|
|
161
172
|
onClick={() => {
|
|
162
173
|
onMeasureKindChange(measureKind === kind ? null : kind);
|
|
@@ -166,8 +177,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
|
|
|
166
177
|
<Toolbar.Item
|
|
167
178
|
icon={<ClearMeasurementsIcon />}
|
|
168
179
|
disabled={measurementCount === 0}
|
|
169
|
-
aria-label=
|
|
170
|
-
tooltip=
|
|
180
|
+
aria-label={t('molecule3d.clearMeasurements')}
|
|
181
|
+
tooltip={t('molecule3d.clearMeasurements')}
|
|
171
182
|
tooltipProps={TOOLTIP_PROPS}
|
|
172
183
|
onClick={onClearMeasurements}
|
|
173
184
|
/>
|
|
@@ -22,6 +22,7 @@ import { Suspense, lazy, useState } from 'react';
|
|
|
22
22
|
|
|
23
23
|
// Deep import on purpose: `capability.ts` imports nothing, while the canvas
|
|
24
24
|
// pulls molstar in — which is exactly what this probe exists to avoid.
|
|
25
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
25
26
|
import { probeViewerCapability } from '../../orbital/ui/capability.ts';
|
|
26
27
|
|
|
27
28
|
import type { MoleculeViewer3DProps } from './moleculeViewer3DProps.ts';
|
|
@@ -37,29 +38,33 @@ const MoleculeCanvas3D = lazy(async () => {
|
|
|
37
38
|
* @returns The viewer, or an explanation of why this machine cannot show one.
|
|
38
39
|
*/
|
|
39
40
|
export function MoleculeViewer3D(props: MoleculeViewer3DProps): ReactElement {
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
renderUnsupported,
|
|
43
|
-
...canvas
|
|
44
|
-
} = props;
|
|
41
|
+
const { fallback, renderUnsupported, ...canvas } = props;
|
|
42
|
+
const t = useChromeT();
|
|
45
43
|
const [capability] = useState(probeViewerCapability);
|
|
46
44
|
const [failure, setFailure] = useState<string | null>(null);
|
|
47
45
|
|
|
48
46
|
if (!capability.supported) {
|
|
49
47
|
return (
|
|
50
48
|
<Callout intent="warning" compact>
|
|
51
|
-
{renderUnsupported?.(capability) ??
|
|
49
|
+
{renderUnsupported?.(capability) ??
|
|
50
|
+
t.or(`viewer.capability.${capability.reason}`, capability.message)}
|
|
52
51
|
</Callout>
|
|
53
52
|
);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
return (
|
|
57
56
|
<div style={ROOT_STYLE}>
|
|
58
|
-
<Suspense
|
|
57
|
+
<Suspense
|
|
58
|
+
fallback={
|
|
59
|
+
<div style={NOTE_STYLE}>
|
|
60
|
+
{fallback ?? t('molecule3d.loadingViewer')}
|
|
61
|
+
</div>
|
|
62
|
+
}
|
|
63
|
+
>
|
|
59
64
|
<MoleculeCanvas3D {...canvas} onFailureChange={setFailure} />
|
|
60
65
|
</Suspense>
|
|
61
66
|
{failure !== null && (
|
|
62
|
-
<Callout intent="danger" compact title=
|
|
67
|
+
<Callout intent="danger" compact title={t('molecule3d.couldNotDraw')}>
|
|
63
68
|
{failure}
|
|
64
69
|
</Callout>
|
|
65
70
|
)}
|
|
@@ -11,6 +11,7 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
11
11
|
|
|
12
12
|
import { errorMessage } from '../../error/core/index.ts';
|
|
13
13
|
import { useResizeObserver } from '../../hooks/ui/useResizeObserver.ts';
|
|
14
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
14
15
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
15
16
|
import type { ResolutionLimits } from '../core/atomicGrid.ts';
|
|
16
17
|
import type { PhasePalette } from '../core/palette.ts';
|
|
@@ -115,6 +116,7 @@ export function AtomicOrbitalCanvas(
|
|
|
115
116
|
onFailureChange,
|
|
116
117
|
} = props;
|
|
117
118
|
|
|
119
|
+
const t = useChromeT();
|
|
118
120
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
119
121
|
const viewerRef = useRef<OrbitalViewer | null>(null);
|
|
120
122
|
const [drawn, setDrawn] = useState<string | null>(null);
|
|
@@ -201,7 +203,7 @@ export function AtomicOrbitalCanvas(
|
|
|
201
203
|
|
|
202
204
|
return (
|
|
203
205
|
<div ref={containerRef} style={CANVAS_STYLE}>
|
|
204
|
-
{busy && <div style={BUSY_STYLE}>
|
|
206
|
+
{busy && <div style={BUSY_STYLE}>{t('orbital.sampling')}</div>}
|
|
205
207
|
<AtomicOrbitalControls
|
|
206
208
|
axes={axes}
|
|
207
209
|
onToggleAxes={() => {
|
|
@@ -9,6 +9,7 @@ import type { CSSProperties, ReactElement } from 'react';
|
|
|
9
9
|
|
|
10
10
|
import type { HelpContent } from '../../help/ui/HelpBody.tsx';
|
|
11
11
|
import { HelpTooltip } from '../../help/ui/HelpTooltip.tsx';
|
|
12
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
12
13
|
|
|
13
14
|
/** Props of {@link AtomicOrbitalControls}. */
|
|
14
15
|
interface AtomicOrbitalControlsProps {
|
|
@@ -29,25 +30,35 @@ export function AtomicOrbitalControls(
|
|
|
29
30
|
props: AtomicOrbitalControlsProps,
|
|
30
31
|
): ReactElement {
|
|
31
32
|
const { axes, onToggleAxes, onResetView } = props;
|
|
33
|
+
const t = useChromeT();
|
|
34
|
+
const axesHelp: HelpContent = {
|
|
35
|
+
title: t('orbital.axesTitle'),
|
|
36
|
+
body: t('orbital.axesBody'),
|
|
37
|
+
example: { code: '3d_yz', note: t('orbital.axesExample') },
|
|
38
|
+
};
|
|
39
|
+
const resetHelp: HelpContent = {
|
|
40
|
+
title: t('orbital.resetTitle'),
|
|
41
|
+
body: t('orbital.resetBody'),
|
|
42
|
+
};
|
|
32
43
|
return (
|
|
33
44
|
<div style={CONTROLS_STYLE}>
|
|
34
|
-
<HelpTooltip content={
|
|
45
|
+
<HelpTooltip content={axesHelp} placement="bottom">
|
|
35
46
|
<Button
|
|
36
47
|
variant="minimal"
|
|
37
48
|
size="small"
|
|
38
49
|
icon="grid"
|
|
39
50
|
active={axes}
|
|
40
|
-
aria-label=
|
|
51
|
+
aria-label={t('orbital.showAxes')}
|
|
41
52
|
aria-pressed={axes}
|
|
42
53
|
onClick={onToggleAxes}
|
|
43
54
|
/>
|
|
44
55
|
</HelpTooltip>
|
|
45
|
-
<HelpTooltip content={
|
|
56
|
+
<HelpTooltip content={resetHelp} placement="bottom">
|
|
46
57
|
<Button
|
|
47
58
|
variant="minimal"
|
|
48
59
|
size="small"
|
|
49
60
|
icon="zoom-to-fit"
|
|
50
|
-
aria-label=
|
|
61
|
+
aria-label={t('orbital.resetTitle')}
|
|
51
62
|
onClick={onResetView}
|
|
52
63
|
/>
|
|
53
64
|
</HelpTooltip>
|
|
@@ -55,22 +66,6 @@ export function AtomicOrbitalControls(
|
|
|
55
66
|
);
|
|
56
67
|
}
|
|
57
68
|
|
|
58
|
-
/** What the frame button says it is for. */
|
|
59
|
-
const AXES_HELP: HelpContent = {
|
|
60
|
-
title: 'Cartesian axes',
|
|
61
|
-
body: 'Draw x, y and z through the nucleus. The label names an orbital by where its lobes sit against them.',
|
|
62
|
-
example: {
|
|
63
|
-
code: '3d_yz',
|
|
64
|
-
note: 'four lobes between the y and z axes, none on either.',
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/** What the reset button says it is for. */
|
|
69
|
-
const RESET_HELP: HelpContent = {
|
|
70
|
-
title: 'Reset the view',
|
|
71
|
-
body: 'Back to the angle and zoom the orbital opened on. A change of orbital keeps whatever view you have turned it to.',
|
|
72
|
-
};
|
|
73
|
-
|
|
74
69
|
const CONTROLS_STYLE: CSSProperties = {
|
|
75
70
|
position: 'absolute',
|
|
76
71
|
top: 4,
|
|
@@ -19,6 +19,7 @@ import { Callout } from '@blueprintjs/core';
|
|
|
19
19
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
20
20
|
import { Suspense, lazy, useState } from 'react';
|
|
21
21
|
|
|
22
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
22
23
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
23
24
|
import type { ResolutionLimits } from '../core/atomicGrid.ts';
|
|
24
25
|
import type { PhasePalette } from '../core/palette.ts';
|
|
@@ -116,34 +117,33 @@ export interface AtomicOrbitalViewerProps {
|
|
|
116
117
|
export function AtomicOrbitalViewer(
|
|
117
118
|
props: AtomicOrbitalViewerProps,
|
|
118
119
|
): ReactElement {
|
|
119
|
-
const {
|
|
120
|
-
|
|
121
|
-
renderUnsupported,
|
|
122
|
-
className,
|
|
123
|
-
...canvas
|
|
124
|
-
} = props;
|
|
120
|
+
const { fallback, renderUnsupported, className, ...canvas } = props;
|
|
121
|
+
const t = useChromeT();
|
|
125
122
|
const [capability] = useState(probeViewerCapability);
|
|
126
123
|
const [failure, setFailure] = useState<string | null>(null);
|
|
127
124
|
|
|
128
125
|
if (!capability.supported) {
|
|
129
126
|
return (
|
|
130
127
|
<Callout intent="warning" compact className={className}>
|
|
131
|
-
{renderUnsupported?.(capability) ??
|
|
128
|
+
{renderUnsupported?.(capability) ??
|
|
129
|
+
t.or(`viewer.capability.${capability.reason}`, capability.message)}
|
|
132
130
|
</Callout>
|
|
133
131
|
);
|
|
134
132
|
}
|
|
135
133
|
|
|
136
134
|
return (
|
|
137
135
|
<div className={className} style={ROOT_STYLE}>
|
|
138
|
-
<Suspense
|
|
136
|
+
<Suspense
|
|
137
|
+
fallback={
|
|
138
|
+
<div style={NOTE_STYLE}>
|
|
139
|
+
{fallback ?? t('molecule3d.loadingViewer')}
|
|
140
|
+
</div>
|
|
141
|
+
}
|
|
142
|
+
>
|
|
139
143
|
<AtomicOrbitalCanvas {...canvas} onFailureChange={setFailure} />
|
|
140
144
|
</Suspense>
|
|
141
145
|
{failure !== null && (
|
|
142
|
-
<Callout
|
|
143
|
-
intent="danger"
|
|
144
|
-
compact
|
|
145
|
-
title="This orbital could not be drawn"
|
|
146
|
-
>
|
|
146
|
+
<Callout intent="danger" compact title={t('orbital.couldNotDraw')}>
|
|
147
147
|
{failure}
|
|
148
148
|
</Callout>
|
|
149
149
|
)}
|
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
* page can ask the question before paying for molstar.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
/** Why the machine is in the state it is, as the catalog names it. */
|
|
13
|
+
export type ViewerCapabilityReason =
|
|
14
|
+
'noWindow' | 'noContext' | 'noFloatTextures' | 'ready';
|
|
15
|
+
|
|
12
16
|
/** What the machine can do, and what to tell the student. */
|
|
13
17
|
export interface ViewerCapability {
|
|
18
|
+
/** Which of the four states this is, so the message can be translated. */
|
|
19
|
+
reason: ViewerCapabilityReason;
|
|
14
20
|
/** A 3D scene can be rendered at all. Everything else is degradation. */
|
|
15
21
|
supported: boolean;
|
|
16
22
|
/**
|
|
@@ -29,6 +35,7 @@ export interface ViewerCapability {
|
|
|
29
35
|
export function probeViewerCapability(): ViewerCapability {
|
|
30
36
|
if (typeof document === 'undefined') {
|
|
31
37
|
return {
|
|
38
|
+
reason: 'noWindow',
|
|
32
39
|
supported: false,
|
|
33
40
|
gpuOrbitals: false,
|
|
34
41
|
message: 'The 3D viewer needs a browser window.',
|
|
@@ -38,6 +45,7 @@ export function probeViewerCapability(): ViewerCapability {
|
|
|
38
45
|
const probe = getContext(canvas);
|
|
39
46
|
if (probe === null) {
|
|
40
47
|
return {
|
|
48
|
+
reason: 'noContext',
|
|
41
49
|
supported: false,
|
|
42
50
|
gpuOrbitals: false,
|
|
43
51
|
message:
|
|
@@ -48,6 +56,7 @@ export function probeViewerCapability(): ViewerCapability {
|
|
|
48
56
|
loseContext(probe.context);
|
|
49
57
|
if (!gpuOrbitals) {
|
|
50
58
|
return {
|
|
59
|
+
reason: 'noFloatTextures',
|
|
51
60
|
supported: true,
|
|
52
61
|
gpuOrbitals: false,
|
|
53
62
|
message:
|
|
@@ -55,6 +64,7 @@ export function probeViewerCapability(): ViewerCapability {
|
|
|
55
64
|
};
|
|
56
65
|
}
|
|
57
66
|
return {
|
|
67
|
+
reason: 'ready',
|
|
58
68
|
supported: true,
|
|
59
69
|
gpuOrbitals: true,
|
|
60
70
|
message: 'This browser can render the 3D viewer and computed orbitals.',
|
|
@@ -2,6 +2,7 @@ import type { IconName } from '@blueprintjs/core';
|
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import { overlayBarFolded } from '../core/overlayCollapse.ts';
|
|
6
7
|
import type { OverlayPlacement } from '../core/overlayPlacement.ts';
|
|
7
8
|
|
|
@@ -59,7 +60,7 @@ export interface OverlayBarProps {
|
|
|
59
60
|
/**
|
|
60
61
|
* What the group of controls is called, for a reader arriving by tab and for
|
|
61
62
|
* the button the bar folds into.
|
|
62
|
-
* @default '
|
|
63
|
+
* @default the chrome's own word for it, in the language of the page
|
|
63
64
|
*/
|
|
64
65
|
label?: string;
|
|
65
66
|
/**
|
|
@@ -129,7 +130,9 @@ export interface OverlayBarProps {
|
|
|
129
130
|
export function OverlayBar(props: OverlayBarProps): ReactElement {
|
|
130
131
|
const { children, end, tools, info, more } = props;
|
|
131
132
|
const { placement = 'top-right' } = props;
|
|
132
|
-
const { label
|
|
133
|
+
const { label, restingOpacity = OVERLAY_RESTING_OPACITY } = props;
|
|
134
|
+
const t = useChromeT();
|
|
135
|
+
const name = label ?? t('overlay.options');
|
|
133
136
|
const { collapsed, defaultCollapsed = false } = props;
|
|
134
137
|
const { collapseBelow = 420, moreIcon = 'cog', testId } = props;
|
|
135
138
|
const { morePadded = true } = props;
|
|
@@ -151,7 +154,7 @@ export function OverlayBar(props: OverlayBarProps): ReactElement {
|
|
|
151
154
|
info={info}
|
|
152
155
|
more={more}
|
|
153
156
|
placement={placement}
|
|
154
|
-
label={
|
|
157
|
+
label={name}
|
|
155
158
|
moreIcon={moreIcon}
|
|
156
159
|
morePadded={morePadded}
|
|
157
160
|
folded={folded}
|
|
@@ -169,7 +172,7 @@ export function OverlayBar(props: OverlayBarProps): ReactElement {
|
|
|
169
172
|
info={info}
|
|
170
173
|
more={more}
|
|
171
174
|
placement={placement}
|
|
172
|
-
label={
|
|
175
|
+
label={name}
|
|
173
176
|
moreIcon={moreIcon}
|
|
174
177
|
morePadded={morePadded}
|
|
175
178
|
folded={folded}
|
|
@@ -3,6 +3,7 @@ import { PopoverNext } from '@blueprintjs/core';
|
|
|
3
3
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
|
|
6
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
6
7
|
import type { OverlayMetrics } from '../core/overlayMetrics.ts';
|
|
7
8
|
|
|
8
9
|
import { OverlayIconButton } from './OverlayIconButton.tsx';
|
|
@@ -18,7 +19,7 @@ export interface OverlayInfoProps {
|
|
|
18
19
|
/**
|
|
19
20
|
* What the glyph is called, for the pointer and for a screen reader. Phrase
|
|
20
21
|
* it as the question the reader has, not as the name of a feature.
|
|
21
|
-
* @default '
|
|
22
|
+
* @default the chrome's own line, in the language of the page
|
|
22
23
|
*/
|
|
23
24
|
label?: string;
|
|
24
25
|
/**
|
|
@@ -49,7 +50,9 @@ export interface OverlayInfoProps {
|
|
|
49
50
|
* @returns The glyph and its explanation.
|
|
50
51
|
*/
|
|
51
52
|
export function OverlayInfo(props: OverlayInfoProps): ReactElement {
|
|
52
|
-
const { children, label
|
|
53
|
+
const { children, label } = props;
|
|
54
|
+
const t = useChromeT();
|
|
55
|
+
const name = label ?? t('overlay.whatAmILookingAt');
|
|
53
56
|
const { placement = 'bottom-end', testId } = props;
|
|
54
57
|
const { metrics } = useOverlaySurface();
|
|
55
58
|
const [open, setOpen] = useState(false);
|
|
@@ -62,7 +65,7 @@ export function OverlayInfo(props: OverlayInfoProps): ReactElement {
|
|
|
62
65
|
>
|
|
63
66
|
<OverlayIconButton
|
|
64
67
|
icon="help"
|
|
65
|
-
label={
|
|
68
|
+
label={name}
|
|
66
69
|
active={open}
|
|
67
70
|
testId={testId}
|
|
68
71
|
opensMenu
|
|
@@ -3,6 +3,7 @@ import { useId, useMemo } from 'react';
|
|
|
3
3
|
|
|
4
4
|
import type { HelpContent } from '../../help/ui/HelpBody.tsx';
|
|
5
5
|
import { HelpIcon } from '../../help/ui/HelpIcon.tsx';
|
|
6
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
6
7
|
|
|
7
8
|
import type { OverlayAction } from './OverlayAction.tsx';
|
|
8
9
|
import type { OverlayGroup } from './OverlayGroup.tsx';
|
|
@@ -40,7 +41,7 @@ export interface OverlayPanelProps {
|
|
|
40
41
|
onReset?: () => void;
|
|
41
42
|
/**
|
|
42
43
|
* What that way back reads.
|
|
43
|
-
* @default '
|
|
44
|
+
* @default the chrome's own word for it, in the language of the page
|
|
44
45
|
*/
|
|
45
46
|
resetLabel?: string;
|
|
46
47
|
/**
|
|
@@ -68,7 +69,7 @@ export interface OverlayPanelProps {
|
|
|
68
69
|
* the panel says that the dotted names are offering anything, so one
|
|
69
70
|
* sentence says it once. Pass `''` for a panel whose names carry no help at
|
|
70
71
|
* all, where the line would be a promise the panel does not keep.
|
|
71
|
-
* @default '
|
|
72
|
+
* @default the chrome's own line, in the language of the page
|
|
72
73
|
*/
|
|
73
74
|
hint?: string;
|
|
74
75
|
/**
|
|
@@ -101,8 +102,9 @@ export interface OverlayPanelProps {
|
|
|
101
102
|
* @returns The panel.
|
|
102
103
|
*/
|
|
103
104
|
export function OverlayPanel(props: OverlayPanelProps): ReactElement {
|
|
104
|
-
const { title, children, onReset, resetLabel
|
|
105
|
-
const
|
|
105
|
+
const { title, children, onReset, resetLabel, help } = props;
|
|
106
|
+
const t = useChromeT();
|
|
107
|
+
const { actions, hint, nameWidth, testId } = props;
|
|
106
108
|
const { metrics } = useOverlaySurface();
|
|
107
109
|
const titleId = useId();
|
|
108
110
|
const reset = useOverlayInteraction();
|
|
@@ -134,7 +136,7 @@ export function OverlayPanel(props: OverlayPanelProps): ReactElement {
|
|
|
134
136
|
onClick={onReset}
|
|
135
137
|
{...reset.handlers}
|
|
136
138
|
>
|
|
137
|
-
{resetLabel}
|
|
139
|
+
{resetLabel ?? t('overlay.reset')}
|
|
138
140
|
</button>
|
|
139
141
|
)}
|
|
140
142
|
</div>
|
|
@@ -143,7 +145,9 @@ export function OverlayPanel(props: OverlayPanelProps): ReactElement {
|
|
|
143
145
|
{children}
|
|
144
146
|
</OverlayPanelContext.Provider>
|
|
145
147
|
{hint === '' ? null : (
|
|
146
|
-
<p style={overlayPanelHintStyle(metrics)}>
|
|
148
|
+
<p style={overlayPanelHintStyle(metrics)}>
|
|
149
|
+
{hint ?? t('overlay.hoverAName')}
|
|
150
|
+
</p>
|
|
147
151
|
)}
|
|
148
152
|
</div>
|
|
149
153
|
{actions === undefined ? null : (
|
|
@@ -160,4 +164,3 @@ export function OverlayPanel(props: OverlayPanelProps): ReactElement {
|
|
|
160
164
|
* the dotted underlines has already asked this question and one who has not
|
|
161
165
|
* would not recognise a description of them.
|
|
162
166
|
*/
|
|
163
|
-
const DEFAULT_HINT = 'Hover a name for what it does.';
|