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
@@ -5,10 +5,11 @@ import {
5
5
  DialogFooter,
6
6
  H6,
7
7
  } from '@blueprintjs/core';
8
- import type { CSSProperties, ReactElement } from 'react';
8
+ import type { CSSProperties, ReactElement, ReactNode } from 'react';
9
9
  import { useState } from 'react';
10
10
 
11
11
  import { CodeBlock, CopyButton } from '../../clipboard/ui/index.ts';
12
+ import { useChromeT } from '../../i18n/ui/useT.ts';
12
13
  import type {
13
14
  ShareConfig,
14
15
  ShareParamCodecs,
@@ -77,6 +78,7 @@ export function ShareDialogContent<
77
78
  frameHeight,
78
79
  children,
79
80
  } = props;
81
+ const t = useChromeT();
80
82
 
81
83
  const address = globalThis.location;
82
84
  const base = baseUrl ?? address?.href ?? '';
@@ -141,9 +143,7 @@ export function ShareDialogContent<
141
143
  return (
142
144
  <>
143
145
  <div className={BODY_CLASS} style={BODY_STYLE}>
144
- <p style={LEAD_STYLE}>
145
- A link to <b>{title}</b> as you have it set up now.
146
- </p>
146
+ <p style={LEAD_STYLE}>{lead(t('share.lead'), title)}</p>
147
147
 
148
148
  {presets.length === 0 ? (
149
149
  options
@@ -163,13 +163,13 @@ export function ShareDialogContent<
163
163
  )}
164
164
 
165
165
  <section className="share-section" style={SECTION_STYLE}>
166
- <H6>Link</H6>
166
+ <H6>{t('share.link')}</H6>
167
167
  <CodeBlock code={url} tone="muted" />
168
168
  <div style={ACTIONS_STYLE}>
169
- <CopyButton content={url} label="Copy the link" />
169
+ <CopyButton content={url} label={t('share.copyLink')} />
170
170
  <AnchorButton
171
171
  icon="share"
172
- text="Open in a new tab"
172
+ text={t('share.openInNewTab')}
173
173
  href={url}
174
174
  target="_blank"
175
175
  rel="noopener noreferrer"
@@ -178,20 +178,30 @@ export function ShareDialogContent<
178
178
  </section>
179
179
 
180
180
  <section className="share-section" style={SECTION_STYLE}>
181
- <H6>Iframe</H6>
181
+ <H6>{t('share.iframe')}</H6>
182
182
  <CodeBlock code={frame} tone="muted" />
183
183
  <div style={ACTIONS_STYLE}>
184
- <CopyButton content={frame} label="Copy the iframe" />
184
+ <CopyButton content={frame} label={t('share.copyIframe')} />
185
185
  </div>
186
186
  </section>
187
187
  </div>
188
188
  <DialogFooter
189
- actions={<Button intent="primary" text="Done" onClick={onClose} />}
189
+ actions={
190
+ <Button intent="primary" text={t('share.done')} onClick={onClose} />
191
+ }
190
192
  />
191
193
  </>
192
194
  );
193
195
  }
194
196
 
197
+ // The name of the page is set in bold inside a sentence whose word order is
198
+ // the translator's, so the message is split at its placeholder rather than
199
+ // written as a prefix and a suffix.
200
+ function lead(message: string, title: string): ReactNode[] {
201
+ const [before = '', after = ''] = message.split('{title}');
202
+ return [before, <b key="title">{title}</b>, after];
203
+ }
204
+
195
205
  function initialDraft<Codecs extends ShareParamCodecs>(
196
206
  search: string,
197
207
  vocabulary: ShareVocabulary<Codecs>,
@@ -1,6 +1,7 @@
1
1
  import { Tab, Tabs } 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 { ShareParamCodecs, SharePreset } from '../core/index.ts';
5
6
 
6
7
  const SECTION_STYLE: CSSProperties = { marginBottom: 18 };
@@ -35,6 +36,7 @@ export function SharePresetTabs<
35
36
  Codecs extends ShareParamCodecs = Record<string, never>,
36
37
  >(props: SharePresetTabsProps<Codecs>): ReactElement {
37
38
  const { presets, selected, onSelect, custom } = props;
39
+ const t = useChromeT();
38
40
 
39
41
  return (
40
42
  <section className="share-section" style={SECTION_STYLE}>
@@ -63,7 +65,7 @@ export function SharePresetTabs<
63
65
  panel={<p style={DESCRIPTION_STYLE}>{preset.description}</p>}
64
66
  />
65
67
  ))}
66
- <Tab id={CUSTOM_TAB} title="Custom" panel={<>{custom}</>} />
68
+ <Tab id={CUSTOM_TAB} title={t('share.custom')} panel={<>{custom}</>} />
67
69
  </Tabs>
68
70
  </section>
69
71
  );
@@ -2,6 +2,7 @@ import { Icon } from '@blueprintjs/core';
2
2
  import type { ReactElement } from 'react';
3
3
 
4
4
  import { isModifiedClick } from '../../chrome/ui/navItem.ts';
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
  import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
6
7
  import type { TalkOrigin } from '../core/index.ts';
7
8
 
@@ -35,13 +36,14 @@ export interface BackToSlidesProps {
35
36
  */
36
37
  export function BackToSlides(props: BackToSlidesProps): ReactElement | null {
37
38
  const { className, origin, href, onReturn } = props;
39
+ const t = useChromeT();
38
40
  if (origin === null) return null;
39
41
 
40
42
  return (
41
43
  <a
42
44
  className={joinClassNames('back-to-slides no-print', className)}
43
45
  href={href}
44
- title={`Back to slide ${origin.slide + 1}`}
46
+ title={t('slides.backToSlide', { slide: origin.slide + 1 })}
45
47
  onClick={(event) => {
46
48
  if (onReturn === undefined || isModifiedClick(event)) return;
47
49
  event.preventDefault();
@@ -49,7 +51,7 @@ export function BackToSlides(props: BackToSlidesProps): ReactElement | null {
49
51
  }}
50
52
  >
51
53
  <Icon icon="presentation" size={14} />
52
- Back to slides
54
+ {t('slides.backToSlides')}
53
55
  </a>
54
56
  );
55
57
  }
@@ -1,5 +1,6 @@
1
1
  import type { ReactElement } from 'react';
2
2
 
3
+ import { useChromeT } from '../../i18n/ui/useT.ts';
3
4
  import { frameTitle } from '../core/familyFrame.ts';
4
5
  import type { Slide } from '../core/talk.ts';
5
6
 
@@ -23,6 +24,7 @@ export interface EmbedSlideProps {
23
24
  */
24
25
  export function EmbedSlide(props: EmbedSlideProps): ReactElement {
25
26
  const { slide } = props;
27
+ const t = useChromeT();
26
28
  const { prose, src } = splitEmbedAddress(slide.body);
27
29
 
28
30
  return (
@@ -30,9 +32,7 @@ export function EmbedSlide(props: EmbedSlideProps): ReactElement {
30
32
  <div className="slide-content">
31
33
  {prose === '' ? null : <SlideBody body={prose} />}
32
34
  {src === null ? (
33
- <p className="slide-embed-missing">
34
- This slide frames a tool, but carries no address.
35
- </p>
35
+ <p className="slide-embed-missing">{t('slides.noAddress')}</p>
36
36
  ) : (
37
37
  <iframe
38
38
  className="slide-embed-frame"
@@ -1,6 +1,7 @@
1
1
  import type { ComponentType, ReactElement } from 'react';
2
2
  import { Fragment } from 'react';
3
3
 
4
+ import { useChromeT } from '../../i18n/ui/useT.ts';
4
5
  import type {
5
6
  Slide as SlideData,
6
7
  TalkMeta,
@@ -81,6 +82,7 @@ const GENERIC_LAYOUTS = new Set(['content', 'title', 'quote', 'thanks']);
81
82
  function GenericSlide(props: SlideLayoutProps): ReactElement {
82
83
  const { slide, talkId, slideIndex, meta, renderLink, site, talkOrigin } =
83
84
  props;
85
+ const t = useChromeT();
84
86
  const layout = GENERIC_LAYOUTS.has(slide.layout) ? slide.layout : 'content';
85
87
  const { body, demos } = splitDemoLinks(slide.body);
86
88
  const origin: TalkOrigin =
@@ -102,7 +104,7 @@ function GenericSlide(props: SlideLayoutProps): ReactElement {
102
104
  )}
103
105
  {demos.length === 0 ? null : (
104
106
  <div className="slide-demos">
105
- <span className="slide-demos-label">Live demos:</span>
107
+ <span className="slide-demos-label">{t('slides.liveDemos')}</span>
106
108
  {demos.map((demo, index) => (
107
109
  <Fragment key={demo.href}>
108
110
  {index === 0 ? null : (
@@ -1,6 +1,8 @@
1
1
  import { Button } from '@blueprintjs/core';
2
2
  import type { ReactElement } from 'react';
3
3
 
4
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
+
4
6
  /** Where the talk stands, and what the presenter may do about it. */
5
7
  export interface SlideshowBarProps {
6
8
  /** What the bar reads. */
@@ -42,18 +44,24 @@ export function SlideshowBar(props: SlideshowBarProps): ReactElement {
42
44
  onToggleFullscreen,
43
45
  onExit,
44
46
  } = props;
47
+ const t = useChromeT();
45
48
 
46
49
  return (
47
50
  <div className="slideshow-bar no-print">
48
51
  {onExit === undefined ? null : (
49
- <Button variant="minimal" icon="cross" text="Exit" onClick={onExit} />
52
+ <Button
53
+ variant="minimal"
54
+ icon="cross"
55
+ text={t('slides.exit')}
56
+ onClick={onExit}
57
+ />
50
58
  )}
51
59
  <div className="slideshow-title">{title}</div>
52
60
  <div className="slideshow-controls">
53
61
  <Button
54
62
  variant="minimal"
55
63
  icon="chevron-left"
56
- aria-label="Previous slide"
64
+ aria-label={t('slides.previousSlide')}
57
65
  disabled={index === 0}
58
66
  onClick={() => {
59
67
  onIndexChange(index - 1);
@@ -65,7 +73,7 @@ export function SlideshowBar(props: SlideshowBarProps): ReactElement {
65
73
  <Button
66
74
  variant="minimal"
67
75
  icon="chevron-right"
68
- aria-label="Next slide"
76
+ aria-label={t('slides.nextSlide')}
69
77
  disabled={index >= total - 1}
70
78
  onClick={() => {
71
79
  onIndexChange(index + 1);
@@ -74,7 +82,7 @@ export function SlideshowBar(props: SlideshowBarProps): ReactElement {
74
82
  <Button
75
83
  variant="minimal"
76
84
  icon={isFullscreen ? 'minimize' : 'fullscreen'}
77
- aria-label="Toggle fullscreen"
85
+ aria-label={t('slides.toggleFullscreen')}
78
86
  onClick={onToggleFullscreen}
79
87
  />
80
88
  </div>
@@ -2,6 +2,7 @@ import type { ReactElement } from 'react';
2
2
 
3
3
  import { isModifiedClick } from '../../chrome/ui/navItem.ts';
4
4
  import { pluralize } from '../../format/core/index.ts';
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
5
6
  import { joinClassNames } from '../../shared/ui/joinClassNames.ts';
6
7
  import type { TalkManifest, TalkSummary } from '../core/index.ts';
7
8
 
@@ -25,7 +26,7 @@ export interface TalkListProps {
25
26
  /**
26
27
  * What an empty list says. A list that draws nothing at all reads as a
27
28
  * broken page rather than as a site that has published no deck yet.
28
- * @default 'No talk yet.'
29
+ * @default the chrome's own line, in the language of the page
29
30
  */
30
31
  emptyNote?: string;
31
32
  /**
@@ -45,19 +46,16 @@ export interface TalkListProps {
45
46
  * @returns The listing.
46
47
  */
47
48
  export function TalkList(props: TalkListProps): ReactElement {
48
- const {
49
- className,
50
- manifests,
51
- onOpen,
52
- renderHref,
53
- siteName,
54
- emptyNote = 'No talk yet.',
55
- } = props;
49
+ const { className, manifests, onOpen, renderHref, siteName, emptyNote } =
50
+ props;
51
+ const t = useChromeT();
56
52
  const groups = groupBySite(manifests);
57
53
  const showSite = groups.length > 1;
58
54
 
59
55
  if (groups.length === 0) {
60
- return <p className="talk-list-empty">{emptyNote}</p>;
56
+ return (
57
+ <p className="talk-list-empty">{emptyNote ?? t('slides.noTalkYet')}</p>
58
+ );
61
59
  }
62
60
 
63
61
  return (
@@ -14,8 +14,11 @@ export type EditorGuideScope = 'fragment' | 'molecule' | 'reaction';
14
14
 
15
15
  /** One gesture and what it does. */
16
16
  export interface EditorGesture {
17
+ /** How the guide's catalog names it, unique within its section. */
18
+ id: string;
17
19
  /** Keys, and plain text for the mouse part; unique within one gesture. */
18
20
  input: ReadonlyArray<string | EditorGuideKey>;
21
+ /** What it does, in English; the catalog answers for the other languages. */
19
22
  action: string;
20
23
  /**
21
24
  * The only editor the gesture works in.
@@ -26,6 +29,8 @@ export interface EditorGesture {
26
29
 
27
30
  /** Gestures that share a context, such as the pointer resting on an atom. */
28
31
  export interface EditorGuideSection {
32
+ /** How the guide's catalog names the section. */
33
+ id: string;
29
34
  title: string;
30
35
  gestures: readonly EditorGesture[];
31
36
  /**
@@ -37,6 +42,8 @@ export interface EditorGuideSection {
37
42
 
38
43
  /** A page of the full documentation. */
39
44
  export interface EditorGuideLink {
45
+ /** How the guide's catalog names the page. */
46
+ id: string;
40
47
  title: string;
41
48
  url: string;
42
49
  }
@@ -44,99 +51,170 @@ export interface EditorGuideLink {
44
51
  /** The sections, in the order the guide lists them. */
45
52
  export const STRUCTURE_EDITOR_GUIDE: readonly EditorGuideSection[] = [
46
53
  {
54
+ id: 'atom',
47
55
  title: 'Pointer on an atom',
48
56
  gestures: [
49
- { input: ['Type', { key: 'n' }, { key: 'a' }], action: 'Make it Na' },
50
57
  {
58
+ id: 'element',
59
+ input: ['Type', { key: 'n' }, { key: 'a' }],
60
+ action: 'Make it Na',
61
+ },
62
+ {
63
+ id: 'group',
51
64
  input: ['Type', { key: 'p' }, { key: 'h' }],
52
65
  action: 'Attach a phenyl; Me, Et, Boc, TMS… work too',
53
66
  },
54
67
  {
68
+ id: 'applyOrForget',
55
69
  input: [{ key: 'Enter' }, 'or', { key: 'Esc' }],
56
70
  action: 'Apply or forget what was typed',
57
71
  },
58
72
  {
73
+ id: 'chain',
59
74
  input: [{ key: '1' }, '…', { key: '9' }],
60
75
  action: 'Attach a chain of that many carbons',
61
76
  },
62
77
  {
78
+ id: 'charge',
63
79
  input: [{ key: '+' }, 'or', { key: '-' }],
64
80
  action: 'Raise or lower the charge',
65
81
  },
66
- { input: [{ key: '.' }], action: 'Add or remove a radical' },
67
- { input: [{ key: ':' }], action: 'Make it a triplet, then a singlet' },
68
- { input: [{ key: '?' }], action: 'Make it a connection point' },
69
82
  {
83
+ id: 'radical',
84
+ input: [{ key: '.' }],
85
+ action: 'Add or remove a radical',
86
+ },
87
+ {
88
+ id: 'spin',
89
+ input: [{ key: ':' }],
90
+ action: 'Make it a triplet, then a singlet',
91
+ },
92
+ {
93
+ id: 'attachment',
94
+ input: [{ key: '?' }],
95
+ action: 'Make it a connection point',
96
+ },
97
+ {
98
+ id: 'query',
70
99
  input: [{ key: 'q' }],
71
100
  action: 'Edit its query features',
72
101
  only: 'fragment',
73
102
  },
74
- { input: [{ key: 'x' }], action: 'Accept any halogen', only: 'fragment' },
75
- { input: [{ key: 'Delete' }], action: 'Delete it' },
103
+ {
104
+ id: 'halogen',
105
+ input: [{ key: 'x' }],
106
+ action: 'Accept any halogen',
107
+ only: 'fragment',
108
+ },
109
+ { id: 'delete', input: [{ key: 'Delete' }], action: 'Delete it' },
76
110
  ],
77
111
  note: 'What is typed shows black for an element, blue for a group, grey while incomplete and red when unknown.',
78
112
  },
79
113
  {
114
+ id: 'bond',
80
115
  title: 'Pointer on a bond',
81
116
  gestures: [
82
117
  {
118
+ id: 'order',
83
119
  input: [{ key: '1' }, { key: '2' }, { key: '3' }],
84
120
  action: 'Single, double or triple',
85
121
  },
86
- { input: [{ key: '0' }], action: 'Zero-order (metal–ligand) bond' },
87
122
  {
123
+ id: 'zeroOrder',
124
+ input: [{ key: '0' }],
125
+ action: 'Zero-order (metal–ligand) bond',
126
+ },
127
+ {
128
+ id: 'stereo',
88
129
  input: [{ key: 'u' }, 'or', { key: 'd' }],
89
130
  action: 'Up or down stereo bond',
90
131
  },
91
- { input: [{ key: 'c' }], action: 'Double bond of unknown geometry' },
92
- { input: [{ key: 'v' }], action: 'Fuse a 3-membered ring' },
93
132
  {
133
+ id: 'unknownGeometry',
134
+ input: [{ key: 'c' }],
135
+ action: 'Double bond of unknown geometry',
136
+ },
137
+ {
138
+ id: 'threeRing',
139
+ input: [{ key: 'v' }],
140
+ action: 'Fuse a 3-membered ring',
141
+ },
142
+ {
143
+ id: 'ring',
94
144
  input: [{ key: '4' }, '…', { key: '7' }],
95
145
  action: 'Fuse a ring of that size',
96
146
  },
97
147
  {
148
+ id: 'benzene',
98
149
  input: [{ key: 'a' }, 'or', { key: 'b' }],
99
150
  action: 'Fuse a benzene ring',
100
151
  },
101
152
  {
153
+ id: 'query',
102
154
  input: [{ key: 'q' }],
103
155
  action: 'Edit its query features',
104
156
  only: 'fragment',
105
157
  },
106
- { input: [{ key: 'Delete' }], action: 'Delete it' },
158
+ { id: 'delete', input: [{ key: 'Delete' }], action: 'Delete it' },
107
159
  ],
108
160
  },
109
161
  {
162
+ id: 'anywhere',
110
163
  title: 'Anywhere',
111
164
  gestures: [
112
- { input: [{ key: 'Mod' }, { key: 'Z' }], action: 'Undo' },
113
- { input: [{ key: 'Mod' }, { key: 'C' }], action: 'Copy the structure' },
165
+ { id: 'undo', input: [{ key: 'Mod' }, { key: 'Z' }], action: 'Undo' },
114
166
  {
167
+ id: 'copy',
168
+ input: [{ key: 'Mod' }, { key: 'C' }],
169
+ action: 'Copy the structure',
170
+ },
171
+ {
172
+ id: 'paste',
115
173
  input: [{ key: 'Mod' }, { key: 'V' }],
116
174
  action: 'Paste a molfile, a SMILES or an idCode',
117
175
  },
118
- { input: [{ key: 'Delete' }], action: 'Delete the selection' },
119
176
  {
177
+ id: 'deleteSelection',
178
+ input: [{ key: 'Delete' }],
179
+ action: 'Delete the selection',
180
+ },
181
+ {
182
+ id: 'flip',
120
183
  input: [{ key: 'h' }, 'or', { key: 'v' }],
121
184
  action: 'Flip horizontally or vertically',
122
185
  only: 'molecule',
123
186
  },
124
- { input: [{ key: 'F1' }], action: 'Open this guide' },
187
+ { id: 'help', input: [{ key: 'F1' }], action: 'Open this guide' },
125
188
  ],
126
189
  note: 'Keys act once the drawing has been clicked. On empty canvas, a key picks the tool whose tooltip shows it.',
127
190
  },
128
191
  {
192
+ id: 'selecting',
129
193
  title: 'Selecting',
130
194
  gestures: [
131
- { input: ['Drag'], action: 'Select what the lasso encloses' },
132
- { input: [{ key: 'Alt' }, '+ drag'], action: 'Select a rectangle' },
133
- { input: [{ key: 'Shift' }, '+ drag'], action: 'Add to the selection' },
134
- { input: ['Drag the selection'], action: 'Move it' },
135
195
  {
196
+ id: 'lasso',
197
+ input: ['Drag'],
198
+ action: 'Select what the lasso encloses',
199
+ },
200
+ {
201
+ id: 'rectangle',
202
+ input: [{ key: 'Alt' }, '+ drag'],
203
+ action: 'Select a rectangle',
204
+ },
205
+ {
206
+ id: 'add',
207
+ input: [{ key: 'Shift' }, '+ drag'],
208
+ action: 'Add to the selection',
209
+ },
210
+ { id: 'move', input: ['Drag the selection'], action: 'Move it' },
211
+ {
212
+ id: 'duplicate',
136
213
  input: [{ key: 'Shift' }, '+ drag the selection'],
137
214
  action: 'Copy it',
138
215
  },
139
216
  {
217
+ id: 'queryFeatures',
140
218
  input: ['Double-click'],
141
219
  action: 'Edit the query features of an atom, a bond or the selection',
142
220
  only: 'fragment',
@@ -145,6 +223,7 @@ export const STRUCTURE_EDITOR_GUIDE: readonly EditorGuideSection[] = [
145
223
  note: 'These need the Select tool, which Space picks.',
146
224
  },
147
225
  {
226
+ id: 'stereochemistry',
148
227
  title: 'Stereochemistry',
149
228
  gestures: [],
150
229
  note: 'Pink bonds flag a stereocentre with too little or too much information. Draw an up or down bond with its narrow end on the centre, then use the enhanced stereo tool to say whether the drawing is this enantiomer (abs), both of them (&) or one of the two (or).',
@@ -153,12 +232,18 @@ export const STRUCTURE_EDITOR_GUIDE: readonly EditorGuideSection[] = [
153
232
 
154
233
  /** The documentation this guide summarises. */
155
234
  export const STRUCTURE_EDITOR_DOCS: readonly EditorGuideLink[] = [
156
- { title: 'Tools and keys', url: 'https://docs.nmrium.org/help/ocl/' },
157
235
  {
236
+ id: 'toolsAndKeys',
237
+ title: 'Tools and keys',
238
+ url: 'https://docs.nmrium.org/help/ocl/',
239
+ },
240
+ {
241
+ id: 'atomProperties',
158
242
  title: 'Atom properties',
159
243
  url: 'https://docs.nmrium.org/chemical_structure/ocl/atom-properties/',
160
244
  },
161
245
  {
246
+ id: 'stereochemistry',
162
247
  title: 'Stereochemistry',
163
248
  url: 'https://docs.nmrium.org/ocl/stereochemistry/',
164
249
  },
@@ -209,6 +294,28 @@ function appliesTo(
209
294
  return only === mode;
210
295
  }
211
296
 
297
+ // The words a gesture writes between its key caps. They are keyed here rather
298
+ // than slugged from the text, because `Drag` and `+ drag` would slug alike.
299
+ const INPUT_WORD_IDS: Record<string, string> = {
300
+ Type: 'type',
301
+ or: 'or',
302
+ Drag: 'drag',
303
+ '+ drag': 'plusDrag',
304
+ 'Drag the selection': 'dragSelection',
305
+ '+ drag the selection': 'plusDragSelection',
306
+ 'Double-click': 'doubleClick',
307
+ };
308
+
309
+ /**
310
+ * How the catalog names one of the words a gesture writes between its key
311
+ * caps.
312
+ * @param text - The word, in English.
313
+ * @returns Its id, or `undefined` for punctuation nobody translates.
314
+ */
315
+ export function editorInputWordId(text: string): string | undefined {
316
+ return INPUT_WORD_IDS[text];
317
+ }
318
+
212
319
  /**
213
320
  * The text of a key cap.
214
321
  * @param key - The key, `Mod` standing for the platform's shortcut modifier.