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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +104 -65
  2. package/esm/FeatureTrack/configSchema.js +47 -1
  3. package/esm/FeatureTrack/index.js +1 -1
  4. package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
  5. package/esm/LaunchLinearGenomeView/index.js +6 -12
  6. package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
  7. package/esm/LinearGenomeView/afterAttach.js +250 -121
  8. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  9. package/esm/LinearGenomeView/components/CenterLine.js +16 -7
  10. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
  11. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
  12. package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
  13. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +144 -0
  14. package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
  15. package/esm/LinearGenomeView/components/Cytobands.js +76 -53
  16. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +7 -3
  17. package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -67
  18. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
  19. package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
  20. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
  21. package/esm/LinearGenomeView/components/Gridlines.js +29 -58
  22. package/esm/LinearGenomeView/components/Header.d.ts +1 -1
  23. package/esm/LinearGenomeView/components/Header.js +32 -16
  24. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
  25. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
  26. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
  27. package/esm/LinearGenomeView/components/HeaderPanControls.js +16 -7
  28. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
  29. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
  30. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
  31. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
  32. package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
  33. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
  34. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
  35. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
  36. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
  37. package/esm/LinearGenomeView/components/HeaderZoomControls.js +67 -51
  38. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  39. package/esm/LinearGenomeView/components/Highlight.js +19 -23
  40. package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
  41. package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
  42. package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
  43. package/esm/LinearGenomeView/components/HighlightChip.js +15 -0
  44. package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
  45. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
  46. package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
  47. package/esm/LinearGenomeView/components/ImportForm.js +95 -61
  48. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
  49. package/esm/LinearGenomeView/components/LinearGenomeView.js +6 -5
  50. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
  52. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/MiniControls.js +13 -10
  54. package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
  55. package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
  56. package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
  57. package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
  58. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
  59. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
  60. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
  61. package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
  62. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
  63. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +26 -0
  64. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  65. package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
  66. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
  67. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
  68. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
  69. package/esm/LinearGenomeView/components/OverviewScalebar.js +84 -79
  70. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  71. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -32
  72. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
  73. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
  74. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
  75. package/esm/LinearGenomeView/components/PaddingBlocks.js +61 -0
  76. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  77. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
  78. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
  79. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
  80. package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
  81. package/esm/LinearGenomeView/components/Rubberband.js +13 -16
  82. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  83. package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
  84. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
  85. package/esm/LinearGenomeView/components/Scalebar.js +16 -21
  86. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  87. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  88. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +142 -126
  90. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  91. package/esm/LinearGenomeView/components/SearchBox.js +58 -66
  92. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  93. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  94. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
  95. package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
  96. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
  97. package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
  98. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  99. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  102. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  103. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  104. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
  105. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  106. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  107. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  108. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  109. package/esm/LinearGenomeView/components/TrackContainer.js +83 -39
  110. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  111. package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
  112. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  113. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  114. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  115. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  116. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  117. package/esm/LinearGenomeView/components/TrackLabelMenu.js +32 -85
  118. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  119. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  120. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
  121. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
  122. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  123. package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
  124. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
  126. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  127. package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
  128. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  129. package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
  130. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  131. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  132. package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -8
  133. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  134. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  135. package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -0
  136. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  137. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  138. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  139. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  140. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +11 -66
  141. package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
  142. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  143. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  144. package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
  145. package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
  146. package/esm/LinearGenomeView/components/util.d.ts +20 -6
  147. package/esm/LinearGenomeView/components/util.js +27 -6
  148. package/esm/LinearGenomeView/consts.d.ts +7 -2
  149. package/esm/LinearGenomeView/consts.js +18 -2
  150. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  151. package/esm/LinearGenomeView/flyTo.js +135 -0
  152. package/esm/LinearGenomeView/headerFit.d.ts +27 -0
  153. package/esm/LinearGenomeView/headerFit.js +59 -0
  154. package/esm/LinearGenomeView/index.d.ts +32 -2
  155. package/esm/LinearGenomeView/index.js +16 -6
  156. package/esm/LinearGenomeView/initKeys.d.ts +12 -0
  157. package/esm/LinearGenomeView/initKeys.js +68 -0
  158. package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
  159. package/esm/LinearGenomeView/keyboardHandler.js +10 -0
  160. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  161. package/esm/LinearGenomeView/launchKeys.js +23 -0
  162. package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -11
  163. package/esm/LinearGenomeView/lazyDialogs.js +3 -3
  164. package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
  165. package/esm/LinearGenomeView/linkedViewSync.js +58 -0
  166. package/esm/LinearGenomeView/menuItems.d.ts +27 -2
  167. package/esm/LinearGenomeView/menuItems.js +137 -101
  168. package/esm/LinearGenomeView/model.d.ts +3238 -136
  169. package/esm/LinearGenomeView/model.js +2425 -528
  170. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
  171. package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
  172. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
  173. package/esm/LinearGenomeView/showRegionsWithUndo.js +44 -0
  174. package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
  175. package/esm/LinearGenomeView/stickyChrome.js +30 -0
  176. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
  177. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
  178. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
  179. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
  180. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
  181. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
  182. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
  183. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
  184. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
  185. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +77 -41
  186. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
  187. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
  188. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
  189. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
  190. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
  191. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
  192. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
  193. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
  194. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
  195. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
  196. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
  197. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -21
  198. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
  199. package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
  200. package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
  201. package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
  202. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
  203. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
  204. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
  205. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +263 -0
  206. package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
  207. package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
  208. package/esm/LinearGenomeView/types.d.ts +17 -31
  209. package/esm/LinearGenomeView/types.js +1 -0
  210. package/esm/LinearGenomeView/util.d.ts +332 -12
  211. package/esm/LinearGenomeView/util.js +606 -62
  212. package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
  213. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
  214. package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
  215. package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
  216. package/esm/MultiLevelRubberband/index.d.ts +2 -0
  217. package/esm/MultiLevelRubberband/index.js +1 -0
  218. package/esm/MultiLevelRubberband/types.d.ts +6 -0
  219. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
  220. package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
  221. package/esm/displayKitTests/perRegionTestEnv.d.ts +1286 -0
  222. package/esm/displayKitTests/perRegionTestEnv.js +138 -0
  223. package/esm/index.d.ts +122 -1235
  224. package/esm/index.js +101 -24
  225. package/esm/lazyPluginExports.d.ts +23 -0
  226. package/esm/lazyPluginExports.js +36 -0
  227. package/esm/searchUtils.d.ts +55 -11
  228. package/esm/searchUtils.js +342 -45
  229. package/esm/shared/RubberbandSpan.d.ts +15 -0
  230. package/esm/shared/RubberbandSpan.js +33 -0
  231. package/esm/shared/coordLabels.d.ts +40 -0
  232. package/esm/shared/coordLabels.js +119 -0
  233. package/package.json +18 -19
  234. package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
  235. package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
  236. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
  237. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
  238. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  239. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
  240. package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
  241. package/esm/BaseLinearDisplay/components/Block.js +0 -45
  242. package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  243. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
  244. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  245. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
  246. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
  247. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
  248. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
  249. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
  250. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
  251. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
  252. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
  253. package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
  254. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
  255. package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
  256. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  257. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
  258. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
  259. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
  260. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
  261. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
  262. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
  263. package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
  264. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
  265. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
  266. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
  267. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
  268. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
  269. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
  270. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  271. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
  272. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
  273. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
  274. package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
  275. package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
  276. package/esm/BaseLinearDisplay/components/util.js +0 -107
  277. package/esm/BaseLinearDisplay/index.d.ts +0 -17
  278. package/esm/BaseLinearDisplay/index.js +0 -13
  279. package/esm/BaseLinearDisplay/model.d.ts +0 -1197
  280. package/esm/BaseLinearDisplay/model.js +0 -432
  281. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  282. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
  283. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
  284. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
  285. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
  286. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
  287. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  288. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
  289. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  290. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
  291. package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  292. package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
  293. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
  294. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
  295. package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
  296. package/esm/BaseLinearDisplay/models/util.js +0 -43
  297. package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
  298. package/esm/BaseLinearDisplay/renderSvg.js +0 -63
  299. package/esm/BaseLinearDisplay/types.d.ts +0 -43
  300. package/esm/BaseLinearDisplay/types.js +0 -3
  301. package/esm/BaseLinearDisplay/util.d.ts +0 -16
  302. package/esm/BaseLinearDisplay/util.js +0 -71
  303. package/esm/BasicTrack/configSchema.d.ts +0 -85
  304. package/esm/BasicTrack/configSchema.js +0 -8
  305. package/esm/BasicTrack/index.d.ts +0 -2
  306. package/esm/BasicTrack/index.js +0 -12
  307. package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
  308. package/esm/LinearBareDisplay/configSchema.js +0 -11
  309. package/esm/LinearBareDisplay/index.d.ts +0 -4
  310. package/esm/LinearBareDisplay/index.js +0 -20
  311. package/esm/LinearBareDisplay/model.d.ts +0 -1196
  312. package/esm/LinearBareDisplay/model.js +0 -32
  313. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
  314. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
  315. package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
  316. package/esm/LinearBasicDisplay/configSchema.js +0 -11
  317. package/esm/LinearBasicDisplay/index.d.ts +0 -4
  318. package/esm/LinearBasicDisplay/index.js +0 -20
  319. package/esm/LinearBasicDisplay/model.d.ts +0 -1391
  320. package/esm/LinearBasicDisplay/model.js +0 -158
  321. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
  322. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
  323. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  324. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
  325. package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
  326. package/esm/LinearFeatureDisplay/configSchema.js +0 -11
  327. package/esm/LinearFeatureDisplay/index.d.ts +0 -3
  328. package/esm/LinearFeatureDisplay/index.js +0 -2
  329. package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
  330. package/esm/LinearFeatureDisplay/model.js +0 -305
  331. package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
  332. package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
  333. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  334. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
  335. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
  336. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
  337. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  338. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
  339. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  340. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
  341. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  342. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
  343. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  344. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
  345. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  346. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
  347. package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  348. package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
  349. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  350. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
  351. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  352. package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
  353. package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
  354. package/esm/LinearGenomeView/svgExportUtil.js +0 -6
  355. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  356. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
  357. /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
2
  declare const NoTracksActiveButton: ({ model, }: {
3
3
  model: LinearGenomeViewModel;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
5
5
  export default NoTracksActiveButton;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
3
3
  import { makeStyles } from '@jbrowse/core/util/tss-react';
4
4
  import { Button, Paper, Typography } from '@mui/material';
@@ -1,8 +1,6 @@
1
1
  import type { LinearGenomeViewModel } from '../model.ts';
2
- import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
3
2
  type LGV = LinearGenomeViewModel;
4
- declare const OverviewHighlight: ({ model, overview, }: {
3
+ declare const OverviewHighlight: ({ model, }: {
5
4
  model: LGV;
6
- overview: Base1DViewModel;
7
- }) => import("react/jsx-runtime").JSX.Element[];
5
+ }) => import("react").JSX.Element[] | null;
8
6
  export default OverviewHighlight;
@@ -1,50 +1,29 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { getSession, notEmpty } from '@jbrowse/core/util';
3
3
  import { colord } from '@jbrowse/core/util/colord';
4
- import { makeStyles } from '@jbrowse/core/util/tss-react';
4
+ import { useTheme } from '@mui/material';
5
5
  import { observer } from 'mobx-react';
6
- const useStyles = makeStyles()(theme => ({
7
- highlight: {
8
- height: '100%',
9
- position: 'absolute',
10
- left: 0,
11
- background: colord(theme.palette.highlight.main).alpha(0.35).toRgbString(),
12
- borderLeft: `1px solid ${theme.palette.highlight.main}`,
13
- borderRight: `1px solid ${theme.palette.highlight.main}`,
14
- },
15
- }));
16
- const OverviewHighlight = observer(function OverviewHighlight({ model, overview, }) {
17
- const { classes } = useStyles();
18
- const { highlight, cytobandOffset } = model;
19
- const session = getSession(model);
20
- const { assemblyManager } = session;
21
- return highlight
22
- .map(r => {
23
- const asm = r.assemblyName
24
- ? assemblyManager.get(r.assemblyName)
25
- : undefined;
26
- const refName = asm?.getCanonicalRefName(r.refName) ?? r.refName;
27
- const s = overview.bpToPx({
28
- ...r,
29
- refName,
30
- coord: r.start,
31
- });
32
- const e = overview.bpToPx({
33
- ...r,
34
- refName,
35
- coord: r.end,
36
- });
37
- return s !== undefined && e !== undefined
38
- ? {
39
- width: Math.abs(e - s),
40
- left: s + cytobandOffset,
41
- }
42
- : undefined;
43
- })
44
- .filter(notEmpty)
45
- .map(({ left, width }, idx) => (_jsx("div", { className: classes.highlight, style: {
46
- width,
47
- transform: `translateX(${left}px)`,
48
- } }, `${left}_${width}_${idx}`)));
6
+ import OverviewHighlightBand from './OverviewHighlightBand.js';
7
+ import { getHighlightColor, highlightKey } from './util.js';
8
+ const OverviewHighlight = observer(function OverviewHighlight({ model, }) {
9
+ const theme = useTheme();
10
+ const themed = colord(theme.palette.highlight.main);
11
+ // gate on highlightsVisible to match the main-view band, scalebar band, and
12
+ // SVG export — otherwise "Turn off highlights" leaves the overview bands up
13
+ return getSession(model).highlightsVisible
14
+ ? model.highlight
15
+ .map(highlight => {
16
+ const coords = model.getOverviewHighlightCoords(highlight);
17
+ return coords ? { coords, highlight } : undefined;
18
+ })
19
+ .filter(notEmpty)
20
+ .map(({ coords, highlight }, idx) => {
21
+ const bandColor = getHighlightColor(highlight, theme);
22
+ return (_jsx(OverviewHighlightBand
23
+ // region fields keep the key stable across pan/zoom (unlike pixel
24
+ // coords); idx disambiguates duplicate highlights on the region
25
+ , { coords: coords, background: bandColor.toRgbString(), borderColor: (highlight.color ? bandColor : themed).toRgbString(), tooltip: highlight.label }, highlightKey(highlight, idx)));
26
+ })
27
+ : null;
49
28
  });
50
29
  export default OverviewHighlight;
@@ -0,0 +1,9 @@
1
+ export default function OverviewHighlightBand({ coords, background, borderColor, tooltip, }: {
2
+ coords: {
3
+ left: number;
4
+ width: number;
5
+ };
6
+ background: string;
7
+ borderColor?: string;
8
+ tooltip?: string;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
3
+ import { Tooltip } from '@mui/material';
4
+ // Renders a single absolute-positioned band over the overview scalebar. Used
5
+ // for both LGV `view.highlight` entries and grid-bookmark bookmark highlights.
6
+ // The 1px border keeps very narrow bands visible.
7
+ const useStyles = makeStyles()({
8
+ highlight: {
9
+ height: '100%',
10
+ position: 'absolute',
11
+ left: 0,
12
+ },
13
+ });
14
+ export default function OverviewHighlightBand({ coords, background, borderColor, tooltip, }) {
15
+ const { classes } = useStyles();
16
+ const band = (_jsx("div", { className: classes.highlight, style: {
17
+ transform: `translateX(${coords.left}px)`,
18
+ width: coords.width,
19
+ background,
20
+ ...(borderColor && {
21
+ borderLeft: `1px solid ${borderColor}`,
22
+ borderRight: `1px solid ${borderColor}`,
23
+ }),
24
+ } }));
25
+ return tooltip ? (_jsx(Tooltip, { title: tooltip, arrow: true, children: band })) : (band);
26
+ }
@@ -1,9 +1,9 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
- import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
2
+ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
3
3
  type LGV = LinearGenomeViewModel;
4
4
  declare const OverviewRubberband: ({ model, overview, ControlComponent, }: {
5
5
  model: LGV;
6
- overview: Base1DViewModel;
6
+ overview: ViewLayout;
7
7
  ControlComponent?: React.ReactElement;
8
- }) => import("react/jsx-runtime").JSX.Element;
8
+ }) => import("react").JSX.Element;
9
9
  export default OverviewRubberband;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
- import { getSession } from '@jbrowse/core/util';
3
+ import { getNotificationSink, stringify } from '@jbrowse/core/util';
4
+ import { getRelativeX } from '@jbrowse/core/util/getRelativeX';
4
5
  import { makeStyles } from '@jbrowse/core/util/tss-react';
5
6
  import { observer } from 'mobx-react';
6
- import OverviewRubberbandHoverTooltip from "./OverviewRubberbandHoverTooltip.js";
7
- import RubberbandSpan from "./RubberbandSpan.js";
8
- import { getRelativeX } from "./util.js";
7
+ import RubberbandSpan from '../../shared/RubberbandSpan.js';
8
+ import OverviewRubberbandHoverTooltip from './OverviewRubberbandHoverTooltip.js';
9
+ import { overviewPxToBp } from './util.js';
9
10
  const useStyles = makeStyles()({
10
11
  rubberbandControl: {
11
12
  cursor: 'crosshair',
@@ -25,35 +26,40 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
25
26
  const { classes } = useStyles();
26
27
  const mouseDragging = startX !== undefined;
27
28
  useEffect(() => {
29
+ const el = controlsRef.current;
30
+ if (!mouseDragging || !el) {
31
+ return;
32
+ }
33
+ // the container's left edge is fixed for the duration of a drag, so measure
34
+ // it once here rather than calling getBoundingClientRect on every mousemove
35
+ const { left } = el.getBoundingClientRect();
28
36
  function globalMouseMove(event) {
29
- const ref = controlsRef.current;
30
- if (ref && mouseDragging) {
31
- setCurrentX(getRelativeX(event, ref));
32
- }
37
+ setCurrentX(event.clientX - left);
33
38
  }
34
- function globalMouseUp() {
35
- if (startX !== undefined && currentX !== undefined) {
36
- if (Math.abs(currentX - startX) > 3) {
37
- const left = Math.min(startX, currentX);
38
- const right = Math.max(startX, currentX);
39
- model.moveTo(overview.pxToBp(left - cytobandOffset), overview.pxToBp(right - cytobandOffset));
40
- }
41
- }
42
- if (startX !== undefined && currentX === undefined) {
43
- const click = overview.pxToBp(startX - cytobandOffset);
44
- if (!click.refName) {
45
- getSession(model).notify('unknown position clicked');
46
- console.error('unknown position clicked', click);
39
+ function globalMouseUp(event) {
40
+ // read the up position from the event so currentX state doesn't need to
41
+ // be a dep (which would re-subscribe these listeners every mousemove)
42
+ if (startX !== undefined) {
43
+ const offsetX = event.clientX - left;
44
+ if (Math.abs(offsetX - startX) > 3) {
45
+ const leftPx = Math.min(startX, offsetX);
46
+ const rightPx = Math.max(startX, offsetX);
47
+ model.moveTo(overviewPxToBp(overview, leftPx, cytobandOffset), overviewPxToBp(overview, rightPx, cytobandOffset));
47
48
  }
48
49
  else {
49
- model.centerAt(Math.round(click.coord), click.refName, click.index);
50
+ const click = overviewPxToBp(overview, startX, cytobandOffset);
51
+ if (click.refName) {
52
+ model.centerAt(click.coord0, click.refName, click.index);
53
+ }
54
+ else {
55
+ getNotificationSink(model).notify('unknown position clicked');
56
+ console.error('unknown position clicked', click);
57
+ }
50
58
  }
51
59
  }
52
60
  setStartX(undefined);
53
61
  setCurrentX(undefined);
54
- if (startX !== undefined) {
55
- setGuideX(undefined);
56
- }
62
+ setGuideX(undefined);
57
63
  }
58
64
  function globalKeyDown(event) {
59
65
  if (event.key === 'Escape') {
@@ -61,18 +67,15 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
61
67
  setCurrentX(undefined);
62
68
  }
63
69
  }
64
- if (mouseDragging) {
65
- window.addEventListener('mousemove', globalMouseMove, true);
66
- window.addEventListener('mouseup', globalMouseUp, true);
67
- window.addEventListener('keydown', globalKeyDown, true);
68
- return () => {
69
- window.removeEventListener('mousemove', globalMouseMove, true);
70
- window.removeEventListener('mouseup', globalMouseUp, true);
71
- window.removeEventListener('keydown', globalKeyDown, true);
72
- };
73
- }
74
- return () => { };
75
- }, [mouseDragging, currentX, startX, model, overview, cytobandOffset]);
70
+ window.addEventListener('mousemove', globalMouseMove);
71
+ window.addEventListener('mouseup', globalMouseUp);
72
+ window.addEventListener('keydown', globalKeyDown);
73
+ return () => {
74
+ window.removeEventListener('mousemove', globalMouseMove);
75
+ window.removeEventListener('mouseup', globalMouseUp);
76
+ window.removeEventListener('keydown', globalKeyDown);
77
+ };
78
+ }, [startX, mouseDragging, model, overview, cytobandOffset]);
76
79
  function mouseDown(event) {
77
80
  event.preventDefault();
78
81
  event.stopPropagation();
@@ -84,25 +87,9 @@ const OverviewRubberband = observer(function OverviewRubberband({ model, overvie
84
87
  function mouseOut() {
85
88
  setGuideX(undefined);
86
89
  }
87
- if (startX === undefined) {
88
- return (_jsxs("div", { className: classes.rel, children: [guideX !== undefined ? (_jsx(OverviewRubberbandHoverTooltip, { model: model, open: !mouseDragging, overview: overview, guideX: guideX })) : null, _jsx("div", { className: classes.rubberbandControl, ref: controlsRef, onMouseDown: mouseDown, onMouseOut: mouseOut, onMouseMove: mouseMove, children: ControlComponent })] }));
89
- }
90
- let left = startX || 0;
91
- let width = 0;
92
- if (currentX !== undefined) {
93
- left = Math.min(currentX, startX);
94
- width = currentX - startX;
95
- }
96
- let leftBpOffset;
97
- let rightBpOffset;
98
- if (startX) {
99
- leftBpOffset = overview.pxToBp(startX - cytobandOffset);
100
- rightBpOffset = overview.pxToBp(startX + width - cytobandOffset);
101
- if (currentX !== undefined && currentX < startX) {
102
- ;
103
- [leftBpOffset, rightBpOffset] = [rightBpOffset, leftBpOffset];
104
- }
105
- }
106
- return (_jsxs("div", { className: classes.rel, children: [leftBpOffset && rightBpOffset ? (_jsx(RubberbandSpan, { leftBpOffset: leftBpOffset, rightBpOffset: rightBpOffset, width: Math.abs(width), left: left })) : null, _jsx("div", { "data-testid": "rubberband_controls", className: classes.rubberbandControl, ref: controlsRef, onMouseDown: mouseDown, onMouseOut: mouseOut, onMouseMove: mouseMove, children: ControlComponent })] }));
90
+ const endX = currentX ?? startX;
91
+ const leftPx = mouseDragging ? Math.min(startX, endX) : 0;
92
+ const rightPx = mouseDragging ? Math.max(startX, endX) : 0;
93
+ return (_jsxs("div", { className: classes.rel, children: [!mouseDragging && guideX !== undefined ? (_jsx(OverviewRubberbandHoverTooltip, { model: model, overview: overview, guideX: guideX })) : null, mouseDragging ? (_jsx(RubberbandSpan, { leftLabel: stringify(overviewPxToBp(overview, leftPx, cytobandOffset)), rightLabel: stringify(overviewPxToBp(overview, rightPx, cytobandOffset)), width: rightPx - leftPx, left: leftPx, viewWidth: overview.width, stickyTop: undefined })) : null, _jsx("div", { "data-testid": mouseDragging ? 'rubberband_controls' : undefined, className: classes.rubberbandControl, ref: controlsRef, onMouseDown: mouseDown, onMouseLeave: mouseOut, onMouseMove: mouseMove, children: ControlComponent })] }));
107
94
  });
108
95
  export default OverviewRubberband;
@@ -1,10 +1,9 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
- import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
2
+ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
3
3
  type LGV = LinearGenomeViewModel;
4
- declare const OverviewRubberbandHoverTooltip: ({ model, open, guideX, overview, }: {
4
+ declare const OverviewRubberbandHoverTooltip: ({ model, guideX, overview, }: {
5
5
  model: LGV;
6
- open: boolean;
7
6
  guideX: number;
8
- overview: Base1DViewModel;
9
- }) => import("react/jsx-runtime").JSX.Element;
7
+ overview: ViewLayout;
8
+ }) => import("react").JSX.Element;
10
9
  export default OverviewRubberbandHoverTooltip;
@@ -1,30 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { getSession, 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
- },
14
- });
15
- const OverviewRubberbandHoverTooltip = observer(function OverviewRubberbandHoverTooltip({ model, open, guideX, overview, }) {
16
- const { classes } = useStyles();
4
+ import { GuideLabel } from '../../shared/coordLabels.js';
5
+ import { overviewPxToBp } from './util.js';
6
+ // Label only, no guide line: the overview already marks position with the
7
+ // visible-region box, and unlike the LGV/multi-level guides this one never had a
8
+ // background, so the 1px div it used to render painted nothing while still
9
+ // taking a transform patch per mousemove. Add a background here if a visible
10
+ // line is ever wanted.
11
+ const OverviewRubberbandHoverTooltip = observer(function OverviewRubberbandHoverTooltip({ model, guideX, overview, }) {
17
12
  const { cytobandOffset } = model;
18
13
  const { assemblyManager } = getSession(model);
19
- const px = overview.pxToBp(guideX - cytobandOffset);
14
+ const px = overviewPxToBp(overview, guideX, cytobandOffset);
20
15
  const assembly = assemblyManager.get(px.assemblyName);
21
16
  const cytoband = assembly?.cytobands?.find(f => px.coord > f.get('start') &&
22
17
  px.coord < f.get('end') &&
23
- px.refName === assembly.getCanonicalRefName(f.get('refName')));
24
- return (_jsx(Tooltip, { open: open, placement: "top", title: [
25
- stringify(px),
26
- cytoband?.get('name'),
27
- cytoband?.get('type'),
28
- ].join(' '), arrow: true, children: _jsx("div", { className: classes.guide, style: { transform: `translateX(${guideX}px)` } }) }));
18
+ px.refName === assembly.getCanonicalRefName2(f.get('refName')));
19
+ return (_jsx(GuideLabel, { coordX: guideX, viewWidth: overview.width, stickyTop: undefined, children: [stringify(px), cytoband?.get('name'), cytoband?.get('type')]
20
+ .filter(Boolean)
21
+ .join(' ') }));
29
22
  });
30
23
  export default OverviewRubberbandHoverTooltip;
@@ -1,7 +1,8 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
+ import type { ReactNode } from 'react';
2
3
  type LGV = LinearGenomeViewModel;
3
4
  declare const OverviewScalebar: ({ model, children, }: {
4
5
  model: LGV;
5
- children: React.ReactNode;
6
- }) => import("react/jsx-runtime").JSX.Element;
6
+ children: ReactNode;
7
+ }) => import("react").JSX.Element;
7
8
  export default OverviewScalebar;
@@ -1,18 +1,17 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useMemo } from 'react';
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PluggableElements } from '@jbrowse/core/ui';
3
3
  import { getEnv, getSession } from '@jbrowse/core/util';
4
- import Base1DView from '@jbrowse/core/util/Base1DViewModel';
5
4
  import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
6
5
  import { Typography, alpha, useTheme } from '@mui/material';
7
6
  import { observer } from 'mobx-react';
8
- import Cytobands from "./Cytobands.js";
9
- import OverviewHighlight from "./OverviewHighlight.js";
10
- import OverviewRubberband from "./OverviewRubberband.js";
11
- import OverviewScalebarPolygon from "./OverviewScalebarPolygon.js";
12
- import OverviewScalebarTickLabels from "./OverviewScalebarTickLabels.js";
13
- import { getCytobands } from "./util.js";
14
- import { HEADER_BAR_HEIGHT, HEADER_OVERVIEW_HEIGHT } from "../consts.js";
15
- const wholeSeqSpacer = 2;
7
+ import { HEADER_BAR_HEIGHT, HEADER_OVERVIEW_HEIGHT } from '../consts.js';
8
+ import { REF_NAME_LABEL_FONT_SIZE, getBlockRefName, showRefNameLabels, } from '../util.js';
9
+ import Cytobands from './Cytobands.js';
10
+ import OverviewHighlight from './OverviewHighlight.js';
11
+ import OverviewRubberband from './OverviewRubberband.js';
12
+ import OverviewScalebarPolygon from './OverviewScalebarPolygon.js';
13
+ import OverviewScalebarTickLabels from './OverviewScalebarTickLabels.js';
14
+ import { elidedBlockStyles, getCytobands } from './util.js';
16
15
  const useStyles = makeStyles()(theme => ({
17
16
  scalebar: {
18
17
  height: HEADER_OVERVIEW_HEIGHT,
@@ -27,7 +26,16 @@ const useStyles = makeStyles()(theme => ({
27
26
  top: 0,
28
27
  left: 0,
29
28
  height: HEADER_OVERVIEW_HEIGHT,
30
- overflow: 'hidden',
29
+ // clip rather than hidden so this never becomes a scroll container (see
30
+ // Scalebar)
31
+ overflow: 'clip',
32
+ },
33
+ // cytoband strip keeps a fixed light backdrop in both light/dark mode: the
34
+ // Giemsa greyscale runs to pure black (gpos100/gvar), which would vanish on
35
+ // the dark theme's background.default. UCSC/IGV likewise draw the ideogram on
36
+ // a fixed white strip.
37
+ scalebarContigCytoband: {
38
+ backgroundColor: theme.palette.common.white,
31
39
  },
32
40
  scalebarContigForward: {
33
41
  backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 9'%3E%3Cpath d='M-.1 0L6 4.5L-.1 9' fill='none' stroke='${theme.palette.divider}'/%3E%3C/svg%3E")`,
@@ -39,10 +47,19 @@ const useStyles = makeStyles()(theme => ({
39
47
  },
40
48
  scalebarRefName: {
41
49
  position: 'absolute',
42
- left: 0,
50
+ top: 0,
51
+ fontSize: REF_NAME_LABEL_FONT_SIZE,
43
52
  fontWeight: 'bold',
44
53
  pointerEvents: 'none',
45
54
  zIndex: 100,
55
+ // clip, not hidden: transform is patched per zoom frame, and clip keeps this
56
+ // out of the scroll-container path. ellipsis renders identically under clip
57
+ // (verified pixel-for-pixel), since text-overflow applies at any non-visible
58
+ // overflow
59
+ overflow: 'clip',
60
+ whiteSpace: 'nowrap',
61
+ textOverflow: 'ellipsis',
62
+ maxWidth: 'calc(100% - 6px)',
46
63
  },
47
64
  scalebarVisibleRegion: {
48
65
  position: 'absolute',
@@ -53,7 +70,10 @@ const useStyles = makeStyles()(theme => ({
53
70
  left: 0,
54
71
  },
55
72
  overview: {
56
- height: HEADER_BAR_HEIGHT,
73
+ // the band the "you are here" trapezoid is drawn over, and the box the
74
+ // controls row sits in — a minimum so the row can outgrow it, since the
75
+ // svg above is absolutely positioned and does not hold it open
76
+ minHeight: HEADER_BAR_HEIGHT,
57
77
  position: 'relative',
58
78
  },
59
79
  overviewSvg: {
@@ -61,89 +81,74 @@ const useStyles = makeStyles()(theme => ({
61
81
  width: '100%',
62
82
  position: 'absolute',
63
83
  },
84
+ elidedOverviewBlock: {
85
+ ...elidedBlockStyles,
86
+ },
87
+ cytoSvg: {
88
+ width: '100%',
89
+ },
64
90
  }));
65
- const OverviewBox = observer(function OverviewBox({ scale, model, block, overview, }) {
91
+ const OverviewBox = observer(function OverviewBox({ model, block, showRefName, }) {
66
92
  const { classes } = useStyles();
67
93
  const theme = useTheme();
68
- const { cytobandOffset, showCytobands } = model;
94
+ const { cytobandOffset, effectiveShowCytobands, overviewLayout: overview, } = model;
69
95
  const { reversed, refName, assemblyName } = block;
70
96
  const { assemblyManager } = getSession(model);
71
97
  const assembly = assemblyManager.get(assemblyName);
72
98
  const refNameColor = assembly?.getRefNameColor(refName);
73
- const canDisplayCytobands = showCytobands && getCytobands(assembly, block.refName).length;
74
- return (_jsxs("div", { children: [_jsx(Typography, { style: {
75
- transform: `translateX(${block.offsetPx + 3}px)`,
76
- color: canDisplayCytobands
77
- ? theme.palette.text.primary
78
- : refNameColor,
79
- }, className: classes.scalebarRefName, children: refName }), _jsx("div", { className: cx(classes.scalebarContig, canDisplayCytobands
80
- ? undefined
81
- : reversed
82
- ? classes.scalebarContigReverse
83
- : classes.scalebarContigForward, !canDisplayCytobands ? classes.scalebarBorder : undefined), style: {
84
- transform: `translateX(${block.offsetPx + cytobandOffset}px)`,
85
- width: block.widthPx,
86
- borderColor: refNameColor,
87
- }, children: canDisplayCytobands ? (_jsx("svg", { style: { width: '100%' }, children: _jsx(Cytobands, { overview: overview, assembly: assembly, block: block }) })) : (_jsx(OverviewScalebarTickLabels, { model: model, overview: overview, scale: scale, block: block })) })] }));
99
+ const cytobands = effectiveShowCytobands
100
+ ? getCytobands(assembly, refName)
101
+ : [];
102
+ const canDisplayCytobands = cytobands.length > 0;
103
+ if (canDisplayCytobands) {
104
+ return (_jsxs(_Fragment, { children: [showRefName ? (_jsx(Typography, { style: {
105
+ // fixed dark: this label overlays the always-white cytoband strip,
106
+ // so text.primary (white in dark mode) would be invisible
107
+ color: theme.palette.common.black,
108
+ transform: `translateX(${block.offsetPx + 3}px)`,
109
+ }, className: classes.scalebarRefName, children: refName })) : null, _jsx("div", { className: cx(classes.scalebarContig, classes.scalebarContigCytoband), style: {
110
+ transform: `translateX(${block.offsetPx + cytobandOffset}px)`,
111
+ width: block.widthPx,
112
+ }, children: _jsx("svg", { className: classes.cytoSvg, children: _jsx(Cytobands, { overview: overview, cytobands: cytobands, block: block }) }) })] }));
113
+ }
114
+ return (_jsxs("div", { className: cx(classes.scalebarContig, reversed
115
+ ? classes.scalebarContigReverse
116
+ : classes.scalebarContigForward, classes.scalebarBorder), style: {
117
+ transform: `translateX(${block.offsetPx + cytobandOffset}px)`,
118
+ width: block.widthPx,
119
+ borderColor: refNameColor,
120
+ }, children: [showRefName ? (_jsx(Typography, { style: { color: refNameColor, left: 3 }, className: classes.scalebarRefName, children: refName })) : null, _jsx(OverviewScalebarTickLabels, { model: model, block: block, refNameColor: refNameColor, showRefName: showRefName })] }));
88
121
  });
89
- const VisibleRegionBox = observer(function VisibleRegionBox({ model, overview, className, }) {
122
+ const VisibleRegionBox = observer(function VisibleRegionBox({ model, }) {
123
+ const { classes } = useStyles();
90
124
  const theme = useTheme();
91
- const scalebarColor = theme.palette.tertiary.light;
92
- const { dynamicBlocks, showCytobands, cytobandOffset } = model;
93
- const visibleRegions = dynamicBlocks.contentBlocks;
94
- if (!visibleRegions.length) {
125
+ const { effectiveShowCytobands, cytobandOffset, overviewRegionPxSpan: span, } = model;
126
+ if (!span) {
95
127
  return null;
96
128
  }
97
- const first = visibleRegions.at(0);
98
- const last = visibleRegions.at(-1);
99
- const firstOverviewPx = overview.bpToPx({
100
- refName: first.refName,
101
- coord: first.reversed ? first.end : first.start,
102
- }) || 0;
103
- const lastOverviewPx = overview.bpToPx({
104
- refName: last.refName,
105
- coord: last.reversed ? last.start : last.end,
106
- }) || 0;
107
- const color = showCytobands ? '#f00' : scalebarColor;
108
- const transparency = showCytobands ? 0.1 : 0.3;
109
- const left = firstOverviewPx + cytobandOffset;
110
- return (_jsx("div", { className: className, style: {
111
- width: lastOverviewPx - firstOverviewPx,
112
- transform: `translateX(${left}px)`,
113
- background: alpha(color, transparency),
129
+ const { color, opacity } = effectiveShowCytobands
130
+ ? { color: '#f00', opacity: 0.1 }
131
+ : { color: theme.palette.tertiary.light, opacity: 0.3 };
132
+ return (_jsx("div", { className: classes.scalebarVisibleRegion, style: {
133
+ width: span.rightPx - span.leftPx,
134
+ transform: `translateX(${span.leftPx + cytobandOffset}px)`,
135
+ background: alpha(color, opacity),
114
136
  borderColor: color,
115
137
  } }));
116
138
  });
117
- const Scalebar = observer(function Scalebar({ model, scale, overview, }) {
139
+ const OverviewScalebarContent = observer(function OverviewScalebarContent({ model, }) {
118
140
  const { classes } = useStyles();
119
141
  const { pluginManager } = getEnv(model);
120
- const overviewVisibleRegions = overview.dynamicBlocks;
121
- const additional = pluginManager.evaluateExtensionPoint('LinearGenomeView-OverviewScalebarComponent', undefined, { model, overview });
122
- return (_jsxs("div", { className: classes.scalebar, children: [_jsx(VisibleRegionBox, { model: model, overview: overview, className: classes.scalebarVisibleRegion }), overviewVisibleRegions.map((block, idx) => {
123
- return !(block.type === 'ContentBlock') ? (_jsx("div", { className: classes.scalebarContig, style: {
124
- width: block.widthPx,
125
- transform: `translateX(${block.offsetPx}px)`,
126
- backgroundColor: '#999',
127
- backgroundImage: 'repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,.5) 1px, rgba(255,255,255,.5) 3px)',
128
- } }, `${JSON.stringify(block)}-${idx}`)) : (_jsx(OverviewBox, { scale: scale, block: block, model: model, overview: overview }, `${JSON.stringify(block)}-${idx}`));
129
- }), _jsx(OverviewHighlight, { model: model, overview: overview }), additional] }));
142
+ const { overviewLayout: overview, overviewBlocks } = model;
143
+ const showRefName = showRefNameLabels(overviewBlocks, getBlockRefName);
144
+ return (_jsxs("div", { className: classes.scalebar, children: [_jsx(VisibleRegionBox, { model: model }), overviewBlocks.map((block, i) => block.type === 'ContentBlock' ? (_jsx(OverviewBox, { block: block, model: model, showRefName: showRefName[i] }, block.key)) : block.type === 'ElidedBlock' ? (_jsx("div", { className: cx(classes.scalebarContig, classes.elidedOverviewBlock), style: {
145
+ width: block.widthPx,
146
+ transform: `translateX(${block.offsetPx}px)`,
147
+ } }, block.key)) : null), _jsx(OverviewHighlight, { model: model }), _jsx(PluggableElements, { pluginManager: pluginManager, name: "LinearGenomeView-OverviewScalebarComponent", props: { model, overview } })] }));
130
148
  });
131
149
  const OverviewScalebar = observer(function OverviewScalebar({ model, children, }) {
132
150
  const { classes } = useStyles();
133
- const { minimumBlockWidth, totalBp, width, cytobandOffset, displayedRegions, } = model;
134
- const modWidth = width - cytobandOffset;
135
- const str = JSON.stringify(displayedRegions);
136
- const overview = useMemo(() => {
137
- const overview = Base1DView.create({
138
- displayedRegions: JSON.parse(str),
139
- interRegionPaddingWidth: 0,
140
- minimumBlockWidth,
141
- });
142
- overview.setVolatileWidth(modWidth);
143
- overview.showAllRegions();
144
- return overview;
145
- }, [str, minimumBlockWidth, modWidth]);
146
- const scale = totalBp / (modWidth - (displayedRegions.length - 1) * wholeSeqSpacer);
147
- return (_jsxs("div", { children: [_jsx(OverviewRubberband, { model: model, overview: overview, ControlComponent: _jsx(Scalebar, { model: model, overview: overview, scale: scale }) }), _jsxs("div", { className: classes.overview, children: [_jsx("svg", { height: HEADER_BAR_HEIGHT, className: classes.overviewSvg, children: _jsx(OverviewScalebarPolygon, { model: model, overview: overview }) }), children] })] }));
151
+ const overview = model.overviewLayout;
152
+ return (_jsxs("div", { children: [_jsx(OverviewRubberband, { model: model, overview: overview, ControlComponent: _jsx(OverviewScalebarContent, { model: model }) }), _jsxs("div", { className: classes.overview, children: [_jsx("svg", { height: HEADER_BAR_HEIGHT, className: classes.overviewSvg, children: _jsx(OverviewScalebarPolygon, { model: model, overview: overview, overviewOffsetPx: model.cytobandOffset }) }), children] })] }));
148
153
  });
149
154
  export default OverviewScalebar;
@@ -1,8 +1,22 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
- import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
3
- declare const OverviewScalebarPolygon: ({ model, overview, useOffset, }: {
2
+ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
3
+ /**
4
+ * The "you are here" connector: a trapezoid joining the visible region's extent
5
+ * in the overview (top edge) to that same extent in the main view (bottom
6
+ * edge). Both edges come from one pixel extent, so they always describe the
7
+ * same regions — including elided ones.
8
+ *
9
+ * @param overviewOffsetPx - pixels the overview is shifted right of the main
10
+ * view's origin. In the interactive view the overview clears the chromosome-
11
+ * name gap (cytobandOffset); in SVG export it is flush (0).
12
+ * @param exportSvg - serialize explicit fill/stroke attributes (the split the
13
+ * `getFill/StrokeProps` helpers exist for) instead of the on-screen CSS class,
14
+ * which wouldn't survive into a standalone exported SVG.
15
+ */
16
+ declare const OverviewScalebarPolygon: ({ model, overview, overviewOffsetPx, exportSvg, }: {
4
17
  model: LinearGenomeViewModel;
5
- overview: Base1DViewModel;
6
- useOffset?: boolean;
7
- }) => import("react/jsx-runtime").JSX.Element | null;
18
+ overview: ViewLayout;
19
+ overviewOffsetPx?: number;
20
+ exportSvg?: boolean;
21
+ }) => import("react").JSX.Element | null;
8
22
  export default OverviewScalebarPolygon;