@jbrowse/core 2.10.2 → 2.11.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.
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +1 -1
- package/BaseFeatureWidget/configSchema.d.ts +2 -0
- package/BaseFeatureWidget/configSchema.js +6 -0
- package/BaseFeatureWidget/index.d.ts +2 -128
- package/BaseFeatureWidget/index.js +4 -168
- package/BaseFeatureWidget/stateModelFactory.d.ts +126 -0
- package/BaseFeatureWidget/stateModelFactory.js +168 -0
- package/Plugin.d.ts +1 -1
- package/Plugin.js +0 -3
- package/PluginLoader.d.ts +1 -1
- package/PluginLoader.js +1 -0
- package/PluginManager.d.ts +13 -9
- package/PluginManager.js +8 -3
- package/ReExports/modules.d.ts +8 -2
- package/ReExports/modules.js +16 -5
- package/package.json +3 -3
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +1 -0
- package/pluggableElementTypes/models/BaseTrackModel.js +2 -1
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +1 -0
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +3 -2
- package/rpc/BaseRpcDriver.d.ts +3 -3
- package/rpc/BaseRpcDriver.js +1 -0
- package/rpc/WebWorkerRpcDriver.d.ts +2 -3
- package/rpc/WebWorkerRpcDriver.js +1 -1
- package/rpc/methods/CoreRender.d.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AssemblySelector.d.ts +5 -5
- package/ui/CascadingMenuButton.d.ts +6 -6
- package/ui/Dialog.js +1 -1
- package/ui/ErrorMessage.d.ts +2 -1
- package/ui/ErrorMessage.js +16 -3
- package/ui/ErrorMessageStackTraceDialog.d.ts +3 -2
- package/ui/ErrorMessageStackTraceDialog.js +61 -31
- package/ui/FileSelector/FileSelector.d.ts +5 -5
- package/ui/FileSelector/UrlChooser.d.ts +2 -2
- package/ui/MenuButton.d.ts +5 -5
- package/ui/SnackbarModel.d.ts +21 -30
- package/ui/SnackbarModel.js +87 -50
- package/ui/Tooltip.d.ts +2 -2
- package/ui/theme.d.ts +38 -0
- package/ui/theme.js +121 -104
- package/util/Base1DViewModel.d.ts +1 -1
- package/util/index.d.ts +3 -1
- package/util/index.js +16 -5
- package/util/io/RemoteFileWithRangeCache.js +14 -31
- package/util/jexl.js +1 -0
- package/util/offscreenCanvasUtils.js +2 -2
- package/util/tracks.js +1 -1
- package/util/types/index.d.ts +2 -5
- package/util/types/index.js +0 -1
package/PluginManager.d.ts
CHANGED
|
@@ -17,8 +17,6 @@ import ReExports from './ReExports';
|
|
|
17
17
|
import { PluggableElementType, PluggableElementMember } from './pluggableElementTypes';
|
|
18
18
|
import { AbstractRootModel } from './util';
|
|
19
19
|
import { PluginDefinition } from './PluginLoader';
|
|
20
|
-
/** little helper class that keeps groups of callbacks that are
|
|
21
|
-
then run in a specified order by group */
|
|
22
20
|
declare class PhasedScheduler<PhaseName extends string> {
|
|
23
21
|
phaseCallbacks: Map<PhaseName, Function[]>;
|
|
24
22
|
phaseOrder: PhaseName[];
|
|
@@ -44,11 +42,11 @@ declare class TypeRecord<ElementClass extends PluggableElementBase> {
|
|
|
44
42
|
}
|
|
45
43
|
type AnyFunction = (...args: any) => any;
|
|
46
44
|
/**
|
|
47
|
-
* free-form string-to-unknown mapping of metadata related to the instance
|
|
48
|
-
*
|
|
49
|
-
* loaded as part of the "core" set of plugins for this application.
|
|
50
|
-
*
|
|
51
|
-
*
|
|
45
|
+
* free-form string-to-unknown mapping of metadata related to the instance of
|
|
46
|
+
* this plugin. `isCore` is typically set to `Boolean(true)` if the plugin was
|
|
47
|
+
* loaded as part of the "core" set of plugins for this application. Can also
|
|
48
|
+
* use this metadata to stash other things about why the plugin is loaded, such
|
|
49
|
+
* as where it came from, what plugin depends on it, etc.
|
|
52
50
|
*/
|
|
53
51
|
export type PluginMetadata = Record<string, unknown>;
|
|
54
52
|
export interface PluginLoadRecord {
|
|
@@ -260,8 +258,14 @@ export default class PluginManager {
|
|
|
260
258
|
useTheme: typeof import("@mui/material").useTheme;
|
|
261
259
|
};
|
|
262
260
|
'prop-types': typeof import("prop-types");
|
|
263
|
-
'@mui/material/styles':
|
|
264
|
-
|
|
261
|
+
'@mui/material/styles': {
|
|
262
|
+
MUIStyles: typeof import("@mui/material/styles");
|
|
263
|
+
makeStyles: (args: any) => () => Record<string, string>;
|
|
264
|
+
};
|
|
265
|
+
'@material-ui/core/styles': {
|
|
266
|
+
MUIStyles: typeof import("@mui/material/styles");
|
|
267
|
+
makeStyles: (args: any) => () => Record<string, string>;
|
|
268
|
+
};
|
|
265
269
|
};
|
|
266
270
|
load: <FTYPE extends AnyFunction>(lib: FTYPE) => ReturnType<FTYPE>;
|
|
267
271
|
/**
|
package/PluginManager.js
CHANGED
|
@@ -19,8 +19,8 @@ const configuration_1 = require("./configuration");
|
|
|
19
19
|
const ReExports_1 = __importDefault(require("./ReExports"));
|
|
20
20
|
const CorePlugin_1 = __importDefault(require("./CorePlugin"));
|
|
21
21
|
const jexl_1 = __importDefault(require("./util/jexl"));
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
// helper class that keeps groups of callbacks that are then run in a specified
|
|
23
|
+
// order by group
|
|
24
24
|
class PhasedScheduler {
|
|
25
25
|
constructor(...phaseOrder) {
|
|
26
26
|
this.phaseCallbacks = new Map();
|
|
@@ -119,7 +119,12 @@ class PluginManager {
|
|
|
119
119
|
throw new TypeError('lib passed to jbrequire must be either a string or a function');
|
|
120
120
|
};
|
|
121
121
|
// add the core plugin
|
|
122
|
-
this.addPlugin({
|
|
122
|
+
this.addPlugin({
|
|
123
|
+
plugin: new CorePlugin_1.default(),
|
|
124
|
+
metadata: {
|
|
125
|
+
isCore: true,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
123
128
|
// add all the initial plugins
|
|
124
129
|
initialPlugins.forEach(plugin => {
|
|
125
130
|
this.addPlugin(plugin);
|
package/ReExports/modules.d.ts
CHANGED
|
@@ -166,7 +166,13 @@ declare const libs: {
|
|
|
166
166
|
useTheme: typeof MUIStyles.useTheme;
|
|
167
167
|
};
|
|
168
168
|
'prop-types': typeof PropTypes;
|
|
169
|
-
'@mui/material/styles':
|
|
170
|
-
|
|
169
|
+
'@mui/material/styles': {
|
|
170
|
+
MUIStyles: typeof MUIStyles;
|
|
171
|
+
makeStyles: (args: any) => () => Record<string, string>;
|
|
172
|
+
};
|
|
173
|
+
'@material-ui/core/styles': {
|
|
174
|
+
MUIStyles: typeof MUIStyles;
|
|
175
|
+
makeStyles: (args: any) => () => Record<string, string>;
|
|
176
|
+
};
|
|
171
177
|
};
|
|
172
178
|
export default libs;
|
package/ReExports/modules.js
CHANGED
|
@@ -295,9 +295,6 @@ const DataGridEntries = {
|
|
|
295
295
|
GridPanelWrapper: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
296
296
|
default: module.GridPanelWrapper,
|
|
297
297
|
}))),
|
|
298
|
-
GridPreferencesPanel: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
299
|
-
default: module.GridPreferencesPanel,
|
|
300
|
-
}))),
|
|
301
298
|
GridRemoveIcon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
302
299
|
default: module.GridRemoveIcon,
|
|
303
300
|
}))),
|
|
@@ -405,8 +402,22 @@ const libs = {
|
|
|
405
402
|
'prop-types': prop_types_1.default,
|
|
406
403
|
// end special case
|
|
407
404
|
// material-ui subcomponents, should get rid of these
|
|
408
|
-
'@mui/material/styles':
|
|
409
|
-
|
|
405
|
+
'@mui/material/styles': {
|
|
406
|
+
MUIStyles,
|
|
407
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
408
|
+
makeStyles: (args) => {
|
|
409
|
+
const useStyles = (0, mui_1.makeStyles)()(args);
|
|
410
|
+
return () => useStyles().classes;
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
'@material-ui/core/styles': {
|
|
414
|
+
MUIStyles,
|
|
415
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
416
|
+
makeStyles: (args) => {
|
|
417
|
+
const useStyles = (0, mui_1.makeStyles)()(args);
|
|
418
|
+
return () => useStyles().classes;
|
|
419
|
+
},
|
|
420
|
+
},
|
|
410
421
|
...MaterialPrefixMUI,
|
|
411
422
|
...MuiPrefixMUI,
|
|
412
423
|
// these are core in @mui/material, but used to be in @material-ui/lab
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@mui/material": "^5.0.0",
|
|
61
|
-
"@mui/x-data-grid": "^
|
|
61
|
+
"@mui/x-data-grid": "^7.0.0",
|
|
62
62
|
"mobx": "^6.0.0",
|
|
63
63
|
"mobx-react": "^9.0.0",
|
|
64
64
|
"mobx-state-tree": "^5.0.0",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"access": "public",
|
|
73
73
|
"directory": "dist"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "3d43a820b9274a6160aa4dc15616147f390d9094"
|
|
76
76
|
}
|
|
@@ -10,6 +10,7 @@ export declare function getCompatibleDisplays(self: IAnyStateTreeNode): ({
|
|
|
10
10
|
/**
|
|
11
11
|
* #stateModel BaseTrackModel
|
|
12
12
|
* #category track
|
|
13
|
+
*
|
|
13
14
|
* these MST models only exist for tracks that are *shown*. they should contain
|
|
14
15
|
* only UI state for the track, and have a reference to a track configuration.
|
|
15
16
|
* note that multiple displayed tracks could use the same configuration.
|
|
@@ -20,6 +20,7 @@ exports.getCompatibleDisplays = getCompatibleDisplays;
|
|
|
20
20
|
/**
|
|
21
21
|
* #stateModel BaseTrackModel
|
|
22
22
|
* #category track
|
|
23
|
+
*
|
|
23
24
|
* these MST models only exist for tracks that are *shown*. they should contain
|
|
24
25
|
* only UI state for the track, and have a reference to a track configuration.
|
|
25
26
|
* note that multiple displayed tracks could use the same configuration.
|
|
@@ -97,7 +98,7 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
97
98
|
const { sessionTracks, adminMode } = session;
|
|
98
99
|
return ((0, types_1.isSessionModelWithConfigEditing)(session) &&
|
|
99
100
|
(adminMode ||
|
|
100
|
-
(sessionTracks === null || sessionTracks === void 0 ? void 0 : sessionTracks.find(
|
|
101
|
+
(sessionTracks === null || sessionTracks === void 0 ? void 0 : sessionTracks.find(t => { var _a; return t.trackId === ((_a = self.configuration) === null || _a === void 0 ? void 0 : _a.trackId); }))));
|
|
101
102
|
},
|
|
102
103
|
}))
|
|
103
104
|
.actions(self => ({
|
|
@@ -156,6 +156,7 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
|
|
|
156
156
|
keepalive?: boolean | undefined;
|
|
157
157
|
method?: string | undefined;
|
|
158
158
|
mode?: RequestMode | undefined;
|
|
159
|
+
priority?: RequestPriority | undefined;
|
|
159
160
|
redirect?: RequestRedirect | undefined;
|
|
160
161
|
referrer?: string | undefined;
|
|
161
162
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
@@ -65,8 +65,9 @@ const NewHydrate = (0, mobx_react_1.observer)(function ServerSideRenderedContent
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
}, [html, theme, rest, hydrateFn, RenderingComponent]);
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
return (react_1.default.createElement("div", { "data-testid": "hydrationContainer", ref: ref,
|
|
69
|
+
// eslint-disable-next-line react/no-danger
|
|
70
|
+
dangerouslySetInnerHTML: { __html: html } }));
|
|
70
71
|
});
|
|
71
72
|
const OldHydrate = (0, mobx_react_1.observer)(function ({ theme, html, RenderingComponent, ...rest }) {
|
|
72
73
|
const ref = (0, react_1.useRef)(null);
|
package/rpc/BaseRpcDriver.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { AnyConfigurationModel } from '../configuration';
|
|
|
3
3
|
export interface WorkerHandle {
|
|
4
4
|
status?: string;
|
|
5
5
|
error?: Error;
|
|
6
|
-
on?: (channel: string, callback: (message:
|
|
7
|
-
off?: (channel: string, callback: (message:
|
|
6
|
+
on?: (channel: string, callback: (message: unknown) => void) => void;
|
|
7
|
+
off?: (channel: string, callback: (message: unknown) => void) => void;
|
|
8
8
|
destroy(): void;
|
|
9
9
|
call(functionName: string, args?: unknown, options?: {
|
|
10
10
|
statusCallback?(message: string): void;
|
|
@@ -38,7 +38,7 @@ export default abstract class BaseRpcDriver {
|
|
|
38
38
|
getWorkerPool(): LazyWorker[];
|
|
39
39
|
getWorker(sessionId: string): Promise<WorkerHandle>;
|
|
40
40
|
call(pluginManager: PluginManager, sessionId: string, functionName: string, args: {
|
|
41
|
-
statusCallback?: (message:
|
|
41
|
+
statusCallback?: (message: unknown) => void;
|
|
42
42
|
}, options?: {}): Promise<unknown>;
|
|
43
43
|
}
|
|
44
44
|
export {};
|
package/rpc/BaseRpcDriver.js
CHANGED
|
@@ -12,6 +12,7 @@ function isClonable(thing) {
|
|
|
12
12
|
// the worker times out
|
|
13
13
|
async function watchWorker(worker, pingTime, rpcDriverClassName) {
|
|
14
14
|
// after first ping succeeds, apply wait for timeout
|
|
15
|
+
// eslint-disable-next-line no-constant-condition
|
|
15
16
|
while (true) {
|
|
16
17
|
await worker.call('ping', [], {
|
|
17
18
|
timeout: pingTime * 2,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference path="../../rpc/declaration.d.ts" />
|
|
2
1
|
import Rpc from 'librpc-web-mod';
|
|
3
2
|
import BaseRpcDriver, { RpcDriverConstructorArgs } from './BaseRpcDriver';
|
|
4
3
|
import { PluginDefinition } from '../PluginLoader';
|
|
@@ -6,12 +5,12 @@ interface WebWorkerRpcDriverConstructorArgs extends RpcDriverConstructorArgs {
|
|
|
6
5
|
makeWorkerInstance: () => Worker;
|
|
7
6
|
}
|
|
8
7
|
interface Options {
|
|
9
|
-
statusCallback?: (arg0:
|
|
8
|
+
statusCallback?: (arg0: unknown) => void;
|
|
10
9
|
rpcDriverClassName: string;
|
|
11
10
|
}
|
|
12
11
|
declare class WebWorkerHandle extends Rpc.Client {
|
|
13
12
|
destroy(): void;
|
|
14
|
-
call(funcName: string, args: Record<string, unknown>, opts: Options): Promise<
|
|
13
|
+
call(funcName: string, args: Record<string, unknown>, opts: Options): Promise<unknown>;
|
|
15
14
|
}
|
|
16
15
|
export default class WebWorkerRpcDriver extends BaseRpcDriver {
|
|
17
16
|
workerBootConfiguration: {
|
|
@@ -3,8 +3,8 @@ 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 librpc_web_mod_1 = __importDefault(require("librpc-web-mod"));
|
|
7
6
|
const serialize_error_1 = require("serialize-error");
|
|
7
|
+
const librpc_web_mod_1 = __importDefault(require("librpc-web-mod"));
|
|
8
8
|
// locals
|
|
9
9
|
const nanoid_1 = require("../util/nanoid");
|
|
10
10
|
const BaseRpcDriver_1 = __importDefault(require("./BaseRpcDriver"));
|
|
@@ -9,6 +9,6 @@ export default class CoreRender extends RpcMethodType {
|
|
|
9
9
|
serializeArguments(args: RenderArgs, rpcDriver: string): Promise<import("../../pluggableElementTypes/renderers/ServerSideRendererType").RenderArgsSerialized | RenderArgs>;
|
|
10
10
|
execute(args: RenderArgsSerialized & {
|
|
11
11
|
signal?: RemoteAbortSignal;
|
|
12
|
-
}, rpcDriver: string): Promise<
|
|
12
|
+
}, rpcDriver: string): Promise<RenderResults | ResultsSerialized>;
|
|
13
13
|
deserializeReturn(serializedReturn: RenderResults | ResultsSerialized, args: RenderArgs, rpcDriver: string): Promise<unknown>;
|
|
14
14
|
}
|