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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +202 -71
  2. package/esm/FeatureTrack/configSchema.js +47 -1
  3. package/esm/FeatureTrack/index.js +1 -1
  4. package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
  5. package/esm/LaunchLinearGenomeView/index.js +6 -12
  6. package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
  7. package/esm/LinearGenomeView/afterAttach.js +265 -120
  8. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  9. package/esm/LinearGenomeView/components/CenterLine.js +20 -9
  10. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
  11. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
  12. package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
  13. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +142 -0
  14. package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
  15. package/esm/LinearGenomeView/components/Cytobands.js +76 -53
  16. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +8 -3
  17. package/esm/LinearGenomeView/components/ExportSvgDialog.js +15 -67
  18. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
  19. package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
  20. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
  21. package/esm/LinearGenomeView/components/Gridlines.js +29 -58
  22. package/esm/LinearGenomeView/components/Header.d.ts +1 -1
  23. package/esm/LinearGenomeView/components/Header.js +42 -16
  24. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
  25. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
  26. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
  27. package/esm/LinearGenomeView/components/HeaderPanControls.js +18 -8
  28. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
  29. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
  30. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
  31. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
  32. package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
  33. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
  34. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
  35. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
  36. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
  37. package/esm/LinearGenomeView/components/HeaderZoomControls.js +38 -52
  38. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  39. package/esm/LinearGenomeView/components/Highlight.js +21 -25
  40. package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
  41. package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
  42. package/esm/LinearGenomeView/components/HighlightChip.d.ts +8 -0
  43. package/esm/LinearGenomeView/components/HighlightChip.js +13 -0
  44. package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
  45. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
  46. package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
  47. package/esm/LinearGenomeView/components/ImportForm.js +95 -61
  48. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
  49. package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -6
  50. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +88 -30
  52. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/MiniControls.js +14 -10
  54. package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
  55. package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
  56. package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
  57. package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
  58. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
  59. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
  60. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
  61. package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
  62. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
  63. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +25 -0
  64. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  65. package/esm/LinearGenomeView/components/OverviewRubberband.js +29 -67
  66. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
  67. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
  68. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
  69. package/esm/LinearGenomeView/components/OverviewScalebar.js +87 -83
  70. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  71. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +57 -32
  72. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
  73. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
  74. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
  75. package/esm/LinearGenomeView/components/PaddingBlocks.js +56 -0
  76. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  77. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +19 -0
  78. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
  79. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
  80. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
  81. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
  82. package/esm/LinearGenomeView/components/Rubberband.d.ts +2 -3
  83. package/esm/LinearGenomeView/components/Rubberband.js +15 -17
  84. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  85. package/esm/LinearGenomeView/components/SVGHighlightBand.js +8 -0
  86. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
  87. package/esm/LinearGenomeView/components/Scalebar.js +20 -22
  88. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  90. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  91. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +157 -126
  92. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  93. package/esm/LinearGenomeView/components/SearchBox.js +61 -68
  94. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  95. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  96. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +5 -4
  97. package/esm/LinearGenomeView/components/SearchResultsDialog.js +6 -8
  98. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +5 -3
  99. package/esm/LinearGenomeView/components/SearchResultsTable.js +31 -56
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  102. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  103. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  104. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  105. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  106. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +3 -5
  107. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  108. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  109. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  110. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  111. package/esm/LinearGenomeView/components/TrackContainer.js +136 -38
  112. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  113. package/esm/LinearGenomeView/components/TrackLabel.js +20 -26
  114. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  115. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  116. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  117. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  118. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  119. package/esm/LinearGenomeView/components/TrackLabelMenu.js +35 -87
  120. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  121. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  122. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +5 -2
  123. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +66 -24
  124. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/TracksContainer.js +53 -32
  126. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -3
  127. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -26
  128. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  129. package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
  130. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  131. package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
  132. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  133. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  134. package/esm/LinearGenomeView/components/fetchSequence.d.ts +6 -8
  135. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  136. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  137. package/esm/LinearGenomeView/components/recentLocationsMenu.js +46 -0
  138. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  139. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  140. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  141. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  142. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +9 -67
  143. package/esm/LinearGenomeView/components/useRangeSelect.js +54 -102
  144. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  145. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  146. package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -3
  147. package/esm/LinearGenomeView/components/useSideScroll.js +163 -45
  148. package/esm/LinearGenomeView/components/util.d.ts +24 -6
  149. package/esm/LinearGenomeView/components/util.js +28 -5
  150. package/esm/LinearGenomeView/consts.d.ts +9 -2
  151. package/esm/LinearGenomeView/consts.js +20 -2
  152. package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
  153. package/esm/LinearGenomeView/containingLgv.js +23 -0
  154. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  155. package/esm/LinearGenomeView/flyTo.js +135 -0
  156. package/esm/LinearGenomeView/headerFit.d.ts +29 -0
  157. package/esm/LinearGenomeView/headerFit.js +72 -0
  158. package/esm/LinearGenomeView/index.d.ts +28 -3
  159. package/esm/LinearGenomeView/index.js +13 -7
  160. package/esm/LinearGenomeView/keyboardHandler.d.ts +9 -0
  161. package/esm/LinearGenomeView/keyboardHandler.js +25 -1
  162. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  163. package/esm/LinearGenomeView/launchKeys.js +27 -0
  164. package/esm/LinearGenomeView/lazyDialogs.d.ts +8 -14
  165. package/esm/LinearGenomeView/lazyDialogs.js +4 -3
  166. package/esm/LinearGenomeView/linkedViewSync.d.ts +12 -0
  167. package/esm/LinearGenomeView/linkedViewSync.js +36 -0
  168. package/esm/LinearGenomeView/menuItems.d.ts +25 -2
  169. package/esm/LinearGenomeView/menuItems.js +306 -179
  170. package/esm/LinearGenomeView/model.d.ts +3363 -164
  171. package/esm/LinearGenomeView/model.js +2548 -565
  172. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
  173. package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
  174. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
  175. package/esm/LinearGenomeView/showRegionsWithUndo.js +50 -0
  176. package/esm/LinearGenomeView/stickyChrome.d.ts +15 -0
  177. package/esm/LinearGenomeView/stickyChrome.js +26 -0
  178. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
  179. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +17 -18
  180. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +5 -3
  181. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +34 -35
  182. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
  183. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
  184. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
  185. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
  186. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
  187. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +73 -41
  188. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
  189. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +20 -3
  190. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
  191. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +36 -0
  192. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
  193. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +66 -39
  194. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
  195. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +9 -7
  196. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
  197. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
  198. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
  199. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +54 -9
  200. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +9 -15
  201. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +17 -21
  202. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
  203. package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
  204. package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
  205. package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
  206. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
  207. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
  208. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
  209. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +245 -0
  210. package/esm/LinearGenomeView/svgcomponents/util.d.ts +96 -5
  211. package/esm/LinearGenomeView/svgcomponents/util.js +242 -4
  212. package/esm/LinearGenomeView/types.d.ts +20 -37
  213. package/esm/LinearGenomeView/types.js +1 -0
  214. package/esm/LinearGenomeView/util.d.ts +347 -12
  215. package/esm/LinearGenomeView/util.js +577 -62
  216. package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
  217. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +40 -0
  218. package/esm/MultiLevelRubberband/index.d.ts +4 -0
  219. package/esm/MultiLevelRubberband/index.js +3 -0
  220. package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
  221. package/esm/MultiLevelRubberband/menuItems.js +52 -0
  222. package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
  223. package/esm/MultiLevelRubberband/rowLabel.js +27 -0
  224. package/esm/MultiLevelRubberband/types.d.ts +7 -0
  225. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +25 -0
  226. package/esm/MultiLevelRubberband/useRangeSelect.js +120 -0
  227. package/esm/displayKitTests/perRegionTestEnv.d.ts +1391 -0
  228. package/esm/displayKitTests/perRegionTestEnv.js +142 -0
  229. package/esm/index.d.ts +50 -1245
  230. package/esm/index.js +88 -33
  231. package/esm/searchUtils.d.ts +62 -12
  232. package/esm/searchUtils.js +335 -48
  233. package/esm/shared/RubberbandSpan.d.ts +15 -0
  234. package/esm/shared/RubberbandSpan.js +34 -0
  235. package/esm/shared/coordLabels.d.ts +47 -0
  236. package/esm/shared/coordLabels.js +133 -0
  237. package/esm/shared/useWindowDrag.d.ts +18 -0
  238. package/esm/shared/useWindowDrag.js +45 -0
  239. package/package.json +18 -19
  240. package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
  241. package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
  242. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
  243. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
  244. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  245. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
  246. package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
  247. package/esm/BaseLinearDisplay/components/Block.js +0 -45
  248. package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  249. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
  250. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  251. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
  252. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
  253. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
  254. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
  255. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
  256. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
  257. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
  258. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
  259. package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
  260. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
  261. package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
  262. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  263. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
  264. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
  265. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
  266. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
  267. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
  268. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
  269. package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
  270. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
  271. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
  272. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
  273. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
  274. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
  275. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
  276. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  277. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
  278. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
  279. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
  280. package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
  281. package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
  282. package/esm/BaseLinearDisplay/components/util.js +0 -107
  283. package/esm/BaseLinearDisplay/index.d.ts +0 -17
  284. package/esm/BaseLinearDisplay/index.js +0 -13
  285. package/esm/BaseLinearDisplay/model.d.ts +0 -1197
  286. package/esm/BaseLinearDisplay/model.js +0 -432
  287. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  288. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
  289. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
  290. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
  291. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
  292. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
  293. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  294. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
  295. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  296. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
  297. package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  298. package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
  299. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
  300. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
  301. package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
  302. package/esm/BaseLinearDisplay/models/util.js +0 -43
  303. package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
  304. package/esm/BaseLinearDisplay/renderSvg.js +0 -63
  305. package/esm/BaseLinearDisplay/types.d.ts +0 -43
  306. package/esm/BaseLinearDisplay/types.js +0 -3
  307. package/esm/BaseLinearDisplay/util.d.ts +0 -16
  308. package/esm/BaseLinearDisplay/util.js +0 -71
  309. package/esm/BasicTrack/configSchema.d.ts +0 -85
  310. package/esm/BasicTrack/configSchema.js +0 -8
  311. package/esm/BasicTrack/index.d.ts +0 -2
  312. package/esm/BasicTrack/index.js +0 -12
  313. package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
  314. package/esm/LinearBareDisplay/configSchema.js +0 -11
  315. package/esm/LinearBareDisplay/index.d.ts +0 -4
  316. package/esm/LinearBareDisplay/index.js +0 -20
  317. package/esm/LinearBareDisplay/model.d.ts +0 -1196
  318. package/esm/LinearBareDisplay/model.js +0 -32
  319. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
  320. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
  321. package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
  322. package/esm/LinearBasicDisplay/configSchema.js +0 -11
  323. package/esm/LinearBasicDisplay/index.d.ts +0 -4
  324. package/esm/LinearBasicDisplay/index.js +0 -20
  325. package/esm/LinearBasicDisplay/model.d.ts +0 -1391
  326. package/esm/LinearBasicDisplay/model.js +0 -158
  327. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
  328. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
  329. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  330. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
  331. package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
  332. package/esm/LinearFeatureDisplay/configSchema.js +0 -11
  333. package/esm/LinearFeatureDisplay/index.d.ts +0 -3
  334. package/esm/LinearFeatureDisplay/index.js +0 -2
  335. package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
  336. package/esm/LinearFeatureDisplay/model.js +0 -305
  337. package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
  338. package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
  339. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  340. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
  341. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
  342. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
  343. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  344. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
  345. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  346. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
  347. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  348. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
  349. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  350. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
  351. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  352. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
  353. package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  354. package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
  355. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  356. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
  357. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  358. package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
  359. package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
  360. package/esm/LinearGenomeView/svgExportUtil.js +0 -6
  361. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  362. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
  363. /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
3
+ import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
4
+ import ArrowRightIcon from '@mui/icons-material/ArrowRight';
5
+ import CloseIcon from '@mui/icons-material/Close';
6
+ import { IconButton } from '@mui/material';
7
+ import { observer } from 'mobx-react';
8
+ import { containingLgv } from '../../LinearGenomeView/containingLgv.js';
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 = containingLgv(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
2
  import { makeStyles } from '@jbrowse/core/util/tss-react';
3
3
  import DragIcon from '@mui/icons-material/DragIndicator';
4
+ import { observer } from 'mobx-react';
5
+ import { containingLgv } from '../../LinearGenomeView/containingLgv.js';
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 = containingLgv(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,48 @@
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
- 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';
3
+ import { getSession } from '@jbrowse/core/util';
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 { containingLgv } from '../../LinearGenomeView/containingLgv.js';
9
+ import { getTrackOrderSubMenu } from './trackLabelMenuItems.js';
10
+ // IconButton's default 5px padding made this the tallest thing in the label
11
+ // (27px), so it, not the text or the other controls, set the label height and
12
+ // hence the offset the track body gets. 3px trims the label to 23px while
13
+ // keeping a hit area past the 17px icon; 2px reads as too compact.
14
+ const useStyles = makeStyles()({
15
+ menuButton: {
16
+ padding: 3,
17
+ },
18
+ });
15
19
  const TrackLabelMenu = observer(function TrackLabelMenu({ track, }) {
16
- const view = getContainingView(track);
20
+ const { classes } = useStyles();
21
+ const view = containingLgv(track);
17
22
  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] : []) || [];
23
+ function getMenuItems() {
24
+ const orderSubMenu = getTrackOrderSubMenu({ view, track });
25
+ const sessionItems = session.getTrackActionMenuItems?.({
26
+ config: track.configuration,
27
+ view,
28
+ }) ?? [];
27
29
  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
- ]),
30
+ ...(orderSubMenu.length
31
+ ? [
45
32
  {
46
- label: minimized ? 'Restore track' : 'Minimize track',
47
- icon: minimized ? AddIcon : MinimizeIcon,
48
- onClick: () => {
49
- track.setMinimized(!minimized);
50
- },
33
+ label: 'Track order',
34
+ icon: LowPriorityIcon,
35
+ type: 'subMenu',
36
+ priority: 1000,
37
+ subMenu: orderSubMenu,
51
38
  },
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
- },
39
+ ]
40
+ : []),
94
41
  ...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" }) }));
42
+ track.saveTrackDataMenuItem,
43
+ ...track.trackMenuItems(),
44
+ ].sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
45
+ }
46
+ 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
47
  });
100
48
  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;
@@ -1,8 +1,11 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
2
  import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
3
+ import type { LinearDisplayModel } from '@jbrowse/display-kit/types';
3
4
  type LGV = LinearGenomeViewModel;
4
- declare const TrackRenderingContainer: ({ model, track, }: {
5
+ declare const TrackRenderingContainer: ({ model, track, display, ref, }: {
5
6
  model: LGV;
6
7
  track: BaseTrackModel;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
+ display: LinearDisplayModel;
9
+ ref?: React.Ref<HTMLDivElement>;
10
+ }) => import("react").JSX.Element;
8
11
  export default TrackRenderingContainer;
@@ -1,45 +1,87 @@
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 } from 'react';
3
+ import { LoadingOverlay } from '@jbrowse/core/ui';
4
+ import { coarseStripHTML, getSession } from '@jbrowse/core/util';
5
+ import { getTrackName } from '@jbrowse/core/util/tracks';
4
6
  import { makeStyles } from '@jbrowse/core/util/tss-react';
7
+ import { TrackOverlayPortal } from '@jbrowse/display-ui';
5
8
  import { observer } from 'mobx-react';
9
+ import { TRACK_OUTLINE_BORDER } from '../consts.js';
6
10
  const useStyles = makeStyles()({
11
+ // aligns with block boundaries. check for example the breakpoint split view
12
+ // demo to see if features align if wanting to change things. the -1 left
13
+ // offset (cancels the Paper's 1px border) is applied inline since it's
14
+ // conditional on showTrackOutlines, the same condition the border is gated on
7
15
  renderingComponentContainer: {
8
16
  position: 'absolute',
9
- left: -1,
10
17
  height: '100%',
11
18
  width: '100%',
12
19
  },
20
+ // Tracks never scroll natively on this outer container — every display owns
21
+ // its own vertical scroll: canvas displays scroll an inner sticky-canvas
22
+ // container (FeatureComponent), while alignments and variants draw a custom
23
+ // VerticalScrollbar overlay and redraw the canvas at `scrollTop`. A native
24
+ // scroll port here only produced a *second*, spurious scrollbar whenever a
25
+ // display's absolutely-positioned overlays extended a pixel past `height`
26
+ // (the reported double/flickering/full-height scrollbars). So there is
27
+ // deliberately no `overflow` here: `contain: strict` includes paint
28
+ // containment, which clips to the padding box on its own, and adding an
29
+ // `overflow` would reintroduce the scroll container — one the browser can
30
+ // still scroll silently (focus, scrollIntoView, scroll anchoring) even with
31
+ // no scrollbar shown, desyncing track content from the scalebar.
32
+ //
33
+ // `contain: strict` is also what makes every piece of display chrome reach the
34
+ // track's overlay layer through `TrackOverlayPortal` — containment creates a
35
+ // stacking context, so nothing in here can paint above `PaddingBlocks`, which
36
+ // is a later sibling. That looks like a tax worth removing (swap for a bare
37
+ // `overflow: clip`, which clips without a scroll container AND without a
38
+ // stacking context, and the portals become plain z-indexes). It was measured:
39
+ // `browser-tests/probe-containment.ts`. Under DOM load that swap costs 2.6x
40
+ // paint time on a track height change and 4.0x on a pan, at identical paint
41
+ // counts. The stacking context IS the paint isolation — the two can't be
42
+ // separated, so the portal is the price of the isolation, not a workaround
43
+ // for it. Layout containment measured free; the paint half is the load-bearing
44
+ // one. ADR-058.
13
45
  trackRenderingContainer: {
14
- overflowY: 'auto',
15
- overflowX: 'hidden',
16
46
  whiteSpace: 'nowrap',
17
47
  position: 'relative',
18
48
  background: 'none',
19
49
  contain: 'strict',
20
50
  },
21
51
  });
22
- const TrackRenderingContainer = observer(function TrackRenderingContainer({ model, track, }) {
52
+ // The box every LGV display is mounted in, and the ONLY place in the tree where
53
+ // a track's pixels get a name and a role — one component rather than an
54
+ // `aria-label` per display type, the same way `TrackOverlaySlot` is one paint
55
+ // order rather than one per display.
56
+ //
57
+ // Its own observer for a measured reason. The "what is on screen" half of the
58
+ // name is the settled locstring, which changes whenever navigation settles; read
59
+ // from `TrackRenderingContainer` below, that would re-render every track's
60
+ // container (and re-run its `useStyles`) on every settle. Here the re-render is
61
+ // this one `<div>`: `children` is the same React element object the parent
62
+ // already handed it, so React bails out of the display's whole subtree.
63
+ //
64
+ // **`role="figure"`, not `role="img"`.** `img` is the textbook role for a canvas
65
+ // and would be right if the box held only pixels — but it makes every descendant
66
+ // presentational, and a display's chrome does not all portal out of the sandbox:
67
+ // alignments draws its group collapse/expand `<button>`s inline
68
+ // (`GroupLabelsOverlay`), which under `img` would be focusable and announced as
69
+ // nothing. `figure` names the box and keeps what is inside it reachable. Revisit
70
+ // if inline interactive chrome ever goes away.
71
+ const TrackDisplayRegion = observer(function TrackDisplayRegion({ model, track, children, ...divProps }) {
72
+ const trackName = coarseStripHTML(getTrackName(track.configuration, getSession(track)));
73
+ const loc = model.coarseVisibleLocStrings;
74
+ return (_jsx("div", { ...divProps, role: "figure", "aria-label": loc ? `${trackName} track, showing ${loc}` : `${trackName} track`, children: children }));
75
+ });
76
+ const TrackRenderingContainer = observer(function TrackRenderingContainer({ model, track, display, ref, }) {
23
77
  const { classes } = useStyles();
24
- const display = track.displays[0];
25
- const { height, RenderingComponent, DisplayBlurb } = display;
26
- const { trackRefs, id, scaleFactor } = model;
78
+ const { RenderingComponent, DisplayBlurb } = display;
79
+ const { showTrackOutlines } = model;
27
80
  const trackId = track.trackId;
28
- const ref = useRef(null);
29
81
  const minimized = track.minimized;
30
- useEffect(() => {
31
- if (ref.current) {
32
- trackRefs[trackId] = ref.current;
33
- }
34
- return () => {
35
- delete trackRefs[trackId];
36
- };
37
- }, [trackRefs, trackId]);
38
- 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: {
82
+ return (_jsx("div", { ref: ref, className: classes.trackRenderingContainer, style: {
83
+ height: model.trackHeight(track),
84
+ }, "data-testid": `trackRenderingContainer-${model.id}-${trackId}`, children: !minimized ? (_jsxs(_Fragment, { children: [_jsx(TrackDisplayRegion, { model: model, track: track, className: classes.renderingComponentContainer, style: { left: showTrackOutlines ? -TRACK_OUTLINE_BORDER : 0 }, children: _jsx(Suspense, { fallback: _jsx(TrackOverlayPortal, { children: _jsx(LoadingOverlay, { isVisible: true, immediate: true }) }), children: _jsx(RenderingComponent, { model: display, onHorizontalScroll: model.horizontalScroll }) }) }), DisplayBlurb ? (_jsx("div", { style: {
43
85
  position: 'absolute',
44
86
  left: 0,
45
87
  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,70 @@
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 { useStyleTheme } from '@jbrowse/core/ui/PaletteContext';
5
+ import { getEnv, getSession } from '@jbrowse/core/util';
5
6
  import { makeStyles } from '@jbrowse/core/util/tss-react';
6
7
  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"));
8
+ import { SCALE_BAR_HEIGHT } from '../consts.js';
9
+ import Gridlines from './Gridlines.js';
10
+ import OverviewHighlightBand from './OverviewHighlightBand.js';
11
+ import PaddingBlocks from './PaddingBlocks.js';
12
+ import RangeSelectOverlay from './RangeSelectOverlay.js';
13
+ import Rubberband from './Rubberband.js';
14
+ import VerticalGuide from './VerticalGuide.js';
15
+ import { useRangeSelect } from './useRangeSelect.js';
16
+ import { useSideScroll } from './useSideScroll.js';
17
+ import { getHighlightColor, highlightKey } from './util.js';
18
+ const CenterLine = lazy(() => import('./CenterLine.js'));
19
+ const Highlight = lazy(() => import('./Highlight.js'));
18
20
  const useStyles = makeStyles()({
19
21
  tracksContainer: {
20
22
  position: 'relative',
21
23
  contain: 'layout style',
24
+ // horizontal drags and pinches are the view's; vertical scroll stays the
25
+ // page's
26
+ touchAction: 'pan-y',
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',
22
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 sideScroll = 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
+ return (_jsxs("div", { ref: ref, "data-testid": "tracksContainer", className: classes.tracksContainer, onPointerDown: sideScroll.pointerDown, onClickCapture: sideScroll.clickCapture, onMouseDown: range.mouseDown, onMouseMove: event => {
50
+ range.mouseMove(event);
51
+ }, onMouseLeave: () => {
52
+ range.mouseOut();
53
+ }, 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 }), _jsx(ScalebarHighlightGroup, { model: model }), _jsx(HighlightGroup, { model: model }), _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-TracksContainerComponent", props: { model } }), children] }));
45
54
  });
46
55
  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;
56
+ return getSession(model).highlightsVisible && model.highlights.length ? (_jsx(Suspense, { fallback: null, children: model.highlights.map((highlight, idx) => (_jsx(Highlight, { model: model, highlight: highlight }, highlightKey(highlight, idx)))) })) : null;
57
+ });
58
+ const ScalebarHighlightGroup = observer(function ScalebarHighlightGroup({ model, }) {
59
+ const theme = useStyleTheme();
60
+ const { pluginManager } = getEnv(model);
61
+ const { classes } = useStyles();
62
+ const viewBands = getSession(model).highlightsVisible
63
+ ? model.highlights.map((h, idx) => {
64
+ const coords = model.getHighlightCoords(h);
65
+ return coords ? (_jsx(OverviewHighlightBand, { coords: coords, background: getHighlightColor(h, theme).toRgbString() }, highlightKey(h, idx))) : null;
66
+ })
67
+ : [];
68
+ return (_jsxs("div", { className: classes.scalebarHighlights, children: [viewBands, _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-ScalebarHighlightComponent", props: { model } })] }));
48
69
  });
49
70
  export default TracksContainer;
@@ -1,7 +1,6 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
- type LGV = LinearGenomeViewModel;
3
2
  declare const VerticalGuide: ({ model, coordX, }: {
4
- model: LGV;
3
+ model: LinearGenomeViewModel;
5
4
  coordX: number;
6
- }) => import("react/jsx-runtime").JSX.Element;
5
+ }) => import("react").JSX.Element;
7
6
  export default VerticalGuide;
@@ -1,31 +1,11 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { stringify } from '@jbrowse/core/util';
3
- import { makeStyles } from '@jbrowse/core/util/tss-react';
4
- import { Tooltip } from '@mui/material';
5
3
  import { observer } from 'mobx-react';
6
- const useStyles = makeStyles()({
7
- guide: {
8
- pointerEvents: 'none',
9
- height: '100%',
10
- width: 1,
11
- position: 'absolute',
12
- left: 0,
13
- background: 'red',
14
- zIndex: 1001,
15
- },
16
- tooltipTarget: {
17
- position: 'sticky',
18
- left: 0,
19
- width: 1,
20
- },
21
- });
4
+ import { VerticalGuideLine } from '../../shared/coordLabels.js';
5
+ import { stickyChromeTops } from '../stickyChrome.js';
22
6
  const VerticalGuide = observer(function VerticalGuide({ model, coordX, }) {
23
- 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)` } })] }));
7
+ const { width, stickyViewHeaders, headerHeight } = model;
8
+ const { scalebar } = stickyChromeTops({ stickyViewHeaders, headerHeight });
9
+ return (_jsx(VerticalGuideLine, { coordX: coordX, viewWidth: width, stickyTop: scalebar, children: stringify(model.pxToBp(coordX)) }));
30
10
  });
31
11
  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;