@jbrowse/core 2.17.0 → 2.18.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 (308) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +1 -2
  2. package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +4 -8
  3. package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +1 -1
  4. package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +1 -2
  5. package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +2 -3
  6. package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +1 -1
  7. package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +2 -3
  8. package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +22 -25
  9. package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +2 -2
  10. package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +6 -8
  11. package/BaseFeatureWidget/BaseFeatureDetail/Position.d.ts +1 -1
  12. package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +1 -1
  13. package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +1 -1
  14. package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +1 -1
  15. package/BaseFeatureWidget/BaseFeatureDetail/index.js +1 -7
  16. package/BaseFeatureWidget/BaseFeatureDetail/util.js +0 -5
  17. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +2 -2
  18. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +0 -7
  19. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +2 -2
  20. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +1 -7
  21. package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +3 -3
  22. package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +24 -33
  23. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +1 -2
  24. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +2 -2
  25. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +3 -4
  26. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.d.ts +2 -2
  27. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +3 -6
  28. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +1 -1
  29. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +1 -1
  30. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +2 -2
  31. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +2 -2
  32. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +1 -2
  33. package/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +2 -56
  34. package/BaseFeatureWidget/SequenceFeatureDetails/model.js +1 -56
  35. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +3 -3
  36. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.d.ts +2 -2
  37. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.js +5 -6
  38. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.d.ts +2 -2
  39. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.js +0 -1
  40. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.d.ts +2 -2
  41. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.js +0 -2
  42. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.d.ts +1 -1
  43. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +1 -3
  44. package/BaseFeatureWidget/SequenceFeatureDetails/util.js +1 -5
  45. package/BaseFeatureWidget/stateModelFactory.d.ts +2 -93
  46. package/BaseFeatureWidget/stateModelFactory.js +3 -73
  47. package/BaseFeatureWidget/types.d.ts +3 -3
  48. package/BaseFeatureWidget/util.js +0 -4
  49. package/CorePlugin.d.ts +1 -1
  50. package/CorePlugin.js +2 -5
  51. package/Plugin.d.ts +2 -5
  52. package/Plugin.js +0 -3
  53. package/PluginLoader.d.ts +1 -1
  54. package/PluginLoader.js +2 -19
  55. package/PluginManager.d.ts +15 -31
  56. package/PluginManager.js +11 -39
  57. package/ReExports/DataGrid.js +0 -1
  58. package/ReExports/list.d.ts +0 -5
  59. package/ReExports/list.js +0 -5
  60. package/ReExports/modules.d.ts +22 -20
  61. package/ReExports/modules.js +16 -25
  62. package/TextSearch/BaseResults.d.ts +3 -3
  63. package/TextSearch/TextSearchManager.d.ts +4 -16
  64. package/TextSearch/TextSearchManager.js +1 -13
  65. package/assemblyManager/assembly.d.ts +5 -100
  66. package/assemblyManager/assembly.js +27 -143
  67. package/assemblyManager/assemblyConfigSchema.d.ts +1 -34
  68. package/assemblyManager/assemblyConfigSchema.js +12 -46
  69. package/assemblyManager/assemblyManager.d.ts +7 -57
  70. package/assemblyManager/assemblyManager.js +2 -57
  71. package/configuration/configurationSchema.d.ts +4 -4
  72. package/configuration/configurationSchema.js +2 -14
  73. package/configuration/configurationSlot.d.ts +1 -12
  74. package/configuration/configurationSlot.js +2 -32
  75. package/configuration/index.d.ts +2 -2
  76. package/configuration/index.js +2 -2
  77. package/configuration/types.d.ts +2 -3
  78. package/configuration/util.d.ts +1 -25
  79. package/configuration/util.js +19 -56
  80. package/data_adapters/BaseAdapter/BaseAdapter.d.ts +4 -14
  81. package/data_adapters/BaseAdapter/BaseAdapter.js +1 -10
  82. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +5 -114
  83. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +3 -79
  84. package/data_adapters/BaseAdapter/BaseOptions.d.ts +2 -2
  85. package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +2 -2
  86. package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +3 -6
  87. package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +3 -3
  88. package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +3 -3
  89. package/data_adapters/BaseAdapter/index.d.ts +4 -4
  90. package/data_adapters/BaseAdapter/types.d.ts +2 -2
  91. package/data_adapters/BaseAdapter/util.d.ts +6 -6
  92. package/data_adapters/CytobandAdapter/CytobandAdapter.d.ts +1 -1
  93. package/data_adapters/CytobandAdapter/CytobandAdapter.js +1 -2
  94. package/data_adapters/CytobandAdapter/configSchema.d.ts +0 -3
  95. package/data_adapters/CytobandAdapter/configSchema.js +1 -7
  96. package/data_adapters/CytobandAdapter/index.d.ts +1 -1
  97. package/data_adapters/CytobandAdapter/index.js +1 -1
  98. package/data_adapters/dataAdapterCache.d.ts +4 -21
  99. package/data_adapters/dataAdapterCache.js +0 -19
  100. package/package.json +3 -4
  101. package/pluggableElementTypes/AdapterType.d.ts +2 -2
  102. package/pluggableElementTypes/AddTrackWorkflowType.d.ts +2 -2
  103. package/pluggableElementTypes/ConnectionType.d.ts +3 -3
  104. package/pluggableElementTypes/DisplayType.d.ts +3 -9
  105. package/pluggableElementTypes/InternetAccountType.d.ts +2 -2
  106. package/pluggableElementTypes/PluggableElementBase.d.ts +1 -1
  107. package/pluggableElementTypes/PluggableElementBase.js +2 -2
  108. package/pluggableElementTypes/RpcMethodType.d.ts +5 -11
  109. package/pluggableElementTypes/RpcMethodType.js +7 -19
  110. package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +9 -0
  111. package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.js +35 -0
  112. package/pluggableElementTypes/TextSearchAdapterType.d.ts +2 -2
  113. package/pluggableElementTypes/TrackType.d.ts +3 -3
  114. package/pluggableElementTypes/ViewType.d.ts +3 -3
  115. package/pluggableElementTypes/WidgetType.d.ts +4 -3
  116. package/pluggableElementTypes/index.d.ts +11 -11
  117. package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -29
  118. package/pluggableElementTypes/models/BaseConnectionModelFactory.js +1 -28
  119. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +3 -83
  120. package/pluggableElementTypes/models/BaseDisplayModel.js +2 -69
  121. package/pluggableElementTypes/models/BaseTrackModel.d.ts +4 -46
  122. package/pluggableElementTypes/models/BaseTrackModel.js +0 -58
  123. package/pluggableElementTypes/models/BaseViewModel.d.ts +2 -42
  124. package/pluggableElementTypes/models/BaseViewModel.js +2 -38
  125. package/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -119
  126. package/pluggableElementTypes/models/InternetAccountModel.js +3 -123
  127. package/pluggableElementTypes/models/baseConnectionConfig.d.ts +0 -6
  128. package/pluggableElementTypes/models/baseConnectionConfig.js +1 -13
  129. package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +0 -15
  130. package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -23
  131. package/pluggableElementTypes/models/baseTrackConfig.d.ts +2 -53
  132. package/pluggableElementTypes/models/baseTrackConfig.js +1 -58
  133. package/pluggableElementTypes/renderers/BoxRendererType.d.ts +7 -15
  134. package/pluggableElementTypes/renderers/BoxRendererType.js +3 -14
  135. package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +3 -2
  136. package/pluggableElementTypes/renderers/CircularChordRendererType.js +1 -6
  137. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +6 -21
  138. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +2 -25
  139. package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +5 -47
  140. package/pluggableElementTypes/renderers/FeatureRendererType.js +15 -68
  141. package/pluggableElementTypes/renderers/RendererType.d.ts +4 -8
  142. package/pluggableElementTypes/renderers/RendererType.js +1 -5
  143. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -2
  144. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +3 -12
  145. package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
  146. package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +6 -14
  147. package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +9 -49
  148. package/pluggableElementTypes/renderers/ServerSideRendererType.js +7 -57
  149. package/pluggableElementTypes/renderers/index.d.ts +1 -1
  150. package/pluggableElementTypes/renderers/util/serializableFilterChain.js +1 -3
  151. package/rpc/BaseRpcDriver.d.ts +3 -4
  152. package/rpc/BaseRpcDriver.js +20 -80
  153. package/rpc/MainThreadRpcDriver.d.ts +3 -7
  154. package/rpc/MainThreadRpcDriver.js +0 -5
  155. package/rpc/RpcManager.d.ts +3 -3
  156. package/rpc/RpcManager.js +2 -4
  157. package/rpc/WebWorkerRpcDriver.d.ts +3 -2
  158. package/rpc/WebWorkerRpcDriver.js +2 -13
  159. package/rpc/baseRpcConfig.d.ts +0 -3
  160. package/rpc/baseRpcConfig.js +1 -7
  161. package/rpc/configSchema.d.ts +0 -6
  162. package/rpc/configSchema.js +2 -11
  163. package/rpc/mainThreadRpcConfig.js +1 -7
  164. package/rpc/methods/CoreFreeResources.d.ts +0 -6
  165. package/rpc/methods/CoreFreeResources.js +2 -9
  166. package/rpc/methods/CoreGetFeatureDensityStats.d.ts +4 -5
  167. package/rpc/methods/CoreGetFeatureDensityStats.js +1 -1
  168. package/rpc/methods/CoreGetFeatureDetails.d.ts +2 -7
  169. package/rpc/methods/CoreGetFeatureDetails.js +0 -5
  170. package/rpc/methods/CoreGetFeatures.d.ts +5 -5
  171. package/rpc/methods/CoreGetFeatures.js +4 -5
  172. package/rpc/methods/CoreGetFileInfo.d.ts +1 -2
  173. package/rpc/methods/CoreGetFileInfo.js +1 -1
  174. package/rpc/methods/CoreGetMetadata.d.ts +1 -2
  175. package/rpc/methods/CoreGetMetadata.js +1 -1
  176. package/rpc/methods/CoreGetRefNames.d.ts +1 -2
  177. package/rpc/methods/CoreGetRefNames.js +1 -1
  178. package/rpc/methods/CoreRender.d.ts +2 -6
  179. package/rpc/methods/CoreRender.js +5 -7
  180. package/rpc/methods/util.d.ts +3 -3
  181. package/rpc/methods/util.js +0 -1
  182. package/rpc/webWorkerRpcConfig.js +1 -7
  183. package/stories/JBrowseCore.stories.d.ts +1 -1
  184. package/stories/JBrowseCore.stories.js +3 -3
  185. package/stories/examples/WithSequencePanel.d.ts +1 -1
  186. package/stories/examples/WithSequencePanel.js +3 -3
  187. package/tsconfig.build.tsbuildinfo +1 -1
  188. package/ui/AppLogo.d.ts +1 -1
  189. package/ui/AppLogo.js +0 -2
  190. package/ui/AssemblySelector.d.ts +2 -2
  191. package/ui/AssemblySelector.js +0 -3
  192. package/ui/BaseTooltip.js +2 -6
  193. package/ui/CascadingMenu.d.ts +2 -2
  194. package/ui/CascadingMenu.js +3 -4
  195. package/ui/CascadingMenuButton.d.ts +1 -1
  196. package/ui/CascadingMenuButton.js +1 -1
  197. package/ui/ColorPicker.js +1 -7
  198. package/ui/Dialog.d.ts +1 -1
  199. package/ui/Dialog.js +2 -6
  200. package/ui/DropDownMenu.d.ts +1 -1
  201. package/ui/DropDownMenu.js +2 -2
  202. package/ui/EditableTypography.d.ts +1 -1
  203. package/ui/EditableTypography.js +1 -5
  204. package/ui/ErrorBoundary.d.ts +2 -1
  205. package/ui/ErrorMessage.js +2 -9
  206. package/ui/ErrorMessageStackTraceDialog.js +2 -10
  207. package/ui/FactoryResetDialog.js +1 -1
  208. package/ui/FatalErrorDialog.js +1 -1
  209. package/ui/FileSelector/FileSelector.d.ts +4 -3
  210. package/ui/FileSelector/FileSelector.js +40 -40
  211. package/ui/FileSelector/LocalFileChooser.d.ts +1 -1
  212. package/ui/FileSelector/LocalFileChooser.js +0 -1
  213. package/ui/FileSelector/UrlChooser.d.ts +4 -3
  214. package/ui/FileSelector/UrlChooser.js +5 -3
  215. package/ui/Icons.d.ts +1 -1
  216. package/ui/Icons.js +1 -7
  217. package/ui/LoadingEllipses.d.ts +1 -1
  218. package/ui/LoadingEllipses.js +3 -3
  219. package/ui/Menu.d.ts +1 -1
  220. package/ui/Menu.js +3 -10
  221. package/ui/MenuButton.d.ts +1 -1
  222. package/ui/ResizeHandle.js +2 -2
  223. package/ui/ReturnToImportFormDialog.js +1 -1
  224. package/ui/SanitizedHTML.js +1 -21
  225. package/ui/Snackbar.d.ts +2 -2
  226. package/ui/Snackbar.js +1 -2
  227. package/ui/SnackbarModel.d.ts +1 -26
  228. package/ui/SnackbarModel.js +2 -30
  229. package/ui/colors.d.ts +1 -1
  230. package/ui/colors.js +1 -1
  231. package/ui/react-colorful.js +0 -3
  232. package/ui/theme.d.ts +1 -1
  233. package/ui/theme.js +0 -40
  234. package/util/Base1DUtils.d.ts +1 -1
  235. package/util/Base1DUtils.js +0 -12
  236. package/util/Base1DViewModel.d.ts +4 -81
  237. package/util/Base1DViewModel.js +4 -108
  238. package/util/QuickLRU.js +0 -9
  239. package/util/TimeTraveller.js +0 -4
  240. package/util/aborting.d.ts +0 -20
  241. package/util/aborting.js +0 -31
  242. package/util/analytics.js +1 -12
  243. package/util/blockTypes.d.ts +0 -11
  244. package/util/blockTypes.js +0 -13
  245. package/util/calculateDynamicBlocks.d.ts +1 -20
  246. package/util/calculateDynamicBlocks.js +1 -22
  247. package/util/calculateStaticBlocks.d.ts +2 -2
  248. package/util/calculateStaticBlocks.js +0 -2
  249. package/util/color/cssColorsLevel4.js +0 -1
  250. package/util/color/index.d.ts +0 -19
  251. package/util/color/index.js +0 -30
  252. package/util/compositeMap.js +0 -2
  253. package/util/dedupe.js +0 -1
  254. package/util/formatFastaStrings.d.ts +0 -13
  255. package/util/formatFastaStrings.js +0 -13
  256. package/util/idMaker.d.ts +1 -1
  257. package/util/idMaker.js +16 -12
  258. package/util/index.d.ts +16 -164
  259. package/util/index.js +22 -282
  260. package/util/io/RemoteFileWithRangeCache.d.ts +3 -2
  261. package/util/io/RemoteFileWithRangeCache.js +6 -10
  262. package/util/io/index.d.ts +3 -4
  263. package/util/io/index.js +3 -17
  264. package/util/jexl.js +3 -13
  265. package/util/jexlStrings.d.ts +0 -6
  266. package/util/jexlStrings.js +0 -8
  267. package/util/layouts/BaseLayout.d.ts +1 -1
  268. package/util/layouts/GranularRectLayout.d.ts +1 -17
  269. package/util/layouts/GranularRectLayout.js +4 -81
  270. package/util/layouts/MultiLayout.d.ts +1 -6
  271. package/util/layouts/MultiLayout.js +0 -6
  272. package/util/layouts/PrecomputedLayout.d.ts +1 -4
  273. package/util/layouts/PrecomputedLayout.js +0 -5
  274. package/util/layouts/PrecomputedMultiLayout.js +0 -2
  275. package/util/layouts/SceneGraph.d.ts +0 -12
  276. package/util/layouts/SceneGraph.js +0 -13
  277. package/util/makeAbortableReaction.d.ts +2 -0
  278. package/util/makeAbortableReaction.js +50 -0
  279. package/util/map-obj.js +0 -4
  280. package/util/mst-reflection.d.ts +1 -14
  281. package/util/mst-reflection.js +1 -28
  282. package/util/nanoid.js +0 -31
  283. package/util/nextTick.d.ts +1 -0
  284. package/util/nextTick.js +6 -0
  285. package/util/offscreenCanvasPonyfill.d.ts +0 -1
  286. package/util/offscreenCanvasPonyfill.js +1 -9
  287. package/util/offscreenCanvasUtils.js +1 -8
  288. package/util/range.d.ts +0 -25
  289. package/util/range.js +0 -34
  290. package/util/rxjs.d.ts +3 -7
  291. package/util/rxjs.js +2 -9
  292. package/util/simpleFeature.d.ts +0 -50
  293. package/util/simpleFeature.js +0 -35
  294. package/util/stats.d.ts +3 -26
  295. package/util/stats.js +0 -25
  296. package/util/stopToken.d.ts +3 -0
  297. package/util/stopToken.js +29 -0
  298. package/util/tracks.d.ts +3 -25
  299. package/util/tracks.js +0 -30
  300. package/util/types/index.d.ts +14 -30
  301. package/util/types/index.js +5 -14
  302. package/util/types/mst.js +0 -9
  303. package/util/types/util.d.ts +2 -9
  304. package/util/useMeasure.js +0 -1
  305. package/util/when.d.ts +1 -15
  306. package/util/when.js +3 -70
  307. package/rpc/remoteAbortSignals.d.ts +0 -36
  308. package/rpc/remoteAbortSignals.js +0 -79
@@ -1,31 +1,14 @@
1
- import { SnapshotIn } from 'mobx-state-tree';
2
- import PluginManager from '../PluginManager';
3
- import { AnyConfigurationSchemaType } from '../configuration';
4
- import { AnyDataAdapter } from './BaseAdapter';
1
+ import type PluginManager from '../PluginManager';
2
+ import type { AnyConfigurationSchemaType } from '../configuration';
3
+ import type { AnyDataAdapter } from './BaseAdapter';
4
+ import type { SnapshotIn } from 'mobx-state-tree';
5
5
  type ConfigSnap = SnapshotIn<AnyConfigurationSchemaType>;
6
6
  export declare function adapterConfigCacheKey(conf?: Record<string, unknown>): string;
7
7
  interface AdapterCacheEntry {
8
8
  dataAdapter: AnyDataAdapter;
9
9
  sessionIds: Set<string>;
10
10
  }
11
- /**
12
- * instantiate a data adapter, or return an already-instantiated one if we have
13
- * one with the same configuration
14
- *
15
- * @param pluginManager
16
- *
17
- * @param sessionId - session ID of the associated worker session. used for
18
- * reference counting
19
- *
20
- * @param adapterConfigSnapshot - plain-JS configuration snapshot for the
21
- * adapter
22
- */
23
11
  export declare function getAdapter(pluginManager: PluginManager, sessionId: string, adapterConfigSnapshot: SnapshotIn<AnyConfigurationSchemaType>): Promise<AdapterCacheEntry>;
24
- /**
25
- * this is a callback that is passed to adapters that
26
- * allows them to get any sub-adapters that they need
27
- * internally, staying with the same worker session ID
28
- */
29
12
  export type getSubAdapterType = (adapterConfigSnap: ConfigSnap) => ReturnType<typeof getAdapter>;
30
13
  export declare function freeAdapterResources(specification: Record<string, any>): number;
31
14
  export declare function clearAdapterCache(): void;
@@ -12,20 +12,7 @@ function adapterConfigCacheKey(conf = {}) {
12
12
  return `${(0, idMaker_1.default)(conf)}`;
13
13
  }
14
14
  let adapterCache = {};
15
- /**
16
- * instantiate a data adapter, or return an already-instantiated one if we have
17
- * one with the same configuration
18
- *
19
- * @param pluginManager
20
- *
21
- * @param sessionId - session ID of the associated worker session. used for
22
- * reference counting
23
- *
24
- * @param adapterConfigSnapshot - plain-JS configuration snapshot for the
25
- * adapter
26
- */
27
15
  async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
28
- // cache the adapter object
29
16
  const cacheKey = adapterConfigCacheKey(adapterConfigSnapshot);
30
17
  if (!adapterCache[cacheKey]) {
31
18
  const adapterType = adapterConfigSnapshot === null || adapterConfigSnapshot === void 0 ? void 0 : adapterConfigSnapshot.type;
@@ -36,13 +23,10 @@ async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
36
23
  if (!dataAdapterType) {
37
24
  throw new Error(`unknown data adapter type ${adapterType}`);
38
25
  }
39
- // instantiate the data adapter's config schema so it gets its defaults,
40
- // callbacks, etc
41
26
  const adapterConfig = dataAdapterType.configSchema.create(adapterConfigSnapshot, { pluginManager });
42
27
  const getSubAdapter = getAdapter.bind(null, pluginManager, sessionId);
43
28
  const CLASS = await dataAdapterType.getAdapterClass();
44
29
  const dataAdapter = new CLASS(adapterConfig, getSubAdapter, pluginManager);
45
- // store it in our cache
46
30
  adapterCache[cacheKey] = {
47
31
  dataAdapter,
48
32
  sessionIds: new Set([sessionId]),
@@ -55,8 +39,6 @@ async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
55
39
  function freeAdapterResources(specification) {
56
40
  let deleteCount = 0;
57
41
  const specKeys = Object.keys(specification);
58
- // if we don't specify a range, delete any adapters that are only associated
59
- // with that session
60
42
  if (specKeys.length === 1 && specKeys[0] === 'sessionId') {
61
43
  const { sessionId } = specification;
62
44
  Object.entries(adapterCache).forEach(([cacheKey, cacheEntry]) => {
@@ -68,7 +50,6 @@ function freeAdapterResources(specification) {
68
50
  });
69
51
  }
70
52
  else {
71
- // otherwise call freeResources on all the cached data adapters
72
53
  Object.values(adapterCache).forEach(cacheEntry => {
73
54
  const regions = specification.regions ||
74
55
  (specification.region ? [specification.region] : []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/core",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "description": "JBrowse 2 core libraries used by plugins",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -31,15 +31,14 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.17.9",
34
+ "@floating-ui/react": "^0.27.0",
34
35
  "@gmod/abortable-promise-cache": "^2.0.0",
35
36
  "@gmod/bgzf-filehandle": "^1.4.3",
36
37
  "@gmod/http-range-fetcher": "^3.0.4",
37
38
  "@mui/icons-material": "^6.0.0",
38
39
  "@mui/x-data-grid": "^7.0.0",
39
- "@types/clone": "^2.0.0",
40
40
  "canvas-sequencer": "^3.1.0",
41
41
  "canvas2svg": "^1.0.16",
42
- "clone": "^2.1.2",
43
42
  "colord": "^2.9.3",
44
43
  "copy-to-clipboard": "^3.3.1",
45
44
  "deepmerge": "^4.2.2",
@@ -72,5 +71,5 @@
72
71
  "access": "public",
73
72
  "directory": "dist"
74
73
  },
75
- "gitHead": "eed30b5e671f8f7823652d7cecc51aa89226de46"
74
+ "gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
76
75
  }
@@ -1,6 +1,6 @@
1
1
  import PluggableElementBase from './PluggableElementBase';
2
- import { AnyConfigurationSchemaType } from '../configuration';
3
- import { AnyAdapter } from '../data_adapters/BaseAdapter';
2
+ import type { AnyConfigurationSchemaType } from '../configuration';
3
+ import type { AnyAdapter } from '../data_adapters/BaseAdapter';
4
4
  export interface AdapterMetadata {
5
5
  category?: string;
6
6
  hiddenFromGUI?: boolean;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { IAnyModelType } from 'mobx-state-tree';
1
+ import type React from 'react';
3
2
  import PluggableElementBase from './PluggableElementBase';
3
+ import type { IAnyModelType } from 'mobx-state-tree';
4
4
  type BasicComponent = React.ComponentType<{
5
5
  model: any;
6
6
  }>;
@@ -1,7 +1,7 @@
1
- import { IAnyModelType } from 'mobx-state-tree';
2
1
  import PluggableElementBase from './PluggableElementBase';
3
- import { AnyConfigurationSchemaType } from '../configuration';
4
- import { AnyReactComponentType } from '../util';
2
+ import type { AnyConfigurationSchemaType } from '../configuration';
3
+ import type { AnyReactComponentType } from '../util';
4
+ import type { IAnyModelType } from 'mobx-state-tree';
5
5
  export default class ConnectionType extends PluggableElementBase {
6
6
  stateModel: IAnyModelType;
7
7
  configSchema: AnyConfigurationSchemaType;
@@ -1,22 +1,16 @@
1
- import { IAnyModelType } from 'mobx-state-tree';
2
1
  import PluggableElementBase from './PluggableElementBase';
3
- import { AnyReactComponentType } from '../util';
4
- import { AnyConfigurationSchemaType } from '../configuration';
2
+ import type { AnyConfigurationSchemaType } from '../configuration';
3
+ import type { AnyReactComponentType } from '../util';
4
+ import type { IAnyModelType } from 'mobx-state-tree';
5
5
  export default class DisplayType extends PluggableElementBase {
6
6
  stateModel: IAnyModelType;
7
7
  configSchema: AnyConfigurationSchemaType;
8
8
  ReactComponent: AnyReactComponentType;
9
- /**
10
- * The track type the display is associated with
11
- */
12
9
  trackType: string;
13
10
  subDisplay?: {
14
11
  type: string;
15
12
  [key: string]: unknown;
16
13
  };
17
- /**
18
- * The view type the display is associated with
19
- */
20
14
  viewType: string;
21
15
  constructor(stuff: {
22
16
  name: string;
@@ -1,6 +1,6 @@
1
- import { IAnyModelType } from 'mobx-state-tree';
2
1
  import PluggableElementBase from './PluggableElementBase';
3
- import { AnyConfigurationSchemaType } from '../configuration/types';
2
+ import type { AnyConfigurationSchemaType } from '../configuration/types';
3
+ import type { IAnyModelType } from 'mobx-state-tree';
4
4
  export default class InternetAccountType extends PluggableElementBase {
5
5
  stateModel: IAnyModelType;
6
6
  configSchema: AnyConfigurationSchemaType;
@@ -1,7 +1,7 @@
1
1
  export default abstract class PluggableElementBase {
2
2
  name: string;
3
3
  maybeDisplayName?: string;
4
- constructor(args: {
4
+ constructor(args?: {
5
5
  name?: string;
6
6
  displayName?: string;
7
7
  });
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class PluggableElementBase {
4
4
  constructor(args) {
5
- this.name = args.name || 'UNKNOWN';
6
- this.maybeDisplayName = args.displayName;
5
+ this.name = (args === null || args === void 0 ? void 0 : args.name) || 'UNKNOWN';
6
+ this.maybeDisplayName = args === null || args === void 0 ? void 0 : args.displayName;
7
7
  }
8
8
  get displayName() {
9
9
  return this.maybeDisplayName || this.name;
@@ -1,23 +1,17 @@
1
- import PluginManager from '../PluginManager';
2
1
  import PluggableElementBase from './PluggableElementBase';
3
- import { UriLocation } from '../util/types';
4
- import { RemoteAbortSignal } from '../rpc/remoteAbortSignals';
5
- interface SerializedArgs {
6
- signal?: RemoteAbortSignal;
7
- blobMap?: Record<string, File>;
8
- }
2
+ import type PluginManager from '../PluginManager';
3
+ import type { UriLocation } from '../util/types';
9
4
  export type RpcMethodConstructor = new (pm: PluginManager) => RpcMethodType;
10
5
  export default abstract class RpcMethodType extends PluggableElementBase {
11
6
  pluginManager: PluginManager;
12
7
  constructor(pluginManager: PluginManager);
13
8
  serializeArguments(args: Record<string, unknown>, rpcDriverClassName: string): Promise<Record<string, unknown>>;
14
9
  serializeNewAuthArguments(loc: UriLocation, rpcDriverClassName: string): Promise<UriLocation>;
15
- deserializeArguments<T extends SerializedArgs>(serializedArgs: T, _rpcDriverClassName: string): Promise<T & {
16
- signal: AbortSignal | undefined;
17
- }>;
10
+ deserializeArguments<T>(args: T & {
11
+ blobMap?: Record<string, File>;
12
+ }, _rpcDriverClassName: string): Promise<T>;
18
13
  abstract execute(serializedArgs: unknown, rpcDriverClassName: string): Promise<unknown>;
19
14
  serializeReturn(originalReturn: unknown, _args: unknown, _rpcDriverClassName: string): Promise<unknown>;
20
15
  deserializeReturn(serializedReturn: unknown, _args: unknown, _rpcDriverClassName: string): Promise<unknown>;
21
16
  private augmentLocationObjects;
22
17
  }
23
- export {};
@@ -3,14 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const map_obj_1 = __importDefault(require("../util/map-obj"));
7
6
  const PluggableElementBase_1 = __importDefault(require("./PluggableElementBase"));
7
+ const map_obj_1 = __importDefault(require("../util/map-obj"));
8
8
  const tracks_1 = require("../util/tracks");
9
9
  const types_1 = require("../util/types");
10
- const remoteAbortSignals_1 = require("../rpc/remoteAbortSignals");
11
10
  class RpcMethodType extends PluggableElementBase_1.default {
12
11
  constructor(pluginManager) {
13
- super({});
12
+ super();
14
13
  this.pluginManager = pluginManager;
15
14
  }
16
15
  async serializeArguments(args, rpcDriverClassName) {
@@ -20,30 +19,21 @@ class RpcMethodType extends PluggableElementBase_1.default {
20
19
  }
21
20
  async serializeNewAuthArguments(loc, rpcDriverClassName) {
22
21
  const rootModel = this.pluginManager.rootModel;
23
- // args dont need auth or already have auth
24
22
  if (!(0, types_1.isAppRootModel)(rootModel) || loc.internetAccountPreAuthorization) {
25
23
  return loc;
26
24
  }
27
25
  const account = rootModel.findAppropriateInternetAccount(loc);
28
- // mutating loc object is not allowed in MainThreadRpcDriver, and is only
29
- // needed for web worker RPC
30
26
  if (account && rpcDriverClassName !== 'MainThreadRpcDriver') {
31
27
  loc.internetAccountPreAuthorization =
32
28
  await account.getPreAuthorizationInformation(loc);
33
29
  }
34
30
  return loc;
35
31
  }
36
- async deserializeArguments(serializedArgs, _rpcDriverClassName) {
37
- if (serializedArgs.blobMap) {
38
- (0, tracks_1.setBlobMap)(serializedArgs.blobMap);
32
+ async deserializeArguments(args, _rpcDriverClassName) {
33
+ if (args.blobMap) {
34
+ (0, tracks_1.setBlobMap)(args.blobMap);
39
35
  }
40
- const { signal } = serializedArgs;
41
- return {
42
- ...serializedArgs,
43
- signal: (0, remoteAbortSignals_1.isRemoteAbortSignal)(signal)
44
- ? (0, remoteAbortSignals_1.deserializeAbortSignal)(signal)
45
- : undefined,
46
- };
36
+ return args;
47
37
  }
48
38
  async serializeReturn(originalReturn, _args, _rpcDriverClassName) {
49
39
  return originalReturn;
@@ -56,8 +46,7 @@ class RpcMethodType extends PluggableElementBase_1.default {
56
46
  }
57
47
  catch (error) {
58
48
  if ((0, types_1.isAuthNeededException)(error)) {
59
- const retryAccount = // @ts-expect-error
60
- (_a = this.pluginManager.rootModel) === null || _a === void 0 ? void 0 : _a.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(error.url).origin}`, {}, error.url);
49
+ const retryAccount = (_a = this.pluginManager.rootModel) === null || _a === void 0 ? void 0 : _a.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(error.url).origin}`, {}, error.url);
61
50
  throw new types_1.RetryError('Retrying with created internet account', retryAccount.internetAccountId);
62
51
  }
63
52
  throw error;
@@ -66,7 +55,6 @@ class RpcMethodType extends PluggableElementBase_1.default {
66
55
  }
67
56
  async augmentLocationObjects(thing, rpcDriverClassName) {
68
57
  const uris = [];
69
- // using map-obj avoids cycles, seen in circular view svg export
70
58
  (0, map_obj_1.default)(thing, val => {
71
59
  if ((0, types_1.isUriLocation)(val)) {
72
60
  uris.push(val);
@@ -0,0 +1,9 @@
1
+ import RpcMethodType from './RpcMethodType';
2
+ import type { RenderArgs } from '@jbrowse/core/rpc/coreRpcMethods';
3
+ export default abstract class RpcMethodTypeWithFiltersAndRenameRegions extends RpcMethodType {
4
+ deserializeArguments(args: any, rpcDriverClassName: string): Promise<any>;
5
+ serializeArguments(args: RenderArgs & {
6
+ stopToken?: string;
7
+ statusCallback?: (arg: string) => void;
8
+ }, rpcDriverClassName: string): Promise<Record<string, unknown>>;
9
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const RpcMethodType_1 = __importDefault(require("./RpcMethodType"));
7
+ const util_1 = require("../util");
8
+ const serializableFilterChain_1 = __importDefault(require("./renderers/util/serializableFilterChain"));
9
+ class RpcMethodTypeWithFiltersAndRenameRegions extends RpcMethodType_1.default {
10
+ async deserializeArguments(args, rpcDriverClassName) {
11
+ const l = await super.deserializeArguments(args, rpcDriverClassName);
12
+ return {
13
+ ...l,
14
+ filters: args.filters
15
+ ? new serializableFilterChain_1.default({
16
+ filters: args.filters,
17
+ })
18
+ : undefined,
19
+ };
20
+ }
21
+ async serializeArguments(args, rpcDriverClassName) {
22
+ var _a, _b, _c;
23
+ const pm = this.pluginManager;
24
+ const assemblyManager = (_b = (_a = pm.rootModel) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.assemblyManager;
25
+ if (!assemblyManager) {
26
+ throw new Error('no assembly manager');
27
+ }
28
+ const renamedArgs = await (0, util_1.renameRegionsIfNeeded)(assemblyManager, {
29
+ ...args,
30
+ filters: (_c = args.filters) === null || _c === void 0 ? void 0 : _c.toJSON().filters,
31
+ });
32
+ return super.serializeArguments(renamedArgs, rpcDriverClassName);
33
+ }
34
+ }
35
+ exports.default = RpcMethodTypeWithFiltersAndRenameRegions;
@@ -1,6 +1,6 @@
1
1
  import PluggableElementBase from './PluggableElementBase';
2
- import { AnyConfigurationSchemaType } from '../configuration';
3
- import { AnyAdapter } from '../data_adapters/BaseAdapter';
2
+ import type { AnyConfigurationSchemaType } from '../configuration';
3
+ import type { AnyAdapter } from '../data_adapters/BaseAdapter';
4
4
  export default class TextSearchAdapterType extends PluggableElementBase {
5
5
  getAdapterClass: () => Promise<AnyAdapter>;
6
6
  configSchema: AnyConfigurationSchemaType;
@@ -1,7 +1,7 @@
1
- import { IAnyModelType } from 'mobx-state-tree';
2
1
  import PluggableElementBase from './PluggableElementBase';
3
- import { AnyConfigurationSchemaType } from '../configuration';
4
- import DisplayType from './DisplayType';
2
+ import type { AnyConfigurationSchemaType } from '../configuration';
3
+ import type DisplayType from './DisplayType';
4
+ import type { IAnyModelType } from 'mobx-state-tree';
5
5
  export default class TrackType extends PluggableElementBase {
6
6
  stateModel: IAnyModelType;
7
7
  configSchema: AnyConfigurationSchemaType;
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { IAnyModelType, IAnyStateTreeNode } from 'mobx-state-tree';
1
+ import type React from 'react';
3
2
  import PluggableElementBase from './PluggableElementBase';
4
- import DisplayType from './DisplayType';
3
+ import type DisplayType from './DisplayType';
4
+ import type { IAnyModelType, IAnyStateTreeNode } from 'mobx-state-tree';
5
5
  type BasicView = React.ComponentType<{
6
6
  model: any;
7
7
  session?: IAnyStateTreeNode;
@@ -1,7 +1,8 @@
1
- import React, { ComponentType, LazyExoticComponent } from 'react';
2
- import { IAnyModelType, IAnyStateTreeNode } from 'mobx-state-tree';
1
+ import type { ComponentType, LazyExoticComponent } from 'react';
2
+ import type React from 'react';
3
3
  import PluggableElementBase from './PluggableElementBase';
4
- import { AnyConfigurationSchemaType } from '../configuration';
4
+ import type { AnyConfigurationSchemaType } from '../configuration';
5
+ import type { IAnyModelType, IAnyStateTreeNode } from 'mobx-state-tree';
5
6
  type WidgetComponentType = LazyExoticComponent<React.FC<any>> | React.FC<any>;
6
7
  type HeadingComponentType = ComponentType<{
7
8
  model: IAnyStateTreeNode;
@@ -1,14 +1,14 @@
1
- import AdapterType from './AdapterType';
2
- import ConnectionType from './ConnectionType';
3
- import RendererType from './renderers/RendererType';
4
- import WidgetType from './WidgetType';
5
- import TrackType from './TrackType';
6
- import DisplayType from './DisplayType';
7
- import ViewType from './ViewType';
8
- import RpcMethodType from './RpcMethodType';
9
- import InternetAccountType from './InternetAccountType';
10
- import TextSearchAdapterType from './TextSearchAdapterType';
11
- import AddTrackWorkflowType from './AddTrackWorkflowType';
1
+ import type AdapterType from './AdapterType';
2
+ import type AddTrackWorkflowType from './AddTrackWorkflowType';
3
+ import type ConnectionType from './ConnectionType';
4
+ import type DisplayType from './DisplayType';
5
+ import type InternetAccountType from './InternetAccountType';
6
+ import type RpcMethodType from './RpcMethodType';
7
+ import type TextSearchAdapterType from './TextSearchAdapterType';
8
+ import type TrackType from './TrackType';
9
+ import type ViewType from './ViewType';
10
+ import type WidgetType from './WidgetType';
11
+ import type RendererType from './renderers/RendererType';
12
12
  export * from './renderers';
13
13
  export * from './models';
14
14
  export type PluggableElementType = AdapterType | ConnectionType | RendererType | WidgetType | TrackType | DisplayType | ViewType | RpcMethodType | InternetAccountType | TextSearchAdapterType | AddTrackWorkflowType;
@@ -1,21 +1,9 @@
1
- import { AnyConfigurationModel } from '../../configuration';
2
- import PluginManager from '../../PluginManager';
1
+ import type PluginManager from '../../PluginManager';
2
+ import type { AnyConfigurationModel } from '../../configuration';
3
3
  type TrackConf = AnyConfigurationModel | Record<string, unknown>;
4
- /**
5
- * #stateModel BaseConnectionModel
6
- */
7
4
  declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
8
- /**
9
- * #property
10
- */
11
5
  name: import("mobx-state-tree").ISimpleType<string>;
12
- /**
13
- * #property
14
- */
15
6
  tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
16
- /**
17
- * #property
18
- */
19
7
  configuration: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
20
8
  name: {
21
9
  type: string;
@@ -29,27 +17,12 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
29
17
  };
30
18
  }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
31
19
  }, {
32
- /**
33
- * #action
34
- */
35
20
  connect(_arg: AnyConfigurationModel): void;
36
21
  } & {
37
22
  afterAttach(): void;
38
- /**
39
- * #action
40
- */
41
23
  addTrackConf(trackConf: TrackConf): any;
42
- /**
43
- * #action
44
- */
45
24
  addTrackConfs(trackConfs: TrackConf[]): void;
46
- /**
47
- * #action
48
- */
49
25
  setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
50
- /**
51
- * #action
52
- */
53
26
  clear(): void;
54
27
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
55
28
  export type BaseConnectionModel = ReturnType<typeof stateModelFactory>;
@@ -4,31 +4,16 @@ 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 configuration_1 = require("../../configuration");
8
7
  const baseConnectionConfig_1 = __importDefault(require("./baseConnectionConfig"));
9
- /**
10
- * #stateModel BaseConnectionModel
11
- */
8
+ const configuration_1 = require("../../configuration");
12
9
  function stateModelFactory(pluginManager) {
13
10
  return mobx_state_tree_1.types
14
11
  .model('Connection', {
15
- /**
16
- * #property
17
- */
18
12
  name: mobx_state_tree_1.types.identifier,
19
- /**
20
- * #property
21
- */
22
13
  tracks: mobx_state_tree_1.types.array(pluginManager.pluggableConfigSchemaType('track')),
23
- /**
24
- * #property
25
- */
26
14
  configuration: (0, configuration_1.ConfigurationReference)(baseConnectionConfig_1.default),
27
15
  })
28
16
  .actions(() => ({
29
- /**
30
- * #action
31
- */
32
17
  connect(_arg) { },
33
18
  }))
34
19
  .actions(self => ({
@@ -37,28 +22,16 @@ function stateModelFactory(pluginManager) {
37
22
  self.connect(self.configuration);
38
23
  }
39
24
  },
40
- /**
41
- * #action
42
- */
43
25
  addTrackConf(trackConf) {
44
26
  const length = self.tracks.push(trackConf);
45
27
  return self.tracks[length - 1];
46
28
  },
47
- /**
48
- * #action
49
- */
50
29
  addTrackConfs(trackConfs) {
51
30
  self.tracks.push(...trackConfs);
52
31
  },
53
- /**
54
- * #action
55
- */
56
32
  setTrackConfs(trackConfs) {
57
33
  self.tracks = (0, mobx_state_tree_1.cast)(trackConfs);
58
34
  },
59
- /**
60
- * #action
61
- */
62
35
  clear() { },
63
36
  }));
64
37
  }