@jbrowse/product-core 2.10.3 → 2.11.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.
@@ -18,7 +18,9 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
18
18
  drawerWidth: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
19
19
  widgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyType>;
20
20
  activeWidgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>>;
21
- minimized: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
21
+ minimized: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>; /**
22
+ * #action
23
+ */
22
24
  } & {
23
25
  /**
24
26
  * #property
@@ -39,9 +41,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
39
41
  error: unknown;
40
42
  loaded: boolean;
41
43
  loadingP: Promise<void> | undefined;
42
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
43
- * #property
44
- */
44
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
45
45
  refNameAliases: {
46
46
  [x: string]: string | undefined;
47
47
  } | undefined;
@@ -67,9 +67,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
67
67
  } & {
68
68
  readonly refNames: string[] | undefined;
69
69
  } & {
70
- getCanonicalRefName(refName: string): string | undefined; /**
71
- * #action
72
- */
70
+ getCanonicalRefName(refName: string): string | undefined;
73
71
  getRefNameColor(refName: string): string | undefined;
74
72
  isValidRefName(refName: string): boolean;
75
73
  } & {
@@ -105,9 +103,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
105
103
  error: unknown;
106
104
  loaded: boolean;
107
105
  loadingP: Promise<void> | undefined;
108
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
109
- * #property
110
- */
106
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
111
107
  refNameAliases: {
112
108
  [x: string]: string | undefined;
113
109
  } | undefined;
@@ -133,9 +129,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
133
129
  } & {
134
130
  readonly refNames: string[] | undefined;
135
131
  } & {
136
- getCanonicalRefName(refName: string): string | undefined; /**
137
- * #action
138
- */
132
+ getCanonicalRefName(refName: string): string | undefined;
139
133
  getRefNameColor(refName: string): string | undefined;
140
134
  isValidRefName(refName: string): boolean;
141
135
  } & {
@@ -704,9 +698,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
704
698
  error: unknown;
705
699
  loaded: boolean;
706
700
  loadingP: Promise<void> | undefined;
707
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
708
- * #property
709
- */
701
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
710
702
  refNameAliases: {
711
703
  [x: string]: string | undefined;
712
704
  } | undefined;
@@ -732,9 +724,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
732
724
  } & {
733
725
  readonly refNames: string[] | undefined;
734
726
  } & {
735
- getCanonicalRefName(refName: string): string | undefined; /**
736
- * #action
737
- */
727
+ getCanonicalRefName(refName: string): string | undefined;
738
728
  getRefNameColor(refName: string): string | undefined;
739
729
  isValidRefName(refName: string): boolean;
740
730
  } & {
@@ -1320,9 +1310,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1320
1310
  error: unknown;
1321
1311
  loaded: boolean;
1322
1312
  loadingP: Promise<void> | undefined;
1323
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
1324
- * #property
1325
- */
1313
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
1326
1314
  refNameAliases: {
1327
1315
  [x: string]: string | undefined;
1328
1316
  } | undefined;
@@ -1348,9 +1336,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1348
1336
  } & {
1349
1337
  readonly refNames: string[] | undefined;
1350
1338
  } & {
1351
- getCanonicalRefName(refName: string): string | undefined; /**
1352
- * #action
1353
- */
1339
+ getCanonicalRefName(refName: string): string | undefined;
1354
1340
  getRefNameColor(refName: string): string | undefined;
1355
1341
  isValidRefName(refName: string): boolean;
1356
1342
  } & {
@@ -1925,7 +1911,9 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1925
1911
  setDefaultSession(): void;
1926
1912
  setSessionPath(path: string): void;
1927
1913
  renameCurrentSession(newName: string): void;
1928
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1914
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
1915
+ * #action
1916
+ */
1929
1917
  } & {
1930
1918
  readonly jbrowse: any;
1931
1919
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
@@ -1973,6 +1961,9 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1973
1961
  readonly visibleWidget: any;
1974
1962
  } & {
1975
1963
  setDrawerPosition(arg: string): void;
1964
+ /**
1965
+ * #action
1966
+ */
1976
1967
  updateDrawerWidth(drawerWidth: number): number;
1977
1968
  resizeDrawer(distance: number): number;
1978
1969
  addWidget(typeName: string, id: string, initialState?: {}, conf?: unknown): any;
@@ -1989,6 +1980,10 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1989
1980
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): void;
1990
1981
  afterAttach(): void;
1991
1982
  } & {
1983
+ /**
1984
+ * #action
1985
+ */
1986
+ moveViewDown(id: string): void;
1992
1987
  /**
1993
1988
  * #action
1994
1989
  */
@@ -1996,7 +1991,11 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1996
1991
  /**
1997
1992
  * #action
1998
1993
  */
1999
- moveViewDown(id: string): void;
1994
+ moveViewToTop(id: string): void;
1995
+ /**
1996
+ * #action
1997
+ */
1998
+ moveViewToBottom(id: string): void;
2000
1999
  /**
2001
2000
  * #action
2002
2001
  */
@@ -25,11 +25,17 @@ function MultipleViewsSessionMixin(pluginManager) {
25
25
  /**
26
26
  * #action
27
27
  */
28
- moveViewUp(id) {
28
+ moveViewDown(id) {
29
29
  const idx = self.views.findIndex(v => v.id === id);
30
- if (idx === -1) {
31
- return;
30
+ if (idx !== -1 && idx < self.views.length - 1) {
31
+ self.views.splice(idx, 2, self.views[idx + 1], self.views[idx]);
32
32
  }
33
+ },
34
+ /**
35
+ * #action
36
+ */
37
+ moveViewUp(id) {
38
+ const idx = self.views.findIndex(view => view.id === id);
33
39
  if (idx > 0) {
34
40
  self.views.splice(idx - 1, 2, self.views[idx], self.views[idx - 1]);
35
41
  }
@@ -37,14 +43,22 @@ function MultipleViewsSessionMixin(pluginManager) {
37
43
  /**
38
44
  * #action
39
45
  */
40
- moveViewDown(id) {
41
- const idx = self.views.findIndex(v => v.id === id);
42
- if (idx === -1) {
43
- return;
44
- }
45
- if (idx < self.views.length - 1) {
46
- self.views.splice(idx, 2, self.views[idx + 1], self.views[idx]);
47
- }
46
+ moveViewToTop(id) {
47
+ const idx = self.views.findIndex(view => view.id === id);
48
+ self.views = (0, mobx_state_tree_1.cast)([
49
+ self.views[idx],
50
+ ...self.views.filter(view => view.id !== id),
51
+ ]);
52
+ },
53
+ /**
54
+ * #action
55
+ */
56
+ moveViewToBottom(id) {
57
+ const idx = self.views.findIndex(view => view.id === id);
58
+ self.views = (0, mobx_state_tree_1.cast)([
59
+ ...self.views.filter(view => view.id !== id),
60
+ self.views[idx],
61
+ ]);
48
62
  },
49
63
  /**
50
64
  * #action
package/dist/rpcWorker.js CHANGED
@@ -27,14 +27,13 @@ function receiveConfiguration() {
27
27
  async function getPluginManager(corePlugins, opts) {
28
28
  // Load runtime plugins
29
29
  const config = await receiveConfiguration();
30
- const pluginLoader = new PluginLoader_1.default(config.plugins, opts);
31
- pluginLoader.installGlobalReExports(self);
32
- const runtimePlugins = await pluginLoader.load(config.windowHref);
33
- const plugins = [...corePlugins.map(p => ({ plugin: p })), ...runtimePlugins];
34
- const pluginManager = new PluginManager_1.default(plugins.map(P => new P.plugin()));
35
- pluginManager.createPluggableElements();
36
- pluginManager.configure();
37
- return pluginManager;
30
+ const pluginLoader = new PluginLoader_1.default(config.plugins, opts).installGlobalReExports(self);
31
+ return new PluginManager_1.default([
32
+ ...corePlugins.map(p => ({ plugin: p })),
33
+ ...(await pluginLoader.load(config.windowHref)),
34
+ ].map(P => new P.plugin()))
35
+ .createPluggableElements()
36
+ .configure();
38
37
  }
39
38
  function wrapForRpc(func) {
40
39
  return (args) => {
@@ -18,7 +18,9 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
18
18
  drawerWidth: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
19
19
  widgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyType>;
20
20
  activeWidgets: import("mobx-state-tree").IMapType<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>>;
21
- minimized: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
21
+ minimized: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>; /**
22
+ * #action
23
+ */
22
24
  } & {
23
25
  /**
24
26
  * #property
@@ -39,9 +41,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
39
41
  error: unknown;
40
42
  loaded: boolean;
41
43
  loadingP: Promise<void> | undefined;
42
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
43
- * #property
44
- */
44
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
45
45
  refNameAliases: {
46
46
  [x: string]: string | undefined;
47
47
  } | undefined;
@@ -67,9 +67,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
67
67
  } & {
68
68
  readonly refNames: string[] | undefined;
69
69
  } & {
70
- getCanonicalRefName(refName: string): string | undefined; /**
71
- * #action
72
- */
70
+ getCanonicalRefName(refName: string): string | undefined;
73
71
  getRefNameColor(refName: string): string | undefined;
74
72
  isValidRefName(refName: string): boolean;
75
73
  } & {
@@ -105,9 +103,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
105
103
  error: unknown;
106
104
  loaded: boolean;
107
105
  loadingP: Promise<void> | undefined;
108
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
109
- * #property
110
- */
106
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
111
107
  refNameAliases: {
112
108
  [x: string]: string | undefined;
113
109
  } | undefined;
@@ -133,9 +129,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
133
129
  } & {
134
130
  readonly refNames: string[] | undefined;
135
131
  } & {
136
- getCanonicalRefName(refName: string): string | undefined; /**
137
- * #action
138
- */
132
+ getCanonicalRefName(refName: string): string | undefined;
139
133
  getRefNameColor(refName: string): string | undefined;
140
134
  isValidRefName(refName: string): boolean;
141
135
  } & {
@@ -704,9 +698,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
704
698
  error: unknown;
705
699
  loaded: boolean;
706
700
  loadingP: Promise<void> | undefined;
707
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
708
- * #property
709
- */
701
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
710
702
  refNameAliases: {
711
703
  [x: string]: string | undefined;
712
704
  } | undefined;
@@ -732,9 +724,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
732
724
  } & {
733
725
  readonly refNames: string[] | undefined;
734
726
  } & {
735
- getCanonicalRefName(refName: string): string | undefined; /**
736
- * #action
737
- */
727
+ getCanonicalRefName(refName: string): string | undefined;
738
728
  getRefNameColor(refName: string): string | undefined;
739
729
  isValidRefName(refName: string): boolean;
740
730
  } & {
@@ -1320,9 +1310,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1320
1310
  error: unknown;
1321
1311
  loaded: boolean;
1322
1312
  loadingP: Promise<void> | undefined;
1323
- volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined; /**
1324
- * #property
1325
- */
1313
+ volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
1326
1314
  refNameAliases: {
1327
1315
  [x: string]: string | undefined;
1328
1316
  } | undefined;
@@ -1348,9 +1336,7 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1348
1336
  } & {
1349
1337
  readonly refNames: string[] | undefined;
1350
1338
  } & {
1351
- getCanonicalRefName(refName: string): string | undefined; /**
1352
- * #action
1353
- */
1339
+ getCanonicalRefName(refName: string): string | undefined;
1354
1340
  getRefNameColor(refName: string): string | undefined;
1355
1341
  isValidRefName(refName: string): boolean;
1356
1342
  } & {
@@ -1925,7 +1911,9 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1925
1911
  setDefaultSession(): void;
1926
1912
  setSessionPath(path: string): void;
1927
1913
  renameCurrentSession(newName: string): void;
1928
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
1914
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; /**
1915
+ * #action
1916
+ */
1929
1917
  } & {
1930
1918
  readonly jbrowse: any;
1931
1919
  readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
@@ -1973,6 +1961,9 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1973
1961
  readonly visibleWidget: any;
1974
1962
  } & {
1975
1963
  setDrawerPosition(arg: string): void;
1964
+ /**
1965
+ * #action
1966
+ */
1976
1967
  updateDrawerWidth(drawerWidth: number): number;
1977
1968
  resizeDrawer(distance: number): number;
1978
1969
  addWidget(typeName: string, id: string, initialState?: {}, conf?: unknown): any;
@@ -1989,6 +1980,10 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1989
1980
  } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>): void;
1990
1981
  afterAttach(): void;
1991
1982
  } & {
1983
+ /**
1984
+ * #action
1985
+ */
1986
+ moveViewDown(id: string): void;
1992
1987
  /**
1993
1988
  * #action
1994
1989
  */
@@ -1996,7 +1991,11 @@ export declare function MultipleViewsSessionMixin(pluginManager: PluginManager):
1996
1991
  /**
1997
1992
  * #action
1998
1993
  */
1999
- moveViewDown(id: string): void;
1994
+ moveViewToTop(id: string): void;
1995
+ /**
1996
+ * #action
1997
+ */
1998
+ moveViewToBottom(id: string): void;
2000
1999
  /**
2001
2000
  * #action
2002
2001
  */
@@ -1,4 +1,4 @@
1
- import { getSnapshot, types, } from 'mobx-state-tree';
1
+ import { cast, getSnapshot, types, } from 'mobx-state-tree';
2
2
  import { readConfObject } from '@jbrowse/core/configuration';
3
3
  import { DrawerWidgetSessionMixin } from './DrawerWidgets';
4
4
  // locals
@@ -22,11 +22,17 @@ export function MultipleViewsSessionMixin(pluginManager) {
22
22
  /**
23
23
  * #action
24
24
  */
25
- moveViewUp(id) {
25
+ moveViewDown(id) {
26
26
  const idx = self.views.findIndex(v => v.id === id);
27
- if (idx === -1) {
28
- return;
27
+ if (idx !== -1 && idx < self.views.length - 1) {
28
+ self.views.splice(idx, 2, self.views[idx + 1], self.views[idx]);
29
29
  }
30
+ },
31
+ /**
32
+ * #action
33
+ */
34
+ moveViewUp(id) {
35
+ const idx = self.views.findIndex(view => view.id === id);
30
36
  if (idx > 0) {
31
37
  self.views.splice(idx - 1, 2, self.views[idx], self.views[idx - 1]);
32
38
  }
@@ -34,14 +40,22 @@ export function MultipleViewsSessionMixin(pluginManager) {
34
40
  /**
35
41
  * #action
36
42
  */
37
- moveViewDown(id) {
38
- const idx = self.views.findIndex(v => v.id === id);
39
- if (idx === -1) {
40
- return;
41
- }
42
- if (idx < self.views.length - 1) {
43
- self.views.splice(idx, 2, self.views[idx + 1], self.views[idx]);
44
- }
43
+ moveViewToTop(id) {
44
+ const idx = self.views.findIndex(view => view.id === id);
45
+ self.views = cast([
46
+ self.views[idx],
47
+ ...self.views.filter(view => view.id !== id),
48
+ ]);
49
+ },
50
+ /**
51
+ * #action
52
+ */
53
+ moveViewToBottom(id) {
54
+ const idx = self.views.findIndex(view => view.id === id);
55
+ self.views = cast([
56
+ ...self.views.filter(view => view.id !== id),
57
+ self.views[idx],
58
+ ]);
45
59
  },
46
60
  /**
47
61
  * #action
package/esm/rpcWorker.js CHANGED
@@ -21,14 +21,13 @@ function receiveConfiguration() {
21
21
  async function getPluginManager(corePlugins, opts) {
22
22
  // Load runtime plugins
23
23
  const config = await receiveConfiguration();
24
- const pluginLoader = new PluginLoader(config.plugins, opts);
25
- pluginLoader.installGlobalReExports(self);
26
- const runtimePlugins = await pluginLoader.load(config.windowHref);
27
- const plugins = [...corePlugins.map(p => ({ plugin: p })), ...runtimePlugins];
28
- const pluginManager = new PluginManager(plugins.map(P => new P.plugin()));
29
- pluginManager.createPluggableElements();
30
- pluginManager.configure();
31
- return pluginManager;
24
+ const pluginLoader = new PluginLoader(config.plugins, opts).installGlobalReExports(self);
25
+ return new PluginManager([
26
+ ...corePlugins.map(p => ({ plugin: p })),
27
+ ...(await pluginLoader.load(config.windowHref)),
28
+ ].map(P => new P.plugin()))
29
+ .createPluggableElements()
30
+ .configure();
32
31
  }
33
32
  function wrapForRpc(func) {
34
33
  return (args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/product-core",
3
- "version": "2.10.3",
3
+ "version": "2.11.0",
4
4
  "sideEffects": false,
5
5
  "description": "JBrowse 2 code shared between products but not used by plugins",
6
6
  "keywords": [
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@babel/runtime": "^7.16.3",
46
- "@jbrowse/core": "^2.10.3",
46
+ "@jbrowse/core": "^2.11.0",
47
47
  "@mui/icons-material": "^5.0.0",
48
48
  "@mui/material": "^5.10.17",
49
49
  "copy-to-clipboard": "^3.3.1",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "c8fc800cd17decd72b2e971c7a6add3b95214e72"
66
+ "gitHead": "3d43a820b9274a6160aa4dc15616147f390d9094"
67
67
  }