@jbrowse/core 1.7.9 → 2.0.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.d.ts +14 -7
- package/BaseFeatureWidget/BaseFeatureDetail.js +203 -125
- package/BaseFeatureWidget/SequenceFeatureDetails.js +20 -15
- package/BaseFeatureWidget/index.d.ts +23 -2
- package/BaseFeatureWidget/index.js +100 -3
- package/BaseFeatureWidget/index.test.js +48 -30
- package/PluginManager.d.ts +58 -86
- package/ReExports/Attributes.d.ts +2 -0
- package/ReExports/Attributes.js +12 -0
- package/ReExports/BaseCard.d.ts +2 -0
- package/ReExports/BaseCard.js +12 -0
- package/ReExports/DataGrid.d.ts +2 -0
- package/ReExports/DataGrid.js +13 -0
- package/ReExports/FeatureDetails.d.ts +2 -0
- package/ReExports/FeatureDetails.js +12 -0
- package/ReExports/list.js +1 -1
- package/ReExports/material-ui-colors.d.ts +1 -19
- package/ReExports/material-ui-colors.js +11 -152
- package/ReExports/modules.d.ts +59 -91
- package/ReExports/modules.js +683 -127
- package/TextSearch/TextSearchManager.d.ts +3 -1
- package/assemblyManager/assembly.d.ts +6 -7
- package/assemblyManager/assembly.js +27 -16
- package/assemblyManager/assemblyManager.d.ts +82 -24
- package/assemblyManager/assemblyManager.js +32 -36
- package/configuration/util.d.ts +1 -1
- package/package.json +15 -15
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +10 -10
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +1 -1
- package/pluggableElementTypes/models/BaseTrackModel.js +24 -25
- package/pluggableElementTypes/models/baseTrackConfig.js +20 -13
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +2 -2
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +2 -2
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +1 -1
- package/rpc/BaseRpcDriver.js +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AboutDialog.d.ts +1 -1
- package/ui/AboutDialog.js +38 -16
- package/ui/App.js +18 -37
- package/ui/AssemblySelector.d.ts +1 -1
- package/ui/AssemblySelector.js +10 -5
- package/ui/CascadingMenu.d.ts +9 -0
- package/ui/CascadingMenu.js +207 -0
- package/ui/Drawer.js +8 -5
- package/ui/DrawerWidget.js +39 -45
- package/ui/DropDownMenu.d.ts +0 -8
- package/ui/DropDownMenu.js +9 -15
- package/ui/EditableTypography.d.ts +1 -1
- package/ui/EditableTypography.js +42 -48
- package/ui/ErrorMessage.js +13 -23
- package/ui/FactoryResetDialog.js +6 -6
- package/ui/FatalErrorDialog.js +5 -5
- package/ui/FileSelector/FileSelector.js +19 -19
- package/ui/FileSelector/LocalFileChooser.js +12 -8
- package/ui/FileSelector/UrlChooser.js +2 -2
- package/ui/Icons.d.ts +1 -1
- package/ui/Icons.js +1 -1
- package/ui/Menu.d.ts +11 -1
- package/ui/Menu.js +32 -38
- package/ui/PrerenderedCanvas.js +10 -1
- package/ui/ResizeHandle.js +8 -6
- package/ui/ReturnToImportFormDialog.js +14 -10
- package/ui/SanitizedHTML.js +15 -21
- package/ui/Snackbar.js +11 -9
- package/ui/Tooltip.d.ts +3 -1
- package/ui/Tooltip.js +5 -3
- package/ui/ViewContainer.js +38 -25
- package/ui/index.d.ts +1 -0
- package/ui/index.js +9 -0
- package/ui/theme.d.ts +279 -131
- package/ui/theme.js +174 -154
- package/ui/theme.test.js +56 -75
- package/util/Base1DViewModel.d.ts +1 -8
- package/util/Base1DViewModel.js +11 -13
- package/util/color/index.js +6 -6
- package/util/index.d.ts +4 -8
- package/util/index.js +29 -19
- package/util/jexl.js +42 -43
- package/util/layouts/GranularRectLayout.js +1 -3
- package/util/layouts/PrecomputedLayout.js +1 -3
- package/util/offscreenCanvasPonyfill.js +10 -12
- package/util/tracks.js +4 -2
- package/util/types/index.d.ts +14 -4
- package/util/types/index.js +6 -0
- package/util/types/mst.d.ts +3 -3
- package/util/types/mst.js +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.17.9",
|
|
33
|
-
"@
|
|
33
|
+
"@mui/icons-material": "^5.0.1",
|
|
34
34
|
"abortable-promise-cache": "^1.5.0",
|
|
35
|
-
"canvas": "^2.8.0",
|
|
36
35
|
"canvas-sequencer": "^3.1.0",
|
|
37
36
|
"canvas2svg": "^1.0.16",
|
|
37
|
+
"clone": "^2.1.2",
|
|
38
38
|
"clsx": "^1.0.4",
|
|
39
39
|
"color": "^3.1.3",
|
|
40
40
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -50,29 +50,29 @@
|
|
|
50
50
|
"json-stable-stringify": "^1.0.1",
|
|
51
51
|
"librpc-web-mod": "^1.1.5",
|
|
52
52
|
"load-script2": "^2.0.5",
|
|
53
|
-
"
|
|
53
|
+
"material-ui-popup-state": "^3.0.0",
|
|
54
54
|
"rbush": "^3.0.1",
|
|
55
55
|
"react-error-boundary": "^3.0.0",
|
|
56
|
-
"react-intersection-observer": "^
|
|
56
|
+
"react-intersection-observer": "^9.3.0",
|
|
57
57
|
"react-use-measure": "^2.1.1",
|
|
58
58
|
"shortid": "^2.2.13",
|
|
59
59
|
"svg-path-generator": "^1.1.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@material
|
|
63
|
-
"@
|
|
64
|
-
"
|
|
65
|
-
"mobx": "^
|
|
66
|
-
"mobx-
|
|
67
|
-
"mobx-state-tree": "^3.14.1",
|
|
62
|
+
"@mui/material": "^5.0.0",
|
|
63
|
+
"@mui/x-data-grid": "^5.0.0",
|
|
64
|
+
"mobx": "^6.0.0",
|
|
65
|
+
"mobx-react": "^7.0.0",
|
|
66
|
+
"mobx-state-tree": "^5.0.0",
|
|
68
67
|
"prop-types": "^15.0.0",
|
|
69
|
-
"react": "
|
|
70
|
-
"react-dom": "
|
|
71
|
-
"rxjs": "^6.0.0"
|
|
68
|
+
"react": ">=16.8.0",
|
|
69
|
+
"react-dom": ">=16.8.0",
|
|
70
|
+
"rxjs": "^6.0.0",
|
|
71
|
+
"tss-react": "^3.0.0"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public",
|
|
75
75
|
"directory": "dist"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "ecc7f5d47351a5ea04bc00f3a6eb6dfb607342e6"
|
|
78
78
|
}
|
|
@@ -10,11 +10,11 @@ export declare const BaseDisplay: import("mobx-state-tree").IModelType<{
|
|
|
10
10
|
error: unknown;
|
|
11
11
|
} & {
|
|
12
12
|
readonly RenderingComponent: React.FC<{
|
|
13
|
-
model:
|
|
14
|
-
id:
|
|
15
|
-
type:
|
|
16
|
-
rpcDriverName:
|
|
17
|
-
}
|
|
13
|
+
model: {
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
rpcDriverName: string | undefined;
|
|
17
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
18
18
|
rendererTypeName: string;
|
|
19
19
|
error: unknown;
|
|
20
20
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -29,11 +29,11 @@ export declare const BaseDisplay: import("mobx-state-tree").IModelType<{
|
|
|
29
29
|
blockState?: Record<string, any> | undefined;
|
|
30
30
|
}>;
|
|
31
31
|
readonly DisplayBlurb: React.FC<{
|
|
32
|
-
model:
|
|
33
|
-
id:
|
|
34
|
-
type:
|
|
35
|
-
rpcDriverName:
|
|
36
|
-
}
|
|
32
|
+
model: {
|
|
33
|
+
id: string;
|
|
34
|
+
type: string;
|
|
35
|
+
rpcDriverName: string | undefined;
|
|
36
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
37
37
|
rendererTypeName: string;
|
|
38
38
|
error: unknown;
|
|
39
39
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -21,7 +21,7 @@ export declare function createBaseTrackModel(pluginManager: PluginManager, track
|
|
|
21
21
|
activateConfigurationUI(): void;
|
|
22
22
|
showDisplay(displayId: string, initialSnapshot?: {}): void;
|
|
23
23
|
hideDisplay(displayId: string): number;
|
|
24
|
-
replaceDisplay(
|
|
24
|
+
replaceDisplay(oldId: string, newId: string, initialSnapshot?: {}): void;
|
|
25
25
|
} & {
|
|
26
26
|
trackMenuItems(): MenuItem[];
|
|
27
27
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -112,55 +112,54 @@ function createBaseTrackModel(pluginManager, trackType, baseTrackConfig) {
|
|
|
112
112
|
},
|
|
113
113
|
showDisplay: function showDisplay(displayId) {
|
|
114
114
|
var initialSnapshot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
var displayType = pluginManager.getDisplayType(
|
|
115
|
+
var schema = pluginManager.pluggableConfigSchemaType('display');
|
|
116
|
+
var conf = (0, _mobxStateTree.resolveIdentifier)(schema, (0, _mobxStateTree.getRoot)(self), displayId);
|
|
117
|
+
var displayType = pluginManager.getDisplayType(conf.type);
|
|
118
118
|
|
|
119
119
|
if (!displayType) {
|
|
120
|
-
throw new Error("unknown display type ".concat(
|
|
120
|
+
throw new Error("unknown display type ".concat(conf.type));
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
var display = displayType.stateModel.create(_objectSpread(_objectSpread({}, initialSnapshot), {}, {
|
|
124
|
-
type:
|
|
125
|
-
configuration:
|
|
124
|
+
type: conf.type,
|
|
125
|
+
configuration: conf
|
|
126
126
|
}));
|
|
127
127
|
self.displays.push(display);
|
|
128
128
|
},
|
|
129
129
|
hideDisplay: function hideDisplay(displayId) {
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return d.configuration === configuration;
|
|
130
|
+
var schema = pluginManager.pluggableConfigSchemaType('display');
|
|
131
|
+
var conf = (0, _mobxStateTree.resolveIdentifier)(schema, (0, _mobxStateTree.getRoot)(self), displayId);
|
|
132
|
+
var t = self.displays.filter(function (d) {
|
|
133
|
+
return d.conf === conf;
|
|
135
134
|
});
|
|
136
135
|
(0, _mobx.transaction)(function () {
|
|
137
|
-
return
|
|
136
|
+
return t.forEach(function (d) {
|
|
138
137
|
return self.displays.remove(d);
|
|
139
138
|
});
|
|
140
139
|
});
|
|
141
|
-
return
|
|
140
|
+
return t.length;
|
|
142
141
|
},
|
|
143
|
-
replaceDisplay: function replaceDisplay(
|
|
142
|
+
replaceDisplay: function replaceDisplay(oldId, newId) {
|
|
144
143
|
var initialSnapshot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
145
|
-
var
|
|
146
|
-
return d.
|
|
144
|
+
var idx = self.displays.findIndex(function (d) {
|
|
145
|
+
return d.conf.displayId === oldId;
|
|
147
146
|
});
|
|
148
147
|
|
|
149
|
-
if (
|
|
150
|
-
throw new Error("could not find display id ".concat(
|
|
148
|
+
if (idx === -1) {
|
|
149
|
+
throw new Error("could not find display id ".concat(oldId, " to replace"));
|
|
151
150
|
}
|
|
152
151
|
|
|
153
|
-
var
|
|
154
|
-
var
|
|
155
|
-
var displayType = pluginManager.getDisplayType(
|
|
152
|
+
var schema = pluginManager.pluggableConfigSchemaType('display');
|
|
153
|
+
var conf = (0, _mobxStateTree.resolveIdentifier)(schema, (0, _mobxStateTree.getRoot)(self), newId);
|
|
154
|
+
var displayType = pluginManager.getDisplayType(conf.type);
|
|
156
155
|
|
|
157
156
|
if (!displayType) {
|
|
158
|
-
throw new Error("unknown display type ".concat(
|
|
157
|
+
throw new Error("unknown display type ".concat(conf.type));
|
|
159
158
|
}
|
|
160
159
|
|
|
161
|
-
self.displays.splice(
|
|
162
|
-
type:
|
|
163
|
-
configuration:
|
|
160
|
+
self.displays.splice(idx, 1, _objectSpread(_objectSpread({}, initialSnapshot), {}, {
|
|
161
|
+
type: conf.type,
|
|
162
|
+
configuration: conf
|
|
164
163
|
}));
|
|
165
164
|
}
|
|
166
165
|
};
|
|
@@ -58,19 +58,26 @@ function createBaseTrackConfig(pluginManager) {
|
|
|
58
58
|
},
|
|
59
59
|
textSearchAdapter: pluginManager.pluggableConfigSchemaType('text search adapter')
|
|
60
60
|
}),
|
|
61
|
-
displays: _mobxStateTree.types.array(pluginManager.pluggableConfigSchemaType('display'))
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
displays: _mobxStateTree.types.array(pluginManager.pluggableConfigSchemaType('display')),
|
|
62
|
+
formatDetails: (0, _configuration.ConfigurationSchema)('FormatDetails', {
|
|
63
|
+
feature: {
|
|
64
|
+
type: 'frozen',
|
|
65
|
+
description: 'adds extra fields to the feature details',
|
|
66
|
+
defaultValue: {},
|
|
67
|
+
contextVariable: ['feature']
|
|
68
|
+
},
|
|
69
|
+
subfeatures: {
|
|
70
|
+
type: 'frozen',
|
|
71
|
+
description: 'adds extra fields to the subfeatures of a feature',
|
|
72
|
+
defaultValue: {},
|
|
73
|
+
contextVariable: ['feature']
|
|
74
|
+
},
|
|
75
|
+
depth: {
|
|
76
|
+
type: 'number',
|
|
77
|
+
defaultValue: 2,
|
|
78
|
+
description: 'depth to iterate on subfeatures'
|
|
79
|
+
}
|
|
80
|
+
})
|
|
74
81
|
}, {
|
|
75
82
|
preProcessSnapshot: function preProcessSnapshot(s) {
|
|
76
83
|
var snap = JSON.parse(JSON.stringify(s));
|
|
@@ -11,10 +11,10 @@ exports.default = ServerSideRenderedContent;
|
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
|
14
|
-
var _styles = require("@material-ui/core/styles");
|
|
15
|
-
|
|
16
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
15
|
|
|
16
|
+
var _styles = require("@mui/material/styles");
|
|
17
|
+
|
|
18
18
|
var _reactDom = require("react-dom");
|
|
19
19
|
|
|
20
20
|
var _ui = require("../../ui");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeprecatedThemeOptions } from '@mui/material';
|
|
2
2
|
import { SnapshotOrInstance, SnapshotIn } from 'mobx-state-tree';
|
|
3
3
|
import RendererType, { RenderProps, RenderResults } from './RendererType';
|
|
4
4
|
import SerializableFilterChain, { SerializedFilterChain } from './util/serializableFilterChain';
|
|
@@ -7,7 +7,7 @@ import RpcManager from '../../rpc/RpcManager';
|
|
|
7
7
|
interface BaseRenderArgs extends RenderProps {
|
|
8
8
|
sessionId: string;
|
|
9
9
|
signal?: AbortSignal;
|
|
10
|
-
theme:
|
|
10
|
+
theme: DeprecatedThemeOptions;
|
|
11
11
|
exportSVG: {
|
|
12
12
|
rasterizeLayers?: boolean;
|
|
13
13
|
};
|
|
@@ -31,7 +31,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
31
31
|
|
|
32
32
|
var _react = _interopRequireDefault(require("react"));
|
|
33
33
|
|
|
34
|
-
var _styles = require("@material
|
|
34
|
+
var _styles = require("@mui/material/styles");
|
|
35
35
|
|
|
36
36
|
var _canvasSequencer = require("canvas-sequencer");
|
|
37
37
|
|
package/rpc/BaseRpcDriver.js
CHANGED
|
@@ -214,7 +214,7 @@ var BaseRpcDriver = /*#__PURE__*/function () {
|
|
|
214
214
|
return thing;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
return
|
|
217
|
+
return Object.fromEntries(Object.entries(thing).filter(function (e) {
|
|
218
218
|
return isClonable(e[1]);
|
|
219
219
|
}).map(function (_ref) {
|
|
220
220
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|