@jbrowse/plugin-linear-genome-view 4.3.0 → 5.0.0-beta.10

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 (363) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +202 -71
  2. package/esm/FeatureTrack/configSchema.js +47 -1
  3. package/esm/FeatureTrack/index.js +1 -1
  4. package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
  5. package/esm/LaunchLinearGenomeView/index.js +6 -12
  6. package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
  7. package/esm/LinearGenomeView/afterAttach.js +265 -120
  8. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  9. package/esm/LinearGenomeView/components/CenterLine.js +20 -9
  10. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
  11. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
  12. package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
  13. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +142 -0
  14. package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
  15. package/esm/LinearGenomeView/components/Cytobands.js +76 -53
  16. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +8 -3
  17. package/esm/LinearGenomeView/components/ExportSvgDialog.js +15 -67
  18. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
  19. package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
  20. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
  21. package/esm/LinearGenomeView/components/Gridlines.js +29 -58
  22. package/esm/LinearGenomeView/components/Header.d.ts +1 -1
  23. package/esm/LinearGenomeView/components/Header.js +42 -16
  24. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
  25. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
  26. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
  27. package/esm/LinearGenomeView/components/HeaderPanControls.js +18 -8
  28. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
  29. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
  30. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
  31. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
  32. package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
  33. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
  34. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
  35. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
  36. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
  37. package/esm/LinearGenomeView/components/HeaderZoomControls.js +38 -52
  38. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  39. package/esm/LinearGenomeView/components/Highlight.js +21 -25
  40. package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
  41. package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
  42. package/esm/LinearGenomeView/components/HighlightChip.d.ts +8 -0
  43. package/esm/LinearGenomeView/components/HighlightChip.js +13 -0
  44. package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
  45. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
  46. package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
  47. package/esm/LinearGenomeView/components/ImportForm.js +95 -61
  48. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
  49. package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -6
  50. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +88 -30
  52. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/MiniControls.js +14 -10
  54. package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
  55. package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
  56. package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
  57. package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
  58. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
  59. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
  60. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
  61. package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
  62. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
  63. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +25 -0
  64. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  65. package/esm/LinearGenomeView/components/OverviewRubberband.js +29 -67
  66. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
  67. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
  68. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
  69. package/esm/LinearGenomeView/components/OverviewScalebar.js +87 -83
  70. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  71. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +57 -32
  72. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
  73. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
  74. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
  75. package/esm/LinearGenomeView/components/PaddingBlocks.js +56 -0
  76. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  77. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +19 -0
  78. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
  79. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
  80. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
  81. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
  82. package/esm/LinearGenomeView/components/Rubberband.d.ts +2 -3
  83. package/esm/LinearGenomeView/components/Rubberband.js +15 -17
  84. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  85. package/esm/LinearGenomeView/components/SVGHighlightBand.js +8 -0
  86. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
  87. package/esm/LinearGenomeView/components/Scalebar.js +20 -22
  88. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  90. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  91. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +157 -126
  92. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  93. package/esm/LinearGenomeView/components/SearchBox.js +61 -68
  94. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  95. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  96. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +5 -4
  97. package/esm/LinearGenomeView/components/SearchResultsDialog.js +6 -8
  98. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +5 -3
  99. package/esm/LinearGenomeView/components/SearchResultsTable.js +31 -56
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  102. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  103. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  104. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  105. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  106. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +3 -5
  107. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  108. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  109. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  110. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  111. package/esm/LinearGenomeView/components/TrackContainer.js +136 -38
  112. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  113. package/esm/LinearGenomeView/components/TrackLabel.js +20 -26
  114. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  115. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  116. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  117. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  118. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  119. package/esm/LinearGenomeView/components/TrackLabelMenu.js +35 -87
  120. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  121. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  122. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +5 -2
  123. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +66 -24
  124. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/TracksContainer.js +53 -32
  126. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -3
  127. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -26
  128. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  129. package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
  130. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  131. package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
  132. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  133. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  134. package/esm/LinearGenomeView/components/fetchSequence.d.ts +6 -8
  135. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  136. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  137. package/esm/LinearGenomeView/components/recentLocationsMenu.js +46 -0
  138. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  139. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  140. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  141. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  142. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +9 -67
  143. package/esm/LinearGenomeView/components/useRangeSelect.js +54 -102
  144. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  145. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  146. package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -3
  147. package/esm/LinearGenomeView/components/useSideScroll.js +163 -45
  148. package/esm/LinearGenomeView/components/util.d.ts +24 -6
  149. package/esm/LinearGenomeView/components/util.js +28 -5
  150. package/esm/LinearGenomeView/consts.d.ts +9 -2
  151. package/esm/LinearGenomeView/consts.js +20 -2
  152. package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
  153. package/esm/LinearGenomeView/containingLgv.js +23 -0
  154. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  155. package/esm/LinearGenomeView/flyTo.js +135 -0
  156. package/esm/LinearGenomeView/headerFit.d.ts +29 -0
  157. package/esm/LinearGenomeView/headerFit.js +72 -0
  158. package/esm/LinearGenomeView/index.d.ts +28 -3
  159. package/esm/LinearGenomeView/index.js +13 -7
  160. package/esm/LinearGenomeView/keyboardHandler.d.ts +9 -0
  161. package/esm/LinearGenomeView/keyboardHandler.js +25 -1
  162. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  163. package/esm/LinearGenomeView/launchKeys.js +27 -0
  164. package/esm/LinearGenomeView/lazyDialogs.d.ts +8 -14
  165. package/esm/LinearGenomeView/lazyDialogs.js +4 -3
  166. package/esm/LinearGenomeView/linkedViewSync.d.ts +12 -0
  167. package/esm/LinearGenomeView/linkedViewSync.js +36 -0
  168. package/esm/LinearGenomeView/menuItems.d.ts +25 -2
  169. package/esm/LinearGenomeView/menuItems.js +306 -179
  170. package/esm/LinearGenomeView/model.d.ts +3363 -164
  171. package/esm/LinearGenomeView/model.js +2548 -565
  172. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
  173. package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
  174. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
  175. package/esm/LinearGenomeView/showRegionsWithUndo.js +50 -0
  176. package/esm/LinearGenomeView/stickyChrome.d.ts +15 -0
  177. package/esm/LinearGenomeView/stickyChrome.js +26 -0
  178. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
  179. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +17 -18
  180. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +5 -3
  181. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +34 -35
  182. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
  183. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
  184. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
  185. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
  186. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
  187. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +73 -41
  188. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
  189. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +20 -3
  190. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
  191. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +36 -0
  192. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
  193. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +66 -39
  194. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
  195. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +9 -7
  196. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
  197. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
  198. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
  199. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +54 -9
  200. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +9 -15
  201. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +17 -21
  202. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
  203. package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
  204. package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
  205. package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
  206. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
  207. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
  208. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
  209. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +245 -0
  210. package/esm/LinearGenomeView/svgcomponents/util.d.ts +96 -5
  211. package/esm/LinearGenomeView/svgcomponents/util.js +242 -4
  212. package/esm/LinearGenomeView/types.d.ts +20 -37
  213. package/esm/LinearGenomeView/types.js +1 -0
  214. package/esm/LinearGenomeView/util.d.ts +347 -12
  215. package/esm/LinearGenomeView/util.js +577 -62
  216. package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
  217. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +40 -0
  218. package/esm/MultiLevelRubberband/index.d.ts +4 -0
  219. package/esm/MultiLevelRubberband/index.js +3 -0
  220. package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
  221. package/esm/MultiLevelRubberband/menuItems.js +52 -0
  222. package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
  223. package/esm/MultiLevelRubberband/rowLabel.js +27 -0
  224. package/esm/MultiLevelRubberband/types.d.ts +7 -0
  225. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +25 -0
  226. package/esm/MultiLevelRubberband/useRangeSelect.js +120 -0
  227. package/esm/displayKitTests/perRegionTestEnv.d.ts +1391 -0
  228. package/esm/displayKitTests/perRegionTestEnv.js +142 -0
  229. package/esm/index.d.ts +50 -1245
  230. package/esm/index.js +88 -33
  231. package/esm/searchUtils.d.ts +62 -12
  232. package/esm/searchUtils.js +335 -48
  233. package/esm/shared/RubberbandSpan.d.ts +15 -0
  234. package/esm/shared/RubberbandSpan.js +34 -0
  235. package/esm/shared/coordLabels.d.ts +47 -0
  236. package/esm/shared/coordLabels.js +133 -0
  237. package/esm/shared/useWindowDrag.d.ts +18 -0
  238. package/esm/shared/useWindowDrag.js +45 -0
  239. package/package.json +18 -19
  240. package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
  241. package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
  242. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
  243. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
  244. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  245. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
  246. package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
  247. package/esm/BaseLinearDisplay/components/Block.js +0 -45
  248. package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  249. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
  250. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  251. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
  252. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
  253. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
  254. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
  255. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
  256. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
  257. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
  258. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
  259. package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
  260. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
  261. package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
  262. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  263. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
  264. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
  265. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
  266. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
  267. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
  268. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
  269. package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
  270. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
  271. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
  272. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
  273. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
  274. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
  275. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
  276. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  277. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
  278. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
  279. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
  280. package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
  281. package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
  282. package/esm/BaseLinearDisplay/components/util.js +0 -107
  283. package/esm/BaseLinearDisplay/index.d.ts +0 -17
  284. package/esm/BaseLinearDisplay/index.js +0 -13
  285. package/esm/BaseLinearDisplay/model.d.ts +0 -1197
  286. package/esm/BaseLinearDisplay/model.js +0 -432
  287. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  288. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
  289. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
  290. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
  291. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
  292. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
  293. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  294. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
  295. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  296. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
  297. package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  298. package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
  299. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
  300. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
  301. package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
  302. package/esm/BaseLinearDisplay/models/util.js +0 -43
  303. package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
  304. package/esm/BaseLinearDisplay/renderSvg.js +0 -63
  305. package/esm/BaseLinearDisplay/types.d.ts +0 -43
  306. package/esm/BaseLinearDisplay/types.js +0 -3
  307. package/esm/BaseLinearDisplay/util.d.ts +0 -16
  308. package/esm/BaseLinearDisplay/util.js +0 -71
  309. package/esm/BasicTrack/configSchema.d.ts +0 -85
  310. package/esm/BasicTrack/configSchema.js +0 -8
  311. package/esm/BasicTrack/index.d.ts +0 -2
  312. package/esm/BasicTrack/index.js +0 -12
  313. package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
  314. package/esm/LinearBareDisplay/configSchema.js +0 -11
  315. package/esm/LinearBareDisplay/index.d.ts +0 -4
  316. package/esm/LinearBareDisplay/index.js +0 -20
  317. package/esm/LinearBareDisplay/model.d.ts +0 -1196
  318. package/esm/LinearBareDisplay/model.js +0 -32
  319. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
  320. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
  321. package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
  322. package/esm/LinearBasicDisplay/configSchema.js +0 -11
  323. package/esm/LinearBasicDisplay/index.d.ts +0 -4
  324. package/esm/LinearBasicDisplay/index.js +0 -20
  325. package/esm/LinearBasicDisplay/model.d.ts +0 -1391
  326. package/esm/LinearBasicDisplay/model.js +0 -158
  327. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
  328. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
  329. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  330. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
  331. package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
  332. package/esm/LinearFeatureDisplay/configSchema.js +0 -11
  333. package/esm/LinearFeatureDisplay/index.d.ts +0 -3
  334. package/esm/LinearFeatureDisplay/index.js +0 -2
  335. package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
  336. package/esm/LinearFeatureDisplay/model.js +0 -305
  337. package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
  338. package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
  339. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  340. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
  341. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
  342. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
  343. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  344. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
  345. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  346. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
  347. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  348. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
  349. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  350. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
  351. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  352. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
  353. package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  354. package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
  355. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  356. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
  357. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  358. package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
  359. package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
  360. package/esm/LinearGenomeView/svgExportUtil.js +0 -6
  361. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  362. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
  363. /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
@@ -1,301 +1,3500 @@
1
- import type React from 'react';
2
- import type { BpOffset, ExportSvgOptions, HighlightType, InitState, NavLocation, VolatileGuide } from './types.ts';
1
+ import type { BpOffset, ExportSvgOptions, HighlightType, InitState, NavLocation, ViewTrackLabelMode, VolatileGuide } from './types.ts';
2
+ import type { RegionEdit } from './util.ts';
3
3
  import type PluginManager from '@jbrowse/core/PluginManager';
4
4
  import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
5
- import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
6
5
  import type { MenuItem } from '@jbrowse/core/ui';
7
6
  import type { ParsedLocString } from '@jbrowse/core/util';
8
- import type { BaseBlock, BlockSet } from '@jbrowse/core/util/blockTypes';
7
+ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
8
+ import type { BlockSet, ContentBlock } from '@jbrowse/core/util/blockTypes';
9
9
  import type { Region } from '@jbrowse/core/util/types';
10
+ import type { ViewStatus } from '@jbrowse/core/util/viewStatus';
11
+ import type { LaunchInput } from '@jbrowse/core/util/withLaunchInput';
10
12
  import type { Instance } from '@jbrowse/mobx-state-tree';
11
- export declare function stateModelFactory(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<{
13
+ /** One span of the row that is not track data — see `paddingSpans`. */
14
+ export interface PaddingSpan {
15
+ key: string;
16
+ x: number;
17
+ width: number;
18
+ kind: 'seam' | 'elided' | 'boundary';
19
+ }
20
+ export interface HighlightRegion {
21
+ assemblyName?: string;
22
+ refName: string;
23
+ start: number;
24
+ end: number;
25
+ }
26
+ /**
27
+ * #stateModel LinearGenomeView
28
+ * #category view
29
+ *
30
+ * #example
31
+ * A `LinearGenomeView` is what you hand-author under `defaultSession.views`, and
32
+ * every setting goes directly on the view object. `assembly`/`loc` fill in
33
+ * `displayedRegions`/`bpPerPx`/`offsetPx` for you:
34
+ * ```js
35
+ * defaultSession: {
36
+ * name: 'My session',
37
+ * views: [
38
+ * {
39
+ * type: 'LinearGenomeView',
40
+ * colorByCDS: true,
41
+ * assembly: 'hg38',
42
+ * loc: 'chr1:1,000,000-1,100,000',
43
+ * tracks: ['genes', 'alignments'],
44
+ * },
45
+ * ],
46
+ * }
47
+ * ```
48
+ * `assembly`, `loc`, `tracks`, `tracklist`, `nav` and `highlight` need
49
+ * on-attach resolution and are captured into the `launch` property below;
50
+ * `colorByCDS`, `showAminoAcids`, `showCenterLine` and `trackLabels` are plain
51
+ * view props MST restores natively. Both are written the same way.
52
+ * At runtime the same model is driven imperatively — every property and action
53
+ * below is reachable on `viewState.session.views[0]`:
54
+ * ```js
55
+ * const view = viewState.session.views[0]
56
+ * await view.navToLocString('chr1:2,000,000-2,100,000')
57
+ * view.showTrack('alignments')
58
+ * view.zoomTo(view.bpPerPx * 2) // zoom out 2x
59
+ * ```
60
+ */
61
+ export declare function stateModelFactory(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<Omit<{
12
62
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
13
63
  displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
14
- minimized: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
15
- } & {
64
+ minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
65
+ }, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "launch" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
16
66
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
17
67
  type: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
18
- offsetPx: import("@jbrowse/mobx-state-tree").IType<number | undefined, number, number>;
19
- bpPerPx: import("@jbrowse/mobx-state-tree").IType<number | undefined, number, number>;
68
+ windowStartBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
69
+ windowWidthBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
70
+ legacyBpPerPx: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
20
71
  displayedRegions: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<Region[], Region[], Region[]>, [undefined]>;
21
72
  tracks: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
22
- hideHeader: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
23
- hideHeaderOverview: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
24
- hideNoTracksActive: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
25
- trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
73
+ hideHeader: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
74
+ hideHeaderOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
75
+ hideNoTracksActive: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
76
+ trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
26
77
  showCenterLine: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
27
- showCytobandsSetting: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
78
+ showCytobands: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
28
79
  trackLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
29
- showGridlines: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
30
- highlight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<HighlightType, HighlightType, HighlightType>>, [undefined]>;
31
- highlightsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
32
- labelsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
80
+ showGridlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
33
81
  colorByCDS: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
82
+ showAminoAcids: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
34
83
  showTrackOutlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
35
- init: import("@jbrowse/mobx-state-tree").IType<InitState | undefined, InitState | undefined, InitState | undefined>;
84
+ scalebarOnly: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
85
+ launch: import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>;
36
86
  }, {
37
87
  width: number;
88
+ bodyMounted: boolean;
38
89
  } & {
90
+ readonly rendersDisplays: boolean;
91
+ readonly effectiveBodyMounted: boolean;
39
92
  menuItems(): MenuItem[];
93
+ readonly ownTracks: import("@jbrowse/core/util").AbstractTrackModel[];
94
+ readonly ownViews: import("@jbrowse/core/util").AbstractViewModel[];
40
95
  } & {
41
96
  setDisplayName(name: string): void;
42
97
  setWidth(newWidth: number): void;
98
+ setBodyMounted(flag: boolean): void;
43
99
  setMinimized(flag: boolean): void;
44
100
  } & {
101
+ /**
102
+ * #volatile
103
+ * Height of each track's in-flow label band, measured by
104
+ * TrackContainer as the rendering container's offset inside its Paper.
105
+ * Absent (0) while the label is hidden, overlapping, or not yet
106
+ * measured. Observable, so the offset and height getters re-derive
107
+ * when a band changes.
108
+ */
109
+ trackLabelBands: import("mobx").ObservableMap<string, number>;
110
+ /**
111
+ * #volatile
112
+ * How much taller the view's box is than the scroll port it sits in,
113
+ * in px, negative when it is shorter. Measured by the view component
114
+ * for a top-level view; undefined until then, and for a nested one.
115
+ */
116
+ scrollPortExcess: number | undefined;
117
+ /**
118
+ * #volatile
119
+ */
45
120
  volatileWidth: number | undefined;
46
- minimumBlockWidth: number;
121
+ /**
122
+ * #volatile
123
+ */
47
124
  draggingTrackId: undefined | string;
125
+ /**
126
+ * #volatile
127
+ */
48
128
  lastTrackDragY: undefined | number;
129
+ /**
130
+ * #volatile
131
+ */
49
132
  volatileError: unknown;
50
- scaleFactor: number;
51
- targetBpPerPx: number | undefined;
52
- trackRefs: Record<string, HTMLDivElement>;
53
- coarseDynamicBlocks: BaseBlock[];
133
+ /**
134
+ * #volatile
135
+ */
136
+ coarseDynamicBlocks: ContentBlock[];
137
+ /**
138
+ * #volatile
139
+ */
54
140
  coarseTotalBp: number;
141
+ /**
142
+ * #volatile
143
+ */
144
+ coarseBpPerPx: number;
145
+ /**
146
+ * #volatile
147
+ */
55
148
  leftOffset: undefined | BpOffset;
149
+ /**
150
+ * #volatile
151
+ */
56
152
  rightOffset: undefined | BpOffset;
153
+ /**
154
+ * #volatile
155
+ */
57
156
  isScalebarRefNameMenuOpen: boolean;
58
- scalebarRefNameClickPending: boolean;
157
+ /**
158
+ * #volatile
159
+ * temporary vertical guides that can be set by displays (e.g., LD display hover)
160
+ */
59
161
  volatileGuides: VolatileGuide[];
60
162
  } & {
163
+ /**
164
+ * #getter
165
+ * the launch state that still has something to apply — the gate every
166
+ * loading and error path below reads.
167
+ */
168
+ readonly pendingLaunch: LaunchInput<InitState & {
169
+ unknown?: Record<string, unknown>;
170
+ malformed?: Record<string, unknown>;
171
+ legacyInit?: boolean;
172
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>>> | undefined;
173
+ /**
174
+ * #getter
175
+ * corresponds roughly to the zoom level, base-pairs per pixel.
176
+ *
177
+ * Zero before a width is measured, which is the same not-yet-measured
178
+ * sentinel `Base1DView` uses and which `displayedRegionsTotalPx` and the
179
+ * offset getters already guard for. Reads `volatileWidth` rather than the
180
+ * `width` getter on purpose: that one throws when unmeasured, and these
181
+ * are read from the first render.
182
+ */
183
+ readonly bpPerPx: number;
184
+ /**
185
+ * #getter
186
+ * corresponds roughly to the horizontal scroll of the LGV
187
+ */
188
+ readonly offsetPx: number;
189
+ /**
190
+ * #getter
191
+ * a displayed region narrower than this many pixels draws as an elided
192
+ * block
193
+ */
194
+ readonly minimumBlockWidth: number;
195
+ /**
196
+ * #getter
197
+ * scroll-to-zoom is a global, personal preference resolved from the
198
+ * session; toggling it in any view applies everywhere
199
+ */
200
+ readonly scrollZoom: boolean;
201
+ /**
202
+ * #getter
203
+ */
61
204
  readonly pinnedTracks: any[];
205
+ /**
206
+ * #getter
207
+ */
62
208
  readonly unpinnedTracks: any[];
63
- readonly trackLabelsSetting: any;
209
+ /**
210
+ * #getter
211
+ * the effective track labels setting, resolving the stored `trackLabels`
212
+ * against the LinearGenomeViewPlugin config default
213
+ */
214
+ readonly effectiveTrackLabels: ViewTrackLabelMode;
215
+ /**
216
+ * #getter
217
+ */
64
218
  readonly width: number;
65
- readonly interRegionPaddingWidth: number;
219
+ /**
220
+ * #getter
221
+ * width minus track outline borders (1px each side when shown)
222
+ */
223
+ readonly trackWidthPx: number;
224
+ /**
225
+ * #getter
226
+ */
66
227
  readonly assemblyNames: string[];
228
+ /**
229
+ * #getter
230
+ */
67
231
  readonly assemblyDisplayNames: string[];
232
+ /**
233
+ * #getter
234
+ * the session's highlights on this view's assemblies
235
+ */
236
+ readonly highlights: HighlightType[];
237
+ /**
238
+ * #getter
239
+ * checking if lgv is a 'top-level' view is used for toggling pin track
240
+ * capability, sticky positioning
241
+ */
68
242
  readonly isTopLevelView: boolean;
243
+ /**
244
+ * #getter
245
+ * only uses sticky view headers when it is a 'top-level' view and
246
+ * session allows it
247
+ */
69
248
  readonly stickyViewHeaders: boolean;
70
- readonly rubberbandTop: number;
71
- readonly pinnedTracksTop: number;
72
249
  } & {
73
- scalebarDisplayPrefix(): string | undefined;
74
- MiniControlsComponent(): React.FC<any>;
75
- HeaderComponent(): React.FC<any>;
250
+ /**
251
+ * #getter
252
+ * The census entry for this view: the tracks it holds itself. Declared
253
+ * rather than derived — see `BaseViewModel.ownTracks`.
254
+ */
255
+ readonly ownTracks: any[];
256
+ /**
257
+ * #getter
258
+ * See `BaseViewModel.rendersDisplays`.
259
+ */
260
+ readonly rendersDisplays: boolean;
261
+ /**
262
+ * #getter
263
+ * Assembly name captioning the scalebar ahead of its refName labels, or
264
+ * undefined for none. A container view (e.g. LinearSyntenyView) opts its sub-views in by
265
+ * exposing showAssemblyNameInSubviewScalebar; duck-typed rather than
266
+ * matching a concrete view type so no upward plugin dependency is needed
267
+ * and any container can opt in. A wrong nesting depth simply yields no
268
+ * prefix — hence the hasParent guard, since getParent throws (rather than
269
+ * returning undefined) when the view sits shallower than depth 2.
270
+ */
271
+ readonly scalebarDisplayPrefix: string | undefined;
272
+ /**
273
+ * #getter
274
+ */
76
275
  readonly assembliesNotFound: string | undefined;
77
- readonly assemblyErrors: string;
276
+ /**
277
+ * #getter
278
+ */
279
+ readonly assemblyErrors: string | undefined;
280
+ /**
281
+ * #getter
282
+ */
78
283
  readonly assembliesInitialized: boolean;
284
+ /**
285
+ * #getter
286
+ * the assembly named by a pending `init`, or undefined when no init is
287
+ * set. `init`'s assembly isn't in `assemblyNames` yet (that derives from
288
+ * displayedRegions, still empty pre-navigation), so init-phase readiness
289
+ * and error checks resolve it directly through here.
290
+ */
291
+ readonly initAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
292
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
293
+ }> & {
294
+ error: unknown;
295
+ loadingP: Promise<void> | undefined;
296
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
297
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
298
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
299
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
300
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
301
+ loadedGeneticCodes: Record<string, number> | undefined;
302
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
303
+ statusMessage: string | undefined;
304
+ statusProgress: number | undefined;
305
+ statusSource: string | undefined;
306
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
307
+ } & {
308
+ getConf(arg: string): any;
309
+ } & {
310
+ readonly name: string;
311
+ readonly aliases: string[];
312
+ readonly displayName: string;
313
+ readonly refNameColors: string[];
314
+ } & {
315
+ readonly allAliases: string[];
316
+ hasName(name: string): boolean;
317
+ } & {
318
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
319
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
320
+ } & {
321
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
322
+ regions: import("@jbrowse/core/util").Region[];
323
+ cytobands: import("@jbrowse/core/util").Feature[];
324
+ geneticCodes: Record<string, number>;
325
+ }): void;
326
+ setError(e: unknown): void;
327
+ setLoadingP(p?: Promise<void>): void;
328
+ loadPre(): Promise<void>;
329
+ } & {
330
+ load(): Promise<void>;
331
+ } & {
332
+ afterAttach(): void;
333
+ } & {
334
+ readonly initialized: boolean;
335
+ readonly allRefNames: string[] | undefined;
336
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
337
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
338
+ } & {
339
+ readonly refNames: string[] | undefined;
340
+ } & {
341
+ readonly refNameToIndex: Map<string, number> | undefined;
342
+ } & {
343
+ getCanonicalRefName(refName: string): string | undefined;
344
+ getRefNameColor(refName: string): string | undefined;
345
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
346
+ getGeneticCodeId(refName: string): number;
347
+ getSeqAdapterRefName(canonicalRefName: string): string;
348
+ } & {
349
+ getCanonicalRefName2(refName: string): string;
350
+ isValidRefName(refName: string): boolean;
351
+ } & {
352
+ getRefNamePosition(refName: string): number | undefined;
353
+ getAliasesForRefName(refName: string): string[];
354
+ getRefNameMapForAdapter(adapterConf: {
355
+ [x: string]: unknown;
356
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
357
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
358
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
359
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
360
+ }, {
361
+ error: unknown;
362
+ loadingP: Promise<void> | undefined;
363
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
364
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
365
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
366
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
367
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
368
+ loadedGeneticCodes: Record<string, number> | undefined;
369
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
370
+ statusMessage: string | undefined;
371
+ statusProgress: number | undefined;
372
+ statusSource: string | undefined;
373
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
374
+ } & {
375
+ getConf(arg: string): any;
376
+ } & {
377
+ readonly name: string;
378
+ readonly aliases: string[];
379
+ readonly displayName: string;
380
+ readonly refNameColors: string[];
381
+ } & {
382
+ readonly allAliases: string[];
383
+ hasName(name: string): boolean;
384
+ } & {
385
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
386
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
387
+ } & {
388
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
389
+ regions: import("@jbrowse/core/util").Region[];
390
+ cytobands: import("@jbrowse/core/util").Feature[];
391
+ geneticCodes: Record<string, number>;
392
+ }): void;
393
+ setError(e: unknown): void;
394
+ setLoadingP(p?: Promise<void>): void;
395
+ loadPre(): Promise<void>;
396
+ } & {
397
+ load(): Promise<void>;
398
+ } & {
399
+ afterAttach(): void;
400
+ } & {
401
+ readonly initialized: boolean;
402
+ readonly allRefNames: string[] | undefined;
403
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
404
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
405
+ } & {
406
+ readonly refNames: string[] | undefined;
407
+ } & {
408
+ readonly refNameToIndex: Map<string, number> | undefined;
409
+ } & {
410
+ getCanonicalRefName(refName: string): string | undefined;
411
+ getRefNameColor(refName: string): string | undefined;
412
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
413
+ getGeneticCodeId(refName: string): number;
414
+ getSeqAdapterRefName(canonicalRefName: string): string;
415
+ } & {
416
+ getCanonicalRefName2(refName: string): string;
417
+ isValidRefName(refName: string): boolean;
418
+ } & {
419
+ getRefNamePosition(refName: string): number | undefined;
420
+ getAliasesForRefName(refName: string): string[];
421
+ getRefNameMapForAdapter(adapterConf: {
422
+ [x: string]: unknown;
423
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
424
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
425
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
426
+ /**
427
+ * #getter
428
+ * The assembly a pending launch is for: the one it names, else the one
429
+ * the view already shows. A re-launch of a materialized view (a
430
+ * `jb.setSession` document writing `loc` beside the built state) need
431
+ * not restate it; without the default the readiness gate waited on
432
+ * `assemblyManager.get(undefined)` for good. Undefined on a fresh view
433
+ * whose blob names none, which `error` reports.
434
+ */
435
+ readonly launchAssemblyName: string | undefined;
436
+ /**
437
+ * #getter
438
+ */
79
439
  readonly initialized: boolean;
440
+ /**
441
+ * #getter
442
+ */
80
443
  readonly hasDisplayedRegions: boolean;
81
- readonly loadingMessage: "Loading" | undefined;
444
+ /**
445
+ * #getter
446
+ * The assembly whose load the spinner is waiting on: the one `init` names
447
+ * before navigation (it isn't in assemblyNames yet), else the first of the
448
+ * displayed assemblies that hasn't finished loading.
449
+ */
450
+ readonly loadingAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
451
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
452
+ }> & {
453
+ error: unknown;
454
+ loadingP: Promise<void> | undefined;
455
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
456
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
457
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
458
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
459
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
460
+ loadedGeneticCodes: Record<string, number> | undefined;
461
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
462
+ statusMessage: string | undefined;
463
+ statusProgress: number | undefined;
464
+ statusSource: string | undefined;
465
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
466
+ } & {
467
+ getConf(arg: string): any;
468
+ } & {
469
+ readonly name: string;
470
+ readonly aliases: string[];
471
+ readonly displayName: string;
472
+ readonly refNameColors: string[];
473
+ } & {
474
+ readonly allAliases: string[];
475
+ hasName(name: string): boolean;
476
+ } & {
477
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
478
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
479
+ } & {
480
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
481
+ regions: import("@jbrowse/core/util").Region[];
482
+ cytobands: import("@jbrowse/core/util").Feature[];
483
+ geneticCodes: Record<string, number>;
484
+ }): void;
485
+ setError(e: unknown): void;
486
+ setLoadingP(p?: Promise<void>): void;
487
+ loadPre(): Promise<void>;
488
+ } & {
489
+ load(): Promise<void>;
490
+ } & {
491
+ afterAttach(): void;
492
+ } & {
493
+ readonly initialized: boolean;
494
+ readonly allRefNames: string[] | undefined;
495
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
496
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
497
+ } & {
498
+ readonly refNames: string[] | undefined;
499
+ } & {
500
+ readonly refNameToIndex: Map<string, number> | undefined;
501
+ } & {
502
+ getCanonicalRefName(refName: string): string | undefined;
503
+ getRefNameColor(refName: string): string | undefined;
504
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
505
+ getGeneticCodeId(refName: string): number;
506
+ getSeqAdapterRefName(canonicalRefName: string): string;
507
+ } & {
508
+ getCanonicalRefName2(refName: string): string;
509
+ isValidRefName(refName: string): boolean;
510
+ } & {
511
+ getRefNamePosition(refName: string): number | undefined;
512
+ getAliasesForRefName(refName: string): string[];
513
+ getRefNameMapForAdapter(adapterConf: {
514
+ [x: string]: unknown;
515
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
516
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
517
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
518
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
519
+ }, {
520
+ error: unknown;
521
+ loadingP: Promise<void> | undefined;
522
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
523
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
524
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
525
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
526
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
527
+ loadedGeneticCodes: Record<string, number> | undefined;
528
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
529
+ statusMessage: string | undefined;
530
+ statusProgress: number | undefined;
531
+ statusSource: string | undefined;
532
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
533
+ } & {
534
+ getConf(arg: string): any;
535
+ } & {
536
+ readonly name: string;
537
+ readonly aliases: string[];
538
+ readonly displayName: string;
539
+ readonly refNameColors: string[];
540
+ } & {
541
+ readonly allAliases: string[];
542
+ hasName(name: string): boolean;
543
+ } & {
544
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
545
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
546
+ } & {
547
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
548
+ regions: import("@jbrowse/core/util").Region[];
549
+ cytobands: import("@jbrowse/core/util").Feature[];
550
+ geneticCodes: Record<string, number>;
551
+ }): void;
552
+ setError(e: unknown): void;
553
+ setLoadingP(p?: Promise<void>): void;
554
+ loadPre(): Promise<void>;
555
+ } & {
556
+ load(): Promise<void>;
557
+ } & {
558
+ afterAttach(): void;
559
+ } & {
560
+ readonly initialized: boolean;
561
+ readonly allRefNames: string[] | undefined;
562
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
563
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
564
+ } & {
565
+ readonly refNames: string[] | undefined;
566
+ } & {
567
+ readonly refNameToIndex: Map<string, number> | undefined;
568
+ } & {
569
+ getCanonicalRefName(refName: string): string | undefined;
570
+ getRefNameColor(refName: string): string | undefined;
571
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
572
+ getGeneticCodeId(refName: string): number;
573
+ getSeqAdapterRefName(canonicalRefName: string): string;
574
+ } & {
575
+ getCanonicalRefName2(refName: string): string;
576
+ isValidRefName(refName: string): boolean;
577
+ } & {
578
+ getRefNamePosition(refName: string): number | undefined;
579
+ getAliasesForRefName(refName: string): string[];
580
+ getRefNameMapForAdapter(adapterConf: {
581
+ [x: string]: unknown;
582
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
583
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
584
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
585
+ /**
586
+ * #getter
587
+ * What the loading screen says while `showLoading`, read off the
588
+ * assembly whose load is the wait; undefined otherwise.
589
+ */
590
+ readonly loading: import("@jbrowse/core/util/viewStatus").ViewLoading | undefined;
591
+ /**
592
+ * #getter
593
+ */
82
594
  readonly hasSomethingToShow: boolean;
595
+ /**
596
+ * #getter
597
+ * init is set but its async navigation (the afterAttach autorun) hasn't
598
+ * populated displayedRegions yet. `initialized` can already be true here
599
+ * (it only tracks assembly readiness), so without this the container
600
+ * would mount over empty regions and pxToBp/hover would throw.
601
+ *
602
+ * **Not dotplot's or synteny's `initPending`**, which is the bare
603
+ * `!!self.pendingLaunch` — "an init blob has not been applied" — and which those
604
+ * views read from their `settled` gate rather than from `showLoading`.
605
+ * This one is narrower on purpose: it closes only the window where there
606
+ * is nothing on screen. Once navigation has produced regions the view is
607
+ * usable and gets shown, even though `init` is still set while the tracks
608
+ * and highlights land. Renamed away from the shared spelling because the
609
+ * two predicates disagree exactly there, and the bare name reads as
610
+ * theirs.
611
+ */
612
+ readonly awaitingInitNavigation: boolean;
613
+ /**
614
+ * #getter
615
+ * Whether to show a loading indicator instead of the import form or view
616
+ */
83
617
  readonly showLoading: boolean;
618
+ /**
619
+ * #getter
620
+ * Whether to show the import form
621
+ */
84
622
  readonly showImportForm: boolean;
623
+ /**
624
+ * #getter
625
+ * Is there anything to draw yet? The gate anything reading block geometry
626
+ * — a ruler, a scalebar, a display — has to pass first, because
627
+ * `width`/`staticBlocks` throw by design before the view has been
628
+ * measured and navigated.
629
+ *
630
+ * **Not `initialized`**, which is the trap this getter exists to close.
631
+ * That one answers "have the assembly's regions loaded", which is only
632
+ * the first of two async steps: navigating then populates
633
+ * `displayedRegions`, and in the window between the two `initialized` is
634
+ * already true while there is still nothing on screen. `showLoading`
635
+ * folds in `awaitingInitNavigation`, the getter that exists for exactly
636
+ * that gap.
637
+ *
638
+ * `error` is the third outcome and is why this is not a bare
639
+ * `!showLoading`: a failed assembly load also ends the loading state, so
640
+ * that alone would mount over the wreckage. Read `error` yourself if you
641
+ * want to draw it.
642
+ */
643
+ readonly ready: boolean;
644
+ /**
645
+ * #getter
646
+ * The same question as `ready` with the other three outcomes named, for a
647
+ * host that draws its own chrome and has to render all four. See
648
+ * `computeViewStatus`, whose precedence this defers to — and note its
649
+ * `ready` is narrower than the getter above, which is true when nothing
650
+ * has told the view where to look.
651
+ */
652
+ readonly status: ViewStatus;
653
+ /**
654
+ * #getter
655
+ */
85
656
  readonly scalebarHeight: number;
657
+ /**
658
+ * #getter
659
+ * What TrackContainer puts *above* a track's rendering container: the gap
660
+ * over its Paper, and the Paper's own top border when outlines are on.
661
+ */
662
+ readonly trackLeadingChrome: number;
663
+ /**
664
+ * #getter
665
+ * ...and what it puts below: the resize divider, plus the matching bottom
666
+ * border.
667
+ */
668
+ readonly trackTrailingChrome: number;
669
+ /**
670
+ * #getter
671
+ * A track's full cost beyond its display height.
672
+ *
673
+ * The track *label* is not counted here: an offset label is an in-flow
674
+ * box whose height is whatever the theme renders a Paper of icon buttons
675
+ * at, so it is measured into `trackLabelBands` per track and added by
676
+ * `trackLabelBand` rather than derived.
677
+ */
678
+ readonly trackChromeHeight: number;
679
+ /**
680
+ * #getter
681
+ */
86
682
  readonly headerHeight: number;
683
+ /**
684
+ * #method
685
+ * rendered height of a single track, collapsing to a fixed height when
686
+ * minimized. Shared by trackHeights and getTrackYOffset so the two can't
687
+ * disagree. Reads `activeDisplay` — the display TrackContainer actually
688
+ * mounts — rather than re-picking `displays[0]`, so the view's height math
689
+ * can't diverge from what is on screen.
690
+ */
691
+ trackHeight(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): any;
692
+ /**
693
+ * #method
694
+ * the measured in-flow label band above a track's rendering container,
695
+ * 0 until TrackContainer has measured one or when no label is in flow
696
+ */
697
+ trackLabelBand(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): number;
698
+ /**
699
+ * #getter
700
+ */
87
701
  readonly trackHeights: number;
88
- readonly trackHeightsWithResizeHandles: number;
702
+ /**
703
+ * #getter
704
+ */
705
+ readonly trackHeightsWithChrome: number;
706
+ /**
707
+ * #getter
708
+ */
89
709
  readonly height: number;
710
+ /**
711
+ * #getter
712
+ * The display height of each track a whole-stack resize moves, by track
713
+ * instance id: every shown track that is not minimized.
714
+ */
715
+ readonly resizableTrackHeights: Map<any, any>;
716
+ /**
717
+ * #method
718
+ * Y offset (in pixels, from the top of the view) where a track's
719
+ * rendering container starts. Walks tracks in DOM render order (pinned
720
+ * first, then unpinned), from the same constants TrackContainer lays its
721
+ * Paper out with. Returns `undefined` if the track is not present.
722
+ *
723
+ * Includes each track's measured label band, this track's own included,
724
+ * since an in-flow label sits above the rendering container inside the
725
+ * same Paper. Exact once TrackContainer has measured; before that it is
726
+ * short by the unmeasured bands.
727
+ */
728
+ getTrackYOffset(trackId: string): number | undefined;
729
+ /**
730
+ * #method
731
+ * the pinned or unpinned sibling list a track renders within; move
732
+ * up/down/top/bottom reorder inside this section rather than the full
733
+ * `tracks` array, since the two sections lay out independently
734
+ */
735
+ trackSection(id: string): any[];
736
+ /**
737
+ * #getter
738
+ */
90
739
  readonly totalBp: number;
91
- getNonElidedRegionCount(bpPerPx: number): number;
92
- getInterRegionPaddingPx(bpPerPx: number): number;
740
+ /**
741
+ * #getter
742
+ */
743
+ readonly fitBpPerPx: number;
744
+ /**
745
+ * #getter
746
+ * The zoom-out limit. Equal to the fit for this view's regions, except
747
+ * while a container holds it on a coarser shared scale, such as a small
748
+ * genome next to a large one, drawn short so the two compare by length.
749
+ *
750
+ * The shared scale raises the limit. A bpPerPx written past the limit
751
+ * would be undone by the first operation that clamps (a wheel tick, a
752
+ * rubberband, a `setDisplayedRegions`), as with the dotplot's locked
753
+ * aspect ratio turning "zoom out" into a zoom in (`axisMaxBpPerPx`).
754
+ * Every zoom clamps against the same ceiling, so full zoom-out stops at
755
+ * the shared scale.
756
+ */
93
757
  readonly maxBpPerPx: number;
758
+ /**
759
+ * #getter
760
+ * The zoom-out ceiling a containing comparative view holds this row to,
761
+ * or 0 for a standalone view, a mode that is off, and a stack that cannot
762
+ * answer yet.
763
+ *
764
+ * Pulled rather than pushed down into a volatile: the number is a
765
+ * function of every row's fit, all of which move on a resize, and a
766
+ * stored copy would be stale by the next layout.
767
+ */
768
+ readonly sharedFitBpPerPx: number;
769
+ /**
770
+ * #getter
771
+ */
94
772
  readonly minBpPerPx: number;
773
+ /**
774
+ * #getter
775
+ */
95
776
  readonly error: unknown;
777
+ /**
778
+ * #getter
779
+ */
96
780
  readonly maxOffset: number;
781
+ /**
782
+ * #getter
783
+ */
97
784
  readonly minOffset: number;
785
+ /**
786
+ * #getter
787
+ * Whether the displayed regions read left-to-right, right-to-left, or
788
+ * some of each. `horizontallyFlip` reverses the order and flips every
789
+ * region at once, so a flipped row is uniformly `reversed` and `mixed`
790
+ * takes going out of your way — the scalebar label menu's per-region
791
+ * "Reverse region". Read off `displayedRegions` rather than off blocks
792
+ * because blocks cover the window and this is a fact about the row.
793
+ */
794
+ readonly displayedRegionsOrientation: import("./util.ts").RegionsOrientation;
795
+ /**
796
+ * #getter
797
+ */
98
798
  readonly displayedRegionsTotalPx: number;
99
- renderProps(): any;
100
- searchScope(assemblyName: string): {
101
- assemblyName: string;
102
- includeAggregateIndexes: boolean;
103
- tracks: import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>;
104
- };
105
- readonly trackMap: Map<any, any>;
799
+ /**
800
+ * #getter
801
+ */
802
+ readonly trackMap: Map<string, any>;
803
+ /**
804
+ * #method
805
+ */
106
806
  getTrack(id: string): any;
107
- rankSearchResults(results: BaseResult[]): BaseResult[];
108
- readonly trackTypeActions: Map<string, MenuItem[]>;
807
+ /**
808
+ * #method
809
+ * displayId of the active (shown) display for a track in this view, used
810
+ * by the config editor to expand the relevant display and collapse the
811
+ * track's other displays
812
+ */
813
+ getActiveDisplayId(trackId: string): string | undefined;
109
814
  } & {
815
+ /**
816
+ * #action
817
+ */
110
818
  setShowTrackOutlines(arg: boolean): void;
819
+ /**
820
+ * #action
821
+ */
822
+ setScrollZoom(flag: boolean): void;
823
+ /**
824
+ * #action
825
+ */
111
826
  setColorByCDS(flag: boolean): void;
827
+ /**
828
+ * #action
829
+ */
830
+ setShowAminoAcids(flag: boolean): void;
831
+ /**
832
+ * #action
833
+ */
112
834
  setShowCytobands(flag: boolean): void;
835
+ /**
836
+ * #action
837
+ */
838
+ setTrackLabelBand(trackId: string, band: number): void;
839
+ /**
840
+ * #action
841
+ */
842
+ setScrollPortExcess(px: number | undefined): void;
843
+ /**
844
+ * #action
845
+ * Grow or shrink every unminimized track by `distance` px in all, each
846
+ * by its share of the height it has above the display minimum. `from` is
847
+ * the heights to scale, by track instance id; a drag passes the heights
848
+ * it started with, so whole-pixel rounding does not compound frame by
849
+ * frame. Returns how far the stack moved.
850
+ */
851
+ resizeTracks(distance: number, from?: any): number;
852
+ /**
853
+ * #action
854
+ * A resize keeps the window in bp, so `bpPerPx` follows the new width
855
+ * and the view keeps framing the same sequence (ADR-070).
856
+ */
113
857
  setWidth(newWidth: number): void;
858
+ /**
859
+ * #action
860
+ */
114
861
  setError(error: unknown): void;
862
+ /**
863
+ * #action
864
+ */
115
865
  setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
116
- setScalebarRefNameClickPending(pending: boolean): void;
866
+ /**
867
+ * #action
868
+ */
117
869
  setHideHeader(b: boolean): void;
870
+ /**
871
+ * #action
872
+ */
118
873
  setHideHeaderOverview(b: boolean): void;
874
+ /**
875
+ * #action
876
+ */
877
+ setScalebarOnly(b: boolean): void;
878
+ /**
879
+ * #action
880
+ */
119
881
  setHideNoTracksActive(b: boolean): void;
882
+ /**
883
+ * #action
884
+ */
120
885
  setShowGridlines(b: boolean): void;
121
- addToHighlights(highlight: HighlightType): void;
122
- setHighlight(highlight?: HighlightType[]): void;
123
- removeHighlight(highlight: HighlightType): void;
124
- updateHighlight(old: HighlightType, updates: Partial<HighlightType>): void;
125
- setHighlightsVisible(arg: boolean): void;
126
- setLabelsVisible(arg: boolean): void;
886
+ /**
887
+ * #action
888
+ * set temporary vertical guides (e.g., for LD display hover)
889
+ */
127
890
  setVolatileGuides(guides: VolatileGuide[]): void;
891
+ /**
892
+ * #action
893
+ */
128
894
  scrollTo(offsetPx: number): number;
129
- zoomTo(bpPerPx: number, offset?: number, centerAtOffset?: boolean): number;
895
+ /**
896
+ * #action
897
+ * `scrollTo`'s bp-space twin: place the window's left edge at a
898
+ * linearized bp coordinate, clamped to the same scroll limits.
899
+ *
900
+ * It exists so a caller that already knows where it wants to be in bp —
901
+ * zoomTo, anchoring the base under the cursor — does not have to convert
902
+ * to pixels and let this convert back. That round trip is lossy once per
903
+ * frame, and a scroll-zoom burst is a few dozen frames, which is enough
904
+ * to walk the base out from under the cursor.
905
+ */
906
+ scrollToBp(startBp: number): number;
907
+ /**
908
+ * #action
909
+ */
910
+ zoomTo(bpPerPx: number, offset?: any): number;
911
+ /**
912
+ * #action
913
+ * sets offsets of rubberband, used in the get sequence dialog can call
914
+ * view.getSelectedRegions(view.leftOffset,view.rightOffset) to compute
915
+ * the selected regions from the offsets
916
+ */
130
917
  setOffsets(left?: BpOffset, right?: BpOffset): void;
131
- setSearchResults(searchResults: BaseResult[], searchQuery: string, assemblyName?: string): void;
132
- setNewView(bpPerPx: number, offsetPx: number): void;
133
- horizontallyFlip(): void;
134
- showTrack(trackId: string, initialSnapshot?: {}, displayInitialSnapshot?: {}): any;
135
- hideTrack(trackId: string): 0 | 1;
136
- } & {
137
- moveTrackDown(id: string): void;
138
- moveTrackUp(id: string): void;
139
- moveTrackToTop(id: string): void;
140
- moveTrackToBottom(id: string): void;
141
- moveTrack(movingId: string, targetId: string): void;
142
- toggleTrack(trackId: string): void;
143
- setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
918
+ /**
919
+ * #action
920
+ * Raise the picker over search results that name more than one place.
921
+ * @param onPick - where a picked result lands; by default it navigates
922
+ * there and shows the track its index came from
923
+ */
924
+ setSearchResults(searchResults: BaseResult[], searchQuery: string, assemblyName: string, onPick?: (result: BaseResult) => Promise<unknown>): void;
925
+ /**
926
+ * #action
927
+ */
928
+ showTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): any;
929
+ /**
930
+ * #action
931
+ */
932
+ hideTrack(trackId: string): boolean;
933
+ } & {
934
+ /**
935
+ * #action
936
+ * Resize every unminimized track so the view is exactly as tall as the
937
+ * scroll port it sits in. Does nothing until the view has measured one.
938
+ */
939
+ fitTracksToWindow(): void;
940
+ /**
941
+ * #action
942
+ * showTrack for a track whose display state model may be lazily
943
+ * loaded: loads it, then shows
944
+ */
945
+ launchTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): Promise<any>;
946
+ } & {
947
+ /**
948
+ * #method
949
+ * The shown track a move action means: the menu passes a track model's
950
+ * own `id`, an agent passes the `trackId` it knows the track by, and
951
+ * both name one shown track. Answers the model id, or the argument
952
+ * unchanged when nothing shown matches, so the move reports it.
953
+ */
954
+ trackModelId(idOrTrackId: string): any;
955
+ } & {
956
+ moveTrack: (moving: string, target: string) => void;
957
+ /**
958
+ * #action
959
+ */
960
+ moveTrackDown(idOrTrackId: string): void;
961
+ /**
962
+ * #action
963
+ */
964
+ moveTrackUp(idOrTrackId: string): void;
965
+ /**
966
+ * #action
967
+ */
968
+ moveTrackToTop(idOrTrackId: string): void;
969
+ /**
970
+ * #action
971
+ */
972
+ moveTrackToBottom(idOrTrackId: string): void;
973
+ } & {
974
+ /**
975
+ * #action
976
+ */
977
+ toggleTrack(trackId: string): boolean;
978
+ /**
979
+ * #action
980
+ * toggleTrack with launchTrack's loading behavior
981
+ */
982
+ launchToggleTrack(trackId: string): Promise<boolean>;
983
+ /**
984
+ * #action
985
+ */
986
+ setTrackLabels(setting: ViewTrackLabelMode): void;
987
+ /**
988
+ * #action
989
+ */
144
990
  setShowCenterLine(b: boolean): void;
145
- setDisplayedRegions(regions: Region[]): void;
991
+ /**
992
+ * #action
993
+ */
146
994
  activateTrackSelector(): import("@jbrowse/core/util").Widget;
995
+ /**
996
+ * #action
997
+ */
998
+ toggleTrackSelector(): import("@jbrowse/core/util").Widget;
999
+ /**
1000
+ * #method
1001
+ * Helper method for the fetchSequence.
1002
+ * Retrieves the corresponding regions that were selected by the
1003
+ * rubberband
1004
+ *
1005
+ * @param leftOffset - `object as {start, end, index, offset}`, offset = start
1006
+ * of user drag
1007
+ * @param rightOffset - `object as {start, end, index, offset}`,
1008
+ * offset = end of user drag
1009
+ * @returns array of Region[]
1010
+ */
147
1011
  getSelectedRegions(leftOffset?: BpOffset, rightOffset?: BpOffset): {
148
1012
  assemblyName: string;
149
1013
  refName: string;
150
1014
  start: number;
151
1015
  end: number;
152
1016
  }[];
1017
+ /**
1018
+ * #action
1019
+ */
153
1020
  horizontalScroll(distance: number): number;
154
- showAllRegions(): void;
155
- showAllRegionsInAssembly(assemblyName?: string): void;
1021
+ /**
1022
+ * #action
1023
+ */
156
1024
  setDraggingTrackId(idx?: string): void;
157
- setLastTrackDragY(y: number): void;
158
- setScaleFactor(factor: number): void;
159
- setTargetBpPerPx(target: number | undefined): void;
160
- clearView(): void;
161
- setInit(arg?: InitState): void;
162
- exportSvg(opts?: ExportSvgOptions): Promise<void>;
1025
+ /**
1026
+ * #action
1027
+ * called while dragging a track over the track at `targetId`; reorders
1028
+ * once the cursor has moved far enough (see shouldSwapTracks) to avoid
1029
+ * jitter when a short track is dragged over a tall one
1030
+ */
1031
+ onTrackDragOver(targetId: string, currentY: number): void;
1032
+ /**
1033
+ * #action
1034
+ */
1035
+ setLaunch(launch?: LaunchInput<InitState>): void;
1036
+ /**
1037
+ * #method
1038
+ * renders the view to SVG markup, which it returns; saves it through
1039
+ * FileSaver unless `save: false`
1040
+ */
1041
+ exportSvg(opts?: ExportSvgOptions): Promise<string>;
163
1042
  } & {
164
1043
  slide: (viewWidths: number) => void;
165
- } & {
166
1044
  zoom: (targetBpPerPx: number) => void;
1045
+ cancelZoomAnimation: () => void;
167
1046
  } & {
1047
+ /**
1048
+ * #getter
1049
+ */
1050
+ readonly showsWholeChromosome: boolean;
1051
+ /**
1052
+ * #getter
1053
+ * an ideogram only reads correctly against an entire chromosome: on a
1054
+ * sub-region it is a meaningless slice of bands, and the centromere shows
1055
+ * up as a lone half-triangle. The chromosome needs bands of its own too:
1056
+ * a cytoband file often lists only the main chromosomes, not chrM or the
1057
+ * unplaced scaffolds
1058
+ */
168
1059
  readonly canShowCytobands: boolean;
169
- readonly showCytobands: boolean;
170
- readonly anyCytobandsExist: boolean;
1060
+ /**
1061
+ * #getter
1062
+ * the `showCytobands` setting gated by whether cytobands can be shown at
1063
+ * all (whole chromosome with bands of its own) and by the header
1064
+ * overview they draw in being on, which the SVG export follows too
1065
+ */
1066
+ readonly effectiveShowCytobands: boolean;
1067
+ /**
1068
+ * #getter
1069
+ * the cytoband is displayed to the right of the chromosome name, and
1070
+ * that offset is calculated manually with this method
1071
+ */
171
1072
  readonly cytobandOffset: number;
1073
+ /**
1074
+ * #getter
1075
+ */
1076
+ readonly isTrackSelectorOpen: boolean;
172
1077
  } & {
1078
+ /**
1079
+ * #method
1080
+ * return the view menu items
1081
+ */
173
1082
  menuItems(): MenuItem[];
1083
+ /**
1084
+ * #method
1085
+ * the view menu's Highlights submenu; extend this to add a row there
1086
+ */
1087
+ highlightsSubMenuItems(): MenuItem[];
1088
+ /**
1089
+ * #method
1090
+ * what a plugin can start from the selected region — a synteny view, a
1091
+ * consensus call. Extend this rather than `rubberBandMenuItems` so the
1092
+ * entries collect under the menu's "Launch" submenu; that grouping is
1093
+ * decided once here rather than by whichever contributor runs first, and
1094
+ * keeps the rubberband menu itself short as plugins pile on.
1095
+ */
1096
+ rubberBandLaunchMenuItems(): MenuItem[];
1097
+ /**
1098
+ * #getter
1099
+ * geometry of the overview scalebar — derived from displayedRegions,
1100
+ * width, and cytobandOffset so it stays cached by MobX
1101
+ */
1102
+ readonly overviewLayout: ViewLayout;
174
1103
  } & {
1104
+ /**
1105
+ * #getter
1106
+ * static blocks are an important concept jbrowse uses to avoid
1107
+ * re-rendering when you scroll to the side. when you horizontally
1108
+ * scroll to the right, old blocks to the left may be removed, and new
1109
+ * blocks may be instantiated on the right. tracks may use the static
1110
+ * blocks to render their data for the region represented by the block
1111
+ */
175
1112
  readonly staticBlocks: BlockSet;
1113
+ /**
1114
+ * #getter
1115
+ * dynamic blocks represent the exact coordinates of the currently
1116
+ * visible genome regions on the screen. they are similar to static
1117
+ * blocks, but static blocks can go offscreen while dynamic blocks
1118
+ * represent exactly what is on screen
1119
+ */
176
1120
  readonly dynamicBlocks: BlockSet;
177
- readonly roundedDynamicBlocks: BaseBlock[];
1121
+ /**
1122
+ * #getter
1123
+ * all overview scalebar blocks (content + elided), laid out on the
1124
+ * overviewLayout. memoized so the scalebar doesn't recompute it per
1125
+ * render
1126
+ */
1127
+ readonly overviewBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
1128
+ /**
1129
+ * #getter
1130
+ * leading/trailing pixel span of the visible regions projected onto the
1131
+ * overviewLayout — the geometry of the overview's "you are here"
1132
+ * rectangle, and of the top edge of the polygon drawn under it. Elided
1133
+ * regions count: at whole-genome zoom the tail of an assembly is all
1134
+ * coalesced tiny contigs, and stopping at the last *content* block left
1135
+ * the rectangle short of (or, scrolled onto that tail, absent from) the
1136
+ * polygon it sits on.
1137
+ */
1138
+ readonly overviewRegionPxSpan: import("@jbrowse/core/util/Base1DUtils").PxSpan | undefined;
1139
+ /**
1140
+ * #getter
1141
+ * The x shift that maps the **staticBlocks frame** onto the viewport:
1142
+ * `translateX(view.staticBlocksTranslateX)` on one container places
1143
+ * every `gridlineTicks`, `scalebarLabels` and `paddingSpans` entry at
1144
+ * once, and a pan then moves that single transform rather than each
1145
+ * child.
1146
+ *
1147
+ * The frame exists because those three are laid out across every
1148
+ * displayed region rather than across the viewport — it overhangs on
1149
+ * both sides — so their `x` values are stable under a scroll and only
1150
+ * this number moves. `scalebarRefNameLabels` is the exception and says
1151
+ * so: its `transform` is already a screen x, because a sticky label's
1152
+ * position is a function of the scroll rather than of block geometry.
1153
+ *
1154
+ * **The subtraction must happen here, in float64, and that is the
1155
+ * load-bearing part.** `offsetPx` is a whole-genome pixel coordinate —
1156
+ * hg38 chr1 at base resolution is already past 1e10 — and a length that
1157
+ * size does not survive the trip through CSS: the transform matrix is
1158
+ * float32 by the time it reaches the compositor, where consecutive
1159
+ * representable values at 1e10 are ~1024px apart, and layout saturates
1160
+ * sooner still (Blink's `LayoutUnit` is int32 at 1/64px, so ±33.5M px).
1161
+ * So the shape that looks obvious — lay an overlay out in absolute
1162
+ * genome pixels, write `translateX(-view.offsetPx)` — does not lose a
1163
+ * subpixel, it puts the row somewhere else entirely, and only on large
1164
+ * assemblies at high zoom, which is not where anyone tests. Both
1165
+ * operands here are large and their difference is bounded by the
1166
+ * overhang (a block or two), so what reaches CSS is small and exact.
1167
+ * Same rule as the GPU side, one layer up —
1168
+ * `agent-docs/reference/BP_PRECISION.md`.
1169
+ *
1170
+ * Published because it is the one piece of coordinate arithmetic a host
1171
+ * drawing its own chrome would otherwise have to know, and because
1172
+ * having it written out at each call site is how the two in-tree copies
1173
+ * came to disagree about rounding. Round it where the content is text
1174
+ * (a fractional offset blurs a label); leave it alone for paths and
1175
+ * boxes.
1176
+ */
1177
+ readonly staticBlocksTranslateX: number;
1178
+ /**
1179
+ * #getter
1180
+ * Gridline tick positions (x relative to the staticBlocks frame),
1181
+ * derived from staticBlocks + bpPerPx. Computed once and shared by every
1182
+ * Gridlines instance (scalebar, main view, each pinned track) rather
1183
+ * than recomputing the makeTicks loop per component.
1184
+ */
1185
+ readonly gridlineTicks: {
1186
+ x: number;
1187
+ major: boolean;
1188
+ }[];
1189
+ /**
1190
+ * #getter
1191
+ * Scalebar coordinate labels (x in the staticBlocks frame + display
1192
+ * text). Sibling of gridlineTicks sharing the same makeBlockTicks
1193
+ * formula, so labels line up exactly with their gridlines. staticBlocks
1194
+ * chop a region into ~800px chunks; groupContiguousBlocks merges them
1195
+ * back per region so a label on an internal chunk boundary isn't clipped
1196
+ * away by both neighbors — only genuine region edges clip a label.
1197
+ *
1198
+ * A run that can hold too few labels to make a ruler goes unnumbered
1199
+ * (`tickLabelsWorthDrawing`), the same rule the overview scalebar and
1200
+ * the dotplot axes apply: with a whole genome displayed each chromosome
1201
+ * catches one lone coordinate, which conveys no scale by itself and
1202
+ * reads as the same number repeated across the row.
1203
+ */
1204
+ readonly scalebarLabels: {
1205
+ x: number;
1206
+ label: string;
1207
+ key: string;
1208
+ }[];
1209
+ /**
1210
+ * #getter
1211
+ * The bold refName labels drawn along the scalebar, as plain data:
1212
+ * `{key, refName, displayedRegionIndex, lastDisplayedRegionIndex,
1213
+ * sticky, transform, maxWidth, paddingLeft, text}` each. One per run of
1214
+ * same-refName regions, plus a "sticky" one pinned to the viewport's
1215
+ * left edge naming the refName under it, so panning into a chromosome
1216
+ * does not scroll its own name off the screen.
1217
+ *
1218
+ * Three rules live in here that a host drawing region names will
1219
+ * otherwise rediscover the hard way, and two of them are invisible until
1220
+ * the data is awkward:
1221
+ *
1222
+ * - the sticky label rides the rightmost run that has scrolled off the
1223
+ * left, not the region's first block — that one is gone from
1224
+ * staticBlocks entirely once you zoom into a region's interior, taking
1225
+ * the chromosome name off screen at exactly the zoom where nothing
1226
+ * else names it.
1227
+ * - adjacent regions of the same refName (collapsed introns) get one
1228
+ * label between them, not one each. That label names the whole run and
1229
+ * is fitted to the whole run, and `displayedRegionIndex` /
1230
+ * `lastDisplayedRegionIndex` bracket what it stands for.
1231
+ * - a name is drawn whole or not at all, measured against the space its
1232
+ * run leaves. Clipped to its own width, `chr16` reads as `chr1` —
1233
+ * a different chromosome rather than a shortened name, which is why
1234
+ * this is a fit test rather than an ellipsis.
1235
+ *
1236
+ * **Viewport frame, unlike its siblings.** `transform` is a screen x,
1237
+ * already net of `offsetPx`, where gridlineTicks / scalebarLabels /
1238
+ * paddingSpans are all in the staticBlocks frame. The sticky label's
1239
+ * position is a function of `offsetPx` rather than of block geometry, so
1240
+ * it has no fixed position in that frame — and for the same reason this
1241
+ * getter recomputes on every scroll frame where those three do not.
1242
+ *
1243
+ * `caption` accompanies the labels: the chip at the row's left edge,
1244
+ * saying which assembly the row is (a container view — synteny — opts
1245
+ * into that through `scalebarDisplayPrefix`) and whether it is flipped.
1246
+ * A ` [rev]` there is a fact about the ROW; the same marker on a
1247
+ * chromosome name means that one region, which only happens under mixed
1248
+ * orientation. `captionSpanPx` is the width it takes: the sticky label
1249
+ * pins to its right edge rather than the viewport's, and the coordinate
1250
+ * numbers stay out from under it. The SVG export deliberately
1251
+ * calls `getScalebarRefNameLabels` itself with no prefix rather than
1252
+ * reading this, since it draws its own assembly name above the ruler.
1253
+ */
1254
+ readonly scalebarRefNameLabels: {
1255
+ labels: import("./util.ts").ScalebarRefNameLabel[];
1256
+ caption: string | undefined;
1257
+ captionSpanPx: number;
1258
+ };
1259
+ /**
1260
+ * #getter
1261
+ * Every span along the row that is not track data, as plain geometry in
1262
+ * the staticBlocks frame — the same frame as gridlineTicks and
1263
+ * scalebarLabels, so one `translateX(staticBlocksTranslateX)` places all
1264
+ * three. A host drawing its own chrome needs all three kinds:
1265
+ *
1266
+ * - `seam`: the 3px bar at a region's right edge. Displayed regions are
1267
+ * laid out **contiguously** (calculateStaticBlocks emits boundary
1268
+ * padding only before the first region and after the last), so this
1269
+ * bar is the only thing separating two of them. Without it a
1270
+ * two-region view looks like a single region.
1271
+ * `isRightEndOfDisplayedRegion` marks it; the right edge of the
1272
+ * currently *loaded* blocks, which block geometry gives you, is a
1273
+ * different set.
1274
+ * - `elided`: a region too narrow to draw at this zoom. Whole-genome on
1275
+ * a real assembly is mostly these (hg38 has 455 sequences, and all
1276
+ * but the 24 chromosomes are under a pixel wide), so a host that
1277
+ * skips them leaves that part of the row empty.
1278
+ * - `boundary`: past the start of the first region or the end of the
1279
+ * last. Greying it shows the last region's seam as the edge of a
1280
+ * filled area, where it would otherwise look like a line in the
1281
+ * middle of the track.
1282
+ *
1283
+ * Elided blocks get no seam even though they carry the flag: at the
1284
+ * zoom where regions elide, one bar per region would fill the row solid
1285
+ * grey.
1286
+ *
1287
+ * PaddingBlocks is the in-tree consumer. The SVG export does not use
1288
+ * it: `SVGRegionSeparators` walks dynamicBlocks itself and draws only
1289
+ * the seam, because `elided` and `boundary` mark state for an
1290
+ * interactive row. In a static figure the striped grey would cover most
1291
+ * of the row at whole-genome zoom. The export keeps the seam because
1292
+ * regions lay out contiguously and the seam is all that separates two
1293
+ * of them.
1294
+ */
1295
+ readonly paddingSpans: readonly {
1296
+ key: string;
1297
+ x: number;
1298
+ width: number;
1299
+ kind: 'seam' | 'elided' | 'boundary';
1300
+ }[];
1301
+ /**
1302
+ * #getter
1303
+ * Integer-rounded sum of all visible block widths. Slightly less than
1304
+ * view.width when the genome ends before the right edge; use view.width
1305
+ * for SVG clip rects (display boundary) and this for paint canvas sizing
1306
+ * (actual content width).
1307
+ */
1308
+ readonly totalWidthPx: number;
1309
+ /**
1310
+ * #getter
1311
+ * Like totalWidthPx but excluding inter-region boundary blocks. Used
1312
+ * when column layout divides the canvas width by feature count.
1313
+ */
1314
+ readonly totalWidthPxWithoutBorders: number;
1315
+ /**
1316
+ * #getter
1317
+ */
1318
+ readonly visibleBp: number;
1319
+ /**
1320
+ * #getter
1321
+ * Whether any part of a displayed region actually falls inside the
1322
+ * viewport. False both when the view holds no regions at all and when
1323
+ * it holds some but is scrolled entirely off them; either way there is
1324
+ * no visible span for the scalebar, ruler and refName labels to
1325
+ * describe. The SVG export checks it before drawing its header.
1326
+ * Distinct from `hasDisplayedRegions`, which only asks whether the
1327
+ * view has been given regions, not whether any are on screen.
1328
+ */
1329
+ readonly hasVisibleContent: boolean;
1330
+ /**
1331
+ * #getter
1332
+ * What is on screen, as regions that address whole bases — what a
1333
+ * reader means by "the visible region" when they ask to fetch it,
1334
+ * bookmark it or read it back in a locString field. `visibleRegions`
1335
+ * below is the other half: pixels, and fractional by design.
1336
+ */
1337
+ readonly visibleWholeBaseRegions: {
1338
+ assemblyName: string;
1339
+ refName: string;
1340
+ start: number;
1341
+ end: number;
1342
+ }[];
1343
+ /**
1344
+ * #getter
1345
+ * Returns the currently visible content blocks with screen pixel
1346
+ * positions and displayedRegionIndex guaranteed.
1347
+ * Used by WebGL displays for per-region data fetching and rendering.
1348
+ */
1349
+ readonly visibleRegions: {
1350
+ refName: string;
1351
+ start: number;
1352
+ end: number;
1353
+ assemblyName: string;
1354
+ reversed: boolean | undefined;
1355
+ displayedRegionIndex: number;
1356
+ screenStartPx: number;
1357
+ screenEndPx: number;
1358
+ }[];
1359
+ /**
1360
+ * #getter
1361
+ * Right edge (px, viewport-relative) of the on-screen content, clamped
1362
+ * to the track — where a right-pinned overlay such as a wiggle's colour
1363
+ * or score legend belongs, rather than out in the empty gutter the
1364
+ * regions can leave at whole-genome zoom. `@jbrowse/display-kit`'s
1365
+ * `contentRightEdgePx` states the rule; an SVG export applies the same
1366
+ * one against the export's canvas width instead of this track's.
1367
+ *
1368
+ * Published as a SCALAR on purpose. `visibleRegions` rebuilds a fresh
1369
+ * array of fresh objects on every pan and zoom frame, so a component
1370
+ * that derived this number itself re-rendered on every frame of every
1371
+ * gesture — to produce, whenever content fills the track, the unchanged
1372
+ * `trackWidthPx`. Reading the scalar lets MobX's `===` stop the chain at
1373
+ * this computed instead. Measured over 20 zoom frames: the wiggle
1374
+ * family's three body instances fell from 66 renders to 7.
1375
+ */
1376
+ readonly contentRightEdgePx: number;
1377
+ /**
1378
+ * #getter
1379
+ * visibleRegions expanded by a half-screen buffer on each side,
1380
+ * clamped to displayedRegion bounds, with integer-rounded coordinates.
1381
+ * Use this when fetching data that should extend slightly beyond the
1382
+ * viewport for smooth scrolling.
1383
+ */
1384
+ readonly bufferedVisibleRegions: {
1385
+ region: {
1386
+ refName: string;
1387
+ start: number;
1388
+ end: number;
1389
+ assemblyName: string;
1390
+ reversed: boolean | undefined;
1391
+ };
1392
+ displayedRegionIndex: number;
1393
+ }[];
1394
+ /**
1395
+ * #getter
1396
+ * a single "combo-locstring" representing all the regions visible on
1397
+ * the screen
1398
+ */
178
1399
  readonly visibleLocStrings: string;
1400
+ /**
1401
+ * #getter
1402
+ * **The blocks a debounced consumer clips to**: the coarse blocks once
1403
+ * the view has settled at least once, the live ones before that.
1404
+ *
1405
+ * The coarse blocks stop a per-bp scan from recomputing on every
1406
+ * animation frame during a pan or zoom. Wiggle's autoscale domain, the
1407
+ * alignments coverage scale and MAF's coverage band use them. While the
1408
+ * coarse blocks are stale the result is a frame or two old, as the
1409
+ * debounce intends. **Empty coarse blocks are a different case.** A scan
1410
+ * over no blocks yields no entries, and the consumer falls back to the
1411
+ * domain `[0,1]`, which draws a line plot blank and a density plot
1412
+ * saturated. The coarse blocks are empty for the 500ms between a view
1413
+ * initializing and the coarse autorun's first run, and data can load
1414
+ * within that window.
1415
+ *
1416
+ * Falling back to the live blocks costs one extra recompute at that
1417
+ * transition, compared with N per frame without the debounce.
1418
+ */
1419
+ readonly settledDynamicBlocks: ContentBlock[];
1420
+ /**
1421
+ * #getter
1422
+ * same as visibleLocStrings, but only updated every 500ms
1423
+ */
179
1424
  readonly coarseVisibleLocStrings: string;
1425
+ /**
1426
+ * #getter
1427
+ */
180
1428
  readonly coarseTotalBpDisplayStr: string;
181
- readonly effectiveBpPerPx: number;
1429
+ /**
1430
+ * #getter
1431
+ */
182
1432
  readonly effectiveTotalBp: number;
1433
+ /**
1434
+ * #getter
1435
+ */
183
1436
  readonly effectiveTotalBpDisplayStr: string;
184
1437
  } & {
185
- setCoarseDynamicBlocks(blocks: BlockSet): void;
1438
+ /**
1439
+ * #action
1440
+ */
1441
+ setCoarseDynamicBlocks(blocks: BlockSet, bpPerPx: number): void;
1442
+ } & {
1443
+ /**
1444
+ * #action
1445
+ * Bring the coarse blocks to the viewport as it stands now, for a
1446
+ * placement that JUMPED rather than travelled.
1447
+ *
1448
+ * The coarse blocks are a 500ms throttle, and every consumer trades
1449
+ * freshness for not recomputing per animation frame — the location box,
1450
+ * canvas's on-screen feature set, and the two per-bp scans behind
1451
+ * `settledDynamicBlocks`. That trade is only sound while the answer is a
1452
+ * few frames old. **A jump makes it unrelated instead**, because there is
1453
+ * nothing to coalesce: the viewport left behind is not an approximation of
1454
+ * the new one, it is a different place. Unsettled, the location box reads
1455
+ * as a navigation that didn't happen, and wiggle's autoscale domain is
1456
+ * computed over the window the user just left — measured at `[0,200]`
1457
+ * against a correct `[0,300]` when a 40bp coarse window survived a jump to
1458
+ * 4040bp on screen. Only the per-region fetch moving to the leading edge
1459
+ * made that reachable: at 600ms the data never landed inside the hole.
1460
+ *
1461
+ * **The continuous paths deliberately do not come through here.** The
1462
+ * spring zoom writes through `zoomTo` per frame and a drag through
1463
+ * `scrollTo`, so this adds no per-frame work; the settle is idempotent
1464
+ * (`setCoarseDynamicBlocks` compares block keys), so the debounced
1465
+ * autorun's own follow-up run costs nothing.
1466
+ *
1467
+ * Every placer calls it, and `placersSettleCoarseBlocks.test.ts` is what
1468
+ * makes that true of the next one — it scans this file for the writes and
1469
+ * fails on a placer that reaches neither the settle nor its named list of
1470
+ * continuous paths. Two passes by hand missed four.
1471
+ */
1472
+ settleCoarseBlocks(): void;
186
1473
  } & {
1474
+ /**
1475
+ * #action
1476
+ * offset is the base-pair-offset in the displayed region, index is the
1477
+ * index of the displayed region in the linear genome view
1478
+ *
1479
+ * @param start - object as `{start, end, offset, index}`
1480
+ * @param end - object as `{start, end, offset, index}`
1481
+ */
187
1482
  moveTo(start?: BpOffset, end?: BpOffset): void;
188
- navToLocString(input: string, optAssemblyName?: string, grow?: number): Promise<void>;
189
- navToSearchString({ input, assembly, }: {
190
- input: string;
191
- assembly: Assembly;
192
- }): Promise<void>;
193
- navToLocation(parsedLocString: ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
194
- navToLocations(regions: ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
1483
+ /**
1484
+ * #action
1485
+ * Place the viewport by the pair of PIXEL quantities it used to be stored
1486
+ * as. Prefer `setWindow`: pixels mean nothing without the width they were
1487
+ * measured at, so a round trip through here is only exact while the width
1488
+ * holds still. Kept for callers that genuinely have pixels — a wheel
1489
+ * gesture, a rubberband.
1490
+ */
1491
+ setNewView(bpPerPx: number, offsetPx: number): void;
1492
+ /**
1493
+ * #action
1494
+ * Place the viewport by the pair it is actually STORED as: the window's
1495
+ * width and left edge, both in bp. `setNewView`'s bp-space twin, and the
1496
+ * right one for anything that captures a viewport and puts it back later
1497
+ * (an Undo, a saved location) — those two moments can be a window resize
1498
+ * apart, and this pair survives one where a pixel pair does not.
1499
+ *
1500
+ * Still clamped, by the same zoom and scroll limits as every other mover:
1501
+ * the regions may have changed under it, and a window the new set can't
1502
+ * hold is not restorable however it was spelled.
1503
+ */
1504
+ setWindow(windowWidthBp: number, windowStartBp: number): void;
1505
+ /**
1506
+ * #action
1507
+ * `setWindow` without the settle, for a writer that runs per animation
1508
+ * frame. Flushing the coarse blocks sixty times a second is the one thing
1509
+ * such a writer must not do: they are a 500ms throttle that a synteny
1510
+ * follow pass and two autoscale domains hang off, and settling each frame
1511
+ * turns each of those into per-frame work — `positionViewOnSpans` states
1512
+ * the same rule for the same reason.
1513
+ */
1514
+ setWindowFrame(windowWidthBp: number, windowStartBp: number): void;
1515
+ /**
1516
+ * #action
1517
+ * The worst jump of them to leave unsettled: the coarse blocks are keyed
1518
+ * by `displayedRegionIndex`, so a set that outlives the region list has a
1519
+ * consumer reading one contig's data against another's blocks.
1520
+ */
1521
+ setDisplayedRegions(regions: Region[]): void;
1522
+ /**
1523
+ * #action
1524
+ * Re-assert `maxBpPerPx` over the current zoom, for a container whose
1525
+ * shared ceiling just fell — otherwise the view is stranded above it with
1526
+ * zoom-out disabled and the slider's min past its value. Goes through
1527
+ * `zoomTo` so the clamp keeps one definition, and settles because a
1528
+ * ceiling drop moves the window in one step.
1529
+ *
1530
+ * Requires an `initialized` view; the caller checks, since an MST action
1531
+ * reads untracked and a guard here would never re-run once the row
1532
+ * arrived.
1533
+ */
1534
+ clampZoomToCeiling(): void;
1535
+ /**
1536
+ * #action
1537
+ */
1538
+ showAllRegions(): void;
1539
+ /**
1540
+ * #action
1541
+ * Fit the displayed regions to the width exactly, edge to edge.
1542
+ *
1543
+ * Not the same as `showAllRegions`, which goes to `maxBpPerPx` — the
1544
+ * zoom-out LIMIT, where `SHOW_ALL_REGIONS_FILL` deliberately keeps a 10%
1545
+ * margin so the whole genome doesn't sit flush against both edges. That
1546
+ * margin is right for "show me everything" and wrong for a caller that
1547
+ * named the regions it wants: it draws them at 1/0.9 of fit-to-width,
1548
+ * centered, which is a silent 11% scale difference from the
1549
+ * single-region path (`moveTo`, span/width) reached through the same
1550
+ * location box.
1551
+ *
1552
+ * The scale comes from `fitAllRegionsWindow`, which is where the rule is
1553
+ * written — a snapshot builder that cannot call an action needs the same
1554
+ * answer, and the two agreeing matters more than either being local. Where
1555
+ * it clamps up to `minBpPerPx` the content is narrower than the view, and
1556
+ * the centering is what frames it.
1557
+ */
1558
+ fitAllRegions(): void;
1559
+ /**
1560
+ * #action
1561
+ */
1562
+ horizontallyFlip(): void;
1563
+ } & {
1564
+ /**
1565
+ * #action
1566
+ */
1567
+ showAllRegionsInAssembly(assemblyName?: string): void;
1568
+ /**
1569
+ * #action
1570
+ * this "clears the view" and makes the view return to the import form
1571
+ */
1572
+ clearView(): void;
1573
+ /**
1574
+ * #action
1575
+ * Navigate to a location based on its refName and optionally start, end,
1576
+ * and assemblyName. Will not try to change displayed regions, use
1577
+ * `navToLocations` instead. Only navigates to a location if it is
1578
+ * entirely within a displayedRegion. Navigates to the first matching
1579
+ * location encountered.
1580
+ *
1581
+ * Throws an error if navigation was unsuccessful
1582
+ *
1583
+ * @param query - a proposed location to navigate to
1584
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1585
+ * adds 20% padding on each side)
1586
+ */
195
1587
  navTo(query: NavLocation, grow?: number): void;
1588
+ /**
1589
+ * #action
1590
+ * Navigate to a location based on its refName and optionally start, end,
1591
+ * and assemblyName. Will not try to change displayed regions, use
1592
+ * navToLocations instead. Only navigates to a location if it is entirely
1593
+ * within a displayedRegion. Navigates to the first matching location
1594
+ * encountered.
1595
+ *
1596
+ * Throws an error if navigation was unsuccessful
1597
+ *
1598
+ * @param locations - proposed location to navigate to
1599
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1600
+ * adds 20% padding on each side)
1601
+ */
196
1602
  navToMultiple(locations: NavLocation[], grow?: number): void;
197
1603
  } & {
1604
+ /**
1605
+ * #action
1606
+ * Replace the region list and place the viewport in one step. The pair is
1607
+ * the unit a coarse-block consumer can act on: called separately they
1608
+ * publish the viewport in between, and post-await in `navToLocations`
1609
+ * they are two transactions, so a per-bp scan runs over a window that was
1610
+ * never on screen.
1611
+ *
1612
+ * With no location named it fits the regions rather than going through
1613
+ * `showAllRegions`: the caller named the regions it wants, so it gets the
1614
+ * width, where showAllRegions goes to the zoom-out LIMIT and its 10%
1615
+ * margin is dead frame for a named subset.
1616
+ */
1617
+ showRegions(regions: Region[], location?: NavLocation): void;
1618
+ } & {
1619
+ /**
1620
+ * #action
1621
+ * Navigate to the given locstring, will change displayed regions if
1622
+ * needed, and wait for assemblies to be initialized
1623
+ *
1624
+ * @param input - e.g. "chr1:1-100", "chr1:1-100 chr2:1-100", "chr 1 100"
1625
+ * @param optAssemblyName - (optional) the assembly name to use when
1626
+ * navigating to the locstring
1627
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1628
+ * adds 20% padding on each side)
1629
+ * @param opts - `showHitTrack: false` keeps a text-search hit from also
1630
+ * showing the track its index was built from
1631
+ * @returns whether the view moved. A multi-hit search raises the picker
1632
+ * instead of navigating, and both resolve — see `handleSelectedRegion`.
1633
+ */
1634
+ navToLocString(input: string, optAssemblyName?: string, grow?: number, opts?: {
1635
+ showHitTrack?: boolean;
1636
+ }): Promise<boolean>;
1637
+ /**
1638
+ * #action
1639
+ * Similar to `navToLocString`, but accepts a list of parsed location
1640
+ * objects instead of a locstring. Will try to perform
1641
+ * `setDisplayedRegions` if changing regions
1642
+ *
1643
+ * @param regions - array of parsed location objects
1644
+ * @param assemblyName - optional assembly name
1645
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1646
+ * adds 20% padding on each side)
1647
+ */
1648
+ navToLocations(regions: ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
1649
+ } & {
1650
+ /**
1651
+ * #action
1652
+ * Similar to `navToLocString`, but accepts a parsed location object
1653
+ * instead of a locstring. Will try to perform `setDisplayedRegions` if
1654
+ * changing regions
1655
+ *
1656
+ * @param parsedLocString - a parsed location object with refName, start,
1657
+ * end, etc.
1658
+ * @param assemblyName - optional assembly name
1659
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
1660
+ * adds 20% padding on each side)
1661
+ */
1662
+ navToLocation(parsedLocString: ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
1663
+ /**
1664
+ * #action
1665
+ * adds the region in view to the session's highlights
1666
+ */
1667
+ highlightCurrentRegion(): void;
1668
+ /**
1669
+ * #action
1670
+ * navigates to the most recently added highlight on this view's
1671
+ * assemblies, zoomed out a little for context
1672
+ */
1673
+ navigateNewestHighlight(): Promise<void>;
1674
+ } & {
1675
+ /**
1676
+ * #method
1677
+ */
198
1678
  rubberBandMenuItems(): MenuItem[];
199
- bpToPx({ refName, coord, regionNumber, }: {
1679
+ /**
1680
+ * #method
1681
+ */
1682
+ bpToPx({ refName, coord, displayedRegionIndex, }: {
200
1683
  refName: string;
201
1684
  coord: number;
202
- regionNumber?: number;
1685
+ displayedRegionIndex?: number;
203
1686
  }): {
204
1687
  index: number;
205
1688
  offsetPx: number;
206
1689
  } | undefined;
207
- getHighlightCoords(region: {
208
- assemblyName?: string;
209
- refName: string;
210
- start: number;
211
- end: number;
212
- }): {
1690
+ /**
1691
+ * #method
1692
+ * Map a highlight region to its pixel position+width inside
1693
+ * the tracks container. Falls back to the raw refName if the region's
1694
+ * assemblyName is missing or unknown so highlights authored without an
1695
+ * assembly still render in single-assembly views.
1696
+ */
1697
+ getHighlightCoords(region: HighlightRegion): {
213
1698
  width: number;
214
1699
  left: number;
215
1700
  } | undefined;
216
- centerAt(coord: number, refName: string, regionNumber?: number): void;
217
- pxToBp(px: number): {
218
- coord: number;
219
- index: number;
220
- refName: string;
221
- oob: boolean;
222
- assemblyName: string;
223
- offset: number;
224
- start: number;
225
- end: number;
226
- reversed?: boolean;
227
- };
228
- readonly centerLineInfo: {
229
- coord: number;
230
- index: number;
231
- refName: string;
232
- oob: boolean;
233
- assemblyName: string;
234
- offset: number;
235
- start: number;
236
- end: number;
237
- reversed?: boolean;
1701
+ /**
1702
+ * #method
1703
+ * like getHighlightCoords but laid out against the overview scalebar and
1704
+ * shifted by the cytoband offset
1705
+ */
1706
+ getOverviewHighlightCoords(region: HighlightRegion): {
1707
+ width: number;
1708
+ left: number;
238
1709
  } | undefined;
239
- readonly visibleRegions: BaseBlock[];
1710
+ /**
1711
+ * #method
1712
+ * scrolls the view to center on the given bp. if that is not in any of
1713
+ * the displayed regions, does nothing
1714
+ *
1715
+ * @param coord - basepair at which you want to center the view
1716
+ * @param refName - refName of the displayedRegion you are centering at
1717
+ * @param displayedRegionIndex - index of the displayedRegion
1718
+ */
1719
+ centerAt(coord: number, refName: string, displayedRegionIndex?: number): void;
1720
+ /**
1721
+ * #method
1722
+ */
1723
+ pxToBp(px: number): import("@jbrowse/core/util/Base1DUtils").PxToBpResult;
1724
+ /**
1725
+ * #getter
1726
+ */
1727
+ readonly centerLineInfo: import("@jbrowse/core/util/Base1DUtils").PxToBpResult | undefined;
240
1728
  } & {
1729
+ /**
1730
+ * #action
1731
+ * a region edit from the ruler's menu as one action, which a synteny
1732
+ * stack's follow reads as the reader's gesture on this row; see
1733
+ * `setDisplayedRegionsKeepingCenter`
1734
+ */
1735
+ editDisplayedRegions(edit: RegionEdit): void;
1736
+ } & {
1737
+ /**
1738
+ * #method
1739
+ */
241
1740
  rubberbandClickMenuItems(clickOffset: BpOffset): MenuItem[];
1741
+ /**
1742
+ * #method
1743
+ * returns menu items for a highlight context menu. plugins can extend
1744
+ * this via Core-extendPluggableElement to add their own items
1745
+ */
1746
+ highlightMenuItems(_highlight: HighlightType): MenuItem[];
1747
+ } & {
1748
+ flyTo: (centerBp: number, windowWidthBp: number) => void;
1749
+ /**
1750
+ * #action
1751
+ * `centerAt`'s animated twin: the same destination, reached along the
1752
+ * arc instead of jumped to, at the zoom the view is already on.
1753
+ */
1754
+ flyToCenter(coord: number, refName: string, displayedRegionIndex?: number): void;
1755
+ /**
1756
+ * #action
1757
+ * A flight to a linear bp centre at the zoom the view is on, or is
1758
+ * already flying to, widened where that is narrower than `fitWidthBp`.
1759
+ * The current width mid-flight is a point on the arc, so a second
1760
+ * flight read from it would land pulled back.
1761
+ */
1762
+ flyToFit(centerBp: number, fitWidthBp: number): void;
242
1763
  } & {
243
1764
  afterCreate(): void;
244
1765
  afterAttach(): void;
245
- }, import("@jbrowse/mobx-state-tree").ModelCreationType<import("@jbrowse/mobx-state-tree/dist/internal").ExtractCFromProps<{
1766
+ }, import("@jbrowse/core/util/withLaunchInput").LaunchSnapshotIn<import("@jbrowse/mobx-state-tree").IModelType<Omit<{
246
1767
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
247
1768
  displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
248
- minimized: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
249
- } & {
1769
+ minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1770
+ }, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "launch" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
250
1771
  id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
251
1772
  type: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
252
- offsetPx: import("@jbrowse/mobx-state-tree").IType<number | undefined, number, number>;
253
- bpPerPx: import("@jbrowse/mobx-state-tree").IType<number | undefined, number, number>;
1773
+ windowStartBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
1774
+ windowWidthBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
1775
+ legacyBpPerPx: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
254
1776
  displayedRegions: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<Region[], Region[], Region[]>, [undefined]>;
255
1777
  tracks: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
256
- hideHeader: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
257
- hideHeaderOverview: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
258
- hideNoTracksActive: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
259
- trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
1778
+ hideHeader: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1779
+ hideHeaderOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1780
+ hideNoTracksActive: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1781
+ trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
260
1782
  showCenterLine: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
261
- showCytobandsSetting: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1783
+ showCytobands: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
262
1784
  trackLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
263
- showGridlines: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
264
- highlight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<HighlightType, HighlightType, HighlightType>>, [undefined]>;
265
- highlightsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
266
- labelsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1785
+ showGridlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
267
1786
  colorByCDS: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1787
+ showAminoAcids: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
268
1788
  showTrackOutlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
269
- init: import("@jbrowse/mobx-state-tree").IType<InitState | undefined, InitState | undefined, InitState | undefined>;
270
- }>>, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
271
- id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
272
- displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
273
- minimized: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
1789
+ scalebarOnly: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
1790
+ launch: import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>;
1791
+ }, {
1792
+ width: number;
1793
+ bodyMounted: boolean;
274
1794
  } & {
275
- id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
276
- type: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
277
- offsetPx: import("@jbrowse/mobx-state-tree").IType<number | undefined, number, number>;
278
- bpPerPx: import("@jbrowse/mobx-state-tree").IType<number | undefined, number, number>;
279
- displayedRegions: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<Region[], Region[], Region[]>, [undefined]>;
280
- tracks: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
281
- hideHeader: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
282
- hideHeaderOverview: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
283
- hideNoTracksActive: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
284
- trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
285
- showCenterLine: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
286
- showCytobandsSetting: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
287
- trackLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
288
- showGridlines: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
289
- highlight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<HighlightType, HighlightType, HighlightType>>, [undefined]>;
290
- highlightsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
291
- labelsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
292
- colorByCDS: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
293
- showTrackOutlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
294
- init: import("@jbrowse/mobx-state-tree").IType<InitState | undefined, InitState | undefined, InitState | undefined>;
295
- }>>;
1795
+ readonly rendersDisplays: boolean;
1796
+ readonly effectiveBodyMounted: boolean;
1797
+ menuItems(): MenuItem[];
1798
+ readonly ownTracks: import("@jbrowse/core/util").AbstractTrackModel[];
1799
+ readonly ownViews: import("@jbrowse/core/util").AbstractViewModel[];
1800
+ } & {
1801
+ setDisplayName(name: string): void;
1802
+ setWidth(newWidth: number): void;
1803
+ setBodyMounted(flag: boolean): void;
1804
+ setMinimized(flag: boolean): void;
1805
+ } & {
1806
+ /**
1807
+ * #volatile
1808
+ * Height of each track's in-flow label band, measured by
1809
+ * TrackContainer as the rendering container's offset inside its Paper.
1810
+ * Absent (0) while the label is hidden, overlapping, or not yet
1811
+ * measured. Observable, so the offset and height getters re-derive
1812
+ * when a band changes.
1813
+ */
1814
+ trackLabelBands: import("mobx").ObservableMap<string, number>;
1815
+ /**
1816
+ * #volatile
1817
+ * How much taller the view's box is than the scroll port it sits in,
1818
+ * in px, negative when it is shorter. Measured by the view component
1819
+ * for a top-level view; undefined until then, and for a nested one.
1820
+ */
1821
+ scrollPortExcess: number | undefined;
1822
+ /**
1823
+ * #volatile
1824
+ */
1825
+ volatileWidth: number | undefined;
1826
+ /**
1827
+ * #volatile
1828
+ */
1829
+ draggingTrackId: undefined | string;
1830
+ /**
1831
+ * #volatile
1832
+ */
1833
+ lastTrackDragY: undefined | number;
1834
+ /**
1835
+ * #volatile
1836
+ */
1837
+ volatileError: unknown;
1838
+ /**
1839
+ * #volatile
1840
+ */
1841
+ coarseDynamicBlocks: ContentBlock[];
1842
+ /**
1843
+ * #volatile
1844
+ */
1845
+ coarseTotalBp: number;
1846
+ /**
1847
+ * #volatile
1848
+ */
1849
+ coarseBpPerPx: number;
1850
+ /**
1851
+ * #volatile
1852
+ */
1853
+ leftOffset: undefined | BpOffset;
1854
+ /**
1855
+ * #volatile
1856
+ */
1857
+ rightOffset: undefined | BpOffset;
1858
+ /**
1859
+ * #volatile
1860
+ */
1861
+ isScalebarRefNameMenuOpen: boolean;
1862
+ /**
1863
+ * #volatile
1864
+ * temporary vertical guides that can be set by displays (e.g., LD display hover)
1865
+ */
1866
+ volatileGuides: VolatileGuide[];
1867
+ } & {
1868
+ /**
1869
+ * #getter
1870
+ * the launch state that still has something to apply — the gate every
1871
+ * loading and error path below reads.
1872
+ */
1873
+ readonly pendingLaunch: LaunchInput<InitState & {
1874
+ unknown?: Record<string, unknown>;
1875
+ malformed?: Record<string, unknown>;
1876
+ legacyInit?: boolean;
1877
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>>> | undefined;
1878
+ /**
1879
+ * #getter
1880
+ * corresponds roughly to the zoom level, base-pairs per pixel.
1881
+ *
1882
+ * Zero before a width is measured, which is the same not-yet-measured
1883
+ * sentinel `Base1DView` uses and which `displayedRegionsTotalPx` and the
1884
+ * offset getters already guard for. Reads `volatileWidth` rather than the
1885
+ * `width` getter on purpose: that one throws when unmeasured, and these
1886
+ * are read from the first render.
1887
+ */
1888
+ readonly bpPerPx: number;
1889
+ /**
1890
+ * #getter
1891
+ * corresponds roughly to the horizontal scroll of the LGV
1892
+ */
1893
+ readonly offsetPx: number;
1894
+ /**
1895
+ * #getter
1896
+ * a displayed region narrower than this many pixels draws as an elided
1897
+ * block
1898
+ */
1899
+ readonly minimumBlockWidth: number;
1900
+ /**
1901
+ * #getter
1902
+ * scroll-to-zoom is a global, personal preference resolved from the
1903
+ * session; toggling it in any view applies everywhere
1904
+ */
1905
+ readonly scrollZoom: boolean;
1906
+ /**
1907
+ * #getter
1908
+ */
1909
+ readonly pinnedTracks: any[];
1910
+ /**
1911
+ * #getter
1912
+ */
1913
+ readonly unpinnedTracks: any[];
1914
+ /**
1915
+ * #getter
1916
+ * the effective track labels setting, resolving the stored `trackLabels`
1917
+ * against the LinearGenomeViewPlugin config default
1918
+ */
1919
+ readonly effectiveTrackLabels: ViewTrackLabelMode;
1920
+ /**
1921
+ * #getter
1922
+ */
1923
+ readonly width: number;
1924
+ /**
1925
+ * #getter
1926
+ * width minus track outline borders (1px each side when shown)
1927
+ */
1928
+ readonly trackWidthPx: number;
1929
+ /**
1930
+ * #getter
1931
+ */
1932
+ readonly assemblyNames: string[];
1933
+ /**
1934
+ * #getter
1935
+ */
1936
+ readonly assemblyDisplayNames: string[];
1937
+ /**
1938
+ * #getter
1939
+ * the session's highlights on this view's assemblies
1940
+ */
1941
+ readonly highlights: HighlightType[];
1942
+ /**
1943
+ * #getter
1944
+ * checking if lgv is a 'top-level' view is used for toggling pin track
1945
+ * capability, sticky positioning
1946
+ */
1947
+ readonly isTopLevelView: boolean;
1948
+ /**
1949
+ * #getter
1950
+ * only uses sticky view headers when it is a 'top-level' view and
1951
+ * session allows it
1952
+ */
1953
+ readonly stickyViewHeaders: boolean;
1954
+ } & {
1955
+ /**
1956
+ * #getter
1957
+ * The census entry for this view: the tracks it holds itself. Declared
1958
+ * rather than derived — see `BaseViewModel.ownTracks`.
1959
+ */
1960
+ readonly ownTracks: any[];
1961
+ /**
1962
+ * #getter
1963
+ * See `BaseViewModel.rendersDisplays`.
1964
+ */
1965
+ readonly rendersDisplays: boolean;
1966
+ /**
1967
+ * #getter
1968
+ * Assembly name captioning the scalebar ahead of its refName labels, or
1969
+ * undefined for none. A container view (e.g. LinearSyntenyView) opts its sub-views in by
1970
+ * exposing showAssemblyNameInSubviewScalebar; duck-typed rather than
1971
+ * matching a concrete view type so no upward plugin dependency is needed
1972
+ * and any container can opt in. A wrong nesting depth simply yields no
1973
+ * prefix — hence the hasParent guard, since getParent throws (rather than
1974
+ * returning undefined) when the view sits shallower than depth 2.
1975
+ */
1976
+ readonly scalebarDisplayPrefix: string | undefined;
1977
+ /**
1978
+ * #getter
1979
+ */
1980
+ readonly assembliesNotFound: string | undefined;
1981
+ /**
1982
+ * #getter
1983
+ */
1984
+ readonly assemblyErrors: string | undefined;
1985
+ /**
1986
+ * #getter
1987
+ */
1988
+ readonly assembliesInitialized: boolean;
1989
+ /**
1990
+ * #getter
1991
+ * the assembly named by a pending `init`, or undefined when no init is
1992
+ * set. `init`'s assembly isn't in `assemblyNames` yet (that derives from
1993
+ * displayedRegions, still empty pre-navigation), so init-phase readiness
1994
+ * and error checks resolve it directly through here.
1995
+ */
1996
+ readonly initAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
1997
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
1998
+ }> & {
1999
+ error: unknown;
2000
+ loadingP: Promise<void> | undefined;
2001
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
2002
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2003
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2004
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
2005
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
2006
+ loadedGeneticCodes: Record<string, number> | undefined;
2007
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2008
+ statusMessage: string | undefined;
2009
+ statusProgress: number | undefined;
2010
+ statusSource: string | undefined;
2011
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
2012
+ } & {
2013
+ getConf(arg: string): any;
2014
+ } & {
2015
+ readonly name: string;
2016
+ readonly aliases: string[];
2017
+ readonly displayName: string;
2018
+ readonly refNameColors: string[];
2019
+ } & {
2020
+ readonly allAliases: string[];
2021
+ hasName(name: string): boolean;
2022
+ } & {
2023
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
2024
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
2025
+ } & {
2026
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
2027
+ regions: import("@jbrowse/core/util").Region[];
2028
+ cytobands: import("@jbrowse/core/util").Feature[];
2029
+ geneticCodes: Record<string, number>;
2030
+ }): void;
2031
+ setError(e: unknown): void;
2032
+ setLoadingP(p?: Promise<void>): void;
2033
+ loadPre(): Promise<void>;
2034
+ } & {
2035
+ load(): Promise<void>;
2036
+ } & {
2037
+ afterAttach(): void;
2038
+ } & {
2039
+ readonly initialized: boolean;
2040
+ readonly allRefNames: string[] | undefined;
2041
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
2042
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2043
+ } & {
2044
+ readonly refNames: string[] | undefined;
2045
+ } & {
2046
+ readonly refNameToIndex: Map<string, number> | undefined;
2047
+ } & {
2048
+ getCanonicalRefName(refName: string): string | undefined;
2049
+ getRefNameColor(refName: string): string | undefined;
2050
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2051
+ getGeneticCodeId(refName: string): number;
2052
+ getSeqAdapterRefName(canonicalRefName: string): string;
2053
+ } & {
2054
+ getCanonicalRefName2(refName: string): string;
2055
+ isValidRefName(refName: string): boolean;
2056
+ } & {
2057
+ getRefNamePosition(refName: string): number | undefined;
2058
+ getAliasesForRefName(refName: string): string[];
2059
+ getRefNameMapForAdapter(adapterConf: {
2060
+ [x: string]: unknown;
2061
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2062
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2063
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
2064
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
2065
+ }, {
2066
+ error: unknown;
2067
+ loadingP: Promise<void> | undefined;
2068
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
2069
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2070
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2071
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
2072
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
2073
+ loadedGeneticCodes: Record<string, number> | undefined;
2074
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2075
+ statusMessage: string | undefined;
2076
+ statusProgress: number | undefined;
2077
+ statusSource: string | undefined;
2078
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
2079
+ } & {
2080
+ getConf(arg: string): any;
2081
+ } & {
2082
+ readonly name: string;
2083
+ readonly aliases: string[];
2084
+ readonly displayName: string;
2085
+ readonly refNameColors: string[];
2086
+ } & {
2087
+ readonly allAliases: string[];
2088
+ hasName(name: string): boolean;
2089
+ } & {
2090
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
2091
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
2092
+ } & {
2093
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
2094
+ regions: import("@jbrowse/core/util").Region[];
2095
+ cytobands: import("@jbrowse/core/util").Feature[];
2096
+ geneticCodes: Record<string, number>;
2097
+ }): void;
2098
+ setError(e: unknown): void;
2099
+ setLoadingP(p?: Promise<void>): void;
2100
+ loadPre(): Promise<void>;
2101
+ } & {
2102
+ load(): Promise<void>;
2103
+ } & {
2104
+ afterAttach(): void;
2105
+ } & {
2106
+ readonly initialized: boolean;
2107
+ readonly allRefNames: string[] | undefined;
2108
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
2109
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2110
+ } & {
2111
+ readonly refNames: string[] | undefined;
2112
+ } & {
2113
+ readonly refNameToIndex: Map<string, number> | undefined;
2114
+ } & {
2115
+ getCanonicalRefName(refName: string): string | undefined;
2116
+ getRefNameColor(refName: string): string | undefined;
2117
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2118
+ getGeneticCodeId(refName: string): number;
2119
+ getSeqAdapterRefName(canonicalRefName: string): string;
2120
+ } & {
2121
+ getCanonicalRefName2(refName: string): string;
2122
+ isValidRefName(refName: string): boolean;
2123
+ } & {
2124
+ getRefNamePosition(refName: string): number | undefined;
2125
+ getAliasesForRefName(refName: string): string[];
2126
+ getRefNameMapForAdapter(adapterConf: {
2127
+ [x: string]: unknown;
2128
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2129
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2130
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
2131
+ /**
2132
+ * #getter
2133
+ * The assembly a pending launch is for: the one it names, else the one
2134
+ * the view already shows. A re-launch of a materialized view (a
2135
+ * `jb.setSession` document writing `loc` beside the built state) need
2136
+ * not restate it; without the default the readiness gate waited on
2137
+ * `assemblyManager.get(undefined)` for good. Undefined on a fresh view
2138
+ * whose blob names none, which `error` reports.
2139
+ */
2140
+ readonly launchAssemblyName: string | undefined;
2141
+ /**
2142
+ * #getter
2143
+ */
2144
+ readonly initialized: boolean;
2145
+ /**
2146
+ * #getter
2147
+ */
2148
+ readonly hasDisplayedRegions: boolean;
2149
+ /**
2150
+ * #getter
2151
+ * The assembly whose load the spinner is waiting on: the one `init` names
2152
+ * before navigation (it isn't in assemblyNames yet), else the first of the
2153
+ * displayed assemblies that hasn't finished loading.
2154
+ */
2155
+ readonly loadingAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
2156
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
2157
+ }> & {
2158
+ error: unknown;
2159
+ loadingP: Promise<void> | undefined;
2160
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
2161
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2162
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2163
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
2164
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
2165
+ loadedGeneticCodes: Record<string, number> | undefined;
2166
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2167
+ statusMessage: string | undefined;
2168
+ statusProgress: number | undefined;
2169
+ statusSource: string | undefined;
2170
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
2171
+ } & {
2172
+ getConf(arg: string): any;
2173
+ } & {
2174
+ readonly name: string;
2175
+ readonly aliases: string[];
2176
+ readonly displayName: string;
2177
+ readonly refNameColors: string[];
2178
+ } & {
2179
+ readonly allAliases: string[];
2180
+ hasName(name: string): boolean;
2181
+ } & {
2182
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
2183
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
2184
+ } & {
2185
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
2186
+ regions: import("@jbrowse/core/util").Region[];
2187
+ cytobands: import("@jbrowse/core/util").Feature[];
2188
+ geneticCodes: Record<string, number>;
2189
+ }): void;
2190
+ setError(e: unknown): void;
2191
+ setLoadingP(p?: Promise<void>): void;
2192
+ loadPre(): Promise<void>;
2193
+ } & {
2194
+ load(): Promise<void>;
2195
+ } & {
2196
+ afterAttach(): void;
2197
+ } & {
2198
+ readonly initialized: boolean;
2199
+ readonly allRefNames: string[] | undefined;
2200
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
2201
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2202
+ } & {
2203
+ readonly refNames: string[] | undefined;
2204
+ } & {
2205
+ readonly refNameToIndex: Map<string, number> | undefined;
2206
+ } & {
2207
+ getCanonicalRefName(refName: string): string | undefined;
2208
+ getRefNameColor(refName: string): string | undefined;
2209
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2210
+ getGeneticCodeId(refName: string): number;
2211
+ getSeqAdapterRefName(canonicalRefName: string): string;
2212
+ } & {
2213
+ getCanonicalRefName2(refName: string): string;
2214
+ isValidRefName(refName: string): boolean;
2215
+ } & {
2216
+ getRefNamePosition(refName: string): number | undefined;
2217
+ getAliasesForRefName(refName: string): string[];
2218
+ getRefNameMapForAdapter(adapterConf: {
2219
+ [x: string]: unknown;
2220
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2221
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2222
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
2223
+ configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
2224
+ }, {
2225
+ error: unknown;
2226
+ loadingP: Promise<void> | undefined;
2227
+ adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
2228
+ regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
2229
+ refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2230
+ canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
2231
+ cytobands: import("@jbrowse/core/util").Feature[] | undefined;
2232
+ loadedGeneticCodes: Record<string, number> | undefined;
2233
+ lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
2234
+ statusMessage: string | undefined;
2235
+ statusProgress: number | undefined;
2236
+ statusSource: string | undefined;
2237
+ refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
2238
+ } & {
2239
+ getConf(arg: string): any;
2240
+ } & {
2241
+ readonly name: string;
2242
+ readonly aliases: string[];
2243
+ readonly displayName: string;
2244
+ readonly refNameColors: string[];
2245
+ } & {
2246
+ readonly allAliases: string[];
2247
+ hasName(name: string): boolean;
2248
+ } & {
2249
+ setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
2250
+ setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
2251
+ } & {
2252
+ setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
2253
+ regions: import("@jbrowse/core/util").Region[];
2254
+ cytobands: import("@jbrowse/core/util").Feature[];
2255
+ geneticCodes: Record<string, number>;
2256
+ }): void;
2257
+ setError(e: unknown): void;
2258
+ setLoadingP(p?: Promise<void>): void;
2259
+ loadPre(): Promise<void>;
2260
+ } & {
2261
+ load(): Promise<void>;
2262
+ } & {
2263
+ afterAttach(): void;
2264
+ } & {
2265
+ readonly initialized: boolean;
2266
+ readonly allRefNames: string[] | undefined;
2267
+ readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
2268
+ readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
2269
+ } & {
2270
+ readonly refNames: string[] | undefined;
2271
+ } & {
2272
+ readonly refNameToIndex: Map<string, number> | undefined;
2273
+ } & {
2274
+ getCanonicalRefName(refName: string): string | undefined;
2275
+ getRefNameColor(refName: string): string | undefined;
2276
+ getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
2277
+ getGeneticCodeId(refName: string): number;
2278
+ getSeqAdapterRefName(canonicalRefName: string): string;
2279
+ } & {
2280
+ getCanonicalRefName2(refName: string): string;
2281
+ isValidRefName(refName: string): boolean;
2282
+ } & {
2283
+ getRefNamePosition(refName: string): number | undefined;
2284
+ getAliasesForRefName(refName: string): string[];
2285
+ getRefNameMapForAdapter(adapterConf: {
2286
+ [x: string]: unknown;
2287
+ }, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
2288
+ getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
2289
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
2290
+ /**
2291
+ * #getter
2292
+ * What the loading screen says while `showLoading`, read off the
2293
+ * assembly whose load is the wait; undefined otherwise.
2294
+ */
2295
+ readonly loading: import("@jbrowse/core/util/viewStatus").ViewLoading | undefined;
2296
+ /**
2297
+ * #getter
2298
+ */
2299
+ readonly hasSomethingToShow: boolean;
2300
+ /**
2301
+ * #getter
2302
+ * init is set but its async navigation (the afterAttach autorun) hasn't
2303
+ * populated displayedRegions yet. `initialized` can already be true here
2304
+ * (it only tracks assembly readiness), so without this the container
2305
+ * would mount over empty regions and pxToBp/hover would throw.
2306
+ *
2307
+ * **Not dotplot's or synteny's `initPending`**, which is the bare
2308
+ * `!!self.pendingLaunch` — "an init blob has not been applied" — and which those
2309
+ * views read from their `settled` gate rather than from `showLoading`.
2310
+ * This one is narrower on purpose: it closes only the window where there
2311
+ * is nothing on screen. Once navigation has produced regions the view is
2312
+ * usable and gets shown, even though `init` is still set while the tracks
2313
+ * and highlights land. Renamed away from the shared spelling because the
2314
+ * two predicates disagree exactly there, and the bare name reads as
2315
+ * theirs.
2316
+ */
2317
+ readonly awaitingInitNavigation: boolean;
2318
+ /**
2319
+ * #getter
2320
+ * Whether to show a loading indicator instead of the import form or view
2321
+ */
2322
+ readonly showLoading: boolean;
2323
+ /**
2324
+ * #getter
2325
+ * Whether to show the import form
2326
+ */
2327
+ readonly showImportForm: boolean;
2328
+ /**
2329
+ * #getter
2330
+ * Is there anything to draw yet? The gate anything reading block geometry
2331
+ * — a ruler, a scalebar, a display — has to pass first, because
2332
+ * `width`/`staticBlocks` throw by design before the view has been
2333
+ * measured and navigated.
2334
+ *
2335
+ * **Not `initialized`**, which is the trap this getter exists to close.
2336
+ * That one answers "have the assembly's regions loaded", which is only
2337
+ * the first of two async steps: navigating then populates
2338
+ * `displayedRegions`, and in the window between the two `initialized` is
2339
+ * already true while there is still nothing on screen. `showLoading`
2340
+ * folds in `awaitingInitNavigation`, the getter that exists for exactly
2341
+ * that gap.
2342
+ *
2343
+ * `error` is the third outcome and is why this is not a bare
2344
+ * `!showLoading`: a failed assembly load also ends the loading state, so
2345
+ * that alone would mount over the wreckage. Read `error` yourself if you
2346
+ * want to draw it.
2347
+ */
2348
+ readonly ready: boolean;
2349
+ /**
2350
+ * #getter
2351
+ * The same question as `ready` with the other three outcomes named, for a
2352
+ * host that draws its own chrome and has to render all four. See
2353
+ * `computeViewStatus`, whose precedence this defers to — and note its
2354
+ * `ready` is narrower than the getter above, which is true when nothing
2355
+ * has told the view where to look.
2356
+ */
2357
+ readonly status: ViewStatus;
2358
+ /**
2359
+ * #getter
2360
+ */
2361
+ readonly scalebarHeight: number;
2362
+ /**
2363
+ * #getter
2364
+ * What TrackContainer puts *above* a track's rendering container: the gap
2365
+ * over its Paper, and the Paper's own top border when outlines are on.
2366
+ */
2367
+ readonly trackLeadingChrome: number;
2368
+ /**
2369
+ * #getter
2370
+ * ...and what it puts below: the resize divider, plus the matching bottom
2371
+ * border.
2372
+ */
2373
+ readonly trackTrailingChrome: number;
2374
+ /**
2375
+ * #getter
2376
+ * A track's full cost beyond its display height.
2377
+ *
2378
+ * The track *label* is not counted here: an offset label is an in-flow
2379
+ * box whose height is whatever the theme renders a Paper of icon buttons
2380
+ * at, so it is measured into `trackLabelBands` per track and added by
2381
+ * `trackLabelBand` rather than derived.
2382
+ */
2383
+ readonly trackChromeHeight: number;
2384
+ /**
2385
+ * #getter
2386
+ */
2387
+ readonly headerHeight: number;
2388
+ /**
2389
+ * #method
2390
+ * rendered height of a single track, collapsing to a fixed height when
2391
+ * minimized. Shared by trackHeights and getTrackYOffset so the two can't
2392
+ * disagree. Reads `activeDisplay` — the display TrackContainer actually
2393
+ * mounts — rather than re-picking `displays[0]`, so the view's height math
2394
+ * can't diverge from what is on screen.
2395
+ */
2396
+ trackHeight(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): any;
2397
+ /**
2398
+ * #method
2399
+ * the measured in-flow label band above a track's rendering container,
2400
+ * 0 until TrackContainer has measured one or when no label is in flow
2401
+ */
2402
+ trackLabelBand(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): number;
2403
+ /**
2404
+ * #getter
2405
+ */
2406
+ readonly trackHeights: number;
2407
+ /**
2408
+ * #getter
2409
+ */
2410
+ readonly trackHeightsWithChrome: number;
2411
+ /**
2412
+ * #getter
2413
+ */
2414
+ readonly height: number;
2415
+ /**
2416
+ * #getter
2417
+ * The display height of each track a whole-stack resize moves, by track
2418
+ * instance id: every shown track that is not minimized.
2419
+ */
2420
+ readonly resizableTrackHeights: Map<any, any>;
2421
+ /**
2422
+ * #method
2423
+ * Y offset (in pixels, from the top of the view) where a track's
2424
+ * rendering container starts. Walks tracks in DOM render order (pinned
2425
+ * first, then unpinned), from the same constants TrackContainer lays its
2426
+ * Paper out with. Returns `undefined` if the track is not present.
2427
+ *
2428
+ * Includes each track's measured label band, this track's own included,
2429
+ * since an in-flow label sits above the rendering container inside the
2430
+ * same Paper. Exact once TrackContainer has measured; before that it is
2431
+ * short by the unmeasured bands.
2432
+ */
2433
+ getTrackYOffset(trackId: string): number | undefined;
2434
+ /**
2435
+ * #method
2436
+ * the pinned or unpinned sibling list a track renders within; move
2437
+ * up/down/top/bottom reorder inside this section rather than the full
2438
+ * `tracks` array, since the two sections lay out independently
2439
+ */
2440
+ trackSection(id: string): any[];
2441
+ /**
2442
+ * #getter
2443
+ */
2444
+ readonly totalBp: number;
2445
+ /**
2446
+ * #getter
2447
+ */
2448
+ readonly fitBpPerPx: number;
2449
+ /**
2450
+ * #getter
2451
+ * The zoom-out limit. Equal to the fit for this view's regions, except
2452
+ * while a container holds it on a coarser shared scale, such as a small
2453
+ * genome next to a large one, drawn short so the two compare by length.
2454
+ *
2455
+ * The shared scale raises the limit. A bpPerPx written past the limit
2456
+ * would be undone by the first operation that clamps (a wheel tick, a
2457
+ * rubberband, a `setDisplayedRegions`), as with the dotplot's locked
2458
+ * aspect ratio turning "zoom out" into a zoom in (`axisMaxBpPerPx`).
2459
+ * Every zoom clamps against the same ceiling, so full zoom-out stops at
2460
+ * the shared scale.
2461
+ */
2462
+ readonly maxBpPerPx: number;
2463
+ /**
2464
+ * #getter
2465
+ * The zoom-out ceiling a containing comparative view holds this row to,
2466
+ * or 0 for a standalone view, a mode that is off, and a stack that cannot
2467
+ * answer yet.
2468
+ *
2469
+ * Pulled rather than pushed down into a volatile: the number is a
2470
+ * function of every row's fit, all of which move on a resize, and a
2471
+ * stored copy would be stale by the next layout.
2472
+ */
2473
+ readonly sharedFitBpPerPx: number;
2474
+ /**
2475
+ * #getter
2476
+ */
2477
+ readonly minBpPerPx: number;
2478
+ /**
2479
+ * #getter
2480
+ */
2481
+ readonly error: unknown;
2482
+ /**
2483
+ * #getter
2484
+ */
2485
+ readonly maxOffset: number;
2486
+ /**
2487
+ * #getter
2488
+ */
2489
+ readonly minOffset: number;
2490
+ /**
2491
+ * #getter
2492
+ * Whether the displayed regions read left-to-right, right-to-left, or
2493
+ * some of each. `horizontallyFlip` reverses the order and flips every
2494
+ * region at once, so a flipped row is uniformly `reversed` and `mixed`
2495
+ * takes going out of your way — the scalebar label menu's per-region
2496
+ * "Reverse region". Read off `displayedRegions` rather than off blocks
2497
+ * because blocks cover the window and this is a fact about the row.
2498
+ */
2499
+ readonly displayedRegionsOrientation: import("./util.ts").RegionsOrientation;
2500
+ /**
2501
+ * #getter
2502
+ */
2503
+ readonly displayedRegionsTotalPx: number;
2504
+ /**
2505
+ * #getter
2506
+ */
2507
+ readonly trackMap: Map<string, any>;
2508
+ /**
2509
+ * #method
2510
+ */
2511
+ getTrack(id: string): any;
2512
+ /**
2513
+ * #method
2514
+ * displayId of the active (shown) display for a track in this view, used
2515
+ * by the config editor to expand the relevant display and collapse the
2516
+ * track's other displays
2517
+ */
2518
+ getActiveDisplayId(trackId: string): string | undefined;
2519
+ } & {
2520
+ /**
2521
+ * #action
2522
+ */
2523
+ setShowTrackOutlines(arg: boolean): void;
2524
+ /**
2525
+ * #action
2526
+ */
2527
+ setScrollZoom(flag: boolean): void;
2528
+ /**
2529
+ * #action
2530
+ */
2531
+ setColorByCDS(flag: boolean): void;
2532
+ /**
2533
+ * #action
2534
+ */
2535
+ setShowAminoAcids(flag: boolean): void;
2536
+ /**
2537
+ * #action
2538
+ */
2539
+ setShowCytobands(flag: boolean): void;
2540
+ /**
2541
+ * #action
2542
+ */
2543
+ setTrackLabelBand(trackId: string, band: number): void;
2544
+ /**
2545
+ * #action
2546
+ */
2547
+ setScrollPortExcess(px: number | undefined): void;
2548
+ /**
2549
+ * #action
2550
+ * Grow or shrink every unminimized track by `distance` px in all, each
2551
+ * by its share of the height it has above the display minimum. `from` is
2552
+ * the heights to scale, by track instance id; a drag passes the heights
2553
+ * it started with, so whole-pixel rounding does not compound frame by
2554
+ * frame. Returns how far the stack moved.
2555
+ */
2556
+ resizeTracks(distance: number, from?: any): number;
2557
+ /**
2558
+ * #action
2559
+ * A resize keeps the window in bp, so `bpPerPx` follows the new width
2560
+ * and the view keeps framing the same sequence (ADR-070).
2561
+ */
2562
+ setWidth(newWidth: number): void;
2563
+ /**
2564
+ * #action
2565
+ */
2566
+ setError(error: unknown): void;
2567
+ /**
2568
+ * #action
2569
+ */
2570
+ setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
2571
+ /**
2572
+ * #action
2573
+ */
2574
+ setHideHeader(b: boolean): void;
2575
+ /**
2576
+ * #action
2577
+ */
2578
+ setHideHeaderOverview(b: boolean): void;
2579
+ /**
2580
+ * #action
2581
+ */
2582
+ setScalebarOnly(b: boolean): void;
2583
+ /**
2584
+ * #action
2585
+ */
2586
+ setHideNoTracksActive(b: boolean): void;
2587
+ /**
2588
+ * #action
2589
+ */
2590
+ setShowGridlines(b: boolean): void;
2591
+ /**
2592
+ * #action
2593
+ * set temporary vertical guides (e.g., for LD display hover)
2594
+ */
2595
+ setVolatileGuides(guides: VolatileGuide[]): void;
2596
+ /**
2597
+ * #action
2598
+ */
2599
+ scrollTo(offsetPx: number): number;
2600
+ /**
2601
+ * #action
2602
+ * `scrollTo`'s bp-space twin: place the window's left edge at a
2603
+ * linearized bp coordinate, clamped to the same scroll limits.
2604
+ *
2605
+ * It exists so a caller that already knows where it wants to be in bp —
2606
+ * zoomTo, anchoring the base under the cursor — does not have to convert
2607
+ * to pixels and let this convert back. That round trip is lossy once per
2608
+ * frame, and a scroll-zoom burst is a few dozen frames, which is enough
2609
+ * to walk the base out from under the cursor.
2610
+ */
2611
+ scrollToBp(startBp: number): number;
2612
+ /**
2613
+ * #action
2614
+ */
2615
+ zoomTo(bpPerPx: number, offset?: any): number;
2616
+ /**
2617
+ * #action
2618
+ * sets offsets of rubberband, used in the get sequence dialog can call
2619
+ * view.getSelectedRegions(view.leftOffset,view.rightOffset) to compute
2620
+ * the selected regions from the offsets
2621
+ */
2622
+ setOffsets(left?: BpOffset, right?: BpOffset): void;
2623
+ /**
2624
+ * #action
2625
+ * Raise the picker over search results that name more than one place.
2626
+ * @param onPick - where a picked result lands; by default it navigates
2627
+ * there and shows the track its index came from
2628
+ */
2629
+ setSearchResults(searchResults: BaseResult[], searchQuery: string, assemblyName: string, onPick?: (result: BaseResult) => Promise<unknown>): void;
2630
+ /**
2631
+ * #action
2632
+ */
2633
+ showTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): any;
2634
+ /**
2635
+ * #action
2636
+ */
2637
+ hideTrack(trackId: string): boolean;
2638
+ } & {
2639
+ /**
2640
+ * #action
2641
+ * Resize every unminimized track so the view is exactly as tall as the
2642
+ * scroll port it sits in. Does nothing until the view has measured one.
2643
+ */
2644
+ fitTracksToWindow(): void;
2645
+ /**
2646
+ * #action
2647
+ * showTrack for a track whose display state model may be lazily
2648
+ * loaded: loads it, then shows
2649
+ */
2650
+ launchTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): Promise<any>;
2651
+ } & {
2652
+ /**
2653
+ * #method
2654
+ * The shown track a move action means: the menu passes a track model's
2655
+ * own `id`, an agent passes the `trackId` it knows the track by, and
2656
+ * both name one shown track. Answers the model id, or the argument
2657
+ * unchanged when nothing shown matches, so the move reports it.
2658
+ */
2659
+ trackModelId(idOrTrackId: string): any;
2660
+ } & {
2661
+ moveTrack: (moving: string, target: string) => void;
2662
+ /**
2663
+ * #action
2664
+ */
2665
+ moveTrackDown(idOrTrackId: string): void;
2666
+ /**
2667
+ * #action
2668
+ */
2669
+ moveTrackUp(idOrTrackId: string): void;
2670
+ /**
2671
+ * #action
2672
+ */
2673
+ moveTrackToTop(idOrTrackId: string): void;
2674
+ /**
2675
+ * #action
2676
+ */
2677
+ moveTrackToBottom(idOrTrackId: string): void;
2678
+ } & {
2679
+ /**
2680
+ * #action
2681
+ */
2682
+ toggleTrack(trackId: string): boolean;
2683
+ /**
2684
+ * #action
2685
+ * toggleTrack with launchTrack's loading behavior
2686
+ */
2687
+ launchToggleTrack(trackId: string): Promise<boolean>;
2688
+ /**
2689
+ * #action
2690
+ */
2691
+ setTrackLabels(setting: ViewTrackLabelMode): void;
2692
+ /**
2693
+ * #action
2694
+ */
2695
+ setShowCenterLine(b: boolean): void;
2696
+ /**
2697
+ * #action
2698
+ */
2699
+ activateTrackSelector(): import("@jbrowse/core/util").Widget;
2700
+ /**
2701
+ * #action
2702
+ */
2703
+ toggleTrackSelector(): import("@jbrowse/core/util").Widget;
2704
+ /**
2705
+ * #method
2706
+ * Helper method for the fetchSequence.
2707
+ * Retrieves the corresponding regions that were selected by the
2708
+ * rubberband
2709
+ *
2710
+ * @param leftOffset - `object as {start, end, index, offset}`, offset = start
2711
+ * of user drag
2712
+ * @param rightOffset - `object as {start, end, index, offset}`,
2713
+ * offset = end of user drag
2714
+ * @returns array of Region[]
2715
+ */
2716
+ getSelectedRegions(leftOffset?: BpOffset, rightOffset?: BpOffset): {
2717
+ assemblyName: string;
2718
+ refName: string;
2719
+ start: number;
2720
+ end: number;
2721
+ }[];
2722
+ /**
2723
+ * #action
2724
+ */
2725
+ horizontalScroll(distance: number): number;
2726
+ /**
2727
+ * #action
2728
+ */
2729
+ setDraggingTrackId(idx?: string): void;
2730
+ /**
2731
+ * #action
2732
+ * called while dragging a track over the track at `targetId`; reorders
2733
+ * once the cursor has moved far enough (see shouldSwapTracks) to avoid
2734
+ * jitter when a short track is dragged over a tall one
2735
+ */
2736
+ onTrackDragOver(targetId: string, currentY: number): void;
2737
+ /**
2738
+ * #action
2739
+ */
2740
+ setLaunch(launch?: LaunchInput<InitState>): void;
2741
+ /**
2742
+ * #method
2743
+ * renders the view to SVG markup, which it returns; saves it through
2744
+ * FileSaver unless `save: false`
2745
+ */
2746
+ exportSvg(opts?: ExportSvgOptions): Promise<string>;
2747
+ } & {
2748
+ slide: (viewWidths: number) => void;
2749
+ zoom: (targetBpPerPx: number) => void;
2750
+ cancelZoomAnimation: () => void;
2751
+ } & {
2752
+ /**
2753
+ * #getter
2754
+ */
2755
+ readonly showsWholeChromosome: boolean;
2756
+ /**
2757
+ * #getter
2758
+ * an ideogram only reads correctly against an entire chromosome: on a
2759
+ * sub-region it is a meaningless slice of bands, and the centromere shows
2760
+ * up as a lone half-triangle. The chromosome needs bands of its own too:
2761
+ * a cytoband file often lists only the main chromosomes, not chrM or the
2762
+ * unplaced scaffolds
2763
+ */
2764
+ readonly canShowCytobands: boolean;
2765
+ /**
2766
+ * #getter
2767
+ * the `showCytobands` setting gated by whether cytobands can be shown at
2768
+ * all (whole chromosome with bands of its own) and by the header
2769
+ * overview they draw in being on, which the SVG export follows too
2770
+ */
2771
+ readonly effectiveShowCytobands: boolean;
2772
+ /**
2773
+ * #getter
2774
+ * the cytoband is displayed to the right of the chromosome name, and
2775
+ * that offset is calculated manually with this method
2776
+ */
2777
+ readonly cytobandOffset: number;
2778
+ /**
2779
+ * #getter
2780
+ */
2781
+ readonly isTrackSelectorOpen: boolean;
2782
+ } & {
2783
+ /**
2784
+ * #method
2785
+ * return the view menu items
2786
+ */
2787
+ menuItems(): MenuItem[];
2788
+ /**
2789
+ * #method
2790
+ * the view menu's Highlights submenu; extend this to add a row there
2791
+ */
2792
+ highlightsSubMenuItems(): MenuItem[];
2793
+ /**
2794
+ * #method
2795
+ * what a plugin can start from the selected region — a synteny view, a
2796
+ * consensus call. Extend this rather than `rubberBandMenuItems` so the
2797
+ * entries collect under the menu's "Launch" submenu; that grouping is
2798
+ * decided once here rather than by whichever contributor runs first, and
2799
+ * keeps the rubberband menu itself short as plugins pile on.
2800
+ */
2801
+ rubberBandLaunchMenuItems(): MenuItem[];
2802
+ /**
2803
+ * #getter
2804
+ * geometry of the overview scalebar — derived from displayedRegions,
2805
+ * width, and cytobandOffset so it stays cached by MobX
2806
+ */
2807
+ readonly overviewLayout: ViewLayout;
2808
+ } & {
2809
+ /**
2810
+ * #getter
2811
+ * static blocks are an important concept jbrowse uses to avoid
2812
+ * re-rendering when you scroll to the side. when you horizontally
2813
+ * scroll to the right, old blocks to the left may be removed, and new
2814
+ * blocks may be instantiated on the right. tracks may use the static
2815
+ * blocks to render their data for the region represented by the block
2816
+ */
2817
+ readonly staticBlocks: BlockSet;
2818
+ /**
2819
+ * #getter
2820
+ * dynamic blocks represent the exact coordinates of the currently
2821
+ * visible genome regions on the screen. they are similar to static
2822
+ * blocks, but static blocks can go offscreen while dynamic blocks
2823
+ * represent exactly what is on screen
2824
+ */
2825
+ readonly dynamicBlocks: BlockSet;
2826
+ /**
2827
+ * #getter
2828
+ * all overview scalebar blocks (content + elided), laid out on the
2829
+ * overviewLayout. memoized so the scalebar doesn't recompute it per
2830
+ * render
2831
+ */
2832
+ readonly overviewBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
2833
+ /**
2834
+ * #getter
2835
+ * leading/trailing pixel span of the visible regions projected onto the
2836
+ * overviewLayout — the geometry of the overview's "you are here"
2837
+ * rectangle, and of the top edge of the polygon drawn under it. Elided
2838
+ * regions count: at whole-genome zoom the tail of an assembly is all
2839
+ * coalesced tiny contigs, and stopping at the last *content* block left
2840
+ * the rectangle short of (or, scrolled onto that tail, absent from) the
2841
+ * polygon it sits on.
2842
+ */
2843
+ readonly overviewRegionPxSpan: import("@jbrowse/core/util/Base1DUtils").PxSpan | undefined;
2844
+ /**
2845
+ * #getter
2846
+ * The x shift that maps the **staticBlocks frame** onto the viewport:
2847
+ * `translateX(view.staticBlocksTranslateX)` on one container places
2848
+ * every `gridlineTicks`, `scalebarLabels` and `paddingSpans` entry at
2849
+ * once, and a pan then moves that single transform rather than each
2850
+ * child.
2851
+ *
2852
+ * The frame exists because those three are laid out across every
2853
+ * displayed region rather than across the viewport — it overhangs on
2854
+ * both sides — so their `x` values are stable under a scroll and only
2855
+ * this number moves. `scalebarRefNameLabels` is the exception and says
2856
+ * so: its `transform` is already a screen x, because a sticky label's
2857
+ * position is a function of the scroll rather than of block geometry.
2858
+ *
2859
+ * **The subtraction must happen here, in float64, and that is the
2860
+ * load-bearing part.** `offsetPx` is a whole-genome pixel coordinate —
2861
+ * hg38 chr1 at base resolution is already past 1e10 — and a length that
2862
+ * size does not survive the trip through CSS: the transform matrix is
2863
+ * float32 by the time it reaches the compositor, where consecutive
2864
+ * representable values at 1e10 are ~1024px apart, and layout saturates
2865
+ * sooner still (Blink's `LayoutUnit` is int32 at 1/64px, so ±33.5M px).
2866
+ * So the shape that looks obvious — lay an overlay out in absolute
2867
+ * genome pixels, write `translateX(-view.offsetPx)` — does not lose a
2868
+ * subpixel, it puts the row somewhere else entirely, and only on large
2869
+ * assemblies at high zoom, which is not where anyone tests. Both
2870
+ * operands here are large and their difference is bounded by the
2871
+ * overhang (a block or two), so what reaches CSS is small and exact.
2872
+ * Same rule as the GPU side, one layer up —
2873
+ * `agent-docs/reference/BP_PRECISION.md`.
2874
+ *
2875
+ * Published because it is the one piece of coordinate arithmetic a host
2876
+ * drawing its own chrome would otherwise have to know, and because
2877
+ * having it written out at each call site is how the two in-tree copies
2878
+ * came to disagree about rounding. Round it where the content is text
2879
+ * (a fractional offset blurs a label); leave it alone for paths and
2880
+ * boxes.
2881
+ */
2882
+ readonly staticBlocksTranslateX: number;
2883
+ /**
2884
+ * #getter
2885
+ * Gridline tick positions (x relative to the staticBlocks frame),
2886
+ * derived from staticBlocks + bpPerPx. Computed once and shared by every
2887
+ * Gridlines instance (scalebar, main view, each pinned track) rather
2888
+ * than recomputing the makeTicks loop per component.
2889
+ */
2890
+ readonly gridlineTicks: {
2891
+ x: number;
2892
+ major: boolean;
2893
+ }[];
2894
+ /**
2895
+ * #getter
2896
+ * Scalebar coordinate labels (x in the staticBlocks frame + display
2897
+ * text). Sibling of gridlineTicks sharing the same makeBlockTicks
2898
+ * formula, so labels line up exactly with their gridlines. staticBlocks
2899
+ * chop a region into ~800px chunks; groupContiguousBlocks merges them
2900
+ * back per region so a label on an internal chunk boundary isn't clipped
2901
+ * away by both neighbors — only genuine region edges clip a label.
2902
+ *
2903
+ * A run that can hold too few labels to make a ruler goes unnumbered
2904
+ * (`tickLabelsWorthDrawing`), the same rule the overview scalebar and
2905
+ * the dotplot axes apply: with a whole genome displayed each chromosome
2906
+ * catches one lone coordinate, which conveys no scale by itself and
2907
+ * reads as the same number repeated across the row.
2908
+ */
2909
+ readonly scalebarLabels: {
2910
+ x: number;
2911
+ label: string;
2912
+ key: string;
2913
+ }[];
2914
+ /**
2915
+ * #getter
2916
+ * The bold refName labels drawn along the scalebar, as plain data:
2917
+ * `{key, refName, displayedRegionIndex, lastDisplayedRegionIndex,
2918
+ * sticky, transform, maxWidth, paddingLeft, text}` each. One per run of
2919
+ * same-refName regions, plus a "sticky" one pinned to the viewport's
2920
+ * left edge naming the refName under it, so panning into a chromosome
2921
+ * does not scroll its own name off the screen.
2922
+ *
2923
+ * Three rules live in here that a host drawing region names will
2924
+ * otherwise rediscover the hard way, and two of them are invisible until
2925
+ * the data is awkward:
2926
+ *
2927
+ * - the sticky label rides the rightmost run that has scrolled off the
2928
+ * left, not the region's first block — that one is gone from
2929
+ * staticBlocks entirely once you zoom into a region's interior, taking
2930
+ * the chromosome name off screen at exactly the zoom where nothing
2931
+ * else names it.
2932
+ * - adjacent regions of the same refName (collapsed introns) get one
2933
+ * label between them, not one each. That label names the whole run and
2934
+ * is fitted to the whole run, and `displayedRegionIndex` /
2935
+ * `lastDisplayedRegionIndex` bracket what it stands for.
2936
+ * - a name is drawn whole or not at all, measured against the space its
2937
+ * run leaves. Clipped to its own width, `chr16` reads as `chr1` —
2938
+ * a different chromosome rather than a shortened name, which is why
2939
+ * this is a fit test rather than an ellipsis.
2940
+ *
2941
+ * **Viewport frame, unlike its siblings.** `transform` is a screen x,
2942
+ * already net of `offsetPx`, where gridlineTicks / scalebarLabels /
2943
+ * paddingSpans are all in the staticBlocks frame. The sticky label's
2944
+ * position is a function of `offsetPx` rather than of block geometry, so
2945
+ * it has no fixed position in that frame — and for the same reason this
2946
+ * getter recomputes on every scroll frame where those three do not.
2947
+ *
2948
+ * `caption` accompanies the labels: the chip at the row's left edge,
2949
+ * saying which assembly the row is (a container view — synteny — opts
2950
+ * into that through `scalebarDisplayPrefix`) and whether it is flipped.
2951
+ * A ` [rev]` there is a fact about the ROW; the same marker on a
2952
+ * chromosome name means that one region, which only happens under mixed
2953
+ * orientation. `captionSpanPx` is the width it takes: the sticky label
2954
+ * pins to its right edge rather than the viewport's, and the coordinate
2955
+ * numbers stay out from under it. The SVG export deliberately
2956
+ * calls `getScalebarRefNameLabels` itself with no prefix rather than
2957
+ * reading this, since it draws its own assembly name above the ruler.
2958
+ */
2959
+ readonly scalebarRefNameLabels: {
2960
+ labels: import("./util.ts").ScalebarRefNameLabel[];
2961
+ caption: string | undefined;
2962
+ captionSpanPx: number;
2963
+ };
2964
+ /**
2965
+ * #getter
2966
+ * Every span along the row that is not track data, as plain geometry in
2967
+ * the staticBlocks frame — the same frame as gridlineTicks and
2968
+ * scalebarLabels, so one `translateX(staticBlocksTranslateX)` places all
2969
+ * three. A host drawing its own chrome needs all three kinds:
2970
+ *
2971
+ * - `seam`: the 3px bar at a region's right edge. Displayed regions are
2972
+ * laid out **contiguously** (calculateStaticBlocks emits boundary
2973
+ * padding only before the first region and after the last), so this
2974
+ * bar is the only thing separating two of them. Without it a
2975
+ * two-region view looks like a single region.
2976
+ * `isRightEndOfDisplayedRegion` marks it; the right edge of the
2977
+ * currently *loaded* blocks, which block geometry gives you, is a
2978
+ * different set.
2979
+ * - `elided`: a region too narrow to draw at this zoom. Whole-genome on
2980
+ * a real assembly is mostly these (hg38 has 455 sequences, and all
2981
+ * but the 24 chromosomes are under a pixel wide), so a host that
2982
+ * skips them leaves that part of the row empty.
2983
+ * - `boundary`: past the start of the first region or the end of the
2984
+ * last. Greying it shows the last region's seam as the edge of a
2985
+ * filled area, where it would otherwise look like a line in the
2986
+ * middle of the track.
2987
+ *
2988
+ * Elided blocks get no seam even though they carry the flag: at the
2989
+ * zoom where regions elide, one bar per region would fill the row solid
2990
+ * grey.
2991
+ *
2992
+ * PaddingBlocks is the in-tree consumer. The SVG export does not use
2993
+ * it: `SVGRegionSeparators` walks dynamicBlocks itself and draws only
2994
+ * the seam, because `elided` and `boundary` mark state for an
2995
+ * interactive row. In a static figure the striped grey would cover most
2996
+ * of the row at whole-genome zoom. The export keeps the seam because
2997
+ * regions lay out contiguously and the seam is all that separates two
2998
+ * of them.
2999
+ */
3000
+ readonly paddingSpans: readonly {
3001
+ key: string;
3002
+ x: number;
3003
+ width: number;
3004
+ kind: 'seam' | 'elided' | 'boundary';
3005
+ }[];
3006
+ /**
3007
+ * #getter
3008
+ * Integer-rounded sum of all visible block widths. Slightly less than
3009
+ * view.width when the genome ends before the right edge; use view.width
3010
+ * for SVG clip rects (display boundary) and this for paint canvas sizing
3011
+ * (actual content width).
3012
+ */
3013
+ readonly totalWidthPx: number;
3014
+ /**
3015
+ * #getter
3016
+ * Like totalWidthPx but excluding inter-region boundary blocks. Used
3017
+ * when column layout divides the canvas width by feature count.
3018
+ */
3019
+ readonly totalWidthPxWithoutBorders: number;
3020
+ /**
3021
+ * #getter
3022
+ */
3023
+ readonly visibleBp: number;
3024
+ /**
3025
+ * #getter
3026
+ * Whether any part of a displayed region actually falls inside the
3027
+ * viewport. False both when the view holds no regions at all and when
3028
+ * it holds some but is scrolled entirely off them; either way there is
3029
+ * no visible span for the scalebar, ruler and refName labels to
3030
+ * describe. The SVG export checks it before drawing its header.
3031
+ * Distinct from `hasDisplayedRegions`, which only asks whether the
3032
+ * view has been given regions, not whether any are on screen.
3033
+ */
3034
+ readonly hasVisibleContent: boolean;
3035
+ /**
3036
+ * #getter
3037
+ * What is on screen, as regions that address whole bases — what a
3038
+ * reader means by "the visible region" when they ask to fetch it,
3039
+ * bookmark it or read it back in a locString field. `visibleRegions`
3040
+ * below is the other half: pixels, and fractional by design.
3041
+ */
3042
+ readonly visibleWholeBaseRegions: {
3043
+ assemblyName: string;
3044
+ refName: string;
3045
+ start: number;
3046
+ end: number;
3047
+ }[];
3048
+ /**
3049
+ * #getter
3050
+ * Returns the currently visible content blocks with screen pixel
3051
+ * positions and displayedRegionIndex guaranteed.
3052
+ * Used by WebGL displays for per-region data fetching and rendering.
3053
+ */
3054
+ readonly visibleRegions: {
3055
+ refName: string;
3056
+ start: number;
3057
+ end: number;
3058
+ assemblyName: string;
3059
+ reversed: boolean | undefined;
3060
+ displayedRegionIndex: number;
3061
+ screenStartPx: number;
3062
+ screenEndPx: number;
3063
+ }[];
3064
+ /**
3065
+ * #getter
3066
+ * Right edge (px, viewport-relative) of the on-screen content, clamped
3067
+ * to the track — where a right-pinned overlay such as a wiggle's colour
3068
+ * or score legend belongs, rather than out in the empty gutter the
3069
+ * regions can leave at whole-genome zoom. `@jbrowse/display-kit`'s
3070
+ * `contentRightEdgePx` states the rule; an SVG export applies the same
3071
+ * one against the export's canvas width instead of this track's.
3072
+ *
3073
+ * Published as a SCALAR on purpose. `visibleRegions` rebuilds a fresh
3074
+ * array of fresh objects on every pan and zoom frame, so a component
3075
+ * that derived this number itself re-rendered on every frame of every
3076
+ * gesture — to produce, whenever content fills the track, the unchanged
3077
+ * `trackWidthPx`. Reading the scalar lets MobX's `===` stop the chain at
3078
+ * this computed instead. Measured over 20 zoom frames: the wiggle
3079
+ * family's three body instances fell from 66 renders to 7.
3080
+ */
3081
+ readonly contentRightEdgePx: number;
3082
+ /**
3083
+ * #getter
3084
+ * visibleRegions expanded by a half-screen buffer on each side,
3085
+ * clamped to displayedRegion bounds, with integer-rounded coordinates.
3086
+ * Use this when fetching data that should extend slightly beyond the
3087
+ * viewport for smooth scrolling.
3088
+ */
3089
+ readonly bufferedVisibleRegions: {
3090
+ region: {
3091
+ refName: string;
3092
+ start: number;
3093
+ end: number;
3094
+ assemblyName: string;
3095
+ reversed: boolean | undefined;
3096
+ };
3097
+ displayedRegionIndex: number;
3098
+ }[];
3099
+ /**
3100
+ * #getter
3101
+ * a single "combo-locstring" representing all the regions visible on
3102
+ * the screen
3103
+ */
3104
+ readonly visibleLocStrings: string;
3105
+ /**
3106
+ * #getter
3107
+ * **The blocks a debounced consumer clips to**: the coarse blocks once
3108
+ * the view has settled at least once, the live ones before that.
3109
+ *
3110
+ * The coarse blocks stop a per-bp scan from recomputing on every
3111
+ * animation frame during a pan or zoom. Wiggle's autoscale domain, the
3112
+ * alignments coverage scale and MAF's coverage band use them. While the
3113
+ * coarse blocks are stale the result is a frame or two old, as the
3114
+ * debounce intends. **Empty coarse blocks are a different case.** A scan
3115
+ * over no blocks yields no entries, and the consumer falls back to the
3116
+ * domain `[0,1]`, which draws a line plot blank and a density plot
3117
+ * saturated. The coarse blocks are empty for the 500ms between a view
3118
+ * initializing and the coarse autorun's first run, and data can load
3119
+ * within that window.
3120
+ *
3121
+ * Falling back to the live blocks costs one extra recompute at that
3122
+ * transition, compared with N per frame without the debounce.
3123
+ */
3124
+ readonly settledDynamicBlocks: ContentBlock[];
3125
+ /**
3126
+ * #getter
3127
+ * same as visibleLocStrings, but only updated every 500ms
3128
+ */
3129
+ readonly coarseVisibleLocStrings: string;
3130
+ /**
3131
+ * #getter
3132
+ */
3133
+ readonly coarseTotalBpDisplayStr: string;
3134
+ /**
3135
+ * #getter
3136
+ */
3137
+ readonly effectiveTotalBp: number;
3138
+ /**
3139
+ * #getter
3140
+ */
3141
+ readonly effectiveTotalBpDisplayStr: string;
3142
+ } & {
3143
+ /**
3144
+ * #action
3145
+ */
3146
+ setCoarseDynamicBlocks(blocks: BlockSet, bpPerPx: number): void;
3147
+ } & {
3148
+ /**
3149
+ * #action
3150
+ * Bring the coarse blocks to the viewport as it stands now, for a
3151
+ * placement that JUMPED rather than travelled.
3152
+ *
3153
+ * The coarse blocks are a 500ms throttle, and every consumer trades
3154
+ * freshness for not recomputing per animation frame — the location box,
3155
+ * canvas's on-screen feature set, and the two per-bp scans behind
3156
+ * `settledDynamicBlocks`. That trade is only sound while the answer is a
3157
+ * few frames old. **A jump makes it unrelated instead**, because there is
3158
+ * nothing to coalesce: the viewport left behind is not an approximation of
3159
+ * the new one, it is a different place. Unsettled, the location box reads
3160
+ * as a navigation that didn't happen, and wiggle's autoscale domain is
3161
+ * computed over the window the user just left — measured at `[0,200]`
3162
+ * against a correct `[0,300]` when a 40bp coarse window survived a jump to
3163
+ * 4040bp on screen. Only the per-region fetch moving to the leading edge
3164
+ * made that reachable: at 600ms the data never landed inside the hole.
3165
+ *
3166
+ * **The continuous paths deliberately do not come through here.** The
3167
+ * spring zoom writes through `zoomTo` per frame and a drag through
3168
+ * `scrollTo`, so this adds no per-frame work; the settle is idempotent
3169
+ * (`setCoarseDynamicBlocks` compares block keys), so the debounced
3170
+ * autorun's own follow-up run costs nothing.
3171
+ *
3172
+ * Every placer calls it, and `placersSettleCoarseBlocks.test.ts` is what
3173
+ * makes that true of the next one — it scans this file for the writes and
3174
+ * fails on a placer that reaches neither the settle nor its named list of
3175
+ * continuous paths. Two passes by hand missed four.
3176
+ */
3177
+ settleCoarseBlocks(): void;
3178
+ } & {
3179
+ /**
3180
+ * #action
3181
+ * offset is the base-pair-offset in the displayed region, index is the
3182
+ * index of the displayed region in the linear genome view
3183
+ *
3184
+ * @param start - object as `{start, end, offset, index}`
3185
+ * @param end - object as `{start, end, offset, index}`
3186
+ */
3187
+ moveTo(start?: BpOffset, end?: BpOffset): void;
3188
+ /**
3189
+ * #action
3190
+ * Place the viewport by the pair of PIXEL quantities it used to be stored
3191
+ * as. Prefer `setWindow`: pixels mean nothing without the width they were
3192
+ * measured at, so a round trip through here is only exact while the width
3193
+ * holds still. Kept for callers that genuinely have pixels — a wheel
3194
+ * gesture, a rubberband.
3195
+ */
3196
+ setNewView(bpPerPx: number, offsetPx: number): void;
3197
+ /**
3198
+ * #action
3199
+ * Place the viewport by the pair it is actually STORED as: the window's
3200
+ * width and left edge, both in bp. `setNewView`'s bp-space twin, and the
3201
+ * right one for anything that captures a viewport and puts it back later
3202
+ * (an Undo, a saved location) — those two moments can be a window resize
3203
+ * apart, and this pair survives one where a pixel pair does not.
3204
+ *
3205
+ * Still clamped, by the same zoom and scroll limits as every other mover:
3206
+ * the regions may have changed under it, and a window the new set can't
3207
+ * hold is not restorable however it was spelled.
3208
+ */
3209
+ setWindow(windowWidthBp: number, windowStartBp: number): void;
3210
+ /**
3211
+ * #action
3212
+ * `setWindow` without the settle, for a writer that runs per animation
3213
+ * frame. Flushing the coarse blocks sixty times a second is the one thing
3214
+ * such a writer must not do: they are a 500ms throttle that a synteny
3215
+ * follow pass and two autoscale domains hang off, and settling each frame
3216
+ * turns each of those into per-frame work — `positionViewOnSpans` states
3217
+ * the same rule for the same reason.
3218
+ */
3219
+ setWindowFrame(windowWidthBp: number, windowStartBp: number): void;
3220
+ /**
3221
+ * #action
3222
+ * The worst jump of them to leave unsettled: the coarse blocks are keyed
3223
+ * by `displayedRegionIndex`, so a set that outlives the region list has a
3224
+ * consumer reading one contig's data against another's blocks.
3225
+ */
3226
+ setDisplayedRegions(regions: Region[]): void;
3227
+ /**
3228
+ * #action
3229
+ * Re-assert `maxBpPerPx` over the current zoom, for a container whose
3230
+ * shared ceiling just fell — otherwise the view is stranded above it with
3231
+ * zoom-out disabled and the slider's min past its value. Goes through
3232
+ * `zoomTo` so the clamp keeps one definition, and settles because a
3233
+ * ceiling drop moves the window in one step.
3234
+ *
3235
+ * Requires an `initialized` view; the caller checks, since an MST action
3236
+ * reads untracked and a guard here would never re-run once the row
3237
+ * arrived.
3238
+ */
3239
+ clampZoomToCeiling(): void;
3240
+ /**
3241
+ * #action
3242
+ */
3243
+ showAllRegions(): void;
3244
+ /**
3245
+ * #action
3246
+ * Fit the displayed regions to the width exactly, edge to edge.
3247
+ *
3248
+ * Not the same as `showAllRegions`, which goes to `maxBpPerPx` — the
3249
+ * zoom-out LIMIT, where `SHOW_ALL_REGIONS_FILL` deliberately keeps a 10%
3250
+ * margin so the whole genome doesn't sit flush against both edges. That
3251
+ * margin is right for "show me everything" and wrong for a caller that
3252
+ * named the regions it wants: it draws them at 1/0.9 of fit-to-width,
3253
+ * centered, which is a silent 11% scale difference from the
3254
+ * single-region path (`moveTo`, span/width) reached through the same
3255
+ * location box.
3256
+ *
3257
+ * The scale comes from `fitAllRegionsWindow`, which is where the rule is
3258
+ * written — a snapshot builder that cannot call an action needs the same
3259
+ * answer, and the two agreeing matters more than either being local. Where
3260
+ * it clamps up to `minBpPerPx` the content is narrower than the view, and
3261
+ * the centering is what frames it.
3262
+ */
3263
+ fitAllRegions(): void;
3264
+ /**
3265
+ * #action
3266
+ */
3267
+ horizontallyFlip(): void;
3268
+ } & {
3269
+ /**
3270
+ * #action
3271
+ */
3272
+ showAllRegionsInAssembly(assemblyName?: string): void;
3273
+ /**
3274
+ * #action
3275
+ * this "clears the view" and makes the view return to the import form
3276
+ */
3277
+ clearView(): void;
3278
+ /**
3279
+ * #action
3280
+ * Navigate to a location based on its refName and optionally start, end,
3281
+ * and assemblyName. Will not try to change displayed regions, use
3282
+ * `navToLocations` instead. Only navigates to a location if it is
3283
+ * entirely within a displayedRegion. Navigates to the first matching
3284
+ * location encountered.
3285
+ *
3286
+ * Throws an error if navigation was unsuccessful
3287
+ *
3288
+ * @param query - a proposed location to navigate to
3289
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
3290
+ * adds 20% padding on each side)
3291
+ */
3292
+ navTo(query: NavLocation, grow?: number): void;
3293
+ /**
3294
+ * #action
3295
+ * Navigate to a location based on its refName and optionally start, end,
3296
+ * and assemblyName. Will not try to change displayed regions, use
3297
+ * navToLocations instead. Only navigates to a location if it is entirely
3298
+ * within a displayedRegion. Navigates to the first matching location
3299
+ * encountered.
3300
+ *
3301
+ * Throws an error if navigation was unsuccessful
3302
+ *
3303
+ * @param locations - proposed location to navigate to
3304
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
3305
+ * adds 20% padding on each side)
3306
+ */
3307
+ navToMultiple(locations: NavLocation[], grow?: number): void;
3308
+ } & {
3309
+ /**
3310
+ * #action
3311
+ * Replace the region list and place the viewport in one step. The pair is
3312
+ * the unit a coarse-block consumer can act on: called separately they
3313
+ * publish the viewport in between, and post-await in `navToLocations`
3314
+ * they are two transactions, so a per-bp scan runs over a window that was
3315
+ * never on screen.
3316
+ *
3317
+ * With no location named it fits the regions rather than going through
3318
+ * `showAllRegions`: the caller named the regions it wants, so it gets the
3319
+ * width, where showAllRegions goes to the zoom-out LIMIT and its 10%
3320
+ * margin is dead frame for a named subset.
3321
+ */
3322
+ showRegions(regions: Region[], location?: NavLocation): void;
3323
+ } & {
3324
+ /**
3325
+ * #action
3326
+ * Navigate to the given locstring, will change displayed regions if
3327
+ * needed, and wait for assemblies to be initialized
3328
+ *
3329
+ * @param input - e.g. "chr1:1-100", "chr1:1-100 chr2:1-100", "chr 1 100"
3330
+ * @param optAssemblyName - (optional) the assembly name to use when
3331
+ * navigating to the locstring
3332
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
3333
+ * adds 20% padding on each side)
3334
+ * @param opts - `showHitTrack: false` keeps a text-search hit from also
3335
+ * showing the track its index was built from
3336
+ * @returns whether the view moved. A multi-hit search raises the picker
3337
+ * instead of navigating, and both resolve — see `handleSelectedRegion`.
3338
+ */
3339
+ navToLocString(input: string, optAssemblyName?: string, grow?: number, opts?: {
3340
+ showHitTrack?: boolean;
3341
+ }): Promise<boolean>;
3342
+ /**
3343
+ * #action
3344
+ * Similar to `navToLocString`, but accepts a list of parsed location
3345
+ * objects instead of a locstring. Will try to perform
3346
+ * `setDisplayedRegions` if changing regions
3347
+ *
3348
+ * @param regions - array of parsed location objects
3349
+ * @param assemblyName - optional assembly name
3350
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
3351
+ * adds 20% padding on each side)
3352
+ */
3353
+ navToLocations(regions: ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
3354
+ } & {
3355
+ /**
3356
+ * #action
3357
+ * Similar to `navToLocString`, but accepts a parsed location object
3358
+ * instead of a locstring. Will try to perform `setDisplayedRegions` if
3359
+ * changing regions
3360
+ *
3361
+ * @param parsedLocString - a parsed location object with refName, start,
3362
+ * end, etc.
3363
+ * @param assemblyName - optional assembly name
3364
+ * @param grow - optional multiplier to expand the region by (e.g., 0.2
3365
+ * adds 20% padding on each side)
3366
+ */
3367
+ navToLocation(parsedLocString: ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
3368
+ /**
3369
+ * #action
3370
+ * adds the region in view to the session's highlights
3371
+ */
3372
+ highlightCurrentRegion(): void;
3373
+ /**
3374
+ * #action
3375
+ * navigates to the most recently added highlight on this view's
3376
+ * assemblies, zoomed out a little for context
3377
+ */
3378
+ navigateNewestHighlight(): Promise<void>;
3379
+ } & {
3380
+ /**
3381
+ * #method
3382
+ */
3383
+ rubberBandMenuItems(): MenuItem[];
3384
+ /**
3385
+ * #method
3386
+ */
3387
+ bpToPx({ refName, coord, displayedRegionIndex, }: {
3388
+ refName: string;
3389
+ coord: number;
3390
+ displayedRegionIndex?: number;
3391
+ }): {
3392
+ index: number;
3393
+ offsetPx: number;
3394
+ } | undefined;
3395
+ /**
3396
+ * #method
3397
+ * Map a highlight region to its pixel position+width inside
3398
+ * the tracks container. Falls back to the raw refName if the region's
3399
+ * assemblyName is missing or unknown so highlights authored without an
3400
+ * assembly still render in single-assembly views.
3401
+ */
3402
+ getHighlightCoords(region: HighlightRegion): {
3403
+ width: number;
3404
+ left: number;
3405
+ } | undefined;
3406
+ /**
3407
+ * #method
3408
+ * like getHighlightCoords but laid out against the overview scalebar and
3409
+ * shifted by the cytoband offset
3410
+ */
3411
+ getOverviewHighlightCoords(region: HighlightRegion): {
3412
+ width: number;
3413
+ left: number;
3414
+ } | undefined;
3415
+ /**
3416
+ * #method
3417
+ * scrolls the view to center on the given bp. if that is not in any of
3418
+ * the displayed regions, does nothing
3419
+ *
3420
+ * @param coord - basepair at which you want to center the view
3421
+ * @param refName - refName of the displayedRegion you are centering at
3422
+ * @param displayedRegionIndex - index of the displayedRegion
3423
+ */
3424
+ centerAt(coord: number, refName: string, displayedRegionIndex?: number): void;
3425
+ /**
3426
+ * #method
3427
+ */
3428
+ pxToBp(px: number): import("@jbrowse/core/util/Base1DUtils").PxToBpResult;
3429
+ /**
3430
+ * #getter
3431
+ */
3432
+ readonly centerLineInfo: import("@jbrowse/core/util/Base1DUtils").PxToBpResult | undefined;
3433
+ } & {
3434
+ /**
3435
+ * #action
3436
+ * a region edit from the ruler's menu as one action, which a synteny
3437
+ * stack's follow reads as the reader's gesture on this row; see
3438
+ * `setDisplayedRegionsKeepingCenter`
3439
+ */
3440
+ editDisplayedRegions(edit: RegionEdit): void;
3441
+ } & {
3442
+ /**
3443
+ * #method
3444
+ */
3445
+ rubberbandClickMenuItems(clickOffset: BpOffset): MenuItem[];
3446
+ /**
3447
+ * #method
3448
+ * returns menu items for a highlight context menu. plugins can extend
3449
+ * this via Core-extendPluggableElement to add their own items
3450
+ */
3451
+ highlightMenuItems(_highlight: HighlightType): MenuItem[];
3452
+ } & {
3453
+ flyTo: (centerBp: number, windowWidthBp: number) => void;
3454
+ /**
3455
+ * #action
3456
+ * `centerAt`'s animated twin: the same destination, reached along the
3457
+ * arc instead of jumped to, at the zoom the view is already on.
3458
+ */
3459
+ flyToCenter(coord: number, refName: string, displayedRegionIndex?: number): void;
3460
+ /**
3461
+ * #action
3462
+ * A flight to a linear bp centre at the zoom the view is on, or is
3463
+ * already flying to, widened where that is narrower than `fitWidthBp`.
3464
+ * The current width mid-flight is a point on the arc, so a second
3465
+ * flight read from it would land pulled back.
3466
+ */
3467
+ flyToFit(centerBp: number, fitWidthBp: number): void;
3468
+ } & {
3469
+ afterCreate(): void;
3470
+ afterAttach(): void;
3471
+ }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>, InitState, "bpPerPx" | "offsetPx" | "showCytobandsSetting">, {
3472
+ displayName: string | undefined;
3473
+ minimized: boolean;
3474
+ id: string;
3475
+ type: string;
3476
+ windowStartBp: number;
3477
+ windowWidthBp: number;
3478
+ legacyBpPerPx: number;
3479
+ displayedRegions: Region[];
3480
+ tracks: any[];
3481
+ hideHeader: boolean;
3482
+ hideHeaderOverview: boolean;
3483
+ hideNoTracksActive: boolean;
3484
+ trackSelectorType: "hierarchical";
3485
+ showGridlines: boolean;
3486
+ scalebarOnly: boolean;
3487
+ launch: LaunchInput<InitState> | undefined;
3488
+ showCytobands?: false | undefined;
3489
+ trackLabels?: string | undefined;
3490
+ colorByCDS?: true | undefined;
3491
+ showAminoAcids?: false | undefined;
3492
+ showTrackOutlines?: false | undefined;
3493
+ }>;
296
3494
  export type LinearGenomeViewStateModel = ReturnType<typeof stateModelFactory>;
297
3495
  export type LinearGenomeViewModel = Instance<LinearGenomeViewStateModel>;
298
- export { default as LinearGenomeView, default as ReactComponent, } from './components/LinearGenomeView.tsx';
299
- export { default as RefNameAutocomplete } from './components/RefNameAutocomplete/index.tsx';
300
- export { default as SearchBox } from './components/SearchBox.tsx';
301
- export { renderToSvg } from './svgcomponents/SVGLinearGenomeView.tsx';
3496
+ declare module '@jbrowse/core/PluginManager' {
3497
+ interface ViewTypeRegistry {
3498
+ LinearGenomeView: LinearGenomeViewStateModel;
3499
+ }
3500
+ }