@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,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { stringify } from '@jbrowse/core/util';
3
3
  import { Tooltip } from '@mui/material';
4
4
  import { observer } from 'mobx-react';
@@ -14,10 +14,9 @@ const useStyles = makeStyles()({
14
14
  });
15
15
  const VerticalGuide = observer(function VerticalGuide({ model, coordX, }) {
16
16
  const { classes } = useStyles();
17
- return (React.createElement(Tooltip, { open: true, placement: "top", title: stringify(model.pxToBp(coordX)), arrow: true },
18
- React.createElement("div", { className: classes.guide, style: {
17
+ return (_jsx(Tooltip, { open: true, placement: "top", title: stringify(model.pxToBp(coordX)), arrow: true, children: _jsx("div", { className: classes.guide, style: {
19
18
  left: coordX,
20
19
  background: 'red',
21
- } })));
20
+ } }) }));
22
21
  });
23
22
  export default VerticalGuide;
@@ -5,7 +5,7 @@ interface AnchorPosition {
5
5
  clientX: number;
6
6
  clientY: number;
7
7
  }
8
- export declare function useRangeSelect(ref: React.RefObject<HTMLDivElement>, model: LinearGenomeViewModel, shiftOnly?: boolean): {
8
+ export declare function useRangeSelect(ref: React.RefObject<HTMLDivElement | null>, model: LinearGenomeViewModel, shiftOnly?: boolean): {
9
9
  open: boolean;
10
10
  guideX: number | undefined;
11
11
  mouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- export declare function useWheelScroll(ref: React.RefObject<HTMLDivElement>, model: {
2
+ export declare function useWheelScroll(ref: React.RefObject<HTMLDivElement | null>, model: {
3
3
  bpPerPx: number;
4
4
  zoomTo: (arg: number, arg2?: number) => void;
5
5
  setScaleFactor: (arg: number) => void;
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
  export function useWheelScroll(ref, model) {
3
3
  const delta = useRef(0);
4
- const timeout = useRef();
4
+ const timeout = useRef(null);
5
5
  const scheduled = useRef(false);
6
6
  useEffect(() => {
7
7
  const curr = ref.current;
@@ -1,4 +1,5 @@
1
1
  import type React from 'react';
2
+ import type { BpOffset, ExportSvgOptions, HighlightType, NavLocation } from './types';
2
3
  import type PluginManager from '@jbrowse/core/PluginManager';
3
4
  import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
4
5
  import type { Assembly } from '@jbrowse/core/assemblyManager/assembly';
@@ -7,44 +8,6 @@ import type { ParsedLocString } from '@jbrowse/core/util';
7
8
  import type { BaseBlock, BlockSet } from '@jbrowse/core/util/blockTypes';
8
9
  import type { Region } from '@jbrowse/core/util/types';
9
10
  import type { Instance } from 'mobx-state-tree';
10
- export interface BpOffset {
11
- refName?: string;
12
- index: number;
13
- offset: number;
14
- start?: number;
15
- end?: number;
16
- coord?: number;
17
- reversed?: boolean;
18
- assemblyName?: string;
19
- oob?: boolean;
20
- }
21
- export interface ExportSvgOptions {
22
- rasterizeLayers?: boolean;
23
- filename?: string;
24
- Wrapper?: React.FC<{
25
- children: React.ReactNode;
26
- }>;
27
- fontSize?: number;
28
- rulerHeight?: number;
29
- textHeight?: number;
30
- paddingHeight?: number;
31
- headerHeight?: number;
32
- cytobandHeight?: number;
33
- trackLabels?: string;
34
- themeName?: string;
35
- }
36
- export interface HighlightType {
37
- start: number;
38
- end: number;
39
- assemblyName: string;
40
- refName: string;
41
- }
42
- export interface NavLocation {
43
- refName: string;
44
- start?: number;
45
- end?: number;
46
- assemblyName?: string;
47
- }
48
11
  export declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
49
12
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
50
13
  displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
@@ -271,5 +234,4 @@ export type LinearGenomeViewModel = Instance<LinearGenomeViewStateModel>;
271
234
  export { default as LinearGenomeView, default as ReactComponent, } from './components/LinearGenomeView';
272
235
  export { default as RefNameAutocomplete } from './components/RefNameAutocomplete';
273
236
  export { default as SearchBox } from './components/SearchBox';
274
- export { default as ZoomControls } from './components/ZoomControls';
275
237
  export { renderToSvg } from './svgcomponents/SVGLinearGenomeView';
@@ -2,7 +2,7 @@ import { lazy } from 'react';
2
2
  import { getConf } from '@jbrowse/core/configuration';
3
3
  import { BaseViewModel } from '@jbrowse/core/pluggableElementTypes/models';
4
4
  import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons';
5
- import { assembleLocString, clamp, findLast, getSession, isSessionModelWithWidgets, isSessionWithAddTracks, localStorageGetItem, localStorageSetItem, measureText, springAnimate, sum, } from '@jbrowse/core/util';
5
+ import { assembleLocString, clamp, findLast, getSession, isSessionModelWithWidgets, isSessionWithAddTracks, localStorageGetBoolean, localStorageGetItem, localStorageSetItem, measureText, springAnimate, sum, } from '@jbrowse/core/util';
6
6
  import { bpToPx, moveTo, pxToBp } from '@jbrowse/core/util/Base1DUtils';
7
7
  import Base1DView from '@jbrowse/core/util/Base1DViewModel';
8
8
  import calculateDynamicBlocks from '@jbrowse/core/util/calculateDynamicBlocks';
@@ -22,7 +22,7 @@ import { saveAs } from 'file-saver';
22
22
  import { autorun, transaction, when } from 'mobx';
23
23
  import { addDisposer, cast, getParent, getRoot, getSnapshot, resolveIdentifier, types, } from 'mobx-state-tree';
24
24
  import Header from './components/Header';
25
- import { generateLocations, parseLocStrings } from './util';
25
+ import { calculateVisibleLocStrings, generateLocations, parseLocStrings, } from './util';
26
26
  import { handleSelectedRegion } from '../searchUtils';
27
27
  import MiniControls from './components/MiniControls';
28
28
  import { HEADER_BAR_HEIGHT, HEADER_OVERVIEW_HEIGHT, INTER_REGION_PADDING_WIDTH, RESIZE_HANDLE_HEIGHT, SCALE_BAR_HEIGHT, } from './consts';
@@ -31,19 +31,6 @@ const SequenceSearchDialog = lazy(() => import('./components/SequenceSearchDialo
31
31
  const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'));
32
32
  const GetSequenceDialog = lazy(() => import('./components/GetSequenceDialog'));
33
33
  const SearchResultsDialog = lazy(() => import('./components/SearchResultsDialog'));
34
- function calculateVisibleLocStrings(contentBlocks) {
35
- if (!contentBlocks.length) {
36
- return '';
37
- }
38
- const isSingleAssemblyName = contentBlocks.every(b => b.assemblyName === contentBlocks[0].assemblyName);
39
- const locs = contentBlocks.map(block => assembleLocString({
40
- ...block,
41
- start: Math.round(block.start),
42
- end: Math.round(block.end),
43
- assemblyName: isSingleAssemblyName ? undefined : block.assemblyName,
44
- }));
45
- return locs.join(' ');
46
- }
47
34
  export function stateModelFactory(pluginManager) {
48
35
  return types
49
36
  .compose('LinearGenomeView', BaseViewModel, types.model({
@@ -57,13 +44,13 @@ export function stateModelFactory(pluginManager) {
57
44
  hideHeaderOverview: false,
58
45
  hideNoTracksActive: false,
59
46
  trackSelectorType: types.optional(types.enumeration(['hierarchical']), 'hierarchical'),
60
- showCenterLine: types.optional(types.boolean, () => Boolean(JSON.parse(localStorageGetItem('lgv-showCenterLine') || 'false'))),
61
- showCytobandsSetting: types.optional(types.boolean, () => Boolean(JSON.parse(localStorageGetItem('lgv-showCytobands') || 'true'))),
47
+ showCenterLine: types.optional(types.boolean, () => localStorageGetBoolean('lgv-showCenterLine', false)),
48
+ showCytobandsSetting: types.optional(types.boolean, () => localStorageGetBoolean('lgv-showCytobands', true)),
62
49
  trackLabels: types.optional(types.string, () => localStorageGetItem('lgv-trackLabels') || ''),
63
50
  showGridlines: true,
64
51
  highlight: types.optional(types.array(types.frozen()), []),
65
- colorByCDS: types.optional(types.boolean, () => Boolean(JSON.parse(localStorageGetItem('lgv-colorByCDS') || 'false'))),
66
- showTrackOutlines: types.optional(types.boolean, () => Boolean(JSON.parse(localStorageGetItem('lgv-showTrackOutlines') || 'true'))),
52
+ colorByCDS: types.optional(types.boolean, () => localStorageGetBoolean('lgv-colorByCDS', false)),
53
+ showTrackOutlines: types.optional(types.boolean, () => localStorageGetBoolean('lgv-showTrackOutlines', true)),
67
54
  }))
68
55
  .volatile(() => ({
69
56
  volatileWidth: undefined,
@@ -145,10 +132,12 @@ export function stateModelFactory(pluginManager) {
145
132
  if (self.hideHeader) {
146
133
  return 0;
147
134
  }
148
- if (self.hideHeaderOverview) {
135
+ else if (self.hideHeaderOverview) {
149
136
  return HEADER_BAR_HEIGHT;
150
137
  }
151
- return HEADER_BAR_HEIGHT + HEADER_OVERVIEW_HEIGHT;
138
+ else {
139
+ return HEADER_BAR_HEIGHT + HEADER_OVERVIEW_HEIGHT;
140
+ }
152
141
  },
153
142
  get trackHeights() {
154
143
  return sum(self.tracks.map(t => t.displays[0].height));
@@ -965,5 +954,4 @@ export function stateModelFactory(pluginManager) {
965
954
  export { default as LinearGenomeView, default as ReactComponent, } from './components/LinearGenomeView';
966
955
  export { default as RefNameAutocomplete } from './components/RefNameAutocomplete';
967
956
  export { default as SearchBox } from './components/SearchBox';
968
- export { default as ZoomControls } from './components/ZoomControls';
969
957
  export { renderToSvg } from './svgcomponents/SVGLinearGenomeView';
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  export default function SVGBackground({ width, height, shift, }: {
3
2
  width: number;
4
3
  height: number;
5
4
  shift: number;
6
- }): React.JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { stripAlpha } from '@jbrowse/core/util';
3
3
  import { useTheme } from '@mui/material';
4
4
  export default function SVGBackground({ width, height, shift, }) {
5
5
  const theme = useTheme();
6
- return (React.createElement("rect", { width: width + shift * 2, height: height, fill: stripAlpha(theme.palette.background.default) }));
6
+ return (_jsx("rect", { width: width + shift * 2, height: height, fill: stripAlpha(theme.palette.background.default) }));
7
7
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
2
  export default function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight, }: {
4
3
  model: LinearGenomeViewModel;
5
4
  rulerHeight: number;
6
5
  fontSize: number;
7
6
  cytobandHeight: number;
8
- }): React.JSX.Element | null;
7
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getSession, stripAlpha } from '@jbrowse/core/util';
3
3
  import Base1DView from '@jbrowse/core/util/Base1DViewModel';
4
4
  import { useTheme } from '@mui/material';
@@ -37,15 +37,5 @@ export default function SVGHeader({ model, fontSize, cytobandHeight, rulerHeight
37
37
  coord: last.reversed ? last.start : last.end,
38
38
  }) || 0;
39
39
  const y = +showCytobands * cytobandHeight;
40
- return (React.createElement("g", { id: "header" },
41
- React.createElement("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c }, assemblyName),
42
- showCytobands ? (React.createElement("g", { transform: `translate(0 ${rulerHeight})` },
43
- React.createElement(Cytobands, { overview: overview, assembly: assembly, block: block }),
44
- React.createElement("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }),
45
- React.createElement("g", { transform: `translate(0,${HEADER_OVERVIEW_HEIGHT})` },
46
- React.createElement(OverviewScalebarPolygon, { overview: overview, model: model, useOffset: false })))) : null,
47
- React.createElement("g", { transform: `translate(0 ${fontSize + y})` },
48
- React.createElement(SVGScalebar, { model: model, fontSize: fontSize })),
49
- React.createElement("g", { transform: `translate(0 ${rulerHeight + y})` },
50
- React.createElement(SVGRuler, { model: model, fontSize: fontSize }))));
40
+ return (_jsxs("g", { id: "header", children: [_jsx("text", { x: 0, y: 0, dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: assemblyName }), showCytobands ? (_jsxs("g", { transform: `translate(0 ${rulerHeight})`, children: [_jsx(Cytobands, { overview: overview, assembly: assembly, block: block }), _jsx("rect", { stroke: "red", fill: "rgb(255,0,0)", fillOpacity: 0.1, width: Math.max(lastOverviewPx - firstOverviewPx, 0.5), height: HEADER_OVERVIEW_HEIGHT - 1, x: firstOverviewPx, y: 0.5 }), _jsx("g", { transform: `translate(0,${HEADER_OVERVIEW_HEIGHT})`, children: _jsx(OverviewScalebarPolygon, { overview: overview, model: model, useOffset: false }) })] })) : null, _jsx("g", { transform: `translate(0 ${fontSize + y})`, children: _jsx(SVGScalebar, { model: model, fontSize: fontSize }) }), _jsx("g", { transform: `translate(0 ${rulerHeight + y})`, children: _jsx(SVGRuler, { model: model, fontSize: fontSize }) })] }));
51
41
  }
@@ -1,4 +1,5 @@
1
- import type { ExportSvgOptions, LinearGenomeViewModel } from '..';
1
+ import type { LinearGenomeViewModel } from '..';
2
+ import type { ExportSvgOptions } from '../types';
2
3
  type LGV = LinearGenomeViewModel;
3
4
  export declare function renderToSvg(model: LGV, opts: ExportSvgOptions): Promise<string>;
4
5
  export { default as SVGRuler } from './SVGRuler';
@@ -1,10 +1,9 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createJBrowseTheme } from '@jbrowse/core/ui';
3
3
  import { getSession, max, measureText, renderToStaticMarkup, } from '@jbrowse/core/util';
4
4
  import { getTrackName } from '@jbrowse/core/util/tracks';
5
5
  import { ThemeProvider } from '@mui/material';
6
6
  import { when } from 'mobx';
7
- import { getRoot } from 'mobx-state-tree';
8
7
  import SVGBackground from './SVGBackground';
9
8
  import SVGHeader from './SVGHeader';
10
9
  import SVGTracks from './SVGTracks';
@@ -14,7 +13,6 @@ export async function renderToSvg(model, opts) {
14
13
  const { textHeight = 18, headerHeight = 40, rulerHeight = 50, fontSize = 13, cytobandHeight = 100, trackLabels = 'offset', themeName = 'default', Wrapper = ({ children }) => children, } = opts;
15
14
  const session = getSession(model);
16
15
  const { allThemes } = session;
17
- const { createRootFn } = getRoot(model);
18
16
  const theme = allThemes === null || allThemes === void 0 ? void 0 : allThemes()[themeName];
19
17
  const { width, tracks, showCytobands } = model;
20
18
  const shift = 50;
@@ -29,15 +27,7 @@ export async function renderToSvg(model, opts) {
29
27
  const trackLabelMaxLen = max(tracks.map(t => measureText(getTrackName(t.configuration, session), fontSize)), 0) + 40;
30
28
  const trackLabelOffset = trackLabels === 'left' ? trackLabelMaxLen : 0;
31
29
  const w = width + trackLabelOffset;
32
- return renderToStaticMarkup(React.createElement(ThemeProvider, { theme: createJBrowseTheme(theme) },
33
- React.createElement(Wrapper, null,
34
- React.createElement("svg", { width: w, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, height].toString() },
35
- React.createElement(SVGBackground, { width: w, height: height, shift: shift }),
36
- React.createElement("g", { transform: `translate(${shift} 0)` },
37
- React.createElement("g", { transform: `translate(${trackLabelOffset})` },
38
- React.createElement(SVGHeader, { model: model, fontSize: fontSize, rulerHeight: rulerHeight, cytobandHeight: cytobandHeight })),
39
- React.createElement("g", { transform: `translate(0 ${offset})` },
40
- React.createElement(SVGTracks, { textHeight: textHeight, fontSize: fontSize, model: model, displayResults: displayResults, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset })))))), createRootFn);
30
+ return renderToStaticMarkup(_jsx(ThemeProvider, { theme: createJBrowseTheme(theme), children: _jsx(Wrapper, { children: _jsxs("svg", { width: w, height: height, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, height].toString(), children: [_jsx(SVGBackground, { width: w, height: height, shift: shift }), _jsxs("g", { transform: `translate(${shift} 0)`, children: [_jsx("g", { transform: `translate(${trackLabelOffset})`, children: _jsx(SVGHeader, { model: model, fontSize: fontSize, rulerHeight: rulerHeight, cytobandHeight: cytobandHeight }) }), _jsx("g", { transform: `translate(0 ${offset})`, children: _jsx(SVGTracks, { textHeight: textHeight, fontSize: fontSize, model: model, displayResults: displayResults, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset }) })] })] }) }) }));
41
31
  }
42
32
  export { default as SVGRuler } from './SVGRuler';
43
33
  export { default as SVGTracks } from './SVGTracks';
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
2
  type LGV = LinearGenomeViewModel;
4
3
  export default function SVGRegionSeparators({ model, height, }: {
5
4
  height: number;
6
5
  model: LGV;
7
- }): React.JSX.Element;
6
+ }): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -1,5 +1,5 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  export default function SVGRegionSeparators({ model, height, }) {
3
3
  const { dynamicBlocks, offsetPx, interRegionPaddingWidth } = model;
4
- return (React.createElement(React.Fragment, null, dynamicBlocks.contentBlocks.slice(1).map(block => (React.createElement("rect", { key: block.key, x: block.offsetPx - offsetPx - interRegionPaddingWidth, width: interRegionPaddingWidth, y: 0, height: height, fill: "grey" })))));
4
+ return (_jsx(_Fragment, { children: dynamicBlocks.contentBlocks.slice(1).map(block => (_jsx("rect", { x: block.offsetPx - offsetPx - interRegionPaddingWidth, width: interRegionPaddingWidth, y: 0, height: height, fill: "grey" }, block.key))) }));
5
5
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
2
  type LGV = LinearGenomeViewModel;
4
3
  export default function SVGRuler({ model, fontSize, }: {
5
4
  model: LGV;
6
5
  fontSize: number;
7
- }): React.JSX.Element;
6
+ }): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getTickDisplayStr, stripAlpha } from '@jbrowse/core/util';
3
3
  import { useTheme } from '@mui/material';
4
4
  import { makeTicks } from '../util';
@@ -7,39 +7,27 @@ function Ruler({ start, end, bpPerPx, reversed = false, major = true, minor = tr
7
7
  const ticks = makeTicks(start, end, bpPerPx, major, minor);
8
8
  const theme = useTheme();
9
9
  const c = stripAlpha(theme.palette.text.secondary);
10
- return (React.createElement(React.Fragment, null,
11
- ticks.map(tick => {
12
- const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
13
- return (React.createElement("line", { key: `tick-${tick.base}`, x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: c }));
14
- }),
15
- !hideText
16
- ? ticks
17
- .filter(tick => tick.type === 'major')
18
- .map(tick => {
10
+ return (_jsxs(_Fragment, { children: [ticks.map(tick => {
19
11
  const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
20
- return (React.createElement("text", { key: `label-${tick.base}`, x: x - 3, y: 7 + 11, fontSize: 11, fill: c }, getTickDisplayStr(tick.base + 1, bpPerPx)));
21
- })
22
- : null));
12
+ return (_jsx("line", { x1: x, x2: x, y1: 0, y2: tick.type === 'major' ? 6 : 4, strokeWidth: 1, stroke: c }, `tick-${tick.base}`));
13
+ }), !hideText
14
+ ? ticks
15
+ .filter(tick => tick.type === 'major')
16
+ .map(tick => {
17
+ const x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
18
+ return (_jsx("text", { x: x - 3, y: 7 + 11, fontSize: 11, fill: c, children: getTickDisplayStr(tick.base + 1, bpPerPx) }, `label-${tick.base}`));
19
+ })
20
+ : null] }));
23
21
  }
24
22
  export default function SVGRuler({ model, fontSize, }) {
25
23
  const { dynamicBlocks: { contentBlocks }, offsetPx: viewOffsetPx, bpPerPx, } = model;
26
24
  const renderRuler = contentBlocks.length < 5;
27
25
  const theme = useTheme();
28
26
  const c = stripAlpha(theme.palette.text.primary);
29
- return (React.createElement(React.Fragment, null,
30
- React.createElement(SVGRegionSeparators, { model: model, height: 30 }),
31
- contentBlocks.map(block => {
32
- const { start, end, key, reversed, offsetPx, refName, widthPx } = block;
33
- const offset = offsetPx - viewOffsetPx;
34
- const clipid = `clip-${key}`;
35
- return (React.createElement("g", { key: key },
36
- React.createElement("defs", null,
37
- React.createElement("clipPath", { id: clipid },
38
- React.createElement("rect", { x: 0, y: 0, width: widthPx, height: 100 }))),
39
- React.createElement("g", { transform: `translate(${offset} 0)` },
40
- React.createElement("g", { clipPath: `url(#${clipid})` },
41
- React.createElement("text", { x: 4, y: fontSize, fontSize: fontSize, fill: c }, refName),
42
- React.createElement("g", { transform: "translate(0 20)" },
43
- React.createElement(Ruler, { hideText: !renderRuler, start: start, end: end, bpPerPx: bpPerPx, reversed: reversed }))))));
44
- })));
27
+ return (_jsxs(_Fragment, { children: [_jsx(SVGRegionSeparators, { model: model, height: 30 }), contentBlocks.map(block => {
28
+ const { start, end, key, reversed, offsetPx, refName, widthPx } = block;
29
+ const offset = offsetPx - viewOffsetPx;
30
+ const clipid = `clip-${key}`;
31
+ return (_jsxs("g", { children: [_jsx("defs", { children: _jsx("clipPath", { id: clipid, children: _jsx("rect", { x: 0, y: 0, width: widthPx, height: 100 }) }) }), _jsx("g", { transform: `translate(${offset} 0)`, children: _jsxs("g", { clipPath: `url(#${clipid})`, children: [_jsx("text", { x: 4, y: fontSize, fontSize: fontSize, fill: c, children: refName }), _jsx("g", { transform: "translate(0 20)", children: _jsx(Ruler, { hideText: !renderRuler, start: start, end: end, bpPerPx: bpPerPx, reversed: reversed }) })] }) })] }, key));
32
+ })] }));
45
33
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
2
  type LGV = LinearGenomeViewModel;
4
3
  export default function SVGScalebar({ model, fontSize, }: {
5
4
  model: LGV;
6
5
  fontSize: number;
7
- }): React.JSX.Element;
6
+ }): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getBpDisplayStr, stripAlpha } from '@jbrowse/core/util';
3
3
  import { useTheme } from '@mui/material';
4
4
  export default function SVGScalebar({ model, fontSize, }) {
@@ -10,9 +10,5 @@ export default function SVGScalebar({ model, fontSize, }) {
10
10
  const c = stripAlpha(theme.palette.text.secondary);
11
11
  const x = x0 + (x1 - x0) / 2;
12
12
  const y = fontSize;
13
- return (React.createElement(React.Fragment, null,
14
- React.createElement("line", { x1: x0, x2: x1, y1: 10, y2: 10, stroke: c }),
15
- React.createElement("line", { x1: x0, x2: x0, y1: 5, y2: 15, stroke: c }),
16
- React.createElement("line", { x1: x1, x2: x1, y1: 5, y2: 15, stroke: c }),
17
- React.createElement("text", { x: x, y: y, textAnchor: "middle", dominantBaseline: "hanging", fontSize: fontSize, fill: c }, displayBp)));
13
+ return (_jsxs(_Fragment, { children: [_jsx("line", { x1: x0, x2: x1, y1: 10, y2: 10, stroke: c }), _jsx("line", { x1: x0, x2: x0, y1: 5, y2: 15, stroke: c }), _jsx("line", { x1: x1, x2: x1, y1: 5, y2: 15, stroke: c }), _jsx("text", { x: x, y: y, textAnchor: "middle", dominantBaseline: "hanging", fontSize: fontSize, fill: c, children: displayBp })] }));
18
14
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  export default function SVGTrackLabel({ trackLabels, trackName, fontSize, trackLabelOffset, x, }: {
3
2
  trackName: string;
4
3
  trackLabels: string;
5
4
  fontSize: number;
6
5
  trackLabelOffset: number;
7
6
  x: number;
8
- }): React.JSX.Element | null;
7
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { coarseStripHTML, stripAlpha } from '@jbrowse/core/util';
3
3
  import { useTheme } from '@mui/material';
4
4
  export default function SVGTrackLabel({ trackLabels, trackName, fontSize, trackLabelOffset, x, }) {
@@ -7,5 +7,5 @@ export default function SVGTrackLabel({ trackLabels, trackName, fontSize, trackL
7
7
  const xoff = trackLabels === 'overlay' ? 5 : 0;
8
8
  const yoff = trackLabels === 'offset' ? 5 : 0;
9
9
  const name = coarseStripHTML(trackName);
10
- return trackLabels !== 'none' ? (React.createElement("g", null, trackLabels === 'left' ? (React.createElement("text", { x: trackLabelOffset - 40, y: 20, fill: fill, fontSize: fontSize, dominantBaseline: "hanging", textAnchor: "end" }, name)) : (React.createElement("text", { x: x + xoff, y: yoff, fill: fill, fontSize: fontSize, dominantBaseline: "hanging" }, name)))) : null;
10
+ return trackLabels !== 'none' ? (_jsx("g", { children: trackLabels === 'left' ? (_jsx("text", { x: trackLabelOffset - 40, y: 20, fill: fill, fontSize: fontSize, dominantBaseline: "hanging", textAnchor: "end", children: name })) : (_jsx("text", { x: x + xoff, y: yoff, fill: fill, fontSize: fontSize, dominantBaseline: "hanging", children: name })) })) : null;
11
11
  }
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { LinearGenomeViewModel } from '..';
3
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
4
3
  type LGV = LinearGenomeViewModel;
@@ -18,5 +17,5 @@ export default function SVGTracks({ displayResults, model, textHeight, fontSize,
18
17
  fontSize: number;
19
18
  trackLabels?: string;
20
19
  trackLabelOffset?: number;
21
- }): React.JSX.Element;
20
+ }): import("react/jsx-runtime").JSX.Element;
22
21
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { getSession } from '@jbrowse/core/util';
3
3
  import { getTrackName } from '@jbrowse/core/util/tracks';
4
4
  import SVGRegionSeparators from './SVGRegionSeparators';
@@ -6,18 +6,21 @@ import SVGTrackLabel from './SVGTrackLabel';
6
6
  export default function SVGTracks({ displayResults, model, textHeight, fontSize, trackLabels = 'offset', trackLabelOffset = 0, }) {
7
7
  const session = getSession(model);
8
8
  const textOffset = trackLabels === 'offset' ? textHeight : 0;
9
- let offset = 0;
10
- return (React.createElement(React.Fragment, null, displayResults.map(({ track, result }) => {
11
- const current = offset;
12
- const conf = track.configuration;
13
- const trackName = getTrackName(conf, session);
14
- const display = track.displays[0];
15
- const x = Math.max(-model.offsetPx, 0);
16
- offset += display.height + textOffset;
17
- return (React.createElement("g", { key: conf.trackId, transform: `translate(0 ${current})` },
18
- React.createElement("g", { transform: `translate(${trackLabelOffset} ${textOffset})` },
19
- React.createElement(SVGRegionSeparators, { model: model, height: display.height }),
20
- result),
21
- React.createElement(SVGTrackLabel, { trackName: trackName, fontSize: fontSize, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset, x: x })));
22
- })));
9
+ return (_jsx(_Fragment, { children: displayResults.reduce(({ prevOffset, reactElements }, { track, result }) => {
10
+ const conf = track.configuration;
11
+ const trackName = getTrackName(conf, session);
12
+ const display = track.displays[0];
13
+ const x = Math.max(-model.offsetPx, 0);
14
+ const currOffset = prevOffset + display.height + textOffset;
15
+ return {
16
+ prevOffset: currOffset,
17
+ reactElements: [
18
+ ...reactElements,
19
+ _jsxs("g", { transform: `translate(0 ${prevOffset})`, children: [_jsxs("g", { transform: `translate(${trackLabelOffset} ${textOffset})`, children: [_jsx(SVGRegionSeparators, { model: model, height: display.height }), result] }), _jsx(SVGTrackLabel, { trackName: trackName, fontSize: fontSize, trackLabels: trackLabels, trackLabelOffset: trackLabelOffset, x: x })] }, conf.trackId),
20
+ ],
21
+ };
22
+ }, {
23
+ prevOffset: 0,
24
+ reactElements: [],
25
+ }).reactElements }));
23
26
  }
@@ -0,0 +1,38 @@
1
+ export interface BpOffset {
2
+ refName?: string;
3
+ index: number;
4
+ offset: number;
5
+ start?: number;
6
+ end?: number;
7
+ coord?: number;
8
+ reversed?: boolean;
9
+ assemblyName?: string;
10
+ oob?: boolean;
11
+ }
12
+ export interface ExportSvgOptions {
13
+ rasterizeLayers?: boolean;
14
+ filename?: string;
15
+ Wrapper?: React.FC<{
16
+ children: React.ReactNode;
17
+ }>;
18
+ fontSize?: number;
19
+ rulerHeight?: number;
20
+ textHeight?: number;
21
+ paddingHeight?: number;
22
+ headerHeight?: number;
23
+ cytobandHeight?: number;
24
+ trackLabels?: string;
25
+ themeName?: string;
26
+ }
27
+ export interface HighlightType {
28
+ start: number;
29
+ end: number;
30
+ assemblyName: string;
31
+ refName: string;
32
+ }
33
+ export interface NavLocation {
34
+ refName: string;
35
+ start?: number;
36
+ end?: number;
37
+ assemblyName?: string;
38
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { AssemblyManager, ParsedLocString } from '@jbrowse/core/util';
2
+ import type { BaseBlock } from '@jbrowse/core/util/blockTypes';
2
3
  export declare function chooseGridPitch(scale: number, minMajorPitchPx: number, minMinorPitchPx: number): {
3
4
  majorPitch: number;
4
5
  minorPitch: number;
@@ -12,8 +13,9 @@ export declare function generateLocations(regions: ParsedLocString[], assemblyMa
12
13
  assemblyName: string;
13
14
  parentRegion: import("@jbrowse/core/assemblyManager/assembly").BasicRegion;
14
15
  end?: number | undefined;
15
- reversed?: boolean | undefined;
16
16
  start?: number | undefined;
17
17
  refName: string;
18
+ reversed?: boolean | undefined;
18
19
  }[]>;
19
20
  export declare function parseLocStrings(input: string, assemblyName: string, isValidRefName: (str: string, assemblyName: string) => boolean): ParsedLocString[];
21
+ export declare function calculateVisibleLocStrings(contentBlocks: BaseBlock[]): string;
@@ -1,4 +1,4 @@
1
- import { parseLocString } from '@jbrowse/core/util';
1
+ import { assembleLocString, parseLocString } from '@jbrowse/core/util';
2
2
  export function chooseGridPitch(scale, minMajorPitchPx, minMinorPitchPx) {
3
3
  scale = Math.abs(scale);
4
4
  const minMajorPitchBp = minMajorPitchPx * scale;
@@ -100,3 +100,18 @@ export function parseLocStrings(input, assemblyName, isValidRefName) {
100
100
  throw e;
101
101
  }
102
102
  }
103
+ export function calculateVisibleLocStrings(contentBlocks) {
104
+ if (!contentBlocks.length) {
105
+ return '';
106
+ }
107
+ else {
108
+ const isSingleAssemblyName = contentBlocks.every(b => b.assemblyName === contentBlocks[0].assemblyName);
109
+ const locs = contentBlocks.map(block => assembleLocString({
110
+ ...block,
111
+ start: Math.round(block.start),
112
+ end: Math.round(block.end),
113
+ assemblyName: isSingleAssemblyName ? undefined : block.assemblyName,
114
+ }));
115
+ return locs.join(' ');
116
+ }
117
+ }