react-cheminfo 0.25.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 (416) 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/ui/EcosystemButton.d.ts +1 -1
  98. package/lib/ecosystem/ui/EcosystemButton.d.ts.map +1 -1
  99. package/lib/ecosystem/ui/EcosystemButton.js +4 -2
  100. package/lib/ecosystem/ui/EcosystemButton.js.map +1 -1
  101. package/lib/ecosystem/ui/EcosystemLinks.d.ts +1 -1
  102. package/lib/ecosystem/ui/EcosystemLinks.d.ts.map +1 -1
  103. package/lib/ecosystem/ui/EcosystemLinks.js +5 -2
  104. package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -1
  105. package/lib/ecosystem/ui/EcosystemMenu.d.ts.map +1 -1
  106. package/lib/ecosystem/ui/EcosystemMenu.js +3 -1
  107. package/lib/ecosystem/ui/EcosystemMenu.js.map +1 -1
  108. package/lib/ecosystem/ui/SiteGroupSection.d.ts.map +1 -1
  109. package/lib/ecosystem/ui/SiteGroupSection.js +3 -1
  110. package/lib/ecosystem/ui/SiteGroupSection.js.map +1 -1
  111. package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -1
  112. package/lib/ecosystem/ui/SiteTile.js +3 -1
  113. package/lib/ecosystem/ui/SiteTile.js.map +1 -1
  114. package/lib/error/ui/ErrorFallback.d.ts +2 -2
  115. package/lib/error/ui/ErrorFallback.d.ts.map +1 -1
  116. package/lib/error/ui/ErrorFallback.js +4 -2
  117. package/lib/error/ui/ErrorFallback.js.map +1 -1
  118. package/lib/help/ui/HelpBody.d.ts.map +1 -1
  119. package/lib/help/ui/HelpBody.js +3 -1
  120. package/lib/help/ui/HelpBody.js.map +1 -1
  121. package/lib/help/ui/HelpIcon.d.ts +2 -1
  122. package/lib/help/ui/HelpIcon.d.ts.map +1 -1
  123. package/lib/help/ui/HelpIcon.js +4 -2
  124. package/lib/help/ui/HelpIcon.js.map +1 -1
  125. package/lib/help/ui/HelpToolbarButton.d.ts.map +1 -1
  126. package/lib/help/ui/HelpToolbarButton.js +3 -1
  127. package/lib/help/ui/HelpToolbarButton.js.map +1 -1
  128. package/lib/help/ui/helpName.d.ts +5 -1
  129. package/lib/help/ui/helpName.d.ts.map +1 -1
  130. package/lib/help/ui/helpName.js +4 -2
  131. package/lib/help/ui/helpName.js.map +1 -1
  132. package/lib/i18n/core/chromeCatalog.d.ts +21 -0
  133. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -0
  134. package/lib/i18n/core/chromeCatalog.js +29 -0
  135. package/lib/i18n/core/chromeCatalog.js.map +1 -0
  136. package/lib/i18n/core/index.d.ts +12 -0
  137. package/lib/i18n/core/index.d.ts.map +1 -0
  138. package/lib/i18n/core/index.js +6 -0
  139. package/lib/i18n/core/index.js.map +1 -0
  140. package/lib/i18n/core/languages.d.ts +32 -0
  141. package/lib/i18n/core/languages.d.ts.map +1 -0
  142. package/lib/i18n/core/languages.js +41 -0
  143. package/lib/i18n/core/languages.js.map +1 -0
  144. package/lib/i18n/core/messageCatalog.d.ts +113 -0
  145. package/lib/i18n/core/messageCatalog.d.ts.map +1 -0
  146. package/lib/i18n/core/messageCatalog.js +135 -0
  147. package/lib/i18n/core/messageCatalog.js.map +1 -0
  148. package/lib/i18n/core/messageValues.d.ts +3 -0
  149. package/lib/i18n/core/messageValues.d.ts.map +1 -0
  150. package/lib/i18n/core/messageValues.js +2 -0
  151. package/lib/i18n/core/messageValues.js.map +1 -0
  152. package/lib/i18n/core/session.d.ts +51 -0
  153. package/lib/i18n/core/session.d.ts.map +1 -0
  154. package/lib/i18n/core/session.js +64 -0
  155. package/lib/i18n/core/session.js.map +1 -0
  156. package/lib/i18n/core/translateSetup.d.ts +28 -0
  157. package/lib/i18n/core/translateSetup.d.ts.map +1 -0
  158. package/lib/i18n/core/translateSetup.js +30 -0
  159. package/lib/i18n/core/translateSetup.js.map +1 -0
  160. package/lib/i18n/ui/LanguageSelect.d.ts +37 -0
  161. package/lib/i18n/ui/LanguageSelect.d.ts.map +1 -0
  162. package/lib/i18n/ui/LanguageSelect.js +27 -0
  163. package/lib/i18n/ui/LanguageSelect.js.map +1 -0
  164. package/lib/i18n/ui/index.d.ts +6 -0
  165. package/lib/i18n/ui/index.d.ts.map +1 -0
  166. package/lib/i18n/ui/index.js +4 -0
  167. package/lib/i18n/ui/index.js.map +1 -0
  168. package/lib/i18n/ui/useLanguage.d.ts +23 -0
  169. package/lib/i18n/ui/useLanguage.d.ts.map +1 -0
  170. package/lib/i18n/ui/useLanguage.js +36 -0
  171. package/lib/i18n/ui/useLanguage.js.map +1 -0
  172. package/lib/i18n/ui/useT.d.ts +47 -0
  173. package/lib/i18n/ui/useT.d.ts.map +1 -0
  174. package/lib/i18n/ui/useT.js +51 -0
  175. package/lib/i18n/ui/useT.js.map +1 -0
  176. package/lib/locales/de.json +442 -0
  177. package/lib/locales/en.json +442 -0
  178. package/lib/locales/es.json +442 -0
  179. package/lib/locales/fr.json +442 -0
  180. package/lib/molecule3d/core/gestures.d.ts +10 -0
  181. package/lib/molecule3d/core/gestures.d.ts.map +1 -1
  182. package/lib/molecule3d/core/gestures.js +39 -7
  183. package/lib/molecule3d/core/gestures.js.map +1 -1
  184. package/lib/molecule3d/ui/Molecule3DExport.d.ts.map +1 -1
  185. package/lib/molecule3d/ui/Molecule3DExport.js +3 -1
  186. package/lib/molecule3d/ui/Molecule3DExport.js.map +1 -1
  187. package/lib/molecule3d/ui/Molecule3DHelp.d.ts.map +1 -1
  188. package/lib/molecule3d/ui/Molecule3DHelp.js +7 -2
  189. package/lib/molecule3d/ui/Molecule3DHelp.js.map +1 -1
  190. package/lib/molecule3d/ui/Molecule3DOptions.d.ts.map +1 -1
  191. package/lib/molecule3d/ui/Molecule3DOptions.js +9 -9
  192. package/lib/molecule3d/ui/Molecule3DOptions.js.map +1 -1
  193. package/lib/molecule3d/ui/Molecule3DSurfaceColors.d.ts.map +1 -1
  194. package/lib/molecule3d/ui/Molecule3DSurfaceColors.js +8 -8
  195. package/lib/molecule3d/ui/Molecule3DSurfaceColors.js.map +1 -1
  196. package/lib/molecule3d/ui/Molecule3DToolbar.d.ts.map +1 -1
  197. package/lib/molecule3d/ui/Molecule3DToolbar.js +15 -10
  198. package/lib/molecule3d/ui/Molecule3DToolbar.js.map +1 -1
  199. package/lib/molecule3d/ui/MoleculeViewer3D.d.ts.map +1 -1
  200. package/lib/molecule3d/ui/MoleculeViewer3D.js +6 -3
  201. package/lib/molecule3d/ui/MoleculeViewer3D.js.map +1 -1
  202. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
  203. package/lib/orbital/ui/AtomicOrbitalCanvas.js +3 -1
  204. package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
  205. package/lib/orbital/ui/AtomicOrbitalControls.d.ts.map +1 -1
  206. package/lib/orbital/ui/AtomicOrbitalControls.js +12 -15
  207. package/lib/orbital/ui/AtomicOrbitalControls.js.map +1 -1
  208. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
  209. package/lib/orbital/ui/AtomicOrbitalViewer.js +6 -3
  210. package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
  211. package/lib/orbital/ui/capability.d.ts +4 -0
  212. package/lib/orbital/ui/capability.d.ts.map +1 -1
  213. package/lib/orbital/ui/capability.js +4 -0
  214. package/lib/orbital/ui/capability.js.map +1 -1
  215. package/lib/overlay/ui/OverlayBar.d.ts +1 -1
  216. package/lib/overlay/ui/OverlayBar.d.ts.map +1 -1
  217. package/lib/overlay/ui/OverlayBar.js +6 -3
  218. package/lib/overlay/ui/OverlayBar.js.map +1 -1
  219. package/lib/overlay/ui/OverlayInfo.d.ts +1 -1
  220. package/lib/overlay/ui/OverlayInfo.d.ts.map +1 -1
  221. package/lib/overlay/ui/OverlayInfo.js +5 -2
  222. package/lib/overlay/ui/OverlayInfo.js.map +1 -1
  223. package/lib/overlay/ui/OverlayPanel.d.ts +9 -2
  224. package/lib/overlay/ui/OverlayPanel.d.ts.map +1 -1
  225. package/lib/overlay/ui/OverlayPanel.js +5 -11
  226. package/lib/overlay/ui/OverlayPanel.js.map +1 -1
  227. package/lib/overlay/ui/OverlayReadout.d.ts.map +1 -1
  228. package/lib/overlay/ui/OverlayReadout.js +3 -1
  229. package/lib/overlay/ui/OverlayReadout.js.map +1 -1
  230. package/lib/pedagogy/ui/ExerciseActions.d.ts +1 -1
  231. package/lib/pedagogy/ui/ExerciseActions.d.ts.map +1 -1
  232. package/lib/pedagogy/ui/ExerciseActions.js +9 -2
  233. package/lib/pedagogy/ui/ExerciseActions.js.map +1 -1
  234. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts +1 -1
  235. package/lib/pedagogy/ui/ExerciseProgressHeader.d.ts.map +1 -1
  236. package/lib/pedagogy/ui/ExerciseProgressHeader.js +9 -5
  237. package/lib/pedagogy/ui/ExerciseProgressHeader.js.map +1 -1
  238. package/lib/pedagogy/ui/GlossaryIndex.d.ts +1 -1
  239. package/lib/pedagogy/ui/GlossaryIndex.d.ts.map +1 -1
  240. package/lib/pedagogy/ui/GlossaryIndex.js +6 -8
  241. package/lib/pedagogy/ui/GlossaryIndex.js.map +1 -1
  242. package/lib/pedagogy/ui/HintLadder.d.ts +2 -2
  243. package/lib/pedagogy/ui/HintLadder.d.ts.map +1 -1
  244. package/lib/pedagogy/ui/HintLadder.js +8 -2
  245. package/lib/pedagogy/ui/HintLadder.js.map +1 -1
  246. package/lib/pedagogy/ui/SyntaxTooltip.d.ts +4 -4
  247. package/lib/pedagogy/ui/SyntaxTooltip.d.ts.map +1 -1
  248. package/lib/pedagogy/ui/SyntaxTooltip.js +4 -2
  249. package/lib/pedagogy/ui/SyntaxTooltip.js.map +1 -1
  250. package/lib/pedagogy/ui/TutorialStepStrip.d.ts.map +1 -1
  251. package/lib/pedagogy/ui/TutorialStepStrip.js +7 -2
  252. package/lib/pedagogy/ui/TutorialStepStrip.js.map +1 -1
  253. package/lib/periodic/ui/CategoryLegend.d.ts.map +1 -1
  254. package/lib/periodic/ui/CategoryLegend.js +3 -1
  255. package/lib/periodic/ui/CategoryLegend.js.map +1 -1
  256. package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
  257. package/lib/periodic/ui/ElementCell.js +7 -1
  258. package/lib/periodic/ui/ElementCell.js.map +1 -1
  259. package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
  260. package/lib/periodic/ui/PeriodicTable.js +3 -1
  261. package/lib/periodic/ui/PeriodicTable.js.map +1 -1
  262. package/lib/periodic/ui/PeriodicTableChrome.d.ts.map +1 -1
  263. package/lib/periodic/ui/PeriodicTableChrome.js +4 -2
  264. package/lib/periodic/ui/PeriodicTableChrome.js.map +1 -1
  265. package/lib/share/ui/ShareButton.d.ts +2 -2
  266. package/lib/share/ui/ShareButton.d.ts.map +1 -1
  267. package/lib/share/ui/ShareButton.js +5 -2
  268. package/lib/share/ui/ShareButton.js.map +1 -1
  269. package/lib/share/ui/ShareConfigOptions.d.ts.map +1 -1
  270. package/lib/share/ui/ShareConfigOptions.js +4 -2
  271. package/lib/share/ui/ShareConfigOptions.js.map +1 -1
  272. package/lib/share/ui/ShareDialog.d.ts.map +1 -1
  273. package/lib/share/ui/ShareDialog.js +3 -1
  274. package/lib/share/ui/ShareDialog.js.map +1 -1
  275. package/lib/share/ui/ShareDialogContent.d.ts.map +1 -1
  276. package/lib/share/ui/ShareDialogContent.js +10 -1
  277. package/lib/share/ui/ShareDialogContent.js.map +1 -1
  278. package/lib/share/ui/SharePresetTabs.d.ts.map +1 -1
  279. package/lib/share/ui/SharePresetTabs.js +3 -1
  280. package/lib/share/ui/SharePresetTabs.js.map +1 -1
  281. package/lib/slides/ui/BackToSlides.d.ts.map +1 -1
  282. package/lib/slides/ui/BackToSlides.js +4 -2
  283. package/lib/slides/ui/BackToSlides.js.map +1 -1
  284. package/lib/slides/ui/EmbedSlide.d.ts.map +1 -1
  285. package/lib/slides/ui/EmbedSlide.js +3 -1
  286. package/lib/slides/ui/EmbedSlide.js.map +1 -1
  287. package/lib/slides/ui/Slide.d.ts.map +1 -1
  288. package/lib/slides/ui/Slide.js +3 -1
  289. package/lib/slides/ui/Slide.js.map +1 -1
  290. package/lib/slides/ui/SlideshowBar.d.ts.map +1 -1
  291. package/lib/slides/ui/SlideshowBar.js +5 -3
  292. package/lib/slides/ui/SlideshowBar.js.map +1 -1
  293. package/lib/slides/ui/TalkList.d.ts +1 -1
  294. package/lib/slides/ui/TalkList.d.ts.map +1 -1
  295. package/lib/slides/ui/TalkList.js +4 -2
  296. package/lib/slides/ui/TalkList.js.map +1 -1
  297. package/lib/structure/core/editorGuide.d.ts +14 -0
  298. package/lib/structure/core/editorGuide.d.ts.map +1 -1
  299. package/lib/structure/core/editorGuide.js +117 -19
  300. package/lib/structure/core/editorGuide.js.map +1 -1
  301. package/lib/structure/core/editorToolbar.d.ts +3 -1
  302. package/lib/structure/core/editorToolbar.d.ts.map +1 -1
  303. package/lib/structure/core/editorToolbar.js +44 -23
  304. package/lib/structure/core/editorToolbar.js.map +1 -1
  305. package/lib/structure/ui/EditorHelpButton.d.ts.map +1 -1
  306. package/lib/structure/ui/EditorHelpButton.js +3 -2
  307. package/lib/structure/ui/EditorHelpButton.js.map +1 -1
  308. package/lib/structure/ui/StructureEditor.d.ts.map +1 -1
  309. package/lib/structure/ui/StructureEditor.js +3 -1
  310. package/lib/structure/ui/StructureEditor.js.map +1 -1
  311. package/lib/structure/ui/StructureEditorHelp.d.ts.map +1 -1
  312. package/lib/structure/ui/StructureEditorHelp.js +12 -3
  313. package/lib/structure/ui/StructureEditorHelp.js.map +1 -1
  314. package/lib/structure/ui/ToolbarTooltip.d.ts.map +1 -1
  315. package/lib/structure/ui/ToolbarTooltip.js +5 -3
  316. package/lib/structure/ui/ToolbarTooltip.js.map +1 -1
  317. package/lib/ui.d.ts +1 -0
  318. package/lib/ui.d.ts.map +1 -1
  319. package/lib/ui.js +1 -0
  320. package/lib/ui.js.map +1 -1
  321. package/package.json +4 -2
  322. package/src/about/ui/AboutBuild.tsx +23 -16
  323. package/src/about/ui/AboutCitations.tsx +3 -1
  324. package/src/about/ui/AboutPage.tsx +38 -12
  325. package/src/about/ui/AboutProvidedBy.tsx +13 -3
  326. package/src/capsule/ui/Capsule.tsx +48 -0
  327. package/src/capsule/ui/CapsuleFilter.tsx +38 -114
  328. package/src/capsule/ui/capsuleFilterCapsules.tsx +110 -0
  329. package/src/chart/ui/ChartTrackingLayer.tsx +4 -2
  330. package/src/chrome/ui/SiteHeader.tsx +5 -3
  331. package/src/citation/ui/CitationMenu.tsx +9 -5
  332. package/src/citation/ui/CiteButton.tsx +4 -2
  333. package/src/citation/ui/CopyFormatEntries.tsx +3 -1
  334. package/src/citation/ui/WorkEntry.tsx +5 -3
  335. package/src/citation/ui/entries.tsx +9 -2
  336. package/src/citation/ui/useCopyFeedback.ts +11 -4
  337. package/src/clipboard/ui/ClickToCopy.tsx +15 -5
  338. package/src/clipboard/ui/CopyButton.tsx +14 -10
  339. package/src/color/ui/ColorScaleEditor.tsx +17 -15
  340. package/src/color/ui/ColorScaleEntry.tsx +7 -3
  341. package/src/color/ui/ColorScaleLegend.tsx +7 -1
  342. package/src/color/ui/ColorScaleSelect.tsx +12 -6
  343. package/src/confirm/ui/ConfirmButton.tsx +9 -11
  344. package/src/core.ts +1 -0
  345. package/src/credits/ui/CreditsList.tsx +5 -1
  346. package/src/delimited/ui/DelimitedTextDialog.tsx +10 -10
  347. package/src/delimited/ui/DelimitedTextPanel.tsx +19 -12
  348. package/src/download/ui/FigureDownload.tsx +7 -5
  349. package/src/download/ui/FigureDownloadPanel.tsx +31 -25
  350. package/src/ecosystem/ui/EcosystemButton.tsx +5 -3
  351. package/src/ecosystem/ui/EcosystemLinks.tsx +10 -10
  352. package/src/ecosystem/ui/EcosystemMenu.tsx +3 -1
  353. package/src/ecosystem/ui/SiteGroupSection.tsx +6 -2
  354. package/src/ecosystem/ui/SiteTile.tsx +6 -2
  355. package/src/error/ui/ErrorFallback.tsx +13 -12
  356. package/src/help/ui/HelpBody.tsx +4 -2
  357. package/src/help/ui/HelpIcon.tsx +6 -3
  358. package/src/help/ui/HelpToolbarButton.tsx +4 -1
  359. package/src/help/ui/helpName.ts +10 -2
  360. package/src/i18n/core/chromeCatalog.ts +35 -0
  361. package/src/i18n/core/index.ts +26 -0
  362. package/src/i18n/core/languages.ts +46 -0
  363. package/src/i18n/core/messageCatalog.ts +202 -0
  364. package/src/i18n/core/messageValues.ts +2 -0
  365. package/src/i18n/core/session.ts +82 -0
  366. package/src/i18n/core/translateSetup.ts +47 -0
  367. package/src/i18n/ui/LanguageSelect.tsx +72 -0
  368. package/src/i18n/ui/index.ts +9 -0
  369. package/src/i18n/ui/useLanguage.ts +48 -0
  370. package/src/i18n/ui/useT.ts +90 -0
  371. package/src/locales/de.json +442 -0
  372. package/src/locales/en.json +442 -0
  373. package/src/locales/es.json +442 -0
  374. package/src/locales/fr.json +442 -0
  375. package/src/molecule3d/core/gestures.ts +44 -7
  376. package/src/molecule3d/ui/Molecule3DExport.tsx +3 -1
  377. package/src/molecule3d/ui/Molecule3DHelp.tsx +17 -6
  378. package/src/molecule3d/ui/Molecule3DOptions.tsx +13 -13
  379. package/src/molecule3d/ui/Molecule3DSurfaceColors.tsx +16 -13
  380. package/src/molecule3d/ui/Molecule3DToolbar.tsx +29 -18
  381. package/src/molecule3d/ui/MoleculeViewer3D.tsx +13 -8
  382. package/src/orbital/ui/AtomicOrbitalCanvas.tsx +3 -1
  383. package/src/orbital/ui/AtomicOrbitalControls.tsx +15 -20
  384. package/src/orbital/ui/AtomicOrbitalViewer.tsx +13 -13
  385. package/src/orbital/ui/capability.ts +10 -0
  386. package/src/overlay/ui/OverlayBar.tsx +7 -4
  387. package/src/overlay/ui/OverlayInfo.tsx +6 -3
  388. package/src/overlay/ui/OverlayPanel.tsx +10 -7
  389. package/src/overlay/ui/OverlayReadout.tsx +3 -1
  390. package/src/pedagogy/ui/ExerciseActions.tsx +16 -6
  391. package/src/pedagogy/ui/ExerciseProgressHeader.tsx +13 -11
  392. package/src/pedagogy/ui/GlossaryIndex.tsx +11 -12
  393. package/src/pedagogy/ui/HintLadder.tsx +15 -12
  394. package/src/pedagogy/ui/SyntaxTooltip.tsx +9 -7
  395. package/src/pedagogy/ui/TutorialStepStrip.tsx +8 -3
  396. package/src/periodic/ui/CategoryLegend.tsx +6 -1
  397. package/src/periodic/ui/ElementCell.tsx +7 -1
  398. package/src/periodic/ui/PeriodicTable.tsx +3 -1
  399. package/src/periodic/ui/PeriodicTableChrome.tsx +4 -2
  400. package/src/share/ui/ShareButton.tsx +8 -5
  401. package/src/share/ui/ShareConfigOptions.tsx +6 -7
  402. package/src/share/ui/ShareDialog.tsx +3 -1
  403. package/src/share/ui/ShareDialogContent.tsx +20 -10
  404. package/src/share/ui/SharePresetTabs.tsx +3 -1
  405. package/src/slides/ui/BackToSlides.tsx +4 -2
  406. package/src/slides/ui/EmbedSlide.tsx +3 -3
  407. package/src/slides/ui/Slide.tsx +3 -1
  408. package/src/slides/ui/SlideshowBar.tsx +12 -4
  409. package/src/slides/ui/TalkList.tsx +8 -10
  410. package/src/structure/core/editorGuide.ts +126 -19
  411. package/src/structure/core/editorToolbar.ts +52 -24
  412. package/src/structure/ui/EditorHelpButton.tsx +9 -4
  413. package/src/structure/ui/StructureEditor.tsx +7 -1
  414. package/src/structure/ui/StructureEditorHelp.tsx +34 -11
  415. package/src/structure/ui/ToolbarTooltip.tsx +8 -4
  416. package/src/ui.ts +1 -0
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Button, NonIdealState } from '@blueprintjs/core';
3
+ import { useChromeT } from "../../i18n/ui/useT.js";
3
4
  /**
4
5
  * The default face of a failure: what happened, and a way out of it.
5
6
  *
@@ -10,7 +11,8 @@ import { Button, NonIdealState } from '@blueprintjs/core';
10
11
  * @returns The non-ideal state.
11
12
  */
12
13
  export function ErrorFallback(props) {
13
- const { error, onRetry, title = 'Something went wrong', retryLabel = 'Try again', className, } = props;
14
- return (_jsx(NonIdealState, { className: className, icon: "error", title: title, description: _jsx("span", { className: "error-fallback__message", children: error.message === '' ? 'No message was given.' : error.message }), action: onRetry === undefined ? undefined : (_jsx(Button, { icon: "refresh", text: retryLabel, onClick: onRetry })) }));
14
+ const { error, onRetry, title, retryLabel, className } = props;
15
+ const t = useChromeT();
16
+ return (_jsx(NonIdealState, { className: className, icon: "error", title: title ?? t('error.title'), description: _jsx("span", { className: "error-fallback__message", children: error.message === '' ? t('error.noMessage') : error.message }), action: onRetry === undefined ? undefined : (_jsx(Button, { icon: "refresh", text: retryLabel ?? t('error.tryAgain'), onClick: onRetry })) }));
15
17
  }
16
18
  //# sourceMappingURL=ErrorFallback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorFallback.js","sourceRoot":"","sources":["../../../src/error/ui/ErrorFallback.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA8B1D;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EACJ,KAAK,EACL,OAAO,EACP,KAAK,GAAG,sBAAsB,EAC9B,UAAU,GAAG,WAAW,EACxB,SAAS,GACV,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,KAAC,aAAa,IACZ,SAAS,EAAE,SAAS,EACpB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,WAAW,EACT,eAAM,SAAS,EAAC,yBAAyB,YACtC,KAAK,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAC1D,EAET,MAAM,EACJ,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAClC,KAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,GAAI,CAC9D,GAEH,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ErrorFallback.js","sourceRoot":"","sources":["../../../src/error/ui/ErrorFallback.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,M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CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAqC3D"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useChromeT } from "../../i18n/ui/useT.js";
2
3
  import { joinClassNames } from "../../shared/ui/joinClassNames.js";
3
4
  /**
4
5
  * The one rendering of a piece of help.
@@ -11,8 +12,9 @@ import { joinClassNames } from "../../shared/ui/joinClassNames.js";
11
12
  */
12
13
  export function HelpBody(props) {
13
14
  const { className, content, width = DEFAULT_WIDTH } = props;
15
+ const t = useChromeT();
14
16
  const { title, body, example, link } = content;
15
- return (_jsxs("div", { className: joinClassNames('help-body', className), style: { ...BODY_STYLE, maxWidth: width }, children: [title === undefined ? null : _jsx("div", { style: TITLE_STYLE, children: title }), body === undefined ? null : _jsx("div", { style: TEXT_STYLE, children: body }), examplesOf(example).map((item) => (_jsxs("div", { style: EXAMPLE_STYLE, children: [_jsx("code", { style: CODE_STYLE, children: item.code }), item.input === undefined ? null : (_jsxs("div", { style: INPUT_STYLE, children: ["on ", _jsx("code", { style: CODE_STYLE, children: item.input })] })), item.note === undefined ? null : (_jsx("div", { style: NOTE_STYLE, children: item.note }))] }, exampleKey(item)))), link === undefined ? null : (_jsx("a", { href: link, target: "_blank", rel: "noopener noreferrer", style: LINK_STYLE, children: "Learn more" }))] }));
17
+ return (_jsxs("div", { className: joinClassNames('help-body', className), style: { ...BODY_STYLE, maxWidth: width }, children: [title === undefined ? null : _jsx("div", { style: TITLE_STYLE, children: title }), body === undefined ? null : _jsx("div", { style: TEXT_STYLE, children: body }), examplesOf(example).map((item) => (_jsxs("div", { style: EXAMPLE_STYLE, children: [_jsx("code", { style: CODE_STYLE, children: item.code }), item.input === undefined ? null : (_jsxs("div", { style: INPUT_STYLE, children: [t('help.on'), " ", _jsx("code", { style: CODE_STYLE, children: item.input })] })), item.note === undefined ? null : (_jsx("div", { style: NOTE_STYLE, children: item.note }))] }, exampleKey(item)))), link === undefined ? null : (_jsx("a", { href: link, target: "_blank", rel: "noopener noreferrer", style: LINK_STYLE, children: t('help.learnMore') }))] }));
16
18
  }
17
19
  // Two examples are only the same when all three of their parts are, and a help
18
20
  // that repeats one example has nothing to gain from drawing it twice.
@@ -1 +1 @@
1
- {"version":3,"file":"HelpBody.js","sourceRoot":"","sources":["../../../src/help/ui/HelpBody.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AA6DnE;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,GAAG,aAAa,EAAE,GAAG,KAAK,CAAC;IAC5D,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAE/C,OAAO,CACL,eACE,SAAS,EAAE,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,EACjD,KAAK,EAAE,EAAE,GAAG,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,aAExC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,KAAK,EAAE,WAAW,YAAG,KAAK,GAAO,EACnE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,KAAK,EAAE,UAAU,YAAG,IAAI,GAAO,EAChE,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACjC,eAA4B,KAAK,EAAE,aAAa,aAC9C,eAAM,KAAK,EAAE,UAAU,YAAG,IAAI,CAAC,IAAI,GAAQ,EAC1C,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACjC,e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mC,CAAC;AAEtE,MAAM,UAAU,GAAG;IACjB,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,QAAQ;CACa,CAAC;AAEnC,MAAM,UAAU,GAAG,EAAE,UAAU,EAAE,GAAG,EAAmC,CAAC"}
@@ -10,7 +10,8 @@ export interface HelpIconProps {
10
10
  content: HelpContent;
11
11
  /**
12
12
  * What a screen reader calls the glyph.
13
- * @default the help's title, or `'Help'` when it has none
13
+ * @default the help's title, or the chrome's own word for help when it has
14
+ * none
14
15
  */
15
16
  label?: string;
16
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"HelpIcon.d.ts","sourceRoot":"","sources":["../../../src/help/ui/HelpIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAqB3D"}
1
+ {"version":3,"file":"HelpIcon.d.ts","sourceRoot":"","sources":["../../../src/help/ui/HelpIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAsB3D"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Icon } from '@blueprintjs/core';
3
+ import { useChromeT } from "../../i18n/ui/useT.js";
3
4
  import { joinClassNames } from "../../shared/ui/joinClassNames.js";
4
5
  import { HelpTooltip } from "./HelpTooltip.js";
5
6
  import { helpName } from "./helpName.js";
@@ -12,7 +13,8 @@ import { helpName } from "./helpName.js";
12
13
  * @returns The glyph and its help.
13
14
  */
14
15
  export function HelpIcon(props) {
15
- const { content, label = helpName(content), icon = 'help', size = 13, placement = 'right', className, } = props;
16
- return (_jsx(HelpTooltip, { content: content, placement: placement, children: _jsx(Icon, { icon: icon, size: size, tabIndex: 0, "aria-label": label, className: joinClassNames('help-icon', className) }) }));
16
+ const { content, label, icon = 'help', size = 13, placement = 'right', className, } = props;
17
+ const t = useChromeT();
18
+ return (_jsx(HelpTooltip, { content: content, placement: placement, children: _jsx(Icon, { icon: icon, size: size, tabIndex: 0, "aria-label": label ?? helpName(content, t), className: joinClassNames('help-icon', className) }) }));
17
19
  }
18
20
  //# sourceMappingURL=HelpIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HelpIcon.js","sourceRoot":"","sources":["../../../src/help/ui/HelpIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAqCzC;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EACJ,OAAO,EACP,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,EACzB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,OAAO,EACnB,SAAS,GACV,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,KAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,YACjD,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,gBACC,KAAK,EACjB,SAAS,EAAE,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,GACjD,GACU,CACf,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"HelpIcon.js","sourceRoot":"","sources":["../../../src/help/ui/HelpIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAsCzC;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EACJ,OAAO,EACP,KAAK,EACL,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,OAAO,EACnB,SAAS,GACV,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,YACjD,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,gBACC,KAAK,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EACzC,SAAS,EAAE,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,GACjD,GACU,CACf,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HelpToolbarButton.d.ts","sourceRoot":"","sources":["../../../src/help/ui/HelpToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,OAAO,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAuB7E"}
1
+ {"version":3,"file":"HelpToolbarButton.d.ts","sourceRoot":"","sources":["../../../src/help/ui/HelpToolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,OAAO,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAwB7E"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Button } from '@blueprintjs/core';
3
+ import { useChromeT } from "../../i18n/ui/useT.js";
3
4
  import { HelpTooltip } from "./HelpTooltip.js";
4
5
  import { helpName } from "./helpName.js";
5
6
  /**
@@ -13,6 +14,7 @@ import { helpName } from "./helpName.js";
13
14
  */
14
15
  export function HelpToolbarButton(props) {
15
16
  const { content, onClick, label, icon = 'help', small = false, className, } = props;
16
- return (_jsx(HelpTooltip, { content: content, placement: "bottom", children: _jsx(Button, { variant: "minimal", size: small ? 'small' : 'medium', icon: icon, text: label, "aria-label": label ?? helpName(content), className: className, onClick: onClick }) }));
17
+ const t = useChromeT();
18
+ return (_jsx(HelpTooltip, { content: content, placement: "bottom", children: _jsx(Button, { variant: "minimal", size: small ? 'small' : 'medium', icon: icon, text: label, "aria-label": label ?? helpName(content, t), className: className, onClick: onClick }) }));
17
19
  }
18
20
  //# sourceMappingURL=HelpToolbarButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HelpToolbarButton.js","sourceRoot":"","sources":["../../../src/help/ui/HelpToolbarButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAkCzC;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EACJ,OAAO,EACP,OAAO,EACP,KAAK,EACL,IAAI,GAAG,MAAM,EACb,KAAK,GAAG,KAAK,EACb,SAAS,GACV,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,KAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,QAAQ,YAC/C,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAChC,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,KAAK,gBACC,KAAK,IAAI,QAAQ,CAAC,OAAO,CAAC,EACtC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,GAChB,GACU,CACf,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"HelpToolbarButton.js","sourceRoot":"","sources":["../../../src/help/ui/HelpToolbarButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAkCzC;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EACJ,OAAO,EACP,OAAO,EACP,KAAK,EACL,IAAI,GAAG,MAAM,EACb,KAAK,GAAG,KAAK,EACb,SAAS,GACV,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,QAAQ,YAC/C,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAChC,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,KAAK,gBACC,KAAK,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EACzC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,GAChB,GACU,CACf,CAAC;AACJ,CAAC"}
@@ -1,9 +1,13 @@
1
+ import type { ChromeKey } from '../../i18n/core/chromeCatalog.ts';
2
+ import type { Translate } from '../../i18n/ui/useT.ts';
1
3
  import type { HelpContent } from './HelpBody.tsx';
2
4
  /**
3
5
  * The name a glyph or a button carries for a screen reader: the help's own
4
6
  * title, or a plain "Help" when the help has none.
5
7
  * @param content - The help being named.
8
+ * @param t - The chrome's formatter, so the plain name is in the language of
9
+ * the page.
6
10
  * @returns The accessible name.
7
11
  */
8
- export declare function helpName(content: HelpContent): string;
12
+ export declare function helpName(content: HelpContent, t: Translate<ChromeKey>): string;
9
13
  //# sourceMappingURL=helpName.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpName.d.ts","sourceRoot":"","sources":["../../../src/help/ui/helpName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAErD"}
1
+ {"version":3,"file":"helpName.d.ts","sourceRoot":"","sources":["../../../src/help/ui/helpName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,WAAW,EACpB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GACtB,MAAM,CAER"}
@@ -2,9 +2,11 @@
2
2
  * The name a glyph or a button carries for a screen reader: the help's own
3
3
  * title, or a plain "Help" when the help has none.
4
4
  * @param content - The help being named.
5
+ * @param t - The chrome's formatter, so the plain name is in the language of
6
+ * the page.
5
7
  * @returns The accessible name.
6
8
  */
7
- export function helpName(content) {
8
- return content.title ?? 'Help';
9
+ export function helpName(content, t) {
10
+ return content.title ?? t('help.label');
9
11
  }
10
12
  //# sourceMappingURL=helpName.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpName.js","sourceRoot":"","sources":["../../../src/help/ui/helpName.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAoB;IAC3C,OAAO,OAAO,CAAC,KAAK,IAAI,MAAM,CAAC;AACjC,CAAC"}
1
+ {"version":3,"file":"helpName.js","sourceRoot":"","sources":["../../../src/help/ui/helpName.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACtB,OAAoB,EACpB,CAAuB;IAEvB,OAAO,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The text this library puts on the page.
3
+ *
4
+ * Every site of the family shows the same header, footer, Tools menu, Cite
5
+ * menu, share dialog and About page, so those words are translated once here
6
+ * rather than re-typed into eighteen catalogs of their own: one merged pull
7
+ * request writes every site in a new language.
8
+ */
9
+ import en from '../../locales/en.json';
10
+ import { MessageCatalog } from './messageCatalog.ts';
11
+ /** The name the page knows the chrome's own catalog by. */
12
+ export declare const CHROME_CATALOG_ID = "react-cheminfo";
13
+ /** Every key the chrome declares. */
14
+ export type ChromeKey = keyof typeof en;
15
+ /**
16
+ * The chrome's messages. English is part of the page because it is what a
17
+ * missing message falls back to; the other three arrive as a chunk of their
18
+ * own, so a site read only in English downloads none of them.
19
+ */
20
+ export declare const CHROME_CATALOG: MessageCatalog<"language.label" | "chrome.pages" | "ecosystem.tools" | "ecosystem.menuHeading" | "ecosystem.otherTools" | "ecosystem.youAreHere" | "ecosystem.group.basics.label" | "ecosystem.group.basics.blurb" | "ecosystem.group.practice.label" | "ecosystem.group.practice.blurb" | "ecosystem.group.structures.label" | "ecosystem.group.structures.blurb" | "ecosystem.group.spectra.label" | "ecosystem.group.spectra.blurb" | "ecosystem.group.research.label" | "ecosystem.group.research.blurb" | "ecosystem.group.computing.label" | "ecosystem.group.computing.blurb" | "site.learn.tagline" | "site.inchi.tagline" | "site.vcl.tagline" | "site.smiles.tagline" | "site.openbabel.tagline" | "site.chemcalc.tagline" | "site.dbe.tagline" | "site.nmrium.tagline" | "site.metabo.tagline" | "site.derepflow.tagline" | "site.surge.tagline" | "site.tex.tagline" | "site.lcao.tagline" | "site.regexp.tagline" | "site.pdb.tagline" | "site.elucidation.tagline" | "site.equilibrium.tagline" | "site.polycarp.tagline" | "site.3d.tagline" | "site.periodic-table.tagline" | "site.database.tagline" | "site.symmetry.tagline" | "site.osiris.tagline" | "site.atoms.tagline" | "site.moles.tagline" | "site.inorganic.tagline" | "share.button" | "share.buttonTitle" | "share.dialogTitle" | "share.lead" | "share.layout" | "share.embed" | "share.embedHint" | "share.showOnPage" | "share.custom" | "share.link" | "share.copyLink" | "share.openInNewTab" | "share.iframe" | "share.copyIframe" | "share.done" | "cite.button" | "cite.copyReferenceAs" | "cite.pleaseCiteBoth" | "cite.pleaseCiteEvery" | "cite.copyBothAs" | "cite.copyEveryAs" | "cite.importIntoManager" | "cite.openArticle" | "cite.copyThisAs" | "cite.importThis" | "cite.copied" | "cite.copyFailed" | "cite.format.doi" | "cite.download.ris" | "cite.download.bibtex" | "clipboard.copied" | "clipboard.failed" | "clipboard.copy" | "clipboard.copyThe" | "clipboard.copyValue" | "clipboard.copyToClipboard" | "about.providedBy" | "about.whatYouCanDo" | "about.builtOn" | "about.howToCite" | "about.licenceAndSource" | "about.licence" | "about.foundAProblem" | "about.reportIt" | "about.citeWork" | "about.built" | "about.builtFromCommit" | "about.nameList" | "credits.openbabel.description" | "credits.openchemlib.description" | "credits.openchemlib-utils.description" | "credits.osiris-property-explorer.description" | "credits.react-ocl.description" | "credits.react-mf.description" | "credits.mass-tools.description" | "credits.chem-equilibrium.description" | "credits.ml-matrix.description" | "credits.ml-xsadd.description" | "credits.cif-to-json.description" | "credits.ml-spectra-processing.description" | "credits.occ.description" | "credits.xtb-wasm.description" | "credits.molstar.description" | "credits.blueprint.description" | "credits.react-science.description" | "credits.react-cheminfo.description" | "credits.cheminfo-font.description" | "credits.nivo.description" | "credits.mathjax.description" | "credits.lexical.description" | "credits.katex.description" | "credits.dnd-kit.description" | "credits.react-roi.description" | "credits.file-collection.description" | "credits.zip-js.description" | "credits.preact-signals.description" | "credits.fastify.description" | "credits.sqlite.description" | "credits.sqlite-wasm.description" | "credits.pouchdb.description" | "credits.chemexper.description" | "credits.react.description" | "credits.vite.description" | "help.label" | "help.learnMore" | "help.on" | "confirm.delete" | "confirm.cancel" | "error.title" | "error.tryAgain" | "error.noMessage" | "capsule.filter" | "color.scales" | "color.done" | "color.custom" | "color.customEllipsis" | "color.inUse" | "color.colourScale" | "color.legendLabel" | "color.scaleBeingEdited" | "color.anchorColour" | "color.anchorPosition" | "color.removeAnchor" | "color.addColour" | "color.path" | "color.interpolation.rgb" | "color.interpolation.hsv" | "color.interpolation.hsv-long" | "color.kind.sequential" | "color.kind.diverging" | "color.kind.cyclic" | "color.scale.viridis.label" | "color.scale.viridis.description" | "color.scale.plasma.label" | "color.scale.plasma.description" | "color.scale.magma.label" | "color.scale.magma.description" | "color.scale.inferno.label" | "color.scale.inferno.description" | "color.scale.cividis.label" | "color.scale.cividis.description" | "color.scale.turbo.label" | "color.scale.turbo.description" | "color.scale.greys.label" | "color.scale.greys.description" | "color.scale.cool-warm.label" | "color.scale.cool-warm.description" | "color.scale.blue-red.label" | "color.scale.blue-red.description" | "color.scale.rainbow.label" | "color.scale.rainbow.description" | "download.save" | "download.saveFigure" | "download.saveThisFigure" | "download.format" | "download.formatHelp" | "download.resolution" | "download.resolutionHelp" | "download.resolutionExample" | "download.noFigure" | "download.hintRasterSvg" | "download.hintSvg" | "download.hintPng" | "pedagogy.check" | "pedagogy.revealHint" | "pedagogy.revealHintCount" | "pedagogy.revealHintLadder" | "pedagogy.hideSolution" | "pedagogy.revealSolution" | "pedagogy.reset" | "pedagogy.hints" | "pedagogy.solvedCount" | "pedagogy.clearAll" | "pedagogy.keepAnswers" | "pedagogy.clearEverything" | "pedagogy.clearWarning" | "pedagogy.filterTerms" | "pedagogy.noTermDefined" | "pedagogy.noTermMatches" | "pedagogy.example" | "pedagogy.input" | "pedagogy.previous" | "pedagogy.next" | "pedagogy.stepOf" | "slides.exit" | "slides.previousSlide" | "slides.nextSlide" | "slides.toggleFullscreen" | "slides.backToSlides" | "slides.backToSlide" | "slides.noAddress" | "slides.liveDemos" | "slides.noTalkYet" | "overlay.options" | "overlay.whatAmILookingAt" | "overlay.reset" | "overlay.hoverAName" | "overlay.dismiss" | "delimited.copyTable" | "delimited.close" | "delimited.separator" | "delimited.save" | "delimited.copy" | "delimited.tableAsText" | "chart.measurement" | "chart.measurements" | "delimited.descriptionOne" | "delimited.descriptionMany" | "structure.guide.atom.title" | "structure.guide.atom.element" | "structure.guide.atom.group" | "structure.guide.atom.applyOrForget" | "structure.guide.atom.chain" | "structure.guide.atom.charge" | "structure.guide.atom.radical" | "structure.guide.atom.spin" | "structure.guide.atom.attachment" | "structure.guide.atom.query" | "structure.guide.atom.halogen" | "structure.guide.atom.delete" | "structure.guide.atom.note" | "structure.guide.bond.title" | "structure.guide.bond.order" | "structure.guide.bond.zeroOrder" | "structure.guide.bond.stereo" | "structure.guide.bond.unknownGeometry" | "structure.guide.bond.threeRing" | "structure.guide.bond.ring" | "structure.guide.bond.benzene" | "structure.guide.bond.query" | "structure.guide.bond.delete" | "structure.guide.anywhere.title" | "structure.guide.anywhere.undo" | "structure.guide.anywhere.copy" | "structure.guide.anywhere.paste" | "structure.guide.anywhere.deleteSelection" | "structure.guide.anywhere.flip" | "structure.guide.anywhere.help" | "structure.guide.anywhere.note" | "structure.guide.selecting.title" | "structure.guide.selecting.lasso" | "structure.guide.selecting.rectangle" | "structure.guide.selecting.add" | "structure.guide.selecting.move" | "structure.guide.selecting.duplicate" | "structure.guide.selecting.queryFeatures" | "structure.guide.selecting.note" | "structure.guide.stereochemistry.title" | "structure.guide.stereochemistry.note" | "structure.input.type" | "structure.input.or" | "structure.input.drag" | "structure.input.plusDrag" | "structure.input.dragSelection" | "structure.input.plusDragSelection" | "structure.input.doubleClick" | "structure.docs.toolsAndKeys" | "structure.docs.atomProperties" | "structure.docs.stereochemistry" | "structure.help.hoverToolbar" | "structure.help.learnMore" | "structure.mouseAndKeyboard" | "structure.tool.clear.name" | "structure.tool.clear.description" | "structure.tool.cleanUp.name" | "structure.tool.cleanUp.description" | "structure.tool.select.name" | "structure.tool.select.description" | "structure.tool.unknownConfiguration.name" | "structure.tool.unknownConfiguration.description" | "structure.tool.delete.name" | "structure.tool.delete.description" | "structure.tool.singleBond.name" | "structure.tool.singleBond.description" | "structure.tool.upBond.name" | "structure.tool.upBond.description" | "structure.tool.positiveCharge.name" | "structure.tool.positiveCharge.description" | "structure.tool.undo.name" | "structure.tool.undo.description" | "structure.tool.zoomAndRotate.name" | "structure.tool.zoomAndRotate.description" | "structure.tool.atomMapping.name" | "structure.tool.atomMapping.description" | "structure.tool.enhancedStereo.name" | "structure.tool.enhancedStereo.description" | "structure.tool.text.name" | "structure.tool.text.description" | "structure.tool.chain.name" | "structure.tool.chain.description" | "structure.tool.downBond.name" | "structure.tool.downBond.description" | "structure.tool.negativeCharge.name" | "structure.tool.negativeCharge.description" | "structure.tool.anyAtom.name" | "structure.tool.anyAtom.description" | "structure.tool.ring3.name" | "structure.tool.ring3.description" | "structure.tool.ring5.name" | "structure.tool.ring5.description" | "structure.tool.ring7.name" | "structure.tool.ring7.description" | "structure.tool.ring4.name" | "structure.tool.ring4.description" | "structure.tool.ring6.name" | "structure.tool.ring6.description" | "structure.tool.benzene.name" | "structure.tool.benzene.description" | "structure.tool.carbon.name" | "structure.tool.carbon.description" | "structure.tool.nitrogen.name" | "structure.tool.nitrogen.description" | "structure.tool.oxygen.name" | "structure.tool.oxygen.description" | "structure.tool.fluorine.name" | "structure.tool.fluorine.description" | "structure.tool.bromine.name" | "structure.tool.bromine.description" | "structure.tool.hydrogen.name" | "structure.tool.hydrogen.description" | "structure.tool.silicon.name" | "structure.tool.silicon.description" | "structure.tool.phosphorus.name" | "structure.tool.phosphorus.description" | "structure.tool.sulfur.name" | "structure.tool.sulfur.description" | "structure.tool.chlorine.name" | "structure.tool.chlorine.description" | "structure.tool.iodine.name" | "structure.tool.iodine.description" | "structure.tool.reactionOnly" | "structure.tool.unavailable" | "structure.loadingEditor" | "periodic.table" | "periodic.group" | "periodic.period" | "periodic.cellLabel" | "periodic.category.alkali-metal" | "periodic.category.alkaline-earth-metal" | "periodic.category.transition-metal" | "periodic.category.post-transition-metal" | "periodic.category.metalloid" | "periodic.category.nonmetal" | "periodic.category.halogen" | "periodic.category.noble-gas" | "periodic.category.lanthanoid" | "periodic.category.actinoid" | "molecule3d.view" | "molecule3d.resetView" | "molecule3d.spin" | "molecule3d.surface" | "molecule3d.molecularSurface" | "molecule3d.displayOptions" | "molecule3d.exportImage" | "molecule3d.measure" | "molecule3d.clearMeasurements" | "molecule3d.measurement.distance" | "molecule3d.measurement.angle" | "molecule3d.measurement.dihedral" | "molecule3d.measurementTooltip" | "molecule3d.representation.ball-and-stick" | "molecule3d.representation.spacefill" | "molecule3d.representation.stick" | "molecule3d.size" | "molecule3d.surfaceOpacity" | "molecule3d.solventProbe" | "molecule3d.solventProbeHelp" | "molecule3d.surfaceColour" | "molecule3d.colour" | "molecule3d.coloring.uniform" | "molecule3d.coloring.element" | "molecule3d.coloring.polarity" | "molecule3d.neutral" | "molecule3d.tpsaHelp" | "molecule3d.loadingViewer" | "molecule3d.couldNotDraw" | "molecule3d.gesture.rotate" | "molecule3d.gesture.rollDrag" | "molecule3d.gesture.rollKeys" | "molecule3d.gesture.moveDrag" | "molecule3d.gesture.moveCtrl" | "molecule3d.gesture.zoom" | "molecule3d.gesture.clip" | "molecule3d.gesture.centreAtom" | "molecule3d.gesture.centreMolecule" | "molecule3d.input.drag" | "molecule3d.input.plus" | "molecule3d.input.plusDrag" | "molecule3d.input.plusScroll" | "molecule3d.input.or" | "molecule3d.input.rightDrag" | "molecule3d.input.scroll" | "molecule3d.input.clickAtom" | "molecule3d.input.clickBackground" | "molecule3d.helpNote" | "orbital.couldNotDraw" | "orbital.sampling" | "orbital.showAxes" | "orbital.axesTitle" | "orbital.axesBody" | "orbital.axesExample" | "orbital.resetTitle" | "orbital.resetBody" | "viewer.capability.noWindow" | "viewer.capability.noContext" | "viewer.capability.noFloatTextures" | "viewer.capability.ready" | "conformers.strategy.adaptive-random" | "conformers.strategy.likely-random" | "conformers.strategy.pure-random" | "conformers.strategy.likely-systematic" | "conformers.strategyDetail.adaptive-random" | "conformers.strategyDetail.likely-random" | "conformers.strategyDetail.pure-random" | "conformers.strategyDetail.likely-systematic" | "conformers.minimisation.none">;
21
+ //# sourceMappingURL=chromeCatalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chromeCatalog.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/chromeCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,uBAAuB,CAAuB;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD,qCAAqC;AACrC,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,cAAc,mmZAUzB,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The text this library puts on the page.
3
+ *
4
+ * Every site of the family shows the same header, footer, Tools menu, Cite
5
+ * menu, share dialog and About page, so those words are translated once here
6
+ * rather than re-typed into eighteen catalogs of their own: one merged pull
7
+ * request writes every site in a new language.
8
+ */
9
+ import en from '../../locales/en.json' with { type: 'json' };
10
+ import { MessageCatalog } from "./messageCatalog.js";
11
+ /** The name the page knows the chrome's own catalog by. */
12
+ export const CHROME_CATALOG_ID = 'react-cheminfo';
13
+ /**
14
+ * The chrome's messages. English is part of the page because it is what a
15
+ * missing message falls back to; the other three arrive as a chunk of their
16
+ * own, so a site read only in English downloads none of them.
17
+ */
18
+ export const CHROME_CATALOG = new MessageCatalog({
19
+ id: CHROME_CATALOG_ID,
20
+ repository: 'cheminfo/react-cheminfo',
21
+ directory: 'src/locales',
22
+ source: en,
23
+ translations: {
24
+ fr: () => import('../../locales/fr.json', { with: { type: 'json' } }),
25
+ de: () => import('../../locales/de.json', { with: { type: 'json' } }),
26
+ es: () => import('../../locales/es.json', { with: { type: 'json' } }),
27
+ },
28
+ });
29
+ //# sourceMappingURL=chromeCatalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chromeCatalog.js","sourceRoot":"","sources":["../../../src/i18n/core/chromeCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAKlD;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAY;IAC1D,EAAE,EAAE,iBAAiB;IACrB,UAAU,EAAE,yBAAyB;IACrC,SAAS,EAAE,aAAa;IACxB,MAAM,EAAE,EAAE;IACV,YAAY,EAAE;QACZ,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;QACrE,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;QACrE,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;KACtE;CACF,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ export type { ChromeKey } from './chromeCatalog.ts';
2
+ export { CHROME_CATALOG, CHROME_CATALOG_ID } from './chromeCatalog.ts';
3
+ export type { Language } from './languages.ts';
4
+ export { DEFAULT_LANGUAGE, LANGUAGES, LANGUAGE_LABELS, isLanguage, } from './languages.ts';
5
+ export type { LooseKey, MessageCatalogOptions, MessagesLoader, TranslateOptions, } from './messageCatalog.ts';
6
+ export { MessageCatalog } from './messageCatalog.ts';
7
+ export type { MessageValues } from './messageValues.ts';
8
+ export type { MessageSession } from './session.ts';
9
+ export { messageSession, messagesVersion, setMessageSession, subscribeToMessages, } from './session.ts';
10
+ export type { LoadedCatalogs } from './translateSetup.ts';
11
+ export { loadCatalogs } from './translateSetup.ts';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { CHROME_CATALOG, CHROME_CATALOG_ID } from "./chromeCatalog.js";
2
+ export { DEFAULT_LANGUAGE, LANGUAGES, LANGUAGE_LABELS, isLanguage, } from "./languages.js";
3
+ export { MessageCatalog } from "./messageCatalog.js";
4
+ export { messageSession, messagesVersion, setMessageSession, subscribeToMessages, } from "./session.js";
5
+ export { loadCatalogs } from "./translateSetup.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The languages the family speaks.
3
+ *
4
+ * Four, decided together rather than site by site: a visitor who switches to
5
+ * German on one tool and follows a link to the next must land in German there
6
+ * too, and a list that differs between two sites makes that impossible.
7
+ */
8
+ /** Every language a site of the family is written in. */
9
+ export declare const LANGUAGES: readonly ["en", "fr", "de", "es"];
10
+ /** One of {@link LANGUAGES}. */
11
+ export type Language = (typeof LANGUAGES)[number];
12
+ /**
13
+ * The language the catalogs are written in first, and the one every site opens
14
+ * in: an address naming it carries nothing, and a message a translation does
15
+ * not hold falls back to it.
16
+ */
17
+ export declare const DEFAULT_LANGUAGE: Language;
18
+ /**
19
+ * What a language switch writes behind each entry.
20
+ *
21
+ * A language names itself, in its own words: `Deutsch`, never `German`. A
22
+ * reader looking for their own language recognises it written their way, and
23
+ * would have to know English to find it written the other.
24
+ */
25
+ export declare const LANGUAGE_LABELS: Record<Language, string>;
26
+ /**
27
+ * Whether a string is one of the languages the family speaks.
28
+ * @param value - Candidate tag, typically read off an address.
29
+ * @returns True when a catalog can be written in it.
30
+ */
31
+ export declare function isLanguage(value: string): value is Language;
32
+ //# sourceMappingURL=languages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/languages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yDAAyD;AACzD,eAAO,MAAM,SAAS,mCAAoC,CAAC;AAE3D,gCAAgC;AAChC,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAe,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAKpD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAK3D"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The languages the family speaks.
3
+ *
4
+ * Four, decided together rather than site by site: a visitor who switches to
5
+ * German on one tool and follows a link to the next must land in German there
6
+ * too, and a list that differs between two sites makes that impossible.
7
+ */
8
+ /** Every language a site of the family is written in. */
9
+ export const LANGUAGES = ['en', 'fr', 'de', 'es'];
10
+ /**
11
+ * The language the catalogs are written in first, and the one every site opens
12
+ * in: an address naming it carries nothing, and a message a translation does
13
+ * not hold falls back to it.
14
+ */
15
+ export const DEFAULT_LANGUAGE = 'en';
16
+ /**
17
+ * What a language switch writes behind each entry.
18
+ *
19
+ * A language names itself, in its own words: `Deutsch`, never `German`. A
20
+ * reader looking for their own language recognises it written their way, and
21
+ * would have to know English to find it written the other.
22
+ */
23
+ export const LANGUAGE_LABELS = {
24
+ en: 'English',
25
+ fr: 'Français',
26
+ de: 'Deutsch',
27
+ es: 'Español',
28
+ };
29
+ /**
30
+ * Whether a string is one of the languages the family speaks.
31
+ * @param value - Candidate tag, typically read off an address.
32
+ * @returns True when a catalog can be written in it.
33
+ */
34
+ export function isLanguage(value) {
35
+ for (const language of LANGUAGES) {
36
+ if (language === value)
37
+ return true;
38
+ }
39
+ return false;
40
+ }
41
+ //# sourceMappingURL=languages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"languages.js","sourceRoot":"","sources":["../../../src/i18n/core/languages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAK3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAa,IAAI,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,IAAI,QAAQ,KAAK,KAAK;YAAE,OAAO,IAAI,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * One directory of messages, and the reading of it.
3
+ *
4
+ * A catalog is `en.json` — the source of truth — with one file per language
5
+ * beside it. English is part of the page, because it is what every missing
6
+ * message falls back to; the others are fetched when a visitor asks for them,
7
+ * so a site nobody reads in German never downloads the German.
8
+ *
9
+ * Only the plain `{name}` argument of ICU MessageFormat is filled here. A
10
+ * plural or a select needs the formatter itself, which is 40 kB an ordinary
11
+ * visit must not pay for — `check-messages` refuses one in a catalog, and the
12
+ * page is written with a key per branch instead.
13
+ */
14
+ import type { CatalogSource, Messages } from '../../translate/core/catalog.ts';
15
+ import type { Language } from './languages.ts';
16
+ import type { MessageValues } from './messageValues.ts';
17
+ /** A language's messages, fetched only once a visitor asks for that language. */
18
+ export type MessagesLoader = () => Promise<{
19
+ default: Messages;
20
+ }>;
21
+ /**
22
+ * A key the catalog declares, or any other string.
23
+ *
24
+ * Many keys are built from the data — `site.surge.tagline`, `element.Fe.name`
25
+ * — so a row added before the catalogs have caught up must read as itself
26
+ * rather than fail to compile.
27
+ */
28
+ export type LooseKey<TKey extends string> = TKey | (string & Record<never, never>);
29
+ /** How a key is resolved when no catalog carries it, and with what. */
30
+ export interface TranslateOptions {
31
+ /**
32
+ * What to answer when neither the language nor English carries the key.
33
+ * @default the key itself
34
+ */
35
+ fallback?: string;
36
+ /**
37
+ * What each `{placeholder}` of the message stands for.
38
+ * @default undefined
39
+ */
40
+ values?: MessageValues;
41
+ }
42
+ /** How a catalog is declared. */
43
+ export interface MessageCatalogOptions<TKey extends string> {
44
+ /**
45
+ * The name the page knows the catalog by, unique on the page, e.g.
46
+ * `react-cheminfo` or `surge.cheminfo.org`.
47
+ */
48
+ id: string;
49
+ /** The GitHub repository the files live in, written `owner/repo`. */
50
+ repository: string;
51
+ /**
52
+ * The directory holding the locale files, relative to the repository root,
53
+ * e.g. `src/locales`.
54
+ */
55
+ directory: string;
56
+ /** The English messages, which are the keys the catalog declares. */
57
+ source: Record<TKey, string>;
58
+ /**
59
+ * The other languages: the messages themselves, or the import that fetches
60
+ * them. A language left out simply reads as English.
61
+ * @default {}
62
+ */
63
+ translations?: Partial<Record<Language, Messages | MessagesLoader>>;
64
+ }
65
+ /**
66
+ * The messages of one repository, read in whichever language the page is
67
+ * written in.
68
+ */
69
+ export declare class MessageCatalog<TKey extends string = string> {
70
+ #private;
71
+ /** The name the page knows this catalog by. */
72
+ readonly id: string;
73
+ /** What a translator's session and the overlay need to place an edit. */
74
+ readonly source: CatalogSource;
75
+ /**
76
+ * Declare a catalog.
77
+ * @param options - See {@link MessageCatalogOptions}.
78
+ */
79
+ constructor(options: MessageCatalogOptions<TKey>);
80
+ /**
81
+ * The languages this catalog carries, whether or not they are in memory.
82
+ * @returns The languages, English first.
83
+ */
84
+ get languages(): Language[];
85
+ /**
86
+ * The text a key carries in one language.
87
+ * @param key - Key to read.
88
+ * @param language - Language to read it in.
89
+ * @param options - See {@link TranslateOptions}.
90
+ * @returns The text.
91
+ */
92
+ translate(key: LooseKey<TKey>, language: Language, options?: TranslateOptions): string;
93
+ /**
94
+ * The messages of a language, once they are in memory.
95
+ * @param language - Language asked for.
96
+ * @returns The messages, or an empty catalog while they are still coming.
97
+ */
98
+ messages(language: Language): Messages;
99
+ /**
100
+ * Fetch a language's messages, if they are not in memory already.
101
+ * @param language - Language to read next.
102
+ * @returns Its messages.
103
+ */
104
+ load(language: Language): Promise<Messages>;
105
+ /**
106
+ * Start fetching a language without waiting for it. Safe to call on every
107
+ * render: a language already in memory, or already on its way, costs
108
+ * nothing.
109
+ * @param language - Language the page is about to be written in.
110
+ */
111
+ prefetch(language: Language): void;
112
+ }
113
+ //# sourceMappingURL=messageCatalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageCatalog.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/messageCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,SAAS,MAAM,IACtC,IAAI,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAEzC,uEAAuE;AACvE,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,iCAAiC;AACjC,MAAM,WAAW,qBAAqB,CAAC,IAAI,SAAS,MAAM;IACxD;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC;CACrE;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