@jbrowse/product-core 2.10.1 → 2.10.3

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.
@@ -56,14 +56,10 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
56
56
  readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
57
57
  readonly aliases: string[];
58
58
  readonly displayName: string | undefined;
59
- hasName(name: string): boolean; /**
60
- * #action
61
- */
59
+ hasName(name: string): boolean;
62
60
  readonly allAliases: string[];
63
61
  readonly allRefNames: string[] | undefined;
64
- readonly lowerCaseRefNames: string[] | undefined; /**
65
- * #action
66
- */
62
+ readonly lowerCaseRefNames: string[] | undefined;
67
63
  readonly allRefNamesWithLowerCase: string[] | undefined;
68
64
  readonly rpcManager: RpcManager;
69
65
  readonly refNameColors: string[];
@@ -529,7 +525,9 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
529
525
  readonly displayName: string | undefined;
530
526
  hasName(name: string): boolean;
531
527
  readonly allAliases: string[];
532
- readonly allRefNames: string[] | undefined;
528
+ readonly allRefNames: string[] | undefined; /**
529
+ * #action
530
+ */
533
531
  readonly lowerCaseRefNames: string[] | undefined;
534
532
  readonly allRefNamesWithLowerCase: string[] | undefined;
535
533
  readonly rpcManager: RpcManager;
@@ -542,7 +540,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
542
540
  isValidRefName(refName: string): boolean;
543
541
  } & {
544
542
  setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("@jbrowse/core/assemblyManager/assembly").Loading): void;
545
- /** Type guard for checking if something is a JB root model */
546
543
  setError(e: unknown): void;
547
544
  setRegions(regions: import("@jbrowse/core/util").Region[]): void;
548
545
  setRefNameAliases(aliases: {
@@ -592,7 +589,9 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
592
589
  readonly displayName: string | undefined;
593
590
  hasName(name: string): boolean;
594
591
  readonly allAliases: string[];
595
- readonly allRefNames: string[] | undefined;
592
+ readonly allRefNames: string[] | undefined; /**
593
+ * #action
594
+ */
596
595
  readonly lowerCaseRefNames: string[] | undefined;
597
596
  readonly allRefNamesWithLowerCase: string[] | undefined;
598
597
  readonly rpcManager: RpcManager;
@@ -605,7 +604,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
605
604
  isValidRefName(refName: string): boolean;
606
605
  } & {
607
606
  setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("@jbrowse/core/assemblyManager/assembly").Loading): void;
608
- /** Type guard for checking if something is a JB root model */
609
607
  setError(e: unknown): void;
610
608
  setRegions(regions: import("@jbrowse/core/util").Region[]): void;
611
609
  setRefNameAliases(aliases: {
@@ -638,7 +636,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
638
636
  }, {
639
637
  rpcManager: RpcManager;
640
638
  adminMode: boolean;
641
- isAssemblyEditing: boolean;
642
639
  error: unknown;
643
640
  textSearchManager: TextSearchManager;
644
641
  pluginManager: PluginManager;
@@ -663,10 +660,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
663
660
  * #action
664
661
  */
665
662
  renameCurrentSession(newName: string): void;
666
- /**
667
- * #action
668
- */
669
- setAssemblyEditing(flag: boolean): void;
670
663
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
671
664
  export type BaseRootModelType = ReturnType<typeof BaseRootModelFactory>;
672
665
  export type BaseRootModel = Instance<BaseRootModelType>;
@@ -42,7 +42,6 @@ function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionModelTyp
42
42
  MainThreadRpcDriver: {},
43
43
  }),
44
44
  adminMode: false,
45
- isAssemblyEditing: false,
46
45
  error: undefined,
47
46
  textSearchManager: new TextSearchManager_1.default(pluginManager),
48
47
  pluginManager,
@@ -82,12 +81,6 @@ function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionModelTyp
82
81
  this.setSession(snapshot);
83
82
  }
84
83
  },
85
- /**
86
- * #action
87
- */
88
- setAssemblyEditing(flag) {
89
- self.isAssemblyEditing = flag;
90
- },
91
84
  }));
92
85
  }
93
86
  exports.BaseRootModelFactory = BaseRootModelFactory;
@@ -1300,7 +1300,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1300
1300
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1301
1301
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1302
1302
  adminMode: boolean;
1303
- isAssemblyEditing: boolean;
1304
1303
  error: unknown;
1305
1304
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1306
1305
  pluginManager: PluginManager;
@@ -1310,7 +1309,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1310
1309
  setDefaultSession(): void;
1311
1310
  setSessionPath(path: string): void;
1312
1311
  renameCurrentSession(newName: string): void;
1313
- setAssemblyEditing(flag: boolean): void;
1314
1312
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1315
1313
  jbrowse: import("mobx-state-tree").IAnyType;
1316
1314
  session: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IAnyType>;
@@ -1918,7 +1916,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1918
1916
  }, {
1919
1917
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1920
1918
  adminMode: boolean;
1921
- isAssemblyEditing: boolean;
1922
1919
  error: unknown;
1923
1920
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1924
1921
  pluginManager: PluginManager;
@@ -1928,7 +1925,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1928
1925
  setDefaultSession(): void;
1929
1926
  setSessionPath(path: string): void;
1930
1927
  renameCurrentSession(newName: string): void;
1931
- setAssemblyEditing(flag: boolean): void;
1932
1928
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1933
1929
  } & {
1934
1930
  readonly jbrowse: any;
@@ -554,7 +554,9 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
554
554
  removeAssembly(asm: {
555
555
  configuration: any;
556
556
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
557
- error: unknown;
557
+ error: unknown; /**
558
+ * #action
559
+ */
558
560
  loaded: boolean;
559
561
  loadingP: Promise<void> | undefined;
560
562
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -614,11 +616,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
614
616
  [x: string]: string | undefined;
615
617
  }>;
616
618
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
617
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>; /**
619
+ configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
620
+ }, {
621
+ error: unknown; /**
618
622
  * #action
619
623
  */
620
- }, {
621
- error: unknown;
622
624
  loaded: boolean;
623
625
  loadingP: Promise<void> | undefined;
624
626
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1151,7 +1153,9 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1151
1153
  removeAssembly(asm: {
1152
1154
  configuration: any;
1153
1155
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1154
- error: unknown;
1156
+ error: unknown; /**
1157
+ * #action
1158
+ */
1155
1159
  loaded: boolean;
1156
1160
  loadingP: Promise<void> | undefined;
1157
1161
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1211,11 +1215,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1211
1215
  [x: string]: string | undefined;
1212
1216
  }>;
1213
1217
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1214
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>; /**
1218
+ configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
1219
+ }, {
1220
+ error: unknown; /**
1215
1221
  * #action
1216
1222
  */
1217
- }, {
1218
- error: unknown;
1219
1223
  loaded: boolean;
1220
1224
  loadingP: Promise<void> | undefined;
1221
1225
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1281,7 +1285,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1281
1285
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1282
1286
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1283
1287
  adminMode: boolean;
1284
- isAssemblyEditing: boolean;
1285
1288
  error: unknown;
1286
1289
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1287
1290
  pluginManager: PluginManager;
@@ -1291,7 +1294,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1291
1294
  setDefaultSession(): void;
1292
1295
  setSessionPath(path: string): void;
1293
1296
  renameCurrentSession(newName: string): void;
1294
- setAssemblyEditing(flag: boolean): void;
1295
1297
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1296
1298
  jbrowse: import("mobx-state-tree").IAnyType;
1297
1299
  session: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IAnyType>;
@@ -1767,7 +1769,9 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1767
1769
  removeAssembly(asm: {
1768
1770
  configuration: any;
1769
1771
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1770
- error: unknown;
1772
+ error: unknown; /**
1773
+ * #action
1774
+ */
1771
1775
  loaded: boolean;
1772
1776
  loadingP: Promise<void> | undefined;
1773
1777
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1827,11 +1831,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1827
1831
  [x: string]: string | undefined;
1828
1832
  }>;
1829
1833
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1830
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>; /**
1834
+ configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
1835
+ }, {
1836
+ error: unknown; /**
1831
1837
  * #action
1832
1838
  */
1833
- }, {
1834
- error: unknown;
1835
1839
  loaded: boolean;
1836
1840
  loadingP: Promise<void> | undefined;
1837
1841
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1897,7 +1901,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1897
1901
  }, {
1898
1902
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1899
1903
  adminMode: boolean;
1900
- isAssemblyEditing: boolean;
1901
1904
  error: unknown;
1902
1905
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1903
1906
  pluginManager: PluginManager;
@@ -1907,7 +1910,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1907
1910
  setDefaultSession(): void;
1908
1911
  setSessionPath(path: string): void;
1909
1912
  renameCurrentSession(newName: string): void;
1910
- setAssemblyEditing(flag: boolean): void;
1911
1913
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1912
1914
  } & {
1913
1915
  readonly jbrowse: any;
@@ -2009,6 +2011,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
2009
2011
  };
2010
2012
  subfeatures: {
2011
2013
  type: string;
2014
+ /** Session mixin MST type for a session that has `sessionTracks` */
2012
2015
  description: string;
2013
2016
  defaultValue: {};
2014
2017
  contextVariable: string[];
@@ -2044,9 +2047,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
2044
2047
  setSubschema(slotName: string, data: unknown): any;
2045
2048
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
2046
2049
  } & {
2047
- addTrackConf(trackConf: AnyConfiguration): any; /**
2048
- * #action
2049
- */
2050
+ addTrackConf(trackConf: AnyConfiguration): any;
2050
2051
  deleteTrackConf(trackConf: {
2051
2052
  [x: string]: any;
2052
2053
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
@@ -22,7 +22,7 @@ function SessionTracksManagerSessionMixin(pluginManager) {
22
22
  * #getter
23
23
  */
24
24
  get tracks() {
25
- return self.jbrowse.tracks;
25
+ return [...self.sessionTracks, ...self.jbrowse.tracks];
26
26
  },
27
27
  }))
28
28
  .actions(self => {
@@ -1293,18 +1293,15 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1293
1293
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1294
1294
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1295
1295
  adminMode: boolean;
1296
- isAssemblyEditing: boolean;
1297
1296
  error: unknown;
1298
1297
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1299
1298
  pluginManager: PluginManager;
1300
1299
  } & {
1301
- /** Type guard for SessionWithTracks */
1302
1300
  setError(error: unknown): void;
1303
1301
  setSession(sessionSnapshot?: any): void;
1304
1302
  setDefaultSession(): void;
1305
1303
  setSessionPath(path: string): void;
1306
1304
  renameCurrentSession(newName: string): void;
1307
- setAssemblyEditing(flag: boolean): void;
1308
1305
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1309
1306
  jbrowse: import("mobx-state-tree").IAnyType;
1310
1307
  session: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IAnyType>;
@@ -1916,18 +1913,15 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1916
1913
  }, {
1917
1914
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1918
1915
  adminMode: boolean;
1919
- isAssemblyEditing: boolean;
1920
1916
  error: unknown;
1921
1917
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1922
1918
  pluginManager: PluginManager;
1923
1919
  } & {
1924
- /** Type guard for SessionWithTracks */
1925
1920
  setError(error: unknown): void;
1926
1921
  setSession(sessionSnapshot?: any): void;
1927
1922
  setDefaultSession(): void;
1928
1923
  setSessionPath(path: string): void;
1929
1924
  renameCurrentSession(newName: string): void;
1930
- setAssemblyEditing(flag: boolean): void;
1931
1925
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1932
1926
  } & {
1933
1927
  readonly jbrowse: any;
package/dist/rpcWorker.js CHANGED
@@ -58,7 +58,7 @@ async function initializeWorker(corePlugins, opts) {
58
58
  self.rpcServer = new librpc_web_mod_1.default.Server({
59
59
  ...rpcConfig,
60
60
  ...(0, remoteAbortSignals_1.remoteAbortRpcHandler)(),
61
- ping: () => {
61
+ ping: async () => {
62
62
  // the ping method is required by the worker driver for checking the
63
63
  // health of the worker
64
64
  },
@@ -22,47 +22,33 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
25
  Object.defineProperty(exports, "__esModule", { value: true });
29
26
  const react_1 = __importStar(require("react"));
30
- const material_1 = require("@mui/material");
31
27
  const configuration_1 = require("@jbrowse/core/configuration");
32
- const LoadingEllipses_1 = __importDefault(require("@jbrowse/core/ui/LoadingEllipses"));
33
28
  const util_1 = require("@jbrowse/core/util");
34
29
  const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail");
30
+ const ui_1 = require("@jbrowse/core/ui");
35
31
  function FileInfoPanel({ config, }) {
36
32
  const [error, setError] = (0, react_1.useState)();
37
33
  const [info, setInfo] = (0, react_1.useState)();
38
34
  const session = (0, util_1.getSession)(config);
39
35
  const { rpcManager } = session;
40
36
  (0, react_1.useEffect)(() => {
41
- const aborter = new AbortController();
42
- const { signal } = aborter;
43
- let cancelled = false;
37
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
38
+ ;
44
39
  (async () => {
45
40
  try {
46
41
  const adapterConfig = (0, configuration_1.readConfObject)(config, 'adapter');
47
42
  const result = await rpcManager.call(config.trackId, 'CoreGetInfo', {
48
43
  adapterConfig,
49
- signal,
50
44
  });
51
- if (!cancelled) {
52
- setInfo(result);
53
- }
45
+ setInfo(result);
54
46
  }
55
47
  catch (e) {
56
- if (!cancelled) {
57
- console.error(e);
58
- setError(e);
59
- }
48
+ console.error(e);
49
+ setError(e);
60
50
  }
61
51
  })();
62
- return () => {
63
- aborter.abort();
64
- cancelled = true;
65
- };
66
52
  }, [config, rpcManager]);
67
53
  const details = typeof info === 'string'
68
54
  ? {
@@ -71,6 +57,6 @@ function FileInfoPanel({ config, }) {
71
57
  .replaceAll('>', '&gt;')}</pre>`,
72
58
  }
73
59
  : info || {};
74
- return info !== null ? (react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { title: "File info" }, error ? (react_1.default.createElement(material_1.Typography, { color: "error" }, `${error}`)) : info === undefined ? (react_1.default.createElement(LoadingEllipses_1.default, { message: "Loading file data" })) : (react_1.default.createElement(BaseFeatureDetail_1.Attributes, { attributes: details })))) : null;
60
+ return info !== null ? (react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { title: "File info" }, error ? (react_1.default.createElement(ui_1.ErrorMessage, { error: error })) : info === undefined ? (react_1.default.createElement(ui_1.LoadingEllipses, { message: "Loading file data" })) : (react_1.default.createElement(BaseFeatureDetail_1.Attributes, { attributes: details })))) : null;
75
61
  }
76
62
  exports.default = FileInfoPanel;
@@ -56,14 +56,10 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
56
56
  readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
57
57
  readonly aliases: string[];
58
58
  readonly displayName: string | undefined;
59
- hasName(name: string): boolean; /**
60
- * #action
61
- */
59
+ hasName(name: string): boolean;
62
60
  readonly allAliases: string[];
63
61
  readonly allRefNames: string[] | undefined;
64
- readonly lowerCaseRefNames: string[] | undefined; /**
65
- * #action
66
- */
62
+ readonly lowerCaseRefNames: string[] | undefined;
67
63
  readonly allRefNamesWithLowerCase: string[] | undefined;
68
64
  readonly rpcManager: RpcManager;
69
65
  readonly refNameColors: string[];
@@ -529,7 +525,9 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
529
525
  readonly displayName: string | undefined;
530
526
  hasName(name: string): boolean;
531
527
  readonly allAliases: string[];
532
- readonly allRefNames: string[] | undefined;
528
+ readonly allRefNames: string[] | undefined; /**
529
+ * #action
530
+ */
533
531
  readonly lowerCaseRefNames: string[] | undefined;
534
532
  readonly allRefNamesWithLowerCase: string[] | undefined;
535
533
  readonly rpcManager: RpcManager;
@@ -542,7 +540,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
542
540
  isValidRefName(refName: string): boolean;
543
541
  } & {
544
542
  setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("@jbrowse/core/assemblyManager/assembly").Loading): void;
545
- /** Type guard for checking if something is a JB root model */
546
543
  setError(e: unknown): void;
547
544
  setRegions(regions: import("@jbrowse/core/util").Region[]): void;
548
545
  setRefNameAliases(aliases: {
@@ -592,7 +589,9 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
592
589
  readonly displayName: string | undefined;
593
590
  hasName(name: string): boolean;
594
591
  readonly allAliases: string[];
595
- readonly allRefNames: string[] | undefined;
592
+ readonly allRefNames: string[] | undefined; /**
593
+ * #action
594
+ */
596
595
  readonly lowerCaseRefNames: string[] | undefined;
597
596
  readonly allRefNamesWithLowerCase: string[] | undefined;
598
597
  readonly rpcManager: RpcManager;
@@ -605,7 +604,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
605
604
  isValidRefName(refName: string): boolean;
606
605
  } & {
607
606
  setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("@jbrowse/core/assemblyManager/assembly").Loading): void;
608
- /** Type guard for checking if something is a JB root model */
609
607
  setError(e: unknown): void;
610
608
  setRegions(regions: import("@jbrowse/core/util").Region[]): void;
611
609
  setRefNameAliases(aliases: {
@@ -638,7 +636,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
638
636
  }, {
639
637
  rpcManager: RpcManager;
640
638
  adminMode: boolean;
641
- isAssemblyEditing: boolean;
642
639
  error: unknown;
643
640
  textSearchManager: TextSearchManager;
644
641
  pluginManager: PluginManager;
@@ -663,10 +660,6 @@ export declare function BaseRootModelFactory({ pluginManager, jbrowseModelType,
663
660
  * #action
664
661
  */
665
662
  renameCurrentSession(newName: string): void;
666
- /**
667
- * #action
668
- */
669
- setAssemblyEditing(flag: boolean): void;
670
663
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
671
664
  export type BaseRootModelType = ReturnType<typeof BaseRootModelFactory>;
672
665
  export type BaseRootModel = Instance<BaseRootModelType>;
@@ -36,7 +36,6 @@ export function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionM
36
36
  MainThreadRpcDriver: {},
37
37
  }),
38
38
  adminMode: false,
39
- isAssemblyEditing: false,
40
39
  error: undefined,
41
40
  textSearchManager: new TextSearchManager(pluginManager),
42
41
  pluginManager,
@@ -76,12 +75,6 @@ export function BaseRootModelFactory({ pluginManager, jbrowseModelType, sessionM
76
75
  this.setSession(snapshot);
77
76
  }
78
77
  },
79
- /**
80
- * #action
81
- */
82
- setAssemblyEditing(flag) {
83
- self.isAssemblyEditing = flag;
84
- },
85
78
  }));
86
79
  }
87
80
  /** Type guard for checking if something is a JB root model */
@@ -1300,7 +1300,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1300
1300
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1301
1301
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1302
1302
  adminMode: boolean;
1303
- isAssemblyEditing: boolean;
1304
1303
  error: unknown;
1305
1304
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1306
1305
  pluginManager: PluginManager;
@@ -1310,7 +1309,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1310
1309
  setDefaultSession(): void;
1311
1310
  setSessionPath(path: string): void;
1312
1311
  renameCurrentSession(newName: string): void;
1313
- setAssemblyEditing(flag: boolean): void;
1314
1312
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1315
1313
  jbrowse: import("mobx-state-tree").IAnyType;
1316
1314
  session: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IAnyType>;
@@ -1918,7 +1916,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1918
1916
  }, {
1919
1917
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1920
1918
  adminMode: boolean;
1921
- isAssemblyEditing: boolean;
1922
1919
  error: unknown;
1923
1920
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1924
1921
  pluginManager: PluginManager;
@@ -1928,7 +1925,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1928
1925
  setDefaultSession(): void;
1929
1926
  setSessionPath(path: string): void;
1930
1927
  renameCurrentSession(newName: string): void;
1931
- setAssemblyEditing(flag: boolean): void;
1932
1928
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1933
1929
  } & {
1934
1930
  readonly jbrowse: any;
@@ -554,7 +554,9 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
554
554
  removeAssembly(asm: {
555
555
  configuration: any;
556
556
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
557
- error: unknown;
557
+ error: unknown; /**
558
+ * #action
559
+ */
558
560
  loaded: boolean;
559
561
  loadingP: Promise<void> | undefined;
560
562
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -614,11 +616,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
614
616
  [x: string]: string | undefined;
615
617
  }>;
616
618
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
617
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>; /**
619
+ configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
620
+ }, {
621
+ error: unknown; /**
618
622
  * #action
619
623
  */
620
- }, {
621
- error: unknown;
622
624
  loaded: boolean;
623
625
  loadingP: Promise<void> | undefined;
624
626
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1151,7 +1153,9 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1151
1153
  removeAssembly(asm: {
1152
1154
  configuration: any;
1153
1155
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1154
- error: unknown;
1156
+ error: unknown; /**
1157
+ * #action
1158
+ */
1155
1159
  loaded: boolean;
1156
1160
  loadingP: Promise<void> | undefined;
1157
1161
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1211,11 +1215,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1211
1215
  [x: string]: string | undefined;
1212
1216
  }>;
1213
1217
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1214
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>; /**
1218
+ configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
1219
+ }, {
1220
+ error: unknown; /**
1215
1221
  * #action
1216
1222
  */
1217
- }, {
1218
- error: unknown;
1219
1223
  loaded: boolean;
1220
1224
  loadingP: Promise<void> | undefined;
1221
1225
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1281,7 +1285,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1281
1285
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1282
1286
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1283
1287
  adminMode: boolean;
1284
- isAssemblyEditing: boolean;
1285
1288
  error: unknown;
1286
1289
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1287
1290
  pluginManager: PluginManager;
@@ -1291,7 +1294,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1291
1294
  setDefaultSession(): void;
1292
1295
  setSessionPath(path: string): void;
1293
1296
  renameCurrentSession(newName: string): void;
1294
- setAssemblyEditing(flag: boolean): void;
1295
1297
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1296
1298
  jbrowse: import("mobx-state-tree").IAnyType;
1297
1299
  session: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IAnyType>;
@@ -1767,7 +1769,9 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1767
1769
  removeAssembly(asm: {
1768
1770
  configuration: any;
1769
1771
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1770
- error: unknown;
1772
+ error: unknown; /**
1773
+ * #action
1774
+ */
1771
1775
  loaded: boolean;
1772
1776
  loadingP: Promise<void> | undefined;
1773
1777
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1827,11 +1831,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1827
1831
  [x: string]: string | undefined;
1828
1832
  }>;
1829
1833
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1830
- configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>; /**
1834
+ configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
1835
+ }, {
1836
+ error: unknown; /**
1831
1837
  * #action
1832
1838
  */
1833
- }, {
1834
- error: unknown;
1835
1839
  loaded: boolean;
1836
1840
  loadingP: Promise<void> | undefined;
1837
1841
  volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
@@ -1897,7 +1901,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1897
1901
  }, {
1898
1902
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1899
1903
  adminMode: boolean;
1900
- isAssemblyEditing: boolean;
1901
1904
  error: unknown;
1902
1905
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1903
1906
  pluginManager: PluginManager;
@@ -1907,7 +1910,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1907
1910
  setDefaultSession(): void;
1908
1911
  setSessionPath(path: string): void;
1909
1912
  renameCurrentSession(newName: string): void;
1910
- setAssemblyEditing(flag: boolean): void;
1911
1913
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1912
1914
  } & {
1913
1915
  readonly jbrowse: any;
@@ -2009,6 +2011,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
2009
2011
  };
2010
2012
  subfeatures: {
2011
2013
  type: string;
2014
+ /** Session mixin MST type for a session that has `sessionTracks` */
2012
2015
  description: string;
2013
2016
  defaultValue: {};
2014
2017
  contextVariable: string[];
@@ -2044,9 +2047,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
2044
2047
  setSubschema(slotName: string, data: unknown): any;
2045
2048
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
2046
2049
  } & {
2047
- addTrackConf(trackConf: AnyConfiguration): any; /**
2048
- * #action
2049
- */
2050
+ addTrackConf(trackConf: AnyConfiguration): any;
2050
2051
  deleteTrackConf(trackConf: {
2051
2052
  [x: string]: any;
2052
2053
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
@@ -19,7 +19,7 @@ export function SessionTracksManagerSessionMixin(pluginManager) {
19
19
  * #getter
20
20
  */
21
21
  get tracks() {
22
- return self.jbrowse.tracks;
22
+ return [...self.sessionTracks, ...self.jbrowse.tracks];
23
23
  },
24
24
  }))
25
25
  .actions(self => {
@@ -1293,18 +1293,15 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1293
1293
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1294
1294
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1295
1295
  adminMode: boolean;
1296
- isAssemblyEditing: boolean;
1297
1296
  error: unknown;
1298
1297
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1299
1298
  pluginManager: PluginManager;
1300
1299
  } & {
1301
- /** Type guard for SessionWithTracks */
1302
1300
  setError(error: unknown): void;
1303
1301
  setSession(sessionSnapshot?: any): void;
1304
1302
  setDefaultSession(): void;
1305
1303
  setSessionPath(path: string): void;
1306
1304
  renameCurrentSession(newName: string): void;
1307
- setAssemblyEditing(flag: boolean): void;
1308
1305
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
1309
1306
  jbrowse: import("mobx-state-tree").IAnyType;
1310
1307
  session: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IAnyType>;
@@ -1916,18 +1913,15 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
1916
1913
  }, {
1917
1914
  rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
1918
1915
  adminMode: boolean;
1919
- isAssemblyEditing: boolean;
1920
1916
  error: unknown;
1921
1917
  textSearchManager: import("@jbrowse/core/util").TextSearchManager;
1922
1918
  pluginManager: PluginManager;
1923
1919
  } & {
1924
- /** Type guard for SessionWithTracks */
1925
1920
  setError(error: unknown): void;
1926
1921
  setSession(sessionSnapshot?: any): void;
1927
1922
  setDefaultSession(): void;
1928
1923
  setSessionPath(path: string): void;
1929
1924
  renameCurrentSession(newName: string): void;
1930
- setAssemblyEditing(flag: boolean): void;
1931
1925
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1932
1926
  } & {
1933
1927
  readonly jbrowse: any;
package/esm/rpcWorker.js CHANGED
@@ -52,7 +52,7 @@ export async function initializeWorker(corePlugins, opts) {
52
52
  self.rpcServer = new RpcServer.Server({
53
53
  ...rpcConfig,
54
54
  ...remoteAbortRpcHandler(),
55
- ping: () => {
55
+ ping: async () => {
56
56
  // the ping method is required by the worker driver for checking the
57
57
  // health of the worker
58
58
  },
@@ -1,40 +1,29 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { Typography } from '@mui/material';
3
2
  import { readConfObject, } from '@jbrowse/core/configuration';
4
- import LoadingEllipses from '@jbrowse/core/ui/LoadingEllipses';
5
3
  import { getSession } from '@jbrowse/core/util';
6
4
  import { BaseCard, Attributes, } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
5
+ import { ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
7
6
  export default function FileInfoPanel({ config, }) {
8
7
  const [error, setError] = useState();
9
8
  const [info, setInfo] = useState();
10
9
  const session = getSession(config);
11
10
  const { rpcManager } = session;
12
11
  useEffect(() => {
13
- const aborter = new AbortController();
14
- const { signal } = aborter;
15
- let cancelled = false;
12
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
13
+ ;
16
14
  (async () => {
17
15
  try {
18
16
  const adapterConfig = readConfObject(config, 'adapter');
19
17
  const result = await rpcManager.call(config.trackId, 'CoreGetInfo', {
20
18
  adapterConfig,
21
- signal,
22
19
  });
23
- if (!cancelled) {
24
- setInfo(result);
25
- }
20
+ setInfo(result);
26
21
  }
27
22
  catch (e) {
28
- if (!cancelled) {
29
- console.error(e);
30
- setError(e);
31
- }
23
+ console.error(e);
24
+ setError(e);
32
25
  }
33
26
  })();
34
- return () => {
35
- aborter.abort();
36
- cancelled = true;
37
- };
38
27
  }, [config, rpcManager]);
39
28
  const details = typeof info === 'string'
40
29
  ? {
@@ -43,5 +32,5 @@ export default function FileInfoPanel({ config, }) {
43
32
  .replaceAll('>', '&gt;')}</pre>`,
44
33
  }
45
34
  : info || {};
46
- return info !== null ? (React.createElement(BaseCard, { title: "File info" }, error ? (React.createElement(Typography, { color: "error" }, `${error}`)) : info === undefined ? (React.createElement(LoadingEllipses, { message: "Loading file data" })) : (React.createElement(Attributes, { attributes: details })))) : null;
35
+ return info !== null ? (React.createElement(BaseCard, { title: "File info" }, error ? (React.createElement(ErrorMessage, { error: error })) : info === undefined ? (React.createElement(LoadingEllipses, { message: "Loading file data" })) : (React.createElement(Attributes, { attributes: details })))) : null;
47
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/product-core",
3
- "version": "2.10.1",
3
+ "version": "2.10.3",
4
4
  "sideEffects": false,
5
5
  "description": "JBrowse 2 code shared between products but not used by plugins",
6
6
  "keywords": [
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@babel/runtime": "^7.16.3",
46
- "@jbrowse/core": "^2.10.1",
46
+ "@jbrowse/core": "^2.10.3",
47
47
  "@mui/icons-material": "^5.0.0",
48
48
  "@mui/material": "^5.10.17",
49
49
  "copy-to-clipboard": "^3.3.1",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "442b5f87efddfdf4ccf520b4d9dd01ddd370cb07"
66
+ "gitHead": "c8fc800cd17decd72b2e971c7a6add3b95214e72"
67
67
  }