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.
Files changed (432) hide show
  1. package/README.md +73 -2
  2. package/bin/check-messages.mjs +229 -0
  3. package/lib/about/ui/AboutBuild.d.ts.map +1 -1
  4. package/lib/about/ui/AboutBuild.js +15 -4
  5. package/lib/about/ui/AboutBuild.js.map +1 -1
  6. package/lib/about/ui/AboutCitations.d.ts.map +1 -1
  7. package/lib/about/ui/AboutCitations.js +3 -1
  8. package/lib/about/ui/AboutCitations.js.map +1 -1
  9. package/lib/about/ui/AboutPage.d.ts.map +1 -1
  10. package/lib/about/ui/AboutPage.js +9 -1
  11. package/lib/about/ui/AboutPage.js.map +1 -1
  12. package/lib/about/ui/AboutProvidedBy.d.ts.map +1 -1
  13. package/lib/about/ui/AboutProvidedBy.js +8 -3
  14. package/lib/about/ui/AboutProvidedBy.js.map +1 -1
  15. package/lib/capsule/ui/Capsule.d.ts +30 -0
  16. package/lib/capsule/ui/Capsule.d.ts.map +1 -0
  17. package/lib/capsule/ui/Capsule.js +12 -0
  18. package/lib/capsule/ui/Capsule.js.map +1 -0
  19. package/lib/capsule/ui/CapsuleFilter.d.ts +19 -3
  20. package/lib/capsule/ui/CapsuleFilter.d.ts.map +1 -1
  21. package/lib/capsule/ui/CapsuleFilter.js +14 -44
  22. package/lib/capsule/ui/CapsuleFilter.js.map +1 -1
  23. package/lib/capsule/ui/capsuleFilterCapsules.d.ts +15 -0
  24. package/lib/capsule/ui/capsuleFilterCapsules.d.ts.map +1 -0
  25. package/lib/capsule/ui/capsuleFilterCapsules.js +47 -0
  26. package/lib/capsule/ui/capsuleFilterCapsules.js.map +1 -0
  27. package/lib/chart/ui/ChartTrackingLayer.d.ts.map +1 -1
  28. package/lib/chart/ui/ChartTrackingLayer.js +4 -2
  29. package/lib/chart/ui/ChartTrackingLayer.js.map +1 -1
  30. package/lib/chrome/ui/SiteHeader.d.ts +1 -1
  31. package/lib/chrome/ui/SiteHeader.d.ts.map +1 -1
  32. package/lib/chrome/ui/SiteHeader.js +4 -2
  33. package/lib/chrome/ui/SiteHeader.js.map +1 -1
  34. package/lib/citation/ui/CitationMenu.d.ts +1 -1
  35. package/lib/citation/ui/CitationMenu.d.ts.map +1 -1
  36. package/lib/citation/ui/CitationMenu.js +7 -3
  37. package/lib/citation/ui/CitationMenu.js.map +1 -1
  38. package/lib/citation/ui/CiteButton.d.ts +1 -1
  39. package/lib/citation/ui/CiteButton.d.ts.map +1 -1
  40. package/lib/citation/ui/CiteButton.js +3 -1
  41. package/lib/citation/ui/CiteButton.js.map +1 -1
  42. package/lib/citation/ui/CopyFormatEntries.d.ts.map +1 -1
  43. package/lib/citation/ui/CopyFormatEntries.js +3 -1
  44. package/lib/citation/ui/CopyFormatEntries.js.map +1 -1
  45. package/lib/citation/ui/WorkEntry.d.ts.map +1 -1
  46. package/lib/citation/ui/WorkEntry.js +3 -1
  47. package/lib/citation/ui/WorkEntry.js.map +1 -1
  48. package/lib/citation/ui/entries.d.ts.map +1 -1
  49. package/lib/citation/ui/entries.js +8 -2
  50. package/lib/citation/ui/entries.js.map +1 -1
  51. package/lib/citation/ui/useCopyFeedback.d.ts.map +1 -1
  52. package/lib/citation/ui/useCopyFeedback.js +9 -4
  53. package/lib/citation/ui/useCopyFeedback.js.map +1 -1
  54. package/lib/clipboard/ui/ClickToCopy.d.ts.map +1 -1
  55. package/lib/clipboard/ui/ClickToCopy.js +12 -6
  56. package/lib/clipboard/ui/ClickToCopy.js.map +1 -1
  57. package/lib/clipboard/ui/CopyButton.d.ts +3 -3
  58. package/lib/clipboard/ui/CopyButton.d.ts.map +1 -1
  59. package/lib/clipboard/ui/CopyButton.js +7 -4
  60. package/lib/clipboard/ui/CopyButton.js.map +1 -1
  61. package/lib/color/ui/ColorScaleEditor.d.ts.map +1 -1
  62. package/lib/color/ui/ColorScaleEditor.js +15 -10
  63. package/lib/color/ui/ColorScaleEditor.js.map +1 -1
  64. package/lib/color/ui/ColorScaleEntry.d.ts.map +1 -1
  65. package/lib/color/ui/ColorScaleEntry.js +4 -2
  66. package/lib/color/ui/ColorScaleEntry.js.map +1 -1
  67. package/lib/color/ui/ColorScaleLegend.d.ts.map +1 -1
  68. package/lib/color/ui/ColorScaleLegend.js +7 -1
  69. package/lib/color/ui/ColorScaleLegend.js.map +1 -1
  70. package/lib/color/ui/ColorScaleSelect.d.ts.map +1 -1
  71. package/lib/color/ui/ColorScaleSelect.js +8 -4
  72. package/lib/color/ui/ColorScaleSelect.js.map +1 -1
  73. package/lib/confirm/ui/ConfirmButton.d.ts +2 -2
  74. package/lib/confirm/ui/ConfirmButton.d.ts.map +1 -1
  75. package/lib/confirm/ui/ConfirmButton.js +4 -2
  76. package/lib/confirm/ui/ConfirmButton.js.map +1 -1
  77. package/lib/core.d.ts +1 -0
  78. package/lib/core.d.ts.map +1 -1
  79. package/lib/core.js +1 -0
  80. package/lib/core.js.map +1 -1
  81. package/lib/credits/ui/CreditsList.d.ts.map +1 -1
  82. package/lib/credits/ui/CreditsList.js +3 -1
  83. package/lib/credits/ui/CreditsList.js.map +1 -1
  84. package/lib/delimited/ui/DelimitedTextDialog.d.ts.map +1 -1
  85. package/lib/delimited/ui/DelimitedTextDialog.js +5 -2
  86. package/lib/delimited/ui/DelimitedTextDialog.js.map +1 -1
  87. package/lib/delimited/ui/DelimitedTextPanel.d.ts.map +1 -1
  88. package/lib/delimited/ui/DelimitedTextPanel.js +8 -8
  89. package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -1
  90. package/lib/download/ui/FigureDownload.d.ts +2 -2
  91. package/lib/download/ui/FigureDownload.d.ts.map +1 -1
  92. package/lib/download/ui/FigureDownload.js +4 -2
  93. package/lib/download/ui/FigureDownload.js.map +1 -1
  94. package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
  95. package/lib/download/ui/FigureDownloadPanel.js +24 -18
  96. package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
  97. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  98. package/lib/ecosystem/core/sites.js +4 -2
  99. package/lib/ecosystem/core/sites.js.map +1 -1
  100. package/lib/ecosystem/ui/EcosystemButton.d.ts +1 -1
  101. package/lib/ecosystem/ui/EcosystemButton.d.ts.map +1 -1
  102. package/lib/ecosystem/ui/EcosystemButton.js +4 -2
  103. package/lib/ecosystem/ui/EcosystemButton.js.map +1 -1
  104. package/lib/ecosystem/ui/EcosystemLinks.d.ts +1 -1
  105. package/lib/ecosystem/ui/EcosystemLinks.d.ts.map +1 -1
  106. package/lib/ecosystem/ui/EcosystemLinks.js +5 -2
  107. package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -1
  108. package/lib/ecosystem/ui/EcosystemMenu.d.ts.map +1 -1
  109. package/lib/ecosystem/ui/EcosystemMenu.js +3 -1
  110. package/lib/ecosystem/ui/EcosystemMenu.js.map +1 -1
  111. package/lib/ecosystem/ui/SiteGroupSection.d.ts.map +1 -1
  112. package/lib/ecosystem/ui/SiteGroupSection.js +3 -1
  113. package/lib/ecosystem/ui/SiteGroupSection.js.map +1 -1
  114. package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -1
  115. package/lib/ecosystem/ui/SiteTile.js +3 -1
  116. package/lib/ecosystem/ui/SiteTile.js.map +1 -1
  117. package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
  118. package/lib/ecosystem/ui/glyphs.js +6 -5
  119. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  120. package/lib/error/ui/ErrorFallback.d.ts +2 -2
  121. package/lib/error/ui/ErrorFallback.d.ts.map +1 -1
  122. package/lib/error/ui/ErrorFallback.js +4 -2
  123. package/lib/error/ui/ErrorFallback.js.map +1 -1
  124. package/lib/help/ui/HelpBody.d.ts.map +1 -1
  125. package/lib/help/ui/HelpBody.js +3 -1
  126. package/lib/help/ui/HelpBody.js.map +1 -1
  127. package/lib/help/ui/HelpIcon.d.ts +2 -1
  128. package/lib/help/ui/HelpIcon.d.ts.map +1 -1
  129. package/lib/help/ui/HelpIcon.js +4 -2
  130. package/lib/help/ui/HelpIcon.js.map +1 -1
  131. package/lib/help/ui/HelpToolbarButton.d.ts.map +1 -1
  132. package/lib/help/ui/HelpToolbarButton.js +3 -1
  133. package/lib/help/ui/HelpToolbarButton.js.map +1 -1
  134. package/lib/help/ui/helpName.d.ts +5 -1
  135. package/lib/help/ui/helpName.d.ts.map +1 -1
  136. package/lib/help/ui/helpName.js +4 -2
  137. package/lib/help/ui/helpName.js.map +1 -1
  138. package/lib/i18n/core/chromeCatalog.d.ts +21 -0
  139. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -0
  140. package/lib/i18n/core/chromeCatalog.js +29 -0
  141. package/lib/i18n/core/chromeCatalog.js.map +1 -0
  142. package/lib/i18n/core/index.d.ts +12 -0
  143. package/lib/i18n/core/index.d.ts.map +1 -0
  144. package/lib/i18n/core/index.js +6 -0
  145. package/lib/i18n/core/index.js.map +1 -0
  146. package/lib/i18n/core/languages.d.ts +32 -0
  147. package/lib/i18n/core/languages.d.ts.map +1 -0
  148. package/lib/i18n/core/languages.js +41 -0
  149. package/lib/i18n/core/languages.js.map +1 -0
  150. package/lib/i18n/core/messageCatalog.d.ts +113 -0
  151. package/lib/i18n/core/messageCatalog.d.ts.map +1 -0
  152. package/lib/i18n/core/messageCatalog.js +135 -0
  153. package/lib/i18n/core/messageCatalog.js.map +1 -0
  154. package/lib/i18n/core/messageValues.d.ts +3 -0
  155. package/lib/i18n/core/messageValues.d.ts.map +1 -0
  156. package/lib/i18n/core/messageValues.js +2 -0
  157. package/lib/i18n/core/messageValues.js.map +1 -0
  158. package/lib/i18n/core/session.d.ts +51 -0
  159. package/lib/i18n/core/session.d.ts.map +1 -0
  160. package/lib/i18n/core/session.js +64 -0
  161. package/lib/i18n/core/session.js.map +1 -0
  162. package/lib/i18n/core/translateSetup.d.ts +28 -0
  163. package/lib/i18n/core/translateSetup.d.ts.map +1 -0
  164. package/lib/i18n/core/translateSetup.js +30 -0
  165. package/lib/i18n/core/translateSetup.js.map +1 -0
  166. package/lib/i18n/ui/LanguageSelect.d.ts +37 -0
  167. package/lib/i18n/ui/LanguageSelect.d.ts.map +1 -0
  168. package/lib/i18n/ui/LanguageSelect.js +27 -0
  169. package/lib/i18n/ui/LanguageSelect.js.map +1 -0
  170. package/lib/i18n/ui/index.d.ts +6 -0
  171. package/lib/i18n/ui/index.d.ts.map +1 -0
  172. package/lib/i18n/ui/index.js +4 -0
  173. package/lib/i18n/ui/index.js.map +1 -0
  174. package/lib/i18n/ui/useLanguage.d.ts +23 -0
  175. package/lib/i18n/ui/useLanguage.d.ts.map +1 -0
  176. package/lib/i18n/ui/useLanguage.js +36 -0
  177. package/lib/i18n/ui/useLanguage.js.map +1 -0
  178. package/lib/i18n/ui/useT.d.ts +47 -0
  179. package/lib/i18n/ui/useT.d.ts.map +1 -0
  180. package/lib/i18n/ui/useT.js +51 -0
  181. package/lib/i18n/ui/useT.js.map +1 -0
  182. package/lib/locales/de.json +442 -0
  183. package/lib/locales/en.json +442 -0
  184. package/lib/locales/es.json +442 -0
  185. package/lib/locales/fr.json +442 -0
  186. package/lib/molecule3d/core/gestures.d.ts +10 -0
  187. package/lib/molecule3d/core/gestures.d.ts.map +1 -1
  188. package/lib/molecule3d/core/gestures.js +39 -7
  189. package/lib/molecule3d/core/gestures.js.map +1 -1
  190. package/lib/molecule3d/ui/Molecule3DExport.d.ts.map +1 -1
  191. package/lib/molecule3d/ui/Molecule3DExport.js +3 -1
  192. package/lib/molecule3d/ui/Molecule3DExport.js.map +1 -1
  193. package/lib/molecule3d/ui/Molecule3DHelp.d.ts.map +1 -1
  194. package/lib/molecule3d/ui/Molecule3DHelp.js +7 -2
  195. package/lib/molecule3d/ui/Molecule3DHelp.js.map +1 -1
  196. package/lib/molecule3d/ui/Molecule3DOptions.d.ts.map +1 -1
  197. package/lib/molecule3d/ui/Molecule3DOptions.js +9 -9
  198. package/lib/molecule3d/ui/Molecule3DOptions.js.map +1 -1
  199. package/lib/molecule3d/ui/Molecule3DSurfaceColors.d.ts.map +1 -1
  200. package/lib/molecule3d/ui/Molecule3DSurfaceColors.js +8 -8
  201. package/lib/molecule3d/ui/Molecule3DSurfaceColors.js.map +1 -1
  202. package/lib/molecule3d/ui/Molecule3DToolbar.d.ts.map +1 -1
  203. package/lib/molecule3d/ui/Molecule3DToolbar.js +15 -10
  204. package/lib/molecule3d/ui/Molecule3DToolbar.js.map +1 -1
  205. package/lib/molecule3d/ui/MoleculeViewer3D.d.ts.map +1 -1
  206. package/lib/molecule3d/ui/MoleculeViewer3D.js +6 -3
  207. package/lib/molecule3d/ui/MoleculeViewer3D.js.map +1 -1
  208. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
  209. package/lib/orbital/ui/AtomicOrbitalCanvas.js +3 -1
  210. package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
  211. package/lib/orbital/ui/AtomicOrbitalControls.d.ts.map +1 -1
  212. package/lib/orbital/ui/AtomicOrbitalControls.js +12 -15
  213. package/lib/orbital/ui/AtomicOrbitalControls.js.map +1 -1
  214. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
  215. package/lib/orbital/ui/AtomicOrbitalViewer.js +6 -3
  216. package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
  217. package/lib/orbital/ui/capability.d.ts +4 -0
  218. package/lib/orbital/ui/capability.d.ts.map +1 -1
  219. package/lib/orbital/ui/capability.js +4 -0
  220. package/lib/orbital/ui/capability.js.map +1 -1
  221. package/lib/overlay/ui/OverlayBar.d.ts +1 -1
  222. package/lib/overlay/ui/OverlayBar.d.ts.map +1 -1
  223. package/lib/overlay/ui/OverlayBar.js +6 -3
  224. package/lib/overlay/ui/OverlayBar.js.map +1 -1
  225. package/lib/overlay/ui/OverlayInfo.d.ts +1 -1
  226. package/lib/overlay/ui/OverlayInfo.d.ts.map +1 -1
  227. package/lib/overlay/ui/OverlayInfo.js +5 -2
  228. package/lib/overlay/ui/OverlayInfo.js.map +1 -1
  229. package/lib/overlay/ui/OverlayPanel.d.ts +9 -2
  230. package/lib/overlay/ui/OverlayPanel.d.ts.map +1 -1
  231. package/lib/overlay/ui/OverlayPanel.js +5 -11
  232. package/lib/overlay/ui/OverlayPanel.js.map +1 -1
  233. package/lib/overlay/ui/OverlayReadout.d.ts.map +1 -1
  234. package/lib/overlay/ui/OverlayReadout.js +3 -1
  235. package/lib/overlay/ui/OverlayReadout.js.map +1 -1
  236. package/lib/pedagogy/ui/ExerciseActions.d.ts +1 -1
  237. package/lib/pedagogy/ui/ExerciseActions.d.ts.map +1 -1
  238. package/lib/pedagogy/ui/ExerciseActions.js +9 -2
  239. package/lib/pedagogy/ui/ExerciseActions.js.map +1 -1
  240. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts +1 -1
  241. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts.map +1 -1
  242. package/lib/pedagogy/ui/ExerciseProgressHeader.js +9 -5
  243. package/lib/pedagogy/ui/ExerciseProgressHeader.js.map +1 -1
  244. package/lib/pedagogy/ui/GlossaryIndex.d.ts +1 -1
  245. package/lib/pedagogy/ui/GlossaryIndex.d.ts.map +1 -1
  246. package/lib/pedagogy/ui/GlossaryIndex.js +6 -8
  247. package/lib/pedagogy/ui/GlossaryIndex.js.map +1 -1
  248. package/lib/pedagogy/ui/HintLadder.d.ts +2 -2
  249. package/lib/pedagogy/ui/HintLadder.d.ts.map +1 -1
  250. package/lib/pedagogy/ui/HintLadder.js +8 -2
  251. package/lib/pedagogy/ui/HintLadder.js.map +1 -1
  252. package/lib/pedagogy/ui/SyntaxTooltip.d.ts +4 -4
  253. package/lib/pedagogy/ui/SyntaxTooltip.d.ts.map +1 -1
  254. package/lib/pedagogy/ui/SyntaxTooltip.js +4 -2
  255. package/lib/pedagogy/ui/SyntaxTooltip.js.map +1 -1
  256. package/lib/pedagogy/ui/TutorialStepStrip.d.ts.map +1 -1
  257. package/lib/pedagogy/ui/TutorialStepStrip.js +7 -2
  258. package/lib/pedagogy/ui/TutorialStepStrip.js.map +1 -1
  259. package/lib/periodic/ui/CategoryLegend.d.ts.map +1 -1
  260. package/lib/periodic/ui/CategoryLegend.js +3 -1
  261. package/lib/periodic/ui/CategoryLegend.js.map +1 -1
  262. package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
  263. package/lib/periodic/ui/ElementCell.js +7 -1
  264. package/lib/periodic/ui/ElementCell.js.map +1 -1
  265. package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
  266. package/lib/periodic/ui/PeriodicTable.js +3 -1
  267. package/lib/periodic/ui/PeriodicTable.js.map +1 -1
  268. package/lib/periodic/ui/PeriodicTableChrome.d.ts.map +1 -1
  269. package/lib/periodic/ui/PeriodicTableChrome.js +4 -2
  270. package/lib/periodic/ui/PeriodicTableChrome.js.map +1 -1
  271. package/lib/share/ui/ShareButton.d.ts +2 -2
  272. package/lib/share/ui/ShareButton.d.ts.map +1 -1
  273. package/lib/share/ui/ShareButton.js +5 -2
  274. package/lib/share/ui/ShareButton.js.map +1 -1
  275. package/lib/share/ui/ShareConfigOptions.d.ts.map +1 -1
  276. package/lib/share/ui/ShareConfigOptions.js +4 -2
  277. package/lib/share/ui/ShareConfigOptions.js.map +1 -1
  278. package/lib/share/ui/ShareDialog.d.ts.map +1 -1
  279. package/lib/share/ui/ShareDialog.js +3 -1
  280. package/lib/share/ui/ShareDialog.js.map +1 -1
  281. package/lib/share/ui/ShareDialogContent.d.ts.map +1 -1
  282. package/lib/share/ui/ShareDialogContent.js +10 -1
  283. package/lib/share/ui/ShareDialogContent.js.map +1 -1
  284. package/lib/share/ui/SharePresetTabs.d.ts.map +1 -1
  285. package/lib/share/ui/SharePresetTabs.js +3 -1
  286. package/lib/share/ui/SharePresetTabs.js.map +1 -1
  287. package/lib/slides/ui/BackToSlides.d.ts.map +1 -1
  288. package/lib/slides/ui/BackToSlides.js +4 -2
  289. package/lib/slides/ui/BackToSlides.js.map +1 -1
  290. package/lib/slides/ui/EmbedSlide.d.ts.map +1 -1
  291. package/lib/slides/ui/EmbedSlide.js +3 -1
  292. package/lib/slides/ui/EmbedSlide.js.map +1 -1
  293. package/lib/slides/ui/Slide.d.ts.map +1 -1
  294. package/lib/slides/ui/Slide.js +3 -1
  295. package/lib/slides/ui/Slide.js.map +1 -1
  296. package/lib/slides/ui/SlideshowBar.d.ts.map +1 -1
  297. package/lib/slides/ui/SlideshowBar.js +5 -3
  298. package/lib/slides/ui/SlideshowBar.js.map +1 -1
  299. package/lib/slides/ui/TalkList.d.ts +1 -1
  300. package/lib/slides/ui/TalkList.d.ts.map +1 -1
  301. package/lib/slides/ui/TalkList.js +4 -2
  302. package/lib/slides/ui/TalkList.js.map +1 -1
  303. package/lib/structure/core/editorGuide.d.ts +14 -0
  304. package/lib/structure/core/editorGuide.d.ts.map +1 -1
  305. package/lib/structure/core/editorGuide.js +117 -19
  306. package/lib/structure/core/editorGuide.js.map +1 -1
  307. package/lib/structure/core/editorToolbar.d.ts +3 -1
  308. package/lib/structure/core/editorToolbar.d.ts.map +1 -1
  309. package/lib/structure/core/editorToolbar.js +44 -23
  310. package/lib/structure/core/editorToolbar.js.map +1 -1
  311. package/lib/structure/ui/EditorHelpButton.d.ts.map +1 -1
  312. package/lib/structure/ui/EditorHelpButton.js +3 -2
  313. package/lib/structure/ui/EditorHelpButton.js.map +1 -1
  314. package/lib/structure/ui/StructureEditor.d.ts.map +1 -1
  315. package/lib/structure/ui/StructureEditor.js +3 -1
  316. package/lib/structure/ui/StructureEditor.js.map +1 -1
  317. package/lib/structure/ui/StructureEditorHelp.d.ts.map +1 -1
  318. package/lib/structure/ui/StructureEditorHelp.js +12 -3
  319. package/lib/structure/ui/StructureEditorHelp.js.map +1 -1
  320. package/lib/structure/ui/ToolbarTooltip.d.ts.map +1 -1
  321. package/lib/structure/ui/ToolbarTooltip.js +5 -3
  322. package/lib/structure/ui/ToolbarTooltip.js.map +1 -1
  323. package/lib/translate/core/index.d.ts +1 -1
  324. package/lib/translate/core/index.d.ts.map +1 -1
  325. package/lib/translate/core/start.d.ts +35 -2
  326. package/lib/translate/core/start.d.ts.map +1 -1
  327. package/lib/translate/core/start.js +23 -4
  328. package/lib/translate/core/start.js.map +1 -1
  329. package/lib/ui.d.ts +1 -0
  330. package/lib/ui.d.ts.map +1 -1
  331. package/lib/ui.js +1 -0
  332. package/lib/ui.js.map +1 -1
  333. package/package.json +4 -2
  334. package/src/about/ui/AboutBuild.tsx +23 -16
  335. package/src/about/ui/AboutCitations.tsx +3 -1
  336. package/src/about/ui/AboutPage.tsx +38 -12
  337. package/src/about/ui/AboutProvidedBy.tsx +13 -3
  338. package/src/capsule/ui/Capsule.tsx +48 -0
  339. package/src/capsule/ui/CapsuleFilter.tsx +38 -114
  340. package/src/capsule/ui/capsuleFilterCapsules.tsx +110 -0
  341. package/src/chart/ui/ChartTrackingLayer.tsx +4 -2
  342. package/src/chrome/ui/SiteHeader.tsx +5 -3
  343. package/src/citation/ui/CitationMenu.tsx +9 -5
  344. package/src/citation/ui/CiteButton.tsx +4 -2
  345. package/src/citation/ui/CopyFormatEntries.tsx +3 -1
  346. package/src/citation/ui/WorkEntry.tsx +5 -3
  347. package/src/citation/ui/entries.tsx +9 -2
  348. package/src/citation/ui/useCopyFeedback.ts +11 -4
  349. package/src/clipboard/ui/ClickToCopy.tsx +15 -5
  350. package/src/clipboard/ui/CopyButton.tsx +14 -10
  351. package/src/color/ui/ColorScaleEditor.tsx +17 -15
  352. package/src/color/ui/ColorScaleEntry.tsx +7 -3
  353. package/src/color/ui/ColorScaleLegend.tsx +7 -1
  354. package/src/color/ui/ColorScaleSelect.tsx +12 -6
  355. package/src/confirm/ui/ConfirmButton.tsx +9 -11
  356. package/src/core.ts +1 -0
  357. package/src/credits/ui/CreditsList.tsx +5 -1
  358. package/src/delimited/ui/DelimitedTextDialog.tsx +10 -10
  359. package/src/delimited/ui/DelimitedTextPanel.tsx +19 -12
  360. package/src/download/ui/FigureDownload.tsx +7 -5
  361. package/src/download/ui/FigureDownloadPanel.tsx +31 -25
  362. package/src/ecosystem/core/sites.ts +4 -2
  363. package/src/ecosystem/ui/EcosystemButton.tsx +5 -3
  364. package/src/ecosystem/ui/EcosystemLinks.tsx +10 -10
  365. package/src/ecosystem/ui/EcosystemMenu.tsx +3 -1
  366. package/src/ecosystem/ui/SiteGroupSection.tsx +6 -2
  367. package/src/ecosystem/ui/SiteTile.tsx +6 -2
  368. package/src/ecosystem/ui/glyphs.tsx +16 -22
  369. package/src/error/ui/ErrorFallback.tsx +13 -12
  370. package/src/help/ui/HelpBody.tsx +4 -2
  371. package/src/help/ui/HelpIcon.tsx +6 -3
  372. package/src/help/ui/HelpToolbarButton.tsx +4 -1
  373. package/src/help/ui/helpName.ts +10 -2
  374. package/src/i18n/core/chromeCatalog.ts +35 -0
  375. package/src/i18n/core/index.ts +26 -0
  376. package/src/i18n/core/languages.ts +46 -0
  377. package/src/i18n/core/messageCatalog.ts +202 -0
  378. package/src/i18n/core/messageValues.ts +2 -0
  379. package/src/i18n/core/session.ts +82 -0
  380. package/src/i18n/core/translateSetup.ts +47 -0
  381. package/src/i18n/ui/LanguageSelect.tsx +72 -0
  382. package/src/i18n/ui/index.ts +9 -0
  383. package/src/i18n/ui/useLanguage.ts +48 -0
  384. package/src/i18n/ui/useT.ts +90 -0
  385. package/src/locales/de.json +442 -0
  386. package/src/locales/en.json +442 -0
  387. package/src/locales/es.json +442 -0
  388. package/src/locales/fr.json +442 -0
  389. package/src/molecule3d/core/gestures.ts +44 -7
  390. package/src/molecule3d/ui/Molecule3DExport.tsx +3 -1
  391. package/src/molecule3d/ui/Molecule3DHelp.tsx +17 -6
  392. package/src/molecule3d/ui/Molecule3DOptions.tsx +13 -13
  393. package/src/molecule3d/ui/Molecule3DSurfaceColors.tsx +16 -13
  394. package/src/molecule3d/ui/Molecule3DToolbar.tsx +29 -18
  395. package/src/molecule3d/ui/MoleculeViewer3D.tsx +13 -8
  396. package/src/orbital/ui/AtomicOrbitalCanvas.tsx +3 -1
  397. package/src/orbital/ui/AtomicOrbitalControls.tsx +15 -20
  398. package/src/orbital/ui/AtomicOrbitalViewer.tsx +13 -13
  399. package/src/orbital/ui/capability.ts +10 -0
  400. package/src/overlay/ui/OverlayBar.tsx +7 -4
  401. package/src/overlay/ui/OverlayInfo.tsx +6 -3
  402. package/src/overlay/ui/OverlayPanel.tsx +10 -7
  403. package/src/overlay/ui/OverlayReadout.tsx +3 -1
  404. package/src/pedagogy/ui/ExerciseActions.tsx +16 -6
  405. package/src/pedagogy/ui/ExerciseProgressHeader.tsx +13 -11
  406. package/src/pedagogy/ui/GlossaryIndex.tsx +11 -12
  407. package/src/pedagogy/ui/HintLadder.tsx +15 -12
  408. package/src/pedagogy/ui/SyntaxTooltip.tsx +9 -7
  409. package/src/pedagogy/ui/TutorialStepStrip.tsx +8 -3
  410. package/src/periodic/ui/CategoryLegend.tsx +6 -1
  411. package/src/periodic/ui/ElementCell.tsx +7 -1
  412. package/src/periodic/ui/PeriodicTable.tsx +3 -1
  413. package/src/periodic/ui/PeriodicTableChrome.tsx +4 -2
  414. package/src/share/ui/ShareButton.tsx +8 -5
  415. package/src/share/ui/ShareConfigOptions.tsx +6 -7
  416. package/src/share/ui/ShareDialog.tsx +3 -1
  417. package/src/share/ui/ShareDialogContent.tsx +20 -10
  418. package/src/share/ui/SharePresetTabs.tsx +3 -1
  419. package/src/slides/ui/BackToSlides.tsx +4 -2
  420. package/src/slides/ui/EmbedSlide.tsx +3 -3
  421. package/src/slides/ui/Slide.tsx +3 -1
  422. package/src/slides/ui/SlideshowBar.tsx +12 -4
  423. package/src/slides/ui/TalkList.tsx +8 -10
  424. package/src/structure/core/editorGuide.ts +126 -19
  425. package/src/structure/core/editorToolbar.ts +52 -24
  426. package/src/structure/ui/EditorHelpButton.tsx +9 -4
  427. package/src/structure/ui/StructureEditor.tsx +7 -1
  428. package/src/structure/ui/StructureEditorHelp.tsx +34 -11
  429. package/src/structure/ui/ToolbarTooltip.tsx +8 -4
  430. package/src/translate/core/index.ts +1 -1
  431. package/src/translate/core/start.ts +65 -3
  432. 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 { pluralize } from '../../format/core/words.ts';
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 = 'The table, as text',
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 ?? defaultDescription(rows.length)}
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}>Separator</span>
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="Save"
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 content={text} label="Copy" icon="clipboard" small />
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 'Save this figure'
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 'Save figure'
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 = 'Save this figure', title = 'Save figure' } = props;
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 { HelpContent } from '../../help/ui/HelpBody.tsx';
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="Save"
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="Format"
88
- help={FORMAT_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="Resolution"
95
- help={RESOLUTION_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 'There is no figure on the page to save yet.';
170
+ if (size === null) return t('download.noFigure');
169
171
  if (format === 'svg' && rasterSvg) {
170
- return `An SVG holding a picture of ${formatFigurePixels(figurePixels(size, scale))}: a 3D scene has no vector form.`;
172
+ return t('download.hintRasterSvg', {
173
+ pixels: formatFigurePixels(figurePixels(size, scale)),
174
+ });
171
175
  }
172
176
  if (format === 'svg') {
173
- return `An SVG stays sharp at any size, so the resolution does not apply. Drawn ${formatFigurePixels(size)}.`;
177
+ return t('download.hintSvg', { pixels: formatFigurePixels(size) });
174
178
  }
175
- return `Saved ${formatFigurePixels(figurePixels(size, scale))}.`;
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
- brandAlt: '#b91c1c',
124
- mark: { plate: '#4d7c0f', accent: '#b91c1c' },
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 'Tools'
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 = 'Tools', className, ...rest } = props;
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 'Our other tools'
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
- className,
94
- currentSiteId,
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={heading}
101
+ aria-label={title}
104
102
  >
105
- <h2 style={ECOSYSTEM_HEADING_STYLE}>{heading}</h2>
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}>{group.label}</span>
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}>Our tools, all in the browser</div>
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}>{group.blurb}</p>
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
- you are here
124
+ {t('ecosystem.youAreHere')}
123
125
  </span>
124
126
  ) : null}
125
127
  </div>
126
- <div style={TAGLINE_STYLE}>{site.tagline}</div>
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
- // Two groups of samples with the outline that holds each: the picture the
183
- // tool exists to draw. One is drawn and one is filled rather than both
184
- // outlined, because two rings crossing close up into a blob at 16 px —
185
- // checked at 16, 20, 24, 32 and 64 before this was settled on.
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
- <ellipse
189
- cx="12"
190
- cy="12.5"
191
- rx="5.8"
192
- ry="9"
193
- fill="none"
194
- stroke="#ffffff"
195
- strokeWidth="3"
196
- transform="rotate(-32 12 12.5)"
197
- />
198
- <ellipse
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 'Something went wrong'
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 'Try again'
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
- error,
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 === '' ? 'No message was given.' : 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 icon="refresh" text={retryLabel} onClick={onRetry} />
58
+ <Button
59
+ icon="refresh"
60
+ text={retryLabel ?? t('error.tryAgain')}
61
+ onClick={onRetry}
62
+ />
62
63
  )
63
64
  }
64
65
  />
@@ -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
- Learn more
106
+ {t('help.learnMore')}
105
107
  </a>
106
108
  )}
107
109
  </div>
@@ -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 `'Help'` when it has none
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 = helpName(content),
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
  />
@@ -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(content: HelpContent): string {
10
- return content.title ?? 'Help';
14
+ export function helpName(
15
+ content: HelpContent,
16
+ t: Translate<ChromeKey>,
17
+ ): string {
18
+ return content.title ?? t('help.label');
11
19
  }