react-cheminfo 0.64.1 → 0.66.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 (827) hide show
  1. package/README.md +293 -6
  2. package/lib/card/core/cardAddress.d.ts +70 -0
  3. package/lib/card/core/cardAddress.d.ts.map +1 -0
  4. package/lib/card/core/cardAddress.js +59 -0
  5. package/lib/card/core/cardAddress.js.map +1 -0
  6. package/lib/card/core/cardPageUrl.d.ts +49 -0
  7. package/lib/card/core/cardPageUrl.d.ts.map +1 -0
  8. package/lib/card/core/cardPageUrl.js +59 -0
  9. package/lib/card/core/cardPageUrl.js.map +1 -0
  10. package/lib/card/core/index.d.ts +7 -0
  11. package/lib/card/core/index.d.ts.map +1 -0
  12. package/lib/card/core/index.js +4 -0
  13. package/lib/card/core/index.js.map +1 -0
  14. package/lib/card/core/panelRoom.d.ts +40 -0
  15. package/lib/card/core/panelRoom.d.ts.map +1 -0
  16. package/lib/card/core/panelRoom.js +40 -0
  17. package/lib/card/core/panelRoom.js.map +1 -0
  18. package/lib/card/ui/CardDetailsButton.d.ts +38 -0
  19. package/lib/card/ui/CardDetailsButton.d.ts.map +1 -0
  20. package/lib/card/ui/CardDetailsButton.js +50 -0
  21. package/lib/card/ui/CardDetailsButton.js.map +1 -0
  22. package/lib/card/ui/CardFigure.d.ts +51 -0
  23. package/lib/card/ui/CardFigure.d.ts.map +1 -0
  24. package/lib/card/ui/CardFigure.js +27 -0
  25. package/lib/card/ui/CardFigure.js.map +1 -0
  26. package/lib/card/ui/CardFrame.d.ts +30 -0
  27. package/lib/card/ui/CardFrame.d.ts.map +1 -0
  28. package/lib/card/ui/CardFrame.js +20 -0
  29. package/lib/card/ui/CardFrame.js.map +1 -0
  30. package/lib/card/ui/CopyTableButton.d.ts +37 -0
  31. package/lib/card/ui/CopyTableButton.d.ts.map +1 -0
  32. package/lib/card/ui/CopyTableButton.js +19 -0
  33. package/lib/card/ui/CopyTableButton.js.map +1 -0
  34. package/lib/card/ui/cardTooltip.d.ts +14 -0
  35. package/lib/card/ui/cardTooltip.d.ts.map +1 -0
  36. package/lib/card/ui/cardTooltip.js +15 -0
  37. package/lib/card/ui/cardTooltip.js.map +1 -0
  38. package/lib/card/ui/embed.d.ts +15 -0
  39. package/lib/card/ui/embed.d.ts.map +1 -0
  40. package/lib/card/ui/embed.js +24 -0
  41. package/lib/card/ui/embed.js.map +1 -0
  42. package/lib/card/ui/fitCardToFrame.d.ts +31 -0
  43. package/lib/card/ui/fitCardToFrame.d.ts.map +1 -0
  44. package/lib/card/ui/fitCardToFrame.js +66 -0
  45. package/lib/card/ui/fitCardToFrame.js.map +1 -0
  46. package/lib/card/ui/holdRoomForPanels.d.ts +16 -0
  47. package/lib/card/ui/holdRoomForPanels.d.ts.map +1 -0
  48. package/lib/card/ui/holdRoomForPanels.js +76 -0
  49. package/lib/card/ui/holdRoomForPanels.js.map +1 -0
  50. package/lib/card/ui/index.d.ts +11 -0
  51. package/lib/card/ui/index.d.ts.map +1 -0
  52. package/lib/card/ui/index.js +7 -0
  53. package/lib/card/ui/index.js.map +1 -0
  54. package/lib/card/ui/openPanels.d.ts +25 -0
  55. package/lib/card/ui/openPanels.d.ts.map +1 -0
  56. package/lib/card/ui/openPanels.js +85 -0
  57. package/lib/card/ui/openPanels.js.map +1 -0
  58. package/lib/card.d.ts +13 -0
  59. package/lib/card.d.ts.map +1 -0
  60. package/lib/card.js +13 -0
  61. package/lib/card.js.map +1 -0
  62. package/lib/conformers.d.ts +1 -0
  63. package/lib/conformers.d.ts.map +1 -1
  64. package/lib/conformers.js +1 -0
  65. package/lib/conformers.js.map +1 -1
  66. package/lib/core.d.ts +4 -0
  67. package/lib/core.d.ts.map +1 -1
  68. package/lib/core.js +5 -0
  69. package/lib/core.js.map +1 -1
  70. package/lib/fetch/core/apiError.d.ts +56 -0
  71. package/lib/fetch/core/apiError.d.ts.map +1 -0
  72. package/lib/fetch/core/apiError.js +43 -0
  73. package/lib/fetch/core/apiError.js.map +1 -0
  74. package/lib/fetch/core/fetchJson.d.ts +47 -0
  75. package/lib/fetch/core/fetchJson.d.ts.map +1 -0
  76. package/lib/fetch/core/fetchJson.js +109 -0
  77. package/lib/fetch/core/fetchJson.js.map +1 -0
  78. package/lib/fetch/core/index.d.ts +5 -0
  79. package/lib/fetch/core/index.d.ts.map +1 -0
  80. package/lib/fetch/core/index.js +3 -0
  81. package/lib/fetch/core/index.js.map +1 -0
  82. package/lib/formula/core/formulaText.d.ts +46 -0
  83. package/lib/formula/core/formulaText.d.ts.map +1 -0
  84. package/lib/formula/core/formulaText.js +74 -0
  85. package/lib/formula/core/formulaText.js.map +1 -0
  86. package/lib/formula/core/index.d.ts +6 -0
  87. package/lib/formula/core/index.d.ts.map +1 -0
  88. package/lib/formula/core/index.js +4 -0
  89. package/lib/formula/core/index.js.map +1 -0
  90. package/lib/formula/core/normalizeFormula.d.ts +22 -0
  91. package/lib/formula/core/normalizeFormula.d.ts.map +1 -0
  92. package/lib/formula/core/normalizeFormula.js +46 -0
  93. package/lib/formula/core/normalizeFormula.js.map +1 -0
  94. package/lib/formula/core/readFormula.d.ts +73 -0
  95. package/lib/formula/core/readFormula.d.ts.map +1 -0
  96. package/lib/formula/core/readFormula.js +132 -0
  97. package/lib/formula/core/readFormula.js.map +1 -0
  98. package/lib/formula/ui/CopyableFormula.d.ts +31 -0
  99. package/lib/formula/ui/CopyableFormula.d.ts.map +1 -0
  100. package/lib/formula/ui/CopyableFormula.js +19 -0
  101. package/lib/formula/ui/CopyableFormula.js.map +1 -0
  102. package/lib/formula/ui/FormulaInput.d.ts +29 -0
  103. package/lib/formula/ui/FormulaInput.d.ts.map +1 -0
  104. package/lib/formula/ui/FormulaInput.js +16 -0
  105. package/lib/formula/ui/FormulaInput.js.map +1 -0
  106. package/lib/formula/ui/QuestionFormula.d.ts +14 -0
  107. package/lib/formula/ui/QuestionFormula.d.ts.map +1 -0
  108. package/lib/formula/ui/QuestionFormula.js +13 -0
  109. package/lib/formula/ui/QuestionFormula.js.map +1 -0
  110. package/lib/formula/ui/index.d.ts +7 -0
  111. package/lib/formula/ui/index.d.ts.map +1 -0
  112. package/lib/formula/ui/index.js +4 -0
  113. package/lib/formula/ui/index.js.map +1 -0
  114. package/lib/formula.d.ts +11 -0
  115. package/lib/formula.d.ts.map +1 -0
  116. package/lib/formula.js +11 -0
  117. package/lib/formula.js.map +1 -0
  118. package/lib/hooks/ui/index.d.ts +1 -0
  119. package/lib/hooks/ui/index.d.ts.map +1 -1
  120. package/lib/hooks/ui/index.js.map +1 -1
  121. package/lib/hooks/ui/keyTargets.d.ts +4 -2
  122. package/lib/hooks/ui/keyTargets.d.ts.map +1 -1
  123. package/lib/hooks/ui/keyTargets.js +5 -3
  124. package/lib/hooks/ui/keyTargets.js.map +1 -1
  125. package/lib/hooks/ui/useAsync.d.ts +20 -5
  126. package/lib/hooks/ui/useAsync.d.ts.map +1 -1
  127. package/lib/hooks/ui/useAsync.js +29 -14
  128. package/lib/hooks/ui/useAsync.js.map +1 -1
  129. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  130. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  131. package/lib/ir/core/analysisSpectra.d.ts +23 -6
  132. package/lib/ir/core/analysisSpectra.d.ts.map +1 -1
  133. package/lib/ir/core/analysisSpectra.js.map +1 -1
  134. package/lib/ir/core/bandLabelPlan.d.ts.map +1 -1
  135. package/lib/ir/core/bandLabelPlan.js +11 -6
  136. package/lib/ir/core/bandLabelPlan.js.map +1 -1
  137. package/lib/ir/core/index.d.ts +13 -9
  138. package/lib/ir/core/index.d.ts.map +1 -1
  139. package/lib/ir/core/index.js +9 -6
  140. package/lib/ir/core/index.js.map +1 -1
  141. package/lib/ir/core/irBand.d.ts +45 -14
  142. package/lib/ir/core/irBand.d.ts.map +1 -1
  143. package/lib/ir/core/irBand.js +28 -6
  144. package/lib/ir/core/irBand.js.map +1 -1
  145. package/lib/ir/core/irCommands.d.ts +11 -0
  146. package/lib/ir/core/irCommands.d.ts.map +1 -1
  147. package/lib/ir/core/irCommands.js +11 -1
  148. package/lib/ir/core/irCommands.js.map +1 -1
  149. package/lib/ir/core/irDomain.d.ts +4 -3
  150. package/lib/ir/core/irDomain.d.ts.map +1 -1
  151. package/lib/ir/core/irDomain.js +10 -7
  152. package/lib/ir/core/irDomain.js.map +1 -1
  153. package/lib/ir/core/irFormat.d.ts +14 -2
  154. package/lib/ir/core/irFormat.d.ts.map +1 -1
  155. package/lib/ir/core/irFormat.js +33 -4
  156. package/lib/ir/core/irFormat.js.map +1 -1
  157. package/lib/ir/core/irMode.d.ts +35 -8
  158. package/lib/ir/core/irMode.d.ts.map +1 -1
  159. package/lib/ir/core/irMode.js +38 -10
  160. package/lib/ir/core/irMode.js.map +1 -1
  161. package/lib/ir/core/irReducer.d.ts +0 -28
  162. package/lib/ir/core/irReducer.d.ts.map +1 -1
  163. package/lib/ir/core/irReducer.js +1 -24
  164. package/lib/ir/core/irReducer.js.map +1 -1
  165. package/lib/ir/core/irSpectrum.d.ts +52 -26
  166. package/lib/ir/core/irSpectrum.d.ts.map +1 -1
  167. package/lib/ir/core/irSpectrum.js +21 -15
  168. package/lib/ir/core/irSpectrum.js.map +1 -1
  169. package/lib/ir/core/irState.d.ts +40 -2
  170. package/lib/ir/core/irState.d.ts.map +1 -1
  171. package/lib/ir/core/irState.js +38 -1
  172. package/lib/ir/core/irState.js.map +1 -1
  173. package/lib/ir/core/irTechnique.d.ts +94 -0
  174. package/lib/ir/core/irTechnique.d.ts.map +1 -0
  175. package/lib/ir/core/irTechnique.js +87 -0
  176. package/lib/ir/core/irTechnique.js.map +1 -0
  177. package/lib/ir/core/irTechniqueCommands.d.ts +26 -0
  178. package/lib/ir/core/irTechniqueCommands.d.ts.map +1 -0
  179. package/lib/ir/core/irTechniqueCommands.js +68 -0
  180. package/lib/ir/core/irTechniqueCommands.js.map +1 -0
  181. package/lib/ir/core/pickBands.d.ts +6 -5
  182. package/lib/ir/core/pickBands.d.ts.map +1 -1
  183. package/lib/ir/core/pickBands.js +49 -26
  184. package/lib/ir/core/pickBands.js.map +1 -1
  185. package/lib/ir/core/ramanBands.d.ts +30 -0
  186. package/lib/ir/core/ramanBands.d.ts.map +1 -0
  187. package/lib/ir/core/ramanBands.js +83 -0
  188. package/lib/ir/core/ramanBands.js.map +1 -0
  189. package/lib/ir/core/spectrumJcamp.d.ts +10 -5
  190. package/lib/ir/core/spectrumJcamp.d.ts.map +1 -1
  191. package/lib/ir/core/spectrumJcamp.js +63 -15
  192. package/lib/ir/core/spectrumJcamp.js.map +1 -1
  193. package/lib/ir/core/toIrSpectrum.d.ts.map +1 -1
  194. package/lib/ir/core/toIrSpectrum.js +17 -2
  195. package/lib/ir/core/toIrSpectrum.js.map +1 -1
  196. package/lib/ir/ui/BandRow.d.ts +30 -0
  197. package/lib/ir/ui/BandRow.d.ts.map +1 -0
  198. package/lib/ir/ui/BandRow.js +42 -0
  199. package/lib/ir/ui/BandRow.js.map +1 -0
  200. package/lib/ir/ui/BandsPanel.d.ts +4 -0
  201. package/lib/ir/ui/BandsPanel.d.ts.map +1 -1
  202. package/lib/ir/ui/BandsPanel.js +14 -59
  203. package/lib/ir/ui/BandsPanel.js.map +1 -1
  204. package/lib/ir/ui/IrAboutDialog.d.ts +7 -0
  205. package/lib/ir/ui/IrAboutDialog.d.ts.map +1 -1
  206. package/lib/ir/ui/IrAboutDialog.js +16 -3
  207. package/lib/ir/ui/IrAboutDialog.js.map +1 -1
  208. package/lib/ir/ui/IrCanvas.d.ts.map +1 -1
  209. package/lib/ir/ui/IrCanvas.js +2 -2
  210. package/lib/ir/ui/IrCanvas.js.map +1 -1
  211. package/lib/ir/ui/IrChart.d.ts +2 -1
  212. package/lib/ir/ui/IrChart.d.ts.map +1 -1
  213. package/lib/ir/ui/IrChart.js +18 -21
  214. package/lib/ir/ui/IrChart.js.map +1 -1
  215. package/lib/ir/ui/IrCommandProvider.d.ts +7 -0
  216. package/lib/ir/ui/IrCommandProvider.d.ts.map +1 -1
  217. package/lib/ir/ui/IrCommandProvider.js +2 -2
  218. package/lib/ir/ui/IrCommandProvider.js.map +1 -1
  219. package/lib/ir/ui/IrCommandTooltip.d.ts +7 -0
  220. package/lib/ir/ui/IrCommandTooltip.d.ts.map +1 -1
  221. package/lib/ir/ui/IrCommandTooltip.js +3 -2
  222. package/lib/ir/ui/IrCommandTooltip.js.map +1 -1
  223. package/lib/ir/ui/IrDocumentationDialog.d.ts +8 -1
  224. package/lib/ir/ui/IrDocumentationDialog.d.ts.map +1 -1
  225. package/lib/ir/ui/IrDocumentationDialog.js +30 -7
  226. package/lib/ir/ui/IrDocumentationDialog.js.map +1 -1
  227. package/lib/ir/ui/IrEditor.d.ts +3 -1
  228. package/lib/ir/ui/IrEditor.d.ts.map +1 -1
  229. package/lib/ir/ui/IrEditor.js +3 -20
  230. package/lib/ir/ui/IrEditor.js.map +1 -1
  231. package/lib/ir/ui/IrHeader.d.ts.map +1 -1
  232. package/lib/ir/ui/IrHeader.js +5 -1
  233. package/lib/ir/ui/IrHeader.js.map +1 -1
  234. package/lib/ir/ui/IrLogo.d.ts +11 -3
  235. package/lib/ir/ui/IrLogo.d.ts.map +1 -1
  236. package/lib/ir/ui/IrLogo.js +14 -5
  237. package/lib/ir/ui/IrLogo.js.map +1 -1
  238. package/lib/ir/ui/IrShell.d.ts.map +1 -1
  239. package/lib/ir/ui/IrShell.js +23 -56
  240. package/lib/ir/ui/IrShell.js.map +1 -1
  241. package/lib/ir/ui/IrStatusBar.d.ts +3 -2
  242. package/lib/ir/ui/IrStatusBar.d.ts.map +1 -1
  243. package/lib/ir/ui/IrStatusBar.js +14 -9
  244. package/lib/ir/ui/IrStatusBar.js.map +1 -1
  245. package/lib/ir/ui/IrToolbar.d.ts +3 -0
  246. package/lib/ir/ui/IrToolbar.d.ts.map +1 -1
  247. package/lib/ir/ui/IrToolbar.js +10 -3
  248. package/lib/ir/ui/IrToolbar.js.map +1 -1
  249. package/lib/ir/ui/IrTraces.d.ts +4 -1
  250. package/lib/ir/ui/IrTraces.d.ts.map +1 -1
  251. package/lib/ir/ui/IrTraces.js +2 -0
  252. package/lib/ir/ui/IrTraces.js.map +1 -1
  253. package/lib/ir/ui/RamanEditor.d.ts +46 -0
  254. package/lib/ir/ui/RamanEditor.d.ts.map +1 -0
  255. package/lib/ir/ui/RamanEditor.js +17 -0
  256. package/lib/ir/ui/RamanEditor.js.map +1 -0
  257. package/lib/ir/ui/SpectraPanel.d.ts.map +1 -1
  258. package/lib/ir/ui/SpectraPanel.js +2 -2
  259. package/lib/ir/ui/SpectraPanel.js.map +1 -1
  260. package/lib/ir/ui/SpectrumRow.d.ts +7 -0
  261. package/lib/ir/ui/SpectrumRow.d.ts.map +1 -1
  262. package/lib/ir/ui/SpectrumRow.js +4 -5
  263. package/lib/ir/ui/SpectrumRow.js.map +1 -1
  264. package/lib/ir/ui/VibrationalEditor.d.ts +48 -0
  265. package/lib/ir/ui/VibrationalEditor.d.ts.map +1 -0
  266. package/lib/ir/ui/VibrationalEditor.js +31 -0
  267. package/lib/ir/ui/VibrationalEditor.js.map +1 -0
  268. package/lib/ir/ui/bandsTsv.d.ts +19 -0
  269. package/lib/ir/ui/bandsTsv.d.ts.map +1 -0
  270. package/lib/ir/ui/bandsTsv.js +38 -0
  271. package/lib/ir/ui/bandsTsv.js.map +1 -0
  272. package/lib/ir/ui/irChartProps.d.ts +14 -4
  273. package/lib/ir/ui/irChartProps.d.ts.map +1 -1
  274. package/lib/ir/ui/irChartProps.js +3 -2
  275. package/lib/ir/ui/irChartProps.js.map +1 -1
  276. package/lib/ir/ui/irCommandContext.d.ts +8 -0
  277. package/lib/ir/ui/irCommandContext.d.ts.map +1 -1
  278. package/lib/ir/ui/irCommandContext.js +14 -3
  279. package/lib/ir/ui/irCommandContext.js.map +1 -1
  280. package/lib/ir/ui/useIrEditor.d.ts +3 -3
  281. package/lib/ir/ui/useIrEditor.d.ts.map +1 -1
  282. package/lib/ir/ui/useIrEditor.js +13 -4
  283. package/lib/ir/ui/useIrEditor.js.map +1 -1
  284. package/lib/ir/ui/useIrHandle.d.ts +14 -0
  285. package/lib/ir/ui/useIrHandle.d.ts.map +1 -0
  286. package/lib/ir/ui/useIrHandle.js +39 -0
  287. package/lib/ir/ui/useIrHandle.js.map +1 -0
  288. package/lib/ir/ui/useIrText.d.ts +40 -0
  289. package/lib/ir/ui/useIrText.d.ts.map +1 -0
  290. package/lib/ir/ui/useIrText.js +118 -0
  291. package/lib/ir/ui/useIrText.js.map +1 -0
  292. package/lib/ir/ui/useIrZoom.d.ts +7 -0
  293. package/lib/ir/ui/useIrZoom.d.ts.map +1 -1
  294. package/lib/ir/ui/useIrZoom.js +5 -4
  295. package/lib/ir/ui/useIrZoom.js.map +1 -1
  296. package/lib/ir/ui/useValueAxisZoom.d.ts +20 -0
  297. package/lib/ir/ui/useValueAxisZoom.d.ts.map +1 -0
  298. package/lib/ir/ui/useValueAxisZoom.js +54 -0
  299. package/lib/ir/ui/useValueAxisZoom.js.map +1 -0
  300. package/lib/ir.d.ts +3 -0
  301. package/lib/ir.d.ts.map +1 -1
  302. package/lib/ir.js +3 -0
  303. package/lib/ir.js.map +1 -1
  304. package/lib/locales/de.json +57 -1
  305. package/lib/locales/en.json +57 -1
  306. package/lib/locales/es.json +57 -1
  307. package/lib/locales/fr.json +57 -1
  308. package/lib/locales/it.json +57 -1
  309. package/lib/moleculesClient/core/index.d.ts +5 -0
  310. package/lib/moleculesClient/core/index.d.ts.map +1 -0
  311. package/lib/moleculesClient/core/index.js +3 -0
  312. package/lib/moleculesClient/core/index.js.map +1 -0
  313. package/lib/moleculesClient/core/moleculesClient.d.ts +12 -0
  314. package/lib/moleculesClient/core/moleculesClient.d.ts.map +1 -0
  315. package/lib/moleculesClient/core/moleculesClient.js +105 -0
  316. package/lib/moleculesClient/core/moleculesClient.js.map +1 -0
  317. package/lib/moleculesClient/core/moleculesClientApi.d.ts +100 -0
  318. package/lib/moleculesClient/core/moleculesClientApi.d.ts.map +1 -0
  319. package/lib/moleculesClient/core/moleculesClientApi.js +20 -0
  320. package/lib/moleculesClient/core/moleculesClientApi.js.map +1 -0
  321. package/lib/moleculesClient/core/moleculesTypes.d.ts +154 -0
  322. package/lib/moleculesClient/core/moleculesTypes.d.ts.map +1 -0
  323. package/lib/moleculesClient/core/moleculesTypes.js +2 -0
  324. package/lib/moleculesClient/core/moleculesTypes.js.map +1 -0
  325. package/lib/moleculesClient/core/requestRetry.d.ts +50 -0
  326. package/lib/moleculesClient/core/requestRetry.d.ts.map +1 -0
  327. package/lib/moleculesClient/core/requestRetry.js +108 -0
  328. package/lib/moleculesClient/core/requestRetry.js.map +1 -0
  329. package/lib/molstar/core/camera.d.ts +2 -1
  330. package/lib/molstar/core/camera.d.ts.map +1 -1
  331. package/lib/molstar/core/camera.js +3 -2
  332. package/lib/molstar/core/camera.js.map +1 -1
  333. package/lib/molstar/core/framing.d.ts +102 -0
  334. package/lib/molstar/core/framing.d.ts.map +1 -0
  335. package/lib/molstar/core/framing.js +120 -0
  336. package/lib/molstar/core/framing.js.map +1 -0
  337. package/lib/molstar/core/hover.d.ts +16 -0
  338. package/lib/molstar/core/hover.d.ts.map +1 -1
  339. package/lib/molstar/core/hover.js +14 -0
  340. package/lib/molstar/core/hover.js.map +1 -1
  341. package/lib/molstar/core/index.d.ts +4 -1
  342. package/lib/molstar/core/index.d.ts.map +1 -1
  343. package/lib/molstar/core/index.js +2 -1
  344. package/lib/molstar/core/index.js.map +1 -1
  345. package/lib/pedagogy/core/answers.d.ts +46 -0
  346. package/lib/pedagogy/core/answers.d.ts.map +1 -0
  347. package/lib/pedagogy/core/answers.js +77 -0
  348. package/lib/pedagogy/core/answers.js.map +1 -0
  349. package/lib/pedagogy/core/attempts.d.ts +86 -0
  350. package/lib/pedagogy/core/attempts.d.ts.map +1 -0
  351. package/lib/pedagogy/core/attempts.js +117 -0
  352. package/lib/pedagogy/core/attempts.js.map +1 -0
  353. package/lib/pedagogy/core/index.d.ts +8 -0
  354. package/lib/pedagogy/core/index.d.ts.map +1 -1
  355. package/lib/pedagogy/core/index.js +4 -0
  356. package/lib/pedagogy/core/index.js.map +1 -1
  357. package/lib/pedagogy/core/progressController.d.ts +64 -0
  358. package/lib/pedagogy/core/progressController.d.ts.map +1 -0
  359. package/lib/pedagogy/core/progressController.js +56 -0
  360. package/lib/pedagogy/core/progressController.js.map +1 -0
  361. package/lib/pedagogy/core/seed.d.ts +96 -0
  362. package/lib/pedagogy/core/seed.d.ts.map +1 -0
  363. package/lib/pedagogy/core/seed.js +128 -0
  364. package/lib/pedagogy/core/seed.js.map +1 -0
  365. package/lib/pedagogy/core/series.d.ts +77 -0
  366. package/lib/pedagogy/core/series.d.ts.map +1 -0
  367. package/lib/pedagogy/core/series.js +10 -0
  368. package/lib/pedagogy/core/series.js.map +1 -0
  369. package/lib/pedagogy/ui/AnswerFields.d.ts +21 -0
  370. package/lib/pedagogy/ui/AnswerFields.d.ts.map +1 -0
  371. package/lib/pedagogy/ui/AnswerFields.js +24 -0
  372. package/lib/pedagogy/ui/AnswerFields.js.map +1 -0
  373. package/lib/pedagogy/ui/ExerciseList.d.ts +82 -0
  374. package/lib/pedagogy/ui/ExerciseList.d.ts.map +1 -0
  375. package/lib/pedagogy/ui/ExerciseList.js +53 -0
  376. package/lib/pedagogy/ui/ExerciseList.js.map +1 -0
  377. package/lib/pedagogy/ui/ExerciseSeries.d.ts +95 -0
  378. package/lib/pedagogy/ui/ExerciseSeries.d.ts.map +1 -0
  379. package/lib/pedagogy/ui/ExerciseSeries.js +74 -0
  380. package/lib/pedagogy/ui/ExerciseSeries.js.map +1 -0
  381. package/lib/pedagogy/ui/QuestionCard.d.ts +64 -0
  382. package/lib/pedagogy/ui/QuestionCard.d.ts.map +1 -0
  383. package/lib/pedagogy/ui/QuestionCard.js +73 -0
  384. package/lib/pedagogy/ui/QuestionCard.js.map +1 -0
  385. package/lib/pedagogy/ui/index.d.ts +10 -0
  386. package/lib/pedagogy/ui/index.d.ts.map +1 -1
  387. package/lib/pedagogy/ui/index.js +6 -0
  388. package/lib/pedagogy/ui/index.js.map +1 -1
  389. package/lib/pedagogy/ui/seriesCounts.d.ts +17 -0
  390. package/lib/pedagogy/ui/seriesCounts.d.ts.map +1 -0
  391. package/lib/pedagogy/ui/seriesCounts.js +27 -0
  392. package/lib/pedagogy/ui/seriesCounts.js.map +1 -0
  393. package/lib/pedagogy/ui/seriesParts.d.ts +55 -0
  394. package/lib/pedagogy/ui/seriesParts.d.ts.map +1 -0
  395. package/lib/pedagogy/ui/seriesParts.js +38 -0
  396. package/lib/pedagogy/ui/seriesParts.js.map +1 -0
  397. package/lib/pedagogy/ui/useAttemptRecords.d.ts +10 -0
  398. package/lib/pedagogy/ui/useAttemptRecords.d.ts.map +1 -0
  399. package/lib/pedagogy/ui/useAttemptRecords.js +11 -0
  400. package/lib/pedagogy/ui/useAttemptRecords.js.map +1 -0
  401. package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
  402. package/lib/periodic/ui/PeriodicTable.js +6 -3
  403. package/lib/periodic/ui/PeriodicTable.js.map +1 -1
  404. package/lib/property/core/copyableText.d.ts +14 -0
  405. package/lib/property/core/copyableText.d.ts.map +1 -0
  406. package/lib/property/core/copyableText.js +21 -0
  407. package/lib/property/core/copyableText.js.map +1 -0
  408. package/lib/property/core/index.d.ts +2 -0
  409. package/lib/property/core/index.d.ts.map +1 -0
  410. package/lib/property/core/index.js +2 -0
  411. package/lib/property/core/index.js.map +1 -0
  412. package/lib/property/ui/PropertyTable.d.ts +43 -0
  413. package/lib/property/ui/PropertyTable.d.ts.map +1 -0
  414. package/lib/property/ui/PropertyTable.js +19 -0
  415. package/lib/property/ui/PropertyTable.js.map +1 -0
  416. package/lib/property/ui/index.d.ts +3 -0
  417. package/lib/property/ui/index.d.ts.map +1 -0
  418. package/lib/property/ui/index.js +2 -0
  419. package/lib/property/ui/index.js.map +1 -0
  420. package/lib/raman.d.ts +16 -0
  421. package/lib/raman.d.ts.map +1 -0
  422. package/lib/raman.js +12 -0
  423. package/lib/raman.js.map +1 -0
  424. package/lib/router/core/history.d.ts +24 -3
  425. package/lib/router/core/history.d.ts.map +1 -1
  426. package/lib/router/core/history.js +55 -7
  427. package/lib/router/core/history.js.map +1 -1
  428. package/lib/router/core/index.d.ts +3 -3
  429. package/lib/router/core/index.d.ts.map +1 -1
  430. package/lib/router/core/index.js +2 -2
  431. package/lib/router/core/index.js.map +1 -1
  432. package/lib/router/core/languageRoute.d.ts +61 -0
  433. package/lib/router/core/languageRoute.d.ts.map +1 -0
  434. package/lib/router/core/languageRoute.js +96 -0
  435. package/lib/router/core/languageRoute.js.map +1 -0
  436. package/lib/router/core/siteAddresses.d.ts +23 -0
  437. package/lib/router/core/siteAddresses.d.ts.map +1 -1
  438. package/lib/router/core/siteAddresses.js +26 -0
  439. package/lib/router/core/siteAddresses.js.map +1 -1
  440. package/lib/router/core/tabRouter.d.ts +2 -108
  441. package/lib/router/core/tabRouter.d.ts.map +1 -1
  442. package/lib/router/core/tabRouter.js +38 -5
  443. package/lib/router/core/tabRouter.js.map +1 -1
  444. package/lib/router/core/tabRouterTypes.d.ts +154 -0
  445. package/lib/router/core/tabRouterTypes.d.ts.map +1 -0
  446. package/lib/router/core/tabRouterTypes.js +2 -0
  447. package/lib/router/core/tabRouterTypes.js.map +1 -0
  448. package/lib/seo/core/fitDescription.d.ts +40 -0
  449. package/lib/seo/core/fitDescription.d.ts.map +1 -0
  450. package/lib/seo/core/fitDescription.js +45 -0
  451. package/lib/seo/core/fitDescription.js.map +1 -0
  452. package/lib/seo/core/index.d.ts +7 -0
  453. package/lib/seo/core/index.d.ts.map +1 -1
  454. package/lib/seo/core/index.js +4 -0
  455. package/lib/seo/core/index.js.map +1 -1
  456. package/lib/seo/core/limits.d.ts +24 -0
  457. package/lib/seo/core/limits.d.ts.map +1 -0
  458. package/lib/seo/core/limits.js +24 -0
  459. package/lib/seo/core/limits.js.map +1 -0
  460. package/lib/seo/core/pageContent.d.ts +25 -0
  461. package/lib/seo/core/pageContent.d.ts.map +1 -0
  462. package/lib/seo/core/pageContent.js +25 -0
  463. package/lib/seo/core/pageContent.js.map +1 -0
  464. package/lib/seo/core/plainDescription.d.ts.map +1 -1
  465. package/lib/seo/core/plainDescription.js +3 -2
  466. package/lib/seo/core/plainDescription.js.map +1 -1
  467. package/lib/seo/core/routeProblems.d.ts.map +1 -1
  468. package/lib/seo/core/routeProblems.js +1 -6
  469. package/lib/seo/core/routeProblems.js.map +1 -1
  470. package/lib/seo/core/routeTable.d.ts +31 -0
  471. package/lib/seo/core/routeTable.d.ts.map +1 -0
  472. package/lib/seo/core/routeTable.js +96 -0
  473. package/lib/seo/core/routeTable.js.map +1 -0
  474. package/lib/seo/vite/index.d.ts +2 -0
  475. package/lib/seo/vite/index.d.ts.map +1 -1
  476. package/lib/seo/vite/index.js +1 -0
  477. package/lib/seo/vite/index.js.map +1 -1
  478. package/lib/seo/vite/prerender.d.ts +10 -0
  479. package/lib/seo/vite/prerender.d.ts.map +1 -1
  480. package/lib/seo/vite/prerender.js +12 -1
  481. package/lib/seo/vite/prerender.js.map +1 -1
  482. package/lib/seo/vite/routeTable.d.ts +40 -0
  483. package/lib/seo/vite/routeTable.d.ts.map +1 -0
  484. package/lib/seo/vite/routeTable.js +44 -0
  485. package/lib/seo/vite/routeTable.js.map +1 -0
  486. package/lib/server/answerAddresses.d.ts +51 -0
  487. package/lib/server/answerAddresses.d.ts.map +1 -0
  488. package/lib/server/answerAddresses.js +72 -0
  489. package/lib/server/answerAddresses.js.map +1 -0
  490. package/lib/server/cardMeta.d.ts +57 -0
  491. package/lib/server/cardMeta.d.ts.map +1 -0
  492. package/lib/server/cardMeta.js +52 -0
  493. package/lib/server/cardMeta.js.map +1 -0
  494. package/lib/server/config.d.ts +72 -0
  495. package/lib/server/config.d.ts.map +1 -0
  496. package/lib/server/config.js +67 -0
  497. package/lib/server/config.js.map +1 -0
  498. package/lib/server/envNumber.d.ts +35 -0
  499. package/lib/server/envNumber.d.ts.map +1 -0
  500. package/lib/server/envNumber.js +42 -0
  501. package/lib/server/envNumber.js.map +1 -0
  502. package/lib/server/healthRoute.d.ts +26 -0
  503. package/lib/server/healthRoute.d.ts.map +1 -0
  504. package/lib/server/healthRoute.js +22 -0
  505. package/lib/server/healthRoute.js.map +1 -0
  506. package/lib/server/listenSite.d.ts +38 -0
  507. package/lib/server/listenSite.d.ts.map +1 -0
  508. package/lib/server/listenSite.js +60 -0
  509. package/lib/server/listenSite.js.map +1 -0
  510. package/lib/server/mcpServer.d.ts +8 -0
  511. package/lib/server/mcpServer.d.ts.map +1 -0
  512. package/lib/server/mcpServer.js +11 -0
  513. package/lib/server/mcpServer.js.map +1 -0
  514. package/lib/server/repositoryVersion.d.ts +16 -0
  515. package/lib/server/repositoryVersion.d.ts.map +1 -0
  516. package/lib/server/repositoryVersion.js +33 -0
  517. package/lib/server/repositoryVersion.js.map +1 -0
  518. package/lib/server/routeOptions.d.ts +23 -0
  519. package/lib/server/routeOptions.d.ts.map +1 -0
  520. package/lib/server/routeOptions.js +20 -0
  521. package/lib/server/routeOptions.js.map +1 -0
  522. package/lib/server/routeTable.d.ts +14 -0
  523. package/lib/server/routeTable.d.ts.map +1 -0
  524. package/lib/server/routeTable.js +32 -0
  525. package/lib/server/routeTable.js.map +1 -0
  526. package/lib/server/siteView.d.ts +29 -0
  527. package/lib/server/siteView.d.ts.map +1 -0
  528. package/lib/server/siteView.js +21 -0
  529. package/lib/server/siteView.js.map +1 -0
  530. package/lib/server/spaPages.d.ts +32 -0
  531. package/lib/server/spaPages.d.ts.map +1 -0
  532. package/lib/server/spaPages.js +126 -0
  533. package/lib/server/spaPages.js.map +1 -0
  534. package/lib/server/spaSite.d.ts +30 -0
  535. package/lib/server/spaSite.d.ts.map +1 -0
  536. package/lib/server/spaSite.js +170 -0
  537. package/lib/server/spaSite.js.map +1 -0
  538. package/lib/server/spaSiteOptions.d.ts +126 -0
  539. package/lib/server/spaSiteOptions.d.ts.map +1 -0
  540. package/lib/server/spaSiteOptions.js +2 -0
  541. package/lib/server/spaSiteOptions.js.map +1 -0
  542. package/lib/server/staticSite.d.ts +9 -0
  543. package/lib/server/staticSite.d.ts.map +1 -1
  544. package/lib/server/staticSite.js +41 -19
  545. package/lib/server/staticSite.js.map +1 -1
  546. package/lib/server/toolSiteServer.d.ts +77 -0
  547. package/lib/server/toolSiteServer.d.ts.map +1 -0
  548. package/lib/server/toolSiteServer.js +58 -0
  549. package/lib/server/toolSiteServer.js.map +1 -0
  550. package/lib/server/trustProxy.d.ts +20 -0
  551. package/lib/server/trustProxy.d.ts.map +1 -0
  552. package/lib/server/trustProxy.js +32 -0
  553. package/lib/server/trustProxy.js.map +1 -0
  554. package/lib/server/types.d.ts +13 -0
  555. package/lib/server/types.d.ts.map +1 -0
  556. package/lib/server/types.js +2 -0
  557. package/lib/server/types.js.map +1 -0
  558. package/lib/server.d.ts +22 -0
  559. package/lib/server.d.ts.map +1 -1
  560. package/lib/server.js +12 -0
  561. package/lib/server.js.map +1 -1
  562. package/lib/share/core/config.d.ts +18 -0
  563. package/lib/share/core/config.d.ts.map +1 -1
  564. package/lib/share/core/config.js +33 -2
  565. package/lib/share/core/config.js.map +1 -1
  566. package/lib/share/core/index.d.ts +3 -1
  567. package/lib/share/core/index.d.ts.map +1 -1
  568. package/lib/share/core/index.js +2 -1
  569. package/lib/share/core/index.js.map +1 -1
  570. package/lib/share/core/keySetParam.d.ts +40 -0
  571. package/lib/share/core/keySetParam.d.ts.map +1 -0
  572. package/lib/share/core/keySetParam.js +60 -0
  573. package/lib/share/core/keySetParam.js.map +1 -0
  574. package/lib/share/core/vocabulary.d.ts +8 -0
  575. package/lib/share/core/vocabulary.d.ts.map +1 -1
  576. package/lib/shell/ui/ShareControl.d.ts +75 -0
  577. package/lib/shell/ui/ShareControl.d.ts.map +1 -0
  578. package/lib/shell/ui/ShareControl.js +40 -0
  579. package/lib/shell/ui/ShareControl.js.map +1 -0
  580. package/lib/shell/ui/ShellFrame.d.ts +14 -0
  581. package/lib/shell/ui/ShellFrame.d.ts.map +1 -0
  582. package/lib/shell/ui/ShellFrame.js +45 -0
  583. package/lib/shell/ui/ShellFrame.js.map +1 -0
  584. package/lib/shell/ui/SiteShell.d.ts +251 -0
  585. package/lib/shell/ui/SiteShell.d.ts.map +1 -0
  586. package/lib/shell/ui/SiteShell.js +39 -0
  587. package/lib/shell/ui/SiteShell.js.map +1 -0
  588. package/lib/shell/ui/index.d.ts +5 -0
  589. package/lib/shell/ui/index.d.ts.map +1 -0
  590. package/lib/shell/ui/index.js +3 -0
  591. package/lib/shell/ui/index.js.map +1 -0
  592. package/lib/state/core/index.d.ts +1 -0
  593. package/lib/state/core/index.d.ts.map +1 -1
  594. package/lib/state/core/index.js.map +1 -1
  595. package/lib/state/core/legacyEntries.d.ts +30 -0
  596. package/lib/state/core/legacyEntries.d.ts.map +1 -0
  597. package/lib/state/core/legacyEntries.js +51 -0
  598. package/lib/state/core/legacyEntries.js.map +1 -0
  599. package/lib/state/core/persistBucket.d.ts +26 -2
  600. package/lib/state/core/persistBucket.d.ts.map +1 -1
  601. package/lib/state/core/persistBucket.js +26 -9
  602. package/lib/state/core/persistBucket.js.map +1 -1
  603. package/lib/state/core/persistSignalBucket.d.ts +26 -0
  604. package/lib/state/core/persistSignalBucket.d.ts.map +1 -1
  605. package/lib/state/core/persistSignalBucket.js +31 -0
  606. package/lib/state/core/persistSignalBucket.js.map +1 -1
  607. package/lib/state/core/storageEntry.d.ts +15 -0
  608. package/lib/state/core/storageEntry.d.ts.map +1 -1
  609. package/lib/state/core/storageEntry.js +33 -0
  610. package/lib/state/core/storageEntry.js.map +1 -1
  611. package/lib/structure/ui/StructureExportButton.d.ts +27 -0
  612. package/lib/structure/ui/StructureExportButton.d.ts.map +1 -0
  613. package/lib/structure/ui/StructureExportButton.js +21 -0
  614. package/lib/structure/ui/StructureExportButton.js.map +1 -0
  615. package/lib/structure/ui/index.d.ts +4 -0
  616. package/lib/structure/ui/index.d.ts.map +1 -1
  617. package/lib/structure/ui/index.js +2 -0
  618. package/lib/structure/ui/index.js.map +1 -1
  619. package/lib/structure/ui/useStructureDraft.d.ts +32 -0
  620. package/lib/structure/ui/useStructureDraft.d.ts.map +1 -0
  621. package/lib/structure/ui/useStructureDraft.js +20 -0
  622. package/lib/structure/ui/useStructureDraft.js.map +1 -0
  623. package/lib/ui.d.ts +2 -0
  624. package/lib/ui.d.ts.map +1 -1
  625. package/lib/ui.js +2 -0
  626. package/lib/ui.js.map +1 -1
  627. package/lib/worker/core/index.d.ts +1 -1
  628. package/lib/worker/core/index.d.ts.map +1 -1
  629. package/lib/worker/core/messages.d.ts +4 -2
  630. package/lib/worker/core/messages.d.ts.map +1 -1
  631. package/lib/worker/core/messages.js.map +1 -1
  632. package/lib/worker/core/oclResourcesUrl.d.ts +16 -0
  633. package/lib/worker/core/oclResourcesUrl.d.ts.map +1 -0
  634. package/lib/worker/core/oclResourcesUrl.js +19 -0
  635. package/lib/worker/core/oclResourcesUrl.js.map +1 -0
  636. package/lib/worker/core/serveWorkerRequests.d.ts +8 -0
  637. package/lib/worker/core/serveWorkerRequests.d.ts.map +1 -1
  638. package/lib/worker/core/serveWorkerRequests.js +15 -2
  639. package/lib/worker/core/serveWorkerRequests.js.map +1 -1
  640. package/lib/worker/core/workerChannel.d.ts +3 -4
  641. package/lib/worker/core/workerChannel.d.ts.map +1 -1
  642. package/lib/worker/core/workerChannel.js +72 -67
  643. package/lib/worker/core/workerChannel.js.map +1 -1
  644. package/lib/worker/core/workerChannelParts.d.ts +17 -6
  645. package/lib/worker/core/workerChannelParts.d.ts.map +1 -1
  646. package/lib/worker/core/workerChannelParts.js +20 -4
  647. package/lib/worker/core/workerChannelParts.js.map +1 -1
  648. package/lib/worker/core/workerChannelTypes.d.ts +46 -2
  649. package/lib/worker/core/workerChannelTypes.d.ts.map +1 -1
  650. package/lib/worker/core/workerSlot.d.ts +66 -0
  651. package/lib/worker/core/workerSlot.d.ts.map +1 -0
  652. package/lib/worker/core/workerSlot.js +107 -0
  653. package/lib/worker/core/workerSlot.js.map +1 -0
  654. package/package.json +17 -1
  655. package/src/card/core/cardAddress.ts +100 -0
  656. package/src/card/core/cardPageUrl.ts +97 -0
  657. package/src/card/core/index.ts +6 -0
  658. package/src/card/core/panelRoom.ts +66 -0
  659. package/src/card/ui/CardDetailsButton.tsx +104 -0
  660. package/src/card/ui/CardFigure.tsx +86 -0
  661. package/src/card/ui/CardFrame.tsx +46 -0
  662. package/src/card/ui/CopyTableButton.tsx +81 -0
  663. package/src/card/ui/cardTooltip.ts +18 -0
  664. package/src/card/ui/embed.ts +27 -0
  665. package/src/card/ui/fitCardToFrame.ts +76 -0
  666. package/src/card/ui/holdRoomForPanels.ts +83 -0
  667. package/src/card/ui/index.ts +14 -0
  668. package/src/card/ui/openPanels.ts +106 -0
  669. package/src/card.ts +13 -0
  670. package/src/conformers.ts +4 -0
  671. package/src/core.ts +5 -0
  672. package/src/fetch/core/apiError.ts +65 -0
  673. package/src/fetch/core/fetchJson.ts +129 -0
  674. package/src/fetch/core/index.ts +4 -0
  675. package/src/formula/core/formulaText.ts +96 -0
  676. package/src/formula/core/index.ts +20 -0
  677. package/src/formula/core/normalizeFormula.ts +50 -0
  678. package/src/formula/core/readFormula.ts +211 -0
  679. package/src/formula/ui/CopyableFormula.tsx +51 -0
  680. package/src/formula/ui/FormulaInput.tsx +50 -0
  681. package/src/formula/ui/QuestionFormula.tsx +20 -0
  682. package/src/formula/ui/index.ts +6 -0
  683. package/src/formula.ts +11 -0
  684. package/src/hooks/ui/index.ts +1 -0
  685. package/src/hooks/ui/keyTargets.ts +5 -3
  686. package/src/hooks/ui/useAsync.ts +50 -14
  687. package/src/ir/core/analysisSpectra.ts +26 -10
  688. package/src/ir/core/bandLabelPlan.ts +21 -10
  689. package/src/ir/core/index.ts +25 -5
  690. package/src/ir/core/irBand.ts +52 -14
  691. package/src/ir/core/irCommands.ts +15 -1
  692. package/src/ir/core/irDomain.ts +9 -7
  693. package/src/ir/core/irFormat.ts +39 -6
  694. package/src/ir/core/irMode.ts +42 -10
  695. package/src/ir/core/irReducer.ts +1 -49
  696. package/src/ir/core/irSpectrum.ts +59 -30
  697. package/src/ir/core/irState.ts +67 -2
  698. package/src/ir/core/irTechnique.ts +115 -0
  699. package/src/ir/core/irTechniqueCommands.ts +82 -0
  700. package/src/ir/core/pickBands.ts +63 -28
  701. package/src/ir/core/ramanBands.ts +105 -0
  702. package/src/ir/core/spectrumJcamp.ts +65 -16
  703. package/src/ir/core/toIrSpectrum.ts +20 -2
  704. package/src/ir/ui/BandRow.tsx +107 -0
  705. package/src/ir/ui/BandsPanel.tsx +32 -125
  706. package/src/ir/ui/IrAboutDialog.tsx +69 -28
  707. package/src/ir/ui/IrCanvas.tsx +2 -1
  708. package/src/ir/ui/IrChart.tsx +20 -24
  709. package/src/ir/ui/IrCommandProvider.tsx +10 -3
  710. package/src/ir/ui/IrCommandTooltip.tsx +11 -2
  711. package/src/ir/ui/IrDocumentationDialog.tsx +99 -55
  712. package/src/ir/ui/IrEditor.tsx +5 -36
  713. package/src/ir/ui/IrHeader.tsx +10 -3
  714. package/src/ir/ui/IrLogo.tsx +28 -9
  715. package/src/ir/ui/IrShell.tsx +27 -75
  716. package/src/ir/ui/IrStatusBar.tsx +17 -12
  717. package/src/ir/ui/IrToolbar.tsx +26 -15
  718. package/src/ir/ui/IrTraces.tsx +5 -1
  719. package/src/ir/ui/RamanEditor.tsx +53 -0
  720. package/src/ir/ui/SpectraPanel.tsx +2 -1
  721. package/src/ir/ui/SpectrumRow.tsx +14 -5
  722. package/src/ir/ui/VibrationalEditor.tsx +94 -0
  723. package/src/ir/ui/bandsTsv.ts +46 -0
  724. package/src/ir/ui/irChartProps.ts +14 -4
  725. package/src/ir/ui/irCommandContext.tsx +18 -3
  726. package/src/ir/ui/useIrEditor.ts +20 -8
  727. package/src/ir/ui/useIrHandle.ts +51 -0
  728. package/src/ir/ui/useIrText.ts +170 -0
  729. package/src/ir/ui/useIrZoom.ts +12 -3
  730. package/src/ir/ui/useValueAxisZoom.ts +67 -0
  731. package/src/ir.ts +3 -0
  732. package/src/locales/de.json +57 -1
  733. package/src/locales/en.json +57 -1
  734. package/src/locales/es.json +57 -1
  735. package/src/locales/fr.json +57 -1
  736. package/src/locales/it.json +57 -1
  737. package/src/moleculesClient/core/index.ts +19 -0
  738. package/src/moleculesClient/core/moleculesClient.ts +175 -0
  739. package/src/moleculesClient/core/moleculesClientApi.ts +120 -0
  740. package/src/moleculesClient/core/moleculesTypes.ts +163 -0
  741. package/src/moleculesClient/core/requestRetry.ts +118 -0
  742. package/src/molstar/core/camera.ts +3 -2
  743. package/src/molstar/core/framing.ts +200 -0
  744. package/src/molstar/core/hover.ts +26 -0
  745. package/src/molstar/core/index.ts +21 -1
  746. package/src/pedagogy/core/answers.ts +94 -0
  747. package/src/pedagogy/core/attempts.ts +205 -0
  748. package/src/pedagogy/core/index.ts +36 -0
  749. package/src/pedagogy/core/progressController.ts +116 -0
  750. package/src/pedagogy/core/seed.ts +177 -0
  751. package/src/pedagogy/core/series.ts +82 -0
  752. package/src/pedagogy/ui/AnswerFields.tsx +63 -0
  753. package/src/pedagogy/ui/ExerciseList.tsx +202 -0
  754. package/src/pedagogy/ui/ExerciseSeries.tsx +250 -0
  755. package/src/pedagogy/ui/QuestionCard.tsx +231 -0
  756. package/src/pedagogy/ui/index.ts +18 -0
  757. package/src/pedagogy/ui/seriesCounts.ts +34 -0
  758. package/src/pedagogy/ui/seriesParts.tsx +127 -0
  759. package/src/pedagogy/ui/useAttemptRecords.ts +16 -0
  760. package/src/periodic/ui/PeriodicTable.tsx +6 -3
  761. package/src/property/core/copyableText.ts +20 -0
  762. package/src/property/core/index.ts +1 -0
  763. package/src/property/ui/PropertyTable.tsx +83 -0
  764. package/src/property/ui/index.ts +2 -0
  765. package/src/raman.ts +19 -0
  766. package/src/router/core/history.ts +61 -7
  767. package/src/router/core/index.ts +3 -2
  768. package/src/router/core/languageRoute.ts +136 -0
  769. package/src/router/core/siteAddresses.ts +38 -0
  770. package/src/router/core/tabRouter.ts +59 -117
  771. package/src/router/core/tabRouterTypes.ts +158 -0
  772. package/src/seo/core/fitDescription.ts +74 -0
  773. package/src/seo/core/index.ts +17 -0
  774. package/src/seo/core/limits.ts +27 -0
  775. package/src/seo/core/pageContent.ts +42 -0
  776. package/src/seo/core/plainDescription.ts +4 -2
  777. package/src/seo/core/routeProblems.ts +1 -7
  778. package/src/seo/core/routeTable.ts +103 -0
  779. package/src/seo/vite/index.ts +2 -0
  780. package/src/seo/vite/prerender.ts +26 -1
  781. package/src/seo/vite/routeTable.ts +79 -0
  782. package/src/server/answerAddresses.ts +92 -0
  783. package/src/server/cardMeta.ts +88 -0
  784. package/src/server/config.ts +125 -0
  785. package/src/server/envNumber.ts +65 -0
  786. package/src/server/healthRoute.ts +42 -0
  787. package/src/server/listenSite.ts +90 -0
  788. package/src/server/mcpServer.ts +14 -0
  789. package/src/server/repositoryVersion.ts +33 -0
  790. package/src/server/routeOptions.ts +26 -0
  791. package/src/server/routeTable.ts +35 -0
  792. package/src/server/siteView.ts +42 -0
  793. package/src/server/spaPages.ts +179 -0
  794. package/src/server/spaSite.ts +216 -0
  795. package/src/server/spaSiteOptions.ts +133 -0
  796. package/src/server/staticSite.ts +65 -35
  797. package/src/server/toolSiteServer.ts +127 -0
  798. package/src/server/trustProxy.ts +32 -0
  799. package/src/server/types.ts +25 -0
  800. package/src/server.ts +40 -0
  801. package/src/share/core/config.ts +45 -2
  802. package/src/share/core/index.ts +4 -0
  803. package/src/share/core/keySetParam.ts +92 -0
  804. package/src/share/core/vocabulary.ts +8 -0
  805. package/src/shell/ui/ShareControl.tsx +150 -0
  806. package/src/shell/ui/ShellFrame.tsx +180 -0
  807. package/src/shell/ui/SiteShell.tsx +297 -0
  808. package/src/shell/ui/index.ts +9 -0
  809. package/src/state/core/index.ts +1 -0
  810. package/src/state/core/legacyEntries.ts +76 -0
  811. package/src/state/core/persistBucket.ts +50 -10
  812. package/src/state/core/persistSignalBucket.ts +52 -0
  813. package/src/state/core/storageEntry.ts +32 -0
  814. package/src/structure/ui/StructureExportButton.tsx +57 -0
  815. package/src/structure/ui/index.ts +4 -0
  816. package/src/structure/ui/useStructureDraft.ts +47 -0
  817. package/src/ui.ts +2 -0
  818. package/src/worker/core/index.ts +1 -0
  819. package/src/worker/core/messages.ts +4 -3
  820. package/src/worker/core/oclResourcesUrl.ts +21 -0
  821. package/src/worker/core/serveWorkerRequests.ts +30 -2
  822. package/src/worker/core/workerChannel.ts +74 -74
  823. package/src/worker/core/workerChannelParts.ts +33 -13
  824. package/src/worker/core/workerChannelTypes.ts +47 -2
  825. package/src/worker/core/workerSlot.ts +181 -0
  826. package/styles/card.css +145 -0
  827. package/styles/chrome.css +248 -0
@@ -6,6 +6,8 @@
6
6
  * row that calls it 1714.6 read as two bands.
7
7
  */
8
8
 
9
+ import { formatTrimmed } from '../../format/core/numbers.ts';
10
+
9
11
  import type { IrMode } from './irSpectrum.ts';
10
12
 
11
13
  /** How many decimals an absorbance is written to. */
@@ -14,6 +16,9 @@ export const ABSORBANCE_DECIMALS = 3;
14
16
  /** How many a percent transmittance is written to. */
15
17
  export const TRANSMITTANCE_DECIMALS = 1;
16
18
 
19
+ /** How many significant digits an intensity is written to. */
20
+ export const INTENSITY_DIGITS = 4;
21
+
17
22
  /**
18
23
  * Write a wavenumber the way a chemist quotes one.
19
24
  *
@@ -35,23 +40,51 @@ export function formatWavenumber(wavenumber: number): string {
35
40
  * Three decimals for an absorbance and one for a percent transmittance, which is
36
41
  * roughly the same precision expressed two ways — an absorbance of 0.001 and a
37
42
  * transmittance of 0.2 percent are both about where a real spectrum's noise
38
- * sits.
43
+ * sits. An intensity is counts from one instrument and a fraction of the
44
+ * strongest band from another, so no count of decimals suits it: it keeps
45
+ * `INTENSITY_DIGITS` significant digits instead.
39
46
  * @param value - The value.
40
47
  * @param mode - Which axis it is in.
41
48
  * @returns The number as a string, without its unit.
42
49
  */
43
50
  export function formatIrValue(value: number, mode: IrMode): string {
44
51
  if (!Number.isFinite(value)) return '';
45
- return value.toFixed(
46
- mode === 'absorbance' ? ABSORBANCE_DECIMALS : TRANSMITTANCE_DECIMALS,
47
- );
52
+ const { decimals } = VALUE_FORMATS[mode];
53
+ return decimals === undefined
54
+ ? formatTrimmed(value, { significant: INTENSITY_DIGITS })
55
+ : value.toFixed(decimals);
48
56
  }
49
57
 
50
58
  /**
51
59
  * What the value axis is called where there is room for one word.
52
60
  * @param mode - Which axis is being drawn.
53
- * @returns `A` or `%T`, as a spectrum is annotated by hand.
61
+ * @returns `A`, `%T` or `I`, as a spectrum is annotated by hand.
54
62
  */
55
63
  export function shortModeLabel(mode: IrMode): string {
56
- return mode === 'absorbance' ? 'A' : '%T';
64
+ return VALUE_FORMATS[mode].symbol;
57
65
  }
66
+
67
+ /**
68
+ * The range a spectrum covers, written in the order its axis is read.
69
+ * @param wavenumbers - Its wavenumbers, ascending.
70
+ * @param reversed - Whether the axis runs from high to low, as infrared's does.
71
+ * @returns `4000–400 cm⁻¹` on a reversed axis, `100–3200 cm⁻¹` on one that is
72
+ * not, and an empty string for a spectrum with no point.
73
+ */
74
+ export function formatWavenumberRange(
75
+ wavenumbers: Float64Array,
76
+ reversed: boolean,
77
+ ): string {
78
+ const lowest = wavenumbers[0];
79
+ const highest = wavenumbers.at(-1);
80
+ if (lowest === undefined || highest === undefined) return '';
81
+ const [first, last] = reversed ? [highest, lowest] : [lowest, highest];
82
+ return `${formatWavenumber(first)}–${formatWavenumber(last)} cm⁻¹`;
83
+ }
84
+
85
+ /** How each value axis is written: its symbol, and its count of decimals. */
86
+ const VALUE_FORMATS: Record<IrMode, { symbol: string; decimals?: number }> = {
87
+ transmittance: { symbol: '%T', decimals: TRANSMITTANCE_DECIMALS },
88
+ absorbance: { symbol: 'A', decimals: ABSORBANCE_DECIMALS },
89
+ intensity: { symbol: 'I' },
90
+ };
@@ -1,14 +1,14 @@
1
1
  /**
2
- * Everything that differs between reading a spectrum as absorbance and reading
3
- * it as percent transmittance.
2
+ * Everything that differs between reading a spectrum as absorbance, as percent
3
+ * transmittance, or — for a Raman spectrum — as intensity.
4
4
  *
5
- * The two are the same measurement drawn upside down, and nearly every
5
+ * The first two are the same measurement drawn upside down, and nearly every
6
6
  * difference between them is one of a handful of facts: what the axis is called,
7
7
  * where its baseline is, whether that baseline is held in the window, which way
8
8
  * a band points, and which zoom gestures are worth answering. Gathering them
9
9
  * here is what keeps the switch from being an `if (mode === …)` in the chart,
10
10
  * the tracker, the band marks, the zoom and the fitting separately, where they
11
- * would eventually disagree.
11
+ * would eventually disagree. Intensity is one more entry of the same facts.
12
12
  *
13
13
  * **No conversion happens here, or anywhere in this package.** `ir-spectrum`
14
14
  * adds both an absorbance and a transmittance variable to every spectrum it
@@ -24,9 +24,14 @@ import type {
24
24
  } from '../../chart/core/chartDomain.ts';
25
25
 
26
26
  import type { IrMode } from './irSpectrum.ts';
27
+ import type { IrTechnique } from './irTechnique.ts';
28
+ import { IR_TECHNIQUE_RULES, irModeTechnique } from './irTechnique.ts';
27
29
 
28
- /** The two ways a spectrum is read, in the order a control offers them. */
29
- export const IR_MODES: readonly IrMode[] = ['transmittance', 'absorbance'];
30
+ /**
31
+ * The two ways an infrared spectrum is read, in the order a control offers
32
+ * them.
33
+ */
34
+ export const IR_MODES: readonly IrMode[] = IR_TECHNIQUE_RULES.infrared.modes;
30
35
 
31
36
  /**
32
37
  * How each mode behaves, every fact in one place.
@@ -115,6 +120,22 @@ export const IR_MODE_RULES = {
115
120
  */
116
121
  wheelZoom: true,
117
122
  },
123
+ intensity: {
124
+ title: 'intensity',
125
+ /** No light scattered is a real floor, as no light absorbed is. */
126
+ baseline: 0,
127
+ /** Not held in a dragged window, for the reason absorbance gives. */
128
+ keepBaseline: false,
129
+ /** A Raman band stands up out of the baseline under it. */
130
+ bandsPointDown: false,
131
+ /**
132
+ * Both drags are worth having: intensity is open at the top and its weak
133
+ * bands lie against zero, as absorbance's do.
134
+ */
135
+ boxZoomOnly: false,
136
+ /** The wheel scales the axis about zero, bringing a weak band up. */
137
+ wheelZoom: true,
138
+ },
118
139
  } as const satisfies Record<
119
140
  IrMode,
120
141
  {
@@ -199,10 +220,21 @@ export function bandsPointDown(mode: IrMode): boolean {
199
220
  }
200
221
 
201
222
  /**
202
- * The other mode, for a control that toggles between the two.
223
+ * The next mode, for a control that toggles between them.
224
+ *
225
+ * It never leaves the technique: an infrared viewer goes back and forth
226
+ * between its two axes, and a Raman one, reading intensity alone, stays where
227
+ * it is.
203
228
  * @param mode - The mode in force.
204
- * @returns The one to switch to.
229
+ * @param technique - The technique whose modes are toggled through. Defaults to
230
+ * the one that reads `mode`.
231
+ * @returns The one to switch to: the technique's first when `mode` is not one
232
+ * of its own.
205
233
  */
206
- export function otherIrMode(mode: IrMode): IrMode {
207
- return mode === 'absorbance' ? 'transmittance' : 'absorbance';
234
+ export function otherIrMode(
235
+ mode: IrMode,
236
+ technique: IrTechnique = irModeTechnique(mode),
237
+ ): IrMode {
238
+ const modes: readonly IrMode[] = IR_TECHNIQUE_RULES[technique].modes;
239
+ return modes[(modes.indexOf(mode) + 1) % modes.length] ?? mode;
208
240
  }
@@ -16,12 +16,7 @@
16
16
  import type { IrSidePanelId } from './irSidePanels.ts';
17
17
  import type { IrDomain, IrSpectrum } from './irSpectrum.ts';
18
18
  import type { IrSettings, IrState, IrTool, PartialIrState } from './irState.ts';
19
- import {
20
- DEFAULT_SETTINGS,
21
- DEFAULT_SIDE_PANELS,
22
- isIrWindow,
23
- mergeIrSettings,
24
- } from './irState.ts';
19
+ import { isIrWindow, mergeIrSettings } from './irState.ts';
25
20
 
26
21
  /** Everything that can be asked of the viewer. */
27
22
  export type IrAction =
@@ -41,49 +36,6 @@ export type IrAction =
41
36
  | { type: 'loadState'; state: PartialIrState }
42
37
  | { type: 'clear' };
43
38
 
44
- /** What a viewer opens on. */
45
- export interface CreateIrStateOptions {
46
- /**
47
- * The spectra to open on.
48
- * @default []
49
- */
50
- spectra?: IrSpectrum[];
51
- /**
52
- * The workspace to open in.
53
- * @default DEFAULT_SETTINGS
54
- */
55
- settings?: Partial<IrSettings>;
56
- /**
57
- * The panels open to begin with.
58
- * @default DEFAULT_SIDE_PANELS
59
- */
60
- panelIds?: IrSidePanelId[];
61
- }
62
-
63
- /**
64
- * The state a viewer opens with.
65
- *
66
- * The panel list is spread rather than stored by reference: a caller's array is
67
- * the caller's to mutate, and a viewer holding it would find its open panels
68
- * changing under it.
69
- * @param options - What it opens on.
70
- * @returns The state.
71
- */
72
- export function createIrState(options: CreateIrStateOptions = {}): IrState {
73
- const { spectra = [], settings, panelIds } = options;
74
- return {
75
- data: { spectra: [...spectra] },
76
- view: {
77
- selectedId: spectra[0]?.id ?? null,
78
- domain: null,
79
- tool: 'read',
80
- openPanelIds: [...(panelIds ?? DEFAULT_SIDE_PANELS)],
81
- error: null,
82
- },
83
- settings: mergeIrSettings(DEFAULT_SETTINGS, settings),
84
- };
85
- }
86
-
87
39
  /**
88
40
  * Fold one action into the state.
89
41
  * @param state - The state in force.
@@ -1,17 +1,22 @@
1
1
  /**
2
- * What an infrared spectrum is once it has been read, whatever it was read from.
2
+ * What a vibrational spectrum is once it has been read, whatever it was read
3
+ * from.
3
4
  *
4
- * One acquisition becomes one `IrSpectrum` carrying **both** value axes —
5
- * absorbance and percent transmittance — over one shared array of wavenumbers.
6
- * Both are held rather than one being derived on demand because `ir-spectrum`
7
- * already produces both when it reads a file: it adds an `a` and a `t` variable
8
- * to every spectrum whichever of the two the instrument wrote, so the conversion
9
- * happens once, in the one place that knows what the file's y axis meant. Holding
10
- * the answer means switching what is drawn costs nothing, and means the two
11
- * axes can never drift apart through a round trip.
5
+ * One infrared acquisition becomes one `IrSpectrum` carrying **both** value
6
+ * axes — absorbance and percent transmittance — over one shared array of
7
+ * wavenumbers. Both are held rather than one being derived on demand because
8
+ * `ir-spectrum` already produces both when it reads a file: it adds an `a` and
9
+ * a `t` variable to every spectrum whichever of the two the instrument wrote, so
10
+ * the conversion happens once, in the one place that knows what the file's y
11
+ * axis meant. Holding the answer means switching what is drawn costs nothing,
12
+ * and means the two axes can never drift apart through a round trip.
13
+ *
14
+ * A Raman acquisition carries its intensity instead, over its Raman shifts —
15
+ * also wavenumbers in cm⁻¹ — and neither infrared axis: there is no
16
+ * transmittance of scattered light to convert it to.
12
17
  *
13
18
  * The arrays are `Float64Array` and are replaced on a change, never written
14
- * into, since every consumer holds the same object by reference. An infrared
19
+ * into, since every consumer holds the same object by reference. A vibrational
15
20
  * spectrum is a few thousand points rather than a mass spectrum's few hundred
16
21
  * thousand, so holding two value axes costs nothing worth counting.
17
22
  */
@@ -30,8 +35,11 @@ import type { ChartDomain } from '../../chart/core/chartDomain.ts';
30
35
  */
31
36
  export type IrTrace = DataXY<Float64Array>;
32
37
 
33
- /** The formats a spectrum can have been read from. */
34
- export type IrFormat = 'jcamp' | 'spc' | 'text' | 'calculated';
38
+ /**
39
+ * The formats a spectrum can have been read from. `wdf` is Renishaw's Raman
40
+ * format, which a host reads with its own parser and hands over.
41
+ */
42
+ export type IrFormat = 'jcamp' | 'spc' | 'text' | 'wdf' | 'calculated';
35
43
 
36
44
  /**
37
45
  * Where a spectrum came from, and what the file said about the acquisition.
@@ -87,8 +95,11 @@ export interface IrMeta {
87
95
  fields: IrMetaField[];
88
96
  }
89
97
 
90
- /** Which value axis is being drawn and read. */
91
- export type IrMode = 'absorbance' | 'transmittance';
98
+ /**
99
+ * Which value axis is being drawn and read: absorbance or percent
100
+ * transmittance for an infrared spectrum, intensity for a Raman one.
101
+ */
102
+ export type IrMode = 'absorbance' | 'transmittance' | 'intensity';
92
103
 
93
104
  /** One spectrum as the viewer holds it. */
94
105
  export interface IrSpectrum {
@@ -99,19 +110,33 @@ export interface IrSpectrum {
99
110
  /** The colour it is drawn in. */
100
111
  color: string;
101
112
  /**
102
- * The wavenumbers in cm⁻¹, **ascending**.
113
+ * The wavenumbers in cm⁻¹, **ascending** — of the light absorbed for an
114
+ * infrared spectrum, the Raman shift for a Raman one.
103
115
  *
104
- * Ascending even though the axis is read from 4000 down to 400: which way the
105
- * numbers run on screen is the chart's business, and every binary search and
106
- * every extent taken off index zero downstream wants them in order. Reversing
107
- * the data instead would make the drawing simpler once and everything else
108
- * wrong.
116
+ * Ascending even though the infrared axis is read from 4000 down to 400:
117
+ * which way the numbers run on screen is the chart's business, and every
118
+ * binary search and every extent taken off index zero downstream wants them in
119
+ * order. Reversing the data instead would make the drawing simpler once and
120
+ * everything else wrong.
109
121
  */
110
122
  wavenumber: Float64Array;
111
- /** Absorbance at each wavenumber, as `ir-spectrum` supplied it. */
112
- absorbance: Float64Array;
113
- /** Percent transmittance at each wavenumber, likewise. */
114
- transmittance: Float64Array;
123
+ /**
124
+ * Absorbance at each wavenumber, as `ir-spectrum` supplied it. An infrared
125
+ * spectrum carries it beside `transmittance`.
126
+ * @default undefined
127
+ */
128
+ absorbance?: Float64Array;
129
+ /**
130
+ * Percent transmittance at each wavenumber, likewise.
131
+ * @default undefined
132
+ */
133
+ transmittance?: Float64Array;
134
+ /**
135
+ * Intensity at each Raman shift, which a Raman spectrum carries instead of
136
+ * the two infrared axes.
137
+ * @default undefined
138
+ */
139
+ intensity?: Float64Array;
115
140
  /** What the file said about the acquisition, `null` when it said nothing. */
116
141
  meta: IrMeta | null;
117
142
  /** Where it came from. */
@@ -145,11 +170,15 @@ export type IrDomain = ChartDomain;
145
170
  * render of every spectrum is a copy per frame for no gain.
146
171
  * @param spectrum - The spectrum.
147
172
  * @param mode - Which value axis is being drawn.
148
- * @returns The trace, sharing the spectrum's own arrays.
173
+ * @returns The trace, sharing the spectrum's own arrays, or `undefined` when the
174
+ * spectrum carries no such axis — a Raman spectrum has no absorbance.
149
175
  */
150
- export function traceOf(spectrum: IrSpectrum, mode: IrMode): IrTrace {
151
- return {
152
- x: spectrum.wavenumber,
153
- y: mode === 'absorbance' ? spectrum.absorbance : spectrum.transmittance,
154
- };
176
+ export function traceOf(
177
+ spectrum: IrSpectrum,
178
+ mode: IrMode,
179
+ ): IrTrace | undefined {
180
+ const values = spectrum[mode];
181
+ return values === undefined
182
+ ? undefined
183
+ : { x: spectrum.wavenumber, y: values };
155
184
  }
@@ -15,6 +15,8 @@
15
15
 
16
16
  import type { IrSidePanelId } from './irSidePanels.ts';
17
17
  import type { IrDomain, IrMode, IrSpectrum } from './irSpectrum.ts';
18
+ import type { IrTechnique } from './irTechnique.ts';
19
+ import { defaultIrMode, irModeFor, offersIrMode } from './irTechnique.ts';
18
20
  import type { PickBandsOptions } from './pickBands.ts';
19
21
 
20
22
  /** The document: what a file holds. */
@@ -48,7 +50,12 @@ export interface IrView {
48
50
 
49
51
  /** The workspace: how every spectrum is drawn, whichever ones are open. */
50
52
  export interface IrSettings {
51
- /** Which value axis the spectra are read in. */
53
+ /**
54
+ * What the spectra were measured with. Chosen when the viewer opens and fixed
55
+ * from then on: a change asking for another is ignored.
56
+ */
57
+ technique: IrTechnique;
58
+ /** Which value axis the spectra are read in, always one the technique offers. */
52
59
  mode: IrMode;
53
60
  /** Whether the bands are picked at all. */
54
61
  pickBands: boolean;
@@ -108,6 +115,7 @@ export const DEFAULT_PICKING: PickBandsOptions = {
108
115
 
109
116
  /** The workspace a fresh viewer starts from. */
110
117
  export const DEFAULT_SETTINGS: IrSettings = {
118
+ technique: 'infrared',
111
119
  mode: 'transmittance',
112
120
  pickBands: true,
113
121
  picking: DEFAULT_PICKING,
@@ -116,6 +124,57 @@ export const DEFAULT_SETTINGS: IrSettings = {
116
124
  assignmentTolerance: 5,
117
125
  };
118
126
 
127
+ /** What a viewer opens on. */
128
+ export interface CreateIrStateOptions {
129
+ /**
130
+ * The spectra to open on.
131
+ * @default []
132
+ */
133
+ spectra?: IrSpectrum[];
134
+ /**
135
+ * The workspace to open in. Its `technique` is fixed for the life of the
136
+ * viewer, and its `mode` falls back to the technique's first when the
137
+ * technique does not offer it.
138
+ * @default DEFAULT_SETTINGS
139
+ */
140
+ settings?: Partial<IrSettings>;
141
+ /**
142
+ * The panels open to begin with.
143
+ * @default DEFAULT_SIDE_PANELS
144
+ */
145
+ panelIds?: IrSidePanelId[];
146
+ }
147
+
148
+ /**
149
+ * The state a viewer opens with.
150
+ *
151
+ * The panel list is spread rather than stored by reference: a caller's array is
152
+ * the caller's to mutate, and a viewer holding it would find its open panels
153
+ * changing under it.
154
+ * @param options - What it opens on.
155
+ * @returns The state.
156
+ */
157
+ export function createIrState(options: CreateIrStateOptions = {}): IrState {
158
+ const { spectra = [], settings, panelIds } = options;
159
+ const technique = settings?.technique ?? DEFAULT_SETTINGS.technique;
160
+ const opened: IrSettings = {
161
+ ...DEFAULT_SETTINGS,
162
+ technique,
163
+ mode: defaultIrMode(technique),
164
+ };
165
+ return {
166
+ data: { spectra: [...spectra] },
167
+ view: {
168
+ selectedId: spectra[0]?.id ?? null,
169
+ domain: null,
170
+ tool: 'read',
171
+ openPanelIds: [...(panelIds ?? DEFAULT_SIDE_PANELS)],
172
+ error: null,
173
+ },
174
+ settings: mergeIrSettings(opened, settings),
175
+ };
176
+ }
177
+
119
178
  /**
120
179
  * Fold a change into the workspace, refusing what no chart survives.
121
180
  *
@@ -123,7 +182,9 @@ export const DEFAULT_SETTINGS: IrSettings = {
123
182
  * not yet a number — a lone minus sign, an empty box — and a limit of `NaN`
124
183
  * silently stops every label being drawn. So each is checked, and the current
125
184
  * value is kept where the new one is unusable rather than the field being
126
- * fought with while it is being typed in.
185
+ * fought with while it is being typed in. The technique is never changed, and a
186
+ * mode it does not offer is refused the same way: a Raman spectrum has no
187
+ * absorbance to draw.
127
188
  * @param current - The workspace in force.
128
189
  * @param change - What to change about it.
129
190
  * @returns The new workspace.
@@ -137,6 +198,10 @@ export function mergeIrSettings(
137
198
  return {
138
199
  ...current,
139
200
  ...change,
201
+ technique: current.technique,
202
+ mode: offersIrMode(current.technique, change.mode)
203
+ ? change.mode
204
+ : irModeFor(current.technique, current.mode),
140
205
  picking: { ...current.picking, ...change.picking },
141
206
  labelLimit: Number.isFinite(asked)
142
207
  ? Math.min(MAXIMUM_LABEL_LIMIT, Math.max(0, Math.round(asked)))
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Everything that differs between an infrared spectrum and a Raman one.
3
+ *
4
+ * Both are vibrational spectra over wavenumbers in cm⁻¹, and the viewer reads
5
+ * them the same way — one chart, one set of panels, one set of gestures — so
6
+ * what is left to differ is a handful of facts: which value axes a spectrum is
7
+ * read on, what the horizontal axis is called and which way it runs, whether the
8
+ * correlation table has anything to say about a band, and what a written file
9
+ * calls itself. They are gathered here for the reason `IR_MODE_RULES` gathers
10
+ * what differs between the value axes: a component that asked which technique
11
+ * it was drawing would be the first of many to ask, and they would come to
12
+ * disagree.
13
+ */
14
+
15
+ import type { IrMode } from './irSpectrum.ts';
16
+
17
+ /** What was measured: the light a sample absorbs, or the light it scatters. */
18
+ export type IrTechnique = 'infrared' | 'raman';
19
+
20
+ /** What is true of one technique. */
21
+ export interface IrTechniqueRules {
22
+ /** How it is written inside a sentence; a sentence opening on it capitalises it. */
23
+ name: string;
24
+ /** The value axes a spectrum is read on, in the order a control offers them. */
25
+ modes: readonly IrMode[];
26
+ /** What the horizontal axis is called. */
27
+ xTitle: string;
28
+ /** Whether the horizontal axis runs from high at the left to low at the right. */
29
+ reverseX: boolean;
30
+ /** Whether the correlation table is asked what a band might be. */
31
+ assignments: boolean;
32
+ /** The `##DATA TYPE=` a written spectrum states when its file stated none. */
33
+ dataType: string;
34
+ }
35
+
36
+ /** The techniques, in the order a control would offer them. */
37
+ export const IR_TECHNIQUES: readonly IrTechnique[] = ['infrared', 'raman'];
38
+
39
+ /** How each technique behaves, every fact in one place. */
40
+ export const IR_TECHNIQUE_RULES = {
41
+ infrared: {
42
+ name: 'infrared',
43
+ modes: ['transmittance', 'absorbance'],
44
+ xTitle: 'wavenumber (cm⁻¹)',
45
+ /**
46
+ * 4000 at the left and 400 at the right, which is how every infrared
47
+ * spectrum has been printed since the instruments scanned that way.
48
+ */
49
+ reverseX: true,
50
+ assignments: true,
51
+ dataType: 'INFRARED SPECTRUM',
52
+ },
53
+ raman: {
54
+ name: 'Raman',
55
+ /** One axis: a Raman spectrum is the light scattered, and nothing else. */
56
+ modes: ['intensity'],
57
+ xTitle: 'Raman shift (cm⁻¹)',
58
+ /** The shift grows away from the laser line, left to right. */
59
+ reverseX: false,
60
+ /**
61
+ * The table holds infrared group frequencies and infrared strengths. A
62
+ * vibration strong in one technique is often weak or silent in the other,
63
+ * so its candidates offered for a Raman band would claim what the table
64
+ * does not know.
65
+ */
66
+ assignments: false,
67
+ dataType: 'RAMAN SPECTRUM',
68
+ },
69
+ } as const satisfies Record<IrTechnique, IrTechniqueRules>;
70
+
71
+ /**
72
+ * The value axis a viewer of a technique opens on.
73
+ * @param technique - What was measured.
74
+ * @returns Its first mode.
75
+ */
76
+ export function defaultIrMode(technique: IrTechnique): IrMode {
77
+ return IR_TECHNIQUE_RULES[technique].modes[0];
78
+ }
79
+
80
+ /**
81
+ * Whether a technique reads its spectra on a value axis.
82
+ * @param technique - What was measured.
83
+ * @param mode - The axis asked about; `undefined` is offered by none.
84
+ * @returns Whether the technique offers it.
85
+ */
86
+ export function offersIrMode(
87
+ technique: IrTechnique,
88
+ mode: IrMode | undefined,
89
+ ): mode is IrMode {
90
+ if (mode === undefined) return false;
91
+ const modes: readonly IrMode[] = IR_TECHNIQUE_RULES[technique].modes;
92
+ return modes.includes(mode);
93
+ }
94
+
95
+ /**
96
+ * The value axis to read a technique's spectra on, given the one asked for.
97
+ * @param technique - What was measured.
98
+ * @param mode - The axis asked for, if any.
99
+ * @returns It when the technique offers it, the technique's first otherwise.
100
+ */
101
+ export function irModeFor(technique: IrTechnique, mode?: IrMode): IrMode {
102
+ return offersIrMode(technique, mode) ? mode : defaultIrMode(technique);
103
+ }
104
+
105
+ /**
106
+ * The technique that reads its spectra on a value axis.
107
+ *
108
+ * Every axis belongs to exactly one technique, so the axis a file was written
109
+ * on says what was measured.
110
+ * @param mode - The value axis.
111
+ * @returns The technique offering it.
112
+ */
113
+ export function irModeTechnique(mode: IrMode): IrTechnique {
114
+ return offersIrMode('raman', mode) ? 'raman' : 'infrared';
115
+ }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * The commands each technique's viewer offers.
3
+ *
4
+ * A Raman viewer offers the infrared table less the commands with nothing to
5
+ * act on — one value axis is nothing to toggle, and no assignment is nothing to
6
+ * name — and words the rest without the absorbance and transmittance it does
7
+ * not have. It is built from the infrared table, so a command added there
8
+ * reaches both.
9
+ */
10
+
11
+ import type { IrCommand, IrCommandId, IrCommandTable } from './irCommands.ts';
12
+ import { irCommands } from './irCommands.ts';
13
+ import type { IrTechnique } from './irTechnique.ts';
14
+ import { IR_TECHNIQUE_RULES } from './irTechnique.ts';
15
+
16
+ /**
17
+ * Whether a viewer of a technique offers a command at all.
18
+ * @param technique - What was measured.
19
+ * @param id - Which command.
20
+ * @returns False for the toggle of a technique with one value axis, and for
21
+ * the assignments of one the correlation table says nothing about.
22
+ */
23
+ export function irCommandOffered(
24
+ technique: IrTechnique,
25
+ id: IrCommandId,
26
+ ): boolean {
27
+ const { modes, assignments } = IR_TECHNIQUE_RULES[technique];
28
+ if (id === 'toggleMode') return modes.length > 1;
29
+ if (id === 'toggleAssignments') return assignments;
30
+ return true;
31
+ }
32
+
33
+ /**
34
+ * Everything a viewer of a technique offers, in the order it is reached for.
35
+ * @param technique - What was measured.
36
+ * @returns The table; for infrared, `irCommands` itself.
37
+ */
38
+ export function irCommandsFor(technique: IrTechnique): IrCommandTable {
39
+ return COMMAND_TABLES[technique];
40
+ }
41
+
42
+ /** Where the chart is, for a gesture made anywhere on it. */
43
+ const OVER_THE_CHART = 'Over the chart';
44
+
45
+ /** How a Raman viewer words the commands it shares with infrared. */
46
+ const RAMAN_WORDING: Partial<Record<IrCommandId, Partial<IrCommand>>> = {
47
+ about: { title: 'About the Raman viewer' },
48
+ documentation: {
49
+ description: 'How the bands are read, and every gesture.',
50
+ },
51
+ readTool: {
52
+ description:
53
+ 'A drag narrows the Raman shift axis. Released past the baseline, it takes the intensity axis with it.',
54
+ gestures: [{ title: OVER_THE_CHART, shortcuts: ['Drag'] }],
55
+ },
56
+ boxTool: {
57
+ description:
58
+ 'A drag zooms to exactly the rectangle it sweeps out, both axes at once — for looking into a baseline or a shoulder rather than across the spectrum.',
59
+ },
60
+ zoomIn: {
61
+ description:
62
+ 'Brings the weak bands up, scaling the intensity axis about zero.',
63
+ gestures: [{ title: OVER_THE_CHART, shortcuts: ['Scroll wheel'] }],
64
+ },
65
+ zoomOut: {
66
+ gestures: [{ title: OVER_THE_CHART, shortcuts: ['Scroll wheel'] }],
67
+ },
68
+ togglePicking: {
69
+ description:
70
+ 'Finds the bands of the selected spectrum, marks them on the chart and lists them.',
71
+ },
72
+ };
73
+
74
+ /** The command table of each technique. */
75
+ const COMMAND_TABLES: Record<IrTechnique, IrCommandTable> = {
76
+ infrared: irCommands,
77
+ raman: Object.fromEntries(
78
+ (Object.keys(irCommands) as IrCommandId[])
79
+ .filter((id) => irCommandOffered('raman', id))
80
+ .map((id) => [id, { ...irCommands[id], ...RAMAN_WORDING[id] }]),
81
+ ),
82
+ };