@jbrowse/plugin-linear-comparative-view 2.6.2 → 2.7.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 (51) hide show
  1. package/dist/LGVSyntenyDisplay/model.d.ts +29 -78
  2. package/dist/LGVSyntenyDisplay/model.js +22 -3
  3. package/dist/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
  4. package/dist/LinearComparativeDisplay/configSchemaF.js +1 -1
  5. package/dist/LinearComparativeDisplay/stateModelFactory.js +4 -4
  6. package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +2 -2
  7. package/dist/LinearComparativeView/components/LinearComparativeView.js +2 -1
  8. package/dist/LinearComparativeView/components/Rubberband.d.ts +4 -5
  9. package/dist/LinearComparativeView/components/Rubberband.js +3 -3
  10. package/dist/LinearComparativeView/model.d.ts +6 -6
  11. package/dist/LinearComparativeView/model.js +5 -2
  12. package/dist/LinearReadVsRef/LinearReadVsRef.js +2 -1
  13. package/dist/LinearSyntenyDisplay/afterAttach.js +1 -2
  14. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -2
  15. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +2 -1
  16. package/dist/LinearSyntenyDisplay/drawSynteny.js +2 -4
  17. package/dist/LinearSyntenyView/components/ImportCustomTrack.d.ts +1 -1
  18. package/dist/LinearSyntenyView/components/ImportCustomTrack.js +1 -1
  19. package/dist/LinearSyntenyView/components/ImportForm.d.ts +2 -2
  20. package/dist/LinearSyntenyView/components/ImportForm.js +2 -1
  21. package/dist/LinearSyntenyView/model.d.ts +18 -18
  22. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -1
  23. package/dist/SyntenyTrack/index.d.ts +1 -2
  24. package/dist/SyntenyTrack/index.js +6 -5
  25. package/dist/util.js +2 -1
  26. package/esm/LGVSyntenyDisplay/model.d.ts +29 -78
  27. package/esm/LGVSyntenyDisplay/model.js +23 -4
  28. package/esm/LinearComparativeDisplay/configSchemaF.d.ts +1 -1
  29. package/esm/LinearComparativeDisplay/configSchemaF.js +1 -1
  30. package/esm/LinearComparativeDisplay/stateModelFactory.js +4 -4
  31. package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +2 -2
  32. package/esm/LinearComparativeView/components/LinearComparativeView.js +2 -1
  33. package/esm/LinearComparativeView/components/Rubberband.d.ts +4 -5
  34. package/esm/LinearComparativeView/components/Rubberband.js +3 -3
  35. package/esm/LinearComparativeView/model.d.ts +6 -6
  36. package/esm/LinearComparativeView/model.js +5 -2
  37. package/esm/LinearReadVsRef/LinearReadVsRef.js +2 -1
  38. package/esm/LinearSyntenyDisplay/afterAttach.js +1 -2
  39. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -2
  40. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +2 -1
  41. package/esm/LinearSyntenyDisplay/drawSynteny.js +2 -4
  42. package/esm/LinearSyntenyView/components/ImportCustomTrack.d.ts +1 -1
  43. package/esm/LinearSyntenyView/components/ImportCustomTrack.js +1 -1
  44. package/esm/LinearSyntenyView/components/ImportForm.d.ts +2 -2
  45. package/esm/LinearSyntenyView/components/ImportForm.js +2 -1
  46. package/esm/LinearSyntenyView/model.d.ts +18 -18
  47. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +2 -1
  48. package/esm/SyntenyTrack/index.d.ts +1 -2
  49. package/esm/SyntenyTrack/index.js +5 -5
  50. package/esm/util.js +2 -1
  51. package/package.json +3 -3
@@ -73,12 +73,10 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
73
73
  volatileWidth: number | undefined;
74
74
  minimumBlockWidth: number;
75
75
  draggingTrackId: string | undefined;
76
- volatileError: Error | undefined;
76
+ volatileError: unknown;
77
77
  afterDisplayedRegionsSetCallbacks: Function[];
78
78
  scaleFactor: number;
79
- trackRefs: {
80
- [key: string]: HTMLDivElement;
81
- };
79
+ trackRefs: Record<string, HTMLDivElement>;
82
80
  coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
83
81
  coarseTotalBp: number;
84
82
  leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset | undefined;
@@ -102,7 +100,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
102
100
  readonly totalBp: number;
103
101
  readonly maxBpPerPx: number;
104
102
  readonly minBpPerPx: number;
105
- readonly error: string | Error;
103
+ readonly error: {};
106
104
  readonly maxOffset: number;
107
105
  readonly minOffset: number;
108
106
  readonly displayedRegionsTotalPx: number;
@@ -119,7 +117,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
119
117
  } & {
120
118
  setShowCytobands(flag: boolean): void;
121
119
  setWidth(newWidth: number): void;
122
- setError(error: Error | undefined): void;
120
+ setError(error: unknown): void;
123
121
  toggleHeader(): void;
124
122
  toggleHeaderOverview(): void;
125
123
  toggleNoTracksActive(): void;
@@ -221,6 +219,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
221
219
  end: number;
222
220
  reversed: boolean;
223
221
  } | undefined;
222
+ } & {
223
+ afterCreate(): void;
224
224
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
225
225
  viewTrackConfigs: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
226
226
  } & {
@@ -323,12 +323,10 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
323
323
  volatileWidth: number | undefined;
324
324
  minimumBlockWidth: number;
325
325
  draggingTrackId: string | undefined;
326
- volatileError: Error | undefined;
326
+ volatileError: unknown;
327
327
  afterDisplayedRegionsSetCallbacks: Function[];
328
328
  scaleFactor: number;
329
- trackRefs: {
330
- [key: string]: HTMLDivElement;
331
- };
329
+ trackRefs: Record<string, HTMLDivElement>;
332
330
  coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
333
331
  coarseTotalBp: number;
334
332
  leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset | undefined;
@@ -352,7 +350,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
352
350
  readonly totalBp: number;
353
351
  readonly maxBpPerPx: number;
354
352
  readonly minBpPerPx: number;
355
- readonly error: string | Error;
353
+ readonly error: {};
356
354
  readonly maxOffset: number;
357
355
  readonly minOffset: number;
358
356
  readonly displayedRegionsTotalPx: number;
@@ -369,7 +367,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
369
367
  } & {
370
368
  setShowCytobands(flag: boolean): void;
371
369
  setWidth(newWidth: number): void;
372
- setError(error: Error | undefined): void;
370
+ setError(error: unknown): void;
373
371
  toggleHeader(): void;
374
372
  toggleHeaderOverview(): void;
375
373
  toggleNoTracksActive(): void;
@@ -471,6 +469,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
471
469
  end: number;
472
470
  reversed: boolean;
473
471
  } | undefined;
472
+ } & {
473
+ afterCreate(): void;
474
474
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
475
475
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
476
476
  displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
@@ -511,12 +511,10 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
511
511
  volatileWidth: number | undefined;
512
512
  minimumBlockWidth: number;
513
513
  draggingTrackId: string | undefined;
514
- volatileError: Error | undefined;
514
+ volatileError: unknown;
515
515
  afterDisplayedRegionsSetCallbacks: Function[];
516
516
  scaleFactor: number;
517
- trackRefs: {
518
- [key: string]: HTMLDivElement;
519
- };
517
+ trackRefs: Record<string, HTMLDivElement>;
520
518
  coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
521
519
  coarseTotalBp: number;
522
520
  leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset | undefined;
@@ -540,7 +538,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
540
538
  readonly totalBp: number;
541
539
  readonly maxBpPerPx: number;
542
540
  readonly minBpPerPx: number;
543
- readonly error: string | Error;
541
+ readonly error: {};
544
542
  readonly maxOffset: number;
545
543
  readonly minOffset: number;
546
544
  readonly displayedRegionsTotalPx: number;
@@ -557,7 +555,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
557
555
  } & {
558
556
  setShowCytobands(flag: boolean): void;
559
557
  setWidth(newWidth: number): void;
560
- setError(error: Error | undefined): void;
558
+ setError(error: unknown): void;
561
559
  toggleHeader(): void;
562
560
  toggleHeaderOverview(): void;
563
561
  toggleNoTracksActive(): void;
@@ -659,6 +657,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
659
657
  end: number;
660
658
  reversed: boolean;
661
659
  } | undefined;
660
+ } & {
661
+ afterCreate(): void;
662
662
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
663
663
  closeView(): void;
664
664
  setMiddleComparativeHeight(n: number): number;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useTheme } from '@mui/material';
3
+ import { stripAlpha } from '@jbrowse/core/util';
3
4
  export default function SVGBackground({ width, height, shift, }) {
4
5
  const theme = useTheme();
5
- return (React.createElement("rect", { width: width + shift * 2, height: height, fill: theme.palette.background.default }));
6
+ return (React.createElement("rect", { width: width + shift * 2, height: height, fill: stripAlpha(theme.palette.background.default) }));
6
7
  }
@@ -1,3 +1,2 @@
1
1
  import PluginManager from '@jbrowse/core/PluginManager';
2
- declare const _default: (pm: PluginManager) => void;
3
- export default _default;
2
+ export default function registerSyntenyTrack(pluginManager: PluginManager): void;
@@ -1,13 +1,13 @@
1
1
  import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
2
  import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
3
3
  import configSchemaF from './configSchema';
4
- export default (pm) => {
5
- pm.addTrackType(() => {
6
- const configSchema = configSchemaF(pm);
4
+ export default function registerSyntenyTrack(pluginManager) {
5
+ pluginManager.addTrackType(() => {
6
+ const configSchema = configSchemaF(pluginManager);
7
7
  return new TrackType({
8
8
  name: 'SyntenyTrack',
9
9
  configSchema,
10
- stateModel: createBaseTrackModel(pm, 'SyntenyTrack', configSchema),
10
+ stateModel: createBaseTrackModel(pluginManager, 'SyntenyTrack', configSchema),
11
11
  });
12
12
  });
13
- };
13
+ }
package/esm/util.js CHANGED
@@ -25,7 +25,8 @@ export function getTrackPos(view, trackConfigId) {
25
25
  // Uses bpToPx to get the screen pixel coordinates but ignores some conditions
26
26
  // where bpToPx could return undefined
27
27
  export function getPxFromCoordinate(view, refName, coord) {
28
- return (((bpToPx(view, { refName, coord }) || {}).offsetPx || 0) - view.offsetPx);
28
+ var _a;
29
+ return (((_a = bpToPx(view, { refName, coord })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - view.offsetPx;
29
30
  }
30
31
  // Retrieves the y-position of a layout record in a track
31
32
  // If track not found returns 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-linear-comparative-view",
3
- "version": "2.6.2",
3
+ "version": "2.7.0",
4
4
  "description": "JBrowse 2 linear comparative view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -49,7 +49,7 @@
49
49
  "@jbrowse/plugin-linear-genome-view": "^2.0.0",
50
50
  "@mui/material": "^5.0.0",
51
51
  "mobx": "^6.0.0",
52
- "mobx-react": "^7.0.0",
52
+ "mobx-react": "^9.0.0",
53
53
  "mobx-state-tree": "^5.0.0",
54
54
  "react": ">=16.8.0",
55
55
  "react-dom": ">=16.8.0",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "bbea587a402d9974acdd804a33f4b77f31a2fd5f"
65
+ "gitHead": "dbe7fb1af01fc89f833d2744635eb44a17365b41"
66
66
  }