@jbrowse/app-core 5.0.0-beta.8 → 5.0.0-beta.9
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/esm/AppSession/AppSessionMixin.d.ts +2 -8
- package/esm/Assemblies/AssembliesMixin.d.ts +170 -92
- package/esm/JBrowseConfig/RootConfiguration.d.ts +78 -126
- package/esm/JBrowseConfig/RootConfiguration.js +5 -11
- package/esm/JBrowseConfig/defaultShareUrl.d.ts +1 -0
- package/esm/JBrowseConfig/defaultShareUrl.js +5 -0
- package/esm/JBrowseConfig/index.d.ts +79 -79
- package/esm/JBrowseConfig/index.js +1 -1
- package/esm/JBrowseModel/index.d.ts +79 -82
- package/esm/JBrowseModel/index.js +19 -10
- package/esm/JbApi/jbApi.d.ts +1069 -33
- package/esm/JbApi/jbApi.js +508 -138
- package/esm/SessionSpec/index.d.ts +1 -1
- package/esm/SessionSpec/index.js +1 -1
- package/esm/SessionSpec/loadSessionSpec.d.ts +58 -2
- package/esm/SessionSpec/loadSessionSpec.js +173 -93
- package/esm/SessionSpec/types.d.ts +6 -0
- package/esm/WorkspaceLayout/model.d.ts +8 -8
- package/esm/WorkspaceLayout/model.js +8 -8
- package/esm/ui/App/App.js +1 -2
- package/esm/ui/App/ViewStack.js +7 -1
- package/esm/ui/App/index.d.ts +1 -1
- package/esm/ui/App/index.js +1 -1
- package/package.json +4 -4
- package/esm/ui/App/AppReadyMarker.d.ts +0 -43
- package/esm/ui/App/AppReadyMarker.js +0 -78
|
@@ -11,137 +11,137 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, ext
|
|
|
11
11
|
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
12
12
|
readonly rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
13
13
|
readonly defaultDriver: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly advanced: true;
|
|
14
|
+
type: "string";
|
|
15
|
+
} & {
|
|
16
|
+
defaultValue: string;
|
|
18
17
|
};
|
|
19
18
|
readonly workerCount: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly advanced: true;
|
|
19
|
+
type: "number";
|
|
20
|
+
} & {
|
|
21
|
+
defaultValue: number;
|
|
24
22
|
};
|
|
25
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
23
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
26
24
|
readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
27
25
|
readonly feature: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
readonly contextVariable: ["feature"];
|
|
26
|
+
type: "frozen";
|
|
27
|
+
} & {
|
|
28
|
+
defaultValue: unknown;
|
|
32
29
|
};
|
|
33
30
|
readonly subfeatures: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly contextVariable: ["feature"];
|
|
31
|
+
type: "frozen";
|
|
32
|
+
} & {
|
|
33
|
+
defaultValue: unknown;
|
|
38
34
|
};
|
|
39
35
|
readonly depth: {
|
|
40
|
-
|
|
41
|
-
readonly description: "levels of subfeature the formatDetails.subfeatures callback runs on, default 2";
|
|
36
|
+
type: "maybeNumber";
|
|
42
37
|
};
|
|
43
38
|
readonly maxDepth: {
|
|
44
|
-
|
|
45
|
-
readonly description: "hide subfeatures nested deeper than this, default no limit";
|
|
39
|
+
type: "maybeNumber";
|
|
46
40
|
};
|
|
47
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
41
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
48
42
|
readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
49
43
|
readonly config: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
readonly contextVariable: ["config"];
|
|
44
|
+
type: "frozen";
|
|
45
|
+
} & {
|
|
46
|
+
defaultValue: unknown;
|
|
54
47
|
};
|
|
55
48
|
readonly hideUris: {
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
type: "boolean";
|
|
50
|
+
} & {
|
|
51
|
+
defaultValue: boolean;
|
|
58
52
|
};
|
|
59
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
53
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
60
54
|
readonly shareURL: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
type: "string";
|
|
56
|
+
} & {
|
|
57
|
+
defaultValue: string;
|
|
64
58
|
};
|
|
65
59
|
readonly disableAnalytics: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
type: "boolean";
|
|
61
|
+
} & {
|
|
62
|
+
defaultValue: boolean;
|
|
69
63
|
};
|
|
70
64
|
readonly hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
71
65
|
readonly sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
72
66
|
readonly trackNames: {
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
type: "boolean";
|
|
68
|
+
} & {
|
|
69
|
+
defaultValue: boolean;
|
|
75
70
|
};
|
|
76
71
|
readonly categories: {
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
type: "boolean";
|
|
73
|
+
} & {
|
|
74
|
+
defaultValue: boolean;
|
|
79
75
|
};
|
|
80
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
76
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
81
77
|
readonly defaultFolderCategories: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
type: "stringArray";
|
|
79
|
+
} & {
|
|
80
|
+
defaultValue: unknown;
|
|
85
81
|
};
|
|
86
82
|
readonly defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
87
83
|
readonly categoryNames: {
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
type: "stringArray";
|
|
85
|
+
} & {
|
|
86
|
+
defaultValue: unknown;
|
|
90
87
|
};
|
|
91
88
|
readonly topLevelCategories: {
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
type: "boolean";
|
|
90
|
+
} & {
|
|
91
|
+
defaultValue: boolean;
|
|
94
92
|
};
|
|
95
93
|
readonly subCategories: {
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
type: "boolean";
|
|
95
|
+
} & {
|
|
96
|
+
defaultValue: boolean;
|
|
98
97
|
};
|
|
99
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
100
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
98
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
99
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
101
100
|
readonly preferences: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
102
101
|
readonly animationMode: {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
type: "stringEnum";
|
|
103
|
+
} & {
|
|
104
|
+
model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
|
|
105
|
+
} & {
|
|
106
|
+
defaultValue: string;
|
|
106
107
|
};
|
|
107
108
|
readonly scrollZoom: {
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
type: "boolean";
|
|
110
|
+
} & {
|
|
111
|
+
defaultValue: boolean;
|
|
110
112
|
};
|
|
111
113
|
readonly numberGrouping: {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
type: "boolean";
|
|
115
|
+
} & {
|
|
116
|
+
defaultValue: boolean;
|
|
114
117
|
};
|
|
115
118
|
readonly useWorkspaces: {
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
type: "boolean";
|
|
120
|
+
} & {
|
|
121
|
+
defaultValue: boolean;
|
|
118
122
|
};
|
|
119
123
|
readonly developerMode: {
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
type: "boolean";
|
|
125
|
+
} & {
|
|
126
|
+
defaultValue: boolean;
|
|
122
127
|
};
|
|
123
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
128
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
124
129
|
readonly theme: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
type: "frozen";
|
|
131
|
+
} & {
|
|
132
|
+
defaultValue: unknown;
|
|
128
133
|
};
|
|
129
134
|
readonly extraThemes: {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
readonly advanced: true;
|
|
135
|
+
type: "frozen";
|
|
136
|
+
} & {
|
|
137
|
+
defaultValue: unknown;
|
|
134
138
|
};
|
|
135
139
|
readonly logoPath: {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
readonly uri: "";
|
|
140
|
-
readonly locationType: "UriLocation";
|
|
141
|
-
};
|
|
142
|
-
readonly advanced: true;
|
|
140
|
+
type: "fileLocation";
|
|
141
|
+
} & {
|
|
142
|
+
defaultValue: unknown;
|
|
143
143
|
};
|
|
144
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
144
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
|
145
145
|
plugins: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<PluginDefinition, PluginDefinition, PluginDefinition>>;
|
|
146
146
|
assemblies: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
|
|
147
147
|
tracks: import("@jbrowse/mobx-state-tree").IType<{
|
|
@@ -172,10 +172,7 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, ext
|
|
|
172
172
|
/**
|
|
173
173
|
* #action
|
|
174
174
|
*/
|
|
175
|
-
addAssemblyConf(conf: AnyConfigurationModel): (import("@jbrowse/
|
|
176
|
-
setSubschema(slotName: string, data: Record<string, unknown>): any;
|
|
177
|
-
setSlot(slotName: string, value: unknown): void;
|
|
178
|
-
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
|
|
175
|
+
addAssemblyConf(conf: AnyConfigurationModel): (import("@jbrowse/core/configuration").ConfigNodeProps<any> & import("@jbrowse/core/configuration").ConfigNodeActions & import("@jbrowse/core/configuration").ConfigNodeBrand<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | undefined;
|
|
179
176
|
/**
|
|
180
177
|
* #action
|
|
181
178
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
2
|
import { isPluginUrl, maybePluginUrl } from '@jbrowse/core/pluginDefinitions';
|
|
3
|
+
import { expandLooseSearchIndex } from '@jbrowse/core/util/expandLooseSearchIndex';
|
|
3
4
|
import { expandLooseTrackConfig } from '@jbrowse/core/util/tracks';
|
|
4
5
|
import { cast, getParent, getSnapshot, types } from '@jbrowse/mobx-state-tree';
|
|
5
6
|
import { migrateConfigSnapshot } from '@jbrowse/product-core';
|
|
@@ -12,21 +13,29 @@ import { JBrowseConfigF } from '../JBrowseConfig/index.js';
|
|
|
12
13
|
* config models are MST trees themselves, which is why this state model is
|
|
13
14
|
* allowed to build on one. Generally found on a property named rootModel.jbrowse
|
|
14
15
|
*/
|
|
15
|
-
// A config with exactly one assembly is what every loose track
|
|
16
|
-
// `assemblyNames` may be left off; with several,
|
|
16
|
+
// A config with exactly one assembly is what every loose track and search index
|
|
17
|
+
// is on, so `assemblyNames` may be left off; with several, each has to say.
|
|
17
18
|
function expandLooseTracks(snapshot, pluginManager) {
|
|
18
|
-
const tracks = snapshot
|
|
19
|
-
if (!Array.isArray(tracks)) {
|
|
20
|
-
return snapshot;
|
|
21
|
-
}
|
|
22
|
-
const assemblies = snapshot.assemblies;
|
|
19
|
+
const { tracks, assemblies, aggregateTextSearchAdapters: indexes } = snapshot;
|
|
23
20
|
const only = Array.isArray(assemblies) && assemblies.length === 1
|
|
24
21
|
? assemblies[0].name
|
|
25
22
|
: undefined;
|
|
26
|
-
const
|
|
27
|
-
|
|
23
|
+
const expandedTracks = Array.isArray(tracks)
|
|
24
|
+
? tracks.map(t => expandLooseTrackConfig(t, pluginManager, only))
|
|
25
|
+
: tracks;
|
|
26
|
+
const expandedIndexes = Array.isArray(indexes)
|
|
27
|
+
? indexes.map(i => expandLooseSearchIndex(i, only ? [only] : undefined))
|
|
28
|
+
: indexes;
|
|
29
|
+
const same = (a, b) => !Array.isArray(a) || a.every((x, i) => x === b[i]);
|
|
30
|
+
return same(expandedTracks, tracks) && same(expandedIndexes, indexes)
|
|
28
31
|
? snapshot
|
|
29
|
-
: {
|
|
32
|
+
: {
|
|
33
|
+
...snapshot,
|
|
34
|
+
...(expandedTracks ? { tracks: expandedTracks } : {}),
|
|
35
|
+
...(expandedIndexes
|
|
36
|
+
? { aggregateTextSearchAdapters: expandedIndexes }
|
|
37
|
+
: {}),
|
|
38
|
+
};
|
|
30
39
|
}
|
|
31
40
|
export function JBrowseModelF({ pluginManager, assemblyConfigSchema, extraConfigSlots, }) {
|
|
32
41
|
const model = JBrowseConfigF({
|