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
|
@@ -3,6 +3,7 @@ import { useRef } from 'react';
|
|
|
3
3
|
import { Button } from 'react-science/ui';
|
|
4
4
|
|
|
5
5
|
import { useContainerSize } from '../../hooks/ui/useContainerSize.ts';
|
|
6
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
6
7
|
import type { OverlayMetrics } from '../core/overlayMetrics.ts';
|
|
7
8
|
import { placeOverlayCard } from '../core/placeOverlayCard.ts';
|
|
8
9
|
|
|
@@ -84,6 +85,7 @@ export function OverlayReadout(props: OverlayReadoutProps): ReactElement {
|
|
|
84
85
|
onUnpin,
|
|
85
86
|
testId,
|
|
86
87
|
} = props;
|
|
88
|
+
const t = useChromeT();
|
|
87
89
|
const { metrics } = useOverlaySurface();
|
|
88
90
|
const card = useRef<HTMLDivElement>(null);
|
|
89
91
|
const measured = useContainerSize(card);
|
|
@@ -121,7 +123,7 @@ export function OverlayReadout(props: OverlayReadoutProps): ReactElement {
|
|
|
121
123
|
variant="minimal"
|
|
122
124
|
size="small"
|
|
123
125
|
icon="cross"
|
|
124
|
-
aria-label=
|
|
126
|
+
aria-label={t('overlay.dismiss')}
|
|
125
127
|
onClick={onUnpin}
|
|
126
128
|
/>
|
|
127
129
|
) : null}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Button } from '@blueprintjs/core';
|
|
2
2
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
|
+
|
|
4
6
|
/** What {@link ExerciseActions} needs: its handlers, and the labels of its buttons. */
|
|
5
7
|
export interface ExerciseActionsProps {
|
|
6
8
|
/**
|
|
@@ -11,7 +13,7 @@ export interface ExerciseActionsProps {
|
|
|
11
13
|
onCheck?: () => void;
|
|
12
14
|
/**
|
|
13
15
|
* Text of the Check button.
|
|
14
|
-
* @default '
|
|
16
|
+
* @default the chrome's own words for it, in the language of the page
|
|
15
17
|
*/
|
|
16
18
|
checkLabel?: string;
|
|
17
19
|
/**
|
|
@@ -77,7 +79,7 @@ export interface ExerciseActionsProps {
|
|
|
77
79
|
export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
|
|
78
80
|
const {
|
|
79
81
|
onCheck,
|
|
80
|
-
checkLabel
|
|
82
|
+
checkLabel,
|
|
81
83
|
checkDisabled = false,
|
|
82
84
|
onRevealHint,
|
|
83
85
|
hintsRevealed = 0,
|
|
@@ -88,6 +90,7 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
|
|
|
88
90
|
children,
|
|
89
91
|
className,
|
|
90
92
|
} = props;
|
|
93
|
+
const t = useChromeT();
|
|
91
94
|
|
|
92
95
|
return (
|
|
93
96
|
<div className={className} style={ROW_STYLE}>
|
|
@@ -95,7 +98,7 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
|
|
|
95
98
|
<Button
|
|
96
99
|
intent="primary"
|
|
97
100
|
icon="tick"
|
|
98
|
-
text={checkLabel}
|
|
101
|
+
text={checkLabel ?? t('pedagogy.check')}
|
|
99
102
|
disabled={checkDisabled}
|
|
100
103
|
onClick={onCheck}
|
|
101
104
|
/>
|
|
@@ -103,7 +106,10 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
|
|
|
103
106
|
{onRevealHint !== undefined && (
|
|
104
107
|
<Button
|
|
105
108
|
icon="lightbulb"
|
|
106
|
-
text={
|
|
109
|
+
text={t('pedagogy.revealHintCount', {
|
|
110
|
+
revealed: Math.min(hintsRevealed, hintCount),
|
|
111
|
+
total: hintCount,
|
|
112
|
+
})}
|
|
107
113
|
disabled={hintsRevealed >= hintCount}
|
|
108
114
|
onClick={onRevealHint}
|
|
109
115
|
/>
|
|
@@ -111,12 +117,16 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
|
|
|
111
117
|
{onToggleSolution !== undefined && (
|
|
112
118
|
<Button
|
|
113
119
|
icon={showSolution ? 'eye-off' : 'key'}
|
|
114
|
-
text={
|
|
120
|
+
text={
|
|
121
|
+
showSolution
|
|
122
|
+
? t('pedagogy.hideSolution')
|
|
123
|
+
: t('pedagogy.revealSolution')
|
|
124
|
+
}
|
|
115
125
|
onClick={onToggleSolution}
|
|
116
126
|
/>
|
|
117
127
|
)}
|
|
118
128
|
{onReset !== undefined && (
|
|
119
|
-
<Button icon="reset" text=
|
|
129
|
+
<Button icon="reset" text={t('pedagogy.reset')} onClick={onReset} />
|
|
120
130
|
)}
|
|
121
131
|
{children}
|
|
122
132
|
</div>
|
|
@@ -2,6 +2,7 @@ import { Alert, Button, ProgressBar } from '@blueprintjs/core';
|
|
|
2
2
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
6
7
|
import type { ProgressSummary } from '../core/progress.ts';
|
|
7
8
|
|
|
@@ -17,7 +18,7 @@ export interface ExerciseProgressHeaderProps {
|
|
|
17
18
|
onClearAll?: () => void;
|
|
18
19
|
/**
|
|
19
20
|
* Text of the button that wipes the work.
|
|
20
|
-
* @default '
|
|
21
|
+
* @default the chrome's own words for it, in the language of the page
|
|
21
22
|
*/
|
|
22
23
|
clearLabel?: string;
|
|
23
24
|
/**
|
|
@@ -52,11 +53,12 @@ export function ExerciseProgressHeader(
|
|
|
52
53
|
const {
|
|
53
54
|
summary,
|
|
54
55
|
onClearAll,
|
|
55
|
-
clearLabel
|
|
56
|
-
clearWarning
|
|
56
|
+
clearLabel,
|
|
57
|
+
clearWarning,
|
|
57
58
|
clearDisabled = false,
|
|
58
59
|
className,
|
|
59
60
|
} = props;
|
|
61
|
+
const t = useChromeT();
|
|
60
62
|
const [confirming, setConfirming] = useState(false);
|
|
61
63
|
const complete = summary.total > 0 && summary.solved === summary.total;
|
|
62
64
|
|
|
@@ -64,7 +66,10 @@ export function ExerciseProgressHeader(
|
|
|
64
66
|
<div className={className} style={ROOT_STYLE}>
|
|
65
67
|
<div style={ROW_STYLE}>
|
|
66
68
|
<span style={COUNT_STYLE}>
|
|
67
|
-
{
|
|
69
|
+
{t('pedagogy.solvedCount', {
|
|
70
|
+
solved: summary.solved,
|
|
71
|
+
total: summary.total,
|
|
72
|
+
})}
|
|
68
73
|
</span>
|
|
69
74
|
<span
|
|
70
75
|
style={PERCENT_STYLE}
|
|
@@ -75,7 +80,7 @@ export function ExerciseProgressHeader(
|
|
|
75
80
|
variant="minimal"
|
|
76
81
|
intent="danger"
|
|
77
82
|
icon="trash"
|
|
78
|
-
text={clearLabel}
|
|
83
|
+
text={clearLabel ?? t('pedagogy.clearAll')}
|
|
79
84
|
disabled={clearDisabled}
|
|
80
85
|
onClick={() => {
|
|
81
86
|
setConfirming(true);
|
|
@@ -96,8 +101,8 @@ export function ExerciseProgressHeader(
|
|
|
96
101
|
isOpen={confirming}
|
|
97
102
|
intent="danger"
|
|
98
103
|
icon="trash"
|
|
99
|
-
cancelButtonText=
|
|
100
|
-
confirmButtonText=
|
|
104
|
+
cancelButtonText={t('pedagogy.keepAnswers')}
|
|
105
|
+
confirmButtonText={t('pedagogy.clearEverything')}
|
|
101
106
|
onCancel={() => {
|
|
102
107
|
setConfirming(false);
|
|
103
108
|
}}
|
|
@@ -106,16 +111,13 @@ export function ExerciseProgressHeader(
|
|
|
106
111
|
setConfirming(false);
|
|
107
112
|
}}
|
|
108
113
|
>
|
|
109
|
-
{clearWarning}
|
|
114
|
+
{clearWarning ?? t('pedagogy.clearWarning')}
|
|
110
115
|
</Alert>
|
|
111
116
|
)}
|
|
112
117
|
</div>
|
|
113
118
|
);
|
|
114
119
|
}
|
|
115
120
|
|
|
116
|
-
const DEFAULT_WARNING =
|
|
117
|
-
'This forgets every answer, every revealed hint and every solved exercise, on this browser. There is no undo.';
|
|
118
|
-
|
|
119
121
|
const ROOT_STYLE: CSSProperties = {
|
|
120
122
|
display: 'flex',
|
|
121
123
|
flexDirection: 'column',
|
|
@@ -2,6 +2,7 @@ import { InputGroup } from '@blueprintjs/core';
|
|
|
2
2
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
3
3
|
import { useMemo, useState } from 'react';
|
|
4
4
|
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
|
|
6
7
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
7
8
|
import type { Glossary, GlossaryExample } from '../core/glossary.ts';
|
|
@@ -34,7 +35,7 @@ export interface GlossaryIndexProps<TExample = GlossaryExample> {
|
|
|
34
35
|
searchable?: boolean;
|
|
35
36
|
/**
|
|
36
37
|
* Placeholder and accessible name of the filter box.
|
|
37
|
-
* @default '
|
|
38
|
+
* @default the chrome's own words for it, in the language of the page
|
|
38
39
|
*/
|
|
39
40
|
searchLabel?: string;
|
|
40
41
|
/**
|
|
@@ -74,11 +75,12 @@ export function GlossaryIndex<TExample = GlossaryExample>(
|
|
|
74
75
|
renderExample,
|
|
75
76
|
renderCode,
|
|
76
77
|
searchable = true,
|
|
77
|
-
searchLabel
|
|
78
|
+
searchLabel,
|
|
78
79
|
minColumnWidth = 280,
|
|
79
80
|
idPrefix = 'glossary-',
|
|
80
81
|
className,
|
|
81
82
|
} = props;
|
|
83
|
+
const t = useChromeT();
|
|
82
84
|
const context = useGlossary();
|
|
83
85
|
const terms = (glossary ?? context.glossary) as Glossary<TExample>;
|
|
84
86
|
const [query, setQuery] = useState('');
|
|
@@ -95,8 +97,8 @@ export function GlossaryIndex<TExample = GlossaryExample>(
|
|
|
95
97
|
type="search"
|
|
96
98
|
leftIcon="search"
|
|
97
99
|
value={query}
|
|
98
|
-
placeholder={searchLabel}
|
|
99
|
-
aria-label={searchLabel}
|
|
100
|
+
placeholder={searchLabel ?? t('pedagogy.filterTerms')}
|
|
101
|
+
aria-label={searchLabel ?? t('pedagogy.filterTerms')}
|
|
100
102
|
autoComplete="off"
|
|
101
103
|
spellCheck={false}
|
|
102
104
|
onValueChange={setQuery}
|
|
@@ -104,7 +106,11 @@ export function GlossaryIndex<TExample = GlossaryExample>(
|
|
|
104
106
|
</div>
|
|
105
107
|
)}
|
|
106
108
|
{listings.length === 0 ? (
|
|
107
|
-
<p style={EMPTY_STYLE}>
|
|
109
|
+
<p style={EMPTY_STYLE}>
|
|
110
|
+
{query.trim() === ''
|
|
111
|
+
? t('pedagogy.noTermDefined')
|
|
112
|
+
: t('pedagogy.noTermMatches', { query: query.trim() })}
|
|
113
|
+
</p>
|
|
108
114
|
) : (
|
|
109
115
|
<div style={gridStyle(minColumnWidth)}>
|
|
110
116
|
{listings.map(({ key, entry }) => (
|
|
@@ -128,13 +134,6 @@ export function GlossaryIndex<TExample = GlossaryExample>(
|
|
|
128
134
|
);
|
|
129
135
|
}
|
|
130
136
|
|
|
131
|
-
function emptyMessage(query: string): string {
|
|
132
|
-
const trimmed = query.trim();
|
|
133
|
-
return trimmed === ''
|
|
134
|
-
? 'No term is defined yet.'
|
|
135
|
-
: `No term matches “${trimmed}”.`;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
137
|
function anchorOf(key: string): string {
|
|
139
138
|
return key
|
|
140
139
|
.trim()
|
|
@@ -2,6 +2,7 @@ import { Button, Callout } from '@blueprintjs/core';
|
|
|
2
2
|
import type { CSSProperties, ReactElement } from 'react';
|
|
3
3
|
|
|
4
4
|
import { clamp } from '../../format/core/clamp.ts';
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
|
|
6
7
|
import { GlossaryText } from './GlossaryText.tsx';
|
|
7
8
|
|
|
@@ -23,12 +24,12 @@ export interface HintLadderProps {
|
|
|
23
24
|
onReveal?: () => void;
|
|
24
25
|
/**
|
|
25
26
|
* Text of the button, before its count.
|
|
26
|
-
* @default '
|
|
27
|
+
* @default the chrome's own words for it, in the language of the page
|
|
27
28
|
*/
|
|
28
29
|
revealLabel?: string;
|
|
29
30
|
/**
|
|
30
31
|
* Heading over the hints.
|
|
31
|
-
* @default '
|
|
32
|
+
* @default the chrome's own words for it, in the language of the page
|
|
32
33
|
*/
|
|
33
34
|
title?: string;
|
|
34
35
|
/**
|
|
@@ -48,14 +49,8 @@ export interface HintLadderProps {
|
|
|
48
49
|
* @returns The hints, or nothing while none is open and none can be.
|
|
49
50
|
*/
|
|
50
51
|
export function HintLadder(props: HintLadderProps): ReactElement | null {
|
|
51
|
-
const {
|
|
52
|
-
|
|
53
|
-
hints,
|
|
54
|
-
revealed,
|
|
55
|
-
onReveal,
|
|
56
|
-
revealLabel = 'Reveal hint',
|
|
57
|
-
title = 'Hints',
|
|
58
|
-
} = props;
|
|
52
|
+
const { className, hints, revealed, onReveal, revealLabel, title } = props;
|
|
53
|
+
const t = useChromeT();
|
|
59
54
|
const open = clampRevealed(revealed, hints.length);
|
|
60
55
|
const exhausted = open >= hints.length;
|
|
61
56
|
if (open === 0 && (onReveal === undefined || hints.length === 0)) return null;
|
|
@@ -66,7 +61,11 @@ export function HintLadder(props: HintLadderProps): ReactElement | null {
|
|
|
66
61
|
<div>
|
|
67
62
|
<Button
|
|
68
63
|
icon="lightbulb"
|
|
69
|
-
text={
|
|
64
|
+
text={t('pedagogy.revealHintLadder', {
|
|
65
|
+
label: revealLabel ?? t('pedagogy.revealHint'),
|
|
66
|
+
open,
|
|
67
|
+
total: hints.length,
|
|
68
|
+
})}
|
|
70
69
|
disabled={exhausted}
|
|
71
70
|
onClick={onReveal}
|
|
72
71
|
/>
|
|
@@ -74,7 +73,11 @@ export function HintLadder(props: HintLadderProps): ReactElement | null {
|
|
|
74
73
|
)}
|
|
75
74
|
|
|
76
75
|
{open > 0 && (
|
|
77
|
-
<Callout
|
|
76
|
+
<Callout
|
|
77
|
+
intent="primary"
|
|
78
|
+
icon="lightbulb"
|
|
79
|
+
title={title ?? t('pedagogy.hints')}
|
|
80
|
+
>
|
|
78
81
|
<ol style={LIST_STYLE}>
|
|
79
82
|
{hints.slice(0, open).map((hint) => (
|
|
80
83
|
<li key={hint} style={ITEM_STYLE}>
|
|
@@ -2,6 +2,7 @@ import type { Placement } from '@blueprintjs/core';
|
|
|
2
2
|
import { Tooltip } from '@blueprintjs/core';
|
|
3
3
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
4
4
|
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import type { GlossaryExample } from '../core/glossary.ts';
|
|
6
7
|
|
|
7
8
|
import { HOVER_OPEN_DELAY, MONOSPACE, PROSE_INK } from './pedagogyStyle.ts';
|
|
@@ -45,12 +46,12 @@ export interface SyntaxTooltipProps {
|
|
|
45
46
|
placement?: Placement;
|
|
46
47
|
/**
|
|
47
48
|
* Label of the example's code line.
|
|
48
|
-
* @default '
|
|
49
|
+
* @default the chrome's own word for it, in the language of the page
|
|
49
50
|
*/
|
|
50
51
|
codeLabel?: string;
|
|
51
52
|
/**
|
|
52
53
|
* Label of the example's input line.
|
|
53
|
-
* @default '
|
|
54
|
+
* @default the chrome's own word for it, in the language of the page
|
|
54
55
|
*/
|
|
55
56
|
inputLabel?: string;
|
|
56
57
|
/**
|
|
@@ -108,12 +109,12 @@ interface SyntaxTooltipBodyProps {
|
|
|
108
109
|
content: SyntaxTooltipContent;
|
|
109
110
|
/**
|
|
110
111
|
* Label of the example's code line.
|
|
111
|
-
* @default '
|
|
112
|
+
* @default the chrome's own word for it, in the language of the page
|
|
112
113
|
*/
|
|
113
114
|
codeLabel?: string;
|
|
114
115
|
/**
|
|
115
116
|
* Label of the example's input line.
|
|
116
|
-
* @default '
|
|
117
|
+
* @default the chrome's own word for it, in the language of the page
|
|
117
118
|
*/
|
|
118
119
|
inputLabel?: string;
|
|
119
120
|
}
|
|
@@ -127,7 +128,8 @@ interface SyntaxTooltipBodyProps {
|
|
|
127
128
|
* @returns The body.
|
|
128
129
|
*/
|
|
129
130
|
export function SyntaxTooltipBody(props: SyntaxTooltipBodyProps): ReactElement {
|
|
130
|
-
const { content, codeLabel
|
|
131
|
+
const { content, codeLabel, inputLabel } = props;
|
|
132
|
+
const t = useChromeT();
|
|
131
133
|
const { syntax, name, tag, summary, detail, example } = content;
|
|
132
134
|
|
|
133
135
|
return (
|
|
@@ -141,12 +143,12 @@ export function SyntaxTooltipBody(props: SyntaxTooltipBodyProps): ReactElement {
|
|
|
141
143
|
<div style={DETAIL_STYLE}>{detail}</div>
|
|
142
144
|
<div style={EXAMPLE_STYLE}>
|
|
143
145
|
<div style={ROW_STYLE}>
|
|
144
|
-
<span style={LABEL_STYLE}>{codeLabel}</span>
|
|
146
|
+
<span style={LABEL_STYLE}>{codeLabel ?? t('pedagogy.example')}</span>
|
|
145
147
|
<code style={VALUE_STYLE}>{example.code}</code>
|
|
146
148
|
</div>
|
|
147
149
|
{example.input !== undefined && (
|
|
148
150
|
<div style={ROW_STYLE}>
|
|
149
|
-
<span style={LABEL_STYLE}>{inputLabel}</span>
|
|
151
|
+
<span style={LABEL_STYLE}>{inputLabel ?? t('pedagogy.input')}</span>
|
|
150
152
|
<code style={VALUE_STYLE}>{example.input}</code>
|
|
151
153
|
</div>
|
|
152
154
|
)}
|
|
@@ -2,6 +2,7 @@ import { Button, Tag, Tooltip } from '@blueprintjs/core';
|
|
|
2
2
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import { clamp } from '../../format/core/clamp.ts';
|
|
5
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
6
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
6
7
|
import type { ExerciseLevel } from '../core/types.ts';
|
|
7
8
|
|
|
@@ -76,6 +77,7 @@ export function TutorialStepStrip(props: TutorialStepStripProps): ReactElement {
|
|
|
76
77
|
pagerHint,
|
|
77
78
|
className,
|
|
78
79
|
} = props;
|
|
80
|
+
const t = useChromeT();
|
|
79
81
|
const active = clampIndex(activeIndex, steps.length);
|
|
80
82
|
|
|
81
83
|
return (
|
|
@@ -101,19 +103,22 @@ export function TutorialStepStrip(props: TutorialStepStripProps): ReactElement {
|
|
|
101
103
|
<Button
|
|
102
104
|
size="small"
|
|
103
105
|
icon="chevron-left"
|
|
104
|
-
text=
|
|
106
|
+
text={t('pedagogy.previous')}
|
|
105
107
|
disabled={active === 0}
|
|
106
108
|
onClick={() => {
|
|
107
109
|
onSelect(active - 1);
|
|
108
110
|
}}
|
|
109
111
|
/>
|
|
110
112
|
<Tag minimal round>
|
|
111
|
-
{
|
|
113
|
+
{t('pedagogy.stepOf', {
|
|
114
|
+
step: active + 1,
|
|
115
|
+
total: steps.length,
|
|
116
|
+
})}
|
|
112
117
|
</Tag>
|
|
113
118
|
<Button
|
|
114
119
|
size="small"
|
|
115
120
|
endIcon="chevron-right"
|
|
116
|
-
text=
|
|
121
|
+
text={t('pedagogy.next')}
|
|
117
122
|
intent="primary"
|
|
118
123
|
disabled={active >= steps.length - 1}
|
|
119
124
|
onClick={() => {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type { CSSProperties, ReactElement } from 'react';
|
|
6
6
|
|
|
7
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
7
8
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
8
9
|
import {
|
|
9
10
|
CATEGORY_LABELS,
|
|
@@ -39,12 +40,16 @@ export interface CategoryLegendProps {
|
|
|
39
40
|
*/
|
|
40
41
|
export function CategoryLegend(props: CategoryLegendProps): ReactElement {
|
|
41
42
|
const { className, onSelect, selected } = props;
|
|
43
|
+
const t = useChromeT();
|
|
42
44
|
|
|
43
45
|
return (
|
|
44
46
|
<div className={className} style={legendStyle}>
|
|
45
47
|
{CATEGORY_ORDER.map((category) => {
|
|
46
48
|
const swatch = categorySwatch(category);
|
|
47
|
-
const label =
|
|
49
|
+
const label = t.or(
|
|
50
|
+
`periodic.category.${category}`,
|
|
51
|
+
CATEGORY_LABELS[category],
|
|
52
|
+
);
|
|
48
53
|
const mark = (
|
|
49
54
|
<span style={{ ...swatchStyle, background: swatch.background }} />
|
|
50
55
|
);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { CSSProperties, ReactElement } from 'react';
|
|
10
10
|
|
|
11
11
|
import type { Swatch } from '../../color/core/interpolate.ts';
|
|
12
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
12
13
|
|
|
13
14
|
/** What {@link ElementCell} needs to draw one element. */
|
|
14
15
|
export interface ElementCellProps {
|
|
@@ -74,6 +75,7 @@ export function ElementCell(props: ElementCellProps): ReactElement {
|
|
|
74
75
|
isIncluded = true,
|
|
75
76
|
onHover,
|
|
76
77
|
} = props;
|
|
78
|
+
const t = useChromeT();
|
|
77
79
|
|
|
78
80
|
return (
|
|
79
81
|
<button
|
|
@@ -81,7 +83,11 @@ export function ElementCell(props: ElementCellProps): ReactElement {
|
|
|
81
83
|
className={className}
|
|
82
84
|
data-testid={`element-${symbol}`}
|
|
83
85
|
data-symbol={symbol}
|
|
84
|
-
aria-label={
|
|
86
|
+
aria-label={t('periodic.cellLabel', {
|
|
87
|
+
name,
|
|
88
|
+
symbol,
|
|
89
|
+
atomicNumber,
|
|
90
|
+
})}
|
|
85
91
|
aria-pressed={isSelected}
|
|
86
92
|
onClick={() => {
|
|
87
93
|
onSelect(symbol);
|
|
@@ -14,6 +14,7 @@ import type { CSSProperties, KeyboardEvent, ReactElement } from 'react';
|
|
|
14
14
|
import { useEffect, useRef } from 'react';
|
|
15
15
|
|
|
16
16
|
import type { Swatch } from '../../color/core/interpolate.ts';
|
|
17
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
17
18
|
import { categorySwatch } from '../core/categories.ts';
|
|
18
19
|
import type { PeriodicElement } from '../core/elements.ts';
|
|
19
20
|
import type { ElementRange } from '../core/layout.ts';
|
|
@@ -127,6 +128,7 @@ export function PeriodicTable(props: PeriodicTableProps): ReactElement {
|
|
|
127
128
|
className,
|
|
128
129
|
} = props;
|
|
129
130
|
|
|
131
|
+
const t = useChromeT();
|
|
130
132
|
const gridRef = useRef<HTMLDivElement>(null);
|
|
131
133
|
const cameFromKeyRef = useRef(false);
|
|
132
134
|
const offset = headers ? 1 : 0;
|
|
@@ -155,7 +157,7 @@ export function PeriodicTable(props: PeriodicTableProps): ReactElement {
|
|
|
155
157
|
<div
|
|
156
158
|
ref={gridRef}
|
|
157
159
|
role="grid"
|
|
158
|
-
aria-label=
|
|
160
|
+
aria-label={t('periodic.table')}
|
|
159
161
|
data-testid="periodic-table"
|
|
160
162
|
style={headers ? gridWithHeadersStyle : gridStyle}
|
|
161
163
|
onKeyDown={handleKeyDown}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { CSSProperties, ReactElement } from 'react';
|
|
7
7
|
|
|
8
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
8
9
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
9
10
|
import type { ElementRange } from '../core/layout.ts';
|
|
10
11
|
import {
|
|
@@ -33,13 +34,14 @@ interface HeaderStripsProps {
|
|
|
33
34
|
*/
|
|
34
35
|
export function HeaderStrips(props: HeaderStripsProps): ReactElement {
|
|
35
36
|
const { onSelectRange } = props;
|
|
37
|
+
const t = useChromeT();
|
|
36
38
|
const groups: ReactElement[] = [];
|
|
37
39
|
for (let group = 1; group <= COLUMN_COUNT; group++) {
|
|
38
40
|
groups.push(
|
|
39
41
|
<HeaderCell
|
|
40
42
|
key={`group-${String(group)}`}
|
|
41
43
|
label={String(group)}
|
|
42
|
-
title={
|
|
44
|
+
title={t('periodic.group', { group })}
|
|
43
45
|
column={group + 1}
|
|
44
46
|
row={1}
|
|
45
47
|
onClick={
|
|
@@ -57,7 +59,7 @@ export function HeaderStrips(props: HeaderStripsProps): ReactElement {
|
|
|
57
59
|
<HeaderCell
|
|
58
60
|
key={`period-${String(period)}`}
|
|
59
61
|
label={String(period)}
|
|
60
|
-
title={
|
|
62
|
+
title={t('periodic.period', { period })}
|
|
61
63
|
column={1}
|
|
62
64
|
row={period + 1}
|
|
63
65
|
onClick={
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button, Icon } from '@blueprintjs/core';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
5
5
|
|
|
6
6
|
/** How the button is dressed for the bar it sits in. */
|
|
7
7
|
export type ShareButtonVariant = 'nav-link' | 'blueprint';
|
|
@@ -17,7 +17,7 @@ export interface ShareButtonProps {
|
|
|
17
17
|
variant?: ShareButtonVariant;
|
|
18
18
|
/**
|
|
19
19
|
* Text of the button, and what a screen reader is told.
|
|
20
|
-
* @default '
|
|
20
|
+
* @default the chrome's own word for it, in the language of the page
|
|
21
21
|
*/
|
|
22
22
|
label?: string;
|
|
23
23
|
/**
|
|
@@ -28,7 +28,7 @@ export interface ShareButtonProps {
|
|
|
28
28
|
compact?: boolean;
|
|
29
29
|
/**
|
|
30
30
|
* What the pointer is told.
|
|
31
|
-
* @default '
|
|
31
|
+
* @default the chrome's own line, in the language of the page
|
|
32
32
|
*/
|
|
33
33
|
title?: string;
|
|
34
34
|
/**
|
|
@@ -48,11 +48,14 @@ export function ShareButton(props: ShareButtonProps): ReactElement {
|
|
|
48
48
|
const {
|
|
49
49
|
onClick,
|
|
50
50
|
variant = 'nav-link',
|
|
51
|
-
label
|
|
51
|
+
label: given,
|
|
52
52
|
compact = false,
|
|
53
|
-
title
|
|
53
|
+
title: givenTitle,
|
|
54
54
|
className,
|
|
55
55
|
} = props;
|
|
56
|
+
const t = useChromeT();
|
|
57
|
+
const label = given ?? t('share.button');
|
|
58
|
+
const title = givenTitle ?? t('share.buttonTitle');
|
|
56
59
|
const text = compact ? undefined : label;
|
|
57
60
|
|
|
58
61
|
if (variant === 'blueprint') {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Checkbox, H6 } from '@blueprintjs/core';
|
|
2
2
|
import type { CSSProperties, ReactElement } from 'react';
|
|
3
3
|
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
4
5
|
import type { HideablePart } from '../core/index.ts';
|
|
5
6
|
|
|
6
7
|
import { SharePartOptions } from './SharePartOptions.tsx';
|
|
@@ -35,27 +36,25 @@ export function ShareConfigOptions(
|
|
|
35
36
|
props: ShareConfigOptionsProps,
|
|
36
37
|
): ReactElement {
|
|
37
38
|
const { embed, parts, hidden, onEmbedChange, onPartChange } = props;
|
|
39
|
+
const t = useChromeT();
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
42
|
<>
|
|
41
43
|
<section className="share-section" style={SECTION_STYLE}>
|
|
42
|
-
<H6>
|
|
44
|
+
<H6>{t('share.layout')}</H6>
|
|
43
45
|
<Checkbox
|
|
44
46
|
checked={embed}
|
|
45
|
-
label=
|
|
47
|
+
label={t('share.embed')}
|
|
46
48
|
onChange={(event) => {
|
|
47
49
|
onEmbedChange(event.currentTarget.checked);
|
|
48
50
|
}}
|
|
49
51
|
/>
|
|
50
|
-
<span style={HINT_STYLE}>
|
|
51
|
-
Drops the site header and its navigation, so the page sits inside a
|
|
52
|
-
page of your own.
|
|
53
|
-
</span>
|
|
52
|
+
<span style={HINT_STYLE}>{t('share.embedHint')}</span>
|
|
54
53
|
</section>
|
|
55
54
|
|
|
56
55
|
{parts.length > 0 ? (
|
|
57
56
|
<section className="share-section" style={SECTION_STYLE}>
|
|
58
|
-
<H6>
|
|
57
|
+
<H6>{t('share.showOnPage')}</H6>
|
|
59
58
|
<SharePartOptions
|
|
60
59
|
parts={parts}
|
|
61
60
|
hidden={hidden}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Dialog } 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 {
|
|
5
6
|
ShareConfig,
|
|
6
7
|
ShareParamCodecs,
|
|
@@ -112,13 +113,14 @@ export function ShareDialog<
|
|
|
112
113
|
Codecs extends ShareParamCodecs = Record<string, never>,
|
|
113
114
|
>(props: ShareDialogProps<Codecs>): ReactElement {
|
|
114
115
|
const { isOpen, onClose, usePortal = true, ...rest } = props;
|
|
116
|
+
const t = useChromeT();
|
|
115
117
|
|
|
116
118
|
return (
|
|
117
119
|
<Dialog
|
|
118
120
|
isOpen={isOpen}
|
|
119
121
|
onClose={onClose}
|
|
120
122
|
usePortal={usePortal}
|
|
121
|
-
title=
|
|
123
|
+
title={t('share.dialogTitle')}
|
|
122
124
|
icon="share"
|
|
123
125
|
className="share-dialog"
|
|
124
126
|
style={DIALOG_STYLE}
|