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
|
@@ -6,7 +6,7 @@ import { CopyButton } from '../../clipboard/ui/CopyButton.tsx';
|
|
|
6
6
|
import { downloadText } from '../../download/core/downloadText.ts';
|
|
7
7
|
import { sanitizeFileName } from '../../download/core/sanitizeFileName.ts';
|
|
8
8
|
import { formatInteger } from '../../format/core/numbers.ts';
|
|
9
|
-
import {
|
|
9
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
10
10
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
11
11
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
12
12
|
import type { DelimiterId } from '../core/delimiters.ts';
|
|
@@ -82,9 +82,10 @@ export function DelimitedTextPanel(
|
|
|
82
82
|
fileName = 'table',
|
|
83
83
|
defaultDelimiter = 'tab',
|
|
84
84
|
downloadable = true,
|
|
85
|
-
label
|
|
85
|
+
label,
|
|
86
86
|
height = 320,
|
|
87
87
|
} = props;
|
|
88
|
+
const t = useChromeT();
|
|
88
89
|
const [delimiterId, setDelimiterId] = useState<string>(defaultDelimiter);
|
|
89
90
|
|
|
90
91
|
const choice = delimiterChoice(delimiterId);
|
|
@@ -96,10 +97,16 @@ export function DelimitedTextPanel(
|
|
|
96
97
|
return (
|
|
97
98
|
<div className={joinClassNames('delimited-text', className)}>
|
|
98
99
|
<Callout intent="primary" compact icon="info-sign">
|
|
99
|
-
{description ??
|
|
100
|
+
{description ??
|
|
101
|
+
t(
|
|
102
|
+
rows.length === 1
|
|
103
|
+
? 'delimited.descriptionOne'
|
|
104
|
+
: 'delimited.descriptionMany',
|
|
105
|
+
{ count: formatInteger(rows.length) },
|
|
106
|
+
)}
|
|
100
107
|
</Callout>
|
|
101
108
|
<div style={CONTROLS_STYLE}>
|
|
102
|
-
<span style={LABEL_STYLE}>
|
|
109
|
+
<span style={LABEL_STYLE}>{t('delimited.separator')}</span>
|
|
103
110
|
<SegmentedControl
|
|
104
111
|
size="small"
|
|
105
112
|
options={DELIMITER_CHOICES.map((option) => ({
|
|
@@ -113,7 +120,7 @@ export function DelimitedTextPanel(
|
|
|
113
120
|
{downloadable ? (
|
|
114
121
|
<Button
|
|
115
122
|
icon="download"
|
|
116
|
-
text=
|
|
123
|
+
text={t('delimited.save')}
|
|
117
124
|
size="small"
|
|
118
125
|
onClick={() =>
|
|
119
126
|
downloadText(
|
|
@@ -124,13 +131,18 @@ export function DelimitedTextPanel(
|
|
|
124
131
|
}
|
|
125
132
|
/>
|
|
126
133
|
) : null}
|
|
127
|
-
<CopyButton
|
|
134
|
+
<CopyButton
|
|
135
|
+
content={text}
|
|
136
|
+
label={t('delimited.copy')}
|
|
137
|
+
icon="clipboard"
|
|
138
|
+
small
|
|
139
|
+
/>
|
|
128
140
|
</div>
|
|
129
141
|
<textarea
|
|
130
142
|
readOnly
|
|
131
143
|
value={text}
|
|
132
144
|
spellCheck={false}
|
|
133
|
-
aria-label={label}
|
|
145
|
+
aria-label={label ?? t('delimited.tableAsText')}
|
|
134
146
|
className={Classes.INPUT}
|
|
135
147
|
style={{ ...TEXT_STYLE, height }}
|
|
136
148
|
onFocus={(event) => event.currentTarget.select()}
|
|
@@ -139,11 +151,6 @@ export function DelimitedTextPanel(
|
|
|
139
151
|
);
|
|
140
152
|
}
|
|
141
153
|
|
|
142
|
-
function defaultDescription(rowCount: number): string {
|
|
143
|
-
const rows = `${formatInteger(rowCount)} ${pluralize(rowCount, 'row')}`;
|
|
144
|
-
return `${rows}, one per line. Copy them, then paste into a spreadsheet.`;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
154
|
const CONTROLS_STYLE = {
|
|
148
155
|
display: 'flex',
|
|
149
156
|
flexWrap: 'wrap',
|
|
@@ -3,6 +3,7 @@ import { PopoverNext } from '@blueprintjs/core';
|
|
|
3
3
|
import type { ReactElement } from 'react';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
|
|
6
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
6
7
|
import { OverlayIconButton } from '../../overlay/ui/OverlayIconButton.tsx';
|
|
7
8
|
import type { FigureFormat } from '../core/downloadFigure.ts';
|
|
8
9
|
import { downloadFigure } from '../core/downloadFigure.ts';
|
|
@@ -50,12 +51,12 @@ export interface FigureDownloadProps {
|
|
|
50
51
|
background?: string;
|
|
51
52
|
/**
|
|
52
53
|
* What the glyph is called, for the pointer and for a screen reader.
|
|
53
|
-
* @default '
|
|
54
|
+
* @default the chrome's own line, in the language of the page
|
|
54
55
|
*/
|
|
55
56
|
label?: string;
|
|
56
57
|
/**
|
|
57
58
|
* What the panel behind it is called.
|
|
58
|
-
* @default '
|
|
59
|
+
* @default the chrome's own line, in the language of the page
|
|
59
60
|
*/
|
|
60
61
|
title?: string;
|
|
61
62
|
/**
|
|
@@ -92,9 +93,10 @@ export interface FigureDownloadProps {
|
|
|
92
93
|
export function FigureDownload(props: FigureDownloadProps): ReactElement {
|
|
93
94
|
const { targetId, fileName, background, scales = FIGURE_SCALES } = props;
|
|
94
95
|
const { defaultFormat = 'png', defaultScale = DEFAULT_FIGURE_SCALE } = props;
|
|
95
|
-
const { label
|
|
96
|
+
const { label, title } = props;
|
|
96
97
|
const { icon = 'download', testId } = props;
|
|
97
98
|
|
|
99
|
+
const t = useChromeT();
|
|
98
100
|
const [open, setOpen] = useState(false);
|
|
99
101
|
const [format, setFormat] = useState<FigureFormat>(defaultFormat);
|
|
100
102
|
const [scale, setScale] = useState(defaultScale);
|
|
@@ -132,7 +134,7 @@ export function FigureDownload(props: FigureDownloadProps): ReactElement {
|
|
|
132
134
|
onInteraction={interact}
|
|
133
135
|
content={
|
|
134
136
|
<FigureDownloadPanel
|
|
135
|
-
title={title}
|
|
137
|
+
title={title ?? t('download.saveFigure')}
|
|
136
138
|
format={format}
|
|
137
139
|
scale={scale}
|
|
138
140
|
scales={scales}
|
|
@@ -147,7 +149,7 @@ export function FigureDownload(props: FigureDownloadProps): ReactElement {
|
|
|
147
149
|
>
|
|
148
150
|
<OverlayIconButton
|
|
149
151
|
icon={icon}
|
|
150
|
-
label={label}
|
|
152
|
+
label={label ?? t('download.saveThisFigure')}
|
|
151
153
|
value={format.toUpperCase()}
|
|
152
154
|
active={open}
|
|
153
155
|
testId={testId}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { ChromeKey } from '../../i18n/core/chromeCatalog.ts';
|
|
4
|
+
import type { Translate } from '../../i18n/ui/useT.ts';
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
4
6
|
import { OverlayAction } from '../../overlay/ui/OverlayAction.tsx';
|
|
5
7
|
import { OverlayPanel } from '../../overlay/ui/OverlayPanel.tsx';
|
|
6
8
|
import type { OverlayOption } from '../../overlay/ui/OverlayRow.tsx';
|
|
@@ -66,16 +68,17 @@ export function FigureDownloadPanel(
|
|
|
66
68
|
): ReactElement {
|
|
67
69
|
const { title, format, scale, scales, size, failure, saving } = props;
|
|
68
70
|
const { onFormatChange, onScaleChange, onSave, rasterSvg = false } = props;
|
|
71
|
+
const t = useChromeT();
|
|
69
72
|
|
|
70
73
|
const vector = format === 'svg' && !rasterSvg;
|
|
71
74
|
|
|
72
75
|
return (
|
|
73
76
|
<OverlayPanel
|
|
74
77
|
title={title}
|
|
75
|
-
hint={hintOf(format, size, scale, failure, rasterSvg)}
|
|
78
|
+
hint={hintOf(format, size, scale, failure, rasterSvg, t)}
|
|
76
79
|
actions={
|
|
77
80
|
<OverlayAction
|
|
78
|
-
text=
|
|
81
|
+
text={t('download.save')}
|
|
79
82
|
icon="download"
|
|
80
83
|
intent="primary"
|
|
81
84
|
disabled={saving || size === null}
|
|
@@ -84,15 +87,25 @@ export function FigureDownloadPanel(
|
|
|
84
87
|
}
|
|
85
88
|
>
|
|
86
89
|
<OverlaySegmented<FigureFormat>
|
|
87
|
-
label=
|
|
88
|
-
help={
|
|
90
|
+
label={t('download.format')}
|
|
91
|
+
help={{
|
|
92
|
+
title: t('download.format'),
|
|
93
|
+
body: t('download.formatHelp'),
|
|
94
|
+
}}
|
|
89
95
|
value={format}
|
|
90
96
|
options={FORMAT_CHOICES}
|
|
91
97
|
onChange={onFormatChange}
|
|
92
98
|
/>
|
|
93
99
|
<OverlaySegmented
|
|
94
|
-
label=
|
|
95
|
-
help={
|
|
100
|
+
label={t('download.resolution')}
|
|
101
|
+
help={{
|
|
102
|
+
title: t('download.resolution'),
|
|
103
|
+
body: t('download.resolutionHelp'),
|
|
104
|
+
example: {
|
|
105
|
+
code: '2×',
|
|
106
|
+
note: t('download.resolutionExample'),
|
|
107
|
+
},
|
|
108
|
+
}}
|
|
96
109
|
value={String(scale)}
|
|
97
110
|
options={scaleChoices(scales, size)}
|
|
98
111
|
disabled={vector}
|
|
@@ -108,20 +121,6 @@ const FORMAT_CHOICES: ReadonlyArray<OverlayOption<FigureFormat>> = [
|
|
|
108
121
|
{ value: 'svg', label: 'SVG' },
|
|
109
122
|
];
|
|
110
123
|
|
|
111
|
-
const FORMAT_HELP: HelpContent = {
|
|
112
|
-
title: 'Format',
|
|
113
|
-
body: 'A PNG is a picture of the figure, which is what a slide, a chat window or an issue accepts. An SVG is the figure itself: every line stays sharp however far it is enlarged, and it can still be edited afterwards.',
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const RESOLUTION_HELP: HelpContent = {
|
|
117
|
-
title: 'Resolution',
|
|
118
|
-
body: 'How many pixels are painted for each pixel of the figure on screen. Two is right for a slide, three or four for print. An SVG carries no resolution of its own, so it is saved sharp at every size.',
|
|
119
|
-
example: {
|
|
120
|
-
code: '2×',
|
|
121
|
-
note: 'A figure 640 pixels wide on screen is saved 1280 pixels wide.',
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
|
|
125
124
|
/**
|
|
126
125
|
* The multiples offered, each saying what it would actually produce.
|
|
127
126
|
*
|
|
@@ -155,6 +154,8 @@ function scaleChoices(
|
|
|
155
154
|
* @param scale - The multiple it is painted at.
|
|
156
155
|
* @param failure - What went wrong last time, if anything.
|
|
157
156
|
* @param rasterSvg - Whether the SVG embeds a rendered picture.
|
|
157
|
+
* @param t - The chrome's formatter, so the sentence is in the language of
|
|
158
|
+
* the page.
|
|
158
159
|
* @returns The sentence.
|
|
159
160
|
*/
|
|
160
161
|
function hintOf(
|
|
@@ -163,14 +164,19 @@ function hintOf(
|
|
|
163
164
|
scale: number,
|
|
164
165
|
failure: string | null,
|
|
165
166
|
rasterSvg: boolean,
|
|
167
|
+
t: Translate<ChromeKey>,
|
|
166
168
|
): string {
|
|
167
169
|
if (failure !== null) return failure;
|
|
168
|
-
if (size === null) return '
|
|
170
|
+
if (size === null) return t('download.noFigure');
|
|
169
171
|
if (format === 'svg' && rasterSvg) {
|
|
170
|
-
return
|
|
172
|
+
return t('download.hintRasterSvg', {
|
|
173
|
+
pixels: formatFigurePixels(figurePixels(size, scale)),
|
|
174
|
+
});
|
|
171
175
|
}
|
|
172
176
|
if (format === 'svg') {
|
|
173
|
-
return
|
|
177
|
+
return t('download.hintSvg', { pixels: formatFigurePixels(size) });
|
|
174
178
|
}
|
|
175
|
-
return
|
|
179
|
+
return t('download.hintPng', {
|
|
180
|
+
pixels: formatFigurePixels(figurePixels(size, scale)),
|
|
181
|
+
});
|
|
176
182
|
}
|
|
@@ -120,8 +120,10 @@ export const ECOSYSTEM_SITES: readonly EcosystemSite[] = [
|
|
|
120
120
|
tagline: 'Turn a batch of NMR spectra into a map of your samples.',
|
|
121
121
|
group: 'spectra',
|
|
122
122
|
brand: '#4d7c0f',
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
// A yellow, because it is what stays apart from both this green and the
|
|
124
|
+
// white for a red–green colour-blind visitor; any red merges with the plate.
|
|
125
|
+
brandAlt: '#a16207',
|
|
126
|
+
mark: { plate: '#4d7c0f', accent: '#fde047' },
|
|
125
127
|
},
|
|
126
128
|
{
|
|
127
129
|
id: 'derepflow',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
3
4
|
import type { HeaderButtonProps } from '../../shared/ui/MenuButton.tsx';
|
|
4
5
|
import { MenuButton } from '../../shared/ui/MenuButton.tsx';
|
|
5
6
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
@@ -17,7 +18,7 @@ export interface EcosystemButtonProps extends HeaderButtonProps {
|
|
|
17
18
|
/**
|
|
18
19
|
* Text of the button. In a compact bar it is not written, but it stays what
|
|
19
20
|
* the pointer and a screen reader are told.
|
|
20
|
-
* @default '
|
|
21
|
+
* @default the chrome's own word for it, in the language of the page
|
|
21
22
|
*/
|
|
22
23
|
label?: string;
|
|
23
24
|
/**
|
|
@@ -34,14 +35,15 @@ export interface EcosystemButtonProps extends HeaderButtonProps {
|
|
|
34
35
|
* @returns The button and its menu.
|
|
35
36
|
*/
|
|
36
37
|
export function EcosystemButton(props: EcosystemButtonProps): ReactElement {
|
|
37
|
-
const { currentSiteId, label
|
|
38
|
+
const { currentSiteId, label, className, ...rest } = props;
|
|
39
|
+
const t = useChromeT();
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
42
|
<MenuButton
|
|
41
43
|
{...rest}
|
|
42
44
|
className={joinClassNames('ecosystem-button', className)}
|
|
43
45
|
icon="grid-view"
|
|
44
|
-
label={label}
|
|
46
|
+
label={label ?? t('ecosystem.tools')}
|
|
45
47
|
menu={<EcosystemMenu currentSiteId={currentSiteId} />}
|
|
46
48
|
/>
|
|
47
49
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
3
4
|
import { useSiteLanguage } from '../../language/ui/siteLanguageContext.ts';
|
|
4
5
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
5
6
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
@@ -60,7 +61,7 @@ export interface EcosystemLinksProps {
|
|
|
60
61
|
currentSiteId?: SiteId;
|
|
61
62
|
/**
|
|
62
63
|
* What introduces the section.
|
|
63
|
-
* @default '
|
|
64
|
+
* @default the chrome's own line, in the language of the page
|
|
64
65
|
*/
|
|
65
66
|
heading?: string;
|
|
66
67
|
/**
|
|
@@ -89,27 +90,26 @@ export interface EcosystemLinksProps {
|
|
|
89
90
|
*/
|
|
90
91
|
export function EcosystemLinks(props: EcosystemLinksProps): ReactElement {
|
|
91
92
|
const language = useSiteLanguage();
|
|
92
|
-
const {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
heading = 'Our other tools',
|
|
96
|
-
layout = 'grid',
|
|
97
|
-
} = props;
|
|
93
|
+
const { className, currentSiteId, heading, layout = 'grid' } = props;
|
|
94
|
+
const t = useChromeT();
|
|
95
|
+
const title = heading ?? t('ecosystem.otherTools');
|
|
98
96
|
|
|
99
97
|
return (
|
|
100
98
|
<nav
|
|
101
99
|
className={joinClassNames('ecosystem-links', className)}
|
|
102
100
|
style={SECTION_STYLE}
|
|
103
|
-
aria-label={
|
|
101
|
+
aria-label={title}
|
|
104
102
|
>
|
|
105
|
-
<h2 style={ECOSYSTEM_HEADING_STYLE}>{
|
|
103
|
+
<h2 style={ECOSYSTEM_HEADING_STYLE}>{title}</h2>
|
|
106
104
|
{layout === 'grid' ? (
|
|
107
105
|
<SiteGroupGrid currentSiteId={currentSiteId} />
|
|
108
106
|
) : (
|
|
109
107
|
<div style={ROWS_STYLE}>
|
|
110
108
|
{groupedSites().map(({ group, sites }) => (
|
|
111
109
|
<div key={group.id} style={ROW_STYLE}>
|
|
112
|
-
<span style={ROW_LABEL_STYLE}>
|
|
110
|
+
<span style={ROW_LABEL_STYLE}>
|
|
111
|
+
{t.or(`ecosystem.group.${group.id}.label`, group.label)}
|
|
112
|
+
</span>
|
|
113
113
|
{sites.map((site) =>
|
|
114
114
|
site.id === currentSiteId ? (
|
|
115
115
|
<span key={site.id} style={CURRENT_STYLE}>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
3
4
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
4
5
|
import type { SiteId } from '../core/sites.ts';
|
|
5
6
|
|
|
@@ -44,13 +45,14 @@ export interface EcosystemMenuProps {
|
|
|
44
45
|
*/
|
|
45
46
|
export function EcosystemMenu(props: EcosystemMenuProps): ReactElement {
|
|
46
47
|
const { className, currentSiteId } = props;
|
|
48
|
+
const t = useChromeT();
|
|
47
49
|
|
|
48
50
|
return (
|
|
49
51
|
<div
|
|
50
52
|
className={joinClassNames('ecosystem-menu', className)}
|
|
51
53
|
style={PANEL_STYLE}
|
|
52
54
|
>
|
|
53
|
-
<div style={ECOSYSTEM_HEADING_STYLE}>
|
|
55
|
+
<div style={ECOSYSTEM_HEADING_STYLE}>{t('ecosystem.menuHeading')}</div>
|
|
54
56
|
<SiteGroupGrid currentSiteId={currentSiteId} lit newTab />
|
|
55
57
|
</div>
|
|
56
58
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { useId } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
4
5
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
5
6
|
import type { SiteGroup } from '../core/groups.ts';
|
|
6
7
|
|
|
@@ -50,14 +51,17 @@ interface SiteGroupSectionProps {
|
|
|
50
51
|
*/
|
|
51
52
|
export function SiteGroupSection(props: SiteGroupSectionProps): ReactElement {
|
|
52
53
|
const { group, children } = props;
|
|
54
|
+
const t = useChromeT();
|
|
53
55
|
const headingId = `${useId()}ecosystem-${group.id}`;
|
|
54
56
|
|
|
55
57
|
return (
|
|
56
58
|
<section style={SECTION_STYLE} aria-labelledby={headingId}>
|
|
57
59
|
<h3 id={headingId} style={LABEL_STYLE}>
|
|
58
|
-
{group.label}
|
|
60
|
+
{t.or(`ecosystem.group.${group.id}.label`, group.label)}
|
|
59
61
|
</h3>
|
|
60
|
-
<p style={BLURB_STYLE}>
|
|
62
|
+
<p style={BLURB_STYLE}>
|
|
63
|
+
{t.or(`ecosystem.group.${group.id}.blurb`, group.blurb)}
|
|
64
|
+
</p>
|
|
61
65
|
<div style={BODY_STYLE}>{children}</div>
|
|
62
66
|
</section>
|
|
63
67
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
3
4
|
import { useSiteLanguage } from '../../language/ui/siteLanguageContext.ts';
|
|
4
5
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
5
6
|
import { siteNameColors } from '../core/nameColors.ts';
|
|
@@ -95,6 +96,7 @@ export function SiteTile(props: SiteTileProps): ReactElement {
|
|
|
95
96
|
onHover,
|
|
96
97
|
newTab = false,
|
|
97
98
|
} = props;
|
|
99
|
+
const t = useChromeT();
|
|
98
100
|
const lit = isHovered && !isCurrent;
|
|
99
101
|
const colors = siteNameColors(site);
|
|
100
102
|
|
|
@@ -119,11 +121,13 @@ export function SiteTile(props: SiteTileProps): ReactElement {
|
|
|
119
121
|
</span>
|
|
120
122
|
{isCurrent ? (
|
|
121
123
|
<span style={{ ...HERE_STYLE, color: site.brandAlt }}>
|
|
122
|
-
|
|
124
|
+
{t('ecosystem.youAreHere')}
|
|
123
125
|
</span>
|
|
124
126
|
) : null}
|
|
125
127
|
</div>
|
|
126
|
-
<div style={TAGLINE_STYLE}>
|
|
128
|
+
<div style={TAGLINE_STYLE}>
|
|
129
|
+
{t.or(`site.${site.id}.tagline`, site.tagline)}
|
|
130
|
+
</div>
|
|
127
131
|
</div>
|
|
128
132
|
</>
|
|
129
133
|
);
|
|
@@ -179,30 +179,24 @@ export const GLYPHS: Record<SiteId, (alt: string) => ReactNode> = {
|
|
|
179
179
|
/>
|
|
180
180
|
</g>
|
|
181
181
|
),
|
|
182
|
-
//
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
182
|
+
// A score plot without its axes: four samples, and the three the analysis
|
|
183
|
+
// sets apart carrying the answering colour — the map the tool exists to
|
|
184
|
+
// draw. The spacing is irregular so the groups read as measured samples
|
|
185
|
+
// rather than as a pattern, and the two groups sit six units apart, against
|
|
186
|
+
// under one inside either.
|
|
186
187
|
metabo: (accent) => (
|
|
187
188
|
<>
|
|
188
|
-
<
|
|
189
|
-
cx="
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
cx="20.5"
|
|
200
|
-
cy="20"
|
|
201
|
-
rx="5.4"
|
|
202
|
-
ry="8.6"
|
|
203
|
-
fill={accent}
|
|
204
|
-
transform="rotate(32 20.5 20)"
|
|
205
|
-
/>
|
|
189
|
+
<g fill="#ffffff">
|
|
190
|
+
<circle cx="6.6" cy="20.4" r="2.6" />
|
|
191
|
+
<circle cx="12.4" cy="18.3" r="2.6" />
|
|
192
|
+
<circle cx="9.3" cy="25.8" r="2.6" />
|
|
193
|
+
<circle cx="14.9" cy="24.1" r="2.6" />
|
|
194
|
+
</g>
|
|
195
|
+
<g fill={accent}>
|
|
196
|
+
<circle cx="20.1" cy="7.2" r="2.6" />
|
|
197
|
+
<circle cx="25.8" cy="8.6" r="2.6" />
|
|
198
|
+
<circle cx="22.2" cy="13.2" r="2.6" />
|
|
199
|
+
</g>
|
|
206
200
|
</>
|
|
207
201
|
),
|
|
208
202
|
// One formula branching into every structure it can be.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Button, NonIdealState } from '@blueprintjs/core';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
|
+
|
|
4
6
|
/** What the page shows in place of the part that failed. */
|
|
5
7
|
export interface ErrorFallbackProps {
|
|
6
8
|
/** What was thrown, whose message is what the visitor is told. */
|
|
@@ -13,12 +15,12 @@ export interface ErrorFallbackProps {
|
|
|
13
15
|
onRetry?: () => void;
|
|
14
16
|
/**
|
|
15
17
|
* First line, above the message.
|
|
16
|
-
* @default '
|
|
18
|
+
* @default the chrome's own line, in the language of the page
|
|
17
19
|
*/
|
|
18
20
|
title?: string;
|
|
19
21
|
/**
|
|
20
22
|
* Text of the retry button.
|
|
21
|
-
* @default '
|
|
23
|
+
* @default the chrome's own words for it, in the language of the page
|
|
22
24
|
*/
|
|
23
25
|
retryLabel?: string;
|
|
24
26
|
/**
|
|
@@ -38,27 +40,26 @@ export interface ErrorFallbackProps {
|
|
|
38
40
|
* @returns The non-ideal state.
|
|
39
41
|
*/
|
|
40
42
|
export function ErrorFallback(props: ErrorFallbackProps): ReactElement {
|
|
41
|
-
const {
|
|
42
|
-
|
|
43
|
-
onRetry,
|
|
44
|
-
title = 'Something went wrong',
|
|
45
|
-
retryLabel = 'Try again',
|
|
46
|
-
className,
|
|
47
|
-
} = props;
|
|
43
|
+
const { error, onRetry, title, retryLabel, className } = props;
|
|
44
|
+
const t = useChromeT();
|
|
48
45
|
|
|
49
46
|
return (
|
|
50
47
|
<NonIdealState
|
|
51
48
|
className={className}
|
|
52
49
|
icon="error"
|
|
53
|
-
title={title}
|
|
50
|
+
title={title ?? t('error.title')}
|
|
54
51
|
description={
|
|
55
52
|
<span className="error-fallback__message">
|
|
56
|
-
{error.message === '' ? '
|
|
53
|
+
{error.message === '' ? t('error.noMessage') : error.message}
|
|
57
54
|
</span>
|
|
58
55
|
}
|
|
59
56
|
action={
|
|
60
57
|
onRetry === undefined ? undefined : (
|
|
61
|
-
<Button
|
|
58
|
+
<Button
|
|
59
|
+
icon="refresh"
|
|
60
|
+
text={retryLabel ?? t('error.tryAgain')}
|
|
61
|
+
onClick={onRetry}
|
|
62
|
+
/>
|
|
62
63
|
)
|
|
63
64
|
}
|
|
64
65
|
/>
|
package/src/help/ui/HelpBody.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
3
4
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
4
5
|
|
|
5
6
|
/** A worked example under a piece of help: the construct, and what it does. */
|
|
@@ -72,6 +73,7 @@ export interface HelpBodyProps {
|
|
|
72
73
|
*/
|
|
73
74
|
export function HelpBody(props: HelpBodyProps): ReactElement {
|
|
74
75
|
const { className, content, width = DEFAULT_WIDTH } = props;
|
|
76
|
+
const t = useChromeT();
|
|
75
77
|
const { title, body, example, link } = content;
|
|
76
78
|
|
|
77
79
|
return (
|
|
@@ -86,7 +88,7 @@ export function HelpBody(props: HelpBodyProps): ReactElement {
|
|
|
86
88
|
<code style={CODE_STYLE}>{item.code}</code>
|
|
87
89
|
{item.input === undefined ? null : (
|
|
88
90
|
<div style={INPUT_STYLE}>
|
|
89
|
-
on <code style={CODE_STYLE}>{item.input}</code>
|
|
91
|
+
{t('help.on')} <code style={CODE_STYLE}>{item.input}</code>
|
|
90
92
|
</div>
|
|
91
93
|
)}
|
|
92
94
|
{item.note === undefined ? null : (
|
|
@@ -101,7 +103,7 @@ export function HelpBody(props: HelpBodyProps): ReactElement {
|
|
|
101
103
|
rel="noopener noreferrer"
|
|
102
104
|
style={LINK_STYLE}
|
|
103
105
|
>
|
|
104
|
-
|
|
106
|
+
{t('help.learnMore')}
|
|
105
107
|
</a>
|
|
106
108
|
)}
|
|
107
109
|
</div>
|
package/src/help/ui/HelpIcon.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import type { IconName } from '@blueprintjs/core';
|
|
|
2
2
|
import { Icon } from '@blueprintjs/core';
|
|
3
3
|
import type { ReactElement } from 'react';
|
|
4
4
|
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
6
7
|
|
|
7
8
|
import type { HelpContent } from './HelpBody.tsx';
|
|
@@ -17,7 +18,8 @@ export interface HelpIconProps {
|
|
|
17
18
|
content: HelpContent;
|
|
18
19
|
/**
|
|
19
20
|
* What a screen reader calls the glyph.
|
|
20
|
-
* @default the help's title, or
|
|
21
|
+
* @default the help's title, or the chrome's own word for help when it has
|
|
22
|
+
* none
|
|
21
23
|
*/
|
|
22
24
|
label?: string;
|
|
23
25
|
/**
|
|
@@ -54,12 +56,13 @@ export interface HelpIconProps {
|
|
|
54
56
|
export function HelpIcon(props: HelpIconProps): ReactElement {
|
|
55
57
|
const {
|
|
56
58
|
content,
|
|
57
|
-
label
|
|
59
|
+
label,
|
|
58
60
|
icon = 'help',
|
|
59
61
|
size = 13,
|
|
60
62
|
placement = 'right',
|
|
61
63
|
className,
|
|
62
64
|
} = props;
|
|
65
|
+
const t = useChromeT();
|
|
63
66
|
|
|
64
67
|
return (
|
|
65
68
|
<HelpTooltip content={content} placement={placement}>
|
|
@@ -67,7 +70,7 @@ export function HelpIcon(props: HelpIconProps): ReactElement {
|
|
|
67
70
|
icon={icon}
|
|
68
71
|
size={size}
|
|
69
72
|
tabIndex={0}
|
|
70
|
-
aria-label={label}
|
|
73
|
+
aria-label={label ?? helpName(content, t)}
|
|
71
74
|
className={joinClassNames('help-icon', className)}
|
|
72
75
|
/>
|
|
73
76
|
</HelpTooltip>
|
|
@@ -2,6 +2,8 @@ import type { IconName } from '@blueprintjs/core';
|
|
|
2
2
|
import { Button } from '@blueprintjs/core';
|
|
3
3
|
import type { ReactElement } from 'react';
|
|
4
4
|
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
6
|
+
|
|
5
7
|
import type { HelpContent } from './HelpBody.tsx';
|
|
6
8
|
import { HelpTooltip } from './HelpTooltip.tsx';
|
|
7
9
|
import { helpName } from './helpName.ts';
|
|
@@ -56,6 +58,7 @@ export function HelpToolbarButton(props: HelpToolbarButtonProps): ReactElement {
|
|
|
56
58
|
small = false,
|
|
57
59
|
className,
|
|
58
60
|
} = props;
|
|
61
|
+
const t = useChromeT();
|
|
59
62
|
|
|
60
63
|
return (
|
|
61
64
|
<HelpTooltip content={content} placement="bottom">
|
|
@@ -64,7 +67,7 @@ export function HelpToolbarButton(props: HelpToolbarButtonProps): ReactElement {
|
|
|
64
67
|
size={small ? 'small' : 'medium'}
|
|
65
68
|
icon={icon}
|
|
66
69
|
text={label}
|
|
67
|
-
aria-label={label ?? helpName(content)}
|
|
70
|
+
aria-label={label ?? helpName(content, t)}
|
|
68
71
|
className={className}
|
|
69
72
|
onClick={onClick}
|
|
70
73
|
/>
|
package/src/help/ui/helpName.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
import type { ChromeKey } from '../../i18n/core/chromeCatalog.ts';
|
|
2
|
+
import type { Translate } from '../../i18n/ui/useT.ts';
|
|
3
|
+
|
|
1
4
|
import type { HelpContent } from './HelpBody.tsx';
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
* The name a glyph or a button carries for a screen reader: the help's own
|
|
5
8
|
* title, or a plain "Help" when the help has none.
|
|
6
9
|
* @param content - The help being named.
|
|
10
|
+
* @param t - The chrome's formatter, so the plain name is in the language of
|
|
11
|
+
* the page.
|
|
7
12
|
* @returns The accessible name.
|
|
8
13
|
*/
|
|
9
|
-
export function helpName(
|
|
10
|
-
|
|
14
|
+
export function helpName(
|
|
15
|
+
content: HelpContent,
|
|
16
|
+
t: Translate<ChromeKey>,
|
|
17
|
+
): string {
|
|
18
|
+
return content.title ?? t('help.label');
|
|
11
19
|
}
|