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

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