@jbrowse/core 2.17.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +1 -2
  2. package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +7 -13
  3. package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +1 -2
  4. package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +20 -25
  5. package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -3
  6. package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +3 -7
  7. package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +1 -2
  8. package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +5 -8
  9. package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -3
  10. package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +7 -10
  11. package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +1 -2
  12. package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +25 -55
  13. package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +3 -4
  14. package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +16 -34
  15. package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +1 -2
  16. package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +2 -6
  17. package/BaseFeatureWidget/BaseFeatureDetail/Position.d.ts +2 -3
  18. package/BaseFeatureWidget/BaseFeatureDetail/Position.js +2 -5
  19. package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +1 -2
  20. package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +3 -5
  21. package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +1 -2
  22. package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +3 -5
  23. package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +4 -5
  24. package/BaseFeatureWidget/BaseFeatureDetail/index.js +6 -14
  25. package/BaseFeatureWidget/BaseFeatureDetail/util.js +4 -13
  26. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.d.ts +10 -0
  27. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.js +48 -0
  28. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -4
  29. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +33 -41
  30. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +3 -4
  31. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +30 -29
  32. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceName.d.ts +8 -0
  33. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceName.js +28 -0
  34. package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +2 -10
  35. package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +11 -85
  36. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +1 -2
  37. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +6 -25
  38. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +3 -4
  39. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +11 -46
  40. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.d.ts +3 -4
  41. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +101 -96
  42. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +2 -3
  43. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +49 -53
  44. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +2 -3
  45. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +20 -55
  46. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +2 -2
  47. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +1 -2
  48. package/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +2 -56
  49. package/BaseFeatureWidget/SequenceFeatureDetails/model.js +4 -66
  50. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +4 -5
  51. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +6 -9
  52. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.d.ts +3 -4
  53. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.js +6 -7
  54. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.d.ts +3 -4
  55. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.js +5 -9
  56. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.d.ts +3 -4
  57. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.js +2 -4
  58. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.d.ts +2 -3
  59. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +3 -10
  60. package/BaseFeatureWidget/SequenceFeatureDetails/types.d.ts +8 -0
  61. package/BaseFeatureWidget/SequenceFeatureDetails/types.js +2 -0
  62. package/BaseFeatureWidget/SequenceFeatureDetails/util.js +1 -5
  63. package/BaseFeatureWidget/stateModelFactory.d.ts +2 -93
  64. package/BaseFeatureWidget/stateModelFactory.js +3 -73
  65. package/BaseFeatureWidget/types.d.ts +3 -3
  66. package/BaseFeatureWidget/util.js +0 -4
  67. package/CorePlugin.d.ts +1 -1
  68. package/CorePlugin.js +19 -12
  69. package/Plugin.d.ts +2 -5
  70. package/Plugin.js +0 -3
  71. package/PluginLoader.d.ts +1 -1
  72. package/PluginLoader.js +2 -19
  73. package/PluginManager.d.ts +17 -32
  74. package/PluginManager.js +15 -41
  75. package/ReExports/DataGrid.js +0 -1
  76. package/ReExports/list.d.ts +0 -5
  77. package/ReExports/list.js +3 -5
  78. package/ReExports/modules.d.ts +26 -22
  79. package/ReExports/modules.js +45 -44
  80. package/TextSearch/BaseResults.d.ts +4 -4
  81. package/TextSearch/TextSearchManager.d.ts +4 -16
  82. package/TextSearch/TextSearchManager.js +1 -13
  83. package/assemblyManager/assembly.d.ts +5 -100
  84. package/assemblyManager/assembly.js +30 -146
  85. package/assemblyManager/assemblyConfigSchema.d.ts +1 -34
  86. package/assemblyManager/assemblyConfigSchema.js +12 -46
  87. package/assemblyManager/assemblyManager.d.ts +7 -57
  88. package/assemblyManager/assemblyManager.js +2 -57
  89. package/configuration/configurationSchema.d.ts +4 -4
  90. package/configuration/configurationSchema.js +2 -14
  91. package/configuration/configurationSlot.d.ts +2 -13
  92. package/configuration/configurationSlot.js +2 -32
  93. package/configuration/index.d.ts +2 -2
  94. package/configuration/index.js +2 -2
  95. package/configuration/types.d.ts +2 -3
  96. package/configuration/util.d.ts +1 -25
  97. package/configuration/util.js +19 -56
  98. package/data_adapters/BaseAdapter/BaseAdapter.d.ts +4 -14
  99. package/data_adapters/BaseAdapter/BaseAdapter.js +1 -10
  100. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +5 -114
  101. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +3 -79
  102. package/data_adapters/BaseAdapter/BaseOptions.d.ts +2 -2
  103. package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +2 -2
  104. package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +3 -6
  105. package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +3 -3
  106. package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +3 -3
  107. package/data_adapters/BaseAdapter/index.d.ts +4 -4
  108. package/data_adapters/BaseAdapter/types.d.ts +2 -2
  109. package/data_adapters/BaseAdapter/util.d.ts +6 -6
  110. package/data_adapters/CytobandAdapter/CytobandAdapter.d.ts +1 -1
  111. package/data_adapters/CytobandAdapter/CytobandAdapter.js +2 -6
  112. package/data_adapters/CytobandAdapter/configSchema.d.ts +0 -3
  113. package/data_adapters/CytobandAdapter/configSchema.js +1 -7
  114. package/data_adapters/CytobandAdapter/index.d.ts +1 -1
  115. package/data_adapters/CytobandAdapter/index.js +21 -8
  116. package/data_adapters/dataAdapterCache.d.ts +4 -22
  117. package/data_adapters/dataAdapterCache.js +2 -28
  118. package/data_adapters/util.d.ts +1 -0
  119. package/data_adapters/util.js +10 -0
  120. package/package.json +8 -11
  121. package/pluggableElementTypes/AdapterType.d.ts +2 -2
  122. package/pluggableElementTypes/AddTrackWorkflowType.d.ts +2 -2
  123. package/pluggableElementTypes/ConnectionType.d.ts +3 -3
  124. package/pluggableElementTypes/DisplayType.d.ts +3 -9
  125. package/pluggableElementTypes/InternetAccountType.d.ts +2 -2
  126. package/pluggableElementTypes/PluggableElementBase.d.ts +1 -1
  127. package/pluggableElementTypes/PluggableElementBase.js +2 -2
  128. package/pluggableElementTypes/RpcMethodType.d.ts +5 -11
  129. package/pluggableElementTypes/RpcMethodType.js +7 -19
  130. package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +9 -0
  131. package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.js +35 -0
  132. package/pluggableElementTypes/TextSearchAdapterType.d.ts +2 -2
  133. package/pluggableElementTypes/TrackType.d.ts +3 -3
  134. package/pluggableElementTypes/ViewType.d.ts +3 -3
  135. package/pluggableElementTypes/WidgetType.d.ts +4 -3
  136. package/pluggableElementTypes/index.d.ts +11 -11
  137. package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -29
  138. package/pluggableElementTypes/models/BaseConnectionModelFactory.js +1 -28
  139. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +3 -83
  140. package/pluggableElementTypes/models/BaseDisplayModel.js +2 -69
  141. package/pluggableElementTypes/models/BaseTrackModel.d.ts +4 -46
  142. package/pluggableElementTypes/models/BaseTrackModel.js +9 -63
  143. package/pluggableElementTypes/models/BaseViewModel.d.ts +2 -42
  144. package/pluggableElementTypes/models/BaseViewModel.js +2 -38
  145. package/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -119
  146. package/pluggableElementTypes/models/InternetAccountModel.js +3 -123
  147. package/pluggableElementTypes/models/baseConnectionConfig.d.ts +0 -6
  148. package/pluggableElementTypes/models/baseConnectionConfig.js +1 -13
  149. package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +0 -15
  150. package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -23
  151. package/pluggableElementTypes/models/baseTrackConfig.d.ts +2 -53
  152. package/pluggableElementTypes/models/baseTrackConfig.js +1 -58
  153. package/pluggableElementTypes/renderers/BoxRendererType.d.ts +7 -15
  154. package/pluggableElementTypes/renderers/BoxRendererType.js +3 -14
  155. package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +4 -4
  156. package/pluggableElementTypes/renderers/CircularChordRendererType.js +3 -8
  157. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +6 -21
  158. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +2 -25
  159. package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +5 -47
  160. package/pluggableElementTypes/renderers/FeatureRendererType.js +15 -68
  161. package/pluggableElementTypes/renderers/RendererType.d.ts +5 -9
  162. package/pluggableElementTypes/renderers/RendererType.js +3 -7
  163. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +3 -4
  164. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +11 -76
  165. package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +2 -3
  166. package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +10 -74
  167. package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +9 -49
  168. package/pluggableElementTypes/renderers/ServerSideRendererType.js +10 -60
  169. package/pluggableElementTypes/renderers/index.d.ts +1 -1
  170. package/pluggableElementTypes/renderers/util/serializableFilterChain.js +1 -3
  171. package/rpc/BaseRpcDriver.d.ts +3 -4
  172. package/rpc/BaseRpcDriver.js +20 -80
  173. package/rpc/MainThreadRpcDriver.d.ts +3 -7
  174. package/rpc/MainThreadRpcDriver.js +0 -5
  175. package/rpc/RpcManager.d.ts +3 -3
  176. package/rpc/RpcManager.js +2 -4
  177. package/rpc/WebWorkerRpcDriver.d.ts +3 -2
  178. package/rpc/WebWorkerRpcDriver.js +2 -13
  179. package/rpc/baseRpcConfig.d.ts +0 -3
  180. package/rpc/baseRpcConfig.js +1 -7
  181. package/rpc/configSchema.d.ts +0 -6
  182. package/rpc/configSchema.js +2 -11
  183. package/rpc/mainThreadRpcConfig.js +1 -7
  184. package/rpc/methods/CoreFreeResources.d.ts +0 -6
  185. package/rpc/methods/CoreFreeResources.js +2 -9
  186. package/rpc/methods/CoreGetFeatureDensityStats.d.ts +4 -5
  187. package/rpc/methods/CoreGetFeatureDensityStats.js +1 -1
  188. package/rpc/methods/CoreGetFeatureDetails.d.ts +2 -7
  189. package/rpc/methods/CoreGetFeatureDetails.js +0 -5
  190. package/rpc/methods/CoreGetFeatures.d.ts +5 -5
  191. package/rpc/methods/CoreGetFeatures.js +4 -5
  192. package/rpc/methods/CoreGetFileInfo.d.ts +1 -2
  193. package/rpc/methods/CoreGetFileInfo.js +1 -1
  194. package/rpc/methods/CoreGetMetadata.d.ts +1 -2
  195. package/rpc/methods/CoreGetMetadata.js +1 -1
  196. package/rpc/methods/CoreGetRefNames.d.ts +1 -2
  197. package/rpc/methods/CoreGetRefNames.js +1 -1
  198. package/rpc/methods/CoreRender.d.ts +2 -6
  199. package/rpc/methods/CoreRender.js +5 -7
  200. package/rpc/methods/util.d.ts +3 -3
  201. package/rpc/methods/util.js +0 -1
  202. package/rpc/webWorkerRpcConfig.js +1 -7
  203. package/stories/JBrowseCore.stories.d.ts +1 -1
  204. package/stories/JBrowseCore.stories.js +3 -3
  205. package/stories/examples/WithSequencePanel.d.ts +6 -7
  206. package/stories/examples/WithSequencePanel.js +9 -9
  207. package/tsconfig.build.tsbuildinfo +1 -1
  208. package/ui/AppLogo.d.ts +2 -3
  209. package/ui/AppLogo.js +2 -7
  210. package/ui/AssemblySelector.d.ts +5 -5
  211. package/ui/AssemblySelector.js +11 -36
  212. package/ui/BaseTooltip.d.ts +1 -2
  213. package/ui/BaseTooltip.js +10 -17
  214. package/ui/CascadingMenu.d.ts +3 -4
  215. package/ui/CascadingMenu.js +18 -57
  216. package/ui/CascadingMenuButton.d.ts +2 -3
  217. package/ui/CascadingMenuButton.js +18 -42
  218. package/ui/ColorPicker.d.ts +3 -4
  219. package/ui/ColorPicker.js +33 -37
  220. package/ui/Dialog.d.ts +2 -3
  221. package/ui/Dialog.js +15 -27
  222. package/ui/DraggableDialog.d.ts +5 -0
  223. package/ui/DraggableDialog.js +32 -0
  224. package/ui/DropDownMenu.d.ts +2 -3
  225. package/ui/DropDownMenu.js +10 -36
  226. package/ui/EditableTypography.d.ts +2 -3
  227. package/ui/EditableTypography.js +30 -59
  228. package/ui/ErrorBoundary.d.ts +3 -2
  229. package/ui/ErrorBoundary.js +3 -25
  230. package/ui/ErrorMessage.d.ts +1 -2
  231. package/ui/ErrorMessage.js +27 -34
  232. package/ui/ErrorMessageStackTraceDialog.d.ts +1 -2
  233. package/ui/ErrorMessageStackTraceDialog.js +13 -54
  234. package/ui/FactoryResetDialog.d.ts +1 -2
  235. package/ui/FactoryResetDialog.js +8 -13
  236. package/ui/FatalErrorDialog.d.ts +1 -2
  237. package/ui/FatalErrorDialog.js +11 -42
  238. package/ui/FileSelector/FileSelector.d.ts +5 -5
  239. package/ui/FileSelector/FileSelector.js +41 -80
  240. package/ui/FileSelector/LocalFileChooser.d.ts +2 -3
  241. package/ui/FileSelector/LocalFileChooser.js +17 -29
  242. package/ui/FileSelector/UrlChooser.d.ts +5 -5
  243. package/ui/FileSelector/UrlChooser.js +6 -7
  244. package/ui/Icons.d.ts +10 -11
  245. package/ui/Icons.js +10 -25
  246. package/ui/LoadingEllipses.d.ts +2 -3
  247. package/ui/LoadingEllipses.js +4 -7
  248. package/ui/Logo.d.ts +2 -3
  249. package/ui/Logo.js +5 -23
  250. package/ui/Menu.d.ts +3 -4
  251. package/ui/Menu.js +85 -122
  252. package/ui/MenuButton.d.ts +2 -3
  253. package/ui/MenuButton.js +11 -35
  254. package/ui/PrerenderedCanvas.d.ts +1 -2
  255. package/ui/PrerenderedCanvas.js +3 -25
  256. package/ui/RedErrorMessageBox.d.ts +1 -2
  257. package/ui/RedErrorMessageBox.js +2 -5
  258. package/ui/ResizeHandle.d.ts +1 -2
  259. package/ui/ResizeHandle.js +5 -27
  260. package/ui/ReturnToImportFormDialog.d.ts +1 -2
  261. package/ui/ReturnToImportFormDialog.js +8 -13
  262. package/ui/SanitizedHTML.d.ts +2 -3
  263. package/ui/SanitizedHTML.js +4 -24
  264. package/ui/Snackbar.d.ts +3 -4
  265. package/ui/Snackbar.js +41 -21
  266. package/ui/SnackbarContents.d.ts +5 -0
  267. package/ui/SnackbarContents.js +16 -0
  268. package/ui/SnackbarModel.d.ts +1 -26
  269. package/ui/SnackbarModel.js +22 -39
  270. package/ui/colors.d.ts +1 -1
  271. package/ui/colors.js +2 -2
  272. package/ui/index.d.ts +0 -2
  273. package/ui/index.js +1 -5
  274. package/ui/react-colorful.js +17 -10
  275. package/ui/theme.d.ts +1 -1
  276. package/ui/theme.js +7 -40
  277. package/util/Base1DUtils.d.ts +1 -1
  278. package/util/Base1DUtils.js +0 -12
  279. package/util/Base1DViewModel.d.ts +4 -81
  280. package/util/Base1DViewModel.js +4 -108
  281. package/util/QuickLRU.js +0 -9
  282. package/util/TimeTraveller.js +0 -4
  283. package/util/aborting.d.ts +0 -20
  284. package/util/aborting.js +0 -31
  285. package/util/analytics.js +1 -12
  286. package/util/blockTypes.d.ts +0 -11
  287. package/util/blockTypes.js +0 -13
  288. package/util/calculateDynamicBlocks.d.ts +1 -20
  289. package/util/calculateDynamicBlocks.js +1 -22
  290. package/util/calculateStaticBlocks.d.ts +2 -2
  291. package/util/calculateStaticBlocks.js +0 -2
  292. package/util/color/cssColorsLevel4.js +0 -1
  293. package/util/color/index.d.ts +0 -19
  294. package/util/color/index.js +0 -30
  295. package/util/compositeMap.js +0 -2
  296. package/util/dedupe.js +0 -1
  297. package/util/formatFastaStrings.d.ts +0 -13
  298. package/util/formatFastaStrings.js +0 -13
  299. package/util/idMaker.d.ts +1 -1
  300. package/util/idMaker.js +16 -12
  301. package/util/index.d.ts +27 -173
  302. package/util/index.js +53 -293
  303. package/util/io/RemoteFileWithRangeCache.d.ts +4 -5
  304. package/util/io/RemoteFileWithRangeCache.js +12 -14
  305. package/util/io/index.d.ts +3 -4
  306. package/util/io/index.js +5 -19
  307. package/util/jexl.js +3 -13
  308. package/util/jexlStrings.d.ts +0 -6
  309. package/util/jexlStrings.js +0 -8
  310. package/util/layouts/BaseLayout.d.ts +1 -1
  311. package/util/layouts/GranularRectLayout.d.ts +1 -17
  312. package/util/layouts/GranularRectLayout.js +4 -81
  313. package/util/layouts/MultiLayout.d.ts +1 -6
  314. package/util/layouts/MultiLayout.js +0 -6
  315. package/util/layouts/PrecomputedLayout.d.ts +1 -4
  316. package/util/layouts/PrecomputedLayout.js +0 -5
  317. package/util/layouts/PrecomputedMultiLayout.js +0 -2
  318. package/util/layouts/SceneGraph.d.ts +0 -12
  319. package/util/layouts/SceneGraph.js +0 -13
  320. package/util/makeAbortableReaction.d.ts +2 -0
  321. package/util/makeAbortableReaction.js +50 -0
  322. package/util/map-obj.js +0 -4
  323. package/util/mst-reflection.d.ts +1 -14
  324. package/util/mst-reflection.js +1 -28
  325. package/util/nanoid.d.ts +1 -1
  326. package/util/nanoid.js +0 -31
  327. package/util/nextTick.d.ts +1 -0
  328. package/util/nextTick.js +6 -0
  329. package/util/offscreenCanvasPonyfill.d.ts +0 -1
  330. package/util/offscreenCanvasPonyfill.js +1 -9
  331. package/util/offscreenCanvasUtils.d.ts +2 -3
  332. package/util/offscreenCanvasUtils.js +22 -21
  333. package/util/range.d.ts +0 -25
  334. package/util/range.js +0 -34
  335. package/util/rxjs.d.ts +3 -7
  336. package/util/rxjs.js +2 -9
  337. package/util/simpleFeature.d.ts +0 -50
  338. package/util/simpleFeature.js +0 -35
  339. package/util/stats.d.ts +3 -26
  340. package/util/stats.js +0 -25
  341. package/util/stopToken.d.ts +3 -0
  342. package/util/stopToken.js +29 -0
  343. package/util/tracks.d.ts +4 -26
  344. package/util/tracks.js +8 -33
  345. package/util/types/index.d.ts +14 -30
  346. package/util/types/index.js +5 -14
  347. package/util/types/mst.js +0 -9
  348. package/util/types/util.d.ts +2 -9
  349. package/util/useMeasure.d.ts +1 -1
  350. package/util/useMeasure.js +0 -1
  351. package/util/when.d.ts +1 -15
  352. package/util/when.js +3 -70
  353. package/rpc/remoteAbortSignals.d.ts +0 -36
  354. package/rpc/remoteAbortSignals.js +0 -79
@@ -10,16 +10,7 @@ function isFeature(thing) {
10
10
  function isSimpleFeatureSerialized(args) {
11
11
  return 'uniqueId' in args && typeof args.data !== 'object';
12
12
  }
13
- /**
14
- * Simple implementation of a feature object.
15
- */
16
13
  class SimpleFeature {
17
- /**
18
- * @param args - SimpleFeature args
19
- *
20
- * Note: args.data.subfeatures can be an array of these same args,
21
- * which will be inflated to more instances of this class.
22
- */
23
14
  constructor(args) {
24
15
  var _a;
25
16
  if (isSimpleFeatureSerialized(args)) {
@@ -27,16 +18,9 @@ class SimpleFeature {
27
18
  }
28
19
  else {
29
20
  this.data = args.data;
30
- // load handle from args.parent (not args.data.parent) this reason is
31
- // because if args is an object, it likely isn't properly loaded with
32
- // parent as a Feature reference (probably a raw parent ID or something
33
- // instead)
34
21
  this.parentHandle = args.parent;
35
22
  }
36
- // the feature id comes from args.id, args.data.uniqueId, or args.uniqueId
37
- // due to this initialization
38
23
  const id = isSimpleFeatureSerialized(args) ? args.uniqueId : args.id;
39
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
40
24
  if (id === undefined || id === null) {
41
25
  throw new Error('SimpleFeature requires a unique `id` or `data.uniqueId` attribute');
42
26
  }
@@ -57,10 +41,6 @@ class SimpleFeature {
57
41
  : f);
58
42
  }
59
43
  }
60
- /**
61
- * Get a piece of data about the feature. All features must have
62
- * 'start' and 'end', but everything else is optional.
63
- */
64
44
  get(name) {
65
45
  return name === 'subfeatures'
66
46
  ? this.subfeatures
@@ -68,33 +48,18 @@ class SimpleFeature {
68
48
  ? this.parent()
69
49
  : this.data[name];
70
50
  }
71
- /**
72
- * Set an item of data.
73
- */
74
51
  set(name, val) {
75
52
  this.data[name] = val;
76
53
  }
77
- /**
78
- * Get an array listing which data keys are present in this feature.
79
- */
80
54
  tags() {
81
55
  return Object.keys(this.data);
82
56
  }
83
- /**
84
- * Get the unique ID of this feature.
85
- */
86
57
  id() {
87
58
  return this.uniqueId;
88
59
  }
89
- /**
90
- * Get this feature's parent feature, or undefined if none.
91
- */
92
60
  parent() {
93
61
  return this.parentHandle;
94
62
  }
95
- /**
96
- * Get an array of child features, or undefined if none.
97
- */
98
63
  children() {
99
64
  return this.get('subfeatures');
100
65
  }
package/util/stats.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Observable } from 'rxjs';
2
- import { NoAssemblyRegion } from './types';
3
- import { Feature } from './simpleFeature';
1
+ import type { Feature } from './simpleFeature';
2
+ import type { NoAssemblyRegion } from './types';
3
+ import type { Observable } from 'rxjs';
4
4
  export interface UnrectifiedQuantitativeStats {
5
5
  scoreMin: number;
6
6
  scoreMax: number;
@@ -15,30 +15,7 @@ export interface QuantitativeStats extends UnrectifiedQuantitativeStats {
15
15
  scoreMean: number;
16
16
  scoreStdDev: number;
17
17
  }
18
- /**
19
- * calculate standard deviation using the 'shortcut method' that accepts
20
- * the sum and the sum squares of the elements
21
- *
22
- * @param sum - sum(i, 1..n)
23
- * @param sumSquares - sum(i^2, 1..n)
24
- * @param n - number of elements
25
- * @param population - boolean: use population instead of sample correction
26
- * @returns - the estimated std deviation
27
- */
28
18
  export declare function calcStdFromSums(sum: number, sumSquares: number, n: number, population?: boolean): number;
29
- /**
30
- * @param stats - a summary stats object with scoreSum, featureCount,
31
- * scoreSumSquares, and basesCovered
32
- * @returns - a summary stats object with
33
- * scoreMean, scoreStdDev, and featureDensity added
34
- */
35
19
  export declare function rectifyStats(s: UnrectifiedQuantitativeStats): QuantitativeStats;
36
- /**
37
- * transform a list of scores to summary statistics
38
- *
39
- * @param region - object with start, end
40
- * @param features - array of features which are possibly summary features
41
- * @returns - object with scoreMax, scoreMin, scoreSum, scoreSumSquares, etc
42
- */
43
20
  export declare function scoresToStats(region: NoAssemblyRegion, feats: Observable<Feature>): Promise<QuantitativeStats>;
44
21
  export declare function blankStats(): QuantitativeStats;
package/util/stats.js CHANGED
@@ -6,16 +6,6 @@ exports.scoresToStats = scoresToStats;
6
6
  exports.blankStats = blankStats;
7
7
  const rxjs_1 = require("rxjs");
8
8
  const operators_1 = require("rxjs/operators");
9
- /**
10
- * calculate standard deviation using the 'shortcut method' that accepts
11
- * the sum and the sum squares of the elements
12
- *
13
- * @param sum - sum(i, 1..n)
14
- * @param sumSquares - sum(i^2, 1..n)
15
- * @param n - number of elements
16
- * @param population - boolean: use population instead of sample correction
17
- * @returns - the estimated std deviation
18
- */
19
9
  function calcStdFromSums(sum, sumSquares, n, population = false) {
20
10
  if (n === 0) {
21
11
  return 0;
@@ -25,7 +15,6 @@ function calcStdFromSums(sum, sumSquares, n, population = false) {
25
15
  variance = sumSquares / n - (sum * sum) / (n * n);
26
16
  }
27
17
  else {
28
- // sample correction is n-1
29
18
  variance = sumSquares - (sum * sum) / n;
30
19
  if (n > 1) {
31
20
  variance /= n - 1;
@@ -33,12 +22,6 @@ function calcStdFromSums(sum, sumSquares, n, population = false) {
33
22
  }
34
23
  return variance < 0 ? 0 : Math.sqrt(variance);
35
24
  }
36
- /**
37
- * @param stats - a summary stats object with scoreSum, featureCount,
38
- * scoreSumSquares, and basesCovered
39
- * @returns - a summary stats object with
40
- * scoreMean, scoreStdDev, and featureDensity added
41
- */
42
25
  function rectifyStats(s) {
43
26
  return {
44
27
  ...s,
@@ -47,13 +30,6 @@ function rectifyStats(s) {
47
30
  featureDensity: (s.featureCount || 1) / s.basesCovered,
48
31
  };
49
32
  }
50
- /**
51
- * transform a list of scores to summary statistics
52
- *
53
- * @param region - object with start, end
54
- * @param features - array of features which are possibly summary features
55
- * @returns - object with scoreMax, scoreMin, scoreSum, scoreSumSquares, etc
56
- */
57
33
  async function scoresToStats(region, feats) {
58
34
  const { start, end } = region;
59
35
  const seed = {
@@ -76,7 +52,6 @@ async function scoresToStats(region, feats) {
76
52
  found = true;
77
53
  return acc;
78
54
  }, seed)));
79
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
80
55
  return found
81
56
  ? rectifyStats({
82
57
  scoreMax,
@@ -0,0 +1,3 @@
1
+ export declare function createStopToken(): string;
2
+ export declare function stopStopToken(stopToken: string): void;
3
+ export declare function checkStopToken(stopToken?: string): void;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createStopToken = createStopToken;
4
+ exports.stopStopToken = stopStopToken;
5
+ exports.checkStopToken = checkStopToken;
6
+ function isWebWorker() {
7
+ return (typeof WorkerGlobalScope !== 'undefined' &&
8
+ self instanceof WorkerGlobalScope);
9
+ }
10
+ function createStopToken() {
11
+ var _a;
12
+ return ((_a = URL.createObjectURL) === null || _a === void 0 ? void 0 : _a.call(URL, new Blob())) || `${Math.random()}`;
13
+ }
14
+ function stopStopToken(stopToken) {
15
+ var _a;
16
+ (_a = URL.revokeObjectURL) === null || _a === void 0 ? void 0 : _a.call(URL, stopToken);
17
+ }
18
+ function checkStopToken(stopToken) {
19
+ if (typeof jest === 'undefined' && stopToken !== undefined && isWebWorker()) {
20
+ const xhr = new XMLHttpRequest();
21
+ xhr.open('GET', stopToken, false);
22
+ try {
23
+ xhr.send(null);
24
+ }
25
+ catch (e) {
26
+ throw new Error('aborted');
27
+ }
28
+ }
29
+ }
package/util/tracks.d.ts CHANGED
@@ -1,20 +1,11 @@
1
- import { IAnyStateTreeNode } from 'mobx-state-tree';
2
- import { PreFileLocation, FileLocation } from './types';
3
- import { AnyConfigurationModel } from '../configuration';
1
+ import type { FileLocation, PreFileLocation } from './types';
2
+ import type { AnyConfigurationModel } from '../configuration';
3
+ import type { IAnyStateTreeNode } from 'mobx-state-tree';
4
4
  export declare function getTrackAssemblyNames(track: IAnyStateTreeNode & {
5
5
  configuration: AnyConfigurationModel;
6
6
  }): string[];
7
7
  export declare function getConfAssemblyNames(conf: AnyConfigurationModel): string[];
8
- /**
9
- * return the rpcSessionId of the highest parent node in the tree that has an
10
- * rpcSessionId */
11
8
  export declare function getRpcSessionId(thisNode: IAnyStateTreeNode): string;
12
- /**
13
- * given an MST node, get the renderprops of the first parent container that
14
- * has renderProps
15
- * @param node -
16
- * @returns renderprops, or empty object if none found
17
- */
18
9
  export declare function getParentRenderProps(node: IAnyStateTreeNode): any;
19
10
  export declare const UNKNOWN = "UNKNOWN";
20
11
  export declare const UNSUPPORTED = "UNSUPPORTED";
@@ -26,12 +17,6 @@ export declare function storeBlobLocation(location: PreFileLocation): import("./
26
17
  blobId: string;
27
18
  locationType: string;
28
19
  };
29
- /**
30
- * creates a new location from the provided location including the appropriate suffix and location type
31
- * @param location - the FileLocation
32
- * @param suffix - the file suffix (e.g. .bam)
33
- * @returns the constructed location object from the provided parameters
34
- */
35
20
  export declare function makeIndex(location: FileLocation, suffix: string): import("./types").BlobLocation | {
36
21
  uri: string;
37
22
  locationType: string;
@@ -41,13 +26,6 @@ export declare function makeIndex(location: FileLocation, suffix: string): impor
41
26
  locationType: string;
42
27
  uri?: undefined;
43
28
  };
44
- /**
45
- * constructs a potential index file (with suffix) from the provided file name
46
- * @param name - the name of the index file
47
- * @param typeA - one option of a potential two file suffix (e.g. CSI, BAI)
48
- * @param typeB - the second option of a potential two file suffix (e.g. CSI, BAI)
49
- * @returns a likely name of the index file for a given filename
50
- */
51
29
  export declare function makeIndexType(name: string | undefined, typeA: string, typeB: string): string;
52
30
  export interface AdapterConfig {
53
31
  type: string;
@@ -65,7 +43,7 @@ export declare function generateUnsupportedTrackConf(trackName: string, trackUrl
65
43
  category: string[] | undefined;
66
44
  trackId: string;
67
45
  };
68
- export declare function generateUnknownTrackConf(trackName: string, trackUrl: string, categories: string[] | undefined): {
46
+ export declare function generateUnknownTrackConf(trackName: string, trackUrl: string, categories?: string[]): {
69
47
  type: string;
70
48
  name: string;
71
49
  description: string;
package/util/tracks.js CHANGED
@@ -20,14 +20,12 @@ exports.getTrackName = getTrackName;
20
20
  const mobx_state_tree_1 = require("mobx-state-tree");
21
21
  const index_1 = require("./index");
22
22
  const configuration_1 = require("../configuration");
23
- /* utility functions for use by track models and so forth */
24
23
  function getTrackAssemblyNames(track) {
25
24
  return getConfAssemblyNames(track.configuration);
26
25
  }
27
26
  function getConfAssemblyNames(conf) {
28
27
  const trackAssemblyNames = (0, configuration_1.readConfObject)(conf, 'assemblyNames');
29
28
  if (!trackAssemblyNames) {
30
- // Check if it's an assembly sequence track
31
29
  const parent = (0, mobx_state_tree_1.getParent)(conf);
32
30
  if ('sequence' in parent) {
33
31
  return [(0, configuration_1.readConfObject)(parent, 'name')];
@@ -38,9 +36,6 @@ function getConfAssemblyNames(conf) {
38
36
  }
39
37
  return trackAssemblyNames;
40
38
  }
41
- /**
42
- * return the rpcSessionId of the highest parent node in the tree that has an
43
- * rpcSessionId */
44
39
  function getRpcSessionId(thisNode) {
45
40
  let highestRpcSessionId;
46
41
  for (let node = thisNode; !(0, mobx_state_tree_1.isRoot)(node); node = (0, mobx_state_tree_1.getParent)(node)) {
@@ -53,12 +48,6 @@ function getRpcSessionId(thisNode) {
53
48
  }
54
49
  return highestRpcSessionId;
55
50
  }
56
- /**
57
- * given an MST node, get the renderprops of the first parent container that
58
- * has renderProps
59
- * @param node -
60
- * @returns renderprops, or empty object if none found
61
- */
62
51
  function getParentRenderProps(node) {
63
52
  for (let currentNode = (0, mobx_state_tree_1.getParent)(node); !(0, mobx_state_tree_1.isRoot)(currentNode); currentNode = (0, mobx_state_tree_1.getParent)(currentNode)) {
64
53
  if ('renderProps' in currentNode) {
@@ -70,22 +59,16 @@ function getParentRenderProps(node) {
70
59
  exports.UNKNOWN = 'UNKNOWN';
71
60
  exports.UNSUPPORTED = 'UNSUPPORTED';
72
61
  let blobMap = {};
73
- // get a specific blob
74
62
  function getBlob(id) {
75
63
  return blobMap[id];
76
64
  }
77
- // used to export entire context to webworker
78
65
  function getBlobMap() {
79
66
  return blobMap;
80
67
  }
81
- // used in new contexts like webworkers
82
68
  function setBlobMap(map) {
83
69
  blobMap = map;
84
70
  }
85
71
  let counter = 0;
86
- // blob files are stored in a global map. the blobId is based on a combination
87
- // of timestamp plus counter to be unique across sessions and fast repeated
88
- // calls
89
72
  function storeBlobLocation(location) {
90
73
  if ('blob' in location) {
91
74
  const blobId = `b${+Date.now()}-${counter++}`;
@@ -94,31 +77,23 @@ function storeBlobLocation(location) {
94
77
  }
95
78
  return location;
96
79
  }
97
- /**
98
- * creates a new location from the provided location including the appropriate suffix and location type
99
- * @param location - the FileLocation
100
- * @param suffix - the file suffix (e.g. .bam)
101
- * @returns the constructed location object from the provided parameters
102
- */
103
80
  function makeIndex(location, suffix) {
104
81
  if ('uri' in location) {
105
- return { uri: location.uri + suffix, locationType: 'UriLocation' };
82
+ return {
83
+ uri: location.uri + suffix,
84
+ locationType: 'UriLocation',
85
+ };
106
86
  }
107
- if ('localPath' in location) {
87
+ else if ('localPath' in location) {
108
88
  return {
109
89
  localPath: location.localPath + suffix,
110
90
  locationType: 'LocalPathLocation',
111
91
  };
112
92
  }
113
- return location;
93
+ else {
94
+ return location;
95
+ }
114
96
  }
115
- /**
116
- * constructs a potential index file (with suffix) from the provided file name
117
- * @param name - the name of the index file
118
- * @param typeA - one option of a potential two file suffix (e.g. CSI, BAI)
119
- * @param typeB - the second option of a potential two file suffix (e.g. CSI, BAI)
120
- * @returns a likely name of the index file for a given filename
121
- */
122
97
  function makeIndexType(name, typeA, typeB) {
123
98
  return (name === null || name === void 0 ? void 0 : name.toUpperCase().endsWith(typeA)) ? typeA : typeB;
124
99
  }
@@ -1,17 +1,16 @@
1
- import React from 'react';
2
- import { Instance, SnapshotIn, IAnyStateTreeNode, IStateTreeNode, IType } from 'mobx-state-tree';
3
- import { ThemeOptions } from '@mui/material';
4
- import { AnyConfigurationModel } from '../../configuration';
5
- import TextSearchManager from '../../TextSearch/TextSearchManager';
6
- import { MenuItem } from '../../ui';
7
- import RpcManager from '../../rpc/RpcManager';
8
- import { Feature } from '../simpleFeature';
9
- import { BaseInternetAccountModel } from '../../pluggableElementTypes/models';
1
+ import type React from 'react';
2
+ import type { BlobLocation as MUBlobLocation, LocalPathLocation as MULocalPathLocation, NoAssemblyRegion as MUNoAssemblyRegion, Region as MUIRegion, UriLocation as MUUriLocation } from './mst';
3
+ import type TextSearchManager from '../../TextSearch/TextSearchManager';
10
4
  import type assemblyManager from '../../assemblyManager';
11
- import type { NoAssemblyRegion as MUNoAssemblyRegion, Region as MUIRegion, LocalPathLocation as MULocalPathLocation, UriLocation as MUUriLocation, BlobLocation as MUBlobLocation } from './mst';
5
+ import type { AnyConfigurationModel } from '../../configuration';
6
+ import type { BaseInternetAccountModel } from '../../pluggableElementTypes/models';
7
+ import type RpcManager from '../../rpc/RpcManager';
8
+ import type { MenuItem } from '../../ui';
9
+ import type { Feature } from '../simpleFeature';
10
+ import type { ThemeOptions } from '@mui/material';
11
+ import type { IAnyStateTreeNode, IStateTreeNode, IType, Instance, SnapshotIn } from 'mobx-state-tree';
12
12
  export * from './util';
13
- /** abstract type for a model that contains multiple views */
14
- export interface AbstractViewContainer extends IStateTreeNode<IType<any, unknown, any>> {
13
+ export interface AbstractViewContainer extends IStateTreeNode<IType<any, any, any>> {
15
14
  views: AbstractViewModel[];
16
15
  removeView(view: AbstractViewModel): void;
17
16
  addView(typeName: string, initialState?: Record<string, unknown>): AbstractViewModel;
@@ -41,7 +40,6 @@ export interface JBrowsePlugin {
41
40
  image?: string;
42
41
  }
43
42
  export type DialogComponentType = React.LazyExoticComponent<React.FC<any>> | React.FC<any>;
44
- /** minimum interface that all session state models must implement */
45
43
  export interface AbstractSessionModel extends AbstractViewContainer {
46
44
  jbrowse: IAnyStateTreeNode;
47
45
  drawerPosition?: string;
@@ -97,17 +95,14 @@ export interface AbstractSessionModel extends AbstractViewContainer {
97
95
  tracks: AnyConfigurationModel[];
98
96
  }
99
97
  export declare function isSessionModel(thing: unknown): thing is AbstractSessionModel;
100
- /** abstract interface for a session allows editing configurations */
101
98
  export interface SessionWithConfigEditing extends AbstractSessionModel {
102
99
  editConfiguration(configuration: AnyConfigurationModel): void;
103
100
  }
104
- export declare function isSessionModelWithConfigEditing(thing: unknown): thing is SessionWithConfigEditing;
105
- /** abstract interface for a session allows adding tracks */
106
- export interface SessionWithConfigEditing extends AbstractSessionModel {
101
+ export declare function isSessionModelWithConfigEditing(t: unknown): t is SessionWithConfigEditing;
102
+ export interface SessionWithAddTracks extends AbstractSessionModel {
107
103
  addTrackConf(configuration: AnyConfigurationModel | SnapshotIn<AnyConfigurationModel>): void;
108
104
  }
109
- export declare function isSessionWithAddTracks(thing: unknown): thing is SessionWithConfigEditing;
110
- /** abstract interface for a session allows adding tracks */
105
+ export declare function isSessionWithAddTracks(t: unknown): t is SessionWithAddTracks;
111
106
  export interface SessionWithShareURL extends AbstractSessionModel {
112
107
  shareURL: string;
113
108
  }
@@ -116,7 +111,6 @@ export interface Widget {
116
111
  type: string;
117
112
  id: string;
118
113
  }
119
- /** abstract interface for a session that manages widgets */
120
114
  export interface SessionWithWidgets extends AbstractSessionModel {
121
115
  minimized: boolean;
122
116
  visibleWidget?: Widget;
@@ -152,18 +146,15 @@ export interface SessionWithSessionPlugins extends AbstractSessionModel {
152
146
  removeSessionPlugin: Function;
153
147
  }
154
148
  export declare function isSessionWithSessionPlugins(thing: unknown): thing is SessionWithSessionPlugins;
155
- /** abstract interface for a session that manages a global selection */
156
149
  export interface SelectionContainer extends AbstractSessionModel {
157
150
  selection?: unknown;
158
151
  setSelection(thing: unknown): void;
159
152
  }
160
153
  export declare function isSelectionContainer(thing: unknown): thing is SelectionContainer;
161
- /** abstract interface for a session allows applying focus to views and widgets */
162
154
  export interface SessionWithFocusedViewAndDrawerWidgets extends SessionWithDrawerWidgets {
163
155
  focusedViewId: string | undefined;
164
156
  setFocusedViewId(id: string): void;
165
157
  }
166
- /** minimum interface that all view state models must implement */
167
158
  export interface AbstractViewModel {
168
159
  id: string;
169
160
  type: string;
@@ -194,7 +185,6 @@ export interface TrackViewModel extends AbstractViewModel {
194
185
  hideTrack(trackId: string): void;
195
186
  }
196
187
  export declare function isTrackViewModel(thing: unknown): thing is TrackViewModel;
197
- /** minimum interface for the root MST model of a JBrowse app */
198
188
  export interface AbstractRootModel {
199
189
  jbrowse: IAnyStateTreeNode;
200
190
  session?: AbstractSessionModel;
@@ -202,7 +192,6 @@ export interface AbstractRootModel {
202
192
  adminMode?: boolean;
203
193
  error?: unknown;
204
194
  }
205
- /** root model with more included for the heavier JBrowse web and desktop app */
206
195
  export interface AppRootModel extends AbstractRootModel {
207
196
  internetAccounts: BaseInternetAccountModel[];
208
197
  findAppropriateInternetAccount(location: UriLocation): BaseInternetAccountModel | undefined;
@@ -213,7 +202,6 @@ export interface RootModelWithInternetAccounts extends AbstractRootModel {
213
202
  findAppropriateInternetAccount(location: UriLocation): BaseInternetAccountModel | undefined;
214
203
  }
215
204
  export declare function isRootModelWithInternetAccounts(thing: unknown): thing is RootModelWithInternetAccounts;
216
- /** a root model that manages global menus */
217
205
  export interface AbstractMenuManager {
218
206
  appendMenu(menuName: string): void;
219
207
  insertMenu(menuName: string, position: number): number;
@@ -225,10 +213,6 @@ export interface AbstractMenuManager {
225
213
  export declare function isAbstractMenuManager(thing: unknown): thing is AbstractMenuManager;
226
214
  export interface NoAssemblyRegion extends SnapshotIn<typeof MUNoAssemblyRegion> {
227
215
  }
228
- /**
229
- * a description of a specific genomic region. assemblyName, refName, start,
230
- * end, and reversed
231
- */
232
216
  export interface Region extends SnapshotIn<typeof MUIRegion> {
233
217
  }
234
218
  export interface AugmentedRegion extends Region {
@@ -54,13 +54,11 @@ function isSessionModel(thing) {
54
54
  'rpcManager' in thing &&
55
55
  'configuration' in thing);
56
56
  }
57
- function isSessionModelWithConfigEditing(thing) {
58
- return isSessionModel(thing) && 'editConfiguration' in thing;
57
+ function isSessionModelWithConfigEditing(t) {
58
+ return isSessionModel(t) && 'editConfiguration' in t;
59
59
  }
60
- function isSessionWithAddTracks(thing) {
61
- return (
62
- // @ts-expect-error
63
- isSessionModel(thing) && 'addTrackConf' in thing && !thing.disableAddTracks);
60
+ function isSessionWithAddTracks(t) {
61
+ return (isSessionModel(t) && 'addTrackConf' in t && !t.disableAddTracks);
64
62
  }
65
63
  function isSessionWithShareURL(thing) {
66
64
  return isSessionModel(thing) && 'shareURL' in thing && !!thing.shareURL;
@@ -93,14 +91,12 @@ function isTrackModel(thing) {
93
91
  return (typeof thing === 'object' &&
94
92
  thing !== null &&
95
93
  'configuration' in thing &&
96
- // @ts-expect-error
97
94
  thing.configuration.trackId);
98
95
  }
99
96
  function isDisplayModel(thing) {
100
97
  return (typeof thing === 'object' &&
101
98
  thing !== null &&
102
99
  'configuration' in thing &&
103
- // @ts-expect-error
104
100
  thing.configuration.displayId);
105
101
  }
106
102
  function isTrackViewModel(thing) {
@@ -165,16 +161,11 @@ class RetryError extends Error {
165
161
  exports.RetryError = RetryError;
166
162
  function isAuthNeededException(exception) {
167
163
  return (exception instanceof Error &&
168
- // DOMException
169
164
  (exception.name === 'AuthNeededError' ||
170
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
171
165
  exception.url !== undefined));
172
166
  }
173
167
  function isRetryException(exception) {
174
- return (
175
- // DOMException
176
- exception.name === 'RetryError' ||
177
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
168
+ return (exception.name === 'RetryError' ||
178
169
  exception.internetAccountId !== undefined);
179
170
  }
180
171
  var TextSearchManager_1 = require("../../TextSearch/TextSearchManager");
package/util/types/mst.js CHANGED
@@ -23,7 +23,6 @@ exports.LocalPathLocation = mobx_state_tree_1.types.model('LocalPathLocation', {
23
23
  locationType: mobx_state_tree_1.types.literal('LocalPathLocation'),
24
24
  localPath: mobx_state_tree_1.types.string,
25
25
  });
26
- // like how blobId is used to get a blob map
27
26
  exports.BlobLocation = mobx_state_tree_1.types.model('BlobLocation', {
28
27
  locationType: mobx_state_tree_1.types.literal('BlobLocation'),
29
28
  name: mobx_state_tree_1.types.string,
@@ -34,8 +33,6 @@ exports.UriLocationRaw = mobx_state_tree_1.types.model('UriLocation', {
34
33
  uri: mobx_state_tree_1.types.string,
35
34
  baseUri: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
36
35
  internetAccountId: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
37
- // auths information (such as tokens) needed for using this resource.
38
- // if provided, these must be completely sufficient for using it
39
36
  internetAccountPreAuthorization: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.model('InternetAccountPreAuthorization', {
40
37
  internetAccountType: mobx_state_tree_1.types.string,
41
38
  authInfo: mobx_state_tree_1.types.frozen(),
@@ -43,7 +40,6 @@ exports.UriLocationRaw = mobx_state_tree_1.types.model('UriLocation', {
43
40
  });
44
41
  exports.UriLocation = mobx_state_tree_1.types.snapshotProcessor(exports.UriLocationRaw, {
45
42
  postProcessor: snap => {
46
- // xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
47
43
  const { baseUri, ...rest } = snap;
48
44
  if (!baseUri) {
49
45
  return rest;
@@ -52,17 +48,12 @@ exports.UriLocation = mobx_state_tree_1.types.snapshotProcessor(exports.UriLocat
52
48
  },
53
49
  });
54
50
  exports.FileLocation = mobx_state_tree_1.types.snapshotProcessor(mobx_state_tree_1.types.union(exports.LocalPathLocation, exports.UriLocation, exports.BlobLocation), {
55
- // @ts-expect-error
56
51
  preProcessor(snap) {
57
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
58
52
  if (!snap) {
59
53
  return undefined;
60
54
  }
61
- // @ts-expect-error
62
- // xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
63
55
  const { locationType, ...rest } = snap;
64
56
  if (!locationType) {
65
- // @ts-expect-error
66
57
  const { uri, localPath, blob } = rest;
67
58
  let locationType = '';
68
59
  if (uri !== undefined) {
@@ -1,13 +1,6 @@
1
- import React from 'react';
2
- import PluginManager from '../../PluginManager';
3
- /**
4
- * Obtain the return type of a constructor function type.
5
- * Differs from core Typescript InstanceType in that it returns never if not matched.
6
- */
1
+ import type React from 'react';
2
+ import type PluginManager from '../../PluginManager';
7
3
  export type InstanceTypeRestrictive<CONSTRUCTOR extends new (...args: any[]) => any> = CONSTRUCTOR extends new (...args: any[]) => infer CLASS ? CLASS : never;
8
- /** extracts the class type from a factory function that returns a constructor */
9
4
  export type ClassReturnedBy<FACT extends (pm: PluginManager) => any> = InstanceTypeRestrictive<ReturnType<FACT>>;
10
- /** A react component with any props. Consider using something more specific if possible */
11
5
  export type AnyReactComponentType = React.ComponentType<any>;
12
- /** get the type that a predicate asserts */
13
6
  export type TypeTestedByPredicate<PREDICATE extends (thing: any) => boolean> = PREDICATE extends (thing: any) => thing is infer TYPE ? TYPE : never;
@@ -1,4 +1,4 @@
1
- export default function useMeasure(): readonly [import("react").RefObject<HTMLDivElement>, {
1
+ export default function useMeasure(): readonly [import("react").RefObject<HTMLDivElement | null>, {
2
2
  width?: number;
3
3
  height?: number;
4
4
  }];
@@ -25,7 +25,6 @@ function useMeasure() {
25
25
  });
26
26
  });
27
27
  observer.observe(ref.current);
28
- // Callback fired when component is unmounted
29
28
  return () => {
30
29
  observer.disconnect();
31
30
  };
package/util/when.d.ts CHANGED
@@ -1,15 +1 @@
1
- import { IWhenOptions } from 'mobx';
2
- interface WhenOpts extends IWhenOptions {
3
- signal?: AbortSignal;
4
- }
5
- /**
6
- * Wrapper for mobx `when` that adds timeout and aborting support.
7
- */
8
- export declare function when(getter: () => boolean, { timeout, signal, name }?: WhenOpts): Promise<unknown>;
9
- /**
10
- * Wrapper for mobx `when` that makes a promise for the return value
11
- * of the given function at the point in time when it becomes not
12
- * undefined and not null.
13
- */
14
- export declare function whenPresent<FUNCTION extends () => unknown>(getter: FUNCTION, opts?: WhenOpts): Promise<NonNullable<ReturnType<FUNCTION>>>;
15
- export {};
1
+ export { when } from 'mobx';