@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
@@ -39,8 +39,6 @@ function moveTo(self, start, end) {
39
39
  }
40
40
  const targetBpPerPx = len / (width - interRegionPaddingWidth * numBlocksWideEnough);
41
41
  const newBpPerPx = self.zoomTo(targetBpPerPx);
42
- // If our target bpPerPx was smaller than the allowed minBpPerPx, adjust
43
- // the scroll so the requested range is in the middle of the screen
44
42
  let extraBp = 0;
45
43
  if (targetBpPerPx < newBpPerPx) {
46
44
  extraBp = ((newBpPerPx - targetBpPerPx) * self.width) / 2;
@@ -61,7 +59,6 @@ function moveTo(self, start, end) {
61
59
  function coord(r, bp) {
62
60
  return Math.floor(r.reversed ? r.end - bp : r.start + bp) + 1;
63
61
  }
64
- // manual return type since getSnapshot hard to infer here
65
62
  function pxToBp(self, px) {
66
63
  var _a;
67
64
  let bpSoFar = 0;
@@ -72,7 +69,6 @@ function pxToBp(self, px) {
72
69
  const r = displayedRegions[0];
73
70
  const snap = r;
74
71
  return {
75
- // xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
76
72
  ...snap,
77
73
  oob: true,
78
74
  coord: coord(r, bp),
@@ -89,7 +85,6 @@ function pxToBp(self, px) {
89
85
  if (len + bpSoFar > bp && bpSoFar <= bp) {
90
86
  const snap = r;
91
87
  return {
92
- // xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
93
88
  ...snap,
94
89
  oob: false,
95
90
  offset,
@@ -97,8 +92,6 @@ function pxToBp(self, px) {
97
92
  index: i,
98
93
  };
99
94
  }
100
- // add the interRegionPaddingWidth if the boundary is in the screen e.g. in
101
- // a static block
102
95
  if (((_a = blocks[currBlock]) === null || _a === void 0 ? void 0 : _a.regionNumber) === i) {
103
96
  bpSoFar += len + interRegionPaddingBp;
104
97
  currBlock++;
@@ -113,7 +106,6 @@ function pxToBp(self, px) {
113
106
  const offset = bp - bpSoFar + len;
114
107
  const snap = r;
115
108
  return {
116
- // xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
117
109
  ...snap,
118
110
  oob: true,
119
111
  offset,
@@ -151,8 +143,6 @@ function bpToPx({ refName, coord, regionNumber, self, }) {
151
143
  bpSoFar += r.reversed ? r.end - coord : coord - r.start;
152
144
  break;
153
145
  }
154
- // add the interRegionPaddingWidth if the boundary is in the screen e.g. in
155
- // a static block
156
146
  if (((_a = blocks[currBlock]) === null || _a === void 0 ? void 0 : _a.regionNumber) === i) {
157
147
  bpSoFar += len + interRegionPaddingBp;
158
148
  currBlock++;
@@ -189,8 +179,6 @@ function bpToPxMap({ refName, coord, regionNumber, self, }) {
189
179
  bpSoFar += r.reversed ? r.end - coord : coord - r.start;
190
180
  break;
191
181
  }
192
- // add the interRegionPaddingWidth if the boundary is in the screen e.g. in
193
- // a static block
194
182
  if (((_a = blocks[currBlock]) === null || _a === void 0 ? void 0 : _a.regionNumber) === i) {
195
183
  bpSoFar += len + interRegionPaddingBp;
196
184
  currBlock++;
@@ -1,7 +1,7 @@
1
- import { Instance } from 'mobx-state-tree';
2
- import { Feature } from './simpleFeature';
3
- import { Region as IRegion } from './types';
4
- import { BpOffset } from './Base1DUtils';
1
+ import type { BpOffset } from './Base1DUtils';
2
+ import type { Feature } from './simpleFeature';
3
+ import type { Region as IRegion } from './types';
4
+ import type { Instance } from 'mobx-state-tree';
5
5
  declare const Base1DView: import("mobx-state-tree").IModelType<{
6
6
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
7
7
  displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<IRegion[], IRegion[], IRegion[]>, [undefined]>;
@@ -13,60 +13,21 @@ declare const Base1DView: import("mobx-state-tree").IModelType<{
13
13
  features: undefined | Feature[];
14
14
  volatileWidth: number;
15
15
  } & {
16
- /**
17
- * #action
18
- */
19
16
  setDisplayedRegions(regions: IRegion[]): void;
20
- /**
21
- * #action
22
- */
23
17
  setBpPerPx(val: number): void;
24
- /**
25
- * #action
26
- */
27
18
  setVolatileWidth(width: number): void;
28
19
  } & {
29
- /**
30
- * #getter
31
- */
32
20
  readonly width: number;
33
- /**
34
- * #getter
35
- */
36
21
  readonly assemblyNames: string[];
37
- /**
38
- * #getter
39
- */
40
22
  readonly displayedRegionsTotalPx: number;
41
- /**
42
- * #getter
43
- */
44
23
  readonly maxOffset: number;
45
- /**
46
- * #getter
47
- */
48
24
  readonly minOffset: number;
49
- /**
50
- * #getter
51
- */
52
25
  readonly totalBp: number;
53
26
  } & {
54
- /**
55
- * #getter
56
- */
57
27
  readonly dynamicBlocks: import("./blockTypes").BlockSet;
58
- /**
59
- * #getter
60
- */
61
28
  readonly staticBlocks: import("./blockTypes").BlockSet;
62
- /**
63
- * #getter
64
- */
65
29
  readonly currBp: number;
66
30
  } & {
67
- /**
68
- * #method
69
- */
70
31
  pxToBp(px: number): {
71
32
  coord: number;
72
33
  index: number;
@@ -78,59 +39,21 @@ declare const Base1DView: import("mobx-state-tree").IModelType<{
78
39
  end: number;
79
40
  reversed?: boolean;
80
41
  };
81
- /**
82
- * #method
83
- */
84
42
  bpToPx({ refName, coord, regionNumber, }: {
85
43
  refName: string;
86
44
  coord: number;
87
45
  regionNumber?: number;
88
46
  }): number | undefined;
89
47
  } & {
90
- /**
91
- * #action
92
- */
93
48
  setFeatures(features: Feature[]): void;
94
- /**
95
- * #action
96
- * this makes a zoomed out view that shows all displayedRegions that makes
97
- * the overview bar square with the scale bar
98
- */
99
49
  showAllRegions(): void;
100
- /**
101
- * #action
102
- */
103
50
  zoomOut(): void;
104
- /**
105
- * #action
106
- */
107
51
  zoomIn(): void;
108
- /**
109
- * #action
110
- */
111
52
  zoomTo(bpPerPx: number, offset?: number): number;
112
- /**
113
- * #action
114
- */
115
53
  scrollTo(offsetPx: number): number;
116
- /**
117
- * #action
118
- */
119
54
  centerAt(coord: number, refName: string | undefined, regionNumber: number): void;
120
- /**
121
- * #action
122
- * note: the scroll is clamped to keep the view on the main screen
123
- */
124
55
  scroll(distance: number): number;
125
56
  } & {
126
- /**
127
- * #action
128
- * offset is the base-pair-offset in the displayed region, index is the
129
- * index of the displayed region in the linear genome view
130
- *
131
- * @param start - object as `{start, end, offset, index}`
132
- * @param end - object as `{start, end, offset, index}`
133
- */
134
57
  moveTo(start?: BpOffset, end?: BpOffset): void;
135
58
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
136
59
  export type Base1DViewStateModel = typeof Base1DView;
@@ -4,42 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const mobx_state_tree_1 = require("mobx-state-tree");
7
- const index_1 = require("./index");
8
- const mst_1 = require("./types/mst");
7
+ const Base1DUtils_1 = require("./Base1DUtils");
9
8
  const calculateDynamicBlocks_1 = __importDefault(require("./calculateDynamicBlocks"));
10
9
  const calculateStaticBlocks_1 = __importDefault(require("./calculateStaticBlocks"));
11
- const Base1DUtils_1 = require("./Base1DUtils");
12
- /**
13
- * #stateModel Base1DView
14
- * used in non-lgv view representations of a 1d view e.g. the two axes of the
15
- * dotplot use this
16
- */
17
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
10
+ const index_1 = require("./index");
11
+ const mst_1 = require("./types/mst");
12
+ function x() { }
18
13
  const Base1DView = mobx_state_tree_1.types
19
14
  .model('Base1DView', {
20
- /**
21
- * #property
22
- */
23
15
  id: mst_1.ElementId,
24
- /**
25
- * #property
26
- */
27
16
  displayedRegions: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.frozen(), []),
28
- /**
29
- * #property
30
- */
31
17
  bpPerPx: 0,
32
- /**
33
- * #property
34
- */
35
18
  offsetPx: 0,
36
- /**
37
- * #property
38
- */
39
19
  interRegionPaddingWidth: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
40
- /**
41
- * #property
42
- */
43
20
  minimumBlockWidth: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
44
21
  })
45
22
  .volatile(() => ({
@@ -47,133 +24,72 @@ const Base1DView = mobx_state_tree_1.types
47
24
  volatileWidth: 0,
48
25
  }))
49
26
  .actions(self => ({
50
- /**
51
- * #action
52
- */
53
27
  setDisplayedRegions(regions) {
54
28
  self.displayedRegions = (0, mobx_state_tree_1.cast)(regions);
55
29
  },
56
- /**
57
- * #action
58
- */
59
30
  setBpPerPx(val) {
60
31
  self.bpPerPx = val;
61
32
  },
62
- /**
63
- * #action
64
- */
65
33
  setVolatileWidth(width) {
66
34
  self.volatileWidth = width;
67
35
  },
68
36
  }))
69
37
  .views(self => ({
70
- /**
71
- * #getter
72
- */
73
38
  get width() {
74
39
  return self.volatileWidth;
75
40
  },
76
- /**
77
- * #getter
78
- */
79
41
  get assemblyNames() {
80
42
  return [...new Set(self.displayedRegions.map(r => r.assemblyName))];
81
43
  },
82
- /**
83
- * #getter
84
- */
85
44
  get displayedRegionsTotalPx() {
86
45
  return this.totalBp / self.bpPerPx;
87
46
  },
88
- /**
89
- * #getter
90
- */
91
47
  get maxOffset() {
92
- // objectively determined to keep the linear genome on the main screen
93
48
  const leftPadding = 10;
94
49
  return this.displayedRegionsTotalPx - leftPadding;
95
50
  },
96
- /**
97
- * #getter
98
- */
99
51
  get minOffset() {
100
- // objectively determined to keep the linear genome on the main screen
101
52
  const rightPadding = 30;
102
53
  return -this.width + rightPadding;
103
54
  },
104
- /**
105
- * #getter
106
- */
107
55
  get totalBp() {
108
56
  return (0, index_1.sum)(self.displayedRegions.map(a => a.end - a.start));
109
57
  },
110
58
  }))
111
59
  .views(self => ({
112
- /**
113
- * #getter
114
- */
115
60
  get dynamicBlocks() {
116
61
  return (0, calculateDynamicBlocks_1.default)(self);
117
62
  },
118
- /**
119
- * #getter
120
- */
121
63
  get staticBlocks() {
122
64
  return (0, calculateStaticBlocks_1.default)(self);
123
65
  },
124
- /**
125
- * #getter
126
- */
127
66
  get currBp() {
128
67
  return (0, index_1.sum)(this.dynamicBlocks.map(a => a.end - a.start));
129
68
  },
130
69
  }))
131
70
  .views(self => ({
132
- /**
133
- * #method
134
- */
135
71
  pxToBp(px) {
136
72
  return (0, Base1DUtils_1.pxToBp)(self, px);
137
73
  },
138
- /**
139
- * #method
140
- */
141
74
  bpToPx({ refName, coord, regionNumber, }) {
142
75
  var _a;
143
76
  return (_a = (0, Base1DUtils_1.bpToPx)({ refName, coord, regionNumber, self })) === null || _a === void 0 ? void 0 : _a.offsetPx;
144
77
  },
145
78
  }))
146
79
  .actions(self => ({
147
- /**
148
- * #action
149
- */
150
80
  setFeatures(features) {
151
81
  self.features = features;
152
82
  },
153
- /**
154
- * #action
155
- * this makes a zoomed out view that shows all displayedRegions that makes
156
- * the overview bar square with the scale bar
157
- */
158
83
  showAllRegions() {
159
84
  self.bpPerPx = self.totalBp / self.width;
160
85
  self.offsetPx = 0;
161
86
  },
162
- /**
163
- * #action
164
- */
165
87
  zoomOut() {
166
88
  this.zoomTo(self.bpPerPx * 2);
167
89
  },
168
- /**
169
- * #action
170
- */
171
90
  zoomIn() {
172
91
  this.zoomTo(self.bpPerPx / 2);
173
92
  },
174
- /**
175
- * #action
176
- */
177
93
  zoomTo(bpPerPx, offset = self.width / 2) {
178
94
  const newBpPerPx = (0, index_1.clamp)(bpPerPx, 'minBpPerPx' in self ? self.minBpPerPx : 0, 'maxBpPerPx' in self
179
95
  ? self.maxBpPerPx
@@ -183,22 +99,14 @@ const Base1DView = mobx_state_tree_1.types
183
99
  return oldBpPerPx;
184
100
  }
185
101
  self.bpPerPx = newBpPerPx;
186
- // tweak the offset so that the center of the view remains at the same
187
- // coordinate
188
102
  self.offsetPx = (0, index_1.clamp)(Math.round(((self.offsetPx + offset) * oldBpPerPx) / newBpPerPx - offset), self.minOffset, self.maxOffset);
189
103
  return self.bpPerPx;
190
104
  },
191
- /**
192
- * #action
193
- */
194
105
  scrollTo(offsetPx) {
195
106
  const newOffsetPx = (0, index_1.clamp)(offsetPx, self.minOffset, self.maxOffset);
196
107
  self.offsetPx = newOffsetPx;
197
108
  return newOffsetPx;
198
109
  },
199
- /**
200
- * #action
201
- */
202
110
  centerAt(coord, refName, regionNumber) {
203
111
  if (!refName) {
204
112
  return;
@@ -212,10 +120,6 @@ const Base1DView = mobx_state_tree_1.types
212
120
  this.scrollTo(Math.round(centerPx - self.width / 2));
213
121
  }
214
122
  },
215
- /**
216
- * #action
217
- * note: the scroll is clamped to keep the view on the main screen
218
- */
219
123
  scroll(distance) {
220
124
  const oldOffsetPx = self.offsetPx;
221
125
  const newOffsetPx = (0, index_1.clamp)(self.offsetPx + distance, self.minOffset, self.maxOffset);
@@ -224,14 +128,6 @@ const Base1DView = mobx_state_tree_1.types
224
128
  },
225
129
  }))
226
130
  .actions(self => ({
227
- /**
228
- * #action
229
- * offset is the base-pair-offset in the displayed region, index is the
230
- * index of the displayed region in the linear genome view
231
- *
232
- * @param start - object as `{start, end, offset, index}`
233
- * @param end - object as `{start, end, offset, index}`
234
- */
235
131
  moveTo(start, end) {
236
132
  (0, Base1DUtils_1.moveTo)(self, start, end);
237
133
  },
package/util/QuickLRU.js CHANGED
@@ -1,12 +1,5 @@
1
1
  "use strict";
2
- // vendored from quick-lru@6.1.1, didn't like being compiled as a 'pure-esm' nodejs dependency
3
- // the license is reproduced below https://github.com/sindresorhus/quick-lru/blob/main/license
4
- // MIT License
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- // Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
7
- // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
- // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
3
  class QuickLRU extends Map {
11
4
  constructor(options = {}) {
12
5
  super();
@@ -16,7 +9,6 @@ class QuickLRU extends Map {
16
9
  if (typeof options.maxAge === 'number' && options.maxAge === 0) {
17
10
  throw new TypeError('`maxAge` must be a number greater than 0');
18
11
  }
19
- // TODO: Use private class fields when ESLint supports them.
20
12
  this.maxSize = options.maxSize;
21
13
  this.maxAge = options.maxAge || Number.POSITIVE_INFINITY;
22
14
  this.onEviction = options.onEviction;
@@ -24,7 +16,6 @@ class QuickLRU extends Map {
24
16
  this.oldCache = new Map();
25
17
  this._size = 0;
26
18
  }
27
- // TODO: Use private class methods when targeting Node.js 16.
28
19
  _emitEvictions(cache) {
29
20
  if (typeof this.onEviction !== 'function') {
30
21
  return;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // adapted from https://github.com/mobxjs/mobx-state-tree/blob/master/packages/mst-middlewares/src/time-traveller.ts
4
3
  const mobx_state_tree_1 = require("mobx-state-tree");
5
4
  const MAX_HISTORY_LENGTH = 20;
6
5
  function debounce(func, timeout = 300) {
@@ -34,11 +33,9 @@ const TimeTraveller = mobx_state_tree_1.types
34
33
  let snapshotDisposer;
35
34
  let skipNextUndoState = false;
36
35
  return {
37
- // allows user code to (temporarily) stop tracking undo states
38
36
  stopTrackingUndo() {
39
37
  self.notTrackingUndo = true;
40
38
  },
41
- // allows user code to resume tracking undo states
42
39
  resumeTrackingUndo() {
43
40
  self.notTrackingUndo = false;
44
41
  },
@@ -47,7 +44,6 @@ const TimeTraveller = mobx_state_tree_1.types
47
44
  return;
48
45
  }
49
46
  if (skipNextUndoState) {
50
- // skip recording if this state was caused by undo / redo
51
47
  skipNextUndoState = false;
52
48
  return;
53
49
  }
@@ -2,29 +2,9 @@ import { Observable } from 'rxjs';
2
2
  declare class AbortError extends Error {
3
3
  code: string | undefined;
4
4
  }
5
- /**
6
- * properly check if the given AbortSignal is aborted.
7
- * per the standard, if the signal reads as aborted,
8
- * this function throws either a DOMException AbortError, or a regular error
9
- * with a `code` attribute set to `ERR_ABORTED`.
10
- *
11
- * for convenience, passing `undefined` is a no-op
12
- *
13
- * @param signal -
14
- * @returns nothing
15
- */
16
5
  export declare function checkAbortSignal(signal?: AbortSignal): void;
17
- /**
18
- * Skips to the next tick, then runs `checkAbortSignal`.
19
- * Await this to inside an otherwise synchronous loop to
20
- * provide a place to break when an abort signal is received.
21
- */
22
6
  export declare function abortBreakPoint(signal?: AbortSignal): Promise<void>;
23
7
  export declare function makeAbortError(): AbortError | DOMException;
24
8
  export declare function observeAbortSignal(signal?: AbortSignal): Observable<Event>;
25
- /**
26
- * check if the given exception was caused by an operation being intentionally aborted
27
- * @param exception -
28
- */
29
9
  export declare function isAbortException(exception: unknown): boolean;
30
10
  export {};
package/util/aborting.js CHANGED
@@ -8,17 +8,6 @@ exports.isAbortException = isAbortException;
8
8
  const rxjs_1 = require("rxjs");
9
9
  class AbortError extends Error {
10
10
  }
11
- /**
12
- * properly check if the given AbortSignal is aborted.
13
- * per the standard, if the signal reads as aborted,
14
- * this function throws either a DOMException AbortError, or a regular error
15
- * with a `code` attribute set to `ERR_ABORTED`.
16
- *
17
- * for convenience, passing `undefined` is a no-op
18
- *
19
- * @param signal -
20
- * @returns nothing
21
- */
22
11
  function checkAbortSignal(signal) {
23
12
  if (!signal) {
24
13
  return;
@@ -33,16 +22,7 @@ function checkAbortSignal(signal) {
33
22
  function timeout(ms) {
34
23
  return new Promise(resolve => setTimeout(resolve, ms));
35
24
  }
36
- /**
37
- * Skips to the next tick, then runs `checkAbortSignal`.
38
- * Await this to inside an otherwise synchronous loop to
39
- * provide a place to break when an abort signal is received.
40
- */
41
25
  async function abortBreakPoint(signal) {
42
- // it was observed that an actual timeout is needed to get the aborting (wrap
43
- // hicrenderer in a try catch, console.error the error, and rethrow the error
44
- // to see). using await Promise.resolve() did not appear to allow aborting to
45
- // occur
46
26
  await timeout(1);
47
27
  checkAbortSignal(signal);
48
28
  }
@@ -60,20 +40,9 @@ function observeAbortSignal(signal) {
60
40
  }
61
41
  return (0, rxjs_1.fromEvent)(signal, 'abort');
62
42
  }
63
- /**
64
- * check if the given exception was caused by an operation being intentionally aborted
65
- * @param exception -
66
- */
67
43
  function isAbortException(exception) {
68
44
  return (exception instanceof Error &&
69
- // DOMException
70
45
  (exception.name === 'AbortError' ||
71
- // standard-ish non-DOM abort exception
72
46
  exception.code === 'ERR_ABORTED' ||
73
- // message contains aborted for bubbling through RPC
74
- // things we have seen that we want to catch here
75
- // Error: aborted
76
- // AbortError: aborted
77
- // AbortError: The user aborted a request.
78
47
  !!/\b(aborted|aborterror)\b/i.test(exception.message)));
79
48
  }
package/util/analytics.js CHANGED
@@ -12,7 +12,6 @@ async function writeAWSAnalytics(rootModel, initialTimeStamp, sessionQuery) {
12
12
  const savedSessionCount = Object.keys(localStorage).filter(name => name.includes('localSaved-')).length;
13
13
  const { jbrowse: config, session, version: ver } = rootModel;
14
14
  const { tracks, assemblies, plugins } = config;
15
- // stats to be recorded in db
16
15
  const stats = {
17
16
  ver,
18
17
  'plugins-count': (plugins === null || plugins === void 0 ? void 0 : plugins.length) || 0,
@@ -23,29 +22,23 @@ async function writeAWSAnalytics(rootModel, initialTimeStamp, sessionQuery) {
23
22
  'open-views': (session === null || session === void 0 ? void 0 : session.views.length) || 0,
24
23
  'synteny-tracks-count': multiAssemblyTracks,
25
24
  'saved-sessions-count': savedSessionCount,
26
- // field if existing session param in query before autogenerated param
27
25
  'existing-session-param-type': (sessionQuery === null || sessionQuery === void 0 ? void 0 : sessionQuery.split('-')[0]) || 'none',
28
- // screen geometry
29
26
  'scn-h': window.screen.height,
30
27
  'scn-w': window.screen.width,
31
- // window geometry
32
28
  'win-h': window.innerHeight,
33
29
  'win-w': window.innerWidth,
34
30
  electron: util_1.isElectron,
35
31
  loadTime: (Date.now() - initialTimeStamp) / 1000,
36
32
  jb2: true,
37
33
  };
38
- // stringifies the track type counts, gets processed in lambda
39
34
  tracks.forEach((track) => {
40
35
  const key = `track-types-${track.type}`;
41
36
  stats[key] = stats[key] + 1 || 1;
42
37
  });
43
- // stringifies the session track type counts, gets processed in lambda
44
38
  session === null || session === void 0 ? void 0 : session.sessionTracks.forEach((track) => {
45
39
  const key = `sessionTrack-types-${track.type}`;
46
40
  stats[key] = stats[key] + 1 || 1;
47
41
  });
48
- // put stats into a query string for get request
49
42
  const qs = Object.keys(stats)
50
43
  .map(key => `${key}=${stats[key]}`)
51
44
  .join('&');
@@ -59,13 +52,12 @@ async function writeGAAnalytics(rootModel, initialTimestamp) {
59
52
  var _a;
60
53
  const jbrowseUser = 'UA-7115575-5';
61
54
  const stats = {
62
- 'tracks-count': rootModel.jbrowse.tracks.length, // this is all possible tracks
55
+ 'tracks-count': rootModel.jbrowse.tracks.length,
63
56
  ver: rootModel.version,
64
57
  electron: util_1.isElectron,
65
58
  loadTime: Date.now() - initialTimestamp,
66
59
  pluginNames: ((_a = rootModel.jbrowse.plugins) === null || _a === void 0 ? void 0 : _a.map((plugin) => plugin.name)) || '',
67
60
  };
68
- // create script
69
61
  let analyticsScript = "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){";
70
62
  analyticsScript +=
71
63
  '(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),';
@@ -88,10 +80,7 @@ async function writeGAAnalytics(rootModel, initialTimestamp) {
88
80
  function doAnalytics(rootModel, initialTimestamp, initialSessionQuery) {
89
81
  if (rootModel &&
90
82
  !(0, configuration_1.readConfObject)(rootModel.jbrowse.configuration, 'disableAnalytics')) {
91
- // ok if these are unhandled
92
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
93
83
  writeAWSAnalytics(rootModel, initialTimestamp, initialSessionQuery);
94
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
95
84
  writeGAAnalytics(rootModel, initialTimestamp);
96
85
  }
97
86
  }
@@ -33,9 +33,6 @@ export declare class BaseBlock {
33
33
  widthPx: number;
34
34
  variant?: string;
35
35
  isLeftEndOfDisplayedRegion?: boolean;
36
- /**
37
- * a block that should be shown as filled with data
38
- */
39
36
  constructor(data: Record<string, any>);
40
37
  toRegion(): {
41
38
  refName: string;
@@ -48,10 +45,6 @@ export declare class BaseBlock {
48
45
  export declare class ContentBlock extends BaseBlock {
49
46
  type: string;
50
47
  }
51
- /**
52
- * marker block representing one or more blocks that are
53
- * too small to be shown at the current zoom level
54
- */
55
48
  export declare class ElidedBlock extends BaseBlock {
56
49
  type: string;
57
50
  widthPx: number;
@@ -59,10 +52,6 @@ export declare class ElidedBlock extends BaseBlock {
59
52
  constructor(data: Record<string, any>);
60
53
  push(otherBlock: ElidedBlock): void;
61
54
  }
62
- /**
63
- * marker block that sits between two different displayed regions
64
- * and provides a thick border between them
65
- */
66
55
  export declare class InterRegionPaddingBlock extends BaseBlock {
67
56
  type: string;
68
57
  }