@jbrowse/product-core 2.17.0 → 3.0.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.
Files changed (77) hide show
  1. package/dist/RootModel/BaseRootModel.d.ts +6 -43
  2. package/dist/RootModel/BaseRootModel.js +5 -41
  3. package/dist/RootModel/FormatAbout.d.ts +0 -10
  4. package/dist/RootModel/FormatAbout.js +0 -10
  5. package/dist/RootModel/FormatDetails.d.ts +0 -17
  6. package/dist/RootModel/FormatDetails.js +0 -17
  7. package/dist/RootModel/HierarchicalConfig.d.ts +0 -19
  8. package/dist/RootModel/HierarchicalConfig.js +0 -19
  9. package/dist/RootModel/InternetAccounts.d.ts +4 -20
  10. package/dist/RootModel/InternetAccounts.js +0 -20
  11. package/dist/Session/BaseSession.d.ts +5 -96
  12. package/dist/Session/BaseSession.js +1 -63
  13. package/dist/Session/Connections.d.ts +5 -56
  14. package/dist/Session/Connections.js +0 -30
  15. package/dist/Session/DialogQueue.d.ts +3 -22
  16. package/dist/Session/DialogQueue.js +0 -17
  17. package/dist/Session/DrawerWidgets.d.ts +3 -63
  18. package/dist/Session/DrawerWidgets.js +2 -61
  19. package/dist/Session/MultipleViews.d.ts +8 -1760
  20. package/dist/Session/MultipleViews.js +2 -40
  21. package/dist/Session/ReferenceManagement.d.ts +2 -21
  22. package/dist/Session/ReferenceManagement.js +0 -23
  23. package/dist/Session/SessionTracks.d.ts +7 -1748
  24. package/dist/Session/SessionTracks.js +1 -21
  25. package/dist/Session/Themes.d.ts +3 -21
  26. package/dist/Session/Themes.js +1 -17
  27. package/dist/Session/Tracks.d.ts +6 -1737
  28. package/dist/Session/Tracks.js +0 -16
  29. package/dist/rpcWorker.d.ts +2 -2
  30. package/dist/rpcWorker.js +3 -17
  31. package/dist/ui/AboutDialog.d.ts +2 -3
  32. package/dist/ui/AboutDialog.js +2 -3
  33. package/dist/ui/AboutDialogContents.d.ts +2 -3
  34. package/dist/ui/AboutDialogContents.js +20 -53
  35. package/dist/ui/FileInfoPanel.d.ts +2 -3
  36. package/dist/ui/FileInfoPanel.js +5 -28
  37. package/dist/ui/RefNameInfoDialog.d.ts +2 -3
  38. package/dist/ui/RefNameInfoDialog.js +17 -44
  39. package/esm/RootModel/BaseRootModel.d.ts +6 -43
  40. package/esm/RootModel/BaseRootModel.js +6 -42
  41. package/esm/RootModel/FormatAbout.d.ts +0 -10
  42. package/esm/RootModel/FormatAbout.js +0 -10
  43. package/esm/RootModel/FormatDetails.d.ts +0 -17
  44. package/esm/RootModel/FormatDetails.js +0 -17
  45. package/esm/RootModel/HierarchicalConfig.d.ts +0 -19
  46. package/esm/RootModel/HierarchicalConfig.js +0 -19
  47. package/esm/RootModel/InternetAccounts.d.ts +4 -20
  48. package/esm/RootModel/InternetAccounts.js +0 -20
  49. package/esm/Session/BaseSession.d.ts +5 -96
  50. package/esm/Session/BaseSession.js +1 -63
  51. package/esm/Session/Connections.d.ts +5 -56
  52. package/esm/Session/Connections.js +1 -31
  53. package/esm/Session/DialogQueue.d.ts +3 -22
  54. package/esm/Session/DialogQueue.js +0 -17
  55. package/esm/Session/DrawerWidgets.d.ts +3 -63
  56. package/esm/Session/DrawerWidgets.js +2 -61
  57. package/esm/Session/MultipleViews.d.ts +8 -1760
  58. package/esm/Session/MultipleViews.js +2 -40
  59. package/esm/Session/ReferenceManagement.d.ts +2 -21
  60. package/esm/Session/ReferenceManagement.js +0 -23
  61. package/esm/Session/SessionTracks.d.ts +7 -1748
  62. package/esm/Session/SessionTracks.js +1 -21
  63. package/esm/Session/Themes.d.ts +3 -21
  64. package/esm/Session/Themes.js +1 -17
  65. package/esm/Session/Tracks.d.ts +6 -1737
  66. package/esm/Session/Tracks.js +0 -16
  67. package/esm/rpcWorker.d.ts +2 -2
  68. package/esm/rpcWorker.js +3 -17
  69. package/esm/ui/AboutDialog.d.ts +2 -3
  70. package/esm/ui/AboutDialog.js +3 -4
  71. package/esm/ui/AboutDialogContents.d.ts +2 -3
  72. package/esm/ui/AboutDialogContents.js +20 -30
  73. package/esm/ui/FileInfoPanel.d.ts +2 -3
  74. package/esm/ui/FileInfoPanel.js +5 -5
  75. package/esm/ui/RefNameInfoDialog.d.ts +2 -3
  76. package/esm/ui/RefNameInfoDialog.js +18 -22
  77. package/package.json +3 -3
@@ -1,23 +1,13 @@
1
1
  import { types } from 'mobx-state-tree';
2
- // locals
3
- import { TracksManagerSessionMixin } from './Tracks';
4
2
  import { isBaseSession } from './BaseSession';
5
- /**
6
- * #stateModel SessionTracksManagerSessionMixin
7
- */
3
+ import { TracksManagerSessionMixin } from './Tracks';
8
4
  export function SessionTracksManagerSessionMixin(pluginManager) {
9
5
  return TracksManagerSessionMixin(pluginManager)
10
6
  .named('SessionTracksManagerSessionMixin')
11
7
  .props({
12
- /**
13
- * #property
14
- */
15
8
  sessionTracks: types.array(pluginManager.pluggableConfigSchemaType('track')),
16
9
  })
17
10
  .views(self => ({
18
- /**
19
- * #getter
20
- */
21
11
  get tracks() {
22
12
  return [...self.sessionTracks, ...self.jbrowse.tracks];
23
13
  },
@@ -25,9 +15,6 @@ export function SessionTracksManagerSessionMixin(pluginManager) {
25
15
  .actions(self => {
26
16
  const { addTrackConf: superAddTrackConf, deleteTrackConf: superDeleteTrackConf, } = self;
27
17
  return {
28
- /**
29
- * #action
30
- */
31
18
  addTrackConf(trackConf) {
32
19
  if (self.adminMode) {
33
20
  return superAddTrackConf(trackConf);
@@ -43,17 +30,11 @@ export function SessionTracksManagerSessionMixin(pluginManager) {
43
30
  const length = self.sessionTracks.push(trackConf);
44
31
  return self.sessionTracks[length - 1];
45
32
  },
46
- /**
47
- * #action
48
- */
49
33
  deleteTrackConf(trackConf) {
50
- // try to delete it in the main config if in admin mode
51
34
  const found = superDeleteTrackConf(trackConf);
52
35
  if (found) {
53
36
  return found;
54
37
  }
55
- // if not found or not in admin mode, try to delete it in the
56
- // sessionTracks
57
38
  const { trackId } = trackConf;
58
39
  const idx = self.sessionTracks.findIndex(t => t.trackId === trackId);
59
40
  if (idx === -1) {
@@ -64,7 +45,6 @@ export function SessionTracksManagerSessionMixin(pluginManager) {
64
45
  };
65
46
  });
66
47
  }
67
- /** Type guard for SessionWithSessionTracks */
68
48
  export function isSessionWithSessionTracks(thing) {
69
49
  return isBaseSession(thing) && 'sessionTracks' in thing;
70
50
  }
@@ -1,36 +1,18 @@
1
- import { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
2
- import PluginManager from '@jbrowse/core/PluginManager';
3
- import { ThemeOptions } from '@mui/material';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ import type { ThemeOptions } from '@mui/material';
3
+ import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
4
4
  type ThemeMap = Record<string, ThemeOptions>;
5
- /**
6
- * #stateModel ThemeManagerSessionMixin
7
- */
8
5
  export declare function ThemeManagerSessionMixin(_pluginManager: PluginManager): import("mobx-state-tree").IModelType<{}, {
9
6
  sessionThemeName: string;
10
7
  } & {
11
- /**
12
- * #method
13
- */
14
8
  allThemes(): ThemeMap;
15
- /**
16
- * #getter
17
- */
18
9
  readonly themeName: string;
19
- /**
20
- * #getter
21
- */
22
10
  readonly theme: import("@mui/material").Theme;
23
11
  } & {
24
- /**
25
- * #action
26
- */
27
12
  setThemeName(name: string): void;
28
13
  afterAttach(): void;
29
14
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
30
- /** Session mixin MST type for a session that supports theming */
31
15
  export type SessionWithThemesType = ReturnType<typeof ThemeManagerSessionMixin>;
32
- /** Instance of a session that has theming support */
33
16
  export type SessionWithThemes = Instance<SessionWithThemesType>;
34
- /** Type guard for SessionWithThemes */
35
17
  export declare function isSessionWithThemes(session: IAnyStateTreeNode): session is SessionWithThemes;
36
18
  export {};
@@ -1,11 +1,8 @@
1
- import { addDisposer, types, } from 'mobx-state-tree';
2
1
  import { getConf } from '@jbrowse/core/configuration';
3
2
  import { createJBrowseTheme, defaultThemes } from '@jbrowse/core/ui';
4
3
  import { localStorageGetItem, localStorageSetItem } from '@jbrowse/core/util';
5
4
  import { autorun } from 'mobx';
6
- /**
7
- * #stateModel ThemeManagerSessionMixin
8
- */
5
+ import { addDisposer, types } from 'mobx-state-tree';
9
6
  export function ThemeManagerSessionMixin(_pluginManager) {
10
7
  return types
11
8
  .model({})
@@ -13,25 +10,16 @@ export function ThemeManagerSessionMixin(_pluginManager) {
13
10
  sessionThemeName: localStorageGetItem('themeName') || 'default',
14
11
  }))
15
12
  .views(s => ({
16
- /**
17
- * #method
18
- */
19
13
  allThemes() {
20
14
  const self = s;
21
15
  const extraThemes = getConf(self.jbrowse, 'extraThemes');
22
16
  return { ...defaultThemes, ...extraThemes };
23
17
  },
24
- /**
25
- * #getter
26
- */
27
18
  get themeName() {
28
19
  const { sessionThemeName } = s;
29
20
  const all = this.allThemes();
30
21
  return all[sessionThemeName] ? sessionThemeName : 'default';
31
22
  },
32
- /**
33
- * #getter
34
- */
35
23
  get theme() {
36
24
  const self = s;
37
25
  const configTheme = getConf(self.jbrowse, 'theme');
@@ -40,9 +28,6 @@ export function ThemeManagerSessionMixin(_pluginManager) {
40
28
  },
41
29
  }))
42
30
  .actions(self => ({
43
- /**
44
- * #action
45
- */
46
31
  setThemeName(name) {
47
32
  self.sessionThemeName = name;
48
33
  },
@@ -53,7 +38,6 @@ export function ThemeManagerSessionMixin(_pluginManager) {
53
38
  },
54
39
  }));
55
40
  }
56
- /** Type guard for SessionWithThemes */
57
41
  export function isSessionWithThemes(session) {
58
42
  return 'theme' in session;
59
43
  }