@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.
- package/dist/RootModel/BaseRootModel.d.ts +6 -43
- package/dist/RootModel/BaseRootModel.js +5 -41
- package/dist/RootModel/FormatAbout.d.ts +0 -10
- package/dist/RootModel/FormatAbout.js +0 -10
- package/dist/RootModel/FormatDetails.d.ts +0 -17
- package/dist/RootModel/FormatDetails.js +0 -17
- package/dist/RootModel/HierarchicalConfig.d.ts +0 -19
- package/dist/RootModel/HierarchicalConfig.js +0 -19
- package/dist/RootModel/InternetAccounts.d.ts +4 -20
- package/dist/RootModel/InternetAccounts.js +0 -20
- package/dist/Session/BaseSession.d.ts +5 -64
- package/dist/Session/BaseSession.js +1 -63
- package/dist/Session/Connections.d.ts +3 -34
- package/dist/Session/Connections.js +0 -30
- package/dist/Session/DialogQueue.d.ts +3 -22
- package/dist/Session/DialogQueue.js +0 -17
- package/dist/Session/DrawerWidgets.d.ts +3 -63
- package/dist/Session/DrawerWidgets.js +2 -61
- package/dist/Session/MultipleViews.d.ts +16 -65
- package/dist/Session/MultipleViews.js +2 -40
- package/dist/Session/ReferenceManagement.d.ts +2 -21
- package/dist/Session/ReferenceManagement.js +0 -23
- package/dist/Session/SessionTracks.d.ts +9 -27
- package/dist/Session/SessionTracks.js +1 -21
- package/dist/Session/Themes.d.ts +3 -21
- package/dist/Session/Themes.js +1 -17
- package/dist/Session/Tracks.d.ts +9 -27
- package/dist/Session/Tracks.js +0 -16
- package/dist/rpcWorker.d.ts +2 -2
- package/dist/rpcWorker.js +3 -17
- package/dist/ui/AboutDialog.d.ts +1 -1
- package/dist/ui/AboutDialogContents.d.ts +1 -1
- package/dist/ui/AboutDialogContents.js +7 -9
- package/dist/ui/FileInfoPanel.d.ts +1 -1
- package/dist/ui/FileInfoPanel.js +2 -3
- package/dist/ui/RefNameInfoDialog.d.ts +1 -1
- package/dist/ui/RefNameInfoDialog.js +2 -4
- package/esm/RootModel/BaseRootModel.d.ts +6 -43
- package/esm/RootModel/BaseRootModel.js +6 -42
- package/esm/RootModel/FormatAbout.d.ts +0 -10
- package/esm/RootModel/FormatAbout.js +0 -10
- package/esm/RootModel/FormatDetails.d.ts +0 -17
- package/esm/RootModel/FormatDetails.js +0 -17
- package/esm/RootModel/HierarchicalConfig.d.ts +0 -19
- package/esm/RootModel/HierarchicalConfig.js +0 -19
- package/esm/RootModel/InternetAccounts.d.ts +4 -20
- package/esm/RootModel/InternetAccounts.js +0 -20
- package/esm/Session/BaseSession.d.ts +5 -64
- package/esm/Session/BaseSession.js +1 -63
- package/esm/Session/Connections.d.ts +3 -34
- package/esm/Session/Connections.js +1 -31
- package/esm/Session/DialogQueue.d.ts +3 -22
- package/esm/Session/DialogQueue.js +0 -17
- package/esm/Session/DrawerWidgets.d.ts +3 -63
- package/esm/Session/DrawerWidgets.js +2 -61
- package/esm/Session/MultipleViews.d.ts +16 -65
- package/esm/Session/MultipleViews.js +2 -40
- package/esm/Session/ReferenceManagement.d.ts +2 -21
- package/esm/Session/ReferenceManagement.js +0 -23
- package/esm/Session/SessionTracks.d.ts +9 -27
- package/esm/Session/SessionTracks.js +1 -21
- package/esm/Session/Themes.d.ts +3 -21
- package/esm/Session/Themes.js +1 -17
- package/esm/Session/Tracks.d.ts +9 -27
- package/esm/Session/Tracks.js +0 -16
- package/esm/rpcWorker.d.ts +2 -2
- package/esm/rpcWorker.js +3 -17
- package/esm/ui/AboutDialog.d.ts +1 -1
- package/esm/ui/AboutDialog.js +1 -1
- package/esm/ui/AboutDialogContents.d.ts +1 -1
- package/esm/ui/AboutDialogContents.js +7 -9
- package/esm/ui/FileInfoPanel.d.ts +1 -1
- package/esm/ui/FileInfoPanel.js +3 -4
- package/esm/ui/RefNameInfoDialog.d.ts +1 -1
- package/esm/ui/RefNameInfoDialog.js +4 -6
- package/package.json +3 -3
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import { types } from 'mobx-state-tree';
|
|
2
|
-
// locals
|
|
3
|
-
import { TracksManagerSessionMixin } from './Tracks';
|
|
4
2
|
import { isBaseSession } from './BaseSession';
|
|
5
|
-
|
|
6
|
-
* #stateModel SessionTracksManagerSessionMixin
|
|
7
|
-
*/
|
|
3
|
+
import { TracksManagerSessionMixin } from './Tracks';
|
|
8
4
|
export function SessionTracksManagerSessionMixin(pluginManager) {
|
|
9
5
|
return TracksManagerSessionMixin(pluginManager)
|
|
10
6
|
.named('SessionTracksManagerSessionMixin')
|
|
11
7
|
.props({
|
|
12
|
-
/**
|
|
13
|
-
* #property
|
|
14
|
-
*/
|
|
15
8
|
sessionTracks: types.array(pluginManager.pluggableConfigSchemaType('track')),
|
|
16
9
|
})
|
|
17
10
|
.views(self => ({
|
|
18
|
-
/**
|
|
19
|
-
* #getter
|
|
20
|
-
*/
|
|
21
11
|
get tracks() {
|
|
22
12
|
return [...self.sessionTracks, ...self.jbrowse.tracks];
|
|
23
13
|
},
|
|
@@ -25,9 +15,6 @@ export function SessionTracksManagerSessionMixin(pluginManager) {
|
|
|
25
15
|
.actions(self => {
|
|
26
16
|
const { addTrackConf: superAddTrackConf, deleteTrackConf: superDeleteTrackConf, } = self;
|
|
27
17
|
return {
|
|
28
|
-
/**
|
|
29
|
-
* #action
|
|
30
|
-
*/
|
|
31
18
|
addTrackConf(trackConf) {
|
|
32
19
|
if (self.adminMode) {
|
|
33
20
|
return superAddTrackConf(trackConf);
|
|
@@ -43,17 +30,11 @@ export function SessionTracksManagerSessionMixin(pluginManager) {
|
|
|
43
30
|
const length = self.sessionTracks.push(trackConf);
|
|
44
31
|
return self.sessionTracks[length - 1];
|
|
45
32
|
},
|
|
46
|
-
/**
|
|
47
|
-
* #action
|
|
48
|
-
*/
|
|
49
33
|
deleteTrackConf(trackConf) {
|
|
50
|
-
// try to delete it in the main config if in admin mode
|
|
51
34
|
const found = superDeleteTrackConf(trackConf);
|
|
52
35
|
if (found) {
|
|
53
36
|
return found;
|
|
54
37
|
}
|
|
55
|
-
// if not found or not in admin mode, try to delete it in the
|
|
56
|
-
// sessionTracks
|
|
57
38
|
const { trackId } = trackConf;
|
|
58
39
|
const idx = self.sessionTracks.findIndex(t => t.trackId === trackId);
|
|
59
40
|
if (idx === -1) {
|
|
@@ -64,7 +45,6 @@ export function SessionTracksManagerSessionMixin(pluginManager) {
|
|
|
64
45
|
};
|
|
65
46
|
});
|
|
66
47
|
}
|
|
67
|
-
/** Type guard for SessionWithSessionTracks */
|
|
68
48
|
export function isSessionWithSessionTracks(thing) {
|
|
69
49
|
return isBaseSession(thing) && 'sessionTracks' in thing;
|
|
70
50
|
}
|
package/esm/Session/Themes.d.ts
CHANGED
|
@@ -1,36 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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 {};
|
package/esm/Session/Themes.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { addDisposer, types, } from 'mobx-state-tree';
|
|
2
1
|
import { getConf } from '@jbrowse/core/configuration';
|
|
3
2
|
import { createJBrowseTheme, defaultThemes } from '@jbrowse/core/ui';
|
|
4
3
|
import { localStorageGetItem, localStorageSetItem } from '@jbrowse/core/util';
|
|
5
4
|
import { autorun } from 'mobx';
|
|
6
|
-
|
|
7
|
-
* #stateModel ThemeManagerSessionMixin
|
|
8
|
-
*/
|
|
5
|
+
import { addDisposer, types } from 'mobx-state-tree';
|
|
9
6
|
export function ThemeManagerSessionMixin(_pluginManager) {
|
|
10
7
|
return types
|
|
11
8
|
.model({})
|
|
@@ -13,25 +10,16 @@ export function ThemeManagerSessionMixin(_pluginManager) {
|
|
|
13
10
|
sessionThemeName: localStorageGetItem('themeName') || 'default',
|
|
14
11
|
}))
|
|
15
12
|
.views(s => ({
|
|
16
|
-
/**
|
|
17
|
-
* #method
|
|
18
|
-
*/
|
|
19
13
|
allThemes() {
|
|
20
14
|
const self = s;
|
|
21
15
|
const extraThemes = getConf(self.jbrowse, 'extraThemes');
|
|
22
16
|
return { ...defaultThemes, ...extraThemes };
|
|
23
17
|
},
|
|
24
|
-
/**
|
|
25
|
-
* #getter
|
|
26
|
-
*/
|
|
27
18
|
get themeName() {
|
|
28
19
|
const { sessionThemeName } = s;
|
|
29
20
|
const all = this.allThemes();
|
|
30
21
|
return all[sessionThemeName] ? sessionThemeName : 'default';
|
|
31
22
|
},
|
|
32
|
-
/**
|
|
33
|
-
* #getter
|
|
34
|
-
*/
|
|
35
23
|
get theme() {
|
|
36
24
|
const self = s;
|
|
37
25
|
const configTheme = getConf(self.jbrowse, 'theme');
|
|
@@ -40,9 +28,6 @@ export function ThemeManagerSessionMixin(_pluginManager) {
|
|
|
40
28
|
},
|
|
41
29
|
}))
|
|
42
30
|
.actions(self => ({
|
|
43
|
-
/**
|
|
44
|
-
* #action
|
|
45
|
-
*/
|
|
46
31
|
setThemeName(name) {
|
|
47
32
|
self.sessionThemeName = name;
|
|
48
33
|
},
|
|
@@ -53,7 +38,6 @@ export function ThemeManagerSessionMixin(_pluginManager) {
|
|
|
53
38
|
},
|
|
54
39
|
}));
|
|
55
40
|
}
|
|
56
|
-
/** Type guard for SessionWithThemes */
|
|
57
41
|
export function isSessionWithThemes(session) {
|
|
58
42
|
return 'theme' in session;
|
|
59
43
|
}
|
package/esm/Session/Tracks.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/esm/Session/Tracks.js
CHANGED
|
@@ -1,33 +1,18 @@
|
|
|
1
1
|
import { types } from 'mobx-state-tree';
|
|
2
2
|
import { BaseSessionModel, isBaseSession } from './BaseSession';
|
|
3
3
|
import { ReferenceManagementSessionMixin } from './ReferenceManagement';
|
|
4
|
-
/**
|
|
5
|
-
* #stateModel TracksManagerSessionMixin
|
|
6
|
-
* composed of
|
|
7
|
-
* - BaseSessionModel
|
|
8
|
-
* - ReferenceManagementSessionMixin
|
|
9
|
-
*/
|
|
10
4
|
export function TracksManagerSessionMixin(pluginManager) {
|
|
11
5
|
return types
|
|
12
6
|
.compose('TracksManagerSessionMixin', BaseSessionModel(pluginManager), ReferenceManagementSessionMixin(pluginManager))
|
|
13
7
|
.views(self => ({
|
|
14
|
-
/**
|
|
15
|
-
* #getter
|
|
16
|
-
*/
|
|
17
8
|
get tracks() {
|
|
18
9
|
return self.jbrowse.tracks;
|
|
19
10
|
},
|
|
20
11
|
}))
|
|
21
12
|
.actions(self => ({
|
|
22
|
-
/**
|
|
23
|
-
* #action
|
|
24
|
-
*/
|
|
25
13
|
addTrackConf(trackConf) {
|
|
26
14
|
return self.jbrowse.addTrackConf(trackConf);
|
|
27
15
|
},
|
|
28
|
-
/**
|
|
29
|
-
* #action
|
|
30
|
-
*/
|
|
31
16
|
deleteTrackConf(trackConf) {
|
|
32
17
|
const callbacksToDereferenceTrack = [];
|
|
33
18
|
const dereferenceTypeCount = {};
|
|
@@ -42,7 +27,6 @@ export function TracksManagerSessionMixin(pluginManager) {
|
|
|
42
27
|
},
|
|
43
28
|
}));
|
|
44
29
|
}
|
|
45
|
-
/** Type guard for SessionWithTracks */
|
|
46
30
|
export function isSessionWithTracks(thing) {
|
|
47
31
|
return isBaseSession(thing) && 'tracks' in thing;
|
|
48
32
|
}
|
package/esm/rpcWorker.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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/esm/rpcWorker.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import RpcServer from 'librpc-web-mod';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
-
import { remoteAbortRpcHandler } from '@jbrowse/core/rpc/remoteAbortSignals';
|
|
4
1
|
import PluginLoader from '@jbrowse/core/PluginLoader';
|
|
2
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
+
import RpcServer from 'librpc-web-mod';
|
|
5
4
|
import { serializeError } from 'serialize-error';
|
|
6
|
-
// waits for a message from the main thread containing our configuration, which
|
|
7
|
-
// must be sent on boot
|
|
8
5
|
function receiveConfiguration() {
|
|
9
6
|
const configurationP = new Promise(resolve => {
|
|
10
7
|
function listener(e) {
|
|
@@ -19,7 +16,6 @@ function receiveConfiguration() {
|
|
|
19
16
|
return configurationP;
|
|
20
17
|
}
|
|
21
18
|
async function getPluginManager(corePlugins, opts) {
|
|
22
|
-
// Load runtime plugins
|
|
23
19
|
const config = await receiveConfiguration();
|
|
24
20
|
const pluginLoader = new PluginLoader(config.plugins, opts).installGlobalReExports(self);
|
|
25
21
|
return new PluginManager([
|
|
@@ -35,7 +31,6 @@ function wrapForRpc(func) {
|
|
|
35
31
|
return func({
|
|
36
32
|
...args,
|
|
37
33
|
statusCallback: (message) => {
|
|
38
|
-
// @ts-expect-error
|
|
39
34
|
self.rpcServer.emit(channel, message);
|
|
40
35
|
},
|
|
41
36
|
}, rpcDriverClassName);
|
|
@@ -47,19 +42,10 @@ export async function initializeWorker(corePlugins, opts) {
|
|
|
47
42
|
const rpcConfig = Object.fromEntries(pluginManager
|
|
48
43
|
.getRpcElements()
|
|
49
44
|
.map(e => [e.name, wrapForRpc(e.execute.bind(e))]));
|
|
50
|
-
|
|
51
|
-
self.rpcServer = new RpcServer.Server({
|
|
52
|
-
...rpcConfig,
|
|
53
|
-
...remoteAbortRpcHandler(),
|
|
54
|
-
ping: async () => {
|
|
55
|
-
// the ping method is required by the worker driver for checking the
|
|
56
|
-
// health of the worker
|
|
57
|
-
},
|
|
58
|
-
});
|
|
45
|
+
self.rpcServer = new RpcServer.Server(rpcConfig);
|
|
59
46
|
postMessage({ message: 'ready' });
|
|
60
47
|
}
|
|
61
48
|
catch (e) {
|
|
62
49
|
postMessage({ message: 'error', error: serializeError(e) });
|
|
63
50
|
}
|
|
64
|
-
/* do nothing */
|
|
65
51
|
}
|
package/esm/ui/AboutDialog.d.ts
CHANGED
|
@@ -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;
|
package/esm/ui/AboutDialog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Dialog from '@jbrowse/core/ui/Dialog';
|
|
3
|
-
import {
|
|
3
|
+
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
4
4
|
import { getTrackName } from '@jbrowse/core/util/tracks';
|
|
5
5
|
import AboutContents from './AboutDialogContents';
|
|
6
6
|
export function AboutDialog({ config, handleClose, }) {
|
|
@@ -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;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import clone from 'clone';
|
|
4
|
-
import copy from 'copy-to-clipboard';
|
|
5
|
-
import { Button } from '@mui/material';
|
|
6
|
-
import { makeStyles } from 'tss-react/mui';
|
|
7
|
-
import { getConf, readConfObject, } from '@jbrowse/core/configuration';
|
|
8
|
-
import { getSession, getEnv } from '@jbrowse/core/util';
|
|
9
2
|
import Attributes from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes';
|
|
10
3
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
11
|
-
|
|
4
|
+
import { getConf, readConfObject } from '@jbrowse/core/configuration';
|
|
5
|
+
import { getEnv, getSession } from '@jbrowse/core/util';
|
|
6
|
+
import { Button } from '@mui/material';
|
|
7
|
+
import copy from 'copy-to-clipboard';
|
|
8
|
+
import { observer } from 'mobx-react';
|
|
9
|
+
import { makeStyles } from 'tss-react/mui';
|
|
12
10
|
import FileInfoPanel from './FileInfoPanel';
|
|
13
11
|
import RefNameInfoDialog from './RefNameInfoDialog';
|
|
14
12
|
const useStyles = makeStyles()({
|
|
@@ -54,7 +52,7 @@ const AboutDialogContents = observer(function ({ config, }) {
|
|
|
54
52
|
setShowRefNames(true);
|
|
55
53
|
} }, "Show ref names"),
|
|
56
54
|
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
57
|
-
const snap = removeAttr(
|
|
55
|
+
const snap = removeAttr(structuredClone(conf), 'baseUri');
|
|
58
56
|
copy(JSON.stringify(snap, null, 2));
|
|
59
57
|
setCopied(true);
|
|
60
58
|
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;
|
package/esm/ui/FileInfoPanel.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { readConfObject, } from '@jbrowse/core/configuration';
|
|
3
|
-
import { getSession } from '@jbrowse/core/util';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
4
2
|
import Attributes from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes';
|
|
5
3
|
import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
|
|
4
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
6
5
|
import { ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
|
|
6
|
+
import { getSession } from '@jbrowse/core/util';
|
|
7
7
|
export default function FileInfoPanel({ config, }) {
|
|
8
8
|
const [error, setError] = useState();
|
|
9
9
|
const [info, setInfo] = useState();
|
|
10
10
|
const session = getSession(config);
|
|
11
11
|
const { rpcManager } = session;
|
|
12
12
|
useEffect(() => {
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
14
13
|
;
|
|
15
14
|
(async () => {
|
|
16
15
|
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;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
3
|
-
import { readConfObject, } from '@jbrowse/core/configuration';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
4
3
|
import { Dialog, ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
|
|
5
4
|
import { getSession } from '@jbrowse/core/util';
|
|
6
5
|
import { getConfAssemblyNames } from '@jbrowse/core/util/tracks';
|
|
6
|
+
import { Button, DialogContent } from '@mui/material';
|
|
7
|
+
import copy from 'copy-to-clipboard';
|
|
7
8
|
import { observer } from 'mobx-react';
|
|
8
9
|
import { makeStyles } from 'tss-react/mui';
|
|
9
|
-
import copy from 'copy-to-clipboard';
|
|
10
10
|
const MAX_REF_NAMES = 10000;
|
|
11
11
|
const useStyles = makeStyles()(theme => ({
|
|
12
12
|
container: {
|
|
@@ -26,7 +26,6 @@ const RefNameInfoDialog = observer(function ({ config, onClose, }) {
|
|
|
26
26
|
const [copied, setCopied] = useState(false);
|
|
27
27
|
const { rpcManager } = getSession(config);
|
|
28
28
|
useEffect(() => {
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
30
29
|
;
|
|
31
30
|
(async () => {
|
|
32
31
|
try {
|
|
@@ -36,7 +35,6 @@ const RefNameInfoDialog = observer(function ({ config, onClose, }) {
|
|
|
36
35
|
assemblyName,
|
|
37
36
|
(await rpcManager.call(config.trackId, 'CoreGetRefNames', {
|
|
38
37
|
adapterConfig,
|
|
39
|
-
// hack for synteny adapters
|
|
40
38
|
regions: [
|
|
41
39
|
{
|
|
42
40
|
assemblyName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/product-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
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.
|
|
46
|
+
"@jbrowse/core": "^2.18.0",
|
|
47
47
|
"@mui/icons-material": "^6.0.0",
|
|
48
48
|
"@mui/material": "^6.0.0",
|
|
49
49
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
|
|
66
66
|
}
|