@jbrowse/core 1.7.11 → 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.
Files changed (77) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail.d.ts +11 -1
  2. package/BaseFeatureWidget/BaseFeatureDetail.js +49 -26
  3. package/BaseFeatureWidget/SequenceFeatureDetails.js +20 -15
  4. package/BaseFeatureWidget/index.d.ts +2 -2
  5. package/BaseFeatureWidget/index.js +5 -3
  6. package/BaseFeatureWidget/index.test.js +48 -30
  7. package/PluginManager.d.ts +58 -86
  8. package/ReExports/Attributes.d.ts +2 -0
  9. package/ReExports/Attributes.js +12 -0
  10. package/ReExports/BaseCard.d.ts +2 -0
  11. package/ReExports/BaseCard.js +12 -0
  12. package/ReExports/DataGrid.d.ts +2 -0
  13. package/ReExports/DataGrid.js +13 -0
  14. package/ReExports/FeatureDetails.d.ts +2 -0
  15. package/ReExports/FeatureDetails.js +12 -0
  16. package/ReExports/list.js +1 -1
  17. package/ReExports/material-ui-colors.d.ts +1 -19
  18. package/ReExports/material-ui-colors.js +11 -152
  19. package/ReExports/modules.d.ts +59 -91
  20. package/ReExports/modules.js +683 -127
  21. package/TextSearch/TextSearchManager.d.ts +3 -1
  22. package/assemblyManager/assembly.js +1 -0
  23. package/assemblyManager/assemblyManager.d.ts +12 -10
  24. package/assemblyManager/assemblyManager.js +2 -0
  25. package/configuration/util.d.ts +1 -1
  26. package/package.json +14 -15
  27. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +10 -10
  28. package/pluggableElementTypes/models/BaseTrackModel.d.ts +1 -1
  29. package/pluggableElementTypes/models/BaseTrackModel.js +24 -25
  30. package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +2 -2
  31. package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +2 -2
  32. package/pluggableElementTypes/renderers/ServerSideRendererType.js +1 -1
  33. package/rpc/BaseRpcDriver.js +1 -1
  34. package/tsconfig.build.tsbuildinfo +1 -1
  35. package/ui/AboutDialog.js +15 -10
  36. package/ui/App.js +18 -37
  37. package/ui/AssemblySelector.d.ts +1 -1
  38. package/ui/AssemblySelector.js +10 -5
  39. package/ui/CascadingMenu.js +10 -14
  40. package/ui/Drawer.js +8 -5
  41. package/ui/DrawerWidget.js +39 -45
  42. package/ui/DropDownMenu.d.ts +0 -8
  43. package/ui/DropDownMenu.js +9 -15
  44. package/ui/EditableTypography.d.ts +1 -1
  45. package/ui/EditableTypography.js +42 -48
  46. package/ui/ErrorMessage.js +13 -23
  47. package/ui/FactoryResetDialog.js +6 -6
  48. package/ui/FatalErrorDialog.js +5 -5
  49. package/ui/FileSelector/FileSelector.js +19 -19
  50. package/ui/FileSelector/LocalFileChooser.js +12 -8
  51. package/ui/FileSelector/UrlChooser.js +2 -2
  52. package/ui/Icons.d.ts +1 -1
  53. package/ui/Icons.js +1 -1
  54. package/ui/Menu.d.ts +1 -1
  55. package/ui/Menu.js +28 -29
  56. package/ui/PrerenderedCanvas.js +10 -1
  57. package/ui/ResizeHandle.js +8 -6
  58. package/ui/ReturnToImportFormDialog.js +14 -10
  59. package/ui/SanitizedHTML.js +15 -21
  60. package/ui/Snackbar.js +11 -9
  61. package/ui/Tooltip.d.ts +3 -1
  62. package/ui/Tooltip.js +5 -3
  63. package/ui/ViewContainer.js +38 -25
  64. package/ui/theme.d.ts +279 -131
  65. package/ui/theme.js +174 -154
  66. package/ui/theme.test.js +56 -75
  67. package/util/Base1DViewModel.d.ts +1 -8
  68. package/util/Base1DViewModel.js +11 -13
  69. package/util/color/index.js +6 -6
  70. package/util/index.d.ts +1 -7
  71. package/util/index.js +8 -18
  72. package/util/layouts/GranularRectLayout.js +1 -3
  73. package/util/layouts/PrecomputedLayout.js +1 -3
  74. package/util/tracks.js +4 -2
  75. package/util/types/index.d.ts +3 -3
  76. package/util/types/mst.d.ts +3 -3
  77. package/util/types/mst.js +11 -7
@@ -28,7 +28,9 @@ export default class TextSearchManager {
28
28
  * @param args - search options/arguments include: search query
29
29
  */
30
30
  relevantAdapters(searchScope: SearchScope): any[];
31
- getAdaptersWithAssembly(asmName: string, adapterConfs: AnyConfigurationModel[]): (import("mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
31
+ getAdaptersWithAssembly(asmName: string, adapterConfs: AnyConfigurationModel[]): ({
32
+ [x: string]: any;
33
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
32
34
  setSubschema(slotName: string, data: unknown): any;
33
35
  } & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType>)[];
34
36
  getTrackAdaptersWithAssembly(asmName: string, adapterConfs: AnyConfigurationModel[]): any[];
@@ -212,6 +212,7 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
212
212
  },
213
213
 
214
214
  get rpcManager() {
215
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
215
216
  return (0, _mobxStateTree.getParent)(self, 2).rpcManager;
216
217
  },
217
218
 
@@ -65,9 +65,9 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
65
65
  }>;
66
66
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
67
67
  }, {
68
- get(assemblyName: string): (import("mobx-state-tree").ModelInstanceTypeProps<{
69
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
70
- }> & {
68
+ get(assemblyName: string): ({
69
+ configuration: any;
70
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
71
71
  error: Error | undefined;
72
72
  regions: import("./assembly").BasicRegion[] | undefined;
73
73
  refNameAliases: {
@@ -191,7 +191,9 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
191
191
  }>;
192
192
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
193
193
  readonly assemblyNamesList: string[];
194
- readonly assemblyList: (import("mobx-state-tree").ModelInstanceTypeProps<Record<string, any>> & {
194
+ readonly assemblyList: ({
195
+ [x: string]: any;
196
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
195
197
  setSubschema(slotName: string, data: unknown): any;
196
198
  } & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType> & {
197
199
  name: string;
@@ -200,9 +202,9 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
200
202
  readonly pluginManager: any;
201
203
  readonly allPossibleRefNames: string[] | undefined;
202
204
  } & {
203
- waitForAssembly(assemblyName: string): Promise<(import("mobx-state-tree").ModelInstanceTypeProps<{
204
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
205
- }> & {
205
+ waitForAssembly(assemblyName: string): Promise<({
206
+ configuration: any;
207
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
206
208
  error: Error | undefined;
207
209
  regions: import("./assembly").BasicRegion[] | undefined;
208
210
  refNameAliases: {
@@ -339,9 +341,9 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
339
341
  } | undefined>;
340
342
  isValidRefName(refName: string, assemblyName?: string): boolean;
341
343
  } & {
342
- removeAssembly(asm: import("mobx-state-tree").ModelInstanceTypeProps<{
343
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
344
- }> & {
344
+ removeAssembly(asm: {
345
+ configuration: any;
346
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
345
347
  error: Error | undefined;
346
348
  regions: import("./assembly").BasicRegion[] | undefined;
347
349
  refNameAliases: {
@@ -61,10 +61,12 @@ function assemblyManagerFactory(assemblyConfigType, pluginManager) {
61
61
  },
62
62
 
63
63
  get rpcManager() {
64
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
65
  return (0, _mobxStateTree.getParent)(self).rpcManager;
65
66
  },
66
67
 
67
68
  get pluginManager() {
69
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
68
70
  return (0, _mobxStateTree.getParent)(self).pluginManager;
69
71
  },
70
72
 
@@ -27,6 +27,6 @@ export declare function getConf(model: unknown, slotPath?: string[] | string | u
27
27
  */
28
28
  export declare function getTypeNamesFromExplicitlyTypedUnion(maybeUnionType: unknown): string[];
29
29
  export declare function isBareConfigurationSchemaType(thing: unknown): thing is AnyConfigurationSchemaType;
30
- export declare function isConfigurationSchemaType(thing: unknown): boolean;
30
+ export declare function isConfigurationSchemaType(thing: unknown): thing is AnyConfigurationSchemaType;
31
31
  export declare function isConfigurationModel(thing: unknown): thing is AnyConfigurationModel;
32
32
  export declare function isConfigurationSlotType(thing: unknown): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/core",
3
- "version": "1.7.11",
3
+ "version": "2.0.0",
4
4
  "description": "JBrowse 2 core libraries used by plugins",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.17.9",
33
- "@material-ui/icons": "^4.0.1",
33
+ "@mui/icons-material": "^5.0.1",
34
34
  "abortable-promise-cache": "^1.5.0",
35
35
  "canvas-sequencer": "^3.1.0",
36
36
  "canvas2svg": "^1.0.16",
@@ -50,30 +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
- "material-ui-popup-state": "^1.9.3",
54
- "object.fromentries": "^2.0.0",
53
+ "material-ui-popup-state": "^3.0.0",
55
54
  "rbush": "^3.0.1",
56
55
  "react-error-boundary": "^3.0.0",
57
- "react-intersection-observer": "^8.32.5",
56
+ "react-intersection-observer": "^9.3.0",
58
57
  "react-use-measure": "^2.1.1",
59
58
  "shortid": "^2.2.13",
60
59
  "svg-path-generator": "^1.1.0"
61
60
  },
62
61
  "peerDependencies": {
63
- "@material-ui/core": "^4.12.2",
64
- "@material-ui/lab": "^4.0.0-alpha.45",
65
- "@mui/x-data-grid": "^4.0.0",
66
- "mobx": "^5.0.0",
67
- "mobx-react": "^6.0.0",
68
- "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",
69
67
  "prop-types": "^15.0.0",
70
- "react": "^17.0.0",
71
- "react-dom": "^17.0.0",
72
- "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"
73
72
  },
74
73
  "publishConfig": {
75
74
  "access": "public",
76
75
  "directory": "dist"
77
76
  },
78
- "gitHead": "5c21beb48a21f08b0091d293f09ac99174c48f77"
77
+ "gitHead": "ecc7f5d47351a5ea04bc00f3a6eb6dfb607342e6"
79
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: import("mobx-state-tree").ModelInstanceTypeProps<{
14
- id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
15
- type: import("mobx-state-tree").ISimpleType<string>;
16
- rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
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: import("mobx-state-tree").ModelInstanceTypeProps<{
33
- id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
34
- type: import("mobx-state-tree").ISimpleType<string>;
35
- rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
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(oldDisplayId: string, newDisplayId: string, initialSnapshot?: {}): void;
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 displayTypeConfigSchema = pluginManager.pluggableConfigSchemaType('display');
116
- var configuration = (0, _mobxStateTree.resolveIdentifier)(displayTypeConfigSchema, (0, _mobxStateTree.getRoot)(self), displayId);
117
- var displayType = pluginManager.getDisplayType(configuration.type);
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(configuration.type));
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: configuration.type,
125
- configuration: 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 displayTypeConfigSchema = pluginManager.pluggableConfigSchemaType('display');
131
- var configuration = (0, _mobxStateTree.resolveIdentifier)(displayTypeConfigSchema, (0, _mobxStateTree.getRoot)(self), displayId); // if we have any displays with that configuration, turn them off
132
-
133
- var shownDisplays = self.displays.filter(function (d) {
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 shownDisplays.forEach(function (d) {
136
+ return t.forEach(function (d) {
138
137
  return self.displays.remove(d);
139
138
  });
140
139
  });
141
- return shownDisplays.length;
140
+ return t.length;
142
141
  },
143
- replaceDisplay: function replaceDisplay(oldDisplayId, newDisplayId) {
142
+ replaceDisplay: function replaceDisplay(oldId, newId) {
144
143
  var initialSnapshot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
145
- var displayIdx = self.displays.findIndex(function (d) {
146
- return d.configuration.displayId === oldDisplayId;
144
+ var idx = self.displays.findIndex(function (d) {
145
+ return d.conf.displayId === oldId;
147
146
  });
148
147
 
149
- if (displayIdx === -1) {
150
- throw new Error("could not find display id ".concat(oldDisplayId, " to replace"));
148
+ if (idx === -1) {
149
+ throw new Error("could not find display id ".concat(oldId, " to replace"));
151
150
  }
152
151
 
153
- var displayTypeConfigSchema = pluginManager.pluggableConfigSchemaType('display');
154
- var configuration = (0, _mobxStateTree.resolveIdentifier)(displayTypeConfigSchema, (0, _mobxStateTree.getRoot)(self), newDisplayId);
155
- var displayType = pluginManager.getDisplayType(configuration.type);
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(configuration.type));
157
+ throw new Error("unknown display type ".concat(conf.type));
159
158
  }
160
159
 
161
- self.displays.splice(displayIdx, 1, _objectSpread(_objectSpread({}, initialSnapshot), {}, {
162
- type: configuration.type,
163
- configuration: configuration
160
+ self.displays.splice(idx, 1, _objectSpread(_objectSpread({}, initialSnapshot), {}, {
161
+ type: conf.type,
162
+ configuration: conf
164
163
  }));
165
164
  }
166
165
  };
@@ -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 { ThemeOptions } from '@material-ui/core';
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: ThemeOptions;
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-ui/core/styles");
34
+ var _styles = require("@mui/material/styles");
35
35
 
36
36
  var _canvasSequencer = require("canvas-sequencer");
37
37
 
@@ -214,7 +214,7 @@ var BaseRpcDriver = /*#__PURE__*/function () {
214
214
  return thing;
215
215
  }
216
216
 
217
- return (0, _util.objectFromEntries)(Object.entries(thing).filter(function (e) {
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),