react-cheminfo 0.24.0 → 0.26.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-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/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/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +4 -2
- package/lib/ecosystem/core/sites.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/ecosystem/ui/glyphs.d.ts.map +1 -1
- package/lib/ecosystem/ui/glyphs.js +6 -5
- package/lib/ecosystem/ui/glyphs.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/translate/core/index.d.ts +1 -1
- package/lib/translate/core/index.d.ts.map +1 -1
- package/lib/translate/core/start.d.ts +35 -2
- package/lib/translate/core/start.d.ts.map +1 -1
- package/lib/translate/core/start.js +23 -4
- package/lib/translate/core/start.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/download/ui/FigureDownload.tsx +7 -5
- package/src/download/ui/FigureDownloadPanel.tsx +31 -25
- package/src/ecosystem/core/sites.ts +4 -2
- 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/ecosystem/ui/glyphs.tsx +16 -22
- 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/translate/core/index.ts +1 -1
- package/src/translate/core/start.ts +65 -3
- package/src/ui.ts +1 -0
|
@@ -5,10 +5,11 @@ import {
|
|
|
5
5
|
DialogFooter,
|
|
6
6
|
H6,
|
|
7
7
|
} from '@blueprintjs/core';
|
|
8
|
-
import type { CSSProperties, ReactElement } from 'react';
|
|
8
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
9
9
|
import { useState } from 'react';
|
|
10
10
|
|
|
11
11
|
import { CodeBlock, CopyButton } from '../../clipboard/ui/index.ts';
|
|
12
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
12
13
|
import type {
|
|
13
14
|
ShareConfig,
|
|
14
15
|
ShareParamCodecs,
|
|
@@ -77,6 +78,7 @@ export function ShareDialogContent<
|
|
|
77
78
|
frameHeight,
|
|
78
79
|
children,
|
|
79
80
|
} = props;
|
|
81
|
+
const t = useChromeT();
|
|
80
82
|
|
|
81
83
|
const address = globalThis.location;
|
|
82
84
|
const base = baseUrl ?? address?.href ?? '';
|
|
@@ -141,9 +143,7 @@ export function ShareDialogContent<
|
|
|
141
143
|
return (
|
|
142
144
|
<>
|
|
143
145
|
<div className={BODY_CLASS} style={BODY_STYLE}>
|
|
144
|
-
<p style={LEAD_STYLE}>
|
|
145
|
-
A link to <b>{title}</b> as you have it set up now.
|
|
146
|
-
</p>
|
|
146
|
+
<p style={LEAD_STYLE}>{lead(t('share.lead'), title)}</p>
|
|
147
147
|
|
|
148
148
|
{presets.length === 0 ? (
|
|
149
149
|
options
|
|
@@ -163,13 +163,13 @@ export function ShareDialogContent<
|
|
|
163
163
|
)}
|
|
164
164
|
|
|
165
165
|
<section className="share-section" style={SECTION_STYLE}>
|
|
166
|
-
<H6>
|
|
166
|
+
<H6>{t('share.link')}</H6>
|
|
167
167
|
<CodeBlock code={url} tone="muted" />
|
|
168
168
|
<div style={ACTIONS_STYLE}>
|
|
169
|
-
<CopyButton content={url} label=
|
|
169
|
+
<CopyButton content={url} label={t('share.copyLink')} />
|
|
170
170
|
<AnchorButton
|
|
171
171
|
icon="share"
|
|
172
|
-
text=
|
|
172
|
+
text={t('share.openInNewTab')}
|
|
173
173
|
href={url}
|
|
174
174
|
target="_blank"
|
|
175
175
|
rel="noopener noreferrer"
|
|
@@ -178,20 +178,30 @@ export function ShareDialogContent<
|
|
|
178
178
|
</section>
|
|
179
179
|
|
|
180
180
|
<section className="share-section" style={SECTION_STYLE}>
|
|
181
|
-
<H6>
|
|
181
|
+
<H6>{t('share.iframe')}</H6>
|
|
182
182
|
<CodeBlock code={frame} tone="muted" />
|
|
183
183
|
<div style={ACTIONS_STYLE}>
|
|
184
|
-
<CopyButton content={frame} label=
|
|
184
|
+
<CopyButton content={frame} label={t('share.copyIframe')} />
|
|
185
185
|
</div>
|
|
186
186
|
</section>
|
|
187
187
|
</div>
|
|
188
188
|
<DialogFooter
|
|
189
|
-
actions={
|
|
189
|
+
actions={
|
|
190
|
+
<Button intent="primary" text={t('share.done')} onClick={onClose} />
|
|
191
|
+
}
|
|
190
192
|
/>
|
|
191
193
|
</>
|
|
192
194
|
);
|
|
193
195
|
}
|
|
194
196
|
|
|
197
|
+
// The name of the page is set in bold inside a sentence whose word order is
|
|
198
|
+
// the translator's, so the message is split at its placeholder rather than
|
|
199
|
+
// written as a prefix and a suffix.
|
|
200
|
+
function lead(message: string, title: string): ReactNode[] {
|
|
201
|
+
const [before = '', after = ''] = message.split('{title}');
|
|
202
|
+
return [before, <b key="title">{title}</b>, after];
|
|
203
|
+
}
|
|
204
|
+
|
|
195
205
|
function initialDraft<Codecs extends ShareParamCodecs>(
|
|
196
206
|
search: string,
|
|
197
207
|
vocabulary: ShareVocabulary<Codecs>,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tab, Tabs } from '@blueprintjs/core';
|
|
2
2
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
4
5
|
import type { ShareParamCodecs, SharePreset } from '../core/index.ts';
|
|
5
6
|
|
|
6
7
|
const SECTION_STYLE: CSSProperties = { marginBottom: 18 };
|
|
@@ -35,6 +36,7 @@ export function SharePresetTabs<
|
|
|
35
36
|
Codecs extends ShareParamCodecs = Record<string, never>,
|
|
36
37
|
>(props: SharePresetTabsProps<Codecs>): ReactElement {
|
|
37
38
|
const { presets, selected, onSelect, custom } = props;
|
|
39
|
+
const t = useChromeT();
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
42
|
<section className="share-section" style={SECTION_STYLE}>
|
|
@@ -63,7 +65,7 @@ export function SharePresetTabs<
|
|
|
63
65
|
panel={<p style={DESCRIPTION_STYLE}>{preset.description}</p>}
|
|
64
66
|
/>
|
|
65
67
|
))}
|
|
66
|
-
<Tab id={CUSTOM_TAB} title=
|
|
68
|
+
<Tab id={CUSTOM_TAB} title={t('share.custom')} panel={<>{custom}</>} />
|
|
67
69
|
</Tabs>
|
|
68
70
|
</section>
|
|
69
71
|
);
|
|
@@ -2,6 +2,7 @@ import { Icon } from '@blueprintjs/core';
|
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
|
|
4
4
|
import { isModifiedClick } from '../../chrome/ui/navItem.ts';
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
6
7
|
import type { TalkOrigin } from '../core/index.ts';
|
|
7
8
|
|
|
@@ -35,13 +36,14 @@ export interface BackToSlidesProps {
|
|
|
35
36
|
*/
|
|
36
37
|
export function BackToSlides(props: BackToSlidesProps): ReactElement | null {
|
|
37
38
|
const { className, origin, href, onReturn } = props;
|
|
39
|
+
const t = useChromeT();
|
|
38
40
|
if (origin === null) return null;
|
|
39
41
|
|
|
40
42
|
return (
|
|
41
43
|
<a
|
|
42
44
|
className={joinClassNames('back-to-slides no-print', className)}
|
|
43
45
|
href={href}
|
|
44
|
-
title={
|
|
46
|
+
title={t('slides.backToSlide', { slide: origin.slide + 1 })}
|
|
45
47
|
onClick={(event) => {
|
|
46
48
|
if (onReturn === undefined || isModifiedClick(event)) return;
|
|
47
49
|
event.preventDefault();
|
|
@@ -49,7 +51,7 @@ export function BackToSlides(props: BackToSlidesProps): ReactElement | null {
|
|
|
49
51
|
}}
|
|
50
52
|
>
|
|
51
53
|
<Icon icon="presentation" size={14} />
|
|
52
|
-
|
|
54
|
+
{t('slides.backToSlides')}
|
|
53
55
|
</a>
|
|
54
56
|
);
|
|
55
57
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
3
4
|
import { frameTitle } from '../core/familyFrame.ts';
|
|
4
5
|
import type { Slide } from '../core/talk.ts';
|
|
5
6
|
|
|
@@ -23,6 +24,7 @@ export interface EmbedSlideProps {
|
|
|
23
24
|
*/
|
|
24
25
|
export function EmbedSlide(props: EmbedSlideProps): ReactElement {
|
|
25
26
|
const { slide } = props;
|
|
27
|
+
const t = useChromeT();
|
|
26
28
|
const { prose, src } = splitEmbedAddress(slide.body);
|
|
27
29
|
|
|
28
30
|
return (
|
|
@@ -30,9 +32,7 @@ export function EmbedSlide(props: EmbedSlideProps): ReactElement {
|
|
|
30
32
|
<div className="slide-content">
|
|
31
33
|
{prose === '' ? null : <SlideBody body={prose} />}
|
|
32
34
|
{src === null ? (
|
|
33
|
-
<p className="slide-embed-missing">
|
|
34
|
-
This slide frames a tool, but carries no address.
|
|
35
|
-
</p>
|
|
35
|
+
<p className="slide-embed-missing">{t('slides.noAddress')}</p>
|
|
36
36
|
) : (
|
|
37
37
|
<iframe
|
|
38
38
|
className="slide-embed-frame"
|
package/src/slides/ui/Slide.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentType, ReactElement } from 'react';
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
4
5
|
import type {
|
|
5
6
|
Slide as SlideData,
|
|
6
7
|
TalkMeta,
|
|
@@ -81,6 +82,7 @@ const GENERIC_LAYOUTS = new Set(['content', 'title', 'quote', 'thanks']);
|
|
|
81
82
|
function GenericSlide(props: SlideLayoutProps): ReactElement {
|
|
82
83
|
const { slide, talkId, slideIndex, meta, renderLink, site, talkOrigin } =
|
|
83
84
|
props;
|
|
85
|
+
const t = useChromeT();
|
|
84
86
|
const layout = GENERIC_LAYOUTS.has(slide.layout) ? slide.layout : 'content';
|
|
85
87
|
const { body, demos } = splitDemoLinks(slide.body);
|
|
86
88
|
const origin: TalkOrigin =
|
|
@@ -102,7 +104,7 @@ function GenericSlide(props: SlideLayoutProps): ReactElement {
|
|
|
102
104
|
)}
|
|
103
105
|
{demos.length === 0 ? null : (
|
|
104
106
|
<div className="slide-demos">
|
|
105
|
-
<span className="slide-demos-label">
|
|
107
|
+
<span className="slide-demos-label">{t('slides.liveDemos')}</span>
|
|
106
108
|
{demos.map((demo, index) => (
|
|
107
109
|
<Fragment key={demo.href}>
|
|
108
110
|
{index === 0 ? null : (
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Button } from '@blueprintjs/core';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
|
+
|
|
4
6
|
/** Where the talk stands, and what the presenter may do about it. */
|
|
5
7
|
export interface SlideshowBarProps {
|
|
6
8
|
/** What the bar reads. */
|
|
@@ -42,18 +44,24 @@ export function SlideshowBar(props: SlideshowBarProps): ReactElement {
|
|
|
42
44
|
onToggleFullscreen,
|
|
43
45
|
onExit,
|
|
44
46
|
} = props;
|
|
47
|
+
const t = useChromeT();
|
|
45
48
|
|
|
46
49
|
return (
|
|
47
50
|
<div className="slideshow-bar no-print">
|
|
48
51
|
{onExit === undefined ? null : (
|
|
49
|
-
<Button
|
|
52
|
+
<Button
|
|
53
|
+
variant="minimal"
|
|
54
|
+
icon="cross"
|
|
55
|
+
text={t('slides.exit')}
|
|
56
|
+
onClick={onExit}
|
|
57
|
+
/>
|
|
50
58
|
)}
|
|
51
59
|
<div className="slideshow-title">{title}</div>
|
|
52
60
|
<div className="slideshow-controls">
|
|
53
61
|
<Button
|
|
54
62
|
variant="minimal"
|
|
55
63
|
icon="chevron-left"
|
|
56
|
-
aria-label=
|
|
64
|
+
aria-label={t('slides.previousSlide')}
|
|
57
65
|
disabled={index === 0}
|
|
58
66
|
onClick={() => {
|
|
59
67
|
onIndexChange(index - 1);
|
|
@@ -65,7 +73,7 @@ export function SlideshowBar(props: SlideshowBarProps): ReactElement {
|
|
|
65
73
|
<Button
|
|
66
74
|
variant="minimal"
|
|
67
75
|
icon="chevron-right"
|
|
68
|
-
aria-label=
|
|
76
|
+
aria-label={t('slides.nextSlide')}
|
|
69
77
|
disabled={index >= total - 1}
|
|
70
78
|
onClick={() => {
|
|
71
79
|
onIndexChange(index + 1);
|
|
@@ -74,7 +82,7 @@ export function SlideshowBar(props: SlideshowBarProps): ReactElement {
|
|
|
74
82
|
<Button
|
|
75
83
|
variant="minimal"
|
|
76
84
|
icon={isFullscreen ? 'minimize' : 'fullscreen'}
|
|
77
|
-
aria-label=
|
|
85
|
+
aria-label={t('slides.toggleFullscreen')}
|
|
78
86
|
onClick={onToggleFullscreen}
|
|
79
87
|
/>
|
|
80
88
|
</div>
|
|
@@ -2,6 +2,7 @@ import type { ReactElement } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { isModifiedClick } from '../../chrome/ui/navItem.ts';
|
|
4
4
|
import { pluralize } from '../../format/core/index.ts';
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
6
7
|
import type { TalkManifest, TalkSummary } from '../core/index.ts';
|
|
7
8
|
|
|
@@ -25,7 +26,7 @@ export interface TalkListProps {
|
|
|
25
26
|
/**
|
|
26
27
|
* What an empty list says. A list that draws nothing at all reads as a
|
|
27
28
|
* broken page rather than as a site that has published no deck yet.
|
|
28
|
-
* @default '
|
|
29
|
+
* @default the chrome's own line, in the language of the page
|
|
29
30
|
*/
|
|
30
31
|
emptyNote?: string;
|
|
31
32
|
/**
|
|
@@ -45,19 +46,16 @@ export interface TalkListProps {
|
|
|
45
46
|
* @returns The listing.
|
|
46
47
|
*/
|
|
47
48
|
export function TalkList(props: TalkListProps): ReactElement {
|
|
48
|
-
const {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
onOpen,
|
|
52
|
-
renderHref,
|
|
53
|
-
siteName,
|
|
54
|
-
emptyNote = 'No talk yet.',
|
|
55
|
-
} = props;
|
|
49
|
+
const { className, manifests, onOpen, renderHref, siteName, emptyNote } =
|
|
50
|
+
props;
|
|
51
|
+
const t = useChromeT();
|
|
56
52
|
const groups = groupBySite(manifests);
|
|
57
53
|
const showSite = groups.length > 1;
|
|
58
54
|
|
|
59
55
|
if (groups.length === 0) {
|
|
60
|
-
return
|
|
56
|
+
return (
|
|
57
|
+
<p className="talk-list-empty">{emptyNote ?? t('slides.noTalkYet')}</p>
|
|
58
|
+
);
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
return (
|
|
@@ -14,8 +14,11 @@ export type EditorGuideScope = 'fragment' | 'molecule' | 'reaction';
|
|
|
14
14
|
|
|
15
15
|
/** One gesture and what it does. */
|
|
16
16
|
export interface EditorGesture {
|
|
17
|
+
/** How the guide's catalog names it, unique within its section. */
|
|
18
|
+
id: string;
|
|
17
19
|
/** Keys, and plain text for the mouse part; unique within one gesture. */
|
|
18
20
|
input: ReadonlyArray<string | EditorGuideKey>;
|
|
21
|
+
/** What it does, in English; the catalog answers for the other languages. */
|
|
19
22
|
action: string;
|
|
20
23
|
/**
|
|
21
24
|
* The only editor the gesture works in.
|
|
@@ -26,6 +29,8 @@ export interface EditorGesture {
|
|
|
26
29
|
|
|
27
30
|
/** Gestures that share a context, such as the pointer resting on an atom. */
|
|
28
31
|
export interface EditorGuideSection {
|
|
32
|
+
/** How the guide's catalog names the section. */
|
|
33
|
+
id: string;
|
|
29
34
|
title: string;
|
|
30
35
|
gestures: readonly EditorGesture[];
|
|
31
36
|
/**
|
|
@@ -37,6 +42,8 @@ export interface EditorGuideSection {
|
|
|
37
42
|
|
|
38
43
|
/** A page of the full documentation. */
|
|
39
44
|
export interface EditorGuideLink {
|
|
45
|
+
/** How the guide's catalog names the page. */
|
|
46
|
+
id: string;
|
|
40
47
|
title: string;
|
|
41
48
|
url: string;
|
|
42
49
|
}
|
|
@@ -44,99 +51,170 @@ export interface EditorGuideLink {
|
|
|
44
51
|
/** The sections, in the order the guide lists them. */
|
|
45
52
|
export const STRUCTURE_EDITOR_GUIDE: readonly EditorGuideSection[] = [
|
|
46
53
|
{
|
|
54
|
+
id: 'atom',
|
|
47
55
|
title: 'Pointer on an atom',
|
|
48
56
|
gestures: [
|
|
49
|
-
{ input: ['Type', { key: 'n' }, { key: 'a' }], action: 'Make it Na' },
|
|
50
57
|
{
|
|
58
|
+
id: 'element',
|
|
59
|
+
input: ['Type', { key: 'n' }, { key: 'a' }],
|
|
60
|
+
action: 'Make it Na',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'group',
|
|
51
64
|
input: ['Type', { key: 'p' }, { key: 'h' }],
|
|
52
65
|
action: 'Attach a phenyl; Me, Et, Boc, TMS… work too',
|
|
53
66
|
},
|
|
54
67
|
{
|
|
68
|
+
id: 'applyOrForget',
|
|
55
69
|
input: [{ key: 'Enter' }, 'or', { key: 'Esc' }],
|
|
56
70
|
action: 'Apply or forget what was typed',
|
|
57
71
|
},
|
|
58
72
|
{
|
|
73
|
+
id: 'chain',
|
|
59
74
|
input: [{ key: '1' }, '…', { key: '9' }],
|
|
60
75
|
action: 'Attach a chain of that many carbons',
|
|
61
76
|
},
|
|
62
77
|
{
|
|
78
|
+
id: 'charge',
|
|
63
79
|
input: [{ key: '+' }, 'or', { key: '-' }],
|
|
64
80
|
action: 'Raise or lower the charge',
|
|
65
81
|
},
|
|
66
|
-
{ input: [{ key: '.' }], action: 'Add or remove a radical' },
|
|
67
|
-
{ input: [{ key: ':' }], action: 'Make it a triplet, then a singlet' },
|
|
68
|
-
{ input: [{ key: '?' }], action: 'Make it a connection point' },
|
|
69
82
|
{
|
|
83
|
+
id: 'radical',
|
|
84
|
+
input: [{ key: '.' }],
|
|
85
|
+
action: 'Add or remove a radical',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 'spin',
|
|
89
|
+
input: [{ key: ':' }],
|
|
90
|
+
action: 'Make it a triplet, then a singlet',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'attachment',
|
|
94
|
+
input: [{ key: '?' }],
|
|
95
|
+
action: 'Make it a connection point',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: 'query',
|
|
70
99
|
input: [{ key: 'q' }],
|
|
71
100
|
action: 'Edit its query features',
|
|
72
101
|
only: 'fragment',
|
|
73
102
|
},
|
|
74
|
-
{
|
|
75
|
-
|
|
103
|
+
{
|
|
104
|
+
id: 'halogen',
|
|
105
|
+
input: [{ key: 'x' }],
|
|
106
|
+
action: 'Accept any halogen',
|
|
107
|
+
only: 'fragment',
|
|
108
|
+
},
|
|
109
|
+
{ id: 'delete', input: [{ key: 'Delete' }], action: 'Delete it' },
|
|
76
110
|
],
|
|
77
111
|
note: 'What is typed shows black for an element, blue for a group, grey while incomplete and red when unknown.',
|
|
78
112
|
},
|
|
79
113
|
{
|
|
114
|
+
id: 'bond',
|
|
80
115
|
title: 'Pointer on a bond',
|
|
81
116
|
gestures: [
|
|
82
117
|
{
|
|
118
|
+
id: 'order',
|
|
83
119
|
input: [{ key: '1' }, { key: '2' }, { key: '3' }],
|
|
84
120
|
action: 'Single, double or triple',
|
|
85
121
|
},
|
|
86
|
-
{ input: [{ key: '0' }], action: 'Zero-order (metal–ligand) bond' },
|
|
87
122
|
{
|
|
123
|
+
id: 'zeroOrder',
|
|
124
|
+
input: [{ key: '0' }],
|
|
125
|
+
action: 'Zero-order (metal–ligand) bond',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 'stereo',
|
|
88
129
|
input: [{ key: 'u' }, 'or', { key: 'd' }],
|
|
89
130
|
action: 'Up or down stereo bond',
|
|
90
131
|
},
|
|
91
|
-
{ input: [{ key: 'c' }], action: 'Double bond of unknown geometry' },
|
|
92
|
-
{ input: [{ key: 'v' }], action: 'Fuse a 3-membered ring' },
|
|
93
132
|
{
|
|
133
|
+
id: 'unknownGeometry',
|
|
134
|
+
input: [{ key: 'c' }],
|
|
135
|
+
action: 'Double bond of unknown geometry',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: 'threeRing',
|
|
139
|
+
input: [{ key: 'v' }],
|
|
140
|
+
action: 'Fuse a 3-membered ring',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 'ring',
|
|
94
144
|
input: [{ key: '4' }, '…', { key: '7' }],
|
|
95
145
|
action: 'Fuse a ring of that size',
|
|
96
146
|
},
|
|
97
147
|
{
|
|
148
|
+
id: 'benzene',
|
|
98
149
|
input: [{ key: 'a' }, 'or', { key: 'b' }],
|
|
99
150
|
action: 'Fuse a benzene ring',
|
|
100
151
|
},
|
|
101
152
|
{
|
|
153
|
+
id: 'query',
|
|
102
154
|
input: [{ key: 'q' }],
|
|
103
155
|
action: 'Edit its query features',
|
|
104
156
|
only: 'fragment',
|
|
105
157
|
},
|
|
106
|
-
{ input: [{ key: 'Delete' }], action: 'Delete it' },
|
|
158
|
+
{ id: 'delete', input: [{ key: 'Delete' }], action: 'Delete it' },
|
|
107
159
|
],
|
|
108
160
|
},
|
|
109
161
|
{
|
|
162
|
+
id: 'anywhere',
|
|
110
163
|
title: 'Anywhere',
|
|
111
164
|
gestures: [
|
|
112
|
-
{ input: [{ key: 'Mod' }, { key: 'Z' }], action: 'Undo' },
|
|
113
|
-
{ input: [{ key: 'Mod' }, { key: 'C' }], action: 'Copy the structure' },
|
|
165
|
+
{ id: 'undo', input: [{ key: 'Mod' }, { key: 'Z' }], action: 'Undo' },
|
|
114
166
|
{
|
|
167
|
+
id: 'copy',
|
|
168
|
+
input: [{ key: 'Mod' }, { key: 'C' }],
|
|
169
|
+
action: 'Copy the structure',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 'paste',
|
|
115
173
|
input: [{ key: 'Mod' }, { key: 'V' }],
|
|
116
174
|
action: 'Paste a molfile, a SMILES or an idCode',
|
|
117
175
|
},
|
|
118
|
-
{ input: [{ key: 'Delete' }], action: 'Delete the selection' },
|
|
119
176
|
{
|
|
177
|
+
id: 'deleteSelection',
|
|
178
|
+
input: [{ key: 'Delete' }],
|
|
179
|
+
action: 'Delete the selection',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: 'flip',
|
|
120
183
|
input: [{ key: 'h' }, 'or', { key: 'v' }],
|
|
121
184
|
action: 'Flip horizontally or vertically',
|
|
122
185
|
only: 'molecule',
|
|
123
186
|
},
|
|
124
|
-
{ input: [{ key: 'F1' }], action: 'Open this guide' },
|
|
187
|
+
{ id: 'help', input: [{ key: 'F1' }], action: 'Open this guide' },
|
|
125
188
|
],
|
|
126
189
|
note: 'Keys act once the drawing has been clicked. On empty canvas, a key picks the tool whose tooltip shows it.',
|
|
127
190
|
},
|
|
128
191
|
{
|
|
192
|
+
id: 'selecting',
|
|
129
193
|
title: 'Selecting',
|
|
130
194
|
gestures: [
|
|
131
|
-
{ input: ['Drag'], action: 'Select what the lasso encloses' },
|
|
132
|
-
{ input: [{ key: 'Alt' }, '+ drag'], action: 'Select a rectangle' },
|
|
133
|
-
{ input: [{ key: 'Shift' }, '+ drag'], action: 'Add to the selection' },
|
|
134
|
-
{ input: ['Drag the selection'], action: 'Move it' },
|
|
135
195
|
{
|
|
196
|
+
id: 'lasso',
|
|
197
|
+
input: ['Drag'],
|
|
198
|
+
action: 'Select what the lasso encloses',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: 'rectangle',
|
|
202
|
+
input: [{ key: 'Alt' }, '+ drag'],
|
|
203
|
+
action: 'Select a rectangle',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: 'add',
|
|
207
|
+
input: [{ key: 'Shift' }, '+ drag'],
|
|
208
|
+
action: 'Add to the selection',
|
|
209
|
+
},
|
|
210
|
+
{ id: 'move', input: ['Drag the selection'], action: 'Move it' },
|
|
211
|
+
{
|
|
212
|
+
id: 'duplicate',
|
|
136
213
|
input: [{ key: 'Shift' }, '+ drag the selection'],
|
|
137
214
|
action: 'Copy it',
|
|
138
215
|
},
|
|
139
216
|
{
|
|
217
|
+
id: 'queryFeatures',
|
|
140
218
|
input: ['Double-click'],
|
|
141
219
|
action: 'Edit the query features of an atom, a bond or the selection',
|
|
142
220
|
only: 'fragment',
|
|
@@ -145,6 +223,7 @@ export const STRUCTURE_EDITOR_GUIDE: readonly EditorGuideSection[] = [
|
|
|
145
223
|
note: 'These need the Select tool, which Space picks.',
|
|
146
224
|
},
|
|
147
225
|
{
|
|
226
|
+
id: 'stereochemistry',
|
|
148
227
|
title: 'Stereochemistry',
|
|
149
228
|
gestures: [],
|
|
150
229
|
note: 'Pink bonds flag a stereocentre with too little or too much information. Draw an up or down bond with its narrow end on the centre, then use the enhanced stereo tool to say whether the drawing is this enantiomer (abs), both of them (&) or one of the two (or).',
|
|
@@ -153,12 +232,18 @@ export const STRUCTURE_EDITOR_GUIDE: readonly EditorGuideSection[] = [
|
|
|
153
232
|
|
|
154
233
|
/** The documentation this guide summarises. */
|
|
155
234
|
export const STRUCTURE_EDITOR_DOCS: readonly EditorGuideLink[] = [
|
|
156
|
-
{ title: 'Tools and keys', url: 'https://docs.nmrium.org/help/ocl/' },
|
|
157
235
|
{
|
|
236
|
+
id: 'toolsAndKeys',
|
|
237
|
+
title: 'Tools and keys',
|
|
238
|
+
url: 'https://docs.nmrium.org/help/ocl/',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: 'atomProperties',
|
|
158
242
|
title: 'Atom properties',
|
|
159
243
|
url: 'https://docs.nmrium.org/chemical_structure/ocl/atom-properties/',
|
|
160
244
|
},
|
|
161
245
|
{
|
|
246
|
+
id: 'stereochemistry',
|
|
162
247
|
title: 'Stereochemistry',
|
|
163
248
|
url: 'https://docs.nmrium.org/ocl/stereochemistry/',
|
|
164
249
|
},
|
|
@@ -209,6 +294,28 @@ function appliesTo(
|
|
|
209
294
|
return only === mode;
|
|
210
295
|
}
|
|
211
296
|
|
|
297
|
+
// The words a gesture writes between its key caps. They are keyed here rather
|
|
298
|
+
// than slugged from the text, because `Drag` and `+ drag` would slug alike.
|
|
299
|
+
const INPUT_WORD_IDS: Record<string, string> = {
|
|
300
|
+
Type: 'type',
|
|
301
|
+
or: 'or',
|
|
302
|
+
Drag: 'drag',
|
|
303
|
+
'+ drag': 'plusDrag',
|
|
304
|
+
'Drag the selection': 'dragSelection',
|
|
305
|
+
'+ drag the selection': 'plusDragSelection',
|
|
306
|
+
'Double-click': 'doubleClick',
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* How the catalog names one of the words a gesture writes between its key
|
|
311
|
+
* caps.
|
|
312
|
+
* @param text - The word, in English.
|
|
313
|
+
* @returns Its id, or `undefined` for punctuation nobody translates.
|
|
314
|
+
*/
|
|
315
|
+
export function editorInputWordId(text: string): string | undefined {
|
|
316
|
+
return INPUT_WORD_IDS[text];
|
|
317
|
+
}
|
|
318
|
+
|
|
212
319
|
/**
|
|
213
320
|
* The text of a key cap.
|
|
214
321
|
* @param key - The key, `Mod` standing for the platform's shortcut modifier.
|