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
|
@@ -16,7 +16,9 @@ export type EditorToolbarAvailability = 'always' | 'reaction' | 'never';
|
|
|
16
16
|
|
|
17
17
|
/** One button of the toolbar. */
|
|
18
18
|
export interface EditorToolbarButton {
|
|
19
|
-
/**
|
|
19
|
+
/** How the toolbar's catalog names the button. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** What the button is called, in English. */
|
|
20
22
|
name: string;
|
|
21
23
|
/** What it does, in a sentence or two. */
|
|
22
24
|
description: string;
|
|
@@ -38,62 +40,76 @@ export interface EditorToolbarButton {
|
|
|
38
40
|
* then down the second.
|
|
39
41
|
*/
|
|
40
42
|
export const EDITOR_TOOLBAR_BUTTONS: readonly EditorToolbarButton[] = [
|
|
41
|
-
{ name: 'Clear', description: 'Erase the whole drawing.' },
|
|
43
|
+
{ id: 'clear', name: 'Clear', description: 'Erase the whole drawing.' },
|
|
42
44
|
{
|
|
45
|
+
id: 'cleanUp',
|
|
43
46
|
name: 'Clean up',
|
|
44
47
|
description:
|
|
45
48
|
'Redraw the structure with fresh 2D coordinates. With part of it selected, the rest keeps its layout.',
|
|
46
49
|
},
|
|
47
50
|
{
|
|
51
|
+
id: 'select',
|
|
48
52
|
name: 'Select',
|
|
49
53
|
description:
|
|
50
54
|
'Drag around atoms to select them: hold Alt for a rectangle, Shift to add to the selection. Drag a selection to move it, Shift-drag to copy it.',
|
|
51
55
|
keys: ['Space'],
|
|
52
56
|
},
|
|
53
57
|
{
|
|
58
|
+
id: 'unknownConfiguration',
|
|
54
59
|
name: 'Unknown configuration',
|
|
55
60
|
description:
|
|
56
61
|
'Click a stereocentre to mark its configuration as unknown; click again to undo it.',
|
|
57
62
|
},
|
|
58
63
|
{
|
|
64
|
+
id: 'delete',
|
|
59
65
|
name: 'Delete',
|
|
60
66
|
description: 'Click an atom or a bond to delete it.',
|
|
61
67
|
keys: ['0'],
|
|
62
68
|
},
|
|
63
69
|
{
|
|
70
|
+
id: 'singleBond',
|
|
64
71
|
name: 'Single bond',
|
|
65
72
|
description:
|
|
66
73
|
'Click empty space for a new bond, or drag from an atom. Clicking a bond again makes it double, then triple.',
|
|
67
74
|
keys: ['1'],
|
|
68
75
|
},
|
|
69
76
|
{
|
|
77
|
+
id: 'upBond',
|
|
70
78
|
name: 'Up bond',
|
|
71
79
|
description:
|
|
72
80
|
'Wedged stereo bond, pointing toward the viewer. Its narrow end goes on the stereocentre.',
|
|
73
81
|
keys: ['u'],
|
|
74
82
|
},
|
|
75
|
-
ring('3-membered ring', '3'),
|
|
76
|
-
ring('5-membered ring', '5'),
|
|
77
|
-
ring('7-membered ring', '7'),
|
|
83
|
+
ring('ring3', '3-membered ring', '3'),
|
|
84
|
+
ring('ring5', '5-membered ring', '5'),
|
|
85
|
+
ring('ring7', '7-membered ring', '7'),
|
|
78
86
|
{
|
|
87
|
+
id: 'positiveCharge',
|
|
79
88
|
name: 'Positive charge',
|
|
80
89
|
description: 'Click an atom to raise its charge by one.',
|
|
81
90
|
keys: ['+'],
|
|
82
91
|
},
|
|
83
|
-
atom('Carbon', 'C', 'c'),
|
|
84
|
-
atom('Nitrogen', 'N', 'n'),
|
|
85
|
-
atom('Oxygen', 'O', 'o'),
|
|
86
|
-
atom('Fluorine', 'F', 'f'),
|
|
87
|
-
atom('Bromine', 'Br', 'b'),
|
|
88
|
-
atom('Hydrogen', 'H'),
|
|
89
|
-
{ name: 'Undo', description: 'Revert the last change.', keys: ['Mod', 'Z'] },
|
|
92
|
+
atom('carbon', 'Carbon', 'C', 'c'),
|
|
93
|
+
atom('nitrogen', 'Nitrogen', 'N', 'n'),
|
|
94
|
+
atom('oxygen', 'Oxygen', 'O', 'o'),
|
|
95
|
+
atom('fluorine', 'Fluorine', 'F', 'f'),
|
|
96
|
+
atom('bromine', 'Bromine', 'Br', 'b'),
|
|
97
|
+
atom('hydrogen', 'Hydrogen', 'H'),
|
|
90
98
|
{
|
|
99
|
+
id: 'undo',
|
|
100
|
+
name: 'Undo',
|
|
101
|
+
description: 'Revert the last change.',
|
|
102
|
+
keys: ['Mod', 'Z'],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'zoomAndRotate',
|
|
91
106
|
name: 'Zoom and rotate',
|
|
92
107
|
description:
|
|
93
108
|
'Press where the centre should be, then drag up or down to zoom and sideways to rotate. With a selection, only that part moves.',
|
|
94
109
|
keys: ['z'],
|
|
95
110
|
},
|
|
96
111
|
{
|
|
112
|
+
id: 'atomMapping',
|
|
97
113
|
name: 'Atom mapping',
|
|
98
114
|
description:
|
|
99
115
|
'Drag from a reactant atom to the same atom in a product: both get the same number. Click a mapped atom to unmap it.',
|
|
@@ -101,41 +117,47 @@ export const EDITOR_TOOLBAR_BUTTONS: readonly EditorToolbarButton[] = [
|
|
|
101
117
|
availability: 'reaction',
|
|
102
118
|
},
|
|
103
119
|
{
|
|
120
|
+
id: 'enhancedStereo',
|
|
104
121
|
name: 'Enhanced stereo',
|
|
105
122
|
description:
|
|
106
123
|
'Click a stereo bond to say what its centre means: abs, this enantiomer; &, both (racemic); or, one of the two. Press the button again to switch between the three.',
|
|
107
124
|
},
|
|
108
125
|
{
|
|
126
|
+
id: 'text',
|
|
109
127
|
name: 'Text',
|
|
110
128
|
description: 'Place a text label in the drawing.',
|
|
111
129
|
availability: 'never',
|
|
112
130
|
},
|
|
113
131
|
{
|
|
132
|
+
id: 'chain',
|
|
114
133
|
name: 'Chain',
|
|
115
134
|
description:
|
|
116
135
|
'Drag from empty space or from an atom to draw a zigzag carbon chain.',
|
|
117
136
|
keys: ['2'],
|
|
118
137
|
},
|
|
119
138
|
{
|
|
139
|
+
id: 'downBond',
|
|
120
140
|
name: 'Down bond',
|
|
121
141
|
description:
|
|
122
142
|
'Hashed stereo bond, pointing away from the viewer. Its narrow end goes on the stereocentre.',
|
|
123
143
|
keys: ['d'],
|
|
124
144
|
},
|
|
125
|
-
ring('4-membered ring', '4'),
|
|
126
|
-
ring('6-membered ring', '6'),
|
|
127
|
-
ring('Benzene ring', 'a'),
|
|
145
|
+
ring('ring4', '4-membered ring', '4'),
|
|
146
|
+
ring('ring6', '6-membered ring', '6'),
|
|
147
|
+
ring('benzene', 'Benzene ring', 'a'),
|
|
128
148
|
{
|
|
149
|
+
id: 'negativeCharge',
|
|
129
150
|
name: 'Negative charge',
|
|
130
151
|
description: 'Click an atom to lower its charge by one.',
|
|
131
152
|
keys: ['-'],
|
|
132
153
|
},
|
|
133
|
-
atom('Silicon', 'Si'),
|
|
134
|
-
atom('Phosphorus', 'P', 'p'),
|
|
135
|
-
atom('Sulfur', 'S', 's'),
|
|
136
|
-
atom('Chlorine', 'Cl', 'l'),
|
|
137
|
-
atom('Iodine', 'I', 'i'),
|
|
154
|
+
atom('silicon', 'Silicon', 'Si'),
|
|
155
|
+
atom('phosphorus', 'Phosphorus', 'P', 'p'),
|
|
156
|
+
atom('sulfur', 'Sulfur', 'S', 's'),
|
|
157
|
+
atom('chlorine', 'Chlorine', 'Cl', 'l'),
|
|
158
|
+
atom('iodine', 'Iodine', 'I', 'i'),
|
|
138
159
|
{
|
|
160
|
+
id: 'anyAtom',
|
|
139
161
|
name: 'Any atom',
|
|
140
162
|
description:
|
|
141
163
|
'Pick any element, isotope, valence or radical in a dialog, then click to place it or to change an atom. Alt-click an atom to edit its own properties.',
|
|
@@ -158,8 +180,9 @@ export function isEditorToolbarButtonAvailable(
|
|
|
158
180
|
return availability === 'reaction' && mode === 'reaction';
|
|
159
181
|
}
|
|
160
182
|
|
|
161
|
-
function ring(name: string, key: string): EditorToolbarButton {
|
|
183
|
+
function ring(id: string, name: string, key: string): EditorToolbarButton {
|
|
162
184
|
return {
|
|
185
|
+
id,
|
|
163
186
|
name,
|
|
164
187
|
description:
|
|
165
188
|
'Click empty space for a new ring, a bond to fuse one onto it, or an atom for a spiro ring.',
|
|
@@ -167,9 +190,14 @@ function ring(name: string, key: string): EditorToolbarButton {
|
|
|
167
190
|
};
|
|
168
191
|
}
|
|
169
192
|
|
|
170
|
-
function atom(
|
|
193
|
+
function atom(
|
|
194
|
+
id: string,
|
|
195
|
+
name: string,
|
|
196
|
+
symbol: string,
|
|
197
|
+
key?: string,
|
|
198
|
+
): EditorToolbarButton {
|
|
171
199
|
const description = `Click empty space for a new ${symbol} atom, or an atom to turn it into ${symbol}.`;
|
|
172
200
|
return key === undefined
|
|
173
|
-
? { name, description }
|
|
174
|
-
: { name, description, keys: [key] };
|
|
201
|
+
? { id, name, description }
|
|
202
|
+
: { id, name, description, keys: [key] };
|
|
175
203
|
}
|
|
@@ -2,6 +2,8 @@ import { Button, PopoverNext, Tooltip } from '@blueprintjs/core';
|
|
|
2
2
|
import type { CSSProperties, ReactElement, RefObject } from 'react';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
6
|
+
|
|
5
7
|
import { StructureEditorHelp } from './StructureEditorHelp.tsx';
|
|
6
8
|
import type { StructureEditorMode } from './editorChange.ts';
|
|
7
9
|
|
|
@@ -26,6 +28,7 @@ export interface EditorHelpButtonProps {
|
|
|
26
28
|
*/
|
|
27
29
|
export function EditorHelpButton(props: EditorHelpButtonProps): ReactElement {
|
|
28
30
|
const { containerRef, mode, fragment } = props;
|
|
31
|
+
const t = useChromeT();
|
|
29
32
|
const [isOpen, setIsOpen] = useState(false);
|
|
30
33
|
|
|
31
34
|
useEffect(() => {
|
|
@@ -48,12 +51,16 @@ export function EditorHelpButton(props: EditorHelpButtonProps): ReactElement {
|
|
|
48
51
|
placement="left-start"
|
|
49
52
|
content={<StructureEditorHelp mode={mode} fragment={fragment} />}
|
|
50
53
|
>
|
|
51
|
-
<Tooltip
|
|
54
|
+
<Tooltip
|
|
55
|
+
content={t('structure.mouseAndKeyboard')}
|
|
56
|
+
placement="left"
|
|
57
|
+
disabled={isOpen}
|
|
58
|
+
>
|
|
52
59
|
<Button
|
|
53
60
|
variant="minimal"
|
|
54
61
|
size="small"
|
|
55
62
|
icon="help"
|
|
56
|
-
aria-label={
|
|
63
|
+
aria-label={t('structure.mouseAndKeyboard')}
|
|
57
64
|
/>
|
|
58
65
|
</Tooltip>
|
|
59
66
|
</PopoverNext>
|
|
@@ -61,8 +68,6 @@ export function EditorHelpButton(props: EditorHelpButtonProps): ReactElement {
|
|
|
61
68
|
);
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
const LABEL = 'Mouse and keyboard';
|
|
65
|
-
|
|
66
71
|
const CORNER_STYLE: CSSProperties = {
|
|
67
72
|
position: 'absolute',
|
|
68
73
|
top: 4,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
} from 'react';
|
|
19
19
|
import type { CanvasEditorInputFormat } from 'react-ocl';
|
|
20
20
|
|
|
21
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
21
22
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
22
23
|
import { createPendingCall } from '../core/pendingCall.ts';
|
|
23
24
|
|
|
@@ -126,6 +127,7 @@ export function StructureEditor(props: StructureEditorProps): ReactElement {
|
|
|
126
127
|
style,
|
|
127
128
|
} = props;
|
|
128
129
|
|
|
130
|
+
const t = useChromeT();
|
|
129
131
|
const containerRef = useToolbarFloor({ minHeight, revision });
|
|
130
132
|
const handleChange = useDebounced(onChange, debounce, revision);
|
|
131
133
|
|
|
@@ -135,7 +137,11 @@ export function StructureEditor(props: StructureEditorProps): ReactElement {
|
|
|
135
137
|
className={className}
|
|
136
138
|
style={{ ...ROOT_STYLE, minHeight, ...style }}
|
|
137
139
|
>
|
|
138
|
-
<Suspense
|
|
140
|
+
<Suspense
|
|
141
|
+
fallback={
|
|
142
|
+
<div style={LOADING_STYLE}>{t('structure.loadingEditor')}</div>
|
|
143
|
+
}
|
|
144
|
+
>
|
|
139
145
|
<EditorCanvas
|
|
140
146
|
key={revision}
|
|
141
147
|
onChange={handleChange}
|
|
@@ -6,11 +6,15 @@
|
|
|
6
6
|
import { Classes } from '@blueprintjs/core';
|
|
7
7
|
import type { CSSProperties, ReactElement } from 'react';
|
|
8
8
|
|
|
9
|
+
import type { ChromeKey } from '../../i18n/core/chromeCatalog.ts';
|
|
10
|
+
import type { Translate } from '../../i18n/ui/useT.ts';
|
|
11
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
9
12
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
10
13
|
import type { EditorGesture, EditorGuideOptions } from '../core/editorGuide.ts';
|
|
11
14
|
import {
|
|
12
15
|
STRUCTURE_EDITOR_DOCS,
|
|
13
16
|
editorGuideSections,
|
|
17
|
+
editorInputWordId,
|
|
14
18
|
} from '../core/editorGuide.ts';
|
|
15
19
|
|
|
16
20
|
import { KeyCaps } from './KeyCaps.tsx';
|
|
@@ -29,39 +33,47 @@ export type StructureEditorHelpProps = EditorGuideOptions;
|
|
|
29
33
|
export function StructureEditorHelp(
|
|
30
34
|
props: StructureEditorHelpProps,
|
|
31
35
|
): ReactElement {
|
|
36
|
+
const t = useChromeT();
|
|
32
37
|
const sections = editorGuideSections(props);
|
|
33
38
|
|
|
34
39
|
return (
|
|
35
40
|
<div style={PANEL_STYLE} data-testid="structure-editor-help">
|
|
36
41
|
<p className={Classes.TEXT_MUTED} style={PARAGRAPH_STYLE}>
|
|
37
|
-
|
|
42
|
+
{t('structure.help.hoverToolbar')}
|
|
38
43
|
</p>
|
|
39
44
|
{/* One grid for every section, so all the actions start on one edge. */}
|
|
40
45
|
<div style={GRID_STYLE}>
|
|
41
46
|
{sections.map((section) => (
|
|
42
|
-
<section key={section.
|
|
43
|
-
<h4 style={HEADING_STYLE}>
|
|
47
|
+
<section key={section.id} style={ROW_STYLE}>
|
|
48
|
+
<h4 style={HEADING_STYLE}>
|
|
49
|
+
{t.or(`structure.guide.${section.id}.title`, section.title)}
|
|
50
|
+
</h4>
|
|
44
51
|
{section.gestures.map((gesture) => (
|
|
45
52
|
<div key={gestureKey(gesture)} style={ROW_STYLE}>
|
|
46
|
-
<GestureInput input={gesture.input} />
|
|
47
|
-
<span>
|
|
53
|
+
<GestureInput input={gesture.input} t={t} />
|
|
54
|
+
<span>
|
|
55
|
+
{t.or(
|
|
56
|
+
`structure.guide.${section.id}.${gesture.id}`,
|
|
57
|
+
gesture.action,
|
|
58
|
+
)}
|
|
59
|
+
</span>
|
|
48
60
|
</div>
|
|
49
61
|
))}
|
|
50
62
|
{section.note === undefined ? null : (
|
|
51
63
|
<p className={Classes.TEXT_MUTED} style={NOTE_STYLE}>
|
|
52
|
-
{section.note}
|
|
64
|
+
{t.or(`structure.guide.${section.id}.note`, section.note)}
|
|
53
65
|
</p>
|
|
54
66
|
)}
|
|
55
67
|
</section>
|
|
56
68
|
))}
|
|
57
69
|
</div>
|
|
58
70
|
<p style={PARAGRAPH_STYLE}>
|
|
59
|
-
|
|
71
|
+
{t('structure.help.learnMore')}{' '}
|
|
60
72
|
{STRUCTURE_EDITOR_DOCS.map((link, index) => (
|
|
61
73
|
<span key={link.url}>
|
|
62
74
|
{index === 0 ? null : ' · '}
|
|
63
75
|
<a href={link.url} target="_blank" rel="noopener noreferrer">
|
|
64
|
-
{link.title}
|
|
76
|
+
{t.or(`structure.docs.${link.id}`, link.title)}
|
|
65
77
|
</a>
|
|
66
78
|
</span>
|
|
67
79
|
))}
|
|
@@ -70,12 +82,16 @@ export function StructureEditorHelp(
|
|
|
70
82
|
);
|
|
71
83
|
}
|
|
72
84
|
|
|
73
|
-
function GestureInput(props: {
|
|
85
|
+
function GestureInput(props: {
|
|
86
|
+
input: EditorGesture['input'];
|
|
87
|
+
t: Translate<ChromeKey>;
|
|
88
|
+
}): ReactElement {
|
|
89
|
+
const { input, t } = props;
|
|
74
90
|
return (
|
|
75
91
|
<span style={INPUT_STYLE}>
|
|
76
|
-
{
|
|
92
|
+
{input.map((part) =>
|
|
77
93
|
typeof part === 'string' ? (
|
|
78
|
-
<span key={part}>{part}</span>
|
|
94
|
+
<span key={part}>{word(part, t)}</span>
|
|
79
95
|
) : (
|
|
80
96
|
<KeyCaps key={part.key} keys={[part.key]} />
|
|
81
97
|
),
|
|
@@ -84,6 +100,13 @@ function GestureInput(props: { input: EditorGesture['input'] }): ReactElement {
|
|
|
84
100
|
);
|
|
85
101
|
}
|
|
86
102
|
|
|
103
|
+
// A word between two key caps is one catalog entry, shared by every gesture
|
|
104
|
+
// that writes it; punctuation such as `…` is left exactly as it is.
|
|
105
|
+
function word(text: string, t: Translate<ChromeKey>): string {
|
|
106
|
+
const id = editorInputWordId(text);
|
|
107
|
+
return id === undefined ? text : t.or(`structure.input.${id}`, text);
|
|
108
|
+
}
|
|
109
|
+
|
|
87
110
|
function gestureKey(gesture: EditorGesture): string {
|
|
88
111
|
const input = gesture.input
|
|
89
112
|
.map((part) => (typeof part === 'string' ? part : part.key))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Classes, Tooltip } from '@blueprintjs/core';
|
|
2
2
|
import type { CSSProperties, ReactElement, RefObject } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
4
5
|
import type { EditorToolbarButton } from '../core/editorToolbar.ts';
|
|
5
6
|
import {
|
|
6
7
|
EDITOR_TOOLBAR_BUTTONS,
|
|
@@ -54,20 +55,23 @@ function ButtonTip(props: {
|
|
|
54
55
|
mode: StructureEditorMode;
|
|
55
56
|
}): ReactElement {
|
|
56
57
|
const { button, mode } = props;
|
|
58
|
+
const t = useChromeT();
|
|
57
59
|
const available = isEditorToolbarButtonAvailable(button, mode);
|
|
58
60
|
|
|
59
61
|
return (
|
|
60
62
|
<div style={TIP_STYLE} data-testid="structure-editor-tooltip">
|
|
61
63
|
<div style={HEAD_STYLE}>
|
|
62
|
-
<strong>{button.name}</strong>
|
|
64
|
+
<strong>{t.or(`structure.tool.${button.id}.name`, button.name)}</strong>
|
|
63
65
|
{button.keys === undefined ? null : <KeyCaps keys={button.keys} />}
|
|
64
66
|
</div>
|
|
65
|
-
<div>
|
|
67
|
+
<div>
|
|
68
|
+
{t.or(`structure.tool.${button.id}.description`, button.description)}
|
|
69
|
+
</div>
|
|
66
70
|
{available ? null : (
|
|
67
71
|
<div className={Classes.TEXT_MUTED}>
|
|
68
72
|
{button.availability === 'reaction'
|
|
69
|
-
? '
|
|
70
|
-
: '
|
|
73
|
+
? t('structure.tool.reactionOnly')
|
|
74
|
+
: t('structure.tool.unavailable')}
|
|
71
75
|
</div>
|
|
72
76
|
)}
|
|
73
77
|
</div>
|
package/src/ui.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './ecosystem/ui/index.ts';
|
|
|
14
14
|
export * from './error/ui/index.ts';
|
|
15
15
|
export * from './help/ui/index.ts';
|
|
16
16
|
export * from './hooks/ui/index.ts';
|
|
17
|
+
export * from './i18n/ui/index.ts';
|
|
17
18
|
export * from './language/ui/index.ts';
|
|
18
19
|
export * from './overlay/ui/index.ts';
|
|
19
20
|
export * from './parallel/ui/index.ts';
|