@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,59 +1,117 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense, lazy, useEffect, useRef } from 'react';
3
3
  import { VIEW_HEADER_HEIGHT } from '@jbrowse/core/ui';
4
4
  import { getSession } from '@jbrowse/core/util';
5
+ import { LGV_HEADER_HEIGHT_VAR, SCROLL_PORT_HEIGHT_VAR, VIEW_HEADER_HEIGHT_VAR, useChromeHeightVar, useFocusOnInteraction, } from '@jbrowse/core/util/hooks';
5
6
  import { makeStyles } from '@jbrowse/core/util/tss-react';
7
+ import { useWheelZoom } from '@jbrowse/core/util/usePanZoom';
6
8
  import Paper from '@mui/material/Paper';
7
9
  import { observer } from 'mobx-react';
8
- import TrackContainer from "./TrackContainer.js";
9
- import TracksContainer from "./TracksContainer.js";
10
- const NoTracksActiveButton = lazy(() => import("./NoTracksActiveButton.js"));
10
+ import { stickyChromeTops } from '../stickyChrome.js';
11
+ import Header from './Header.js';
12
+ import MiniControls from './MiniControls.js';
13
+ import NavigationAnnouncer from './NavigationAnnouncer.js';
14
+ import ResizeAllTracksHandle from './ResizeAllTracksHandle.js';
15
+ import Rubberband from './Rubberband.js';
16
+ import TrackContainer from './TrackContainer.js';
17
+ import TracksContainer from './TracksContainer.js';
18
+ // lazies
19
+ const NoTracksActiveButton = lazy(() => import('./NoTracksActiveButton.js'));
11
20
  const useStyles = makeStyles()(theme => ({
12
21
  header: {
13
22
  background: theme.palette.background.paper,
14
- top: VIEW_HEADER_HEIGHT,
23
+ // measured, with the constant as the fallback: the view header above is a
24
+ // minimum-height box that grows with its content, so summing constants
25
+ // here put this over the bottom of it at a larger root font size
26
+ top: `var(${VIEW_HEADER_HEIGHT_VAR}, ${VIEW_HEADER_HEIGHT}px)`,
15
27
  zIndex: 850,
16
28
  },
17
29
  pinnedTracks: {
18
30
  position: 'sticky',
19
31
  zIndex: 3,
32
+ // cap the sticky block at the space below its top offset so pinning
33
+ // many/tall tracks scrolls within the block instead of burying the
34
+ // unpinned tracks underneath it — see the maxHeight below for which space
35
+ overflowY: 'auto',
20
36
  },
21
37
  rel: {
22
38
  position: 'relative',
23
39
  },
24
40
  }));
25
41
  const LinearGenomeViewContainer = observer(function LinearGenomeViewContainer({ model, }) {
26
- const { pinnedTracks, stickyViewHeaders, pinnedTracksTop, tracks, unpinnedTracks, } = model;
42
+ const { pinnedTracks, stickyViewHeaders, headerHeight, tracks, unpinnedTracks, hideHeader, } = model;
43
+ const stickyTops = stickyChromeTops({ stickyViewHeaders, headerHeight });
44
+ const headerRef = useRef(null);
45
+ useChromeHeightVar(headerRef, LGV_HEADER_HEIGHT_VAR);
27
46
  const { classes } = useStyles();
28
47
  const session = getSession(model);
29
48
  const ref = useRef(null);
30
- const MiniControlsComponent = model.MiniControlsComponent();
31
- const HeaderComponent = model.HeaderComponent();
49
+ // cached left edge of the view, refreshed on resize, so the mousemove hover
50
+ // handler doesn't call getBoundingClientRect() (a layout reflow) every move
51
+ const rectLeftRef = useRef(0);
52
+ // The tracks area, and not the whole view — the same rule the click-drag half
53
+ // already follows (see TracksContainer's useSideScroll), for a bigger payoff.
54
+ // The chrome above the tracks is the only surface left where a wheel still
55
+ // means "move down the page": the view header is `position: sticky`, so
56
+ // binding the gesture below it leaves ~100px of always-visible gutter that
57
+ // scrolls, instead of the ~26px of view title bar that is all a full-view
58
+ // binding leaves. That gutter is the whole answer for scroll-to-zoom users,
59
+ // because there is no modifier to fall back on — the browser turns shift into
60
+ // horizontal scroll, ctrl/meta is pinch-zoom, and Firefox binds alt to
61
+ // history navigation.
62
+ //
63
+ // Nothing is lost by it: a wheel over the toolbar used to zoom the view from
64
+ // a point that shows none of it. `wheelBinding.test.tsx` is the pin — which
65
+ // element the listener is on is a DOM fact, so jsdom sees it exactly;
66
+ // `browser-tests/probe-scroll-gutter.ts` measures how many pixels wide the
67
+ // resulting band is, which is the part that needs a real layout and runs by
68
+ // hand.
69
+ const tracksRef = useRef(null);
70
+ useWheelZoom(tracksRef, model);
32
71
  useEffect(() => {
33
- function handleSelectView(e) {
34
- if (e.target instanceof Element && ref.current?.contains(e.target)) {
35
- session.setFocusedViewId?.(model.id);
36
- }
72
+ const curr = ref.current;
73
+ if (!curr) {
74
+ return;
37
75
  }
38
- document.addEventListener('mousedown', handleSelectView);
39
- document.addEventListener('keydown', handleSelectView);
76
+ rectLeftRef.current = curr.getBoundingClientRect().left;
77
+ const observer = 'ResizeObserver' in window
78
+ ? new ResizeObserver(() => {
79
+ rectLeftRef.current = curr.getBoundingClientRect().left;
80
+ })
81
+ : undefined;
82
+ observer?.observe(curr);
40
83
  return () => {
41
- document.removeEventListener('mousedown', handleSelectView);
42
- document.removeEventListener('keydown', handleSelectView);
84
+ observer?.disconnect();
43
85
  };
44
- }, [session, model]);
45
- return (_jsxs("div", { className: classes.rel, ref: ref, onMouseLeave: () => {
46
- session.setHovered(undefined);
47
- }, onMouseMove: event => {
48
- const c = ref.current;
49
- if (!c) {
50
- return;
51
- }
52
- const { tracks } = model;
53
- const leftPx = event.clientX - c.getBoundingClientRect().left;
54
- const hoverPosition = model.pxToBp(leftPx);
55
- const hoverFeature = tracks.find(t => t.displays[0].featureUnderMouse);
56
- session.setHovered({ hoverPosition, hoverFeature });
57
- }, children: [_jsxs("div", { className: classes.header, style: { position: stickyViewHeaders ? 'sticky' : undefined }, children: [_jsx(HeaderComponent, { model: model }), _jsx(MiniControlsComponent, { model: model })] }), _jsx(TracksContainer, { model: model, children: !tracks.length ? (_jsx(Suspense, { fallback: null, children: _jsx(NoTracksActiveButton, { model: model }) })) : (_jsxs(_Fragment, { children: [pinnedTracks.length ? (_jsx(Paper, { elevation: 6, className: classes.pinnedTracks, style: { top: pinnedTracksTop }, children: pinnedTracks.map(track => (_jsx(TrackContainer, { model: model, track: track }, track.id))) })) : null, unpinnedTracks.map(track => (_jsx(TrackContainer, { model: model, track: track }, track.id)))] })) })] }));
86
+ }, []);
87
+ // sets the focused view id based on a click within the LGV; necessary for
88
+ // subviews to be focused properly
89
+ useFocusOnInteraction(ref, () => {
90
+ session.setFocusedViewId?.(model.id);
91
+ });
92
+ return (_jsx(_Fragment, { children: _jsxs("div", { "data-testid": `linear-genome-view-${model.id}`, className: classes.rel, ref: ref, onMouseLeave: () => {
93
+ session.setHovered(undefined);
94
+ }, onMouseMove: event => {
95
+ const leftPx = event.clientX - rectLeftRef.current;
96
+ const hoverPosition = model.pxToBp(leftPx);
97
+ // `hoveredFeature` is BaseDisplay's hook, so every display type
98
+ // answers it — this used to read `featureUnderMouse`, a name only the
99
+ // wiggle, alignments and Manhattan families used, off `displays[0]`
100
+ // alone. At most one display can be under the pointer, so the first
101
+ // non-empty answer is the answer.
102
+ const hoverFeature = tracks
103
+ .flatMap(t => t.displays)
104
+ .map(d => d.hoveredFeature)
105
+ .find(Boolean);
106
+ session.setHovered({ hoverPosition, hoverFeature });
107
+ }, children: [_jsx(NavigationAnnouncer, { model: model }), _jsxs("div", { ref: headerRef, "data-testid": `lgv-header-${model.id}`, className: classes.header, style: { position: stickyViewHeaders ? 'sticky' : undefined }, children: [_jsx(Header, { model: model }), hideHeader ? _jsx(MiniControls, { model: model }) : null] }), _jsx("div", { ref: tracksRef, children: model.scalebarOnly ? (_jsx(Rubberband, { model: model })) : (_jsx(TracksContainer, { model: model, children: !tracks.length ? (_jsx(Suspense, { fallback: null, children: _jsx(NoTracksActiveButton, { model: model }) })) : (_jsxs(_Fragment, { children: [pinnedTracks.length ? (_jsx(Paper, { elevation: 2, "data-testid": "pinned-tracks", className: classes.pinnedTracks, style: {
108
+ top: stickyTops.pinnedTracks,
109
+ // the scroll port this sticks in, not the window: it is
110
+ // under the app bar in the classic stack, a dockview
111
+ // cell in a workspace, and the host's box when embedded.
112
+ // The fallback is what an unbounded embed gets, where
113
+ // the page itself is the scroller
114
+ maxHeight: `calc(var(${SCROLL_PORT_HEIGHT_VAR}, 100vh) - ${stickyTops.pinnedTracks})`,
115
+ }, children: pinnedTracks.map(track => (_jsx(TrackContainer, { model: model, track: track }, track.id))) })) : null, unpinnedTracks.map(track => (_jsx(TrackContainer, { model: model, track: track }, track.id))), _jsx(ResizeAllTracksHandle, { model: model })] })) })) })] }) }));
58
116
  });
59
117
  export default LinearGenomeViewContainer;
@@ -1,5 +1,5 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
2
  declare const MiniControls: ({ model, }: {
3
3
  model: LinearGenomeViewModel;
4
- }) => import("react/jsx-runtime").JSX.Element | null;
4
+ }) => import("react").JSX.Element;
5
5
  export default MiniControls;
@@ -1,17 +1,21 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
3
+ import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
4
+ import { alpha } from '@jbrowse/core/ui/palette';
3
5
  import { getSession } from '@jbrowse/core/util';
4
6
  import { makeStyles } from '@jbrowse/core/util/tss-react';
5
- import ArrowDown from '@mui/icons-material/KeyboardArrowDown';
6
- import ZoomIn from '@mui/icons-material/ZoomIn';
7
- import ZoomOut from '@mui/icons-material/ZoomOut';
8
- import { IconButton, Paper, alpha } from '@mui/material';
7
+ import AddIcon from '@mui/icons-material/Add';
8
+ import MoreVertIcon from '@mui/icons-material/MoreVert';
9
+ import RemoveIcon from '@mui/icons-material/Remove';
10
+ import { IconButton, Paper, Tooltip } from '@mui/material';
9
11
  import { observer } from 'mobx-react';
12
+ import ZoomButton from './ZoomButton.js';
10
13
  const useStyles = makeStyles()(theme => ({
11
14
  background: {
12
15
  position: 'absolute',
13
16
  right: 0,
14
17
  background: theme.palette.background.paper,
18
+ // needed when sticky header is off in lgv, e.g. in breakpoint split view
15
19
  zIndex: 2,
16
20
  },
17
21
  focusedBackground: {
@@ -20,12 +24,12 @@ const useStyles = makeStyles()(theme => ({
20
24
  }));
21
25
  const MiniControls = observer(function MiniControls({ model, }) {
22
26
  const { classes } = useStyles();
23
- const { id, bpPerPx, maxBpPerPx, minBpPerPx, hideHeader, effectiveBpPerPx } = model;
27
+ const { id, scalebarOnly } = model;
24
28
  const { focusedViewId } = getSession(model);
25
- return hideHeader ? (_jsx(Paper, { className: classes.background, children: _jsxs(Paper, { className: focusedViewId === id ? classes.focusedBackground : undefined, children: [_jsx(CascadingMenuButton, { menuItems: () => model.menuItems(), children: _jsx(ArrowDown, { fontSize: "small" }) }), _jsx(IconButton, { "data-testid": "zoom_out", onClick: () => {
26
- model.zoom(bpPerPx * 2);
27
- }, disabled: effectiveBpPerPx >= maxBpPerPx - 0.0001, children: _jsx(ZoomOut, { fontSize: "small" }) }), _jsx(IconButton, { "data-testid": "zoom_in", onClick: () => {
28
- model.zoom(bpPerPx / 2);
29
- }, disabled: effectiveBpPerPx <= minBpPerPx + 0.0001, children: _jsx(ZoomIn, { fontSize: "small" }) })] }) })) : null;
29
+ return (_jsx(Paper, { className: classes.background, children: _jsxs(Paper, { className: focusedViewId === id ? classes.focusedBackground : undefined, children: [_jsx(Tooltip, { title: "Open track selector", children: _jsx(IconButton, { size: "small", onClick: () => {
30
+ model.activateTrackSelector();
31
+ }, children: _jsx(TrackSelectorIcon, { fontSize: "small" }) }) }), _jsx(CascadingMenuButton, { menuItems: () => model.menuItems(), children: _jsx(MoreVertIcon, { fontSize: "small" }) }), _jsx(Tooltip, { title: scalebarOnly ? 'Show tracks' : 'Show ruler only', children: _jsx(IconButton, { size: "small", onClick: () => {
32
+ model.setScalebarOnly(!scalebarOnly);
33
+ }, children: scalebarOnly ? (_jsx(AddIcon, { fontSize: "small" })) : (_jsx(RemoveIcon, { fontSize: "small" })) }) }), _jsx(ZoomButton, { model: model, direction: "out", small: true }), _jsx(ZoomButton, { model: model, direction: "in", small: true })] }) }));
30
34
  });
31
35
  export default MiniControls;
@@ -0,0 +1,3 @@
1
+ import type { SequenceSearchModeProps } from './searchModes.ts';
2
+ declare const MotifListPanel: ({ model, handleClose, }: SequenceSearchModeProps) => import("react").JSX.Element;
3
+ export default MotifListPanel;
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { isPalindromic, parseMotifList, pluralize } from '@jbrowse/core/util';
4
+ import { Button, TextField, Typography } from '@mui/material';
5
+ import { observer } from 'mobx-react';
6
+ import SearchPanelForm from './SearchPanelForm.js';
7
+ import StrandCheckboxes from './StrandCheckboxes.js';
8
+ import { DEFAULT_MOTIFS } from './defaultMotifs.js';
9
+ import { addReferenceScanTrack } from './searchModes.js';
10
+ const MotifListPanel = observer(function MotifListPanel({ model, handleClose, }) {
11
+ const [text, setText] = useState(DEFAULT_MOTIFS);
12
+ const [searchForward, setSearchForward] = useState(true);
13
+ const [searchReverse, setSearchReverse] = useState(true);
14
+ const { motifs, errors } = parseMotifList(text);
15
+ // strand choice only means something for motifs that read differently on the
16
+ // two strands; most restriction sites are palindromes, which always match both
17
+ const hasStrandedMotif = motifs.some(m => !isPalindromic(m.site));
18
+ const strandValid = !hasStrandedMotif || searchForward || searchReverse;
19
+ const canSubmit = motifs.length > 0 && errors.length === 0 && strandValid;
20
+ function handleSubmitCombined() {
21
+ addReferenceScanTrack(model, {
22
+ trackId: `motif_search_${Date.now()}`,
23
+ name: motifs.length === 1
24
+ ? `Motif ${motifs[0].name}`
25
+ : `Motif search (${motifs.length} motifs)`,
26
+ adapter: {
27
+ type: 'MotifListAdapter',
28
+ motifs: text,
29
+ searchForward,
30
+ searchReverse,
31
+ },
32
+ });
33
+ handleClose();
34
+ }
35
+ function handleSubmitSeparate() {
36
+ const now = Date.now();
37
+ for (const [idx, motif] of motifs.entries()) {
38
+ addReferenceScanTrack(model, {
39
+ trackId: `motif_search_${now}_${idx}`,
40
+ name: `Motif ${motif.name}`,
41
+ adapter: {
42
+ type: 'MotifListAdapter',
43
+ motifs: motif.line,
44
+ searchForward,
45
+ searchReverse,
46
+ },
47
+ });
48
+ }
49
+ handleClose();
50
+ }
51
+ return (_jsxs(SearchPanelForm, { onSubmit: handleSubmitCombined, handleClose: handleClose, submitDisabled: !canSubmit, submitText: "Launch as one track", actions: motifs.length > 1 ? (_jsx(Button, { type: "button", onClick: () => {
52
+ handleSubmitSeparate();
53
+ }, disabled: !canSubmit, variant: "contained", color: "primary", children: "Launch one track per motif" })) : null, children: [_jsx(TextField, { multiline: true, fullWidth: true, rows: 12, variant: "outlined", label: "Motifs", value: text, onChange: event => {
54
+ setText(event.target.value);
55
+ }, slotProps: { htmlInput: { style: { fontFamily: 'monospace' } } } }), errors.length > 0 ? (_jsx(Typography, { color: "error", variant: "body2", children: errors.map(e => `Line ${e.line}: ${e.message}`).join('\n') })) : (_jsx(Typography, { variant: "body2", color: "textSecondary", children: motifs.length === 0
56
+ ? 'Add at least one motif'
57
+ : `${motifs.length} ${pluralize(motifs.length, 'motif')}` })), hasStrandedMotif ? (_jsx(StrandCheckboxes, { searchForward: searchForward, searchReverse: searchReverse, setSearchForward: setSearchForward, setSearchReverse: setSearchReverse })) : motifs.length > 0 ? (_jsx(Typography, { variant: "body2", color: "textSecondary", children: "All motifs are palindromic, so each match covers both strands." })) : null] }));
58
+ });
59
+ export default MotifListPanel;
@@ -0,0 +1,32 @@
1
+ import type { LinearGenomeViewModel } from '../index.ts';
2
+ /**
3
+ * The one thing that tells a screen-reader user a pan, a zoom or a search
4
+ * actually moved the view: a polite live region restating where the view now is.
5
+ *
6
+ * **It reads `coarseVisibleLocStrings`, never `visibleLocStrings`**, and that is
7
+ * the whole design. The fine one changes on every `offsetPx` write — every frame
8
+ * of a drag, a wheel zoom or a keyboard slide — and a live region driven by it
9
+ * queues an utterance per frame, which does not merely say too much: it makes
10
+ * the screen reader unusable for as long as the drag lasts, because polite
11
+ * announcements are a queue rather than a latest-value. The coarse blocks are
12
+ * already the view's settled signal, published by a `delay: 500` autorun
13
+ * (`setupCoarseDynamicBlocksAutorun`) and flushed synchronously by `moveTo` so a
14
+ * discrete jump — a search, a bookmark, `navToLocString` — announces at once
15
+ * instead of 500ms later. Both properties are what this needs, so this adds no
16
+ * timer of its own; if the debounce ever moves, this moves with it.
17
+ *
18
+ * Its own observer so the view container does not re-render when the locus
19
+ * settles: this component is a text node with no children, and the container
20
+ * mounts every track.
21
+ *
22
+ * The region is rendered with its text from the first render rather than being
23
+ * filled after mount. A live region whose content is present when the node is
24
+ * inserted is generally not announced (the region has to exist before the
25
+ * change), so in practice a freshly-mounted view says nothing; where a reader
26
+ * does announce it, "chr1:1..1,000" as the view appears is a fair thing to hear,
27
+ * and it is one utterance per view rather than one per frame.
28
+ */
29
+ declare const NavigationAnnouncer: ({ model, }: {
30
+ model: LinearGenomeViewModel;
31
+ }) => import("react").JSX.Element;
32
+ export default NavigationAnnouncer;
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { observer } from 'mobx-react';
3
+ // Off-screen but not `display:none` / `visibility:hidden` / `aria-hidden` — any
4
+ // of those takes the node out of the accessibility tree, which is exactly what a
5
+ // live region must not be. The 1px-clipped box is the long-standing spelling of
6
+ // "readable by assistive tech, occupying no layout".
7
+ const visuallyHidden = {
8
+ position: 'absolute',
9
+ width: 1,
10
+ height: 1,
11
+ margin: -1,
12
+ padding: 0,
13
+ border: 0,
14
+ overflow: 'hidden',
15
+ clipPath: 'inset(50%)',
16
+ whiteSpace: 'nowrap',
17
+ };
18
+ /**
19
+ * The one thing that tells a screen-reader user a pan, a zoom or a search
20
+ * actually moved the view: a polite live region restating where the view now is.
21
+ *
22
+ * **It reads `coarseVisibleLocStrings`, never `visibleLocStrings`**, and that is
23
+ * the whole design. The fine one changes on every `offsetPx` write — every frame
24
+ * of a drag, a wheel zoom or a keyboard slide — and a live region driven by it
25
+ * queues an utterance per frame, which does not merely say too much: it makes
26
+ * the screen reader unusable for as long as the drag lasts, because polite
27
+ * announcements are a queue rather than a latest-value. The coarse blocks are
28
+ * already the view's settled signal, published by a `delay: 500` autorun
29
+ * (`setupCoarseDynamicBlocksAutorun`) and flushed synchronously by `moveTo` so a
30
+ * discrete jump — a search, a bookmark, `navToLocString` — announces at once
31
+ * instead of 500ms later. Both properties are what this needs, so this adds no
32
+ * timer of its own; if the debounce ever moves, this moves with it.
33
+ *
34
+ * Its own observer so the view container does not re-render when the locus
35
+ * settles: this component is a text node with no children, and the container
36
+ * mounts every track.
37
+ *
38
+ * The region is rendered with its text from the first render rather than being
39
+ * filled after mount. A live region whose content is present when the node is
40
+ * inserted is generally not announced (the region has to exist before the
41
+ * change), so in practice a freshly-mounted view says nothing; where a reader
42
+ * does announce it, "chr1:1..1,000" as the view appears is a fair thing to hear,
43
+ * and it is one utterance per view rather than one per frame.
44
+ */
45
+ const NavigationAnnouncer = observer(function NavigationAnnouncer({ model, }) {
46
+ const { coarseVisibleLocStrings, coarseTotalBpDisplayStr } = model;
47
+ return (_jsx("div", { role: "status", "aria-live": "polite", "aria-atomic": "true", style: visuallyHidden, children: coarseVisibleLocStrings
48
+ ? `${coarseVisibleLocStrings} (${coarseTotalBpDisplayStr})`
49
+ : '' }));
50
+ });
51
+ export default NavigationAnnouncer;
@@ -1,5 +1,5 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
2
  declare const NoTracksActiveButton: ({ model, }: {
3
3
  model: LinearGenomeViewModel;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
5
5
  export default NoTracksActiveButton;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
3
3
  import { makeStyles } from '@jbrowse/core/util/tss-react';
4
4
  import { Button, Paper, Typography } from '@mui/material';
@@ -1,8 +1,6 @@
1
1
  import type { LinearGenomeViewModel } from '../model.ts';
2
- import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
3
2
  type LGV = LinearGenomeViewModel;
4
- declare const OverviewHighlight: ({ model, overview, }: {
3
+ declare const OverviewHighlight: ({ model, }: {
5
4
  model: LGV;
6
- overview: Base1DViewModel;
7
- }) => import("react/jsx-runtime").JSX.Element[];
5
+ }) => import("react").JSX.Element[] | null;
8
6
  export default OverviewHighlight;
@@ -1,50 +1,29 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useStyleTheme } from '@jbrowse/core/ui/PaletteContext';
2
3
  import { getSession, notEmpty } from '@jbrowse/core/util';
3
4
  import { colord } from '@jbrowse/core/util/colord';
4
- import { makeStyles } from '@jbrowse/core/util/tss-react';
5
5
  import { observer } from 'mobx-react';
6
- const useStyles = makeStyles()(theme => ({
7
- highlight: {
8
- height: '100%',
9
- position: 'absolute',
10
- left: 0,
11
- background: colord(theme.palette.highlight.main).alpha(0.35).toRgbString(),
12
- borderLeft: `1px solid ${theme.palette.highlight.main}`,
13
- borderRight: `1px solid ${theme.palette.highlight.main}`,
14
- },
15
- }));
16
- const OverviewHighlight = observer(function OverviewHighlight({ model, overview, }) {
17
- const { classes } = useStyles();
18
- const { highlight, cytobandOffset } = model;
19
- const session = getSession(model);
20
- const { assemblyManager } = session;
21
- return highlight
22
- .map(r => {
23
- const asm = r.assemblyName
24
- ? assemblyManager.get(r.assemblyName)
25
- : undefined;
26
- const refName = asm?.getCanonicalRefName(r.refName) ?? r.refName;
27
- const s = overview.bpToPx({
28
- ...r,
29
- refName,
30
- coord: r.start,
31
- });
32
- const e = overview.bpToPx({
33
- ...r,
34
- refName,
35
- coord: r.end,
36
- });
37
- return s !== undefined && e !== undefined
38
- ? {
39
- width: Math.abs(e - s),
40
- left: s + cytobandOffset,
41
- }
42
- : undefined;
43
- })
44
- .filter(notEmpty)
45
- .map(({ left, width }, idx) => (_jsx("div", { className: classes.highlight, style: {
46
- width,
47
- transform: `translateX(${left}px)`,
48
- } }, `${left}_${width}_${idx}`)));
6
+ import OverviewHighlightBand from './OverviewHighlightBand.js';
7
+ import { getHighlightColor, highlightKey } from './util.js';
8
+ const OverviewHighlight = observer(function OverviewHighlight({ model, }) {
9
+ const theme = useStyleTheme();
10
+ const themed = colord(theme.palette.highlight.main);
11
+ // gate on highlightsVisible to match the main-view band, scalebar band, and
12
+ // SVG export — otherwise "Turn off highlights" leaves the overview bands up
13
+ return getSession(model).highlightsVisible
14
+ ? model.highlights
15
+ .map(highlight => {
16
+ const coords = model.getOverviewHighlightCoords(highlight);
17
+ return coords ? { coords, highlight } : undefined;
18
+ })
19
+ .filter(notEmpty)
20
+ .map(({ coords, highlight }, idx) => {
21
+ const bandColor = getHighlightColor(highlight, theme);
22
+ return (_jsx(OverviewHighlightBand
23
+ // region fields keep the key stable across pan/zoom (unlike pixel
24
+ // coords); idx disambiguates duplicate highlights on the region
25
+ , { coords: coords, background: bandColor.toRgbString(), borderColor: (highlight.color ? bandColor : themed).toRgbString(), tooltip: highlight.label }, highlightKey(highlight, idx)));
26
+ })
27
+ : null;
49
28
  });
50
29
  export default OverviewHighlight;
@@ -0,0 +1,9 @@
1
+ export default function OverviewHighlightBand({ coords, background, borderColor, tooltip, }: {
2
+ coords: {
3
+ left: number;
4
+ width: number;
5
+ };
6
+ background: string;
7
+ borderColor?: string;
8
+ tooltip?: string;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { makeStyles } from '@jbrowse/core/util/tss-react';
3
+ import { Tooltip } from '@mui/material';
4
+ // A single absolute-positioned band over the overview scalebar. The 1px border
5
+ // keeps very narrow bands visible.
6
+ const useStyles = makeStyles()({
7
+ highlight: {
8
+ height: '100%',
9
+ position: 'absolute',
10
+ left: 0,
11
+ },
12
+ });
13
+ export default function OverviewHighlightBand({ coords, background, borderColor, tooltip, }) {
14
+ const { classes } = useStyles();
15
+ const band = (_jsx("div", { className: classes.highlight, style: {
16
+ transform: `translateX(${coords.left}px)`,
17
+ width: coords.width,
18
+ background,
19
+ ...(borderColor && {
20
+ borderLeft: `1px solid ${borderColor}`,
21
+ borderRight: `1px solid ${borderColor}`,
22
+ }),
23
+ } }));
24
+ return tooltip ? (_jsx(Tooltip, { title: tooltip, arrow: true, children: band })) : (band);
25
+ }
@@ -1,9 +1,9 @@
1
1
  import type { LinearGenomeViewModel } from '../index.ts';
2
- import type { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
2
+ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
3
3
  type LGV = LinearGenomeViewModel;
4
4
  declare const OverviewRubberband: ({ model, overview, ControlComponent, }: {
5
5
  model: LGV;
6
- overview: Base1DViewModel;
6
+ overview: ViewLayout;
7
7
  ControlComponent?: React.ReactElement;
8
- }) => import("react/jsx-runtime").JSX.Element;
8
+ }) => import("react").JSX.Element;
9
9
  export default OverviewRubberband;