@jbrowse/core 2.10.3 → 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/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/rpc/BaseRpcDriver.js +1 -0
- 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 +50 -23
- 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/types/index.d.ts +2 -1
|
@@ -42,7 +42,7 @@ function Attributes(props) {
|
|
|
42
42
|
}
|
|
43
43
|
else if ((0, is_object_1.default)(value)) {
|
|
44
44
|
const { omitSingleLevel, ...rest } = props;
|
|
45
|
-
return (0, util_2.isUriLocation)(value) ? (hideUris ? null : (react_1.default.createElement(UriField_1.default, { key: key, name: key, prefix: prefix, value: value }))) : (react_1.default.createElement(Attributes, {
|
|
45
|
+
return (0, util_2.isUriLocation)(value) ? (hideUris ? null : (react_1.default.createElement(UriField_1.default, { key: key, name: key, prefix: prefix, value: value }))) : (react_1.default.createElement(Attributes, { key: key, ...rest, attributes: value, descriptions: descriptions, prefix: [...prefix, key] }));
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
return (react_1.default.createElement(SimpleField_1.default, { key: key, name: key, value: formatter(value, key), description: description, prefix: prefix, width: Math.min(maxLabelWidth, MAX_FIELD_NAME_WIDTH) }));
|
package/PluginLoader.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export default class PluginLoader {
|
|
|
55
55
|
default: PluginConstructor;
|
|
56
56
|
}>;
|
|
57
57
|
loadPlugin(def: PluginDefinition, baseUri?: string): Promise<PluginConstructor>;
|
|
58
|
-
installGlobalReExports(target: WindowOrWorkerGlobalScope):
|
|
58
|
+
installGlobalReExports(target: WindowOrWorkerGlobalScope): this;
|
|
59
59
|
load(baseUri?: string): Promise<{
|
|
60
60
|
plugin: PluginConstructor;
|
|
61
61
|
definition: PluginDefinition;
|
package/PluginLoader.js
CHANGED
|
@@ -152,6 +152,7 @@ class PluginLoader {
|
|
|
152
152
|
target.JBrowseExports = Object.fromEntries(Object.entries(ReExports_1.default).map(([moduleName, module]) => {
|
|
153
153
|
return [moduleName, module];
|
|
154
154
|
}));
|
|
155
|
+
return this;
|
|
155
156
|
}
|
|
156
157
|
async load(baseUri) {
|
|
157
158
|
return Promise.all(this.definitions.map(async (definition) => ({
|
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;
|
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,
|