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
@@ -8,6 +8,7 @@ import { SegmentedControl, Slider } from '@blueprintjs/core';
8
8
  import type { CSSProperties, ReactElement } from 'react';
9
9
 
10
10
  import { formatDecimal } from '../../format/core/numbers.ts';
11
+ import { useChromeT } from '../../i18n/ui/useT.ts';
11
12
  import type { Molecule3DSettings } from '../core/settings.ts';
12
13
  import {
13
14
  MOLECULE_3D_RANGES,
@@ -33,6 +34,7 @@ export interface Molecule3DOptionsProps {
33
34
  */
34
35
  export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
35
36
  const { settings, onChange, polarSurfaceArea } = props;
37
+ const t = useChromeT();
36
38
 
37
39
  return (
38
40
  <div style={PANEL_STYLE}>
@@ -40,7 +42,13 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
40
42
  fill
41
43
  size="small"
42
44
  intent="primary"
43
- options={REPRESENTATION_OPTIONS}
45
+ options={REPRESENTATIONS.map((representation) => ({
46
+ value: representation,
47
+ label: t.or(
48
+ `molecule3d.representation.${representation}`,
49
+ REPRESENTATION_LABELS[representation],
50
+ ),
51
+ }))}
44
52
  value={settings.representation}
45
53
  onValueChange={(value) => {
46
54
  if (isRepresentationId(value)) {
@@ -50,7 +58,7 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
50
58
  />
51
59
  <div style={GRID_STYLE}>
52
60
  <SliderRow
53
- label="Size"
61
+ label={t('molecule3d.size')}
54
62
  range={MOLECULE_3D_RANGES.sizeFactor}
55
63
  digits={1}
56
64
  value={settings.sizeFactor}
@@ -60,7 +68,7 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
60
68
  }}
61
69
  />
62
70
  <SliderRow
63
- label="Surface opacity"
71
+ label={t('molecule3d.surfaceOpacity')}
64
72
  range={MOLECULE_3D_RANGES.surfaceAlpha}
65
73
  digits={2}
66
74
  value={settings.surfaceAlpha}
@@ -71,8 +79,8 @@ export function Molecule3DOptions(props: Molecule3DOptionsProps): ReactElement {
71
79
  }}
72
80
  />
73
81
  <SliderRow
74
- label="Solvent probe [Å]"
75
- title={PROBE_HELP}
82
+ label={t('molecule3d.solventProbe')}
83
+ title={t('molecule3d.solventProbeHelp')}
76
84
  range={MOLECULE_3D_RANGES.probeRadius}
77
85
  digits={1}
78
86
  value={settings.probeRadius}
@@ -132,14 +140,6 @@ function SliderRow(props: SliderRowProps): ReactElement {
132
140
  );
133
141
  }
134
142
 
135
- const REPRESENTATION_OPTIONS = REPRESENTATIONS.map((representation) => ({
136
- value: representation,
137
- label: REPRESENTATION_LABELS[representation],
138
- }));
139
-
140
- const PROBE_HELP =
141
- 'Radius of the solvent sphere rolled over the atoms. 1.4 Å is a water molecule; a larger probe smooths the surface and closes the narrow pockets.';
142
-
143
143
  const PANEL_STYLE: CSSProperties = {
144
144
  display: 'flex',
145
145
  flexDirection: 'column',
@@ -9,6 +9,7 @@ import type { CSSProperties, ReactElement } from 'react';
9
9
  import { ColorPickerDropdown } from 'react-science/ui';
10
10
 
11
11
  import { formatDecimal } from '../../format/core/numbers.ts';
12
+ import { useChromeT } from '../../i18n/ui/useT.ts';
12
13
  import type { Molecule3DSettings } from '../core/settings.ts';
13
14
  import {
14
15
  SURFACE_CHARGE_COLORS,
@@ -34,17 +35,24 @@ export function Molecule3DSurfaceColors(
34
35
  props: Molecule3DSurfaceColorsProps,
35
36
  ): ReactElement {
36
37
  const { settings, onChange, polarSurfaceArea } = props;
38
+ const t = useChromeT();
37
39
  const disabled = !settings.showSurface;
38
40
  const { surfaceColoring, surfaceColor } = settings;
39
41
 
40
42
  return (
41
43
  <div style={SECTION_STYLE}>
42
- <span style={LABEL_STYLE}>Surface colour</span>
44
+ <span style={LABEL_STYLE}>{t('molecule3d.surfaceColour')}</span>
43
45
  <SegmentedControl
44
46
  fill
45
47
  size="small"
46
48
  disabled={disabled}
47
- options={COLORING_OPTIONS}
49
+ options={SURFACE_COLORINGS.map((coloring) => ({
50
+ value: coloring,
51
+ label: t.or(
52
+ `molecule3d.coloring.${coloring}`,
53
+ SURFACE_COLORING_LABELS[coloring],
54
+ ),
55
+ }))}
48
56
  value={surfaceColoring}
49
57
  onValueChange={(value) => {
50
58
  if (isSurfaceColoringId(value)) {
@@ -54,7 +62,7 @@ export function Molecule3DSurfaceColors(
54
62
  />
55
63
  {surfaceColoring === 'uniform' && (
56
64
  <span style={ROW_STYLE}>
57
- <span style={LABEL_STYLE}>Colour</span>
65
+ <span style={LABEL_STYLE}>{t('molecule3d.colour')}</span>
58
66
  {disabled ? (
59
67
  <span style={{ ...SWATCH_STYLE, background: surfaceColor }} />
60
68
  ) : (
@@ -76,11 +84,14 @@ export function Molecule3DSurfaceColors(
76
84
  <span style={ROW_STYLE} data-testid="molecule3d-polarity-legend">
77
85
  <LegendItem color={SURFACE_CHARGE_COLORS.positive} label="δ+" />
78
86
  <LegendItem color={SURFACE_CHARGE_COLORS.negative} label="δ−" />
79
- <LegendItem color={SURFACE_CHARGE_COLORS.neutral} label="neutral" />
87
+ <LegendItem
88
+ color={SURFACE_CHARGE_COLORS.neutral}
89
+ label={t('molecule3d.neutral')}
90
+ />
80
91
  </span>
81
92
  <span
82
93
  style={LABEL_STYLE}
83
- title={TPSA_HELP}
94
+ title={t('molecule3d.tpsaHelp')}
84
95
  data-testid="molecule3d-tpsa-value"
85
96
  >
86
97
  TPSA:{' '}
@@ -103,14 +114,6 @@ function LegendItem(props: { color: string; label: string }): ReactElement {
103
114
  );
104
115
  }
105
116
 
106
- const COLORING_OPTIONS = SURFACE_COLORINGS.map((coloring) => ({
107
- value: coloring,
108
- label: SURFACE_COLORING_LABELS[coloring],
109
- }));
110
-
111
- const TPSA_HELP =
112
- 'Topological polar surface area (Ertl): the area contributed by nitrogen, oxygen and their hydrogens, computed from the structure by openchemlib. It does not depend on the conformer or the probe.';
113
-
114
117
  const SECTION_STYLE: CSSProperties = {
115
118
  display: 'flex',
116
119
  flexDirection: 'column',
@@ -9,6 +9,7 @@ import { Card } from '@blueprintjs/core';
9
9
  import type { CSSProperties, ReactElement } from 'react';
10
10
  import { Toolbar } from 'react-science/ui';
11
11
 
12
+ import { useChromeT } from '../../i18n/ui/useT.ts';
12
13
  import type { MeasurementKind } from '../core/measurement.ts';
13
14
  import {
14
15
  MEASUREMENT_ATOM_COUNTS,
@@ -62,6 +63,7 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
62
63
  options,
63
64
  exportPanel,
64
65
  } = props;
66
+ const t = useChromeT();
65
67
  const hasView =
66
68
  tools.spin ||
67
69
  tools.surface ||
@@ -74,12 +76,12 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
74
76
  <div style={COLUMN_STYLE}>
75
77
  {hasView && (
76
78
  <Card elevation={1} style={CARD_STYLE}>
77
- <Toolbar vertical aria-label="View">
79
+ <Toolbar vertical aria-label={t('molecule3d.view')}>
78
80
  {tools.reset && (
79
81
  <Toolbar.Item
80
82
  icon="zoom-to-fit"
81
- aria-label="Reset view"
82
- tooltip="Reset view"
83
+ aria-label={t('molecule3d.resetView')}
84
+ tooltip={t('molecule3d.resetView')}
83
85
  tooltipProps={TOOLTIP_PROPS}
84
86
  onClick={onResetView}
85
87
  />
@@ -88,8 +90,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
88
90
  <Toolbar.Item
89
91
  icon="refresh"
90
92
  active={spinning}
91
- aria-label="Spin"
92
- tooltip="Spin"
93
+ aria-label={t('molecule3d.spin')}
94
+ tooltip={t('molecule3d.spin')}
93
95
  tooltipProps={TOOLTIP_PROPS}
94
96
  onClick={() => {
95
97
  onSpinningChange(!spinning);
@@ -100,8 +102,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
100
102
  <Toolbar.Item
101
103
  icon={<SurfaceIcon />}
102
104
  active={showSurface}
103
- aria-label="Surface"
104
- tooltip="Molecular surface"
105
+ aria-label={t('molecule3d.surface')}
106
+ tooltip={t('molecule3d.molecularSurface')}
105
107
  tooltipProps={TOOLTIP_PROPS}
106
108
  onClick={() => {
107
109
  onShowSurfaceChange(!showSurface);
@@ -114,8 +116,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
114
116
  content={options}
115
117
  itemProps={{
116
118
  icon: 'cog',
117
- 'aria-label': 'Display options',
118
- tooltip: 'Display options',
119
+ 'aria-label': t('molecule3d.displayOptions'),
120
+ tooltip: t('molecule3d.displayOptions'),
119
121
  tooltipProps: TOOLTIP_PROPS,
120
122
  }}
121
123
  />
@@ -126,8 +128,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
126
128
  content={exportPanel}
127
129
  itemProps={{
128
130
  icon: 'download',
129
- 'aria-label': 'Export image',
130
- tooltip: 'Export image',
131
+ 'aria-label': t('molecule3d.exportImage'),
132
+ tooltip: t('molecule3d.exportImage'),
131
133
  tooltipProps: TOOLTIP_PROPS,
132
134
  }}
133
135
  />
@@ -138,8 +140,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
138
140
  content={<Molecule3DHelp />}
139
141
  itemProps={{
140
142
  icon: 'help',
141
- 'aria-label': 'Mouse and keyboard',
142
- tooltip: 'Mouse and keyboard',
143
+ 'aria-label': t('structure.mouseAndKeyboard'),
144
+ tooltip: t('structure.mouseAndKeyboard'),
143
145
  tooltipProps: TOOLTIP_PROPS,
144
146
  }}
145
147
  />
@@ -149,14 +151,23 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
149
151
  )}
150
152
  {tools.measure && (
151
153
  <Card elevation={1} style={CARD_STYLE}>
152
- <Toolbar vertical aria-label="Measure">
154
+ <Toolbar vertical aria-label={t('molecule3d.measure')}>
153
155
  {MEASUREMENT_KINDS.map((kind) => (
154
156
  <Toolbar.Item
155
157
  key={kind}
156
158
  icon={<MeasureIcon kind={kind} />}
157
159
  active={measureKind === kind}
158
- aria-label={MEASUREMENT_LABELS[kind]}
159
- tooltip={`${MEASUREMENT_LABELS[kind]}: click ${MEASUREMENT_ATOM_COUNTS[kind]} atoms`}
160
+ aria-label={t.or(
161
+ `molecule3d.measurement.${kind}`,
162
+ MEASUREMENT_LABELS[kind],
163
+ )}
164
+ tooltip={t('molecule3d.measurementTooltip', {
165
+ what: t.or(
166
+ `molecule3d.measurement.${kind}`,
167
+ MEASUREMENT_LABELS[kind],
168
+ ),
169
+ atoms: MEASUREMENT_ATOM_COUNTS[kind],
170
+ })}
160
171
  tooltipProps={TOOLTIP_PROPS}
161
172
  onClick={() => {
162
173
  onMeasureKindChange(measureKind === kind ? null : kind);
@@ -166,8 +177,8 @@ export function Molecule3DToolbar(props: Molecule3DToolbarProps): ReactElement {
166
177
  <Toolbar.Item
167
178
  icon={<ClearMeasurementsIcon />}
168
179
  disabled={measurementCount === 0}
169
- aria-label="Remove all measurements"
170
- tooltip="Remove all measurements"
180
+ aria-label={t('molecule3d.clearMeasurements')}
181
+ tooltip={t('molecule3d.clearMeasurements')}
171
182
  tooltipProps={TOOLTIP_PROPS}
172
183
  onClick={onClearMeasurements}
173
184
  />
@@ -22,6 +22,7 @@ import { Suspense, lazy, useState } from 'react';
22
22
 
23
23
  // Deep import on purpose: `capability.ts` imports nothing, while the canvas
24
24
  // pulls molstar in — which is exactly what this probe exists to avoid.
25
+ import { useChromeT } from '../../i18n/ui/useT.ts';
25
26
  import { probeViewerCapability } from '../../orbital/ui/capability.ts';
26
27
 
27
28
  import type { MoleculeViewer3DProps } from './moleculeViewer3DProps.ts';
@@ -37,29 +38,33 @@ const MoleculeCanvas3D = lazy(async () => {
37
38
  * @returns The viewer, or an explanation of why this machine cannot show one.
38
39
  */
39
40
  export function MoleculeViewer3D(props: MoleculeViewer3DProps): ReactElement {
40
- const {
41
- fallback = 'Loading the 3D viewer…',
42
- renderUnsupported,
43
- ...canvas
44
- } = props;
41
+ const { fallback, renderUnsupported, ...canvas } = props;
42
+ const t = useChromeT();
45
43
  const [capability] = useState(probeViewerCapability);
46
44
  const [failure, setFailure] = useState<string | null>(null);
47
45
 
48
46
  if (!capability.supported) {
49
47
  return (
50
48
  <Callout intent="warning" compact>
51
- {renderUnsupported?.(capability) ?? capability.message}
49
+ {renderUnsupported?.(capability) ??
50
+ t.or(`viewer.capability.${capability.reason}`, capability.message)}
52
51
  </Callout>
53
52
  );
54
53
  }
55
54
 
56
55
  return (
57
56
  <div style={ROOT_STYLE}>
58
- <Suspense fallback={<div style={NOTE_STYLE}>{fallback}</div>}>
57
+ <Suspense
58
+ fallback={
59
+ <div style={NOTE_STYLE}>
60
+ {fallback ?? t('molecule3d.loadingViewer')}
61
+ </div>
62
+ }
63
+ >
59
64
  <MoleculeCanvas3D {...canvas} onFailureChange={setFailure} />
60
65
  </Suspense>
61
66
  {failure !== null && (
62
- <Callout intent="danger" compact title="The viewer could not draw this">
67
+ <Callout intent="danger" compact title={t('molecule3d.couldNotDraw')}>
63
68
  {failure}
64
69
  </Callout>
65
70
  )}
@@ -11,6 +11,7 @@ import { useEffect, useRef, useState } from 'react';
11
11
 
12
12
  import { errorMessage } from '../../error/core/index.ts';
13
13
  import { useResizeObserver } from '../../hooks/ui/useResizeObserver.ts';
14
+ import { useChromeT } from '../../i18n/ui/useT.ts';
14
15
  import { TOKEN } from '../../tokens/core/familyTokens.ts';
15
16
  import type { ResolutionLimits } from '../core/atomicGrid.ts';
16
17
  import type { PhasePalette } from '../core/palette.ts';
@@ -115,6 +116,7 @@ export function AtomicOrbitalCanvas(
115
116
  onFailureChange,
116
117
  } = props;
117
118
 
119
+ const t = useChromeT();
118
120
  const containerRef = useRef<HTMLDivElement>(null);
119
121
  const viewerRef = useRef<OrbitalViewer | null>(null);
120
122
  const [drawn, setDrawn] = useState<string | null>(null);
@@ -201,7 +203,7 @@ export function AtomicOrbitalCanvas(
201
203
 
202
204
  return (
203
205
  <div ref={containerRef} style={CANVAS_STYLE}>
204
- {busy && <div style={BUSY_STYLE}>Sampling…</div>}
206
+ {busy && <div style={BUSY_STYLE}>{t('orbital.sampling')}</div>}
205
207
  <AtomicOrbitalControls
206
208
  axes={axes}
207
209
  onToggleAxes={() => {
@@ -9,6 +9,7 @@ import type { CSSProperties, ReactElement } from 'react';
9
9
 
10
10
  import type { HelpContent } from '../../help/ui/HelpBody.tsx';
11
11
  import { HelpTooltip } from '../../help/ui/HelpTooltip.tsx';
12
+ import { useChromeT } from '../../i18n/ui/useT.ts';
12
13
 
13
14
  /** Props of {@link AtomicOrbitalControls}. */
14
15
  interface AtomicOrbitalControlsProps {
@@ -29,25 +30,35 @@ export function AtomicOrbitalControls(
29
30
  props: AtomicOrbitalControlsProps,
30
31
  ): ReactElement {
31
32
  const { axes, onToggleAxes, onResetView } = props;
33
+ const t = useChromeT();
34
+ const axesHelp: HelpContent = {
35
+ title: t('orbital.axesTitle'),
36
+ body: t('orbital.axesBody'),
37
+ example: { code: '3d_yz', note: t('orbital.axesExample') },
38
+ };
39
+ const resetHelp: HelpContent = {
40
+ title: t('orbital.resetTitle'),
41
+ body: t('orbital.resetBody'),
42
+ };
32
43
  return (
33
44
  <div style={CONTROLS_STYLE}>
34
- <HelpTooltip content={AXES_HELP} placement="bottom">
45
+ <HelpTooltip content={axesHelp} placement="bottom">
35
46
  <Button
36
47
  variant="minimal"
37
48
  size="small"
38
49
  icon="grid"
39
50
  active={axes}
40
- aria-label="Show the x, y, z axes"
51
+ aria-label={t('orbital.showAxes')}
41
52
  aria-pressed={axes}
42
53
  onClick={onToggleAxes}
43
54
  />
44
55
  </HelpTooltip>
45
- <HelpTooltip content={RESET_HELP} placement="bottom">
56
+ <HelpTooltip content={resetHelp} placement="bottom">
46
57
  <Button
47
58
  variant="minimal"
48
59
  size="small"
49
60
  icon="zoom-to-fit"
50
- aria-label="Reset the view"
61
+ aria-label={t('orbital.resetTitle')}
51
62
  onClick={onResetView}
52
63
  />
53
64
  </HelpTooltip>
@@ -55,22 +66,6 @@ export function AtomicOrbitalControls(
55
66
  );
56
67
  }
57
68
 
58
- /** What the frame button says it is for. */
59
- const AXES_HELP: HelpContent = {
60
- title: 'Cartesian axes',
61
- body: 'Draw x, y and z through the nucleus. The label names an orbital by where its lobes sit against them.',
62
- example: {
63
- code: '3d_yz',
64
- note: 'four lobes between the y and z axes, none on either.',
65
- },
66
- };
67
-
68
- /** What the reset button says it is for. */
69
- const RESET_HELP: HelpContent = {
70
- title: 'Reset the view',
71
- body: 'Back to the angle and zoom the orbital opened on. A change of orbital keeps whatever view you have turned it to.',
72
- };
73
-
74
69
  const CONTROLS_STYLE: CSSProperties = {
75
70
  position: 'absolute',
76
71
  top: 4,
@@ -19,6 +19,7 @@ import { Callout } from '@blueprintjs/core';
19
19
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
20
20
  import { Suspense, lazy, useState } from 'react';
21
21
 
22
+ import { useChromeT } from '../../i18n/ui/useT.ts';
22
23
  import { TOKEN } from '../../tokens/core/familyTokens.ts';
23
24
  import type { ResolutionLimits } from '../core/atomicGrid.ts';
24
25
  import type { PhasePalette } from '../core/palette.ts';
@@ -116,34 +117,33 @@ export interface AtomicOrbitalViewerProps {
116
117
  export function AtomicOrbitalViewer(
117
118
  props: AtomicOrbitalViewerProps,
118
119
  ): ReactElement {
119
- const {
120
- fallback = 'Loading the 3D viewer…',
121
- renderUnsupported,
122
- className,
123
- ...canvas
124
- } = props;
120
+ const { fallback, renderUnsupported, className, ...canvas } = props;
121
+ const t = useChromeT();
125
122
  const [capability] = useState(probeViewerCapability);
126
123
  const [failure, setFailure] = useState<string | null>(null);
127
124
 
128
125
  if (!capability.supported) {
129
126
  return (
130
127
  <Callout intent="warning" compact className={className}>
131
- {renderUnsupported?.(capability) ?? capability.message}
128
+ {renderUnsupported?.(capability) ??
129
+ t.or(`viewer.capability.${capability.reason}`, capability.message)}
132
130
  </Callout>
133
131
  );
134
132
  }
135
133
 
136
134
  return (
137
135
  <div className={className} style={ROOT_STYLE}>
138
- <Suspense fallback={<div style={NOTE_STYLE}>{fallback}</div>}>
136
+ <Suspense
137
+ fallback={
138
+ <div style={NOTE_STYLE}>
139
+ {fallback ?? t('molecule3d.loadingViewer')}
140
+ </div>
141
+ }
142
+ >
139
143
  <AtomicOrbitalCanvas {...canvas} onFailureChange={setFailure} />
140
144
  </Suspense>
141
145
  {failure !== null && (
142
- <Callout
143
- intent="danger"
144
- compact
145
- title="This orbital could not be drawn"
146
- >
146
+ <Callout intent="danger" compact title={t('orbital.couldNotDraw')}>
147
147
  {failure}
148
148
  </Callout>
149
149
  )}
@@ -9,8 +9,14 @@
9
9
  * page can ask the question before paying for molstar.
10
10
  */
11
11
 
12
+ /** Why the machine is in the state it is, as the catalog names it. */
13
+ export type ViewerCapabilityReason =
14
+ 'noWindow' | 'noContext' | 'noFloatTextures' | 'ready';
15
+
12
16
  /** What the machine can do, and what to tell the student. */
13
17
  export interface ViewerCapability {
18
+ /** Which of the four states this is, so the message can be translated. */
19
+ reason: ViewerCapabilityReason;
14
20
  /** A 3D scene can be rendered at all. Everything else is degradation. */
15
21
  supported: boolean;
16
22
  /**
@@ -29,6 +35,7 @@ export interface ViewerCapability {
29
35
  export function probeViewerCapability(): ViewerCapability {
30
36
  if (typeof document === 'undefined') {
31
37
  return {
38
+ reason: 'noWindow',
32
39
  supported: false,
33
40
  gpuOrbitals: false,
34
41
  message: 'The 3D viewer needs a browser window.',
@@ -38,6 +45,7 @@ export function probeViewerCapability(): ViewerCapability {
38
45
  const probe = getContext(canvas);
39
46
  if (probe === null) {
40
47
  return {
48
+ reason: 'noContext',
41
49
  supported: false,
42
50
  gpuOrbitals: false,
43
51
  message:
@@ -48,6 +56,7 @@ export function probeViewerCapability(): ViewerCapability {
48
56
  loseContext(probe.context);
49
57
  if (!gpuOrbitals) {
50
58
  return {
59
+ reason: 'noFloatTextures',
51
60
  supported: true,
52
61
  gpuOrbitals: false,
53
62
  message:
@@ -55,6 +64,7 @@ export function probeViewerCapability(): ViewerCapability {
55
64
  };
56
65
  }
57
66
  return {
67
+ reason: 'ready',
58
68
  supported: true,
59
69
  gpuOrbitals: true,
60
70
  message: 'This browser can render the 3D viewer and computed orbitals.',
@@ -2,6 +2,7 @@ import type { IconName } from '@blueprintjs/core';
2
2
  import type { ReactElement, ReactNode } from 'react';
3
3
  import { useState } from 'react';
4
4
 
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
  import { overlayBarFolded } from '../core/overlayCollapse.ts';
6
7
  import type { OverlayPlacement } from '../core/overlayPlacement.ts';
7
8
 
@@ -59,7 +60,7 @@ export interface OverlayBarProps {
59
60
  /**
60
61
  * What the group of controls is called, for a reader arriving by tab and for
61
62
  * the button the bar folds into.
62
- * @default 'Options'
63
+ * @default the chrome's own word for it, in the language of the page
63
64
  */
64
65
  label?: string;
65
66
  /**
@@ -129,7 +130,9 @@ export interface OverlayBarProps {
129
130
  export function OverlayBar(props: OverlayBarProps): ReactElement {
130
131
  const { children, end, tools, info, more } = props;
131
132
  const { placement = 'top-right' } = props;
132
- const { label = 'Options', restingOpacity = OVERLAY_RESTING_OPACITY } = props;
133
+ const { label, restingOpacity = OVERLAY_RESTING_OPACITY } = props;
134
+ const t = useChromeT();
135
+ const name = label ?? t('overlay.options');
133
136
  const { collapsed, defaultCollapsed = false } = props;
134
137
  const { collapseBelow = 420, moreIcon = 'cog', testId } = props;
135
138
  const { morePadded = true } = props;
@@ -151,7 +154,7 @@ export function OverlayBar(props: OverlayBarProps): ReactElement {
151
154
  info={info}
152
155
  more={more}
153
156
  placement={placement}
154
- label={label}
157
+ label={name}
155
158
  moreIcon={moreIcon}
156
159
  morePadded={morePadded}
157
160
  folded={folded}
@@ -169,7 +172,7 @@ export function OverlayBar(props: OverlayBarProps): ReactElement {
169
172
  info={info}
170
173
  more={more}
171
174
  placement={placement}
172
- label={label}
175
+ label={name}
173
176
  moreIcon={moreIcon}
174
177
  morePadded={morePadded}
175
178
  folded={folded}
@@ -3,6 +3,7 @@ import { PopoverNext } from '@blueprintjs/core';
3
3
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
4
4
  import { useState } from 'react';
5
5
 
6
+ import { useChromeT } from '../../i18n/ui/useT.ts';
6
7
  import type { OverlayMetrics } from '../core/overlayMetrics.ts';
7
8
 
8
9
  import { OverlayIconButton } from './OverlayIconButton.tsx';
@@ -18,7 +19,7 @@ export interface OverlayInfoProps {
18
19
  /**
19
20
  * What the glyph is called, for the pointer and for a screen reader. Phrase
20
21
  * it as the question the reader has, not as the name of a feature.
21
- * @default 'What am I looking at?'
22
+ * @default the chrome's own line, in the language of the page
22
23
  */
23
24
  label?: string;
24
25
  /**
@@ -49,7 +50,9 @@ export interface OverlayInfoProps {
49
50
  * @returns The glyph and its explanation.
50
51
  */
51
52
  export function OverlayInfo(props: OverlayInfoProps): ReactElement {
52
- const { children, label = 'What am I looking at?' } = props;
53
+ const { children, label } = props;
54
+ const t = useChromeT();
55
+ const name = label ?? t('overlay.whatAmILookingAt');
53
56
  const { placement = 'bottom-end', testId } = props;
54
57
  const { metrics } = useOverlaySurface();
55
58
  const [open, setOpen] = useState(false);
@@ -62,7 +65,7 @@ export function OverlayInfo(props: OverlayInfoProps): ReactElement {
62
65
  >
63
66
  <OverlayIconButton
64
67
  icon="help"
65
- label={label}
68
+ label={name}
66
69
  active={open}
67
70
  testId={testId}
68
71
  opensMenu
@@ -3,6 +3,7 @@ import { useId, useMemo } from 'react';
3
3
 
4
4
  import type { HelpContent } from '../../help/ui/HelpBody.tsx';
5
5
  import { HelpIcon } from '../../help/ui/HelpIcon.tsx';
6
+ import { useChromeT } from '../../i18n/ui/useT.ts';
6
7
 
7
8
  import type { OverlayAction } from './OverlayAction.tsx';
8
9
  import type { OverlayGroup } from './OverlayGroup.tsx';
@@ -40,7 +41,7 @@ export interface OverlayPanelProps {
40
41
  onReset?: () => void;
41
42
  /**
42
43
  * What that way back reads.
43
- * @default 'Reset'
44
+ * @default the chrome's own word for it, in the language of the page
44
45
  */
45
46
  resetLabel?: string;
46
47
  /**
@@ -68,7 +69,7 @@ export interface OverlayPanelProps {
68
69
  * the panel says that the dotted names are offering anything, so one
69
70
  * sentence says it once. Pass `''` for a panel whose names carry no help at
70
71
  * all, where the line would be a promise the panel does not keep.
71
- * @default 'Hover a name for what it does.'
72
+ * @default the chrome's own line, in the language of the page
72
73
  */
73
74
  hint?: string;
74
75
  /**
@@ -101,8 +102,9 @@ export interface OverlayPanelProps {
101
102
  * @returns The panel.
102
103
  */
103
104
  export function OverlayPanel(props: OverlayPanelProps): ReactElement {
104
- const { title, children, onReset, resetLabel = 'Reset', help } = props;
105
- const { actions, hint = DEFAULT_HINT, nameWidth, testId } = props;
105
+ const { title, children, onReset, resetLabel, help } = props;
106
+ const t = useChromeT();
107
+ const { actions, hint, nameWidth, testId } = props;
106
108
  const { metrics } = useOverlaySurface();
107
109
  const titleId = useId();
108
110
  const reset = useOverlayInteraction();
@@ -134,7 +136,7 @@ export function OverlayPanel(props: OverlayPanelProps): ReactElement {
134
136
  onClick={onReset}
135
137
  {...reset.handlers}
136
138
  >
137
- {resetLabel}
139
+ {resetLabel ?? t('overlay.reset')}
138
140
  </button>
139
141
  )}
140
142
  </div>
@@ -143,7 +145,9 @@ export function OverlayPanel(props: OverlayPanelProps): ReactElement {
143
145
  {children}
144
146
  </OverlayPanelContext.Provider>
145
147
  {hint === '' ? null : (
146
- <p style={overlayPanelHintStyle(metrics)}>{hint}</p>
148
+ <p style={overlayPanelHintStyle(metrics)}>
149
+ {hint ?? t('overlay.hoverAName')}
150
+ </p>
147
151
  )}
148
152
  </div>
149
153
  {actions === undefined ? null : (
@@ -160,4 +164,3 @@ export function OverlayPanel(props: OverlayPanelProps): ReactElement {
160
164
  * the dotted underlines has already asked this question and one who has not
161
165
  * would not recognise a description of them.
162
166
  */
163
- const DEFAULT_HINT = 'Hover a name for what it does.';