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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +202 -71
  2. package/esm/FeatureTrack/configSchema.js +47 -1
  3. package/esm/FeatureTrack/index.js +1 -1
  4. package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
  5. package/esm/LaunchLinearGenomeView/index.js +6 -12
  6. package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
  7. package/esm/LinearGenomeView/afterAttach.js +265 -120
  8. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  9. package/esm/LinearGenomeView/components/CenterLine.js +20 -9
  10. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
  11. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
  12. package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
  13. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +142 -0
  14. package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
  15. package/esm/LinearGenomeView/components/Cytobands.js +76 -53
  16. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +8 -3
  17. package/esm/LinearGenomeView/components/ExportSvgDialog.js +15 -67
  18. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
  19. package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
  20. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
  21. package/esm/LinearGenomeView/components/Gridlines.js +29 -58
  22. package/esm/LinearGenomeView/components/Header.d.ts +1 -1
  23. package/esm/LinearGenomeView/components/Header.js +42 -16
  24. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
  25. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
  26. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
  27. package/esm/LinearGenomeView/components/HeaderPanControls.js +18 -8
  28. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
  29. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
  30. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
  31. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
  32. package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
  33. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
  34. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
  35. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
  36. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
  37. package/esm/LinearGenomeView/components/HeaderZoomControls.js +38 -52
  38. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  39. package/esm/LinearGenomeView/components/Highlight.js +21 -25
  40. package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
  41. package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
  42. package/esm/LinearGenomeView/components/HighlightChip.d.ts +8 -0
  43. package/esm/LinearGenomeView/components/HighlightChip.js +13 -0
  44. package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
  45. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
  46. package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
  47. package/esm/LinearGenomeView/components/ImportForm.js +95 -61
  48. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
  49. package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -6
  50. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +88 -30
  52. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/MiniControls.js +14 -10
  54. package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
  55. package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
  56. package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
  57. package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
  58. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
  59. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
  60. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
  61. package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
  62. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
  63. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +25 -0
  64. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  65. package/esm/LinearGenomeView/components/OverviewRubberband.js +29 -67
  66. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
  67. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
  68. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
  69. package/esm/LinearGenomeView/components/OverviewScalebar.js +87 -83
  70. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  71. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +57 -32
  72. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
  73. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
  74. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
  75. package/esm/LinearGenomeView/components/PaddingBlocks.js +56 -0
  76. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  77. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +19 -0
  78. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
  79. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
  80. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
  81. package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
  82. package/esm/LinearGenomeView/components/Rubberband.d.ts +2 -3
  83. package/esm/LinearGenomeView/components/Rubberband.js +15 -17
  84. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  85. package/esm/LinearGenomeView/components/SVGHighlightBand.js +8 -0
  86. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
  87. package/esm/LinearGenomeView/components/Scalebar.js +20 -22
  88. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  90. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  91. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +157 -126
  92. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  93. package/esm/LinearGenomeView/components/SearchBox.js +61 -68
  94. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  95. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  96. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +5 -4
  97. package/esm/LinearGenomeView/components/SearchResultsDialog.js +6 -8
  98. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +5 -3
  99. package/esm/LinearGenomeView/components/SearchResultsTable.js +31 -56
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  102. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  103. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  104. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  105. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  106. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +3 -5
  107. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  108. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  109. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  110. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  111. package/esm/LinearGenomeView/components/TrackContainer.js +136 -38
  112. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  113. package/esm/LinearGenomeView/components/TrackLabel.js +20 -26
  114. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  115. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  116. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  117. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  118. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  119. package/esm/LinearGenomeView/components/TrackLabelMenu.js +35 -87
  120. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  121. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  122. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +5 -2
  123. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +66 -24
  124. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/TracksContainer.js +53 -32
  126. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -3
  127. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -26
  128. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  129. package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
  130. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  131. package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
  132. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  133. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  134. package/esm/LinearGenomeView/components/fetchSequence.d.ts +6 -8
  135. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  136. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  137. package/esm/LinearGenomeView/components/recentLocationsMenu.js +46 -0
  138. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  139. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  140. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  141. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  142. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +9 -67
  143. package/esm/LinearGenomeView/components/useRangeSelect.js +54 -102
  144. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  145. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  146. package/esm/LinearGenomeView/components/useSideScroll.d.ts +17 -3
  147. package/esm/LinearGenomeView/components/useSideScroll.js +163 -45
  148. package/esm/LinearGenomeView/components/util.d.ts +24 -6
  149. package/esm/LinearGenomeView/components/util.js +28 -5
  150. package/esm/LinearGenomeView/consts.d.ts +9 -2
  151. package/esm/LinearGenomeView/consts.js +20 -2
  152. package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
  153. package/esm/LinearGenomeView/containingLgv.js +23 -0
  154. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  155. package/esm/LinearGenomeView/flyTo.js +135 -0
  156. package/esm/LinearGenomeView/headerFit.d.ts +29 -0
  157. package/esm/LinearGenomeView/headerFit.js +72 -0
  158. package/esm/LinearGenomeView/index.d.ts +28 -3
  159. package/esm/LinearGenomeView/index.js +13 -7
  160. package/esm/LinearGenomeView/keyboardHandler.d.ts +9 -0
  161. package/esm/LinearGenomeView/keyboardHandler.js +25 -1
  162. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  163. package/esm/LinearGenomeView/launchKeys.js +27 -0
  164. package/esm/LinearGenomeView/lazyDialogs.d.ts +8 -14
  165. package/esm/LinearGenomeView/lazyDialogs.js +4 -3
  166. package/esm/LinearGenomeView/linkedViewSync.d.ts +12 -0
  167. package/esm/LinearGenomeView/linkedViewSync.js +36 -0
  168. package/esm/LinearGenomeView/menuItems.d.ts +25 -2
  169. package/esm/LinearGenomeView/menuItems.js +306 -179
  170. package/esm/LinearGenomeView/model.d.ts +3363 -164
  171. package/esm/LinearGenomeView/model.js +2548 -565
  172. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
  173. package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
  174. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
  175. package/esm/LinearGenomeView/showRegionsWithUndo.js +50 -0
  176. package/esm/LinearGenomeView/stickyChrome.d.ts +15 -0
  177. package/esm/LinearGenomeView/stickyChrome.js +26 -0
  178. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
  179. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +17 -18
  180. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +5 -3
  181. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +34 -35
  182. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
  183. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
  184. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
  185. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
  186. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
  187. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +73 -41
  188. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
  189. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +20 -3
  190. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
  191. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +36 -0
  192. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
  193. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +66 -39
  194. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
  195. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +9 -7
  196. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
  197. package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
  198. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
  199. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +54 -9
  200. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +9 -15
  201. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +17 -21
  202. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
  203. package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
  204. package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
  205. package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
  206. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
  207. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
  208. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
  209. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +245 -0
  210. package/esm/LinearGenomeView/svgcomponents/util.d.ts +96 -5
  211. package/esm/LinearGenomeView/svgcomponents/util.js +242 -4
  212. package/esm/LinearGenomeView/types.d.ts +20 -37
  213. package/esm/LinearGenomeView/types.js +1 -0
  214. package/esm/LinearGenomeView/util.d.ts +347 -12
  215. package/esm/LinearGenomeView/util.js +577 -62
  216. package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
  217. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +40 -0
  218. package/esm/MultiLevelRubberband/index.d.ts +4 -0
  219. package/esm/MultiLevelRubberband/index.js +3 -0
  220. package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
  221. package/esm/MultiLevelRubberband/menuItems.js +52 -0
  222. package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
  223. package/esm/MultiLevelRubberband/rowLabel.js +27 -0
  224. package/esm/MultiLevelRubberband/types.d.ts +7 -0
  225. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +25 -0
  226. package/esm/MultiLevelRubberband/useRangeSelect.js +120 -0
  227. package/esm/displayKitTests/perRegionTestEnv.d.ts +1391 -0
  228. package/esm/displayKitTests/perRegionTestEnv.js +142 -0
  229. package/esm/index.d.ts +50 -1245
  230. package/esm/index.js +88 -33
  231. package/esm/searchUtils.d.ts +62 -12
  232. package/esm/searchUtils.js +335 -48
  233. package/esm/shared/RubberbandSpan.d.ts +15 -0
  234. package/esm/shared/RubberbandSpan.js +34 -0
  235. package/esm/shared/coordLabels.d.ts +47 -0
  236. package/esm/shared/coordLabels.js +133 -0
  237. package/esm/shared/useWindowDrag.d.ts +18 -0
  238. package/esm/shared/useWindowDrag.js +45 -0
  239. package/package.json +18 -19
  240. package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
  241. package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
  242. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
  243. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
  244. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  245. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
  246. package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
  247. package/esm/BaseLinearDisplay/components/Block.js +0 -45
  248. package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  249. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
  250. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  251. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
  252. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
  253. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
  254. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
  255. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
  256. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
  257. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
  258. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
  259. package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
  260. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
  261. package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
  262. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  263. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
  264. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
  265. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
  266. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
  267. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
  268. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
  269. package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
  270. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
  271. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
  272. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
  273. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
  274. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
  275. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
  276. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  277. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
  278. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
  279. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
  280. package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
  281. package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
  282. package/esm/BaseLinearDisplay/components/util.js +0 -107
  283. package/esm/BaseLinearDisplay/index.d.ts +0 -17
  284. package/esm/BaseLinearDisplay/index.js +0 -13
  285. package/esm/BaseLinearDisplay/model.d.ts +0 -1197
  286. package/esm/BaseLinearDisplay/model.js +0 -432
  287. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  288. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
  289. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
  290. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
  291. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
  292. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
  293. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  294. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
  295. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  296. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
  297. package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  298. package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
  299. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
  300. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
  301. package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
  302. package/esm/BaseLinearDisplay/models/util.js +0 -43
  303. package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
  304. package/esm/BaseLinearDisplay/renderSvg.js +0 -63
  305. package/esm/BaseLinearDisplay/types.d.ts +0 -43
  306. package/esm/BaseLinearDisplay/types.js +0 -3
  307. package/esm/BaseLinearDisplay/util.d.ts +0 -16
  308. package/esm/BaseLinearDisplay/util.js +0 -71
  309. package/esm/BasicTrack/configSchema.d.ts +0 -85
  310. package/esm/BasicTrack/configSchema.js +0 -8
  311. package/esm/BasicTrack/index.d.ts +0 -2
  312. package/esm/BasicTrack/index.js +0 -12
  313. package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
  314. package/esm/LinearBareDisplay/configSchema.js +0 -11
  315. package/esm/LinearBareDisplay/index.d.ts +0 -4
  316. package/esm/LinearBareDisplay/index.js +0 -20
  317. package/esm/LinearBareDisplay/model.d.ts +0 -1196
  318. package/esm/LinearBareDisplay/model.js +0 -32
  319. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
  320. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
  321. package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
  322. package/esm/LinearBasicDisplay/configSchema.js +0 -11
  323. package/esm/LinearBasicDisplay/index.d.ts +0 -4
  324. package/esm/LinearBasicDisplay/index.js +0 -20
  325. package/esm/LinearBasicDisplay/model.d.ts +0 -1391
  326. package/esm/LinearBasicDisplay/model.js +0 -158
  327. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
  328. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
  329. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  330. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
  331. package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
  332. package/esm/LinearFeatureDisplay/configSchema.js +0 -11
  333. package/esm/LinearFeatureDisplay/index.d.ts +0 -3
  334. package/esm/LinearFeatureDisplay/index.js +0 -2
  335. package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
  336. package/esm/LinearFeatureDisplay/model.js +0 -305
  337. package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
  338. package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
  339. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  340. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
  341. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
  342. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
  343. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  344. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
  345. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  346. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
  347. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  348. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
  349. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  350. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
  351. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  352. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
  353. package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  354. package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
  355. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  356. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
  357. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  358. package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
  359. package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
  360. package/esm/LinearGenomeView/svgExportUtil.js +0 -6
  361. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  362. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
  363. /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
@@ -1,64 +1,39 @@
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 { canonicalLocString } from '@jbrowse/core/TextSearch/places';
3
+ import { readConfObject } from '@jbrowse/core/configuration';
4
+ import { SanitizedHTML } from '@jbrowse/core/ui';
5
+ import { getSession } from '@jbrowse/core/util';
3
6
  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, }) {
7
+ import { observer } from 'mobx-react';
8
+ import { isOpenInView } from '../../searchUtils.js';
9
+ const SearchResultsTable = observer(function SearchResultsTable({ searchResults, assemblyName, model, handleClose, onPick, }) {
6
10
  const session = getSession(model);
7
- const { pluginManager } = getEnv(session);
8
11
  const { assemblyManager } = session;
9
- const assemblyName = optAssemblyName || model.displayedRegions[0].assemblyName;
10
12
  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
13
  function getTrackName(trackId) {
18
- return trackId !== undefined ? session.getTracksById()[trackId]?.name : '';
14
+ const conf = trackId !== undefined ? session.getTrackById(trackId) : undefined;
15
+ return conf ? readConfObject(conf, 'name') : '';
19
16
  }
20
- async function handleClick(result) {
21
- if (result.hasLocation()) {
22
- await navToOption({
23
- option: result,
24
- model,
25
- assemblyName,
26
- });
27
- }
28
- 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 });
36
- }
17
+ // A location the assembly can't resolve is listed as-is: Go navigates
18
+ // through navToOption, which reports its own failure
19
+ function formatLocation(locString) {
20
+ return assembly && locString
21
+ ? canonicalLocString(locString, assembly)
22
+ : locString;
37
23
  }
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
- }
24
+ // A hit in a track that is already on screen is usually the one meant, so it
25
+ // is listed first rather than given a control that says so. sort is stable,
26
+ // so everything else keeps the ranked order it arrived in.
27
+ const ordered = [...searchResults].sort((a, b) => Number(isOpenInView(b, model)) - Number(isOpenInView(a, model)));
28
+ 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: _jsx(SanitizedHTML, { html: getTrackName(result.getTrackId()) || 'N/A' }) }), _jsx(TableCell, { align: "right", children: _jsx(Button, { onClick: async () => {
29
+ try {
30
+ await onPick(result);
31
+ }
32
+ catch (e) {
33
+ console.error(e);
34
+ session.notifyError(`${e}`, e);
35
+ }
36
+ handleClose();
37
+ }, color: "primary", variant: "contained", children: "Go" }) })] }, result.getId()))) })] }) }));
38
+ });
39
+ 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,6 @@
1
+ import type { SequenceSearchModel } from './searchModes.ts';
1
2
  declare const SequenceSearchDialog: ({ model, handleClose, }: {
2
- model: {
3
- assemblyNames: string[];
4
- showTrack: (trackId: string) => void;
5
- };
3
+ model: SequenceSearchModel;
6
4
  handleClose: () => void;
7
- }) => import("react/jsx-runtime").JSX.Element;
5
+ }) => import("react").JSX.Element;
8
6
  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,156 @@
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 { useEffect, useState } from 'react';
3
+ import { ErrorBanner, ResizeHandle } from '@jbrowse/core/ui';
4
4
  import { ErrorBoundary } from '@jbrowse/core/ui/ErrorBoundary';
5
5
  import { cx, makeStyles } from '@jbrowse/core/util/tss-react';
6
+ import { TrackOverlaySlot } from '@jbrowse/display-ui';
6
7
  import { isAlive } from '@jbrowse/mobx-state-tree';
7
8
  import { Paper } from '@mui/material';
8
9
  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 => ({
10
+ import { RESIZE_HANDLE_HEIGHT, TRACK_OUTLINE_BORDER, TRACK_TOP_GAP, } from '../consts.js';
11
+ import Gridlines from './Gridlines.js';
12
+ import PaddingBlocks from './PaddingBlocks.js';
13
+ import TrackLabel from './TrackLabel.js';
14
+ import TrackRenderingContainer from './TrackRenderingContainer.js';
15
+ const useStyles = makeStyles()({
16
+ // No `overflow`: paint containment already clips to the padding box, and an
17
+ // overflow would only add a scroll container — the spurious second scrollbar
18
+ // described in TrackRenderingContainer. flow-root keeps the block formatting
19
+ // context that `overflow: hidden` used to establish as a side effect (neither
20
+ // `clip` nor no overflow does), so child margins still can't collapse through
21
+ // and shift the track — which would put the pixels off the model's offset
22
+ // arithmetic, which the breakpoint split view draws its connectors from.
14
23
  root: {
15
- marginTop: 2,
16
- overflow: 'hidden',
24
+ marginTop: TRACK_TOP_GAP,
17
25
  position: 'relative',
26
+ display: 'flow-root',
18
27
  contain: 'layout style paint',
19
28
  },
20
29
  unpinnedTrack: {
21
30
  background: 'none',
22
31
  },
32
+ // in flow at the bottom of the Paper, and outside `trackContent` — so a
33
+ // `bottom:0` portaled overlay (the status chips) lands on the track content's
34
+ // bottom edge rather than having to subtract this height back out. The height
35
+ // arrives inline from RESIZE_HANDLE_HEIGHT, which the model's offset
36
+ // arithmetic reads too.
37
+ //
38
+ // No `bar`: a divider drawn at rest under every track read as a band of its
39
+ // own down the whole view. It keeps its RESIZE_HANDLE_HEIGHT of space in flow
40
+ // and reveals itself under the pointer at `action.disabled`, the weight a
41
+ // `bar` rests at.
23
42
  resizeHandle: {
24
- height: 4,
25
- boxSizing: 'border-box',
26
43
  position: 'relative',
27
- background: 'transparent',
28
- '&:hover': {
29
- background: theme.palette.divider,
30
- },
31
44
  },
32
- }));
45
+ // in-flow, so the label pushes the track body down by its own height. The
46
+ // margin is that push plus a gap: without it the body starts on the label's
47
+ // border-box edge, and the Paper's drop shadow (which reaches ~4px past it)
48
+ // lands on the first rows of features. Vertical margins count on an atomic
49
+ // inline-level box, so this grows the line box rather than collapsing away.
50
+ //
51
+ // 8, not 4. At 4 the whole margin went to clearing the shadow and nothing
52
+ // was left over as a gap: measured on desktop-ispcr-results, where the PCR
53
+ // product is a feature on the display's FIRST row, the chip's bottom border
54
+ // and the feature's top border came out ~2px apart and read as one line
55
+ // (reviewer: "the tracklabels:offset is just a little bit overlapping the
56
+ // tracklabel still"). Most tracks hide this because their display adds its
57
+ // own top padding before the first row. 8 keeps the ~4 the shadow needs and
58
+ // spends the other 4 on clearance.
59
+ trackLabelOffset: {
60
+ position: 'relative',
61
+ marginBottom: 8,
62
+ },
63
+ trackLabelOverlap: {
64
+ position: 'absolute',
65
+ },
66
+ // in flow, so the track keeps the banner's height, and raised over the
67
+ // `PaddingBlocks` painted after it
68
+ crashBanner: {
69
+ position: 'relative',
70
+ zIndex: 1,
71
+ },
72
+ });
73
+ // Measures the in-flow label band, the distance from the Paper's content top to
74
+ // the rendering container, into the model. Observes the Paper: it grows and
75
+ // shrinks with the label, the label setting, and the display, and each of those
76
+ // can move the container. Published after a requestAnimationFrame like
77
+ // useWidthSetter, and cleared on unmount so a removed track leaves no band.
78
+ function useTrackLabelBand(model, trackId) {
79
+ const [paper, setPaper] = useState(null);
80
+ const [container, setContainer] = useState(null);
81
+ useEffect(() => {
82
+ if (paper && container && 'ResizeObserver' in window) {
83
+ let token;
84
+ const publish = () => {
85
+ token = requestAnimationFrame(() => {
86
+ if (isAlive(model)) {
87
+ const paperRect = paper.getBoundingClientRect();
88
+ const band = container.getBoundingClientRect().top -
89
+ paperRect.top -
90
+ paper.clientTop;
91
+ model.setTrackLabelBand(trackId, band);
92
+ }
93
+ });
94
+ };
95
+ publish();
96
+ const observer = new ResizeObserver(publish);
97
+ observer.observe(paper);
98
+ return () => {
99
+ observer.disconnect();
100
+ if (token !== undefined) {
101
+ cancelAnimationFrame(token);
102
+ }
103
+ if (isAlive(model)) {
104
+ model.setTrackLabelBand(trackId, 0);
105
+ }
106
+ };
107
+ }
108
+ return undefined;
109
+ }, [paper, container, model, trackId]);
110
+ return { setPaper, setContainer };
111
+ }
33
112
  const TrackContainer = observer(function TrackContainer({ model, track, }) {
34
113
  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 })] }));
114
+ // an LGV track always holds at least one linear display (activeDisplay =
115
+ // displays[0]). The one narrowing to the linear shape, handed down rather
116
+ // than repeated, so a track's chrome and its body can't read two displays.
117
+ const display = track.activeDisplay;
118
+ const { showTrackOutlines } = model;
119
+ // The Paper's 1px border, present iff outlines are on. Everything laid out in
120
+ // the *display's* coordinates has to cancel it — the rendering container
121
+ // shifts left by it (see renderingComponentContainer), so the overlay node and
122
+ // the masks over it have to move by the same amount or they land a pixel off
123
+ // the data. One binding rather than three copies of the ternary, because the
124
+ // three agreeing is the whole point.
125
+ const outlineOffset = showTrackOutlines ? TRACK_OUTLINE_BORDER : 0;
126
+ // A label in flow is a row of track height, which is most of what minimizing
127
+ // buys back — so a minimized track overlaps its label whatever the setting
128
+ // says, and there is nothing under it to print over. `prefersOffset` is the
129
+ // display asking for the offset row in 'overlapping' mode, because its left
130
+ // edge carries an axis or a sidebar the label would cover.
131
+ const trackLabelStyle = track.minimized ||
132
+ (model.effectiveTrackLabels === 'overlapping' && !display.prefersOffset)
133
+ ? classes.trackLabelOverlap
134
+ : classes.trackLabelOffset;
135
+ const { setPaper, setContainer } = useTrackLabelBand(model, track.trackId);
136
+ return (_jsxs(Paper, { ref: setPaper, className: cx(classes.root, track.pinned ? null : classes.unpinnedTrack), variant: showTrackOutlines ? 'outlined' : undefined, elevation: showTrackOutlines ? undefined : 0, onDragOver: event => {
137
+ model.onTrackDragOver(track.id, event.clientY);
138
+ }, 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, { FallbackComponent: e => (_jsx("div", { className: classes.crashBanner, children: _jsx(ErrorBanner, { error: e.error, onReset: e.resetErrorBoundary }) })), children: _jsx(TrackRenderingContainer, { model: model, track: track, display: display, ref: setContainer }) }, display.id) }), _jsx(PaddingBlocks, { model: model, offset: outlineOffset }), _jsx(ResizeHandle, { style: { height: RESIZE_HANDLE_HEIGHT }, onDrag: distance => display.resizeHeight(distance),
139
+ // the drag's shortcut: grow the track by whatever it is scrolled over,
140
+ // so a pileup showing three rows of forty opens to all forty
141
+ // Optional: only a display that scrolls its own content has anything
142
+ // hidden to expand to.
143
+ onDoubleClick: () => {
144
+ display.expandToContentHeight?.();
145
+ },
146
+ // Bracket the drag so a display can sit an expensive per-frame layer
147
+ // out of it (see `resizing` on TrackHeightMixin). Causal rather than a
148
+ // per-display debounce: the handle owns both ends of the gesture. On
149
+ // the track, so this holds whatever the active display is.
150
+ onDragStart: () => {
151
+ track.setResizing(true);
152
+ }, onDragEnd: () => {
153
+ track.setResizing(false);
154
+ }, className: classes.resizeHandle })] }));
57
155
  });
58
156
  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,36 @@
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,
17
+ display: 'inline-flex',
18
+ alignItems: 'center',
19
+ maxWidth: 'calc(100% - 16px)',
18
20
  },
21
+ // one line: a long name wrapping over a narrow view covered the data below
19
22
  trackName: {
20
- margin: '0 auto',
21
- width: '90%',
22
- fontSize: '0.8rem',
23
+ margin: theme.spacing(0, 0.5),
24
+ minWidth: 0,
25
+ overflow: 'hidden',
26
+ textOverflow: 'ellipsis',
27
+ whiteSpace: 'nowrap',
23
28
  pointerEvents: 'none',
24
29
  },
25
- iconButton: {
26
- padding: theme.spacing(1),
27
- },
28
30
  }));
29
- const TrackLabel = observer(function TrackLabel({ track, className }) {
31
+ const TrackLabel = observer(function TrackLabel({ track, className, }) {
30
32
  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 })] }));
33
+ const trackName = getTrackName(track.configuration, getSession(track));
34
+ return (_jsxs(Paper, { className: cx(className, classes.root), "data-testid": `trackLabel-${track.trackId}`, 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
35
  });
42
36
  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;