@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,64 +1,56 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { assembleLocString, getEnv, getSession, parseLocString, } from '@jbrowse/core/util';
2
+ import { readConfObject } from '@jbrowse/core/configuration';
3
+ import { assembleLocString, getSession, parseLocString, } from '@jbrowse/core/util';
3
4
  import { Button, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, } from '@mui/material';
4
- import { navToOption } from "../../searchUtils.js";
5
- export default function SearchResultsTable({ searchResults, assemblyName: optAssemblyName, model, handleClose, }) {
5
+ import { observer } from 'mobx-react';
6
+ import { isOpenInView, navToOption } from '../../searchUtils.js';
7
+ const SearchResultsTable = observer(function SearchResultsTable({ searchResults, assemblyName, model, handleClose, }) {
6
8
  const session = getSession(model);
7
- const { pluginManager } = getEnv(session);
8
9
  const { assemblyManager } = session;
9
- const assemblyName = optAssemblyName || model.displayedRegions[0].assemblyName;
10
10
  const assembly = assemblyManager.get(assemblyName);
11
- if (!assembly) {
12
- throw new Error(`assembly ${assemblyName} not found`);
13
- }
14
- if (!assembly.regions) {
15
- throw new Error(`assembly ${assemblyName} regions not loaded`);
16
- }
17
11
  function getTrackName(trackId) {
18
- return trackId !== undefined ? session.getTracksById()[trackId]?.name : '';
12
+ const conf = trackId !== undefined ? session.getTrackById(trackId) : undefined;
13
+ return conf ? readConfObject(conf, 'name') : '';
19
14
  }
20
- async function handleClick(result) {
21
- if (result.hasLocation()) {
22
- await navToOption({
23
- option: result,
24
- model,
25
- assemblyName,
26
- });
15
+ // the raw locString, prettified to the assembly's canonical refName when the
16
+ // assembly is loaded and the string parses. A result the assembly can't
17
+ // resolve is still listed as-is rather than blowing up the dialog: the Go
18
+ // button navigates through navToOption, which reports its own failure
19
+ function formatLocation(locString) {
20
+ if (assembly && locString) {
21
+ try {
22
+ const loc = parseLocString(locString, refName => assembly.isValidRefName(refName));
23
+ return assembleLocString({
24
+ ...loc,
25
+ refName: assembly.getCanonicalRefName2(loc.refName),
26
+ });
27
+ }
28
+ catch (e) {
29
+ console.warn('failed to parse location string', locString, e);
30
+ return locString;
31
+ }
27
32
  }
28
33
  else {
29
- const location = result.getLabel();
30
- const newRegion = assembly?.regions?.find(region => location === region.refName);
31
- if (newRegion) {
32
- model.setDisplayedRegions([newRegion]);
33
- model.showAllRegions();
34
- }
35
- await pluginManager.evaluateAsyncExtensionPoint('LinearGenomeView-searchResultSelected', undefined, { session, result, model, assemblyName });
34
+ return locString;
36
35
  }
37
36
  }
38
- return (_jsx(TableContainer, { component: Paper, children: _jsxs(Table, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Name" }), _jsx(TableCell, { align: "right", children: "Location" }), _jsx(TableCell, { align: "right", children: "Track" }), _jsx(TableCell, { align: "right" })] }) }), _jsx(TableBody, { children: searchResults.map(result => {
39
- const locString = result.getLocation();
40
- let loc;
41
- try {
42
- loc = locString
43
- ? parseLocString(locString, refName => assembly.isValidRefName(refName))
44
- : undefined;
45
- }
46
- catch (e) { }
47
- return (_jsxs(TableRow, { children: [_jsx(TableCell, { component: "th", scope: "row", children: result.getLabel() }), _jsx(TableCell, { align: "right", children: loc
48
- ? assembleLocString({
49
- ...loc,
50
- refName: assembly.getCanonicalRefName(loc.refName) ||
51
- loc.refName,
52
- })
53
- : locString }), _jsx(TableCell, { align: "right", children: getTrackName(result.getTrackId()) || 'N/A' }), _jsx(TableCell, { align: "right", children: _jsx(Button, { onClick: async () => {
54
- try {
55
- await handleClick(result);
56
- }
57
- catch (e) {
58
- console.error(e);
59
- session.notifyError(`${e}`, e);
60
- }
61
- handleClose();
62
- }, color: "primary", variant: "contained", children: "Go" }) })] }, result.getId()));
63
- }) })] }) }));
64
- }
37
+ // A hit in a track that is already on screen is usually the one meant, so it
38
+ // is listed first rather than given a control that says so. sort is stable,
39
+ // so everything else keeps the ranked order it arrived in.
40
+ const ordered = [...searchResults].sort((a, b) => Number(isOpenInView(b, model)) - Number(isOpenInView(a, model)));
41
+ return (_jsx(TableContainer, { component: Paper, children: _jsxs(Table, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Name" }), _jsx(TableCell, { align: "right", children: "Location" }), _jsx(TableCell, { align: "right", children: "Track" }), _jsx(TableCell, { align: "right" })] }) }), _jsx(TableBody, { children: ordered.map(result => (_jsxs(TableRow, { children: [_jsx(TableCell, { component: "th", scope: "row", children: result.getLabel() }), _jsx(TableCell, { align: "right", children: formatLocation(result.getLocation()) }), _jsx(TableCell, { align: "right", children: getTrackName(result.getTrackId()) || 'N/A' }), _jsx(TableCell, { align: "right", children: _jsx(Button, { onClick: async () => {
42
+ try {
43
+ await navToOption({
44
+ option: result,
45
+ model,
46
+ assemblyName,
47
+ });
48
+ }
49
+ catch (e) {
50
+ console.error(e);
51
+ session.notifyError(`${e}`, e);
52
+ }
53
+ handleClose();
54
+ }, color: "primary", variant: "contained", children: "Go" }) })] }, result.getId()))) })] }) }));
55
+ });
56
+ export default SearchResultsTable;
@@ -0,0 +1,5 @@
1
+ import type { LinearGenomeViewModel } from '../index.ts';
2
+ declare const SequenceFeatureHoverHighlight: ({ model, }: {
3
+ model: LinearGenomeViewModel;
4
+ }) => import("react").JSX.Element;
5
+ export default SequenceFeatureHoverHighlight;
@@ -0,0 +1,37 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { observer } from 'mobx-react';
3
+ import ConnectedHoverHighlight from './ConnectedHoverHighlight.js';
4
+ import HoverPositionHighlight from './HoverPositionHighlight.js';
5
+ // A feature-detail widget is "connected" to this view when its `view` reference
6
+ // points back at it; that widget's sequence panel publishes the hovered base as
7
+ // `sequenceHoverPosition`.
8
+ function isFeatureWidgetForView(w, viewId) {
9
+ const candidate = w;
10
+ return (!!candidate &&
11
+ !!candidate.sequenceFeatureDetails &&
12
+ candidate.view?.id === viewId);
13
+ }
14
+ // The same panel also opens straight off a feature's right-click menu, where it
15
+ // is owned by the display rather than by a widget — so the view's own displays
16
+ // publish hover positions too.
17
+ function displayHoverPosition(display) {
18
+ const candidate = display;
19
+ return candidate?.sequenceHoverPosition;
20
+ }
21
+ // Draws a crosshair on the LGV at the base a connected feature-detail sequence
22
+ // panel is hovering, so mousing over the sequence readout points at the genome.
23
+ const SequenceFeatureHoverHighlight = observer(function SequenceFeatureHoverHighlight({ model, }) {
24
+ return (_jsxs(_Fragment, { children: [_jsx(ConnectedHoverHighlight, { model: model, getPosition: (widget, viewId) => isFeatureWidgetForView(widget, viewId)
25
+ ? widget.sequenceHoverPosition
26
+ : undefined }), model.tracks
27
+ .flatMap(track => track.displays)
28
+ .flatMap(display => {
29
+ const position = displayHoverPosition(display);
30
+ return position
31
+ ? [
32
+ _jsx(HoverPositionHighlight, { model: model, position: position }, `hover-${display.id}`),
33
+ ]
34
+ : [];
35
+ })] }));
36
+ });
37
+ export default SequenceFeatureHoverHighlight;
@@ -0,0 +1,2 @@
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ export default function SequenceFeatureHoverHighlightExtensionF(pluginManager: PluginManager): void;
@@ -0,0 +1,5 @@
1
+ import { addExtensionElement } from '@jbrowse/core/ui';
2
+ import SequenceFeatureHoverHighlight from './SequenceFeatureHoverHighlight.js';
3
+ export default function SequenceFeatureHoverHighlightExtensionF(pluginManager) {
4
+ addExtensionElement(pluginManager, 'LinearGenomeView-TracksContainerComponent', SequenceFeatureHoverHighlight);
5
+ }
@@ -0,0 +1,3 @@
1
+ import type { SequenceSearchModeProps } from './searchModes.ts';
2
+ declare const SequencePatternPanel: ({ model, handleClose, }: SequenceSearchModeProps) => import("react").JSX.Element;
3
+ export default SequencePatternPanel;
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { LabeledCheckbox } from '@jbrowse/core/ui';
4
+ import { TextField } from '@mui/material';
5
+ import { observer } from 'mobx-react';
6
+ import SearchPanelForm from './SearchPanelForm.js';
7
+ import StrandCheckboxes from './StrandCheckboxes.js';
8
+ import { addReferenceScanTrack } from './searchModes.js';
9
+ const SequencePatternPanel = observer(function SequencePatternPanel({ model, handleClose, }) {
10
+ const [value, setValue] = useState('');
11
+ const [caseInsensitive, setCaseInsensitive] = useState(true);
12
+ const [searchForward, setSearchForward] = useState(true);
13
+ const [searchReverse, setSearchReverse] = useState(true);
14
+ let patternError;
15
+ try {
16
+ new RegExp(value);
17
+ }
18
+ catch (e) {
19
+ patternError = e;
20
+ }
21
+ const canSubmit = !!value && !patternError && (searchForward || searchReverse);
22
+ function handleSubmit() {
23
+ addReferenceScanTrack(model, {
24
+ trackId: `sequence_search_${Date.now()}`,
25
+ name: `Sequence search ${value}`,
26
+ adapter: {
27
+ type: 'SequenceSearchAdapter',
28
+ search: value,
29
+ searchForward,
30
+ searchReverse,
31
+ caseInsensitive,
32
+ },
33
+ });
34
+ handleClose();
35
+ }
36
+ return (_jsxs(SearchPanelForm, { onSubmit: handleSubmit, handleClose: handleClose, submitDisabled: !canSubmit, children: [_jsx(TextField, { size: "small", value: value, onChange: e => {
37
+ setValue(e.target.value);
38
+ }, label: "Sequence pattern", placeholder: "e.g. AACT(C|T)", error: !!patternError, helperText: patternError ? `${patternError}` : 'Plain sequence or a regex' }), _jsx(StrandCheckboxes, { searchForward: searchForward, searchReverse: searchReverse, setSearchForward: setSearchForward, setSearchReverse: setSearchReverse, children: _jsx(LabeledCheckbox, { size: "small", checked: caseInsensitive, onChange: val => {
39
+ setCaseInsensitive(val);
40
+ }, label: "Case insensitive" }) })] }));
41
+ });
42
+ export default SequencePatternPanel;
@@ -1,8 +1,8 @@
1
1
  declare const SequenceSearchDialog: ({ model, handleClose, }: {
2
2
  model: {
3
3
  assemblyNames: string[];
4
- showTrack: (trackId: string) => void;
4
+ launchTrack: (trackId: string) => Promise<unknown>;
5
5
  };
6
6
  handleClose: () => void;
7
- }) => import("react/jsx-runtime").JSX.Element;
7
+ }) => import("react").JSX.Element;
8
8
  export default SequenceSearchDialog;
@@ -1,65 +1,43 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { Dialog } from '@jbrowse/core/ui';
4
- import { getSession, isSessionWithAddTracks } from '@jbrowse/core/util';
5
4
  import { makeStyles } from '@jbrowse/core/util/tss-react';
6
- import { getSnapshot } from '@jbrowse/mobx-state-tree';
7
- import { Button, Checkbox, DialogActions, DialogContent, FormControlLabel, FormGroup, TextField, Typography, } from '@mui/material';
5
+ import { ToggleButton, ToggleButtonGroup } from '@mui/material';
8
6
  import { observer } from 'mobx-react';
7
+ import CrisprGuidePanel from './CrisprGuidePanel.js';
8
+ import MotifListPanel from './MotifListPanel.js';
9
+ import SequencePatternPanel from './SequencePatternPanel.js';
9
10
  const useStyles = makeStyles()({
10
- dialogContent: {
11
- width: '40em',
11
+ modeBar: {
12
+ padding: '12px 24px 0',
12
13
  },
13
14
  });
15
+ const MODES = [
16
+ {
17
+ id: 'pattern',
18
+ label: 'Sequence pattern',
19
+ ReactComponent: SequencePatternPanel,
20
+ },
21
+ {
22
+ id: 'crispr',
23
+ label: 'CRISPR guide RNAs',
24
+ ReactComponent: CrisprGuidePanel,
25
+ },
26
+ {
27
+ id: 'motifs',
28
+ label: 'Motif list',
29
+ ReactComponent: MotifListPanel,
30
+ },
31
+ ];
14
32
  const SequenceSearchDialog = observer(function SequenceSearchDialog({ model, handleClose, }) {
15
33
  const { classes } = useStyles();
16
- const [value, setValue] = useState('');
17
- const [searchForward, setSearchForward] = useState(true);
18
- const [searchReverse, setSearchReverse] = useState(true);
19
- const [caseInsensitive, setCaseInsensitive] = useState(true);
20
- let error;
21
- try {
22
- new RegExp(value);
23
- }
24
- catch (e) {
25
- error = e;
26
- }
27
- return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: handleClose, title: "Sequence search", children: [_jsxs(DialogContent, { className: classes.dialogContent, children: [_jsx(Typography, { children: "Supply a sequence to search for. A track will be created with the resulting matches once submitted. You can also supply regex style expressions e.g. AACT(C|T)." }), _jsx(TextField, { value: value, onChange: e => {
28
- setValue(e.target.value);
29
- }, helperText: "Sequence search pattern" }), _jsxs(FormGroup, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: searchForward, onChange: event => {
30
- setSearchForward(event.target.checked);
31
- } }), label: "Search forward strand" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: searchReverse, onChange: event => {
32
- setSearchReverse(event.target.checked);
33
- } }), label: "Search reverse strand" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: caseInsensitive, onChange: event => {
34
- setCaseInsensitive(event.target.checked);
35
- } }), label: "Case insensitive" })] }), error ? _jsx(Typography, { color: "error", children: `${error}` }) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: () => {
36
- if (value) {
37
- const trackId = `sequence_search_${Date.now()}`;
38
- const session = getSession(model);
39
- const { assemblyManager } = session;
40
- const assemblyName = model.assemblyNames[0];
41
- if (isSessionWithAddTracks(session)) {
42
- session.addTrackConf({
43
- trackId,
44
- name: `Sequence search ${value}`,
45
- assemblyNames: [assemblyName],
46
- type: 'FeatureTrack',
47
- adapter: {
48
- type: 'SequenceSearchAdapter',
49
- search: value,
50
- searchForward,
51
- searchReverse,
52
- caseInsensitive,
53
- sequenceAdapter: getSnapshot(assemblyManager.get(assemblyName)?.configuration.sequence
54
- .adapter),
55
- },
56
- });
57
- model.showTrack(trackId);
58
- }
59
- }
60
- handleClose();
61
- }, variant: "contained", color: "primary", children: "Submit" }), _jsx(Button, { onClick: () => {
62
- handleClose();
63
- }, variant: "contained", color: "secondary", children: "Close" })] })] }));
34
+ const [modeId, setModeId] = useState(MODES[0].id);
35
+ const active = MODES.find(m => m.id === modeId) ?? MODES[0];
36
+ const { ReactComponent } = active;
37
+ return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: handleClose, title: "Sequence search", children: [_jsx("div", { className: classes.modeBar, children: _jsx(ToggleButtonGroup, { exclusive: true, fullWidth: true, size: "small", value: active.id, onChange: (_event, value) => {
38
+ if (value) {
39
+ setModeId(value);
40
+ }
41
+ }, children: MODES.map(m => (_jsx(ToggleButton, { value: m.id, children: m.label }, m.id))) }) }), _jsx(ReactComponent, { model: model, handleClose: handleClose })] }));
64
42
  });
65
43
  export default SequenceSearchDialog;
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ export default function StrandCheckboxes({ searchForward, searchReverse, setSearchForward, setSearchReverse, children, }: {
3
+ searchForward: boolean;
4
+ searchReverse: boolean;
5
+ setSearchForward: (arg: boolean) => void;
6
+ setSearchReverse: (arg: boolean) => void;
7
+ children?: ReactNode;
8
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { LabeledCheckbox } from '@jbrowse/core/ui';
3
+ import { FormGroup, Typography } from '@mui/material';
4
+ // Forward/reverse strand checkboxes plus the "select at least one" guard, shared
5
+ // by the sequence-search mode panels. Extra checkboxes for a specific panel (e.g.
6
+ // "Case insensitive") slot in alongside via `children`.
7
+ export default function StrandCheckboxes({ searchForward, searchReverse, setSearchForward, setSearchReverse, children, }) {
8
+ return (_jsxs(_Fragment, { children: [_jsxs(FormGroup, { row: true, children: [_jsx(LabeledCheckbox, { size: "small", checked: searchForward, onChange: val => {
9
+ setSearchForward(val);
10
+ }, label: "Forward strand" }), _jsx(LabeledCheckbox, { size: "small", checked: searchReverse, onChange: val => {
11
+ setSearchReverse(val);
12
+ }, label: "Reverse strand" }), children] }), !searchForward && !searchReverse ? (_jsx(Typography, { color: "error", variant: "body2", children: "Select at least one strand" })) : null] }));
13
+ }
@@ -4,5 +4,5 @@ type LGV = LinearGenomeViewModel;
4
4
  declare const TrackContainer: ({ model, track, }: {
5
5
  model: LGV;
6
6
  track: BaseTrackModel;
7
- }) => import("react/jsx-runtime").JSX.Element;
7
+ }) => import("react").JSX.Element;
8
8
  export default TrackContainer;
@@ -1,58 +1,102 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRef } from 'react';
3
- import { ErrorMessage, ResizeHandle } from '@jbrowse/core/ui';
2
+ import { ErrorBanner, ResizeHandle } from '@jbrowse/core/ui';
4
3
  import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
5
4
  import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
6
- import { isAlive } from '@jbrowse/mobx-state-tree';
5
+ import { TrackOverlaySlot } from '@jbrowse/display-ui';
7
6
  import { Paper } from '@mui/material';
8
7
  import { observer } from 'mobx-react';
9
- import Gridlines from "./Gridlines.js";
10
- import TrackLabelContainer from "./TrackLabelContainer.js";
11
- import TrackRenderingContainer from "./TrackRenderingContainer.js";
12
- import { shouldSwapTracks } from "./util.js";
13
- const useStyles = makeStyles()(theme => ({
8
+ import { RESIZE_HANDLE_HEIGHT, TRACK_OUTLINE_BORDER, TRACK_TOP_GAP, } from '../consts.js';
9
+ import Gridlines from './Gridlines.js';
10
+ import PaddingBlocks from './PaddingBlocks.js';
11
+ import TrackLabel from './TrackLabel.js';
12
+ import TrackRenderingContainer from './TrackRenderingContainer.js';
13
+ const useStyles = makeStyles()({
14
+ // No `overflow`: paint containment already clips to the padding box, and an
15
+ // overflow would only add a scroll container — the spurious second scrollbar
16
+ // described in TrackRenderingContainer. flow-root keeps the block formatting
17
+ // context that `overflow: hidden` used to establish as a side effect (neither
18
+ // `clip` nor no overflow does), so child margins still can't collapse through
19
+ // and shift the track — which the breakpoint split view would pick up, since
20
+ // its connector overlay measures trackRefs' getBoundingClientRect().top.
14
21
  root: {
15
- marginTop: 2,
16
- overflow: 'hidden',
22
+ marginTop: TRACK_TOP_GAP,
17
23
  position: 'relative',
24
+ display: 'flow-root',
18
25
  contain: 'layout style paint',
19
26
  },
20
27
  unpinnedTrack: {
21
28
  background: 'none',
22
29
  },
30
+ // in flow at the bottom of the Paper, and outside `trackContent` — so a
31
+ // `bottom:0` portaled overlay (the status chips) lands on the track content's
32
+ // bottom edge rather than having to subtract this height back out. The height
33
+ // arrives inline from RESIZE_HANDLE_HEIGHT, which the model's offset
34
+ // arithmetic reads too.
35
+ //
36
+ // No `bar`: a divider drawn at rest under every track read as a band of its
37
+ // own down the whole view. It keeps its RESIZE_HANDLE_HEIGHT of space in flow
38
+ // and reveals itself under the pointer at `action.disabled`, the weight a
39
+ // `bar` rests at.
23
40
  resizeHandle: {
24
- height: 4,
25
- boxSizing: 'border-box',
26
41
  position: 'relative',
27
- background: 'transparent',
28
- '&:hover': {
29
- background: theme.palette.divider,
30
- },
31
42
  },
32
- }));
43
+ // in-flow, so the label pushes the track body down by its own height. The
44
+ // margin is that push plus a gap: without it the body starts on the label's
45
+ // border-box edge, and the Paper's drop shadow (which reaches ~4px past it)
46
+ // lands on the first rows of features. Vertical margins count on an atomic
47
+ // inline-level box, so this grows the line box rather than collapsing away.
48
+ //
49
+ // 8, not 4. At 4 the whole margin went to clearing the shadow and nothing
50
+ // was left over as a gap: measured on desktop-ispcr-results, where the PCR
51
+ // product is a feature on the display's FIRST row, the chip's bottom border
52
+ // and the feature's top border came out ~2px apart and read as one line
53
+ // (reviewer: "the tracklabels:offset is just a little bit overlapping the
54
+ // tracklabel still"). Most tracks hide this because their display adds its
55
+ // own top padding before the first row. 8 keeps the ~4 the shadow needs and
56
+ // spends the other 4 on clearance.
57
+ trackLabelOffset: {
58
+ position: 'relative',
59
+ display: 'inline-block',
60
+ marginBottom: 8,
61
+ },
62
+ trackLabelOverlap: {
63
+ position: 'absolute',
64
+ },
65
+ });
33
66
  const TrackContainer = observer(function TrackContainer({ model, track, }) {
34
67
  const { classes } = useStyles();
35
- const display = track.displays[0];
36
- const { draggingTrackId, showTrackOutlines } = model;
37
- const ref = useRef(null);
38
- return (_jsxs(Paper, { ref: ref, className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onClick: event => {
39
- if (event.detail === 2 && !display.featureIdUnderMouse) {
40
- const left = ref.current?.getBoundingClientRect().left || 0;
41
- model.zoomTo(model.bpPerPx / 2, event.clientX - left, true);
42
- }
43
- }, onDragOver: event => {
44
- if (isAlive(display) &&
45
- draggingTrackId !== undefined &&
46
- draggingTrackId !== display.id) {
47
- const draggingIdx = model.tracks.findIndex(t => t.id === draggingTrackId);
48
- const targetIdx = model.tracks.findIndex(t => t.id === track.id);
49
- const movingDown = targetIdx > draggingIdx;
50
- const currentY = event.clientY;
51
- if (shouldSwapTracks(model.lastTrackDragY, currentY, movingDown)) {
52
- model.setLastTrackDragY(currentY);
53
- model.moveTrack(draggingTrackId, track.id);
54
- }
55
- }
56
- }, children: [track.pinned ? _jsx(Gridlines, { model: model, offset: 1 }) : null, _jsx(TrackLabelContainer, { track: track, view: model }), _jsx(ErrorBoundary, { FallbackComponent: e => _jsx(ErrorMessage, { error: e.error }), children: _jsx(TrackRenderingContainer, { model: model, track: track }) }), _jsx(ResizeHandle, { onDrag: display.resizeHeight, className: classes.resizeHandle })] }));
68
+ // an LGV track always holds at least one linear display (activeDisplay =
69
+ // displays[0]); narrow to the linear shape for prefersOffset/resizeHeight
70
+ const display = track.activeDisplay;
71
+ const { showTrackOutlines } = model;
72
+ // The Paper's 1px border, present iff outlines are on. Everything laid out in
73
+ // the *display's* coordinates has to cancel it — the rendering container
74
+ // shifts left by it (see renderingComponentContainer), so the overlay node and
75
+ // the masks over it have to move by the same amount or they land a pixel off
76
+ // the data. One binding rather than three copies of the ternary, because the
77
+ // three agreeing is the whole point.
78
+ const outlineOffset = showTrackOutlines ? TRACK_OUTLINE_BORDER : 0;
79
+ const trackLabelStyle = model.effectiveTrackLabels !== 'overlapping' || display.prefersOffset
80
+ ? classes.trackLabelOffset
81
+ : classes.trackLabelOverlap;
82
+ return (_jsxs(Paper, { className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onDragOver: event => {
83
+ model.onTrackDragOver(track.id, event.clientY);
84
+ }, children: [track.pinned ? _jsx(Gridlines, { model: model, offset: outlineOffset }) : null, model.effectiveTrackLabels !== 'hidden' ? (_jsx(TrackLabel, { track: track, className: trackLabelStyle })) : null, _jsx(TrackOverlaySlot, { zIndex: 100, overlayStyle: { left: -outlineOffset }, children: _jsx(ErrorBoundary, { resetKeys: [display.id], FallbackComponent: e => (_jsx(ErrorBanner, { error: e.error, onReset: e.resetErrorBoundary })), children: _jsx(TrackRenderingContainer, { model: model, track: track }) }) }), _jsx(PaddingBlocks, { model: model, offset: outlineOffset }), _jsx(ResizeHandle, { style: { height: RESIZE_HANDLE_HEIGHT }, onDrag: distance => display.resizeHeight(distance),
85
+ // the drag's shortcut: grow the track by whatever it is scrolled over,
86
+ // so a pileup showing three rows of forty opens to all forty
87
+ // Optional: only a display that scrolls its own content has anything
88
+ // hidden to expand to.
89
+ onDoubleClick: () => {
90
+ display.expandToContentHeight?.();
91
+ },
92
+ // Bracket the drag so a display can sit an expensive per-frame layer
93
+ // out of it (see `resizing` on TrackHeightMixin). Causal rather than a
94
+ // per-display debounce: the handle owns both ends of the gesture. On
95
+ // the track, so this holds whatever the active display is.
96
+ onDragStart: () => {
97
+ track.setResizing(true);
98
+ }, onDragEnd: () => {
99
+ track.setResizing(false);
100
+ }, className: classes.resizeHandle })] }));
57
101
  });
58
102
  export default TrackContainer;
@@ -1,7 +1,6 @@
1
1
  import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
- interface Props {
2
+ declare const TrackLabel: ({ track, className, }: {
3
3
  track: BaseTrackModel;
4
4
  className?: string;
5
- }
6
- declare const TrackLabel: ({ track, className }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ }) => import("react").JSX.Element;
7
6
  export default TrackLabel;
@@ -1,42 +1,29 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { SanitizedHTML } from '@jbrowse/core/ui';
3
- import { getContainingView, getSession } from '@jbrowse/core/util';
3
+ import { getSession } from '@jbrowse/core/util';
4
4
  import { getTrackName } from '@jbrowse/core/util/tracks';
5
5
  import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
6
- import CloseIcon from '@mui/icons-material/Close';
7
- import { IconButton, Paper, Typography, alpha } from '@mui/material';
6
+ import { Paper, Typography } from '@mui/material';
8
7
  import { observer } from 'mobx-react';
9
- import TrackLabelDragHandle from "./TrackLabelDragHandle.js";
10
- import TrackLabelMenu from "./TrackLabelMenu.js";
8
+ import { TrackLabelCloseButton, TrackLabelMinimizeButton, } from './TrackLabelButtons.js';
9
+ import TrackLabelDragHandle from './TrackLabelDragHandle.js';
10
+ import TrackLabelMenu from './TrackLabelMenu.js';
11
+ import TrackLabelRefNameWarning from './TrackLabelRefNameWarning.js';
11
12
  const useStyles = makeStyles()(theme => ({
12
13
  root: {
14
+ // above breakpoint split view
13
15
  zIndex: 200,
14
- background: alpha(theme.palette.background.paper, 0.8),
15
- '&:hover': {
16
- background: theme.palette.background.paper,
17
- },
16
+ background: theme.palette.background.paper,
18
17
  },
19
18
  trackName: {
20
19
  margin: '0 auto',
21
20
  width: '90%',
22
- fontSize: '0.8rem',
23
21
  pointerEvents: 'none',
24
22
  },
25
- iconButton: {
26
- padding: theme.spacing(1),
27
- },
28
23
  }));
29
- const TrackLabel = observer(function TrackLabel({ track, className }) {
24
+ const TrackLabel = observer(function TrackLabel({ track, className, }) {
30
25
  const { classes } = useStyles();
31
- const view = getContainingView(track);
32
- const session = getSession(track);
33
- const { minimized } = track;
34
- const trackId = track.trackId;
35
- const trackName = getTrackName(track.configuration, session);
36
- return (_jsxs(Paper, { className: cx(className, classes.root), onClick: event => {
37
- event.stopPropagation();
38
- }, children: [_jsx(TrackLabelDragHandle, { track: track, trackId: trackId, view: view }), _jsx(IconButton, { onClick: () => view.hideTrack(trackId), className: classes.iconButton, title: "close this track", children: _jsx(CloseIcon, { fontSize: "small" }) }), _jsx(Typography, { variant: "body1", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: [trackName, minimized ? '(minimized)' : '']
39
- .filter(f => !!f)
40
- .join(' ') }) }), _jsx(TrackLabelMenu, { track: track })] }));
26
+ const trackName = getTrackName(track.configuration, getSession(track));
27
+ return (_jsxs(Paper, { className: cx(className, classes.root), children: [_jsx(TrackLabelDragHandle, { track: track }), _jsx(TrackLabelCloseButton, { track: track }), _jsx(TrackLabelMinimizeButton, { track: track }), _jsx(Typography, { variant: "body2", component: "span", className: classes.trackName, children: _jsx(SanitizedHTML, { html: trackName }) }), _jsx(TrackLabelRefNameWarning, { track: track }), _jsx(TrackLabelMenu, { track: track })] }));
41
28
  });
42
29
  export default TrackLabel;
@@ -0,0 +1,7 @@
1
+ import type { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
+ export declare const TrackLabelCloseButton: ({ track, }: {
3
+ track: BaseTrackModel;
4
+ }) => import("react").JSX.Element;
5
+ export declare const TrackLabelMinimizeButton: ({ track }: {
6
+ track: BaseTrackModel;
7
+ }) => import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getContainingView } from '@jbrowse/core/util';
3
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
4
+ import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
5
+ import ArrowRightIcon from '@mui/icons-material/ArrowRight';
6
+ import CloseIcon from '@mui/icons-material/Close';
7
+ import { IconButton } from '@mui/material';
8
+ import { observer } from 'mobx-react';
9
+ const useStyles = makeStyles()({
10
+ iconButton: {
11
+ padding: 0,
12
+ },
13
+ });
14
+ // Keyed by trackId, not by the track's display name or by the model id: the
15
+ // name is config the user can change and the model id is minted per session, so
16
+ // neither survives being written into a test or a screenshot spec. The only
17
+ // other handle these buttons offered was `title`, which is shared by every
18
+ // track's copy of the button — so reaching ONE of them meant walking up to the
19
+ // Paper the label and the rendering container share and matching that
20
+ // container's testid through `:has()`. That worked and nobody should have to
21
+ // write it.
22
+ export const TrackLabelCloseButton = observer(function TrackLabelCloseButton({ track, }) {
23
+ const { classes } = useStyles();
24
+ const view = getContainingView(track);
25
+ return (_jsx(IconButton, { onClick: () => view.hideTrack(track.trackId), className: classes.iconButton, title: "close this track", "data-testid": `track-close-${track.trackId}`, children: _jsx(CloseIcon, { fontSize: "small" }) }));
26
+ });
27
+ export const TrackLabelMinimizeButton = observer(function TrackLabelMinimizeButton({ track }) {
28
+ const { classes } = useStyles();
29
+ const { minimized } = track;
30
+ return (_jsx(IconButton, { onClick: () => {
31
+ track.setMinimized(!minimized);
32
+ }, className: classes.iconButton, title: minimized ? 'restore track' : 'minimize track', "data-testid": `track-minimize-${track.trackId}`, children: minimized ? _jsx(ArrowRightIcon, {}) : _jsx(ArrowDropDownIcon, {}) }));
33
+ });