@jbrowse/plugin-linear-genome-view 1.7.11 → 2.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 (270) hide show
  1. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +119 -139
  2. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
  3. package/dist/BaseLinearDisplay/components/Block.js +53 -74
  4. package/dist/BaseLinearDisplay/components/Block.js.map +1 -0
  5. package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +11 -1
  6. package/dist/BaseLinearDisplay/components/LinearBlocks.js +64 -103
  7. package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
  8. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +145 -175
  9. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
  10. package/dist/BaseLinearDisplay/components/Tooltip.js +109 -116
  11. package/dist/BaseLinearDisplay/components/Tooltip.js.map +1 -0
  12. package/dist/BaseLinearDisplay/index.js +13 -40
  13. package/dist/BaseLinearDisplay/index.js.map +1 -0
  14. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +19 -14
  15. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +605 -684
  16. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
  17. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +15 -22
  18. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
  19. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +7 -8
  20. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +266 -312
  21. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
  22. package/dist/LinearBareDisplay/configSchema.js +11 -17
  23. package/dist/LinearBareDisplay/configSchema.js.map +1 -0
  24. package/dist/LinearBareDisplay/index.js +7 -20
  25. package/dist/LinearBareDisplay/index.js.map +1 -0
  26. package/dist/LinearBareDisplay/model.d.ts +15 -13
  27. package/dist/LinearBareDisplay/model.js +36 -42
  28. package/dist/LinearBareDisplay/model.js.map +1 -0
  29. package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +1 -1
  30. package/dist/LinearBasicDisplay/components/SetMaxHeight.js +76 -85
  31. package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
  32. package/dist/LinearBasicDisplay/configSchema.js +15 -23
  33. package/dist/LinearBasicDisplay/configSchema.js.map +1 -0
  34. package/dist/LinearBasicDisplay/index.js +10 -22
  35. package/dist/LinearBasicDisplay/index.js.map +1 -0
  36. package/dist/LinearBasicDisplay/model.d.ts +20 -14
  37. package/dist/LinearBasicDisplay/model.js +180 -159
  38. package/dist/LinearBasicDisplay/model.js.map +1 -0
  39. package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -8
  40. package/dist/LinearGenomeView/components/CenterLine.js +60 -74
  41. package/dist/LinearGenomeView/components/CenterLine.js.map +1 -0
  42. package/dist/LinearGenomeView/components/ExportSvgDialog.js +141 -141
  43. package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
  44. package/dist/LinearGenomeView/components/Header.d.ts +1 -0
  45. package/dist/LinearGenomeView/components/Header.js +70 -125
  46. package/dist/LinearGenomeView/components/Header.js.map +1 -0
  47. package/dist/LinearGenomeView/components/HelpDialog.d.ts +0 -1
  48. package/dist/LinearGenomeView/components/HelpDialog.js +62 -44
  49. package/dist/LinearGenomeView/components/HelpDialog.js.map +1 -0
  50. package/dist/LinearGenomeView/components/ImportForm.d.ts +1 -0
  51. package/dist/LinearGenomeView/components/ImportForm.js +222 -289
  52. package/dist/LinearGenomeView/components/ImportForm.js.map +1 -0
  53. package/dist/LinearGenomeView/components/LinearGenomeView.js +64 -124
  54. package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
  55. package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +198 -337
  56. package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
  57. package/dist/LinearGenomeView/components/MiniControls.js +64 -78
  58. package/dist/LinearGenomeView/components/MiniControls.js.map +1 -0
  59. package/dist/LinearGenomeView/components/OverviewRubberBand.js +226 -293
  60. package/dist/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
  61. package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +3 -3
  62. package/dist/LinearGenomeView/components/OverviewScaleBar.js +275 -370
  63. package/dist/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
  64. package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +1 -1
  65. package/dist/LinearGenomeView/components/RefNameAutocomplete.js +237 -324
  66. package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
  67. package/dist/LinearGenomeView/components/RubberBand.js +229 -296
  68. package/dist/LinearGenomeView/components/RubberBand.js.map +1 -0
  69. package/dist/LinearGenomeView/components/Ruler.js +45 -90
  70. package/dist/LinearGenomeView/components/Ruler.js.map +1 -0
  71. package/dist/LinearGenomeView/components/ScaleBar.d.ts +8 -403
  72. package/dist/LinearGenomeView/components/ScaleBar.js +121 -172
  73. package/dist/LinearGenomeView/components/ScaleBar.js.map +1 -0
  74. package/dist/LinearGenomeView/components/SearchBox.js +155 -166
  75. package/dist/LinearGenomeView/components/SearchBox.js.map +1 -0
  76. package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -1
  77. package/dist/LinearGenomeView/components/SearchResultsDialog.js +105 -149
  78. package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
  79. package/dist/LinearGenomeView/components/SequenceDialog.js +219 -272
  80. package/dist/LinearGenomeView/components/SequenceDialog.js.map +1 -0
  81. package/dist/LinearGenomeView/components/TrackContainer.js +116 -156
  82. package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -0
  83. package/dist/LinearGenomeView/components/TrackLabel.d.ts +6 -42
  84. package/dist/LinearGenomeView/components/TrackLabel.js +115 -134
  85. package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -0
  86. package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  87. package/dist/LinearGenomeView/components/TracksContainer.js +172 -199
  88. package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -0
  89. package/dist/LinearGenomeView/components/VerticalGuides.d.ts +2 -3
  90. package/dist/LinearGenomeView/components/VerticalGuides.js +66 -104
  91. package/dist/LinearGenomeView/components/VerticalGuides.js.map +1 -0
  92. package/dist/LinearGenomeView/components/ZoomControls.js +72 -87
  93. package/dist/LinearGenomeView/components/ZoomControls.js.map +1 -0
  94. package/dist/LinearGenomeView/components/util.js +94 -71
  95. package/dist/LinearGenomeView/components/util.js.map +1 -0
  96. package/dist/LinearGenomeView/index.d.ts +3 -3
  97. package/dist/LinearGenomeView/index.js +1163 -1414
  98. package/dist/LinearGenomeView/index.js.map +1 -0
  99. package/dist/LinearGenomeView/util.js +76 -83
  100. package/dist/LinearGenomeView/util.js.map +1 -0
  101. package/dist/index.d.ts +98 -48
  102. package/dist/index.js +225 -295
  103. package/dist/index.js.map +1 -0
  104. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +9 -0
  105. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +68 -0
  106. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
  107. package/esm/BaseLinearDisplay/components/Block.d.ts +15 -0
  108. package/esm/BaseLinearDisplay/components/Block.js +46 -0
  109. package/esm/BaseLinearDisplay/components/Block.js.map +1 -0
  110. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +22 -0
  111. package/esm/BaseLinearDisplay/components/LinearBlocks.js +62 -0
  112. package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
  113. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -0
  114. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +113 -0
  115. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
  116. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +8 -0
  117. package/esm/BaseLinearDisplay/components/Tooltip.js +64 -0
  118. package/esm/BaseLinearDisplay/components/Tooltip.js.map +1 -0
  119. package/esm/BaseLinearDisplay/index.d.ts +5 -0
  120. package/esm/BaseLinearDisplay/index.js +4 -0
  121. package/esm/BaseLinearDisplay/index.js.map +1 -0
  122. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +232 -0
  123. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +541 -0
  124. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
  125. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -0
  126. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +14 -0
  127. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
  128. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +96 -0
  129. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +225 -0
  130. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
  131. package/esm/LinearBareDisplay/configSchema.d.ts +2 -0
  132. package/esm/LinearBareDisplay/configSchema.js +9 -0
  133. package/esm/LinearBareDisplay/configSchema.js.map +1 -0
  134. package/esm/LinearBareDisplay/index.d.ts +2 -0
  135. package/esm/LinearBareDisplay/index.js +3 -0
  136. package/esm/LinearBareDisplay/index.js.map +1 -0
  137. package/esm/LinearBareDisplay/model.d.ts +194 -0
  138. package/esm/LinearBareDisplay/model.js +28 -0
  139. package/esm/LinearBareDisplay/model.js.map +1 -0
  140. package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +10 -0
  141. package/esm/LinearBasicDisplay/components/SetMaxHeight.js +40 -0
  142. package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
  143. package/esm/LinearBasicDisplay/configSchema.d.ts +2 -0
  144. package/esm/LinearBasicDisplay/configSchema.js +14 -0
  145. package/esm/LinearBasicDisplay/configSchema.js.map +1 -0
  146. package/esm/LinearBasicDisplay/index.d.ts +2 -0
  147. package/esm/LinearBasicDisplay/index.js +3 -0
  148. package/esm/LinearBasicDisplay/index.js.map +1 -0
  149. package/esm/LinearBasicDisplay/model.d.ts +218 -0
  150. package/esm/LinearBasicDisplay/model.js +127 -0
  151. package/esm/LinearBasicDisplay/model.js.map +1 -0
  152. package/esm/LinearGenomeView/components/CenterLine.d.ts +8 -0
  153. package/esm/LinearGenomeView/components/CenterLine.js +40 -0
  154. package/esm/LinearGenomeView/components/CenterLine.js.map +1 -0
  155. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +6 -0
  156. package/esm/LinearGenomeView/components/ExportSvgDialog.js +52 -0
  157. package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
  158. package/esm/LinearGenomeView/components/Header.d.ts +7 -0
  159. package/esm/LinearGenomeView/components/Header.js +81 -0
  160. package/esm/LinearGenomeView/components/Header.js.map +1 -0
  161. package/esm/LinearGenomeView/components/HelpDialog.d.ts +4 -0
  162. package/esm/LinearGenomeView/components/HelpDialog.js +58 -0
  163. package/esm/LinearGenomeView/components/HelpDialog.js.map +1 -0
  164. package/esm/LinearGenomeView/components/ImportForm.d.ts +7 -0
  165. package/esm/LinearGenomeView/components/ImportForm.js +141 -0
  166. package/esm/LinearGenomeView/components/ImportForm.js.map +1 -0
  167. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +7 -0
  168. package/esm/LinearGenomeView/components/LinearGenomeView.js +67 -0
  169. package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
  170. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +4 -0
  171. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js +132 -0
  172. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
  173. package/esm/LinearGenomeView/components/MiniControls.d.ts +6 -0
  174. package/esm/LinearGenomeView/components/MiniControls.js +25 -0
  175. package/esm/LinearGenomeView/components/MiniControls.js.map +1 -0
  176. package/esm/LinearGenomeView/components/OverviewRubberBand.d.ts +22 -0
  177. package/esm/LinearGenomeView/components/OverviewRubberBand.js +194 -0
  178. package/esm/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
  179. package/esm/LinearGenomeView/components/OverviewScaleBar.d.ts +148 -0
  180. package/esm/LinearGenomeView/components/OverviewScaleBar.js +287 -0
  181. package/esm/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
  182. package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +22 -0
  183. package/esm/LinearGenomeView/components/RefNameAutocomplete.js +136 -0
  184. package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
  185. package/esm/LinearGenomeView/components/RubberBand.d.ts +9 -0
  186. package/esm/LinearGenomeView/components/RubberBand.js +198 -0
  187. package/esm/LinearGenomeView/components/RubberBand.js.map +1 -0
  188. package/esm/LinearGenomeView/components/Ruler.d.ts +27 -0
  189. package/esm/LinearGenomeView/components/Ruler.js +50 -0
  190. package/esm/LinearGenomeView/components/Ruler.js.map +1 -0
  191. package/esm/LinearGenomeView/components/ScaleBar.d.ts +10 -0
  192. package/esm/LinearGenomeView/components/ScaleBar.js +112 -0
  193. package/esm/LinearGenomeView/components/ScaleBar.js.map +1 -0
  194. package/esm/LinearGenomeView/components/SearchBox.d.ts +8 -0
  195. package/esm/LinearGenomeView/components/SearchBox.js +94 -0
  196. package/esm/LinearGenomeView/components/SearchBox.js.map +1 -0
  197. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -0
  198. package/esm/LinearGenomeView/components/SearchResultsDialog.js +107 -0
  199. package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
  200. package/esm/LinearGenomeView/components/SequenceDialog.d.ts +8 -0
  201. package/esm/LinearGenomeView/components/SequenceDialog.js +147 -0
  202. package/esm/LinearGenomeView/components/SequenceDialog.js.map +1 -0
  203. package/esm/LinearGenomeView/components/TrackContainer.d.ts +9 -0
  204. package/esm/LinearGenomeView/components/TrackContainer.js +109 -0
  205. package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -0
  206. package/esm/LinearGenomeView/components/TrackLabel.d.ts +8 -0
  207. package/esm/LinearGenomeView/components/TrackLabel.js +89 -0
  208. package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -0
  209. package/esm/LinearGenomeView/components/TracksContainer.d.ts +10 -0
  210. package/esm/LinearGenomeView/components/TracksContainer.js +142 -0
  211. package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -0
  212. package/esm/LinearGenomeView/components/VerticalGuides.d.ts +8 -0
  213. package/esm/LinearGenomeView/components/VerticalGuides.js +71 -0
  214. package/esm/LinearGenomeView/components/VerticalGuides.js.map +1 -0
  215. package/esm/LinearGenomeView/components/ZoomControls.d.ts +7 -0
  216. package/esm/LinearGenomeView/components/ZoomControls.js +32 -0
  217. package/esm/LinearGenomeView/components/ZoomControls.js.map +1 -0
  218. package/esm/LinearGenomeView/components/util.d.ts +14 -0
  219. package/esm/LinearGenomeView/components/util.js +17 -0
  220. package/esm/LinearGenomeView/components/util.js.map +1 -0
  221. package/esm/LinearGenomeView/index.d.ts +288 -0
  222. package/esm/LinearGenomeView/index.js +1124 -0
  223. package/esm/LinearGenomeView/index.js.map +1 -0
  224. package/esm/LinearGenomeView/util.d.ts +14 -0
  225. package/esm/LinearGenomeView/util.js +62 -0
  226. package/esm/LinearGenomeView/util.js.map +1 -0
  227. package/esm/index.d.ts +615 -0
  228. package/esm/index.js +127 -0
  229. package/esm/index.js.map +1 -0
  230. package/package.json +21 -14
  231. package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +4 -3
  232. package/src/BaseLinearDisplay/components/Block.tsx +5 -5
  233. package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -4
  234. package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +7 -8
  235. package/src/BaseLinearDisplay/components/Tooltip.tsx +14 -4
  236. package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +6 -4
  237. package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +1 -1
  238. package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +10 -7
  239. package/src/LinearBasicDisplay/model.ts +19 -11
  240. package/src/LinearGenomeView/components/CenterLine.tsx +6 -11
  241. package/src/LinearGenomeView/components/ExportSvgDialog.tsx +5 -5
  242. package/src/LinearGenomeView/components/Header.tsx +10 -15
  243. package/src/LinearGenomeView/components/HelpDialog.tsx +5 -5
  244. package/src/LinearGenomeView/components/ImportForm.tsx +6 -12
  245. package/src/LinearGenomeView/components/LinearGenomeView.test.js +16 -6
  246. package/src/LinearGenomeView/components/LinearGenomeView.tsx +4 -3
  247. package/src/LinearGenomeView/components/MiniControls.tsx +29 -40
  248. package/src/LinearGenomeView/components/OverviewRubberBand.tsx +6 -10
  249. package/src/LinearGenomeView/components/OverviewScaleBar.tsx +61 -59
  250. package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +13 -44
  251. package/src/LinearGenomeView/components/RubberBand.tsx +12 -17
  252. package/src/LinearGenomeView/components/Ruler.tsx +5 -11
  253. package/src/LinearGenomeView/components/ScaleBar.tsx +23 -27
  254. package/src/LinearGenomeView/components/SearchBox.tsx +4 -3
  255. package/src/LinearGenomeView/components/SearchResultsDialog.tsx +7 -6
  256. package/src/LinearGenomeView/components/SequenceDialog.tsx +9 -9
  257. package/src/LinearGenomeView/components/TrackContainer.tsx +12 -12
  258. package/src/LinearGenomeView/components/TrackLabel.tsx +21 -31
  259. package/src/LinearGenomeView/components/TracksContainer.tsx +8 -13
  260. package/src/LinearGenomeView/components/VerticalGuides.tsx +9 -11
  261. package/src/LinearGenomeView/components/ZoomControls.tsx +12 -13
  262. package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +500 -547
  263. package/src/LinearGenomeView/index.test.ts +1 -0
  264. package/src/LinearGenomeView/index.tsx +47 -62
  265. package/src/index.ts +1 -1
  266. package/dist/LinearBareDisplay/index.test.js +0 -33
  267. package/dist/LinearGenomeView/components/LinearGenomeView.test.js +0 -234
  268. package/dist/LinearGenomeView/components/ScaleBar.test.js +0 -180
  269. package/dist/LinearGenomeView/index.test.js +0 -1187
  270. package/dist/LinearGenomeView/util.test.js +0 -78
@@ -1,22 +1,19 @@
1
1
  import React, { useRef, useEffect, useState } from 'react'
2
2
  import { observer } from 'mobx-react'
3
- import {
4
- Popover,
5
- Tooltip,
6
- Typography,
7
- makeStyles,
8
- alpha,
9
- } from '@material-ui/core'
3
+ import { Popover, Tooltip, Typography, alpha } from '@mui/material'
4
+ import { makeStyles } from 'tss-react/mui'
10
5
  import { stringify } from '@jbrowse/core/util'
11
6
  import { Menu } from '@jbrowse/core/ui'
12
7
  import { LinearGenomeViewModel } from '..'
13
8
 
14
9
  type LGV = LinearGenomeViewModel
15
10
 
16
- const useStyles = makeStyles(theme => {
17
- const background = theme.palette.tertiary
18
- ? alpha(theme.palette.tertiary.main, 0.7)
19
- : alpha(theme.palette.primary.main, 0.7)
11
+ const useStyles = makeStyles()(theme => {
12
+ // @ts-ignore
13
+ const { primary, tertiary } = theme.palette
14
+ const background = tertiary
15
+ ? alpha(tertiary.main, 0.7)
16
+ : alpha(primary.main, 0.7)
20
17
  return {
21
18
  rubberBand: {
22
19
  height: '100%',
@@ -32,9 +29,7 @@ const useStyles = makeStyles(theme => {
32
29
  minHeight: 8,
33
30
  },
34
31
  rubberBandText: {
35
- color: theme.palette.tertiary
36
- ? theme.palette.tertiary.contrastText
37
- : theme.palette.primary.contrastText,
32
+ color: tertiary ? tertiary.contrastText : primary.contrastText,
38
33
  },
39
34
  popover: {
40
35
  mouseEvents: 'none',
@@ -56,7 +51,7 @@ const useStyles = makeStyles(theme => {
56
51
 
57
52
  const VerticalGuide = observer(
58
53
  ({ model, coordX }: { model: LGV; coordX: number }) => {
59
- const classes = useStyles()
54
+ const { classes } = useStyles()
60
55
  return (
61
56
  <Tooltip
62
57
  open
@@ -93,10 +88,10 @@ function RubberBand({
93
88
  clientX: number
94
89
  clientY: number
95
90
  }>()
96
- const [guideX, setGuideX] = useState<number | undefined>()
91
+ const [guideX, setGuideX] = useState<number>()
97
92
  const controlsRef = useRef<HTMLDivElement>(null)
98
93
  const rubberBandRef = useRef(null)
99
- const classes = useStyles()
94
+ const { classes } = useStyles()
100
95
  const mouseDragging = startX !== undefined && anchorPosition === undefined
101
96
 
102
97
  const { setOffsets, pxToBp } = model
@@ -1,17 +1,11 @@
1
- import { makeStyles } from '@material-ui/core/styles'
1
+ import { makeStyles } from 'tss-react/mui'
2
2
  import { observer } from 'mobx-react'
3
3
  import ReactPropTypes from 'prop-types'
4
4
  import React from 'react'
5
5
  import { makeTicks } from '../util'
6
+ import { getTickDisplayStr } from '@jbrowse/core/util'
6
7
 
7
- function mathPower(num: number): string {
8
- if (num < 999) {
9
- return String(num)
10
- }
11
- return `${mathPower(~~(num / 1000))},${`00${~~(num % 1000)}`.substr(-3, 3)}`
12
- }
13
-
14
- const useStyles = makeStyles((/* theme */) => ({
8
+ const useStyles = makeStyles()((/* theme */) => ({
15
9
  majorTickLabel: {
16
10
  fontSize: '11px',
17
11
  // fill: theme.palette.text.primary,
@@ -41,7 +35,7 @@ function Ruler({
41
35
  major: boolean
42
36
  minor: boolean
43
37
  }) {
44
- const classes = useStyles()
38
+ const { classes } = useStyles()
45
39
  const ticks = makeTicks(start, end, bpPerPx, major, minor)
46
40
  return (
47
41
  <>
@@ -75,7 +69,7 @@ function Ruler({
75
69
  style={{ fontSize: '11px' }}
76
70
  className={classes.majorTickLabel}
77
71
  >
78
- {mathPower(tick.base + 1)}
72
+ {getTickDisplayStr(tick.base + 1, bpPerPx)}
79
73
  </text>
80
74
  )
81
75
  })}
@@ -1,10 +1,10 @@
1
- import { Paper, Typography, makeStyles } from '@material-ui/core'
1
+ import { Paper, Typography } from '@mui/material'
2
+ import { makeStyles } from 'tss-react/mui'
2
3
  import {
3
4
  ContentBlock,
4
5
  ElidedBlock,
5
6
  InterRegionPaddingBlock,
6
7
  } from '@jbrowse/core/util/blockTypes'
7
- import clsx from 'clsx'
8
8
  import { observer } from 'mobx-react'
9
9
  import React from 'react'
10
10
  import { LinearGenomeViewModel } from '..'
@@ -18,7 +18,7 @@ import { getTickDisplayStr } from '@jbrowse/core/util'
18
18
 
19
19
  type LGV = LinearGenomeViewModel
20
20
 
21
- const useStyles = makeStyles(theme => ({
21
+ const useStyles = makeStyles()(theme => ({
22
22
  scaleBarContainer: {
23
23
  overflow: 'hidden',
24
24
  position: 'relative',
@@ -60,7 +60,7 @@ const useStyles = makeStyles(theme => ({
60
60
  }))
61
61
 
62
62
  const RenderedRefNameLabels = observer(({ model }: { model: LGV }) => {
63
- const classes = useStyles()
63
+ const { classes } = useStyles()
64
64
 
65
65
  // find the block that needs pinning to the left side for context
66
66
  let lastLeftBlock = 0
@@ -95,24 +95,22 @@ const RenderedRefNameLabels = observer(({ model }: { model: LGV }) => {
95
95
  })
96
96
 
97
97
  const RenderedScaleBarLabels = observer(({ model }: { model: LGV }) => {
98
- const classes = useStyles()
99
- const { bpPerPx } = model
98
+ const { classes } = useStyles()
99
+ const { bpPerPx, staticBlocks } = model
100
100
 
101
101
  return (
102
102
  <>
103
- {model.staticBlocks.map((block, index) => {
103
+ {staticBlocks.map((block, index) => {
104
+ const { reversed, start, end, key, widthPx } = block
104
105
  if (block instanceof ContentBlock) {
105
- const { start, end } = block
106
106
  const ticks = makeTicks(start, end, bpPerPx, true, false)
107
107
 
108
108
  return (
109
- <ContentBlockComponent key={`${block.key}-${index}`} block={block}>
109
+ <ContentBlockComponent key={`${key}-${index}`} block={block}>
110
110
  {ticks.map(tick => {
111
111
  if (tick.type === 'major') {
112
112
  const x =
113
- (block.reversed
114
- ? block.end - tick.base
115
- : tick.base - block.start) / model.bpPerPx
113
+ (reversed ? end - tick.base : tick.base - start) / bpPerPx
116
114
  const baseNumber = tick.base + 1
117
115
  return (
118
116
  <div
@@ -134,13 +132,13 @@ const RenderedScaleBarLabels = observer(({ model }: { model: LGV }) => {
134
132
  )
135
133
  }
136
134
  if (block instanceof ElidedBlock) {
137
- return <ElidedBlockComponent key={block.key} width={block.widthPx} />
135
+ return <ElidedBlockComponent key={key} width={widthPx} />
138
136
  }
139
137
  if (block instanceof InterRegionPaddingBlock) {
140
138
  return (
141
139
  <InterRegionPaddingBlockComponent
142
- key={block.key}
143
- width={block.widthPx}
140
+ key={key}
141
+ width={widthPx}
144
142
  style={{ background: 'none' }}
145
143
  boundary={block.variant === 'boundary'}
146
144
  />
@@ -152,23 +150,21 @@ const RenderedScaleBarLabels = observer(({ model }: { model: LGV }) => {
152
150
  )
153
151
  })
154
152
 
155
- const ScaleBar = React.forwardRef(
156
- (
157
- {
158
- model,
159
- style,
160
- className,
161
- ...other
162
- }: { model: LGV; style?: React.CSSProperties; className?: string },
163
- ref,
164
- ) => {
165
- const classes = useStyles()
153
+ interface ScaleBarProps {
154
+ model: LGV
155
+ style?: React.CSSProperties
156
+ className?: string
157
+ }
158
+
159
+ const ScaleBar = React.forwardRef<HTMLDivElement, ScaleBarProps>(
160
+ ({ model, style, className, ...other }, ref) => {
161
+ const { classes, cx } = useStyles()
166
162
 
167
163
  const offsetLeft = model.staticBlocks.offsetPx - model.offsetPx
168
164
  return (
169
165
  <Paper
170
166
  data-resizer="true" // used to avoid click-and-drag scrolls on trackscontainer
171
- className={clsx(classes.scaleBarContainer, className)}
167
+ className={cx(classes.scaleBarContainer, className)}
172
168
  variant="outlined"
173
169
  ref={ref}
174
170
  style={style}
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import { observer } from 'mobx-react'
3
- import { makeStyles, useTheme, alpha } from '@material-ui/core'
3
+ import { useTheme, alpha } from '@mui/material'
4
+ import { makeStyles } from 'tss-react/mui'
4
5
  import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
5
6
  import { getSession } from '@jbrowse/core/util'
6
7
 
@@ -9,7 +10,7 @@ import RefNameAutocomplete from './RefNameAutocomplete'
9
10
  import { fetchResults } from './util'
10
11
  import { LinearGenomeViewModel, SPACING, WIDGET_HEIGHT } from '..'
11
12
 
12
- const useStyles = makeStyles(() => ({
13
+ const useStyles = makeStyles()(() => ({
13
14
  headerRefName: {
14
15
  minWidth: 100,
15
16
  },
@@ -22,7 +23,7 @@ function SearchBox({
22
23
  showHelp?: boolean
23
24
  model: LinearGenomeViewModel
24
25
  }) {
25
- const classes = useStyles()
26
+ const { classes } = useStyles()
26
27
  const theme = useTheme()
27
28
  const session = getSession(model)
28
29
 
@@ -1,4 +1,5 @@
1
1
  import React from 'react'
2
+ import { makeStyles } from 'tss-react/mui'
2
3
  import { getEnv, resolveIdentifier, getRoot } from 'mobx-state-tree'
3
4
  import { getSession } from '@jbrowse/core/util'
4
5
  import {
@@ -9,6 +10,7 @@ import {
9
10
  DialogTitle,
10
11
  Divider,
11
12
  IconButton,
13
+ Paper,
12
14
  Table,
13
15
  TableBody,
14
16
  TableCell,
@@ -16,13 +18,11 @@ import {
16
18
  TableHead,
17
19
  TableRow,
18
20
  Typography,
19
- Paper,
20
- makeStyles,
21
- } from '@material-ui/core'
22
- import CloseIcon from '@material-ui/icons/Close'
21
+ } from '@mui/material'
22
+ import CloseIcon from '@mui/icons-material/Close'
23
23
  import { LinearGenomeViewModel } from '../..'
24
24
 
25
- export const useStyles = makeStyles(theme => ({
25
+ const useStyles = makeStyles()(theme => ({
26
26
  dialogContent: {
27
27
  width: '80em',
28
28
  },
@@ -43,7 +43,7 @@ export default function SearchResultsDialog({
43
43
  optAssemblyName?: string
44
44
  handleClose: () => void
45
45
  }) {
46
- const classes = useStyles()
46
+ const { classes } = useStyles()
47
47
  const session = getSession(model)
48
48
  const { pluginManager } = getEnv(session)
49
49
  const { assemblyManager } = session
@@ -108,6 +108,7 @@ export default function SearchResultsDialog({
108
108
  onClick={() => {
109
109
  handleClose()
110
110
  }}
111
+ size="large"
111
112
  >
112
113
  <CloseIcon />
113
114
  </IconButton>
@@ -1,19 +1,18 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react'
2
-
2
+ import { makeStyles } from 'tss-react/mui'
3
3
  import {
4
4
  Button,
5
5
  CircularProgress,
6
+ Container,
6
7
  Dialog,
7
8
  DialogActions,
8
9
  DialogContent,
9
10
  DialogTitle,
10
- Container,
11
- Typography,
12
11
  Divider,
13
12
  IconButton,
14
13
  TextField,
15
- makeStyles,
16
- } from '@material-ui/core'
14
+ Typography,
15
+ } from '@mui/material'
17
16
  import { observer } from 'mobx-react'
18
17
  import { saveAs } from 'file-saver'
19
18
  import { Region } from '@jbrowse/core/util/types'
@@ -25,13 +24,13 @@ import { formatSeqFasta } from '@jbrowse/core/util/formatFastaStrings'
25
24
 
26
25
  // icons
27
26
  import { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons'
28
- import CloseIcon from '@material-ui/icons/Close'
29
- import GetAppIcon from '@material-ui/icons/GetApp'
27
+ import CloseIcon from '@mui/icons-material/Close'
28
+ import GetAppIcon from '@mui/icons-material/GetApp'
30
29
 
31
30
  // locals
32
31
  import { LinearGenomeViewModel } from '..'
33
32
 
34
- const useStyles = makeStyles(theme => ({
33
+ const useStyles = makeStyles()(theme => ({
35
34
  loadingMessage: {
36
35
  padding: theme.spacing(5),
37
36
  },
@@ -93,7 +92,7 @@ function SequenceDialog({
93
92
  model: LinearGenomeViewModel
94
93
  handleClose: () => void
95
94
  }) {
96
- const classes = useStyles()
95
+ const { classes } = useStyles()
97
96
  const session = getSession(model)
98
97
  const [error, setError] = useState<unknown>()
99
98
  const [sequence, setSequence] = useState<string>()
@@ -181,6 +180,7 @@ function SequenceDialog({
181
180
  handleClose()
182
181
  model.setOffsets(undefined, undefined)
183
182
  }}
183
+ size="large"
184
184
  >
185
185
  <CloseIcon />
186
186
  </IconButton>
@@ -1,21 +1,22 @@
1
1
  import React, { useEffect, useRef } from 'react'
2
+ import { Paper } from '@mui/material'
3
+ import { makeStyles } from 'tss-react/mui'
2
4
  import { observer } from 'mobx-react'
3
5
  import { isAlive } from 'mobx-state-tree'
4
6
  import { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
5
7
  import { getConf } from '@jbrowse/core/configuration'
6
8
  import { ResizeHandle } from '@jbrowse/core/ui'
7
9
  import { useDebouncedCallback } from '@jbrowse/core/util'
8
- import clsx from 'clsx'
9
- import Paper from '@material-ui/core/Paper'
10
- import { makeStyles } from '@material-ui/core/styles'
11
10
 
12
- import { LinearGenomeViewModel, RESIZE_HANDLE_HEIGHT } from '..'
11
+ import { LinearGenomeViewModel } from '..'
13
12
  import TrackLabel from './TrackLabel'
14
13
 
15
- const useStyles = makeStyles(theme => ({
16
- root: { marginTop: 2 },
14
+ const useStyles = makeStyles()({
15
+ root: {
16
+ marginTop: 2,
17
+ },
17
18
  resizeHandle: {
18
- height: RESIZE_HANDLE_HEIGHT,
19
+ height: 3,
19
20
  boxSizing: 'border-box',
20
21
  position: 'relative',
21
22
  zIndex: 2,
@@ -27,7 +28,6 @@ const useStyles = makeStyles(theme => ({
27
28
  left: 0,
28
29
  width: '100%',
29
30
  zIndex: 3,
30
- borderRadius: theme.shape.borderRadius,
31
31
  },
32
32
  trackLabel: {
33
33
  zIndex: 3,
@@ -57,13 +57,13 @@ const useStyles = makeStyles(theme => ({
57
57
  background: 'none',
58
58
  zIndex: 2,
59
59
  },
60
- }))
60
+ })
61
61
 
62
62
  type LGV = LinearGenomeViewModel
63
63
 
64
64
  const TrackContainerLabel = observer(
65
65
  ({ model, view }: { model: BaseTrackModel; view: LGV }) => {
66
- const classes = useStyles()
66
+ const { classes, cx } = useStyles()
67
67
  const labelStyle =
68
68
  view.trackLabels === 'overlapping'
69
69
  ? classes.trackLabelOverlap
@@ -71,7 +71,7 @@ const TrackContainerLabel = observer(
71
71
  return view.trackLabels !== 'hidden' ? (
72
72
  <TrackLabel
73
73
  track={model}
74
- className={clsx(classes.trackLabel, labelStyle)}
74
+ className={cx(classes.trackLabel, labelStyle)}
75
75
  />
76
76
  ) : null
77
77
  },
@@ -84,7 +84,7 @@ function TrackContainer({
84
84
  model: LinearGenomeViewModel
85
85
  track: BaseTrackModel
86
86
  }) {
87
- const classes = useStyles()
87
+ const { classes } = useStyles()
88
88
  const display = track.displays[0]
89
89
  const { horizontalScroll, draggingTrackId, moveTrack } = model
90
90
  const { height } = display
@@ -1,15 +1,12 @@
1
1
  import React from 'react'
2
+ import { observer } from 'mobx-react'
3
+ import { Instance } from 'mobx-state-tree'
2
4
  import { getConf, readConfObject } from '@jbrowse/core/configuration'
3
5
  import CascadingMenu from '@jbrowse/core/ui/CascadingMenu'
4
6
  import { getSession, getContainingView } from '@jbrowse/core/util'
5
7
  import { BaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
6
- import {
7
- IconButton,
8
- Paper,
9
- Typography,
10
- alpha,
11
- makeStyles,
12
- } from '@material-ui/core'
8
+ import { IconButton, Paper, Typography, alpha } from '@mui/material'
9
+ import { makeStyles } from 'tss-react/mui'
13
10
 
14
11
  import {
15
12
  bindTrigger,
@@ -17,18 +14,14 @@ import {
17
14
  usePopupState,
18
15
  } from 'material-ui-popup-state/hooks'
19
16
 
20
- import clsx from 'clsx'
21
- import { observer } from 'mobx-react'
22
- import { Instance } from 'mobx-state-tree'
23
-
24
17
  // icons
25
- import MoreVertIcon from '@material-ui/icons/MoreVert'
26
- import DragIcon from '@material-ui/icons/DragIndicator'
27
- import CloseIcon from '@material-ui/icons/Close'
18
+ import MoreVertIcon from '@mui/icons-material/MoreVert'
19
+ import DragIcon from '@mui/icons-material/DragIndicator'
20
+ import CloseIcon from '@mui/icons-material/Close'
28
21
 
29
22
  import { LinearGenomeViewStateModel } from '..'
30
23
 
31
- const useStyles = makeStyles(theme => ({
24
+ const useStyles = makeStyles()(theme => ({
32
25
  root: {
33
26
  background: alpha(theme.palette.background.paper, 0.8),
34
27
  '&:hover': {
@@ -59,13 +52,13 @@ const useStyles = makeStyles(theme => ({
59
52
  }))
60
53
 
61
54
  type LGV = Instance<LinearGenomeViewStateModel>
62
-
63
- const TrackLabel = React.forwardRef(
64
- (
65
- { track, className }: { track: BaseTrackModel; className?: string },
66
- ref,
67
- ) => {
68
- const classes = useStyles()
55
+ interface Props {
56
+ track: BaseTrackModel
57
+ className?: string
58
+ }
59
+ const TrackLabel = React.forwardRef<HTMLDivElement, Props>(
60
+ ({ track, className }, ref) => {
61
+ const { classes, cx } = useStyles()
69
62
  const view = getContainingView(track) as LGV
70
63
  const session = getSession(track)
71
64
  const trackConf = track.configuration
@@ -79,11 +72,8 @@ const TrackLabel = React.forwardRef(
79
72
  const onDragStart = (event: React.DragEvent<HTMLSpanElement>) => {
80
73
  const target = event.target as HTMLElement
81
74
  if (target.parentNode) {
82
- event.dataTransfer.setDragImage(
83
- target.parentNode as HTMLElement,
84
- 20,
85
- 20,
86
- )
75
+ const parent = target.parentNode as HTMLElement
76
+ event.dataTransfer.setDragImage(parent, 20, 20)
87
77
  view.setDraggingTrackId(track.id)
88
78
  }
89
79
  }
@@ -109,7 +99,7 @@ const TrackLabel = React.forwardRef(
109
99
 
110
100
  return (
111
101
  <>
112
- <Paper ref={ref} className={clsx(className, classes.root)}>
102
+ <Paper ref={ref} className={cx(className, classes.root)}>
113
103
  <span
114
104
  draggable
115
105
  className={classes.dragHandle}
@@ -117,7 +107,7 @@ const TrackLabel = React.forwardRef(
117
107
  onDragEnd={onDragEnd}
118
108
  data-testid={`dragHandle-${view.id}-${trackId}`}
119
109
  >
120
- <DragIcon className={classes.dragHandleIcon} />
110
+ <DragIcon className={classes.dragHandleIcon} fontSize="small" />
121
111
  </span>
122
112
  <IconButton
123
113
  onClick={() => view.hideTrack(trackId)}
@@ -125,7 +115,7 @@ const TrackLabel = React.forwardRef(
125
115
  title="close this track"
126
116
  color="secondary"
127
117
  >
128
- <CloseIcon />
118
+ <CloseIcon fontSize="small" />
129
119
  </IconButton>
130
120
  <Typography
131
121
  variant="body1"
@@ -141,7 +131,7 @@ const TrackLabel = React.forwardRef(
141
131
  data-testid="track_menu_icon"
142
132
  disabled={!items.length}
143
133
  >
144
- <MoreVertIcon />
134
+ <MoreVertIcon fontSize="small" />
145
135
  </IconButton>
146
136
  </Paper>
147
137
  <CascadingMenu
@@ -1,30 +1,25 @@
1
- import { makeStyles } from '@material-ui/core/styles'
1
+ import React, { useEffect, useRef, useState } from 'react'
2
+ import { makeStyles } from 'tss-react/mui'
2
3
  import { observer } from 'mobx-react'
3
4
  import { Instance } from 'mobx-state-tree'
4
- import React, { useEffect, useRef, useState } from 'react'
5
5
  import normalizeWheel from 'normalize-wheel'
6
6
 
7
- import {
8
- LinearGenomeViewStateModel,
9
- RESIZE_HANDLE_HEIGHT,
10
- SCALE_BAR_HEIGHT,
11
- } from '..'
7
+ import { LinearGenomeViewStateModel, SCALE_BAR_HEIGHT } from '..'
12
8
  import RubberBand from './RubberBand'
13
9
  import ScaleBar from './ScaleBar'
14
10
  import VerticalGuides from './VerticalGuides'
15
11
  import CenterLine from './CenterLine'
16
12
 
17
- const useStyles = makeStyles(theme => ({
13
+ const useStyles = makeStyles()({
18
14
  tracksContainer: {
19
15
  position: 'relative',
20
- borderRadius: theme.shape.borderRadius,
21
16
  overflow: 'hidden',
22
17
  },
23
18
  spacer: {
24
19
  position: 'relative',
25
- height: RESIZE_HANDLE_HEIGHT,
20
+ height: 3,
26
21
  },
27
- }))
22
+ })
28
23
 
29
24
  type LGV = Instance<LinearGenomeViewStateModel>
30
25
  type Timer = ReturnType<typeof setTimeout>
@@ -36,7 +31,7 @@ function TracksContainer({
36
31
  children: React.ReactNode
37
32
  model: LGV
38
33
  }) {
39
- const classes = useStyles()
34
+ const { classes } = useStyles()
40
35
  // refs are to store these variables to avoid repeated rerenders associated
41
36
  // with useState/setState
42
37
  const delta = useRef(0)
@@ -167,7 +162,7 @@ function TracksContainer({
167
162
  return (
168
163
  <div
169
164
  ref={ref}
170
- role="presentation"
165
+ data-testid="trackContainer"
171
166
  className={classes.tracksContainer}
172
167
  onMouseDown={mouseDown}
173
168
  onMouseUp={mouseUp}
@@ -1,14 +1,12 @@
1
+ import React from 'react'
1
2
  import {
2
3
  ContentBlock,
3
4
  ElidedBlock,
4
5
  InterRegionPaddingBlock,
5
6
  } from '@jbrowse/core/util/blockTypes'
6
- import { makeStyles } from '@material-ui/core/styles'
7
- import clsx from 'clsx'
7
+ import { makeStyles } from 'tss-react/mui'
8
8
  import { observer } from 'mobx-react'
9
- import { Instance } from 'mobx-state-tree'
10
- import React from 'react'
11
- import { LinearGenomeViewStateModel } from '..'
9
+ import { LinearGenomeViewModel } from '..'
12
10
  import {
13
11
  ContentBlock as ContentBlockComponent,
14
12
  ElidedBlock as ElidedBlockComponent,
@@ -17,9 +15,9 @@ import {
17
15
 
18
16
  import { makeTicks } from '../util'
19
17
 
20
- type LGV = Instance<LinearGenomeViewStateModel>
18
+ type LGV = LinearGenomeViewModel
21
19
 
22
- const useStyles = makeStyles(theme => ({
20
+ const useStyles = makeStyles()(theme => ({
23
21
  verticalGuidesZoomContainer: {
24
22
  position: 'absolute',
25
23
  height: '100%',
@@ -40,14 +38,14 @@ const useStyles = makeStyles(theme => ({
40
38
  width: 1,
41
39
  },
42
40
  majorTick: {
43
- background: theme.palette.text.hint,
41
+ background: theme.palette.text.secondary,
44
42
  },
45
43
  minorTick: {
46
44
  background: theme.palette.divider,
47
45
  },
48
46
  }))
49
47
  const RenderedVerticalGuides = observer(({ model }: { model: LGV }) => {
50
- const classes = useStyles()
48
+ const { classes, cx } = useStyles()
51
49
  return (
52
50
  <>
53
51
  {model.staticBlocks.map((block, index) => {
@@ -63,7 +61,7 @@ const RenderedVerticalGuides = observer(({ model }: { model: LGV }) => {
63
61
  return (
64
62
  <div
65
63
  key={tick.base}
66
- className={clsx(
64
+ className={cx(
67
65
  classes.tick,
68
66
  tick.type === 'major' || tick.type === 'labeledMajor'
69
67
  ? classes.majorTick
@@ -94,7 +92,7 @@ const RenderedVerticalGuides = observer(({ model }: { model: LGV }) => {
94
92
  )
95
93
  })
96
94
  function VerticalGuides({ model }: { model: LGV }) {
97
- const classes = useStyles()
95
+ const { classes } = useStyles()
98
96
  // find the block that needs pinning to the left side for context
99
97
  const offsetLeft = model.staticBlocks.offsetPx - model.offsetPx
100
98
  return (