react-cheminfo 0.64.0 → 0.65.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 (640) hide show
  1. package/README.md +282 -0
  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/locales/de.json +37 -0
  132. package/lib/locales/en.json +37 -0
  133. package/lib/locales/es.json +37 -0
  134. package/lib/locales/fr.json +37 -0
  135. package/lib/locales/it.json +37 -0
  136. package/lib/molecule3d/core/highlight.d.ts.map +1 -1
  137. package/lib/molecule3d/core/highlight.js +2 -8
  138. package/lib/molecule3d/core/highlight.js.map +1 -1
  139. package/lib/molecule3d/core/index.d.ts +1 -1
  140. package/lib/molecule3d/core/index.d.ts.map +1 -1
  141. package/lib/molecule3d/core/index.js +1 -1
  142. package/lib/molecule3d/core/index.js.map +1 -1
  143. package/lib/molecule3d/core/measurement.d.ts +17 -0
  144. package/lib/molecule3d/core/measurement.d.ts.map +1 -1
  145. package/lib/molecule3d/core/measurement.js +43 -0
  146. package/lib/molecule3d/core/measurement.js.map +1 -1
  147. package/lib/molecule3d/ui/drawScene.d.ts +4 -2
  148. package/lib/molecule3d/ui/drawScene.d.ts.map +1 -1
  149. package/lib/molecule3d/ui/drawScene.js +1 -1
  150. package/lib/molecule3d/ui/drawScene.js.map +1 -1
  151. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +3 -1
  152. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
  153. package/lib/molecule3d/ui/sceneDrawer.d.ts +47 -0
  154. package/lib/molecule3d/ui/sceneDrawer.d.ts.map +1 -0
  155. package/lib/molecule3d/ui/sceneDrawer.js +103 -0
  156. package/lib/molecule3d/ui/sceneDrawer.js.map +1 -0
  157. package/lib/molecule3d/ui/useMoleculeScene.d.ts +2 -1
  158. package/lib/molecule3d/ui/useMoleculeScene.d.ts.map +1 -1
  159. package/lib/molecule3d/ui/useMoleculeScene.js +13 -22
  160. package/lib/molecule3d/ui/useMoleculeScene.js.map +1 -1
  161. package/lib/molecule3d/ui/useSharedCamera.d.ts +1 -3
  162. package/lib/molecule3d/ui/useSharedCamera.d.ts.map +1 -1
  163. package/lib/molecule3d/ui/useSharedCamera.js.map +1 -1
  164. package/lib/moleculesClient/core/index.d.ts +5 -0
  165. package/lib/moleculesClient/core/index.d.ts.map +1 -0
  166. package/lib/moleculesClient/core/index.js +3 -0
  167. package/lib/moleculesClient/core/index.js.map +1 -0
  168. package/lib/moleculesClient/core/moleculesClient.d.ts +12 -0
  169. package/lib/moleculesClient/core/moleculesClient.d.ts.map +1 -0
  170. package/lib/moleculesClient/core/moleculesClient.js +105 -0
  171. package/lib/moleculesClient/core/moleculesClient.js.map +1 -0
  172. package/lib/moleculesClient/core/moleculesClientApi.d.ts +100 -0
  173. package/lib/moleculesClient/core/moleculesClientApi.d.ts.map +1 -0
  174. package/lib/moleculesClient/core/moleculesClientApi.js +20 -0
  175. package/lib/moleculesClient/core/moleculesClientApi.js.map +1 -0
  176. package/lib/moleculesClient/core/moleculesTypes.d.ts +154 -0
  177. package/lib/moleculesClient/core/moleculesTypes.d.ts.map +1 -0
  178. package/lib/moleculesClient/core/moleculesTypes.js +2 -0
  179. package/lib/moleculesClient/core/moleculesTypes.js.map +1 -0
  180. package/lib/moleculesClient/core/requestRetry.d.ts +50 -0
  181. package/lib/moleculesClient/core/requestRetry.d.ts.map +1 -0
  182. package/lib/moleculesClient/core/requestRetry.js +108 -0
  183. package/lib/moleculesClient/core/requestRetry.js.map +1 -0
  184. package/lib/molstar/core/camera.d.ts +2 -1
  185. package/lib/molstar/core/camera.d.ts.map +1 -1
  186. package/lib/molstar/core/camera.js +3 -2
  187. package/lib/molstar/core/camera.js.map +1 -1
  188. package/lib/molstar/core/framing.d.ts +102 -0
  189. package/lib/molstar/core/framing.d.ts.map +1 -0
  190. package/lib/molstar/core/framing.js +120 -0
  191. package/lib/molstar/core/framing.js.map +1 -0
  192. package/lib/molstar/core/hover.d.ts +16 -0
  193. package/lib/molstar/core/hover.d.ts.map +1 -1
  194. package/lib/molstar/core/hover.js +14 -0
  195. package/lib/molstar/core/hover.js.map +1 -1
  196. package/lib/molstar/core/index.d.ts +4 -1
  197. package/lib/molstar/core/index.d.ts.map +1 -1
  198. package/lib/molstar/core/index.js +2 -1
  199. package/lib/molstar/core/index.js.map +1 -1
  200. package/lib/pedagogy/core/answers.d.ts +46 -0
  201. package/lib/pedagogy/core/answers.d.ts.map +1 -0
  202. package/lib/pedagogy/core/answers.js +77 -0
  203. package/lib/pedagogy/core/answers.js.map +1 -0
  204. package/lib/pedagogy/core/attempts.d.ts +86 -0
  205. package/lib/pedagogy/core/attempts.d.ts.map +1 -0
  206. package/lib/pedagogy/core/attempts.js +117 -0
  207. package/lib/pedagogy/core/attempts.js.map +1 -0
  208. package/lib/pedagogy/core/index.d.ts +8 -0
  209. package/lib/pedagogy/core/index.d.ts.map +1 -1
  210. package/lib/pedagogy/core/index.js +4 -0
  211. package/lib/pedagogy/core/index.js.map +1 -1
  212. package/lib/pedagogy/core/progressController.d.ts +64 -0
  213. package/lib/pedagogy/core/progressController.d.ts.map +1 -0
  214. package/lib/pedagogy/core/progressController.js +56 -0
  215. package/lib/pedagogy/core/progressController.js.map +1 -0
  216. package/lib/pedagogy/core/seed.d.ts +96 -0
  217. package/lib/pedagogy/core/seed.d.ts.map +1 -0
  218. package/lib/pedagogy/core/seed.js +128 -0
  219. package/lib/pedagogy/core/seed.js.map +1 -0
  220. package/lib/pedagogy/core/series.d.ts +77 -0
  221. package/lib/pedagogy/core/series.d.ts.map +1 -0
  222. package/lib/pedagogy/core/series.js +10 -0
  223. package/lib/pedagogy/core/series.js.map +1 -0
  224. package/lib/pedagogy/ui/AnswerFields.d.ts +21 -0
  225. package/lib/pedagogy/ui/AnswerFields.d.ts.map +1 -0
  226. package/lib/pedagogy/ui/AnswerFields.js +24 -0
  227. package/lib/pedagogy/ui/AnswerFields.js.map +1 -0
  228. package/lib/pedagogy/ui/ExerciseList.d.ts +82 -0
  229. package/lib/pedagogy/ui/ExerciseList.d.ts.map +1 -0
  230. package/lib/pedagogy/ui/ExerciseList.js +53 -0
  231. package/lib/pedagogy/ui/ExerciseList.js.map +1 -0
  232. package/lib/pedagogy/ui/ExerciseSeries.d.ts +95 -0
  233. package/lib/pedagogy/ui/ExerciseSeries.d.ts.map +1 -0
  234. package/lib/pedagogy/ui/ExerciseSeries.js +74 -0
  235. package/lib/pedagogy/ui/ExerciseSeries.js.map +1 -0
  236. package/lib/pedagogy/ui/QuestionCard.d.ts +64 -0
  237. package/lib/pedagogy/ui/QuestionCard.d.ts.map +1 -0
  238. package/lib/pedagogy/ui/QuestionCard.js +73 -0
  239. package/lib/pedagogy/ui/QuestionCard.js.map +1 -0
  240. package/lib/pedagogy/ui/index.d.ts +10 -0
  241. package/lib/pedagogy/ui/index.d.ts.map +1 -1
  242. package/lib/pedagogy/ui/index.js +6 -0
  243. package/lib/pedagogy/ui/index.js.map +1 -1
  244. package/lib/pedagogy/ui/seriesCounts.d.ts +17 -0
  245. package/lib/pedagogy/ui/seriesCounts.d.ts.map +1 -0
  246. package/lib/pedagogy/ui/seriesCounts.js +27 -0
  247. package/lib/pedagogy/ui/seriesCounts.js.map +1 -0
  248. package/lib/pedagogy/ui/seriesParts.d.ts +55 -0
  249. package/lib/pedagogy/ui/seriesParts.d.ts.map +1 -0
  250. package/lib/pedagogy/ui/seriesParts.js +38 -0
  251. package/lib/pedagogy/ui/seriesParts.js.map +1 -0
  252. package/lib/pedagogy/ui/useAttemptRecords.d.ts +10 -0
  253. package/lib/pedagogy/ui/useAttemptRecords.d.ts.map +1 -0
  254. package/lib/pedagogy/ui/useAttemptRecords.js +11 -0
  255. package/lib/pedagogy/ui/useAttemptRecords.js.map +1 -0
  256. package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
  257. package/lib/periodic/ui/PeriodicTable.js +6 -3
  258. package/lib/periodic/ui/PeriodicTable.js.map +1 -1
  259. package/lib/property/core/copyableText.d.ts +14 -0
  260. package/lib/property/core/copyableText.d.ts.map +1 -0
  261. package/lib/property/core/copyableText.js +21 -0
  262. package/lib/property/core/copyableText.js.map +1 -0
  263. package/lib/property/core/index.d.ts +2 -0
  264. package/lib/property/core/index.d.ts.map +1 -0
  265. package/lib/property/core/index.js +2 -0
  266. package/lib/property/core/index.js.map +1 -0
  267. package/lib/property/ui/PropertyTable.d.ts +43 -0
  268. package/lib/property/ui/PropertyTable.d.ts.map +1 -0
  269. package/lib/property/ui/PropertyTable.js +19 -0
  270. package/lib/property/ui/PropertyTable.js.map +1 -0
  271. package/lib/property/ui/index.d.ts +3 -0
  272. package/lib/property/ui/index.d.ts.map +1 -0
  273. package/lib/property/ui/index.js +2 -0
  274. package/lib/property/ui/index.js.map +1 -0
  275. package/lib/router/core/history.d.ts +24 -3
  276. package/lib/router/core/history.d.ts.map +1 -1
  277. package/lib/router/core/history.js +55 -7
  278. package/lib/router/core/history.js.map +1 -1
  279. package/lib/router/core/index.d.ts +3 -3
  280. package/lib/router/core/index.d.ts.map +1 -1
  281. package/lib/router/core/index.js +2 -2
  282. package/lib/router/core/index.js.map +1 -1
  283. package/lib/router/core/languageRoute.d.ts +61 -0
  284. package/lib/router/core/languageRoute.d.ts.map +1 -0
  285. package/lib/router/core/languageRoute.js +96 -0
  286. package/lib/router/core/languageRoute.js.map +1 -0
  287. package/lib/router/core/siteAddresses.d.ts +23 -0
  288. package/lib/router/core/siteAddresses.d.ts.map +1 -1
  289. package/lib/router/core/siteAddresses.js +26 -0
  290. package/lib/router/core/siteAddresses.js.map +1 -1
  291. package/lib/router/core/tabRouter.d.ts +2 -108
  292. package/lib/router/core/tabRouter.d.ts.map +1 -1
  293. package/lib/router/core/tabRouter.js +38 -5
  294. package/lib/router/core/tabRouter.js.map +1 -1
  295. package/lib/router/core/tabRouterTypes.d.ts +154 -0
  296. package/lib/router/core/tabRouterTypes.d.ts.map +1 -0
  297. package/lib/router/core/tabRouterTypes.js +2 -0
  298. package/lib/router/core/tabRouterTypes.js.map +1 -0
  299. package/lib/seo/core/fitDescription.d.ts +40 -0
  300. package/lib/seo/core/fitDescription.d.ts.map +1 -0
  301. package/lib/seo/core/fitDescription.js +45 -0
  302. package/lib/seo/core/fitDescription.js.map +1 -0
  303. package/lib/seo/core/index.d.ts +7 -0
  304. package/lib/seo/core/index.d.ts.map +1 -1
  305. package/lib/seo/core/index.js +4 -0
  306. package/lib/seo/core/index.js.map +1 -1
  307. package/lib/seo/core/limits.d.ts +24 -0
  308. package/lib/seo/core/limits.d.ts.map +1 -0
  309. package/lib/seo/core/limits.js +24 -0
  310. package/lib/seo/core/limits.js.map +1 -0
  311. package/lib/seo/core/pageContent.d.ts +25 -0
  312. package/lib/seo/core/pageContent.d.ts.map +1 -0
  313. package/lib/seo/core/pageContent.js +25 -0
  314. package/lib/seo/core/pageContent.js.map +1 -0
  315. package/lib/seo/core/plainDescription.d.ts.map +1 -1
  316. package/lib/seo/core/plainDescription.js +3 -2
  317. package/lib/seo/core/plainDescription.js.map +1 -1
  318. package/lib/seo/core/routeProblems.d.ts.map +1 -1
  319. package/lib/seo/core/routeProblems.js +1 -6
  320. package/lib/seo/core/routeProblems.js.map +1 -1
  321. package/lib/seo/core/routeTable.d.ts +31 -0
  322. package/lib/seo/core/routeTable.d.ts.map +1 -0
  323. package/lib/seo/core/routeTable.js +96 -0
  324. package/lib/seo/core/routeTable.js.map +1 -0
  325. package/lib/seo/vite/index.d.ts +2 -0
  326. package/lib/seo/vite/index.d.ts.map +1 -1
  327. package/lib/seo/vite/index.js +1 -0
  328. package/lib/seo/vite/index.js.map +1 -1
  329. package/lib/seo/vite/prerender.d.ts +10 -0
  330. package/lib/seo/vite/prerender.d.ts.map +1 -1
  331. package/lib/seo/vite/prerender.js +12 -1
  332. package/lib/seo/vite/prerender.js.map +1 -1
  333. package/lib/seo/vite/routeTable.d.ts +40 -0
  334. package/lib/seo/vite/routeTable.d.ts.map +1 -0
  335. package/lib/seo/vite/routeTable.js +44 -0
  336. package/lib/seo/vite/routeTable.js.map +1 -0
  337. package/lib/server/answerAddresses.d.ts +51 -0
  338. package/lib/server/answerAddresses.d.ts.map +1 -0
  339. package/lib/server/answerAddresses.js +72 -0
  340. package/lib/server/answerAddresses.js.map +1 -0
  341. package/lib/server/cardMeta.d.ts +57 -0
  342. package/lib/server/cardMeta.d.ts.map +1 -0
  343. package/lib/server/cardMeta.js +52 -0
  344. package/lib/server/cardMeta.js.map +1 -0
  345. package/lib/server/config.d.ts +72 -0
  346. package/lib/server/config.d.ts.map +1 -0
  347. package/lib/server/config.js +67 -0
  348. package/lib/server/config.js.map +1 -0
  349. package/lib/server/envNumber.d.ts +35 -0
  350. package/lib/server/envNumber.d.ts.map +1 -0
  351. package/lib/server/envNumber.js +42 -0
  352. package/lib/server/envNumber.js.map +1 -0
  353. package/lib/server/healthRoute.d.ts +26 -0
  354. package/lib/server/healthRoute.d.ts.map +1 -0
  355. package/lib/server/healthRoute.js +22 -0
  356. package/lib/server/healthRoute.js.map +1 -0
  357. package/lib/server/listenSite.d.ts +38 -0
  358. package/lib/server/listenSite.d.ts.map +1 -0
  359. package/lib/server/listenSite.js +60 -0
  360. package/lib/server/listenSite.js.map +1 -0
  361. package/lib/server/mcpServer.d.ts +8 -0
  362. package/lib/server/mcpServer.d.ts.map +1 -0
  363. package/lib/server/mcpServer.js +11 -0
  364. package/lib/server/mcpServer.js.map +1 -0
  365. package/lib/server/repositoryVersion.d.ts +16 -0
  366. package/lib/server/repositoryVersion.d.ts.map +1 -0
  367. package/lib/server/repositoryVersion.js +33 -0
  368. package/lib/server/repositoryVersion.js.map +1 -0
  369. package/lib/server/routeOptions.d.ts +23 -0
  370. package/lib/server/routeOptions.d.ts.map +1 -0
  371. package/lib/server/routeOptions.js +20 -0
  372. package/lib/server/routeOptions.js.map +1 -0
  373. package/lib/server/routeTable.d.ts +14 -0
  374. package/lib/server/routeTable.d.ts.map +1 -0
  375. package/lib/server/routeTable.js +32 -0
  376. package/lib/server/routeTable.js.map +1 -0
  377. package/lib/server/siteView.d.ts +29 -0
  378. package/lib/server/siteView.d.ts.map +1 -0
  379. package/lib/server/siteView.js +21 -0
  380. package/lib/server/siteView.js.map +1 -0
  381. package/lib/server/spaPages.d.ts +32 -0
  382. package/lib/server/spaPages.d.ts.map +1 -0
  383. package/lib/server/spaPages.js +126 -0
  384. package/lib/server/spaPages.js.map +1 -0
  385. package/lib/server/spaSite.d.ts +30 -0
  386. package/lib/server/spaSite.d.ts.map +1 -0
  387. package/lib/server/spaSite.js +170 -0
  388. package/lib/server/spaSite.js.map +1 -0
  389. package/lib/server/spaSiteOptions.d.ts +126 -0
  390. package/lib/server/spaSiteOptions.d.ts.map +1 -0
  391. package/lib/server/spaSiteOptions.js +2 -0
  392. package/lib/server/spaSiteOptions.js.map +1 -0
  393. package/lib/server/staticSite.d.ts +9 -0
  394. package/lib/server/staticSite.d.ts.map +1 -1
  395. package/lib/server/staticSite.js +41 -19
  396. package/lib/server/staticSite.js.map +1 -1
  397. package/lib/server/toolSiteServer.d.ts +77 -0
  398. package/lib/server/toolSiteServer.d.ts.map +1 -0
  399. package/lib/server/toolSiteServer.js +58 -0
  400. package/lib/server/toolSiteServer.js.map +1 -0
  401. package/lib/server/trustProxy.d.ts +20 -0
  402. package/lib/server/trustProxy.d.ts.map +1 -0
  403. package/lib/server/trustProxy.js +32 -0
  404. package/lib/server/trustProxy.js.map +1 -0
  405. package/lib/server/types.d.ts +13 -0
  406. package/lib/server/types.d.ts.map +1 -0
  407. package/lib/server/types.js +2 -0
  408. package/lib/server/types.js.map +1 -0
  409. package/lib/server.d.ts +22 -0
  410. package/lib/server.d.ts.map +1 -1
  411. package/lib/server.js +12 -0
  412. package/lib/server.js.map +1 -1
  413. package/lib/share/core/config.d.ts +18 -0
  414. package/lib/share/core/config.d.ts.map +1 -1
  415. package/lib/share/core/config.js +33 -2
  416. package/lib/share/core/config.js.map +1 -1
  417. package/lib/share/core/index.d.ts +3 -1
  418. package/lib/share/core/index.d.ts.map +1 -1
  419. package/lib/share/core/index.js +2 -1
  420. package/lib/share/core/index.js.map +1 -1
  421. package/lib/share/core/keySetParam.d.ts +40 -0
  422. package/lib/share/core/keySetParam.d.ts.map +1 -0
  423. package/lib/share/core/keySetParam.js +60 -0
  424. package/lib/share/core/keySetParam.js.map +1 -0
  425. package/lib/share/core/vocabulary.d.ts +8 -0
  426. package/lib/share/core/vocabulary.d.ts.map +1 -1
  427. package/lib/shell/ui/ShareControl.d.ts +75 -0
  428. package/lib/shell/ui/ShareControl.d.ts.map +1 -0
  429. package/lib/shell/ui/ShareControl.js +40 -0
  430. package/lib/shell/ui/ShareControl.js.map +1 -0
  431. package/lib/shell/ui/ShellFrame.d.ts +14 -0
  432. package/lib/shell/ui/ShellFrame.d.ts.map +1 -0
  433. package/lib/shell/ui/ShellFrame.js +45 -0
  434. package/lib/shell/ui/ShellFrame.js.map +1 -0
  435. package/lib/shell/ui/SiteShell.d.ts +251 -0
  436. package/lib/shell/ui/SiteShell.d.ts.map +1 -0
  437. package/lib/shell/ui/SiteShell.js +39 -0
  438. package/lib/shell/ui/SiteShell.js.map +1 -0
  439. package/lib/shell/ui/index.d.ts +5 -0
  440. package/lib/shell/ui/index.d.ts.map +1 -0
  441. package/lib/shell/ui/index.js +3 -0
  442. package/lib/shell/ui/index.js.map +1 -0
  443. package/lib/state/core/index.d.ts +1 -0
  444. package/lib/state/core/index.d.ts.map +1 -1
  445. package/lib/state/core/index.js.map +1 -1
  446. package/lib/state/core/legacyEntries.d.ts +30 -0
  447. package/lib/state/core/legacyEntries.d.ts.map +1 -0
  448. package/lib/state/core/legacyEntries.js +51 -0
  449. package/lib/state/core/legacyEntries.js.map +1 -0
  450. package/lib/state/core/persistBucket.d.ts +26 -2
  451. package/lib/state/core/persistBucket.d.ts.map +1 -1
  452. package/lib/state/core/persistBucket.js +26 -9
  453. package/lib/state/core/persistBucket.js.map +1 -1
  454. package/lib/state/core/persistSignalBucket.d.ts +26 -0
  455. package/lib/state/core/persistSignalBucket.d.ts.map +1 -1
  456. package/lib/state/core/persistSignalBucket.js +31 -0
  457. package/lib/state/core/persistSignalBucket.js.map +1 -1
  458. package/lib/state/core/storageEntry.d.ts +15 -0
  459. package/lib/state/core/storageEntry.d.ts.map +1 -1
  460. package/lib/state/core/storageEntry.js +33 -0
  461. package/lib/state/core/storageEntry.js.map +1 -1
  462. package/lib/structure/ui/StructureExportButton.d.ts +27 -0
  463. package/lib/structure/ui/StructureExportButton.d.ts.map +1 -0
  464. package/lib/structure/ui/StructureExportButton.js +21 -0
  465. package/lib/structure/ui/StructureExportButton.js.map +1 -0
  466. package/lib/structure/ui/index.d.ts +4 -0
  467. package/lib/structure/ui/index.d.ts.map +1 -1
  468. package/lib/structure/ui/index.js +2 -0
  469. package/lib/structure/ui/index.js.map +1 -1
  470. package/lib/structure/ui/useStructureDraft.d.ts +32 -0
  471. package/lib/structure/ui/useStructureDraft.d.ts.map +1 -0
  472. package/lib/structure/ui/useStructureDraft.js +20 -0
  473. package/lib/structure/ui/useStructureDraft.js.map +1 -0
  474. package/lib/ui.d.ts +2 -0
  475. package/lib/ui.d.ts.map +1 -1
  476. package/lib/ui.js +2 -0
  477. package/lib/ui.js.map +1 -1
  478. package/lib/worker/core/index.d.ts +1 -1
  479. package/lib/worker/core/index.d.ts.map +1 -1
  480. package/lib/worker/core/messages.d.ts +4 -2
  481. package/lib/worker/core/messages.d.ts.map +1 -1
  482. package/lib/worker/core/messages.js.map +1 -1
  483. package/lib/worker/core/oclResourcesUrl.d.ts +16 -0
  484. package/lib/worker/core/oclResourcesUrl.d.ts.map +1 -0
  485. package/lib/worker/core/oclResourcesUrl.js +19 -0
  486. package/lib/worker/core/oclResourcesUrl.js.map +1 -0
  487. package/lib/worker/core/serveWorkerRequests.d.ts +8 -0
  488. package/lib/worker/core/serveWorkerRequests.d.ts.map +1 -1
  489. package/lib/worker/core/serveWorkerRequests.js +15 -2
  490. package/lib/worker/core/serveWorkerRequests.js.map +1 -1
  491. package/lib/worker/core/workerChannel.d.ts +3 -4
  492. package/lib/worker/core/workerChannel.d.ts.map +1 -1
  493. package/lib/worker/core/workerChannel.js +72 -67
  494. package/lib/worker/core/workerChannel.js.map +1 -1
  495. package/lib/worker/core/workerChannelParts.d.ts +17 -6
  496. package/lib/worker/core/workerChannelParts.d.ts.map +1 -1
  497. package/lib/worker/core/workerChannelParts.js +20 -4
  498. package/lib/worker/core/workerChannelParts.js.map +1 -1
  499. package/lib/worker/core/workerChannelTypes.d.ts +46 -2
  500. package/lib/worker/core/workerChannelTypes.d.ts.map +1 -1
  501. package/lib/worker/core/workerSlot.d.ts +66 -0
  502. package/lib/worker/core/workerSlot.d.ts.map +1 -0
  503. package/lib/worker/core/workerSlot.js +107 -0
  504. package/lib/worker/core/workerSlot.js.map +1 -0
  505. package/package.json +16 -1
  506. package/src/card/core/cardAddress.ts +100 -0
  507. package/src/card/core/cardPageUrl.ts +97 -0
  508. package/src/card/core/index.ts +6 -0
  509. package/src/card/core/panelRoom.ts +66 -0
  510. package/src/card/ui/CardDetailsButton.tsx +104 -0
  511. package/src/card/ui/CardFigure.tsx +86 -0
  512. package/src/card/ui/CardFrame.tsx +46 -0
  513. package/src/card/ui/CopyTableButton.tsx +81 -0
  514. package/src/card/ui/cardTooltip.ts +18 -0
  515. package/src/card/ui/embed.ts +27 -0
  516. package/src/card/ui/fitCardToFrame.ts +76 -0
  517. package/src/card/ui/holdRoomForPanels.ts +83 -0
  518. package/src/card/ui/index.ts +14 -0
  519. package/src/card/ui/openPanels.ts +106 -0
  520. package/src/card.ts +13 -0
  521. package/src/conformers.ts +4 -0
  522. package/src/core.ts +5 -0
  523. package/src/fetch/core/apiError.ts +65 -0
  524. package/src/fetch/core/fetchJson.ts +129 -0
  525. package/src/fetch/core/index.ts +4 -0
  526. package/src/formula/core/formulaText.ts +96 -0
  527. package/src/formula/core/index.ts +20 -0
  528. package/src/formula/core/normalizeFormula.ts +50 -0
  529. package/src/formula/core/readFormula.ts +211 -0
  530. package/src/formula/ui/CopyableFormula.tsx +51 -0
  531. package/src/formula/ui/FormulaInput.tsx +50 -0
  532. package/src/formula/ui/QuestionFormula.tsx +20 -0
  533. package/src/formula/ui/index.ts +6 -0
  534. package/src/formula.ts +11 -0
  535. package/src/hooks/ui/index.ts +1 -0
  536. package/src/hooks/ui/keyTargets.ts +5 -3
  537. package/src/hooks/ui/useAsync.ts +50 -14
  538. package/src/locales/de.json +37 -0
  539. package/src/locales/en.json +37 -0
  540. package/src/locales/es.json +37 -0
  541. package/src/locales/fr.json +37 -0
  542. package/src/locales/it.json +37 -0
  543. package/src/molecule3d/core/highlight.ts +2 -8
  544. package/src/molecule3d/core/index.ts +1 -0
  545. package/src/molecule3d/core/measurement.ts +47 -0
  546. package/src/molecule3d/ui/drawScene.ts +13 -2
  547. package/src/molecule3d/ui/moleculeViewer3DProps.ts +3 -1
  548. package/src/molecule3d/ui/sceneDrawer.ts +132 -0
  549. package/src/molecule3d/ui/useMoleculeScene.ts +16 -26
  550. package/src/molecule3d/ui/useSharedCamera.ts +1 -3
  551. package/src/moleculesClient/core/index.ts +19 -0
  552. package/src/moleculesClient/core/moleculesClient.ts +175 -0
  553. package/src/moleculesClient/core/moleculesClientApi.ts +120 -0
  554. package/src/moleculesClient/core/moleculesTypes.ts +163 -0
  555. package/src/moleculesClient/core/requestRetry.ts +118 -0
  556. package/src/molstar/core/camera.ts +3 -2
  557. package/src/molstar/core/framing.ts +200 -0
  558. package/src/molstar/core/hover.ts +26 -0
  559. package/src/molstar/core/index.ts +21 -1
  560. package/src/pedagogy/core/answers.ts +94 -0
  561. package/src/pedagogy/core/attempts.ts +205 -0
  562. package/src/pedagogy/core/index.ts +36 -0
  563. package/src/pedagogy/core/progressController.ts +116 -0
  564. package/src/pedagogy/core/seed.ts +177 -0
  565. package/src/pedagogy/core/series.ts +82 -0
  566. package/src/pedagogy/ui/AnswerFields.tsx +63 -0
  567. package/src/pedagogy/ui/ExerciseList.tsx +202 -0
  568. package/src/pedagogy/ui/ExerciseSeries.tsx +250 -0
  569. package/src/pedagogy/ui/QuestionCard.tsx +231 -0
  570. package/src/pedagogy/ui/index.ts +18 -0
  571. package/src/pedagogy/ui/seriesCounts.ts +34 -0
  572. package/src/pedagogy/ui/seriesParts.tsx +127 -0
  573. package/src/pedagogy/ui/useAttemptRecords.ts +16 -0
  574. package/src/periodic/ui/PeriodicTable.tsx +6 -3
  575. package/src/property/core/copyableText.ts +20 -0
  576. package/src/property/core/index.ts +1 -0
  577. package/src/property/ui/PropertyTable.tsx +83 -0
  578. package/src/property/ui/index.ts +2 -0
  579. package/src/router/core/history.ts +61 -7
  580. package/src/router/core/index.ts +3 -2
  581. package/src/router/core/languageRoute.ts +136 -0
  582. package/src/router/core/siteAddresses.ts +38 -0
  583. package/src/router/core/tabRouter.ts +59 -117
  584. package/src/router/core/tabRouterTypes.ts +158 -0
  585. package/src/seo/core/fitDescription.ts +74 -0
  586. package/src/seo/core/index.ts +17 -0
  587. package/src/seo/core/limits.ts +27 -0
  588. package/src/seo/core/pageContent.ts +42 -0
  589. package/src/seo/core/plainDescription.ts +4 -2
  590. package/src/seo/core/routeProblems.ts +1 -7
  591. package/src/seo/core/routeTable.ts +103 -0
  592. package/src/seo/vite/index.ts +2 -0
  593. package/src/seo/vite/prerender.ts +26 -1
  594. package/src/seo/vite/routeTable.ts +79 -0
  595. package/src/server/answerAddresses.ts +92 -0
  596. package/src/server/cardMeta.ts +88 -0
  597. package/src/server/config.ts +125 -0
  598. package/src/server/envNumber.ts +65 -0
  599. package/src/server/healthRoute.ts +42 -0
  600. package/src/server/listenSite.ts +90 -0
  601. package/src/server/mcpServer.ts +14 -0
  602. package/src/server/repositoryVersion.ts +33 -0
  603. package/src/server/routeOptions.ts +26 -0
  604. package/src/server/routeTable.ts +35 -0
  605. package/src/server/siteView.ts +42 -0
  606. package/src/server/spaPages.ts +179 -0
  607. package/src/server/spaSite.ts +216 -0
  608. package/src/server/spaSiteOptions.ts +133 -0
  609. package/src/server/staticSite.ts +65 -35
  610. package/src/server/toolSiteServer.ts +127 -0
  611. package/src/server/trustProxy.ts +32 -0
  612. package/src/server/types.ts +25 -0
  613. package/src/server.ts +40 -0
  614. package/src/share/core/config.ts +45 -2
  615. package/src/share/core/index.ts +4 -0
  616. package/src/share/core/keySetParam.ts +92 -0
  617. package/src/share/core/vocabulary.ts +8 -0
  618. package/src/shell/ui/ShareControl.tsx +150 -0
  619. package/src/shell/ui/ShellFrame.tsx +180 -0
  620. package/src/shell/ui/SiteShell.tsx +297 -0
  621. package/src/shell/ui/index.ts +9 -0
  622. package/src/state/core/index.ts +1 -0
  623. package/src/state/core/legacyEntries.ts +76 -0
  624. package/src/state/core/persistBucket.ts +50 -10
  625. package/src/state/core/persistSignalBucket.ts +52 -0
  626. package/src/state/core/storageEntry.ts +32 -0
  627. package/src/structure/ui/StructureExportButton.tsx +57 -0
  628. package/src/structure/ui/index.ts +4 -0
  629. package/src/structure/ui/useStructureDraft.ts +47 -0
  630. package/src/ui.ts +2 -0
  631. package/src/worker/core/index.ts +1 -0
  632. package/src/worker/core/messages.ts +4 -3
  633. package/src/worker/core/oclResourcesUrl.ts +21 -0
  634. package/src/worker/core/serveWorkerRequests.ts +30 -2
  635. package/src/worker/core/workerChannel.ts +74 -74
  636. package/src/worker/core/workerChannelParts.ts +33 -13
  637. package/src/worker/core/workerChannelTypes.ts +47 -2
  638. package/src/worker/core/workerSlot.ts +181 -0
  639. package/styles/card.css +145 -0
  640. package/styles/chrome.css +248 -0
@@ -0,0 +1,21 @@
1
+ import { viewOrigins } from "./answerAddresses.js";
2
+ import { mcpServer } from "./mcpServer.js";
3
+ /**
4
+ * The MCP App showing an answer on the site's own page: inline the answer's
5
+ * card, the page itself over the full screen, framed from this server or from
6
+ * the static site. One per tool server, named by every tool whose answer
7
+ * carries a `meta` from `cardMeta` or `pageAnswer`.
8
+ * @param options - Its address, its name, and the two addresses it frames.
9
+ * @returns The resource, for `createToolRoutes({ resources })`.
10
+ */
11
+ export function siteView(options) {
12
+ const { uri, name, description, addresses, height } = options;
13
+ return mcpServer().embedView({
14
+ uri,
15
+ name,
16
+ description,
17
+ origins: viewOrigins(addresses),
18
+ height,
19
+ });
20
+ }
21
+ //# sourceMappingURL=siteView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"siteView.js","sourceRoot":"","sources":["../../src/server/siteView.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoB3C;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAwB;IAC/C,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC9D,OAAO,SAAS,EAAE,CAAC,SAAS,CAAC;QAC3B,GAAG;QACH,IAAI;QACJ,WAAW;QACX,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC;QAC/B,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { RouteMeta } from '../seo/core/routes.ts';
2
+ import type { SpaSiteOptions } from './spaSiteOptions.ts';
3
+ /** The page an address is answered with. */
4
+ export interface SpaAnswer {
5
+ /** The page, its head and its crawl path written for the address. */
6
+ html: string;
7
+ /** Whether the app routes the address, rather than drawing its "not found". */
8
+ known: boolean;
9
+ }
10
+ /** Writes the page every address of a single-page app is answered with. */
11
+ export interface SpaPages {
12
+ /**
13
+ * The page for one address.
14
+ * @param url - The address asked for, query string included.
15
+ * @param origin - Where the site is served, mount path included.
16
+ * @returns The page, and whether the app routes the address.
17
+ */
18
+ answer: (url: string, origin: string) => Promise<SpaAnswer>;
19
+ }
20
+ /**
21
+ * Prepare the pages of a single-page app from its built template: the snippet
22
+ * is put in once, the crawl path is written once per page and kept, and the
23
+ * head — which names the origin the request arrived on — per request.
24
+ * @param template - The built `index.html`.
25
+ * @param routes - Every address the app routes itself.
26
+ * @param options - The site, and how its pages are written.
27
+ * @returns The page writer.
28
+ * @throws {Error} When an indexed site's template carries no head or body
29
+ * marker, rather than failing on every request afterwards.
30
+ */
31
+ export declare function createSpaPages(template: string, routes: readonly RouteMeta[], options: SpaSiteOptions): SpaPages;
32
+ //# sourceMappingURL=spaPages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaPages.d.ts","sourceRoot":"","sources":["../../src/server/spaPages.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,2EAA2E;AAC3E,MAAM,WAAW,QAAQ;IACvB;;;;;OAKG;IACH,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;CAC7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,OAAO,EAAE,cAAc,GACtB,QAAQ,CA2DV"}
@@ -0,0 +1,126 @@
1
+ import { withoutQueryOrFragment } from "../router/core/address.js";
2
+ import { stripBasePath } from "../router/core/basePath.js";
3
+ import { noscriptIndex } from "../seo/core/noscript.js";
4
+ import { pageHeadTags } from "../seo/core/pageMeta.js";
5
+ import { pageMetaFor, routeFor } from "../seo/core/routes.js";
6
+ import { mountPathOf, resolveSite } from "../seo/core/siteFiles.js";
7
+ import { structuredDataScript } from "../seo/core/structuredData.js";
8
+ import { PAGE_BODY_MARKER, PAGE_HEAD_MARKER, fill, } from "../seo/core/template.js";
9
+ import { injectTrackingScript } from "../seo/core/trackingScript.js";
10
+ /**
11
+ * Prepare the pages of a single-page app from its built template: the snippet
12
+ * is put in once, the crawl path is written once per page and kept, and the
13
+ * head — which names the origin the request arrived on — per request.
14
+ * @param template - The built `index.html`.
15
+ * @param routes - Every address the app routes itself.
16
+ * @param options - The site, and how its pages are written.
17
+ * @returns The page writer.
18
+ * @throws {Error} When an indexed site's template carries no head or body
19
+ * marker, rather than failing on every request afterwards.
20
+ */
21
+ export function createSpaPages(template, routes, options) {
22
+ const site = resolveSite(options.site);
23
+ const indexed = options.indexed ?? true;
24
+ const page = injectTrackingScript(template, options.trackingScript);
25
+ if (indexed) {
26
+ for (const marker of [PAGE_HEAD_MARKER, PAGE_BODY_MARKER]) {
27
+ if (!page.includes(marker)) {
28
+ throw new Error(`the page carries no ${marker}`);
29
+ }
30
+ }
31
+ }
32
+ const write = indexed ? fill : fillIfPresent;
33
+ const bodyFor = keptBodies(options.maxCachedPages ?? 2000);
34
+ const crawled = options.noscript?.routes ?? indexedRoutes(routes);
35
+ const structured = structuredData(routes, options);
36
+ return {
37
+ async answer(url, origin) {
38
+ const mount = mountPathOf({ site, origin });
39
+ const named = await options.page?.(url);
40
+ const meta = named?.meta ?? pageMetaFor(routes, url, mount);
41
+ const content = named?.content ?? {
42
+ heading: meta.title,
43
+ paragraphs: [meta.description],
44
+ };
45
+ const body = bodyFor(meta.path, `${mount}\n${JSON.stringify(content)}`, () => write(page, PAGE_BODY_MARKER, noscriptIndex({
46
+ ...options.noscript,
47
+ site,
48
+ origin,
49
+ routes: crawled,
50
+ content,
51
+ })));
52
+ const served = indexed ? meta : { ...meta, indexed: false };
53
+ const tags = pageHeadTags({
54
+ site,
55
+ routes: [served],
56
+ origin,
57
+ url: served.path,
58
+ image: options.image,
59
+ });
60
+ const script = indexed ? structured(origin) : undefined;
61
+ const head = script === undefined ? tags : `${tags}\n${script}`;
62
+ return {
63
+ html: write(body, PAGE_HEAD_MARKER, head),
64
+ known: named !== undefined ||
65
+ isKnown(routes, url, mount, options.knownRoute),
66
+ };
67
+ },
68
+ };
69
+ }
70
+ function indexedRoutes(routes) {
71
+ return routes.filter((route) => route.indexed !== false);
72
+ }
73
+ function isKnown(routes, url, mount, knownRoute) {
74
+ const path = withoutQueryOrFragment(url);
75
+ const own = stripBasePath(mount, path);
76
+ if (knownRoute !== undefined)
77
+ return knownRoute(own);
78
+ return (routeFor(routes, own) !== undefined || routeFor(routes, path) !== undefined);
79
+ }
80
+ // The block is the same on every page of an origin, so the one origin a
81
+ // configured site is served at is written once rather than per request.
82
+ function structuredData(routes, options) {
83
+ const option = options.structuredData ?? {};
84
+ if (option === false)
85
+ return () => undefined;
86
+ if (typeof option === 'function')
87
+ return option;
88
+ let last;
89
+ return (origin) => {
90
+ if (last?.origin !== origin) {
91
+ const script = structuredDataScript({
92
+ ...option,
93
+ site: options.site,
94
+ routes,
95
+ origin,
96
+ });
97
+ last = { origin, script };
98
+ }
99
+ return last.script;
100
+ };
101
+ }
102
+ // The crawl path of a page is kept under its canonical path, and rebuilt when
103
+ // what the page says changes — a course renamed, a compound read again.
104
+ function keptBodies(limit) {
105
+ const kept = new Map();
106
+ return (path, key, build) => {
107
+ const entry = kept.get(path);
108
+ if (entry?.key === key)
109
+ return entry.html;
110
+ const html = build();
111
+ if (limit <= 0)
112
+ return html;
113
+ kept.delete(path);
114
+ if (kept.size >= limit) {
115
+ const oldest = kept.keys().next();
116
+ if (oldest.done !== true)
117
+ kept.delete(oldest.value);
118
+ }
119
+ kept.set(path, { key, html });
120
+ return html;
121
+ };
122
+ }
123
+ function fillIfPresent(html, marker, content) {
124
+ return html.includes(marker) ? fill(html, marker, content) : html;
125
+ }
126
+ //# sourceMappingURL=spaPages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaPages.js","sourceRoot":"","sources":["../../src/server/spaPages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,IAAI,GACL,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAuBrE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAgB,EAChB,MAA4B,EAC5B,OAAuB;IAEvB,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC;IACxC,MAAM,IAAI,GAAG,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc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I,CAAC;QAC1C,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC;QACrB,IAAI,KAAK,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;YAClC,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;gBAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,MAAc,EAAE,OAAe;IAClE,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { FastifyInstance } from 'fastify';
2
+ import type { SpaSiteOptions } from './spaSiteOptions.ts';
3
+ /**
4
+ * Serve a single-page app from the backend that answers its API.
5
+ *
6
+ * Every address the app routes itself is the built page, with the head of that
7
+ * address — its title, description, canonical and card — and a crawl path of
8
+ * its own in its body, so a crawler that runs no script still tells the pages
9
+ * apart. The `TRACKING_SCRIPT` snippet is in every page. `sitemap.xml` and
10
+ * `robots.txt` are written from the route table, at the address the site is
11
+ * served at; the files of the build are served as they are, `assets/` kept for
12
+ * a year; an address under `reserved` is the API's own 404; and `/health`
13
+ * answers the deploy script.
14
+ *
15
+ * await app.register(spaSite, {
16
+ * root: 'frontend/dist',
17
+ * site: 'derepflow',
18
+ * siteUrl: process.env.SITE_URL,
19
+ * trackingScript: process.env.TRACKING_SCRIPT,
20
+ * });
21
+ *
22
+ * Without a build — a server started before the frontend was built — it logs
23
+ * it and serves the API alone.
24
+ * @param fastify - The server.
25
+ * @param options - The build, the site, and how its pages are written.
26
+ * @throws {Error} When `siteUrl` is not an absolute address, or the page of an
27
+ * indexed site carries no `<!--cheminfo:head-->` or `<!--cheminfo:body-->`.
28
+ */
29
+ export declare function spaSite(fastify: FastifyInstance, options: SpaSiteOptions): Promise<void>;
30
+ //# sourceMappingURL=spaSite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaSite.d.ts","sourceRoot":"","sources":["../../src/server/spaSite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAkB7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAW1D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,OAAO,CAC3B,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC,CAmFf"}
@@ -0,0 +1,170 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { join, relative, resolve, sep } from 'node:path';
3
+ import { robotsTxt } from "../seo/core/robots.js";
4
+ import { originOf, resolveSite, sitemapXml } from "../seo/core/siteFiles.js";
5
+ import { healthRoute } from "./healthRoute.js";
6
+ import { BUNDLE_CACHE, DEFAULT_RESERVED, HIDDEN, PAGE_CACHE, } from "./routeOptions.js";
7
+ import { readRouteTable } from "./routeTable.js";
8
+ import { isHashedBundle, listSiteFiles } from "./siteFiles.js";
9
+ import { createSpaPages } from "./spaPages.js";
10
+ /** The page the build wrote, which is a template and never served as it is. */
11
+ const INDEX = 'index.html';
12
+ /** What keeps a page out of the index without stopping its crawl. */
13
+ const NO_INDEX = 'noindex, nofollow';
14
+ /** The policy of a site nobody is meant to find. */
15
+ const DISALLOW_ALL = 'User-agent: *\nDisallow: /\n';
16
+ /**
17
+ * Serve a single-page app from the backend that answers its API.
18
+ *
19
+ * Every address the app routes itself is the built page, with the head of that
20
+ * address — its title, description, canonical and card — and a crawl path of
21
+ * its own in its body, so a crawler that runs no script still tells the pages
22
+ * apart. The `TRACKING_SCRIPT` snippet is in every page. `sitemap.xml` and
23
+ * `robots.txt` are written from the route table, at the address the site is
24
+ * served at; the files of the build are served as they are, `assets/` kept for
25
+ * a year; an address under `reserved` is the API's own 404; and `/health`
26
+ * answers the deploy script.
27
+ *
28
+ * await app.register(spaSite, {
29
+ * root: 'frontend/dist',
30
+ * site: 'derepflow',
31
+ * siteUrl: process.env.SITE_URL,
32
+ * trackingScript: process.env.TRACKING_SCRIPT,
33
+ * });
34
+ *
35
+ * Without a build — a server started before the frontend was built — it logs
36
+ * it and serves the API alone.
37
+ * @param fastify - The server.
38
+ * @param options - The build, the site, and how its pages are written.
39
+ * @throws {Error} When `siteUrl` is not an absolute address, or the page of an
40
+ * indexed site carries no `<!--cheminfo:head-->` or `<!--cheminfo:body-->`.
41
+ */
42
+ export async function spaSite(fastify, options) {
43
+ const { health = true, reserved = DEFAULT_RESERVED, notFoundStatus = 200, indexed = true, siteUrl, robots = DEFAULT_RESERVED, sitemapPaths, setHeaders, } = options;
44
+ const site = resolveSite(options.site);
45
+ if (health !== false) {
46
+ await healthRoute(fastify, health === true ? {} : health);
47
+ }
48
+ const root = resolve(options.root);
49
+ const files = await listSiteFiles(root);
50
+ if (!files?.has(INDEX)) {
51
+ fastify.log.warn({ root }, 'no built frontend: serving the API alone');
52
+ return;
53
+ }
54
+ const routes = options.routes ?? readRouteTable(root, [homeOf(site)]);
55
+ const configured = siteUrl?.trim() || undefined;
56
+ if (configured !== undefined)
57
+ originOf({ site, origin: configured });
58
+ const pages = createSpaPages(await readFile(join(root, INDEX), 'utf8'), routes, options);
59
+ const originFor = (request) => configured ?? requestOrigin(request, site);
60
+ // An optional peer, installed only by a site that has a server: importing
61
+ // react-cheminfo/server must not need it.
62
+ const { default: fastifyStatic } = await import('@fastify/static');
63
+ await fastify.register(fastifyStatic, {
64
+ root,
65
+ serve: false,
66
+ cacheControl: false,
67
+ setHeaders: (reply, path) => {
68
+ const file = relative(root, path).split(sep).join('/');
69
+ reply.header('cache-control', isHashedBundle(file) ? BUNDLE_CACHE : PAGE_CACHE);
70
+ if (!indexed)
71
+ reply.header('x-robots-tag', NO_INDEX);
72
+ setHeaders?.(reply, file);
73
+ },
74
+ });
75
+ const sendPage = sender(pages, originFor, { indexed, notFoundStatus });
76
+ const answer = (request, reply) => {
77
+ const { pathname, search } = new URL(request.url, 'http://site');
78
+ if (reserved.some((prefix) => pathname.startsWith(prefix))) {
79
+ return reply.callNotFound();
80
+ }
81
+ if (pathname === `/${INDEX}`)
82
+ return sendPage(request, reply, `/${search}`);
83
+ const file = buildFile(files, pathname);
84
+ if (file !== undefined)
85
+ return reply.sendFile(file);
86
+ return sendPage(request, reply, request.url);
87
+ };
88
+ fastify.get('/', { schema: HIDDEN }, answer);
89
+ fastify.get('/*', { schema: HIDDEN }, answer);
90
+ fastify.get('/robots.txt', { schema: HIDDEN }, (request, reply) => reply
91
+ .type('text/plain; charset=utf-8')
92
+ .send(indexed
93
+ ? robotsTxt({ site, routes, origin: originFor(request) }, robots)
94
+ : DISALLOW_ALL));
95
+ fastify.get('/sitemap.xml', { schema: HIDDEN }, async (request, reply) => {
96
+ if (!indexed)
97
+ return reply.callNotFound();
98
+ const paths = (await sitemapPaths?.()) ?? [];
99
+ const listed = [...routes];
100
+ for (const path of paths)
101
+ listed.push({ path, title: '', description: '' });
102
+ return reply
103
+ .type('application/xml; charset=utf-8')
104
+ .send(sitemapXml({ site, routes: listed, origin: originFor(request) }));
105
+ });
106
+ }
107
+ /**
108
+ * The handler answering an address with its page.
109
+ * @param pages - The page writer.
110
+ * @param originFor - Where the site is served, for a request.
111
+ * @param status - How the answer is labelled.
112
+ * @param status.indexed - Whether search engines may index the site.
113
+ * @param status.notFoundStatus - The status of an address the app does not route.
114
+ * @returns The handler.
115
+ */
116
+ function sender(pages, originFor, status) {
117
+ return async (request, reply, url) => {
118
+ const { html, known } = await pages.answer(url, originFor(request));
119
+ reply.header('cache-control', PAGE_CACHE);
120
+ if (!status.indexed)
121
+ reply.header('x-robots-tag', NO_INDEX);
122
+ return reply
123
+ .code(known ? 200 : status.notFoundStatus)
124
+ .type('text/html; charset=utf-8')
125
+ .send(html);
126
+ };
127
+ }
128
+ /**
129
+ * The file of the build an address names, never the template.
130
+ * @param files - The files of the build.
131
+ * @param pathname - The address, without its query.
132
+ * @returns The file, or `undefined` when the address is a page.
133
+ */
134
+ function buildFile(files, pathname) {
135
+ let path;
136
+ try {
137
+ path = decodeURIComponent(pathname);
138
+ }
139
+ catch {
140
+ return undefined;
141
+ }
142
+ const local = path.replace(/^\/+/, '');
143
+ if (local === '' || local === INDEX)
144
+ return undefined;
145
+ return files.has(local) ? local : undefined;
146
+ }
147
+ /**
148
+ * The origin a request arrived on. The `Host` header is the client's to write,
149
+ * so one that is not a host falls back to the site's own address rather than
150
+ * reaching a canonical link.
151
+ * @param request - The request.
152
+ * @param site - The site served.
153
+ * @returns The origin, e.g. `https://pdb.cheminfo.org`.
154
+ */
155
+ function requestOrigin(request, site) {
156
+ const candidate = `${request.protocol}://${request.host}`;
157
+ return URL.canParse(candidate)
158
+ ? new URL(candidate).origin
159
+ : `https://${site.host}`;
160
+ }
161
+ /**
162
+ * The page a site answers when its build wrote no route table.
163
+ * @param site - The site.
164
+ * @returns Its home page, titled and described by its tagline.
165
+ */
166
+ function homeOf(site) {
167
+ const title = site.tagline.replace(/\.$/, '');
168
+ return { path: '/', title, description: site.tagline };
169
+ }
170
+ //# sourceMappingURL=spaSite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaSite.js","sourceRoot":"","sources":["../../src/server/spaSite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,QAA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AM;QAC3B,CAAC,CAAC,WAAW,IAAI,CAAC,IAAI,EAAE,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,SAAS,MAAM,CAAC,IAAgB;IAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC"}
@@ -0,0 +1,126 @@
1
+ import type { FastifyReply } from 'fastify';
2
+ import type { SiteId, SiteRecord } from '../ecosystem/core/sites.ts';
3
+ import type { NoscriptText } from '../seo/core/noscript.ts';
4
+ import type { PageContent } from '../seo/core/pageProse.ts';
5
+ import type { RobotsDisallow } from '../seo/core/robots.ts';
6
+ import type { RouteMeta } from '../seo/core/routes.ts';
7
+ import type { StructuredDataOptions } from '../seo/core/structuredData.ts';
8
+ import type { HealthRouteOptions } from './healthRoute.ts';
9
+ /** A page an address names that the route table does not: a compound, a course. */
10
+ export interface SpaPage {
11
+ /** Its title, description and canonical path. */
12
+ meta: RouteMeta;
13
+ /**
14
+ * What it says for itself in the crawl path.
15
+ * @default its title as heading, its description as the paragraph
16
+ */
17
+ content?: PageContent;
18
+ }
19
+ /** What the structured-data block says beyond the site and its address. */
20
+ export type SpaStructuredData = Omit<StructuredDataOptions, 'site' | 'routes' | 'origin' | 'languages'>;
21
+ /** Options of `spaSite`. */
22
+ export interface SpaSiteOptions {
23
+ /** The directory holding the built frontend. */
24
+ root: string;
25
+ /** The site, named or passed. */
26
+ site: SiteRecord | SiteId;
27
+ /**
28
+ * Every address the frontend routes itself, each with its title and
29
+ * description.
30
+ * @default the `routes.json` the build wrote beside the page, or the site's
31
+ * home page alone
32
+ */
33
+ routes?: readonly RouteMeta[];
34
+ /**
35
+ * Where the site is served, mount path included, e.g.
36
+ * `https://learn.cheminfo.org/surge`. Every canonical, card and sitemap address
37
+ * is built on it. A blank value is unset, as compose forwards `${SITE_URL:-}`.
38
+ * @default the origin the request arrived on
39
+ */
40
+ siteUrl?: string;
41
+ /**
42
+ * The analytics snippet, put at the end of the head of every page.
43
+ * @default undefined - nothing is loaded
44
+ */
45
+ trackingScript?: string;
46
+ /**
47
+ * Address prefixes another plugin answers, such as the API, which never
48
+ * answer a page: an unknown address there is the API's own 404.
49
+ * @default ['/v1/', '/docs']
50
+ */
51
+ reserved?: readonly string[];
52
+ /**
53
+ * The prose of the crawl path, and the pages it links.
54
+ * @default the site's name and tagline, linking every indexed route
55
+ */
56
+ noscript?: NoscriptText;
57
+ /**
58
+ * The structured-data block of every page: what kind of application the site
59
+ * is, a function writing the whole `<script>` for the origin served (an
60
+ * author, a citation, a search action), or `false` for none.
61
+ * @default {} - a free web application, described by the site's tagline
62
+ */
63
+ structuredData?: false | SpaStructuredData | ((origin: string) => string);
64
+ /**
65
+ * The card a link to a page unfurls into, as an absolute address or a path.
66
+ * @default '/og.png'
67
+ */
68
+ image?: string;
69
+ /**
70
+ * Addresses `robots.txt` keeps out of the index, each optionally with the
71
+ * sentence saying why.
72
+ * @default ['/v1/', '/docs']
73
+ */
74
+ robots?: ReadonlyArray<string | RobotsDisallow>;
75
+ /**
76
+ * More addresses the sitemap lists after the route table: one per compound,
77
+ * per published course.
78
+ * @default undefined - the route table alone
79
+ */
80
+ sitemapPaths?: () => readonly string[] | Promise<readonly string[]>;
81
+ /**
82
+ * The page an address names when the route table does not: read from the
83
+ * database, so `/compound/1234` is indexed under the compound's own name.
84
+ * `undefined` falls back to the table.
85
+ * @default undefined - every address is read from the table
86
+ */
87
+ page?: (url: string) => SpaPage | undefined | Promise<SpaPage | undefined>;
88
+ /**
89
+ * Whether an address is one the app routes, given its path without the query
90
+ * and without the mount.
91
+ * @default whether the route table claims it, or `page` named it
92
+ */
93
+ knownRoute?: (path: string) => boolean;
94
+ /**
95
+ * The status an address the app does not route is answered with. It is
96
+ * still the page, so the app draws its own "not found", but a crawler is not
97
+ * handed a soft 404.
98
+ * @default 200
99
+ */
100
+ notFoundStatus?: number;
101
+ /**
102
+ * Whether search engines may index the site. An admin site sets `false`:
103
+ * every answer then carries `X-Robots-Tag: noindex, nofollow`, `robots.txt`
104
+ * disallows everything, there is no sitemap, and a page without the
105
+ * `<!--cheminfo:head-->` marker is served as it is.
106
+ * @default true
107
+ */
108
+ indexed?: boolean;
109
+ /**
110
+ * How many pages, each with its own crawl path, are kept built.
111
+ * @default 2000
112
+ */
113
+ maxCachedPages?: number;
114
+ /**
115
+ * Whether `/health` is answered here, and with what more.
116
+ * @default true
117
+ */
118
+ health?: boolean | HealthRouteOptions;
119
+ /**
120
+ * Headers for a file of the build, such as a cross-origin opening for the
121
+ * decks another site fetches.
122
+ * @default undefined - the cache headers alone
123
+ */
124
+ setHeaders?: (reply: FastifyReply, file: string) => void;
125
+ }
126
+ //# sourceMappingURL=spaSiteOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaSiteOptions.d.ts","sourceRoot":"","sources":["../../src/server/spaSiteOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,mFAAmF;AACnF,MAAM,WAAW,OAAO;IACtB,iDAAiD;IACjD,IAAI,EAAE,SAAS,CAAC;I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,CAAC;IACxB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAAC;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=spaSiteOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spaSiteOptions.js","sourceRoot":"","sources":["../../src/server/spaSiteOptions.ts"],"names":[],"mappings":""}
@@ -22,6 +22,15 @@ export interface StaticSiteOptions {
22
22
  * @default ['/v1/']
23
23
  */
24
24
  reserved?: readonly string[];
25
+ /**
26
+ * The path the deployment is mounted at, `/osiris` for
27
+ * `https://www.cheminfo.org/osiris/`, behind a proxy that takes it off before
28
+ * the request arrives. It is written into the `<base href="/">` of every page
29
+ * when they are read, and in front of every redirect, so one image serves a
30
+ * host of its own and a shared one without a rebuild or a copy of the build.
31
+ * @default '' - the site owns the root of its host
32
+ */
33
+ basePath?: string;
25
34
  }
26
35
  /**
27
36
  * Serve a site's build from Node, with the rules every static host of the
@@ -1 +1 @@
1
- {"version":3,"file":"staticSite.d.ts","sourceRoot":"","sources":["../../src/server/staticSite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,SAAS,CAAC;AAMjB,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAwBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAyDf"}
1
+ {"version":3,"file":"staticSite.d.ts","sourceRoot":"","sources":["../../src/server/staticSite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAe7E,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAWD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAyDf"}