@jbrowse/plugin-linear-genome-view 4.2.1 → 5.0.0-beta.1

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 +17 -12
  6. package/esm/LinearGenomeView/FloatingSvgOverlay.d.ts +5 -0
  7. package/esm/LinearGenomeView/FloatingSvgOverlay.js +25 -0
  8. package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
  9. package/esm/LinearGenomeView/afterAttach.js +257 -88
  10. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  11. package/esm/LinearGenomeView/components/CenterLine.js +16 -7
  12. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
  13. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
  14. package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
  15. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +144 -0
  16. package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
  17. package/esm/LinearGenomeView/components/Cytobands.js +76 -53
  18. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +7 -3
  19. package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -67
  20. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
  21. package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
  22. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
  23. package/esm/LinearGenomeView/components/Gridlines.js +29 -58
  24. package/esm/LinearGenomeView/components/Header.d.ts +1 -1
  25. package/esm/LinearGenomeView/components/Header.js +32 -16
  26. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
  27. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
  28. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
  29. package/esm/LinearGenomeView/components/HeaderPanControls.js +16 -7
  30. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
  31. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
  32. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
  33. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
  34. package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
  35. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
  36. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
  37. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
  38. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
  39. package/esm/LinearGenomeView/components/HeaderZoomControls.js +67 -51
  40. package/esm/LinearGenomeView/components/Highlight.d.ts +3 -7
  41. package/esm/LinearGenomeView/components/Highlight.js +30 -82
  42. package/esm/LinearGenomeView/components/HighlightBand.d.ts +9 -0
  43. package/esm/LinearGenomeView/components/HighlightBand.js +40 -0
  44. package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
  45. package/esm/LinearGenomeView/components/HighlightChip.js +15 -0
  46. package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
  47. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
  48. package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
  49. package/esm/LinearGenomeView/components/ImportForm.js +95 -61
  50. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeView.js +6 -5
  52. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
  54. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  55. package/esm/LinearGenomeView/components/MiniControls.js +13 -10
  56. package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
  57. package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
  58. package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
  59. package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
  60. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
  61. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
  62. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
  63. package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -42
  64. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
  65. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +26 -0
  66. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  67. package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
  68. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
  69. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
  70. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
  71. package/esm/LinearGenomeView/components/OverviewScalebar.js +84 -79
  72. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  73. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -32
  74. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
  75. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
  76. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
  77. package/esm/LinearGenomeView/components/PaddingBlocks.js +51 -0
  78. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  79. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
  80. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
  81. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
  82. package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
  83. package/esm/LinearGenomeView/components/Rubberband.js +13 -16
  84. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  85. package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
  86. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
  87. package/esm/LinearGenomeView/components/Scalebar.js +16 -21
  88. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  90. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  91. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +142 -126
  92. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  93. package/esm/LinearGenomeView/components/SearchBox.js +58 -66
  94. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  95. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  96. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
  97. package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
  98. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
  99. package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  102. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  103. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  104. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  105. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  106. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +1 -1
  107. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  108. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  109. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  110. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  111. package/esm/LinearGenomeView/components/TrackContainer.js +83 -39
  112. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  113. package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
  114. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  115. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  116. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  117. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  118. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  119. package/esm/LinearGenomeView/components/TrackLabelMenu.js +32 -85
  120. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  121. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  122. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
  123. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
  124. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
  126. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
  127. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
  128. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  129. package/esm/LinearGenomeView/components/ZoomButton.js +22 -0
  130. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  131. package/esm/LinearGenomeView/components/ZoomTransform.js +33 -0
  132. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  133. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  134. package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -8
  135. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  136. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  137. package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -0
  138. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  139. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  140. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  141. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  142. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +11 -66
  143. package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
  144. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  145. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  146. package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
  147. package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
  148. package/esm/LinearGenomeView/components/util.d.ts +20 -6
  149. package/esm/LinearGenomeView/components/util.js +27 -6
  150. package/esm/LinearGenomeView/consts.d.ts +7 -2
  151. package/esm/LinearGenomeView/consts.js +18 -2
  152. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  153. package/esm/LinearGenomeView/flyTo.js +135 -0
  154. package/esm/LinearGenomeView/headerFit.d.ts +27 -0
  155. package/esm/LinearGenomeView/headerFit.js +59 -0
  156. package/esm/LinearGenomeView/index.d.ts +32 -2
  157. package/esm/LinearGenomeView/index.js +8 -4
  158. package/esm/LinearGenomeView/initKeys.d.ts +13 -0
  159. package/esm/LinearGenomeView/initKeys.js +104 -0
  160. package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
  161. package/esm/LinearGenomeView/keyboardHandler.js +10 -0
  162. package/esm/LinearGenomeView/lazyDialogs.d.ts +6 -10
  163. package/esm/LinearGenomeView/lazyDialogs.js +3 -3
  164. package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
  165. package/esm/LinearGenomeView/linkedViewSync.js +52 -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 +1544 -136
  169. package/esm/LinearGenomeView/model.js +2352 -488
  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 -29
  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 +1263 -0
  222. package/esm/displayKitTests/perRegionTestEnv.js +141 -0
  223. package/esm/index.d.ts +112 -1237
  224. package/esm/index.js +102 -24
  225. package/esm/lazyPluginExports.d.ts +23 -0
  226. package/esm/lazyPluginExports.js +36 -0
  227. package/esm/searchUtils.d.ts +52 -11
  228. package/esm/searchUtils.js +318 -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 -8
  336. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -17
  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 -89
  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,58 +1,102 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRef } from 'react';
3
- import { ErrorMessage, ResizeHandle } from '@jbrowse/core/ui';
2
+ import { ErrorBanner, ResizeHandle } from '@jbrowse/core/ui';
4
3
  import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
5
4
  import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
6
- import { isAlive } from '@jbrowse/mobx-state-tree';
5
+ import { TrackOverlaySlot } from '@jbrowse/display-ui';
7
6
  import { Paper } from '@mui/material';
8
7
  import { observer } from 'mobx-react';
9
- import Gridlines from "./Gridlines.js";
10
- import TrackLabelContainer from "./TrackLabelContainer.js";
11
- import TrackRenderingContainer from "./TrackRenderingContainer.js";
12
- import { shouldSwapTracks } from "./util.js";
13
- const useStyles = makeStyles()(theme => ({
8
+ import { RESIZE_HANDLE_HEIGHT, TRACK_OUTLINE_BORDER, TRACK_TOP_GAP, } from '../consts.js';
9
+ import Gridlines from './Gridlines.js';
10
+ import PaddingBlocks from './PaddingBlocks.js';
11
+ import TrackLabel from './TrackLabel.js';
12
+ import TrackRenderingContainer from './TrackRenderingContainer.js';
13
+ const useStyles = makeStyles()({
14
+ // No `overflow`: paint containment already clips to the padding box, and an
15
+ // overflow would only add a scroll container — the spurious second scrollbar
16
+ // described in TrackRenderingContainer. flow-root keeps the block formatting
17
+ // context that `overflow: hidden` used to establish as a side effect (neither
18
+ // `clip` nor no overflow does), so child margins still can't collapse through
19
+ // and shift the track — which the breakpoint split view would pick up, since
20
+ // its connector overlay measures trackRefs' getBoundingClientRect().top.
14
21
  root: {
15
- marginTop: 2,
16
- overflow: 'hidden',
22
+ marginTop: TRACK_TOP_GAP,
17
23
  position: 'relative',
24
+ display: 'flow-root',
18
25
  contain: 'layout style paint',
19
26
  },
20
27
  unpinnedTrack: {
21
28
  background: 'none',
22
29
  },
30
+ // in flow at the bottom of the Paper, and outside `trackContent` — so a
31
+ // `bottom:0` portaled overlay (the status chips) lands on the track content's
32
+ // bottom edge rather than having to subtract this height back out. The height
33
+ // arrives inline from RESIZE_HANDLE_HEIGHT, which the model's offset
34
+ // arithmetic reads too.
35
+ //
36
+ // No `bar`: a divider drawn at rest under every track read as a band of its
37
+ // own down the whole view. It keeps its RESIZE_HANDLE_HEIGHT of space in flow
38
+ // and reveals itself under the pointer at `action.disabled`, the weight a
39
+ // `bar` rests at.
23
40
  resizeHandle: {
24
- height: 4,
25
- boxSizing: 'border-box',
26
41
  position: 'relative',
27
- background: 'transparent',
28
- '&:hover': {
29
- background: theme.palette.divider,
30
- },
31
42
  },
32
- }));
43
+ // in-flow, so the label pushes the track body down by its own height. The
44
+ // margin is that push plus a gap: without it the body starts on the label's
45
+ // border-box edge, and the Paper's drop shadow (which reaches ~4px past it)
46
+ // lands on the first rows of features. Vertical margins count on an atomic
47
+ // inline-level box, so this grows the line box rather than collapsing away.
48
+ //
49
+ // 8, not 4. At 4 the whole margin went to clearing the shadow and nothing
50
+ // was left over as a gap: measured on desktop-ispcr-results, where the PCR
51
+ // product is a feature on the display's FIRST row, the chip's bottom border
52
+ // and the feature's top border came out ~2px apart and read as one line
53
+ // (reviewer: "the tracklabels:offset is just a little bit overlapping the
54
+ // tracklabel still"). Most tracks hide this because their display adds its
55
+ // own top padding before the first row. 8 keeps the ~4 the shadow needs and
56
+ // spends the other 4 on clearance.
57
+ trackLabelOffset: {
58
+ position: 'relative',
59
+ display: 'inline-block',
60
+ marginBottom: 8,
61
+ },
62
+ trackLabelOverlap: {
63
+ position: 'absolute',
64
+ },
65
+ });
33
66
  const TrackContainer = observer(function TrackContainer({ model, track, }) {
34
67
  const { classes } = useStyles();
35
- const display = track.displays[0];
36
- const { draggingTrackId, showTrackOutlines } = model;
37
- const ref = useRef(null);
38
- return (_jsxs(Paper, { ref: ref, className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onClick: event => {
39
- if (event.detail === 2 && !display.featureIdUnderMouse) {
40
- const left = ref.current?.getBoundingClientRect().left || 0;
41
- model.zoomTo(model.bpPerPx / 2, event.clientX - left, true);
42
- }
43
- }, onDragOver: event => {
44
- if (isAlive(display) &&
45
- draggingTrackId !== undefined &&
46
- draggingTrackId !== display.id) {
47
- const draggingIdx = model.tracks.findIndex(t => t.id === draggingTrackId);
48
- const targetIdx = model.tracks.findIndex(t => t.id === track.id);
49
- const movingDown = targetIdx > draggingIdx;
50
- const currentY = event.clientY;
51
- if (shouldSwapTracks(model.lastTrackDragY, currentY, movingDown)) {
52
- model.setLastTrackDragY(currentY);
53
- model.moveTrack(draggingTrackId, track.id);
54
- }
55
- }
56
- }, children: [track.pinned ? _jsx(Gridlines, { model: model, offset: 1 }) : null, _jsx(TrackLabelContainer, { track: track, view: model }), _jsx(ErrorBoundary, { FallbackComponent: e => _jsx(ErrorMessage, { error: e.error }), children: _jsx(TrackRenderingContainer, { model: model, track: track }) }), _jsx(ResizeHandle, { onDrag: display.resizeHeight, className: classes.resizeHandle })] }));
68
+ // an LGV track always holds at least one linear display (activeDisplay =
69
+ // displays[0]); narrow to the linear shape for prefersOffset/resizeHeight
70
+ const display = track.activeDisplay;
71
+ const { showTrackOutlines } = model;
72
+ // The Paper's 1px border, present iff outlines are on. Everything laid out in
73
+ // the *display's* coordinates has to cancel it — the rendering container
74
+ // shifts left by it (see renderingComponentContainer), so the overlay node and
75
+ // the masks over it have to move by the same amount or they land a pixel off
76
+ // the data. One binding rather than three copies of the ternary, because the
77
+ // three agreeing is the whole point.
78
+ const outlineOffset = showTrackOutlines ? TRACK_OUTLINE_BORDER : 0;
79
+ const trackLabelStyle = model.effectiveTrackLabels !== 'overlapping' || display.prefersOffset
80
+ ? classes.trackLabelOffset
81
+ : classes.trackLabelOverlap;
82
+ return (_jsxs(Paper, { className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onDragOver: event => {
83
+ model.onTrackDragOver(track.id, event.clientY);
84
+ }, children: [track.pinned ? _jsx(Gridlines, { model: model, offset: outlineOffset }) : null, model.effectiveTrackLabels !== 'hidden' ? (_jsx(TrackLabel, { track: track, className: trackLabelStyle })) : null, _jsx(TrackOverlaySlot, { zIndex: 100, overlayStyle: { left: -outlineOffset }, children: _jsx(ErrorBoundary, { resetKeys: [display.id], FallbackComponent: e => (_jsx(ErrorBanner, { error: e.error, onReset: e.resetErrorBoundary })), children: _jsx(TrackRenderingContainer, { model: model, track: track }) }) }), _jsx(PaddingBlocks, { model: model, offset: outlineOffset }), _jsx(ResizeHandle, { style: { height: RESIZE_HANDLE_HEIGHT }, onDrag: distance => display.resizeHeight(distance),
85
+ // the drag's shortcut: grow the track by whatever it is scrolled over,
86
+ // so a pileup showing three rows of forty opens to all forty
87
+ // Optional: only a display that scrolls its own content has anything
88
+ // hidden to expand to.
89
+ onDoubleClick: () => {
90
+ display.expandToContentHeight?.();
91
+ },
92
+ // Bracket the drag so a display can sit an expensive per-frame layer
93
+ // out of it (see `resizing` on TrackHeightMixin). Causal rather than a
94
+ // per-display debounce: the handle owns both ends of the gesture. On
95
+ // the track, so this holds whatever the active display is.
96
+ onDragStart: () => {
97
+ track.setResizing(true);
98
+ }, onDragEnd: () => {
99
+ track.setResizing(false);
100
+ }, className: classes.resizeHandle })] }));
57
101
  });
58
102
  export default TrackContainer;
@@ -1,7 +1,6 @@
1
1
  import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
- interface Props {
2
+ declare const TrackLabel: ({ track, className, }: {
3
3
  track: BaseTrackModel;
4
4
  className?: string;
5
- }
6
- declare const TrackLabel: ({ track, className }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ }) => import("react").JSX.Element;
7
6
  export default TrackLabel;
@@ -1,42 +1,29 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { SanitizedHTML } from '@jbrowse/core/ui';
3
- import { getContainingView, getSession } from '@jbrowse/core/util';
3
+ import { getSession } from '@jbrowse/core/util';
4
4
  import { getTrackName } from '@jbrowse/core/util/tracks';
5
5
  import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
6
- import CloseIcon from '@mui/icons-material/Close';
7
- import { IconButton, Paper, Typography, alpha } from '@mui/material';
6
+ import { Paper, Typography } from '@mui/material';
8
7
  import { observer } from 'mobx-react';
9
- import TrackLabelDragHandle from "./TrackLabelDragHandle.js";
10
- import TrackLabelMenu from "./TrackLabelMenu.js";
8
+ import { TrackLabelCloseButton, TrackLabelMinimizeButton, } from './TrackLabelButtons.js';
9
+ import TrackLabelDragHandle from './TrackLabelDragHandle.js';
10
+ import TrackLabelMenu from './TrackLabelMenu.js';
11
+ import TrackLabelRefNameWarning from './TrackLabelRefNameWarning.js';
11
12
  const useStyles = makeStyles()(theme => ({
12
13
  root: {
14
+ // above breakpoint split view
13
15
  zIndex: 200,
14
- background: alpha(theme.palette.background.paper, 0.8),
15
- '&:hover': {
16
- background: theme.palette.background.paper,
17
- },
16
+ background: theme.palette.background.paper,
18
17
  },
19
18
  trackName: {
20
19
  margin: '0 auto',
21
20
  width: '90%',
22
- fontSize: '0.8rem',
23
21
  pointerEvents: 'none',
24
22
  },
25
- iconButton: {
26
- padding: theme.spacing(1),
27
- },
28
23
  }));
29
- const TrackLabel = observer(function TrackLabel({ track, className }) {
24
+ const TrackLabel = observer(function TrackLabel({ track, className, }) {
30
25
  const { classes } = useStyles();
31
- const view = getContainingView(track);
32
- const session = getSession(track);
33
- const { minimized } = track;
34
- const trackId = track.trackId;
35
- const trackName = getTrackName(track.configuration, session);
36
- return (_jsxs(Paper, { className: cx(className, classes.root), onClick: event => {
37
- event.stopPropagation();
38
- }, children: [_jsx(TrackLabelDragHandle, { track: track, trackId: trackId, view: view }), _jsx(IconButton, { onClick: () => view.hideTrack(trackId), className: classes.iconButton, title: "close this track", children: _jsx(CloseIcon, { fontSize: "small" }) }), _jsx(Typography, { variant: "body1", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: [trackName, minimized ? '(minimized)' : '']
39
- .filter(f => !!f)
40
- .join(' ') }) }), _jsx(TrackLabelMenu, { track: track })] }));
26
+ const trackName = getTrackName(track.configuration, getSession(track));
27
+ return (_jsxs(Paper, { className: cx(className, classes.root), children: [_jsx(TrackLabelDragHandle, { track: track }), _jsx(TrackLabelCloseButton, { track: track }), _jsx(TrackLabelMinimizeButton, { track: track }), _jsx(Typography, { variant: "body2", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: trackName }) }), _jsx(TrackLabelRefNameWarning, { track: track }), _jsx(TrackLabelMenu, { track: track })] }));
41
28
  });
42
29
  export default TrackLabel;
@@ -0,0 +1,7 @@
1
+ import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
+ export declare const TrackLabelCloseButton: ({ track, }: {
3
+ track: BaseTrackModel;
4
+ }) => import("react").JSX.Element;
5
+ export declare const TrackLabelMinimizeButton: ({ track }: {
6
+ track: BaseTrackModel;
7
+ }) => import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getContainingView } from '@jbrowse/core/util';
3
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
4
+ import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
5
+ import ArrowRightIcon from '@mui/icons-material/ArrowRight';
6
+ import CloseIcon from '@mui/icons-material/Close';
7
+ import { IconButton } from '@mui/material';
8
+ import { observer } from 'mobx-react';
9
+ const useStyles = makeStyles()({
10
+ iconButton: {
11
+ padding: 0,
12
+ },
13
+ });
14
+ // Keyed by trackId, not by the track's display name or by the model id: the
15
+ // name is config the user can change and the model id is minted per session, so
16
+ // neither survives being written into a test or a screenshot spec. The only
17
+ // other handle these buttons offered was `title`, which is shared by every
18
+ // track's copy of the button — so reaching ONE of them meant walking up to the
19
+ // Paper the label and the rendering container share and matching that
20
+ // container's testid through `:has()`. That worked and nobody should have to
21
+ // write it.
22
+ export const TrackLabelCloseButton = observer(function TrackLabelCloseButton({ track, }) {
23
+ const { classes } = useStyles();
24
+ const view = getContainingView(track);
25
+ return (_jsx(IconButton, { onClick: () => view.hideTrack(track.trackId), className: classes.iconButton, title: "close this track", "data-testid": `track-close-${track.trackId}`, children: _jsx(CloseIcon, { fontSize: "small" }) }));
26
+ });
27
+ export const TrackLabelMinimizeButton = observer(function TrackLabelMinimizeButton({ track }) {
28
+ const { classes } = useStyles();
29
+ const { minimized } = track;
30
+ return (_jsx(IconButton, { onClick: () => {
31
+ track.setMinimized(!minimized);
32
+ }, className: classes.iconButton, title: minimized ? 'restore track' : 'minimize track', "data-testid": `track-minimize-${track.trackId}`, children: minimized ? _jsx(ArrowRightIcon, {}) : _jsx(ArrowDropDownIcon, {}) }));
33
+ });
@@ -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,