@jbrowse/app-core 5.0.0-beta.1 → 5.0.0-beta.10
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 +42 -316
- package/esm/Assemblies/AssembliesMixin.d.ts +172 -103
- package/esm/Assemblies/AssembliesMixin.js +13 -8
- package/esm/HistoryManagement/index.d.ts +3 -11
- package/esm/HistoryManagement/index.js +24 -28
- package/esm/JBrowseConfig/RootConfiguration.d.ts +80 -124
- 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 +89 -83
- package/esm/JBrowseConfig/index.js +6 -4
- package/esm/JBrowseModel/index.d.ts +93 -96
- package/esm/JBrowseModel/index.js +43 -43
- package/esm/JbApi/index.d.ts +2 -0
- package/esm/JbApi/index.js +1 -0
- package/esm/JbApi/jbApi.d.ts +2767 -0
- package/esm/JbApi/jbApi.js +1383 -0
- package/esm/RootMenu/index.d.ts +2 -11
- package/esm/RootMenu/index.js +0 -11
- package/esm/SessionSpec/index.d.ts +1 -1
- package/esm/SessionSpec/index.js +1 -1
- package/esm/SessionSpec/lgvUrlInit.js +5 -2
- package/esm/SessionSpec/loadSessionSpec.d.ts +56 -2
- package/esm/SessionSpec/loadSessionSpec.js +285 -123
- package/esm/SessionSpec/parseSessionSpecUrl.d.ts +2 -8
- package/esm/SessionSpec/parseSessionSpecUrl.js +2 -17
- package/esm/SessionSpec/types.d.ts +16 -12
- package/esm/WorkspaceLayout/WorkspaceContainer.js +4 -2
- package/esm/WorkspaceLayout/WorkspaceTab.js +2 -6
- package/esm/WorkspaceLayout/model.d.ts +24 -4
- package/esm/WorkspaceLayout/model.js +76 -17
- package/esm/WorkspaceLayout/spec.d.ts +40 -10
- package/esm/WorkspaceLayout/spec.js +81 -8
- package/esm/index.d.ts +4 -2
- package/esm/index.js +4 -1
- package/esm/menus.d.ts +15 -29
- package/esm/menus.js +76 -92
- package/esm/queryParams.d.ts +1 -1
- package/esm/queryParams.js +10 -9
- package/esm/ui/App/App.js +18 -11
- package/esm/ui/App/AppToolbar.js +23 -8
- package/esm/ui/App/ClassicViewsContainer.d.ts +2 -2
- package/esm/ui/App/DialogQueue.d.ts +2 -2
- package/esm/ui/App/DialogQueue.js +3 -3
- package/esm/ui/App/DrawerHeader.js +2 -3
- package/esm/ui/App/ThemeModeButton.d.ts +12 -0
- package/esm/ui/App/ThemeModeButton.js +34 -0
- package/esm/ui/App/ViewButtons.js +2 -2
- package/esm/ui/App/ViewContainer.js +1 -17
- package/esm/ui/App/ViewContainerTitle.js +15 -12
- package/esm/ui/App/ViewLauncher.js +1 -1
- package/esm/ui/App/ViewMenu.js +2 -2
- package/esm/ui/App/ViewStack.js +7 -1
- package/esm/ui/App/ViewsContainer.d.ts +2 -4
- package/esm/ui/App/ViewsContainer.js +3 -9
- package/esm/ui/App/index.d.ts +1 -1
- package/esm/ui/App/index.js +1 -1
- package/esm/ui/App/lazyParts.d.ts +32 -0
- package/esm/ui/App/lazyParts.js +8 -0
- package/esm/ui/App/preloadAppShell.d.ts +14 -0
- package/esm/ui/App/preloadAppShell.js +41 -0
- package/esm/ui/App/types.d.ts +12 -7
- package/esm/ui/App/useViewVisibility.d.ts +9 -8
- package/esm/ui/App/useViewVisibility.js +11 -10
- package/esm/ui/App/viewTitle.d.ts +10 -3
- package/esm/ui/App/viewTitle.js +13 -5
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/index.js +1 -1
- package/package.json +7 -7
- package/esm/ui/App/AppReadyMarker.d.ts +0 -34
- package/esm/ui/App/AppReadyMarker.js +0 -56
- package/esm/ui/App/DrawerControls.d.ts +0 -1
- package/esm/ui/App/DrawerControls.js +0 -1
- package/esm/ui/App/copyView.d.ts +0 -1
- package/esm/ui/App/copyView.js +0 -29
|
@@ -14,86 +14,87 @@ export declare function AssembliesMixin(_pluginManager: PluginManager, assemblyC
|
|
|
14
14
|
*/
|
|
15
15
|
sessionAssemblies: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
16
16
|
readonly aliases: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
type: "stringArray";
|
|
18
|
+
} & {
|
|
19
|
+
defaultValue: unknown;
|
|
20
20
|
};
|
|
21
21
|
readonly sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
22
22
|
readonly refNameColors: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
type: "stringArray";
|
|
24
|
+
} & {
|
|
25
|
+
defaultValue: unknown;
|
|
26
26
|
};
|
|
27
27
|
readonly geneticCodes: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
type: "frozen";
|
|
29
|
+
} & {
|
|
30
|
+
defaultValue: unknown;
|
|
31
31
|
};
|
|
32
32
|
readonly geneticCodesLocation: {
|
|
33
|
-
|
|
34
|
-
readonly defaultValue: {
|
|
35
|
-
readonly uri: "";
|
|
36
|
-
readonly locationType: "UriLocation";
|
|
37
|
-
};
|
|
38
|
-
readonly description: "Optional TSV file of refName<TAB>geneticCodeId, an alternative to inlining the geneticCodes map";
|
|
33
|
+
type: "maybeFileLocation";
|
|
39
34
|
};
|
|
40
35
|
readonly refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
41
|
-
readonly adapter: import("@jbrowse/
|
|
42
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
36
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
37
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
43
38
|
readonly cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
44
|
-
readonly adapter: import("@jbrowse/
|
|
45
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
39
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
40
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
46
41
|
readonly displayName: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
type: "string";
|
|
43
|
+
} & {
|
|
44
|
+
defaultValue: string;
|
|
50
45
|
};
|
|
51
|
-
|
|
46
|
+
name: {
|
|
47
|
+
type: "string";
|
|
48
|
+
} & {
|
|
49
|
+
defaultValue: string;
|
|
50
|
+
};
|
|
51
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name", undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>>, [undefined]>;
|
|
52
52
|
/**
|
|
53
53
|
* #property
|
|
54
54
|
*/
|
|
55
55
|
temporaryAssemblies: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
56
56
|
readonly aliases: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
type: "stringArray";
|
|
58
|
+
} & {
|
|
59
|
+
defaultValue: unknown;
|
|
60
60
|
};
|
|
61
61
|
readonly sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
62
62
|
readonly refNameColors: {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
type: "stringArray";
|
|
64
|
+
} & {
|
|
65
|
+
defaultValue: unknown;
|
|
66
66
|
};
|
|
67
67
|
readonly geneticCodes: {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
type: "frozen";
|
|
69
|
+
} & {
|
|
70
|
+
defaultValue: unknown;
|
|
71
71
|
};
|
|
72
72
|
readonly geneticCodesLocation: {
|
|
73
|
-
|
|
74
|
-
readonly defaultValue: {
|
|
75
|
-
readonly uri: "";
|
|
76
|
-
readonly locationType: "UriLocation";
|
|
77
|
-
};
|
|
78
|
-
readonly description: "Optional TSV file of refName<TAB>geneticCodeId, an alternative to inlining the geneticCodes map";
|
|
73
|
+
type: "maybeFileLocation";
|
|
79
74
|
};
|
|
80
75
|
readonly refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
81
|
-
readonly adapter: import("@jbrowse/
|
|
82
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
76
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
77
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
83
78
|
readonly cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
84
|
-
readonly adapter: import("@jbrowse/
|
|
85
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
79
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
80
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
86
81
|
readonly displayName: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
type: "string";
|
|
83
|
+
} & {
|
|
84
|
+
defaultValue: string;
|
|
85
|
+
};
|
|
86
|
+
name: {
|
|
87
|
+
type: "string";
|
|
88
|
+
} & {
|
|
89
|
+
defaultValue: string;
|
|
90
90
|
};
|
|
91
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name">>>, [undefined]>;
|
|
91
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name", undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>>, [undefined]>;
|
|
92
92
|
}, {
|
|
93
93
|
/**
|
|
94
94
|
* #method
|
|
95
|
-
* The assembly config
|
|
96
|
-
* arrays the assemblyManager draws on,
|
|
95
|
+
* The assembly config answering to `name`, as its name or one of its
|
|
96
|
+
* aliases, from any of the three arrays the assemblyManager draws on,
|
|
97
|
+
* or undefined.
|
|
97
98
|
*
|
|
98
99
|
* One namespace, because `name` is the assembly config's MST
|
|
99
100
|
* identifier: a second config carrying a name one of the others
|
|
@@ -102,52 +103,87 @@ export declare function AssembliesMixin(_pluginManager: PluginManager, assemblyC
|
|
|
102
103
|
* MST then throws on every read of one — inside the manager's own
|
|
103
104
|
* autorun and inside `assemblyNameMap`, which takes the session down.
|
|
104
105
|
* So each add path checks all three, not just the array it pushes to.
|
|
106
|
+
* Aliases count too: a new assembly named `GRCh38` beside an `hg38`
|
|
107
|
+
* aliased `GRCh38` would leave `get('GRCh38')` to array order.
|
|
105
108
|
*/
|
|
106
|
-
findAssemblyConf(name:
|
|
109
|
+
findAssemblyConf(name: string): BaseAssemblyConfigModel | undefined;
|
|
107
110
|
} & {
|
|
108
111
|
/**
|
|
109
112
|
* #action
|
|
110
113
|
*/
|
|
111
|
-
addSessionAssembly(conf: AnyConfiguration): (import("@jbrowse/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
addSessionAssembly(conf: AnyConfiguration): (import("@jbrowse/core/configuration").ConfigNodeProps<{
|
|
115
|
+
readonly aliases: {
|
|
116
|
+
type: "stringArray";
|
|
117
|
+
} & {
|
|
118
|
+
defaultValue: unknown;
|
|
119
|
+
};
|
|
120
|
+
readonly sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
121
|
+
readonly refNameColors: {
|
|
122
|
+
type: "stringArray";
|
|
123
|
+
} & {
|
|
124
|
+
defaultValue: unknown;
|
|
125
|
+
};
|
|
126
|
+
readonly geneticCodes: {
|
|
127
|
+
type: "frozen";
|
|
128
|
+
} & {
|
|
129
|
+
defaultValue: unknown;
|
|
130
|
+
};
|
|
131
|
+
readonly geneticCodesLocation: {
|
|
132
|
+
type: "maybeFileLocation";
|
|
133
|
+
};
|
|
134
|
+
readonly refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
135
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
136
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
137
|
+
readonly cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
138
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
139
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
140
|
+
readonly displayName: {
|
|
141
|
+
type: "string";
|
|
142
|
+
} & {
|
|
143
|
+
defaultValue: string;
|
|
144
|
+
};
|
|
145
|
+
name: {
|
|
146
|
+
type: "string";
|
|
147
|
+
} & {
|
|
148
|
+
defaultValue: string;
|
|
149
|
+
};
|
|
150
|
+
}> & import("@jbrowse/core/configuration").ConfigNodeActions & import("@jbrowse/core/configuration").ConfigNodeBrand<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
115
151
|
readonly aliases: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
152
|
+
type: "stringArray";
|
|
153
|
+
} & {
|
|
154
|
+
defaultValue: unknown;
|
|
119
155
|
};
|
|
120
156
|
readonly sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
121
157
|
readonly refNameColors: {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
158
|
+
type: "stringArray";
|
|
159
|
+
} & {
|
|
160
|
+
defaultValue: unknown;
|
|
125
161
|
};
|
|
126
162
|
readonly geneticCodes: {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
163
|
+
type: "frozen";
|
|
164
|
+
} & {
|
|
165
|
+
defaultValue: unknown;
|
|
130
166
|
};
|
|
131
167
|
readonly geneticCodesLocation: {
|
|
132
|
-
|
|
133
|
-
readonly defaultValue: {
|
|
134
|
-
readonly uri: "";
|
|
135
|
-
readonly locationType: "UriLocation";
|
|
136
|
-
};
|
|
137
|
-
readonly description: "Optional TSV file of refName<TAB>geneticCodeId, an alternative to inlining the geneticCodes map";
|
|
168
|
+
type: "maybeFileLocation";
|
|
138
169
|
};
|
|
139
170
|
readonly refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
140
|
-
readonly adapter: import("@jbrowse/
|
|
141
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
171
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
172
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
142
173
|
readonly cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
143
|
-
readonly adapter: import("@jbrowse/
|
|
144
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
174
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
175
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
145
176
|
readonly displayName: {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
177
|
+
type: "string";
|
|
178
|
+
} & {
|
|
179
|
+
defaultValue: string;
|
|
149
180
|
};
|
|
150
|
-
|
|
181
|
+
name: {
|
|
182
|
+
type: "string";
|
|
183
|
+
} & {
|
|
184
|
+
defaultValue: string;
|
|
185
|
+
};
|
|
186
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name", undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>>) | undefined;
|
|
151
187
|
/**
|
|
152
188
|
* #action
|
|
153
189
|
*/
|
|
@@ -164,46 +200,79 @@ export declare function AssembliesMixin(_pluginManager: PluginManager, assemblyC
|
|
|
164
200
|
* #action
|
|
165
201
|
* used for read vs ref type assemblies.
|
|
166
202
|
*/
|
|
167
|
-
addTemporaryAssembly(conf: AnyConfiguration): (import("@jbrowse/
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
203
|
+
addTemporaryAssembly(conf: AnyConfiguration): (import("@jbrowse/core/configuration").ConfigNodeProps<{
|
|
204
|
+
readonly aliases: {
|
|
205
|
+
type: "stringArray";
|
|
206
|
+
} & {
|
|
207
|
+
defaultValue: unknown;
|
|
208
|
+
};
|
|
209
|
+
readonly sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
210
|
+
readonly refNameColors: {
|
|
211
|
+
type: "stringArray";
|
|
212
|
+
} & {
|
|
213
|
+
defaultValue: unknown;
|
|
214
|
+
};
|
|
215
|
+
readonly geneticCodes: {
|
|
216
|
+
type: "frozen";
|
|
217
|
+
} & {
|
|
218
|
+
defaultValue: unknown;
|
|
219
|
+
};
|
|
220
|
+
readonly geneticCodesLocation: {
|
|
221
|
+
type: "maybeFileLocation";
|
|
222
|
+
};
|
|
223
|
+
readonly refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
224
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
225
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
226
|
+
readonly cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
227
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
228
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
229
|
+
readonly displayName: {
|
|
230
|
+
type: "string";
|
|
231
|
+
} & {
|
|
232
|
+
defaultValue: string;
|
|
233
|
+
};
|
|
234
|
+
name: {
|
|
235
|
+
type: "string";
|
|
236
|
+
} & {
|
|
237
|
+
defaultValue: string;
|
|
238
|
+
};
|
|
239
|
+
}> & import("@jbrowse/core/configuration").ConfigNodeActions & import("@jbrowse/core/configuration").ConfigNodeBrand<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
171
240
|
readonly aliases: {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
241
|
+
type: "stringArray";
|
|
242
|
+
} & {
|
|
243
|
+
defaultValue: unknown;
|
|
175
244
|
};
|
|
176
245
|
readonly sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
177
246
|
readonly refNameColors: {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
247
|
+
type: "stringArray";
|
|
248
|
+
} & {
|
|
249
|
+
defaultValue: unknown;
|
|
181
250
|
};
|
|
182
251
|
readonly geneticCodes: {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
252
|
+
type: "frozen";
|
|
253
|
+
} & {
|
|
254
|
+
defaultValue: unknown;
|
|
186
255
|
};
|
|
187
256
|
readonly geneticCodesLocation: {
|
|
188
|
-
|
|
189
|
-
readonly defaultValue: {
|
|
190
|
-
readonly uri: "";
|
|
191
|
-
readonly locationType: "UriLocation";
|
|
192
|
-
};
|
|
193
|
-
readonly description: "Optional TSV file of refName<TAB>geneticCodeId, an alternative to inlining the geneticCodes map";
|
|
257
|
+
type: "maybeFileLocation";
|
|
194
258
|
};
|
|
195
259
|
readonly refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
196
|
-
readonly adapter: import("@jbrowse/
|
|
197
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
260
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
261
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
198
262
|
readonly cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
199
|
-
readonly adapter: import("@jbrowse/
|
|
200
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
263
|
+
readonly adapter: import("@jbrowse/core/PluginManager").PluggableConfigSchemaType;
|
|
264
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
201
265
|
readonly displayName: {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
266
|
+
type: "string";
|
|
267
|
+
} & {
|
|
268
|
+
defaultValue: string;
|
|
269
|
+
};
|
|
270
|
+
name: {
|
|
271
|
+
type: "string";
|
|
272
|
+
} & {
|
|
273
|
+
defaultValue: string;
|
|
205
274
|
};
|
|
206
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name">>>) | undefined;
|
|
275
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name", undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>>) | undefined;
|
|
207
276
|
/**
|
|
208
277
|
* #action
|
|
209
278
|
*/
|
|
@@ -25,8 +25,9 @@ export function AssembliesMixin(_pluginManager, assemblyConfigSchemasType) {
|
|
|
25
25
|
return {
|
|
26
26
|
/**
|
|
27
27
|
* #method
|
|
28
|
-
* The assembly config
|
|
29
|
-
* arrays the assemblyManager draws on,
|
|
28
|
+
* The assembly config answering to `name`, as its name or one of its
|
|
29
|
+
* aliases, from any of the three arrays the assemblyManager draws on,
|
|
30
|
+
* or undefined.
|
|
30
31
|
*
|
|
31
32
|
* One namespace, because `name` is the assembly config's MST
|
|
32
33
|
* identifier: a second config carrying a name one of the others
|
|
@@ -35,13 +36,17 @@ export function AssembliesMixin(_pluginManager, assemblyConfigSchemasType) {
|
|
|
35
36
|
* MST then throws on every read of one — inside the manager's own
|
|
36
37
|
* autorun and inside `assemblyNameMap`, which takes the session down.
|
|
37
38
|
* So each add path checks all three, not just the array it pushes to.
|
|
39
|
+
* Aliases count too: a new assembly named `GRCh38` beside an `hg38`
|
|
40
|
+
* aliased `GRCh38` would leave `get('GRCh38')` to array order.
|
|
38
41
|
*/
|
|
39
42
|
findAssemblyConf(name) {
|
|
40
|
-
|
|
43
|
+
const confs = [
|
|
41
44
|
...self.jbrowse.assemblies,
|
|
42
45
|
...self.sessionAssemblies,
|
|
43
46
|
...self.temporaryAssemblies,
|
|
44
|
-
]
|
|
47
|
+
];
|
|
48
|
+
return (confs.find(f => f.name === name) ??
|
|
49
|
+
confs.find(f => f.aliases.includes(name)));
|
|
45
50
|
},
|
|
46
51
|
};
|
|
47
52
|
})
|
|
@@ -83,12 +88,12 @@ export function AssembliesMixin(_pluginManager, assemblyConfigSchemasType) {
|
|
|
83
88
|
* #action
|
|
84
89
|
*/
|
|
85
90
|
removeAssembly(name) {
|
|
86
|
-
if (self.
|
|
87
|
-
self.jbrowse.removeAssemblyConf(name);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
91
|
+
if (self.sessionAssemblies.some(a => a.name === name)) {
|
|
90
92
|
this.removeSessionAssembly(name);
|
|
91
93
|
}
|
|
94
|
+
else if (self.adminMode) {
|
|
95
|
+
self.jbrowse.removeAssemblyConf(name);
|
|
96
|
+
}
|
|
92
97
|
},
|
|
93
98
|
/**
|
|
94
99
|
* #action
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Session undo must not steal the text editor's. The keydown listener below is
|
|
5
|
-
* on `document`, so it sees ctrl+z no matter what has focus — including the
|
|
6
|
-
* multiline TextFields the config editor, the jexl/JSON monospace field, and
|
|
7
|
-
* the paste-config workflows are built from. Those render a `<textarea>`, not
|
|
8
|
-
* an `<input>`, so an INPUT-only check let a keystroke meant to undo typing
|
|
9
|
-
* roll back the whole session instead.
|
|
10
|
-
*/
|
|
11
|
-
export declare function isTextEntryFocused(): boolean;
|
|
1
|
+
type ShortcutKeys = Pick<KeyboardEvent, 'key' | 'code' | 'ctrlKey' | 'metaKey' | 'shiftKey'>;
|
|
2
|
+
export declare function historyShortcut(e: ShortcutKeys): "redo" | "undo" | undefined;
|
|
12
3
|
/**
|
|
13
4
|
* #stateModel HistoryManagementMixin
|
|
14
5
|
* #category root
|
|
@@ -40,3 +31,4 @@ export declare function HistoryManagementMixin(): import("@jbrowse/mobx-state-tr
|
|
|
40
31
|
afterCreate(): void;
|
|
41
32
|
beforeDestroy(): void;
|
|
42
33
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
|
|
34
|
+
export {};
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import TimeTraveller from '@jbrowse/core/util/TimeTraveller';
|
|
2
|
+
import { isTextEntryFocused } from '@jbrowse/core/util/isTextEntryFocused';
|
|
2
3
|
import { addDisposer, types } from '@jbrowse/mobx-state-tree';
|
|
3
4
|
import { asRoot } from '@jbrowse/product-core';
|
|
4
5
|
import { autorun } from 'mobx';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
// `key` follows the layout, so undo is wherever the user's Z is (QWERTZ reports
|
|
7
|
+
// it as `code: 'KeyY'`, AZERTY as `KeyW`); a non-Latin layout has no letter
|
|
8
|
+
// there, and the physical key stands in
|
|
9
|
+
function shortcutLetter(e) {
|
|
10
|
+
const key = e.key.toLowerCase();
|
|
11
|
+
return /^[a-z]$/.test(key) ? key : e.code.replace(/^Key/, '').toLowerCase();
|
|
12
|
+
}
|
|
13
|
+
// modifiers first: a synthetic keydown (autofill, an extension) is a bare Event
|
|
14
|
+
// with no `key` to read
|
|
15
|
+
export function historyShortcut(e) {
|
|
16
|
+
if (!e.ctrlKey && !e.metaKey) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const letter = shortcutLetter(e);
|
|
20
|
+
if (letter === 'z') {
|
|
21
|
+
return e.shiftKey ? 'redo' : 'undo';
|
|
22
|
+
}
|
|
23
|
+
if (e.ctrlKey && !e.shiftKey && letter === 'y') {
|
|
24
|
+
return 'redo';
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
// coerced: isContentEditable is declared boolean but is undefined in jsdom,
|
|
22
|
-
// so the raw expression returns undefined for an ordinary focused element
|
|
23
|
-
return tag === 'INPUT' || tag === 'TEXTAREA' || !!el.isContentEditable;
|
|
26
|
+
return undefined;
|
|
24
27
|
}
|
|
25
28
|
/**
|
|
26
29
|
* #stateModel HistoryManagementMixin
|
|
@@ -40,18 +43,11 @@ export function HistoryManagementMixin() {
|
|
|
40
43
|
if (isTextEntryFocused()) {
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(((e.ctrlKey || e.metaKey) && e.shiftKey && e.code === 'KeyZ') ||
|
|
46
|
-
// ctrl+y
|
|
47
|
-
(e.ctrlKey && !e.shiftKey && e.code === 'KeyY'))) {
|
|
46
|
+
const shortcut = historyShortcut(e);
|
|
47
|
+
if (shortcut === 'redo' && self.history.canRedo) {
|
|
48
48
|
self.history.redo();
|
|
49
49
|
}
|
|
50
|
-
if (self.history.canUndo
|
|
51
|
-
// ctrl+z or cmd+z
|
|
52
|
-
(e.ctrlKey || e.metaKey) &&
|
|
53
|
-
!e.shiftKey &&
|
|
54
|
-
e.code === 'KeyZ') {
|
|
50
|
+
else if (shortcut === 'undo' && self.history.canUndo) {
|
|
55
51
|
self.history.undo();
|
|
56
52
|
}
|
|
57
53
|
};
|