@jbrowse/react-app2 3.2.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/LICENSE +201 -0
- package/dist/JBrowseApp/AppReExport.d.ts +1 -0
- package/dist/JBrowseApp/AppReExport.js +5 -0
- package/dist/JBrowseApp/JBrowseApp.d.ts +5 -0
- package/dist/JBrowseApp/JBrowseApp.js +55 -0
- package/dist/JBrowseApp/index.d.ts +1 -0
- package/dist/JBrowseApp/index.js +8 -0
- package/dist/components/AboutDialog.d.ts +1 -0
- package/dist/components/AboutDialog.js +5 -0
- package/dist/components/PreferencesDialog.d.ts +14 -0
- package/dist/components/PreferencesDialog.js +21 -0
- package/dist/corePlugins.d.ts +3 -0
- package/dist/corePlugins.js +64 -0
- package/dist/createModel.d.ts +581 -0
- package/dist/createModel.js +26 -0
- package/dist/createViewState.d.ts +1769 -0
- package/dist/createViewState.js +23 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -0
- package/dist/jbrowseModel.d.ts +139 -0
- package/dist/jbrowseModel.js +7 -0
- package/dist/loadPlugins.d.ts +12 -0
- package/dist/loadPlugins.js +12 -0
- package/dist/react-app.umd.production.min.js +185 -0
- package/dist/react-app.umd.production.min.js.LICENSE.txt +198 -0
- package/dist/react-app.umd.production.min.js.map +1 -0
- package/dist/rootModel/rootModel.d.ts +596 -0
- package/dist/rootModel/rootModel.js +166 -0
- package/dist/rootModel/rootModel.test.d.ts +1 -0
- package/dist/rootModel/rootModel.test.js +140 -0
- package/dist/rpcWorker.d.ts +2 -0
- package/dist/rpcWorker.js +49 -0
- package/dist/sessionModel/index.d.ts +2003 -0
- package/dist/sessionModel/index.js +10 -0
- package/dist/util.d.ts +5 -0
- package/dist/util.js +119 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/webpack.d.ts +7 -0
- package/dist/webpack.js +53 -0
- package/dist/workerPolyfill.d.ts +0 -0
- package/dist/workerPolyfill.js +32 -0
- package/esm/JBrowseApp/AppReExport.d.ts +1 -0
- package/esm/JBrowseApp/AppReExport.js +1 -0
- package/esm/JBrowseApp/JBrowseApp.d.ts +5 -0
- package/esm/JBrowseApp/JBrowseApp.js +20 -0
- package/esm/JBrowseApp/index.d.ts +1 -0
- package/esm/JBrowseApp/index.js +1 -0
- package/esm/components/AboutDialog.d.ts +1 -0
- package/esm/components/AboutDialog.js +1 -0
- package/esm/components/PreferencesDialog.d.ts +14 -0
- package/esm/components/PreferencesDialog.js +19 -0
- package/esm/corePlugins.d.ts +3 -0
- package/esm/corePlugins.js +59 -0
- package/esm/createModel.d.ts +581 -0
- package/esm/createModel.js +20 -0
- package/esm/createViewState.d.ts +1769 -0
- package/esm/createViewState.js +17 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +4 -0
- package/esm/jbrowseModel.d.ts +139 -0
- package/esm/jbrowseModel.js +4 -0
- package/esm/loadPlugins.d.ts +12 -0
- package/esm/loadPlugins.js +6 -0
- package/esm/makeWorkerInstance.d.ts +1 -0
- package/esm/makeWorkerInstance.js +3 -0
- package/esm/rootModel/rootModel.d.ts +596 -0
- package/esm/rootModel/rootModel.js +160 -0
- package/esm/rpcWorker.d.ts +2 -0
- package/esm/rpcWorker.js +10 -0
- package/esm/sessionModel/index.d.ts +2003 -0
- package/esm/sessionModel/index.js +7 -0
- package/esm/util.d.ts +5 -0
- package/esm/util.js +80 -0
- package/esm/version.d.ts +1 -0
- package/esm/version.js +1 -0
- package/esm/webpack.d.ts +7 -0
- package/esm/webpack.js +7 -0
- package/esm/workerPolyfill.d.ts +0 -0
- package/esm/workerPolyfill.js +32 -0
- package/package.json +103 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { onPatch } from 'mobx-state-tree';
|
|
2
|
+
import createModel from './createModel';
|
|
3
|
+
export default function createViewState(opts) {
|
|
4
|
+
const { config, plugins = [], onChange, makeWorkerInstance } = opts;
|
|
5
|
+
const { defaultSession = { name: 'NewSession' } } = config;
|
|
6
|
+
const { model, pluginManager } = createModel(plugins, makeWorkerInstance);
|
|
7
|
+
const stateTree = model.create({
|
|
8
|
+
jbrowse: config,
|
|
9
|
+
session: defaultSession,
|
|
10
|
+
}, { pluginManager });
|
|
11
|
+
pluginManager.setRootModel(stateTree);
|
|
12
|
+
pluginManager.configure();
|
|
13
|
+
if (onChange) {
|
|
14
|
+
onPatch(stateTree, onChange);
|
|
15
|
+
}
|
|
16
|
+
return stateTree;
|
|
17
|
+
}
|
package/esm/index.d.ts
ADDED
package/esm/index.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
+
export default function JBrowseWeb({ pluginManager, assemblyConfigSchema, }: {
|
|
4
|
+
pluginManager: PluginManager;
|
|
5
|
+
assemblyConfigSchema: AnyConfigurationSchemaType;
|
|
6
|
+
}): import("mobx-state-tree").IModelType<{
|
|
7
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
|
+
rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
9
|
+
defaultDriver: {
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
defaultValue: string;
|
|
13
|
+
};
|
|
14
|
+
drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
|
|
15
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
16
|
+
highResolutionScaling: {
|
|
17
|
+
type: string;
|
|
18
|
+
defaultValue: number;
|
|
19
|
+
};
|
|
20
|
+
formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
21
|
+
feature: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
defaultValue: {};
|
|
25
|
+
contextVariable: string[];
|
|
26
|
+
};
|
|
27
|
+
subfeatures: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
defaultValue: {};
|
|
31
|
+
contextVariable: string[];
|
|
32
|
+
};
|
|
33
|
+
depth: {
|
|
34
|
+
type: string;
|
|
35
|
+
defaultValue: number;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
maxDepth: {
|
|
39
|
+
type: string;
|
|
40
|
+
defaultValue: number;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
44
|
+
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
45
|
+
config: {
|
|
46
|
+
type: string;
|
|
47
|
+
description: string;
|
|
48
|
+
defaultValue: {};
|
|
49
|
+
contextVariable: string[];
|
|
50
|
+
};
|
|
51
|
+
hideUris: {
|
|
52
|
+
type: string;
|
|
53
|
+
defaultValue: boolean;
|
|
54
|
+
};
|
|
55
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
56
|
+
shareURL: {
|
|
57
|
+
type: string;
|
|
58
|
+
defaultValue: string;
|
|
59
|
+
};
|
|
60
|
+
disableAnalytics: {
|
|
61
|
+
type: string;
|
|
62
|
+
defaultValue: boolean;
|
|
63
|
+
};
|
|
64
|
+
hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
65
|
+
sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
66
|
+
trackNames: {
|
|
67
|
+
type: string;
|
|
68
|
+
defaultValue: boolean;
|
|
69
|
+
};
|
|
70
|
+
categories: {
|
|
71
|
+
type: string;
|
|
72
|
+
defaultValue: boolean;
|
|
73
|
+
};
|
|
74
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
75
|
+
defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
76
|
+
categoryNames: {
|
|
77
|
+
type: string;
|
|
78
|
+
defaultValue: never[];
|
|
79
|
+
};
|
|
80
|
+
topLevelCategories: {
|
|
81
|
+
type: string;
|
|
82
|
+
defaultValue: boolean;
|
|
83
|
+
};
|
|
84
|
+
subCategories: {
|
|
85
|
+
type: string;
|
|
86
|
+
defaultValue: boolean;
|
|
87
|
+
};
|
|
88
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
89
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
90
|
+
theme: {
|
|
91
|
+
type: string;
|
|
92
|
+
defaultValue: {};
|
|
93
|
+
};
|
|
94
|
+
extraThemes: {
|
|
95
|
+
type: string;
|
|
96
|
+
defaultValue: {};
|
|
97
|
+
};
|
|
98
|
+
logoPath: {
|
|
99
|
+
type: string;
|
|
100
|
+
defaultValue: {
|
|
101
|
+
uri: string;
|
|
102
|
+
locationType: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
106
|
+
plugins: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<import("@jbrowse/core/PluginLoader").PluginDefinition, import("@jbrowse/core/PluginLoader").PluginDefinition, import("@jbrowse/core/PluginLoader").PluginDefinition>>;
|
|
107
|
+
assemblies: import("mobx-state-tree").IArrayType<AnyConfigurationSchemaType>;
|
|
108
|
+
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
109
|
+
internetAccounts: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
110
|
+
aggregateTextSearchAdapters: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
111
|
+
connections: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
112
|
+
defaultSession: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
113
|
+
preConfiguredSessions: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<any, any, any>>;
|
|
114
|
+
}, {
|
|
115
|
+
readonly assemblyNames: string[];
|
|
116
|
+
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
117
|
+
} & {
|
|
118
|
+
addAssemblyConf(conf: import("@jbrowse/core/configuration").AnyConfigurationModel): ({
|
|
119
|
+
[x: string]: any;
|
|
120
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
121
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
122
|
+
[x: string]: any;
|
|
123
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
124
|
+
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
125
|
+
[x: string]: any;
|
|
126
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
127
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
|
|
128
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>) | undefined;
|
|
129
|
+
removeAssemblyConf(assemblyName: string): void;
|
|
130
|
+
addTrackConf(trackConf: import("@jbrowse/core/configuration").AnyConfigurationModel): any;
|
|
131
|
+
addConnectionConf(connectionConf: import("@jbrowse/core/configuration").AnyConfigurationModel): any;
|
|
132
|
+
deleteConnectionConf(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel): boolean;
|
|
133
|
+
deleteTrackConf(trackConf: import("@jbrowse/core/configuration").AnyConfigurationModel): boolean;
|
|
134
|
+
addPlugin(pluginDefinition: import("@jbrowse/core/PluginLoader").PluginDefinition): void;
|
|
135
|
+
removePlugin(pluginDefinition: import("@jbrowse/core/PluginLoader").PluginDefinition): void;
|
|
136
|
+
setDefaultSessionConf(sessionConf: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
137
|
+
addInternetAccountConf(internetAccountConf: import("@jbrowse/core/configuration").AnyConfigurationModel): any;
|
|
138
|
+
deleteInternetAccountConf(configuration: import("@jbrowse/core/configuration").AnyConfigurationModel): boolean;
|
|
139
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LoadedPlugin } from '@jbrowse/core/PluginLoader';
|
|
2
|
+
interface PluginDefinition {
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export default function loadPlugins(pluginDefinitions: PluginDefinition[], args?: {
|
|
7
|
+
fetchESM: (url: string) => Promise<LoadedPlugin>;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
plugin: import("@jbrowse/core/Plugin").PluginConstructor;
|
|
10
|
+
definition: import("@jbrowse/core/PluginLoader").PluginDefinition;
|
|
11
|
+
}[]>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import PluginLoader from '@jbrowse/core/PluginLoader';
|
|
2
|
+
export default async function loadPlugins(pluginDefinitions, args) {
|
|
3
|
+
const pluginLoader = new PluginLoader(pluginDefinitions, args);
|
|
4
|
+
pluginLoader.installGlobalReExports(window);
|
|
5
|
+
return pluginLoader.load('');
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function makeWorkerInstance(): Worker;
|