@jbrowse/product-core 2.17.0 → 2.18.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 (76) hide show
  1. package/dist/RootModel/BaseRootModel.d.ts +6 -43
  2. package/dist/RootModel/BaseRootModel.js +5 -41
  3. package/dist/RootModel/FormatAbout.d.ts +0 -10
  4. package/dist/RootModel/FormatAbout.js +0 -10
  5. package/dist/RootModel/FormatDetails.d.ts +0 -17
  6. package/dist/RootModel/FormatDetails.js +0 -17
  7. package/dist/RootModel/HierarchicalConfig.d.ts +0 -19
  8. package/dist/RootModel/HierarchicalConfig.js +0 -19
  9. package/dist/RootModel/InternetAccounts.d.ts +4 -20
  10. package/dist/RootModel/InternetAccounts.js +0 -20
  11. package/dist/Session/BaseSession.d.ts +5 -64
  12. package/dist/Session/BaseSession.js +1 -63
  13. package/dist/Session/Connections.d.ts +3 -34
  14. package/dist/Session/Connections.js +0 -30
  15. package/dist/Session/DialogQueue.d.ts +3 -22
  16. package/dist/Session/DialogQueue.js +0 -17
  17. package/dist/Session/DrawerWidgets.d.ts +3 -63
  18. package/dist/Session/DrawerWidgets.js +2 -61
  19. package/dist/Session/MultipleViews.d.ts +16 -65
  20. package/dist/Session/MultipleViews.js +2 -40
  21. package/dist/Session/ReferenceManagement.d.ts +2 -21
  22. package/dist/Session/ReferenceManagement.js +0 -23
  23. package/dist/Session/SessionTracks.d.ts +9 -27
  24. package/dist/Session/SessionTracks.js +1 -21
  25. package/dist/Session/Themes.d.ts +3 -21
  26. package/dist/Session/Themes.js +1 -17
  27. package/dist/Session/Tracks.d.ts +9 -27
  28. package/dist/Session/Tracks.js +0 -16
  29. package/dist/rpcWorker.d.ts +2 -2
  30. package/dist/rpcWorker.js +3 -17
  31. package/dist/ui/AboutDialog.d.ts +1 -1
  32. package/dist/ui/AboutDialogContents.d.ts +1 -1
  33. package/dist/ui/AboutDialogContents.js +7 -9
  34. package/dist/ui/FileInfoPanel.d.ts +1 -1
  35. package/dist/ui/FileInfoPanel.js +2 -3
  36. package/dist/ui/RefNameInfoDialog.d.ts +1 -1
  37. package/dist/ui/RefNameInfoDialog.js +2 -4
  38. package/esm/RootModel/BaseRootModel.d.ts +6 -43
  39. package/esm/RootModel/BaseRootModel.js +6 -42
  40. package/esm/RootModel/FormatAbout.d.ts +0 -10
  41. package/esm/RootModel/FormatAbout.js +0 -10
  42. package/esm/RootModel/FormatDetails.d.ts +0 -17
  43. package/esm/RootModel/FormatDetails.js +0 -17
  44. package/esm/RootModel/HierarchicalConfig.d.ts +0 -19
  45. package/esm/RootModel/HierarchicalConfig.js +0 -19
  46. package/esm/RootModel/InternetAccounts.d.ts +4 -20
  47. package/esm/RootModel/InternetAccounts.js +0 -20
  48. package/esm/Session/BaseSession.d.ts +5 -64
  49. package/esm/Session/BaseSession.js +1 -63
  50. package/esm/Session/Connections.d.ts +3 -34
  51. package/esm/Session/Connections.js +1 -31
  52. package/esm/Session/DialogQueue.d.ts +3 -22
  53. package/esm/Session/DialogQueue.js +0 -17
  54. package/esm/Session/DrawerWidgets.d.ts +3 -63
  55. package/esm/Session/DrawerWidgets.js +2 -61
  56. package/esm/Session/MultipleViews.d.ts +16 -65
  57. package/esm/Session/MultipleViews.js +2 -40
  58. package/esm/Session/ReferenceManagement.d.ts +2 -21
  59. package/esm/Session/ReferenceManagement.js +0 -23
  60. package/esm/Session/SessionTracks.d.ts +9 -27
  61. package/esm/Session/SessionTracks.js +1 -21
  62. package/esm/Session/Themes.d.ts +3 -21
  63. package/esm/Session/Themes.js +1 -17
  64. package/esm/Session/Tracks.d.ts +9 -27
  65. package/esm/Session/Tracks.js +0 -16
  66. package/esm/rpcWorker.d.ts +2 -2
  67. package/esm/rpcWorker.js +3 -17
  68. package/esm/ui/AboutDialog.d.ts +1 -1
  69. package/esm/ui/AboutDialog.js +1 -1
  70. package/esm/ui/AboutDialogContents.d.ts +1 -1
  71. package/esm/ui/AboutDialogContents.js +7 -9
  72. package/esm/ui/FileInfoPanel.d.ts +1 -1
  73. package/esm/ui/FileInfoPanel.js +3 -4
  74. package/esm/ui/RefNameInfoDialog.d.ts +1 -1
  75. package/esm/ui/RefNameInfoDialog.js +4 -6
  76. package/package.json +3 -3
@@ -1,12 +1,6 @@
1
- import { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
2
- import PluginManager from '@jbrowse/core/PluginManager';
3
- import { AnyConfiguration, AnyConfigurationModel } from '@jbrowse/core/configuration';
4
- /**
5
- * #stateModel TracksManagerSessionMixin
6
- * composed of
7
- * - BaseSessionModel
8
- * - ReferenceManagementSessionMixin
9
- */
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ import type { AnyConfiguration, AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
10
4
  export declare function TracksManagerSessionMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
11
5
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
12
6
  name: import("mobx-state-tree").ISimpleType<string>;
@@ -593,7 +587,7 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
593
587
  getRefNameMapForAdapter(adapterConf: {
594
588
  [x: string]: unknown;
595
589
  }, assemblyName: string | undefined, opts: {
596
- signal?: AbortSignal;
590
+ stopToken?: string;
597
591
  sessionId: string;
598
592
  }): Promise<{
599
593
  [x: string]: string;
@@ -601,7 +595,7 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
601
595
  getReverseRefNameMapForAdapter(adapterConf: {
602
596
  [x: string]: unknown;
603
597
  }, assemblyName: string | undefined, opts: {
604
- signal?: AbortSignal;
598
+ stopToken?: string;
605
599
  sessionId: string;
606
600
  }): Promise<{
607
601
  [x: string]: string;
@@ -1115,7 +1109,7 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1115
1109
  getRefNameMapForAdapter(adapterConf: {
1116
1110
  [x: string]: unknown;
1117
1111
  }, assemblyName: string | undefined, opts: {
1118
- signal?: AbortSignal;
1112
+ stopToken?: string;
1119
1113
  sessionId: string;
1120
1114
  }): Promise<{
1121
1115
  [x: string]: string;
@@ -1123,7 +1117,7 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1123
1117
  getReverseRefNameMapForAdapter(adapterConf: {
1124
1118
  [x: string]: unknown;
1125
1119
  }, assemblyName: string | undefined, opts: {
1126
- signal?: AbortSignal;
1120
+ stopToken?: string;
1127
1121
  sessionId: string;
1128
1122
  }): Promise<{
1129
1123
  [x: string]: string;
@@ -1654,7 +1648,7 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1654
1648
  getRefNameMapForAdapter(adapterConf: {
1655
1649
  [x: string]: unknown;
1656
1650
  }, assemblyName: string | undefined, opts: {
1657
- signal?: AbortSignal;
1651
+ stopToken?: string;
1658
1652
  sessionId: string;
1659
1653
  }): Promise<{
1660
1654
  [x: string]: string;
@@ -1662,7 +1656,7 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1662
1656
  getReverseRefNameMapForAdapter(adapterConf: {
1663
1657
  [x: string]: unknown;
1664
1658
  }, assemblyName: string | undefined, opts: {
1665
- signal?: AbortSignal;
1659
+ stopToken?: string;
1666
1660
  sessionId: string;
1667
1661
  }): Promise<{
1668
1662
  [x: string]: string;
@@ -1746,9 +1740,6 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1746
1740
  } & {
1747
1741
  removeReferring(referring: import("./ReferenceManagement").ReferringNode[], track: import("@jbrowse/core/pluggableElementTypes").BaseTrackConfig, callbacks: ((arg: string) => void)[], dereferenceTypeCount: Record<string, number>): void;
1748
1742
  } & {
1749
- /**
1750
- * #getter
1751
- */
1752
1743
  readonly tracks: ({
1753
1744
  [x: string]: any;
1754
1745
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
@@ -1761,18 +1752,9 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1761
1752
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
1762
1753
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
1763
1754
  } & {
1764
- /**
1765
- * #action
1766
- */
1767
1755
  addTrackConf(trackConf: AnyConfiguration): any;
1768
- /**
1769
- * #action
1770
- */
1771
1756
  deleteTrackConf(trackConf: AnyConfigurationModel): any;
1772
1757
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
1773
- /** Session mixin MST type for a session that has tracks */
1774
1758
  export type SessionWithTracksType = ReturnType<typeof TracksManagerSessionMixin>;
1775
- /** Instance of a session that has tracks */
1776
1759
  export type SessionWithTracks = Instance<SessionWithTracksType>;
1777
- /** Type guard for SessionWithTracks */
1778
1760
  export declare function isSessionWithTracks(thing: IAnyStateTreeNode): thing is SessionWithTracks;
@@ -5,33 +5,18 @@ exports.isSessionWithTracks = isSessionWithTracks;
5
5
  const mobx_state_tree_1 = require("mobx-state-tree");
6
6
  const BaseSession_1 = require("./BaseSession");
7
7
  const ReferenceManagement_1 = require("./ReferenceManagement");
8
- /**
9
- * #stateModel TracksManagerSessionMixin
10
- * composed of
11
- * - BaseSessionModel
12
- * - ReferenceManagementSessionMixin
13
- */
14
8
  function TracksManagerSessionMixin(pluginManager) {
15
9
  return mobx_state_tree_1.types
16
10
  .compose('TracksManagerSessionMixin', (0, BaseSession_1.BaseSessionModel)(pluginManager), (0, ReferenceManagement_1.ReferenceManagementSessionMixin)(pluginManager))
17
11
  .views(self => ({
18
- /**
19
- * #getter
20
- */
21
12
  get tracks() {
22
13
  return self.jbrowse.tracks;
23
14
  },
24
15
  }))
25
16
  .actions(self => ({
26
- /**
27
- * #action
28
- */
29
17
  addTrackConf(trackConf) {
30
18
  return self.jbrowse.addTrackConf(trackConf);
31
19
  },
32
- /**
33
- * #action
34
- */
35
20
  deleteTrackConf(trackConf) {
36
21
  const callbacksToDereferenceTrack = [];
37
22
  const dereferenceTypeCount = {};
@@ -46,7 +31,6 @@ function TracksManagerSessionMixin(pluginManager) {
46
31
  },
47
32
  }));
48
33
  }
49
- /** Type guard for SessionWithTracks */
50
34
  function isSessionWithTracks(thing) {
51
35
  return (0, BaseSession_1.isBaseSession)(thing) && 'tracks' in thing;
52
36
  }
@@ -1,5 +1,5 @@
1
- import { LoadedPlugin } from '@jbrowse/core/PluginLoader';
2
- import { PluginConstructor } from '@jbrowse/core/Plugin';
1
+ import type { PluginConstructor } from '@jbrowse/core/Plugin';
2
+ import type { LoadedPlugin } from '@jbrowse/core/PluginLoader';
3
3
  export declare function initializeWorker(corePlugins: PluginConstructor[], opts: {
4
4
  fetchESM?: (url: string) => Promise<LoadedPlugin>;
5
5
  fetchCJS?: (url: string) => Promise<LoadedPlugin>;
package/dist/rpcWorker.js CHANGED
@@ -4,13 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.initializeWorker = initializeWorker;
7
- const librpc_web_mod_1 = __importDefault(require("librpc-web-mod"));
8
- const PluginManager_1 = __importDefault(require("@jbrowse/core/PluginManager"));
9
- const remoteAbortSignals_1 = require("@jbrowse/core/rpc/remoteAbortSignals");
10
7
  const PluginLoader_1 = __importDefault(require("@jbrowse/core/PluginLoader"));
8
+ const PluginManager_1 = __importDefault(require("@jbrowse/core/PluginManager"));
9
+ const librpc_web_mod_1 = __importDefault(require("librpc-web-mod"));
11
10
  const serialize_error_1 = require("serialize-error");
12
- // waits for a message from the main thread containing our configuration, which
13
- // must be sent on boot
14
11
  function receiveConfiguration() {
15
12
  const configurationP = new Promise(resolve => {
16
13
  function listener(e) {
@@ -25,7 +22,6 @@ function receiveConfiguration() {
25
22
  return configurationP;
26
23
  }
27
24
  async function getPluginManager(corePlugins, opts) {
28
- // Load runtime plugins
29
25
  const config = await receiveConfiguration();
30
26
  const pluginLoader = new PluginLoader_1.default(config.plugins, opts).installGlobalReExports(self);
31
27
  return new PluginManager_1.default([
@@ -41,7 +37,6 @@ function wrapForRpc(func) {
41
37
  return func({
42
38
  ...args,
43
39
  statusCallback: (message) => {
44
- // @ts-expect-error
45
40
  self.rpcServer.emit(channel, message);
46
41
  },
47
42
  }, rpcDriverClassName);
@@ -53,19 +48,10 @@ async function initializeWorker(corePlugins, opts) {
53
48
  const rpcConfig = Object.fromEntries(pluginManager
54
49
  .getRpcElements()
55
50
  .map(e => [e.name, wrapForRpc(e.execute.bind(e))]));
56
- // @ts-expect-error
57
- self.rpcServer = new librpc_web_mod_1.default.Server({
58
- ...rpcConfig,
59
- ...(0, remoteAbortSignals_1.remoteAbortRpcHandler)(),
60
- ping: async () => {
61
- // the ping method is required by the worker driver for checking the
62
- // health of the worker
63
- },
64
- });
51
+ self.rpcServer = new librpc_web_mod_1.default.Server(rpcConfig);
65
52
  postMessage({ message: 'ready' });
66
53
  }
67
54
  catch (e) {
68
55
  postMessage({ message: 'error', error: (0, serialize_error_1.serializeError)(e) });
69
56
  }
70
- /* do nothing */
71
57
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  export declare function AboutDialog({ config, handleClose, }: {
4
4
  config: AnyConfigurationModel;
5
5
  handleClose: () => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  declare const AboutDialogContents: ({ config, }: {
4
4
  config: AnyConfigurationModel;
5
5
  }) => React.JSX.Element;
@@ -27,16 +27,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const mobx_react_1 = require("mobx-react");
31
- const clone_1 = __importDefault(require("clone"));
32
- const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
33
- const material_1 = require("@mui/material");
34
- const mui_1 = require("tss-react/mui");
35
- const configuration_1 = require("@jbrowse/core/configuration");
36
- const util_1 = require("@jbrowse/core/util");
37
30
  const Attributes_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes"));
38
31
  const BaseCard_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard"));
39
- // locals
32
+ const configuration_1 = require("@jbrowse/core/configuration");
33
+ const util_1 = require("@jbrowse/core/util");
34
+ const material_1 = require("@mui/material");
35
+ const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
36
+ const mobx_react_1 = require("mobx-react");
37
+ const mui_1 = require("tss-react/mui");
40
38
  const FileInfoPanel_1 = __importDefault(require("./FileInfoPanel"));
41
39
  const RefNameInfoDialog_1 = __importDefault(require("./RefNameInfoDialog"));
42
40
  const useStyles = (0, mui_1.makeStyles)()({
@@ -82,7 +80,7 @@ const AboutDialogContents = (0, mobx_react_1.observer)(function ({ config, }) {
82
80
  setShowRefNames(true);
83
81
  } }, "Show ref names"),
84
82
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => {
85
- const snap = removeAttr((0, clone_1.default)(conf), 'baseUri');
83
+ const snap = removeAttr(structuredClone(conf), 'baseUri');
86
84
  (0, copy_to_clipboard_1.default)(JSON.stringify(snap, null, 2));
87
85
  setCopied(true);
88
86
  setTimeout(() => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  export default function FileInfoPanel({ config, }: {
4
4
  config: AnyConfigurationModel;
5
5
  }): React.JSX.Element;
@@ -28,18 +28,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.default = FileInfoPanel;
30
30
  const react_1 = __importStar(require("react"));
31
- const configuration_1 = require("@jbrowse/core/configuration");
32
- const util_1 = require("@jbrowse/core/util");
33
31
  const Attributes_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes"));
34
32
  const BaseCard_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard"));
33
+ const configuration_1 = require("@jbrowse/core/configuration");
35
34
  const ui_1 = require("@jbrowse/core/ui");
35
+ const util_1 = require("@jbrowse/core/util");
36
36
  function FileInfoPanel({ config, }) {
37
37
  const [error, setError] = (0, react_1.useState)();
38
38
  const [info, setInfo] = (0, react_1.useState)();
39
39
  const session = (0, util_1.getSession)(config);
40
40
  const { rpcManager } = session;
41
41
  (0, react_1.useEffect)(() => {
42
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
43
42
  ;
44
43
  (async () => {
45
44
  try {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  declare const RefNameInfoDialog: ({ config, onClose, }: {
4
4
  config: AnyConfigurationModel;
5
5
  onClose: () => void;
@@ -27,14 +27,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const material_1 = require("@mui/material");
31
30
  const configuration_1 = require("@jbrowse/core/configuration");
32
31
  const ui_1 = require("@jbrowse/core/ui");
33
32
  const util_1 = require("@jbrowse/core/util");
34
33
  const tracks_1 = require("@jbrowse/core/util/tracks");
34
+ const material_1 = require("@mui/material");
35
+ const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
35
36
  const mobx_react_1 = require("mobx-react");
36
37
  const mui_1 = require("tss-react/mui");
37
- const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
38
38
  const MAX_REF_NAMES = 10000;
39
39
  const useStyles = (0, mui_1.makeStyles)()(theme => ({
40
40
  container: {
@@ -54,7 +54,6 @@ const RefNameInfoDialog = (0, mobx_react_1.observer)(function ({ config, onClose
54
54
  const [copied, setCopied] = (0, react_1.useState)(false);
55
55
  const { rpcManager } = (0, util_1.getSession)(config);
56
56
  (0, react_1.useEffect)(() => {
57
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
58
57
  ;
59
58
  (async () => {
60
59
  try {
@@ -64,7 +63,6 @@ const RefNameInfoDialog = (0, mobx_react_1.observer)(function ({ config, onClose
64
63
  assemblyName,
65
64
  (await rpcManager.call(config.trackId, 'CoreGetRefNames', {
66
65
  adapterConfig,
67
- // hack for synteny adapters
68
66
  regions: [
69
67
  {
70
68
  assemblyName,
@@ -1,38 +1,17 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
2
- import { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
3
- import RpcManager from '@jbrowse/core/rpc/RpcManager';
4
- import { IAnyType, Instance, SnapshotIn } from 'mobx-state-tree';
5
1
  import TextSearchManager from '@jbrowse/core/TextSearch/TextSearchManager';
6
- /**
7
- * #stateModel BaseRootModel
8
- * #category root
9
- * factory function for the Base-level root model shared by all products
10
- */
2
+ import RpcManager from '@jbrowse/core/rpc/RpcManager';
3
+ import type PluginManager from '@jbrowse/core/PluginManager';
4
+ import type { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
5
+ import type { IAnyType, Instance, SnapshotIn } from 'mobx-state-tree';
11
6
  export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionModelType, assemblyConfigSchema, }: {
12
7
  pluginManager: PluginManager;
13
8
  jbrowseModelType: IAnyType;
14
9
  sessionModelType: IAnyType;
15
10
  assemblyConfigSchema: BaseAssemblyConfigSchema;
16
11
  }): import("mobx-state-tree").IModelType<{
17
- /**
18
- * #property
19
- * `jbrowse` is a mapping of the config.json into the in-memory state
20
- * tree
21
- */
22
12
  jbrowse: IAnyType;
23
- /**
24
- * #property
25
- * `session` encompasses the currently active state of the app, including
26
- * views open, tracks open in those views, etc.
27
- */
28
13
  session: import("mobx-state-tree").IMaybe<IAnyType>;
29
- /**
30
- * #property
31
- */
32
14
  sessionPath: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
33
- /**
34
- * #property
35
- */
36
15
  assemblyManager: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
37
16
  assemblies: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
38
17
  configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
@@ -537,7 +516,7 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
537
516
  getRefNameMapForAdapter(adapterConf: {
538
517
  [x: string]: unknown;
539
518
  }, assemblyName: string | undefined, opts: {
540
- signal?: AbortSignal;
519
+ stopToken?: string;
541
520
  sessionId: string;
542
521
  }): Promise<{
543
522
  [x: string]: string;
@@ -545,7 +524,7 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
545
524
  getReverseRefNameMapForAdapter(adapterConf: {
546
525
  [x: string]: unknown;
547
526
  }, assemblyName: string | undefined, opts: {
548
- signal?: AbortSignal;
527
+ stopToken?: string;
549
528
  sessionId: string;
550
529
  }): Promise<{
551
530
  [x: string]: string;
@@ -563,28 +542,12 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
563
542
  textSearchManager: TextSearchManager;
564
543
  pluginManager: PluginManager;
565
544
  } & {
566
- /**
567
- * #action
568
- */
569
545
  setError(error: unknown): void;
570
- /**
571
- * #action
572
- */
573
546
  setSession(sessionSnapshot?: SnapshotIn<IAnyType>): void;
574
- /**
575
- * #action
576
- */
577
547
  setDefaultSession(): void;
578
- /**
579
- * #action
580
- */
581
548
  setSessionPath(path: string): void;
582
- /**
583
- * #action
584
- */
585
549
  renameCurrentSession(newName: string): void;
586
550
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
587
551
  export type BaseRootModelType = ReturnType<typeof BaseRootModelFactory>;
588
552
  export type BaseRootModel = Instance<BaseRootModelType>;
589
- /** Type guard for checking if something is a JB root model */
590
553
  export declare function isRootModel(thing: unknown): thing is BaseRootModelType;
@@ -1,34 +1,13 @@
1
+ import TextSearchManager from '@jbrowse/core/TextSearch/TextSearchManager';
1
2
  import assemblyManagerFactory from '@jbrowse/core/assemblyManager';
2
3
  import RpcManager from '@jbrowse/core/rpc/RpcManager';
3
- import { cast, getSnapshot, isStateTreeNode, types, } from 'mobx-state-tree';
4
- import TextSearchManager from '@jbrowse/core/TextSearch/TextSearchManager';
5
- /**
6
- * #stateModel BaseRootModel
7
- * #category root
8
- * factory function for the Base-level root model shared by all products
9
- */
4
+ import { cast, getSnapshot, isStateTreeNode, types } from 'mobx-state-tree';
10
5
  export function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionModelType, assemblyConfigSchema, }) {
11
6
  return types
12
7
  .model('BaseRootModel', {
13
- /**
14
- * #property
15
- * `jbrowse` is a mapping of the config.json into the in-memory state
16
- * tree
17
- */
18
8
  jbrowse: jbrowseModelType,
19
- /**
20
- * #property
21
- * `session` encompasses the currently active state of the app, including
22
- * views open, tracks open in those views, etc.
23
- */
24
9
  session: types.maybe(sessionModelType),
25
- /**
26
- * #property
27
- */
28
10
  sessionPath: types.optional(types.string, ''),
29
- /**
30
- * #property
31
- */
32
11
  assemblyManager: types.optional(assemblyManagerFactory(assemblyConfigSchema, pluginManager), {}),
33
12
  })
34
13
  .volatile(self => ({
@@ -41,43 +20,28 @@ export function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionM
41
20
  pluginManager,
42
21
  }))
43
22
  .actions(self => ({
44
- /**
45
- * #action
46
- */
47
23
  setError(error) {
48
24
  self.error = error;
49
25
  },
50
- /**
51
- * #action
52
- */
53
26
  setSession(sessionSnapshot) {
54
27
  self.session = cast(sessionSnapshot);
55
28
  },
56
- /**
57
- * #action
58
- */
59
29
  setDefaultSession() {
60
30
  this.setSession(self.jbrowse.defaultSession);
61
31
  },
62
- /**
63
- * #action
64
- */
65
32
  setSessionPath(path) {
66
33
  self.sessionPath = path;
67
34
  },
68
- /**
69
- * #action
70
- */
71
35
  renameCurrentSession(newName) {
72
36
  if (self.session) {
73
- const snapshot = JSON.parse(JSON.stringify(getSnapshot(self.session)));
74
- snapshot.name = newName;
75
- this.setSession(snapshot);
37
+ this.setSession({
38
+ ...getSnapshot(self.session),
39
+ name: newName,
40
+ });
76
41
  }
77
42
  },
78
43
  }));
79
44
  }
80
- /** Type guard for checking if something is a JB root model */
81
45
  export function isRootModel(thing) {
82
46
  return (isStateTreeNode(thing) &&
83
47
  'session' in thing &&
@@ -1,20 +1,10 @@
1
- /**
2
- * #config FormatAbout
3
- * generally exists on the config.json or root config as configuration.formatAbout
4
- */
5
1
  export declare function FormatAboutConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
6
- /**
7
- * #slot configuration.formatAbout.config
8
- */
9
2
  config: {
10
3
  type: string;
11
4
  description: string;
12
5
  defaultValue: {};
13
6
  contextVariable: string[];
14
7
  };
15
- /**
16
- * #slot configuration.formatAbout.hideUris
17
- */
18
8
  hideUris: {
19
9
  type: string;
20
10
  defaultValue: boolean;
@@ -1,22 +1,12 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config FormatAbout
4
- * generally exists on the config.json or root config as configuration.formatAbout
5
- */
6
2
  export function FormatAboutConfigSchemaFactory() {
7
3
  return ConfigurationSchema('FormatAbout', {
8
- /**
9
- * #slot configuration.formatAbout.config
10
- */
11
4
  config: {
12
5
  type: 'frozen',
13
6
  description: 'formats configuration object in about dialog',
14
7
  defaultValue: {},
15
8
  contextVariable: ['config'],
16
9
  },
17
- /**
18
- * #slot configuration.formatAbout.hideUris
19
- */
20
10
  hideUris: {
21
11
  type: 'boolean',
22
12
  defaultValue: false,
@@ -1,38 +1,21 @@
1
- /**
2
- * #config FormatDetails
3
- * generally exists on the tracks in the config.json or as a 'session' config as
4
- * configuration.formatDetails
5
- */
6
1
  export declare function FormatDetailsConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
7
- /**
8
- * #slot configuration.formatDetails.feature
9
- */
10
2
  feature: {
11
3
  type: string;
12
4
  description: string;
13
5
  defaultValue: {};
14
6
  contextVariable: string[];
15
7
  };
16
- /**
17
- * #slot configuration.formatDetails.subfeatures
18
- */
19
8
  subfeatures: {
20
9
  type: string;
21
10
  description: string;
22
11
  defaultValue: {};
23
12
  contextVariable: string[];
24
13
  };
25
- /**
26
- * #slot configuration.formatDetails.depth
27
- */
28
14
  depth: {
29
15
  type: string;
30
16
  defaultValue: number;
31
17
  description: string;
32
18
  };
33
- /**
34
- * #slot configuration.formatDetails.maxDepth
35
- */
36
19
  maxDepth: {
37
20
  type: string;
38
21
  defaultValue: number;
@@ -1,40 +1,23 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config FormatDetails
4
- * generally exists on the tracks in the config.json or as a 'session' config as
5
- * configuration.formatDetails
6
- */
7
2
  export function FormatDetailsConfigSchemaFactory() {
8
3
  return ConfigurationSchema('FormatDetails', {
9
- /**
10
- * #slot configuration.formatDetails.feature
11
- */
12
4
  feature: {
13
5
  type: 'frozen',
14
6
  description: 'adds extra fields to the feature details',
15
7
  defaultValue: {},
16
8
  contextVariable: ['feature'],
17
9
  },
18
- /**
19
- * #slot configuration.formatDetails.subfeatures
20
- */
21
10
  subfeatures: {
22
11
  type: 'frozen',
23
12
  description: 'adds extra fields to the subfeatures of a feature',
24
13
  defaultValue: {},
25
14
  contextVariable: ['feature'],
26
15
  },
27
- /**
28
- * #slot configuration.formatDetails.depth
29
- */
30
16
  depth: {
31
17
  type: 'number',
32
18
  defaultValue: 2,
33
19
  description: 'depth to iterate the formatDetails->subfeatures callback on subfeatures (used for example to only apply the callback to the first layer of subfeatures)',
34
20
  },
35
- /**
36
- * #slot configuration.formatDetails.maxDepth
37
- */
38
21
  maxDepth: {
39
22
  type: 'number',
40
23
  defaultValue: 10000,
@@ -1,42 +1,23 @@
1
- /**
2
- * #config HierarchicalConfigSchema
3
- * generally exists on the config.json or root config as configuration.hierarchical
4
- */
5
1
  export declare function HierarchicalConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
6
2
  sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
7
- /**
8
- * #slot configuration.hierarchical.sort.trackNames
9
- */
10
3
  trackNames: {
11
4
  type: string;
12
5
  defaultValue: boolean;
13
6
  };
14
- /**
15
- * #slot configuration.hierarchical.sort.categories
16
- */
17
7
  categories: {
18
8
  type: string;
19
9
  defaultValue: boolean;
20
10
  };
21
11
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
22
12
  defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
23
- /**
24
- * #slot configuration.hierarchical.defaultCollapsed.categoryNames
25
- */
26
13
  categoryNames: {
27
14
  type: string;
28
15
  defaultValue: never[];
29
16
  };
30
- /**
31
- * #slot configuration.hierarchical.defaultCollapsed.topLevelCategories
32
- */
33
17
  topLevelCategories: {
34
18
  type: string;
35
19
  defaultValue: boolean;
36
20
  };
37
- /**
38
- * #slot configuration.hierarchical.defaultCollapsed.subCategories
39
- */
40
21
  subCategories: {
41
22
  type: string;
42
23
  defaultValue: boolean;