@jbrowse/core 2.1.7 → 2.2.1

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 (104) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail.d.ts +3 -2
  2. package/BaseFeatureWidget/BaseFeatureDetail.js +43 -28
  3. package/BaseFeatureWidget/SequenceBox.js +4 -8
  4. package/BaseFeatureWidget/SequenceFeatureDetails.js +2 -1
  5. package/Plugin.d.ts +1 -1
  6. package/PluginLoader.d.ts +2 -2
  7. package/PluginManager.d.ts +6 -6
  8. package/ReExports/modules.d.ts +3 -3
  9. package/assemblyManager/assembly.d.ts +23 -17
  10. package/assemblyManager/assembly.js +75 -76
  11. package/assemblyManager/assemblyConfigSchema.d.ts +6 -2
  12. package/assemblyManager/assemblyConfigSchema.js +39 -2
  13. package/assemblyManager/assemblyManager.d.ts +76 -214
  14. package/assemblyManager/assemblyManager.js +17 -39
  15. package/configuration/configurationSchema.d.ts +2 -2
  16. package/data_adapters/BaseAdapter.d.ts +2 -2
  17. package/data_adapters/CytobandAdapter.js +7 -0
  18. package/data_adapters/dataAdapterCache.d.ts +1 -1
  19. package/package.json +2 -2
  20. package/pluggableElementTypes/AdapterType.d.ts +1 -1
  21. package/pluggableElementTypes/AddTrackWorkflowType.d.ts +2 -2
  22. package/pluggableElementTypes/RpcMethodType.d.ts +1 -1
  23. package/pluggableElementTypes/ViewType.d.ts +2 -2
  24. package/pluggableElementTypes/index.d.ts +2 -2
  25. package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +23 -2
  26. package/pluggableElementTypes/models/BaseConnectionModelFactory.js +24 -2
  27. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +62 -3
  28. package/pluggableElementTypes/models/BaseDisplayModel.js +138 -92
  29. package/pluggableElementTypes/models/BaseTrackModel.d.ts +49 -4
  30. package/pluggableElementTypes/models/BaseTrackModel.js +77 -26
  31. package/pluggableElementTypes/models/BaseViewModel.d.ts +22 -0
  32. package/pluggableElementTypes/models/BaseViewModel.js +41 -2
  33. package/pluggableElementTypes/models/InternetAccountModel.d.ts +53 -6
  34. package/pluggableElementTypes/models/InternetAccountModel.js +57 -6
  35. package/pluggableElementTypes/models/baseConnectionConfig.js +17 -1
  36. package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +2 -2
  37. package/pluggableElementTypes/models/baseInternetAccountConfig.js +27 -1
  38. package/pluggableElementTypes/models/baseTrackConfig.d.ts +5 -2
  39. package/pluggableElementTypes/models/baseTrackConfig.js +52 -1
  40. package/pluggableElementTypes/renderers/BoxRendererType.d.ts +2 -2
  41. package/pluggableElementTypes/renderers/BoxRendererType.js +2 -0
  42. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +1 -1
  43. package/pluggableElementTypes/renderers/RendererType.d.ts +1 -1
  44. package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +1 -1
  45. package/pluggableElementTypes/renderers/util/serializableFilterChain.d.ts +2 -2
  46. package/rpc/MainThreadRpcDriver.d.ts +1 -1
  47. package/rpc/MainThreadRpcDriver.js +2 -2
  48. package/rpc/RpcManager.d.ts +2 -2
  49. package/rpc/WebWorkerRpcDriver.d.ts +5 -4
  50. package/rpc/WebWorkerRpcDriver.js +2 -2
  51. package/rpc/baseRpcConfig.d.ts +2 -0
  52. package/rpc/baseRpcConfig.js +18 -0
  53. package/rpc/configSchema.js +16 -10
  54. package/rpc/coreRpcMethods.d.ts +14 -14
  55. package/rpc/coreRpcMethods.js +60 -63
  56. package/rpc/mainThreadRpcConfig.d.ts +2 -0
  57. package/rpc/mainThreadRpcConfig.js +19 -0
  58. package/rpc/remoteAbortSignals.d.ts +1 -1
  59. package/rpc/webWorkerRpcConfig.d.ts +2 -0
  60. package/rpc/webWorkerRpcConfig.js +19 -0
  61. package/tsconfig.build.tsbuildinfo +1 -1
  62. package/ui/AboutDialog.js +2 -1
  63. package/ui/App.d.ts +2 -2
  64. package/ui/App.js +11 -10
  65. package/ui/AssemblySelector.d.ts +1 -1
  66. package/ui/AssemblySelector.js +12 -10
  67. package/ui/DrawerWidget.js +2 -1
  68. package/ui/EditableTypography.d.ts +4 -4
  69. package/ui/EditableTypography.js +7 -11
  70. package/ui/LoadingEllipses.d.ts +7 -0
  71. package/ui/LoadingEllipses.js +38 -0
  72. package/ui/Logo.d.ts +1 -1
  73. package/ui/Menu.d.ts +2 -2
  74. package/ui/Snackbar.d.ts +1 -1
  75. package/ui/ViewContainer.d.ts +2 -1
  76. package/ui/ViewContainer.js +34 -22
  77. package/ui/index.d.ts +1 -0
  78. package/ui/index.js +3 -1
  79. package/util/Base1DUtils.js +9 -3
  80. package/util/Base1DViewModel.d.ts +72 -2
  81. package/util/Base1DViewModel.js +94 -3
  82. package/util/blockTypes.d.ts +1 -1
  83. package/util/calculateDynamicBlocks.js +1 -1
  84. package/util/calculateStaticBlocks.js +1 -1
  85. package/util/index.d.ts +3 -1
  86. package/util/index.js +19 -9
  87. package/util/io/RemoteFileWithRangeCache.d.ts +1 -2
  88. package/util/io/RemoteFileWithRangeCache.js +2 -2
  89. package/util/io/index.js +3 -3
  90. package/util/jexl.d.ts +1 -1
  91. package/util/layouts/BaseLayout.d.ts +1 -1
  92. package/util/layouts/GranularRectLayout.d.ts +7 -2
  93. package/util/layouts/GranularRectLayout.js +29 -45
  94. package/util/layouts/MultiLayout.d.ts +2 -2
  95. package/util/layouts/MultiLayout.js +4 -6
  96. package/util/offscreenCanvasPonyfill.d.ts +2 -2
  97. package/util/offscreenCanvasUtils.d.ts +1 -1
  98. package/util/simpleFeature.d.ts +3 -0
  99. package/util/stats.d.ts +26 -0
  100. package/util/stats.js +9 -9
  101. package/util/tracks.d.ts +2 -2
  102. package/util/types/index.d.ts +15 -8
  103. package/util/types/index.js +8 -1
  104. package/util/types/util.d.ts +5 -5
package/util/stats.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.blankStats = exports.scoresToStats = exports.calcPerBaseStats = exports.rectifyStats = exports.calcStdFromSums = void 0;
4
4
  const operators_1 = require("rxjs/operators");
5
- /*
5
+ /**
6
6
  * calculate standard deviation using the 'shortcut method' that accepts
7
7
  * the sum and the sum squares of the elements
8
8
  *
@@ -10,7 +10,7 @@ const operators_1 = require("rxjs/operators");
10
10
  * @param sumSquares - sum(i^2, 1..n)
11
11
  * @param n - number of elements
12
12
  * @param population - boolean: use population instead of sample correction
13
- * @return the estimated std deviation
13
+ * @returns - the estimated std deviation
14
14
  */
15
15
  function calcStdFromSums(sum, sumSquares, n, population = false) {
16
16
  if (n === 0) {
@@ -30,9 +30,9 @@ function calcStdFromSums(sum, sumSquares, n, population = false) {
30
30
  return variance < 0 ? 0 : Math.sqrt(variance);
31
31
  }
32
32
  exports.calcStdFromSums = calcStdFromSums;
33
- /*
33
+ /**
34
34
  * @param stats - a summary stats object with scoreSum, featureCount, scoreSumSquares, and basesCovered
35
- * @return - a summary stats object with scoreMean, scoreStdDev, and featureDensity added
35
+ * @returns - a summary stats object with scoreMean, scoreStdDev, and featureDensity added
36
36
  */
37
37
  function rectifyStats(s) {
38
38
  return {
@@ -43,11 +43,11 @@ function rectifyStats(s) {
43
43
  };
44
44
  }
45
45
  exports.rectifyStats = rectifyStats;
46
- /*
46
+ /**
47
47
  * calculates per-base scores for variable width features over a region
48
48
  * @param region - object contains start, end
49
49
  * @param features - list of features with start, end, score
50
- * @return array of numeric scores
50
+ * @returns array of numeric scores
51
51
  */
52
52
  function calcPerBaseStats(region, features) {
53
53
  const { start, end } = region;
@@ -76,11 +76,11 @@ function calcPerBaseStats(region, features) {
76
76
  return scores;
77
77
  }
78
78
  exports.calcPerBaseStats = calcPerBaseStats;
79
- /*
79
+ /**
80
80
  * transform a list of scores to summary statistics
81
81
  * @param region - object with start, end
82
- * @param feats - array of features which are possibly summary features
83
- * @return - object with scoreMax, scoreMin, scoreSum, scoreSumSquares, etc
82
+ * @param features - array of features which are possibly summary features
83
+ * @returns - object with scoreMax, scoreMin, scoreSum, scoreSumSquares, etc
84
84
  */
85
85
  async function scoresToStats(region, features) {
86
86
  const { start, end } = region;
package/util/tracks.d.ts CHANGED
@@ -54,8 +54,8 @@ export interface AdapterConfig {
54
54
  type: string;
55
55
  [key: string]: unknown;
56
56
  }
57
- export declare type AdapterGuesser = (file: FileLocation, index?: FileLocation, adapterHint?: string) => AdapterConfig | undefined;
58
- export declare type TrackTypeGuesser = (adapterName: string) => string | undefined;
57
+ export type AdapterGuesser = (file: FileLocation, index?: FileLocation, adapterHint?: string) => AdapterConfig | undefined;
58
+ export type TrackTypeGuesser = (adapterName: string) => string | undefined;
59
59
  export declare function getFileName(track: FileLocation): string;
60
60
  export declare function guessAdapter(file: FileLocation, index: FileLocation | undefined, adapterHint?: string, model?: IAnyStateTreeNode): AdapterConfig;
61
61
  export declare function guessTrackType(adapterType: string, model?: IAnyStateTreeNode): string;
@@ -16,12 +16,12 @@ export interface AbstractViewContainer extends IStateTreeNode<IType<any, unknown
16
16
  addView(typeName: string, initialState?: Record<string, unknown>): AbstractViewModel;
17
17
  }
18
18
  export declare function isViewContainer(thing: unknown): thing is AbstractViewContainer;
19
- export declare type NotificationLevel = 'error' | 'info' | 'warning' | 'success';
19
+ export type NotificationLevel = 'error' | 'info' | 'warning' | 'success';
20
20
  export interface SnackAction {
21
21
  name: string;
22
22
  onClick: () => void;
23
23
  }
24
- export declare type AssemblyManager = Instance<ReturnType<typeof assemblyManager>>;
24
+ export type AssemblyManager = Instance<ReturnType<typeof assemblyManager>>;
25
25
  export type { TextSearchManager };
26
26
  export interface BasePlugin {
27
27
  version?: string;
@@ -40,7 +40,7 @@ export interface JBrowsePlugin {
40
40
  license: string;
41
41
  image?: string;
42
42
  }
43
- export declare type DialogComponentType = React.LazyExoticComponent<React.FC<any>> | React.FC<any>;
43
+ export type DialogComponentType = React.LazyExoticComponent<React.FC<any>> | React.FC<any>;
44
44
  /** minimum interface that all session state models must implement */
45
45
  export interface AbstractSessionModel extends AbstractViewContainer {
46
46
  drawerPosition?: string;
@@ -135,7 +135,9 @@ export interface AbstractViewModel {
135
135
  id: string;
136
136
  type: string;
137
137
  width: number;
138
+ minimized: boolean;
138
139
  setWidth(width: number): void;
140
+ setMinimized(flag: boolean): void;
139
141
  displayName: string | undefined;
140
142
  setDisplayName: (arg: string) => void;
141
143
  menuItems: () => MenuItem[];
@@ -176,6 +178,11 @@ export interface AppRootModel extends AbstractRootModel {
176
178
  findAppropriateInternetAccount(location: UriLocation): BaseInternetAccountModel | undefined;
177
179
  }
178
180
  export declare function isAppRootModel(thing: unknown): thing is AppRootModel;
181
+ export interface RootModelWithInternetAccounts extends AbstractRootModel {
182
+ internetAccounts: BaseInternetAccountModel[];
183
+ findAppropriateInternetAccount(location: UriLocation): BaseInternetAccountModel | undefined;
184
+ }
185
+ export declare function isRootModelWithInternetAccounts(thing: unknown): thing is RootModelWithInternetAccounts;
179
186
  /** a root model that manages global menus */
180
187
  export interface AbstractMenuManager {
181
188
  appendMenu(menuName: string): void;
@@ -212,14 +219,14 @@ export declare function isAuthNeededException(exception: unknown): exception is
212
219
  export declare function isRetryException(exception: Error): boolean;
213
220
  export interface BlobLocation extends SnapshotIn<typeof MUBlobLocation> {
214
221
  }
215
- export declare type FileLocation = LocalPathLocation | UriLocation | BlobLocation;
216
- export declare type PreUriLocation = {
222
+ export type FileLocation = LocalPathLocation | UriLocation | BlobLocation;
223
+ export type PreUriLocation = {
217
224
  uri: string;
218
225
  };
219
- export declare type PreLocalPathLocation = {
226
+ export type PreLocalPathLocation = {
220
227
  localPath: string;
221
228
  };
222
- export declare type PreBlobLocation = {
229
+ export type PreBlobLocation = {
223
230
  blob: File;
224
231
  };
225
- export declare type PreFileLocation = PreUriLocation | PreLocalPathLocation | PreBlobLocation;
232
+ export type PreFileLocation = PreUriLocation | PreLocalPathLocation | PreBlobLocation;
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.isRetryException = exports.isAuthNeededException = exports.RetryError = exports.AuthNeededError = exports.isUriLocation = exports.isAbstractMenuManager = exports.isAppRootModel = exports.isTrackViewModel = exports.isDisplayModel = exports.isTrackModel = exports.isViewModel = exports.isSelectionContainer = exports.isSessionWithSessionPlugins = exports.isSessionModelWithConnections = exports.isSessionModelWithWidgets = exports.isSessionWithAddTracks = exports.isSessionModelWithConfigEditing = exports.isSessionModel = exports.isViewContainer = void 0;
17
+ exports.isRetryException = exports.isAuthNeededException = exports.RetryError = exports.AuthNeededError = exports.isUriLocation = exports.isAbstractMenuManager = exports.isRootModelWithInternetAccounts = exports.isAppRootModel = exports.isTrackViewModel = exports.isDisplayModel = exports.isTrackModel = exports.isViewModel = exports.isSelectionContainer = exports.isSessionWithSessionPlugins = exports.isSessionModelWithConnections = exports.isSessionModelWithWidgets = exports.isSessionWithAddTracks = exports.isSessionModelWithConfigEditing = exports.isSessionModel = exports.isViewContainer = void 0;
18
18
  const mobx_state_tree_1 = require("mobx-state-tree");
19
19
  __exportStar(require("./util"), exports);
20
20
  function isViewContainer(thing) {
@@ -97,6 +97,13 @@ function isAppRootModel(thing) {
97
97
  'findAppropriateInternetAccount' in thing);
98
98
  }
99
99
  exports.isAppRootModel = isAppRootModel;
100
+ function isRootModelWithInternetAccounts(thing) {
101
+ return (typeof thing === 'object' &&
102
+ thing !== null &&
103
+ 'internetAccounts' in thing &&
104
+ 'findAppropriateInternetAccount' in thing);
105
+ }
106
+ exports.isRootModelWithInternetAccounts = isRootModelWithInternetAccounts;
100
107
  function isAbstractMenuManager(thing) {
101
108
  return (typeof thing === 'object' &&
102
109
  thing !== null &&
@@ -5,12 +5,12 @@ import PluginManager from '../../PluginManager';
5
5
  * Obtain the return type of a constructor function type.
6
6
  * Differs from core Typescript InstanceType in that it returns never if not matched.
7
7
  */
8
- export declare type InstanceTypeRestrictive<CONSTRUCTOR extends new (...args: any[]) => any> = CONSTRUCTOR extends new (...args: any[]) => infer CLASS ? CLASS : never;
8
+ export type InstanceTypeRestrictive<CONSTRUCTOR extends new (...args: any[]) => any> = CONSTRUCTOR extends new (...args: any[]) => infer CLASS ? CLASS : never;
9
9
  /** extracts the class type from a factory function that returns a constructor */
10
- export declare type ClassReturnedBy<FACT extends (pm: PluginManager) => any> = InstanceTypeRestrictive<ReturnType<FACT>>;
10
+ export type ClassReturnedBy<FACT extends (pm: PluginManager) => any> = InstanceTypeRestrictive<ReturnType<FACT>>;
11
11
  /** A react component with any props. Consider using something more specific if possible */
12
- export declare type AnyReactComponentType = React.ComponentType<any>;
12
+ export type AnyReactComponentType = React.ComponentType<any>;
13
13
  /** get the type that a predicate asserts */
14
- export declare type TypeTestedByPredicate<PREDICATE extends (thing: any) => boolean> = PREDICATE extends (thing: any) => thing is infer TYPE ? TYPE : never;
14
+ export type TypeTestedByPredicate<PREDICATE extends (thing: any) => boolean> = PREDICATE extends (thing: any) => thing is infer TYPE ? TYPE : never;
15
15
  /** get the type for an instance of an MST model in a PM factory function */
16
- export declare type InstanceOfModelReturnedBy<FACTORY extends (pm: PluginManager) => IAnyModelType> = Instance<ReturnType<FACTORY>>;
16
+ export type InstanceOfModelReturnedBy<FACTORY extends (pm: PluginManager) => IAnyModelType> = Instance<ReturnType<FACTORY>>;