react-cheminfo 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/README.md +73 -2
  2. package/bin/check-deploy.mjs +14 -4
  3. package/bin/check-messages.mjs +229 -0
  4. package/lib/about/ui/AboutBuild.d.ts.map +1 -1
  5. package/lib/about/ui/AboutBuild.js +15 -4
  6. package/lib/about/ui/AboutBuild.js.map +1 -1
  7. package/lib/about/ui/AboutCitations.d.ts.map +1 -1
  8. package/lib/about/ui/AboutCitations.js +3 -1
  9. package/lib/about/ui/AboutCitations.js.map +1 -1
  10. package/lib/about/ui/AboutPage.d.ts.map +1 -1
  11. package/lib/about/ui/AboutPage.js +9 -1
  12. package/lib/about/ui/AboutPage.js.map +1 -1
  13. package/lib/about/ui/AboutProvidedBy.d.ts.map +1 -1
  14. package/lib/about/ui/AboutProvidedBy.js +8 -3
  15. package/lib/about/ui/AboutProvidedBy.js.map +1 -1
  16. package/lib/capsule/ui/Capsule.d.ts +30 -0
  17. package/lib/capsule/ui/Capsule.d.ts.map +1 -0
  18. package/lib/capsule/ui/Capsule.js +12 -0
  19. package/lib/capsule/ui/Capsule.js.map +1 -0
  20. package/lib/capsule/ui/CapsuleFilter.d.ts +19 -3
  21. package/lib/capsule/ui/CapsuleFilter.d.ts.map +1 -1
  22. package/lib/capsule/ui/CapsuleFilter.js +14 -44
  23. package/lib/capsule/ui/CapsuleFilter.js.map +1 -1
  24. package/lib/capsule/ui/capsuleFilterCapsules.d.ts +15 -0
  25. package/lib/capsule/ui/capsuleFilterCapsules.d.ts.map +1 -0
  26. package/lib/capsule/ui/capsuleFilterCapsules.js +47 -0
  27. package/lib/capsule/ui/capsuleFilterCapsules.js.map +1 -0
  28. package/lib/chart/ui/ChartTrackingLayer.d.ts.map +1 -1
  29. package/lib/chart/ui/ChartTrackingLayer.js +4 -2
  30. package/lib/chart/ui/ChartTrackingLayer.js.map +1 -1
  31. package/lib/chrome/ui/SiteHeader.d.ts +1 -1
  32. package/lib/chrome/ui/SiteHeader.d.ts.map +1 -1
  33. package/lib/chrome/ui/SiteHeader.js +4 -2
  34. package/lib/chrome/ui/SiteHeader.js.map +1 -1
  35. package/lib/citation/ui/CitationMenu.d.ts +1 -1
  36. package/lib/citation/ui/CitationMenu.d.ts.map +1 -1
  37. package/lib/citation/ui/CitationMenu.js +7 -3
  38. package/lib/citation/ui/CitationMenu.js.map +1 -1
  39. package/lib/citation/ui/CiteButton.d.ts +1 -1
  40. package/lib/citation/ui/CiteButton.d.ts.map +1 -1
  41. package/lib/citation/ui/CiteButton.js +3 -1
  42. package/lib/citation/ui/CiteButton.js.map +1 -1
  43. package/lib/citation/ui/CopyFormatEntries.d.ts.map +1 -1
  44. package/lib/citation/ui/CopyFormatEntries.js +3 -1
  45. package/lib/citation/ui/CopyFormatEntries.js.map +1 -1
  46. package/lib/citation/ui/WorkEntry.d.ts.map +1 -1
  47. package/lib/citation/ui/WorkEntry.js +3 -1
  48. package/lib/citation/ui/WorkEntry.js.map +1 -1
  49. package/lib/citation/ui/entries.d.ts.map +1 -1
  50. package/lib/citation/ui/entries.js +8 -2
  51. package/lib/citation/ui/entries.js.map +1 -1
  52. package/lib/citation/ui/useCopyFeedback.d.ts.map +1 -1
  53. package/lib/citation/ui/useCopyFeedback.js +9 -4
  54. package/lib/citation/ui/useCopyFeedback.js.map +1 -1
  55. package/lib/clipboard/ui/ClickToCopy.d.ts.map +1 -1
  56. package/lib/clipboard/ui/ClickToCopy.js +12 -6
  57. package/lib/clipboard/ui/ClickToCopy.js.map +1 -1
  58. package/lib/clipboard/ui/CopyButton.d.ts +3 -3
  59. package/lib/clipboard/ui/CopyButton.d.ts.map +1 -1
  60. package/lib/clipboard/ui/CopyButton.js +7 -4
  61. package/lib/clipboard/ui/CopyButton.js.map +1 -1
  62. package/lib/color/ui/ColorScaleEditor.d.ts.map +1 -1
  63. package/lib/color/ui/ColorScaleEditor.js +15 -10
  64. package/lib/color/ui/ColorScaleEditor.js.map +1 -1
  65. package/lib/color/ui/ColorScaleEntry.d.ts.map +1 -1
  66. package/lib/color/ui/ColorScaleEntry.js +4 -2
  67. package/lib/color/ui/ColorScaleEntry.js.map +1 -1
  68. package/lib/color/ui/ColorScaleLegend.d.ts.map +1 -1
  69. package/lib/color/ui/ColorScaleLegend.js +7 -1
  70. package/lib/color/ui/ColorScaleLegend.js.map +1 -1
  71. package/lib/color/ui/ColorScaleSelect.d.ts.map +1 -1
  72. package/lib/color/ui/ColorScaleSelect.js +8 -4
  73. package/lib/color/ui/ColorScaleSelect.js.map +1 -1
  74. package/lib/confirm/ui/ConfirmButton.d.ts +2 -2
  75. package/lib/confirm/ui/ConfirmButton.d.ts.map +1 -1
  76. package/lib/confirm/ui/ConfirmButton.js +4 -2
  77. package/lib/confirm/ui/ConfirmButton.js.map +1 -1
  78. package/lib/core.d.ts +1 -0
  79. package/lib/core.d.ts.map +1 -1
  80. package/lib/core.js +1 -0
  81. package/lib/core.js.map +1 -1
  82. package/lib/credits/ui/CreditsList.d.ts.map +1 -1
  83. package/lib/credits/ui/CreditsList.js +3 -1
  84. package/lib/credits/ui/CreditsList.js.map +1 -1
  85. package/lib/delimited/ui/DelimitedTextDialog.d.ts.map +1 -1
  86. package/lib/delimited/ui/DelimitedTextDialog.js +5 -2
  87. package/lib/delimited/ui/DelimitedTextDialog.js.map +1 -1
  88. package/lib/delimited/ui/DelimitedTextPanel.d.ts.map +1 -1
  89. package/lib/delimited/ui/DelimitedTextPanel.js +8 -8
  90. package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -1
  91. package/lib/deploy/core/checkDeploy.d.ts +3 -1
  92. package/lib/deploy/core/checkDeploy.d.ts.map +1 -1
  93. package/lib/deploy/core/checkDeploy.js +7 -1
  94. package/lib/deploy/core/checkDeploy.js.map +1 -1
  95. package/lib/deploy/core/index.d.ts +1 -0
  96. package/lib/deploy/core/index.d.ts.map +1 -1
  97. package/lib/deploy/core/index.js +1 -0
  98. package/lib/deploy/core/index.js.map +1 -1
  99. package/lib/deploy/core/pageCache.d.ts +24 -0
  100. package/lib/deploy/core/pageCache.d.ts.map +1 -0
  101. package/lib/deploy/core/pageCache.js +91 -0
  102. package/lib/deploy/core/pageCache.js.map +1 -0
  103. package/lib/deploy/core/types.d.ts +1 -1
  104. package/lib/deploy/core/types.d.ts.map +1 -1
  105. package/lib/deploy/core/types.js.map +1 -1
  106. package/lib/download/ui/FigureDownload.d.ts +2 -2
  107. package/lib/download/ui/FigureDownload.d.ts.map +1 -1
  108. package/lib/download/ui/FigureDownload.js +4 -2
  109. package/lib/download/ui/FigureDownload.js.map +1 -1
  110. package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
  111. package/lib/download/ui/FigureDownloadPanel.js +24 -18
  112. package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
  113. package/lib/ecosystem/ui/EcosystemButton.d.ts +1 -1
  114. package/lib/ecosystem/ui/EcosystemButton.d.ts.map +1 -1
  115. package/lib/ecosystem/ui/EcosystemButton.js +4 -2
  116. package/lib/ecosystem/ui/EcosystemButton.js.map +1 -1
  117. package/lib/ecosystem/ui/EcosystemLinks.d.ts +1 -1
  118. package/lib/ecosystem/ui/EcosystemLinks.d.ts.map +1 -1
  119. package/lib/ecosystem/ui/EcosystemLinks.js +5 -2
  120. package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -1
  121. package/lib/ecosystem/ui/EcosystemMenu.d.ts.map +1 -1
  122. package/lib/ecosystem/ui/EcosystemMenu.js +3 -1
  123. package/lib/ecosystem/ui/EcosystemMenu.js.map +1 -1
  124. package/lib/ecosystem/ui/SiteGroupSection.d.ts.map +1 -1
  125. package/lib/ecosystem/ui/SiteGroupSection.js +3 -1
  126. package/lib/ecosystem/ui/SiteGroupSection.js.map +1 -1
  127. package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -1
  128. package/lib/ecosystem/ui/SiteTile.js +3 -1
  129. package/lib/ecosystem/ui/SiteTile.js.map +1 -1
  130. package/lib/error/ui/ErrorFallback.d.ts +2 -2
  131. package/lib/error/ui/ErrorFallback.d.ts.map +1 -1
  132. package/lib/error/ui/ErrorFallback.js +4 -2
  133. package/lib/error/ui/ErrorFallback.js.map +1 -1
  134. package/lib/help/ui/HelpBody.d.ts.map +1 -1
  135. package/lib/help/ui/HelpBody.js +3 -1
  136. package/lib/help/ui/HelpBody.js.map +1 -1
  137. package/lib/help/ui/HelpIcon.d.ts +2 -1
  138. package/lib/help/ui/HelpIcon.d.ts.map +1 -1
  139. package/lib/help/ui/HelpIcon.js +4 -2
  140. package/lib/help/ui/HelpIcon.js.map +1 -1
  141. package/lib/help/ui/HelpToolbarButton.d.ts.map +1 -1
  142. package/lib/help/ui/HelpToolbarButton.js +3 -1
  143. package/lib/help/ui/HelpToolbarButton.js.map +1 -1
  144. package/lib/help/ui/helpName.d.ts +5 -1
  145. package/lib/help/ui/helpName.d.ts.map +1 -1
  146. package/lib/help/ui/helpName.js +4 -2
  147. package/lib/help/ui/helpName.js.map +1 -1
  148. package/lib/i18n/core/chromeCatalog.d.ts +21 -0
  149. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -0
  150. package/lib/i18n/core/chromeCatalog.js +29 -0
  151. package/lib/i18n/core/chromeCatalog.js.map +1 -0
  152. package/lib/i18n/core/index.d.ts +12 -0
  153. package/lib/i18n/core/index.d.ts.map +1 -0
  154. package/lib/i18n/core/index.js +6 -0
  155. package/lib/i18n/core/index.js.map +1 -0
  156. package/lib/i18n/core/languages.d.ts +32 -0
  157. package/lib/i18n/core/languages.d.ts.map +1 -0
  158. package/lib/i18n/core/languages.js +41 -0
  159. package/lib/i18n/core/languages.js.map +1 -0
  160. package/lib/i18n/core/messageCatalog.d.ts +113 -0
  161. package/lib/i18n/core/messageCatalog.d.ts.map +1 -0
  162. package/lib/i18n/core/messageCatalog.js +135 -0
  163. package/lib/i18n/core/messageCatalog.js.map +1 -0
  164. package/lib/i18n/core/messageValues.d.ts +3 -0
  165. package/lib/i18n/core/messageValues.d.ts.map +1 -0
  166. package/lib/i18n/core/messageValues.js +2 -0
  167. package/lib/i18n/core/messageValues.js.map +1 -0
  168. package/lib/i18n/core/session.d.ts +51 -0
  169. package/lib/i18n/core/session.d.ts.map +1 -0
  170. package/lib/i18n/core/session.js +64 -0
  171. package/lib/i18n/core/session.js.map +1 -0
  172. package/lib/i18n/core/translateSetup.d.ts +28 -0
  173. package/lib/i18n/core/translateSetup.d.ts.map +1 -0
  174. package/lib/i18n/core/translateSetup.js +30 -0
  175. package/lib/i18n/core/translateSetup.js.map +1 -0
  176. package/lib/i18n/ui/LanguageSelect.d.ts +37 -0
  177. package/lib/i18n/ui/LanguageSelect.d.ts.map +1 -0
  178. package/lib/i18n/ui/LanguageSelect.js +27 -0
  179. package/lib/i18n/ui/LanguageSelect.js.map +1 -0
  180. package/lib/i18n/ui/index.d.ts +6 -0
  181. package/lib/i18n/ui/index.d.ts.map +1 -0
  182. package/lib/i18n/ui/index.js +4 -0
  183. package/lib/i18n/ui/index.js.map +1 -0
  184. package/lib/i18n/ui/useLanguage.d.ts +23 -0
  185. package/lib/i18n/ui/useLanguage.d.ts.map +1 -0
  186. package/lib/i18n/ui/useLanguage.js +36 -0
  187. package/lib/i18n/ui/useLanguage.js.map +1 -0
  188. package/lib/i18n/ui/useT.d.ts +47 -0
  189. package/lib/i18n/ui/useT.d.ts.map +1 -0
  190. package/lib/i18n/ui/useT.js +51 -0
  191. package/lib/i18n/ui/useT.js.map +1 -0
  192. package/lib/locales/de.json +442 -0
  193. package/lib/locales/en.json +442 -0
  194. package/lib/locales/es.json +442 -0
  195. package/lib/locales/fr.json +442 -0
  196. package/lib/molecule3d/core/gestures.d.ts +10 -0
  197. package/lib/molecule3d/core/gestures.d.ts.map +1 -1
  198. package/lib/molecule3d/core/gestures.js +39 -7
  199. package/lib/molecule3d/core/gestures.js.map +1 -1
  200. package/lib/molecule3d/ui/Molecule3DExport.d.ts.map +1 -1
  201. package/lib/molecule3d/ui/Molecule3DExport.js +3 -1
  202. package/lib/molecule3d/ui/Molecule3DExport.js.map +1 -1
  203. package/lib/molecule3d/ui/Molecule3DHelp.d.ts.map +1 -1
  204. package/lib/molecule3d/ui/Molecule3DHelp.js +7 -2
  205. package/lib/molecule3d/ui/Molecule3DHelp.js.map +1 -1
  206. package/lib/molecule3d/ui/Molecule3DOptions.d.ts.map +1 -1
  207. package/lib/molecule3d/ui/Molecule3DOptions.js +9 -9
  208. package/lib/molecule3d/ui/Molecule3DOptions.js.map +1 -1
  209. package/lib/molecule3d/ui/Molecule3DSurfaceColors.d.ts.map +1 -1
  210. package/lib/molecule3d/ui/Molecule3DSurfaceColors.js +8 -8
  211. package/lib/molecule3d/ui/Molecule3DSurfaceColors.js.map +1 -1
  212. package/lib/molecule3d/ui/Molecule3DToolbar.d.ts.map +1 -1
  213. package/lib/molecule3d/ui/Molecule3DToolbar.js +15 -10
  214. package/lib/molecule3d/ui/Molecule3DToolbar.js.map +1 -1
  215. package/lib/molecule3d/ui/MoleculeViewer3D.d.ts.map +1 -1
  216. package/lib/molecule3d/ui/MoleculeViewer3D.js +6 -3
  217. package/lib/molecule3d/ui/MoleculeViewer3D.js.map +1 -1
  218. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
  219. package/lib/orbital/ui/AtomicOrbitalCanvas.js +3 -1
  220. package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
  221. package/lib/orbital/ui/AtomicOrbitalControls.d.ts.map +1 -1
  222. package/lib/orbital/ui/AtomicOrbitalControls.js +12 -15
  223. package/lib/orbital/ui/AtomicOrbitalControls.js.map +1 -1
  224. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
  225. package/lib/orbital/ui/AtomicOrbitalViewer.js +6 -3
  226. package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
  227. package/lib/orbital/ui/capability.d.ts +4 -0
  228. package/lib/orbital/ui/capability.d.ts.map +1 -1
  229. package/lib/orbital/ui/capability.js +4 -0
  230. package/lib/orbital/ui/capability.js.map +1 -1
  231. package/lib/overlay/ui/OverlayBar.d.ts +1 -1
  232. package/lib/overlay/ui/OverlayBar.d.ts.map +1 -1
  233. package/lib/overlay/ui/OverlayBar.js +6 -3
  234. package/lib/overlay/ui/OverlayBar.js.map +1 -1
  235. package/lib/overlay/ui/OverlayInfo.d.ts +1 -1
  236. package/lib/overlay/ui/OverlayInfo.d.ts.map +1 -1
  237. package/lib/overlay/ui/OverlayInfo.js +5 -2
  238. package/lib/overlay/ui/OverlayInfo.js.map +1 -1
  239. package/lib/overlay/ui/OverlayPanel.d.ts +9 -2
  240. package/lib/overlay/ui/OverlayPanel.d.ts.map +1 -1
  241. package/lib/overlay/ui/OverlayPanel.js +5 -11
  242. package/lib/overlay/ui/OverlayPanel.js.map +1 -1
  243. package/lib/overlay/ui/OverlayReadout.d.ts.map +1 -1
  244. package/lib/overlay/ui/OverlayReadout.js +3 -1
  245. package/lib/overlay/ui/OverlayReadout.js.map +1 -1
  246. package/lib/pedagogy/ui/ExerciseActions.d.ts +1 -1
  247. package/lib/pedagogy/ui/ExerciseActions.d.ts.map +1 -1
  248. package/lib/pedagogy/ui/ExerciseActions.js +9 -2
  249. package/lib/pedagogy/ui/ExerciseActions.js.map +1 -1
  250. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts +1 -1
  251. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts.map +1 -1
  252. package/lib/pedagogy/ui/ExerciseProgressHeader.js +9 -5
  253. package/lib/pedagogy/ui/ExerciseProgressHeader.js.map +1 -1
  254. package/lib/pedagogy/ui/GlossaryIndex.d.ts +1 -1
  255. package/lib/pedagogy/ui/GlossaryIndex.d.ts.map +1 -1
  256. package/lib/pedagogy/ui/GlossaryIndex.js +6 -8
  257. package/lib/pedagogy/ui/GlossaryIndex.js.map +1 -1
  258. package/lib/pedagogy/ui/HintLadder.d.ts +2 -2
  259. package/lib/pedagogy/ui/HintLadder.d.ts.map +1 -1
  260. package/lib/pedagogy/ui/HintLadder.js +8 -2
  261. package/lib/pedagogy/ui/HintLadder.js.map +1 -1
  262. package/lib/pedagogy/ui/SyntaxTooltip.d.ts +4 -4
  263. package/lib/pedagogy/ui/SyntaxTooltip.d.ts.map +1 -1
  264. package/lib/pedagogy/ui/SyntaxTooltip.js +4 -2
  265. package/lib/pedagogy/ui/SyntaxTooltip.js.map +1 -1
  266. package/lib/pedagogy/ui/TutorialStepStrip.d.ts.map +1 -1
  267. package/lib/pedagogy/ui/TutorialStepStrip.js +7 -2
  268. package/lib/pedagogy/ui/TutorialStepStrip.js.map +1 -1
  269. package/lib/periodic/ui/CategoryLegend.d.ts.map +1 -1
  270. package/lib/periodic/ui/CategoryLegend.js +3 -1
  271. package/lib/periodic/ui/CategoryLegend.js.map +1 -1
  272. package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
  273. package/lib/periodic/ui/ElementCell.js +7 -1
  274. package/lib/periodic/ui/ElementCell.js.map +1 -1
  275. package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
  276. package/lib/periodic/ui/PeriodicTable.js +3 -1
  277. package/lib/periodic/ui/PeriodicTable.js.map +1 -1
  278. package/lib/periodic/ui/PeriodicTableChrome.d.ts.map +1 -1
  279. package/lib/periodic/ui/PeriodicTableChrome.js +4 -2
  280. package/lib/periodic/ui/PeriodicTableChrome.js.map +1 -1
  281. package/lib/share/ui/ShareButton.d.ts +2 -2
  282. package/lib/share/ui/ShareButton.d.ts.map +1 -1
  283. package/lib/share/ui/ShareButton.js +5 -2
  284. package/lib/share/ui/ShareButton.js.map +1 -1
  285. package/lib/share/ui/ShareConfigOptions.d.ts.map +1 -1
  286. package/lib/share/ui/ShareConfigOptions.js +4 -2
  287. package/lib/share/ui/ShareConfigOptions.js.map +1 -1
  288. package/lib/share/ui/ShareDialog.d.ts.map +1 -1
  289. package/lib/share/ui/ShareDialog.js +3 -1
  290. package/lib/share/ui/ShareDialog.js.map +1 -1
  291. package/lib/share/ui/ShareDialogContent.d.ts.map +1 -1
  292. package/lib/share/ui/ShareDialogContent.js +10 -1
  293. package/lib/share/ui/ShareDialogContent.js.map +1 -1
  294. package/lib/share/ui/SharePresetTabs.d.ts.map +1 -1
  295. package/lib/share/ui/SharePresetTabs.js +3 -1
  296. package/lib/share/ui/SharePresetTabs.js.map +1 -1
  297. package/lib/slides/ui/BackToSlides.d.ts.map +1 -1
  298. package/lib/slides/ui/BackToSlides.js +4 -2
  299. package/lib/slides/ui/BackToSlides.js.map +1 -1
  300. package/lib/slides/ui/EmbedSlide.d.ts.map +1 -1
  301. package/lib/slides/ui/EmbedSlide.js +3 -1
  302. package/lib/slides/ui/EmbedSlide.js.map +1 -1
  303. package/lib/slides/ui/Slide.d.ts.map +1 -1
  304. package/lib/slides/ui/Slide.js +3 -1
  305. package/lib/slides/ui/Slide.js.map +1 -1
  306. package/lib/slides/ui/SlideshowBar.d.ts.map +1 -1
  307. package/lib/slides/ui/SlideshowBar.js +5 -3
  308. package/lib/slides/ui/SlideshowBar.js.map +1 -1
  309. package/lib/slides/ui/TalkList.d.ts +1 -1
  310. package/lib/slides/ui/TalkList.d.ts.map +1 -1
  311. package/lib/slides/ui/TalkList.js +4 -2
  312. package/lib/slides/ui/TalkList.js.map +1 -1
  313. package/lib/structure/core/editorGuide.d.ts +14 -0
  314. package/lib/structure/core/editorGuide.d.ts.map +1 -1
  315. package/lib/structure/core/editorGuide.js +117 -19
  316. package/lib/structure/core/editorGuide.js.map +1 -1
  317. package/lib/structure/core/editorToolbar.d.ts +3 -1
  318. package/lib/structure/core/editorToolbar.d.ts.map +1 -1
  319. package/lib/structure/core/editorToolbar.js +44 -23
  320. package/lib/structure/core/editorToolbar.js.map +1 -1
  321. package/lib/structure/ui/EditorHelpButton.d.ts.map +1 -1
  322. package/lib/structure/ui/EditorHelpButton.js +3 -2
  323. package/lib/structure/ui/EditorHelpButton.js.map +1 -1
  324. package/lib/structure/ui/StructureEditor.d.ts.map +1 -1
  325. package/lib/structure/ui/StructureEditor.js +3 -1
  326. package/lib/structure/ui/StructureEditor.js.map +1 -1
  327. package/lib/structure/ui/StructureEditorHelp.d.ts.map +1 -1
  328. package/lib/structure/ui/StructureEditorHelp.js +12 -3
  329. package/lib/structure/ui/StructureEditorHelp.js.map +1 -1
  330. package/lib/structure/ui/ToolbarTooltip.d.ts.map +1 -1
  331. package/lib/structure/ui/ToolbarTooltip.js +5 -3
  332. package/lib/structure/ui/ToolbarTooltip.js.map +1 -1
  333. package/lib/ui.d.ts +1 -0
  334. package/lib/ui.d.ts.map +1 -1
  335. package/lib/ui.js +1 -0
  336. package/lib/ui.js.map +1 -1
  337. package/package.json +4 -2
  338. package/src/about/ui/AboutBuild.tsx +23 -16
  339. package/src/about/ui/AboutCitations.tsx +3 -1
  340. package/src/about/ui/AboutPage.tsx +38 -12
  341. package/src/about/ui/AboutProvidedBy.tsx +13 -3
  342. package/src/capsule/ui/Capsule.tsx +48 -0
  343. package/src/capsule/ui/CapsuleFilter.tsx +38 -114
  344. package/src/capsule/ui/capsuleFilterCapsules.tsx +110 -0
  345. package/src/chart/ui/ChartTrackingLayer.tsx +4 -2
  346. package/src/chrome/ui/SiteHeader.tsx +5 -3
  347. package/src/citation/ui/CitationMenu.tsx +9 -5
  348. package/src/citation/ui/CiteButton.tsx +4 -2
  349. package/src/citation/ui/CopyFormatEntries.tsx +3 -1
  350. package/src/citation/ui/WorkEntry.tsx +5 -3
  351. package/src/citation/ui/entries.tsx +9 -2
  352. package/src/citation/ui/useCopyFeedback.ts +11 -4
  353. package/src/clipboard/ui/ClickToCopy.tsx +15 -5
  354. package/src/clipboard/ui/CopyButton.tsx +14 -10
  355. package/src/color/ui/ColorScaleEditor.tsx +17 -15
  356. package/src/color/ui/ColorScaleEntry.tsx +7 -3
  357. package/src/color/ui/ColorScaleLegend.tsx +7 -1
  358. package/src/color/ui/ColorScaleSelect.tsx +12 -6
  359. package/src/confirm/ui/ConfirmButton.tsx +9 -11
  360. package/src/core.ts +1 -0
  361. package/src/credits/ui/CreditsList.tsx +5 -1
  362. package/src/delimited/ui/DelimitedTextDialog.tsx +10 -10
  363. package/src/delimited/ui/DelimitedTextPanel.tsx +19 -12
  364. package/src/deploy/core/checkDeploy.ts +7 -1
  365. package/src/deploy/core/index.ts +1 -0
  366. package/src/deploy/core/pageCache.ts +120 -0
  367. package/src/deploy/core/types.ts +2 -1
  368. package/src/download/ui/FigureDownload.tsx +7 -5
  369. package/src/download/ui/FigureDownloadPanel.tsx +31 -25
  370. package/src/ecosystem/ui/EcosystemButton.tsx +5 -3
  371. package/src/ecosystem/ui/EcosystemLinks.tsx +10 -10
  372. package/src/ecosystem/ui/EcosystemMenu.tsx +3 -1
  373. package/src/ecosystem/ui/SiteGroupSection.tsx +6 -2
  374. package/src/ecosystem/ui/SiteTile.tsx +6 -2
  375. package/src/error/ui/ErrorFallback.tsx +13 -12
  376. package/src/help/ui/HelpBody.tsx +4 -2
  377. package/src/help/ui/HelpIcon.tsx +6 -3
  378. package/src/help/ui/HelpToolbarButton.tsx +4 -1
  379. package/src/help/ui/helpName.ts +10 -2
  380. package/src/i18n/core/chromeCatalog.ts +35 -0
  381. package/src/i18n/core/index.ts +26 -0
  382. package/src/i18n/core/languages.ts +46 -0
  383. package/src/i18n/core/messageCatalog.ts +202 -0
  384. package/src/i18n/core/messageValues.ts +2 -0
  385. package/src/i18n/core/session.ts +82 -0
  386. package/src/i18n/core/translateSetup.ts +47 -0
  387. package/src/i18n/ui/LanguageSelect.tsx +72 -0
  388. package/src/i18n/ui/index.ts +9 -0
  389. package/src/i18n/ui/useLanguage.ts +48 -0
  390. package/src/i18n/ui/useT.ts +90 -0
  391. package/src/locales/de.json +442 -0
  392. package/src/locales/en.json +442 -0
  393. package/src/locales/es.json +442 -0
  394. package/src/locales/fr.json +442 -0
  395. package/src/molecule3d/core/gestures.ts +44 -7
  396. package/src/molecule3d/ui/Molecule3DExport.tsx +3 -1
  397. package/src/molecule3d/ui/Molecule3DHelp.tsx +17 -6
  398. package/src/molecule3d/ui/Molecule3DOptions.tsx +13 -13
  399. package/src/molecule3d/ui/Molecule3DSurfaceColors.tsx +16 -13
  400. package/src/molecule3d/ui/Molecule3DToolbar.tsx +29 -18
  401. package/src/molecule3d/ui/MoleculeViewer3D.tsx +13 -8
  402. package/src/orbital/ui/AtomicOrbitalCanvas.tsx +3 -1
  403. package/src/orbital/ui/AtomicOrbitalControls.tsx +15 -20
  404. package/src/orbital/ui/AtomicOrbitalViewer.tsx +13 -13
  405. package/src/orbital/ui/capability.ts +10 -0
  406. package/src/overlay/ui/OverlayBar.tsx +7 -4
  407. package/src/overlay/ui/OverlayInfo.tsx +6 -3
  408. package/src/overlay/ui/OverlayPanel.tsx +10 -7
  409. package/src/overlay/ui/OverlayReadout.tsx +3 -1
  410. package/src/pedagogy/ui/ExerciseActions.tsx +16 -6
  411. package/src/pedagogy/ui/ExerciseProgressHeader.tsx +13 -11
  412. package/src/pedagogy/ui/GlossaryIndex.tsx +11 -12
  413. package/src/pedagogy/ui/HintLadder.tsx +15 -12
  414. package/src/pedagogy/ui/SyntaxTooltip.tsx +9 -7
  415. package/src/pedagogy/ui/TutorialStepStrip.tsx +8 -3
  416. package/src/periodic/ui/CategoryLegend.tsx +6 -1
  417. package/src/periodic/ui/ElementCell.tsx +7 -1
  418. package/src/periodic/ui/PeriodicTable.tsx +3 -1
  419. package/src/periodic/ui/PeriodicTableChrome.tsx +4 -2
  420. package/src/share/ui/ShareButton.tsx +8 -5
  421. package/src/share/ui/ShareConfigOptions.tsx +6 -7
  422. package/src/share/ui/ShareDialog.tsx +3 -1
  423. package/src/share/ui/ShareDialogContent.tsx +20 -10
  424. package/src/share/ui/SharePresetTabs.tsx +3 -1
  425. package/src/slides/ui/BackToSlides.tsx +4 -2
  426. package/src/slides/ui/EmbedSlide.tsx +3 -3
  427. package/src/slides/ui/Slide.tsx +3 -1
  428. package/src/slides/ui/SlideshowBar.tsx +12 -4
  429. package/src/slides/ui/TalkList.tsx +8 -10
  430. package/src/structure/core/editorGuide.ts +126 -19
  431. package/src/structure/core/editorToolbar.ts +52 -24
  432. package/src/structure/ui/EditorHelpButton.tsx +9 -4
  433. package/src/structure/ui/StructureEditor.tsx +7 -1
  434. package/src/structure/ui/StructureEditorHelp.tsx +34 -11
  435. package/src/structure/ui/ToolbarTooltip.tsx +8 -4
  436. package/src/ui.ts +1 -0
@@ -3,6 +3,7 @@ import { useRef } from 'react';
3
3
  import { Button } from 'react-science/ui';
4
4
 
5
5
  import { useContainerSize } from '../../hooks/ui/useContainerSize.ts';
6
+ import { useChromeT } from '../../i18n/ui/useT.ts';
6
7
  import type { OverlayMetrics } from '../core/overlayMetrics.ts';
7
8
  import { placeOverlayCard } from '../core/placeOverlayCard.ts';
8
9
 
@@ -84,6 +85,7 @@ export function OverlayReadout(props: OverlayReadoutProps): ReactElement {
84
85
  onUnpin,
85
86
  testId,
86
87
  } = props;
88
+ const t = useChromeT();
87
89
  const { metrics } = useOverlaySurface();
88
90
  const card = useRef<HTMLDivElement>(null);
89
91
  const measured = useContainerSize(card);
@@ -121,7 +123,7 @@ export function OverlayReadout(props: OverlayReadoutProps): ReactElement {
121
123
  variant="minimal"
122
124
  size="small"
123
125
  icon="cross"
124
- aria-label="Dismiss"
126
+ aria-label={t('overlay.dismiss')}
125
127
  onClick={onUnpin}
126
128
  />
127
129
  ) : null}
@@ -1,6 +1,8 @@
1
1
  import { Button } from '@blueprintjs/core';
2
2
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
3
3
 
4
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
+
4
6
  /** What {@link ExerciseActions} needs: its handlers, and the labels of its buttons. */
5
7
  export interface ExerciseActionsProps {
6
8
  /**
@@ -11,7 +13,7 @@ export interface ExerciseActionsProps {
11
13
  onCheck?: () => void;
12
14
  /**
13
15
  * Text of the Check button.
14
- * @default 'Check'
16
+ * @default the chrome's own words for it, in the language of the page
15
17
  */
16
18
  checkLabel?: string;
17
19
  /**
@@ -77,7 +79,7 @@ export interface ExerciseActionsProps {
77
79
  export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
78
80
  const {
79
81
  onCheck,
80
- checkLabel = 'Check',
82
+ checkLabel,
81
83
  checkDisabled = false,
82
84
  onRevealHint,
83
85
  hintsRevealed = 0,
@@ -88,6 +90,7 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
88
90
  children,
89
91
  className,
90
92
  } = props;
93
+ const t = useChromeT();
91
94
 
92
95
  return (
93
96
  <div className={className} style={ROW_STYLE}>
@@ -95,7 +98,7 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
95
98
  <Button
96
99
  intent="primary"
97
100
  icon="tick"
98
- text={checkLabel}
101
+ text={checkLabel ?? t('pedagogy.check')}
99
102
  disabled={checkDisabled}
100
103
  onClick={onCheck}
101
104
  />
@@ -103,7 +106,10 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
103
106
  {onRevealHint !== undefined && (
104
107
  <Button
105
108
  icon="lightbulb"
106
- text={`Reveal hint (${Math.min(hintsRevealed, hintCount)}/${hintCount})`}
109
+ text={t('pedagogy.revealHintCount', {
110
+ revealed: Math.min(hintsRevealed, hintCount),
111
+ total: hintCount,
112
+ })}
107
113
  disabled={hintsRevealed >= hintCount}
108
114
  onClick={onRevealHint}
109
115
  />
@@ -111,12 +117,16 @@ export function ExerciseActions(props: ExerciseActionsProps): ReactElement {
111
117
  {onToggleSolution !== undefined && (
112
118
  <Button
113
119
  icon={showSolution ? 'eye-off' : 'key'}
114
- text={showSolution ? 'Hide solution' : 'Reveal solution'}
120
+ text={
121
+ showSolution
122
+ ? t('pedagogy.hideSolution')
123
+ : t('pedagogy.revealSolution')
124
+ }
115
125
  onClick={onToggleSolution}
116
126
  />
117
127
  )}
118
128
  {onReset !== undefined && (
119
- <Button icon="reset" text="Reset" onClick={onReset} />
129
+ <Button icon="reset" text={t('pedagogy.reset')} onClick={onReset} />
120
130
  )}
121
131
  {children}
122
132
  </div>
@@ -2,6 +2,7 @@ import { Alert, Button, ProgressBar } from '@blueprintjs/core';
2
2
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
3
3
  import { useState } from 'react';
4
4
 
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
  import { TOKEN } from '../../tokens/core/familyTokens.ts';
6
7
  import type { ProgressSummary } from '../core/progress.ts';
7
8
 
@@ -17,7 +18,7 @@ export interface ExerciseProgressHeaderProps {
17
18
  onClearAll?: () => void;
18
19
  /**
19
20
  * Text of the button that wipes the work.
20
- * @default 'Clear all answers'
21
+ * @default the chrome's own words for it, in the language of the page
21
22
  */
22
23
  clearLabel?: string;
23
24
  /**
@@ -52,11 +53,12 @@ export function ExerciseProgressHeader(
52
53
  const {
53
54
  summary,
54
55
  onClearAll,
55
- clearLabel = 'Clear all answers',
56
- clearWarning = DEFAULT_WARNING,
56
+ clearLabel,
57
+ clearWarning,
57
58
  clearDisabled = false,
58
59
  className,
59
60
  } = props;
61
+ const t = useChromeT();
60
62
  const [confirming, setConfirming] = useState(false);
61
63
  const complete = summary.total > 0 && summary.solved === summary.total;
62
64
 
@@ -64,7 +66,10 @@ export function ExerciseProgressHeader(
64
66
  <div className={className} style={ROOT_STYLE}>
65
67
  <div style={ROW_STYLE}>
66
68
  <span style={COUNT_STYLE}>
67
- {`${summary.solved} / ${summary.total} solved`}
69
+ {t('pedagogy.solvedCount', {
70
+ solved: summary.solved,
71
+ total: summary.total,
72
+ })}
68
73
  </span>
69
74
  <span
70
75
  style={PERCENT_STYLE}
@@ -75,7 +80,7 @@ export function ExerciseProgressHeader(
75
80
  variant="minimal"
76
81
  intent="danger"
77
82
  icon="trash"
78
- text={clearLabel}
83
+ text={clearLabel ?? t('pedagogy.clearAll')}
79
84
  disabled={clearDisabled}
80
85
  onClick={() => {
81
86
  setConfirming(true);
@@ -96,8 +101,8 @@ export function ExerciseProgressHeader(
96
101
  isOpen={confirming}
97
102
  intent="danger"
98
103
  icon="trash"
99
- cancelButtonText="Keep my answers"
100
- confirmButtonText="Clear everything"
104
+ cancelButtonText={t('pedagogy.keepAnswers')}
105
+ confirmButtonText={t('pedagogy.clearEverything')}
101
106
  onCancel={() => {
102
107
  setConfirming(false);
103
108
  }}
@@ -106,16 +111,13 @@ export function ExerciseProgressHeader(
106
111
  setConfirming(false);
107
112
  }}
108
113
  >
109
- {clearWarning}
114
+ {clearWarning ?? t('pedagogy.clearWarning')}
110
115
  </Alert>
111
116
  )}
112
117
  </div>
113
118
  );
114
119
  }
115
120
 
116
- const DEFAULT_WARNING =
117
- 'This forgets every answer, every revealed hint and every solved exercise, on this browser. There is no undo.';
118
-
119
121
  const ROOT_STYLE: CSSProperties = {
120
122
  display: 'flex',
121
123
  flexDirection: 'column',
@@ -2,6 +2,7 @@ import { InputGroup } from '@blueprintjs/core';
2
2
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
3
3
  import { useMemo, useState } from 'react';
4
4
 
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
  import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
6
7
  import { TOKEN } from '../../tokens/core/familyTokens.ts';
7
8
  import type { Glossary, GlossaryExample } from '../core/glossary.ts';
@@ -34,7 +35,7 @@ export interface GlossaryIndexProps<TExample = GlossaryExample> {
34
35
  searchable?: boolean;
35
36
  /**
36
37
  * Placeholder and accessible name of the filter box.
37
- * @default 'Filter terms…'
38
+ * @default the chrome's own words for it, in the language of the page
38
39
  */
39
40
  searchLabel?: string;
40
41
  /**
@@ -74,11 +75,12 @@ export function GlossaryIndex<TExample = GlossaryExample>(
74
75
  renderExample,
75
76
  renderCode,
76
77
  searchable = true,
77
- searchLabel = 'Filter terms…',
78
+ searchLabel,
78
79
  minColumnWidth = 280,
79
80
  idPrefix = 'glossary-',
80
81
  className,
81
82
  } = props;
83
+ const t = useChromeT();
82
84
  const context = useGlossary();
83
85
  const terms = (glossary ?? context.glossary) as Glossary<TExample>;
84
86
  const [query, setQuery] = useState('');
@@ -95,8 +97,8 @@ export function GlossaryIndex<TExample = GlossaryExample>(
95
97
  type="search"
96
98
  leftIcon="search"
97
99
  value={query}
98
- placeholder={searchLabel}
99
- aria-label={searchLabel}
100
+ placeholder={searchLabel ?? t('pedagogy.filterTerms')}
101
+ aria-label={searchLabel ?? t('pedagogy.filterTerms')}
100
102
  autoComplete="off"
101
103
  spellCheck={false}
102
104
  onValueChange={setQuery}
@@ -104,7 +106,11 @@ export function GlossaryIndex<TExample = GlossaryExample>(
104
106
  </div>
105
107
  )}
106
108
  {listings.length === 0 ? (
107
- <p style={EMPTY_STYLE}>{emptyMessage(query)}</p>
109
+ <p style={EMPTY_STYLE}>
110
+ {query.trim() === ''
111
+ ? t('pedagogy.noTermDefined')
112
+ : t('pedagogy.noTermMatches', { query: query.trim() })}
113
+ </p>
108
114
  ) : (
109
115
  <div style={gridStyle(minColumnWidth)}>
110
116
  {listings.map(({ key, entry }) => (
@@ -128,13 +134,6 @@ export function GlossaryIndex<TExample = GlossaryExample>(
128
134
  );
129
135
  }
130
136
 
131
- function emptyMessage(query: string): string {
132
- const trimmed = query.trim();
133
- return trimmed === ''
134
- ? 'No term is defined yet.'
135
- : `No term matches “${trimmed}”.`;
136
- }
137
-
138
137
  function anchorOf(key: string): string {
139
138
  return key
140
139
  .trim()
@@ -2,6 +2,7 @@ import { Button, Callout } from '@blueprintjs/core';
2
2
  import type { CSSProperties, ReactElement } from 'react';
3
3
 
4
4
  import { clamp } from '../../format/core/clamp.ts';
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
 
6
7
  import { GlossaryText } from './GlossaryText.tsx';
7
8
 
@@ -23,12 +24,12 @@ export interface HintLadderProps {
23
24
  onReveal?: () => void;
24
25
  /**
25
26
  * Text of the button, before its count.
26
- * @default 'Reveal hint'
27
+ * @default the chrome's own words for it, in the language of the page
27
28
  */
28
29
  revealLabel?: string;
29
30
  /**
30
31
  * Heading over the hints.
31
- * @default 'Hints'
32
+ * @default the chrome's own words for it, in the language of the page
32
33
  */
33
34
  title?: string;
34
35
  /**
@@ -48,14 +49,8 @@ export interface HintLadderProps {
48
49
  * @returns The hints, or nothing while none is open and none can be.
49
50
  */
50
51
  export function HintLadder(props: HintLadderProps): ReactElement | null {
51
- const {
52
- className,
53
- hints,
54
- revealed,
55
- onReveal,
56
- revealLabel = 'Reveal hint',
57
- title = 'Hints',
58
- } = props;
52
+ const { className, hints, revealed, onReveal, revealLabel, title } = props;
53
+ const t = useChromeT();
59
54
  const open = clampRevealed(revealed, hints.length);
60
55
  const exhausted = open >= hints.length;
61
56
  if (open === 0 && (onReveal === undefined || hints.length === 0)) return null;
@@ -66,7 +61,11 @@ export function HintLadder(props: HintLadderProps): ReactElement | null {
66
61
  <div>
67
62
  <Button
68
63
  icon="lightbulb"
69
- text={`${revealLabel} (${open}/${hints.length})`}
64
+ text={t('pedagogy.revealHintLadder', {
65
+ label: revealLabel ?? t('pedagogy.revealHint'),
66
+ open,
67
+ total: hints.length,
68
+ })}
70
69
  disabled={exhausted}
71
70
  onClick={onReveal}
72
71
  />
@@ -74,7 +73,11 @@ export function HintLadder(props: HintLadderProps): ReactElement | null {
74
73
  )}
75
74
 
76
75
  {open > 0 && (
77
- <Callout intent="primary" icon="lightbulb" title={title}>
76
+ <Callout
77
+ intent="primary"
78
+ icon="lightbulb"
79
+ title={title ?? t('pedagogy.hints')}
80
+ >
78
81
  <ol style={LIST_STYLE}>
79
82
  {hints.slice(0, open).map((hint) => (
80
83
  <li key={hint} style={ITEM_STYLE}>
@@ -2,6 +2,7 @@ import type { Placement } from '@blueprintjs/core';
2
2
  import { Tooltip } from '@blueprintjs/core';
3
3
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
4
4
 
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
  import type { GlossaryExample } from '../core/glossary.ts';
6
7
 
7
8
  import { HOVER_OPEN_DELAY, MONOSPACE, PROSE_INK } from './pedagogyStyle.ts';
@@ -45,12 +46,12 @@ export interface SyntaxTooltipProps {
45
46
  placement?: Placement;
46
47
  /**
47
48
  * Label of the example's code line.
48
- * @default 'Example'
49
+ * @default the chrome's own word for it, in the language of the page
49
50
  */
50
51
  codeLabel?: string;
51
52
  /**
52
53
  * Label of the example's input line.
53
- * @default 'Input'
54
+ * @default the chrome's own word for it, in the language of the page
54
55
  */
55
56
  inputLabel?: string;
56
57
  /**
@@ -108,12 +109,12 @@ interface SyntaxTooltipBodyProps {
108
109
  content: SyntaxTooltipContent;
109
110
  /**
110
111
  * Label of the example's code line.
111
- * @default 'Example'
112
+ * @default the chrome's own word for it, in the language of the page
112
113
  */
113
114
  codeLabel?: string;
114
115
  /**
115
116
  * Label of the example's input line.
116
- * @default 'Input'
117
+ * @default the chrome's own word for it, in the language of the page
117
118
  */
118
119
  inputLabel?: string;
119
120
  }
@@ -127,7 +128,8 @@ interface SyntaxTooltipBodyProps {
127
128
  * @returns The body.
128
129
  */
129
130
  export function SyntaxTooltipBody(props: SyntaxTooltipBodyProps): ReactElement {
130
- const { content, codeLabel = 'Example', inputLabel = 'Input' } = props;
131
+ const { content, codeLabel, inputLabel } = props;
132
+ const t = useChromeT();
131
133
  const { syntax, name, tag, summary, detail, example } = content;
132
134
 
133
135
  return (
@@ -141,12 +143,12 @@ export function SyntaxTooltipBody(props: SyntaxTooltipBodyProps): ReactElement {
141
143
  <div style={DETAIL_STYLE}>{detail}</div>
142
144
  <div style={EXAMPLE_STYLE}>
143
145
  <div style={ROW_STYLE}>
144
- <span style={LABEL_STYLE}>{codeLabel}</span>
146
+ <span style={LABEL_STYLE}>{codeLabel ?? t('pedagogy.example')}</span>
145
147
  <code style={VALUE_STYLE}>{example.code}</code>
146
148
  </div>
147
149
  {example.input !== undefined && (
148
150
  <div style={ROW_STYLE}>
149
- <span style={LABEL_STYLE}>{inputLabel}</span>
151
+ <span style={LABEL_STYLE}>{inputLabel ?? t('pedagogy.input')}</span>
150
152
  <code style={VALUE_STYLE}>{example.input}</code>
151
153
  </div>
152
154
  )}
@@ -2,6 +2,7 @@ import { Button, Tag, Tooltip } from '@blueprintjs/core';
2
2
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
3
3
 
4
4
  import { clamp } from '../../format/core/clamp.ts';
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
  import { TOKEN } from '../../tokens/core/familyTokens.ts';
6
7
  import type { ExerciseLevel } from '../core/types.ts';
7
8
 
@@ -76,6 +77,7 @@ export function TutorialStepStrip(props: TutorialStepStripProps): ReactElement {
76
77
  pagerHint,
77
78
  className,
78
79
  } = props;
80
+ const t = useChromeT();
79
81
  const active = clampIndex(activeIndex, steps.length);
80
82
 
81
83
  return (
@@ -101,19 +103,22 @@ export function TutorialStepStrip(props: TutorialStepStripProps): ReactElement {
101
103
  <Button
102
104
  size="small"
103
105
  icon="chevron-left"
104
- text="Previous"
106
+ text={t('pedagogy.previous')}
105
107
  disabled={active === 0}
106
108
  onClick={() => {
107
109
  onSelect(active - 1);
108
110
  }}
109
111
  />
110
112
  <Tag minimal round>
111
- {`Step ${active + 1} of ${steps.length}`}
113
+ {t('pedagogy.stepOf', {
114
+ step: active + 1,
115
+ total: steps.length,
116
+ })}
112
117
  </Tag>
113
118
  <Button
114
119
  size="small"
115
120
  endIcon="chevron-right"
116
- text="Next"
121
+ text={t('pedagogy.next')}
117
122
  intent="primary"
118
123
  disabled={active >= steps.length - 1}
119
124
  onClick={() => {
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type { CSSProperties, ReactElement } from 'react';
6
6
 
7
+ import { useChromeT } from '../../i18n/ui/useT.ts';
7
8
  import { TOKEN } from '../../tokens/core/familyTokens.ts';
8
9
  import {
9
10
  CATEGORY_LABELS,
@@ -39,12 +40,16 @@ export interface CategoryLegendProps {
39
40
  */
40
41
  export function CategoryLegend(props: CategoryLegendProps): ReactElement {
41
42
  const { className, onSelect, selected } = props;
43
+ const t = useChromeT();
42
44
 
43
45
  return (
44
46
  <div className={className} style={legendStyle}>
45
47
  {CATEGORY_ORDER.map((category) => {
46
48
  const swatch = categorySwatch(category);
47
- const label = CATEGORY_LABELS[category];
49
+ const label = t.or(
50
+ `periodic.category.${category}`,
51
+ CATEGORY_LABELS[category],
52
+ );
48
53
  const mark = (
49
54
  <span style={{ ...swatchStyle, background: swatch.background }} />
50
55
  );
@@ -9,6 +9,7 @@
9
9
  import type { CSSProperties, ReactElement } from 'react';
10
10
 
11
11
  import type { Swatch } from '../../color/core/interpolate.ts';
12
+ import { useChromeT } from '../../i18n/ui/useT.ts';
12
13
 
13
14
  /** What {@link ElementCell} needs to draw one element. */
14
15
  export interface ElementCellProps {
@@ -74,6 +75,7 @@ export function ElementCell(props: ElementCellProps): ReactElement {
74
75
  isIncluded = true,
75
76
  onHover,
76
77
  } = props;
78
+ const t = useChromeT();
77
79
 
78
80
  return (
79
81
  <button
@@ -81,7 +83,11 @@ export function ElementCell(props: ElementCellProps): ReactElement {
81
83
  className={className}
82
84
  data-testid={`element-${symbol}`}
83
85
  data-symbol={symbol}
84
- aria-label={`${name} (${symbol}, Z = ${String(atomicNumber)})`}
86
+ aria-label={t('periodic.cellLabel', {
87
+ name,
88
+ symbol,
89
+ atomicNumber,
90
+ })}
85
91
  aria-pressed={isSelected}
86
92
  onClick={() => {
87
93
  onSelect(symbol);
@@ -14,6 +14,7 @@ import type { CSSProperties, KeyboardEvent, ReactElement } from 'react';
14
14
  import { useEffect, useRef } from 'react';
15
15
 
16
16
  import type { Swatch } from '../../color/core/interpolate.ts';
17
+ import { useChromeT } from '../../i18n/ui/useT.ts';
17
18
  import { categorySwatch } from '../core/categories.ts';
18
19
  import type { PeriodicElement } from '../core/elements.ts';
19
20
  import type { ElementRange } from '../core/layout.ts';
@@ -127,6 +128,7 @@ export function PeriodicTable(props: PeriodicTableProps): ReactElement {
127
128
  className,
128
129
  } = props;
129
130
 
131
+ const t = useChromeT();
130
132
  const gridRef = useRef<HTMLDivElement>(null);
131
133
  const cameFromKeyRef = useRef(false);
132
134
  const offset = headers ? 1 : 0;
@@ -155,7 +157,7 @@ export function PeriodicTable(props: PeriodicTableProps): ReactElement {
155
157
  <div
156
158
  ref={gridRef}
157
159
  role="grid"
158
- aria-label="Periodic table"
160
+ aria-label={t('periodic.table')}
159
161
  data-testid="periodic-table"
160
162
  style={headers ? gridWithHeadersStyle : gridStyle}
161
163
  onKeyDown={handleKeyDown}
@@ -5,6 +5,7 @@
5
5
 
6
6
  import type { CSSProperties, ReactElement } from 'react';
7
7
 
8
+ import { useChromeT } from '../../i18n/ui/useT.ts';
8
9
  import { TOKEN } from '../../tokens/core/familyTokens.ts';
9
10
  import type { ElementRange } from '../core/layout.ts';
10
11
  import {
@@ -33,13 +34,14 @@ interface HeaderStripsProps {
33
34
  */
34
35
  export function HeaderStrips(props: HeaderStripsProps): ReactElement {
35
36
  const { onSelectRange } = props;
37
+ const t = useChromeT();
36
38
  const groups: ReactElement[] = [];
37
39
  for (let group = 1; group <= COLUMN_COUNT; group++) {
38
40
  groups.push(
39
41
  <HeaderCell
40
42
  key={`group-${String(group)}`}
41
43
  label={String(group)}
42
- title={`Group ${String(group)}`}
44
+ title={t('periodic.group', { group })}
43
45
  column={group + 1}
44
46
  row={1}
45
47
  onClick={
@@ -57,7 +59,7 @@ export function HeaderStrips(props: HeaderStripsProps): ReactElement {
57
59
  <HeaderCell
58
60
  key={`period-${String(period)}`}
59
61
  label={String(period)}
60
- title={`Period ${String(period)}`}
62
+ title={t('periodic.period', { period })}
61
63
  column={1}
62
64
  row={period + 1}
63
65
  onClick={
@@ -1,7 +1,7 @@
1
1
  import { Button, Icon } from '@blueprintjs/core';
2
2
  import type { ReactElement } from 'react';
3
3
 
4
- const SHARE_TITLE = 'Share a link to this page, or embed it in your own site';
4
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
5
 
6
6
  /** How the button is dressed for the bar it sits in. */
7
7
  export type ShareButtonVariant = 'nav-link' | 'blueprint';
@@ -17,7 +17,7 @@ export interface ShareButtonProps {
17
17
  variant?: ShareButtonVariant;
18
18
  /**
19
19
  * Text of the button, and what a screen reader is told.
20
- * @default 'Share'
20
+ * @default the chrome's own word for it, in the language of the page
21
21
  */
22
22
  label?: string;
23
23
  /**
@@ -28,7 +28,7 @@ export interface ShareButtonProps {
28
28
  compact?: boolean;
29
29
  /**
30
30
  * What the pointer is told.
31
- * @default 'Share a link to this page, or embed it in your own site'
31
+ * @default the chrome's own line, in the language of the page
32
32
  */
33
33
  title?: string;
34
34
  /**
@@ -48,11 +48,14 @@ export function ShareButton(props: ShareButtonProps): ReactElement {
48
48
  const {
49
49
  onClick,
50
50
  variant = 'nav-link',
51
- label = 'Share',
51
+ label: given,
52
52
  compact = false,
53
- title = SHARE_TITLE,
53
+ title: givenTitle,
54
54
  className,
55
55
  } = props;
56
+ const t = useChromeT();
57
+ const label = given ?? t('share.button');
58
+ const title = givenTitle ?? t('share.buttonTitle');
56
59
  const text = compact ? undefined : label;
57
60
 
58
61
  if (variant === 'blueprint') {
@@ -1,6 +1,7 @@
1
1
  import { Checkbox, H6 } from '@blueprintjs/core';
2
2
  import type { CSSProperties, ReactElement } from 'react';
3
3
 
4
+ import { useChromeT } from '../../i18n/ui/useT.ts';
4
5
  import type { HideablePart } from '../core/index.ts';
5
6
 
6
7
  import { SharePartOptions } from './SharePartOptions.tsx';
@@ -35,27 +36,25 @@ export function ShareConfigOptions(
35
36
  props: ShareConfigOptionsProps,
36
37
  ): ReactElement {
37
38
  const { embed, parts, hidden, onEmbedChange, onPartChange } = props;
39
+ const t = useChromeT();
38
40
 
39
41
  return (
40
42
  <>
41
43
  <section className="share-section" style={SECTION_STYLE}>
42
- <H6>Layout</H6>
44
+ <H6>{t('share.layout')}</H6>
43
45
  <Checkbox
44
46
  checked={embed}
45
- label="Embed in another page"
47
+ label={t('share.embed')}
46
48
  onChange={(event) => {
47
49
  onEmbedChange(event.currentTarget.checked);
48
50
  }}
49
51
  />
50
- <span style={HINT_STYLE}>
51
- Drops the site header and its navigation, so the page sits inside a
52
- page of your own.
53
- </span>
52
+ <span style={HINT_STYLE}>{t('share.embedHint')}</span>
54
53
  </section>
55
54
 
56
55
  {parts.length > 0 ? (
57
56
  <section className="share-section" style={SECTION_STYLE}>
58
- <H6>Show on the page</H6>
57
+ <H6>{t('share.showOnPage')}</H6>
59
58
  <SharePartOptions
60
59
  parts={parts}
61
60
  hidden={hidden}
@@ -1,6 +1,7 @@
1
1
  import { Dialog } from '@blueprintjs/core';
2
2
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
3
3
 
4
+ import { useChromeT } from '../../i18n/ui/useT.ts';
4
5
  import type {
5
6
  ShareConfig,
6
7
  ShareParamCodecs,
@@ -112,13 +113,14 @@ export function ShareDialog<
112
113
  Codecs extends ShareParamCodecs = Record<string, never>,
113
114
  >(props: ShareDialogProps<Codecs>): ReactElement {
114
115
  const { isOpen, onClose, usePortal = true, ...rest } = props;
116
+ const t = useChromeT();
115
117
 
116
118
  return (
117
119
  <Dialog
118
120
  isOpen={isOpen}
119
121
  onClose={onClose}
120
122
  usePortal={usePortal}
121
- title="Share or embed"
123
+ title={t('share.dialogTitle')}
122
124
  icon="share"
123
125
  className="share-dialog"
124
126
  style={DIALOG_STYLE}