@jbrowse/product-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.
Files changed (105) hide show
  1. package/esm/RootModel/BaseRootModel.d.ts +24 -158
  2. package/esm/RootModel/BaseRootModel.js +7 -4
  3. package/esm/RootModel/HierarchicalConfig.d.ts +21 -47
  4. package/esm/RootModel/PreferencesConfig.d.ts +20 -36
  5. package/esm/RootModel/PreferencesConfig.js +17 -3
  6. package/esm/RootModel/createConfigModel.d.ts +148 -123
  7. package/esm/RootModel/createConfigModel.js +35 -14
  8. package/esm/RootModel/menuItems.js +7 -9
  9. package/esm/Session/BaseSession.d.ts +60 -85
  10. package/esm/Session/BaseSession.js +106 -172
  11. package/esm/Session/Connections.d.ts +4 -3
  12. package/esm/Session/Connections.js +4 -3
  13. package/esm/Session/DrawerWidgets.d.ts +30 -1
  14. package/esm/Session/DrawerWidgets.js +59 -8
  15. package/esm/Session/MultipleViews.d.ts +85 -333
  16. package/esm/Session/MultipleViews.js +45 -5
  17. package/esm/Session/Preferences.d.ts +53 -329
  18. package/esm/Session/Preferences.js +6 -2
  19. package/esm/Session/SessionTracks.d.ts +180 -396
  20. package/esm/Session/SessionTracks.js +291 -238
  21. package/esm/Session/Themes.d.ts +79 -30
  22. package/esm/Session/Themes.js +153 -40
  23. package/esm/Session/TrackMenu.d.ts +4 -28
  24. package/esm/Session/TrackMenu.js +28 -53
  25. package/esm/Session/TrackMenuSessionMixin.js +2 -1
  26. package/esm/Session/Tracks.d.ts +75 -341
  27. package/esm/Session/Tracks.js +192 -133
  28. package/esm/Session/copyTrackSnapshot.d.ts +21 -0
  29. package/esm/Session/copyTrackSnapshot.js +20 -0
  30. package/esm/Session/developerMode.d.ts +7 -0
  31. package/esm/Session/developerMode.js +43 -0
  32. package/esm/Session/finalizeSession.d.ts +1 -2
  33. package/esm/Session/finalizeSession.js +1 -2
  34. package/esm/Session/hydratedForms.d.ts +16 -0
  35. package/esm/Session/hydratedForms.js +13 -0
  36. package/esm/Session/index.d.ts +8 -3
  37. package/esm/Session/index.js +6 -3
  38. package/esm/Session/pluginExtraTrackItems.d.ts +11 -0
  39. package/esm/Session/pluginExtraTrackItems.js +13 -0
  40. package/esm/Session/readdedTrackConf.d.ts +8 -0
  41. package/esm/Session/readdedTrackConf.js +24 -0
  42. package/esm/Session/shareableSnapshot.d.ts +6 -60
  43. package/esm/Session/shareableSnapshot.js +8 -138
  44. package/esm/Session/temporaryAssemblyTracks.d.ts +4 -3
  45. package/esm/Session/temporaryAssemblyTracks.js +6 -7
  46. package/esm/controllerTracks.d.ts +31 -11
  47. package/esm/controllerTracks.js +61 -13
  48. package/esm/embeddedController.d.ts +57 -0
  49. package/esm/embeddedController.js +100 -0
  50. package/esm/index.d.ts +12 -11
  51. package/esm/index.js +9 -9
  52. package/esm/loadPlugins.d.ts +8 -3
  53. package/esm/loadPlugins.js +11 -4
  54. package/esm/observeSession.d.ts +4 -5
  55. package/esm/observeSession.js +3 -4
  56. package/esm/parallelChunkLoading.d.ts +30 -0
  57. package/esm/parallelChunkLoading.js +71 -0
  58. package/esm/pruneUnbuildableNodes.js +18 -24
  59. package/esm/resolveAssemblies.d.ts +36 -12
  60. package/esm/resolveAssemblies.js +38 -16
  61. package/esm/rpcWorker.d.ts +11 -5
  62. package/esm/rpcWorker.js +41 -16
  63. package/esm/sessionMigrations/index.d.ts +10 -48
  64. package/esm/sessionMigrations/index.js +116 -370
  65. package/esm/sessionUrl.d.ts +7 -8
  66. package/esm/sessionUrl.js +27 -14
  67. package/esm/sessionUtils.d.ts +6 -1
  68. package/esm/sessionUtils.js +78 -92
  69. package/esm/ui/AboutDialog.d.ts +10 -2
  70. package/esm/ui/AboutDialog.js +11 -2
  71. package/esm/ui/AboutDialogContents.js +4 -29
  72. package/esm/ui/AssemblyInfoPanel.js +4 -10
  73. package/esm/ui/DescriptionPanel.d.ts +3 -0
  74. package/esm/ui/DescriptionPanel.js +25 -0
  75. package/esm/ui/FileInfoPanel.js +12 -11
  76. package/esm/ui/GeneralPreferencesTab.d.ts +17 -0
  77. package/esm/ui/GeneralPreferencesTab.js +34 -0
  78. package/esm/ui/HeaderButtons.d.ts +1 -6
  79. package/esm/ui/HeaderButtons.js +5 -12
  80. package/esm/ui/ModalWidget.d.ts +2 -1
  81. package/esm/ui/ModalWidget.js +18 -3
  82. package/esm/ui/PreferenceCheckbox.d.ts +6 -0
  83. package/esm/ui/PreferenceCheckbox.js +16 -0
  84. package/esm/ui/PreferencesDialog.d.ts +5 -27
  85. package/esm/ui/PreferencesDialog.js +29 -119
  86. package/esm/ui/RefNameInfoDialog.js +13 -25
  87. package/esm/ui/ViewPreferencesTab.d.ts +12 -0
  88. package/esm/ui/ViewPreferencesTab.js +15 -0
  89. package/esm/ui/aboutTestUtils.d.ts +140 -0
  90. package/esm/ui/aboutTestUtils.js +25 -0
  91. package/esm/ui/descriptionHtml.d.ts +25 -0
  92. package/esm/ui/descriptionHtml.js +64 -0
  93. package/esm/ui/index.d.ts +2 -0
  94. package/esm/ui/index.js +1 -0
  95. package/esm/ui/preferencesReset.d.ts +18 -0
  96. package/esm/ui/preferencesReset.js +69 -0
  97. package/esm/ui/util.d.ts +9 -27
  98. package/esm/ui/util.js +12 -31
  99. package/esm/useEngineLifecycle.d.ts +7 -1
  100. package/esm/useEngineLifecycle.js +24 -2
  101. package/package.json +11 -10
  102. package/esm/scheduleDetachedDestroy.d.ts +0 -18
  103. package/esm/scheduleDetachedDestroy.js +0 -24
  104. package/esm/ui/DisplayDefaultsSection.d.ts +0 -36
  105. package/esm/ui/DisplayDefaultsSection.js +0 -65
@@ -5,107 +5,117 @@ import type { IAnyType } from '@jbrowse/mobx-state-tree';
5
5
  declare function rootConfigurationSchema(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
6
6
  readonly rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
7
7
  readonly defaultDriver: {
8
- readonly type: "string";
9
- readonly description: "the RPC driver to run data fetching on: MainThreadRpcDriver or WebWorkerRpcDriver. Leave empty to use the default for this application";
10
- readonly defaultValue: "";
11
- readonly advanced: true;
8
+ type: "string";
9
+ } & {
10
+ defaultValue: string;
12
11
  };
13
12
  readonly workerCount: {
14
- readonly type: "number";
15
- readonly description: "The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.";
16
- readonly defaultValue: 0;
17
- readonly advanced: true;
13
+ type: "number";
14
+ } & {
15
+ defaultValue: number;
18
16
  };
19
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
17
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
20
18
  readonly hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
21
19
  readonly sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
22
20
  readonly trackNames: {
23
- readonly type: "boolean";
24
- readonly defaultValue: false;
21
+ type: "boolean";
22
+ } & {
23
+ defaultValue: boolean;
25
24
  };
26
25
  readonly categories: {
27
- readonly type: "boolean";
28
- readonly defaultValue: false;
26
+ type: "boolean";
27
+ } & {
28
+ defaultValue: boolean;
29
29
  };
30
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
30
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
31
31
  readonly defaultFolderCategories: {
32
- readonly type: "stringArray";
33
- readonly description: "list of category names to display as folders by default";
34
- readonly defaultValue: readonly [];
32
+ type: "stringArray";
33
+ } & {
34
+ defaultValue: unknown;
35
35
  };
36
36
  readonly defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
37
37
  readonly categoryNames: {
38
- readonly type: "stringArray";
39
- readonly defaultValue: readonly [];
38
+ type: "stringArray";
39
+ } & {
40
+ defaultValue: unknown;
40
41
  };
41
42
  readonly topLevelCategories: {
42
- readonly type: "boolean";
43
- readonly defaultValue: false;
43
+ type: "boolean";
44
+ } & {
45
+ defaultValue: boolean;
44
46
  };
45
47
  readonly subCategories: {
46
- readonly type: "boolean";
47
- readonly defaultValue: false;
48
+ type: "boolean";
49
+ } & {
50
+ defaultValue: boolean;
48
51
  };
49
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
50
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
52
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
53
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
51
54
  readonly preferences: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
52
55
  readonly animationMode: {
53
- readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
54
- readonly type: "stringEnum";
55
- readonly defaultValue: "enabled";
56
+ type: "stringEnum";
57
+ } & {
58
+ model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
59
+ } & {
60
+ defaultValue: string;
56
61
  };
57
62
  readonly scrollZoom: {
58
- readonly type: "boolean";
59
- readonly defaultValue: false;
63
+ type: "boolean";
64
+ } & {
65
+ defaultValue: boolean;
60
66
  };
61
67
  readonly numberGrouping: {
62
- readonly type: "boolean";
63
- readonly defaultValue: true;
68
+ type: "boolean";
69
+ } & {
70
+ defaultValue: boolean;
64
71
  };
65
72
  readonly useWorkspaces: {
66
- readonly type: "boolean";
67
- readonly defaultValue: false;
73
+ type: "boolean";
74
+ } & {
75
+ defaultValue: boolean;
68
76
  };
69
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
77
+ readonly developerMode: {
78
+ type: "boolean";
79
+ } & {
80
+ defaultValue: boolean;
81
+ };
82
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
70
83
  readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
71
84
  readonly feature: {
72
- readonly type: "frozen";
73
- readonly description: "adds extra fields to the feature details";
74
- readonly defaultValue: {};
75
- readonly contextVariable: ["feature"];
85
+ type: "frozen";
86
+ } & {
87
+ defaultValue: unknown;
76
88
  };
77
89
  readonly subfeatures: {
78
- readonly type: "frozen";
79
- readonly description: "adds extra fields to the subfeatures of a feature";
80
- readonly defaultValue: {};
81
- readonly contextVariable: ["feature"];
90
+ type: "frozen";
91
+ } & {
92
+ defaultValue: unknown;
82
93
  };
83
94
  readonly depth: {
84
- readonly type: "maybeNumber";
85
- readonly description: "levels of subfeature the formatDetails.subfeatures callback runs on, default 2";
95
+ type: "maybeNumber";
86
96
  };
87
97
  readonly maxDepth: {
88
- readonly type: "maybeNumber";
89
- readonly description: "hide subfeatures nested deeper than this, default no limit";
98
+ type: "maybeNumber";
90
99
  };
91
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
100
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
92
101
  readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
93
102
  readonly config: {
94
- readonly type: "frozen";
95
- readonly description: "formats configuration object in about dialog";
96
- readonly defaultValue: {};
97
- readonly contextVariable: ["config"];
103
+ type: "frozen";
104
+ } & {
105
+ defaultValue: unknown;
98
106
  };
99
107
  readonly hideUris: {
100
- readonly type: "boolean";
101
- readonly defaultValue: false;
108
+ type: "boolean";
109
+ } & {
110
+ defaultValue: boolean;
102
111
  };
103
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
112
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
104
113
  readonly theme: {
105
- readonly type: "frozen";
106
- readonly defaultValue: {};
114
+ type: "frozen";
115
+ } & {
116
+ defaultValue: unknown;
107
117
  };
108
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
118
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
109
119
  /**
110
120
  * What an embedder may put in `createViewState`'s `configuration` option: every
111
121
  * root slot and sub-schema by name, values unchecked. Derived from the schema
@@ -117,116 +127,131 @@ export declare function createConfigModel(pluginManager: PluginManager, assembly
117
127
  configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
118
128
  readonly rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
119
129
  readonly defaultDriver: {
120
- readonly type: "string";
121
- readonly description: "the RPC driver to run data fetching on: MainThreadRpcDriver or WebWorkerRpcDriver. Leave empty to use the default for this application";
122
- readonly defaultValue: "";
123
- readonly advanced: true;
130
+ type: "string";
131
+ } & {
132
+ defaultValue: string;
124
133
  };
125
134
  readonly workerCount: {
126
- readonly type: "number";
127
- readonly description: "The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.";
128
- readonly defaultValue: 0;
129
- readonly advanced: true;
135
+ type: "number";
136
+ } & {
137
+ defaultValue: number;
130
138
  };
131
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
139
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
132
140
  readonly hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
133
141
  readonly sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
134
142
  readonly trackNames: {
135
- readonly type: "boolean";
136
- readonly defaultValue: false;
143
+ type: "boolean";
144
+ } & {
145
+ defaultValue: boolean;
137
146
  };
138
147
  readonly categories: {
139
- readonly type: "boolean";
140
- readonly defaultValue: false;
148
+ type: "boolean";
149
+ } & {
150
+ defaultValue: boolean;
141
151
  };
142
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
152
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
143
153
  readonly defaultFolderCategories: {
144
- readonly type: "stringArray";
145
- readonly description: "list of category names to display as folders by default";
146
- readonly defaultValue: readonly [];
154
+ type: "stringArray";
155
+ } & {
156
+ defaultValue: unknown;
147
157
  };
148
158
  readonly defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
149
159
  readonly categoryNames: {
150
- readonly type: "stringArray";
151
- readonly defaultValue: readonly [];
160
+ type: "stringArray";
161
+ } & {
162
+ defaultValue: unknown;
152
163
  };
153
164
  readonly topLevelCategories: {
154
- readonly type: "boolean";
155
- readonly defaultValue: false;
165
+ type: "boolean";
166
+ } & {
167
+ defaultValue: boolean;
156
168
  };
157
169
  readonly subCategories: {
158
- readonly type: "boolean";
159
- readonly defaultValue: false;
170
+ type: "boolean";
171
+ } & {
172
+ defaultValue: boolean;
160
173
  };
161
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
162
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
174
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
175
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
163
176
  readonly preferences: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
164
177
  readonly animationMode: {
165
- readonly model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
166
- readonly type: "stringEnum";
167
- readonly defaultValue: "enabled";
178
+ type: "stringEnum";
179
+ } & {
180
+ model: import("@jbrowse/mobx-state-tree").ISimpleType<"disabled" | "enabled" | "system">;
181
+ } & {
182
+ defaultValue: string;
168
183
  };
169
184
  readonly scrollZoom: {
170
- readonly type: "boolean";
171
- readonly defaultValue: false;
185
+ type: "boolean";
186
+ } & {
187
+ defaultValue: boolean;
172
188
  };
173
189
  readonly numberGrouping: {
174
- readonly type: "boolean";
175
- readonly defaultValue: true;
190
+ type: "boolean";
191
+ } & {
192
+ defaultValue: boolean;
176
193
  };
177
194
  readonly useWorkspaces: {
178
- readonly type: "boolean";
179
- readonly defaultValue: false;
195
+ type: "boolean";
196
+ } & {
197
+ defaultValue: boolean;
198
+ };
199
+ readonly developerMode: {
200
+ type: "boolean";
201
+ } & {
202
+ defaultValue: boolean;
180
203
  };
181
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
204
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
182
205
  readonly formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
183
206
  readonly feature: {
184
- readonly type: "frozen";
185
- readonly description: "adds extra fields to the feature details";
186
- readonly defaultValue: {};
187
- readonly contextVariable: ["feature"];
207
+ type: "frozen";
208
+ } & {
209
+ defaultValue: unknown;
188
210
  };
189
211
  readonly subfeatures: {
190
- readonly type: "frozen";
191
- readonly description: "adds extra fields to the subfeatures of a feature";
192
- readonly defaultValue: {};
193
- readonly contextVariable: ["feature"];
212
+ type: "frozen";
213
+ } & {
214
+ defaultValue: unknown;
194
215
  };
195
216
  readonly depth: {
196
- readonly type: "maybeNumber";
197
- readonly description: "levels of subfeature the formatDetails.subfeatures callback runs on, default 2";
217
+ type: "maybeNumber";
198
218
  };
199
219
  readonly maxDepth: {
200
- readonly type: "maybeNumber";
201
- readonly description: "hide subfeatures nested deeper than this, default no limit";
220
+ type: "maybeNumber";
202
221
  };
203
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
222
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
204
223
  readonly formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
205
224
  readonly config: {
206
- readonly type: "frozen";
207
- readonly description: "formats configuration object in about dialog";
208
- readonly defaultValue: {};
209
- readonly contextVariable: ["config"];
225
+ type: "frozen";
226
+ } & {
227
+ defaultValue: unknown;
210
228
  };
211
229
  readonly hideUris: {
212
- readonly type: "boolean";
213
- readonly defaultValue: false;
230
+ type: "boolean";
231
+ } & {
232
+ defaultValue: boolean;
214
233
  };
215
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
234
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
216
235
  readonly theme: {
217
- readonly type: "frozen";
218
- readonly defaultValue: {};
236
+ type: "frozen";
237
+ } & {
238
+ defaultValue: unknown;
219
239
  };
220
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
221
- assembly: IAnyType;
222
- tracks: import("@jbrowse/mobx-state-tree").IArrayType<IAnyType>;
223
- internetAccounts: import("@jbrowse/mobx-state-tree").IArrayType<IAnyType>;
224
- connections: import("@jbrowse/mobx-state-tree").IArrayType<IAnyType>;
225
- aggregateTextSearchAdapters: import("@jbrowse/mobx-state-tree").IArrayType<IAnyType>;
240
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
241
+ /**
242
+ * One genome in the ordinary case, several where the view draws them
243
+ * together — a circular view's synteny ribbons need both ends of an
244
+ * alignment on the circle. The order is the order a view lays them out
245
+ * in.
246
+ */
247
+ assemblies: import("@jbrowse/mobx-state-tree").IArrayType<IAnyType>;
248
+ tracks: import("@jbrowse/mobx-state-tree").IType<Record<string, unknown>[] | null | undefined, Record<string, unknown>[], Record<string, unknown>[]>;
249
+ internetAccounts: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/core/PluginManager").PluggableConfigSchemaType>;
250
+ connections: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/core/PluginManager").PluggableConfigSchemaType>;
251
+ aggregateTextSearchAdapters: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/core/PluginManager").PluggableConfigSchemaType>;
226
252
  plugins: import("@jbrowse/mobx-state-tree").IType<any, any, any>;
227
253
  }, {
228
- readonly assemblies: any[];
229
- readonly assemblyName: string;
254
+ readonly assemblyNames: string[];
230
255
  readonly rpcManager: RpcManager;
231
256
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
232
257
  export {};
@@ -1,5 +1,7 @@
1
1
  import { ConfigurationSchema, FormatAboutConfigSchemaFactory, FormatDetailsConfigSchemaFactory, readConfObject, } from '@jbrowse/core/configuration';
2
+ import { migrateRetiredDisplays } from '@jbrowse/core/pluggableElementTypes/models';
2
3
  import RpcManager from '@jbrowse/core/rpc/RpcManager';
4
+ import { expandLooseSearchIndex } from '@jbrowse/core/util/expandLooseSearchIndex';
3
5
  import { expandLooseTrackConfig } from '@jbrowse/core/util/tracks';
4
6
  import { getParent, types } from '@jbrowse/mobx-state-tree';
5
7
  import { HierarchicalConfigSchemaFactory } from './HierarchicalConfig.js';
@@ -22,32 +24,51 @@ export function createConfigModel(pluginManager, assemblyConfigSchemasType) {
22
24
  return (types
23
25
  .model('Configuration', {
24
26
  configuration: rootConfigurationSchema(),
25
- assembly: assemblyConfigSchemasType,
26
- tracks: types.array(pluginManager.pluggableConfigSchemaType('track')),
27
+ /**
28
+ * One genome in the ordinary case, several where the view draws them
29
+ * together — a circular view's synteny ribbons need both ends of an
30
+ * alignment on the circle. The order is the order a view lays them out
31
+ * in.
32
+ */
33
+ assemblies: types.array(assemblyConfigSchemasType),
34
+ tracks: types.frozen([]),
27
35
  internetAccounts: types.array(pluginManager.pluggableConfigSchemaType('internet account')),
28
36
  connections: types.array(pluginManager.pluggableConfigSchemaType('connection')),
29
37
  aggregateTextSearchAdapters: types.array(pluginManager.pluggableConfigSchemaType('text search adapter')),
30
38
  plugins: types.frozen(),
31
39
  })
32
- // The one assembly is what every loose `{ trackId, uri }` track is on, so
33
- // a snapshot need not repeat its name per track.
40
+ // The first assembly is what every loose `{ trackId, uri }` track is on,
41
+ // so a snapshot need not repeat its name per track. `tracks` is frozen,
42
+ // so a retired display type stays spelt as written until the track
43
+ // hydrates — and the track selector reads these entries before that, so
44
+ // they carry the current name here as they do in app-core's JBrowseModel.
34
45
  .preProcessSnapshot((snap) => {
35
- const tracks = snap?.tracks;
36
- const assemblyName = snap?.assembly
37
- ?.name;
38
- return Array.isArray(tracks)
46
+ const { tracks, aggregateTextSearchAdapters: indexes } = snap ?? {};
47
+ const assemblyName = snap?.assemblies?.[0]?.name;
48
+ return snap
39
49
  ? {
40
50
  ...snap,
41
- tracks: tracks.map(t => expandLooseTrackConfig(t, pluginManager, assemblyName)),
51
+ ...(Array.isArray(tracks)
52
+ ? {
53
+ tracks: tracks.map(t => {
54
+ const track = expandLooseTrackConfig(t, pluginManager, assemblyName);
55
+ return track && typeof track === 'object'
56
+ ? migrateRetiredDisplays(pluginManager, track)
57
+ : track;
58
+ }),
59
+ }
60
+ : {}),
61
+ ...(Array.isArray(indexes)
62
+ ? {
63
+ aggregateTextSearchAdapters: indexes.map(i => expandLooseSearchIndex(i, assemblyName ? [assemblyName] : undefined)),
64
+ }
65
+ : {}),
42
66
  }
43
67
  : snap;
44
68
  })
45
69
  .views(self => ({
46
- get assemblies() {
47
- return [self.assembly];
48
- },
49
- get assemblyName() {
50
- return readConfObject(self.assembly, 'name');
70
+ get assemblyNames() {
71
+ return self.assemblies.map(a => readConfObject(a, 'name'));
51
72
  },
52
73
  get rpcManager() {
53
74
  return getParent(self).rpcManager;
@@ -27,7 +27,7 @@ export function importSessionMenuItem() {
27
27
  label: 'Import session...',
28
28
  icon: PublishIcon,
29
29
  onClick: (session) => {
30
- session.showWidget(session.addWidget('ImportSessionWidget', 'importSessionWidget'));
30
+ session.openWidget('ImportSessionWidget', 'importSessionWidget');
31
31
  },
32
32
  };
33
33
  }
@@ -39,9 +39,9 @@ export function exportSessionMenuItem() {
39
39
  const { saveAs } = await import('@jbrowse/core/util/FileSaver');
40
40
  saveAs(new Blob([
41
41
  JSON.stringify({
42
- // an exported file is read by someone who doesn't have this
43
- // browser's promoted display-type defaults, so flatten the
44
- // cascade into it (same rule as ShareDialog)
42
+ // an exported file is read by someone whose own preferences
43
+ // differ, so stamp what the live session resolves at read
44
+ // time (same rule as ShareDialog)
45
45
  session: getShareableSessionSnapshot(session),
46
46
  }, null, 2),
47
47
  ], { type: 'text/plain;charset=utf-8' }), 'session.json');
@@ -58,10 +58,9 @@ export function openTrackMenuItem() {
58
58
  session.notify('Please open a view to add a track first');
59
59
  }
60
60
  else {
61
- const widget = session.addWidget('AddTrackWidget', 'addTrackWidget', {
61
+ session.openWidget('AddTrackWidget', 'addTrackWidget', {
62
62
  view: firstView.id,
63
63
  });
64
- session.showWidget(widget);
65
64
  if (session.views.length > 1) {
66
65
  session.notify(MULTI_VIEW_WARNING);
67
66
  }
@@ -74,8 +73,7 @@ export function openConnectionMenuItem() {
74
73
  label: 'Open connection...',
75
74
  icon: Cable,
76
75
  onClick: (session) => {
77
- const widget = session.addWidget('AddConnectionWidget', 'addConnectionWidget');
78
- session.showWidget(widget);
76
+ session.openWidget('AddConnectionWidget', 'addConnectionWidget');
79
77
  },
80
78
  };
81
79
  }
@@ -84,7 +82,7 @@ export function pluginStoreMenuItem() {
84
82
  label: 'Plugin store',
85
83
  icon: ExtensionIcon,
86
84
  onClick: (session) => {
87
- session.showWidget(session.addWidget('PluginStoreWidget', 'pluginStoreWidget'));
85
+ session.openWidget('PluginStoreWidget', 'pluginStoreWidget');
88
86
  },
89
87
  };
90
88
  }