@jbrowse/plugin-linear-comparative-view 2.17.0 → 2.18.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 (184) hide show
  1. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +1 -1
  2. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -2
  3. package/dist/LGVSyntenyDisplay/components/util.d.ts +3 -3
  4. package/dist/LGVSyntenyDisplay/components/util.js +0 -1
  5. package/dist/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
  6. package/dist/LGVSyntenyDisplay/configSchemaF.js +12 -9
  7. package/dist/LGVSyntenyDisplay/index.d.ts +1 -1
  8. package/dist/LGVSyntenyDisplay/index.js +1 -1
  9. package/dist/LGVSyntenyDisplay/model.d.ts +102 -63
  10. package/dist/LGVSyntenyDisplay/model.js +1 -29
  11. package/dist/LaunchLinearSyntenyView.d.ts +1 -1
  12. package/dist/LaunchLinearSyntenyView.js +1 -3
  13. package/dist/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
  14. package/dist/LinearComparativeDisplay/configSchemaF.js +0 -6
  15. package/dist/LinearComparativeDisplay/index.d.ts +1 -1
  16. package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
  17. package/dist/LinearComparativeDisplay/stateModelFactory.js +13 -57
  18. package/dist/LinearComparativeView/components/Header.d.ts +1 -1
  19. package/dist/LinearComparativeView/components/Header.js +4 -5
  20. package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -1
  21. package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +3 -4
  22. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
  23. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +8 -15
  24. package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
  25. package/dist/LinearComparativeView/components/LinearComparativeView.js +2 -4
  26. package/dist/LinearComparativeView/components/Rubberband.d.ts +1 -1
  27. package/dist/LinearComparativeView/components/Rubberband.js +17 -19
  28. package/dist/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
  29. package/dist/LinearComparativeView/components/VerticalGuide.js +1 -1
  30. package/dist/LinearComparativeView/index.d.ts +1 -1
  31. package/dist/LinearComparativeView/model.d.ts +6 -62
  32. package/dist/LinearComparativeView/model.js +3 -99
  33. package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +1 -1
  34. package/dist/LinearReadVsRef/LinearReadVsRef.js +5 -19
  35. package/dist/LinearReadVsRef/index.d.ts +1 -1
  36. package/dist/LinearReadVsRef/index.js +0 -2
  37. package/dist/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
  38. package/dist/LinearSyntenyDisplay/afterAttach.js +2 -9
  39. package/dist/LinearSyntenyDisplay/components/Component.d.ts +1 -1
  40. package/dist/LinearSyntenyDisplay/components/Component.js +2 -4
  41. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
  42. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +6 -22
  43. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +2 -2
  44. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +1 -1
  45. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
  46. package/dist/LinearSyntenyDisplay/components/util.d.ts +3 -3
  47. package/dist/LinearSyntenyDisplay/components/util.js +0 -9
  48. package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
  49. package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -15
  50. package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
  51. package/dist/LinearSyntenyDisplay/drawSynteny.js +1 -23
  52. package/dist/LinearSyntenyDisplay/index.d.ts +1 -1
  53. package/dist/LinearSyntenyDisplay/index.js +1 -2
  54. package/dist/LinearSyntenyDisplay/model.d.ts +8 -102
  55. package/dist/LinearSyntenyDisplay/model.js +1 -92
  56. package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
  57. package/dist/LinearSyntenyView/components/ExportSvgDialog.js +2 -4
  58. package/dist/LinearSyntenyView/components/Icons.d.ts +1 -1
  59. package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +2 -2
  60. package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +1 -1
  61. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
  62. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +6 -8
  63. package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +1 -1
  64. package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +3 -5
  65. package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +3 -3
  66. package/dist/LinearSyntenyView/components/ImportForm/util.js +1 -3
  67. package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
  68. package/dist/LinearSyntenyView/components/LinearSyntenyView.js +0 -1
  69. package/dist/LinearSyntenyView/index.d.ts +1 -1
  70. package/dist/LinearSyntenyView/model.d.ts +5 -28
  71. package/dist/LinearSyntenyView/model.js +4 -41
  72. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +1 -1
  73. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -1
  74. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +1 -1
  75. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
  76. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +5 -10
  77. package/dist/LinearSyntenyViewHelper/index.d.ts +1 -1
  78. package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
  79. package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
  80. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
  81. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +4 -13
  82. package/dist/SyntenyFeatureDetail/index.d.ts +1 -1
  83. package/dist/SyntenyFeatureDetail/index.js +1 -7
  84. package/dist/SyntenyTrack/configSchema.d.ts +1 -1
  85. package/dist/SyntenyTrack/configSchema.js +1 -9
  86. package/dist/SyntenyTrack/index.d.ts +1 -1
  87. package/dist/SyntenyTrack/index.js +1 -1
  88. package/dist/index.d.ts +1 -1
  89. package/dist/index.js +4 -4
  90. package/dist/util.d.ts +2 -2
  91. package/dist/util.js +1 -11
  92. package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +1 -1
  93. package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +0 -2
  94. package/esm/LGVSyntenyDisplay/components/util.d.ts +3 -3
  95. package/esm/LGVSyntenyDisplay/components/util.js +0 -1
  96. package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
  97. package/esm/LGVSyntenyDisplay/configSchemaF.js +12 -9
  98. package/esm/LGVSyntenyDisplay/index.d.ts +1 -1
  99. package/esm/LGVSyntenyDisplay/index.js +1 -1
  100. package/esm/LGVSyntenyDisplay/model.d.ts +102 -63
  101. package/esm/LGVSyntenyDisplay/model.js +2 -30
  102. package/esm/LaunchLinearSyntenyView.d.ts +1 -1
  103. package/esm/LaunchLinearSyntenyView.js +1 -3
  104. package/esm/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
  105. package/esm/LinearComparativeDisplay/configSchemaF.js +0 -6
  106. package/esm/LinearComparativeDisplay/index.d.ts +1 -1
  107. package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
  108. package/esm/LinearComparativeDisplay/stateModelFactory.js +14 -58
  109. package/esm/LinearComparativeView/components/Header.d.ts +1 -1
  110. package/esm/LinearComparativeView/components/Header.js +4 -5
  111. package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +1 -1
  112. package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +3 -4
  113. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +1 -1
  114. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +8 -15
  115. package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +1 -1
  116. package/esm/LinearComparativeView/components/LinearComparativeView.js +2 -4
  117. package/esm/LinearComparativeView/components/Rubberband.d.ts +1 -1
  118. package/esm/LinearComparativeView/components/Rubberband.js +18 -20
  119. package/esm/LinearComparativeView/components/VerticalGuide.d.ts +1 -1
  120. package/esm/LinearComparativeView/components/VerticalGuide.js +1 -1
  121. package/esm/LinearComparativeView/index.d.ts +1 -1
  122. package/esm/LinearComparativeView/model.d.ts +6 -62
  123. package/esm/LinearComparativeView/model.js +4 -100
  124. package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +1 -1
  125. package/esm/LinearReadVsRef/LinearReadVsRef.js +5 -19
  126. package/esm/LinearReadVsRef/index.d.ts +1 -1
  127. package/esm/LinearReadVsRef/index.js +1 -3
  128. package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
  129. package/esm/LinearSyntenyDisplay/afterAttach.js +2 -9
  130. package/esm/LinearSyntenyDisplay/components/Component.d.ts +1 -1
  131. package/esm/LinearSyntenyDisplay/components/Component.js +2 -4
  132. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +1 -1
  133. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +8 -24
  134. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +2 -2
  135. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +1 -1
  136. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +1 -1
  137. package/esm/LinearSyntenyDisplay/components/util.d.ts +3 -3
  138. package/esm/LinearSyntenyDisplay/components/util.js +2 -11
  139. package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
  140. package/esm/LinearSyntenyDisplay/configSchemaF.js +0 -15
  141. package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
  142. package/esm/LinearSyntenyDisplay/drawSynteny.js +1 -23
  143. package/esm/LinearSyntenyDisplay/index.d.ts +1 -1
  144. package/esm/LinearSyntenyDisplay/index.js +1 -2
  145. package/esm/LinearSyntenyDisplay/model.d.ts +8 -102
  146. package/esm/LinearSyntenyDisplay/model.js +1 -92
  147. package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +1 -1
  148. package/esm/LinearSyntenyView/components/ExportSvgDialog.js +2 -4
  149. package/esm/LinearSyntenyView/components/Icons.d.ts +1 -1
  150. package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +2 -2
  151. package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +2 -2
  152. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +1 -1
  153. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +6 -8
  154. package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +1 -1
  155. package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +4 -6
  156. package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +3 -3
  157. package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +1 -1
  158. package/esm/LinearSyntenyView/components/ImportForm/util.js +1 -3
  159. package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +1 -1
  160. package/esm/LinearSyntenyView/components/LinearSyntenyView.js +0 -1
  161. package/esm/LinearSyntenyView/index.d.ts +1 -1
  162. package/esm/LinearSyntenyView/model.d.ts +5 -28
  163. package/esm/LinearSyntenyView/model.js +4 -41
  164. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +1 -1
  165. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +1 -1
  166. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +2 -2
  167. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
  168. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +6 -11
  169. package/esm/LinearSyntenyViewHelper/index.d.ts +1 -1
  170. package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
  171. package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
  172. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +1 -1
  173. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +4 -13
  174. package/esm/SyntenyFeatureDetail/index.d.ts +1 -1
  175. package/esm/SyntenyFeatureDetail/index.js +1 -7
  176. package/esm/SyntenyTrack/configSchema.d.ts +1 -1
  177. package/esm/SyntenyTrack/configSchema.js +1 -9
  178. package/esm/SyntenyTrack/index.d.ts +1 -1
  179. package/esm/SyntenyTrack/index.js +1 -1
  180. package/esm/index.d.ts +1 -1
  181. package/esm/index.js +4 -4
  182. package/esm/util.d.ts +2 -2
  183. package/esm/util.js +1 -11
  184. package/package.json +2 -4
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { Instance } from 'mobx-state-tree';
3
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type React from 'react';
4
2
  import { Curves } from './components/Icons';
3
+ import type PluginManager from '@jbrowse/core/PluginManager';
4
+ import type { Instance } from 'mobx-state-tree';
5
5
  export interface ExportSvgOptions {
6
6
  rasterizeLayers?: boolean;
7
7
  scale?: number;
@@ -18,11 +18,6 @@ export interface ExportSvgOptions {
18
18
  themeName?: string;
19
19
  trackLabels?: string;
20
20
  }
21
- /**
22
- * #stateModel LinearSyntenyView
23
- * extends
24
- * - [LinearComparativeView](../linearcomparativeview)
25
- */
26
21
  export default function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
27
22
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
28
23
  displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
@@ -98,6 +93,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
98
93
  scaleBarDisplayPrefix(): string | undefined;
99
94
  MiniControlsComponent(): React.FC<any>;
100
95
  HeaderComponent(): React.FC<any>;
96
+ readonly assembliesNotFound: string | undefined;
101
97
  readonly assemblyErrors: string;
102
98
  readonly assembliesInitialized: boolean;
103
99
  readonly initialized: boolean;
@@ -310,29 +306,12 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
310
306
  } & {
311
307
  afterAttach(): void;
312
308
  } & {
313
- /**
314
- * #action
315
- */
316
309
  toggleCurves(): void;
317
- /**
318
- * #action
319
- */
320
310
  toggleCIGAR(): void;
321
- /**
322
- * #action
323
- */
324
311
  showAllRegions(): void;
325
312
  } & {
326
- /**
327
- * #action
328
- */
329
313
  exportSvg(opts: ExportSvgOptions): Promise<void>;
330
314
  } & {
331
- /**
332
- * #method
333
- * includes a subset of view menu options because the full list is a
334
- * little overwhelming
335
- */
336
315
  headerMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
337
316
  label: string;
338
317
  onClick: () => void;
@@ -366,9 +345,6 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
366
345
  checked?: undefined;
367
346
  type?: undefined;
368
347
  })[];
369
- /**
370
- * #method
371
- */
372
348
  menuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
373
349
  label: string;
374
350
  icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
@@ -453,6 +429,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
453
429
  scaleBarDisplayPrefix(): string | undefined;
454
430
  MiniControlsComponent(): React.FC<any>;
455
431
  HeaderComponent(): React.FC<any>;
432
+ readonly assembliesNotFound: string | undefined;
456
433
  readonly assemblyErrors: string;
457
434
  readonly assembliesInitialized: boolean;
458
435
  readonly initialized: boolean;
@@ -1,54 +1,28 @@
1
1
  import { lazy } from 'react';
2
- import { types } from 'mobx-state-tree';
3
- import { transaction } from 'mobx';
4
2
  import { getSession } from '@jbrowse/core/util';
5
- import { saveAs } from 'file-saver';
6
- // icons
7
3
  import CropFreeIcon from '@mui/icons-material/CropFree';
8
- import VisibilityIcon from '@mui/icons-material/Visibility';
9
4
  import PhotoCameraIcon from '@mui/icons-material/PhotoCamera';
5
+ import VisibilityIcon from '@mui/icons-material/Visibility';
6
+ import { saveAs } from 'file-saver';
7
+ import { transaction } from 'mobx';
8
+ import { types } from 'mobx-state-tree';
10
9
  import { Curves } from './components/Icons';
11
- // locals
12
10
  import baseModel from '../LinearComparativeView/model';
13
- // lazies
14
11
  const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'));
15
- /**
16
- * #stateModel LinearSyntenyView
17
- * extends
18
- * - [LinearComparativeView](../linearcomparativeview)
19
- */
20
12
  export default function stateModelFactory(pluginManager) {
21
13
  return types
22
14
  .compose('LinearSyntenyView', baseModel(pluginManager), types.model({
23
- /**
24
- * #property
25
- */
26
15
  type: types.literal('LinearSyntenyView'),
27
- /**
28
- * #property/
29
- */
30
16
  drawCIGAR: true,
31
- /**
32
- * #property
33
- */
34
17
  drawCurves: false,
35
18
  }))
36
19
  .actions(self => ({
37
- /**
38
- * #action
39
- */
40
20
  toggleCurves() {
41
21
  self.drawCurves = !self.drawCurves;
42
22
  },
43
- /**
44
- * #action
45
- */
46
23
  toggleCIGAR() {
47
24
  self.drawCIGAR = !self.drawCIGAR;
48
25
  },
49
- /**
50
- * #action
51
- */
52
26
  showAllRegions() {
53
27
  transaction(() => {
54
28
  for (const view of self.views) {
@@ -58,9 +32,6 @@ export default function stateModelFactory(pluginManager) {
58
32
  },
59
33
  }))
60
34
  .actions(self => ({
61
- /**
62
- * #action
63
- */
64
35
  async exportSvg(opts) {
65
36
  const { renderToSvg } = await import('./svgcomponents/SVGLinearSyntenyView');
66
37
  const html = await renderToSvg(self, opts);
@@ -72,11 +43,6 @@ export default function stateModelFactory(pluginManager) {
72
43
  const superHeaderMenuItems = self.headerMenuItems;
73
44
  const superMenuItems = self.menuItems;
74
45
  return {
75
- /**
76
- * #method
77
- * includes a subset of view menu options because the full list is a
78
- * little overwhelming
79
- */
80
46
  headerMenuItems() {
81
47
  return [
82
48
  ...superHeaderMenuItems(),
@@ -118,9 +84,6 @@ export default function stateModelFactory(pluginManager) {
118
84
  },
119
85
  ];
120
86
  },
121
- /**
122
- * #method
123
- */
124
87
  menuItems() {
125
88
  return [
126
89
  ...superMenuItems(),
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { useTheme } from '@mui/material';
3
2
  import { stripAlpha } from '@jbrowse/core/util';
3
+ import { useTheme } from '@mui/material';
4
4
  export default function SVGBackground({ width, height, shift, }) {
5
5
  const theme = useTheme();
6
6
  return (React.createElement("rect", { width: width + shift * 2, height: height, fill: stripAlpha(theme.palette.background.default) }));
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
2
+ import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
3
3
  export default function SVGLinearGenomeView({ trackLabelOffset, fontSize, textHeight, trackLabels, view, displayResults, rulerHeight, shift, }: {
4
4
  textHeight: number;
5
5
  trackLabels: string;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { useTheme } from '@mui/material';
3
2
  import { getFillProps } from '@jbrowse/core/util';
4
- import { SVGTracks, SVGRuler, } from '@jbrowse/plugin-linear-genome-view';
3
+ import { SVGRuler, SVGTracks } from '@jbrowse/plugin-linear-genome-view';
4
+ import { useTheme } from '@mui/material';
5
5
  export default function SVGLinearGenomeView({ trackLabelOffset, fontSize, textHeight, trackLabels, view, displayResults, rulerHeight, shift, }) {
6
6
  const theme = useTheme();
7
7
  return (React.createElement("g", { transform: `translate(${shift} ${fontSize})` },
@@ -1,2 +1,2 @@
1
- import { ExportSvgOptions, LinearSyntenyViewModel } from '../model';
1
+ import type { ExportSvgOptions, LinearSyntenyViewModel } from '../model';
2
2
  export declare function renderToSvg(model: LinearSyntenyViewModel, opts: ExportSvgOptions): Promise<string>;
@@ -1,16 +1,14 @@
1
1
  import React from 'react';
2
- import { ThemeProvider } from '@mui/material';
3
- import { getRoot } from 'mobx-state-tree';
4
- import { when } from 'mobx';
5
- import { getSession, getSerializedSvg, max, measureText, ReactRendering, renderToAbstractCanvas, renderToStaticMarkup, sum, } from '@jbrowse/core/util';
6
- import { getTrackName } from '@jbrowse/core/util/tracks';
7
2
  import { createJBrowseTheme } from '@jbrowse/core/ui';
3
+ import { ReactRendering, getSerializedSvg, getSession, max, measureText, renderToAbstractCanvas, renderToStaticMarkup, sum, } from '@jbrowse/core/util';
4
+ import { getTrackName } from '@jbrowse/core/util/tracks';
8
5
  import { totalHeight } from '@jbrowse/plugin-linear-genome-view';
9
- // locals
6
+ import { ThemeProvider } from '@mui/material';
7
+ import { when } from 'mobx';
8
+ import { getRoot } from 'mobx-state-tree';
10
9
  import SVGBackground from './SVGBackground';
11
10
  import SVGLinearGenomeView from './SVGLinearGenomeView';
12
11
  import { drawRef } from '../../LinearSyntenyDisplay/drawSynteny';
13
- // render LGV to SVG
14
12
  export async function renderToSvg(model, opts) {
15
13
  var _a;
16
14
  await when(() => model.initialized);
@@ -75,14 +73,11 @@ export async function renderToSvg(model, opts) {
75
73
  levelHeight ? (React.createElement("defs", null,
76
74
  React.createElement("clipPath", { id: `synclip-${i}` },
77
75
  React.createElement("rect", { x: 0, y: 0, width: width, height: levelHeight })))) : null,
78
- React.createElement("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})` }, rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => (
79
- /* biome-ignore lint/suspicious/noArrayIndexKey: */
80
- React.createElement(ReactRendering, { key: i, rendering: r })))),
76
+ React.createElement("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})` }, rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => (React.createElement(ReactRendering, { key: i, rendering: r })))),
81
77
  React.createElement("g", { transform: `translate(0 ${levelHeight})` },
82
78
  React.createElement(SVGLinearGenomeView, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], key: view.id, view: view, fontSize: fontSize }))));
83
79
  currOffset += height + fontSize + rulerHeight + levelHeight;
84
80
  }
85
- // the xlink namespace is used for rendering <image> tag
86
81
  return renderToStaticMarkup(React.createElement(ThemeProvider, { theme: theme },
87
82
  React.createElement(Wrapper, null,
88
83
  React.createElement("svg", { width: width, height: totalHeightSvg, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, totalHeightSvg].toString() },
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function LinearSyntenyViewF(pluginManager: PluginManager): void;
@@ -1,5 +1,5 @@
1
- import { Instance } from 'mobx-state-tree';
2
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ import type { Instance } from 'mobx-state-tree';
3
3
  export declare function linearSyntenyViewHelperModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
4
4
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
5
5
  type: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -7,21 +7,9 @@ export declare function linearSyntenyViewHelperModelFactory(pluginManager: Plugi
7
7
  height: import("mobx-state-tree").IType<number | undefined, number, number>;
8
8
  level: import("mobx-state-tree").ISimpleType<number>;
9
9
  }, {
10
- /**
11
- * #action
12
- */
13
10
  setHeight(n: number): number;
14
- /**
15
- * #action
16
- */
17
11
  showTrack(trackId: string, initialSnapshot?: {}): void;
18
- /**
19
- * #action
20
- */
21
12
  hideTrack(trackId: string): number;
22
- /**
23
- * #action
24
- */
25
13
  toggleTrack(trackId: string): boolean;
26
14
  } & {
27
15
  readonly assemblyNames: (string | undefined)[];
@@ -1,41 +1,20 @@
1
- import { getRoot, resolveIdentifier, types, getParent, } from 'mobx-state-tree';
2
- import { transaction } from 'mobx';
3
1
  import { ElementId } from '@jbrowse/core/util/types/mst';
2
+ import { transaction } from 'mobx';
3
+ import { getParent, getRoot, resolveIdentifier, types } from 'mobx-state-tree';
4
4
  export function linearSyntenyViewHelperModelFactory(pluginManager) {
5
5
  return types
6
6
  .model('LinearSyntenyViewHelper', {
7
- /**
8
- * #property
9
- */
10
7
  id: ElementId,
11
- /**
12
- * #property
13
- */
14
8
  type: 'LinearSyntenyViewHelper',
15
- /**
16
- * #property
17
- */
18
9
  tracks: types.array(pluginManager.pluggableMstType('track', 'stateModel')),
19
- /**
20
- * #property
21
- */
22
10
  height: 100,
23
- /**
24
- * #property
25
- */
26
11
  level: types.number,
27
12
  })
28
13
  .actions(self => ({
29
- /**
30
- * #action
31
- */
32
14
  setHeight(n) {
33
15
  self.height = n;
34
16
  return self.height;
35
17
  },
36
- /**
37
- * #action
38
- */
39
18
  showTrack(trackId, initialSnapshot = {}) {
40
19
  const schema = pluginManager.pluggableConfigSchemaType('track');
41
20
  const configuration = resolveIdentifier(schema, getRoot(self), trackId);
@@ -64,9 +43,6 @@ export function linearSyntenyViewHelperModelFactory(pluginManager) {
64
43
  ],
65
44
  }));
66
45
  },
67
- /**
68
- * #action
69
- */
70
46
  hideTrack(trackId) {
71
47
  const schema = pluginManager.pluggableConfigSchemaType('track');
72
48
  const config = resolveIdentifier(schema, getRoot(self), trackId);
@@ -78,9 +54,6 @@ export function linearSyntenyViewHelperModelFactory(pluginManager) {
78
54
  });
79
55
  return shownTracks.length;
80
56
  },
81
- /**
82
- * #action
83
- */
84
57
  toggleTrack(trackId) {
85
58
  const hiddenCount = this.hideTrack(trackId);
86
59
  if (!hiddenCount) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SimpleFeatureSerialized } from '@jbrowse/core/util';
2
+ import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
3
3
  interface SyntenyFeatureDetailModel {
4
4
  trackId: string;
5
5
  featureData: SimpleFeatureSerialized;
@@ -1,11 +1,9 @@
1
1
  import React, { lazy } from 'react';
2
+ import BaseFeatureDetail from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
3
+ import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
4
+ import { SimpleFeature, assembleLocString, getSession, } from '@jbrowse/core/util';
2
5
  import { Link, Paper } from '@mui/material';
3
6
  import { observer } from 'mobx-react';
4
- // locals
5
- import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
6
- import BaseFeatureDetail from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
7
- import { assembleLocString, getSession, SimpleFeature, } from '@jbrowse/core/util';
8
- // lazies
9
7
  const LaunchSyntenyViewDialog = lazy(() => import('../LGVSyntenyDisplay/components/LaunchSyntenyViewDialog'));
10
8
  const CustomLinker = observer(function ({ model, }) {
11
9
  const { featureData, view, level, trackId } = model;
@@ -16,17 +14,10 @@ const CustomLinker = observer(function ({ model, }) {
16
14
  event.preventDefault();
17
15
  const { views } = view;
18
16
  if (level !== undefined) {
19
- // level is "pre-known", and stored in the SyntenyFeatureWidget
20
- // model state e.g. when clicking on a feature from a
21
- // LinearSyntenyRendering
22
17
  (_a = views[level]) === null || _a === void 0 ? void 0 : _a.navTo(featureData);
23
18
  (_b = views[level + 1]) === null || _b === void 0 ? void 0 : _b.navTo(featureData.mate);
24
19
  }
25
20
  else {
26
- // best effort to find the right level. this is triggered for
27
- // example if a user clicks on a feature in a LGVSyntenyDisplay
28
- // in an existing LinearSyntenyView, there is no real proper
29
- // level "pre-known" to this situation
30
21
  const f1 = featureData;
31
22
  const f2 = featureData.mate;
32
23
  const r1 = f1.assemblyName;
@@ -64,7 +55,7 @@ const CustomLinker = observer(function ({ model, }) {
64
55
  } }, "Launch new linear synteny view on this feature"))));
65
56
  });
66
57
  const SyntenyFeatureDetail = observer(function ({ model, }) {
67
- return (React.createElement(Paper, { "data-testid": "alignment-side-drawer" },
58
+ return (React.createElement(Paper, null,
68
59
  React.createElement(BaseFeatureDetail, { title: "Feature", model: model }),
69
60
  React.createElement(BaseCard, { title: "Link to view" },
70
61
  React.createElement(CustomLinker, { model: model }))));
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function SyntenyFeatureWidgetF(pluginManager: PluginManager): void;
@@ -1,18 +1,12 @@
1
1
  import { lazy } from 'react';
2
+ import { stateModelFactory as BaseFeatureWidgetStateModelF } from '@jbrowse/core/BaseFeatureWidget';
2
3
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
3
4
  import WidgetType from '@jbrowse/core/pluggableElementTypes/WidgetType';
4
5
  import { types } from 'mobx-state-tree';
5
- import { stateModelFactory as BaseFeatureWidgetStateModelF } from '@jbrowse/core/BaseFeatureWidget';
6
6
  const configSchema = ConfigurationSchema('SyntenyFeatureWidget', {});
7
7
  function stateModelF(pluginManager) {
8
8
  return types.compose(BaseFeatureWidgetStateModelF(pluginManager), types.model('SyntenyFeatureWidget', {
9
- /**
10
- * #property
11
- */
12
9
  type: types.literal('SyntenyFeatureWidget'),
13
- /**
14
- * #property
15
- */
16
10
  level: types.maybe(types.number),
17
11
  }));
18
12
  }
@@ -1,4 +1,4 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
3
3
  name: {
4
4
  description: string;
@@ -1,15 +1,7 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
2
  import { createBaseTrackConfig } from '@jbrowse/core/pluggableElementTypes/models';
3
- /**
4
- * #config SyntenyTrack
5
- * extends
6
- * - [BaseTrack](../basetrack)
7
- */
8
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
3
+ function x() { }
9
4
  const configSchema = (pluginManager) => ConfigurationSchema('SyntenyTrack', {}, {
10
- /**
11
- * #baseConfiguration
12
- */
13
5
  baseConfiguration: createBaseTrackConfig(pluginManager),
14
6
  });
15
7
  export default configSchema;
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function registerSyntenyTrack(pluginManager: PluginManager): void;
@@ -1,5 +1,5 @@
1
- import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
2
1
  import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
2
+ import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
3
3
  import configSchemaF from './configSchema';
4
4
  export default function registerSyntenyTrack(pluginManager) {
5
5
  pluginManager.addTrackType(() => {
package/esm/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
- import PluginManager from '@jbrowse/core/PluginManager';
2
+ import type PluginManager from '@jbrowse/core/PluginManager';
3
3
  export default class LinearComparativeViewPlugin extends Plugin {
4
4
  name: string;
5
5
  install(pluginManager: PluginManager): void;
package/esm/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
2
  import { isAbstractMenuManager } from '@jbrowse/core/util';
3
3
  import CalendarIcon from '@mui/icons-material/CalendarViewDay';
4
+ import LGVSyntenyDisplayF from './LGVSyntenyDisplay';
5
+ import LaunchLinearSyntenyViewF from './LaunchLinearSyntenyView';
4
6
  import LinearComparativeDisplayF from './LinearComparativeDisplay';
5
7
  import LinearComparativeViewF from './LinearComparativeView';
8
+ import LinearReadVsRefMenuItemF from './LinearReadVsRef';
6
9
  import LinearSyntenyDisplayF from './LinearSyntenyDisplay';
7
- import LGVSyntenyDisplayF from './LGVSyntenyDisplay';
8
10
  import LinearSyntenyViewF from './LinearSyntenyView';
9
11
  import LinearSyntenyViewHelperF from './LinearSyntenyViewHelper';
10
- import LaunchLinearSyntenyViewF from './LaunchLinearSyntenyView';
11
- import SyntenyTrackF from './SyntenyTrack';
12
- import LinearReadVsRefMenuItemF from './LinearReadVsRef';
13
12
  import SyntenyFeatureWidgetF from './SyntenyFeatureDetail';
13
+ import SyntenyTrackF from './SyntenyTrack';
14
14
  export default class LinearComparativeViewPlugin extends Plugin {
15
15
  constructor() {
16
16
  super(...arguments);
package/esm/util.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Region } from '@jbrowse/core/util/types';
2
- import { Feature } from '@jbrowse/core/util/simpleFeature';
1
+ import type { Feature } from '@jbrowse/core/util/simpleFeature';
2
+ import type { Region } from '@jbrowse/core/util/types';
3
3
  export type LayoutRecord = [number, number, number, number];
4
4
  export interface ReducedLinearGenomeView {
5
5
  bpPerPx: number;
package/esm/util.js CHANGED
@@ -19,18 +19,14 @@ export function getTrackPos(view, trackConfigId) {
19
19
  const idx = view.tracks.findIndex(t => t.configuration === trackConfigId);
20
20
  let accum = 0;
21
21
  for (let i = 0; i < idx; i += 1) {
22
- accum += view.tracks[i].height + 3; // +1px for trackresizehandle
22
+ accum += view.tracks[i].height + 3;
23
23
  }
24
24
  return accum;
25
25
  }
26
- // Uses bpToPx to get the screen pixel coordinates but ignores some conditions
27
- // where bpToPx could return undefined
28
26
  export function getPxFromCoordinate(view, refName, coord) {
29
27
  var _a;
30
28
  return (((_a = bpToPx(view, { refName, coord })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - view.offsetPx;
31
29
  }
32
- // Retrieves the y-position of a layout record in a track
33
- // If track not found returns 0
34
30
  export function overlayYPos(trackConfigId, level, views, c, cond) {
35
31
  const track = views[level].tracks.find(t => t.configuration === trackConfigId);
36
32
  const ypos = track
@@ -40,11 +36,6 @@ export function overlayYPos(trackConfigId, level, views, c, cond) {
40
36
  : 0;
41
37
  return ypos + (cond ? cheight(c) : 0);
42
38
  }
43
- // Returns the pixel screen position of a refName:coord input, or undefined if
44
- // the input could not be located. Uses view.displayedRegions as a representation
45
- // of what is on the screen
46
- //
47
- // Note: does not consider that this refName:coord input could multi-match
48
39
  function bpToPx(view, { refName, coord }) {
49
40
  let offsetBp = 0;
50
41
  const index = view.displayedRegions.findIndex(r => {
@@ -64,7 +55,6 @@ function bpToPx(view, { refName, coord }) {
64
55
  }
65
56
  return undefined;
66
57
  }
67
- // Returns either 0 or height depending on condition
68
58
  export function interstitialYPos(cond, height) {
69
59
  return cond ? 0 : height;
70
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-linear-comparative-view",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "description": "JBrowse 2 linear comparative view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -36,9 +36,7 @@
36
36
  "clean": "rimraf dist esm *.tsbuildinfo"
37
37
  },
38
38
  "dependencies": {
39
- "@floating-ui/react": "^0.26.3",
40
39
  "@mui/icons-material": "^6.0.0",
41
- "clone": "^2.1.2",
42
40
  "copy-to-clipboard": "^3.3.1",
43
41
  "file-saver": "^2.0.0"
44
42
  },
@@ -61,5 +59,5 @@
61
59
  "publishConfig": {
62
60
  "access": "public"
63
61
  },
64
- "gitHead": "eed30b5e671f8f7823652d7cecc51aa89226de46"
62
+ "gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
65
63
  }