@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,8 +1,5 @@
1
- import type { LinearGenomeViewModel } from '../index.ts';
2
1
  import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
3
- declare function TrackLabelDragHandle({ trackId, view, track, }: {
4
- trackId: string;
2
+ declare const TrackLabelDragHandle: ({ track, }: {
5
3
  track: BaseTrackModel;
6
- view: LinearGenomeViewModel;
7
- }): import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
8
5
  export default TrackLabelDragHandle;
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getContainingView } from '@jbrowse/core/util';
2
3
  import { makeStyles } from '@jbrowse/core/util/tss-react';
3
4
  import DragIcon from '@mui/icons-material/DragIndicator';
5
+ import { observer } from 'mobx-react';
4
6
  const useStyles = makeStyles()({
5
7
  dragHandle: {
6
8
  cursor: 'grab',
@@ -11,8 +13,10 @@ const useStyles = makeStyles()({
11
13
  pointerEvents: 'none',
12
14
  },
13
15
  });
14
- function TrackLabelDragHandle({ trackId, view, track, }) {
16
+ const TrackLabelDragHandle = observer(function TrackLabelDragHandle({ track, }) {
15
17
  const { classes } = useStyles();
18
+ const view = getContainingView(track);
19
+ const trackId = track.trackId;
16
20
  return (_jsx("span", { draggable: true, className: classes.dragHandle, onDragStart: event => {
17
21
  const target = event.currentTarget;
18
22
  if (target.parentNode) {
@@ -23,5 +27,5 @@ function TrackLabelDragHandle({ trackId, view, track, }) {
23
27
  }, onDragEnd: () => {
24
28
  view.setDraggingTrackId(undefined);
25
29
  }, "data-testid": `dragHandle-${view.id}-${trackId}`, children: _jsx(DragIcon, { className: classes.dragHandleIcon, fontSize: "small" }) }));
26
- }
30
+ });
27
31
  export default TrackLabelDragHandle;
@@ -1,5 +1,5 @@
1
1
  import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
2
  declare const TrackLabelMenu: ({ track, }: {
3
3
  track: BaseTrackModel;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
5
5
  export default TrackLabelMenu;
@@ -1,100 +1,47 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useCallback } from 'react';
3
2
  import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
4
3
  import { getContainingView, getSession } from '@jbrowse/core/util';
5
- import AddIcon from '@mui/icons-material/Add';
6
- import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
7
- import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
8
- import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
9
- import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
4
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
10
5
  import LowPriorityIcon from '@mui/icons-material/LowPriority';
11
- import MinimizeIcon from '@mui/icons-material/Minimize';
12
6
  import MoreVertIcon from '@mui/icons-material/MoreVert';
13
- import PushPinIcon from '@mui/icons-material/PushPin';
14
7
  import { observer } from 'mobx-react';
8
+ import { getTrackOrderSubMenu } from './trackLabelMenuItems.js';
9
+ // IconButton's default 5px padding made this the tallest thing in the label
10
+ // (27px), so it, not the text or the other controls, set the label height and
11
+ // hence the offset the track body gets. 3px trims the label to 23px while
12
+ // keeping a hit area past the 17px icon; 2px reads as too compact.
13
+ const useStyles = makeStyles()({
14
+ menuButton: {
15
+ padding: 3,
16
+ },
17
+ });
15
18
  const TrackLabelMenu = observer(function TrackLabelMenu({ track, }) {
19
+ const { classes } = useStyles();
16
20
  const view = getContainingView(track);
17
21
  const session = getSession(track);
18
- const getMenuItems = useCallback(() => {
19
- const trackConf = track.configuration;
20
- const minimized = track.minimized;
21
- const pinned = track.pinned;
22
- const { isTopLevelView } = view;
23
- const trackMenuItems = track.trackMenuItems();
24
- const saveTrackData = trackMenuItems.find(item => 'label' in item && item.label === 'Save track data');
25
- const remainingTrackMenuItems = trackMenuItems.filter(item => !('label' in item) || item.label !== 'Save track data');
26
- const sessionItems = session.getTrackActionMenuItems?.(trackConf, saveTrackData ? [saveTrackData] : []) || [];
22
+ function getMenuItems() {
23
+ const orderSubMenu = getTrackOrderSubMenu({ view, track });
24
+ const sessionItems = session.getTrackActionMenuItems?.({
25
+ config: track.configuration,
26
+ view,
27
+ }) ?? [];
27
28
  return [
28
- {
29
- label: 'Track order',
30
- icon: LowPriorityIcon,
31
- type: 'subMenu',
32
- priority: 1000,
33
- subMenu: [
34
- ...(!isTopLevelView
35
- ? []
36
- : [
37
- {
38
- label: pinned ? 'Unpin track' : 'Pin track',
39
- icon: PushPinIcon,
40
- onClick: () => {
41
- track.setPinned(!pinned);
42
- },
43
- },
44
- ]),
29
+ ...(orderSubMenu.length
30
+ ? [
45
31
  {
46
- label: minimized ? 'Restore track' : 'Minimize track',
47
- icon: minimized ? AddIcon : MinimizeIcon,
48
- onClick: () => {
49
- track.setMinimized(!minimized);
50
- },
32
+ label: 'Track order',
33
+ icon: LowPriorityIcon,
34
+ type: 'subMenu',
35
+ priority: 1000,
36
+ subMenu: orderSubMenu,
51
37
  },
52
- ...(view.tracks.length > 2
53
- ? [
54
- {
55
- label: 'Move track to top',
56
- icon: KeyboardDoubleArrowUpIcon,
57
- onClick: () => {
58
- view.moveTrackToTop(track.id);
59
- },
60
- },
61
- ]
62
- : []),
63
- ...(view.tracks.length > 1
64
- ? [
65
- {
66
- label: 'Move track up',
67
- icon: KeyboardArrowUpIcon,
68
- onClick: () => {
69
- view.moveTrackUp(track.id);
70
- },
71
- },
72
- {
73
- label: 'Move track down',
74
- icon: KeyboardArrowDownIcon,
75
- onClick: () => {
76
- view.moveTrackDown(track.id);
77
- },
78
- },
79
- ]
80
- : []),
81
- ...(view.tracks.length > 2
82
- ? [
83
- {
84
- label: 'Move track to bottom',
85
- icon: KeyboardDoubleArrowDownIcon,
86
- onClick: () => {
87
- view.moveTrackToBottom(track.id);
88
- },
89
- },
90
- ]
91
- : []),
92
- ],
93
- },
38
+ ]
39
+ : []),
94
40
  ...sessionItems,
95
- ...remainingTrackMenuItems,
96
- ].sort((a, b) => (b.priority || 0) - (a.priority || 0));
97
- }, [track, view, session]);
98
- return (_jsx(CascadingMenuButton, { menuItems: getMenuItems, "data-testid": "track_menu_icon", children: _jsx(MoreVertIcon, { fontSize: "small" }) }));
41
+ track.saveTrackDataMenuItem,
42
+ ...track.trackMenuItems(),
43
+ ].sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
44
+ }
45
+ return (_jsx(CascadingMenuButton, { menuItems: getMenuItems, className: classes.menuButton, "data-testid": "track_menu_icon", "data-trackid": track.trackId, tooltip: "Track settings", children: _jsx(MoreVertIcon, { fontSize: "small" }) }));
99
46
  });
100
47
  export default TrackLabelMenu;
@@ -0,0 +1,22 @@
1
+ import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
+ /**
3
+ * The track label's warning for a file whose reference names have nothing in
4
+ * common with the assembly's — the commonest data-configuration mistake in
5
+ * JBrowse, and until now a silent one: the track draws nothing and reads
6
+ * exactly like a track with no features in view.
7
+ *
8
+ * The label rather than the display chrome, deliberately. The chrome's states
9
+ * are `displayPhase`'s, which are mutually exclusive and two of which replace
10
+ * the display's subtree; a mismatch is neither an error to retry nor a phase to
11
+ * be in, and routing it through `model.error` would put a red banner and a dead
12
+ * Retry over a track that, if the check is ever wrong, is drawing fine. This
13
+ * sits next to the track's own close/minimize buttons, costs the display
14
+ * nothing, and reaches every track type at once.
15
+ *
16
+ * The tooltip is the summary and the dialog is the disclosure — a hover nobody
17
+ * performs is not a way of telling someone their data is misconfigured.
18
+ */
19
+ declare const TrackLabelRefNameWarning: ({ track, }: {
20
+ track: BaseTrackModel;
21
+ }) => import("react").JSX.Element | null;
22
+ export default TrackLabelRefNameWarning;
@@ -0,0 +1,46 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { refNameMismatchMessage } from '@jbrowse/core/assemblyManager/assembly';
4
+ import { InfoDialog } from '@jbrowse/core/ui';
5
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
6
+ import WarningIcon from '@mui/icons-material/Warning';
7
+ import { IconButton, Typography } from '@mui/material';
8
+ import { observer } from 'mobx-react';
9
+ const useStyles = makeStyles()(theme => ({
10
+ iconButton: {
11
+ padding: 0,
12
+ color: theme.palette.warning.main,
13
+ },
14
+ }));
15
+ /**
16
+ * The track label's warning for a file whose reference names have nothing in
17
+ * common with the assembly's — the commonest data-configuration mistake in
18
+ * JBrowse, and until now a silent one: the track draws nothing and reads
19
+ * exactly like a track with no features in view.
20
+ *
21
+ * The label rather than the display chrome, deliberately. The chrome's states
22
+ * are `displayPhase`'s, which are mutually exclusive and two of which replace
23
+ * the display's subtree; a mismatch is neither an error to retry nor a phase to
24
+ * be in, and routing it through `model.error` would put a red banner and a dead
25
+ * Retry over a track that, if the check is ever wrong, is drawing fine. This
26
+ * sits next to the track's own close/minimize buttons, costs the display
27
+ * nothing, and reaches every track type at once.
28
+ *
29
+ * The tooltip is the summary and the dialog is the disclosure — a hover nobody
30
+ * performs is not a way of telling someone their data is misconfigured.
31
+ */
32
+ const TrackLabelRefNameWarning = observer(function TrackLabelRefNameWarning({ track, }) {
33
+ const { classes } = useStyles();
34
+ const [open, setOpen] = useState(false);
35
+ const { refNameMismatch } = track;
36
+ if (!refNameMismatch) {
37
+ return null;
38
+ }
39
+ const message = refNameMismatchMessage(refNameMismatch);
40
+ return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: () => {
41
+ setOpen(true);
42
+ }, className: classes.iconButton, title: message, "data-testid": `track-refname-warning-${track.trackId}`, children: _jsx(WarningIcon, { fontSize: "small" }) }), open ? (_jsxs(InfoDialog, { open: true, title: "Reference names do not match the assembly", onClose: () => {
43
+ setOpen(false);
44
+ }, children: [_jsx(Typography, { children: message }), _jsx(Typography, { variant: "body2", style: { marginTop: 8 }, children: "The track menu's \"About track\" shows every reference name the file uses." })] })) : null] }));
45
+ });
46
+ export default TrackLabelRefNameWarning;
@@ -4,5 +4,5 @@ type LGV = LinearGenomeViewModel;
4
4
  declare const TrackRenderingContainer: ({ model, track, }: {
5
5
  model: LGV;
6
6
  track: BaseTrackModel;
7
- }) => import("react/jsx-runtime").JSX.Element;
7
+ }) => import("react").JSX.Element;
8
8
  export default TrackRenderingContainer;
@@ -1,45 +1,99 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Suspense, useEffect, useRef } from 'react';
3
- import { LoadingEllipses } from '@jbrowse/core/ui';
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Suspense, useCallback } from 'react';
3
+ import { LoadingOverlay } from '@jbrowse/core/ui';
4
+ import { getSession } from '@jbrowse/core/util';
5
+ import { getTrackName } from '@jbrowse/core/util/tracks';
4
6
  import { makeStyles } from '@jbrowse/core/util/tss-react';
5
7
  import { observer } from 'mobx-react';
8
+ import { MINIMIZED_TRACK_HEIGHT } from '../consts.js';
6
9
  const useStyles = makeStyles()({
10
+ // aligns with block boundaries. check for example the breakpoint split view
11
+ // demo to see if features align if wanting to change things. the -1 left
12
+ // offset (cancels the Paper's 1px border) is applied inline since it's
13
+ // conditional on showTrackOutlines, the same condition the border is gated on
7
14
  renderingComponentContainer: {
8
15
  position: 'absolute',
9
- left: -1,
10
16
  height: '100%',
11
17
  width: '100%',
12
18
  },
19
+ // Tracks never scroll natively on this outer container — every display owns
20
+ // its own vertical scroll: canvas displays scroll an inner sticky-canvas
21
+ // container (FeatureComponent), while alignments and variants draw a custom
22
+ // VerticalScrollbar overlay and redraw the canvas at `scrollTop`. A native
23
+ // scroll port here only produced a *second*, spurious scrollbar whenever a
24
+ // display's absolutely-positioned overlays extended a pixel past `height`
25
+ // (the reported double/flickering/full-height scrollbars). So there is
26
+ // deliberately no `overflow` here: `contain: strict` includes paint
27
+ // containment, which clips to the padding box on its own, and adding an
28
+ // `overflow` would reintroduce the scroll container — one the browser can
29
+ // still scroll silently (focus, scrollIntoView, scroll anchoring) even with
30
+ // no scrollbar shown, desyncing track content from the scalebar.
31
+ //
32
+ // `contain: strict` is also what makes every piece of display chrome reach the
33
+ // track's overlay layer through `TrackOverlayPortal` — containment creates a
34
+ // stacking context, so nothing in here can paint above `PaddingBlocks`, which
35
+ // is a later sibling. That looks like a tax worth removing (swap for a bare
36
+ // `overflow: clip`, which clips without a scroll container AND without a
37
+ // stacking context, and the portals become plain z-indexes). It was measured:
38
+ // `browser-tests/probe-containment.ts`. Under DOM load that swap costs 2.6x
39
+ // paint time on a track height change and 4.0x on a pan, at identical paint
40
+ // counts. The stacking context IS the paint isolation — the two can't be
41
+ // separated, so the portal is the price of the isolation, not a workaround
42
+ // for it. Layout containment measured free; the paint half is the load-bearing
43
+ // one. ADR-058.
13
44
  trackRenderingContainer: {
14
- overflowY: 'auto',
15
- overflowX: 'hidden',
16
45
  whiteSpace: 'nowrap',
17
46
  position: 'relative',
18
47
  background: 'none',
19
48
  contain: 'strict',
20
49
  },
21
50
  });
51
+ // The box every LGV display is mounted in, and the ONLY place in the tree where
52
+ // a track's pixels get a name and a role — one component rather than an
53
+ // `aria-label` per display type, the same way `TrackOverlaySlot` is one paint
54
+ // order rather than one per display.
55
+ //
56
+ // Its own observer for a measured reason. The "what is on screen" half of the
57
+ // name is the settled locstring, which changes whenever navigation settles; read
58
+ // from `TrackRenderingContainer` below, that would re-render every track's
59
+ // container (and re-run its `useStyles`) on every settle. Here the re-render is
60
+ // this one `<div>`: `children` is the same React element object the parent
61
+ // already handed it, so React bails out of the display's whole subtree.
62
+ //
63
+ // **`role="figure"`, not `role="img"`.** `img` is the textbook role for a canvas
64
+ // and would be right if the box held only pixels — but it makes every descendant
65
+ // presentational, and a display's chrome does not all portal out of the sandbox:
66
+ // alignments draws its group collapse/expand `<button>`s inline
67
+ // (`GroupLabelsOverlay`), which under `img` would be focusable and announced as
68
+ // nothing. `figure` names the box and keeps what is inside it reachable. Revisit
69
+ // if inline interactive chrome ever goes away.
70
+ const TrackDisplayRegion = observer(function TrackDisplayRegion({ model, track, children, ...divProps }) {
71
+ const trackName = getTrackName(track.configuration, getSession(track));
72
+ const loc = model.coarseVisibleLocStrings;
73
+ return (_jsx("div", { ...divProps, role: "figure", "aria-label": loc ? `${trackName} track, showing ${loc}` : `${trackName} track`, children: children }));
74
+ });
22
75
  const TrackRenderingContainer = observer(function TrackRenderingContainer({ model, track, }) {
23
76
  const { classes } = useStyles();
24
- const display = track.displays[0];
77
+ // an LGV track always holds at least one linear display (activeDisplay =
78
+ // displays[0]); narrow to the linear shape for height/RenderingComponent
79
+ const display = track.activeDisplay;
25
80
  const { height, RenderingComponent, DisplayBlurb } = display;
26
- const { trackRefs, id, scaleFactor } = model;
81
+ const { trackRefs, showTrackOutlines } = model;
27
82
  const trackId = track.trackId;
28
- const ref = useRef(null);
29
83
  const minimized = track.minimized;
30
- useEffect(() => {
31
- if (ref.current) {
32
- trackRefs[trackId] = ref.current;
84
+ // callback ref keeps trackRefs in sync as the rendering div mounts/unmounts
85
+ // (e.g. on minimize/restore), unlike a useEffect that misses the toggle
86
+ const setRef = useCallback((el) => {
87
+ if (el) {
88
+ trackRefs[trackId] = el;
33
89
  }
34
- return () => {
90
+ else {
35
91
  delete trackRefs[trackId];
36
- };
92
+ }
37
93
  }, [trackRefs, trackId]);
38
94
  return (_jsx("div", { className: classes.trackRenderingContainer, style: {
39
- height: minimized ? 20 : height,
40
- }, onScroll: evt => display.setScrollTop(evt.currentTarget.scrollTop), "data-testid": `trackRenderingContainer-${id}-${trackId}`, children: !minimized ? (_jsxs(_Fragment, { children: [_jsx("div", { ref: ref, className: classes.renderingComponentContainer, style: {
41
- transform: scaleFactor !== 1 ? `scaleX(${scaleFactor})` : undefined,
42
- }, children: _jsx(Suspense, { fallback: _jsx(LoadingEllipses, {}), children: _jsx(RenderingComponent, { model: display, onHorizontalScroll: model.horizontalScroll }) }) }), DisplayBlurb ? (_jsx("div", { style: {
95
+ height: minimized ? MINIMIZED_TRACK_HEIGHT : height,
96
+ }, "data-testid": `trackRenderingContainer-${model.id}-${trackId}`, children: !minimized ? (_jsxs(_Fragment, { children: [_jsx(TrackDisplayRegion, { model: model, track: track, ref: setRef, className: classes.renderingComponentContainer, style: { left: showTrackOutlines ? -1 : 0 }, children: _jsx(Suspense, { fallback: _jsx(LoadingOverlay, { isVisible: true, immediate: true }), children: _jsx(RenderingComponent, { model: display, onHorizontalScroll: model.horizontalScroll }) }) }), DisplayBlurb ? (_jsx("div", { style: {
43
97
  position: 'absolute',
44
98
  left: 0,
45
99
  top: display.height - 20,
@@ -3,5 +3,5 @@ type LGV = LinearGenomeViewModel;
3
3
  declare const TracksContainer: ({ children, model, }: {
4
4
  children: React.ReactNode;
5
5
  model: LGV;
6
- }) => import("react/jsx-runtime").JSX.Element;
6
+ }) => import("react").JSX.Element;
7
7
  export default TracksContainer;
@@ -1,49 +1,82 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense, lazy, useRef } from 'react';
3
- import { Menu } from '@jbrowse/core/ui';
4
- import { getEnv } from '@jbrowse/core/util';
3
+ import { PluggableElements } from '@jbrowse/core/ui';
4
+ import { OverlayPointerProvider } from '@jbrowse/core/ui/highlightChipReveal';
5
+ import { useMouseTracking } from '@jbrowse/core/ui/useMouseTracking';
6
+ import { getEnv, getSession } from '@jbrowse/core/util';
5
7
  import { makeStyles } from '@jbrowse/core/util/tss-react';
8
+ import { useTheme } from '@mui/material';
6
9
  import { observer } from 'mobx-react';
7
- import Gridlines from "./Gridlines.js";
8
- import Rubberband from "./Rubberband.js";
9
- import Scalebar from "./Scalebar.js";
10
- import VerticalGuide from "./VerticalGuide.js";
11
- import { SCALE_BAR_HEIGHT } from "../consts.js";
12
- import { useRangeSelect } from "./useRangeSelect.js";
13
- import { useSideScroll } from "./useSideScroll.js";
14
- import { useWheelScroll } from "./useWheelScroll.js";
15
- const CenterLine = lazy(() => import("./CenterLine.js"));
16
- const Highlight = lazy(() => import("./Highlight.js"));
17
- const RubberbandSpan = lazy(() => import("./RubberbandSpan.js"));
10
+ import { SCALE_BAR_HEIGHT } from '../consts.js';
11
+ import Gridlines from './Gridlines.js';
12
+ import OverviewHighlightBand from './OverviewHighlightBand.js';
13
+ import PaddingBlocks from './PaddingBlocks.js';
14
+ import RangeSelectOverlay from './RangeSelectOverlay.js';
15
+ import Rubberband from './Rubberband.js';
16
+ import Scalebar from './Scalebar.js';
17
+ import VerticalGuide from './VerticalGuide.js';
18
+ import { useRangeSelect } from './useRangeSelect.js';
19
+ import { useSideScroll } from './useSideScroll.js';
20
+ import { getHighlightColor, highlightKey } from './util.js';
21
+ const CenterLine = lazy(() => import('./CenterLine.js'));
22
+ const Highlight = lazy(() => import('./Highlight.js'));
18
23
  const useStyles = makeStyles()({
19
24
  tracksContainer: {
20
25
  position: 'relative',
21
26
  contain: 'layout style',
22
27
  },
28
+ scalebarHighlights: {
29
+ position: 'absolute',
30
+ top: 0,
31
+ height: SCALE_BAR_HEIGHT,
32
+ width: '100%',
33
+ // above Rubberband div (825) so bands show over the scalebar,
34
+ // below RubberbandSpan (830) so the selection rect stays on top
35
+ zIndex: 826,
36
+ pointerEvents: 'none',
37
+ },
23
38
  });
24
39
  const TracksContainer = observer(function TracksContainer({ children, model, }) {
25
40
  const { classes } = useStyles();
26
41
  const { pluginManager } = getEnv(model);
27
- const { mouseDown: mouseDown1, mouseUp } = useSideScroll(model);
28
- const { stickyViewHeaders, rubberbandTop, showGridlines, showCenterLine, isScalebarRefNameMenuOpen, } = model;
42
+ const { mouseDown: sideScrollMouseDown, mouseUp } = useSideScroll(model);
43
+ const { showGridlines, showCenterLine } = model;
29
44
  const ref = useRef(null);
30
- const { guideX, rubberbandOn, leftBpOffset, rightBpOffset, numOfBpSelected, width, left, anchorPosition, open, isClick, clickBpOffset, handleMenuItemClick, handleClose, mouseMove, mouseDown: mouseDown2, } = useRangeSelect(ref, model, true);
31
- useWheelScroll(ref, model);
32
- const additional = pluginManager.evaluateExtensionPoint('LinearGenomeView-TracksContainerComponent', undefined, { model });
33
- return (_jsxs("div", { ref: ref, "data-testid": "tracksContainer", className: classes.tracksContainer, onMouseDown: event => {
34
- mouseDown1(event);
35
- mouseDown2(event);
36
- }, onMouseMove: mouseMove, onMouseUp: mouseUp, children: [showGridlines ? _jsx(Gridlines, { model: model }) : null, _jsx(Suspense, { fallback: null, children: showCenterLine ? _jsx(CenterLine, { model: model }) : null }), guideX !== undefined && !isScalebarRefNameMenuOpen ? (_jsx(VerticalGuide, { model: model, coordX: guideX })) : rubberbandOn ? (_jsx(Suspense, { fallback: null, children: _jsx(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, numOfBpSelected: numOfBpSelected, width: width, left: left, top: rubberbandTop, sticky: stickyViewHeaders }) })) : null, model.volatileGuides.map((guide, idx) => (_jsx(VerticalGuide, { model: model, coordX: guide.xPos }, idx))), anchorPosition ? (_jsx(Menu, { anchorReference: "anchorPosition", anchorPosition: {
37
- left: anchorPosition.clientX,
38
- top: anchorPosition.clientY,
39
- }, onMenuItemClick: handleMenuItemClick, open: open, onClose: handleClose, menuItems: isClick && clickBpOffset
40
- ? model.rubberbandClickMenuItems(clickBpOffset)
41
- : model.rubberBandMenuItems() })) : null, _jsx(Rubberband, { model: model, ControlComponent: _jsx(Scalebar, { model: model, style: {
42
- height: SCALE_BAR_HEIGHT,
43
- boxSizing: 'border-box',
44
- } }) }), _jsx(HighlightGroup, { model: model }), additional, children] }));
45
+ // shift-drag range select over the whole tracks area. This is intentionally
46
+ // a separate range-select instance from the one inside <Rubberband> (the
47
+ // scalebar control); don't dedupe them — they cover different regions.
48
+ const range = useRangeSelect(ref, model, true);
49
+ // published rather than held (see `useMouseTracking`): the highlight bands
50
+ // read it, and a position in state here would re-render the whole tracks area
51
+ // every frame the pointer moves over it
52
+ const { mouseTracker, handleMouseMove, handleMouseLeave } = useMouseTracking();
53
+ return (_jsx("div", { ref: ref, "data-testid": "tracksContainer", className: classes.tracksContainer, onMouseDown: event => {
54
+ sideScrollMouseDown(event);
55
+ range.mouseDown(event);
56
+ }, onMouseMove: event => {
57
+ handleMouseMove(event);
58
+ range.mouseMove(event);
59
+ }, onMouseLeave: () => {
60
+ handleMouseLeave();
61
+ range.mouseOut();
62
+ }, onMouseUp: mouseUp, children: _jsxs(OverlayPointerProvider, { value: mouseTracker, children: [showGridlines ? (_jsxs(_Fragment, { children: [_jsx(Gridlines, { model: model }), _jsx(PaddingBlocks, { model: model })] })) : null, _jsx(Suspense, { fallback: null, children: showCenterLine ? _jsx(CenterLine, { model: model }) : null }), _jsx(RangeSelectOverlay, { model: model, range: range }), model.volatileGuides.map((guide, idx) => (_jsx(VerticalGuide, { model: model, coordX: guide.xPos }, idx))), _jsx(Rubberband, { model: model, ControlComponent: _jsx(Scalebar, { model: model, style: {
63
+ height: SCALE_BAR_HEIGHT,
64
+ boxSizing: 'border-box',
65
+ } }) }), _jsx(ScalebarHighlightGroup, { model: model }), _jsx(HighlightGroup, { model: model }), _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-TracksContainerComponent", props: { model } }), children] }) }));
45
66
  });
46
67
  const HighlightGroup = observer(function HighlightGroup({ model, }) {
47
- return model.highlightsVisible && model.highlight.length ? (_jsx(Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => (_jsx(Highlight, { model: model, highlight: highlight }, `${JSON.stringify(highlight)}-${idx}`))) })) : null;
68
+ return getSession(model).highlightsVisible && model.highlight.length ? (_jsx(Suspense, { fallback: null, children: model.highlight.map((highlight, idx) => (_jsx(Highlight, { model: model, highlight: highlight }, highlightKey(highlight, idx)))) })) : null;
69
+ });
70
+ const ScalebarHighlightGroup = observer(function ScalebarHighlightGroup({ model, }) {
71
+ const theme = useTheme();
72
+ const { pluginManager } = getEnv(model);
73
+ const { classes } = useStyles();
74
+ const viewBands = getSession(model).highlightsVisible
75
+ ? model.highlight.map((h, idx) => {
76
+ const coords = model.getHighlightCoords(h);
77
+ return coords ? (_jsx(OverviewHighlightBand, { coords: coords, background: getHighlightColor(h, theme).toRgbString() }, highlightKey(h, idx))) : null;
78
+ })
79
+ : [];
80
+ return (_jsxs("div", { className: classes.scalebarHighlights, children: [viewBands, _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-ScalebarHighlightComponent", props: { model } })] }));
48
81
  });
49
82
  export default TracksContainer;
@@ -3,5 +3,5 @@ type LGV = LinearGenomeViewModel;
3
3
  declare const VerticalGuide: ({ model, coordX, }: {
4
4
  model: LGV;
5
5
  coordX: number;
6
- }) => import("react/jsx-runtime").JSX.Element;
6
+ }) => import("react").JSX.Element;
7
7
  export default VerticalGuide;
@@ -1,8 +1,9 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { stringify } from '@jbrowse/core/util';
3
3
  import { makeStyles } from '@jbrowse/core/util/tss-react';
4
- import { Tooltip } from '@mui/material';
5
4
  import { observer } from 'mobx-react';
5
+ import { GuideLabel } from '../../shared/coordLabels.js';
6
+ import { stickyChromeTops } from '../stickyChrome.js';
6
7
  const useStyles = makeStyles()({
7
8
  guide: {
8
9
  pointerEvents: 'none',
@@ -13,19 +14,11 @@ const useStyles = makeStyles()({
13
14
  background: 'red',
14
15
  zIndex: 1001,
15
16
  },
16
- tooltipTarget: {
17
- position: 'sticky',
18
- left: 0,
19
- width: 1,
20
- },
21
17
  });
22
18
  const VerticalGuide = observer(function VerticalGuide({ model, coordX, }) {
23
19
  const { classes } = useStyles();
24
- const { stickyViewHeaders, rubberbandTop } = model;
25
- return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { open: true, placement: "top", title: stringify(model.pxToBp(coordX)), arrow: true, children: _jsx("div", { className: classes.tooltipTarget, style: {
26
- transform: `translateX(${coordX + 6}px)`,
27
- top: rubberbandTop,
28
- position: stickyViewHeaders ? 'sticky' : undefined,
29
- } }) }), _jsx("div", { className: classes.guide, style: { transform: `translateX(${coordX}px)` } })] }));
20
+ const { width, stickyViewHeaders, headerHeight } = model;
21
+ const { scalebar } = stickyChromeTops({ stickyViewHeaders, headerHeight });
22
+ return (_jsxs(_Fragment, { children: [_jsx(GuideLabel, { coordX: coordX, viewWidth: width, stickyTop: scalebar, children: stringify(model.pxToBp(coordX)) }), _jsx("div", { className: classes.guide, style: { transform: `translateX(${coordX}px)` } })] }));
30
23
  });
31
24
  export default VerticalGuide;
@@ -0,0 +1,7 @@
1
+ import type { LinearGenomeViewModel } from '../index.ts';
2
+ declare const ZoomButton: ({ model, direction, small, }: {
3
+ model: LinearGenomeViewModel;
4
+ direction: 'in' | 'out';
5
+ small?: boolean;
6
+ }) => import("react").JSX.Element;
7
+ export default ZoomButton;
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ZoomIn from '@mui/icons-material/ZoomIn';
3
+ import ZoomOut from '@mui/icons-material/ZoomOut';
4
+ import { IconButton, Tooltip } from '@mui/material';
5
+ import { observer } from 'mobx-react';
6
+ // epsilon guards against the button flickering to disabled from float rounding
7
+ // exactly at the zoom limit
8
+ const EPSILON = 0.0001;
9
+ const ZoomButton = observer(function ZoomButton({ model, direction, small, }) {
10
+ // disabled tracks the debounced coarseBpPerPx (not live bpPerPx) so it doesn't
11
+ // flicker disabled during a zoom animation
12
+ const { maxBpPerPx, minBpPerPx, coarseBpPerPx } = model;
13
+ const out = direction === 'out';
14
+ const disabled = out
15
+ ? coarseBpPerPx >= maxBpPerPx - EPSILON
16
+ : coarseBpPerPx <= minBpPerPx + EPSILON;
17
+ const fontSize = small ? 'small' : undefined;
18
+ return (_jsx(Tooltip, { title: out ? 'Zoom out 2x' : 'Zoom in 2x', children: _jsx("span", { children: _jsx(IconButton
19
+ // on the button, not left to the Tooltip: its title lands on the
20
+ // <span> the disabled case needs, so the button itself reached the
21
+ // accessibility tree unnamed and nothing driving by name could aim at
22
+ // it
23
+ , { "aria-label": out ? 'Zoom out' : 'Zoom in', "data-testid": out ? 'zoom_out' : 'zoom_in', size: small ? 'small' : undefined, disabled: disabled, onClick: () => {
24
+ model.zoom(out ? model.bpPerPx * 2 : model.bpPerPx / 2);
25
+ }, children: out ? (_jsx(ZoomOut, { fontSize: fontSize })) : (_jsx(ZoomIn, { fontSize: fontSize })) }) }) }));
26
+ });
27
+ export default ZoomButton;
@@ -0,0 +1,9 @@
1
+ import type { LinearGenomeViewModel } from '../index.ts';
2
+ import type { ReactNode } from 'react';
3
+ type LGV = LinearGenomeViewModel;
4
+ declare const ZoomTransform: ({ model, offset, children, }: {
5
+ model: LGV;
6
+ offset?: number;
7
+ children: ReactNode;
8
+ }) => import("react").JSX.Element;
9
+ export default ZoomTransform;