@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
@@ -39,6 +39,12 @@ export declare function DrawerWidgetSessionMixin(pluginManager: PluginManager):
39
39
  * modal, with no drawer behind it, is disorienting
40
40
  */
41
41
  poppedOut: boolean;
42
+ /**
43
+ * #volatile
44
+ * set by a host with no room for a drawer column beside its views (a
45
+ * phone), so every widget shows in a modal instead
46
+ */
47
+ modalWidgets: boolean;
42
48
  } & {
43
49
  /**
44
50
  * #getter
@@ -51,6 +57,12 @@ export declare function DrawerWidgetSessionMixin(pluginManager: PluginManager):
51
57
  * the modal and the drawer at once.
52
58
  */
53
59
  readonly drawerVisible: boolean;
60
+ /**
61
+ * #getter
62
+ * whether the visible widget shows in a modal: popped out of the drawer,
63
+ * or on a host with no room for one
64
+ */
65
+ readonly modalWidgetVisible: boolean;
54
66
  } & {
55
67
  /**
56
68
  * #action
@@ -93,10 +105,28 @@ export declare function DrawerWidgetSessionMixin(pluginManager: PluginManager):
93
105
  * #action
94
106
  */
95
107
  returnWidgetToDrawer(): void;
108
+ /**
109
+ * #action
110
+ */
111
+ setModalWidgets(flag: boolean): void;
96
112
  /**
97
113
  * #action
98
114
  */
99
115
  hideAllWidgets(): void;
116
+ afterAttach(): void;
117
+ } & {
118
+ /**
119
+ * #action
120
+ * the modal's close button: a popped-out widget goes back to the drawer,
121
+ * and with no drawer to go back to the widget closes
122
+ */
123
+ closeModalWidget(): void;
124
+ /**
125
+ * #action
126
+ * adds the widget, replacing one with the same id, and shows it
127
+ */
128
+ openWidget(typeName: string, id: string, initialState?: any, conf?: unknown): any;
129
+ } & {
100
130
  /**
101
131
  * #action
102
132
  * opens a configuration editor to configure the given thing,
@@ -108,7 +138,6 @@ export declare function DrawerWidgetSessionMixin(pluginManager: PluginManager):
108
138
  }, opts?: {
109
139
  expandedDisplayId?: string;
110
140
  }): void;
111
- afterAttach(): void;
112
141
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
113
142
  /**
114
143
  * #property
@@ -89,6 +89,12 @@ export function DrawerWidgetSessionMixin(pluginManager) {
89
89
  * modal, with no drawer behind it, is disorienting
90
90
  */
91
91
  poppedOut: false,
92
+ /**
93
+ * #volatile
94
+ * set by a host with no room for a drawer column beside its views (a
95
+ * phone), so every widget shows in a modal instead
96
+ */
97
+ modalWidgets: false,
92
98
  }))
93
99
  .views(self => ({
94
100
  /**
@@ -102,7 +108,20 @@ export function DrawerWidgetSessionMixin(pluginManager) {
102
108
  * the modal and the drawer at once.
103
109
  */
104
110
  get drawerVisible() {
105
- return Boolean(self.visibleWidget) && !self.minimized && !self.poppedOut;
111
+ return (Boolean(self.visibleWidget) &&
112
+ !self.minimized &&
113
+ !self.poppedOut &&
114
+ !self.modalWidgets);
115
+ },
116
+ /**
117
+ * #getter
118
+ * whether the visible widget shows in a modal: popped out of the drawer,
119
+ * or on a host with no room for one
120
+ */
121
+ get modalWidgetVisible() {
122
+ return (Boolean(self.visibleWidget) &&
123
+ !self.minimized &&
124
+ (self.poppedOut || self.modalWidgets));
106
125
  },
107
126
  }))
108
127
  .actions(self => ({
@@ -184,6 +203,12 @@ export function DrawerWidgetSessionMixin(pluginManager) {
184
203
  returnWidgetToDrawer() {
185
204
  self.poppedOut = false;
186
205
  },
206
+ /**
207
+ * #action
208
+ */
209
+ setModalWidgets(flag) {
210
+ self.modalWidgets = flag;
211
+ },
187
212
  /**
188
213
  * #action
189
214
  */
@@ -191,6 +216,38 @@ export function DrawerWidgetSessionMixin(pluginManager) {
191
216
  self.activeWidgets.clear();
192
217
  self.poppedOut = false;
193
218
  },
219
+ afterAttach() {
220
+ addDisposer(self, autorun(function drawerPositionAutorun() {
221
+ localStorageSetItem('drawerPosition', self.drawerPosition);
222
+ }, { name: 'DrawerPosition' }));
223
+ },
224
+ }))
225
+ .actions(self => ({
226
+ /**
227
+ * #action
228
+ * the modal's close button: a popped-out widget goes back to the drawer,
229
+ * and with no drawer to go back to the widget closes
230
+ */
231
+ closeModalWidget() {
232
+ const widget = self.visibleWidget;
233
+ if (self.modalWidgets && widget) {
234
+ self.hideWidget(widget);
235
+ }
236
+ else {
237
+ self.returnWidgetToDrawer();
238
+ }
239
+ },
240
+ /**
241
+ * #action
242
+ * adds the widget, replacing one with the same id, and shows it
243
+ */
244
+ openWidget(typeName, id, initialState = {}, conf) {
245
+ const widget = self.addWidget(typeName, id, initialState, conf);
246
+ self.showWidget(widget);
247
+ return widget;
248
+ },
249
+ }))
250
+ .actions(self => ({
194
251
  /**
195
252
  * #action
196
253
  * opens a configuration editor to configure the given thing,
@@ -212,16 +269,10 @@ export function DrawerWidgetSessionMixin(pluginManager) {
212
269
  else {
213
270
  throw new Error('must pass a configuration model or frozen config with trackId to editConfiguration');
214
271
  }
215
- const editor = this.addWidget('ConfigurationEditorWidget', 'configEditor', {});
272
+ const editor = self.openWidget('ConfigurationEditorWidget', 'configEditor');
216
273
  // Set target via action since it's now volatile
217
274
  editor.setTarget(targetConfig);
218
275
  editor.setExpandedDisplayId(opts?.expandedDisplayId);
219
- this.showWidget(editor);
220
- },
221
- afterAttach() {
222
- addDisposer(self, autorun(function drawerPositionAutorun() {
223
- localStorageSetItem('drawerPosition', self.drawerPosition);
224
- }, { name: 'DrawerPosition' }));
225
276
  },
226
277
  }))
227
278
  .postProcessSnapshot(snap => {