@jbrowse/plugin-linear-genome-view 2.18.0 → 3.0.0

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 (294) hide show
  1. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -2
  2. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +17 -44
  3. package/dist/BaseLinearDisplay/components/Block.d.ts +3 -4
  4. package/dist/BaseLinearDisplay/components/Block.js +4 -7
  5. package/dist/BaseLinearDisplay/components/BlockError.d.ts +1 -2
  6. package/dist/BaseLinearDisplay/components/BlockError.js +9 -15
  7. package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +1 -2
  8. package/dist/BaseLinearDisplay/components/BlockMsg.js +3 -8
  9. package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +2 -3
  10. package/dist/BaseLinearDisplay/components/LinearBlocks.js +21 -27
  11. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +1 -2
  12. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +23 -14
  13. package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -3
  14. package/dist/BaseLinearDisplay/components/TooLargeMessage.js +11 -7
  15. package/dist/BaseLinearDisplay/components/Tooltip.d.ts +7 -4
  16. package/dist/BaseLinearDisplay/components/Tooltip.js +5 -5
  17. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +7 -7
  18. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +17 -7
  19. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +1 -2
  20. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +2 -2
  21. package/dist/BaseLinearDisplay/models/renderSvg.d.ts +2 -3
  22. package/dist/BaseLinearDisplay/models/renderSvg.js +26 -26
  23. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +1 -1
  24. package/dist/LinearBareDisplay/model.d.ts +6 -6
  25. package/dist/LinearBasicDisplay/components/AddFiltersDialog.d.ts +1 -2
  26. package/dist/LinearBasicDisplay/components/AddFiltersDialog.js +16 -57
  27. package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +1 -2
  28. package/dist/LinearBasicDisplay/components/SetMaxHeightDialog.js +10 -39
  29. package/dist/LinearBasicDisplay/model.d.ts +6 -6
  30. package/dist/LinearBasicDisplay/model.js +17 -7
  31. package/dist/LinearGenomeView/components/CenterLine.d.ts +1 -2
  32. package/dist/LinearGenomeView/components/CenterLine.js +7 -33
  33. package/dist/LinearGenomeView/components/Cytobands.d.ts +1 -2
  34. package/dist/LinearGenomeView/components/Cytobands.js +28 -31
  35. package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -3
  36. package/dist/LinearGenomeView/components/ExportSvgDialog.js +34 -72
  37. package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +1 -2
  38. package/dist/LinearGenomeView/components/GetSequenceDialog.js +27 -62
  39. package/dist/LinearGenomeView/components/Gridlines.d.ts +1 -2
  40. package/dist/LinearGenomeView/components/Gridlines.js +23 -28
  41. package/dist/LinearGenomeView/components/Header.d.ts +3 -5
  42. package/dist/LinearGenomeView/components/Header.js +10 -61
  43. package/dist/LinearGenomeView/components/HeaderPanControls.d.ts +6 -0
  44. package/dist/LinearGenomeView/components/HeaderPanControls.js +30 -0
  45. package/dist/LinearGenomeView/components/HeaderRegionWidth.d.ts +5 -0
  46. package/dist/LinearGenomeView/components/HeaderRegionWidth.js +21 -0
  47. package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +5 -0
  48. package/dist/LinearGenomeView/components/HeaderTrackSelectorButton.js +19 -0
  49. package/dist/LinearGenomeView/components/HeaderZoomControls.d.ts +5 -0
  50. package/dist/LinearGenomeView/components/HeaderZoomControls.js +103 -0
  51. package/dist/LinearGenomeView/components/Highlight.d.ts +9 -4
  52. package/dist/LinearGenomeView/components/Highlight.js +32 -58
  53. package/dist/LinearGenomeView/components/ImportForm.d.ts +1 -2
  54. package/dist/LinearGenomeView/components/ImportForm.js +31 -67
  55. package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +1 -2
  56. package/dist/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +2 -2
  57. package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +1 -2
  58. package/dist/LinearGenomeView/components/LinearGenomeView.js +24 -17
  59. package/dist/LinearGenomeView/components/MiniControls.d.ts +1 -2
  60. package/dist/LinearGenomeView/components/MiniControls.js +6 -13
  61. package/dist/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -2
  62. package/dist/LinearGenomeView/components/NoTracksActiveButton.js +2 -7
  63. package/dist/LinearGenomeView/components/OverviewHighlight.d.ts +1 -2
  64. package/dist/LinearGenomeView/components/OverviewHighlight.js +3 -6
  65. package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +1 -2
  66. package/dist/LinearGenomeView/components/OverviewRubberband.js +6 -33
  67. package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +1 -2
  68. package/dist/LinearGenomeView/components/OverviewScalebar.js +30 -64
  69. package/dist/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +1 -2
  70. package/dist/LinearGenomeView/components/OverviewScalebarPolygon.js +2 -5
  71. package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +1 -2
  72. package/dist/LinearGenomeView/components/OverviewScalebarTickLabels.js +3 -6
  73. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +1 -2
  74. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +3 -3
  75. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +1 -2
  76. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +25 -22
  77. package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +1 -2
  78. package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +4 -43
  79. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -2
  80. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +21 -10
  81. package/dist/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +6 -0
  82. package/dist/LinearGenomeView/components/RegionWidthEditorDialog.js +30 -0
  83. package/dist/LinearGenomeView/components/Rubberband.d.ts +1 -2
  84. package/dist/LinearGenomeView/components/Rubberband.js +7 -32
  85. package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +1 -2
  86. package/dist/LinearGenomeView/components/RubberbandSpan.js +16 -34
  87. package/dist/LinearGenomeView/components/Scalebar.d.ts +1 -1
  88. package/dist/LinearGenomeView/components/Scalebar.js +10 -13
  89. package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -2
  90. package/dist/LinearGenomeView/components/ScalebarCoordinateLabels.js +17 -17
  91. package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +1 -2
  92. package/dist/LinearGenomeView/components/ScalebarCoordinateTicks.js +9 -12
  93. package/dist/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -2
  94. package/dist/LinearGenomeView/components/ScalebarRefNameLabels.js +12 -19
  95. package/dist/LinearGenomeView/components/SearchBox.d.ts +1 -2
  96. package/dist/LinearGenomeView/components/SearchBox.js +2 -2
  97. package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -2
  98. package/dist/LinearGenomeView/components/SearchResultsDialog.js +4 -14
  99. package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +1 -2
  100. package/dist/LinearGenomeView/components/SearchResultsTable.js +15 -31
  101. package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +1 -2
  102. package/dist/LinearGenomeView/components/SequenceSearchDialog.js +39 -72
  103. package/dist/LinearGenomeView/components/TrackContainer.d.ts +1 -2
  104. package/dist/LinearGenomeView/components/TrackContainer.js +10 -36
  105. package/dist/LinearGenomeView/components/TrackLabel.d.ts +1 -2
  106. package/dist/LinearGenomeView/components/TrackLabel.js +10 -78
  107. package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +1 -2
  108. package/dist/LinearGenomeView/components/TrackLabelContainer.js +2 -2
  109. package/dist/LinearGenomeView/components/TrackLabelDragHandle.d.ts +1 -2
  110. package/dist/LinearGenomeView/components/TrackLabelDragHandle.js +3 -4
  111. package/dist/LinearGenomeView/components/TrackLabelMenu.d.ts +5 -0
  112. package/dist/LinearGenomeView/components/TrackLabelMenu.js +79 -0
  113. package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
  114. package/dist/LinearGenomeView/components/TrackRenderingContainer.js +10 -37
  115. package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -2
  116. package/dist/LinearGenomeView/components/TracksContainer.js +33 -27
  117. package/dist/LinearGenomeView/components/VerticalGuide.d.ts +1 -2
  118. package/dist/LinearGenomeView/components/VerticalGuide.js +3 -7
  119. package/dist/LinearGenomeView/components/useRangeSelect.d.ts +1 -1
  120. package/dist/LinearGenomeView/components/useWheelScroll.d.ts +1 -1
  121. package/dist/LinearGenomeView/components/useWheelScroll.js +1 -1
  122. package/dist/LinearGenomeView/index.js +17 -7
  123. package/dist/LinearGenomeView/model.d.ts +1 -39
  124. package/dist/LinearGenomeView/model.js +28 -31
  125. package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +1 -2
  126. package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +2 -5
  127. package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +1 -2
  128. package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +2 -12
  129. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +2 -1
  130. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +2 -12
  131. package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -2
  132. package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +2 -5
  133. package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +1 -2
  134. package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +17 -29
  135. package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -2
  136. package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +2 -9
  137. package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +1 -2
  138. package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +2 -5
  139. package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +1 -2
  140. package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +18 -15
  141. package/dist/LinearGenomeView/types.d.ts +38 -0
  142. package/dist/LinearGenomeView/types.js +2 -0
  143. package/dist/LinearGenomeView/util.d.ts +3 -1
  144. package/dist/LinearGenomeView/util.js +16 -0
  145. package/dist/index.d.ts +10 -10
  146. package/dist/index.js +19 -8
  147. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -2
  148. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +17 -21
  149. package/esm/BaseLinearDisplay/components/Block.d.ts +3 -4
  150. package/esm/BaseLinearDisplay/components/Block.js +4 -4
  151. package/esm/BaseLinearDisplay/components/BlockError.d.ts +1 -2
  152. package/esm/BaseLinearDisplay/components/BlockError.js +9 -15
  153. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +1 -2
  154. package/esm/BaseLinearDisplay/components/BlockMsg.js +3 -5
  155. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +2 -3
  156. package/esm/BaseLinearDisplay/components/LinearBlocks.js +21 -24
  157. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +1 -2
  158. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +6 -7
  159. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -3
  160. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +11 -7
  161. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +7 -4
  162. package/esm/BaseLinearDisplay/components/Tooltip.js +5 -5
  163. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +7 -7
  164. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +1 -2
  165. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +2 -2
  166. package/esm/BaseLinearDisplay/models/renderSvg.d.ts +2 -3
  167. package/esm/BaseLinearDisplay/models/renderSvg.js +9 -16
  168. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +1 -1
  169. package/esm/LinearBareDisplay/model.d.ts +6 -6
  170. package/esm/LinearBasicDisplay/components/AddFiltersDialog.d.ts +1 -2
  171. package/esm/LinearBasicDisplay/components/AddFiltersDialog.js +16 -34
  172. package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.d.ts +1 -2
  173. package/esm/LinearBasicDisplay/components/SetMaxHeightDialog.js +10 -16
  174. package/esm/LinearBasicDisplay/model.d.ts +6 -6
  175. package/esm/LinearGenomeView/components/CenterLine.d.ts +1 -2
  176. package/esm/LinearGenomeView/components/CenterLine.js +7 -10
  177. package/esm/LinearGenomeView/components/Cytobands.d.ts +1 -2
  178. package/esm/LinearGenomeView/components/Cytobands.js +28 -28
  179. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -3
  180. package/esm/LinearGenomeView/components/ExportSvgDialog.js +34 -49
  181. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +1 -2
  182. package/esm/LinearGenomeView/components/GetSequenceDialog.js +27 -39
  183. package/esm/LinearGenomeView/components/Gridlines.d.ts +1 -2
  184. package/esm/LinearGenomeView/components/Gridlines.js +23 -25
  185. package/esm/LinearGenomeView/components/Header.d.ts +3 -5
  186. package/esm/LinearGenomeView/components/Header.js +11 -62
  187. package/esm/LinearGenomeView/components/HeaderPanControls.d.ts +6 -0
  188. package/esm/LinearGenomeView/components/HeaderPanControls.js +24 -0
  189. package/esm/LinearGenomeView/components/HeaderRegionWidth.d.ts +5 -0
  190. package/esm/LinearGenomeView/components/HeaderRegionWidth.js +19 -0
  191. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.d.ts +5 -0
  192. package/esm/LinearGenomeView/components/HeaderTrackSelectorButton.js +17 -0
  193. package/esm/LinearGenomeView/components/HeaderZoomControls.d.ts +5 -0
  194. package/esm/LinearGenomeView/components/HeaderZoomControls.js +65 -0
  195. package/esm/LinearGenomeView/components/Highlight.d.ts +9 -4
  196. package/esm/LinearGenomeView/components/Highlight.js +32 -35
  197. package/esm/LinearGenomeView/components/ImportForm.d.ts +1 -2
  198. package/esm/LinearGenomeView/components/ImportForm.js +32 -45
  199. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.d.ts +1 -2
  200. package/esm/LinearGenomeView/components/ImportFormRefNameAutocomplete.js +2 -2
  201. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +1 -2
  202. package/esm/LinearGenomeView/components/LinearGenomeView.js +7 -10
  203. package/esm/LinearGenomeView/components/MiniControls.d.ts +1 -2
  204. package/esm/LinearGenomeView/components/MiniControls.js +6 -13
  205. package/esm/LinearGenomeView/components/NoTracksActiveButton.d.ts +1 -2
  206. package/esm/LinearGenomeView/components/NoTracksActiveButton.js +2 -4
  207. package/esm/LinearGenomeView/components/OverviewHighlight.d.ts +1 -2
  208. package/esm/LinearGenomeView/components/OverviewHighlight.js +3 -3
  209. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +1 -2
  210. package/esm/LinearGenomeView/components/OverviewRubberband.js +6 -10
  211. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +1 -2
  212. package/esm/LinearGenomeView/components/OverviewScalebar.js +30 -41
  213. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.d.ts +1 -2
  214. package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +2 -2
  215. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.d.ts +1 -2
  216. package/esm/LinearGenomeView/components/OverviewScalebarTickLabels.js +3 -3
  217. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +1 -2
  218. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +3 -3
  219. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +1 -2
  220. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +8 -15
  221. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.d.ts +1 -2
  222. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +4 -40
  223. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +1 -2
  224. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +4 -3
  225. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.d.ts +6 -0
  226. package/esm/LinearGenomeView/components/RegionWidthEditorDialog.js +28 -0
  227. package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -2
  228. package/esm/LinearGenomeView/components/Rubberband.js +7 -9
  229. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +1 -2
  230. package/esm/LinearGenomeView/components/RubberbandSpan.js +16 -11
  231. package/esm/LinearGenomeView/components/Scalebar.d.ts +1 -1
  232. package/esm/LinearGenomeView/components/Scalebar.js +10 -13
  233. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.d.ts +1 -2
  234. package/esm/LinearGenomeView/components/ScalebarCoordinateLabels.js +17 -17
  235. package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.d.ts +1 -2
  236. package/esm/LinearGenomeView/components/ScalebarCoordinateTicks.js +9 -9
  237. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.d.ts +1 -2
  238. package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +12 -16
  239. package/esm/LinearGenomeView/components/SearchBox.d.ts +1 -2
  240. package/esm/LinearGenomeView/components/SearchBox.js +2 -2
  241. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +1 -2
  242. package/esm/LinearGenomeView/components/SearchResultsDialog.js +4 -14
  243. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +1 -2
  244. package/esm/LinearGenomeView/components/SearchResultsTable.js +15 -28
  245. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +1 -2
  246. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +39 -49
  247. package/esm/LinearGenomeView/components/TrackContainer.d.ts +1 -2
  248. package/esm/LinearGenomeView/components/TrackContainer.js +10 -13
  249. package/esm/LinearGenomeView/components/TrackLabel.d.ts +1 -2
  250. package/esm/LinearGenomeView/components/TrackLabel.js +10 -78
  251. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +1 -2
  252. package/esm/LinearGenomeView/components/TrackLabelContainer.js +2 -2
  253. package/esm/LinearGenomeView/components/TrackLabelDragHandle.d.ts +1 -2
  254. package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +3 -4
  255. package/esm/LinearGenomeView/components/TrackLabelMenu.d.ts +5 -0
  256. package/esm/LinearGenomeView/components/TrackLabelMenu.js +74 -0
  257. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +1 -2
  258. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +10 -14
  259. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -2
  260. package/esm/LinearGenomeView/components/TracksContainer.js +16 -20
  261. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -2
  262. package/esm/LinearGenomeView/components/VerticalGuide.js +3 -4
  263. package/esm/LinearGenomeView/components/useRangeSelect.d.ts +1 -1
  264. package/esm/LinearGenomeView/components/useWheelScroll.d.ts +1 -1
  265. package/esm/LinearGenomeView/components/useWheelScroll.js +1 -1
  266. package/esm/LinearGenomeView/model.d.ts +1 -39
  267. package/esm/LinearGenomeView/model.js +10 -22
  268. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +1 -2
  269. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +2 -2
  270. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +1 -2
  271. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +2 -12
  272. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.d.ts +2 -1
  273. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +2 -12
  274. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +1 -2
  275. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +2 -2
  276. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +1 -2
  277. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +17 -29
  278. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +1 -2
  279. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +2 -6
  280. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +1 -2
  281. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +2 -2
  282. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +1 -2
  283. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +18 -15
  284. package/esm/LinearGenomeView/types.d.ts +38 -0
  285. package/esm/LinearGenomeView/types.js +1 -0
  286. package/esm/LinearGenomeView/util.d.ts +3 -1
  287. package/esm/LinearGenomeView/util.js +16 -1
  288. package/esm/index.d.ts +10 -10
  289. package/esm/index.js +2 -1
  290. package/package.json +2 -2
  291. package/dist/LinearGenomeView/components/ZoomControls.d.ts +0 -6
  292. package/dist/LinearGenomeView/components/ZoomControls.js +0 -66
  293. package/esm/LinearGenomeView/components/ZoomControls.d.ts +0 -6
  294. package/esm/LinearGenomeView/components/ZoomControls.js +0 -38
@@ -1,18 +1,16 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
3
4
  import { getSession, useLocalStorage } from '@jbrowse/core/util';
4
5
  import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, Typography, } from '@mui/material';
5
6
  function LoadingMessage() {
6
- return (React.createElement("div", null,
7
- React.createElement(CircularProgress, { size: 20, style: { marginRight: 20 } }),
8
- React.createElement(Typography, { display: "inline" }, "Creating SVG")));
7
+ return (_jsxs("div", { children: [_jsx(CircularProgress, { size: 20, style: { marginRight: 20 } }), _jsx(Typography, { display: "inline", children: "Creating SVG" })] }));
9
8
  }
10
9
  function useSvgLocal(key, val) {
11
10
  return useLocalStorage(`svg-${key}`, val);
12
11
  }
13
12
  function TextField2({ children, ...rest }) {
14
- return (React.createElement("div", null,
15
- React.createElement(TextField, { ...rest }, children)));
13
+ return (_jsx("div", { children: _jsx(TextField, { ...rest, children: children }) }));
16
14
  }
17
15
  export default function ExportSvgDialog({ model, handleClose, }) {
18
16
  const session = getSession(model);
@@ -23,47 +21,34 @@ export default function ExportSvgDialog({ model, handleClose, }) {
23
21
  const [filename, setFilename] = useSvgLocal('file', 'jbrowse.svg');
24
22
  const [trackLabels, setTrackLabels] = useSvgLocal('tracklabels', 'offset');
25
23
  const [themeName, setThemeName] = useSvgLocal('theme', session.themeName || 'default');
26
- return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Export SVG" },
27
- React.createElement(DialogContent, null,
28
- error ? (React.createElement(ErrorMessage, { error: error })) : loading ? (React.createElement(LoadingMessage, null)) : null,
29
- React.createElement(TextField2, { helperText: "filename", value: filename, onChange: event => {
30
- setFilename(event.target.value);
31
- } }),
32
- React.createElement(TextField2, { select: true, label: "Track label positioning", variant: "outlined", style: { width: 150 }, value: trackLabels, onChange: event => {
33
- setTrackLabels(event.target.value);
34
- } },
35
- React.createElement(MenuItem, { value: "offset" }, "Offset"),
36
- React.createElement(MenuItem, { value: "overlay" }, "Overlay"),
37
- React.createElement(MenuItem, { value: "left" }, "Left"),
38
- React.createElement(MenuItem, { value: "none" }, "None")),
39
- session.allThemes ? (React.createElement(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
40
- setThemeName(event.target.value);
41
- } }, Object.entries(session.allThemes()).map(([key, val]) => (React.createElement(MenuItem, { key: key, value: key }, val.name || '(Unknown name)'))))) : null,
42
- offscreenCanvas ? (React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: rasterizeLayers, onChange: () => {
43
- setRasterizeLayers(val => !val);
44
- } }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (React.createElement(Typography, null, "Note: rasterizing layers not yet supported in this browser, so SVG size may be large"))),
45
- React.createElement(DialogActions, null,
46
- React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
47
- handleClose();
48
- } }, "Cancel"),
49
- React.createElement(Button, { variant: "contained", color: "primary", type: "submit", onClick: async () => {
50
- setLoading(true);
51
- setError(undefined);
52
- try {
53
- await model.exportSvg({
54
- rasterizeLayers,
55
- filename,
56
- trackLabels,
57
- themeName,
58
- });
59
- handleClose();
60
- }
61
- catch (e) {
62
- console.error(e);
63
- setError(e);
64
- }
65
- finally {
66
- setLoading(false);
67
- }
68
- } }, "Submit"))));
24
+ return (_jsxs(Dialog, { open: true, onClose: handleClose, title: "Export SVG", children: [_jsxs(DialogContent, { children: [error ? (_jsx(ErrorMessage, { error: error })) : loading ? (_jsx(LoadingMessage, {})) : null, _jsx(TextField2, { helperText: "filename", value: filename, onChange: event => {
25
+ setFilename(event.target.value);
26
+ } }), _jsxs(TextField2, { select: true, label: "Track label positioning", variant: "outlined", style: { width: 150 }, value: trackLabels, onChange: event => {
27
+ setTrackLabels(event.target.value);
28
+ }, children: [_jsx(MenuItem, { value: "offset", children: "Offset" }), _jsx(MenuItem, { value: "overlay", children: "Overlay" }), _jsx(MenuItem, { value: "left", children: "Left" }), _jsx(MenuItem, { value: "none", children: "None" })] }), session.allThemes ? (_jsx(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
29
+ setThemeName(event.target.value);
30
+ }, children: Object.entries(session.allThemes()).map(([key, val]) => (_jsx(MenuItem, { value: key, children: val.name || '(Unknown name)' }, key))) })) : null, offscreenCanvas ? (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: rasterizeLayers, onChange: () => {
31
+ setRasterizeLayers(val => !val);
32
+ } }), label: "Rasterize canvas based tracks? File may be much larger if this is turned off" })) : (_jsx(Typography, { children: "Note: rasterizing layers not yet supported in this browser, so SVG size may be large" }))] }), _jsxs(DialogActions, { children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
33
+ handleClose();
34
+ }, children: "Cancel" }), _jsx(Button, { variant: "contained", color: "primary", type: "submit", onClick: async () => {
35
+ setLoading(true);
36
+ setError(undefined);
37
+ try {
38
+ await model.exportSvg({
39
+ rasterizeLayers,
40
+ filename,
41
+ trackLabels,
42
+ themeName,
43
+ });
44
+ handleClose();
45
+ }
46
+ catch (e) {
47
+ console.error(e);
48
+ setError(e);
49
+ }
50
+ finally {
51
+ setLoading(false);
52
+ }
53
+ }, children: "Submit" })] })] }));
69
54
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
2
  type LGV = LinearGenomeViewModel;
4
3
  declare const GetSequenceDialog: ({ model, handleClose, }: {
5
4
  model: LGV;
6
5
  handleClose: () => void;
7
- }) => React.JSX.Element;
6
+ }) => import("react/jsx-runtime").JSX.Element;
8
7
  export default GetSequenceDialog;
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
2
3
  import { getConf } from '@jbrowse/core/configuration';
3
4
  import { Dialog } from '@jbrowse/core/ui';
4
5
  import { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons';
@@ -96,45 +97,32 @@ const GetSequenceDialog = observer(function ({ model, handleClose, }) {
96
97
  }))
97
98
  : '';
98
99
  const sequenceTooLarge = sequence ? sequence.length > 1000000 : false;
99
- return (React.createElement(Dialog, { maxWidth: "xl", open: true, onClose: () => {
100
+ return (_jsxs(Dialog, { maxWidth: "xl", open: true, onClose: () => {
100
101
  handleClose();
101
102
  model.setOffsets();
102
- }, title: "Reference sequence" },
103
- React.createElement(DialogContent, null,
104
- error ? (React.createElement(Typography, { color: "error" }, `${error}`)) : loading ? (React.createElement(Container, null,
105
- "Retrieving reference sequence...",
106
- React.createElement(CircularProgress, { className: classes.ml, size: 20, disableShrink: true }))) : null,
107
- React.createElement(TextField, { "data-testid": "rubberband-sequence", variant: "outlined", multiline: true, minRows: 5, maxRows: 10, disabled: sequenceTooLarge, className: classes.dialogContent, fullWidth: true, value: sequenceTooLarge
108
- ? 'Reference sequence too large to display, use the download FASTA button'
109
- : sequence, slotProps: {
110
- input: {
111
- readOnly: true,
112
- classes: {
113
- input: classes.textAreaFont,
114
- },
115
- },
116
- } }),
117
- React.createElement(FormGroup, null,
118
- React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { value: rev, onChange: event => {
119
- setReverse(event.target.checked);
120
- } }), label: "Reverse sequence" }),
121
- React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { value: comp, onChange: event => {
122
- setComplement(event.target.checked);
123
- } }), label: "Complement sequence" })),
124
- React.createElement(Typography, { style: { margin: 10 } }, "Note: Check both boxes for the \"reverse complement\"")),
125
- React.createElement(DialogActions, null,
126
- React.createElement(Button, { onClick: () => {
127
- copy(sequence);
128
- setCopied(true);
129
- setTimeout(() => {
130
- setCopied(false);
131
- }, 500);
132
- }, disabled: loading || !!error || sequenceTooLarge, color: "primary", startIcon: React.createElement(ContentCopyIcon, null) }, copied ? 'Copied' : 'Copy to clipboard'),
133
- React.createElement(Button, { onClick: () => {
134
- saveAs(new Blob([sequence || ''], {
135
- type: 'text/x-fasta;charset=utf-8',
136
- }), 'jbrowse_ref_seq.fa');
137
- }, disabled: loading || !!error, color: "primary", startIcon: React.createElement(GetAppIcon, null) }, "Download FASTA"),
138
- React.createElement(Button, { onClick: handleClose, variant: "contained" }, "Close"))));
103
+ }, title: "Reference sequence", children: [_jsxs(DialogContent, { children: [error ? (_jsx(Typography, { color: "error", children: `${error}` })) : loading ? (_jsxs(Container, { children: ["Retrieving reference sequence...", _jsx(CircularProgress, { className: classes.ml, size: 20, disableShrink: true })] })) : null, _jsx(TextField, { "data-testid": "rubberband-sequence", variant: "outlined", multiline: true, minRows: 5, maxRows: 10, disabled: sequenceTooLarge, className: classes.dialogContent, fullWidth: true, value: sequenceTooLarge
104
+ ? 'Reference sequence too large to display, use the download FASTA button'
105
+ : sequence, slotProps: {
106
+ input: {
107
+ readOnly: true,
108
+ classes: {
109
+ input: classes.textAreaFont,
110
+ },
111
+ },
112
+ } }), _jsxs(FormGroup, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { value: rev, onChange: event => {
113
+ setReverse(event.target.checked);
114
+ } }), label: "Reverse sequence" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { value: comp, onChange: event => {
115
+ setComplement(event.target.checked);
116
+ } }), label: "Complement sequence" })] }), _jsx(Typography, { style: { margin: 10 }, children: "Note: Check both boxes for the \"reverse complement\"" })] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: () => {
117
+ copy(sequence);
118
+ setCopied(true);
119
+ setTimeout(() => {
120
+ setCopied(false);
121
+ }, 500);
122
+ }, disabled: loading || !!error || sequenceTooLarge, color: "primary", startIcon: _jsx(ContentCopyIcon, {}), children: copied ? 'Copied' : 'Copy to clipboard' }), _jsx(Button, { onClick: () => {
123
+ saveAs(new Blob([sequence || ''], {
124
+ type: 'text/x-fasta;charset=utf-8',
125
+ }), 'jbrowse_ref_seq.fa');
126
+ }, disabled: loading || !!error, color: "primary", startIcon: _jsx(GetAppIcon, {}), children: "Download FASTA" }), _jsx(Button, { onClick: handleClose, variant: "contained", children: "Close" })] })] }));
139
127
  });
140
128
  export default GetSequenceDialog;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
2
  type LGV = LinearGenomeViewModel;
4
3
  declare const Gridlines: ({ model }: {
5
4
  model: LGV;
6
- }) => React.JSX.Element;
5
+ }) => import("react/jsx-runtime").JSX.Element;
7
6
  export default Gridlines;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { observer } from 'mobx-react';
3
3
  import { makeStyles } from 'tss-react/mui';
4
4
  import { ContentBlock as ContentBlockComponent, ElidedBlock as ElidedBlockComponent, InterRegionPaddingBlock as InterRegionPaddingBlockComponent, } from '../../BaseLinearDisplay/components/Block';
@@ -33,39 +33,37 @@ const useStyles = makeStyles()(theme => ({
33
33
  function RenderedBlockLines({ block, bpPerPx, }) {
34
34
  const { classes, cx } = useStyles();
35
35
  const ticks = makeTicks(block.start, block.end, bpPerPx);
36
- return (React.createElement(ContentBlockComponent, { block: block }, ticks.map(({ type, base }) => {
37
- const x = (block.reversed ? block.end - base : base - block.start) / bpPerPx;
38
- return (React.createElement("div", { key: base, className: cx(classes.tick, type === 'major' || type === 'labeledMajor'
39
- ? classes.majorTick
40
- : classes.minorTick), style: { left: x } }));
41
- })));
36
+ return (_jsx(ContentBlockComponent, { block: block, children: ticks.map(({ type, base }) => {
37
+ const x = (block.reversed ? block.end - base : base - block.start) / bpPerPx;
38
+ return (_jsx("div", { className: cx(classes.tick, type === 'major' || type === 'labeledMajor'
39
+ ? classes.majorTick
40
+ : classes.minorTick), style: { left: x } }, base));
41
+ }) }));
42
42
  }
43
43
  const RenderedVerticalGuides = observer(({ model }) => {
44
44
  const { staticBlocks, bpPerPx } = model;
45
- return (React.createElement(React.Fragment, null, staticBlocks.map((block, index) => {
46
- const k = `${block.key}-${index}`;
47
- if (block.type === 'ContentBlock') {
48
- return React.createElement(RenderedBlockLines, { key: k, block: block, bpPerPx: bpPerPx });
49
- }
50
- else if (block.type === 'ElidedBlock') {
51
- return React.createElement(ElidedBlockComponent, { key: k, width: block.widthPx });
52
- }
53
- else if (block.type === 'InterRegionPaddingBlock') {
54
- return (React.createElement(InterRegionPaddingBlockComponent, { key: k, width: block.widthPx, boundary: block.variant === 'boundary' }));
55
- }
56
- return null;
57
- })));
45
+ return (_jsx(_Fragment, { children: staticBlocks.map((block, index) => {
46
+ const k = `${block.key}-${index}`;
47
+ if (block.type === 'ContentBlock') {
48
+ return _jsx(RenderedBlockLines, { block: block, bpPerPx: bpPerPx }, k);
49
+ }
50
+ else if (block.type === 'ElidedBlock') {
51
+ return _jsx(ElidedBlockComponent, { width: block.widthPx }, k);
52
+ }
53
+ else if (block.type === 'InterRegionPaddingBlock') {
54
+ return (_jsx(InterRegionPaddingBlockComponent, { width: block.widthPx, boundary: block.variant === 'boundary' }, k));
55
+ }
56
+ return null;
57
+ }) }));
58
58
  });
59
59
  const Gridlines = observer(function ({ model }) {
60
60
  const { classes } = useStyles();
61
61
  const offsetLeft = model.staticBlocks.offsetPx - model.offsetPx;
62
- return (React.createElement("div", { className: classes.verticalGuidesZoomContainer, style: {
62
+ return (_jsx("div", { className: classes.verticalGuidesZoomContainer, style: {
63
63
  transform: model.scaleFactor !== 1 ? `scaleX(${model.scaleFactor})` : undefined,
64
- } },
65
- React.createElement("div", { className: classes.verticalGuidesContainer, style: {
64
+ }, children: _jsx("div", { className: classes.verticalGuidesContainer, style: {
66
65
  left: offsetLeft,
67
66
  width: model.staticBlocks.totalWidthPx,
68
- } },
69
- React.createElement(RenderedVerticalGuides, { model: model }))));
67
+ }, children: _jsx(RenderedVerticalGuides, { model: model }) }) }));
70
68
  });
71
69
  export default Gridlines;
@@ -1,7 +1,5 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
- type LGV = LinearGenomeViewModel;
4
- declare const LinearGenomeViewHeader: ({ model }: {
5
- model: LGV;
6
- }) => React.JSX.Element | null;
2
+ declare const LinearGenomeViewHeader: ({ model, }: {
3
+ model: LinearGenomeViewModel;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
7
5
  export default LinearGenomeViewHeader;
@@ -1,16 +1,14 @@
1
- import React from 'react';
2
- import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
3
- import { getBpDisplayStr } from '@jbrowse/core/util';
4
- import ArrowBackIcon from '@mui/icons-material/ArrowBack';
5
- import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
6
- import { Button, FormGroup, IconButton, Typography, alpha } from '@mui/material';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FormGroup } from '@mui/material';
7
3
  import { observer } from 'mobx-react';
8
4
  import { makeStyles } from 'tss-react/mui';
5
+ import HeaderPanControls from './HeaderPanControls';
6
+ import HeaderRegionWidth from './HeaderRegionWidth';
7
+ import HeaderTrackSelectorButton from './HeaderTrackSelectorButton';
8
+ import HeaderZoomControls from './HeaderZoomControls';
9
9
  import OverviewScalebar from './OverviewScalebar';
10
10
  import SearchBox from './SearchBox';
11
- import ZoomControls from './ZoomControls';
12
- import { SPACING } from '../consts';
13
- const useStyles = makeStyles()(theme => ({
11
+ const useStyles = makeStyles()({
14
12
  headerBar: {
15
13
  display: 'flex',
16
14
  },
@@ -21,62 +19,13 @@ const useStyles = makeStyles()(theme => ({
21
19
  spacer: {
22
20
  flexGrow: 1,
23
21
  },
24
- panButton: {
25
- background: alpha(theme.palette.background.paper, 0.8),
26
- color: theme.palette.text.primary,
27
- margin: SPACING,
28
- },
29
- bp: {
30
- display: 'flex',
31
- alignItems: 'center',
32
- marginLeft: 5,
33
- },
34
- toggleButton: {
35
- height: 44,
36
- border: 'none',
37
- marginLeft: theme.spacing(4),
38
- },
39
- buttonSpacer: {
40
- marginRight: theme.spacing(2),
41
- },
42
- }));
43
- const HeaderButtons = observer(({ model }) => {
44
- const { classes } = useStyles();
45
- return (React.createElement(IconButton, { onClick: model.activateTrackSelector, className: classes.toggleButton, title: "Open track selector", value: "track_select" },
46
- React.createElement(TrackSelectorIcon, { className: classes.buttonSpacer })));
47
- });
48
- function PanControls({ model }) {
49
- const { classes } = useStyles();
50
- return (React.createElement(React.Fragment, null,
51
- React.createElement(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
52
- model.slide(-0.9);
53
- } },
54
- React.createElement(ArrowBackIcon, null)),
55
- React.createElement(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
56
- model.slide(0.9);
57
- } },
58
- React.createElement(ArrowForwardIcon, null))));
59
- }
60
- const RegionWidth = observer(function ({ model }) {
61
- const { classes } = useStyles();
62
- const { coarseTotalBp } = model;
63
- return (React.createElement(Typography, { variant: "body2", color: "textSecondary", className: classes.bp }, getBpDisplayStr(coarseTotalBp)));
64
22
  });
65
- const Controls = ({ model }) => {
23
+ const Controls = function ({ model }) {
66
24
  const { classes } = useStyles();
67
- return (React.createElement("div", { className: classes.headerBar },
68
- React.createElement(HeaderButtons, { model: model }),
69
- React.createElement("div", { className: classes.spacer }),
70
- React.createElement(FormGroup, { row: true, className: classes.headerForm },
71
- React.createElement(PanControls, { model: model }),
72
- React.createElement(SearchBox, { model: model })),
73
- React.createElement(RegionWidth, { model: model }),
74
- React.createElement(ZoomControls, { model: model }),
75
- React.createElement("div", { className: classes.spacer })));
25
+ return (_jsxs("div", { className: classes.headerBar, children: [_jsx(HeaderTrackSelectorButton, { model: model }), _jsx("div", { className: classes.spacer }), _jsxs(FormGroup, { row: true, className: classes.headerForm, children: [_jsx(HeaderPanControls, { model: model }), _jsx(SearchBox, { model: model })] }), _jsx(HeaderRegionWidth, { model: model }), _jsx(HeaderZoomControls, { model: model }), _jsx("div", { className: classes.spacer })] }));
76
26
  };
77
- const LinearGenomeViewHeader = observer(function ({ model }) {
27
+ const LinearGenomeViewHeader = observer(function ({ model, }) {
78
28
  const { hideHeader, hideHeaderOverview } = model;
79
- return !hideHeader ? (hideHeaderOverview ? (React.createElement(Controls, { model: model })) : (React.createElement(OverviewScalebar, { model: model },
80
- React.createElement(Controls, { model: model })))) : null;
29
+ return !hideHeader ? (hideHeaderOverview ? (_jsx(Controls, { model: model })) : (_jsx(OverviewScalebar, { model: model, children: _jsx(Controls, { model: model }) }))) : null;
81
30
  });
82
31
  export default LinearGenomeViewHeader;
@@ -0,0 +1,6 @@
1
+ import type { LinearGenomeViewModel } from '..';
2
+ type LGV = LinearGenomeViewModel;
3
+ export default function HeaderPanControls({ model }: {
4
+ model: LGV;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
3
+ import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
4
+ import { Button, alpha } from '@mui/material';
5
+ import { makeStyles } from 'tss-react/mui';
6
+ import { SPACING } from '../consts';
7
+ const useStyles = makeStyles()(theme => ({
8
+ panButton: {
9
+ background: alpha(theme.palette.background.paper, 0.8),
10
+ color: theme.palette.text.primary,
11
+ margin: SPACING,
12
+ },
13
+ buttonSpacer: {
14
+ marginRight: theme.spacing(2),
15
+ },
16
+ }));
17
+ export default function HeaderPanControls({ model }) {
18
+ const { classes } = useStyles();
19
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
20
+ model.slide(-0.9);
21
+ }, children: _jsx(ArrowBackIcon, {}) }), _jsx(Button, { variant: "outlined", className: classes.panButton, onClick: () => {
22
+ model.slide(0.9);
23
+ }, children: _jsx(ArrowForwardIcon, {}) })] }));
24
+ }
@@ -0,0 +1,5 @@
1
+ import type { LinearGenomeViewModel } from '..';
2
+ declare const HeaderRegionWidth: ({ model, }: {
3
+ model: LinearGenomeViewModel;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default HeaderRegionWidth;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getBpDisplayStr } from '@jbrowse/core/util';
3
+ import { Typography } from '@mui/material';
4
+ import { observer } from 'mobx-react';
5
+ import { makeStyles } from 'tss-react/mui';
6
+ const useStyles = makeStyles()({
7
+ bp: {
8
+ display: 'flex',
9
+ alignItems: 'center',
10
+ marginLeft: 5,
11
+ cursor: 'pointer',
12
+ },
13
+ });
14
+ const HeaderRegionWidth = observer(function ({ model, }) {
15
+ const { classes } = useStyles();
16
+ const { coarseTotalBp } = model;
17
+ return (_jsx(Typography, { variant: "body2", color: "textSecondary", className: classes.bp, children: getBpDisplayStr(coarseTotalBp) }));
18
+ });
19
+ export default HeaderRegionWidth;
@@ -0,0 +1,5 @@
1
+ import type { LinearGenomeViewModel } from '..';
2
+ declare const HeaderTrackSelectorButton: ({ model, }: {
3
+ model: LinearGenomeViewModel;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default HeaderTrackSelectorButton;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
3
+ import { IconButton } from '@mui/material';
4
+ import { observer } from 'mobx-react';
5
+ import { makeStyles } from 'tss-react/mui';
6
+ const useStyles = makeStyles()(theme => ({
7
+ toggleButton: {
8
+ height: 44,
9
+ border: 'none',
10
+ marginLeft: theme.spacing(4),
11
+ },
12
+ }));
13
+ const HeaderTrackSelectorButton = observer(function ({ model, }) {
14
+ const { classes } = useStyles();
15
+ return (_jsx(IconButton, { onClick: model.activateTrackSelector, className: classes.toggleButton, title: "Open track selector", value: "track_select", children: _jsx(TrackSelectorIcon, {}) }));
16
+ });
17
+ export default HeaderTrackSelectorButton;
@@ -0,0 +1,5 @@
1
+ import type { LinearGenomeViewModel } from '..';
2
+ declare const HeaderZoomControls: ({ model, }: {
3
+ model: LinearGenomeViewModel;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default HeaderZoomControls;
@@ -0,0 +1,65 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { lazy, useEffect, useState } from 'react';
3
+ import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
4
+ import { getSession } from '@jbrowse/core/util';
5
+ import MoreVert from '@mui/icons-material/MoreVert';
6
+ import ZoomIn from '@mui/icons-material/ZoomIn';
7
+ import ZoomOut from '@mui/icons-material/ZoomOut';
8
+ import { IconButton, Slider, Tooltip } from '@mui/material';
9
+ import { observer } from 'mobx-react';
10
+ import { makeStyles } from 'tss-react/mui';
11
+ const RegionWidthEditorDialog = lazy(() => import('./RegionWidthEditorDialog'));
12
+ const useStyles = makeStyles()(theme => ({
13
+ container: {
14
+ display: 'flex',
15
+ flexDirection: 'row',
16
+ alignItems: 'center',
17
+ },
18
+ slider: {
19
+ width: 100,
20
+ color: theme.palette.text.secondary,
21
+ },
22
+ }));
23
+ const HeaderZoomControls = observer(function ({ model, }) {
24
+ const { classes } = useStyles();
25
+ const { maxBpPerPx, minBpPerPx, bpPerPx } = model;
26
+ const [value, setValue] = useState(-Math.log2(bpPerPx) * 100);
27
+ useEffect(() => {
28
+ setValue(-Math.log2(bpPerPx) * 100);
29
+ }, [bpPerPx]);
30
+ const zoomInDisabled = bpPerPx <= minBpPerPx + 0.0001;
31
+ const zoomOutDisabled = bpPerPx >= maxBpPerPx - 0.0001;
32
+ return (_jsxs("div", { className: classes.container, children: [_jsx(Tooltip, { title: "Zoom out 2x", children: _jsx("span", { children: _jsx(IconButton, { "data-testid": "zoom_out", disabled: zoomOutDisabled, onClick: () => {
33
+ model.zoom(bpPerPx * 2);
34
+ }, children: _jsx(ZoomOut, {}) }) }) }), _jsx(Slider, { size: "small", className: classes.slider, value: value, min: -Math.log2(maxBpPerPx) * 100, max: -Math.log2(minBpPerPx) * 100, onChangeCommitted: () => model.zoomTo(2 ** (-value / 100)), onChange: (_, val) => {
35
+ setValue(val);
36
+ } }), _jsx(Tooltip, { title: "Zoom in 2x", children: _jsx("span", { children: _jsx(IconButton, { "data-testid": "zoom_in", disabled: zoomInDisabled, onClick: () => {
37
+ model.zoom(model.bpPerPx / 2);
38
+ }, children: _jsx(ZoomIn, {}) }) }) }), _jsx(CascadingMenuButton, { menuItems: [
39
+ ...[100, 50, 10].map(r => ({
40
+ label: `Zoom in ${r}x`,
41
+ onClick: () => {
42
+ model.zoom(model.bpPerPx / r);
43
+ },
44
+ })),
45
+ ...[10, 50, 100].map(r => ({
46
+ label: `Zoom out ${r}x`,
47
+ onClick: () => {
48
+ model.zoom(model.bpPerPx * r);
49
+ },
50
+ })),
51
+ {
52
+ label: 'Custom zoom',
53
+ onClick: () => {
54
+ getSession(model).queueDialog(handleClose => [
55
+ RegionWidthEditorDialog,
56
+ {
57
+ model,
58
+ handleClose,
59
+ },
60
+ ]);
61
+ },
62
+ },
63
+ ], children: _jsx(MoreVert, {}) })] }));
64
+ });
65
+ export default HeaderZoomControls;
@@ -1,7 +1,12 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '../model';
3
2
  type LGV = LinearGenomeViewModel;
4
- declare const HighlightGroup: ({ model, }: {
3
+ declare const Highlight: ({ model, highlight, }: {
5
4
  model: LGV;
6
- }) => React.JSX.Element[];
7
- export default HighlightGroup;
5
+ highlight: {
6
+ assemblyName: string;
7
+ refName: string;
8
+ start: number;
9
+ end: number;
10
+ };
11
+ }) => import("react/jsx-runtime").JSX.Element | null;
12
+ export default Highlight;