@jbrowse/core 2.13.1 → 2.14.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 (149) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +2 -2
  2. package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +1 -1
  3. package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +3 -1
  4. package/BaseFeatureWidget/BaseFeatureDetail/index.js +28 -25
  5. package/BaseFeatureWidget/BaseFeatureDetail/util.js +1 -1
  6. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +11 -5
  7. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +1 -1
  8. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +11 -7
  9. package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +1 -1
  10. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +6 -2
  11. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +11 -5
  12. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +15 -5
  13. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +4 -2
  14. package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +15 -5
  15. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +2 -2
  16. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +2 -2
  17. package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +5 -3
  18. package/BaseFeatureWidget/stateModelFactory.js +0 -2
  19. package/PluginLoader.d.ts +1 -2
  20. package/PluginLoader.js +16 -6
  21. package/PluginManager.d.ts +13 -13
  22. package/PluginManager.js +7 -2
  23. package/ReExports/modules.js +2 -11
  24. package/assemblyManager/assembly.d.ts +18 -12
  25. package/assemblyManager/assembly.js +75 -52
  26. package/assemblyManager/assemblyConfigSchema.d.ts +9 -7
  27. package/assemblyManager/assemblyConfigSchema.js +15 -16
  28. package/assemblyManager/assemblyManager.d.ts +109 -81
  29. package/assemblyManager/assemblyManager.js +3 -6
  30. package/configuration/configurationSchema.d.ts +1 -1
  31. package/configuration/configurationSchema.js +1 -2
  32. package/configuration/configurationSlot.js +7 -8
  33. package/configuration/util.js +0 -7
  34. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +6 -6
  35. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +6 -6
  36. package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +1 -0
  37. package/data_adapters/CytobandAdapter/CytobandAdapter.d.ts +0 -1
  38. package/data_adapters/CytobandAdapter/CytobandAdapter.js +4 -8
  39. package/data_adapters/dataAdapterCache.d.ts +9 -6
  40. package/data_adapters/dataAdapterCache.js +16 -22
  41. package/package.json +3 -3
  42. package/pluggableElementTypes/AddTrackWorkflowType.js +0 -6
  43. package/pluggableElementTypes/ConnectionType.js +0 -6
  44. package/pluggableElementTypes/DisplayType.js +0 -20
  45. package/pluggableElementTypes/InternetAccountType.js +0 -11
  46. package/pluggableElementTypes/RpcMethodType.d.ts +1 -1
  47. package/pluggableElementTypes/TextSearchAdapterType.js +0 -3
  48. package/pluggableElementTypes/TrackType.js +0 -11
  49. package/pluggableElementTypes/ViewType.js +0 -6
  50. package/pluggableElementTypes/WidgetType.js +0 -6
  51. package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +4 -3
  52. package/pluggableElementTypes/models/BaseConnectionModelFactory.js +1 -3
  53. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +4 -5
  54. package/pluggableElementTypes/models/BaseDisplayModel.js +6 -14
  55. package/pluggableElementTypes/models/BaseTrackModel.js +8 -5
  56. package/pluggableElementTypes/models/InternetAccountModel.d.ts +1 -1
  57. package/pluggableElementTypes/models/InternetAccountModel.js +19 -13
  58. package/pluggableElementTypes/models/baseTrackConfig.js +2 -5
  59. package/pluggableElementTypes/renderers/BoxRendererType.d.ts +10 -4
  60. package/pluggableElementTypes/renderers/BoxRendererType.js +10 -26
  61. package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +1 -1
  62. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +9 -12
  63. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +12 -19
  64. package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +5 -5
  65. package/pluggableElementTypes/renderers/FeatureRendererType.js +6 -13
  66. package/pluggableElementTypes/renderers/RendererType.js +0 -10
  67. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +1 -1
  68. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +8 -9
  69. package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +11 -14
  70. package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +4 -4
  71. package/pluggableElementTypes/renderers/ServerSideRendererType.js +7 -5
  72. package/pluggableElementTypes/renderers/util/serializableFilterChain.js +0 -1
  73. package/rpc/BaseRpcDriver.d.ts +1 -1
  74. package/rpc/BaseRpcDriver.js +12 -11
  75. package/rpc/MainThreadRpcDriver.d.ts +2 -2
  76. package/rpc/MainThreadRpcDriver.js +3 -0
  77. package/rpc/RpcManager.d.ts +1 -1
  78. package/rpc/RpcManager.js +11 -8
  79. package/rpc/configSchema.js +0 -1
  80. package/rpc/methods/CoreFreeResources.d.ts +2 -2
  81. package/rpc/methods/CoreGetFeatureDensityStats.d.ts +2 -2
  82. package/rpc/methods/CoreGetFeatureDetails.d.ts +1 -1
  83. package/rpc/methods/CoreGetFeatureDetails.js +3 -3
  84. package/rpc/methods/CoreGetFeatures.d.ts +1 -1
  85. package/rpc/methods/CoreGetFileInfo.d.ts +1 -1
  86. package/rpc/methods/CoreGetMetadata.d.ts +1 -1
  87. package/rpc/methods/CoreGetRefNames.d.ts +1 -1
  88. package/rpc/methods/util.d.ts +2 -2
  89. package/rpc/methods/util.js +0 -3
  90. package/tsconfig.build.tsbuildinfo +1 -1
  91. package/ui/AssemblySelector.js +3 -1
  92. package/ui/CascadingMenu.js +2 -1
  93. package/ui/CascadingMenuButton.js +3 -1
  94. package/ui/ColorPicker.js +14 -4
  95. package/ui/DropDownMenu.js +3 -1
  96. package/ui/EditableTypography.js +6 -2
  97. package/ui/ErrorMessage.d.ts +2 -2
  98. package/ui/ErrorMessage.js +37 -20
  99. package/ui/ErrorMessageStackTraceDialog.js +11 -9
  100. package/ui/FactoryResetDialog.d.ts +1 -1
  101. package/ui/FactoryResetDialog.js +9 -3
  102. package/ui/FatalErrorDialog.js +9 -3
  103. package/ui/FileSelector/FileSelector.js +8 -4
  104. package/ui/FileSelector/LocalFileChooser.js +7 -6
  105. package/ui/LoadingEllipses.js +1 -1
  106. package/ui/Menu.d.ts +4 -4
  107. package/ui/Menu.js +6 -9
  108. package/ui/MenuButton.js +6 -2
  109. package/ui/PrerenderedCanvas.js +8 -5
  110. package/ui/RedErrorMessageBox.js +13 -8
  111. package/ui/ResizeHandle.d.ts +1 -1
  112. package/ui/ReturnToImportFormDialog.js +3 -1
  113. package/ui/SanitizedHTML.js +1 -3
  114. package/ui/SnackbarModel.d.ts +12 -1
  115. package/ui/SnackbarModel.js +19 -3
  116. package/ui/theme.js +5 -5
  117. package/util/Base1DViewModel.js +3 -1
  118. package/util/QuickLRU.js +8 -8
  119. package/util/TimeTraveller.js +12 -4
  120. package/util/analytics.js +0 -1
  121. package/util/blockTypes.js +5 -9
  122. package/util/calculateStaticBlocks.d.ts +1 -1
  123. package/util/compositeMap.js +2 -2
  124. package/util/idMaker.js +0 -1
  125. package/util/index.d.ts +9 -8
  126. package/util/index.js +91 -51
  127. package/util/io/RemoteFileWithRangeCache.js +1 -3
  128. package/util/io/index.js +3 -5
  129. package/util/jexlStrings.js +5 -8
  130. package/util/layouts/GranularRectLayout.js +1 -4
  131. package/util/layouts/SceneGraph.d.ts +1 -1
  132. package/util/layouts/SceneGraph.js +2 -6
  133. package/util/map-obj.js +15 -7
  134. package/util/mst-reflection.js +1 -2
  135. package/util/nanoid.js +9 -8
  136. package/util/offscreenCanvasPonyfill.d.ts +1 -1
  137. package/util/offscreenCanvasPonyfill.js +7 -10
  138. package/util/offscreenCanvasUtils.d.ts +1 -1
  139. package/util/offscreenCanvasUtils.js +1 -3
  140. package/util/rxjs.js +4 -2
  141. package/util/simpleFeature.d.ts +2 -3
  142. package/util/simpleFeature.js +9 -12
  143. package/util/stats.js +3 -1
  144. package/util/tracks.d.ts +4 -2
  145. package/util/tracks.js +10 -11
  146. package/util/types/index.d.ts +5 -5
  147. package/util/types/index.js +8 -1
  148. package/util/types/mst.js +1 -0
  149. package/util/when.js +7 -2
@@ -18,16 +18,16 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
18
18
  configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
19
19
  }, {
20
20
  error: unknown;
21
- loaded: boolean;
22
21
  loadingP: Promise<void> | undefined;
23
22
  volatileRegions: import("./assembly").BasicRegion[] | undefined;
24
23
  refNameAliases: {
25
- [x: string]: string | undefined;
26
- } | undefined;
27
- lowerCaseRefNameAliases: {
28
- [x: string]: string | undefined;
24
+ [x: string]: string;
29
25
  } | undefined;
30
26
  cytobands: import("../util").Feature[] | undefined;
27
+ } & {
28
+ readonly lowerCaseRefNameAliases: {
29
+ [k: string]: string;
30
+ } | undefined;
31
31
  } & {
32
32
  getConf(arg: string): any;
33
33
  } & {
@@ -50,13 +50,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
50
50
  getRefNameColor(refName: string): string | undefined;
51
51
  isValidRefName(refName: string): boolean;
52
52
  } & {
53
- setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
53
+ setLoaded({ regions, refNameAliases, cytobands, }: {
54
+ regions: import("../util").Region[];
55
+ refNameAliases: {
56
+ [x: string]: string;
57
+ };
58
+ cytobands: import("../util").Feature[];
59
+ }): void;
54
60
  setError(e: unknown): void;
55
61
  setRegions(regions: import("../util").Region[]): void;
56
62
  setRefNameAliases(aliases: {
57
- [x: string]: string | undefined;
58
- }, lcAliases: {
59
- [x: string]: string | undefined;
63
+ [x: string]: string;
60
64
  }): void;
61
65
  setCytobands(cytobands: import("../util").Feature[]): void;
62
66
  setLoadingP(p?: Promise<void>): void;
@@ -69,29 +73,29 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
69
73
  getRefNameMapForAdapter(adapterConf: {
70
74
  [x: string]: unknown;
71
75
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
72
- [x: string]: string | undefined;
76
+ [x: string]: string;
73
77
  }>;
74
78
  getReverseRefNameMapForAdapter(adapterConf: {
75
79
  [x: string]: unknown;
76
80
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
77
- [x: string]: string | undefined;
81
+ [x: string]: string;
78
82
  }>;
79
83
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
80
84
  }, {
81
- readonly assemblyNameMap: Record<string, ({
85
+ readonly assemblyNameMap: Record<string, {
82
86
  configuration: any;
83
87
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
84
88
  error: unknown;
85
- loaded: boolean;
86
89
  loadingP: Promise<void> | undefined;
87
90
  volatileRegions: import("./assembly").BasicRegion[] | undefined;
88
91
  refNameAliases: {
89
- [x: string]: string | undefined;
90
- } | undefined;
91
- lowerCaseRefNameAliases: {
92
- [x: string]: string | undefined;
92
+ [x: string]: string;
93
93
  } | undefined;
94
94
  cytobands: import("../util").Feature[] | undefined;
95
+ } & {
96
+ readonly lowerCaseRefNameAliases: {
97
+ [k: string]: string;
98
+ } | undefined;
95
99
  } & {
96
100
  getConf(arg: string): any;
97
101
  } & {
@@ -114,13 +118,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
114
118
  getRefNameColor(refName: string): string | undefined;
115
119
  isValidRefName(refName: string): boolean;
116
120
  } & {
117
- setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
121
+ setLoaded({ regions, refNameAliases, cytobands, }: {
122
+ regions: import("../util").Region[];
123
+ refNameAliases: {
124
+ [x: string]: string;
125
+ };
126
+ cytobands: import("../util").Feature[];
127
+ }): void;
118
128
  setError(e: unknown): void;
119
129
  setRegions(regions: import("../util").Region[]): void;
120
130
  setRefNameAliases(aliases: {
121
- [x: string]: string | undefined;
122
- }, lcAliases: {
123
- [x: string]: string | undefined;
131
+ [x: string]: string;
124
132
  }): void;
125
133
  setCytobands(cytobands: import("../util").Feature[]): void;
126
134
  setLoadingP(p?: Promise<void>): void;
@@ -133,27 +141,27 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
133
141
  getRefNameMapForAdapter(adapterConf: {
134
142
  [x: string]: unknown;
135
143
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
136
- [x: string]: string | undefined;
144
+ [x: string]: string;
137
145
  }>;
138
146
  getReverseRefNameMapForAdapter(adapterConf: {
139
147
  [x: string]: unknown;
140
148
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
141
- [x: string]: string | undefined;
149
+ [x: string]: string;
142
150
  }>;
143
151
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
144
152
  configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
145
153
  }, {
146
154
  error: unknown;
147
- loaded: boolean;
148
155
  loadingP: Promise<void> | undefined;
149
156
  volatileRegions: import("./assembly").BasicRegion[] | undefined;
150
157
  refNameAliases: {
151
- [x: string]: string | undefined;
152
- } | undefined;
153
- lowerCaseRefNameAliases: {
154
- [x: string]: string | undefined;
158
+ [x: string]: string;
155
159
  } | undefined;
156
160
  cytobands: import("../util").Feature[] | undefined;
161
+ } & {
162
+ readonly lowerCaseRefNameAliases: {
163
+ [k: string]: string;
164
+ } | undefined;
157
165
  } & {
158
166
  getConf(arg: string): any;
159
167
  } & {
@@ -176,13 +184,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
176
184
  getRefNameColor(refName: string): string | undefined;
177
185
  isValidRefName(refName: string): boolean;
178
186
  } & {
179
- setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
187
+ setLoaded({ regions, refNameAliases, cytobands, }: {
188
+ regions: import("../util").Region[];
189
+ refNameAliases: {
190
+ [x: string]: string;
191
+ };
192
+ cytobands: import("../util").Feature[];
193
+ }): void;
180
194
  setError(e: unknown): void;
181
195
  setRegions(regions: import("../util").Region[]): void;
182
196
  setRefNameAliases(aliases: {
183
- [x: string]: string | undefined;
184
- }, lcAliases: {
185
- [x: string]: string | undefined;
197
+ [x: string]: string;
186
198
  }): void;
187
199
  setCytobands(cytobands: import("../util").Feature[]): void;
188
200
  setLoadingP(p?: Promise<void>): void;
@@ -195,14 +207,14 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
195
207
  getRefNameMapForAdapter(adapterConf: {
196
208
  [x: string]: unknown;
197
209
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
198
- [x: string]: string | undefined;
210
+ [x: string]: string;
199
211
  }>;
200
212
  getReverseRefNameMapForAdapter(adapterConf: {
201
213
  [x: string]: unknown;
202
214
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
203
- [x: string]: string | undefined;
215
+ [x: string]: string;
204
216
  }>;
205
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined>;
217
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
206
218
  } & {
207
219
  /**
208
220
  * #method
@@ -211,16 +223,16 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
211
223
  configuration: any;
212
224
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
213
225
  error: unknown;
214
- loaded: boolean;
215
226
  loadingP: Promise<void> | undefined;
216
227
  volatileRegions: import("./assembly").BasicRegion[] | undefined;
217
228
  refNameAliases: {
218
- [x: string]: string | undefined;
219
- } | undefined;
220
- lowerCaseRefNameAliases: {
221
- [x: string]: string | undefined;
229
+ [x: string]: string;
222
230
  } | undefined;
223
231
  cytobands: import("../util").Feature[] | undefined;
232
+ } & {
233
+ readonly lowerCaseRefNameAliases: {
234
+ [k: string]: string;
235
+ } | undefined;
224
236
  } & {
225
237
  getConf(arg: string): any;
226
238
  } & {
@@ -243,13 +255,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
243
255
  getRefNameColor(refName: string): string | undefined;
244
256
  isValidRefName(refName: string): boolean;
245
257
  } & {
246
- setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
258
+ setLoaded({ regions, refNameAliases, cytobands, }: {
259
+ regions: import("../util").Region[];
260
+ refNameAliases: {
261
+ [x: string]: string;
262
+ };
263
+ cytobands: import("../util").Feature[];
264
+ }): void;
247
265
  setError(e: unknown): void;
248
266
  setRegions(regions: import("../util").Region[]): void;
249
267
  setRefNameAliases(aliases: {
250
- [x: string]: string | undefined;
251
- }, lcAliases: {
252
- [x: string]: string | undefined;
268
+ [x: string]: string;
253
269
  }): void;
254
270
  setCytobands(cytobands: import("../util").Feature[]): void;
255
271
  setLoadingP(p?: Promise<void>): void;
@@ -262,27 +278,27 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
262
278
  getRefNameMapForAdapter(adapterConf: {
263
279
  [x: string]: unknown;
264
280
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
265
- [x: string]: string | undefined;
281
+ [x: string]: string;
266
282
  }>;
267
283
  getReverseRefNameMapForAdapter(adapterConf: {
268
284
  [x: string]: unknown;
269
285
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
270
- [x: string]: string | undefined;
286
+ [x: string]: string;
271
287
  }>;
272
288
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
273
289
  configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
274
290
  }, {
275
291
  error: unknown;
276
- loaded: boolean;
277
292
  loadingP: Promise<void> | undefined;
278
293
  volatileRegions: import("./assembly").BasicRegion[] | undefined;
279
294
  refNameAliases: {
280
- [x: string]: string | undefined;
281
- } | undefined;
282
- lowerCaseRefNameAliases: {
283
- [x: string]: string | undefined;
295
+ [x: string]: string;
284
296
  } | undefined;
285
297
  cytobands: import("../util").Feature[] | undefined;
298
+ } & {
299
+ readonly lowerCaseRefNameAliases: {
300
+ [k: string]: string;
301
+ } | undefined;
286
302
  } & {
287
303
  getConf(arg: string): any;
288
304
  } & {
@@ -305,13 +321,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
305
321
  getRefNameColor(refName: string): string | undefined;
306
322
  isValidRefName(refName: string): boolean;
307
323
  } & {
308
- setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
324
+ setLoaded({ regions, refNameAliases, cytobands, }: {
325
+ regions: import("../util").Region[];
326
+ refNameAliases: {
327
+ [x: string]: string;
328
+ };
329
+ cytobands: import("../util").Feature[];
330
+ }): void;
309
331
  setError(e: unknown): void;
310
332
  setRegions(regions: import("../util").Region[]): void;
311
333
  setRefNameAliases(aliases: {
312
- [x: string]: string | undefined;
313
- }, lcAliases: {
314
- [x: string]: string | undefined;
334
+ [x: string]: string;
315
335
  }): void;
316
336
  setCytobands(cytobands: import("../util").Feature[]): void;
317
337
  setLoadingP(p?: Promise<void>): void;
@@ -324,12 +344,12 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
324
344
  getRefNameMapForAdapter(adapterConf: {
325
345
  [x: string]: unknown;
326
346
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
327
- [x: string]: string | undefined;
347
+ [x: string]: string;
328
348
  }>;
329
349
  getReverseRefNameMapForAdapter(adapterConf: {
330
350
  [x: string]: unknown;
331
351
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
332
- [x: string]: string | undefined;
352
+ [x: string]: string;
333
353
  }>;
334
354
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
335
355
  /**
@@ -353,16 +373,16 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
353
373
  configuration: any;
354
374
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
355
375
  error: unknown;
356
- loaded: boolean;
357
376
  loadingP: Promise<void> | undefined;
358
377
  volatileRegions: import("./assembly").BasicRegion[] | undefined;
359
378
  refNameAliases: {
360
- [x: string]: string | undefined;
361
- } | undefined;
362
- lowerCaseRefNameAliases: {
363
- [x: string]: string | undefined;
379
+ [x: string]: string;
364
380
  } | undefined;
365
381
  cytobands: import("../util").Feature[] | undefined;
382
+ } & {
383
+ readonly lowerCaseRefNameAliases: {
384
+ [k: string]: string;
385
+ } | undefined;
366
386
  } & {
367
387
  getConf(arg: string): any;
368
388
  } & {
@@ -385,13 +405,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
385
405
  getRefNameColor(refName: string): string | undefined;
386
406
  isValidRefName(refName: string): boolean;
387
407
  } & {
388
- setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
408
+ setLoaded({ regions, refNameAliases, cytobands, }: {
409
+ regions: import("../util").Region[];
410
+ refNameAliases: {
411
+ [x: string]: string;
412
+ };
413
+ cytobands: import("../util").Feature[];
414
+ }): void;
389
415
  setError(e: unknown): void;
390
416
  setRegions(regions: import("../util").Region[]): void;
391
417
  setRefNameAliases(aliases: {
392
- [x: string]: string | undefined;
393
- }, lcAliases: {
394
- [x: string]: string | undefined;
418
+ [x: string]: string;
395
419
  }): void;
396
420
  setCytobands(cytobands: import("../util").Feature[]): void;
397
421
  setLoadingP(p?: Promise<void>): void;
@@ -404,27 +428,27 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
404
428
  getRefNameMapForAdapter(adapterConf: {
405
429
  [x: string]: unknown;
406
430
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
407
- [x: string]: string | undefined;
431
+ [x: string]: string;
408
432
  }>;
409
433
  getReverseRefNameMapForAdapter(adapterConf: {
410
434
  [x: string]: unknown;
411
435
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
412
- [x: string]: string | undefined;
436
+ [x: string]: string;
413
437
  }>;
414
438
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
415
439
  configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
416
440
  }, {
417
441
  error: unknown;
418
- loaded: boolean;
419
442
  loadingP: Promise<void> | undefined;
420
443
  volatileRegions: import("./assembly").BasicRegion[] | undefined;
421
444
  refNameAliases: {
422
- [x: string]: string | undefined;
423
- } | undefined;
424
- lowerCaseRefNameAliases: {
425
- [x: string]: string | undefined;
445
+ [x: string]: string;
426
446
  } | undefined;
427
447
  cytobands: import("../util").Feature[] | undefined;
448
+ } & {
449
+ readonly lowerCaseRefNameAliases: {
450
+ [k: string]: string;
451
+ } | undefined;
428
452
  } & {
429
453
  getConf(arg: string): any;
430
454
  } & {
@@ -447,13 +471,17 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
447
471
  getRefNameColor(refName: string): string | undefined;
448
472
  isValidRefName(refName: string): boolean;
449
473
  } & {
450
- setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
474
+ setLoaded({ regions, refNameAliases, cytobands, }: {
475
+ regions: import("../util").Region[];
476
+ refNameAliases: {
477
+ [x: string]: string;
478
+ };
479
+ cytobands: import("../util").Feature[];
480
+ }): void;
451
481
  setError(e: unknown): void;
452
482
  setRegions(regions: import("../util").Region[]): void;
453
483
  setRefNameAliases(aliases: {
454
- [x: string]: string | undefined;
455
- }, lcAliases: {
456
- [x: string]: string | undefined;
484
+ [x: string]: string;
457
485
  }): void;
458
486
  setCytobands(cytobands: import("../util").Feature[]): void;
459
487
  setLoadingP(p?: Promise<void>): void;
@@ -466,12 +494,12 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
466
494
  getRefNameMapForAdapter(adapterConf: {
467
495
  [x: string]: unknown;
468
496
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
469
- [x: string]: string | undefined;
497
+ [x: string]: string;
470
498
  }>;
471
499
  getReverseRefNameMapForAdapter(adapterConf: {
472
500
  [x: string]: unknown;
473
501
  }, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
474
- [x: string]: string | undefined;
502
+ [x: string]: string;
475
503
  }>;
476
504
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined>;
477
505
  /**
@@ -481,7 +509,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
481
509
  signal?: AbortSignal;
482
510
  sessionId: string;
483
511
  }): Promise<{
484
- [x: string]: string | undefined;
512
+ [x: string]: string;
485
513
  } | undefined>;
486
514
  /**
487
515
  * #method
@@ -490,7 +518,7 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
490
518
  signal?: AbortSignal;
491
519
  sessionId: string;
492
520
  }): Promise<{
493
- [x: string]: string | undefined;
521
+ [x: string]: string;
494
522
  } | undefined>;
495
523
  /**
496
524
  * #method
@@ -54,9 +54,7 @@ function assemblyManagerFactory(conf, pm) {
54
54
  get assemblyList() {
55
55
  // name is the explicit identifier and can be accessed without getConf,
56
56
  // hence the union with {name:string}
57
- const { jbrowse: { assemblies }, session: { sessionAssemblies = [], temporaryAssemblies = [] } = {},
58
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
59
- } = (0, mobx_state_tree_1.getParent)(self);
57
+ const { jbrowse: { assemblies }, session: { sessionAssemblies = [], temporaryAssemblies = [] } = {}, } = (0, mobx_state_tree_1.getParent)(self);
60
58
  return [
61
59
  ...assemblies,
62
60
  ...sessionAssemblies,
@@ -64,7 +62,6 @@ function assemblyManagerFactory(conf, pm) {
64
62
  ];
65
63
  },
66
64
  get rpcManager() {
67
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
68
65
  return (0, mobx_state_tree_1.getParent)(self).rpcManager;
69
66
  },
70
67
  }))
@@ -92,9 +89,9 @@ function assemblyManagerFactory(conf, pm) {
92
89
  return undefined;
93
90
  }
94
91
  await assembly.load();
95
- await (0, util_1.when)(() => !!((assembly === null || assembly === void 0 ? void 0 : assembly.regions) && assembly.refNameAliases) ||
96
- !!(assembly === null || assembly === void 0 ? void 0 : assembly.error));
92
+ await (0, util_1.when)(() => !!(assembly.regions && assembly.refNameAliases) || !!assembly.error);
97
93
  if (assembly.error) {
94
+ // eslint-disable-next-line @typescript-eslint/only-throw-error
98
95
  throw assembly.error;
99
96
  }
100
97
  return assembly;
@@ -13,7 +13,7 @@ export interface ConfigurationSchemaOptions<BASE_SCHEMA extends AnyConfiguration
13
13
  actions?: (self: unknown) => any;
14
14
  views?: (self: unknown) => any;
15
15
  extend?: (self: unknown) => any;
16
- preProcessSnapshot?: (snapshot: {}) => {};
16
+ preProcessSnapshot?: (snapshot: Record<string, unknown>) => Record<string, unknown>;
17
17
  }
18
18
  declare function makeConfigurationSchemaModel<DEFINITION extends ConfigurationSchemaDefinition, OPTIONS extends ConfigurationSchemaOptions<any, any>>(modelName: string, schemaDefinition: DEFINITION, options: OPTIONS): import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<Record<string, any>, {
19
19
  setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ConfigurationSchema = ConfigurationSchema;
7
7
  exports.ConfigurationReference = ConfigurationReference;
8
- /* eslint-disable @typescript-eslint/no-explicit-any */
9
8
  const mobx_state_tree_1 = require("mobx-state-tree");
10
9
  const mst_1 = require("../util/types/mst");
11
10
  const configurationSlot_1 = __importDefault(require("./configurationSlot"));
@@ -37,7 +36,7 @@ function preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition
37
36
  ...inputOptions.baseConfiguration.jbrowseSchemaOptions,
38
37
  ...inputOptions,
39
38
  };
40
- delete options.baseConfiguration;
39
+ options.baseConfiguration = undefined;
41
40
  }
42
41
  return { schemaDefinition, options };
43
42
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = ConfigSlot;
4
- /* eslint-disable @typescript-eslint/no-explicit-any */
5
4
  const mobx_state_tree_1 = require("mobx-state-tree");
6
5
  const jexlStrings_1 = require("../util/jexlStrings");
7
6
  const mst_1 = require("../util/types/mst");
@@ -182,9 +181,11 @@ function ConfigSlot(slotName, { description = '', model, type, defaultValue, con
182
181
  if (self.isCallback) {
183
182
  // compile as jexl function
184
183
  const { pluginManager } = (0, util_1.getEnv)(self);
184
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
185
185
  if (!pluginManager && typeof jest === 'undefined') {
186
186
  console.warn('no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)');
187
187
  }
188
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
188
189
  return (0, jexlStrings_1.stringToJexlExpression)(String(self.value), pluginManager === null || pluginManager === void 0 ? void 0 : pluginManager.jexl);
189
190
  }
190
191
  return { evalSync: () => self.value };
@@ -244,15 +245,13 @@ function ConfigSlot(slotName, { description = '', model, type, defaultValue, con
244
245
  /* ignore */
245
246
  }
246
247
  self.value = defaultValue;
247
- // if it is still a callback (happens if the defaultValue is a callback),
248
- // then use the last-resort fallback default
248
+ // if it is still a callback (happens if the defaultValue is a
249
+ // callback), then use the last-resort fallback default
249
250
  // if defaultValue has jexl: string, run this part
250
- if (self.isCallback) {
251
- if (!(type in fallbackDefaults)) {
252
- throw new Error(`no fallbackDefault defined for type ${type}`);
253
- }
254
- self.value = fallbackDefaults[type];
251
+ if (!(type in fallbackDefaults)) {
252
+ throw new Error(`no fallbackDefault defined for type ${type}`);
255
253
  }
254
+ self.value = fallbackDefaults[type];
256
255
  },
257
256
  }));
258
257
  // if there are any type-specific extensions (views or actions)
@@ -7,7 +7,6 @@ exports.isBareConfigurationSchemaType = isBareConfigurationSchemaType;
7
7
  exports.isConfigurationSchemaType = isConfigurationSchemaType;
8
8
  exports.isConfigurationModel = isConfigurationModel;
9
9
  exports.isConfigurationSlotType = isConfigurationSlotType;
10
- /* eslint-disable @typescript-eslint/no-explicit-any */
11
10
  const mobx_state_tree_1 = require("mobx-state-tree");
12
11
  const mst_reflection_1 = require("../util/mst-reflection");
13
12
  /**
@@ -20,9 +19,6 @@ const mst_reflection_1 = require("../util/mst-reflection");
20
19
  * will be sent to each of the slotNames
21
20
  */
22
21
  function readConfObject(confObject, slotPath, args = {}) {
23
- if (!confObject) {
24
- throw new TypeError('must provide conf object to read');
25
- }
26
22
  if (!slotPath) {
27
23
  return JSON.parse(JSON.stringify((0, mobx_state_tree_1.getSnapshot)(confObject)));
28
24
  }
@@ -78,9 +74,6 @@ function readConfObject(confObject, slotPath, args = {}) {
78
74
  * will be sent to each of the slotNames
79
75
  */
80
76
  function getConf(model, slotPath, args) {
81
- if (!model) {
82
- throw new TypeError('must provide a model object');
83
- }
84
77
  const { configuration } = model;
85
78
  if (isConfigurationModel(configuration)) {
86
79
  return readConfObject(configuration, slotPath, args);
@@ -105,9 +105,9 @@ export declare abstract class BaseFeatureDataAdapter extends BaseAdapter {
105
105
  * Derived classes can override this to return alternative calculations for
106
106
  * featureDensity, or they can also return an object containing a byte size
107
107
  * calculation with the format \{bytes:number, fetchSizeLimit:number\} where
108
- * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
109
- * data' (e.g. CRAM and
110
- * BAM may vary on what they think too much data is)
108
+ * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too
109
+ * much data' (e.g. CRAM and BAM may vary on what they think too much data
110
+ * is)
111
111
  */
112
112
  getRegionFeatureDensityStats(region: Region, opts?: BaseOptions): Promise<FeatureDensityStats>;
113
113
  /**
@@ -120,9 +120,9 @@ export declare abstract class BaseFeatureDataAdapter extends BaseAdapter {
120
120
  * Derived classes can override this to return alternative calculations for
121
121
  * featureDensity, or they can also return an object containing a byte size
122
122
  * calculation with the format \{bytes:number, fetchSizeLimit:number\} where
123
- * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
124
- * data' (e.g. CRAM and
125
- * BAM may vary on what they think too much data is)
123
+ * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too
124
+ * much data' (e.g. CRAM and BAM may vary on what they think too much data
125
+ * is)
126
126
  */
127
127
  getMultiRegionFeatureDensityStats(regions: Region[], opts?: BaseOptions): Promise<FeatureDensityStats>;
128
128
  }
@@ -116,9 +116,9 @@ class BaseFeatureDataAdapter extends BaseAdapter_1.BaseAdapter {
116
116
  * Derived classes can override this to return alternative calculations for
117
117
  * featureDensity, or they can also return an object containing a byte size
118
118
  * calculation with the format \{bytes:number, fetchSizeLimit:number\} where
119
- * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
120
- * data' (e.g. CRAM and
121
- * BAM may vary on what they think too much data is)
119
+ * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too
120
+ * much data' (e.g. CRAM and BAM may vary on what they think too much data
121
+ * is)
122
122
  */
123
123
  getRegionFeatureDensityStats(region, opts) {
124
124
  let lastTime = +Date.now();
@@ -160,9 +160,9 @@ class BaseFeatureDataAdapter extends BaseAdapter_1.BaseAdapter {
160
160
  * Derived classes can override this to return alternative calculations for
161
161
  * featureDensity, or they can also return an object containing a byte size
162
162
  * calculation with the format \{bytes:number, fetchSizeLimit:number\} where
163
- * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
164
- * data' (e.g. CRAM and
165
- * BAM may vary on what they think too much data is)
163
+ * fetchSizeLimit is the adapter-defined limit for what it thinks is 'too
164
+ * much data' (e.g. CRAM and BAM may vary on what they think too much data
165
+ * is)
166
166
  */
167
167
  async getMultiRegionFeatureDensityStats(regions, opts) {
168
168
  if (!regions.length) {
@@ -3,6 +3,7 @@ import { BaseOptions } from './types';
3
3
  export interface Alias {
4
4
  refName: string;
5
5
  aliases: string[];
6
+ override?: boolean;
6
7
  }
7
8
  export interface BaseRefNameAliasAdapter extends BaseAdapter {
8
9
  getRefNameAliases(opts: BaseOptions): Promise<Alias[]>;
@@ -1,6 +1,5 @@
1
1
  import { SimpleFeature } from '../../util';
2
2
  import { BaseAdapter } from '../BaseAdapter';
3
- export declare function isGzip(buf: Buffer): boolean;
4
3
  export default class CytobandAdapter extends BaseAdapter {
5
4
  getData(): Promise<SimpleFeature[]>;
6
5
  freeResources(): void;
@@ -1,14 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isGzip = isGzip;
4
3
  const bgzf_filehandle_1 = require("@gmod/bgzf-filehandle");
5
4
  // locals
6
5
  const util_1 = require("../../util");
7
6
  const io_1 = require("../../util/io");
8
7
  const BaseAdapter_1 = require("../BaseAdapter");
9
- function isGzip(buf) {
10
- return buf[0] === 31 && buf[1] === 139 && buf[2] === 8;
11
- }
12
8
  class CytobandAdapter extends BaseAdapter_1.BaseAdapter {
13
9
  async getData() {
14
10
  const pm = this.pluginManager;
@@ -17,7 +13,7 @@ class CytobandAdapter extends BaseAdapter_1.BaseAdapter {
17
13
  return [];
18
14
  }
19
15
  const buffer = await (0, io_1.openLocation)(loc, pm).readFile();
20
- const buf = isGzip(buffer) ? await (0, bgzf_filehandle_1.unzip)(buffer) : buffer;
16
+ const buf = (0, util_1.isGzip)(buffer) ? await (0, bgzf_filehandle_1.unzip)(buffer) : buffer;
21
17
  const text = new TextDecoder('utf8', { fatal: true }).decode(buf);
22
18
  return text
23
19
  .split(/\n|\r\n|\r/)
@@ -26,11 +22,11 @@ class CytobandAdapter extends BaseAdapter_1.BaseAdapter {
26
22
  const [refName, start, end, name, type] = line.split('\t');
27
23
  return new util_1.SimpleFeature({
28
24
  uniqueId: `${i}`,
29
- refName,
25
+ refName: refName,
30
26
  start: +start,
31
27
  end: +end,
32
- name,
33
- type,
28
+ name: name,
29
+ type: type,
34
30
  });
35
31
  });
36
32
  }