@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.
- package/BaseFeatureWidget/BaseFeatureDetail.d.ts +3 -2
- package/BaseFeatureWidget/BaseFeatureDetail.js +43 -28
- package/BaseFeatureWidget/SequenceBox.js +4 -8
- package/BaseFeatureWidget/SequenceFeatureDetails.js +2 -1
- package/Plugin.d.ts +1 -1
- package/PluginLoader.d.ts +2 -2
- package/PluginManager.d.ts +6 -6
- package/ReExports/modules.d.ts +3 -3
- package/assemblyManager/assembly.d.ts +23 -17
- package/assemblyManager/assembly.js +75 -76
- package/assemblyManager/assemblyConfigSchema.d.ts +6 -2
- package/assemblyManager/assemblyConfigSchema.js +39 -2
- package/assemblyManager/assemblyManager.d.ts +76 -214
- package/assemblyManager/assemblyManager.js +17 -39
- package/configuration/configurationSchema.d.ts +2 -2
- package/data_adapters/BaseAdapter.d.ts +2 -2
- package/data_adapters/CytobandAdapter.js +7 -0
- package/data_adapters/dataAdapterCache.d.ts +1 -1
- package/package.json +2 -2
- package/pluggableElementTypes/AdapterType.d.ts +1 -1
- package/pluggableElementTypes/AddTrackWorkflowType.d.ts +2 -2
- package/pluggableElementTypes/RpcMethodType.d.ts +1 -1
- package/pluggableElementTypes/ViewType.d.ts +2 -2
- package/pluggableElementTypes/index.d.ts +2 -2
- package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +23 -2
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +24 -2
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +62 -3
- package/pluggableElementTypes/models/BaseDisplayModel.js +138 -92
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +49 -4
- package/pluggableElementTypes/models/BaseTrackModel.js +77 -26
- package/pluggableElementTypes/models/BaseViewModel.d.ts +22 -0
- package/pluggableElementTypes/models/BaseViewModel.js +41 -2
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +53 -6
- package/pluggableElementTypes/models/InternetAccountModel.js +57 -6
- package/pluggableElementTypes/models/baseConnectionConfig.js +17 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +2 -2
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +27 -1
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +5 -2
- package/pluggableElementTypes/models/baseTrackConfig.js +52 -1
- package/pluggableElementTypes/renderers/BoxRendererType.d.ts +2 -2
- package/pluggableElementTypes/renderers/BoxRendererType.js +2 -0
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/RendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/util/serializableFilterChain.d.ts +2 -2
- package/rpc/MainThreadRpcDriver.d.ts +1 -1
- package/rpc/MainThreadRpcDriver.js +2 -2
- package/rpc/RpcManager.d.ts +2 -2
- package/rpc/WebWorkerRpcDriver.d.ts +5 -4
- package/rpc/WebWorkerRpcDriver.js +2 -2
- package/rpc/baseRpcConfig.d.ts +2 -0
- package/rpc/baseRpcConfig.js +18 -0
- package/rpc/configSchema.js +16 -10
- package/rpc/coreRpcMethods.d.ts +14 -14
- package/rpc/coreRpcMethods.js +60 -63
- package/rpc/mainThreadRpcConfig.d.ts +2 -0
- package/rpc/mainThreadRpcConfig.js +19 -0
- package/rpc/remoteAbortSignals.d.ts +1 -1
- package/rpc/webWorkerRpcConfig.d.ts +2 -0
- package/rpc/webWorkerRpcConfig.js +19 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AboutDialog.js +2 -1
- package/ui/App.d.ts +2 -2
- package/ui/App.js +11 -10
- package/ui/AssemblySelector.d.ts +1 -1
- package/ui/AssemblySelector.js +12 -10
- package/ui/DrawerWidget.js +2 -1
- package/ui/EditableTypography.d.ts +4 -4
- package/ui/EditableTypography.js +7 -11
- package/ui/LoadingEllipses.d.ts +7 -0
- package/ui/LoadingEllipses.js +38 -0
- package/ui/Logo.d.ts +1 -1
- package/ui/Menu.d.ts +2 -2
- package/ui/Snackbar.d.ts +1 -1
- package/ui/ViewContainer.d.ts +2 -1
- package/ui/ViewContainer.js +34 -22
- package/ui/index.d.ts +1 -0
- package/ui/index.js +3 -1
- package/util/Base1DUtils.js +9 -3
- package/util/Base1DViewModel.d.ts +72 -2
- package/util/Base1DViewModel.js +94 -3
- package/util/blockTypes.d.ts +1 -1
- package/util/calculateDynamicBlocks.js +1 -1
- package/util/calculateStaticBlocks.js +1 -1
- package/util/index.d.ts +3 -1
- package/util/index.js +19 -9
- package/util/io/RemoteFileWithRangeCache.d.ts +1 -2
- package/util/io/RemoteFileWithRangeCache.js +2 -2
- package/util/io/index.js +3 -3
- package/util/jexl.d.ts +1 -1
- package/util/layouts/BaseLayout.d.ts +1 -1
- package/util/layouts/GranularRectLayout.d.ts +7 -2
- package/util/layouts/GranularRectLayout.js +29 -45
- package/util/layouts/MultiLayout.d.ts +2 -2
- package/util/layouts/MultiLayout.js +4 -6
- package/util/offscreenCanvasPonyfill.d.ts +2 -2
- package/util/offscreenCanvasUtils.d.ts +1 -1
- package/util/simpleFeature.d.ts +3 -0
- package/util/stats.d.ts +26 -0
- package/util/stats.js +9 -9
- package/util/tracks.d.ts +2 -2
- package/util/types/index.d.ts +15 -8
- package/util/types/index.js +8 -1
- 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
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
* @
|
|
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
|
|
83
|
-
* @
|
|
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
|
|
58
|
-
export
|
|
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;
|
package/util/types/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
216
|
-
export
|
|
222
|
+
export type FileLocation = LocalPathLocation | UriLocation | BlobLocation;
|
|
223
|
+
export type PreUriLocation = {
|
|
217
224
|
uri: string;
|
|
218
225
|
};
|
|
219
|
-
export
|
|
226
|
+
export type PreLocalPathLocation = {
|
|
220
227
|
localPath: string;
|
|
221
228
|
};
|
|
222
|
-
export
|
|
229
|
+
export type PreBlobLocation = {
|
|
223
230
|
blob: File;
|
|
224
231
|
};
|
|
225
|
-
export
|
|
232
|
+
export type PreFileLocation = PreUriLocation | PreLocalPathLocation | PreBlobLocation;
|
package/util/types/index.js
CHANGED
|
@@ -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 &&
|
package/util/types/util.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
12
|
+
export type AnyReactComponentType = React.ComponentType<any>;
|
|
13
13
|
/** get the type that a predicate asserts */
|
|
14
|
-
export
|
|
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
|
|
16
|
+
export type InstanceOfModelReturnedBy<FACTORY extends (pm: PluginManager) => IAnyModelType> = Instance<ReturnType<FACTORY>>;
|