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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/esm/FeatureTrack/configSchema.d.ts +104 -65
  2. package/esm/FeatureTrack/configSchema.js +47 -1
  3. package/esm/FeatureTrack/index.js +1 -1
  4. package/esm/LaunchLinearGenomeView/index.d.ts +14 -0
  5. package/esm/LaunchLinearGenomeView/index.js +6 -12
  6. package/esm/LinearGenomeView/afterAttach.d.ts +20 -2
  7. package/esm/LinearGenomeView/afterAttach.js +250 -121
  8. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -1
  9. package/esm/LinearGenomeView/components/CenterLine.js +16 -7
  10. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.d.ts +7 -0
  11. package/esm/LinearGenomeView/components/ConnectedHoverHighlight.js +22 -0
  12. package/esm/LinearGenomeView/components/CrisprGuidePanel.d.ts +3 -0
  13. package/esm/LinearGenomeView/components/CrisprGuidePanel.js +144 -0
  14. package/esm/LinearGenomeView/components/Cytobands.d.ts +6 -6
  15. package/esm/LinearGenomeView/components/Cytobands.js +76 -53
  16. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +7 -3
  17. package/esm/LinearGenomeView/components/ExportSvgDialog.js +11 -67
  18. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +5 -9
  19. package/esm/LinearGenomeView/components/GetSequenceDialog.js +84 -88
  20. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -1
  21. package/esm/LinearGenomeView/components/Gridlines.js +29 -58
  22. package/esm/LinearGenomeView/components/Header.d.ts +1 -1
  23. package/esm/LinearGenomeView/components/Header.js +32 -16
  24. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.d.ts +21 -0
  25. package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +35 -0
  26. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +3 -2
  27. package/esm/LinearGenomeView/components/HeaderPanControls.js +16 -7
  28. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +1 -1
  29. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +9 -6
  30. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.d.ts +6 -0
  31. package/esm/LinearGenomeView/components/HeaderSearchBoxRow.js +27 -0
  32. package/esm/LinearGenomeView/components/HeaderSearchBoxes.d.ts +5 -0
  33. package/esm/LinearGenomeView/components/HeaderSearchBoxes.js +28 -0
  34. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +3 -2
  35. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +11 -4
  36. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +3 -2
  37. package/esm/LinearGenomeView/components/HeaderZoomControls.js +67 -51
  38. package/esm/LinearGenomeView/components/Highlight.d.ts +1 -1
  39. package/esm/LinearGenomeView/components/Highlight.js +19 -23
  40. package/esm/LinearGenomeView/components/HighlightBand.d.ts +3 -2
  41. package/esm/LinearGenomeView/components/HighlightBand.js +25 -8
  42. package/esm/LinearGenomeView/components/HighlightChip.d.ts +9 -0
  43. package/esm/LinearGenomeView/components/HighlightChip.js +15 -0
  44. package/esm/LinearGenomeView/components/HoverPositionHighlight.d.ts +12 -0
  45. package/esm/LinearGenomeView/components/HoverPositionHighlight.js +25 -0
  46. package/esm/LinearGenomeView/components/ImportForm.d.ts +3 -4
  47. package/esm/LinearGenomeView/components/ImportForm.js +95 -61
  48. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -1
  49. package/esm/LinearGenomeView/components/LinearGenomeView.js +6 -5
  50. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.d.ts +1 -1
  51. package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +89 -30
  52. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -1
  53. package/esm/LinearGenomeView/components/MiniControls.js +13 -10
  54. package/esm/LinearGenomeView/components/MotifListPanel.d.ts +3 -0
  55. package/esm/LinearGenomeView/components/MotifListPanel.js +59 -0
  56. package/esm/LinearGenomeView/components/NavigationAnnouncer.d.ts +32 -0
  57. package/esm/LinearGenomeView/components/NavigationAnnouncer.js +51 -0
  58. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -1
  59. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +1 -1
  60. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +2 -4
  61. package/esm/LinearGenomeView/components/OverviewHighlight.js +23 -44
  62. package/esm/LinearGenomeView/components/OverviewHighlightBand.d.ts +9 -0
  63. package/esm/LinearGenomeView/components/OverviewHighlightBand.js +26 -0
  64. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +3 -3
  65. package/esm/LinearGenomeView/components/OverviewRubberband.js +44 -57
  66. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.d.ts +4 -5
  67. package/esm/LinearGenomeView/components/OverviewRubberbandHoverTooltip.js +13 -20
  68. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +3 -2
  69. package/esm/LinearGenomeView/components/OverviewScalebar.js +84 -79
  70. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +19 -5
  71. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +55 -32
  72. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +4 -5
  73. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +16 -18
  74. package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +7 -0
  75. package/esm/LinearGenomeView/components/PaddingBlocks.js +61 -0
  76. package/esm/LinearGenomeView/components/RangeSelectOverlay.d.ts +9 -0
  77. package/esm/LinearGenomeView/components/RangeSelectOverlay.js +20 -0
  78. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +2 -3
  79. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +19 -26
  80. package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
  81. package/esm/LinearGenomeView/components/Rubberband.js +13 -16
  82. package/esm/LinearGenomeView/components/SVGHighlightBand.d.ts +10 -0
  83. package/esm/LinearGenomeView/components/SVGHighlightBand.js +9 -0
  84. package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -2
  85. package/esm/LinearGenomeView/components/Scalebar.js +16 -21
  86. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -1
  87. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +54 -35
  88. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -1
  89. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +142 -126
  90. package/esm/LinearGenomeView/components/SearchBox.d.ts +22 -2
  91. package/esm/LinearGenomeView/components/SearchBox.js +58 -66
  92. package/esm/LinearGenomeView/components/SearchPanelForm.d.ts +9 -0
  93. package/esm/LinearGenomeView/components/SearchPanelForm.js +18 -0
  94. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +3 -3
  95. package/esm/LinearGenomeView/components/SearchResultsDialog.js +5 -7
  96. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +4 -3
  97. package/esm/LinearGenomeView/components/SearchResultsTable.js +45 -53
  98. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.d.ts +5 -0
  99. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlight.js +37 -0
  100. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.d.ts +2 -0
  101. package/esm/LinearGenomeView/components/SequenceFeatureHoverHighlightExtension.js +5 -0
  102. package/esm/LinearGenomeView/components/SequencePatternPanel.d.ts +3 -0
  103. package/esm/LinearGenomeView/components/SequencePatternPanel.js +42 -0
  104. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -2
  105. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +31 -53
  106. package/esm/LinearGenomeView/components/StrandCheckboxes.d.ts +8 -0
  107. package/esm/LinearGenomeView/components/StrandCheckboxes.js +13 -0
  108. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -1
  109. package/esm/LinearGenomeView/components/TrackContainer.js +83 -39
  110. package/esm/LinearGenomeView/components/TrackLabel.d.ts +2 -3
  111. package/esm/LinearGenomeView/components/TrackLabel.js +11 -24
  112. package/esm/LinearGenomeView/components/TrackLabelButtons.d.ts +7 -0
  113. package/esm/LinearGenomeView/components/TrackLabelButtons.js +33 -0
  114. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +2 -5
  115. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +6 -2
  116. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +1 -1
  117. package/esm/LinearGenomeView/components/TrackLabelMenu.js +32 -85
  118. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.d.ts +22 -0
  119. package/esm/LinearGenomeView/components/TrackLabelRefNameWarning.js +46 -0
  120. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -1
  121. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +72 -18
  122. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  123. package/esm/LinearGenomeView/components/TracksContainer.js +65 -32
  124. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -1
  125. package/esm/LinearGenomeView/components/VerticalGuide.js +6 -13
  126. package/esm/LinearGenomeView/components/ZoomButton.d.ts +7 -0
  127. package/esm/LinearGenomeView/components/ZoomButton.js +27 -0
  128. package/esm/LinearGenomeView/components/ZoomTransform.d.ts +9 -0
  129. package/esm/LinearGenomeView/components/ZoomTransform.js +37 -0
  130. package/esm/LinearGenomeView/components/defaultMotifs.d.ts +1 -0
  131. package/esm/LinearGenomeView/components/defaultMotifs.js +22 -0
  132. package/esm/LinearGenomeView/components/fetchSequence.d.ts +7 -8
  133. package/esm/LinearGenomeView/components/fetchSequence.js +17 -9
  134. package/esm/LinearGenomeView/components/recentLocationsMenu.d.ts +15 -0
  135. package/esm/LinearGenomeView/components/recentLocationsMenu.js +36 -0
  136. package/esm/LinearGenomeView/components/searchModes.d.ts +13 -0
  137. package/esm/LinearGenomeView/components/searchModes.js +22 -0
  138. package/esm/LinearGenomeView/components/trackLabelMenuItems.d.ts +7 -0
  139. package/esm/LinearGenomeView/components/trackLabelMenuItems.js +67 -0
  140. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +11 -66
  141. package/esm/LinearGenomeView/components/useRangeSelect.js +82 -91
  142. package/esm/LinearGenomeView/components/useSearchBoxPrefs.d.ts +26 -0
  143. package/esm/LinearGenomeView/components/useSearchBoxPrefs.js +58 -0
  144. package/esm/LinearGenomeView/components/useSideScroll.d.ts +1 -1
  145. package/esm/LinearGenomeView/components/useSideScroll.js +87 -19
  146. package/esm/LinearGenomeView/components/util.d.ts +20 -6
  147. package/esm/LinearGenomeView/components/util.js +27 -6
  148. package/esm/LinearGenomeView/consts.d.ts +7 -2
  149. package/esm/LinearGenomeView/consts.js +18 -2
  150. package/esm/LinearGenomeView/flyTo.d.ts +38 -0
  151. package/esm/LinearGenomeView/flyTo.js +135 -0
  152. package/esm/LinearGenomeView/headerFit.d.ts +27 -0
  153. package/esm/LinearGenomeView/headerFit.js +59 -0
  154. package/esm/LinearGenomeView/index.d.ts +32 -2
  155. package/esm/LinearGenomeView/index.js +16 -6
  156. package/esm/LinearGenomeView/initKeys.d.ts +12 -0
  157. package/esm/LinearGenomeView/initKeys.js +68 -0
  158. package/esm/LinearGenomeView/keyboardHandler.d.ts +7 -0
  159. package/esm/LinearGenomeView/keyboardHandler.js +10 -0
  160. package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
  161. package/esm/LinearGenomeView/launchKeys.js +23 -0
  162. package/esm/LinearGenomeView/lazyDialogs.d.ts +7 -11
  163. package/esm/LinearGenomeView/lazyDialogs.js +3 -3
  164. package/esm/LinearGenomeView/linkedViewSync.d.ts +20 -0
  165. package/esm/LinearGenomeView/linkedViewSync.js +58 -0
  166. package/esm/LinearGenomeView/menuItems.d.ts +27 -2
  167. package/esm/LinearGenomeView/menuItems.js +137 -101
  168. package/esm/LinearGenomeView/model.d.ts +3238 -136
  169. package/esm/LinearGenomeView/model.js +2425 -528
  170. package/esm/LinearGenomeView/sharedScaleContainer.d.ts +18 -0
  171. package/esm/LinearGenomeView/sharedScaleContainer.js +17 -0
  172. package/esm/LinearGenomeView/showRegionsWithUndo.d.ts +35 -0
  173. package/esm/LinearGenomeView/showRegionsWithUndo.js +44 -0
  174. package/esm/LinearGenomeView/stickyChrome.d.ts +19 -0
  175. package/esm/LinearGenomeView/stickyChrome.js +30 -0
  176. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.d.ts +1 -1
  177. package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +15 -16
  178. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +2 -3
  179. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +45 -33
  180. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.d.ts +5 -0
  181. package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +26 -0
  182. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.d.ts +5 -0
  183. package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +13 -0
  184. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +1 -3
  185. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +77 -41
  186. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -1
  187. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +23 -3
  188. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.d.ts +8 -0
  189. package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +37 -0
  190. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +3 -3
  191. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +64 -36
  192. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -1
  193. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +7 -5
  194. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +5 -3
  195. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +43 -7
  196. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +8 -14
  197. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +16 -21
  198. package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +18 -0
  199. package/esm/LinearGenomeView/svgcomponents/SVGView.js +13 -0
  200. package/esm/LinearGenomeView/svgcomponents/figureContract.d.ts +45 -0
  201. package/esm/LinearGenomeView/svgcomponents/figureContract.js +130 -0
  202. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.d.ts +76 -0
  203. package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +66 -0
  204. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.d.ts +70 -0
  205. package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +263 -0
  206. package/esm/LinearGenomeView/svgcomponents/util.d.ts +92 -5
  207. package/esm/LinearGenomeView/svgcomponents/util.js +236 -3
  208. package/esm/LinearGenomeView/types.d.ts +17 -31
  209. package/esm/LinearGenomeView/types.js +1 -0
  210. package/esm/LinearGenomeView/util.d.ts +332 -12
  211. package/esm/LinearGenomeView/util.js +606 -62
  212. package/esm/MultiLevelRubberband/MultiLevelRubberband.d.ts +6 -0
  213. package/esm/MultiLevelRubberband/MultiLevelRubberband.js +37 -0
  214. package/esm/MultiLevelRubberband/VerticalGuide.d.ts +6 -0
  215. package/esm/MultiLevelRubberband/VerticalGuide.js +21 -0
  216. package/esm/MultiLevelRubberband/index.d.ts +2 -0
  217. package/esm/MultiLevelRubberband/index.js +1 -0
  218. package/esm/MultiLevelRubberband/types.d.ts +6 -0
  219. package/esm/MultiLevelRubberband/useRangeSelect.d.ts +24 -0
  220. package/esm/MultiLevelRubberband/useRangeSelect.js +136 -0
  221. package/esm/displayKitTests/perRegionTestEnv.d.ts +1286 -0
  222. package/esm/displayKitTests/perRegionTestEnv.js +138 -0
  223. package/esm/index.d.ts +122 -1235
  224. package/esm/index.js +101 -24
  225. package/esm/lazyPluginExports.d.ts +23 -0
  226. package/esm/lazyPluginExports.js +36 -0
  227. package/esm/searchUtils.d.ts +55 -11
  228. package/esm/searchUtils.js +342 -45
  229. package/esm/shared/RubberbandSpan.d.ts +15 -0
  230. package/esm/shared/RubberbandSpan.js +33 -0
  231. package/esm/shared/coordLabels.d.ts +40 -0
  232. package/esm/shared/coordLabels.js +119 -0
  233. package/package.json +18 -19
  234. package/esm/BaseLinearDisplay/SVGLegend.d.ts +0 -6
  235. package/esm/BaseLinearDisplay/SVGLegend.js +0 -17
  236. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.d.ts +0 -2
  237. package/esm/BaseLinearDisplay/calculateSvgLegendWidth.js +0 -11
  238. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +0 -8
  239. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -53
  240. package/esm/BaseLinearDisplay/components/Block.d.ts +0 -14
  241. package/esm/BaseLinearDisplay/components/Block.js +0 -45
  242. package/esm/BaseLinearDisplay/components/BlockErrorMessage.d.ts +0 -7
  243. package/esm/BaseLinearDisplay/components/BlockErrorMessage.js +0 -22
  244. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +0 -6
  245. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -26
  246. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.d.ts +0 -9
  247. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/CollapseIntronsDialog.js +0 -42
  248. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.d.ts +0 -11
  249. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/TranscriptTable.js +0 -40
  250. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.d.ts +0 -19
  251. package/esm/BaseLinearDisplay/components/CollapseIntronsDialog/util.js +0 -45
  252. package/esm/BaseLinearDisplay/components/FloatingLabels.d.ts +0 -5
  253. package/esm/BaseLinearDisplay/components/FloatingLabels.js +0 -75
  254. package/esm/BaseLinearDisplay/components/FloatingLegend.d.ts +0 -8
  255. package/esm/BaseLinearDisplay/components/FloatingLegend.js +0 -43
  256. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +0 -5
  257. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -23
  258. package/esm/BaseLinearDisplay/components/LoadingOverlay.d.ts +0 -5
  259. package/esm/BaseLinearDisplay/components/LoadingOverlay.js +0 -49
  260. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.d.ts +0 -4
  261. package/esm/BaseLinearDisplay/components/MaxHeightReachedIndicator.js +0 -26
  262. package/esm/BaseLinearDisplay/components/MenuPage.d.ts +0 -8
  263. package/esm/BaseLinearDisplay/components/MenuPage.js +0 -24
  264. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.d.ts +0 -21
  265. package/esm/BaseLinearDisplay/components/NonBlockCanvasDisplayComponent.js +0 -52
  266. package/esm/BaseLinearDisplay/components/RenderedBlocks.d.ts +0 -12
  267. package/esm/BaseLinearDisplay/components/RenderedBlocks.js +0 -22
  268. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +0 -12
  269. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -18
  270. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +0 -10
  271. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -20
  272. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +0 -13
  273. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -22
  274. package/esm/BaseLinearDisplay/components/types.d.ts +0 -1
  275. package/esm/BaseLinearDisplay/components/util.d.ts +0 -21
  276. package/esm/BaseLinearDisplay/components/util.js +0 -107
  277. package/esm/BaseLinearDisplay/index.d.ts +0 -17
  278. package/esm/BaseLinearDisplay/index.js +0 -13
  279. package/esm/BaseLinearDisplay/model.d.ts +0 -1197
  280. package/esm/BaseLinearDisplay/model.js +0 -432
  281. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +0 -32
  282. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -113
  283. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.d.ts +0 -26
  284. package/esm/BaseLinearDisplay/models/NonBlockCanvasDisplayMixin.js +0 -57
  285. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.d.ts +0 -8
  286. package/esm/BaseLinearDisplay/models/SvgFloatingLabels.js +0 -19
  287. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +0 -11
  288. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -31
  289. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +0 -2
  290. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -29
  291. package/esm/BaseLinearDisplay/models/configSchema.d.ts +0 -29
  292. package/esm/BaseLinearDisplay/models/configSchema.js +0 -33
  293. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +0 -98
  294. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -242
  295. package/esm/BaseLinearDisplay/models/util.d.ts +0 -9
  296. package/esm/BaseLinearDisplay/models/util.js +0 -43
  297. package/esm/BaseLinearDisplay/renderSvg.d.ts +0 -3
  298. package/esm/BaseLinearDisplay/renderSvg.js +0 -63
  299. package/esm/BaseLinearDisplay/types.d.ts +0 -43
  300. package/esm/BaseLinearDisplay/types.js +0 -3
  301. package/esm/BaseLinearDisplay/util.d.ts +0 -16
  302. package/esm/BaseLinearDisplay/util.js +0 -71
  303. package/esm/BasicTrack/configSchema.d.ts +0 -85
  304. package/esm/BasicTrack/configSchema.js +0 -8
  305. package/esm/BasicTrack/index.d.ts +0 -2
  306. package/esm/BasicTrack/index.js +0 -12
  307. package/esm/LinearBareDisplay/configSchema.d.ts +0 -32
  308. package/esm/LinearBareDisplay/configSchema.js +0 -11
  309. package/esm/LinearBareDisplay/index.d.ts +0 -4
  310. package/esm/LinearBareDisplay/index.js +0 -20
  311. package/esm/LinearBareDisplay/model.d.ts +0 -1196
  312. package/esm/LinearBareDisplay/model.js +0 -32
  313. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.d.ts +0 -5
  314. package/esm/LinearBasicDisplay/components/LinearBasicDisplayComponent.js +0 -9
  315. package/esm/LinearBasicDisplay/configSchema.d.ts +0 -32
  316. package/esm/LinearBasicDisplay/configSchema.js +0 -11
  317. package/esm/LinearBasicDisplay/index.d.ts +0 -4
  318. package/esm/LinearBasicDisplay/index.js +0 -20
  319. package/esm/LinearBasicDisplay/model.d.ts +0 -1391
  320. package/esm/LinearBasicDisplay/model.js +0 -158
  321. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.d.ts +0 -9
  322. package/esm/LinearFeatureDisplay/components/AddFiltersDialog.js +0 -58
  323. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.d.ts +0 -8
  324. package/esm/LinearFeatureDisplay/components/SetMaxHeightDialog.js +0 -26
  325. package/esm/LinearFeatureDisplay/configSchema.d.ts +0 -32
  326. package/esm/LinearFeatureDisplay/configSchema.js +0 -11
  327. package/esm/LinearFeatureDisplay/index.d.ts +0 -3
  328. package/esm/LinearFeatureDisplay/index.js +0 -2
  329. package/esm/LinearFeatureDisplay/model.d.ts +0 -1443
  330. package/esm/LinearFeatureDisplay/model.js +0 -305
  331. package/esm/LinearGenomeView/SVGErrorBox.d.ts +0 -5
  332. package/esm/LinearGenomeView/SVGErrorBox.js +0 -4
  333. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +0 -11
  334. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +0 -27
  335. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +0 -5
  336. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -13
  337. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +0 -3
  338. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -17
  339. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +0 -3
  340. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -8
  341. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +0 -16
  342. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -101
  343. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +0 -10
  344. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -45
  345. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +0 -15
  346. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -32
  347. package/esm/LinearGenomeView/components/RubberbandTooltip.d.ts +0 -5
  348. package/esm/LinearGenomeView/components/RubberbandTooltip.js +0 -17
  349. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +0 -8
  350. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -25
  351. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +0 -7
  352. package/esm/LinearGenomeView/components/useWheelScroll.js +0 -69
  353. package/esm/LinearGenomeView/svgExportUtil.d.ts +0 -9
  354. package/esm/LinearGenomeView/svgExportUtil.js +0 -6
  355. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +0 -5
  356. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +0 -7
  357. /package/esm/{BaseLinearDisplay/components → MultiLevelRubberband}/types.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-linear-genome-view",
3
- "version": "4.3.0",
3
+ "version": "5.0.0-beta.2",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 linear genome view",
6
6
  "keywords": [
@@ -21,37 +21,36 @@
21
21
  "esm"
22
22
  ],
23
23
  "dependencies": {
24
- "@jbrowse/mobx-state-tree": "^5.6.0",
25
- "@mui/icons-material": "^7.3.11",
26
- "@mui/material": "^7.3.11",
27
- "@types/file-saver-es": "^2.0.3",
28
- "copy-to-clipboard": "^3.3.3",
29
- "file-saver-es": "^2.0.5",
30
- "mobx": "^6.15.3",
31
- "mobx-react": "^9.2.1",
32
- "@jbrowse/product-core": "^4.3.0",
33
- "@jbrowse/core": "^4.3.0"
24
+ "@jbrowse/mobx-state-tree": "^6.5.1",
25
+ "@mui/icons-material": "^9.4.0",
26
+ "@mui/material": "^9.4.0",
27
+ "mobx": "^7.0.3",
28
+ "mobx-react": "^10.0.2",
29
+ "@jbrowse/core": "^5.0.0-beta.2",
30
+ "@jbrowse/render-core": "^5.0.0-beta.2",
31
+ "@jbrowse/display-ui": "^5.0.0-beta.2",
32
+ "@jbrowse/display-kit": "^5.0.0-beta.2"
34
33
  },
35
34
  "peerDependencies": {
36
- "react": ">=18.0.0",
37
- "react-dom": ">=18.0.0"
35
+ "react": ">=19.0.0",
36
+ "react-dom": ">=19.0.0"
38
37
  },
39
38
  "publishConfig": {
40
39
  "access": "public"
41
40
  },
42
41
  "sideEffects": false,
42
+ "devDependencies": {
43
+ "@jbrowse/display-test-utils": "^5.0.0-beta.2"
44
+ },
43
45
  "scripts": {
44
46
  "prebuild": "pnpm clean",
45
47
  "build": "pnpm run /^build:/",
46
- "build:esm": "tsc -p tsconfig.build.esm.json",
48
+ "build:esm": "node ../../node_modules/typescript7/bin/tsc --build tsconfig.build.esm.json",
47
49
  "clean": "rimraf esm *.tsbuildinfo",
48
- "test": "cd ../..; jest --passWithNoTests plugins/linear-genome-view"
50
+ "test": "jest --config ../../jest.config.js --passWithNoTests --testPathPatterns plugins/linear-genome-view"
49
51
  },
50
52
  "types": "esm/index.d.ts",
51
53
  "exports": {
52
- ".": {
53
- "types": "./esm/index.d.ts",
54
- "import": "./esm/index.js"
55
- }
54
+ ".": "./esm/index.js"
56
55
  }
57
56
  }
@@ -1,6 +0,0 @@
1
- import type { LegendItem } from './components/FloatingLegend.tsx';
2
- export default function SVGLegend({ items, width, legendAreaWidth, }: {
3
- items: LegendItem[];
4
- width: number;
5
- legendAreaWidth?: number;
6
- }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { measureText } from '@jbrowse/core/util';
3
- const LEGEND_FONT_SIZE = 10;
4
- const LEGEND_BOX_SIZE = 12;
5
- const LEGEND_PADDING = 3;
6
- export default function SVGLegend({ items, width, legendAreaWidth, }) {
7
- if (items.length === 0) {
8
- return null;
9
- }
10
- const itemHeight = LEGEND_BOX_SIZE + 2;
11
- const legendHeight = items.length * itemHeight + LEGEND_PADDING * 2;
12
- const maxLabelWidth = Math.max(...items.map(item => measureText(item.label, LEGEND_FONT_SIZE)));
13
- const legendWidth = LEGEND_BOX_SIZE + 8 + maxLabelWidth + LEGEND_PADDING * 2;
14
- const x = legendAreaWidth ? width + 10 : width - legendWidth - 10;
15
- const y = 10;
16
- return (_jsxs("g", { transform: `translate(${x}, ${y})`, children: [_jsx("rect", { x: 0, y: 0, width: legendWidth, height: legendHeight, fill: "rgba(255,255,255,0.9)", stroke: "#ccc", strokeWidth: 1, rx: 4 }), items.map((item, idx) => (_jsxs("g", { transform: `translate(${LEGEND_PADDING}, ${LEGEND_PADDING + idx * itemHeight})`, children: [item.color ? (_jsx("rect", { x: 0, y: 0, width: LEGEND_BOX_SIZE, height: LEGEND_BOX_SIZE, fill: item.color })) : null, _jsx("text", { x: LEGEND_BOX_SIZE + 6, y: LEGEND_BOX_SIZE - 2, fontSize: LEGEND_FONT_SIZE, fill: "black", children: item.label })] }, `legend-${idx}`)))] }));
17
- }
@@ -1,2 +0,0 @@
1
- import type { LegendItem } from './components/FloatingLegend.tsx';
2
- export declare function calculateSvgLegendWidth(items: LegendItem[]): number;
@@ -1,11 +0,0 @@
1
- import { measureText } from '@jbrowse/core/util';
2
- const LEGEND_FONT_SIZE = 10;
3
- const LEGEND_BOX_SIZE = 12;
4
- const LEGEND_PADDING = 3;
5
- export function calculateSvgLegendWidth(items) {
6
- if (items.length === 0) {
7
- return 0;
8
- }
9
- const maxLabelWidth = Math.max(...items.map(item => measureText(item.label, LEGEND_FONT_SIZE)));
10
- return LEGEND_BOX_SIZE + 8 + maxLabelWidth + LEGEND_PADDING * 2 + 20;
11
- }
@@ -1,8 +0,0 @@
1
- import type { BaseLinearDisplayModel } from '../model.ts';
2
- declare const BaseLinearDisplay: (props: {
3
- model: BaseLinearDisplayModel;
4
- children?: React.ReactNode;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- export default BaseLinearDisplay;
7
- export { default as Tooltip } from './Tooltip.tsx';
8
- export { default as BlockMsg } from './BlockMsg.tsx';
@@ -1,53 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Suspense, useRef, useState } from 'react';
3
- import { getConf } from '@jbrowse/core/configuration';
4
- import { makeStyles } from '@jbrowse/core/util/tss-react';
5
- import { useTheme } from '@mui/material';
6
- import { observer } from 'mobx-react';
7
- import FloatingLegend from "./FloatingLegend.js";
8
- import LinearBlocks from "./LinearBlocks.js";
9
- import MenuPage from "./MenuPage.js";
10
- const useStyles = makeStyles()({
11
- display: {
12
- position: 'relative',
13
- whiteSpace: 'nowrap',
14
- textAlign: 'left',
15
- width: '100%',
16
- minHeight: '100%',
17
- },
18
- });
19
- const BaseLinearDisplay = observer(function BaseLinearDisplay(props) {
20
- const { classes } = useStyles();
21
- const ref = useRef(null);
22
- const [clientRect, setClientRect] = useState();
23
- const [offsetMouseCoord, setOffsetMouseCoord] = useState([0, 0]);
24
- const [clientMouseCoord, setClientMouseCoord] = useState([0, 0]);
25
- const [contextCoord, setContextCoord] = useState();
26
- const { model, children } = props;
27
- const { TooltipComponent, DisplayMessageComponent, height, showLegend, showTooltipsEnabled, } = model;
28
- const theme = useTheme();
29
- const legendItems = model.legendItems(theme);
30
- return (_jsxs("div", { ref: ref, "data-testid": `display-${getConf(model, 'displayId')}`, className: classes.display, onContextMenu: event => {
31
- event.preventDefault();
32
- if (contextCoord) {
33
- setContextCoord(undefined);
34
- }
35
- else if (ref.current) {
36
- setContextCoord([event.clientX, event.clientY]);
37
- }
38
- }, onMouseMove: event => {
39
- if (!ref.current) {
40
- return;
41
- }
42
- const rect = ref.current.getBoundingClientRect();
43
- const { left, top } = rect;
44
- setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
45
- setClientMouseCoord([event.clientX, event.clientY]);
46
- setClientRect(rect);
47
- }, children: [DisplayMessageComponent ? (_jsx(DisplayMessageComponent, { model: model })) : (_jsx(LinearBlocks, { ...props })), children, showLegend && legendItems.length > 0 ? (_jsx(FloatingLegend, { items: legendItems })) : null, showTooltipsEnabled ? (_jsx(Suspense, { fallback: null, children: _jsx(TooltipComponent, { model: model, height: height, offsetMouseCoord: offsetMouseCoord, clientMouseCoord: clientMouseCoord, clientRect: clientRect, mouseCoord: offsetMouseCoord }) })) : null, contextCoord ? (_jsx(MenuPage, { contextCoord: contextCoord, model: model, onClose: () => {
48
- setContextCoord(undefined);
49
- } })) : null] }));
50
- });
51
- export default BaseLinearDisplay;
52
- export { default as Tooltip } from "./Tooltip.js";
53
- export { default as BlockMsg } from "./BlockMsg.js";
@@ -1,14 +0,0 @@
1
- import type { BaseBlock } from '@jbrowse/core/util/blockTypes';
2
- declare const ContentBlock: ({ block, children, }: {
3
- block: BaseBlock;
4
- children: React.ReactNode;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- declare function ElidedBlock({ width }: {
7
- width: number;
8
- }): import("react/jsx-runtime").JSX.Element;
9
- declare function InterRegionPaddingBlock({ boundary, width, style, }: {
10
- boundary: boolean;
11
- width: number;
12
- style?: React.CSSProperties;
13
- }): import("react/jsx-runtime").JSX.Element;
14
- export { ContentBlock, ElidedBlock, InterRegionPaddingBlock };
@@ -1,45 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { makeStyles } from '@jbrowse/core/util/tss-react';
3
- import { observer } from 'mobx-react';
4
- const useStyles = makeStyles()(theme => ({
5
- contentBlock: {
6
- position: 'relative',
7
- minHeight: '100%',
8
- boxSizing: 'border-box',
9
- whiteSpace: 'nowrap',
10
- overflow: 'hidden',
11
- },
12
- elidedBlock: {
13
- minHeight: '100%',
14
- boxSizing: 'border-box',
15
- backgroundColor: '#999',
16
- backgroundImage: 'repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,.5) 1px, rgba(255,255,255,.5) 3px)',
17
- },
18
- interRegionPaddingBlock: {
19
- minHeight: '100%',
20
- backgroundColor: theme.palette.text.disabled,
21
- },
22
- boundaryPaddingBlock: {
23
- minHeight: '100%',
24
- backgroundColor: theme.palette.action.disabledBackground,
25
- },
26
- }));
27
- const ContentBlock = observer(function ContentBlock({ block, children, }) {
28
- const { classes } = useStyles();
29
- const { widthPx } = block;
30
- return (_jsx("div", { style: { width: widthPx }, className: classes.contentBlock, children: children }));
31
- });
32
- function ElidedBlock({ width }) {
33
- const { classes } = useStyles();
34
- return _jsx("div", { className: classes.elidedBlock, style: { width } });
35
- }
36
- function InterRegionPaddingBlock({ boundary, width, style = {}, }) {
37
- const { classes } = useStyles();
38
- return (_jsx("div", { style: {
39
- ...style,
40
- width,
41
- }, className: boundary
42
- ? classes.boundaryPaddingBlock
43
- : classes.interRegionPaddingBlock }));
44
- }
45
- export { ContentBlock, ElidedBlock, InterRegionPaddingBlock };
@@ -1,7 +0,0 @@
1
- declare const BlockErrorMessage: ({ model, }: {
2
- model: {
3
- error?: unknown;
4
- reload: () => void;
5
- };
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default BlockErrorMessage;
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import ErrorMessageStackTraceDialog from '@jbrowse/core/ui/ErrorMessageStackTraceDialog';
3
- import { getSession } from '@jbrowse/core/util';
4
- import RefreshIcon from '@mui/icons-material/Refresh';
5
- import ReportIcon from '@mui/icons-material/Report';
6
- import { IconButton, Tooltip } from '@mui/material';
7
- import { observer } from 'mobx-react';
8
- import BlockMsg from "./BlockMsg.js";
9
- const BlockErrorMessage = observer(function BlockErrorMessage({ model, }) {
10
- return (_jsx(BlockMsg, { message: `${model.error}`, severity: "error", action: _jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Reload track", children: _jsx(IconButton, { "data-testid": "reload_button", onClick: () => {
11
- model.reload();
12
- }, children: _jsx(RefreshIcon, {}) }) }), _jsx(Tooltip, { title: "Show stack trace", children: _jsx(IconButton, { onClick: () => {
13
- getSession(model).queueDialog(onClose => [
14
- ErrorMessageStackTraceDialog,
15
- {
16
- onClose,
17
- error: model.error,
18
- },
19
- ]);
20
- }, children: _jsx(ReportIcon, {}) }) })] }) }));
21
- });
22
- export default BlockErrorMessage;
@@ -1,6 +0,0 @@
1
- import type { AlertColor } from '@mui/material';
2
- export default function BlockMsg({ message, severity, action, }: {
3
- message: string;
4
- severity?: AlertColor;
5
- action?: React.ReactNode;
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { makeStyles } from '@jbrowse/core/util/tss-react';
3
- import { Alert, Tooltip } from '@mui/material';
4
- const useStyles = makeStyles()({
5
- ellipses: {
6
- textOverflow: 'ellipsis',
7
- overflow: 'hidden',
8
- },
9
- content: {
10
- textOverflow: 'ellipsis',
11
- overflow: 'hidden',
12
- whiteSpace: 'nowrap',
13
- maxWidth: '80%',
14
- textAlign: 'center',
15
- },
16
- });
17
- export default function BlockMsg({ message, severity, action, }) {
18
- const { classes } = useStyles();
19
- return (_jsx(Alert, { severity: severity, action: action, classes: {
20
- message: classes.ellipses,
21
- }, onMouseDown: event => {
22
- event.stopPropagation();
23
- }, onClick: event => {
24
- event.stopPropagation();
25
- }, children: _jsx(Tooltip, { title: message, children: _jsx("div", { className: classes.content, children: message }) }) }));
26
- }
@@ -1,9 +0,0 @@
1
- import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
2
- import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
3
- import type { Feature } from '@jbrowse/core/util';
4
- export default function CollapseIntronsDialog({ view, transcripts, assembly, handleClose, }: {
5
- view: LinearGenomeViewModel;
6
- transcripts: Feature[];
7
- assembly: Assembly;
8
- handleClose: () => void;
9
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,42 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { Dialog } from '@jbrowse/core/ui';
4
- import { getSession } from '@jbrowse/core/util';
5
- import { Button, DialogActions, DialogContent, DialogContentText, TextField, } from '@mui/material';
6
- import TranscriptTable from "./TranscriptTable.js";
7
- import { collapseIntrons } from "./util.js";
8
- export default function CollapseIntronsDialog({ view, transcripts, assembly, handleClose, }) {
9
- const [showAll, setShowAll] = useState(false);
10
- const [windowSize, setWindowSize] = useState('100');
11
- const windowSizeNum = +windowSize;
12
- const validWindowSize = !Number.isNaN(windowSizeNum) && windowSizeNum >= 0;
13
- return (_jsxs(Dialog, { open: true, maxWidth: "md", onClose: handleClose, title: "Select transcript to collapse", children: [_jsxs(DialogContent, { children: [_jsxs(DialogContentText, { component: "div", children: [_jsx("p", { children: "Select the 'window size' which will be the extra space surrounding splice boundary to include. 10bp will only include a small 10bp region around splice boundary" }), _jsx("p", { children: "By default the union of exons from all transcripts will be used to create the collapsed intron view, but you can optionally use the exons of only a specific transcript by clicking \"Show all transcripts\" and then \"Select\"" })] }), _jsx(TextField, { label: "Number of bp around splice site to include", value: windowSize, onChange: event => {
14
- setWindowSize(event.target.value);
15
- }, error: windowSize !== '' && !validWindowSize, helperText: windowSize !== '' && !validWindowSize
16
- ? 'Must be a non-negative number'
17
- : '', type: "number", slotProps: {
18
- htmlInput: {
19
- min: 0,
20
- step: 10,
21
- },
22
- }, style: { marginBottom: 16, width: 250 } }), _jsxs(Button, { style: { float: 'right' }, onClick: () => {
23
- setShowAll(s => !s);
24
- }, children: [!showAll ? 'Show' : 'Hide', " all transcripts (", transcripts.length, ")"] }), showAll ? (_jsx(TranscriptTable, { transcripts: transcripts, view: view, assembly: assembly, padding: windowSizeNum, validPadding: validWindowSize, handleClose: handleClose })) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { size: "small", variant: "contained", color: "primary", disabled: !validWindowSize, onClick: () => {
25
- ;
26
- (async () => {
27
- try {
28
- await collapseIntrons({
29
- view,
30
- transcripts,
31
- assembly,
32
- padding: windowSizeNum,
33
- });
34
- handleClose();
35
- }
36
- catch (e) {
37
- getSession(view).notifyError(`${e}`, e);
38
- console.error(e);
39
- }
40
- })();
41
- }, children: "Submit" }), _jsx(Button, { onClick: handleClose, variant: "contained", color: "secondary", children: "Cancel" })] })] }));
42
- }
@@ -1,11 +0,0 @@
1
- import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
2
- import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
3
- import type { Feature } from '@jbrowse/core/util';
4
- export default function TranscriptTable({ transcripts, view, assembly, padding, validPadding, handleClose, }: {
5
- transcripts: Feature[];
6
- view: LinearGenomeViewModel;
7
- assembly: Assembly;
8
- padding: number;
9
- validPadding: boolean;
10
- handleClose: () => void;
11
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,40 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getSession, toLocale } from '@jbrowse/core/util';
3
- import { Box, Button, Table, TableBody, TableCell, TableHead, TableRow, } from '@mui/material';
4
- import { collapseIntrons, getExonsAndCDS } from "./util.js";
5
- export default function TranscriptTable({ transcripts, view, assembly, padding, validPadding, handleClose, }) {
6
- const sorted = [...transcripts].sort((a, b) => {
7
- const lenA = a.get('end') - a.get('start');
8
- const lenB = b.get('end') - b.get('start');
9
- return lenB - lenA;
10
- });
11
- return (_jsx(Box, { sx: { maxHeight: 600, overflow: 'auto' }, children: _jsxs(Table, { size: "small", stickyHeader: true, children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Name/ID" }), _jsx(TableCell, { children: "Type" }), _jsx(TableCell, { align: "right", children: "Length" }), _jsx(TableCell, { align: "right", children: "Exons" }), _jsx(TableCell, { align: "right", children: "CDS" }), _jsx(TableCell, {})] }) }), _jsx(TableBody, { children: sorted.map((transcript, idx) => {
12
- const start = transcript.get('start');
13
- const end = transcript.get('end');
14
- const name = transcript.get('name') ||
15
- transcript.get('id') ||
16
- `Transcript ${idx + 1}`;
17
- const type = transcript.get('type') || 'transcript';
18
- const exonsAndCDS = getExonsAndCDS([transcript]);
19
- const exonCount = exonsAndCDS.filter(f => f.get('type') === 'exon').length;
20
- const cdsCount = exonsAndCDS.length - exonCount;
21
- return (_jsxs(TableRow, { children: [_jsx(TableCell, { children: name }), _jsx(TableCell, { children: type }), _jsxs(TableCell, { align: "right", children: [toLocale(end - start), " bp"] }), _jsx(TableCell, { align: "right", children: exonCount }), _jsx(TableCell, { align: "right", children: cdsCount }), _jsx(TableCell, { align: "right", children: _jsx(Button, { size: "small", variant: "contained", color: "primary", disabled: !validPadding, onClick: () => {
22
- ;
23
- (async () => {
24
- try {
25
- await collapseIntrons({
26
- view,
27
- transcripts: [transcript],
28
- assembly,
29
- padding,
30
- });
31
- handleClose();
32
- }
33
- catch (e) {
34
- getSession(view).notifyError(`${e}`, e);
35
- console.error(e);
36
- }
37
- })();
38
- }, children: "Select" }) })] }, transcript.id()));
39
- }) })] }) }));
40
- }
@@ -1,19 +0,0 @@
1
- import type { LinearGenomeViewModel } from '../../../LinearGenomeView/index.ts';
2
- import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
3
- import type { Feature } from '@jbrowse/core/util';
4
- export declare function getExonsAndCDS(transcripts: Feature[]): Feature[];
5
- interface ViewState {
6
- bpPerPx: number;
7
- offsetPx: number;
8
- }
9
- export declare function calculateInitialViewState(regions: {
10
- start: number;
11
- end: number;
12
- }[], viewWidth: number): ViewState;
13
- export declare function collapseIntrons({ view, transcripts, assembly, padding, }: {
14
- view: LinearGenomeViewModel;
15
- transcripts: Feature[];
16
- assembly: Assembly;
17
- padding: number;
18
- }): Promise<void>;
19
- export {};
@@ -1,45 +0,0 @@
1
- import { getSession, mergeIntervals } from '@jbrowse/core/util';
2
- import { getSnapshot } from '@jbrowse/mobx-state-tree';
3
- import { when } from 'mobx';
4
- export function getExonsAndCDS(transcripts) {
5
- return transcripts.flatMap(transcript => transcript
6
- .get('subfeatures')
7
- ?.filter(f => f.get('type') === 'exon' || f.get('type') === 'CDS') ??
8
- []);
9
- }
10
- export function calculateInitialViewState(regions, viewWidth) {
11
- const totalBp = regions.reduce((sum, r) => sum + (r.end - r.start), 0);
12
- const bpPerPx = totalBp / (viewWidth * 0.9);
13
- const numPaddings = Math.max(0, regions.length - 1);
14
- const interRegionPaddingWidth = 2;
15
- const totalPaddingPx = numPaddings * interRegionPaddingWidth;
16
- const totalContentPx = totalBp / bpPerPx + totalPaddingPx;
17
- const centerPx = totalContentPx / 2;
18
- const offsetPx = Math.round(centerPx - viewWidth / 2);
19
- return { bpPerPx, offsetPx };
20
- }
21
- export async function collapseIntrons({ view, transcripts, assembly, padding, }) {
22
- const r0 = transcripts[0]?.get('refName');
23
- if (!r0) {
24
- return;
25
- }
26
- const refName = assembly.getCanonicalRefName2(r0);
27
- const subs = getExonsAndCDS(transcripts);
28
- const snapshot = getSnapshot(view);
29
- const { id, offsetPx, bpPerPx, ...rest } = snapshot;
30
- const mergedRegions = mergeIntervals(subs.map(f => ({
31
- refName,
32
- start: f.get('start') - padding,
33
- end: f.get('end') + padding,
34
- assemblyName: view.assemblyNames[0],
35
- })), padding);
36
- const initialState = calculateInitialViewState(mergedRegions, view.width);
37
- const newView = getSession(view).addView('LinearGenomeView', {
38
- ...rest,
39
- tracks: rest.tracks.map(({ id, ...r }) => r),
40
- displayedRegions: mergedRegions,
41
- bpPerPx: initialState.bpPerPx,
42
- offsetPx: initialState.offsetPx,
43
- });
44
- await when(() => newView.initialized);
45
- }
@@ -1,5 +0,0 @@
1
- import type { FeatureTrackModel } from '../../LinearBasicDisplay/model.ts';
2
- declare const FloatingLabels: ({ model, }: {
3
- model: FeatureTrackModel;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default FloatingLabels;
@@ -1,75 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getContainingView } from '@jbrowse/core/util';
3
- import { makeStyles } from '@jbrowse/core/util/tss-react';
4
- import { observer } from 'mobx-react';
5
- import { calculateFloatingLabelPosition } from "./util.js";
6
- const useStyles = makeStyles()({
7
- container: {
8
- position: 'absolute',
9
- top: 0,
10
- left: 0,
11
- width: '100%',
12
- height: '100%',
13
- pointerEvents: 'none',
14
- zIndex: 5,
15
- },
16
- label: {
17
- position: 'absolute',
18
- fontSize: 11,
19
- cursor: 'default',
20
- pointerEvents: 'auto',
21
- },
22
- overlay: {
23
- backgroundColor: 'rgba(255, 255, 255, 0.8)',
24
- lineHeight: 1,
25
- },
26
- });
27
- function FloatingLabel({ text, color, isOverlay, featureLeftPx, featureRightPx, featureId, subfeatureId, labelWidth, y, offsetPx, tooltip, labelClass, overlayClass, }) {
28
- const x = calculateFloatingLabelPosition(featureLeftPx, featureRightPx, labelWidth, offsetPx);
29
- return (_jsx("div", { "data-feature-id": featureId, "data-subfeature-id": subfeatureId, "data-tooltip": tooltip, className: isOverlay ? `${labelClass} ${overlayClass}` : labelClass, style: { color, transform: `translate(${x}px,${y}px)` }, children: text }));
30
- }
31
- const FloatingLabels = observer(function FloatingLabels({ model, }) {
32
- const { classes } = useStyles();
33
- const view = getContainingView(model);
34
- const { offsetPx } = view;
35
- const featureLabels = model.floatingLabelData;
36
- const { onFeatureClick, onFeatureContextMenu, onMouseMove } = model.renderingProps();
37
- const labels = [];
38
- for (const [key, { leftPx, topPx, totalFeatureHeight, floatingLabels: labelData, featureWidth, },] of featureLabels.entries()) {
39
- const featureVisualBottom = topPx + totalFeatureHeight;
40
- const featureRightPx = leftPx + featureWidth;
41
- for (let i = 0, l = labelData.length; i < l; i++) {
42
- const floatingLabel = labelData[i];
43
- const { text, relativeY, color, isOverlay, textWidth: labelWidth, parentFeatureId, subfeatureId, tooltip, } = floatingLabel;
44
- const y = featureVisualBottom + relativeY;
45
- const labelKey = `${key}-${i}`;
46
- const featureId = parentFeatureId ?? key;
47
- labels.push(_jsx(FloatingLabel, { text: text, color: color, isOverlay: isOverlay ?? false, featureLeftPx: leftPx, featureRightPx: featureRightPx, featureId: featureId, subfeatureId: subfeatureId, labelWidth: labelWidth, y: y, offsetPx: offsetPx, tooltip: tooltip, labelClass: classes.label, overlayClass: classes.overlay }, labelKey));
48
- }
49
- }
50
- return (_jsx("div", { className: classes.container, onClick: e => {
51
- const target = e.target;
52
- const subfeatureId = target.dataset.subfeatureId;
53
- const featureId = subfeatureId ?? target.dataset.featureId;
54
- if (featureId) {
55
- onFeatureClick?.(e, featureId);
56
- }
57
- }, onContextMenu: e => {
58
- const target = e.target;
59
- const subfeatureId = target.dataset.subfeatureId;
60
- const featureId = subfeatureId ?? target.dataset.featureId;
61
- if (featureId) {
62
- onFeatureContextMenu?.(e, featureId);
63
- }
64
- }, onMouseOver: e => {
65
- const target = e.target;
66
- const featureId = target.dataset.featureId;
67
- if (featureId) {
68
- const tooltip = target.dataset.tooltip;
69
- const subfeatureId = target.dataset.subfeatureId;
70
- onMouseMove?.(e, featureId, tooltip);
71
- model.setSubfeatureIdUnderMouse(subfeatureId);
72
- }
73
- }, children: labels }));
74
- });
75
- export default FloatingLabels;
@@ -1,8 +0,0 @@
1
- export interface LegendItem {
2
- color?: string;
3
- label: string;
4
- }
5
- declare const FloatingLegend: ({ items, }: {
6
- items: LegendItem[];
7
- }) => import("react/jsx-runtime").JSX.Element | null;
8
- export default FloatingLegend;
@@ -1,43 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { makeStyles } from '@jbrowse/core/util/tss-react';
3
- import { observer } from 'mobx-react';
4
- const useStyles = makeStyles()(theme => ({
5
- legend: {
6
- position: 'absolute',
7
- right: 10,
8
- top: 10,
9
- background: theme.palette.background.paper,
10
- padding: 3,
11
- fontSize: 10,
12
- pointerEvents: 'none',
13
- zIndex: 100,
14
- maxWidth: 200,
15
- },
16
- item: {
17
- display: 'flex',
18
- alignItems: 'center',
19
- marginBottom: 1,
20
- '&:last-child': {
21
- marginBottom: 0,
22
- },
23
- },
24
- colorBox: {
25
- width: 12,
26
- height: 12,
27
- marginRight: 6,
28
- flexShrink: 0,
29
- },
30
- label: {
31
- whiteSpace: 'nowrap',
32
- overflow: 'hidden',
33
- textOverflow: 'ellipsis',
34
- },
35
- }));
36
- const FloatingLegend = observer(function FloatingLegend({ items, }) {
37
- const { classes } = useStyles();
38
- if (items.length === 0) {
39
- return null;
40
- }
41
- return (_jsx("div", { className: classes.legend, children: items.map((item, idx) => (_jsxs("div", { className: classes.item, children: [_jsx("div", { className: classes.colorBox, style: { backgroundColor: item.color } }), _jsx("span", { className: classes.label, children: item.label })] }, `${item.label}-${idx}`))) }));
42
- });
43
- export default FloatingLegend;
@@ -1,5 +0,0 @@
1
- import type { BaseLinearDisplayModel } from '../model.ts';
2
- declare const LinearBlocks: ({ model, }: {
3
- model: BaseLinearDisplayModel;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default LinearBlocks;
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getContainingView } from '@jbrowse/core/util';
3
- import { makeStyles } from '@jbrowse/core/util/tss-react';
4
- import { observer } from 'mobx-react';
5
- import RenderedBlocks from "./RenderedBlocks.js";
6
- const useStyles = makeStyles()({
7
- linearBlocks: {
8
- whiteSpace: 'nowrap',
9
- textAlign: 'left',
10
- position: 'absolute',
11
- minHeight: '100%',
12
- display: 'flex',
13
- },
14
- });
15
- const LinearBlocks = observer(function LinearBlocks({ model, }) {
16
- const { classes } = useStyles();
17
- const { blockDefinitions } = model;
18
- const viewModel = getContainingView(model);
19
- return (_jsx("div", { className: classes.linearBlocks, style: {
20
- left: blockDefinitions.offsetPx - viewModel.offsetPx,
21
- }, children: _jsx(RenderedBlocks, { model: model }) }));
22
- });
23
- export default LinearBlocks;