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

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 (370) hide show
  1. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -1
  2. package/dist/BaseLinearDisplay/components/Block.js +0 -1
  3. package/dist/BaseLinearDisplay/components/BlockMsg.js +0 -1
  4. package/dist/BaseLinearDisplay/components/LinearBlocks.js +0 -1
  5. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -1
  6. package/dist/BaseLinearDisplay/components/TooLargeMessage.js +0 -1
  7. package/dist/BaseLinearDisplay/components/Tooltip.js +0 -1
  8. package/dist/BaseLinearDisplay/index.js +0 -1
  9. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -1
  10. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -1
  11. package/dist/BaseLinearDisplay/models/TrackHeightMixin.js +0 -1
  12. package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -1
  13. package/dist/BaseLinearDisplay/models/configSchema.js +0 -1
  14. package/dist/BaseLinearDisplay/models/renderSvg.js +0 -1
  15. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -1
  16. package/dist/BaseLinearDisplay/models/util.js +0 -1
  17. package/dist/BasicTrack/configSchema.js +0 -1
  18. package/dist/BasicTrack/index.js +0 -1
  19. package/dist/FeatureTrack/configSchema.js +0 -1
  20. package/dist/FeatureTrack/index.js +0 -1
  21. package/dist/LaunchLinearGenomeView/index.js +0 -1
  22. package/dist/LinearBareDisplay/configSchema.js +0 -1
  23. package/dist/LinearBareDisplay/index.js +0 -1
  24. package/dist/LinearBareDisplay/model.js +0 -1
  25. package/dist/LinearBasicDisplay/components/SetMaxHeight.js +0 -1
  26. package/dist/LinearBasicDisplay/configSchema.js +0 -1
  27. package/dist/LinearBasicDisplay/index.js +0 -1
  28. package/dist/LinearBasicDisplay/model.js +0 -1
  29. package/dist/LinearGenomeView/components/CenterLine.js +0 -1
  30. package/dist/LinearGenomeView/components/Cytobands.js +0 -1
  31. package/dist/LinearGenomeView/components/ExportSvgDialog.js +0 -1
  32. package/dist/LinearGenomeView/components/GetSequenceDialog.js +0 -1
  33. package/dist/LinearGenomeView/components/Gridlines.js +0 -1
  34. package/dist/LinearGenomeView/components/Header.js +0 -1
  35. package/dist/LinearGenomeView/components/ImportForm.js +0 -1
  36. package/dist/LinearGenomeView/components/LinearGenomeView.js +0 -1
  37. package/dist/LinearGenomeView/components/MiniControls.js +0 -1
  38. package/dist/LinearGenomeView/components/OverviewRubberband.js +0 -1
  39. package/dist/LinearGenomeView/components/OverviewScalebar.js +0 -1
  40. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -1
  41. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -1
  42. package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -1
  43. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -1
  44. package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -1
  45. package/dist/LinearGenomeView/components/Rubberband.js +0 -1
  46. package/dist/LinearGenomeView/components/RubberbandSpan.js +0 -1
  47. package/dist/LinearGenomeView/components/Scalebar.js +0 -1
  48. package/dist/LinearGenomeView/components/SearchBox.js +0 -1
  49. package/dist/LinearGenomeView/components/SearchResultsDialog.js +0 -1
  50. package/dist/LinearGenomeView/components/SearchResultsTable.js +0 -1
  51. package/dist/LinearGenomeView/components/SequenceSearchDialog.js +0 -1
  52. package/dist/LinearGenomeView/components/TrackContainer.js +0 -1
  53. package/dist/LinearGenomeView/components/TrackLabel.js +1 -2
  54. package/dist/LinearGenomeView/components/TrackLabelContainer.js +0 -1
  55. package/dist/LinearGenomeView/components/TrackRenderingContainer.js +3 -2
  56. package/dist/LinearGenomeView/components/TracksContainer.js +0 -1
  57. package/dist/LinearGenomeView/components/VerticalGuide.js +0 -1
  58. package/dist/LinearGenomeView/components/ZoomControls.js +0 -1
  59. package/dist/LinearGenomeView/components/hooks.js +0 -1
  60. package/dist/LinearGenomeView/components/util.js +0 -1
  61. package/dist/LinearGenomeView/index.js +0 -1
  62. package/dist/LinearGenomeView/model.js +0 -1
  63. package/dist/LinearGenomeView/svgcomponents/SVGBackground.js +2 -2
  64. package/dist/LinearGenomeView/svgcomponents/SVGHeader.js +6 -5
  65. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -1
  66. package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -1
  67. package/dist/LinearGenomeView/svgcomponents/SVGRuler.js +6 -4
  68. package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js +8 -5
  69. package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -1
  70. package/dist/LinearGenomeView/svgcomponents/SVGTracks.js +0 -1
  71. package/dist/LinearGenomeView/util.js +0 -1
  72. package/dist/index.js +0 -1
  73. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +0 -1
  74. package/esm/BaseLinearDisplay/components/Block.js +0 -1
  75. package/esm/BaseLinearDisplay/components/BlockMsg.js +0 -1
  76. package/esm/BaseLinearDisplay/components/LinearBlocks.js +0 -1
  77. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +0 -1
  78. package/esm/BaseLinearDisplay/components/TooLargeMessage.js +0 -1
  79. package/esm/BaseLinearDisplay/components/Tooltip.js +0 -1
  80. package/esm/BaseLinearDisplay/index.js +0 -1
  81. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +0 -1
  82. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js +0 -1
  83. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js +0 -1
  84. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js +0 -1
  85. package/esm/BaseLinearDisplay/models/configSchema.js +0 -1
  86. package/esm/BaseLinearDisplay/models/renderSvg.js +0 -1
  87. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +0 -1
  88. package/esm/BaseLinearDisplay/models/util.js +0 -1
  89. package/esm/BasicTrack/configSchema.js +0 -1
  90. package/esm/BasicTrack/index.js +0 -1
  91. package/esm/FeatureTrack/configSchema.js +0 -1
  92. package/esm/FeatureTrack/index.js +0 -1
  93. package/esm/LaunchLinearGenomeView/index.js +0 -1
  94. package/esm/LinearBareDisplay/configSchema.js +0 -1
  95. package/esm/LinearBareDisplay/index.js +0 -1
  96. package/esm/LinearBareDisplay/model.js +0 -1
  97. package/esm/LinearBasicDisplay/components/SetMaxHeight.js +0 -1
  98. package/esm/LinearBasicDisplay/configSchema.js +0 -1
  99. package/esm/LinearBasicDisplay/index.js +0 -1
  100. package/esm/LinearBasicDisplay/model.js +0 -1
  101. package/esm/LinearGenomeView/components/CenterLine.js +0 -1
  102. package/esm/LinearGenomeView/components/Cytobands.js +0 -1
  103. package/esm/LinearGenomeView/components/ExportSvgDialog.js +0 -1
  104. package/esm/LinearGenomeView/components/GetSequenceDialog.js +0 -1
  105. package/esm/LinearGenomeView/components/Gridlines.js +0 -1
  106. package/esm/LinearGenomeView/components/Header.js +0 -1
  107. package/esm/LinearGenomeView/components/ImportForm.js +0 -1
  108. package/esm/LinearGenomeView/components/LinearGenomeView.js +0 -1
  109. package/esm/LinearGenomeView/components/MiniControls.js +0 -1
  110. package/esm/LinearGenomeView/components/OverviewRubberband.js +0 -1
  111. package/esm/LinearGenomeView/components/OverviewScalebar.js +0 -1
  112. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js +0 -1
  113. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js +0 -1
  114. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js +0 -1
  115. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js +0 -1
  116. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js +0 -1
  117. package/esm/LinearGenomeView/components/Rubberband.js +0 -1
  118. package/esm/LinearGenomeView/components/RubberbandSpan.js +0 -1
  119. package/esm/LinearGenomeView/components/Scalebar.js +0 -1
  120. package/esm/LinearGenomeView/components/SearchBox.js +0 -1
  121. package/esm/LinearGenomeView/components/SearchResultsDialog.js +0 -1
  122. package/esm/LinearGenomeView/components/SearchResultsTable.js +0 -1
  123. package/esm/LinearGenomeView/components/SequenceSearchDialog.js +0 -1
  124. package/esm/LinearGenomeView/components/TrackContainer.js +0 -1
  125. package/esm/LinearGenomeView/components/TrackLabel.js +1 -2
  126. package/esm/LinearGenomeView/components/TrackLabelContainer.js +0 -1
  127. package/esm/LinearGenomeView/components/TrackRenderingContainer.js +4 -3
  128. package/esm/LinearGenomeView/components/TracksContainer.js +0 -1
  129. package/esm/LinearGenomeView/components/VerticalGuide.js +0 -1
  130. package/esm/LinearGenomeView/components/ZoomControls.js +0 -1
  131. package/esm/LinearGenomeView/components/hooks.js +0 -1
  132. package/esm/LinearGenomeView/components/util.js +0 -1
  133. package/esm/LinearGenomeView/index.js +0 -1
  134. package/esm/LinearGenomeView/model.js +0 -1
  135. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js +2 -2
  136. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +6 -5
  137. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +0 -1
  138. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +0 -1
  139. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +6 -4
  140. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +8 -5
  141. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +0 -1
  142. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +0 -1
  143. package/esm/LinearGenomeView/util.js +0 -1
  144. package/esm/index.js +0 -1
  145. package/package.json +4 -4
  146. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +0 -1
  147. package/dist/BaseLinearDisplay/components/Block.js.map +0 -1
  148. package/dist/BaseLinearDisplay/components/BlockMsg.js.map +0 -1
  149. package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +0 -1
  150. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +0 -1
  151. package/dist/BaseLinearDisplay/components/TooLargeMessage.js.map +0 -1
  152. package/dist/BaseLinearDisplay/components/Tooltip.js.map +0 -1
  153. package/dist/BaseLinearDisplay/index.js.map +0 -1
  154. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +0 -1
  155. package/dist/BaseLinearDisplay/models/FeatureDensityMixin.js.map +0 -1
  156. package/dist/BaseLinearDisplay/models/TrackHeightMixin.js.map +0 -1
  157. package/dist/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +0 -1
  158. package/dist/BaseLinearDisplay/models/configSchema.js.map +0 -1
  159. package/dist/BaseLinearDisplay/models/renderSvg.js.map +0 -1
  160. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +0 -1
  161. package/dist/BaseLinearDisplay/models/util.js.map +0 -1
  162. package/dist/BasicTrack/configSchema.js.map +0 -1
  163. package/dist/BasicTrack/index.js.map +0 -1
  164. package/dist/FeatureTrack/configSchema.js.map +0 -1
  165. package/dist/FeatureTrack/index.js.map +0 -1
  166. package/dist/LaunchLinearGenomeView/index.js.map +0 -1
  167. package/dist/LinearBareDisplay/configSchema.js.map +0 -1
  168. package/dist/LinearBareDisplay/index.js.map +0 -1
  169. package/dist/LinearBareDisplay/model.js.map +0 -1
  170. package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +0 -1
  171. package/dist/LinearBasicDisplay/configSchema.js.map +0 -1
  172. package/dist/LinearBasicDisplay/index.js.map +0 -1
  173. package/dist/LinearBasicDisplay/model.js.map +0 -1
  174. package/dist/LinearGenomeView/components/CenterLine.js.map +0 -1
  175. package/dist/LinearGenomeView/components/Cytobands.js.map +0 -1
  176. package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +0 -1
  177. package/dist/LinearGenomeView/components/GetSequenceDialog.js.map +0 -1
  178. package/dist/LinearGenomeView/components/Gridlines.js.map +0 -1
  179. package/dist/LinearGenomeView/components/Header.js.map +0 -1
  180. package/dist/LinearGenomeView/components/ImportForm.js.map +0 -1
  181. package/dist/LinearGenomeView/components/LinearGenomeView.js.map +0 -1
  182. package/dist/LinearGenomeView/components/MiniControls.js.map +0 -1
  183. package/dist/LinearGenomeView/components/OverviewRubberband.js.map +0 -1
  184. package/dist/LinearGenomeView/components/OverviewScalebar.js.map +0 -1
  185. package/dist/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +0 -1
  186. package/dist/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +0 -1
  187. package/dist/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +0 -1
  188. package/dist/LinearGenomeView/components/RefNameAutocomplete/index.js.map +0 -1
  189. package/dist/LinearGenomeView/components/RefNameAutocomplete/util.js.map +0 -1
  190. package/dist/LinearGenomeView/components/Rubberband.js.map +0 -1
  191. package/dist/LinearGenomeView/components/RubberbandSpan.js.map +0 -1
  192. package/dist/LinearGenomeView/components/Scalebar.js.map +0 -1
  193. package/dist/LinearGenomeView/components/SearchBox.js.map +0 -1
  194. package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +0 -1
  195. package/dist/LinearGenomeView/components/SearchResultsTable.js.map +0 -1
  196. package/dist/LinearGenomeView/components/SequenceSearchDialog.js.map +0 -1
  197. package/dist/LinearGenomeView/components/TrackContainer.js.map +0 -1
  198. package/dist/LinearGenomeView/components/TrackLabel.js.map +0 -1
  199. package/dist/LinearGenomeView/components/TrackLabelContainer.js.map +0 -1
  200. package/dist/LinearGenomeView/components/TrackRenderingContainer.js.map +0 -1
  201. package/dist/LinearGenomeView/components/TracksContainer.js.map +0 -1
  202. package/dist/LinearGenomeView/components/VerticalGuide.js.map +0 -1
  203. package/dist/LinearGenomeView/components/ZoomControls.js.map +0 -1
  204. package/dist/LinearGenomeView/components/hooks.js.map +0 -1
  205. package/dist/LinearGenomeView/components/util.js.map +0 -1
  206. package/dist/LinearGenomeView/index.js.map +0 -1
  207. package/dist/LinearGenomeView/model.js.map +0 -1
  208. package/dist/LinearGenomeView/svgcomponents/SVGBackground.js.map +0 -1
  209. package/dist/LinearGenomeView/svgcomponents/SVGHeader.js.map +0 -1
  210. package/dist/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +0 -1
  211. package/dist/LinearGenomeView/svgcomponents/SVGRegionSeparators.js.map +0 -1
  212. package/dist/LinearGenomeView/svgcomponents/SVGRuler.js.map +0 -1
  213. package/dist/LinearGenomeView/svgcomponents/SVGScalebar.js.map +0 -1
  214. package/dist/LinearGenomeView/svgcomponents/SVGTrackLabel.js.map +0 -1
  215. package/dist/LinearGenomeView/svgcomponents/SVGTracks.js.map +0 -1
  216. package/dist/LinearGenomeView/util.js.map +0 -1
  217. package/dist/index.js.map +0 -1
  218. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +0 -1
  219. package/esm/BaseLinearDisplay/components/Block.js.map +0 -1
  220. package/esm/BaseLinearDisplay/components/BlockMsg.js.map +0 -1
  221. package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +0 -1
  222. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +0 -1
  223. package/esm/BaseLinearDisplay/components/TooLargeMessage.js.map +0 -1
  224. package/esm/BaseLinearDisplay/components/Tooltip.js.map +0 -1
  225. package/esm/BaseLinearDisplay/index.js.map +0 -1
  226. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +0 -1
  227. package/esm/BaseLinearDisplay/models/FeatureDensityMixin.js.map +0 -1
  228. package/esm/BaseLinearDisplay/models/TrackHeightMixin.js.map +0 -1
  229. package/esm/BaseLinearDisplay/models/autorunFeatureDensityStats.js.map +0 -1
  230. package/esm/BaseLinearDisplay/models/configSchema.js.map +0 -1
  231. package/esm/BaseLinearDisplay/models/renderSvg.js.map +0 -1
  232. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +0 -1
  233. package/esm/BaseLinearDisplay/models/util.js.map +0 -1
  234. package/esm/BasicTrack/configSchema.js.map +0 -1
  235. package/esm/BasicTrack/index.js.map +0 -1
  236. package/esm/FeatureTrack/configSchema.js.map +0 -1
  237. package/esm/FeatureTrack/index.js.map +0 -1
  238. package/esm/LaunchLinearGenomeView/index.js.map +0 -1
  239. package/esm/LinearBareDisplay/configSchema.js.map +0 -1
  240. package/esm/LinearBareDisplay/index.js.map +0 -1
  241. package/esm/LinearBareDisplay/model.js.map +0 -1
  242. package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +0 -1
  243. package/esm/LinearBasicDisplay/configSchema.js.map +0 -1
  244. package/esm/LinearBasicDisplay/index.js.map +0 -1
  245. package/esm/LinearBasicDisplay/model.js.map +0 -1
  246. package/esm/LinearGenomeView/components/CenterLine.js.map +0 -1
  247. package/esm/LinearGenomeView/components/Cytobands.js.map +0 -1
  248. package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +0 -1
  249. package/esm/LinearGenomeView/components/GetSequenceDialog.js.map +0 -1
  250. package/esm/LinearGenomeView/components/Gridlines.js.map +0 -1
  251. package/esm/LinearGenomeView/components/Header.js.map +0 -1
  252. package/esm/LinearGenomeView/components/ImportForm.js.map +0 -1
  253. package/esm/LinearGenomeView/components/LinearGenomeView.js.map +0 -1
  254. package/esm/LinearGenomeView/components/MiniControls.js.map +0 -1
  255. package/esm/LinearGenomeView/components/OverviewRubberband.js.map +0 -1
  256. package/esm/LinearGenomeView/components/OverviewScalebar.js.map +0 -1
  257. package/esm/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.js.map +0 -1
  258. package/esm/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.js.map +0 -1
  259. package/esm/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.js.map +0 -1
  260. package/esm/LinearGenomeView/components/RefNameAutocomplete/index.js.map +0 -1
  261. package/esm/LinearGenomeView/components/RefNameAutocomplete/util.js.map +0 -1
  262. package/esm/LinearGenomeView/components/Rubberband.js.map +0 -1
  263. package/esm/LinearGenomeView/components/RubberbandSpan.js.map +0 -1
  264. package/esm/LinearGenomeView/components/Scalebar.js.map +0 -1
  265. package/esm/LinearGenomeView/components/SearchBox.js.map +0 -1
  266. package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +0 -1
  267. package/esm/LinearGenomeView/components/SearchResultsTable.js.map +0 -1
  268. package/esm/LinearGenomeView/components/SequenceSearchDialog.js.map +0 -1
  269. package/esm/LinearGenomeView/components/TrackContainer.js.map +0 -1
  270. package/esm/LinearGenomeView/components/TrackLabel.js.map +0 -1
  271. package/esm/LinearGenomeView/components/TrackLabelContainer.js.map +0 -1
  272. package/esm/LinearGenomeView/components/TrackRenderingContainer.js.map +0 -1
  273. package/esm/LinearGenomeView/components/TracksContainer.js.map +0 -1
  274. package/esm/LinearGenomeView/components/VerticalGuide.js.map +0 -1
  275. package/esm/LinearGenomeView/components/ZoomControls.js.map +0 -1
  276. package/esm/LinearGenomeView/components/hooks.js.map +0 -1
  277. package/esm/LinearGenomeView/components/util.js.map +0 -1
  278. package/esm/LinearGenomeView/index.js.map +0 -1
  279. package/esm/LinearGenomeView/model.js.map +0 -1
  280. package/esm/LinearGenomeView/svgcomponents/SVGBackground.js.map +0 -1
  281. package/esm/LinearGenomeView/svgcomponents/SVGHeader.js.map +0 -1
  282. package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js.map +0 -1
  283. package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js.map +0 -1
  284. package/esm/LinearGenomeView/svgcomponents/SVGRuler.js.map +0 -1
  285. package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js.map +0 -1
  286. package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js.map +0 -1
  287. package/esm/LinearGenomeView/svgcomponents/SVGTracks.js.map +0 -1
  288. package/esm/LinearGenomeView/util.js.map +0 -1
  289. package/esm/index.js.map +0 -1
  290. package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +0 -117
  291. package/src/BaseLinearDisplay/components/Block.tsx +0 -77
  292. package/src/BaseLinearDisplay/components/BlockMsg.tsx +0 -42
  293. package/src/BaseLinearDisplay/components/LinearBlocks.tsx +0 -119
  294. package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +0 -69
  295. package/src/BaseLinearDisplay/components/TooLargeMessage.tsx +0 -36
  296. package/src/BaseLinearDisplay/components/Tooltip.tsx +0 -107
  297. package/src/BaseLinearDisplay/index.ts +0 -16
  298. package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +0 -407
  299. package/src/BaseLinearDisplay/models/FeatureDensityMixin.tsx +0 -213
  300. package/src/BaseLinearDisplay/models/TrackHeightMixin.tsx +0 -59
  301. package/src/BaseLinearDisplay/models/autorunFeatureDensityStats.ts +0 -46
  302. package/src/BaseLinearDisplay/models/configSchema.ts +0 -60
  303. package/src/BaseLinearDisplay/models/renderSvg.tsx +0 -101
  304. package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +0 -320
  305. package/src/BaseLinearDisplay/models/util.ts +0 -67
  306. package/src/BasicTrack/configSchema.ts +0 -24
  307. package/src/BasicTrack/index.ts +0 -18
  308. package/src/FeatureTrack/configSchema.ts +0 -28
  309. package/src/FeatureTrack/index.ts +0 -18
  310. package/src/LaunchLinearGenomeView/index.ts +0 -66
  311. package/src/LinearBareDisplay/configSchema.ts +0 -28
  312. package/src/LinearBareDisplay/index.test.js +0 -34
  313. package/src/LinearBareDisplay/index.ts +0 -25
  314. package/src/LinearBareDisplay/model.ts +0 -54
  315. package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +0 -73
  316. package/src/LinearBasicDisplay/configSchema.ts +0 -28
  317. package/src/LinearBasicDisplay/index.ts +0 -25
  318. package/src/LinearBasicDisplay/model.ts +0 -215
  319. package/src/LinearGenomeView/README.md +0 -9
  320. package/src/LinearGenomeView/components/CenterLine.tsx +0 -65
  321. package/src/LinearGenomeView/components/Cytobands.tsx +0 -154
  322. package/src/LinearGenomeView/components/ExportSvgDialog.tsx +0 -149
  323. package/src/LinearGenomeView/components/GetSequenceDialog.tsx +0 -269
  324. package/src/LinearGenomeView/components/Gridlines.tsx +0 -119
  325. package/src/LinearGenomeView/components/Header.tsx +0 -126
  326. package/src/LinearGenomeView/components/ImportForm.tsx +0 -217
  327. package/src/LinearGenomeView/components/LinearGenomeView.test.tsx +0 -167
  328. package/src/LinearGenomeView/components/LinearGenomeView.tsx +0 -75
  329. package/src/LinearGenomeView/components/MiniControls.tsx +0 -54
  330. package/src/LinearGenomeView/components/OverviewRubberband.tsx +0 -219
  331. package/src/LinearGenomeView/components/OverviewScalebar.tsx +0 -351
  332. package/src/LinearGenomeView/components/RefNameAutocomplete/AutocompleteTextField.tsx +0 -53
  333. package/src/LinearGenomeView/components/RefNameAutocomplete/EndAdornment.tsx +0 -44
  334. package/src/LinearGenomeView/components/RefNameAutocomplete/HelpDialog.tsx +0 -69
  335. package/src/LinearGenomeView/components/RefNameAutocomplete/index.tsx +0 -160
  336. package/src/LinearGenomeView/components/RefNameAutocomplete/util.ts +0 -65
  337. package/src/LinearGenomeView/components/Rubberband.tsx +0 -89
  338. package/src/LinearGenomeView/components/RubberbandSpan.tsx +0 -99
  339. package/src/LinearGenomeView/components/Scalebar.test.tsx +0 -145
  340. package/src/LinearGenomeView/components/Scalebar.tsx +0 -199
  341. package/src/LinearGenomeView/components/SearchBox.tsx +0 -123
  342. package/src/LinearGenomeView/components/SearchResultsDialog.tsx +0 -57
  343. package/src/LinearGenomeView/components/SearchResultsTable.tsx +0 -121
  344. package/src/LinearGenomeView/components/SequenceSearchDialog.tsx +0 -136
  345. package/src/LinearGenomeView/components/TrackContainer.tsx +0 -92
  346. package/src/LinearGenomeView/components/TrackLabel.tsx +0 -123
  347. package/src/LinearGenomeView/components/TrackLabelContainer.tsx +0 -48
  348. package/src/LinearGenomeView/components/TrackRenderingContainer.tsx +0 -96
  349. package/src/LinearGenomeView/components/TracksContainer.tsx +0 -114
  350. package/src/LinearGenomeView/components/VerticalGuide.tsx +0 -37
  351. package/src/LinearGenomeView/components/ZoomControls.tsx +0 -62
  352. package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +0 -1520
  353. package/src/LinearGenomeView/components/hooks.ts +0 -306
  354. package/src/LinearGenomeView/components/util.ts +0 -76
  355. package/src/LinearGenomeView/hg38DisplayedRegions.json +0 -3187
  356. package/src/LinearGenomeView/index.test.ts +0 -993
  357. package/src/LinearGenomeView/index.ts +0 -17
  358. package/src/LinearGenomeView/model.ts +0 -1533
  359. package/src/LinearGenomeView/svgcomponents/SVGBackground.tsx +0 -21
  360. package/src/LinearGenomeView/svgcomponents/SVGHeader.tsx +0 -95
  361. package/src/LinearGenomeView/svgcomponents/SVGLinearGenomeView.tsx +0 -114
  362. package/src/LinearGenomeView/svgcomponents/SVGRegionSeparators.tsx +0 -31
  363. package/src/LinearGenomeView/svgcomponents/SVGRuler.tsx +0 -125
  364. package/src/LinearGenomeView/svgcomponents/SVGScalebar.tsx +0 -57
  365. package/src/LinearGenomeView/svgcomponents/SVGTrackLabel.tsx +0 -47
  366. package/src/LinearGenomeView/svgcomponents/SVGTracks.tsx +0 -67
  367. package/src/LinearGenomeView/util.test.ts +0 -33
  368. package/src/LinearGenomeView/util.ts +0 -182
  369. package/src/LinearGenomeView/volvoxDisplayedRegions.json +0 -16
  370. package/src/index.ts +0 -91
@@ -1,69 +0,0 @@
1
- import React from 'react'
2
- import { makeStyles } from 'tss-react/mui'
3
- import { observer } from 'mobx-react'
4
- import { getParent } from 'mobx-state-tree'
5
- import { LoadingEllipses } from '@jbrowse/core/ui'
6
-
7
- // icons
8
- import RefreshIcon from '@mui/icons-material/Refresh'
9
-
10
- // locals
11
- import BlockMsg from './BlockMsg'
12
-
13
- const useStyles = makeStyles()(theme => {
14
- const bg = theme.palette.action.disabledBackground
15
- return {
16
- loading: {
17
- paddingLeft: '0.6em',
18
- backgroundColor: theme.palette.background.default,
19
- backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 5px, ${bg} 5px, ${bg} 10px)`,
20
- textAlign: 'center',
21
- },
22
- }
23
- })
24
-
25
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
- const LoadingMessage = observer(({ model }: { model: any }) => {
27
- const { classes } = useStyles()
28
- const { status: blockStatus } = model
29
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
- const { message: displayStatus } = getParent<any>(model, 2)
31
- const status = displayStatus || blockStatus
32
- return (
33
- <div className={classes.loading}>
34
- <LoadingEllipses message={status} />
35
- </div>
36
- )
37
- })
38
-
39
- const ServerSideRenderedBlockContent = observer(function ({
40
- model,
41
- }: {
42
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
- model: any
44
- }) {
45
- if (model.error) {
46
- return (
47
- <BlockMsg
48
- message={`${model.error}`}
49
- severity="error"
50
- buttonText="reload"
51
- icon={<RefreshIcon />}
52
- action={model.reload}
53
- />
54
- )
55
- } else if (model.message) {
56
- // the message can be a fully rendered react component, e.g. the region too large message
57
- return React.isValidElement(model.message) ? (
58
- model.message
59
- ) : (
60
- <BlockMsg message={`${model.message}`} severity="info" />
61
- )
62
- } else if (!model.filled) {
63
- return <LoadingMessage model={model} />
64
- } else {
65
- return model.reactElement
66
- }
67
- })
68
-
69
- export default ServerSideRenderedBlockContent
@@ -1,36 +0,0 @@
1
- import React from 'react'
2
- import { FeatureDensityStats } from '@jbrowse/core/data_adapters/BaseAdapter'
3
-
4
- // locals
5
- import BlockMsg from '../components/BlockMsg'
6
-
7
- function TooLargeMessage({
8
- model,
9
- }: {
10
- model: {
11
- regionTooLargeReason: string
12
- featureDensityStats?: FeatureDensityStats
13
- setFeatureDensityStatsLimit: (s?: FeatureDensityStats) => void
14
- reload: () => void
15
- }
16
- }) {
17
- const { regionTooLargeReason } = model
18
- return (
19
- <BlockMsg
20
- severity="warning"
21
- action={() => {
22
- model.setFeatureDensityStatsLimit(model.featureDensityStats)
23
- model.reload()
24
- }}
25
- buttonText="Force load"
26
- message={[
27
- regionTooLargeReason,
28
- 'Zoom in to see features or force load (may be slow)',
29
- ]
30
- .filter(f => !!f)
31
- .join('. ')}
32
- />
33
- )
34
- }
35
-
36
- export default TooLargeMessage
@@ -1,107 +0,0 @@
1
- import React, { useState, useMemo } from 'react'
2
- import { getConf } from '@jbrowse/core/configuration'
3
- import { SanitizedHTML } from '@jbrowse/core/ui'
4
- import { observer } from 'mobx-react'
5
- import { Portal, alpha } from '@mui/material'
6
- import { makeStyles } from 'tss-react/mui'
7
- import { usePopper } from 'react-popper'
8
-
9
- // locals
10
- import { BaseLinearDisplayModel } from '../models/BaseLinearDisplayModel'
11
-
12
- function round(value: number) {
13
- return Math.round(value * 1e5) / 1e5
14
- }
15
- const useStyles = makeStyles()(theme => ({
16
- // these styles come from
17
- // https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
18
- tooltip: {
19
- pointerEvents: 'none',
20
- backgroundColor: alpha(theme.palette.grey[700], 0.9),
21
- borderRadius: theme.shape.borderRadius,
22
- color: theme.palette.common.white,
23
- fontFamily: theme.typography.fontFamily,
24
- padding: '4px 8px',
25
- fontSize: theme.typography.pxToRem(12),
26
- lineHeight: `${round(14 / 10)}em`,
27
- maxWidth: 300,
28
- wordWrap: 'break-word',
29
- },
30
- }))
31
-
32
- const TooltipContents = React.forwardRef<
33
- HTMLDivElement,
34
- { message: React.ReactNode | string }
35
- >(({ message }: { message: React.ReactNode | string }, ref) => {
36
- return (
37
- <div ref={ref}>
38
- {React.isValidElement(message) ? (
39
- message
40
- ) : message ? (
41
- <SanitizedHTML html={String(message)} />
42
- ) : null}
43
- </div>
44
- )
45
- })
46
-
47
- type Coord = [number, number]
48
- const Tooltip = observer(
49
- ({
50
- model,
51
- clientMouseCoord,
52
- }: {
53
- model: BaseLinearDisplayModel
54
- clientMouseCoord: Coord
55
- }) => {
56
- const { classes } = useStyles()
57
- const { featureUnderMouse } = model
58
- const [width, setWidth] = useState(0)
59
- const [popperElt, setPopperElt] = useState<HTMLDivElement | null>(null)
60
-
61
- // must be memoized a la https://github.com/popperjs/react-popper/issues/391
62
- const virtElement = useMemo(
63
- () => ({
64
- getBoundingClientRect: () => {
65
- const x = clientMouseCoord[0] + width / 2 + 20
66
- const y = clientMouseCoord[1]
67
- return {
68
- top: y,
69
- left: x,
70
- bottom: y,
71
- right: x,
72
- width: 0,
73
- height: 0,
74
- x,
75
- y,
76
- toJSON() {},
77
- }
78
- },
79
- }),
80
- [clientMouseCoord, width],
81
- )
82
- const { styles, attributes } = usePopper(virtElement, popperElt)
83
-
84
- const contents = featureUnderMouse
85
- ? getConf(model, 'mouseover', { feature: featureUnderMouse })
86
- : undefined
87
-
88
- return featureUnderMouse && contents ? (
89
- <Portal>
90
- <div
91
- ref={setPopperElt}
92
- className={classes.tooltip}
93
- // zIndex needed to go over widget drawer
94
- style={{ ...styles.popper, zIndex: 100000 }}
95
- {...attributes.popper}
96
- >
97
- <TooltipContents
98
- ref={elt => setWidth(elt?.getBoundingClientRect().width || 0)}
99
- message={contents}
100
- />
101
- </div>
102
- </Portal>
103
- ) : null
104
- },
105
- )
106
-
107
- export default Tooltip
@@ -1,16 +0,0 @@
1
- export { default as baseLinearDisplayConfigSchema } from './models/configSchema'
2
- export type { BlockModel } from './models/serverSideRenderedBlock'
3
- export { BaseLinearDisplay } from './models/BaseLinearDisplayModel'
4
- export type {
5
- ExportSvgDisplayOptions,
6
- BaseLinearDisplayModel,
7
- BaseLinearDisplayStateModel,
8
- } from './models/BaseLinearDisplayModel'
9
- export {
10
- default as BaseLinearDisplayComponent,
11
- Tooltip,
12
- BlockMsg,
13
- } from './components/BaseLinearDisplay'
14
- export { default as TrackHeightMixin } from './models/TrackHeightMixin'
15
- export { default as FeatureDensityMixin } from './models/FeatureDensityMixin'
16
- export { default as TooLargeMessage } from './components/TooLargeMessage'
@@ -1,407 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import React from 'react'
3
- import { ThemeOptions } from '@mui/material'
4
- import { BaseDisplay } from '@jbrowse/core/pluggableElementTypes/models'
5
- import { ConfigurationReference } from '@jbrowse/core/configuration'
6
- import { MenuItem } from '@jbrowse/core/ui'
7
- import {
8
- getContainingView,
9
- getContainingTrack,
10
- getSession,
11
- isSelectionContainer,
12
- isSessionModelWithWidgets,
13
- isFeature,
14
- Feature,
15
- } from '@jbrowse/core/util'
16
- import { BaseBlock } from '@jbrowse/core/util/blockTypes'
17
- import CompositeMap from '@jbrowse/core/util/compositeMap'
18
- import { getParentRenderProps } from '@jbrowse/core/util/tracks'
19
- import { autorun } from 'mobx'
20
- import { addDisposer, isAlive, types, Instance } from 'mobx-state-tree'
21
-
22
- // icons
23
- import MenuOpenIcon from '@mui/icons-material/MenuOpen'
24
-
25
- // locals
26
- import { LinearGenomeViewModel, ExportSvgOptions } from '../../LinearGenomeView'
27
- import { Tooltip } from '../components/BaseLinearDisplay'
28
- import BlockState from './serverSideRenderedBlock'
29
- import configSchema from './configSchema'
30
- import renderBaseLinearDisplaySvg from './renderSvg'
31
- import TrackHeightMixin from './TrackHeightMixin'
32
- import FeatureDensityMixin from './FeatureDensityMixin'
33
-
34
- type LGV = LinearGenomeViewModel
35
-
36
- export interface Layout {
37
- minX: number
38
- minY: number
39
- maxX: number
40
- maxY: number
41
- name: string
42
- }
43
-
44
- type LayoutRecord = [number, number, number, number]
45
-
46
- export interface ExportSvgDisplayOptions extends ExportSvgOptions {
47
- overrideHeight: number
48
- theme: ThemeOptions
49
- }
50
-
51
- /**
52
- * #stateModel BaseLinearDisplay
53
- * #category display
54
- * extends `BaseDisplay`
55
- */
56
- function stateModelFactory() {
57
- return types
58
- .compose(
59
- 'BaseLinearDisplay',
60
- BaseDisplay,
61
- TrackHeightMixin(),
62
- FeatureDensityMixin(),
63
- types.model({
64
- /**
65
- * #property
66
- * updated via autorun
67
- */
68
- blockState: types.map(BlockState),
69
- /**
70
- * #property
71
- */
72
- configuration: ConfigurationReference(configSchema),
73
- }),
74
- )
75
- .volatile(() => ({
76
- featureIdUnderMouse: undefined as undefined | string,
77
- contextMenuFeature: undefined as undefined | Feature,
78
- }))
79
- .views(self => ({
80
- /**
81
- * #getter
82
- */
83
- get blockType(): 'staticBlocks' | 'dynamicBlocks' {
84
- return 'staticBlocks'
85
- },
86
- /**
87
- * #getter
88
- */
89
- get blockDefinitions() {
90
- const view = getContainingView(self) as LGV
91
- if (!view.initialized) {
92
- throw new Error('view not initialized yet')
93
- }
94
- return view[this.blockType]
95
- },
96
- }))
97
- .views(self => ({
98
- /**
99
- * #getter
100
- * how many milliseconds to wait for the display to
101
- * "settle" before re-rendering a block
102
- */
103
- get renderDelay() {
104
- return 50
105
- },
106
-
107
- /**
108
- * #getter
109
- */
110
- get TooltipComponent(): React.FC<any> {
111
- return Tooltip as unknown as React.FC
112
- },
113
-
114
- /**
115
- * #getter
116
- * returns a string feature ID if the globally-selected object
117
- * is probably a feature
118
- */
119
- get selectedFeatureId() {
120
- if (isAlive(self)) {
121
- const { selection } = getSession(self)
122
- // does it quack like a feature?
123
- if (isFeature(selection)) {
124
- return selection.id()
125
- }
126
- }
127
- return undefined
128
- },
129
- /**
130
- * #getter
131
- * if a display-level message should be displayed instead of the blocks,
132
- * make this return a react component
133
- */
134
- get DisplayMessageComponent() {
135
- return undefined as undefined | React.FC<any>
136
- },
137
- }))
138
- .views(self => ({
139
- /**
140
- * #getter
141
- * a CompositeMap of `featureId -> feature obj` that
142
- * just looks in all the block data for that feature
143
- */
144
- get features() {
145
- const featureMaps = []
146
- for (const block of self.blockState.values()) {
147
- if (block?.features) {
148
- featureMaps.push(block.features)
149
- }
150
- }
151
- return new CompositeMap(featureMaps)
152
- },
153
-
154
- /**
155
- * #getter
156
- */
157
- get featureUnderMouse() {
158
- const feat = self.featureIdUnderMouse
159
- return feat ? this.features.get(feat) : undefined
160
- },
161
-
162
- /**
163
- * #getter
164
- */
165
- getFeatureOverlapping(
166
- blockKey: string,
167
- x: number,
168
- y: number,
169
- ): string | undefined {
170
- return self.blockState.get(blockKey)?.layout?.getByCoord(x, y)
171
- },
172
-
173
- /**
174
- * #getter
175
- */
176
- getFeatureByID(blockKey: string, id: string): LayoutRecord | undefined {
177
- return self.blockState.get(blockKey)?.layout?.getByID(id)
178
- },
179
-
180
- /**
181
- * #getter
182
- */
183
- searchFeatureByID(id: string): LayoutRecord | undefined {
184
- let ret
185
- self.blockState.forEach(block => {
186
- const val = block?.layout?.getByID(id)
187
- if (val) {
188
- ret = val
189
- }
190
- })
191
- return ret
192
- },
193
- }))
194
-
195
- .actions(self => ({
196
- /**
197
- * #action
198
- */
199
- addBlock(key: string, block: BaseBlock) {
200
- self.blockState.set(
201
- key,
202
- BlockState.create({
203
- key,
204
- region: block.toRegion(),
205
- }),
206
- )
207
- },
208
-
209
- /**
210
- * #action
211
- */
212
- deleteBlock(key: string) {
213
- self.blockState.delete(key)
214
- },
215
- /**
216
- * #action
217
- */
218
- selectFeature(feature: Feature) {
219
- const session = getSession(self)
220
- if (isSessionModelWithWidgets(session)) {
221
- const featureWidget = session.addWidget(
222
- 'BaseFeatureWidget',
223
- 'baseFeature',
224
- {
225
- view: getContainingView(self),
226
- track: getContainingTrack(self),
227
- featureData: feature.toJSON(),
228
- },
229
- )
230
-
231
- session.showWidget(featureWidget)
232
- }
233
- if (isSelectionContainer(session)) {
234
- session.setSelection(feature)
235
- }
236
- },
237
- /**
238
- * #action
239
- */
240
- clearFeatureSelection() {
241
- getSession(self).clearSelection()
242
- },
243
- /**
244
- * #action
245
- */
246
- setFeatureIdUnderMouse(feature?: string) {
247
- self.featureIdUnderMouse = feature
248
- },
249
-
250
- /**
251
- * #action
252
- */
253
- setContextMenuFeature(feature?: Feature) {
254
- self.contextMenuFeature = feature
255
- },
256
- }))
257
-
258
- .actions(self => {
259
- const { reload: superReload } = self
260
-
261
- return {
262
- /**
263
- * #action
264
- */
265
- async reload() {
266
- self.setError()
267
- self.setCurrStatsBpPerPx(0)
268
- self.clearFeatureDensityStats()
269
- ;[...self.blockState.values()].map(val => val.doReload())
270
- superReload()
271
- },
272
- }
273
- })
274
-
275
- .views(self => ({
276
- /**
277
- * #method
278
- */
279
- trackMenuItems(): MenuItem[] {
280
- return []
281
- },
282
-
283
- /**
284
- * #method
285
- */
286
- contextMenuItems(): MenuItem[] {
287
- return [
288
- ...(self.contextMenuFeature
289
- ? [
290
- {
291
- label: 'Open feature details',
292
- icon: MenuOpenIcon,
293
- onClick: () => {
294
- if (self.contextMenuFeature) {
295
- self.selectFeature(self.contextMenuFeature)
296
- }
297
- },
298
- },
299
- ]
300
- : []),
301
- ]
302
- },
303
- /**
304
- * #method
305
- */
306
- renderProps() {
307
- return {
308
- ...getParentRenderProps(self),
309
- notReady: !self.featureDensityStatsReady,
310
- rpcDriverName: self.rpcDriverName,
311
- displayModel: self,
312
- onFeatureClick(_: unknown, featureId?: string) {
313
- const f = featureId || self.featureIdUnderMouse
314
- if (!f) {
315
- self.clearFeatureSelection()
316
- } else {
317
- const feature = self.features.get(f)
318
- if (feature) {
319
- self.selectFeature(feature)
320
- }
321
- }
322
- },
323
- onClick() {
324
- self.clearFeatureSelection()
325
- },
326
- // similar to click but opens a menu with further options
327
- onFeatureContextMenu(_: unknown, featureId?: string) {
328
- const f = featureId || self.featureIdUnderMouse
329
- if (!f) {
330
- self.clearFeatureSelection()
331
- } else {
332
- // feature id under mouse passed to context menu
333
- self.setContextMenuFeature(self.features.get(f))
334
- }
335
- },
336
-
337
- onMouseMove(_: unknown, featureId?: string) {
338
- self.setFeatureIdUnderMouse(featureId)
339
- },
340
-
341
- onMouseLeave(_: unknown) {
342
- self.setFeatureIdUnderMouse(undefined)
343
- },
344
-
345
- onContextMenu() {
346
- self.setContextMenuFeature(undefined)
347
- self.clearFeatureSelection()
348
- },
349
- }
350
- },
351
- }))
352
- .actions(self => ({
353
- /**
354
- * #method
355
- */
356
- async renderSvg(opts: ExportSvgDisplayOptions) {
357
- return renderBaseLinearDisplaySvg(self as BaseLinearDisplayModel, opts)
358
- },
359
- afterAttach() {
360
- // watch the parent's blocks to update our block state when they change,
361
- // then we recreate the blocks on our own model (creating and deleting to
362
- // match the parent blocks)
363
- addDisposer(
364
- self,
365
- autorun(() => {
366
- const blocksPresent: { [key: string]: boolean } = {}
367
- const view = getContainingView(self) as LGV
368
- if (!view.initialized) {
369
- return
370
- }
371
- self.blockDefinitions.contentBlocks.forEach(block => {
372
- blocksPresent[block.key] = true
373
- if (!self.blockState.has(block.key)) {
374
- self.addBlock(block.key, block)
375
- }
376
- })
377
- self.blockState.forEach((_, key) => {
378
- if (!blocksPresent[key]) {
379
- self.deleteBlock(key)
380
- }
381
- })
382
- }),
383
- )
384
- },
385
- }))
386
- .preProcessSnapshot(snap => {
387
- if (!snap) {
388
- return snap
389
- }
390
- // rewrite "height" from older snapshots to "heightPreConfig", this allows
391
- // us to maintain a height "getter" going forward
392
- // @ts-expect-error
393
- const { height, ...rest } = snap
394
- return { heightPreConfig: height, ...rest }
395
- })
396
- .postProcessSnapshot(self => {
397
- // xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
398
- const r = self as Omit<typeof self, symbol>
399
- const { blockState, ...rest } = r
400
- return rest
401
- })
402
- }
403
-
404
- export const BaseLinearDisplay = stateModelFactory()
405
-
406
- export type BaseLinearDisplayStateModel = typeof BaseLinearDisplay
407
- export type BaseLinearDisplayModel = Instance<BaseLinearDisplayStateModel>