react-cheminfo 0.76.0 → 0.77.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 (316) hide show
  1. package/README.md +141 -31
  2. package/lib/card/core/cardAddress.d.ts +19 -2
  3. package/lib/card/core/cardAddress.d.ts.map +1 -1
  4. package/lib/card/core/cardAddress.js +35 -2
  5. package/lib/card/core/cardAddress.js.map +1 -1
  6. package/lib/card/core/cardPageUrl.d.ts +7 -1
  7. package/lib/card/core/cardPageUrl.d.ts.map +1 -1
  8. package/lib/card/core/cardPageUrl.js +4 -2
  9. package/lib/card/core/cardPageUrl.js.map +1 -1
  10. package/lib/card/core/index.d.ts +1 -1
  11. package/lib/card/core/index.d.ts.map +1 -1
  12. package/lib/card/core/index.js +1 -1
  13. package/lib/card/core/index.js.map +1 -1
  14. package/lib/credits/core/credits.d.ts +30 -0
  15. package/lib/credits/core/credits.d.ts.map +1 -1
  16. package/lib/credits/core/credits.js +35 -0
  17. package/lib/credits/core/credits.js.map +1 -1
  18. package/lib/download/core/downloadFigure.d.ts +12 -1
  19. package/lib/download/core/downloadFigure.d.ts.map +1 -1
  20. package/lib/download/core/downloadFigure.js +21 -0
  21. package/lib/download/core/downloadFigure.js.map +1 -1
  22. package/lib/download/core/figureDpi.d.ts +59 -0
  23. package/lib/download/core/figureDpi.d.ts.map +1 -0
  24. package/lib/download/core/figureDpi.js +75 -0
  25. package/lib/download/core/figureDpi.js.map +1 -0
  26. package/lib/download/core/figurePng.d.ts +4 -1
  27. package/lib/download/core/figurePng.d.ts.map +1 -1
  28. package/lib/download/core/figurePng.js +11 -2
  29. package/lib/download/core/figurePng.js.map +1 -1
  30. package/lib/download/core/index.d.ts +4 -1
  31. package/lib/download/core/index.d.ts.map +1 -1
  32. package/lib/download/core/index.js +3 -1
  33. package/lib/download/core/index.js.map +1 -1
  34. package/lib/download/core/pngDpi.d.ts +22 -0
  35. package/lib/download/core/pngDpi.d.ts.map +1 -0
  36. package/lib/download/core/pngDpi.js +79 -0
  37. package/lib/download/core/pngDpi.js.map +1 -0
  38. package/lib/download/ui/FigureDownloadPanel.d.ts +13 -0
  39. package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
  40. package/lib/download/ui/FigureDownloadPanel.js +18 -34
  41. package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
  42. package/lib/download/ui/figureDownloadHint.d.ts +5 -0
  43. package/lib/download/ui/figureDownloadHint.d.ts.map +1 -1
  44. package/lib/download/ui/figureDownloadHint.js +8 -0
  45. package/lib/download/ui/figureDownloadHint.js.map +1 -1
  46. package/lib/download/ui/figureDownloadOptions.d.ts +84 -0
  47. package/lib/download/ui/figureDownloadOptions.d.ts.map +1 -0
  48. package/lib/download/ui/figureDownloadOptions.js +2 -0
  49. package/lib/download/ui/figureDownloadOptions.js.map +1 -0
  50. package/lib/download/ui/resolutionChoices.d.ts +27 -0
  51. package/lib/download/ui/resolutionChoices.d.ts.map +1 -0
  52. package/lib/download/ui/resolutionChoices.js +48 -0
  53. package/lib/download/ui/resolutionChoices.js.map +1 -0
  54. package/lib/download/ui/useFigureActions.d.ts +4 -1
  55. package/lib/download/ui/useFigureActions.d.ts.map +1 -1
  56. package/lib/download/ui/useFigureActions.js +17 -8
  57. package/lib/download/ui/useFigureActions.js.map +1 -1
  58. package/lib/download/ui/useFigureDownload.d.ts +2 -55
  59. package/lib/download/ui/useFigureDownload.d.ts.map +1 -1
  60. package/lib/download/ui/useFigureDownload.js +45 -13
  61. package/lib/download/ui/useFigureDownload.js.map +1 -1
  62. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  63. package/lib/ecosystem/core/sites.js +14 -0
  64. package/lib/ecosystem/core/sites.js.map +1 -1
  65. package/lib/ecosystem/core/types.d.ts +1 -1
  66. package/lib/ecosystem/core/types.d.ts.map +1 -1
  67. package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
  68. package/lib/ecosystem/ui/glyphs.js +3 -0
  69. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  70. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  71. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  72. package/lib/locales/de.json +30 -1
  73. package/lib/locales/en.json +30 -1
  74. package/lib/locales/es.json +30 -1
  75. package/lib/locales/fr.json +30 -1
  76. package/lib/locales/it.json +30 -1
  77. package/lib/molecule3d/ui/Molecule3DStage.d.ts +4 -33
  78. package/lib/molecule3d/ui/Molecule3DStage.d.ts.map +1 -1
  79. package/lib/molecule3d/ui/Molecule3DStage.js +3 -37
  80. package/lib/molecule3d/ui/Molecule3DStage.js.map +1 -1
  81. package/lib/osiris/core/barGeometry.d.ts +42 -0
  82. package/lib/osiris/core/barGeometry.d.ts.map +1 -0
  83. package/lib/osiris/core/barGeometry.js +46 -0
  84. package/lib/osiris/core/barGeometry.js.map +1 -0
  85. package/lib/osiris/core/computeProperties.d.ts +42 -0
  86. package/lib/osiris/core/computeProperties.d.ts.map +1 -0
  87. package/lib/osiris/core/computeProperties.js +115 -0
  88. package/lib/osiris/core/computeProperties.js.map +1 -0
  89. package/lib/osiris/core/constants.d.ts +70 -0
  90. package/lib/osiris/core/constants.d.ts.map +1 -0
  91. package/lib/osiris/core/constants.js +99 -0
  92. package/lib/osiris/core/constants.js.map +1 -0
  93. package/lib/osiris/core/fitness.d.ts +32 -0
  94. package/lib/osiris/core/fitness.d.ts.map +1 -0
  95. package/lib/osiris/core/fitness.js +48 -0
  96. package/lib/osiris/core/fitness.js.map +1 -0
  97. package/lib/osiris/core/index.d.ts +29 -0
  98. package/lib/osiris/core/index.d.ts.map +1 -0
  99. package/lib/osiris/core/index.js +19 -0
  100. package/lib/osiris/core/index.js.map +1 -0
  101. package/lib/osiris/core/poolSize.d.ts +17 -0
  102. package/lib/osiris/core/poolSize.d.ts.map +1 -0
  103. package/lib/osiris/core/poolSize.js +22 -0
  104. package/lib/osiris/core/poolSize.js.map +1 -0
  105. package/lib/osiris/core/poolTypes.d.ts +140 -0
  106. package/lib/osiris/core/poolTypes.d.ts.map +1 -0
  107. package/lib/osiris/core/poolTypes.js +12 -0
  108. package/lib/osiris/core/poolTypes.js.map +1 -0
  109. package/lib/osiris/core/predictIdCode.d.ts +39 -0
  110. package/lib/osiris/core/predictIdCode.d.ts.map +1 -0
  111. package/lib/osiris/core/predictIdCode.js +54 -0
  112. package/lib/osiris/core/predictIdCode.js.map +1 -0
  113. package/lib/osiris/core/predictProtocol.d.ts +67 -0
  114. package/lib/osiris/core/predictProtocol.d.ts.map +1 -0
  115. package/lib/osiris/core/predictProtocol.js +29 -0
  116. package/lib/osiris/core/predictProtocol.js.map +1 -0
  117. package/lib/osiris/core/predictionPool.d.ts +23 -0
  118. package/lib/osiris/core/predictionPool.d.ts.map +1 -0
  119. package/lib/osiris/core/predictionPool.js +186 -0
  120. package/lib/osiris/core/predictionPool.js.map +1 -0
  121. package/lib/osiris/core/predictionQueue.d.ts +46 -0
  122. package/lib/osiris/core/predictionQueue.d.ts.map +1 -0
  123. package/lib/osiris/core/predictionQueue.js +57 -0
  124. package/lib/osiris/core/predictionQueue.js.map +1 -0
  125. package/lib/osiris/core/predictors.d.ts +62 -0
  126. package/lib/osiris/core/predictors.d.ts.map +1 -0
  127. package/lib/osiris/core/predictors.js +100 -0
  128. package/lib/osiris/core/predictors.js.map +1 -0
  129. package/lib/osiris/core/propertyKeys.d.ts +32 -0
  130. package/lib/osiris/core/propertyKeys.d.ts.map +1 -0
  131. package/lib/osiris/core/propertyKeys.js +44 -0
  132. package/lib/osiris/core/propertyKeys.js.map +1 -0
  133. package/lib/osiris/core/riskAppearance.d.ts +60 -0
  134. package/lib/osiris/core/riskAppearance.d.ts.map +1 -0
  135. package/lib/osiris/core/riskAppearance.js +59 -0
  136. package/lib/osiris/core/riskAppearance.js.map +1 -0
  137. package/lib/osiris/core/riskDetail.d.ts +22 -0
  138. package/lib/osiris/core/riskDetail.d.ts.map +1 -0
  139. package/lib/osiris/core/riskDetail.js +86 -0
  140. package/lib/osiris/core/riskDetail.js.map +1 -0
  141. package/lib/osiris/core/riskDetailRequest.d.ts +31 -0
  142. package/lib/osiris/core/riskDetailRequest.d.ts.map +1 -0
  143. package/lib/osiris/core/riskDetailRequest.js +49 -0
  144. package/lib/osiris/core/riskDetailRequest.js.map +1 -0
  145. package/lib/osiris/core/riskFindings.d.ts +26 -0
  146. package/lib/osiris/core/riskFindings.d.ts.map +1 -0
  147. package/lib/osiris/core/riskFindings.js +79 -0
  148. package/lib/osiris/core/riskFindings.js.map +1 -0
  149. package/lib/osiris/core/runPredictionJob.d.ts +20 -0
  150. package/lib/osiris/core/runPredictionJob.d.ts.map +1 -0
  151. package/lib/osiris/core/runPredictionJob.js +43 -0
  152. package/lib/osiris/core/runPredictionJob.js.map +1 -0
  153. package/lib/osiris/core/scales.d.ts +70 -0
  154. package/lib/osiris/core/scales.d.ts.map +1 -0
  155. package/lib/osiris/core/scales.js +185 -0
  156. package/lib/osiris/core/scales.js.map +1 -0
  157. package/lib/osiris/core/types.d.ts +91 -0
  158. package/lib/osiris/core/types.d.ts.map +1 -0
  159. package/lib/osiris/core/types.js +19 -0
  160. package/lib/osiris/core/types.js.map +1 -0
  161. package/lib/osiris/core/valuation.d.ts +28 -0
  162. package/lib/osiris/core/valuation.d.ts.map +1 -0
  163. package/lib/osiris/core/valuation.js +39 -0
  164. package/lib/osiris/core/valuation.js.map +1 -0
  165. package/lib/osiris/ui/PropertyBar.d.ts +27 -0
  166. package/lib/osiris/ui/PropertyBar.d.ts.map +1 -0
  167. package/lib/osiris/ui/PropertyBar.js +27 -0
  168. package/lib/osiris/ui/PropertyBar.js.map +1 -0
  169. package/lib/osiris/ui/PropertyPanel.d.ts +91 -0
  170. package/lib/osiris/ui/PropertyPanel.d.ts.map +1 -0
  171. package/lib/osiris/ui/PropertyPanel.js +77 -0
  172. package/lib/osiris/ui/PropertyPanel.js.map +1 -0
  173. package/lib/osiris/ui/PropertyRows.d.ts +40 -0
  174. package/lib/osiris/ui/PropertyRows.d.ts.map +1 -0
  175. package/lib/osiris/ui/PropertyRows.js +23 -0
  176. package/lib/osiris/ui/PropertyRows.js.map +1 -0
  177. package/lib/osiris/ui/RiskFindings.d.ts +43 -0
  178. package/lib/osiris/ui/RiskFindings.d.ts.map +1 -0
  179. package/lib/osiris/ui/RiskFindings.js +51 -0
  180. package/lib/osiris/ui/RiskFindings.js.map +1 -0
  181. package/lib/osiris/ui/RiskPanel.d.ts +46 -0
  182. package/lib/osiris/ui/RiskPanel.d.ts.map +1 -0
  183. package/lib/osiris/ui/RiskPanel.js +32 -0
  184. package/lib/osiris/ui/RiskPanel.js.map +1 -0
  185. package/lib/osiris/ui/RiskSquare.d.ts +51 -0
  186. package/lib/osiris/ui/RiskSquare.d.ts.map +1 -0
  187. package/lib/osiris/ui/RiskSquare.js +23 -0
  188. package/lib/osiris/ui/RiskSquare.js.map +1 -0
  189. package/lib/osiris/ui/index.d.ts +15 -0
  190. package/lib/osiris/ui/index.d.ts.map +1 -0
  191. package/lib/osiris/ui/index.js +8 -0
  192. package/lib/osiris/ui/index.js.map +1 -0
  193. package/lib/osiris/ui/usePredictions.d.ts +81 -0
  194. package/lib/osiris/ui/usePredictions.d.ts.map +1 -0
  195. package/lib/osiris/ui/usePredictions.js +102 -0
  196. package/lib/osiris/ui/usePredictions.js.map +1 -0
  197. package/lib/osiris-ui.d.ts +11 -0
  198. package/lib/osiris-ui.d.ts.map +1 -0
  199. package/lib/osiris-ui.js +11 -0
  200. package/lib/osiris-ui.js.map +1 -0
  201. package/lib/osiris.d.ts +17 -0
  202. package/lib/osiris.d.ts.map +1 -0
  203. package/lib/osiris.js +17 -0
  204. package/lib/osiris.js.map +1 -0
  205. package/lib/panel/ui/FilterInput.d.ts.map +1 -1
  206. package/lib/panel/ui/FilterInput.js +3 -1
  207. package/lib/panel/ui/FilterInput.js.map +1 -1
  208. package/lib/panel/ui/SidePanelItem.d.ts +39 -0
  209. package/lib/panel/ui/SidePanelItem.d.ts.map +1 -0
  210. package/lib/panel/ui/SidePanelItem.js +63 -0
  211. package/lib/panel/ui/SidePanelItem.js.map +1 -0
  212. package/lib/panel/ui/SidePanelStack.d.ts +11 -10
  213. package/lib/panel/ui/SidePanelStack.d.ts.map +1 -1
  214. package/lib/panel/ui/SidePanelStack.js +22 -15
  215. package/lib/panel/ui/SidePanelStack.js.map +1 -1
  216. package/lib/panel/ui/SpectrumColorSwatch.d.ts.map +1 -1
  217. package/lib/panel/ui/SpectrumColorSwatch.js +4 -2
  218. package/lib/panel/ui/SpectrumColorSwatch.js.map +1 -1
  219. package/lib/panel/ui/usePanelFolds.d.ts +35 -0
  220. package/lib/panel/ui/usePanelFolds.d.ts.map +1 -0
  221. package/lib/panel/ui/usePanelFolds.js +73 -0
  222. package/lib/panel/ui/usePanelFolds.js.map +1 -0
  223. package/lib/shared/ui/FullscreenStage.d.ts +43 -0
  224. package/lib/shared/ui/FullscreenStage.d.ts.map +1 -0
  225. package/lib/shared/ui/FullscreenStage.js +38 -0
  226. package/lib/shared/ui/FullscreenStage.js.map +1 -0
  227. package/lib/shared/ui/canFillScreen.d.ts +7 -0
  228. package/lib/shared/ui/canFillScreen.d.ts.map +1 -0
  229. package/lib/shared/ui/canFillScreen.js +9 -0
  230. package/lib/shared/ui/canFillScreen.js.map +1 -0
  231. package/lib/shared/ui/index.d.ts +3 -0
  232. package/lib/shared/ui/index.d.ts.map +1 -1
  233. package/lib/shared/ui/index.js +2 -0
  234. package/lib/shared/ui/index.js.map +1 -1
  235. package/lib/split/ui/splitPanes.d.ts +3 -3
  236. package/lib/split/ui/splitPanes.js +1 -1
  237. package/lib/structure/core/structureNotations.d.ts +8 -1
  238. package/lib/structure/core/structureNotations.d.ts.map +1 -1
  239. package/lib/structure/core/structureNotations.js +14 -8
  240. package/lib/structure/core/structureNotations.js.map +1 -1
  241. package/lib/structure/ui/StructureExportPanel.d.ts +8 -0
  242. package/lib/structure/ui/StructureExportPanel.d.ts.map +1 -1
  243. package/lib/structure/ui/StructureExportPanel.js +9 -4
  244. package/lib/structure/ui/StructureExportPanel.js.map +1 -1
  245. package/lib/structure/ui/index.d.ts +1 -0
  246. package/lib/structure/ui/index.d.ts.map +1 -1
  247. package/lib/structure/ui/index.js.map +1 -1
  248. package/package.json +4 -1
  249. package/src/card/core/cardAddress.ts +39 -3
  250. package/src/card/core/cardPageUrl.ts +10 -3
  251. package/src/card/core/index.ts +7 -1
  252. package/src/credits/core/credits.ts +40 -0
  253. package/src/download/core/downloadFigure.ts +26 -1
  254. package/src/download/core/figureDpi.ts +94 -0
  255. package/src/download/core/figurePng.ts +11 -2
  256. package/src/download/core/index.ts +13 -1
  257. package/src/download/core/pngDpi.ts +84 -0
  258. package/src/download/ui/FigureDownloadPanel.tsx +41 -51
  259. package/src/download/ui/figureDownloadHint.ts +13 -0
  260. package/src/download/ui/figureDownloadOptions.ts +85 -0
  261. package/src/download/ui/resolutionChoices.ts +67 -0
  262. package/src/download/ui/useFigureActions.ts +24 -9
  263. package/src/download/ui/useFigureDownload.tsx +57 -71
  264. package/src/ecosystem/core/sites.ts +14 -0
  265. package/src/ecosystem/core/types.ts +2 -1
  266. package/src/ecosystem/ui/glyphs.tsx +20 -0
  267. package/src/locales/de.json +30 -1
  268. package/src/locales/en.json +30 -1
  269. package/src/locales/es.json +30 -1
  270. package/src/locales/fr.json +30 -1
  271. package/src/locales/it.json +30 -1
  272. package/src/molecule3d/ui/Molecule3DStage.tsx +4 -88
  273. package/src/osiris/core/barGeometry.ts +74 -0
  274. package/src/osiris/core/computeProperties.ts +175 -0
  275. package/src/osiris/core/constants.ts +110 -0
  276. package/src/osiris/core/fitness.ts +59 -0
  277. package/src/osiris/core/index.ts +78 -0
  278. package/src/osiris/core/poolSize.ts +24 -0
  279. package/src/osiris/core/poolTypes.ts +140 -0
  280. package/src/osiris/core/predictIdCode.ts +69 -0
  281. package/src/osiris/core/predictProtocol.ts +78 -0
  282. package/src/osiris/core/predictionPool.ts +237 -0
  283. package/src/osiris/core/predictionQueue.ts +89 -0
  284. package/src/osiris/core/predictors.ts +142 -0
  285. package/src/osiris/core/propertyKeys.ts +54 -0
  286. package/src/osiris/core/riskAppearance.ts +86 -0
  287. package/src/osiris/core/riskDetail.ts +120 -0
  288. package/src/osiris/core/riskDetailRequest.ts +64 -0
  289. package/src/osiris/core/riskFindings.ts +92 -0
  290. package/src/osiris/core/runPredictionJob.ts +49 -0
  291. package/src/osiris/core/scales.ts +236 -0
  292. package/src/osiris/core/types.ts +103 -0
  293. package/src/osiris/core/valuation.ts +44 -0
  294. package/src/osiris/ui/PropertyBar.tsx +77 -0
  295. package/src/osiris/ui/PropertyPanel.tsx +227 -0
  296. package/src/osiris/ui/PropertyRows.tsx +92 -0
  297. package/src/osiris/ui/RiskFindings.tsx +137 -0
  298. package/src/osiris/ui/RiskPanel.tsx +81 -0
  299. package/src/osiris/ui/RiskSquare.tsx +108 -0
  300. package/src/osiris/ui/index.ts +17 -0
  301. package/src/osiris/ui/usePredictions.ts +194 -0
  302. package/src/osiris-ui.ts +11 -0
  303. package/src/osiris.ts +17 -0
  304. package/src/panel/ui/FilterInput.tsx +4 -1
  305. package/src/panel/ui/SidePanelItem.tsx +162 -0
  306. package/src/panel/ui/SidePanelStack.tsx +29 -36
  307. package/src/panel/ui/SpectrumColorSwatch.tsx +5 -3
  308. package/src/panel/ui/usePanelFolds.ts +103 -0
  309. package/src/shared/ui/FullscreenStage.tsx +96 -0
  310. package/src/shared/ui/canFillScreen.ts +8 -0
  311. package/src/shared/ui/index.ts +6 -0
  312. package/src/split/ui/splitPanes.tsx +4 -4
  313. package/src/structure/core/structureNotations.ts +25 -8
  314. package/src/structure/ui/StructureExportPanel.tsx +23 -4
  315. package/src/structure/ui/index.ts +4 -0
  316. package/styles/osiris.css +339 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * What OSIRIS predicts about a molecule — the four toxicity risks, cLogP,
3
+ * solubility, drug-likeness and the drug score — and the pool of workers that
4
+ * predicts a whole set of them.
5
+ *
6
+ * Framework-free on purpose, and its own door for two reasons. A prediction
7
+ * worker imports `runPredictionJob` and `isPredictRequest` from here, and a dev
8
+ * server hands a worker its dependencies unbundled, so anything React-shaped
9
+ * behind this door would be evaluated in every worker. And a server answering
10
+ * predictions over an API loads it in Node, where nothing is tree-shaken.
11
+ * `openchemlib` is imported on the first prediction, never on import.
12
+ *
13
+ * The panel that draws the answer, and the hook that drives the pool from a
14
+ * page, are `react-cheminfo/osiris-ui`.
15
+ */
16
+ export * from './osiris/core/index.ts';
17
+ //# sourceMappingURL=osiris.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osiris.d.ts","sourceRoot":"","sources":["../src/osiris.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,wBAAwB,CAAC"}
package/lib/osiris.js ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * What OSIRIS predicts about a molecule — the four toxicity risks, cLogP,
3
+ * solubility, drug-likeness and the drug score — and the pool of workers that
4
+ * predicts a whole set of them.
5
+ *
6
+ * Framework-free on purpose, and its own door for two reasons. A prediction
7
+ * worker imports `runPredictionJob` and `isPredictRequest` from here, and a dev
8
+ * server hands a worker its dependencies unbundled, so anything React-shaped
9
+ * behind this door would be evaluated in every worker. And a server answering
10
+ * predictions over an API loads it in Node, where nothing is tree-shaken.
11
+ * `openchemlib` is imported on the first prediction, never on import.
12
+ *
13
+ * The panel that draws the answer, and the hook that drives the pool from a
14
+ * page, are `react-cheminfo/osiris-ui`.
15
+ */
16
+ export * from "./osiris/core/index.js";
17
+ //# sourceMappingURL=osiris.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osiris.js","sourceRoot":"","sources":["../src/osiris.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FilterInput.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/FilterInput.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAyBlD"}
1
+ {"version":3,"file":"FilterInput.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/FilterInput.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BA0BlD"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { InputGroup } from '@blueprintjs/core';
3
+ import { useChromeT } from "../../i18n/ui/useT.js";
3
4
  import { ClearButton } from "./ClearButton.js";
4
5
  /**
5
6
  * The box a list is filtered through, with a cross to empty it again.
@@ -18,6 +19,7 @@ import { ClearButton } from "./ClearButton.js";
18
19
  */
19
20
  export function FilterInput(props) {
20
21
  const { value, onValueChange, placeholder, autoFocus = false } = props;
21
- return (_jsx(InputGroup, { autoFocus: autoFocus, leftIcon: "search", size: "small", value: value, placeholder: placeholder, spellCheck: false, autoCapitalize: "off", autoCorrect: "off", autoComplete: "off", rightElement: value.length > 0 ? (_jsx(ClearButton, { label: "Clear the filter", onClick: () => onValueChange('') })) : undefined, onValueChange: onValueChange }));
22
+ const t = useChromeT();
23
+ return (_jsx(InputGroup, { autoFocus: autoFocus, leftIcon: "search", size: "small", value: value, placeholder: placeholder, spellCheck: false, autoCapitalize: "off", autoCorrect: "off", autoComplete: "off", rightElement: value.length > 0 ? (_jsx(ClearButton, { label: t('panel.clearFilter'), onClick: () => onValueChange('') })) : undefined, onValueChange: onValueChange }));
22
24
  }
23
25
  //# sourceMappingURL=FilterInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterInput.js","sourceRoot":"","sources":["../../../src/panel/ui/FilterInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAiBhD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAEvE,OAAO,CACL,KAAC,UAAU,IACT,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAC,QAAQ,EACjB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,KAAK,EACjB,cAAc,EAAC,KAAK,EACpB,WAAW,EAAC,KAAK,EACjB,YAAY,EAAC,KAAK,EAClB,YAAY,EACV,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACjB,KAAC,WAAW,IACV,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,GAChC,CACH,CAAC,CAAC,CAAC,SAAS,EAEf,aAAa,EAAE,aAAa,GAC5B,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"FilterInput.js","sourceRoot":"","sources":["../../../src/panel/ui/FilterInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAiBhD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IACvE,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,UAAU,IACT,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAC,QAAQ,EACjB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,KAAK,EACjB,cAAc,EAAC,KAAK,EACpB,WAAW,EAAC,KAAK,EACjB,YAAY,EAAC,KAAK,EAClB,YAAY,EACV,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACjB,KAAC,WAAW,IACV,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,GAChC,CACH,CAAC,CAAC,CAAC,SAAS,EAEf,aAAa,EAAE,aAAa,GAC5B,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { ReactNode } from 'react';
2
+ /** Props of {@link SidePanelItem}. */
3
+ export interface SidePanelItemProps {
4
+ /** Identity of the panel in the stack. */
5
+ id: string;
6
+ /** What the header says. */
7
+ title: string;
8
+ /** Whether the panel shows its body. */
9
+ isOpen: boolean;
10
+ /**
11
+ * Called when the chevron, the header or a shift-click on another header
12
+ * folds or unfolds the panel.
13
+ * @param isOpen - Whether it shows its body.
14
+ */
15
+ onOpenChange: (isOpen: boolean) => void;
16
+ /**
17
+ * Whether the panel is the one in focus, and the toggle; `undefined` while it
18
+ * is alone in the stack, where there is nothing to fold.
19
+ */
20
+ focus: {
21
+ active: boolean;
22
+ toggle: () => void;
23
+ } | undefined;
24
+ /** Called when the close cross is pressed. */
25
+ onClose: () => void;
26
+ /** The body. */
27
+ children: ReactNode;
28
+ }
29
+ /**
30
+ * One panel of the stack: the header with the shell's gestures, and the body,
31
+ * which is also the box that fills the screen.
32
+ *
33
+ * The header is not part of what fills the screen, so a body that does carries
34
+ * a bar of its own with the title and the way back.
35
+ * @param props - See {@link SidePanelItemProps}.
36
+ * @returns The accordion item.
37
+ */
38
+ export declare function SidePanelItem(props: SidePanelItemProps): import("react").JSX.Element;
39
+ //# sourceMappingURL=SidePanelItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidePanelItem.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/SidePanelItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAYtD,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,KAAK,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC;IAC3D,8CAA8C;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAwFtD"}
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useCallback, useRef, useState } from 'react';
3
+ import { Accordion, Button } from 'react-science/ui';
4
+ import { useLanguage } from "../../i18n/ui/useLanguage.js";
5
+ import { useChromeT } from "../../i18n/ui/useT.js";
6
+ import { FullscreenStage } from "../../shared/ui/FullscreenStage.js";
7
+ import { canFillScreen } from "../../shared/ui/canFillScreen.js";
8
+ import { TOKEN } from "../../tokens/core/familyTokens.js";
9
+ import { panelStyle, panelToolbarStyle } from "../core/panelStyles.js";
10
+ /**
11
+ * One panel of the stack: the header with the shell's gestures, and the body,
12
+ * which is also the box that fills the screen.
13
+ *
14
+ * The header is not part of what fills the screen, so a body that does carries
15
+ * a bar of its own with the title and the way back.
16
+ * @param props - See {@link SidePanelItemProps}.
17
+ * @returns The accordion item.
18
+ */
19
+ export function SidePanelItem(props) {
20
+ const { id, title, isOpen, onOpenChange, focus, onClose, children } = props;
21
+ const t = useChromeT();
22
+ const panel = inSentence(title, useLanguage());
23
+ const [canFill] = useState(canFillScreen);
24
+ const body = useRef(null);
25
+ const onStage = useCallback((element) => {
26
+ body.current = element;
27
+ }, []);
28
+ function fillScreen() {
29
+ if (!isOpen)
30
+ onOpenChange(true);
31
+ void body.current?.requestFullscreen().catch(() => undefined);
32
+ }
33
+ return (_jsx(Accordion.Item, { id: id, title: title, open: isOpen, onOpenChange: onOpenChange, renderToolbar: () => (_jsxs(_Fragment, { children: [focus !== undefined && (_jsx(Button, { variant: "minimal", icon: focus.active ? 'expand-all' : 'collapse-all', "aria-pressed": focus.active, "aria-label": t('panel.focus', { panel }), tooltipProps: {
34
+ content: focus.active
35
+ ? t('panel.unfocusTooltip')
36
+ : t('panel.focusTooltip'),
37
+ }, onClick: focus.toggle })), canFill && (_jsx(Button, { variant: "minimal", icon: "fullscreen", "aria-label": t('panel.fillScreen', { panel }), tooltipProps: { content: t('panel.fillScreenTooltip') }, onClick: fillScreen })), _jsx(Button, { variant: "minimal", icon: isOpen ? 'chevron-down' : 'chevron-right', "data-panel-open": isOpen, "aria-expanded": isOpen, "aria-label": t(isOpen ? 'panel.fold' : 'panel.unfold', { panel }), tooltipProps: {
38
+ content: t(isOpen ? 'panel.foldTooltip' : 'panel.unfoldTooltip'),
39
+ }, onClick: () => onOpenChange(!isOpen) }), _jsx(Button, { variant: "minimal", icon: "cross", tooltipProps: { content: t('panel.closeTooltip') }, "aria-label": t('panel.close', { panel }), onClick: onClose })] })), children: _jsx(FullscreenStage, { style: bodyStyle, onStage: onStage, children: (fullscreen) => (_jsxs(_Fragment, { children: [fullscreen?.active === true && (_jsxs("div", { style: fullscreenBarStyle, children: [_jsx("span", { style: fullscreenTitleStyle, children: title }), _jsx(Button, { variant: "minimal", icon: "minimize", "aria-label": t('panel.leaveFullScreen'), tooltipProps: { content: t('panel.leaveFullScreenTooltip') }, onClick: fullscreen.toggle })] })), children] })) }) }));
40
+ }
41
+ /**
42
+ * The title as it reads inside a sentence: lowercased, except in German, where
43
+ * every noun keeps its capital.
44
+ * @param title - The panel's title.
45
+ * @param language - The language of the sentence.
46
+ * @returns The title to write into it.
47
+ */
48
+ function inSentence(title, language) {
49
+ return language === 'de' ? title : title.toLocaleLowerCase(language);
50
+ }
51
+ /** A box filling the screen shows the backdrop through it unless painted. */
52
+ const filledStyle = { ...panelStyle, background: TOKEN.surface };
53
+ function bodyStyle(fillsScreen) {
54
+ return fillsScreen ? filledStyle : panelStyle;
55
+ }
56
+ const fullscreenBarStyle = {
57
+ ...panelToolbarStyle,
58
+ alignItems: 'center',
59
+ justifyContent: 'space-between',
60
+ paddingLeft: 12,
61
+ };
62
+ const fullscreenTitleStyle = { fontWeight: 'bold' };
63
+ //# sourceMappingURL=SidePanelItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidePanelItem.js","sourceRoot":"","sources":["../../../src/panel/ui/SidePanelItem.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,M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kB,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC"}
@@ -40,21 +40,22 @@ export interface SidePanelStackProps<TPanel extends PanelDescriptor> {
40
40
  * They are drawn in the order the rail stacks their icons rather than the order
41
41
  * they were switched on, so a panel always comes back where it was.
42
42
  *
43
- * The header carries the shell's own two gestures and nothing about what the
44
- * panel holds: the chevron that folds it away and the cross that closes it.
45
- * What a panel switches on and off is a toolbar at the top of its own body, so
46
- * it travels with the panel when it is folded, reordered or lent to another
47
- * editor, and every header in every editor reads the same — which is the reason
48
- * this is one component rather than one per editor.
43
+ * The header carries the shell's own gestures and nothing about what the panel
44
+ * holds: focus, which folds every other panel away and unfolds them again;
45
+ * filling the screen with the panel, where the browser can; the chevron that
46
+ * folds it away; and the cross that closes it. What a panel switches on and off
47
+ * is a toolbar at the top of its own body, so it travels with the panel when it
48
+ * is folded, reordered or lent to another editor, and every header in every
49
+ * editor reads the same — which is the reason this is one component rather
50
+ * than one per editor.
49
51
  *
50
52
  * The chevron is there because nothing else says which panels are folded. The
51
53
  * accordion draws every header identically and hides only the body, so a side
52
54
  * of four closed panels and a side of four open ones differ by white space, and
53
55
  * a reader looking for a panel that is already open reaches for its icon and
54
- * closes it. It is a real button rather than a glyph because the header's own
55
- * click never reaches the toolbar — clicks there are stopped so the close cross
56
- * does not also fold the panel — so a chevron that did nothing when pressed
57
- * would be an affordance that lies.
56
+ * closes it. Focus is a button as well as a shift-click because a modifier on a
57
+ * header is a gesture nobody finds, and it undoes itself, which a shift-click
58
+ * does not.
58
59
  * @param props - Component props.
59
60
  * @returns The stack.
60
61
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelStack.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/SidePanelStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,sEAAsE;AACtE,MAAM,WAAW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;;;OAKG;IACH,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAS,eAAe,EAC3D,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,+BAgCnC"}
@@ -1,5 +1,7 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Accordion, AccordionProvider, Button } from 'react-science/ui';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Accordion, AccordionProvider } from 'react-science/ui';
3
+ import { SidePanelItem } from "./SidePanelItem.js";
4
+ import { usePanelFolds } from "./usePanelFolds.js";
3
5
  /**
4
6
  * The panels that are open, stacked one under the other down the side.
5
7
  *
@@ -12,29 +14,34 @@ import { Accordion, AccordionProvider, Button } from 'react-science/ui';
12
14
  * They are drawn in the order the rail stacks their icons rather than the order
13
15
  * they were switched on, so a panel always comes back where it was.
14
16
  *
15
- * The header carries the shell's own two gestures and nothing about what the
16
- * panel holds: the chevron that folds it away and the cross that closes it.
17
- * What a panel switches on and off is a toolbar at the top of its own body, so
18
- * it travels with the panel when it is folded, reordered or lent to another
19
- * editor, and every header in every editor reads the same — which is the reason
20
- * this is one component rather than one per editor.
17
+ * The header carries the shell's own gestures and nothing about what the panel
18
+ * holds: focus, which folds every other panel away and unfolds them again;
19
+ * filling the screen with the panel, where the browser can; the chevron that
20
+ * folds it away; and the cross that closes it. What a panel switches on and off
21
+ * is a toolbar at the top of its own body, so it travels with the panel when it
22
+ * is folded, reordered or lent to another editor, and every header in every
23
+ * editor reads the same — which is the reason this is one component rather
24
+ * than one per editor.
21
25
  *
22
26
  * The chevron is there because nothing else says which panels are folded. The
23
27
  * accordion draws every header identically and hides only the body, so a side
24
28
  * of four closed panels and a side of four open ones differ by white space, and
25
29
  * a reader looking for a panel that is already open reaches for its icon and
26
- * closes it. It is a real button rather than a glyph because the header's own
27
- * click never reaches the toolbar — clicks there are stopped so the close cross
28
- * does not also fold the panel — so a chevron that did nothing when pressed
29
- * would be an affordance that lies.
30
+ * closes it. Focus is a button as well as a shift-click because a modifier on a
31
+ * header is a gesture nobody finds, and it undoes itself, which a shift-click
32
+ * does not.
30
33
  * @param props - Component props.
31
34
  * @returns The stack.
32
35
  */
33
36
  export function SidePanelStack(props) {
34
37
  const { panels, openPanelIds, onClose, children } = props;
35
38
  const open = panels.filter((panel) => openPanelIds.includes(panel.id));
36
- return (_jsx(AccordionProvider, { children: _jsx(Accordion, { children: open.map((panel) => (_jsx(Accordion.Item, { id: panel.id, title: panel.title, defaultOpen: true, renderToolbar: ({ isOpen, controls }) => (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "minimal", icon: isOpen ? 'chevron-down' : 'chevron-right', "data-panel-open": isOpen, "aria-expanded": isOpen, "aria-label": `${isOpen ? 'Fold' : 'Unfold'} the ${panel.title.toLowerCase()} panel`, tooltipProps: {
37
- content: isOpen ? 'Fold this panel away' : 'Unfold it',
38
- }, onClick: () => controls.toggle() }), _jsx(Button, { variant: "minimal", icon: "cross", tooltipProps: { content: 'Close this panel' }, "aria-label": `Close the ${panel.title.toLowerCase()} panel`, onClick: () => onClose(panel.id) })] })), children: children(panel) }, panel.id))) }) }));
39
+ const folds = usePanelFolds(open.map((panel) => panel.id));
40
+ return (_jsx(AccordionProvider, { children: _jsx(Accordion, { children: open.map((panel) => (_jsx(SidePanelItem, { id: panel.id, title: panel.title, isOpen: folds.isOpen(panel.id), onOpenChange: (isOpen) => folds.setOpen(panel.id, isOpen), focus: open.length > 1
41
+ ? {
42
+ active: folds.focused === panel.id,
43
+ toggle: () => folds.toggleFocus(panel.id),
44
+ }
45
+ : undefined, onClose: () => onClose(panel.id), children: children(panel) }, panel.id))) }) }));
39
46
  }
40
47
  //# sourceMappingURL=SidePanelStack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelStack.js","sourceRoot":"","sources":["../../../src/panel/ui/SidePanelStack.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAgCxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAkC;IAElC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAEvE,OAAO,CACL,KAAC,iBAAiB,cAChB,KAAC,SAAS,cACP,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACnB,KAAC,SAAS,CAAC,IAAI,IAEb,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,QACX,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACvC,8BACE,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,qBAC9B,MAAM,mBACR,MAAM,gBACT,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,QAAQ,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,QAAQ,EAClF,YAAY,EAAE;gCACZ,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,WAAW;6BACvD,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,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,EAAE,KAAK,CAAC,EAAE,EACZ,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,EAC9B,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,MAAM,CAAC,EACzD,KAAK,EACH,IAAI,CAAC,MAAM,GAAG,CAAC;oBACb,CAAC,CAAC;wBACE,MAAM,EAAE,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,EAAE;wBAClC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;qBAC1C;oBACH,CAAC,CAAC,SAAS,EAEf,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,YAE/B,QAAQ,CAAC,KAAK,CAAC,IAfX,KAAK,CAAC,EAAE,CAgBC,CACjB,CAAC,GACQ,GACM,CACrB,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpectrumColorSwatch.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/SpectrumColorSwatch.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,+BA8ClE"}
1
+ {"version":3,"file":"SpectrumColorSwatch.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/SpectrumColorSwatch.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,+BA+ClE"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { PopoverNext } from '@blueprintjs/core';
3
3
  import { useState } from 'react';
4
4
  import { EXTRA_SPECTRUM_COLORS, SPECTRUM_COLORS, } from "../../chart/core/spectrumColor.js";
5
+ import { useChromeT } from "../../i18n/ui/useT.js";
5
6
  /**
6
7
  * The chip that says what colour a spectrum is drawn in, and changes it.
7
8
  *
@@ -28,8 +29,9 @@ import { EXTRA_SPECTRUM_COLORS, SPECTRUM_COLORS, } from "../../chart/core/spectr
28
29
  export function SpectrumColorSwatch(props) {
29
30
  const { color, name, onPick } = props;
30
31
  const [isOpen, setIsOpen] = useState(false);
32
+ const t = useChromeT();
31
33
  function offer(offered) {
32
- return (_jsx("button", { type: "button", title: offered, "aria-label": `Draw ${name} in ${offered}`, style: {
34
+ return (_jsx("button", { type: "button", title: offered, "aria-label": t('panel.drawIn', { name, color: offered }), style: {
33
35
  ...(offered === color ? activeSwatchStyle : swatchStyle),
34
36
  background: offered,
35
37
  }, onClick: () => {
@@ -43,7 +45,7 @@ export function SpectrumColorSwatch(props) {
43
45
  , {
44
46
  // A handful of chips need no arrow pointing back at a chip of the same
45
47
  // size.
46
- arrow: false, isOpen: isOpen, placement: "bottom-start", onInteraction: setIsOpen, content: _jsxs("div", { style: paletteStyle, children: [_jsx("div", { style: paletteRowStyle, children: SPECTRUM_COLORS.map(offer) }), _jsx("div", { style: paletteRowStyle, children: EXTRA_SPECTRUM_COLORS.map(offer) })] }), children: _jsx("button", { type: "button", title: "Draw this spectrum in another colour", "aria-label": `Colour of ${name}`, style: { ...swatchStyle, background: color } }) }));
48
+ arrow: false, isOpen: isOpen, placement: "bottom-start", onInteraction: setIsOpen, content: _jsxs("div", { style: paletteStyle, children: [_jsx("div", { style: paletteRowStyle, children: SPECTRUM_COLORS.map(offer) }), _jsx("div", { style: paletteRowStyle, children: EXTRA_SPECTRUM_COLORS.map(offer) })] }), children: _jsx("button", { type: "button", title: t('panel.changeColour'), "aria-label": t('panel.colourOf', { name }), style: { ...swatchStyle, background: color } }) }));
47
49
  }
48
50
  /**
49
51
  * A round chip rather than a square one: it is the mark the chart's own
@@ -1 +1 @@
1
- {"version":3,"file":"SpectrumColorSwatch.js","sourceRoot":"","sources":["../../../src/panel/ui/SpectrumColorSwatch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAW3C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IACjE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,SAAS,KAAK,CAAC,OAAe;QAC5B,OAAO,CACL,iBAEE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,OAAO,gBACF,QAAQ,IAAI,OAAO,OAAO,EAAE,EACxC,KAAK,EAAE;gBACL,GAAG,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,WAAW,CAAC;gBACxD,UAAU,EAAE,OAAO;aACpB,EACD,OAAO,EAAE,GAAG,EAAE;gBACZ,MAAM,CAAC,OAAO,CAAC,CAAC;gBAChB,SAAS,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC,IAXI,OAAO,CAYZ,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,WAAW;IACV,uEAAuE;IACvE,QAAQ;;QADR,uEAAuE;QACvE,QAAQ;QACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAC,cAAc,EACxB,aAAa,EAAE,SAAS,EACxB,OAAO,EACL,eAAK,KAAK,EAAE,YAAY,aACtB,cAAK,KAAK,EAAE,eAAe,YAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,GAAO,EAC/D,cAAK,KAAK,EAAE,eAAe,YAAG,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,GAAO,IACjE,YAGR,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,sCAAsC,gBAChC,aAAa,IAAI,EAAE,EAC/B,KAAK,EAAE,EAAE,GAAG,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAC5C,GACU,CACf,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,KAAK;IACnB,MAAM,EAAE,iCAAiC;IACzC,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,MAAM,iBAAiB,GAAG;IACxB,GAAG,WAAW;IACd,MAAM,EAAE,yBAAyB;CACzB,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,CAAC;IACN,OAAO,EAAE,CAAC;CACF,CAAC;AAEX,MAAM,eAAe,GAAG;IACtB,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,CAAC;CACE,CAAC"}
1
+ {"version":3,"file":"SpectrumColorSwatch.js","sourceRoot":"","sources":["../../../src/panel/ui/SpectrumColorSwatch.tsx"],"names":[],"mappings":";AA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G,CAAC,KAAK,CAAC,GAAO,EAC/D,cAAK,KAAK,EAAE,eAAe,YAAG,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,GAAO,IACjE,YAGR,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,CAAC,CAAC,oBAAoB,CAAC,gBAClB,CAAC,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,CAAC,EACzC,KAAK,EAAE,EAAE,GAAG,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAC5C,GACU,CACf,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,KAAK;IACnB,MAAM,EAAE,iCAAiC;IACzC,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,MAAM,iBAAiB,GAAG;IACxB,GAAG,WAAW;IACd,MAAM,EAAE,yBAAyB;CACzB,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,CAAC;IACN,OAAO,EAAE,CAAC;CACF,CAAC;AAEX,MAAM,eAAe,GAAG;IACtB,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,CAAC;CACE,CAAC"}
@@ -0,0 +1,35 @@
1
+ /** Which panels of a stack are folded, and the gestures that change that. */
2
+ export interface PanelFolds {
3
+ /**
4
+ * Whether a panel shows its body.
5
+ * @param id - The panel.
6
+ * @returns False while it is folded away.
7
+ */
8
+ isOpen: (id: string) => boolean;
9
+ /**
10
+ * Fold a panel away, or unfold it.
11
+ * @param id - The panel.
12
+ * @param open - Whether it shows its body.
13
+ */
14
+ setOpen: (id: string, open: boolean) => void;
15
+ /** The one panel left unfolded among several, or null. */
16
+ focused: string | null;
17
+ /**
18
+ * Focus on a panel: unfold it and fold every other one, or, when it is
19
+ * already in focus, unfold them all again.
20
+ * @param id - The panel.
21
+ */
22
+ toggleFocus: (id: string) => void;
23
+ }
24
+ /**
25
+ * The folds of a stack of panels, kept by the stack rather than by each panel
26
+ * so that one panel can be focused — every other one folded — and the focus
27
+ * undone.
28
+ *
29
+ * A panel closed while folded comes back unfolded when it is opened again: a
30
+ * reader reopening a panel from the rail is asking to see it.
31
+ * @param openIds - The panels in the stack, in the order they are drawn.
32
+ * @returns The folds.
33
+ */
34
+ export declare function usePanelFolds(openIds: readonly string[]): PanelFolds;
35
+ //# sourceMappingURL=usePanelFolds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePanelFolds.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/usePanelFolds.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAChC;;;;OAIG;IACH,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;OAIG;IACH,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAID;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CA0BpE"}
@@ -0,0 +1,73 @@
1
+ import { useState } from 'react';
2
+ const NOTHING_FOLDED = new Set();
3
+ /**
4
+ * The folds of a stack of panels, kept by the stack rather than by each panel
5
+ * so that one panel can be focused — every other one folded — and the focus
6
+ * undone.
7
+ *
8
+ * A panel closed while folded comes back unfolded when it is opened again: a
9
+ * reader reopening a panel from the rail is asking to see it.
10
+ * @param openIds - The panels in the stack, in the order they are drawn.
11
+ * @returns The folds.
12
+ */
13
+ export function usePanelFolds(openIds) {
14
+ const [folded, setFolded] = useState(NOTHING_FOLDED);
15
+ const kept = keepOnly(folded, openIds);
16
+ if (kept !== folded)
17
+ setFolded(kept);
18
+ return {
19
+ isOpen: (id) => !kept.has(id),
20
+ setOpen: (id, open) => {
21
+ setFolded((previous) => {
22
+ if (previous.has(id) !== open)
23
+ return previous;
24
+ const next = new Set(previous);
25
+ if (open)
26
+ next.delete(id);
27
+ else
28
+ next.add(id);
29
+ return next;
30
+ });
31
+ },
32
+ focused: focusedPanel(openIds, kept),
33
+ toggleFocus: (id) => {
34
+ setFolded(focusedPanel(openIds, kept) === id
35
+ ? NOTHING_FOLDED
36
+ : new Set(openIds.filter((other) => other !== id)));
37
+ },
38
+ };
39
+ }
40
+ /**
41
+ * The folds of the panels still in the stack.
42
+ * @param folded - The panels folded.
43
+ * @param openIds - The panels in the stack.
44
+ * @returns `folded` itself when every one of them is still in the stack.
45
+ */
46
+ function keepOnly(folded, openIds) {
47
+ for (const id of folded) {
48
+ if (!openIds.includes(id)) {
49
+ return new Set(openIds.filter((open) => folded.has(open)));
50
+ }
51
+ }
52
+ return folded;
53
+ }
54
+ /**
55
+ * The panel in focus: the only one unfolded, when there is another to fold.
56
+ * @param openIds - The panels in the stack.
57
+ * @param folded - The panels folded.
58
+ * @returns The panel, or null.
59
+ */
60
+ function focusedPanel(openIds, folded) {
61
+ if (openIds.length < 2)
62
+ return null;
63
+ let unfolded = null;
64
+ for (const id of openIds) {
65
+ if (folded.has(id))
66
+ continue;
67
+ if (unfolded !== null)
68
+ return null;
69
+ unfolded = id;
70
+ }
71
+ return unfolded;
72
+ }
73
+ //# sourceMappingURL=usePanelFolds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePanelFolds.js","sourceRoot":"","sources":["../../../src/panel/ui/usePanelFolds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA0BjC,MAAM,cAAc,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEtD;;;;;;;;;G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AM,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;YAC1B,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,SAAS,YAAY,CACnB,OAA0B,EAC1B,MAA2B;IAE3B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,IAAI,QAAQ,GAAkB,IAAI,CAAC;IACnC,KAAK,MAAM,EAAE,IAAI,OAAO,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QAC7B,IAAI,QAAQ,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QACnC,QAAQ,GAAG,EAAE,CAAC;IAChB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * A box that can fill the screen: the 3D canvas and its toolbars, a side panel.
3
+ *
4
+ * A box filling the screen hides everything outside it, and the popovers and
5
+ * tooltips of what it holds are portalled to `document.body`: while the box
6
+ * fills the screen they are portalled into it instead, the way react-science's
7
+ * `RootLayout` keeps its own menus visible. Otherwise the portal options of the
8
+ * page around the box are passed through untouched.
9
+ */
10
+ import type { CSSProperties, ReactElement, ReactNode } from 'react';
11
+ /** Whether a box fills the screen, and how to change that. */
12
+ export interface StageFullscreen {
13
+ /** Whether the box fills the screen. */
14
+ active: boolean;
15
+ /** Fill the screen, or leave it. */
16
+ toggle: () => void;
17
+ }
18
+ /** Props of {@link FullscreenStage}. */
19
+ export interface FullscreenStageProps {
20
+ /**
21
+ * Style of the box, or a function handed whether the box fills the screen,
22
+ * for a box shaped differently while it does.
23
+ */
24
+ style: CSSProperties | ((fillsScreen: boolean) => CSSProperties);
25
+ /**
26
+ * Called with the box once it is mounted, and with `null` once it is gone.
27
+ * It must keep its identity across renders.
28
+ * @default undefined
29
+ */
30
+ onStage?: (element: HTMLDivElement | null) => void;
31
+ /**
32
+ * What is drawn in the box, handed whether it fills the screen and the
33
+ * toggle, or `undefined` where the browser cannot fill the screen.
34
+ */
35
+ children: (fullscreen: StageFullscreen | undefined) => ReactNode;
36
+ }
37
+ /**
38
+ * The box, able to fill the screen.
39
+ * @param props - See {@link FullscreenStageProps}.
40
+ * @returns The box.
41
+ */
42
+ export declare function FullscreenStage(props: FullscreenStageProps): ReactElement;
43
+ //# sourceMappingURL=FullscreenStage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullscreenStage.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/FullscreenStage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMpE,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,oCAAoC;IACpC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,EAAE,aAAa,GAAG,CAAC,CAAC,WAAW,EAAE,OAAO,KAAK,aAAa,CAAC,CAAC;IACjE;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD;;;OAGG;IACH,QAAQ,EAAE,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,KAAK,SAAS,CAAC;CAClE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAMzE"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * A box that can fill the screen: the 3D canvas and its toolbars, a side panel.
4
+ *
5
+ * A box filling the screen hides everything outside it, and the popovers and
6
+ * tooltips of what it holds are portalled to `document.body`: while the box
7
+ * fills the screen they are portalled into it instead, the way react-science's
8
+ * `RootLayout` keeps its own menus visible. Otherwise the portal options of the
9
+ * page around the box are passed through untouched.
10
+ */
11
+ import { PortalContext, PortalProvider } from '@blueprintjs/core';
12
+ import { useCallback, useContext, useState } from 'react';
13
+ import { FullScreenProvider, useFullscreen } from 'react-science/ui';
14
+ import { canFillScreen } from "./canFillScreen.js";
15
+ /**
16
+ * The box, able to fill the screen.
17
+ * @param props - See {@link FullscreenStageProps}.
18
+ * @returns The box.
19
+ */
20
+ export function FullscreenStage(props) {
21
+ return (_jsx(FullScreenProvider, { children: (fullscreenRef) => _jsx(Stage, { ...props, fullscreenRef: fullscreenRef }) }));
22
+ }
23
+ function Stage(props) {
24
+ const { style, onStage, children, fullscreenRef } = props;
25
+ const { isFullScreen, toggle } = useFullscreen();
26
+ const portal = useContext(PortalContext);
27
+ const [canFill] = useState(canFillScreen);
28
+ const [stage, setStage] = useState(null);
29
+ const stageRef = useCallback((element) => {
30
+ fullscreenRef.current = element;
31
+ setStage(element);
32
+ onStage?.(element);
33
+ }, [fullscreenRef, onStage]);
34
+ // The provider is always there, so entering full screen changes a value
35
+ // rather than the tree, and what the box holds is never mounted again.
36
+ return (_jsx("div", { ref: stageRef, style: typeof style === 'function' ? style(isFullScreen) : style, children: _jsx(PortalProvider, { portalClassName: portal.portalClassName, portalContainer: isFullScreen && stage !== null ? stage : portal.portalContainer, children: children(canFill ? { active: isFullScreen, toggle } : undefined) }) }));
37
+ }
38
+ //# sourceMappingURL=FullscreenStage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullscreenStage.js","sourceRoot":"","sources":["../../../src/shared/ui/FullscreenStage.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,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,CAAC,CAAC,CAAC,KAAK,YAEhE,KAAC,cAAc,IACb,eAAe,EAAE,MAAM,CAAC,eAAe,EACvC,eAAe,EACb,YAAY,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,YAGhE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAClD,GACb,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Whether this browser lets a page fill the screen: neither an iPhone nor a
3
+ * frame without `allowfullscreen` does.
4
+ * @returns Whether `requestFullscreen` can succeed.
5
+ */
6
+ export declare function canFillScreen(): boolean;
7
+ //# sourceMappingURL=canFillScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canFillScreen.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/canFillScreen.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether this browser lets a page fill the screen: neither an iPhone nor a
3
+ * frame without `allowfullscreen` does.
4
+ * @returns Whether `requestFullscreen` can succeed.
5
+ */
6
+ export function canFillScreen() {
7
+ return typeof document !== 'undefined' && document.fullscreenEnabled;
8
+ }
9
+ //# sourceMappingURL=canFillScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canFillScreen.js","sourceRoot":"","sources":["../../../src/shared/ui/canFillScreen.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,CAAC,iBAAiB,CAAC;AACvE,CAAC"}
@@ -4,4 +4,7 @@ export type { HeaderButtonProps, MenuButtonProps } from './MenuButton.tsx';
4
4
  export { MenuButton } from './MenuButton.tsx';
5
5
  export type { ActionTooltipState, ActionTooltipTarget, } from './useActionTooltip.ts';
6
6
  export { ACTION_TOOLTIP_DELAY, useActionTooltip } from './useActionTooltip.ts';
7
+ export { canFillScreen } from './canFillScreen.ts';
8
+ export type { FullscreenStageProps, StageFullscreen, } from './FullscreenStage.tsx';
9
+ export { FullscreenStage } from './FullscreenStage.tsx';
7
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EACV,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EACV,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,oBAAoB,EACpB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}