@jbrowse/web-core 2.6.1

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.
@@ -0,0 +1,332 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { lazy } from 'react';
3
+ import clone from 'clone';
4
+ import { getConf, readConfObject, } from '@jbrowse/core/configuration';
5
+ import addSnackbarToModel from '@jbrowse/core/ui/SnackbarModel';
6
+ import { localStorageGetItem, localStorageSetItem } from '@jbrowse/core/util';
7
+ import { autorun } from 'mobx';
8
+ import { addDisposer, cast, getParent, getSnapshot, types, } from 'mobx-state-tree';
9
+ // icons
10
+ import SettingsIcon from '@mui/icons-material/Settings';
11
+ import CopyIcon from '@mui/icons-material/FileCopy';
12
+ import DeleteIcon from '@mui/icons-material/Delete';
13
+ import InfoIcon from '@mui/icons-material/Info';
14
+ import { DialogQueueSessionMixin, DrawerWidgetSessionMixin, MultipleViewsSessionMixin, ReferenceManagementSessionMixin, SessionTracksManagerSessionMixin, ThemeManagerSessionMixin, } from '@jbrowse/product-core';
15
+ import { SessionAssembliesMixin, TemporaryAssembliesMixin, } from '@jbrowse/app-core';
16
+ // locals
17
+ import { WebSessionConnectionsMixin } from '../SessionConnections';
18
+ const AboutDialog = lazy(() => import('./AboutDialog'));
19
+ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
20
+ const sessionModel = types
21
+ .compose('WebCoreSessionModel', ReferenceManagementSessionMixin(pluginManager), DrawerWidgetSessionMixin(pluginManager), DialogQueueSessionMixin(pluginManager), ThemeManagerSessionMixin(pluginManager), MultipleViewsSessionMixin(pluginManager), SessionTracksManagerSessionMixin(pluginManager), SessionAssembliesMixin(pluginManager, assemblyConfigSchema), TemporaryAssembliesMixin(pluginManager, assemblyConfigSchema), WebSessionConnectionsMixin(pluginManager))
22
+ .props({
23
+ /**
24
+ * #property
25
+ */
26
+ margin: 0,
27
+ /**
28
+ * #property
29
+ */
30
+ sessionPlugins: types.array(types.frozen()),
31
+ })
32
+ .views(self => ({
33
+ /**
34
+ * #getter
35
+ */
36
+ get tracks() {
37
+ return [...self.sessionTracks, ...self.jbrowse.tracks];
38
+ },
39
+ /**
40
+ * #getter
41
+ */
42
+ get root() {
43
+ return getParent(self);
44
+ },
45
+ /**
46
+ * #getter
47
+ * list of sessionAssemblies and jbrowse config assemblies, does not
48
+ * include temporaryAssemblies. basically the list to be displayed in a
49
+ * AssemblySelector dropdown
50
+ */
51
+ get assemblies() {
52
+ return [...self.jbrowse.assemblies, ...self.sessionAssemblies];
53
+ },
54
+ /**
55
+ * #getter
56
+ * list of config connections and session connections
57
+ */
58
+ get connections() {
59
+ return [...self.jbrowse.connections, ...self.sessionConnections];
60
+ },
61
+ }))
62
+ .actions(self => ({
63
+ /**
64
+ * #action
65
+ */
66
+ setName(str) {
67
+ self.name = str;
68
+ },
69
+ }))
70
+ .volatile(( /* self */) => ({
71
+ /**
72
+ * #volatile
73
+ */
74
+ sessionThemeName: localStorageGetItem('themeName') || 'default',
75
+ /**
76
+ * #volatile
77
+ * this is the current "task" that is being performed in the UI.
78
+ * this is usually an object of the form
79
+ * `{ taskName: "configure", target: thing_being_configured }`
80
+ */
81
+ task: undefined,
82
+ }))
83
+ .views(self => ({
84
+ /**
85
+ * #getter
86
+ * list of sessionAssemblies and jbrowse config assemblies, does not
87
+ * include temporaryAssemblies. basically the list to be displayed in a
88
+ * AssemblySelector dropdown
89
+ */
90
+ get assemblyNames() {
91
+ return self.assemblies.map(f => readConfObject(f, 'name'));
92
+ },
93
+ /**
94
+ * #getter
95
+ */
96
+ get version() {
97
+ return self.root.version;
98
+ },
99
+ /**
100
+ * #getter
101
+ */
102
+ get shareURL() {
103
+ return getConf(self.jbrowse, 'shareURL');
104
+ },
105
+ /**
106
+ * #getter
107
+ */
108
+ get textSearchManager() {
109
+ return self.root.textSearchManager;
110
+ },
111
+ /**
112
+ * #getter
113
+ */
114
+ get assemblyManager() {
115
+ return self.root.assemblyManager;
116
+ },
117
+ /**
118
+ * #getter
119
+ */
120
+ get savedSessions() {
121
+ return self.root.savedSessions;
122
+ },
123
+ /**
124
+ * #getter
125
+ */
126
+ get previousAutosaveId() {
127
+ return self.root.previousAutosaveId;
128
+ },
129
+ /**
130
+ * #getter
131
+ */
132
+ get savedSessionNames() {
133
+ return self.root.savedSessionNames;
134
+ },
135
+ /**
136
+ * #getter
137
+ */
138
+ get history() {
139
+ return self.root.history;
140
+ },
141
+ /**
142
+ * #getter
143
+ */
144
+ get menus() {
145
+ return self.root.menus;
146
+ },
147
+ /**
148
+ * #method
149
+ */
150
+ renderProps() {
151
+ return {
152
+ theme: self.theme,
153
+ };
154
+ },
155
+ }))
156
+ .actions(self => ({
157
+ /**
158
+ * #action
159
+ */
160
+ addAssemblyConf(conf) {
161
+ self.jbrowse.addAssemblyConf(conf);
162
+ },
163
+ /**
164
+ * #action
165
+ */
166
+ addSessionPlugin(plugin) {
167
+ if (self.sessionPlugins.some(p => p.name === plugin.name)) {
168
+ throw new Error('session plugin cannot be installed twice');
169
+ }
170
+ self.sessionPlugins.push(plugin);
171
+ self.root.setPluginsUpdated(true);
172
+ },
173
+ /**
174
+ * #action
175
+ */
176
+ removeSessionPlugin(pluginDefinition) {
177
+ self.sessionPlugins = cast(self.sessionPlugins.filter(plugin => plugin.url !== pluginDefinition.url ||
178
+ plugin.umdUrl !== pluginDefinition.umdUrl ||
179
+ plugin.cjsUrl !== pluginDefinition.cjsUrl ||
180
+ plugin.esmUrl !== pluginDefinition.esmUrl));
181
+ getParent(self).setPluginsUpdated(true);
182
+ },
183
+ /**
184
+ * #action
185
+ */
186
+ addSavedSession(sessionSnapshot) {
187
+ return self.root.addSavedSession(sessionSnapshot);
188
+ },
189
+ /**
190
+ * #action
191
+ */
192
+ removeSavedSession(sessionSnapshot) {
193
+ return self.root.removeSavedSession(sessionSnapshot);
194
+ },
195
+ /**
196
+ * #action
197
+ */
198
+ renameCurrentSession(sessionName) {
199
+ return self.root.renameCurrentSession(sessionName);
200
+ },
201
+ /**
202
+ * #action
203
+ */
204
+ duplicateCurrentSession() {
205
+ return self.root.duplicateCurrentSession();
206
+ },
207
+ /**
208
+ * #action
209
+ */
210
+ activateSession(sessionName) {
211
+ return self.root.activateSession(sessionName);
212
+ },
213
+ /**
214
+ * #action
215
+ */
216
+ setDefaultSession() {
217
+ return self.root.setDefaultSession();
218
+ },
219
+ /**
220
+ * #action
221
+ */
222
+ saveSessionToLocalStorage() {
223
+ return self.root.saveSessionToLocalStorage();
224
+ },
225
+ /**
226
+ * #action
227
+ */
228
+ loadAutosaveSession() {
229
+ return self.root.loadAutosaveSession();
230
+ },
231
+ /**
232
+ * #action
233
+ */
234
+ setSession(sessionSnapshot) {
235
+ return self.root.setSession(sessionSnapshot);
236
+ },
237
+ }))
238
+ .actions(self => ({
239
+ /**
240
+ * #action
241
+ */
242
+ editTrackConfiguration(configuration) {
243
+ const { adminMode, sessionTracks } = self;
244
+ if (!adminMode && !sessionTracks.includes(configuration)) {
245
+ throw new Error("Can't edit the configuration of a non-session track");
246
+ }
247
+ self.editConfiguration(configuration);
248
+ },
249
+ }))
250
+ .views(self => ({
251
+ /**
252
+ * #method
253
+ */
254
+ getTrackActionMenuItems(config) {
255
+ const { adminMode, sessionTracks } = self;
256
+ const canEdit = adminMode || sessionTracks.find(t => t.trackId === config.trackId);
257
+ // disable if it is a reference sequence track
258
+ const isRefSeq = config.type === 'ReferenceSequenceTrack';
259
+ return [
260
+ {
261
+ label: 'About track',
262
+ onClick: () => {
263
+ self.queueDialog(handleClose => [
264
+ AboutDialog,
265
+ { config, handleClose },
266
+ ]);
267
+ },
268
+ icon: InfoIcon,
269
+ },
270
+ {
271
+ label: 'Settings',
272
+ disabled: !canEdit,
273
+ onClick: () => self.editTrackConfiguration(config),
274
+ icon: SettingsIcon,
275
+ },
276
+ {
277
+ label: 'Delete track',
278
+ disabled: !canEdit || isRefSeq,
279
+ onClick: () => self.deleteTrackConf(config),
280
+ icon: DeleteIcon,
281
+ },
282
+ {
283
+ label: 'Copy track',
284
+ disabled: isRefSeq,
285
+ onClick: () => {
286
+ const snap = clone(getSnapshot(config));
287
+ const now = Date.now();
288
+ snap.trackId += `-${now}`;
289
+ snap.displays.forEach(display => {
290
+ display.displayId += `-${now}`;
291
+ });
292
+ // the -sessionTrack suffix to trackId is used as metadata for
293
+ // the track selector to store the track in a special category,
294
+ // and default category is also cleared
295
+ if (!self.adminMode) {
296
+ snap.trackId += '-sessionTrack';
297
+ snap.category = undefined;
298
+ }
299
+ snap.name += ' (copy)';
300
+ self.addTrackConf(snap);
301
+ },
302
+ icon: CopyIcon,
303
+ },
304
+ ];
305
+ },
306
+ }))
307
+ .actions(self => ({
308
+ afterAttach() {
309
+ addDisposer(self, autorun(() => {
310
+ localStorageSetItem('drawerPosition', self.drawerPosition);
311
+ localStorageSetItem('themeName', self.themeName);
312
+ }));
313
+ },
314
+ }));
315
+ const extendedSessionModel = pluginManager.evaluateExtensionPoint('Core-extendSession', sessionModel);
316
+ return types.snapshotProcessor(addSnackbarToModel(extendedSessionModel), {
317
+ // @ts-expect-error
318
+ preProcessor(snapshot) {
319
+ if (snapshot) {
320
+ // @ts-expect-error
321
+ const { connectionInstances, ...rest } = snapshot || {};
322
+ // connectionInstances schema changed from object to an array, so any
323
+ // old connectionInstances as object is in snapshot, filter it out
324
+ // https://github.com/GMOD/jbrowse-components/issues/1903
325
+ if (!Array.isArray(connectionInstances)) {
326
+ return rest;
327
+ }
328
+ }
329
+ return snapshot;
330
+ },
331
+ });
332
+ }
@@ -0,0 +1,176 @@
1
+ import PluginManager from '@jbrowse/core/PluginManager';
2
+ import { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import { BaseConnectionConfigModel } from '@jbrowse/core/pluggableElementTypes/models/baseConnectionConfig';
4
+ /**
5
+ * #stateModel WebSessionConnectionsMixin
6
+ * #category session
7
+ */
8
+ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
9
+ connectionInstances: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
10
+ name: import("mobx-state-tree").ISimpleType<string>;
11
+ tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
12
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
13
+ name: {
14
+ type: string;
15
+ defaultValue: string;
16
+ description: string;
17
+ };
18
+ assemblyNames: {
19
+ type: string;
20
+ defaultValue: never[];
21
+ description: string;
22
+ };
23
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
24
+ }, {
25
+ afterAttach(): void;
26
+ addTrackConf(trackConf: {
27
+ [x: string]: any;
28
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
29
+ setSubschema(slotName: string, data: unknown): any;
30
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): any;
31
+ addTrackConfs(trackConfs: ({
32
+ [x: string]: any;
33
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
34
+ setSubschema(slotName: string, data: unknown): any;
35
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[]): any[];
36
+ setTrackConfs(trackConfs: ({
37
+ [x: string]: any;
38
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
39
+ setSubschema(slotName: string, data: unknown): any;
40
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[]): import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
41
+ clear(): void;
42
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
43
+ } & {
44
+ /**
45
+ * #property
46
+ */
47
+ sessionConnections: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
48
+ }, {
49
+ readonly connections: ({
50
+ [x: string]: any;
51
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
52
+ setSubschema(slotName: string, data: unknown): any;
53
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
54
+ name: {
55
+ type: string;
56
+ defaultValue: string;
57
+ description: string;
58
+ };
59
+ assemblyNames: {
60
+ type: string;
61
+ defaultValue: never[];
62
+ description: string;
63
+ };
64
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>)[];
65
+ } & {
66
+ makeConnection(configuration: {
67
+ [x: string]: any;
68
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
69
+ setSubschema(slotName: string, data: unknown): any;
70
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>, initialSnapshot?: {}): {
71
+ name: string;
72
+ tracks: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
73
+ configuration: {
74
+ [x: string]: any;
75
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
76
+ setSubschema(slotName: string, data: unknown): any;
77
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
78
+ name: {
79
+ type: string;
80
+ defaultValue: string;
81
+ description: string;
82
+ };
83
+ assemblyNames: {
84
+ type: string;
85
+ defaultValue: never[];
86
+ description: string;
87
+ };
88
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>;
89
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
90
+ afterAttach(): void;
91
+ addTrackConf(trackConf: {
92
+ [x: string]: any;
93
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
94
+ setSubschema(slotName: string, data: unknown): any;
95
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): any;
96
+ addTrackConfs(trackConfs: ({
97
+ [x: string]: any;
98
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
99
+ setSubschema(slotName: string, data: unknown): any;
100
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[]): any[];
101
+ setTrackConfs(trackConfs: ({
102
+ [x: string]: any;
103
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
104
+ setSubschema(slotName: string, data: unknown): any;
105
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[]): import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
106
+ clear(): void;
107
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
108
+ name: import("mobx-state-tree").ISimpleType<string>;
109
+ tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
110
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
111
+ name: {
112
+ type: string;
113
+ defaultValue: string;
114
+ description: string;
115
+ };
116
+ assemblyNames: {
117
+ type: string;
118
+ defaultValue: never[];
119
+ description: string;
120
+ };
121
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
122
+ }, {
123
+ afterAttach(): void;
124
+ addTrackConf(trackConf: {
125
+ [x: string]: any;
126
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
127
+ setSubschema(slotName: string, data: unknown): any;
128
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): any;
129
+ addTrackConfs(trackConfs: ({
130
+ [x: string]: any;
131
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
132
+ setSubschema(slotName: string, data: unknown): any;
133
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[]): any[];
134
+ setTrackConfs(trackConfs: ({
135
+ [x: string]: any;
136
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
137
+ setSubschema(slotName: string, data: unknown): any;
138
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>)[]): import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
139
+ clear(): void;
140
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
141
+ prepareToBreakConnection(configuration: {
142
+ [x: string]: any;
143
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
144
+ setSubschema(slotName: string, data: unknown): any;
145
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): (Record<string, number> | (() => void))[] | undefined;
146
+ breakConnection(configuration: {
147
+ [x: string]: any;
148
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
149
+ setSubschema(slotName: string, data: unknown): any;
150
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): void;
151
+ deleteConnection(configuration: {
152
+ [x: string]: any;
153
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
154
+ setSubschema(slotName: string, data: unknown): any;
155
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): any;
156
+ addConnectionConf(connectionConf: {
157
+ [x: string]: any;
158
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
159
+ setSubschema(slotName: string, data: unknown): any;
160
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
161
+ name: {
162
+ type: string;
163
+ defaultValue: string;
164
+ description: string;
165
+ };
166
+ assemblyNames: {
167
+ type: string;
168
+ defaultValue: never[];
169
+ description: string;
170
+ };
171
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>): any;
172
+ clearConnections(): void;
173
+ } & {
174
+ addConnectionConf(connectionConf: BaseConnectionConfigModel): any;
175
+ deleteConnection(configuration: AnyConfigurationModel): any;
176
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,52 @@
1
+ import { types } from 'mobx-state-tree';
2
+ import { ConnectionManagementSessionMixin, } from '@jbrowse/product-core';
3
+ /**
4
+ * #stateModel WebSessionConnectionsMixin
5
+ * #category session
6
+ */
7
+ export function WebSessionConnectionsMixin(pluginManager) {
8
+ return types
9
+ .compose('SessionConnectionsManagement', ConnectionManagementSessionMixin(pluginManager), types.model({
10
+ /**
11
+ * #property
12
+ */
13
+ sessionConnections: types.array(pluginManager.pluggableConfigSchemaType('connection')),
14
+ }))
15
+ .actions(s => {
16
+ const self = s;
17
+ const superDeleteConnection = self.deleteConnection;
18
+ const superAddConnectionConf = self.addConnectionConf;
19
+ return {
20
+ addConnectionConf(connectionConf) {
21
+ if (self.adminMode) {
22
+ return superAddConnectionConf(connectionConf);
23
+ }
24
+ const { connectionId, type } = connectionConf;
25
+ if (!type) {
26
+ throw new Error(`unknown connection type ${type}`);
27
+ }
28
+ const connection = self.sessionTracks.find(c => c.connectionId === connectionId);
29
+ if (connection) {
30
+ return connection;
31
+ }
32
+ const length = self.sessionConnections.push(connectionConf);
33
+ return self.sessionConnections[length - 1];
34
+ },
35
+ deleteConnection(configuration) {
36
+ let deletedConn;
37
+ if (self.adminMode) {
38
+ deletedConn = superDeleteConnection(configuration);
39
+ }
40
+ if (!deletedConn) {
41
+ const { connectionId } = configuration;
42
+ const idx = self.sessionConnections.findIndex(c => c.connectionId === connectionId);
43
+ if (idx === -1) {
44
+ return undefined;
45
+ }
46
+ return self.sessionConnections.splice(idx, 1);
47
+ }
48
+ return deletedConn;
49
+ },
50
+ };
51
+ });
52
+ }
package/esm/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './SessionConnections';
2
+ export * from './BaseWebSession';
package/esm/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './SessionConnections';
2
+ export * from './BaseWebSession';
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@jbrowse/web-core",
3
+ "version": "2.6.1",
4
+ "description": "JBrowse 2 code shared between web-app type products",
5
+ "keywords": [
6
+ "jbrowse",
7
+ "jbrowse2",
8
+ "bionode",
9
+ "biojs",
10
+ "genomics"
11
+ ],
12
+ "license": "Apache-2.0",
13
+ "homepage": "https://jbrowse.org",
14
+ "bugs": "https://github.com/GMOD/jbrowse-components/issues",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/GMOD/jbrowse-components.git",
18
+ "directory": "packages/web-core"
19
+ },
20
+ "author": "JBrowse Team",
21
+ "distMain": "dist/index.js",
22
+ "distModule": "esm/index.js",
23
+ "srcMain": "src/index.ts",
24
+ "srcModule": "src/index.ts",
25
+ "main": "dist/index.js",
26
+ "module": "esm/index.js",
27
+ "files": [
28
+ "dist",
29
+ "esm",
30
+ "src"
31
+ ],
32
+ "scripts": {
33
+ "build:esm": "tsc --build tsconfig.build.esm.json",
34
+ "build:es5": "tsc --build tsconfig.build.es5.json",
35
+ "build": "npm run build:esm && npm run build:es5",
36
+ "test": "cd ../..; jest packages/web-core",
37
+ "clean": "rimraf dist esm *.tsbuildinfo",
38
+ "prebuild": "yarn clean",
39
+ "prepack": "yarn build && yarn useDist",
40
+ "postpack": "yarn useSrc",
41
+ "useDist": "node ../../scripts/useDist.js",
42
+ "useSrc": "node ../../scripts/useSrc.js"
43
+ },
44
+ "dependencies": {
45
+ "@babel/runtime": "^7.16.3",
46
+ "@jbrowse/app-core": "^2.6.1",
47
+ "@jbrowse/product-core": "^2.6.1",
48
+ "@mui/icons-material": "^5.0.0",
49
+ "@mui/material": "^5.10.17",
50
+ "clone": "^2.0.0",
51
+ "copy-to-clipboard": "^3.3.1",
52
+ "react-error-boundary": "^4.0.3",
53
+ "shortid": "^2.2.15"
54
+ },
55
+ "peerDependencies": {
56
+ "mobx": "^6.0.0",
57
+ "mobx-react": "^7.0.0",
58
+ "mobx-state-tree": "^5.0.0",
59
+ "react": "^17.0.0",
60
+ "react-dom": "^17.0.0",
61
+ "rxjs": "^7.0.0",
62
+ "tss-react": "^4.0.0"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public"
66
+ },
67
+ "gitHead": "1cbe7ba097fb2d2763c776e5e429e4670cdd583c"
68
+ }
@@ -0,0 +1 @@
1
+ export { AboutDialog as default } from '@jbrowse/product-core'