@jbrowse/product-core 2.16.1 → 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,14 +1,8 @@
1
- import { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
2
- import PluginManager from '@jbrowse/core/PluginManager';
3
- import { Region } from '@jbrowse/core/util';
4
- import { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes';
5
- import { IBaseViewModelWithDisplayedRegions } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
6
- /**
7
- * #stateModel MultipleViewsSessionMixin
8
- * composed of
9
- * - [BaseSessionModel](../basesessionmodel)
10
- * - [DrawerWidgetSessionMixin](../drawerwidgetsessionmixin)
11
- */
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ import type { IBaseViewModel } from '@jbrowse/core/pluggableElementTypes';
3
+ import type { IBaseViewModelWithDisplayedRegions } from '@jbrowse/core/pluggableElementTypes/models/BaseViewModel';
4
+ import type { Region } from '@jbrowse/core/util';
5
+ import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
12
6
  export declare function MultipleViewsSessionMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
13
7
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
14
8
  name: import("mobx-state-tree").ISimpleType<string>;
@@ -20,9 +14,6 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
20
14
  activeWidgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>>;
21
15
  minimized: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
22
16
  } & {
23
- /**
24
- * #property
25
- */
26
17
  views: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
27
18
  }, {
28
19
  selection: unknown;
@@ -38,9 +29,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
38
29
  }, {
39
30
  error: unknown;
40
31
  loadingP: Promise<void> | undefined;
41
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly" /**
42
- * #property
43
- */).BasicRegion[] | undefined;
32
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
44
33
  refNameAliases: {
45
34
  [x: string]: string;
46
35
  } | undefined;
@@ -53,9 +42,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
53
42
  } & {
54
43
  readonly initialized: boolean;
55
44
  readonly name: string;
56
- readonly regions: import("@jbrowse/core/assemblyManager/assembly" /**
57
- * #action
58
- */).BasicRegion[] | undefined;
45
+ readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
59
46
  readonly aliases: string[];
60
47
  readonly displayName: string | undefined;
61
48
  hasName(name: string): boolean;
@@ -610,7 +597,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
610
597
  getRefNameMapForAdapter(adapterConf: {
611
598
  [x: string]: unknown;
612
599
  }, assemblyName: string | undefined, opts: {
613
- signal?: AbortSignal;
600
+ stopToken?: string;
614
601
  sessionId: string;
615
602
  }): Promise<{
616
603
  [x: string]: string;
@@ -618,7 +605,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
618
605
  getReverseRefNameMapForAdapter(adapterConf: {
619
606
  [x: string]: unknown;
620
607
  }, assemblyName: string | undefined, opts: {
621
- signal?: AbortSignal;
608
+ stopToken?: string;
622
609
  sessionId: string;
623
610
  }): Promise<{
624
611
  [x: string]: string;
@@ -634,9 +621,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
634
621
  }, {
635
622
  error: unknown;
636
623
  loadingP: Promise<void> | undefined;
637
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly" /**
638
- * #property
639
- */).BasicRegion[] | undefined;
624
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
640
625
  refNameAliases: {
641
626
  [x: string]: string;
642
627
  } | undefined;
@@ -649,9 +634,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
649
634
  } & {
650
635
  readonly initialized: boolean;
651
636
  readonly name: string;
652
- readonly regions: import("@jbrowse/core/assemblyManager/assembly" /**
653
- * #action
654
- */).BasicRegion[] | undefined;
637
+ readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
655
638
  readonly aliases: string[];
656
639
  readonly displayName: string | undefined;
657
640
  hasName(name: string): boolean;
@@ -1136,7 +1119,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1136
1119
  getRefNameMapForAdapter(adapterConf: {
1137
1120
  [x: string]: unknown;
1138
1121
  }, assemblyName: string | undefined, opts: {
1139
- signal?: AbortSignal;
1122
+ stopToken?: string;
1140
1123
  sessionId: string;
1141
1124
  }): Promise<{
1142
1125
  [x: string]: string;
@@ -1144,7 +1127,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1144
1127
  getReverseRefNameMapForAdapter(adapterConf: {
1145
1128
  [x: string]: unknown;
1146
1129
  }, assemblyName: string | undefined, opts: {
1147
- signal?: AbortSignal;
1130
+ stopToken?: string;
1148
1131
  sessionId: string;
1149
1132
  }): Promise<{
1150
1133
  [x: string]: string;
@@ -1675,7 +1658,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1675
1658
  getRefNameMapForAdapter(adapterConf: {
1676
1659
  [x: string]: unknown;
1677
1660
  }, assemblyName: string | undefined, opts: {
1678
- signal?: AbortSignal;
1661
+ stopToken?: string;
1679
1662
  sessionId: string;
1680
1663
  }): Promise<{
1681
1664
  [x: string]: string;
@@ -1683,7 +1666,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1683
1666
  getReverseRefNameMapForAdapter(adapterConf: {
1684
1667
  [x: string]: unknown;
1685
1668
  }, assemblyName: string | undefined, opts: {
1686
- signal?: AbortSignal;
1669
+ stopToken?: string;
1687
1670
  sessionId: string;
1688
1671
  }): Promise<{
1689
1672
  [x: string]: string;
@@ -1718,9 +1701,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1718
1701
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
1719
1702
  setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
1720
1703
  [x: string]: any;
1721
- } & import("mobx-state-tree/dist/internal" /**
1722
- * #action
1723
- */).NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
1704
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
1724
1705
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
1725
1706
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
1726
1707
  readonly adminMode: boolean;
@@ -1780,48 +1761,18 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1780
1761
  editConfiguration(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
1781
1762
  afterAttach(): void;
1782
1763
  } & {
1783
- /**
1784
- * #action
1785
- */
1786
1764
  moveViewDown(id: string): void;
1787
- /**
1788
- * #action
1789
- */
1790
1765
  moveViewUp(id: string): void;
1791
- /**
1792
- * #action
1793
- */
1794
1766
  moveViewToTop(id: string): void;
1795
- /**
1796
- * #action
1797
- */
1798
1767
  moveViewToBottom(id: string): void;
1799
- /**
1800
- * #action
1801
- */
1802
1768
  addView(typeName: string, initialState?: {}): any;
1803
- /**
1804
- * #action
1805
- */
1806
1769
  removeView(view: IBaseViewModel): void;
1807
- /**
1808
- * #action
1809
- */
1810
1770
  addLinearGenomeViewOfAssembly(assemblyName: string, initialState?: {}): any;
1811
- /**
1812
- * #action
1813
- */
1814
1771
  addViewOfAssembly(viewType: string, assemblyName: string, initialState?: Record<string, unknown>): any;
1815
- /**
1816
- * #action
1817
- */
1818
1772
  addViewFromAnotherView(viewType: string, otherView: IBaseViewModelWithDisplayedRegions, initialState?: {
1819
1773
  displayedRegions?: Region[];
1820
1774
  }): any;
1821
1775
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
1822
- /** Session mixin MST type for a session that manages multiple views */
1823
1776
  export type SessionWithMultipleViewsType = ReturnType<typeof MultipleViewsSessionMixin>;
1824
- /** Instance of a session with multiple views */
1825
1777
  export type SessionWithMultipleViews = Instance<SessionWithMultipleViewsType>;
1826
- /** Type guard for SessionWithMultipleViews */
1827
1778
  export declare function isSessionWithMultipleViews(session: IAnyStateTreeNode): session is SessionWithMultipleViews;
@@ -2,48 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MultipleViewsSessionMixin = MultipleViewsSessionMixin;
4
4
  exports.isSessionWithMultipleViews = isSessionWithMultipleViews;
5
- const mobx_state_tree_1 = require("mobx-state-tree");
6
5
  const configuration_1 = require("@jbrowse/core/configuration");
7
- const DrawerWidgets_1 = require("./DrawerWidgets");
8
- // locals
6
+ const mobx_state_tree_1 = require("mobx-state-tree");
9
7
  const BaseSession_1 = require("./BaseSession");
10
- /**
11
- * #stateModel MultipleViewsSessionMixin
12
- * composed of
13
- * - [BaseSessionModel](../basesessionmodel)
14
- * - [DrawerWidgetSessionMixin](../drawerwidgetsessionmixin)
15
- */
8
+ const DrawerWidgets_1 = require("./DrawerWidgets");
16
9
  function MultipleViewsSessionMixin(pluginManager) {
17
10
  return mobx_state_tree_1.types
18
11
  .compose((0, BaseSession_1.BaseSessionModel)(pluginManager), (0, DrawerWidgets_1.DrawerWidgetSessionMixin)(pluginManager))
19
12
  .props({
20
- /**
21
- * #property
22
- */
23
13
  views: mobx_state_tree_1.types.array(pluginManager.pluggableMstType('view', 'stateModel')),
24
14
  })
25
15
  .actions(self => ({
26
- /**
27
- * #action
28
- */
29
16
  moveViewDown(id) {
30
17
  const idx = self.views.findIndex(v => v.id === id);
31
18
  if (idx !== -1 && idx < self.views.length - 1) {
32
19
  self.views.splice(idx, 2, self.views[idx + 1], self.views[idx]);
33
20
  }
34
21
  },
35
- /**
36
- * #action
37
- */
38
22
  moveViewUp(id) {
39
23
  const idx = self.views.findIndex(view => view.id === id);
40
24
  if (idx > 0) {
41
25
  self.views.splice(idx - 1, 2, self.views[idx], self.views[idx - 1]);
42
26
  }
43
27
  },
44
- /**
45
- * #action
46
- */
47
28
  moveViewToTop(id) {
48
29
  const idx = self.views.findIndex(view => view.id === id);
49
30
  self.views = (0, mobx_state_tree_1.cast)([
@@ -51,9 +32,6 @@ function MultipleViewsSessionMixin(pluginManager) {
51
32
  ...self.views.filter(view => view.id !== id),
52
33
  ]);
53
34
  },
54
- /**
55
- * #action
56
- */
57
35
  moveViewToBottom(id) {
58
36
  const idx = self.views.findIndex(view => view.id === id);
59
37
  self.views = (0, mobx_state_tree_1.cast)([
@@ -61,9 +39,6 @@ function MultipleViewsSessionMixin(pluginManager) {
61
39
  self.views[idx],
62
40
  ]);
63
41
  },
64
- /**
65
- * #action
66
- */
67
42
  addView(typeName, initialState = {}) {
68
43
  const typeDefinition = pluginManager.getElementType('view', typeName);
69
44
  if (!typeDefinition) {
@@ -75,9 +50,6 @@ function MultipleViewsSessionMixin(pluginManager) {
75
50
  });
76
51
  return self.views[length - 1];
77
52
  },
78
- /**
79
- * #action
80
- */
81
53
  removeView(view) {
82
54
  for (const [, widget] of self.activeWidgets) {
83
55
  if (widget.view && widget.view.id === view.id) {
@@ -86,15 +58,9 @@ function MultipleViewsSessionMixin(pluginManager) {
86
58
  }
87
59
  self.views.remove(view);
88
60
  },
89
- /**
90
- * #action
91
- */
92
61
  addLinearGenomeViewOfAssembly(assemblyName, initialState = {}) {
93
62
  return this.addViewOfAssembly('LinearGenomeView', assemblyName, initialState);
94
63
  },
95
- /**
96
- * #action
97
- */
98
64
  addViewOfAssembly(viewType, assemblyName, initialState = {}) {
99
65
  const asm = self.assemblies.find(s => (0, configuration_1.readConfObject)(s, 'name') === assemblyName);
100
66
  if (!asm) {
@@ -105,9 +71,6 @@ function MultipleViewsSessionMixin(pluginManager) {
105
71
  displayRegionsFromAssemblyName: (0, configuration_1.readConfObject)(asm, 'name'),
106
72
  });
107
73
  },
108
- /**
109
- * #action
110
- */
111
74
  addViewFromAnotherView(viewType, otherView, initialState = {}) {
112
75
  const state = { ...initialState };
113
76
  state.displayedRegions = (0, mobx_state_tree_1.getSnapshot)(otherView.displayedRegions);
@@ -115,7 +78,6 @@ function MultipleViewsSessionMixin(pluginManager) {
115
78
  },
116
79
  }));
117
80
  }
118
- /** Type guard for SessionWithMultipleViews */
119
81
  function isSessionWithMultipleViews(session) {
120
82
  return (0, BaseSession_1.isBaseSession)(session) && 'views' in session;
121
83
  }
@@ -1,34 +1,15 @@
1
- /** MST props, views, actions, etc related to managing connections */
2
- import PluginManager from '@jbrowse/core/PluginManager';
3
- import { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
4
2
  import type { BaseTrackConfig } from '@jbrowse/core/pluggableElementTypes';
3
+ import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
5
4
  export interface ReferringNode {
6
5
  node: IAnyStateTreeNode;
7
6
  key: string;
8
7
  }
9
- /**
10
- * #stateModel ReferenceManagementSessionMixin
11
- */
12
8
  export declare function ReferenceManagementSessionMixin(_pluginManager: PluginManager): import("mobx-state-tree").IModelType<{}, {
13
- /**
14
- * #method
15
- * See if any MST nodes currently have a types.reference to this object.
16
- *
17
- * @param object - object
18
- * @returns An array where the first element is the node referring
19
- * to the object and the second element is they property name the node is
20
- * using to refer to the object
21
- */
22
9
  getReferring(object: IAnyStateTreeNode): ReferringNode[];
23
10
  } & {
24
- /**
25
- * #action
26
- */
27
11
  removeReferring(referring: ReferringNode[], track: BaseTrackConfig, callbacks: ((arg: string) => void)[], dereferenceTypeCount: Record<string, number>): void;
28
12
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
29
- /** Session mixin MST type for a session that manages multiple views */
30
13
  export type SessionWithReferenceManagementType = ReturnType<typeof ReferenceManagementSessionMixin>;
31
- /** Instance of a session with MST reference management (`getReferring()`, `removeReferring()`) */
32
14
  export type SessionWithReferenceManagement = Instance<SessionWithReferenceManagementType>;
33
- /** Type guard for SessionWithReferenceManagement */
34
15
  export declare function isSessionWithReferenceManagement(thing: IAnyStateTreeNode): thing is SessionWithReferenceManagement;
@@ -1,28 +1,14 @@
1
1
  "use strict";
2
- /** MST props, views, actions, etc related to managing connections */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.ReferenceManagementSessionMixin = ReferenceManagementSessionMixin;
5
4
  exports.isSessionWithReferenceManagement = isSessionWithReferenceManagement;
6
5
  const util_1 = require("@jbrowse/core/util");
7
6
  const mobx_state_tree_1 = require("mobx-state-tree");
8
- // locals
9
7
  const BaseSession_1 = require("./BaseSession");
10
- /**
11
- * #stateModel ReferenceManagementSessionMixin
12
- */
13
8
  function ReferenceManagementSessionMixin(_pluginManager) {
14
9
  return mobx_state_tree_1.types
15
10
  .model('ReferenceManagementSessionMixin', {})
16
11
  .views(self => ({
17
- /**
18
- * #method
19
- * See if any MST nodes currently have a types.reference to this object.
20
- *
21
- * @param object - object
22
- * @returns An array where the first element is the node referring
23
- * to the object and the second element is they property name the node is
24
- * using to refer to the object
25
- */
26
12
  getReferring(object) {
27
13
  const refs = [];
28
14
  (0, mobx_state_tree_1.walk)((0, mobx_state_tree_1.getParent)(self), node => {
@@ -39,15 +25,10 @@ function ReferenceManagementSessionMixin(_pluginManager) {
39
25
  },
40
26
  }))
41
27
  .actions(self => ({
42
- /**
43
- * #action
44
- */
45
28
  removeReferring(referring, track, callbacks, dereferenceTypeCount) {
46
29
  referring.forEach(({ node }) => {
47
30
  let dereferenced = false;
48
31
  try {
49
- // If a view is referring to the track config, remove the track
50
- // from the view
51
32
  const type = 'open track(s)';
52
33
  const view = (0, util_1.getContainingView)(node);
53
34
  callbacks.push(() => {
@@ -60,11 +41,8 @@ function ReferenceManagementSessionMixin(_pluginManager) {
60
41
  dereferenceTypeCount[type] += 1;
61
42
  }
62
43
  catch (err1) {
63
- // ignore
64
44
  }
65
45
  if ((0, util_1.isSessionModelWithWidgets)(self) && self.widgets.has(node.id)) {
66
- // If a configuration editor widget has the track config
67
- // open, close the widget
68
46
  const type = 'configuration editor widget(s)';
69
47
  if ((0, util_1.isSessionModelWithWidgets)(self)) {
70
48
  callbacks.push(() => {
@@ -84,7 +62,6 @@ function ReferenceManagementSessionMixin(_pluginManager) {
84
62
  },
85
63
  }));
86
64
  }
87
- /** Type guard for SessionWithReferenceManagement */
88
65
  function isSessionWithReferenceManagement(thing) {
89
66
  return ((0, BaseSession_1.isBaseSession)(thing) &&
90
67
  'getReferring' in thing &&
@@ -1,17 +1,11 @@
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 SessionTracksManagerSessionMixin
6
- */
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';
7
4
  export declare function SessionTracksManagerSessionMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
8
5
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
9
6
  name: import("mobx-state-tree").ISimpleType<string>;
10
7
  margin: import("mobx-state-tree").IType<number | undefined, number, number>;
11
8
  } & {
12
- /**
13
- * #property
14
- */
15
9
  sessionTracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
16
10
  }, {
17
11
  selection: unknown;
@@ -595,7 +589,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
595
589
  getRefNameMapForAdapter(adapterConf: {
596
590
  [x: string]: unknown;
597
591
  }, assemblyName: string | undefined, opts: {
598
- signal?: AbortSignal;
592
+ stopToken?: string;
599
593
  sessionId: string;
600
594
  }): Promise<{
601
595
  [x: string]: string;
@@ -603,7 +597,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
603
597
  getReverseRefNameMapForAdapter(adapterConf: {
604
598
  [x: string]: unknown;
605
599
  }, assemblyName: string | undefined, opts: {
606
- signal?: AbortSignal;
600
+ stopToken?: string;
607
601
  sessionId: string;
608
602
  }): Promise<{
609
603
  [x: string]: string;
@@ -1117,7 +1111,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1117
1111
  getRefNameMapForAdapter(adapterConf: {
1118
1112
  [x: string]: unknown;
1119
1113
  }, assemblyName: string | undefined, opts: {
1120
- signal?: AbortSignal;
1114
+ stopToken?: string;
1121
1115
  sessionId: string;
1122
1116
  }): Promise<{
1123
1117
  [x: string]: string;
@@ -1125,7 +1119,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1125
1119
  getReverseRefNameMapForAdapter(adapterConf: {
1126
1120
  [x: string]: unknown;
1127
1121
  }, assemblyName: string | undefined, opts: {
1128
- signal?: AbortSignal;
1122
+ stopToken?: string;
1129
1123
  sessionId: string;
1130
1124
  }): Promise<{
1131
1125
  [x: string]: string;
@@ -1656,7 +1650,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1656
1650
  getRefNameMapForAdapter(adapterConf: {
1657
1651
  [x: string]: unknown;
1658
1652
  }, assemblyName: string | undefined, opts: {
1659
- signal?: AbortSignal;
1653
+ stopToken?: string;
1660
1654
  sessionId: string;
1661
1655
  }): Promise<{
1662
1656
  [x: string]: string;
@@ -1664,7 +1658,7 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1664
1658
  getReverseRefNameMapForAdapter(adapterConf: {
1665
1659
  [x: string]: unknown;
1666
1660
  }, assemblyName: string | undefined, opts: {
1667
- signal?: AbortSignal;
1661
+ stopToken?: string;
1668
1662
  sessionId: string;
1669
1663
  }): Promise<{
1670
1664
  [x: string]: string;
@@ -1763,9 +1757,6 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1763
1757
  addTrackConf(trackConf: AnyConfiguration): any;
1764
1758
  deleteTrackConf(trackConf: AnyConfigurationModel): any;
1765
1759
  } & {
1766
- /**
1767
- * #getter
1768
- */
1769
1760
  readonly tracks: ({
1770
1761
  [x: string]: any;
1771
1762
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
@@ -1778,18 +1769,9 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
1778
1769
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
1779
1770
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[];
1780
1771
  } & {
1781
- /**
1782
- * #action
1783
- */
1784
1772
  addTrackConf(trackConf: AnyConfiguration): any;
1785
- /**
1786
- * #action
1787
- */
1788
1773
  deleteTrackConf(trackConf: AnyConfigurationModel): any;
1789
1774
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
1790
- /** Session mixin MST type for a session that has `sessionTracks` */
1791
1775
  export type SessionWithSessionTracksType = ReturnType<typeof SessionTracksManagerSessionMixin>;
1792
- /** Instance of a session that has `sessionTracks` */
1793
1776
  export type SessionWithSessionTracks = Instance<SessionWithSessionTracksType>;
1794
- /** Type guard for SessionWithSessionTracks */
1795
1777
  export declare function isSessionWithSessionTracks(thing: IAnyStateTreeNode): thing is SessionWithSessionTracks;
@@ -3,25 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SessionTracksManagerSessionMixin = SessionTracksManagerSessionMixin;
4
4
  exports.isSessionWithSessionTracks = isSessionWithSessionTracks;
5
5
  const mobx_state_tree_1 = require("mobx-state-tree");
6
- // locals
7
- const Tracks_1 = require("./Tracks");
8
6
  const BaseSession_1 = require("./BaseSession");
9
- /**
10
- * #stateModel SessionTracksManagerSessionMixin
11
- */
7
+ const Tracks_1 = require("./Tracks");
12
8
  function SessionTracksManagerSessionMixin(pluginManager) {
13
9
  return (0, Tracks_1.TracksManagerSessionMixin)(pluginManager)
14
10
  .named('SessionTracksManagerSessionMixin')
15
11
  .props({
16
- /**
17
- * #property
18
- */
19
12
  sessionTracks: mobx_state_tree_1.types.array(pluginManager.pluggableConfigSchemaType('track')),
20
13
  })
21
14
  .views(self => ({
22
- /**
23
- * #getter
24
- */
25
15
  get tracks() {
26
16
  return [...self.sessionTracks, ...self.jbrowse.tracks];
27
17
  },
@@ -29,9 +19,6 @@ function SessionTracksManagerSessionMixin(pluginManager) {
29
19
  .actions(self => {
30
20
  const { addTrackConf: superAddTrackConf, deleteTrackConf: superDeleteTrackConf, } = self;
31
21
  return {
32
- /**
33
- * #action
34
- */
35
22
  addTrackConf(trackConf) {
36
23
  if (self.adminMode) {
37
24
  return superAddTrackConf(trackConf);
@@ -47,17 +34,11 @@ function SessionTracksManagerSessionMixin(pluginManager) {
47
34
  const length = self.sessionTracks.push(trackConf);
48
35
  return self.sessionTracks[length - 1];
49
36
  },
50
- /**
51
- * #action
52
- */
53
37
  deleteTrackConf(trackConf) {
54
- // try to delete it in the main config if in admin mode
55
38
  const found = superDeleteTrackConf(trackConf);
56
39
  if (found) {
57
40
  return found;
58
41
  }
59
- // if not found or not in admin mode, try to delete it in the
60
- // sessionTracks
61
42
  const { trackId } = trackConf;
62
43
  const idx = self.sessionTracks.findIndex(t => t.trackId === trackId);
63
44
  if (idx === -1) {
@@ -68,7 +49,6 @@ function SessionTracksManagerSessionMixin(pluginManager) {
68
49
  };
69
50
  });
70
51
  }
71
- /** Type guard for SessionWithSessionTracks */
72
52
  function isSessionWithSessionTracks(thing) {
73
53
  return (0, BaseSession_1.isBaseSession)(thing) && 'sessionTracks' in thing;
74
54
  }
@@ -1,36 +1,18 @@
1
- import { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
2
- import PluginManager from '@jbrowse/core/PluginManager';
3
- import { ThemeOptions } from '@mui/material';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ import type { ThemeOptions } from '@mui/material';
3
+ import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
4
4
  type ThemeMap = Record<string, ThemeOptions>;
5
- /**
6
- * #stateModel ThemeManagerSessionMixin
7
- */
8
5
  export declare function ThemeManagerSessionMixin(_pluginManager: PluginManager): import("mobx-state-tree").IModelType<{}, {
9
6
  sessionThemeName: string;
10
7
  } & {
11
- /**
12
- * #method
13
- */
14
8
  allThemes(): ThemeMap;
15
- /**
16
- * #getter
17
- */
18
9
  readonly themeName: string;
19
- /**
20
- * #getter
21
- */
22
10
  readonly theme: import("@mui/material").Theme;
23
11
  } & {
24
- /**
25
- * #action
26
- */
27
12
  setThemeName(name: string): void;
28
13
  afterAttach(): void;
29
14
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
30
- /** Session mixin MST type for a session that supports theming */
31
15
  export type SessionWithThemesType = ReturnType<typeof ThemeManagerSessionMixin>;
32
- /** Instance of a session that has theming support */
33
16
  export type SessionWithThemes = Instance<SessionWithThemesType>;
34
- /** Type guard for SessionWithThemes */
35
17
  export declare function isSessionWithThemes(session: IAnyStateTreeNode): session is SessionWithThemes;
36
18
  export {};
@@ -2,14 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ThemeManagerSessionMixin = ThemeManagerSessionMixin;
4
4
  exports.isSessionWithThemes = isSessionWithThemes;
5
- const mobx_state_tree_1 = require("mobx-state-tree");
6
5
  const configuration_1 = require("@jbrowse/core/configuration");
7
6
  const ui_1 = require("@jbrowse/core/ui");
8
7
  const util_1 = require("@jbrowse/core/util");
9
8
  const mobx_1 = require("mobx");
10
- /**
11
- * #stateModel ThemeManagerSessionMixin
12
- */
9
+ const mobx_state_tree_1 = require("mobx-state-tree");
13
10
  function ThemeManagerSessionMixin(_pluginManager) {
14
11
  return mobx_state_tree_1.types
15
12
  .model({})
@@ -17,25 +14,16 @@ function ThemeManagerSessionMixin(_pluginManager) {
17
14
  sessionThemeName: (0, util_1.localStorageGetItem)('themeName') || 'default',
18
15
  }))
19
16
  .views(s => ({
20
- /**
21
- * #method
22
- */
23
17
  allThemes() {
24
18
  const self = s;
25
19
  const extraThemes = (0, configuration_1.getConf)(self.jbrowse, 'extraThemes');
26
20
  return { ...ui_1.defaultThemes, ...extraThemes };
27
21
  },
28
- /**
29
- * #getter
30
- */
31
22
  get themeName() {
32
23
  const { sessionThemeName } = s;
33
24
  const all = this.allThemes();
34
25
  return all[sessionThemeName] ? sessionThemeName : 'default';
35
26
  },
36
- /**
37
- * #getter
38
- */
39
27
  get theme() {
40
28
  const self = s;
41
29
  const configTheme = (0, configuration_1.getConf)(self.jbrowse, 'theme');
@@ -44,9 +32,6 @@ function ThemeManagerSessionMixin(_pluginManager) {
44
32
  },
45
33
  }))
46
34
  .actions(self => ({
47
- /**
48
- * #action
49
- */
50
35
  setThemeName(name) {
51
36
  self.sessionThemeName = name;
52
37
  },
@@ -57,7 +42,6 @@ function ThemeManagerSessionMixin(_pluginManager) {
57
42
  },
58
43
  }));
59
44
  }
60
- /** Type guard for SessionWithThemes */
61
45
  function isSessionWithThemes(session) {
62
46
  return 'theme' in session;
63
47
  }