@jbrowse/plugin-linear-genome-view 2.5.0 → 2.6.1

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 (279) hide show
  1. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
  2. package/dist/BaseLinearDisplay/components/Block.d.ts +3 -3
  3. package/dist/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
  4. package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -2
  5. package/dist/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -1
  6. package/dist/BaseLinearDisplay/components/Tooltip.d.ts +2 -1
  7. package/dist/BaseLinearDisplay/index.d.ts +5 -2
  8. package/dist/BaseLinearDisplay/index.js +7 -1
  9. package/dist/BaseLinearDisplay/index.js.map +1 -1
  10. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +62 -142
  11. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +34 -355
  12. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
  13. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
  14. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +190 -0
  15. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js.map +1 -0
  16. package/dist/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
  17. package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +56 -0
  18. package/dist/BaseLinearDisplay/models/TrackHeightMixin.js.map +1 -0
  19. package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
  20. package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +42 -0
  21. package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +1 -0
  22. package/dist/BaseLinearDisplay/models/configSchema.js +1 -0
  23. package/dist/BaseLinearDisplay/models/configSchema.js.map +1 -1
  24. package/dist/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
  25. package/dist/BaseLinearDisplay/models/renderSvg.js +83 -0
  26. package/dist/BaseLinearDisplay/models/renderSvg.js.map +1 -0
  27. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +20 -16
  28. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
  29. package/dist/BasicTrack/configSchema.js +1 -0
  30. package/dist/BasicTrack/configSchema.js.map +1 -1
  31. package/dist/FeatureTrack/configSchema.d.ts +1 -3
  32. package/dist/FeatureTrack/configSchema.js +1 -0
  33. package/dist/FeatureTrack/configSchema.js.map +1 -1
  34. package/dist/LinearBareDisplay/configSchema.d.ts +1 -0
  35. package/dist/LinearBareDisplay/configSchema.js +1 -0
  36. package/dist/LinearBareDisplay/configSchema.js.map +1 -1
  37. package/dist/LinearBareDisplay/model.d.ts +52 -39
  38. package/dist/LinearBareDisplay/model.js +1 -0
  39. package/dist/LinearBareDisplay/model.js.map +1 -1
  40. package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -1
  41. package/dist/LinearBasicDisplay/configSchema.d.ts +1 -0
  42. package/dist/LinearBasicDisplay/configSchema.js +1 -0
  43. package/dist/LinearBasicDisplay/configSchema.js.map +1 -1
  44. package/dist/LinearBasicDisplay/model.d.ts +67 -66
  45. package/dist/LinearBasicDisplay/model.js +1 -0
  46. package/dist/LinearBasicDisplay/model.js.map +1 -1
  47. package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -1
  48. package/dist/LinearGenomeView/components/Cytobands.d.ts +2 -1
  49. package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -1
  50. package/dist/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -1
  51. package/dist/LinearGenomeView/components/Gridlines.d.ts +2 -1
  52. package/dist/LinearGenomeView/components/Header.d.ts +2 -1
  53. package/dist/LinearGenomeView/components/ImportForm.d.ts +2 -1
  54. package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +2 -1
  55. package/dist/LinearGenomeView/components/LinearGenomeView.js +28 -4
  56. package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -1
  57. package/dist/LinearGenomeView/components/MiniControls.d.ts +3 -2
  58. package/dist/LinearGenomeView/components/MiniControls.js +20 -40
  59. package/dist/LinearGenomeView/components/MiniControls.js.map +1 -1
  60. package/dist/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
  61. package/dist/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
  62. package/dist/LinearGenomeView/components/OverviewScalebar.js +10 -4
  63. package/dist/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
  64. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
  65. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +22 -0
  66. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +1 -0
  67. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
  68. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +52 -0
  69. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +1 -0
  70. package/dist/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -1
  71. package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +1 -0
  72. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
  73. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +111 -0
  74. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js.map +1 -0
  75. package/dist/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
  76. package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +59 -0
  77. package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js.map +1 -0
  78. package/dist/LinearGenomeView/components/Rubberband.d.ts +1 -1
  79. package/dist/LinearGenomeView/components/RubberbandSpan.d.ts +2 -1
  80. package/dist/LinearGenomeView/components/SearchBox.d.ts +2 -1
  81. package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +2 -1
  82. package/dist/LinearGenomeView/components/SearchResultsTable.d.ts +2 -1
  83. package/dist/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -1
  84. package/dist/LinearGenomeView/components/TrackContainer.d.ts +3 -3
  85. package/dist/LinearGenomeView/components/TrackContainer.js +12 -68
  86. package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -1
  87. package/dist/LinearGenomeView/components/TrackLabel.js +6 -10
  88. package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -1
  89. package/dist/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
  90. package/dist/LinearGenomeView/components/TrackLabelContainer.js +32 -0
  91. package/dist/LinearGenomeView/components/TrackLabelContainer.js.map +1 -0
  92. package/dist/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
  93. package/dist/LinearGenomeView/components/TrackRenderingContainer.js +74 -0
  94. package/dist/LinearGenomeView/components/TrackRenderingContainer.js.map +1 -0
  95. package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  96. package/dist/LinearGenomeView/components/TracksContainer.js +2 -2
  97. package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -1
  98. package/dist/LinearGenomeView/components/VerticalGuide.d.ts +2 -1
  99. package/dist/LinearGenomeView/components/ZoomControls.d.ts +2 -1
  100. package/dist/LinearGenomeView/model.d.ts +13 -12
  101. package/dist/LinearGenomeView/model.js +25 -25
  102. package/dist/LinearGenomeView/model.js.map +1 -1
  103. package/dist/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -1
  104. package/dist/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -4
  105. package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +7 -2
  106. package/dist/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -1
  107. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -1
  108. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -1
  109. package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -1
  110. package/dist/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -1
  111. package/dist/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -1
  112. package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -1
  113. package/dist/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -1
  114. package/dist/LinearGenomeView/util.d.ts +2 -2
  115. package/dist/index.d.ts +160 -134
  116. package/dist/index.js +6 -3
  117. package/dist/index.js.map +1 -1
  118. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +1 -1
  119. package/esm/BaseLinearDisplay/components/Block.d.ts +3 -3
  120. package/esm/BaseLinearDisplay/components/BlockMsg.d.ts +1 -1
  121. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +3 -2
  122. package/esm/BaseLinearDisplay/components/TooLargeMessage.d.ts +2 -1
  123. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +2 -1
  124. package/esm/BaseLinearDisplay/index.d.ts +5 -2
  125. package/esm/BaseLinearDisplay/index.js +3 -0
  126. package/esm/BaseLinearDisplay/index.js.map +1 -1
  127. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +62 -142
  128. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +36 -334
  129. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -1
  130. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.d.ts +99 -0
  131. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +184 -0
  132. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js.map +1 -0
  133. package/esm/BaseLinearDisplay/models/TrackHeightMixin.d.ts +30 -0
  134. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +53 -0
  135. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js.map +1 -0
  136. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.d.ts +2 -0
  137. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +39 -0
  138. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +1 -0
  139. package/esm/BaseLinearDisplay/models/configSchema.js +1 -0
  140. package/esm/BaseLinearDisplay/models/configSchema.js.map +1 -1
  141. package/esm/BaseLinearDisplay/models/renderSvg.d.ts +8 -0
  142. package/esm/BaseLinearDisplay/models/renderSvg.js +54 -0
  143. package/esm/BaseLinearDisplay/models/renderSvg.js.map +1 -0
  144. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +20 -16
  145. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -1
  146. package/esm/BasicTrack/configSchema.js +1 -0
  147. package/esm/BasicTrack/configSchema.js.map +1 -1
  148. package/esm/FeatureTrack/configSchema.d.ts +1 -3
  149. package/esm/FeatureTrack/configSchema.js +1 -0
  150. package/esm/FeatureTrack/configSchema.js.map +1 -1
  151. package/esm/LinearBareDisplay/configSchema.d.ts +1 -0
  152. package/esm/LinearBareDisplay/configSchema.js +1 -0
  153. package/esm/LinearBareDisplay/configSchema.js.map +1 -1
  154. package/esm/LinearBareDisplay/model.d.ts +52 -39
  155. package/esm/LinearBareDisplay/model.js +1 -0
  156. package/esm/LinearBareDisplay/model.js.map +1 -1
  157. package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +2 -1
  158. package/esm/LinearBasicDisplay/configSchema.d.ts +1 -0
  159. package/esm/LinearBasicDisplay/configSchema.js +1 -0
  160. package/esm/LinearBasicDisplay/configSchema.js.map +1 -1
  161. package/esm/LinearBasicDisplay/model.d.ts +67 -66
  162. package/esm/LinearBasicDisplay/model.js +1 -0
  163. package/esm/LinearBasicDisplay/model.js.map +1 -1
  164. package/esm/LinearGenomeView/components/CenterLine.d.ts +2 -1
  165. package/esm/LinearGenomeView/components/Cytobands.d.ts +2 -1
  166. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +2 -1
  167. package/esm/LinearGenomeView/components/GetSequenceDialog.d.ts +2 -1
  168. package/esm/LinearGenomeView/components/Gridlines.d.ts +2 -1
  169. package/esm/LinearGenomeView/components/Header.d.ts +2 -1
  170. package/esm/LinearGenomeView/components/ImportForm.d.ts +2 -1
  171. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +2 -1
  172. package/esm/LinearGenomeView/components/LinearGenomeView.js +4 -3
  173. package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -1
  174. package/esm/LinearGenomeView/components/MiniControls.d.ts +3 -2
  175. package/esm/LinearGenomeView/components/MiniControls.js +20 -17
  176. package/esm/LinearGenomeView/components/MiniControls.js.map +1 -1
  177. package/esm/LinearGenomeView/components/OverviewRubberband.d.ts +1 -1
  178. package/esm/LinearGenomeView/components/OverviewScalebar.d.ts +2 -2
  179. package/esm/LinearGenomeView/components/OverviewScalebar.js +10 -4
  180. package/esm/LinearGenomeView/components/OverviewScalebar.js.map +1 -1
  181. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.d.ts +10 -0
  182. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +16 -0
  183. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +1 -0
  184. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.d.ts +5 -0
  185. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +23 -0
  186. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +1 -0
  187. package/esm/LinearGenomeView/components/{HelpDialog.d.ts → RefNameAutocomplete/HelpDialog.d.ts} +2 -1
  188. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +1 -0
  189. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.d.ts +18 -0
  190. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +83 -0
  191. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js.map +1 -0
  192. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.d.ts +12 -0
  193. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +50 -0
  194. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js.map +1 -0
  195. package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -1
  196. package/esm/LinearGenomeView/components/RubberbandSpan.d.ts +2 -1
  197. package/esm/LinearGenomeView/components/SearchBox.d.ts +2 -1
  198. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +2 -1
  199. package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +2 -1
  200. package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -1
  201. package/esm/LinearGenomeView/components/TrackContainer.d.ts +3 -3
  202. package/esm/LinearGenomeView/components/TrackContainer.js +13 -69
  203. package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -1
  204. package/esm/LinearGenomeView/components/TrackLabel.js +6 -10
  205. package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -1
  206. package/esm/LinearGenomeView/components/TrackLabelContainer.d.ts +9 -0
  207. package/esm/LinearGenomeView/components/TrackLabelContainer.js +27 -0
  208. package/esm/LinearGenomeView/components/TrackLabelContainer.js.map +1 -0
  209. package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +10 -0
  210. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +49 -0
  211. package/esm/LinearGenomeView/components/TrackRenderingContainer.js.map +1 -0
  212. package/esm/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  213. package/esm/LinearGenomeView/components/TracksContainer.js +2 -2
  214. package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -1
  215. package/esm/LinearGenomeView/components/VerticalGuide.d.ts +2 -1
  216. package/esm/LinearGenomeView/components/ZoomControls.d.ts +2 -1
  217. package/esm/LinearGenomeView/model.d.ts +13 -12
  218. package/esm/LinearGenomeView/model.js +21 -21
  219. package/esm/LinearGenomeView/model.js.map +1 -1
  220. package/esm/LinearGenomeView/svgcomponents/SVGBackground.d.ts +2 -1
  221. package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +3 -4
  222. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +7 -2
  223. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js.map +1 -1
  224. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +1 -1
  225. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +1 -1
  226. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.d.ts +2 -1
  227. package/esm/LinearGenomeView/svgcomponents/SVGRuler.d.ts +2 -1
  228. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.d.ts +2 -1
  229. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.d.ts +2 -1
  230. package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +2 -1
  231. package/esm/LinearGenomeView/util.d.ts +2 -2
  232. package/esm/index.d.ts +160 -134
  233. package/esm/index.js +1 -1
  234. package/esm/index.js.map +1 -1
  235. package/package.json +2 -2
  236. package/src/BaseLinearDisplay/index.ts +5 -1
  237. package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +46 -407
  238. package/src/BaseLinearDisplay/models/FeatureDensityMixin.tsx +213 -0
  239. package/src/BaseLinearDisplay/models/TrackHeightMixin.tsx +59 -0
  240. package/src/BaseLinearDisplay/models/autorunFeatureDensityStats.ts +46 -0
  241. package/src/BaseLinearDisplay/models/configSchema.ts +1 -0
  242. package/src/BaseLinearDisplay/models/renderSvg.tsx +101 -0
  243. package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +21 -19
  244. package/src/BasicTrack/configSchema.ts +1 -0
  245. package/src/FeatureTrack/configSchema.ts +1 -0
  246. package/src/LinearBareDisplay/configSchema.ts +1 -0
  247. package/src/LinearBareDisplay/model.ts +1 -0
  248. package/src/LinearBasicDisplay/configSchema.ts +1 -0
  249. package/src/LinearBasicDisplay/model.ts +1 -0
  250. package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +3 -3
  251. package/src/LinearGenomeView/components/LinearGenomeView.tsx +6 -3
  252. package/src/LinearGenomeView/components/MiniControls.tsx +37 -38
  253. package/src/LinearGenomeView/components/OverviewScalebar.tsx +11 -5
  254. package/src/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.tsx +53 -0
  255. package/src/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.tsx +44 -0
  256. package/src/LinearGenomeView/components/RefNameAutocomplete/index.tsx +160 -0
  257. package/src/LinearGenomeView/components/RefNameAutocomplete/util.ts +65 -0
  258. package/src/LinearGenomeView/components/TrackContainer.tsx +16 -104
  259. package/src/LinearGenomeView/components/TrackLabel.tsx +7 -27
  260. package/src/LinearGenomeView/components/TrackLabelContainer.tsx +48 -0
  261. package/src/LinearGenomeView/components/TrackRenderingContainer.tsx +96 -0
  262. package/src/LinearGenomeView/components/TracksContainer.tsx +2 -2
  263. package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +3 -3
  264. package/src/LinearGenomeView/model.ts +29 -28
  265. package/src/LinearGenomeView/svgcomponents/SVGHeader.tsx +8 -6
  266. package/src/LinearGenomeView/svgcomponents/SVGLinearGenomeView.tsx +1 -1
  267. package/src/index.ts +11 -5
  268. package/dist/LinearGenomeView/components/HelpDialog.js.map +0 -1
  269. package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
  270. package/dist/LinearGenomeView/components/RefNameAutocomplete.js +0 -189
  271. package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
  272. package/esm/LinearGenomeView/components/HelpDialog.js.map +0 -1
  273. package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +0 -23
  274. package/esm/LinearGenomeView/components/RefNameAutocomplete.js +0 -161
  275. package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +0 -1
  276. package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +0 -321
  277. /package/dist/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -0
  278. /package/esm/LinearGenomeView/components/{HelpDialog.js → RefNameAutocomplete/HelpDialog.js} +0 -0
  279. /package/src/LinearGenomeView/components/{HelpDialog.tsx → RefNameAutocomplete/HelpDialog.tsx} +0 -0
@@ -0,0 +1,213 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import React from 'react'
3
+ import { getConf } from '@jbrowse/core/configuration'
4
+ import { getContainingView } from '@jbrowse/core/util'
5
+ import { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter'
6
+ import { Region } from '@jbrowse/core/util/types'
7
+ import { autorun } from 'mobx'
8
+ import { addDisposer, isAlive, types } from 'mobx-state-tree'
9
+
10
+ // locals
11
+ import { LinearGenomeViewModel } from '../../LinearGenomeView'
12
+ import TooLargeMessage from '../components/TooLargeMessage'
13
+ import { getDisplayStr, getFeatureDensityStatsPre } from './util'
14
+ import autorunFeatureDensityStats from './autorunFeatureDensityStats'
15
+
16
+ type LGV = LinearGenomeViewModel
17
+
18
+ /**
19
+ * #stateModel FeatureDensityMixin
20
+ * #category display
21
+ */
22
+ export default function FeatureDensityMixin() {
23
+ return types
24
+ .model({
25
+ /**
26
+ * #property
27
+ */
28
+ userBpPerPxLimit: types.maybe(types.number),
29
+ /**
30
+ * #property
31
+ */
32
+
33
+ userByteSizeLimit: types.maybe(types.number),
34
+ })
35
+ .volatile(() => ({
36
+ featureDensityStatsP: undefined as
37
+ | undefined
38
+ | Promise<FeatureDensityStats>,
39
+ featureDensityStats: undefined as undefined | FeatureDensityStats,
40
+ currStatsBpPerPx: 0,
41
+ }))
42
+ .views(self => ({
43
+ /**
44
+ * #getter
45
+ */
46
+ get currentBytesRequested() {
47
+ return self.featureDensityStats?.bytes || 0
48
+ },
49
+
50
+ /**
51
+ * #getter
52
+ */
53
+ get currentFeatureScreenDensity() {
54
+ const view = getContainingView(self) as LGV
55
+ return (self.featureDensityStats?.featureDensity || 0) * view.bpPerPx
56
+ },
57
+
58
+ /**
59
+ * #getter
60
+ */
61
+ get maxFeatureScreenDensity() {
62
+ // @ts-expect-error
63
+ return getConf(self, 'maxFeatureScreenDensity')
64
+ },
65
+ /**
66
+ * #getter
67
+ */
68
+ get featureDensityStatsReady() {
69
+ const view = getContainingView(self)
70
+ return (
71
+ self.currStatsBpPerPx === view.bpPerPx &&
72
+ (!!self.featureDensityStats || !!self.userBpPerPxLimit)
73
+ )
74
+ },
75
+
76
+ /**
77
+ * #getter
78
+ */
79
+ get maxAllowableBytes() {
80
+ return (
81
+ self.userByteSizeLimit ||
82
+ self.featureDensityStats?.fetchSizeLimit ||
83
+ // @ts-expect-error
84
+ (getConf(self, 'fetchSizeLimit') as number)
85
+ )
86
+ },
87
+ }))
88
+ .actions(self => ({
89
+ afterAttach() {
90
+ addDisposer(
91
+ self,
92
+ autorun(() => autorunFeatureDensityStats(self as any)),
93
+ )
94
+ },
95
+ }))
96
+ .actions(self => ({
97
+ /**
98
+ * #action
99
+ */
100
+ setCurrStatsBpPerPx(n: number) {
101
+ self.currStatsBpPerPx = n
102
+ },
103
+ /**
104
+ * #action
105
+ */
106
+ setFeatureDensityStatsLimit(stats?: FeatureDensityStats) {
107
+ const view = getContainingView(self) as LGV
108
+ if (stats?.bytes) {
109
+ self.userByteSizeLimit = stats.bytes
110
+ } else {
111
+ self.userBpPerPxLimit = view.bpPerPx
112
+ }
113
+ },
114
+ /**
115
+ * #action
116
+ */
117
+ async getFeatureDensityStats() {
118
+ if (!self.featureDensityStatsP) {
119
+ self.featureDensityStatsP = getFeatureDensityStatsPre(
120
+ self as any,
121
+ ).catch(e => {
122
+ if (isAlive(self)) {
123
+ this.setFeatureDensityStatsP(undefined)
124
+ }
125
+ throw e
126
+ })
127
+ }
128
+ return self.featureDensityStatsP
129
+ },
130
+
131
+ /**
132
+ * #action
133
+ */
134
+ setFeatureDensityStatsP(arg: any) {
135
+ self.featureDensityStatsP = arg
136
+ },
137
+
138
+ /**
139
+ * #action
140
+ */
141
+ setFeatureDensityStats(featureDensityStats?: FeatureDensityStats) {
142
+ self.featureDensityStats = featureDensityStats
143
+ },
144
+ /**
145
+ * #action
146
+ */
147
+ clearFeatureDensityStats() {
148
+ self.featureDensityStatsP = undefined
149
+ self.featureDensityStats = undefined
150
+ },
151
+ }))
152
+ .views(self => ({
153
+ /**
154
+ * #getter
155
+ * region is too large if:
156
+ * - stats are ready
157
+ * - region is greater than 20kb (don't warn when zoomed in less than that)
158
+ * - and bytes is greater than max allowed bytes or density greater than max
159
+ * density
160
+ */
161
+ get regionTooLarge() {
162
+ const view = getContainingView(self) as LGV
163
+ if (
164
+ !self.featureDensityStatsReady ||
165
+ view.dynamicBlocks.totalBp < 20_000
166
+ ) {
167
+ return false
168
+ }
169
+ return (
170
+ self.currentBytesRequested > self.maxAllowableBytes ||
171
+ (self.userBpPerPxLimit
172
+ ? view.bpPerPx > self.userBpPerPxLimit
173
+ : self.currentFeatureScreenDensity > self.maxFeatureScreenDensity)
174
+ )
175
+ },
176
+
177
+ /**
178
+ * #getter
179
+ * only shows a message of bytes requested is defined, the feature density
180
+ * based stats don't produce any helpful message besides to zoom in
181
+ */
182
+ get regionTooLargeReason() {
183
+ const req = self.currentBytesRequested
184
+ const max = self.maxAllowableBytes
185
+
186
+ return req && req > max
187
+ ? `Requested too much data (${getDisplayStr(req)})`
188
+ : ''
189
+ },
190
+ }))
191
+ .views(self => ({
192
+ /**
193
+ * #method
194
+ */
195
+ regionCannotBeRenderedText(_region: Region) {
196
+ return self.regionTooLarge ? 'Force load to see features' : ''
197
+ },
198
+
199
+ /**
200
+ * #method
201
+ * @param region -
202
+ * @returns falsy if the region is fine to try rendering. Otherwise,
203
+ * return a react node + string of text.
204
+ * string of text describes why it cannot be rendered
205
+ * react node allows user to force load at current setting
206
+ */
207
+ regionCannotBeRendered(_region: Region) {
208
+ return self.regionTooLarge ? (
209
+ <TooLargeMessage model={self as any} />
210
+ ) : null
211
+ },
212
+ }))
213
+ }
@@ -0,0 +1,59 @@
1
+ import { getConf } from '@jbrowse/core/configuration'
2
+ import { types } from 'mobx-state-tree'
3
+
4
+ const minDisplayHeight = 20
5
+
6
+ /**
7
+ * #stateModel TrackHeightMixin
8
+ * #category display
9
+ */
10
+ export default function TrackHeightMixin() {
11
+ return types
12
+ .model({
13
+ /**
14
+ * #property
15
+ */
16
+ heightPreConfig: types.maybe(
17
+ types.refinement(
18
+ 'displayHeight',
19
+ types.number,
20
+ n => n >= minDisplayHeight,
21
+ ),
22
+ ),
23
+ })
24
+ .volatile(() => ({
25
+ /**
26
+ * #property
27
+ */
28
+ scrollTop: 0,
29
+ }))
30
+ .views(self => ({
31
+ get height() {
32
+ // @ts-expect-error
33
+ return self.heightPreConfig ?? (getConf(self, 'height') as number)
34
+ },
35
+ }))
36
+ .actions(self => ({
37
+ /**
38
+ * #action
39
+ */
40
+ setScrollTop(scrollTop: number) {
41
+ self.scrollTop = scrollTop
42
+ },
43
+ /**
44
+ * #action
45
+ */
46
+ setHeight(displayHeight: number) {
47
+ self.heightPreConfig = Math.max(displayHeight, minDisplayHeight)
48
+ return self.height
49
+ },
50
+ /**
51
+ * #action
52
+ */
53
+ resizeHeight(distance: number) {
54
+ const oldHeight = self.height
55
+ const newHeight = this.setHeight(self.height + distance)
56
+ return newHeight - oldHeight
57
+ },
58
+ }))
59
+ }
@@ -0,0 +1,46 @@
1
+ import { getContainingView, isAbortException } from '@jbrowse/core/util'
2
+ import { LinearGenomeViewModel } from '../../LinearGenomeView'
3
+ import { isAlive } from 'mobx-state-tree'
4
+ import { BaseLinearDisplayModel } from './BaseLinearDisplayModel'
5
+
6
+ // stats estimation autorun calls getFeatureDensityStats against the data
7
+ // adapter which by default uses featureDensity, but can also respond with a
8
+ // byte size estimate and fetch size limit (data adapter can define what is too
9
+ // much data)
10
+ export default async function autorunFeatureDensityStats(
11
+ self: BaseLinearDisplayModel,
12
+ ) {
13
+ try {
14
+ const view = getContainingView(self) as LinearGenomeViewModel
15
+
16
+ // extra check for contentBlocks.length
17
+ // https://github.com/GMOD/jbrowse-components/issues/2694
18
+ if (
19
+ !view.initialized ||
20
+ !view.staticBlocks.contentBlocks.length ||
21
+ view.bpPerPx === self.currStatsBpPerPx ||
22
+ self.error
23
+ ) {
24
+ return
25
+ }
26
+
27
+ // don't re-estimate featureDensity even if zoom level changes,
28
+ // jbrowse1-style assume it's sort of representative
29
+ if (self.featureDensityStats?.featureDensity !== undefined) {
30
+ self.setCurrStatsBpPerPx(view.bpPerPx)
31
+ return
32
+ }
33
+
34
+ self.clearFeatureDensityStats()
35
+ self.setCurrStatsBpPerPx(view.bpPerPx)
36
+ const stats = await self.getFeatureDensityStats()
37
+ if (isAlive(self)) {
38
+ self.setFeatureDensityStats(stats)
39
+ }
40
+ } catch (e) {
41
+ if (!isAbortException(e) && isAlive(self)) {
42
+ console.error(e)
43
+ self.setError(e)
44
+ }
45
+ }
46
+ }
@@ -2,6 +2,7 @@ import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
2
 
3
3
  /**
4
4
  * #config BaseLinearDisplay
5
+ * #category display
5
6
  * `BaseLinearDisplay` is a "base" config that is extended by classes like
6
7
  * `LinearBasicDisplay` (used for feature tracks, etc) and `LinearBareDisplay`
7
8
  * (more stripped down than even the basic display, not commonly used)
@@ -0,0 +1,101 @@
1
+ import React from 'react'
2
+ import { ThemeOptions } from '@mui/material'
3
+ import {
4
+ getContainingView,
5
+ getViewParams,
6
+ ReactRendering,
7
+ } from '@jbrowse/core/util'
8
+
9
+ // locals
10
+ import { ExportSvgOptions, LinearGenomeViewModel } from '../../LinearGenomeView'
11
+ import BlockState, { renderBlockData } from './serverSideRenderedBlock'
12
+ import { getId } from './util'
13
+
14
+ import { BaseLinearDisplayModel } from './BaseLinearDisplayModel'
15
+
16
+ export default async function renderBaseLinearDisplaySvg(
17
+ self: BaseLinearDisplayModel,
18
+ opts: ExportSvgOptions & {
19
+ overrideHeight: number
20
+ theme: ThemeOptions
21
+ },
22
+ ) {
23
+ const { height, id } = self
24
+ const { overrideHeight } = opts
25
+ const view = getContainingView(self) as LinearGenomeViewModel
26
+ const { offsetPx: viewOffsetPx, roundedDynamicBlocks, width } = view
27
+ const renderings = await Promise.all(
28
+ roundedDynamicBlocks.map(async block => {
29
+ const blockState = BlockState.create({
30
+ key: block.key,
31
+ region: block,
32
+ })
33
+
34
+ // regionCannotBeRendered can return jsx so look for plaintext
35
+ // version, or just get the default if none available
36
+ const cannotBeRenderedReason =
37
+ self.regionCannotBeRenderedText(block) ||
38
+ self.regionCannotBeRendered(block)
39
+
40
+ if (cannotBeRenderedReason) {
41
+ return [
42
+ block,
43
+ {
44
+ reactElement: (
45
+ <>
46
+ <rect x={0} y={0} width={width} height={20} fill="#aaa" />
47
+ <text x={0} y={15}>
48
+ {cannotBeRenderedReason}
49
+ </text>
50
+ </>
51
+ ),
52
+ },
53
+ ] as const
54
+ }
55
+
56
+ const { rpcManager, renderArgs, renderProps, rendererType } =
57
+ renderBlockData(blockState, self)
58
+
59
+ return [
60
+ block,
61
+ await rendererType.renderInClient(rpcManager, {
62
+ ...renderArgs,
63
+ ...renderProps,
64
+ viewParams: getViewParams(self, true),
65
+ exportSVG: opts,
66
+ theme: opts.theme || renderProps.theme,
67
+ }),
68
+ ] as const
69
+ }),
70
+ )
71
+
72
+ return (
73
+ <>
74
+ {renderings.map(([block, rendering], index) => {
75
+ const { offsetPx, widthPx } = block
76
+ const offset = offsetPx - viewOffsetPx
77
+ const clipid = getId(id, index)
78
+
79
+ return (
80
+ <React.Fragment key={`frag-${index}`}>
81
+ <defs>
82
+ <clipPath id={clipid}>
83
+ <rect
84
+ x={0}
85
+ y={0}
86
+ width={widthPx}
87
+ height={overrideHeight || height}
88
+ />
89
+ </clipPath>
90
+ </defs>
91
+ <g transform={`translate(${offset} 0)`}>
92
+ <g clipPath={`url(#${clipid})`}>
93
+ <ReactRendering rendering={rendering} />
94
+ </g>
95
+ </g>
96
+ </React.Fragment>
97
+ )
98
+ })}
99
+ </>
100
+ )
101
+ }
@@ -181,25 +181,27 @@ const blockState = types
181
181
  getParent<any>(self, 2).reload()
182
182
  },
183
183
  beforeDestroy() {
184
- if (renderInProgress && !renderInProgress.signal.aborted) {
185
- renderInProgress.abort()
186
- }
187
- const display = getContainingDisplay(self)
188
- const { rpcManager } = getSession(self)
189
- const { rendererType } = display
190
- const { renderArgs } = renderBlockData(cast(self))
191
- // renderArgs can be undefined if an error occurred in this block
192
- if (renderArgs) {
193
- rendererType
194
- .freeResourcesInClient(
195
- rpcManager,
196
- JSON.parse(JSON.stringify(renderArgs)),
197
- )
198
- .catch((e: Error) => {
199
- // just console.error if it's something while it's being destroyed
200
- console.warn('Error while destroying block', e)
201
- })
202
- }
184
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
185
+ ;(async () => {
186
+ try {
187
+ if (renderInProgress && !renderInProgress.signal.aborted) {
188
+ renderInProgress.abort()
189
+ }
190
+ const display = getContainingDisplay(self)
191
+ const { rpcManager } = getSession(self)
192
+ const { rendererType } = display
193
+ const { renderArgs } = renderBlockData(cast(self))
194
+ // renderArgs can be undefined if an error occurred in this block
195
+ if (renderArgs) {
196
+ await rendererType.freeResourcesInClient(
197
+ rpcManager,
198
+ JSON.parse(JSON.stringify(renderArgs)),
199
+ )
200
+ }
201
+ } catch (e) {
202
+ console.error('Error while destroying block', e)
203
+ }
204
+ })()
203
205
  },
204
206
  }
205
207
  })
@@ -4,6 +4,7 @@ import PluginManager from '@jbrowse/core/PluginManager'
4
4
 
5
5
  /**
6
6
  * #config BasicTrack
7
+ * #category track
7
8
  * synonym for FeatureTrack
8
9
  */
9
10
  function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
@@ -4,6 +4,7 @@ import PluginManager from '@jbrowse/core/PluginManager'
4
4
 
5
5
  /**
6
6
  * #config FeatureTrack
7
+ * #category track
7
8
  * used for basic gene and feature tracks, generally used with LinearBasicDisplay
8
9
  */
9
10
  function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
@@ -4,6 +4,7 @@ import { baseLinearDisplayConfigSchema } from '../BaseLinearDisplay'
4
4
 
5
5
  /**
6
6
  * #config LinearBareDisplay
7
+ * #category display
7
8
  */
8
9
  function configSchemaFactory(pluginManager: PluginManager) {
9
10
  return ConfigurationSchema(
@@ -8,6 +8,7 @@ import { BaseLinearDisplay } from '../BaseLinearDisplay'
8
8
 
9
9
  /**
10
10
  * #stateModel LinearBareDisplay
11
+ * #category display
11
12
  * extends `BaseLinearDisplay`
12
13
  */
13
14
  export function stateModelFactory(configSchema: AnyConfigurationSchemaType) {
@@ -4,6 +4,7 @@ import { baseLinearDisplayConfigSchema } from '../BaseLinearDisplay'
4
4
 
5
5
  /**
6
6
  * #config LinearBasicDisplay
7
+ * #category display
7
8
  */
8
9
  function configSchemaFactory(pluginManager: PluginManager) {
9
10
  return ConfigurationSchema(
@@ -18,6 +18,7 @@ const SetMaxHeightDlg = lazy(() => import('./components/SetMaxHeight'))
18
18
 
19
19
  /**
20
20
  * #stateModel LinearBasicDisplay
21
+ * #category display
21
22
  * used by `FeatureTrack`, has simple settings like "show/hide feature labels",
22
23
  * etc.
23
24
  */
@@ -157,11 +157,11 @@ test('renders two tracks, two regions', async () => {
157
157
  })
158
158
  const model = session.views[0]
159
159
  model.setWidth(800)
160
- const { container, findByText, queryAllByTestId } = render(
161
- <LinearGenomeView model={model} />,
162
- )
160
+ const { container, findByDisplayValue, findByText, queryAllByTestId } =
161
+ render(<LinearGenomeView model={model} />)
163
162
  await findByText('Foo Track')
164
163
  await findByText('798bp')
164
+ await findByDisplayValue('ctgA:1..100 ctgB:1,001..1,698')
165
165
  await waitFor(() => expect(queryAllByTestId('svgfeatures').length).toBe(4))
166
166
  expect(container).toMatchSnapshot()
167
167
  }, 15000)
@@ -1,15 +1,18 @@
1
- import React from 'react'
1
+ import React, { lazy } from 'react'
2
2
  import { Button, Paper, Typography } from '@mui/material'
3
3
  import { makeStyles } from 'tss-react/mui'
4
- import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons'
5
4
  import { LoadingEllipses } from '@jbrowse/core/ui'
6
5
  import { observer } from 'mobx-react'
7
6
 
7
+ // icons
8
+ import { TrackSelector as TrackSelectorIcon } from '@jbrowse/core/ui/Icons'
9
+
8
10
  // locals
9
11
  import { LinearGenomeViewModel } from '..'
10
12
  import TrackContainer from './TrackContainer'
11
13
  import TracksContainer from './TracksContainer'
12
- import ImportForm from './ImportForm'
14
+
15
+ const ImportForm = lazy(() => import('./ImportForm'))
13
16
 
14
17
  type LGV = LinearGenomeViewModel
15
18
 
@@ -1,7 +1,6 @@
1
- import React, { useState } from 'react'
1
+ import React from 'react'
2
2
  import { observer } from 'mobx-react'
3
3
  import { IconButton, Paper } from '@mui/material'
4
- import Menu from '@jbrowse/core/ui/Menu'
5
4
 
6
5
  // icons
7
6
  import ZoomIn from '@mui/icons-material/ZoomIn'
@@ -10,45 +9,45 @@ import ArrowDown from '@mui/icons-material/KeyboardArrowDown'
10
9
 
11
10
  // locals
12
11
  import { LinearGenomeViewModel } from '..'
12
+ import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton'
13
+ import { makeStyles } from 'tss-react/mui'
13
14
 
14
- const MiniControls = observer((props: { model: LinearGenomeViewModel }) => {
15
- const { model } = props
16
- const { bpPerPx, maxBpPerPx, minBpPerPx, scaleFactor, hideHeader } = model
17
- const [anchorEl, setAnchorEl] = useState<HTMLElement>()
15
+ const useStyles = makeStyles()(theme => ({
16
+ bg: {
17
+ position: 'absolute',
18
+ right: 0,
19
+ zIndex: 1001,
20
+ background: theme.palette.background.paper,
21
+ },
22
+ }))
18
23
 
24
+ const MiniControls = observer(function ({
25
+ model,
26
+ }: {
27
+ model: LinearGenomeViewModel
28
+ }) {
29
+ const { classes } = useStyles()
30
+ const { bpPerPx, maxBpPerPx, minBpPerPx, scaleFactor, hideHeader } = model
19
31
  return hideHeader ? (
20
- <div style={{ position: 'absolute', right: '0px', zIndex: '1001' }}>
21
- <Paper style={{ background: '#aaa7' }}>
22
- <IconButton onClick={event => setAnchorEl(event.currentTarget)}>
23
- <ArrowDown fontSize="small" />
24
- </IconButton>
25
-
26
- <IconButton
27
- data-testid="zoom_out"
28
- onClick={() => model.zoom(bpPerPx * 2)}
29
- disabled={bpPerPx >= maxBpPerPx - 0.0001 || scaleFactor !== 1}
30
- >
31
- <ZoomOut fontSize="small" />
32
- </IconButton>
33
- <IconButton
34
- data-testid="zoom_in"
35
- onClick={() => model.zoom(model.bpPerPx / 2)}
36
- disabled={bpPerPx <= minBpPerPx + 0.0001 || scaleFactor !== 1}
37
- >
38
- <ZoomIn fontSize="small" />
39
- </IconButton>
40
- <Menu
41
- anchorEl={anchorEl}
42
- open={Boolean(anchorEl)}
43
- onMenuItemClick={(_, callback) => {
44
- callback()
45
- setAnchorEl(undefined)
46
- }}
47
- onClose={() => setAnchorEl(undefined)}
48
- menuItems={model.menuItems()}
49
- />
50
- </Paper>
51
- </div>
32
+ <Paper className={classes.bg}>
33
+ <CascadingMenuButton menuItems={model.menuItems()}>
34
+ <ArrowDown fontSize="small" />
35
+ </CascadingMenuButton>
36
+ <IconButton
37
+ data-testid="zoom_out"
38
+ onClick={() => model.zoom(bpPerPx * 2)}
39
+ disabled={bpPerPx >= maxBpPerPx - 0.0001 || scaleFactor !== 1}
40
+ >
41
+ <ZoomOut fontSize="small" />
42
+ </IconButton>
43
+ <IconButton
44
+ data-testid="zoom_in"
45
+ onClick={() => model.zoom(model.bpPerPx / 2)}
46
+ disabled={bpPerPx <= minBpPerPx + 0.0001 || scaleFactor !== 1}
47
+ >
48
+ <ZoomIn fontSize="small" />
49
+ </IconButton>
50
+ </Paper>
52
51
  ) : null
53
52
  })
54
53