react-msaview 7.0.0 → 8.1.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 (335) hide show
  1. package/README.md +11 -10
  2. package/bundle/index.js +122 -111
  3. package/bundle/index.js.map +4 -4
  4. package/dist/calculateBlocks.js +5 -3
  5. package/dist/calculateBlocks.js.map +1 -1
  6. package/dist/colorSchemes.js +1 -2
  7. package/dist/colorSchemes.js.map +1 -1
  8. package/dist/columnStats.d.ts +28 -0
  9. package/dist/columnStats.js +34 -0
  10. package/dist/columnStats.js.map +1 -0
  11. package/dist/components/DragHandle.d.ts +3 -2
  12. package/dist/components/DragHandle.js +11 -5
  13. package/dist/components/DragHandle.js.map +1 -1
  14. package/dist/components/Loading.js +2 -8
  15. package/dist/components/Loading.js.map +1 -1
  16. package/dist/components/MSAView.js +17 -6
  17. package/dist/components/MSAView.js.map +1 -1
  18. package/dist/components/MSAViewer.d.ts +64 -7
  19. package/dist/components/MSAViewer.js +128 -23
  20. package/dist/components/MSAViewer.js.map +1 -1
  21. package/dist/components/PortalTooltip.d.ts +11 -0
  22. package/dist/components/PortalTooltip.js +29 -0
  23. package/dist/components/PortalTooltip.js.map +1 -0
  24. package/dist/components/ResizeHandles.js +11 -29
  25. package/dist/components/ResizeHandles.js.map +1 -1
  26. package/dist/components/SequenceTextArea.js +3 -4
  27. package/dist/components/SequenceTextArea.js.map +1 -1
  28. package/dist/components/Track.js +43 -24
  29. package/dist/components/Track.js.map +1 -1
  30. package/dist/components/dialogs/AboutDialog.js +6 -6
  31. package/dist/components/dialogs/AboutDialog.js.map +1 -1
  32. package/dist/components/dialogs/AnnotationFileDialog.js +5 -2
  33. package/dist/components/dialogs/AnnotationFileDialog.js.map +1 -1
  34. package/dist/components/dialogs/ExportSVGDialog.js +6 -4
  35. package/dist/components/dialogs/ExportSVGDialog.js.map +1 -1
  36. package/dist/components/dialogs/FeatureDialog.js +8 -3
  37. package/dist/components/dialogs/FeatureDialog.js.map +1 -1
  38. package/dist/components/dialogs/TrackInfoDialog.js +1 -1
  39. package/dist/components/dialogs/TrackInfoDialog.js.map +1 -1
  40. package/dist/components/header/GappynessSlider.js +6 -11
  41. package/dist/components/header/GappynessSlider.js.map +1 -1
  42. package/dist/components/header/Header.js +4 -1
  43. package/dist/components/header/Header.js.map +1 -1
  44. package/dist/components/header/LoadWarnings.js +6 -23
  45. package/dist/components/header/LoadWarnings.js.map +1 -1
  46. package/dist/components/header/ScrollZoomIcons.d.ts +6 -0
  47. package/dist/components/header/ScrollZoomIcons.js +35 -0
  48. package/dist/components/header/ScrollZoomIcons.js.map +1 -0
  49. package/dist/components/header/TreeSettingsMenu.js +1 -3
  50. package/dist/components/header/TreeSettingsMenu.js.map +1 -1
  51. package/dist/components/header/UnshareableDataWarning.js +2 -4
  52. package/dist/components/header/UnshareableDataWarning.js.map +1 -1
  53. package/dist/components/header/ZoomControls.js +49 -6
  54. package/dist/components/header/ZoomControls.js.map +1 -1
  55. package/dist/components/header/getAnnotationsMenu.js +3 -6
  56. package/dist/components/header/getAnnotationsMenu.js.map +1 -1
  57. package/dist/components/header/settingsMenuItems.js +12 -9
  58. package/dist/components/header/settingsMenuItems.js.map +1 -1
  59. package/dist/components/import/ImportForm.js +1 -1
  60. package/dist/components/import/ImportForm.js.map +1 -1
  61. package/dist/components/import/util.js +1 -2
  62. package/dist/components/import/util.js.map +1 -1
  63. package/dist/components/minimap/Minimap.js +1 -2
  64. package/dist/components/minimap/Minimap.js.map +1 -1
  65. package/dist/components/msa/AnnotationLegend.js +27 -19
  66. package/dist/components/msa/AnnotationLegend.js.map +1 -1
  67. package/dist/components/msa/MSACanvas.js +2 -4
  68. package/dist/components/msa/MSACanvas.js.map +1 -1
  69. package/dist/components/msa/MSACanvasBlock.js +13 -15
  70. package/dist/components/msa/MSACanvasBlock.js.map +1 -1
  71. package/dist/components/msa/MSAMouseoverCanvas.js +2 -1
  72. package/dist/components/msa/MSAMouseoverCanvas.js.map +1 -1
  73. package/dist/components/msa/domainBandCursor.d.ts +7 -11
  74. package/dist/components/msa/domainBandCursor.js +7 -11
  75. package/dist/components/msa/domainBandCursor.js.map +1 -1
  76. package/dist/components/msa/drawFeatureSpans.d.ts +59 -0
  77. package/dist/components/msa/drawFeatureSpans.js +113 -0
  78. package/dist/components/msa/drawFeatureSpans.js.map +1 -0
  79. package/dist/components/msa/legendRows.d.ts +8 -0
  80. package/dist/components/msa/legendRows.js +16 -0
  81. package/dist/components/msa/legendRows.js.map +1 -0
  82. package/dist/components/msa/msaRaster.d.ts +24 -31
  83. package/dist/components/msa/msaRaster.js +30 -39
  84. package/dist/components/msa/msaRaster.js.map +1 -1
  85. package/dist/components/msa/packDomainLanes.d.ts +20 -0
  86. package/dist/components/msa/packDomainLanes.js +33 -0
  87. package/dist/components/msa/packDomainLanes.js.map +1 -0
  88. package/dist/components/msa/renderBoxFeatureCanvasBlock.d.ts +3 -1
  89. package/dist/components/msa/renderBoxFeatureCanvasBlock.js +50 -87
  90. package/dist/components/msa/renderBoxFeatureCanvasBlock.js.map +1 -1
  91. package/dist/components/msa/renderHighlights.d.ts +15 -13
  92. package/dist/components/msa/renderHighlights.js +43 -20
  93. package/dist/components/msa/renderHighlights.js.map +1 -1
  94. package/dist/components/msa/renderMSABlock.js +12 -12
  95. package/dist/components/msa/renderMSABlock.js.map +1 -1
  96. package/dist/components/msa/tileColor.js +4 -7
  97. package/dist/components/msa/tileColor.js.map +1 -1
  98. package/dist/components/msa/useMsaBlockMouse.d.ts +5 -3
  99. package/dist/components/msa/useMsaBlockMouse.js +6 -6
  100. package/dist/components/msa/useMsaBlockMouse.js.map +1 -1
  101. package/dist/components/rowpanels/RowPanelBlock.d.ts +9 -0
  102. package/dist/components/rowpanels/RowPanelBlock.js +86 -0
  103. package/dist/components/rowpanels/RowPanelBlock.js.map +1 -0
  104. package/dist/components/rowpanels/RowPanelHeaders.d.ts +12 -0
  105. package/dist/components/rowpanels/RowPanelHeaders.js +38 -0
  106. package/dist/components/rowpanels/RowPanelHeaders.js.map +1 -0
  107. package/dist/components/{msa/ColumnStats.d.ts → rowpanels/RowPanels.d.ts} +2 -2
  108. package/dist/components/rowpanels/RowPanels.js +32 -0
  109. package/dist/components/rowpanels/RowPanels.js.map +1 -0
  110. package/dist/components/rowpanels/headerLayout.d.ts +1 -0
  111. package/dist/components/rowpanels/headerLayout.js +5 -0
  112. package/dist/components/rowpanels/headerLayout.js.map +1 -0
  113. package/dist/components/rowpanels/renderFeaturePanel.d.ts +21 -0
  114. package/dist/components/rowpanels/renderFeaturePanel.js +37 -0
  115. package/dist/components/rowpanels/renderFeaturePanel.js.map +1 -0
  116. package/dist/components/rowpanels/renderRowPanel.d.ts +23 -0
  117. package/dist/components/rowpanels/renderRowPanel.js +22 -0
  118. package/dist/components/rowpanels/renderRowPanel.js.map +1 -0
  119. package/dist/components/rowpanels/renderStrip.d.ts +20 -0
  120. package/dist/components/rowpanels/renderStrip.js +26 -0
  121. package/dist/components/rowpanels/renderStrip.js.map +1 -0
  122. package/dist/components/tracks/TrackBlocks.js +3 -5
  123. package/dist/components/tracks/TrackBlocks.js.map +1 -1
  124. package/dist/components/tracks/TrackTooltipContent.d.ts +15 -0
  125. package/dist/components/tracks/TrackTooltipContent.js +109 -0
  126. package/dist/components/tracks/TrackTooltipContent.js.map +1 -0
  127. package/dist/components/tracks/drawTracks.d.ts +4 -4
  128. package/dist/components/tracks/drawTracks.js +25 -39
  129. package/dist/components/tracks/drawTracks.js.map +1 -1
  130. package/dist/components/tracks/useTrackHover.d.ts +22 -0
  131. package/dist/components/tracks/useTrackHover.js +30 -0
  132. package/dist/components/tracks/useTrackHover.js.map +1 -0
  133. package/dist/components/tree/CladeLabels.d.ts +12 -0
  134. package/dist/components/tree/CladeLabels.js +48 -0
  135. package/dist/components/tree/CladeLabels.js.map +1 -0
  136. package/dist/components/tree/TreeBranchMenu.js +1 -1
  137. package/dist/components/tree/TreeBranchMenu.js.map +1 -1
  138. package/dist/components/tree/TreeCanvas.js +5 -4
  139. package/dist/components/tree/TreeCanvas.js.map +1 -1
  140. package/dist/components/tree/TreeCanvasBlock.js +4 -21
  141. package/dist/components/tree/TreeCanvasBlock.js.map +1 -1
  142. package/dist/components/tree/TreeNodeMenu.js +1 -1
  143. package/dist/components/tree/TreeNodeMenu.js.map +1 -1
  144. package/dist/components/tree/TreeOverview.d.ts +14 -0
  145. package/dist/components/tree/TreeOverview.js +75 -0
  146. package/dist/components/tree/TreeOverview.js.map +1 -0
  147. package/dist/components/tree/TreeRuler.js +9 -13
  148. package/dist/components/tree/TreeRuler.js.map +1 -1
  149. package/dist/components/tree/cladeBrackets.d.ts +25 -0
  150. package/dist/components/tree/cladeBrackets.js +51 -0
  151. package/dist/components/tree/cladeBrackets.js.map +1 -0
  152. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js +2 -2
  153. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js.map +1 -1
  154. package/dist/components/tree/renderTreeCanvas.js +160 -25
  155. package/dist/components/tree/renderTreeCanvas.js.map +1 -1
  156. package/dist/components/tree/renderTreeOverview.d.ts +52 -0
  157. package/dist/components/tree/renderTreeOverview.js +138 -0
  158. package/dist/components/tree/renderTreeOverview.js.map +1 -0
  159. package/dist/components/tree/useTreeHover.js +2 -4
  160. package/dist/components/tree/useTreeHover.js.map +1 -1
  161. package/dist/constants.d.ts +16 -0
  162. package/dist/constants.js +52 -22
  163. package/dist/constants.js.map +1 -1
  164. package/dist/createPaletteMap.d.ts +7 -6
  165. package/dist/createPaletteMap.js +10 -9
  166. package/dist/createPaletteMap.js.map +1 -1
  167. package/dist/element.d.ts +13 -0
  168. package/dist/element.js +269 -0
  169. package/dist/element.js.map +1 -0
  170. package/dist/featureFields.d.ts +11 -0
  171. package/dist/featureFields.js +17 -0
  172. package/dist/featureFields.js.map +1 -0
  173. package/dist/flatToTree.js +1 -2
  174. package/dist/flatToTree.js.map +1 -1
  175. package/dist/ggplotPalettes.d.ts +10 -0
  176. package/dist/ggplotPalettes.js +58 -0
  177. package/dist/ggplotPalettes.js.map +1 -1
  178. package/dist/hierarchy.d.ts +27 -0
  179. package/dist/hierarchy.js +66 -9
  180. package/dist/hierarchy.js.map +1 -1
  181. package/dist/index.d.ts +9 -1
  182. package/dist/index.js +5 -3
  183. package/dist/index.js.map +1 -1
  184. package/dist/model/DataModel.js +2 -5
  185. package/dist/model/DataModel.js.map +1 -1
  186. package/dist/model/msaModel.d.ts +3 -2
  187. package/dist/model/msaModel.js +3 -2
  188. package/dist/model/msaModel.js.map +1 -1
  189. package/dist/model/treeModel.d.ts +30 -0
  190. package/dist/model/treeModel.js +37 -1
  191. package/dist/model/treeModel.js.map +1 -1
  192. package/dist/model.d.ts +549 -294
  193. package/dist/model.js +1412 -621
  194. package/dist/model.js.map +1 -1
  195. package/dist/mount.d.ts +11 -0
  196. package/dist/mount.js +22 -0
  197. package/dist/mount.js.map +1 -0
  198. package/dist/neighborJoining.js +8 -32
  199. package/dist/neighborJoining.js.map +1 -1
  200. package/dist/renderToStaticMarkup.d.ts +10 -19
  201. package/dist/renderToStaticMarkup.js +13 -24
  202. package/dist/renderToStaticMarkup.js.map +1 -1
  203. package/dist/renderToSvg.js +180 -56
  204. package/dist/renderToSvg.js.map +1 -1
  205. package/dist/rowCoordinateCalculations.d.ts +4 -6
  206. package/dist/rowCoordinateCalculations.js +4 -6
  207. package/dist/rowCoordinateCalculations.js.map +1 -1
  208. package/dist/scales.d.ts +22 -0
  209. package/dist/scales.js +30 -0
  210. package/dist/scales.js.map +1 -0
  211. package/dist/seqPosToGlobalCol.d.ts +2 -3
  212. package/dist/seqPosToGlobalCol.js +2 -3
  213. package/dist/seqPosToGlobalCol.js.map +1 -1
  214. package/dist/sequenceLogo.d.ts +6 -11
  215. package/dist/sequenceLogo.js +6 -11
  216. package/dist/sequenceLogo.js.map +1 -1
  217. package/dist/stripDefault.d.ts +7 -14
  218. package/dist/stripDefault.js +7 -14
  219. package/dist/stripDefault.js.map +1 -1
  220. package/dist/svgTestUtil.d.ts +186 -70
  221. package/dist/types.d.ts +221 -21
  222. package/dist/umd.d.ts +2 -0
  223. package/dist/umd.js +4 -2
  224. package/dist/umd.js.map +1 -1
  225. package/dist/useCanvasAutorun.d.ts +5 -10
  226. package/dist/useCanvasAutorun.js +5 -10
  227. package/dist/useCanvasAutorun.js.map +1 -1
  228. package/dist/useMsaSvgFigure.d.ts +20 -0
  229. package/dist/useMsaSvgFigure.js +46 -0
  230. package/dist/useMsaSvgFigure.js.map +1 -0
  231. package/dist/useWheelScroll.js +0 -4
  232. package/dist/useWheelScroll.js.map +1 -1
  233. package/dist/util.d.ts +5 -6
  234. package/dist/util.js +13 -6
  235. package/dist/util.js.map +1 -1
  236. package/dist/version.d.ts +1 -1
  237. package/dist/version.js +1 -1
  238. package/package.json +19 -12
  239. package/src/calculateBlocks.ts +5 -3
  240. package/src/colorSchemes.ts +1 -2
  241. package/src/columnStats.ts +58 -0
  242. package/src/components/DragHandle.tsx +18 -7
  243. package/src/components/Loading.tsx +4 -36
  244. package/src/components/MSAView.tsx +19 -5
  245. package/src/components/MSAViewer.tsx +240 -28
  246. package/src/components/PortalTooltip.tsx +47 -0
  247. package/src/components/ResizeHandles.tsx +17 -32
  248. package/src/components/SequenceTextArea.tsx +3 -4
  249. package/src/components/Track.tsx +57 -19
  250. package/src/components/dialogs/AboutDialog.tsx +35 -6
  251. package/src/components/dialogs/AnnotationFileDialog.tsx +10 -1
  252. package/src/components/dialogs/ExportSVGDialog.tsx +8 -3
  253. package/src/components/dialogs/FeatureDialog.tsx +11 -3
  254. package/src/components/dialogs/TrackInfoDialog.tsx +1 -1
  255. package/src/components/header/GappynessSlider.tsx +6 -11
  256. package/src/components/header/Header.tsx +7 -1
  257. package/src/components/header/LoadWarnings.tsx +11 -25
  258. package/src/components/header/ScrollZoomIcons.tsx +52 -0
  259. package/src/components/header/TreeSettingsMenu.tsx +1 -3
  260. package/src/components/header/UnshareableDataWarning.tsx +2 -4
  261. package/src/components/header/ZoomControls.tsx +74 -14
  262. package/src/components/header/getAnnotationsMenu.ts +3 -6
  263. package/src/components/header/settingsMenuItems.ts +13 -8
  264. package/src/components/import/ImportForm.tsx +3 -5
  265. package/src/components/import/ImportFormExamples.tsx +2 -2
  266. package/src/components/import/util.ts +1 -2
  267. package/src/components/minimap/Minimap.tsx +1 -2
  268. package/src/components/msa/AnnotationLegend.tsx +48 -38
  269. package/src/components/msa/MSACanvas.tsx +3 -8
  270. package/src/components/msa/MSACanvasBlock.tsx +13 -16
  271. package/src/components/msa/MSAMouseoverCanvas.tsx +2 -1
  272. package/src/components/msa/domainBandCursor.ts +7 -11
  273. package/src/components/msa/drawFeatureSpans.ts +205 -0
  274. package/src/components/msa/legendRows.ts +24 -0
  275. package/src/components/msa/msaRaster.ts +30 -39
  276. package/src/components/msa/packDomainLanes.ts +36 -0
  277. package/src/components/msa/renderBoxFeatureCanvasBlock.ts +67 -123
  278. package/src/components/msa/renderHighlights.ts +53 -20
  279. package/src/components/msa/renderMSABlock.ts +14 -11
  280. package/src/components/msa/tileColor.ts +4 -7
  281. package/src/components/msa/useMsaBlockMouse.ts +6 -6
  282. package/src/components/rowpanels/RowPanelBlock.tsx +139 -0
  283. package/src/components/rowpanels/RowPanelHeaders.tsx +57 -0
  284. package/src/components/rowpanels/RowPanels.tsx +77 -0
  285. package/src/components/rowpanels/headerLayout.ts +5 -0
  286. package/src/components/rowpanels/renderFeaturePanel.ts +66 -0
  287. package/src/components/rowpanels/renderRowPanel.ts +41 -0
  288. package/src/components/rowpanels/renderStrip.ts +46 -0
  289. package/src/components/tracks/TrackBlocks.tsx +3 -5
  290. package/src/components/tracks/TrackTooltipContent.tsx +156 -0
  291. package/src/components/tracks/drawTracks.ts +25 -50
  292. package/src/components/tracks/useTrackHover.ts +42 -0
  293. package/src/components/tree/CladeLabels.tsx +77 -0
  294. package/src/components/tree/TreeBranchMenu.tsx +1 -2
  295. package/src/components/tree/TreeCanvas.tsx +2 -3
  296. package/src/components/tree/TreeCanvasBlock.tsx +8 -32
  297. package/src/components/tree/TreeNodeMenu.tsx +1 -2
  298. package/src/components/tree/TreeOverview.tsx +106 -0
  299. package/src/components/tree/TreeRuler.tsx +11 -22
  300. package/src/components/tree/cladeBrackets.ts +73 -0
  301. package/src/components/tree/dialogs/TreeNodeInfoDialog.tsx +2 -2
  302. package/src/components/tree/renderTreeCanvas.ts +242 -21
  303. package/src/components/tree/renderTreeOverview.ts +212 -0
  304. package/src/components/tree/useTreeHover.ts +2 -4
  305. package/src/constants.ts +61 -22
  306. package/src/createPaletteMap.ts +10 -9
  307. package/src/element.ts +321 -0
  308. package/src/featureFields.ts +19 -0
  309. package/src/flatToTree.ts +1 -2
  310. package/src/ggplotPalettes.ts +60 -0
  311. package/src/hierarchy.ts +77 -9
  312. package/src/index.ts +31 -7
  313. package/src/model/DataModel.ts +2 -5
  314. package/src/model/msaModel.ts +3 -2
  315. package/src/model/treeModel.ts +42 -0
  316. package/src/model.ts +1677 -643
  317. package/src/mount.tsx +32 -0
  318. package/src/neighborJoining.ts +8 -32
  319. package/src/renderToStaticMarkup.ts +13 -24
  320. package/src/renderToSvg.tsx +335 -68
  321. package/src/rowCoordinateCalculations.ts +4 -6
  322. package/src/scales.ts +47 -0
  323. package/src/seqPosToGlobalCol.ts +2 -3
  324. package/src/sequenceLogo.ts +6 -11
  325. package/src/stripDefault.ts +7 -14
  326. package/src/types.ts +260 -45
  327. package/src/umd.ts +4 -2
  328. package/src/useCanvasAutorun.ts +5 -10
  329. package/src/useMsaSvgFigure.ts +72 -0
  330. package/src/useWheelScroll.ts +0 -4
  331. package/src/util.ts +15 -6
  332. package/src/version.ts +1 -1
  333. package/dist/components/msa/ColumnStats.js +0 -42
  334. package/dist/components/msa/ColumnStats.js.map +0 -1
  335. package/src/components/msa/ColumnStats.tsx +0 -54
package/dist/model.d.ts CHANGED
@@ -1,24 +1,23 @@
1
+ import type { ColumnStats } from './columnStats.ts';
2
+ import type { ScrollZoomAxis } from './constants.ts';
1
3
  import type { HierarchyNode } from './hierarchy.ts';
2
4
  import type { ExportSvgOptions } from './renderToSvg.tsx';
3
- import type { Annotation, Arc, BasicTrack, ResidueMappingProblem, ColumnTrackSpec, DomainBand, Highlight, NodeWithIds, NodeWithIdsAndLength, ResidueMapping, ResolvedHighlight, RowResidue, StructureResidue, UnshareableData } from './types.ts';
5
+ import type { Annotation, Arc, BasicTrack, Cell, Clade, ResidueMappingProblem, ColumnTrackSpec, DomainBand, Encoding, Highlight, Legend, NodeWithIds, NodeWithIdsAndLength, Region, ResidueMapping, ResolvedClade, ResolvedEncoding, ResolvedHighlight, ResolvedRowPanel, RowPanelSpec, RowResidue, StructureResidue, TrackKind, UnshareableData, Viewport } from './types.ts';
4
6
  import type { FileLocation as FileLocationType } from '@jbrowse/core/util/types';
5
7
  import type { Instance } from '@jbrowse/mobx-state-tree';
6
8
  import type { InterProScanResults } from 'msa-parsers';
9
+ export declare const defaultTrackHeights: Partial<Record<TrackKind, number>>;
7
10
  /**
8
11
  * The snapshot properties reset() carries across a return to the import form:
9
12
  * display preferences and layout, nothing derived from the loaded file.
10
13
  *
11
- * reset() applies a default snapshot filtered to this list, so the list is the
12
- * whole decision: a property left off it resets to its default, a visible and
13
- * benign failure. The previous shape — a hand-maintained list of things to
14
- * CLEAR — failed in the dangerous direction: a forgotten property silently
15
- * carried the previous file's state into the next one, and because node ids
16
- * are path-derived (node-0-0-1), a stale `collapsed` or `showOnly` id matched
17
- * a real node in the new tree and folded it. Downstream composed properties
18
- * (e.g. the jbrowse plugin's) are not on the list, so they reset too.
14
+ * reset() applies a default snapshot filtered to this list, so any property
15
+ * left off it resets, including downstream composed ones (e.g. the jbrowse
16
+ * plugin's). Node ids are path-derived (node-0-0-1), so a carried-over
17
+ * `collapsed` or `showOnly` id would match a real node in the next tree and
18
+ * fold it.
19
19
  *
20
- * Exported for modelReset.test.ts, which checks that everything off this list
21
- * matches a freshly created model after reset().
20
+ * Exported for modelReset.test.ts.
22
21
  */
23
22
  export declare const preservedOnReset: Set<string>;
24
23
  /**
@@ -41,7 +40,7 @@ export declare const preservedOnReset: Set<string>;
41
40
  * root.view.setData({ msa: '>seq1\nACGT\n>seq2\nACGT' })
42
41
  * ```
43
42
  */
44
- declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawTree" | "labelsAlignRight" | "showBranchLen" | "treeAreaWidth" | "treeWidth"> & {
43
+ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeWidth"> & {
45
44
  drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
46
45
  labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
47
46
  treeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
@@ -49,13 +48,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
49
48
  showBranchLen: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
50
49
  drawTree: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
51
50
  drawNodeBubbles: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
51
+ drawNodeLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
52
+ showTreeOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
53
+ overviewHeight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
52
54
  autoTreeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
53
55
  }, "bgColor" | "colorSchemeName" | "msaFormat" | "showColumnStats"> & {
54
56
  bgColor: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
55
57
  colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
56
58
  showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
57
59
  msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
58
- }, "allowedGappyness" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "relativeTo" | "residueMappings" | "rowHeight" | "scrollX" | "scrollY" | "scrollZoom" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "treeFilehandle" | "treeMetadataFilehandle" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
60
+ }, "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "encodings" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "relativeTo" | "residueMappings" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
59
61
  /**
60
62
  * #property
61
63
  * id of view, randomly generated if not provided
@@ -68,10 +70,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
68
70
  /**
69
71
  * #property
70
72
  * whether the domain legend is expanded. The legend floats over the
71
- * top-right of the alignment, so on a tall panel it covers real
72
- * residues -- persisting the state is what lets a reader collapse it
73
- * and keep it collapsed, and what lets a session or a figure open with
74
- * it already out of the way.
73
+ * top-right of the alignment and covers residues, so a session or
74
+ * figure can open with it collapsed.
75
75
  */
76
76
  showDomainLegend: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
77
77
  /**
@@ -90,7 +90,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
90
90
  * #property
91
91
  * hardcoded view type
92
92
  */
93
- type: import("@jbrowse/mobx-state-tree").ISimpleType<"MsaView">;
93
+ type: import("@jbrowse/mobx-state-tree").ILiteralType<"MsaView">;
94
94
  /**
95
95
  * #property
96
96
  */
@@ -100,6 +100,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
100
100
  * zoom in/out on plain mouse-wheel without holding ctrl
101
101
  */
102
102
  scrollZoom: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
103
+ /**
104
+ * #property
105
+ * which cell dimensions a wheel zoom scales, while `scrollZoom` is on
106
+ */
107
+ scrollZoomAxis: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<"both" | "horizontal" | "vertical">, [undefined]>;
103
108
  /**
104
109
  * #property
105
110
  * height of the div containing the view, px
@@ -543,18 +548,25 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
543
548
  turnedOffTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
544
549
  /**
545
550
  * #property
546
- * tracks supplied as data rather than computed from the alignment:
547
- * per-column values drawn as bars, or a per-column string drawn as a
548
- * text track. See docs/layers.md
551
+ * the height of every track one divider resizes, keyed by `heightKey`:
552
+ * the `kind` for the computed tracks, `own:<id>` for a data track. A
553
+ * key is absent until the user drags that divider, and
554
+ * `defaultTrackHeights` answers for it until then, so an untouched
555
+ * viewer adds nothing to the shared URL.
556
+ */
557
+ trackHeights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<number>>, [undefined]>;
558
+ /**
559
+ * #property
560
+ * tracks supplied as data: per-column values drawn as bars, or a
561
+ * per-column string drawn as a text track. See docs/layers.md
549
562
  */
550
563
  columnTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<ColumnTrackSpec, ColumnTrackSpec, ColumnTrackSpec>>, [undefined]>;
551
564
  /**
552
565
  * #property
553
- * which residue of which structure each row's residues are, as data.
554
- * The viewer cannot infer this -- matching a row to a structure by
555
- * sequence equality fails for a tagged construct, a truncation or a
556
- * subsequence row, and fails in the direction that looks like it
557
- * worked -- so it arrives computed. See docs/layers.md
566
+ * row-to-structure residue correspondence, computed outside the viewer
567
+ * (e.g. from SIFTS). Matching by sequence equality places a tagged
568
+ * construct, a truncation or a subsequence row on the wrong residue.
569
+ * See docs/layers.md
558
570
  */
559
571
  residueMappings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<ResidueMapping, ResidueMapping, ResidueMapping>>, [undefined]>;
560
572
  /**
@@ -578,10 +590,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
578
590
  /**
579
591
  * #property
580
592
  * the user's explicit hide choices per annotation accession, keyed by
581
- * accession with the value meaning "off", the same shape as
582
- * `turnedOffTracks`. An accession the user has never touched is absent
583
- * and drawn, so a file of two hundred domain types adds nothing to the
584
- * shared URL until someone filters one out
593
+ * accession with the value meaning "off", like `turnedOffTracks`. An
594
+ * untouched accession is absent and drawn, so the shared URL grows
595
+ * only with the user's filters
585
596
  */
586
597
  turnedOffFeatures: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
587
598
  /**
@@ -602,9 +613,34 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
602
613
  * labeled highlights in 1-based inclusive coordinates: a column span
603
614
  * `{start, end}`, a residue span `{row, start, end}` of a named row,
604
615
  * or a row set `{rows}`, each with an optional `label` and `color`.
605
- * Persists in the snapshot, so a computed answer travels in the URL.
616
+ * Persists in the snapshot and the URL.
606
617
  */
607
618
  highlights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Highlight, Highlight, Highlight>>, [undefined]>;
619
+ /**
620
+ * #property
621
+ * clades of the tree with a mark drawn over them. `mrca` names tips
622
+ * whose common ancestor is the clade, or `range` its first and last
623
+ * tip in display order, and `tips` is the leaf count the producer
624
+ * measured. `mark` is `highlight`, `bracket`, `collapse` or `focus`.
625
+ * See docs/layers.md
626
+ */
627
+ clades: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Clade, Clade, Clade>>, [undefined]>;
628
+ /**
629
+ * #property
630
+ * what the viewer's own marks read from `rowData`:
631
+ * `{channel, field, scale?}` per channel, where `channel` is
632
+ * `tipLabel` or `rowTint`. See docs/layers.md
633
+ */
634
+ encodings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Encoding, Encoding, Encoding>>, [undefined]>;
635
+ /**
636
+ * #property
637
+ * panels drawn between the tree and the alignment:
638
+ * `{kind: "strip", field, scale?, width?, header?}` colors one cell
639
+ * per row from a `rowData` field, and
640
+ * `{kind: "features", x, encoding?, transform?, width?, header?}`
641
+ * draws the spans the GFF carries. See docs/layers.md
642
+ */
643
+ rowPanels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<RowPanelSpec, RowPanelSpec, RowPanelSpec>>, [undefined]>;
608
644
  }, {
609
645
  queueOfDialogs: [import("@jbrowse/core/util").DialogComponentType, any][];
610
646
  } & {
@@ -621,6 +657,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
621
657
  setAutoTreeAreaWidth(arg: boolean): void;
622
658
  setShowBranchLen(arg: boolean): void;
623
659
  setDrawNodeBubbles(arg: boolean): void;
660
+ setDrawNodeLabels(arg: boolean): void;
661
+ setShowTreeOverview(arg: boolean): void;
662
+ setOverviewHeight(n: number): void;
624
663
  setDrawLabels(arg: boolean): void;
625
664
  } & {
626
665
  setColorSchemeName(name: string): void;
@@ -632,6 +671,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
632
671
  * #volatile
633
672
  */
634
673
  headerHeight: number;
674
+ /**
675
+ * #volatile
676
+ * leaves the toolbar out, for a host drawing its own controls. Kept out
677
+ * of the snapshot so a link opened in the full app shows the toolbar.
678
+ */
679
+ hideHeader: boolean;
635
680
  /**
636
681
  * #volatile
637
682
  */
@@ -641,9 +686,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
641
686
  } | undefined;
642
687
  /**
643
688
  * #volatile
644
- * high resolution scale factor, helps make canvas look better on hi-dpi
645
- * screens. derived from the device pixel ratio so canvases are crisp on
646
- * retina/4k displays and not needlessly oversized on standard ones
689
+ * canvas scale factor, from the device pixel ratio
647
690
  */
648
691
  highResScaleFactor: number;
649
692
  /**
@@ -703,40 +746,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
703
746
  highlightedColumns: number[] | undefined;
704
747
  /**
705
748
  * #volatile
706
- * transient highlights keyed by who asked for them. One slot cannot hold
707
- * two sources -- a structure viewer's hover and a genome view's hover
708
- * both want to point at a column, and with one slot whoever clears last
709
- * erases the other's. Keyed by owner, each source adds and removes only
710
- * its own. Not persisted: a hover is not part of the document.
749
+ * transient highlights keyed by owner, so a structure viewer's hover and
750
+ * a genome view's hover each clear only their own. Not persisted.
711
751
  */
712
752
  transientHighlights: Record<string, Highlight[]>;
713
753
  /**
714
754
  * #volatile
715
755
  */
716
756
  minimapHeight: number;
717
- /**
718
- * #volatile
719
- */
720
- conservationTrackHeight: number;
721
- /**
722
- * #volatile
723
- * heights of individual `columnTracks`, by track id. A data track is
724
- * resized on its own: the shared per-kind heights below belong to the
725
- * tracks the viewer computes, and dragging a data track's handle used to
726
- * resize those instead.
727
- */
728
- columnTrackHeights: Record<string, number>;
729
- /**
730
- * #volatile
731
- * taller than the conservation track by default: the logo spends its
732
- * height on stacked glyphs, and a 40px stack of four residues leaves each
733
- * one too short to identify
734
- */
735
- sequenceLogoTrackHeight: number;
736
- /**
737
- * #volatile
738
- */
739
- arcTrackHeight: number;
740
757
  /**
741
758
  * #volatile
742
759
  */
@@ -747,33 +764,28 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
747
764
  error: unknown;
748
765
  /**
749
766
  * #volatile
750
- * load problems the view carried on through: an optional layer that did
751
- * not arrive, an overlay that did not parse. `error` is the other kind --
752
- * it replaces the view, which is right for the alignment and wrong for a
753
- * decorative file
767
+ * non-fatal load problems: an optional layer that failed to load, an
768
+ * overlay that failed to parse. `error` replaces the view and is for the
769
+ * alignment itself
754
770
  */
755
771
  warnings: string[];
756
772
  /**
757
773
  * #volatile
758
- * bumped by reset(). The React error boundary above the view keeps its
759
- * caught error until it is remounted, so "Return to import form" did
760
- * nothing after a render error until this became its key
774
+ * bumped by reset(). The error boundary above the view uses it as its key,
775
+ * since the boundary keeps its caught error until remounted
761
776
  */
762
777
  resetCount: number;
763
778
  /**
764
779
  * #volatile
765
- * set by a host that restores the loaded documents by its own means --
766
- * a jbrowse session that holds them, a page that refetches them on load.
767
- * `unshareableData` then reports nothing, since what it warns about is a
768
- * link that opens empty, and under such a host the link does not
780
+ * set by a host that restores the loaded documents itself, such as a
781
+ * jbrowse session or a page that refetches them. `unshareableData` then
782
+ * reports nothing
769
783
  */
770
784
  hostCarriesData: boolean;
771
785
  /**
772
786
  * #volatile
773
- * overlay annotations drawn on the alignment, whatever their source.
774
- * Every source -- InterProScan, GFF, a user upload -- converts to this
775
- * flat list before it reaches the model, so nothing downstream of here
776
- * knows which one it came from
787
+ * overlay annotations drawn on the alignment. InterProScan JSON, GFF and
788
+ * user uploads all convert to this flat list
777
789
  */
778
790
  annotations: Annotation[];
779
791
  } & {
@@ -806,8 +818,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
806
818
  setWidth(arg: number): void;
807
819
  /**
808
820
  * #action
809
- * high-res scale factor, tracks the device pixel ratio so canvases stay
810
- * crisp when the window moves between monitors or the browser zooms
821
+ * update the canvas scale factor when the device pixel ratio changes
822
+ * (moving between monitors, browser zoom)
811
823
  */
812
824
  setHighResScaleFactor(arg: number): void;
813
825
  /**
@@ -822,8 +834,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
822
834
  setError(error?: unknown): void;
823
835
  /**
824
836
  * #action
825
- * report something the view survived: a layer that failed to load, a
826
- * file that failed to parse
837
+ * record a non-fatal load problem: a layer that failed to load, a file
838
+ * that failed to parse. A message already on the list is not added again
827
839
  */
828
840
  addWarning(warning: string): void;
829
841
  /**
@@ -833,25 +845,25 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
833
845
  /**
834
846
  * #action
835
847
  * declare that this host restores the loaded documents itself, which
836
- * takes down the "Not in the link" warning. See `hostCarriesData`
848
+ * hides the "Not in the link" warning. See `hostCarriesData`
837
849
  */
838
850
  setHostCarriesData(arg: boolean): void;
839
851
  /**
840
852
  * #action
841
853
  * set mouse position (row, column) in the MSA
842
854
  *
843
- * PUBLIC API: a host drives this (and reads the `mouseCol` volatile) to
844
- * sync the alignment's hover with a view of its own -- a genome view, a
845
- * 3D structure. Keep the name and signature stable.
855
+ * Public API: a host calls this (and reads `mouseCol`) to sync hover with
856
+ * its own view, such as a genome view or 3D structure. Keep the name and
857
+ * signature stable.
846
858
  */
847
859
  setMousePos(col?: number, row?: number): void;
848
860
  /**
849
861
  * #action
850
862
  * set highlighted columns
851
863
  *
852
- * PUBLIC API: jbrowse-plugin-msaview calls this from its
853
- * afterCreateAutoruns to highlight alignment columns, and MSAViewer
854
- * passes its `highlightColumns` prop through it. Not dead code.
864
+ * Public API: jbrowse-plugin-msaview calls this from its
865
+ * afterCreateAutoruns, and MSAViewer passes its `highlightColumns` prop
866
+ * through it.
855
867
  */
856
868
  setHighlightedColumns(columns?: number[]): void;
857
869
  /**
@@ -860,15 +872,18 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
860
872
  setHighlights(highlights: Highlight[]): void;
861
873
  /**
862
874
  * #action
863
- * show `highlights` on behalf of `owner`, replacing whatever that owner
864
- * showed before and leaving every other owner's alone. The object is
865
- * replaced rather than mutated so one assignment is the observable
866
- * change.
875
+ * replace the clades the viewer marks (see docs/layers.md)
876
+ */
877
+ setClades(clades: Clade[]): void;
878
+ /**
879
+ * #action
880
+ * show `highlights` for `owner`, replacing that owner's previous ones and
881
+ * leaving other owners' in place
867
882
  */
868
883
  applyHighlight(owner: string, highlights: Highlight[]): void;
869
884
  /**
870
885
  * #action
871
- * drop what `owner` was showing, leaving every other owner's in place
886
+ * remove `owner`'s highlights, leaving other owners' in place
872
887
  */
873
888
  clearHighlight(owner: string): void;
874
889
  /**
@@ -902,10 +917,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
902
917
  setColWidth(n: number): void;
903
918
  /**
904
919
  * #action
905
- * switch to another alignment of a multi-alignment file (Stockholm). The
906
- * new alignment has its own rows and its own tree, so everything naming
907
- * the old one's -- the collapsed node ids, the subtree in focus, the
908
- * reference row, the scroll position -- goes with it
920
+ * switch to another alignment of a multi-alignment file (Stockholm).
921
+ * Clears the collapsed node ids, the subtree in focus, the reference row
922
+ * and the scroll position, which all refer to the previous alignment
909
923
  */
910
924
  setCurrentAlignment(n: number): void;
911
925
  /**
@@ -960,11 +974,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
960
974
  setTreeMetadata(result: string): void;
961
975
  /**
962
976
  * #action
963
- * keep the GFF text the way the alignment and the tree are kept, rather
964
- * than only its parsed annotations. The annotations are volatile, so a
965
- * file opened from disk used to leave no trace in the snapshot at all --
966
- * not the text, and not the filehandle, which is cleared once a blob is
967
- * read. An autorun parses this back into annotations.
977
+ * store the GFF text in the snapshot like the alignment and tree. The
978
+ * parsed annotations are volatile and a blob filehandle is cleared once
979
+ * read, so the text is the only persisted copy. An autorun parses it
980
+ * into annotations.
968
981
  */
969
982
  setGFF(result: string): void;
970
983
  } & {
@@ -983,16 +996,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
983
996
  readonly actuallyShowDomains: boolean;
984
997
  /**
985
998
  * #getter
986
- * whether this host brings the loaded documents back by means the
987
- * snapshot cannot see, which is what decides whether `unshareableData`
988
- * has anything to warn about.
999
+ * whether the host restores the loaded documents outside the snapshot.
1000
+ * When true, `unshareableData` is empty.
989
1001
  *
990
- * A simple host flips the `hostCarriesData` volatile. A host whose
991
- * answer depends on how the view was opened overrides this getter in a
992
- * `.views` block of its own composed model -- jbrowse-plugin-msaview's
993
- * indexed-location views refetch from a URL the session holds, while its
994
- * data-store views really are absent from a link someone pastes
995
- * elsewhere. `unshareableData` reads it off `self`, so an override wins.
1002
+ * A simple host sets `hostCarriesData`. A host where this depends on how
1003
+ * the view was opened overrides the getter in its own composed model's
1004
+ * `.views` block; jbrowse-plugin-msaview's indexed-location views refetch
1005
+ * from a URL the session holds, while its data-store views do not.
1006
+ * `unshareableData` reads it off `self`, so an override takes effect.
996
1007
  */
997
1008
  readonly hostRestoresData: boolean;
998
1009
  readonly viewInitialized: boolean;
@@ -1031,33 +1042,40 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1031
1042
  readonly noDomains: boolean;
1032
1043
  /**
1033
1044
  * #getter
1034
- * the loaded documents this view's own snapshot cannot carry, largest
1035
- * first. A file opened from disk or pasted in becomes inline text, and
1036
- * DataModel drops an inline document past `maxInlineSnapshotBytes`
1037
- * rather than put megabytes of sequence into a session or a URL.
1045
+ * loaded documents left out of the snapshot, largest first. A file opened
1046
+ * from disk or pasted in becomes inline text, and DataModel drops an
1047
+ * inline document past `maxInlineSnapshotBytes`.
1038
1048
  *
1039
- * Dropping it is right. Dropping it silently is what makes a copied link
1040
- * open an empty viewer, so the header says so and the standalone app
1041
- * stops rewriting the address bar while this is non-empty. A document
1042
- * fetched from a URL never appears here whatever its size: the snapshot
1043
- * keeps the filehandle and refetches through it.
1049
+ * The header lists these, and the standalone app stops rewriting the
1050
+ * address bar while the list is non-empty, so a copied link does not
1051
+ * open an empty viewer unannounced. A document fetched from a URL never
1052
+ * appears here, since the snapshot keeps its filehandle.
1044
1053
  *
1045
- * Nothing is unshareable when the host restores the data by its own
1046
- * means (see `hostRestoresData`) -- inside a session that reloads these
1047
- * documents from somewhere the snapshot does not show, the warning is
1048
- * simply wrong.
1054
+ * Empty when `hostRestoresData` is true.
1049
1055
  */
1050
1056
  readonly unshareableData: UnshareableData[];
1051
1057
  menuItems(): never[];
1052
1058
  /**
1053
1059
  * #getter
1054
- * extra per-row attributes, keyed by row name. Parsed defensively: the
1055
- * source is a user-supplied document (treeMetadataFilehandle, or a
1056
- * session snapshot), and this computed is read by labelWidthMap on every
1057
- * layout, so a malformed file would otherwise throw out of rendering and
1058
- * take the whole view down over a decorative field.
1060
+ * the row table: extra fields per row, keyed by row name, which the
1061
+ * `encodings` channels read. It is stored as the JSON string
1062
+ * `data.treeMetadata`, the name that travels in existing links, so the
1063
+ * inline size limit and `treeMetadataFilehandle` cover it. labelWidthMap
1064
+ * reads it on every layout, so a malformed user-supplied file returns {}
1065
+ * instead of throwing out of rendering.
1066
+ */
1067
+ readonly rowData: Record<string, Record<string, string> | undefined>;
1068
+ /**
1069
+ * #method
1070
+ * one row's fields, the single reader of the row table
1071
+ */
1072
+ rowDataOf(name: string): Record<string, string> | undefined;
1073
+ /**
1074
+ * #getter
1075
+ * the field names the row table carries, sorted, for a producer or a UI
1076
+ * choosing one to encode
1059
1077
  */
1060
- readonly treeMetadata: Record<string, Record<string, string> | undefined>;
1078
+ readonly rowFields: string[];
1061
1079
  /**
1062
1080
  * #getter
1063
1081
  */
@@ -1080,6 +1098,22 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1080
1098
  * #getter
1081
1099
  */
1082
1100
  readonly rowNamesSet: Map<string, number>;
1101
+ /**
1102
+ * #getter
1103
+ * `clades` resolved to the rows each one covers. The tip names resolve
1104
+ * against `tree` rather than `root`, so a clade whose ancestor the user
1105
+ * collapsed keeps its rows. One leaf pass over the tree serves every
1106
+ * clade. A `range` record names no node, so `collapse` and `focus`, which
1107
+ * need one, drop it.
1108
+ */
1109
+ readonly resolvedClades: ResolvedClade[];
1110
+ /**
1111
+ * #getter
1112
+ * the pixel column reserved at the right of the tree area for the bracket
1113
+ * mark, which the tip labels and the tree itself stay clear of. Zero
1114
+ * where no clade draws a bar or a label.
1115
+ */
1116
+ readonly cladeGutterWidth: number;
1083
1117
  /**
1084
1118
  * #getter
1085
1119
  */
@@ -1099,11 +1133,70 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1099
1133
  readonly root: HierarchyNode<NodeWithIds>;
1100
1134
  /**
1101
1135
  * #getter
1102
- * widget width minus the tree area gives the space for the MSA
1136
+ * height of the band the tree overview draws in, zero when it is off
1137
+ */
1138
+ readonly treeOverviewHeight: number;
1139
+ /**
1140
+ * #getter
1141
+ * the whole tree laid out for the overview, or undefined when the
1142
+ * overview is off. The focus is left out, so the focused subtree draws
1143
+ * inside the whole tree, and the collapsed clades are folded, since
1144
+ * those are rows the view no longer has. `x` is in tip-index space and
1145
+ * `len` is a fraction of the root-to-tip length, so one layout serves
1146
+ * any band size.
1147
+ */
1148
+ readonly treeOverviewLayout: {
1149
+ root: HierarchyNode<NodeWithIds>;
1150
+ numTips: number;
1151
+ maxDepthToLeaf: number;
1152
+ showBranchLen: boolean;
1153
+ } | undefined;
1154
+ /**
1155
+ * #getter
1156
+ * the `clades` highlights in the overview's own row space, which the
1157
+ * focus does not narrow
1158
+ */
1159
+ readonly treeOverviewClades: ResolvedClade[];
1160
+ /**
1161
+ * #getter
1162
+ * the inclusive tip rows the focused subtree covers in the overview,
1163
+ * which is the box drawn on it. undefined with no focus
1164
+ */
1165
+ readonly treeOverviewFocusRows: [number, number] | undefined;
1166
+ /**
1167
+ * #method
1168
+ * the subtree a point `y` pixels down the tree overview picks: the
1169
+ * deepest one whose tip range covers every row under that pixel, with
1170
+ * the rows it covers. A pixel stands for several tips on a large tree,
1171
+ * which is what keeps the pick off the individual tips. undefined when
1172
+ * the overview is off or the point picks the whole tree.
1173
+ */
1174
+ treeOverviewHit(y: number): {
1175
+ id: string;
1176
+ rows: [number, number];
1177
+ } | undefined;
1178
+ /**
1179
+ * #getter
1180
+ * the pixel column the row panels occupy between the tree and the
1181
+ * alignment, the sum of each record's width
1182
+ */
1183
+ readonly rowPanelsWidth: number;
1184
+ /**
1185
+ * #getter
1186
+ * height of the band the row panel headers draw in, which is zero with
1187
+ * no row panels and leaves the top area as it was
1188
+ */
1189
+ readonly rowPanelsHeaderHeight: 0 | 56;
1190
+ /**
1191
+ * #getter
1192
+ * widget width minus the tree area and the row panels gives the space
1193
+ * for the MSA
1103
1194
  */
1104
1195
  readonly msaAreaWidth: number;
1105
1196
  /**
1106
1197
  * #getter
1198
+ * the right edge the tip labels end at, which is the tree area less the
1199
+ * margin and the bracket gutter
1107
1200
  */
1108
1201
  readonly treeAreaWidthMinusMargin: number;
1109
1202
  /**
@@ -1124,29 +1217,22 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1124
1217
  readonly rows: [string, string][];
1125
1218
  /**
1126
1219
  * #getter
1127
- * number of rows the alignment occupies on screen. This is the leaf count,
1128
- * not `rows.length`: a tree leaf with no matching MSA row still takes up a
1129
- * row of vertical space (drawn blank), so row hit-testing and fit-to-height
1130
- * must count it.
1220
+ * number of rows on screen: the leaf count, which includes tree leaves
1221
+ * with no matching MSA row (drawn blank), unlike `rows.length`.
1131
1222
  */
1132
1223
  readonly numRows: number;
1133
1224
  /**
1134
1225
  * #method
1135
1226
  * index of the global column holding each ungapped sequence position of a
1136
- * row, so seqPos -> column is a lookup rather than a scan. The domain
1137
- * overlay resolves thousands of these per redraw.
1138
- *
1139
- * Built per row, on the row asked for: the first lookup used to index
1140
- * every row in the alignment. The cache is keyed on the parse the rows
1141
- * came from, so a new alignment brings a new one.
1227
+ * row. The domain overlay resolves thousands of these per redraw. Built
1228
+ * lazily per row and cached on the parse.
1142
1229
  */
1143
1230
  seqPosIndex(rowName: string): Int32Array | undefined;
1144
1231
  /**
1145
1232
  * #getter
1146
- * every sequence the alignment holds, keyed by row name, whatever the
1147
- * tree currently shows. `rows` is the rows on screen; this is the rows
1148
- * that exist, and every lookup about a named row goes through it --
1149
- * collapsing a clade hides rows, it does not delete their sequence
1233
+ * every sequence in the alignment, keyed by row name, including rows a
1234
+ * collapsed clade hides. `rows` holds only the rows on screen; lookups
1235
+ * by row name use this
1150
1236
  */
1151
1237
  readonly rowMap: Map<string, string>;
1152
1238
  /**
@@ -1229,17 +1315,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1229
1315
  readonly rootToTipLength: number;
1230
1316
  /**
1231
1317
  * #getter
1232
- * x-position of the farthest tip in a phylogram, px. The layout scales
1233
- * the longest root-to-tip path onto treeWidth, so that is where it lands
1234
- * -- and 0 for a tree carrying no lengths at all, which draws as a
1235
- * cladogram instead
1318
+ * x-position of the farthest tip in a phylogram, px: treeWidth, or 0 for
1319
+ * a tree with no branch lengths (drawn as a cladogram)
1236
1320
  */
1237
1321
  readonly maxBranchLength: number;
1238
1322
  /**
1239
1323
  * #getter
1240
- * pixels per unit of branch length in the current phylogram layout, and 0
1241
- * in cladogram mode, where the x-positions carry no length at all. The
1242
- * scale bar over the tree is drawn from it.
1324
+ * pixels per unit of branch length in the phylogram layout, 0 in
1325
+ * cladogram mode. The tree's scale bar uses it.
1243
1326
  */
1244
1327
  readonly pxPerBranchLength: number;
1245
1328
  /**
@@ -1270,6 +1353,36 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1270
1353
  * #getter
1271
1354
  */
1272
1355
  readonly showTreeText: boolean;
1356
+ } & {
1357
+ /**
1358
+ * #getter
1359
+ * a data track's values or string, projected from its row's residues
1360
+ * onto alignment columns when it names a row
1361
+ */
1362
+ readonly columnTrackContent: Map<string, {
1363
+ values?: number[];
1364
+ data?: string;
1365
+ arcs?: Arc[];
1366
+ }>;
1367
+ /**
1368
+ * #method
1369
+ * the height a track draws at: what the user dragged its divider to,
1370
+ * then the height its snapshot asked for, then its kind's default. Only
1371
+ * a text track falls through to rowHeight
1372
+ */
1373
+ trackHeight(kind: TrackKind, heightKey?: string, given?: number): number;
1374
+ /**
1375
+ * #method
1376
+ * the track a column track spec draws as, computed once per spec. A
1377
+ * text track's height falls through to rowHeight, and its own computed
1378
+ * confines the vertical zoom to it, so a sibling keeps its object and
1379
+ * its canvas skips the redraw
1380
+ */
1381
+ columnTrackModel(track: ColumnTrackSpec): BasicTrack;
1382
+ /**
1383
+ * #getter
1384
+ */
1385
+ readonly columnTrackModels: BasicTrack[];
1273
1386
  } & {
1274
1387
  /**
1275
1388
  * #getter
@@ -1292,9 +1405,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1292
1405
  readonly seqConsensus: string | undefined;
1293
1406
  /**
1294
1407
  * #getter
1295
- * the base pairs of the consensus secondary structure, as arcs. The WUSS
1296
- * string is collapsed through the hidden columns before it is parsed, so
1297
- * the pairs land in the same visible column space the text track does
1408
+ * the base pairs of the consensus secondary structure, as arcs, in
1409
+ * visible column space (hidden columns are removed before parsing)
1298
1410
  */
1299
1411
  readonly secondaryStructureArcs: Arc[] | undefined;
1300
1412
  /**
@@ -1303,33 +1415,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1303
1415
  readonly adapterTrackModels: BasicTrack[];
1304
1416
  /**
1305
1417
  * #getter
1306
- * a data track's values or string, projected from its row's residues
1307
- * onto alignment columns when it names a row
1308
- */
1309
- readonly columnTrackContent: Map<string, {
1310
- values?: number[];
1311
- data?: string;
1312
- arcs?: Arc[];
1313
- }>;
1314
- /**
1315
- * #getter
1316
- */
1317
- readonly columnTrackModels: BasicTrack[];
1318
- /**
1319
- * #getter
1320
- */
1321
- /**
1322
- * #getter
1323
- * the consensus secondary structure as a track, when there is one. Its
1324
- * own getter so the object keeps its identity across a zoom: the canvas
1325
- * redraws on the track it is handed changing, and rebuilding these
1326
- * alongside everything else made every zoom frame redraw every track
1418
+ * the consensus secondary structure as a track, when there is one. A
1419
+ * separate getter keeps the object stable across zoom, so its canvas
1420
+ * does not redraw
1327
1421
  */
1328
1422
  readonly basePairTrackModels: BasicTrack[];
1329
1423
  /**
1330
1424
  * #getter
1331
- * the tracks computed from the alignment itself, which depend on their
1332
- * own heights and on the alphabet -- and on nothing zoom changes
1425
+ * the tracks computed from the alignment; they depend on their heights
1426
+ * and the alphabet, not on zoom
1333
1427
  */
1334
1428
  readonly computedTrackModels: BasicTrack[];
1335
1429
  readonly tracks: BasicTrack[];
@@ -1355,10 +1449,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1355
1449
  * Convert a visible column to a row-specific sequence position (0-based).
1356
1450
  * Returns undefined if the position is a gap in the sequence.
1357
1451
  *
1358
- * PUBLIC API: this and the sibling coordinate converters
1359
- * (visibleColToGlobalCol, seqPosToVisibleCol, globalColToVisibleCol,
1360
- * seqPosToGlobalCol) are how a host translates between alignment columns
1361
- * and a row's residue positions across gaps. Keep them stable.
1452
+ * Public API, like the sibling converters (visibleColToGlobalCol,
1453
+ * seqPosToVisibleCol, globalColToVisibleCol, seqPosToGlobalCol) hosts
1454
+ * use to translate between columns and residue positions. Keep them
1455
+ * stable.
1362
1456
  *
1363
1457
  * @param rowName - The name of the row
1364
1458
  * @param visibleCol - The visible column index
@@ -1387,10 +1481,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1387
1481
  globalColToVisibleCol(globalCol: number): number | undefined;
1388
1482
  /**
1389
1483
  * #method
1390
- * Convert a visible column index (what a mouse handler reports) back to a
1391
- * column of the full alignment. Hidden columns shift everything to their
1392
- * right, so a host that holds per-column data of its own has to make this
1393
- * hop before indexing it.
1484
+ * Convert a visible column index (what a mouse handler reports) to a
1485
+ * column of the full alignment. A host indexing its own per-column data
1486
+ * needs this when columns are hidden.
1394
1487
  *
1395
1488
  * @param visibleCol - The visible column index
1396
1489
  * @returns The global column index in the full MSA
@@ -1399,8 +1492,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1399
1492
  /**
1400
1493
  * #method
1401
1494
  * Convert a sequence position (ungapped) to a global column index.
1402
- * Returns undefined for a row the alignment does not have -- answering
1403
- * anyway is how a mistyped or stale row name came to highlight column 0.
1495
+ * Returns undefined for a row name the alignment does not have.
1404
1496
  *
1405
1497
  * @param rowName - The name of the row
1406
1498
  * @param seqPos - The sequence position (0-based, ungapped)
@@ -1417,27 +1509,34 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1417
1509
  * @returns The visible column index, or undefined if the column is hidden
1418
1510
  */
1419
1511
  seqPosToVisibleCol(rowName: string, seqPos: number): number | undefined;
1512
+ /**
1513
+ * #method
1514
+ * the visible columns a span covers, in highlight coordinates: `start`
1515
+ * and `end` are 1-based residues of `row`, or columns of the file
1516
+ * without it. A fractional position, as a zoom gesture reports one,
1517
+ * widens to the whole residue or column it falls in. A span entirely on
1518
+ * hidden columns, or naming a row the alignment lacks, gives undefined.
1519
+ */
1520
+ visibleSpan({ row, start: rawStart, end: rawEnd }: Region): {
1521
+ startCol: number;
1522
+ endCol: number;
1523
+ } | undefined;
1420
1524
  /**
1421
1525
  * #getter
1422
- * every reason a mapping is being ignored, so a host can say which. A
1423
- * mapping outlives the alignment it was computed for; when the two no
1424
- * longer agree the lookups have to refuse, and refusing invisibly is how
1425
- * "there is no structure here" gets confused with "this data is stale".
1526
+ * why each ignored residue mapping is ignored, so a host can tell a
1527
+ * missing structure from a mapping made against a different alignment.
1426
1528
  */
1427
1529
  readonly residueMappingProblems: ResidueMappingProblem[];
1428
1530
  /**
1429
1531
  * #getter
1430
- * the mappings that still fit the loaded alignment. A row-level problem
1431
- * takes the whole mapping out; a single malformed segment takes only
1432
- * itself, since the rest of the mapping is still a claim about residues
1433
- * that exist.
1532
+ * the mappings that fit the loaded alignment. A row-level problem drops
1533
+ * the whole mapping; a malformed segment drops only that segment.
1434
1534
  */
1435
1535
  readonly usableResidueMappings: ResidueMapping[];
1436
1536
  /**
1437
1537
  * #getter
1438
- * the structures the loaded alignment has usable mappings onto. A row can
1439
- * have several -- an experimental entry and a predicted model, say -- so
1440
- * a host that means a particular one has to name it.
1538
+ * the structures with usable mappings. A row can map onto several, such
1539
+ * as an experimental entry and a predicted model.
1441
1540
  */
1442
1541
  readonly mappedStructures: {
1443
1542
  row: string;
@@ -1445,18 +1544,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1445
1544
  }[];
1446
1545
  /**
1447
1546
  * #method
1448
- * The structure residue a row residue is, or undefined. Refusing is the
1449
- * point: the guess this replaces answered every query, with a wrong
1450
- * residue when it did not know.
1451
- *
1452
- * It also refuses when the answer is not unique. A row commonly maps onto
1453
- * several structures -- an experimental entry and two predicted models --
1454
- * and returning whichever came first would be the same class of wrong,
1455
- * quieter. Name one with `structureId`, or use `mappedStructures` to see
1456
- * what there is.
1547
+ * The structure residue for a row residue. Returns undefined when no
1548
+ * segment covers `seqPos`, or when the row maps onto several structures
1549
+ * and `structureId` does not pick one (see `mappedStructures`).
1457
1550
  *
1458
- * Positions are 1-based, as `residueMappings` and `highlights` are --
1459
- * note that the column helpers above take 0-based ones.
1551
+ * Positions are 1-based, like `residueMappings` and `highlights`; the
1552
+ * column helpers above are 0-based.
1460
1553
  *
1461
1554
  * @param rowName - The alignment row
1462
1555
  * @param seqPos - Residue of that row, 1-based
@@ -1465,10 +1558,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1465
1558
  structureResidue(rowName: string, seqPos: number, structureId?: string): StructureResidue | undefined;
1466
1559
  /**
1467
1560
  * #method
1468
- * The row residue a structure residue is, the same lookup backwards, and
1469
- * refusing on the same terms. `asymId` picks between mappings onto the
1470
- * same entry, which a homodimer -- two rows, two chains, one id -- always
1471
- * needs; without it such a lookup is ambiguous and gets nothing.
1561
+ * The row residue for a structure residue; the inverse of
1562
+ * `structureResidue`, returning undefined in the same cases. `asymId`
1563
+ * picks a chain when several mappings share an entry id, as in a
1564
+ * homodimer.
1472
1565
  *
1473
1566
  * @param structureId - The structure's id, as the mapping names it
1474
1567
  * @param position - Residue of that structure, 1-based label_seq_id
@@ -1478,12 +1571,26 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1478
1571
  } & {
1479
1572
  /**
1480
1573
  * #getter
1481
- * the vertical space the alignment rows actually get: the widget height
1482
- * less everything stacked above and below them -- the header, the tracks,
1483
- * and the minimap when the columns overflow. Every consumer wants this
1484
- * same subtraction, so there is one of it: blocksY, maxScrollY, the
1485
- * vertical scrollbar and fitVertically all read it, and a second getter
1486
- * that forgot the tracks is what put the last rows out of reach.
1574
+ * the branch-length scale bar over the tree, undefined in cladogram mode
1575
+ * or when the tree area is too narrow for one
1576
+ */
1577
+ readonly treeScaleBar: {
1578
+ step: number;
1579
+ px: number;
1580
+ label: string;
1581
+ } | undefined;
1582
+ /**
1583
+ * #getter
1584
+ * the band across the top: the minimap over the alignment, the row panel
1585
+ * headers, and the tree overview stacked on the scale bar, as tall as the
1586
+ * tallest of the three
1587
+ */
1588
+ readonly topBandHeight: number;
1589
+ /**
1590
+ * #getter
1591
+ * the vertical space for alignment rows: the widget height less the
1592
+ * header, the top band and the tracks. Shared by blocksY, maxScrollY, the
1593
+ * vertical scrollbar and fitVertically.
1487
1594
  */
1488
1595
  readonly msaAreaHeight: number;
1489
1596
  /**
@@ -1492,8 +1599,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1492
1599
  */
1493
1600
  readonly totalTrackAreaHeight: number;
1494
1601
  /**
1495
- * one representative annotation per accession, which is what the legend,
1496
- * the filter dialog and the palettes key off
1602
+ * one representative annotation per accession, for the legend, the
1603
+ * filter dialog and the palettes
1497
1604
  */
1498
1605
  readonly annotationTypes: Map<string, Annotation>;
1499
1606
  readonly filteredAnnotations: Annotation[];
@@ -1531,10 +1638,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1531
1638
  readonly maxScrollX: number;
1532
1639
  /**
1533
1640
  * #getter
1534
- * most-negative allowed scrollY, keeping the last row in view rather than
1535
- * letting the whole alignment scroll off the top.
1641
+ * most-negative allowed scrollY, which keeps the last row in view
1536
1642
  */
1537
1643
  readonly maxScrollY: number;
1644
+ /**
1645
+ * #getter
1646
+ * axis a wheel zoom scales, for ctrl+wheel as much as for scroll-zoom.
1647
+ * With scroll-zoom off the toolbar shows no axis, so ctrl+wheel takes
1648
+ * both.
1649
+ */
1650
+ readonly wheelZoomAxis: ScrollZoomAxis;
1538
1651
  } & {
1539
1652
  /**
1540
1653
  * #action
@@ -1544,6 +1657,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1544
1657
  * #action
1545
1658
  */
1546
1659
  setScrollZoom(arg: boolean): void;
1660
+ /**
1661
+ * #action
1662
+ */
1663
+ setScrollZoomAxis(arg: ScrollZoomAxis): void;
1547
1664
  /**
1548
1665
  * #action
1549
1666
  * set hovered tree node and its descendants
@@ -1552,18 +1669,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1552
1669
  /**
1553
1670
  * #action
1554
1671
  * Calculate a neighbor joining tree from the current MSA using BLOSUM62
1555
- * distances. Refuses above `maxNeighborJoiningRows`: the join loop is
1556
- * cubic and runs on the main thread, so 800 rows is a ten-second freeze
1557
- * with no progress and no cancel, and a tree that size wants a tool built
1558
- * for it anyway.
1672
+ * distances. Throws above `maxNeighborJoiningRows`: the join loop is
1673
+ * cubic and runs on the main thread, and 800 rows freeze the tab for ten
1674
+ * seconds with no cancel.
1559
1675
  */
1560
1676
  calculateNeighborJoiningTreeFromMSA(): void;
1561
1677
  /**
1562
1678
  * #action
1563
- * swap in a different tree over the same alignment. Node ids are derived
1564
- * from the path (node-0-0-1), so a `collapsed` or `showOnly` id held over
1565
- * from the old tree matches a real node in the new one and folds whatever
1566
- * happens to sit there -- the ids go with the tree they name.
1679
+ * swap in a different tree over the same alignment. Clears `collapsed`
1680
+ * and `showOnly`, since path-derived node ids (node-0-0-1) from the old
1681
+ * tree would match unrelated nodes in the new one.
1567
1682
  */
1568
1683
  replaceTree(newick: string): void;
1569
1684
  /**
@@ -1599,13 +1714,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1599
1714
  * #action
1600
1715
  * Smoothly zoom by a continuous scaleFactor. The column under the cursor
1601
1716
  * (offsetX/offsetY, px relative to the MSA area) stays anchored
1602
- * horizontally. Vertically the anchor is biased toward the top: when the
1603
- * alignment nearly fits the viewport, snap to y=0 rather than pinning a
1604
- * random row under the cursor, with the bias fading out as the alignment
1605
- * grows taller than the viewport (where cursor-anchoring is useful).
1606
- * Drives wheel/trackpad-pinch zoom.
1717
+ * horizontally. Vertically the anchor is biased toward y=0 when the
1718
+ * alignment nearly fits the viewport, fading to cursor-anchoring as the
1719
+ * alignment grows taller than the viewport.
1720
+ * Drives wheel/trackpad-pinch zoom. `axis` holds one cell dimension
1721
+ * fixed; the held axis still re-anchors its scroll offset, since the
1722
+ * other one can change how much of the alignment fits.
1607
1723
  */
1608
- zoomToPos(scaleFactor: number, offsetX: number, offsetY: number): void;
1724
+ zoomToPos(scaleFactor: number, offsetX: number, offsetY: number, axis?: ScrollZoomAxis): void;
1609
1725
  /**
1610
1726
  * #action
1611
1727
  */
@@ -1617,13 +1733,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1617
1733
  setScrollY(n: number): void;
1618
1734
  /**
1619
1735
  * #action
1620
- * Set the overlay annotations (an empty list clears them). Every source
1621
- * funnels through here after its own adapter has flattened it:
1622
- * InterProScan, GFF, user uploads, NCBI CDD.
1736
+ * Set the overlay annotations (an empty list clears them). InterProScan,
1737
+ * GFF, user uploads and NCBI CDD all arrive here as Annotation[].
1623
1738
  *
1624
- * It does not touch `showDomains`. Loading used to force the overlay on,
1625
- * and since a restored snapshot loads its GFF again on the way in, a link
1626
- * shared with the overlay hidden reopened with it drawn.
1739
+ * Leaves `showDomains` alone, because a restored snapshot reloads its
1740
+ * GFF and must keep a hidden overlay hidden.
1627
1741
  */
1628
1742
  setAnnotations(annotations: Annotation[]): void;
1629
1743
  /**
@@ -1646,6 +1760,22 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1646
1760
  * #action
1647
1761
  */
1648
1762
  setColumnTracks(tracks: ColumnTrackSpec[]): void;
1763
+ /**
1764
+ * #action
1765
+ * replace the row table, which the model keeps as the JSON string
1766
+ * `data.treeMetadata` (see docs/layers.md)
1767
+ */
1768
+ setRowData(rowData: Record<string, Record<string, string>>): void;
1769
+ /**
1770
+ * #action
1771
+ * replace what the viewer's marks read from the row table
1772
+ */
1773
+ setEncodings(encodings: Encoding[]): void;
1774
+ /**
1775
+ * #action
1776
+ * replace the panels drawn between the tree and the alignment
1777
+ */
1778
+ setRowPanels(panels: RowPanelSpec[]): void;
1649
1779
  /**
1650
1780
  * #action
1651
1781
  * replace the alignment<->structure correspondence (see docs/layers.md)
@@ -1669,16 +1799,39 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1669
1799
  readonly verticalScrollbarWidth: 0 | 20;
1670
1800
  /**
1671
1801
  * #getter
1672
- * width of the alignment canvas itself: the msa area less the vertical
1673
- * scrollbar sitting in it. Not usable from showHorizontalScrollbar, which
1674
- * feeds msaAreaHeight -> showVerticalScrollbar and would close a cycle
1802
+ * width of the alignment canvas: the msa area less the vertical
1803
+ * scrollbar. showHorizontalScrollbar must not read it, since that feeds
1804
+ * msaAreaHeight -> showVerticalScrollbar and would form a cycle
1675
1805
  */
1676
1806
  readonly msaCanvasWidth: number;
1807
+ /**
1808
+ * #method
1809
+ * the cell at a visible column and row index, in the coordinates a host
1810
+ * writes highlights in
1811
+ */
1812
+ cellAt(visibleCol: number, rowIndex?: number): Cell;
1813
+ /**
1814
+ * #getter
1815
+ * the cell under the pointer. Public API: MSAViewer's onCellHover
1816
+ * reports it.
1817
+ */
1818
+ readonly hoveredCell: Cell | undefined;
1819
+ /**
1820
+ * #getter
1821
+ * the cell a click pinned. Public API: MSAViewer's onCellClick reports it.
1822
+ */
1823
+ readonly clickedCell: Cell | undefined;
1824
+ /**
1825
+ * #getter
1826
+ * the columns on screen. Public API: MSAViewer's onViewportChange reports
1827
+ * it.
1828
+ */
1829
+ readonly viewport: Viewport | undefined;
1677
1830
  /**
1678
1831
  * #getter
1679
1832
  * ordinal segment types (exons etc.), ordered by sequence position so
1680
- * exon-1..exon-14 read left-to-right; colored by alternating shade and
1681
- * labeled by number rather than each getting a distinct hue + legend row
1833
+ * exon-1..exon-14 run left-to-right; colored by alternating shade and
1834
+ * labeled by number, with no legend row
1682
1835
  */
1683
1836
  readonly segmentDomainTypes: Annotation[];
1684
1837
  /**
@@ -1690,9 +1843,29 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1690
1843
  readonly fillPalette: {
1691
1844
  [x: string]: string;
1692
1845
  };
1693
- readonly strokePalette: {
1694
- [k: string]: string;
1695
- };
1846
+ /**
1847
+ * #getter
1848
+ * the encoding coloring the overlay's spans, undefined when none does,
1849
+ * which leaves each span the color its accession takes in `fillPalette`
1850
+ */
1851
+ readonly featureFillEncoding: ResolvedEncoding | undefined;
1852
+ /**
1853
+ * #getter
1854
+ * the fill and outline of every feature's span: its own GFF `color=`
1855
+ * first, then the `featureFill` scale, then the accession palette.
1856
+ * Computed once per change of the features, the encodings or the palette
1857
+ */
1858
+ readonly featureColors: Map<Annotation, {
1859
+ fill: string;
1860
+ stroke: string;
1861
+ }>;
1862
+ /**
1863
+ * #getter
1864
+ * the text the `featureLabel` channel draws inside each span, undefined
1865
+ * when no encoding names the channel. A data channel, so it draws
1866
+ * whether or not the residue letters do
1867
+ */
1868
+ readonly featureLabels: Map<Annotation, string> | undefined;
1696
1869
  /**
1697
1870
  * #getter
1698
1871
  * accession -> number drawn on each segment band: the trailing number of
@@ -1702,20 +1875,41 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1702
1875
  /**
1703
1876
  * #getter
1704
1877
  * the domain types currently drawn on the alignment (filtered-on), shared
1705
- * by the on-screen legend and the SVG export legend. Ordinal segments
1706
- * (exons) are excluded — they read as a numbered gene model, not a color
1707
- * key — so this is the categorical types ordered by sequence position
1878
+ * by the on-screen legend and the SVG export legend: the categorical types
1879
+ * ordered by sequence position. Ordinal segments (exons) are numbered on
1880
+ * the band instead
1708
1881
  */
1709
1882
  readonly visibleDomainTypes: Annotation[];
1883
+ /**
1884
+ * #getter
1885
+ * the categorical color keys drawn for this view, shared by the on-screen
1886
+ * legend overlay and the SVG export's reserved column. The domain overlay
1887
+ * produces the first, listing the `featureFill` scale where an encoding
1888
+ * names one. Every field a row-table encoding or a row panel reads
1889
+ * produces one more, so two channels over one field, or two strips over
1890
+ * it, list that field once. A strip's `legend` names the title it lists
1891
+ * under, so strips over eight fields with one set of colors list one
1892
+ * legend between them
1893
+ */
1894
+ readonly legends: Legend[];
1895
+ /**
1896
+ * #getter
1897
+ * whether the overlay marks each domain with a bar under its row instead
1898
+ * of filling the row behind the letters. Letter-color mode hands the
1899
+ * background to the color scheme, so a filled box would paint over it and
1900
+ * leave the setting with nothing to show. Sub-row layout already stacks
1901
+ * the boxes clear of the letters, and with the letters too small to draw
1902
+ * the filled box is the only thing left to read.
1903
+ */
1904
+ readonly domainUnderline: boolean;
1710
1905
  /**
1711
1906
  * #getter
1712
1907
  * every filtered-on annotation resolved to the visible column span it is
1713
1908
  * drawn across, keyed by row name. Each row is ordered longest-first so a
1714
- * short domain nested inside a long one draws on top of it rather than
1715
- * under it. Resolving these once here rather than inside each canvas
1716
- * block removes a per-feature, per-block sequence position conversion
1717
- * from every redraw, and gives the letter renderer the band colors it
1718
- * needs to keep residues readable on top of the boxes.
1909
+ * nested short domain draws on top, and each band carries the lane the
1910
+ * sub-row layout puts it in. Resolved once here instead of per canvas
1911
+ * block per redraw; the letter renderer also reads the band colors to
1912
+ * pick legible letter colors.
1719
1913
  */
1720
1914
  readonly domainBands: Map<string, DomainBand[]>;
1721
1915
  /**
@@ -1739,15 +1933,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1739
1933
  * #getter
1740
1934
  * row indices highlighted by the current tree hover (a hovered internal
1741
1935
  * node highlights every tip below it). Shared by the tree and MSA overlay
1742
- * canvases so they cannot disagree, and resolved through the memoized
1743
- * name->index map rather than rebuilding a lookup on each mouse move.
1936
+ * canvases, via the memoized name->index map.
1744
1937
  */
1745
1938
  readonly hoveredRowIndices: number[];
1746
1939
  /**
1747
1940
  * #getter
1748
1941
  * contiguous runs of `highlightedColumns`, so a run of highlighted columns
1749
- * draws as one bordered band. Computed here because the overlay canvas
1750
- * redraws on every mouse move while the highlight itself rarely changes.
1942
+ * draws as one bordered band. Memoized because the overlay canvas redraws
1943
+ * on every mouse move.
1751
1944
  */
1752
1945
  readonly highlightedColumnRuns: {
1753
1946
  start: number;
@@ -1762,23 +1955,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1762
1955
  */
1763
1956
  readonly resolvedHighlights: ResolvedHighlight[];
1764
1957
  /**
1765
- * #getter
1766
- * per-column summary statistics for the hovered column: consensus residue
1767
- * and its identity fraction, conservation score, gap fraction, and the
1768
- * sorted non-gap residue distribution. undefined when nothing is hovered.
1958
+ * #method
1959
+ * per-column summary statistics: consensus residue and its identity
1960
+ * fraction, both conservation scores, gap fraction, and the sorted non-gap
1961
+ * residue distribution. undefined past the end of the alignment or for an
1962
+ * all-gap column.
1769
1963
  */
1770
- readonly mouseOverColumnStats: {
1771
- col: number;
1772
- total: number;
1773
- gaps: number;
1774
- gapFraction: number;
1775
- conservation: number;
1776
- propertyConservation: number | undefined;
1777
- consensusLetter: string;
1778
- consensusCount: number;
1779
- consensusFraction: number;
1780
- distribution: [string, number][];
1781
- } | undefined;
1964
+ columnStatsAt(col: number): ColumnStats | undefined;
1782
1965
  /**
1783
1966
  * #method
1784
1967
  */
@@ -1788,35 +1971,84 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1788
1971
  accession?: string;
1789
1972
  dbxref?: string;
1790
1973
  } | undefined;
1791
- treeMetadata: Record<string, string> | undefined;
1974
+ rowData: Record<string, string> | undefined;
1792
1975
  };
1793
- } & {
1794
1976
  /**
1795
- * #action
1977
+ * #getter
1978
+ * each encoding with its scale resolved against the values its field
1979
+ * takes: a feature channel reads them across the features drawn, every
1980
+ * other channel across the row table. Resolved once per change of that
1981
+ * table or the encodings, never per row per frame.
1796
1982
  */
1797
- setHeaderHeight(arg: number): void;
1983
+ readonly resolvedEncodings: ResolvedEncoding[];
1984
+ /**
1985
+ * #getter
1986
+ * each row panel with its scale resolved against the values its field
1987
+ * takes across the row table, giving the color per row name, the pixel
1988
+ * column it draws in, and the entries its legend lists. Resolved once
1989
+ * per change of that table or the panels, never per block per frame.
1990
+ */
1991
+ readonly resolvedRowPanels: ResolvedRowPanel[];
1992
+ /**
1993
+ * #getter
1994
+ * the shift an `align` transform gives each row, keyed by the feature
1995
+ * name it aligns on: the offset putting the first feature of that name
1996
+ * at zero. A row carrying no such feature is absent, and keeps its own
1997
+ * origin.
1998
+ */
1999
+ readonly featureAlignShifts: Map<string, Map<string, number>>;
2000
+ /**
2001
+ * #getter
2002
+ * the color the `tipLabel` channel gives each row, by row name. Undefined
2003
+ * when no encoding names the channel, which leaves the labels the theme's
2004
+ * text color.
2005
+ */
2006
+ readonly tipLabelColors: Map<string, string> | undefined;
2007
+ /**
2008
+ * #getter
2009
+ * the wash the `rowTint` channel draws over each row, indexed by row, or
2010
+ * undefined when no encoding names the channel. The overlay draws these,
2011
+ * so a tint stays out of the raster tile cache and its keys.
2012
+ */
2013
+ readonly rowTints: (string | undefined)[] | undefined;
2014
+ /**
2015
+ * #getter
2016
+ * the color the `branch` channel gives each tree edge, by the node id at
2017
+ * the edge's far end, or undefined when no encoding names the channel. A
2018
+ * node takes the field value its tips agree on, so a clade of one value
2019
+ * colors down from where it splits off, and a node whose tips disagree or
2020
+ * whose value has no color is absent and draws in the default color.
2021
+ *
2022
+ * The pass runs over the whole tree, never `root`, so a collapsed or
2023
+ * focused clade keeps the color the full tree gives it.
2024
+ */
2025
+ readonly branchColors: Map<string, string> | undefined;
2026
+ } & {
1798
2027
  /**
1799
2028
  * #action
1800
2029
  */
1801
- setConservationTrackHeight(arg: number): void;
2030
+ setHeaderHeight(arg: number): void;
1802
2031
  /**
1803
2032
  * #action
1804
2033
  */
1805
- setColumnTrackHeight(id: string, height: number): void;
2034
+ setHideHeader(arg: boolean): void;
1806
2035
  /**
1807
2036
  * #action
2037
+ * focus the subtree a click `y` pixels down the tree overview lands on.
2038
+ * A click inside the box already drawn there clears the focus, the way
2039
+ * clicking the focused branch again does.
1808
2040
  */
1809
- setSequenceLogoTrackHeight(arg: number): void;
2041
+ treeOverviewClick(y: number): void;
1810
2042
  /**
1811
2043
  * #action
2044
+ * resize every track sharing a `heightKey`; see `trackHeights`
1812
2045
  */
1813
- setArcTrackHeight(arg: number): void;
2046
+ setTrackHeight(heightKey: string, height: number): void;
1814
2047
  /**
1815
2048
  * #action
1816
- * Return to the import form: every property off `preservedOnReset`
1817
- * (data, filehandles, collapsed/showOnly, zoom, scroll, ...) goes back
1818
- * to its default, then the file-derived volatiles applySnapshot cannot
1819
- * reach are cleared by hand.
2049
+ * Return to the import form: reset every property not in
2050
+ * `preservedOnReset` to its default, then clear the file-derived
2051
+ * volatiles applySnapshot does not touch.
1820
2052
  */
1821
2053
  reset(): void;
1822
2054
  /**
@@ -1825,8 +2057,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1825
2057
  exportSVG(opts: ExportSvgOptions): Promise<void>;
1826
2058
  /**
1827
2059
  * #action
1828
- * draw this annotation type, or stop drawing it. Only the "stop" is
1829
- * recorded -- see `turnedOffFeatures`
2060
+ * show or hide an annotation type. Only hidden types are recorded; see
2061
+ * `turnedOffFeatures`
1830
2062
  */
1831
2063
  setFilter(accession: string, shown: boolean): void;
1832
2064
  /**
@@ -1837,6 +2069,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1837
2069
  * #action
1838
2070
  */
1839
2071
  fitVertically(): void;
2072
+ /**
2073
+ * #action
2074
+ * zoom and scroll so a span fills the alignment's width, in highlight
2075
+ * coordinates (see visibleSpan). Does nothing before the viewer knows
2076
+ * its width, or for a span that resolves to no visible column.
2077
+ */
2078
+ zoomToRegion(region: Region): void;
1840
2079
  /**
1841
2080
  * #action
1842
2081
  */
@@ -1854,6 +2093,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1854
2093
  showBranchLen: boolean;
1855
2094
  drawTree: boolean;
1856
2095
  drawNodeBubbles: boolean;
2096
+ drawNodeLabels: boolean;
2097
+ showTreeOverview: boolean;
2098
+ overviewHeight: number;
1857
2099
  autoTreeAreaWidth: boolean;
1858
2100
  columnTracks: ColumnTrackSpec[];
1859
2101
  id: string;
@@ -1865,6 +2107,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1865
2107
  type: "MsaView";
1866
2108
  drawMsaLetters: boolean;
1867
2109
  scrollZoom: boolean;
2110
+ scrollZoomAxis: "both" | "horizontal" | "vertical";
1868
2111
  height: number;
1869
2112
  rowHeight: number;
1870
2113
  scrollY: number;
@@ -1954,11 +2197,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1954
2197
  collapsed: string[];
1955
2198
  showOnly: string | undefined;
1956
2199
  turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
2200
+ trackHeights: import("mobx").IKeyValueMap<number>;
1957
2201
  residueMappings: ResidueMapping[];
1958
2202
  turnedOffFeatures: import("mobx").IKeyValueMap<boolean>;
1959
2203
  relativeTo: string | undefined;
1960
2204
  highlightColumns: number[] | undefined;
1961
2205
  highlights: Highlight[];
2206
+ clades: Clade[];
2207
+ encodings: Encoding[];
2208
+ rowPanels: RowPanelSpec[];
1962
2209
  data: {
1963
2210
  tree?: string | undefined;
1964
2211
  msa?: string | undefined;
@@ -1977,6 +2224,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1977
2224
  showBranchLen: boolean;
1978
2225
  drawTree: boolean;
1979
2226
  drawNodeBubbles: boolean;
2227
+ drawNodeLabels: boolean;
2228
+ showTreeOverview: boolean;
2229
+ overviewHeight: number;
1980
2230
  autoTreeAreaWidth: boolean;
1981
2231
  columnTracks?: undefined;
1982
2232
  id: string;
@@ -1988,6 +2238,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1988
2238
  type: "MsaView";
1989
2239
  drawMsaLetters: boolean;
1990
2240
  scrollZoom: boolean;
2241
+ scrollZoomAxis: "both" | "horizontal" | "vertical";
1991
2242
  height: number;
1992
2243
  rowHeight: number;
1993
2244
  scrollY: number;
@@ -2077,11 +2328,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2077
2328
  collapsed: string[];
2078
2329
  showOnly: string | undefined;
2079
2330
  turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
2331
+ trackHeights: import("mobx").IKeyValueMap<number>;
2080
2332
  residueMappings: ResidueMapping[];
2081
2333
  turnedOffFeatures: import("mobx").IKeyValueMap<boolean>;
2082
2334
  relativeTo: string | undefined;
2083
2335
  highlightColumns: number[] | undefined;
2084
2336
  highlights: Highlight[];
2337
+ clades: Clade[];
2338
+ encodings: Encoding[];
2339
+ rowPanels: RowPanelSpec[];
2085
2340
  data: {
2086
2341
  tree?: string | undefined;
2087
2342
  msa?: string | undefined;