react-msaview 7.0.0 → 8.0.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 (310) 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/colorSchemes.js +1 -2
  5. package/dist/colorSchemes.js.map +1 -1
  6. package/dist/columnStats.d.ts +28 -0
  7. package/dist/columnStats.js +34 -0
  8. package/dist/columnStats.js.map +1 -0
  9. package/dist/components/DragHandle.d.ts +3 -2
  10. package/dist/components/DragHandle.js +11 -5
  11. package/dist/components/DragHandle.js.map +1 -1
  12. package/dist/components/Loading.js.map +1 -1
  13. package/dist/components/MSAView.js +17 -6
  14. package/dist/components/MSAView.js.map +1 -1
  15. package/dist/components/MSAViewer.d.ts +64 -7
  16. package/dist/components/MSAViewer.js +128 -23
  17. package/dist/components/MSAViewer.js.map +1 -1
  18. package/dist/components/PortalTooltip.d.ts +11 -0
  19. package/dist/components/PortalTooltip.js +29 -0
  20. package/dist/components/PortalTooltip.js.map +1 -0
  21. package/dist/components/ResizeHandles.js +11 -29
  22. package/dist/components/ResizeHandles.js.map +1 -1
  23. package/dist/components/SequenceTextArea.js +3 -3
  24. package/dist/components/SequenceTextArea.js.map +1 -1
  25. package/dist/components/Track.js +41 -22
  26. package/dist/components/Track.js.map +1 -1
  27. package/dist/components/dialogs/ExportSVGDialog.js +5 -3
  28. package/dist/components/dialogs/ExportSVGDialog.js.map +1 -1
  29. package/dist/components/dialogs/TrackInfoDialog.js +1 -1
  30. package/dist/components/dialogs/TrackInfoDialog.js.map +1 -1
  31. package/dist/components/header/GappynessSlider.js +6 -11
  32. package/dist/components/header/GappynessSlider.js.map +1 -1
  33. package/dist/components/header/Header.js +3 -0
  34. package/dist/components/header/Header.js.map +1 -1
  35. package/dist/components/header/LoadWarnings.js +3 -4
  36. package/dist/components/header/LoadWarnings.js.map +1 -1
  37. package/dist/components/header/ScrollZoomIcons.d.ts +6 -0
  38. package/dist/components/header/ScrollZoomIcons.js +35 -0
  39. package/dist/components/header/ScrollZoomIcons.js.map +1 -0
  40. package/dist/components/header/TreeSettingsMenu.js +1 -3
  41. package/dist/components/header/TreeSettingsMenu.js.map +1 -1
  42. package/dist/components/header/UnshareableDataWarning.js +2 -4
  43. package/dist/components/header/UnshareableDataWarning.js.map +1 -1
  44. package/dist/components/header/ZoomControls.js +49 -6
  45. package/dist/components/header/ZoomControls.js.map +1 -1
  46. package/dist/components/header/getAnnotationsMenu.js +3 -6
  47. package/dist/components/header/getAnnotationsMenu.js.map +1 -1
  48. package/dist/components/header/settingsMenuItems.js +10 -7
  49. package/dist/components/header/settingsMenuItems.js.map +1 -1
  50. package/dist/components/import/util.js +1 -2
  51. package/dist/components/import/util.js.map +1 -1
  52. package/dist/components/minimap/Minimap.js +1 -2
  53. package/dist/components/minimap/Minimap.js.map +1 -1
  54. package/dist/components/msa/AnnotationLegend.js +27 -19
  55. package/dist/components/msa/AnnotationLegend.js.map +1 -1
  56. package/dist/components/msa/MSACanvas.js +1 -1
  57. package/dist/components/msa/MSACanvas.js.map +1 -1
  58. package/dist/components/msa/MSACanvasBlock.js +13 -15
  59. package/dist/components/msa/MSACanvasBlock.js.map +1 -1
  60. package/dist/components/msa/MSAMouseoverCanvas.js +2 -1
  61. package/dist/components/msa/MSAMouseoverCanvas.js.map +1 -1
  62. package/dist/components/msa/domainBandCursor.d.ts +7 -11
  63. package/dist/components/msa/domainBandCursor.js +7 -11
  64. package/dist/components/msa/domainBandCursor.js.map +1 -1
  65. package/dist/components/msa/drawFeatureSpans.d.ts +53 -0
  66. package/dist/components/msa/drawFeatureSpans.js +78 -0
  67. package/dist/components/msa/drawFeatureSpans.js.map +1 -0
  68. package/dist/components/msa/legendRows.d.ts +8 -0
  69. package/dist/components/msa/legendRows.js +16 -0
  70. package/dist/components/msa/legendRows.js.map +1 -0
  71. package/dist/components/msa/msaRaster.d.ts +24 -31
  72. package/dist/components/msa/msaRaster.js +30 -39
  73. package/dist/components/msa/msaRaster.js.map +1 -1
  74. package/dist/components/msa/packDomainLanes.d.ts +20 -0
  75. package/dist/components/msa/packDomainLanes.js +33 -0
  76. package/dist/components/msa/packDomainLanes.js.map +1 -0
  77. package/dist/components/msa/renderBoxFeatureCanvasBlock.d.ts +3 -1
  78. package/dist/components/msa/renderBoxFeatureCanvasBlock.js +51 -87
  79. package/dist/components/msa/renderBoxFeatureCanvasBlock.js.map +1 -1
  80. package/dist/components/msa/renderHighlights.d.ts +15 -13
  81. package/dist/components/msa/renderHighlights.js +43 -20
  82. package/dist/components/msa/renderHighlights.js.map +1 -1
  83. package/dist/components/msa/renderMSABlock.js +5 -4
  84. package/dist/components/msa/renderMSABlock.js.map +1 -1
  85. package/dist/components/msa/tileColor.js +4 -7
  86. package/dist/components/msa/tileColor.js.map +1 -1
  87. package/dist/components/msa/useMsaBlockMouse.d.ts +5 -3
  88. package/dist/components/msa/useMsaBlockMouse.js +6 -6
  89. package/dist/components/msa/useMsaBlockMouse.js.map +1 -1
  90. package/dist/components/rowpanels/RowPanelBlock.d.ts +9 -0
  91. package/dist/components/rowpanels/RowPanelBlock.js +86 -0
  92. package/dist/components/rowpanels/RowPanelBlock.js.map +1 -0
  93. package/dist/components/rowpanels/RowPanelHeaders.d.ts +12 -0
  94. package/dist/components/rowpanels/RowPanelHeaders.js +38 -0
  95. package/dist/components/rowpanels/RowPanelHeaders.js.map +1 -0
  96. package/dist/components/{msa/ColumnStats.d.ts → rowpanels/RowPanels.d.ts} +2 -2
  97. package/dist/components/rowpanels/RowPanels.js +32 -0
  98. package/dist/components/rowpanels/RowPanels.js.map +1 -0
  99. package/dist/components/rowpanels/headerLayout.d.ts +1 -0
  100. package/dist/components/rowpanels/headerLayout.js +5 -0
  101. package/dist/components/rowpanels/headerLayout.js.map +1 -0
  102. package/dist/components/rowpanels/renderFeaturePanel.d.ts +21 -0
  103. package/dist/components/rowpanels/renderFeaturePanel.js +37 -0
  104. package/dist/components/rowpanels/renderFeaturePanel.js.map +1 -0
  105. package/dist/components/rowpanels/renderRowPanel.d.ts +23 -0
  106. package/dist/components/rowpanels/renderRowPanel.js +22 -0
  107. package/dist/components/rowpanels/renderRowPanel.js.map +1 -0
  108. package/dist/components/rowpanels/renderStrip.d.ts +20 -0
  109. package/dist/components/rowpanels/renderStrip.js +26 -0
  110. package/dist/components/rowpanels/renderStrip.js.map +1 -0
  111. package/dist/components/tracks/TrackBlocks.js +3 -5
  112. package/dist/components/tracks/TrackBlocks.js.map +1 -1
  113. package/dist/components/tracks/TrackTooltipContent.d.ts +15 -0
  114. package/dist/components/tracks/TrackTooltipContent.js +109 -0
  115. package/dist/components/tracks/TrackTooltipContent.js.map +1 -0
  116. package/dist/components/tracks/drawTracks.d.ts +4 -4
  117. package/dist/components/tracks/drawTracks.js +17 -34
  118. package/dist/components/tracks/drawTracks.js.map +1 -1
  119. package/dist/components/tracks/useTrackHover.d.ts +22 -0
  120. package/dist/components/tracks/useTrackHover.js +30 -0
  121. package/dist/components/tracks/useTrackHover.js.map +1 -0
  122. package/dist/components/tree/CladeLabels.d.ts +12 -0
  123. package/dist/components/tree/CladeLabels.js +48 -0
  124. package/dist/components/tree/CladeLabels.js.map +1 -0
  125. package/dist/components/tree/TreeCanvas.js +4 -1
  126. package/dist/components/tree/TreeCanvas.js.map +1 -1
  127. package/dist/components/tree/TreeCanvasBlock.js +4 -21
  128. package/dist/components/tree/TreeCanvasBlock.js.map +1 -1
  129. package/dist/components/tree/TreeOverview.d.ts +14 -0
  130. package/dist/components/tree/TreeOverview.js +75 -0
  131. package/dist/components/tree/TreeOverview.js.map +1 -0
  132. package/dist/components/tree/TreeRuler.js +9 -13
  133. package/dist/components/tree/TreeRuler.js.map +1 -1
  134. package/dist/components/tree/cladeBrackets.d.ts +25 -0
  135. package/dist/components/tree/cladeBrackets.js +51 -0
  136. package/dist/components/tree/cladeBrackets.js.map +1 -0
  137. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js +2 -2
  138. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js.map +1 -1
  139. package/dist/components/tree/renderTreeCanvas.js +158 -24
  140. package/dist/components/tree/renderTreeCanvas.js.map +1 -1
  141. package/dist/components/tree/renderTreeOverview.d.ts +52 -0
  142. package/dist/components/tree/renderTreeOverview.js +138 -0
  143. package/dist/components/tree/renderTreeOverview.js.map +1 -0
  144. package/dist/components/tree/useTreeHover.js +2 -4
  145. package/dist/components/tree/useTreeHover.js.map +1 -1
  146. package/dist/constants.d.ts +15 -0
  147. package/dist/constants.js +48 -22
  148. package/dist/constants.js.map +1 -1
  149. package/dist/createPaletteMap.d.ts +7 -6
  150. package/dist/createPaletteMap.js +10 -9
  151. package/dist/createPaletteMap.js.map +1 -1
  152. package/dist/element.d.ts +13 -0
  153. package/dist/element.js +269 -0
  154. package/dist/element.js.map +1 -0
  155. package/dist/featureFields.d.ts +11 -0
  156. package/dist/featureFields.js +17 -0
  157. package/dist/featureFields.js.map +1 -0
  158. package/dist/flatToTree.js +1 -2
  159. package/dist/flatToTree.js.map +1 -1
  160. package/dist/ggplotPalettes.d.ts +10 -0
  161. package/dist/ggplotPalettes.js +58 -0
  162. package/dist/ggplotPalettes.js.map +1 -1
  163. package/dist/hierarchy.d.ts +27 -0
  164. package/dist/hierarchy.js +66 -9
  165. package/dist/hierarchy.js.map +1 -1
  166. package/dist/index.d.ts +9 -1
  167. package/dist/index.js +5 -3
  168. package/dist/index.js.map +1 -1
  169. package/dist/model/DataModel.js +2 -5
  170. package/dist/model/DataModel.js.map +1 -1
  171. package/dist/model/msaModel.d.ts +3 -2
  172. package/dist/model/msaModel.js +3 -2
  173. package/dist/model/msaModel.js.map +1 -1
  174. package/dist/model/treeModel.d.ts +30 -0
  175. package/dist/model/treeModel.js +37 -1
  176. package/dist/model/treeModel.js.map +1 -1
  177. package/dist/model.d.ts +531 -275
  178. package/dist/model.js +1295 -547
  179. package/dist/model.js.map +1 -1
  180. package/dist/mount.d.ts +11 -0
  181. package/dist/mount.js +22 -0
  182. package/dist/mount.js.map +1 -0
  183. package/dist/neighborJoining.js +8 -32
  184. package/dist/neighborJoining.js.map +1 -1
  185. package/dist/renderToStaticMarkup.d.ts +10 -19
  186. package/dist/renderToStaticMarkup.js +13 -24
  187. package/dist/renderToStaticMarkup.js.map +1 -1
  188. package/dist/renderToSvg.js +180 -56
  189. package/dist/renderToSvg.js.map +1 -1
  190. package/dist/rowCoordinateCalculations.d.ts +4 -6
  191. package/dist/rowCoordinateCalculations.js +4 -6
  192. package/dist/rowCoordinateCalculations.js.map +1 -1
  193. package/dist/scales.d.ts +22 -0
  194. package/dist/scales.js +30 -0
  195. package/dist/scales.js.map +1 -0
  196. package/dist/seqPosToGlobalCol.d.ts +2 -3
  197. package/dist/seqPosToGlobalCol.js +2 -3
  198. package/dist/seqPosToGlobalCol.js.map +1 -1
  199. package/dist/sequenceLogo.d.ts +6 -11
  200. package/dist/sequenceLogo.js +6 -11
  201. package/dist/sequenceLogo.js.map +1 -1
  202. package/dist/stripDefault.d.ts +7 -14
  203. package/dist/stripDefault.js +7 -14
  204. package/dist/stripDefault.js.map +1 -1
  205. package/dist/svgTestUtil.d.ts +172 -52
  206. package/dist/types.d.ts +219 -21
  207. package/dist/umd.d.ts +2 -0
  208. package/dist/umd.js +4 -2
  209. package/dist/umd.js.map +1 -1
  210. package/dist/useCanvasAutorun.d.ts +5 -10
  211. package/dist/useCanvasAutorun.js +5 -10
  212. package/dist/useCanvasAutorun.js.map +1 -1
  213. package/dist/useMsaSvgFigure.d.ts +20 -0
  214. package/dist/useMsaSvgFigure.js +46 -0
  215. package/dist/useMsaSvgFigure.js.map +1 -0
  216. package/dist/util.d.ts +5 -6
  217. package/dist/util.js +13 -6
  218. package/dist/util.js.map +1 -1
  219. package/dist/version.d.ts +1 -1
  220. package/dist/version.js +1 -1
  221. package/package.json +19 -12
  222. package/src/colorSchemes.ts +1 -2
  223. package/src/columnStats.ts +58 -0
  224. package/src/components/DragHandle.tsx +18 -7
  225. package/src/components/Loading.tsx +2 -6
  226. package/src/components/MSAView.tsx +19 -5
  227. package/src/components/MSAViewer.tsx +240 -28
  228. package/src/components/PortalTooltip.tsx +47 -0
  229. package/src/components/ResizeHandles.tsx +17 -32
  230. package/src/components/SequenceTextArea.tsx +3 -3
  231. package/src/components/Track.tsx +55 -18
  232. package/src/components/dialogs/ExportSVGDialog.tsx +7 -2
  233. package/src/components/dialogs/TrackInfoDialog.tsx +1 -1
  234. package/src/components/header/GappynessSlider.tsx +6 -11
  235. package/src/components/header/Header.tsx +6 -0
  236. package/src/components/header/LoadWarnings.tsx +3 -4
  237. package/src/components/header/ScrollZoomIcons.tsx +52 -0
  238. package/src/components/header/TreeSettingsMenu.tsx +1 -3
  239. package/src/components/header/UnshareableDataWarning.tsx +2 -4
  240. package/src/components/header/ZoomControls.tsx +74 -14
  241. package/src/components/header/getAnnotationsMenu.ts +3 -6
  242. package/src/components/header/settingsMenuItems.ts +11 -6
  243. package/src/components/import/ImportFormExamples.tsx +2 -2
  244. package/src/components/import/util.ts +1 -2
  245. package/src/components/minimap/Minimap.tsx +1 -2
  246. package/src/components/msa/AnnotationLegend.tsx +48 -38
  247. package/src/components/msa/MSACanvas.tsx +3 -5
  248. package/src/components/msa/MSACanvasBlock.tsx +13 -16
  249. package/src/components/msa/MSAMouseoverCanvas.tsx +2 -1
  250. package/src/components/msa/domainBandCursor.ts +7 -11
  251. package/src/components/msa/drawFeatureSpans.ts +150 -0
  252. package/src/components/msa/legendRows.ts +24 -0
  253. package/src/components/msa/msaRaster.ts +30 -39
  254. package/src/components/msa/packDomainLanes.ts +36 -0
  255. package/src/components/msa/renderBoxFeatureCanvasBlock.ts +69 -123
  256. package/src/components/msa/renderHighlights.ts +53 -20
  257. package/src/components/msa/renderMSABlock.ts +5 -3
  258. package/src/components/msa/tileColor.ts +4 -7
  259. package/src/components/msa/useMsaBlockMouse.ts +6 -6
  260. package/src/components/rowpanels/RowPanelBlock.tsx +139 -0
  261. package/src/components/rowpanels/RowPanelHeaders.tsx +57 -0
  262. package/src/components/rowpanels/RowPanels.tsx +77 -0
  263. package/src/components/rowpanels/headerLayout.ts +5 -0
  264. package/src/components/rowpanels/renderFeaturePanel.ts +66 -0
  265. package/src/components/rowpanels/renderRowPanel.ts +41 -0
  266. package/src/components/rowpanels/renderStrip.ts +46 -0
  267. package/src/components/tracks/TrackBlocks.tsx +3 -5
  268. package/src/components/tracks/TrackTooltipContent.tsx +156 -0
  269. package/src/components/tracks/drawTracks.ts +17 -34
  270. package/src/components/tracks/useTrackHover.ts +42 -0
  271. package/src/components/tree/CladeLabels.tsx +77 -0
  272. package/src/components/tree/TreeCanvas.tsx +2 -0
  273. package/src/components/tree/TreeCanvasBlock.tsx +8 -32
  274. package/src/components/tree/TreeOverview.tsx +106 -0
  275. package/src/components/tree/TreeRuler.tsx +11 -22
  276. package/src/components/tree/cladeBrackets.ts +73 -0
  277. package/src/components/tree/dialogs/TreeNodeInfoDialog.tsx +2 -2
  278. package/src/components/tree/renderTreeCanvas.ts +240 -20
  279. package/src/components/tree/renderTreeOverview.ts +212 -0
  280. package/src/components/tree/useTreeHover.ts +2 -4
  281. package/src/constants.ts +56 -22
  282. package/src/createPaletteMap.ts +10 -9
  283. package/src/element.ts +321 -0
  284. package/src/featureFields.ts +19 -0
  285. package/src/flatToTree.ts +1 -2
  286. package/src/ggplotPalettes.ts +60 -0
  287. package/src/hierarchy.ts +77 -9
  288. package/src/index.ts +31 -7
  289. package/src/model/DataModel.ts +2 -5
  290. package/src/model/msaModel.ts +3 -2
  291. package/src/model/treeModel.ts +42 -0
  292. package/src/model.ts +1523 -560
  293. package/src/mount.tsx +32 -0
  294. package/src/neighborJoining.ts +8 -32
  295. package/src/renderToStaticMarkup.ts +13 -24
  296. package/src/renderToSvg.tsx +335 -68
  297. package/src/rowCoordinateCalculations.ts +4 -6
  298. package/src/scales.ts +47 -0
  299. package/src/seqPosToGlobalCol.ts +2 -3
  300. package/src/sequenceLogo.ts +6 -11
  301. package/src/stripDefault.ts +7 -14
  302. package/src/types.ts +258 -45
  303. package/src/umd.ts +4 -2
  304. package/src/useCanvasAutorun.ts +5 -10
  305. package/src/useMsaSvgFigure.ts +72 -0
  306. package/src/util.ts +15 -6
  307. package/src/version.ts +1 -1
  308. package/dist/components/msa/ColumnStats.js +0 -42
  309. package/dist/components/msa/ColumnStats.js.map +0 -1
  310. 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
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
  /**
@@ -1292,9 +1375,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1292
1375
  readonly seqConsensus: string | undefined;
1293
1376
  /**
1294
1377
  * #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
1378
+ * the base pairs of the consensus secondary structure, as arcs, in
1379
+ * visible column space (hidden columns are removed before parsing)
1298
1380
  */
1299
1381
  readonly secondaryStructureArcs: Arc[] | undefined;
1300
1382
  /**
@@ -1312,24 +1394,28 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1312
1394
  arcs?: Arc[];
1313
1395
  }>;
1314
1396
  /**
1315
- * #getter
1397
+ * #method
1398
+ * the height a track draws at: what the user dragged its divider to,
1399
+ * then the height its snapshot asked for, then its kind's default. Only
1400
+ * a text track falls through to rowHeight, and `??` short-circuits
1401
+ * before reading it, so vertical zoom does not rebuild the other tracks
1316
1402
  */
1317
- readonly columnTrackModels: BasicTrack[];
1403
+ trackHeight(kind: TrackKind, heightKey?: string, given?: number): number;
1318
1404
  /**
1319
1405
  * #getter
1320
1406
  */
1407
+ readonly columnTrackModels: BasicTrack[];
1321
1408
  /**
1322
1409
  * #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
1410
+ * the consensus secondary structure as a track, when there is one. A
1411
+ * separate getter keeps the object stable across zoom, so its canvas
1412
+ * does not redraw
1327
1413
  */
1328
1414
  readonly basePairTrackModels: BasicTrack[];
1329
1415
  /**
1330
1416
  * #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
1417
+ * the tracks computed from the alignment; they depend on their heights
1418
+ * and the alphabet, not on zoom
1333
1419
  */
1334
1420
  readonly computedTrackModels: BasicTrack[];
1335
1421
  readonly tracks: BasicTrack[];
@@ -1355,10 +1441,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1355
1441
  * Convert a visible column to a row-specific sequence position (0-based).
1356
1442
  * Returns undefined if the position is a gap in the sequence.
1357
1443
  *
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.
1444
+ * Public API, like the sibling converters (visibleColToGlobalCol,
1445
+ * seqPosToVisibleCol, globalColToVisibleCol, seqPosToGlobalCol) hosts
1446
+ * use to translate between columns and residue positions. Keep them
1447
+ * stable.
1362
1448
  *
1363
1449
  * @param rowName - The name of the row
1364
1450
  * @param visibleCol - The visible column index
@@ -1387,10 +1473,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1387
1473
  globalColToVisibleCol(globalCol: number): number | undefined;
1388
1474
  /**
1389
1475
  * #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.
1476
+ * Convert a visible column index (what a mouse handler reports) to a
1477
+ * column of the full alignment. A host indexing its own per-column data
1478
+ * needs this when columns are hidden.
1394
1479
  *
1395
1480
  * @param visibleCol - The visible column index
1396
1481
  * @returns The global column index in the full MSA
@@ -1399,8 +1484,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1399
1484
  /**
1400
1485
  * #method
1401
1486
  * 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.
1487
+ * Returns undefined for a row name the alignment does not have.
1404
1488
  *
1405
1489
  * @param rowName - The name of the row
1406
1490
  * @param seqPos - The sequence position (0-based, ungapped)
@@ -1417,27 +1501,34 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1417
1501
  * @returns The visible column index, or undefined if the column is hidden
1418
1502
  */
1419
1503
  seqPosToVisibleCol(rowName: string, seqPos: number): number | undefined;
1504
+ /**
1505
+ * #method
1506
+ * the visible columns a span covers, in highlight coordinates: `start`
1507
+ * and `end` are 1-based residues of `row`, or columns of the file
1508
+ * without it. A fractional position, as a zoom gesture reports one,
1509
+ * widens to the whole residue or column it falls in. A span entirely on
1510
+ * hidden columns, or naming a row the alignment lacks, gives undefined.
1511
+ */
1512
+ visibleSpan({ row, start: rawStart, end: rawEnd }: Region): {
1513
+ startCol: number;
1514
+ endCol: number;
1515
+ } | undefined;
1420
1516
  /**
1421
1517
  * #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".
1518
+ * why each ignored residue mapping is ignored, so a host can tell a
1519
+ * missing structure from a mapping made against a different alignment.
1426
1520
  */
1427
1521
  readonly residueMappingProblems: ResidueMappingProblem[];
1428
1522
  /**
1429
1523
  * #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.
1524
+ * the mappings that fit the loaded alignment. A row-level problem drops
1525
+ * the whole mapping; a malformed segment drops only that segment.
1434
1526
  */
1435
1527
  readonly usableResidueMappings: ResidueMapping[];
1436
1528
  /**
1437
1529
  * #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.
1530
+ * the structures with usable mappings. A row can map onto several, such
1531
+ * as an experimental entry and a predicted model.
1441
1532
  */
1442
1533
  readonly mappedStructures: {
1443
1534
  row: string;
@@ -1445,18 +1536,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1445
1536
  }[];
1446
1537
  /**
1447
1538
  * #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.
1539
+ * The structure residue for a row residue. Returns undefined when no
1540
+ * segment covers `seqPos`, or when the row maps onto several structures
1541
+ * and `structureId` does not pick one (see `mappedStructures`).
1457
1542
  *
1458
- * Positions are 1-based, as `residueMappings` and `highlights` are --
1459
- * note that the column helpers above take 0-based ones.
1543
+ * Positions are 1-based, like `residueMappings` and `highlights`; the
1544
+ * column helpers above are 0-based.
1460
1545
  *
1461
1546
  * @param rowName - The alignment row
1462
1547
  * @param seqPos - Residue of that row, 1-based
@@ -1465,10 +1550,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1465
1550
  structureResidue(rowName: string, seqPos: number, structureId?: string): StructureResidue | undefined;
1466
1551
  /**
1467
1552
  * #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.
1553
+ * The row residue for a structure residue; the inverse of
1554
+ * `structureResidue`, returning undefined in the same cases. `asymId`
1555
+ * picks a chain when several mappings share an entry id, as in a
1556
+ * homodimer.
1472
1557
  *
1473
1558
  * @param structureId - The structure's id, as the mapping names it
1474
1559
  * @param position - Residue of that structure, 1-based label_seq_id
@@ -1478,12 +1563,26 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1478
1563
  } & {
1479
1564
  /**
1480
1565
  * #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.
1566
+ * the branch-length scale bar over the tree, undefined in cladogram mode
1567
+ * or when the tree area is too narrow for one
1568
+ */
1569
+ readonly treeScaleBar: {
1570
+ step: number;
1571
+ px: number;
1572
+ label: string;
1573
+ } | undefined;
1574
+ /**
1575
+ * #getter
1576
+ * the band across the top: the minimap over the alignment, the row panel
1577
+ * headers, and the tree overview stacked on the scale bar, as tall as the
1578
+ * tallest of the three
1579
+ */
1580
+ readonly topBandHeight: number;
1581
+ /**
1582
+ * #getter
1583
+ * the vertical space for alignment rows: the widget height less the
1584
+ * header, the top band and the tracks. Shared by blocksY, maxScrollY, the
1585
+ * vertical scrollbar and fitVertically.
1487
1586
  */
1488
1587
  readonly msaAreaHeight: number;
1489
1588
  /**
@@ -1492,8 +1591,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1492
1591
  */
1493
1592
  readonly totalTrackAreaHeight: number;
1494
1593
  /**
1495
- * one representative annotation per accession, which is what the legend,
1496
- * the filter dialog and the palettes key off
1594
+ * one representative annotation per accession, for the legend, the
1595
+ * filter dialog and the palettes
1497
1596
  */
1498
1597
  readonly annotationTypes: Map<string, Annotation>;
1499
1598
  readonly filteredAnnotations: Annotation[];
@@ -1531,10 +1630,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1531
1630
  readonly maxScrollX: number;
1532
1631
  /**
1533
1632
  * #getter
1534
- * most-negative allowed scrollY, keeping the last row in view rather than
1535
- * letting the whole alignment scroll off the top.
1633
+ * most-negative allowed scrollY, which keeps the last row in view
1536
1634
  */
1537
1635
  readonly maxScrollY: number;
1636
+ /**
1637
+ * #getter
1638
+ * axis a wheel zoom scales, for ctrl+wheel as much as for scroll-zoom.
1639
+ * With scroll-zoom off the toolbar shows no axis, so ctrl+wheel takes
1640
+ * both.
1641
+ */
1642
+ readonly wheelZoomAxis: ScrollZoomAxis;
1538
1643
  } & {
1539
1644
  /**
1540
1645
  * #action
@@ -1544,6 +1649,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1544
1649
  * #action
1545
1650
  */
1546
1651
  setScrollZoom(arg: boolean): void;
1652
+ /**
1653
+ * #action
1654
+ */
1655
+ setScrollZoomAxis(arg: ScrollZoomAxis): void;
1547
1656
  /**
1548
1657
  * #action
1549
1658
  * set hovered tree node and its descendants
@@ -1552,18 +1661,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1552
1661
  /**
1553
1662
  * #action
1554
1663
  * 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.
1664
+ * distances. Throws above `maxNeighborJoiningRows`: the join loop is
1665
+ * cubic and runs on the main thread, and 800 rows freeze the tab for ten
1666
+ * seconds with no cancel.
1559
1667
  */
1560
1668
  calculateNeighborJoiningTreeFromMSA(): void;
1561
1669
  /**
1562
1670
  * #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.
1671
+ * swap in a different tree over the same alignment. Clears `collapsed`
1672
+ * and `showOnly`, since path-derived node ids (node-0-0-1) from the old
1673
+ * tree would match unrelated nodes in the new one.
1567
1674
  */
1568
1675
  replaceTree(newick: string): void;
1569
1676
  /**
@@ -1599,13 +1706,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1599
1706
  * #action
1600
1707
  * Smoothly zoom by a continuous scaleFactor. The column under the cursor
1601
1708
  * (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.
1709
+ * horizontally. Vertically the anchor is biased toward y=0 when the
1710
+ * alignment nearly fits the viewport, fading to cursor-anchoring as the
1711
+ * alignment grows taller than the viewport.
1712
+ * Drives wheel/trackpad-pinch zoom. `axis` holds one cell dimension
1713
+ * fixed; the held axis still re-anchors its scroll offset, since the
1714
+ * other one can change how much of the alignment fits.
1607
1715
  */
1608
- zoomToPos(scaleFactor: number, offsetX: number, offsetY: number): void;
1716
+ zoomToPos(scaleFactor: number, offsetX: number, offsetY: number, axis?: ScrollZoomAxis): void;
1609
1717
  /**
1610
1718
  * #action
1611
1719
  */
@@ -1617,13 +1725,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1617
1725
  setScrollY(n: number): void;
1618
1726
  /**
1619
1727
  * #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.
1728
+ * Set the overlay annotations (an empty list clears them). InterProScan,
1729
+ * GFF, user uploads and NCBI CDD all arrive here as Annotation[].
1623
1730
  *
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.
1731
+ * Leaves `showDomains` alone, because a restored snapshot reloads its
1732
+ * GFF and must keep a hidden overlay hidden.
1627
1733
  */
1628
1734
  setAnnotations(annotations: Annotation[]): void;
1629
1735
  /**
@@ -1646,6 +1752,22 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1646
1752
  * #action
1647
1753
  */
1648
1754
  setColumnTracks(tracks: ColumnTrackSpec[]): void;
1755
+ /**
1756
+ * #action
1757
+ * replace the row table, which the model keeps as the JSON string
1758
+ * `data.treeMetadata` (see docs/layers.md)
1759
+ */
1760
+ setRowData(rowData: Record<string, Record<string, string>>): void;
1761
+ /**
1762
+ * #action
1763
+ * replace what the viewer's marks read from the row table
1764
+ */
1765
+ setEncodings(encodings: Encoding[]): void;
1766
+ /**
1767
+ * #action
1768
+ * replace the panels drawn between the tree and the alignment
1769
+ */
1770
+ setRowPanels(panels: RowPanelSpec[]): void;
1649
1771
  /**
1650
1772
  * #action
1651
1773
  * replace the alignment<->structure correspondence (see docs/layers.md)
@@ -1669,16 +1791,39 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1669
1791
  readonly verticalScrollbarWidth: 0 | 20;
1670
1792
  /**
1671
1793
  * #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
1794
+ * width of the alignment canvas: the msa area less the vertical
1795
+ * scrollbar. showHorizontalScrollbar must not read it, since that feeds
1796
+ * msaAreaHeight -> showVerticalScrollbar and would form a cycle
1675
1797
  */
1676
1798
  readonly msaCanvasWidth: number;
1799
+ /**
1800
+ * #method
1801
+ * the cell at a visible column and row index, in the coordinates a host
1802
+ * writes highlights in
1803
+ */
1804
+ cellAt(visibleCol: number, rowIndex?: number): Cell;
1805
+ /**
1806
+ * #getter
1807
+ * the cell under the pointer. Public API: MSAViewer's onCellHover
1808
+ * reports it.
1809
+ */
1810
+ readonly hoveredCell: Cell | undefined;
1811
+ /**
1812
+ * #getter
1813
+ * the cell a click pinned. Public API: MSAViewer's onCellClick reports it.
1814
+ */
1815
+ readonly clickedCell: Cell | undefined;
1816
+ /**
1817
+ * #getter
1818
+ * the columns on screen. Public API: MSAViewer's onViewportChange reports
1819
+ * it.
1820
+ */
1821
+ readonly viewport: Viewport | undefined;
1677
1822
  /**
1678
1823
  * #getter
1679
1824
  * 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
1825
+ * exon-1..exon-14 run left-to-right; colored by alternating shade and
1826
+ * labeled by number, with no legend row
1682
1827
  */
1683
1828
  readonly segmentDomainTypes: Annotation[];
1684
1829
  /**
@@ -1693,6 +1838,29 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1693
1838
  readonly strokePalette: {
1694
1839
  [k: string]: string;
1695
1840
  };
1841
+ /**
1842
+ * #getter
1843
+ * the encoding coloring the overlay's spans, undefined when none does,
1844
+ * which leaves each span the color its accession takes in `fillPalette`
1845
+ */
1846
+ readonly featureFillEncoding: ResolvedEncoding | undefined;
1847
+ /**
1848
+ * #getter
1849
+ * the fill and outline of every feature's span: its own GFF `color=`
1850
+ * first, then the `featureFill` scale, then the accession palette.
1851
+ * Computed once per change of the features, the encodings or the palette
1852
+ */
1853
+ readonly featureColors: Map<Annotation, {
1854
+ fill: string;
1855
+ stroke: string;
1856
+ }>;
1857
+ /**
1858
+ * #getter
1859
+ * the text the `featureLabel` channel draws inside each span, undefined
1860
+ * when no encoding names the channel. A data channel, so it draws
1861
+ * whether or not the residue letters do
1862
+ */
1863
+ readonly featureLabels: Map<Annotation, string> | undefined;
1696
1864
  /**
1697
1865
  * #getter
1698
1866
  * accession -> number drawn on each segment band: the trailing number of
@@ -1702,20 +1870,41 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1702
1870
  /**
1703
1871
  * #getter
1704
1872
  * 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
1873
+ * by the on-screen legend and the SVG export legend: the categorical types
1874
+ * ordered by sequence position. Ordinal segments (exons) are numbered on
1875
+ * the band instead
1708
1876
  */
1709
1877
  readonly visibleDomainTypes: Annotation[];
1878
+ /**
1879
+ * #getter
1880
+ * the categorical color keys drawn for this view, shared by the on-screen
1881
+ * legend overlay and the SVG export's reserved column. The domain overlay
1882
+ * produces the first, listing the `featureFill` scale where an encoding
1883
+ * names one. Every field a row-table encoding or a row panel reads
1884
+ * produces one more, so two channels over one field, or two strips over
1885
+ * it, list that field once. A strip's `legend` names the title it lists
1886
+ * under, so strips over eight fields with one set of colors list one
1887
+ * legend between them
1888
+ */
1889
+ readonly legends: Legend[];
1890
+ /**
1891
+ * #getter
1892
+ * whether the overlay marks each domain with a bar under its row instead
1893
+ * of filling the row behind the letters. Letter-color mode hands the
1894
+ * background to the color scheme, so a filled box would paint over it and
1895
+ * leave the setting with nothing to show. Sub-row layout already stacks
1896
+ * the boxes clear of the letters, and with the letters too small to draw
1897
+ * the filled box is the only thing left to read.
1898
+ */
1899
+ readonly domainUnderline: boolean;
1710
1900
  /**
1711
1901
  * #getter
1712
1902
  * every filtered-on annotation resolved to the visible column span it is
1713
1903
  * 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.
1904
+ * nested short domain draws on top, and each band carries the lane the
1905
+ * sub-row layout puts it in. Resolved once here instead of per canvas
1906
+ * block per redraw; the letter renderer also reads the band colors to
1907
+ * pick legible letter colors.
1719
1908
  */
1720
1909
  readonly domainBands: Map<string, DomainBand[]>;
1721
1910
  /**
@@ -1739,15 +1928,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1739
1928
  * #getter
1740
1929
  * row indices highlighted by the current tree hover (a hovered internal
1741
1930
  * 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.
1931
+ * canvases, via the memoized name->index map.
1744
1932
  */
1745
1933
  readonly hoveredRowIndices: number[];
1746
1934
  /**
1747
1935
  * #getter
1748
1936
  * 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.
1937
+ * draws as one bordered band. Memoized because the overlay canvas redraws
1938
+ * on every mouse move.
1751
1939
  */
1752
1940
  readonly highlightedColumnRuns: {
1753
1941
  start: number;
@@ -1761,24 +1949,20 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1761
1949
  * is dropped. Row names that match no row are ignored.
1762
1950
  */
1763
1951
  readonly resolvedHighlights: ResolvedHighlight[];
1952
+ /**
1953
+ * #method
1954
+ * per-column summary statistics: consensus residue and its identity
1955
+ * fraction, both conservation scores, gap fraction, and the sorted non-gap
1956
+ * residue distribution. undefined past the end of the alignment or for an
1957
+ * all-gap column.
1958
+ */
1959
+ columnStatsAt(col: number): ColumnStats | undefined;
1764
1960
  /**
1765
1961
  * #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.
1962
+ * `columnStatsAt` for the hovered column, undefined when nothing is
1963
+ * hovered
1769
1964
  */
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;
1965
+ readonly mouseOverColumnStats: ColumnStats | undefined;
1782
1966
  /**
1783
1967
  * #method
1784
1968
  */
@@ -1788,35 +1972,84 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1788
1972
  accession?: string;
1789
1973
  dbxref?: string;
1790
1974
  } | undefined;
1791
- treeMetadata: Record<string, string> | undefined;
1975
+ rowData: Record<string, string> | undefined;
1792
1976
  };
1793
- } & {
1794
1977
  /**
1795
- * #action
1978
+ * #getter
1979
+ * each encoding with its scale resolved against the values its field
1980
+ * takes: a feature channel reads them across the features drawn, every
1981
+ * other channel across the row table. Resolved once per change of that
1982
+ * table or the encodings, never per row per frame.
1796
1983
  */
1797
- setHeaderHeight(arg: number): void;
1984
+ readonly resolvedEncodings: ResolvedEncoding[];
1985
+ /**
1986
+ * #getter
1987
+ * each row panel with its scale resolved against the values its field
1988
+ * takes across the row table, giving the color per row name, the pixel
1989
+ * column it draws in, and the entries its legend lists. Resolved once
1990
+ * per change of that table or the panels, never per block per frame.
1991
+ */
1992
+ readonly resolvedRowPanels: ResolvedRowPanel[];
1993
+ /**
1994
+ * #getter
1995
+ * the shift an `align` transform gives each row, keyed by the feature
1996
+ * name it aligns on: the offset putting the first feature of that name
1997
+ * at zero. A row carrying no such feature is absent, and keeps its own
1998
+ * origin.
1999
+ */
2000
+ readonly featureAlignShifts: Map<string, Map<string, number>>;
2001
+ /**
2002
+ * #getter
2003
+ * the color the `tipLabel` channel gives each row, by row name. Undefined
2004
+ * when no encoding names the channel, which leaves the labels the theme's
2005
+ * text color.
2006
+ */
2007
+ readonly tipLabelColors: Map<string, string> | undefined;
2008
+ /**
2009
+ * #getter
2010
+ * the wash the `rowTint` channel draws over each row, indexed by row, or
2011
+ * undefined when no encoding names the channel. The overlay draws these,
2012
+ * so a tint stays out of the raster tile cache and its keys.
2013
+ */
2014
+ readonly rowTints: (string | undefined)[] | undefined;
2015
+ /**
2016
+ * #getter
2017
+ * the color the `branch` channel gives each tree edge, by the node id at
2018
+ * the edge's far end, or undefined when no encoding names the channel. A
2019
+ * node takes the field value its tips agree on, so a clade of one value
2020
+ * colors down from where it splits off, and a node whose tips disagree or
2021
+ * whose value has no color is absent and draws in the default color.
2022
+ *
2023
+ * The pass runs over the whole tree, never `root`, so a collapsed or
2024
+ * focused clade keeps the color the full tree gives it.
2025
+ */
2026
+ readonly branchColors: Map<string, string> | undefined;
2027
+ } & {
1798
2028
  /**
1799
2029
  * #action
1800
2030
  */
1801
- setConservationTrackHeight(arg: number): void;
2031
+ setHeaderHeight(arg: number): void;
1802
2032
  /**
1803
2033
  * #action
1804
2034
  */
1805
- setColumnTrackHeight(id: string, height: number): void;
2035
+ setHideHeader(arg: boolean): void;
1806
2036
  /**
1807
2037
  * #action
2038
+ * focus the subtree a click `y` pixels down the tree overview lands on.
2039
+ * A click inside the box already drawn there clears the focus, the way
2040
+ * clicking the focused branch again does.
1808
2041
  */
1809
- setSequenceLogoTrackHeight(arg: number): void;
2042
+ treeOverviewClick(y: number): void;
1810
2043
  /**
1811
2044
  * #action
2045
+ * resize every track sharing a `heightKey`; see `trackHeights`
1812
2046
  */
1813
- setArcTrackHeight(arg: number): void;
2047
+ setTrackHeight(heightKey: string, height: number): void;
1814
2048
  /**
1815
2049
  * #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.
2050
+ * Return to the import form: reset every property not in
2051
+ * `preservedOnReset` to its default, then clear the file-derived
2052
+ * volatiles applySnapshot does not touch.
1820
2053
  */
1821
2054
  reset(): void;
1822
2055
  /**
@@ -1825,8 +2058,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1825
2058
  exportSVG(opts: ExportSvgOptions): Promise<void>;
1826
2059
  /**
1827
2060
  * #action
1828
- * draw this annotation type, or stop drawing it. Only the "stop" is
1829
- * recorded -- see `turnedOffFeatures`
2061
+ * show or hide an annotation type. Only hidden types are recorded; see
2062
+ * `turnedOffFeatures`
1830
2063
  */
1831
2064
  setFilter(accession: string, shown: boolean): void;
1832
2065
  /**
@@ -1837,6 +2070,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1837
2070
  * #action
1838
2071
  */
1839
2072
  fitVertically(): void;
2073
+ /**
2074
+ * #action
2075
+ * zoom and scroll so a span fills the alignment's width, in highlight
2076
+ * coordinates (see visibleSpan). Does nothing before the viewer knows
2077
+ * its width, or for a span that resolves to no visible column.
2078
+ */
2079
+ zoomToRegion(region: Region): void;
1840
2080
  /**
1841
2081
  * #action
1842
2082
  */
@@ -1854,6 +2094,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1854
2094
  showBranchLen: boolean;
1855
2095
  drawTree: boolean;
1856
2096
  drawNodeBubbles: boolean;
2097
+ drawNodeLabels: boolean;
2098
+ showTreeOverview: boolean;
2099
+ overviewHeight: number;
1857
2100
  autoTreeAreaWidth: boolean;
1858
2101
  columnTracks: ColumnTrackSpec[];
1859
2102
  id: string;
@@ -1865,6 +2108,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1865
2108
  type: "MsaView";
1866
2109
  drawMsaLetters: boolean;
1867
2110
  scrollZoom: boolean;
2111
+ scrollZoomAxis: "both" | "horizontal" | "vertical";
1868
2112
  height: number;
1869
2113
  rowHeight: number;
1870
2114
  scrollY: number;
@@ -1954,11 +2198,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1954
2198
  collapsed: string[];
1955
2199
  showOnly: string | undefined;
1956
2200
  turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
2201
+ trackHeights: import("mobx").IKeyValueMap<number>;
1957
2202
  residueMappings: ResidueMapping[];
1958
2203
  turnedOffFeatures: import("mobx").IKeyValueMap<boolean>;
1959
2204
  relativeTo: string | undefined;
1960
2205
  highlightColumns: number[] | undefined;
1961
2206
  highlights: Highlight[];
2207
+ clades: Clade[];
2208
+ encodings: Encoding[];
2209
+ rowPanels: RowPanelSpec[];
1962
2210
  data: {
1963
2211
  tree?: string | undefined;
1964
2212
  msa?: string | undefined;
@@ -1977,6 +2225,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1977
2225
  showBranchLen: boolean;
1978
2226
  drawTree: boolean;
1979
2227
  drawNodeBubbles: boolean;
2228
+ drawNodeLabels: boolean;
2229
+ showTreeOverview: boolean;
2230
+ overviewHeight: number;
1980
2231
  autoTreeAreaWidth: boolean;
1981
2232
  columnTracks?: undefined;
1982
2233
  id: string;
@@ -1988,6 +2239,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1988
2239
  type: "MsaView";
1989
2240
  drawMsaLetters: boolean;
1990
2241
  scrollZoom: boolean;
2242
+ scrollZoomAxis: "both" | "horizontal" | "vertical";
1991
2243
  height: number;
1992
2244
  rowHeight: number;
1993
2245
  scrollY: number;
@@ -2077,11 +2329,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
2077
2329
  collapsed: string[];
2078
2330
  showOnly: string | undefined;
2079
2331
  turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
2332
+ trackHeights: import("mobx").IKeyValueMap<number>;
2080
2333
  residueMappings: ResidueMapping[];
2081
2334
  turnedOffFeatures: import("mobx").IKeyValueMap<boolean>;
2082
2335
  relativeTo: string | undefined;
2083
2336
  highlightColumns: number[] | undefined;
2084
2337
  highlights: Highlight[];
2338
+ clades: Clade[];
2339
+ encodings: Encoding[];
2340
+ rowPanels: RowPanelSpec[];
2085
2341
  data: {
2086
2342
  tree?: string | undefined;
2087
2343
  msa?: string | undefined;