@jbrowse/plugin-linear-comparative-view 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 (231) hide show
  1. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
  2. package/dist/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +36 -60
  3. package/dist/LGVSyntenyDisplay/components/util.d.ts +9 -6
  4. package/dist/LGVSyntenyDisplay/components/util.js +6 -13
  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 +122 -69
  10. package/dist/LGVSyntenyDisplay/model.js +20 -37
  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 +2 -3
  19. package/dist/LinearComparativeView/components/Header.js +56 -86
  20. package/dist/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
  21. package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +5 -15
  22. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
  23. package/dist/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -32
  24. package/dist/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
  25. package/dist/LinearComparativeView/components/LinearComparativeView.js +4 -9
  26. package/dist/LinearComparativeView/components/Rubberband.d.ts +2 -3
  27. package/dist/LinearComparativeView/components/Rubberband.js +36 -69
  28. package/dist/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
  29. package/dist/LinearComparativeView/components/VerticalGuide.js +5 -9
  30. package/dist/LinearComparativeView/index.d.ts +1 -1
  31. package/dist/LinearComparativeView/index.js +17 -7
  32. package/dist/LinearComparativeView/model.d.ts +38 -90
  33. package/dist/LinearComparativeView/model.js +40 -107
  34. package/dist/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
  35. package/dist/LinearReadVsRef/LinearReadVsRef.js +10 -55
  36. package/dist/LinearReadVsRef/index.d.ts +1 -1
  37. package/dist/LinearReadVsRef/index.js +17 -9
  38. package/dist/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
  39. package/dist/LinearSyntenyDisplay/afterAttach.js +8 -12
  40. package/dist/LinearSyntenyDisplay/components/Component.d.ts +2 -3
  41. package/dist/LinearSyntenyDisplay/components/Component.js +11 -36
  42. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
  43. package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +95 -106
  44. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
  45. package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -6
  46. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
  47. package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
  48. package/dist/LinearSyntenyDisplay/components/util.d.ts +3 -3
  49. package/dist/LinearSyntenyDisplay/components/util.js +0 -9
  50. package/dist/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
  51. package/dist/LinearSyntenyDisplay/configSchemaF.js +0 -15
  52. package/dist/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
  53. package/dist/LinearSyntenyDisplay/drawSynteny.js +1 -23
  54. package/dist/LinearSyntenyDisplay/index.d.ts +1 -1
  55. package/dist/LinearSyntenyDisplay/index.js +18 -9
  56. package/dist/LinearSyntenyDisplay/model.d.ts +8 -102
  57. package/dist/LinearSyntenyDisplay/model.js +18 -99
  58. package/dist/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
  59. package/dist/LinearSyntenyView/components/ExportSvgDialog.js +35 -76
  60. package/dist/LinearSyntenyView/components/Icons.d.ts +3 -4
  61. package/dist/LinearSyntenyView/components/Icons.js +3 -8
  62. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
  63. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +130 -0
  64. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
  65. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +39 -0
  66. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
  67. package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +22 -0
  68. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
  69. package/dist/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -150
  70. package/dist/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
  71. package/dist/LinearSyntenyView/components/ImportForm/doSubmit.js +43 -0
  72. package/dist/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
  73. package/dist/LinearSyntenyView/components/ImportForm/getAdapter.js +68 -0
  74. package/dist/LinearSyntenyView/components/ImportForm/util.js +1 -3
  75. package/dist/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
  76. package/dist/LinearSyntenyView/components/LinearSyntenyView.js +20 -10
  77. package/dist/LinearSyntenyView/index.d.ts +1 -1
  78. package/dist/LinearSyntenyView/index.js +17 -7
  79. package/dist/LinearSyntenyView/model.d.ts +54 -58
  80. package/dist/LinearSyntenyView/model.js +61 -56
  81. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
  82. package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -6
  83. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
  84. package/dist/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +3 -11
  85. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
  86. package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +7 -24
  87. package/dist/LinearSyntenyView/types.d.ts +12 -0
  88. package/dist/LinearSyntenyView/types.js +2 -0
  89. package/dist/LinearSyntenyViewHelper/index.d.ts +1 -1
  90. package/dist/LinearSyntenyViewHelper/index.js +2 -2
  91. package/dist/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
  92. package/dist/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
  93. package/dist/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
  94. package/dist/SyntenyFeatureDetail/LinkToSyntenyView.js +87 -0
  95. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
  96. package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +5 -90
  97. package/dist/SyntenyFeatureDetail/index.d.ts +1 -1
  98. package/dist/SyntenyFeatureDetail/index.js +18 -14
  99. package/dist/SyntenyFeatureDetail/types.d.ts +9 -0
  100. package/dist/SyntenyFeatureDetail/types.js +2 -0
  101. package/dist/SyntenyTrack/configSchema.d.ts +1 -1
  102. package/dist/SyntenyTrack/configSchema.js +1 -9
  103. package/dist/SyntenyTrack/index.d.ts +1 -1
  104. package/dist/SyntenyTrack/index.js +1 -1
  105. package/dist/index.d.ts +1 -1
  106. package/dist/index.js +4 -4
  107. package/dist/util.d.ts +2 -2
  108. package/dist/util.js +1 -11
  109. package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.d.ts +6 -5
  110. package/esm/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +35 -36
  111. package/esm/LGVSyntenyDisplay/components/util.d.ts +9 -6
  112. package/esm/LGVSyntenyDisplay/components/util.js +6 -13
  113. package/esm/LGVSyntenyDisplay/configSchemaF.d.ts +19 -10
  114. package/esm/LGVSyntenyDisplay/configSchemaF.js +12 -9
  115. package/esm/LGVSyntenyDisplay/index.d.ts +1 -1
  116. package/esm/LGVSyntenyDisplay/index.js +1 -1
  117. package/esm/LGVSyntenyDisplay/model.d.ts +122 -69
  118. package/esm/LGVSyntenyDisplay/model.js +4 -31
  119. package/esm/LaunchLinearSyntenyView.d.ts +1 -1
  120. package/esm/LaunchLinearSyntenyView.js +1 -3
  121. package/esm/LinearComparativeDisplay/configSchemaF.d.ts +0 -3
  122. package/esm/LinearComparativeDisplay/configSchemaF.js +0 -6
  123. package/esm/LinearComparativeDisplay/index.d.ts +1 -1
  124. package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +12 -69
  125. package/esm/LinearComparativeDisplay/stateModelFactory.js +14 -58
  126. package/esm/LinearComparativeView/components/Header.d.ts +2 -3
  127. package/esm/LinearComparativeView/components/Header.js +56 -63
  128. package/esm/LinearComparativeView/components/HeaderSearchBoxes.d.ts +2 -3
  129. package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +5 -12
  130. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.d.ts +2 -3
  131. package/esm/LinearComparativeView/components/LinearComparativeRenderArea.js +17 -29
  132. package/esm/LinearComparativeView/components/LinearComparativeView.d.ts +2 -3
  133. package/esm/LinearComparativeView/components/LinearComparativeView.js +4 -9
  134. package/esm/LinearComparativeView/components/Rubberband.d.ts +2 -3
  135. package/esm/LinearComparativeView/components/Rubberband.js +36 -46
  136. package/esm/LinearComparativeView/components/VerticalGuide.d.ts +2 -3
  137. package/esm/LinearComparativeView/components/VerticalGuide.js +5 -6
  138. package/esm/LinearComparativeView/index.d.ts +1 -1
  139. package/esm/LinearComparativeView/model.d.ts +38 -90
  140. package/esm/LinearComparativeView/model.js +24 -101
  141. package/esm/LinearReadVsRef/LinearReadVsRef.d.ts +2 -3
  142. package/esm/LinearReadVsRef/LinearReadVsRef.js +10 -32
  143. package/esm/LinearReadVsRef/index.d.ts +1 -1
  144. package/esm/LinearReadVsRef/index.js +1 -3
  145. package/esm/LinearSyntenyDisplay/afterAttach.d.ts +1 -1
  146. package/esm/LinearSyntenyDisplay/afterAttach.js +8 -12
  147. package/esm/LinearSyntenyDisplay/components/Component.d.ts +2 -3
  148. package/esm/LinearSyntenyDisplay/components/Component.js +11 -13
  149. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.d.ts +2 -3
  150. package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +79 -100
  151. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.d.ts +3 -4
  152. package/esm/LinearSyntenyDisplay/components/SyntenyContextMenu.js +3 -3
  153. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.d.ts +1 -2
  154. package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -4
  155. package/esm/LinearSyntenyDisplay/components/util.d.ts +3 -3
  156. package/esm/LinearSyntenyDisplay/components/util.js +2 -11
  157. package/esm/LinearSyntenyDisplay/configSchemaF.d.ts +1 -12
  158. package/esm/LinearSyntenyDisplay/configSchemaF.js +0 -15
  159. package/esm/LinearSyntenyDisplay/drawSynteny.d.ts +1 -1
  160. package/esm/LinearSyntenyDisplay/drawSynteny.js +1 -23
  161. package/esm/LinearSyntenyDisplay/index.d.ts +1 -1
  162. package/esm/LinearSyntenyDisplay/index.js +1 -2
  163. package/esm/LinearSyntenyDisplay/model.d.ts +8 -102
  164. package/esm/LinearSyntenyDisplay/model.js +1 -92
  165. package/esm/LinearSyntenyView/components/ExportSvgDialog.d.ts +2 -3
  166. package/esm/LinearSyntenyView/components/ExportSvgDialog.js +35 -53
  167. package/esm/LinearSyntenyView/components/Icons.d.ts +3 -4
  168. package/esm/LinearSyntenyView/components/Icons.js +3 -5
  169. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.d.ts +8 -0
  170. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +125 -0
  171. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.d.ts +8 -0
  172. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyPreConfigured.js +37 -0
  173. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.d.ts +7 -0
  174. package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyTrackSelectorArea.js +16 -0
  175. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.d.ts +2 -3
  176. package/esm/LinearSyntenyView/components/ImportForm/LinearSyntenyImportForm.js +49 -127
  177. package/esm/LinearSyntenyView/components/ImportForm/doSubmit.d.ts +5 -0
  178. package/esm/LinearSyntenyView/components/ImportForm/doSubmit.js +40 -0
  179. package/esm/LinearSyntenyView/components/ImportForm/getAdapter.d.ts +117 -0
  180. package/esm/LinearSyntenyView/components/ImportForm/getAdapter.js +65 -0
  181. package/esm/LinearSyntenyView/components/ImportForm/util.js +1 -3
  182. package/esm/LinearSyntenyView/components/LinearSyntenyView.d.ts +2 -3
  183. package/esm/LinearSyntenyView/components/LinearSyntenyView.js +3 -3
  184. package/esm/LinearSyntenyView/index.d.ts +1 -1
  185. package/esm/LinearSyntenyView/model.d.ts +54 -58
  186. package/esm/LinearSyntenyView/model.js +44 -49
  187. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.d.ts +1 -2
  188. package/esm/LinearSyntenyView/svgcomponents/SVGBackground.js +3 -3
  189. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.d.ts +2 -3
  190. package/esm/LinearSyntenyView/svgcomponents/SVGLinearGenomeView.js +4 -9
  191. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.d.ts +1 -1
  192. package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +8 -25
  193. package/esm/LinearSyntenyView/types.d.ts +12 -0
  194. package/esm/LinearSyntenyView/types.js +1 -0
  195. package/esm/LinearSyntenyViewHelper/index.d.ts +1 -1
  196. package/esm/LinearSyntenyViewHelper/index.js +2 -2
  197. package/esm/LinearSyntenyViewHelper/stateModelFactory.d.ts +2 -14
  198. package/esm/LinearSyntenyViewHelper/stateModelFactory.js +2 -29
  199. package/esm/SyntenyFeatureDetail/LinkToSyntenyView.d.ts +5 -0
  200. package/esm/SyntenyFeatureDetail/LinkToSyntenyView.js +52 -0
  201. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +2 -11
  202. package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +6 -68
  203. package/esm/SyntenyFeatureDetail/index.d.ts +1 -1
  204. package/esm/SyntenyFeatureDetail/index.js +1 -7
  205. package/esm/SyntenyFeatureDetail/types.d.ts +9 -0
  206. package/esm/SyntenyFeatureDetail/types.js +1 -0
  207. package/esm/SyntenyTrack/configSchema.d.ts +1 -1
  208. package/esm/SyntenyTrack/configSchema.js +1 -9
  209. package/esm/SyntenyTrack/index.d.ts +1 -1
  210. package/esm/SyntenyTrack/index.js +1 -1
  211. package/esm/index.d.ts +1 -1
  212. package/esm/index.js +4 -4
  213. package/esm/util.d.ts +2 -2
  214. package/esm/util.js +1 -11
  215. package/package.json +2 -4
  216. package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
  217. package/dist/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -194
  218. package/dist/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
  219. package/dist/LinearSyntenyView/components/ImportForm/Spacer.js +0 -10
  220. package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
  221. package/dist/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -59
  222. package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
  223. package/dist/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -52
  224. package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.d.ts +0 -10
  225. package/esm/LinearSyntenyView/components/ImportForm/AddCustomTrack.js +0 -169
  226. package/esm/LinearSyntenyView/components/ImportForm/Spacer.d.ts +0 -2
  227. package/esm/LinearSyntenyView/components/ImportForm/Spacer.js +0 -4
  228. package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.d.ts +0 -10
  229. package/esm/LinearSyntenyView/components/ImportForm/TrackSelector.js +0 -34
  230. package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.d.ts +0 -14
  231. package/esm/LinearSyntenyView/components/ImportForm/TrackSelectorUtil.js +0 -23
@@ -4,19 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.renderToSvg = renderToSvg;
7
- const react_1 = __importDefault(require("react"));
8
- const material_1 = require("@mui/material");
9
- const mobx_state_tree_1 = require("mobx-state-tree");
10
- const mobx_1 = require("mobx");
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const ui_1 = require("@jbrowse/core/ui");
11
9
  const util_1 = require("@jbrowse/core/util");
12
10
  const tracks_1 = require("@jbrowse/core/util/tracks");
13
- const ui_1 = require("@jbrowse/core/ui");
14
11
  const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
15
- // locals
12
+ const material_1 = require("@mui/material");
13
+ const mobx_1 = require("mobx");
16
14
  const SVGBackground_1 = __importDefault(require("./SVGBackground"));
17
15
  const SVGLinearGenomeView_1 = __importDefault(require("./SVGLinearGenomeView"));
18
16
  const drawSynteny_1 = require("../../LinearSyntenyDisplay/drawSynteny");
19
- // render LGV to SVG
20
17
  async function renderToSvg(model, opts) {
21
18
  var _a;
22
19
  await (0, mobx_1.when)(() => model.initialized);
@@ -26,7 +23,6 @@ async function renderToSvg(model, opts) {
26
23
  const { width, views, levels } = model;
27
24
  const shift = 50;
28
25
  const offset = rulerHeight;
29
- const { createRootFn } = (0, mobx_state_tree_1.getRoot)(model);
30
26
  const heights = views.map(v => (0, plugin_linear_genome_view_1.totalHeight)(v.tracks, textHeight, trackLabels) + offset);
31
27
  const totalHeightSvg = (0, util_1.sum)(heights) + (0, util_1.sum)(levels.map(l => l.height)) + 100;
32
28
  const displayResults = await Promise.all(views.map(async (view) => ({
@@ -68,7 +64,7 @@ async function renderToSvg(model, opts) {
68
64
  const w = width + trackLabelOffset;
69
65
  const theme = (0, ui_1.createJBrowseTheme)(themeVar);
70
66
  const RenderList = [
71
- react_1.default.createElement(SVGLinearGenomeView_1.default, { rulerHeight: rulerHeight, trackLabelOffset: trackLabelOffset, shift: shift, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[0], key: views[0].id, view: views[0], fontSize: fontSize }),
67
+ (0, jsx_runtime_1.jsx)(SVGLinearGenomeView_1.default, { rulerHeight: rulerHeight, trackLabelOffset: trackLabelOffset, shift: shift, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[0], view: views[0], fontSize: fontSize }, views[0].id),
72
68
  ];
73
69
  let currOffset = heights[0] + fontSize + rulerHeight;
74
70
  for (let i = 1; i < views.length; i++) {
@@ -77,21 +73,8 @@ async function renderToSvg(model, opts) {
77
73
  const rendering = renderings[i - 1];
78
74
  const height = heights[i];
79
75
  const levelHeight = level.height || 0;
80
- RenderList.push(react_1.default.createElement("g", { key: view.id, transform: `translate(0 ${currOffset})` },
81
- levelHeight ? (react_1.default.createElement("defs", null,
82
- react_1.default.createElement("clipPath", { id: `synclip-${i}` },
83
- react_1.default.createElement("rect", { x: 0, y: 0, width: width, height: levelHeight })))) : null,
84
- react_1.default.createElement("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})` }, rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => (
85
- /* biome-ignore lint/suspicious/noArrayIndexKey: */
86
- react_1.default.createElement(util_1.ReactRendering, { key: i, rendering: r })))),
87
- react_1.default.createElement("g", { transform: `translate(0 ${levelHeight})` },
88
- react_1.default.createElement(SVGLinearGenomeView_1.default, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], key: view.id, view: view, fontSize: fontSize }))));
76
+ RenderList.push((0, jsx_runtime_1.jsxs)("g", { transform: `translate(0 ${currOffset})`, children: [levelHeight ? ((0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `synclip-${i}`, children: (0, jsx_runtime_1.jsx)("rect", { x: 0, y: 0, width: width, height: levelHeight }) }) })) : null, (0, jsx_runtime_1.jsx)("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})`, children: rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => ((0, jsx_runtime_1.jsx)(util_1.ReactRendering, { rendering: r }, i))) }), (0, jsx_runtime_1.jsx)("g", { transform: `translate(0 ${levelHeight})`, children: (0, jsx_runtime_1.jsx)(SVGLinearGenomeView_1.default, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], view: view, fontSize: fontSize }, view.id) })] }, view.id));
89
77
  currOffset += height + fontSize + rulerHeight + levelHeight;
90
78
  }
91
- // the xlink namespace is used for rendering <image> tag
92
- return (0, util_1.renderToStaticMarkup)(react_1.default.createElement(material_1.ThemeProvider, { theme: theme },
93
- react_1.default.createElement(Wrapper, null,
94
- react_1.default.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() },
95
- react_1.default.createElement(SVGBackground_1.default, { width: w, height: totalHeightSvg, shift: shift }),
96
- RenderList))), createRootFn);
79
+ return (0, util_1.renderToStaticMarkup)((0, jsx_runtime_1.jsx)(material_1.ThemeProvider, { theme: theme, children: (0, jsx_runtime_1.jsx)(Wrapper, { children: (0, jsx_runtime_1.jsxs)("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(), children: [(0, jsx_runtime_1.jsx)(SVGBackground_1.default, { width: w, height: totalHeightSvg, shift: shift }), RenderList] }) }) }));
97
80
  }
@@ -0,0 +1,12 @@
1
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { SnapshotIn } from 'mobx-state-tree';
3
+ export type Conf = SnapshotIn<AnyConfigurationModel>;
4
+ export type ImportFormSyntenyTrack = {
5
+ type: 'preConfigured';
6
+ value: string;
7
+ } | {
8
+ type: 'userOpened';
9
+ value: Conf;
10
+ } | {
11
+ type: 'none';
12
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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;
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = LinearSyntenyViewF;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const ViewType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/ViewType"));
9
9
  const stateModelFactory_1 = require("./stateModelFactory");
10
10
  function UnusedComponent() {
11
- return react_1.default.createElement("div", null);
11
+ return (0, jsx_runtime_1.jsx)("div", {});
12
12
  }
13
13
  function LinearSyntenyViewF(pluginManager) {
14
14
  pluginManager.addViewType(() => {
@@ -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,44 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.linearSyntenyViewHelperModelFactory = linearSyntenyViewHelperModelFactory;
4
- const mobx_state_tree_1 = require("mobx-state-tree");
5
- const mobx_1 = require("mobx");
6
4
  const mst_1 = require("@jbrowse/core/util/types/mst");
5
+ const mobx_1 = require("mobx");
6
+ const mobx_state_tree_1 = require("mobx-state-tree");
7
7
  function linearSyntenyViewHelperModelFactory(pluginManager) {
8
8
  return mobx_state_tree_1.types
9
9
  .model('LinearSyntenyViewHelper', {
10
- /**
11
- * #property
12
- */
13
10
  id: mst_1.ElementId,
14
- /**
15
- * #property
16
- */
17
11
  type: 'LinearSyntenyViewHelper',
18
- /**
19
- * #property
20
- */
21
12
  tracks: mobx_state_tree_1.types.array(pluginManager.pluggableMstType('track', 'stateModel')),
22
- /**
23
- * #property
24
- */
25
13
  height: 100,
26
- /**
27
- * #property
28
- */
29
14
  level: mobx_state_tree_1.types.number,
30
15
  })
31
16
  .actions(self => ({
32
- /**
33
- * #action
34
- */
35
17
  setHeight(n) {
36
18
  self.height = n;
37
19
  return self.height;
38
20
  },
39
- /**
40
- * #action
41
- */
42
21
  showTrack(trackId, initialSnapshot = {}) {
43
22
  const schema = pluginManager.pluggableConfigSchemaType('track');
44
23
  const configuration = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), trackId);
@@ -67,9 +46,6 @@ function linearSyntenyViewHelperModelFactory(pluginManager) {
67
46
  ],
68
47
  }));
69
48
  },
70
- /**
71
- * #action
72
- */
73
49
  hideTrack(trackId) {
74
50
  const schema = pluginManager.pluggableConfigSchemaType('track');
75
51
  const config = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), trackId);
@@ -81,9 +57,6 @@ function linearSyntenyViewHelperModelFactory(pluginManager) {
81
57
  });
82
58
  return shownTracks.length;
83
59
  },
84
- /**
85
- * #action
86
- */
87
60
  toggleTrack(trackId) {
88
61
  const hiddenCount = this.hideTrack(trackId);
89
62
  if (!hiddenCount) {
@@ -0,0 +1,5 @@
1
+ import type { SyntenyFeatureDetailModel } from './types';
2
+ declare const LinkToSyntenyView: ({ model, }: {
3
+ model: SyntenyFeatureDetailModel;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default LinkToSyntenyView;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const jsx_runtime_1 = require("react/jsx-runtime");
37
+ const react_1 = require("react");
38
+ const util_1 = require("@jbrowse/core/util");
39
+ const material_1 = require("@mui/material");
40
+ const mobx_react_1 = require("mobx-react");
41
+ const LaunchSyntenyViewDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../LGVSyntenyDisplay/components/LaunchSyntenyViewDialog'))));
42
+ const LinkToSyntenyView = (0, mobx_react_1.observer)(function ({ model, }) {
43
+ const { featureData, view, level, trackId } = model;
44
+ return ((0, jsx_runtime_1.jsxs)("ul", { children: [view.type === 'LinearSyntenyView' ? ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "#", onClick: event => {
45
+ var _a, _b;
46
+ event.preventDefault();
47
+ const { views } = view;
48
+ if (level !== undefined) {
49
+ (_a = views[level]) === null || _a === void 0 ? void 0 : _a.navTo(featureData);
50
+ (_b = views[level + 1]) === null || _b === void 0 ? void 0 : _b.navTo(featureData.mate);
51
+ }
52
+ else {
53
+ const f1 = featureData;
54
+ const f2 = featureData.mate;
55
+ const r1 = f1.assemblyName;
56
+ const r2 = f2.assemblyName;
57
+ const v1 = views.find(view => view.assemblyNames[0] === r1);
58
+ const v2 = views.find(view => view.assemblyNames[0] === r2);
59
+ if (!v1 || !v2) {
60
+ (0, util_1.getSession)(model).notify([
61
+ v1
62
+ ? `Unable to find ${(0, util_1.assembleLocString)(f1)} in synteny view`
63
+ : '',
64
+ v2
65
+ ? `Unable to find ${(0, util_1.assembleLocString)(f2)} in synteny view`
66
+ : '',
67
+ ].join(' ... '));
68
+ }
69
+ v1 === null || v1 === void 0 ? void 0 : v1.navTo(f1);
70
+ v2 === null || v2 === void 0 ? void 0 : v2.navTo(f2);
71
+ }
72
+ }, children: "Center view on this feature" }) })) : null, (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "#", onClick: event => {
73
+ event.preventDefault();
74
+ const feature = new util_1.SimpleFeature(featureData);
75
+ const session = (0, util_1.getSession)(model);
76
+ session.queueDialog(handleClose => [
77
+ LaunchSyntenyViewDialog,
78
+ {
79
+ session,
80
+ feature,
81
+ trackId,
82
+ handleClose,
83
+ },
84
+ ]);
85
+ }, children: "Launch new linear synteny view on this feature" }) })] }));
86
+ });
87
+ exports.default = LinkToSyntenyView;
@@ -1,14 +1,5 @@
1
- import React from 'react';
2
- import { SimpleFeatureSerialized } from '@jbrowse/core/util';
3
- interface SyntenyFeatureDetailModel {
4
- trackId: string;
5
- featureData: SimpleFeatureSerialized;
6
- level?: number;
7
- view: {
8
- type: string;
9
- };
10
- }
1
+ import type { SyntenyFeatureDetailModel } from './types';
11
2
  declare const SyntenyFeatureDetail: ({ model, }: {
12
3
  model: SyntenyFeatureDetailModel;
13
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
14
5
  export default SyntenyFeatureDetail;
@@ -1,100 +1,15 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const BaseFeatureDetail_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail"));
8
+ const BaseCard_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard"));
30
9
  const material_1 = require("@mui/material");
31
10
  const mobx_react_1 = require("mobx-react");
32
- // locals
33
- const BaseCard_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard"));
34
- const BaseFeatureDetail_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail"));
35
- const util_1 = require("@jbrowse/core/util");
36
- // lazies
37
- const LaunchSyntenyViewDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../LGVSyntenyDisplay/components/LaunchSyntenyViewDialog'))));
38
- const CustomLinker = (0, mobx_react_1.observer)(function ({ model, }) {
39
- const { featureData, view, level, trackId } = model;
40
- return (react_1.default.createElement("ul", null,
41
- view.type === 'LinearSyntenyView' ? (react_1.default.createElement("li", null,
42
- react_1.default.createElement(material_1.Link, { href: "#", onClick: event => {
43
- var _a, _b;
44
- event.preventDefault();
45
- const { views } = view;
46
- if (level !== undefined) {
47
- // level is "pre-known", and stored in the SyntenyFeatureWidget
48
- // model state e.g. when clicking on a feature from a
49
- // LinearSyntenyRendering
50
- (_a = views[level]) === null || _a === void 0 ? void 0 : _a.navTo(featureData);
51
- (_b = views[level + 1]) === null || _b === void 0 ? void 0 : _b.navTo(featureData.mate);
52
- }
53
- else {
54
- // best effort to find the right level. this is triggered for
55
- // example if a user clicks on a feature in a LGVSyntenyDisplay
56
- // in an existing LinearSyntenyView, there is no real proper
57
- // level "pre-known" to this situation
58
- const f1 = featureData;
59
- const f2 = featureData.mate;
60
- const r1 = f1.assemblyName;
61
- const r2 = f2.assemblyName;
62
- const v1 = views.find(view => view.assemblyNames[0] === r1);
63
- const v2 = views.find(view => view.assemblyNames[0] === r2);
64
- if (!v1 || !v2) {
65
- (0, util_1.getSession)(model).notify([
66
- v1
67
- ? `Unable to find ${(0, util_1.assembleLocString)(f1)} in synteny view`
68
- : '',
69
- v2
70
- ? `Unable to find ${(0, util_1.assembleLocString)(f2)} in synteny view`
71
- : '',
72
- ].join(' ... '));
73
- }
74
- v1 === null || v1 === void 0 ? void 0 : v1.navTo(f1);
75
- v2 === null || v2 === void 0 ? void 0 : v2.navTo(f2);
76
- }
77
- } }, "Center view on this feature"))) : null,
78
- react_1.default.createElement("li", null,
79
- react_1.default.createElement(material_1.Link, { href: "#", onClick: event => {
80
- event.preventDefault();
81
- const session = (0, util_1.getSession)(model);
82
- const feature = new util_1.SimpleFeature(featureData);
83
- session.queueDialog(handleClose => [
84
- LaunchSyntenyViewDialog,
85
- {
86
- model,
87
- feature,
88
- trackId,
89
- handleClose,
90
- },
91
- ]);
92
- } }, "Launch new linear synteny view on this feature"))));
93
- });
11
+ const LinkToSyntenyView_1 = __importDefault(require("./LinkToSyntenyView"));
94
12
  const SyntenyFeatureDetail = (0, mobx_react_1.observer)(function ({ model, }) {
95
- return (react_1.default.createElement(material_1.Paper, { "data-testid": "alignment-side-drawer" },
96
- react_1.default.createElement(BaseFeatureDetail_1.default, { title: "Feature", model: model }),
97
- react_1.default.createElement(BaseCard_1.default, { title: "Link to view" },
98
- react_1.default.createElement(CustomLinker, { model: model }))));
13
+ return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { children: [(0, jsx_runtime_1.jsx)(BaseFeatureDetail_1.default, { title: "Feature", model: model }), (0, jsx_runtime_1.jsx)(BaseCard_1.default, { title: "Link to view", children: (0, jsx_runtime_1.jsx)(LinkToSyntenyView_1.default, { model: model }) })] }));
99
14
  });
100
15
  exports.default = SyntenyFeatureDetail;
@@ -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;
@@ -15,33 +15,37 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.default = SyntenyFeatureWidgetF;
30
40
  const react_1 = require("react");
41
+ const BaseFeatureWidget_1 = require("@jbrowse/core/BaseFeatureWidget");
31
42
  const configuration_1 = require("@jbrowse/core/configuration");
32
43
  const WidgetType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/WidgetType"));
33
44
  const mobx_state_tree_1 = require("mobx-state-tree");
34
- const BaseFeatureWidget_1 = require("@jbrowse/core/BaseFeatureWidget");
35
45
  const configSchema = (0, configuration_1.ConfigurationSchema)('SyntenyFeatureWidget', {});
36
46
  function stateModelF(pluginManager) {
37
47
  return mobx_state_tree_1.types.compose((0, BaseFeatureWidget_1.stateModelFactory)(pluginManager), mobx_state_tree_1.types.model('SyntenyFeatureWidget', {
38
- /**
39
- * #property
40
- */
41
48
  type: mobx_state_tree_1.types.literal('SyntenyFeatureWidget'),
42
- /**
43
- * #property
44
- */
45
49
  level: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
46
50
  }));
47
51
  }
@@ -0,0 +1,9 @@
1
+ import type { SimpleFeatureSerialized } from '@jbrowse/core/util';
2
+ export interface SyntenyFeatureDetailModel {
3
+ trackId: string;
4
+ featureData: SimpleFeatureSerialized;
5
+ level?: number;
6
+ view: {
7
+ type: string;
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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;
@@ -2,16 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
4
  const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
5
- /**
6
- * #config SyntenyTrack
7
- * extends
8
- * - [BaseTrack](../basetrack)
9
- */
10
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
5
+ function x() { }
11
6
  const configSchema = (pluginManager) => (0, configuration_1.ConfigurationSchema)('SyntenyTrack', {}, {
12
- /**
13
- * #baseConfiguration
14
- */
15
7
  baseConfiguration: (0, models_1.createBaseTrackConfig)(pluginManager),
16
8
  });
17
9
  exports.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;
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = registerSyntenyTrack;
7
- const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
8
7
  const TrackType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/TrackType"));
8
+ const models_1 = require("@jbrowse/core/pluggableElementTypes/models");
9
9
  const configSchema_1 = __importDefault(require("./configSchema"));
10
10
  function registerSyntenyTrack(pluginManager) {
11
11
  pluginManager.addTrackType(() => {
package/dist/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/dist/index.js CHANGED
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
7
7
  const util_1 = require("@jbrowse/core/util");
8
8
  const CalendarViewDay_1 = __importDefault(require("@mui/icons-material/CalendarViewDay"));
9
+ const LGVSyntenyDisplay_1 = __importDefault(require("./LGVSyntenyDisplay"));
10
+ const LaunchLinearSyntenyView_1 = __importDefault(require("./LaunchLinearSyntenyView"));
9
11
  const LinearComparativeDisplay_1 = __importDefault(require("./LinearComparativeDisplay"));
10
12
  const LinearComparativeView_1 = __importDefault(require("./LinearComparativeView"));
13
+ const LinearReadVsRef_1 = __importDefault(require("./LinearReadVsRef"));
11
14
  const LinearSyntenyDisplay_1 = __importDefault(require("./LinearSyntenyDisplay"));
12
- const LGVSyntenyDisplay_1 = __importDefault(require("./LGVSyntenyDisplay"));
13
15
  const LinearSyntenyView_1 = __importDefault(require("./LinearSyntenyView"));
14
16
  const LinearSyntenyViewHelper_1 = __importDefault(require("./LinearSyntenyViewHelper"));
15
- const LaunchLinearSyntenyView_1 = __importDefault(require("./LaunchLinearSyntenyView"));
16
- const SyntenyTrack_1 = __importDefault(require("./SyntenyTrack"));
17
- const LinearReadVsRef_1 = __importDefault(require("./LinearReadVsRef"));
18
17
  const SyntenyFeatureDetail_1 = __importDefault(require("./SyntenyFeatureDetail"));
18
+ const SyntenyTrack_1 = __importDefault(require("./SyntenyTrack"));
19
19
  class LinearComparativeViewPlugin extends Plugin_1.default {
20
20
  constructor() {
21
21
  super(...arguments);
package/dist/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/dist/util.js CHANGED
@@ -26,18 +26,14 @@ function getTrackPos(view, trackConfigId) {
26
26
  const idx = view.tracks.findIndex(t => t.configuration === trackConfigId);
27
27
  let accum = 0;
28
28
  for (let i = 0; i < idx; i += 1) {
29
- accum += view.tracks[i].height + 3; // +1px for trackresizehandle
29
+ accum += view.tracks[i].height + 3;
30
30
  }
31
31
  return accum;
32
32
  }
33
- // Uses bpToPx to get the screen pixel coordinates but ignores some conditions
34
- // where bpToPx could return undefined
35
33
  function getPxFromCoordinate(view, refName, coord) {
36
34
  var _a;
37
35
  return (((_a = bpToPx(view, { refName, coord })) === null || _a === void 0 ? void 0 : _a.offsetPx) || 0) - view.offsetPx;
38
36
  }
39
- // Retrieves the y-position of a layout record in a track
40
- // If track not found returns 0
41
37
  function overlayYPos(trackConfigId, level, views, c, cond) {
42
38
  const track = views[level].tracks.find(t => t.configuration === trackConfigId);
43
39
  const ypos = track
@@ -47,11 +43,6 @@ function overlayYPos(trackConfigId, level, views, c, cond) {
47
43
  : 0;
48
44
  return ypos + (cond ? cheight(c) : 0);
49
45
  }
50
- // Returns the pixel screen position of a refName:coord input, or undefined if
51
- // the input could not be located. Uses view.displayedRegions as a representation
52
- // of what is on the screen
53
- //
54
- // Note: does not consider that this refName:coord input could multi-match
55
46
  function bpToPx(view, { refName, coord }) {
56
47
  let offsetBp = 0;
57
48
  const index = view.displayedRegions.findIndex(r => {
@@ -71,7 +62,6 @@ function bpToPx(view, { refName, coord }) {
71
62
  }
72
63
  return undefined;
73
64
  }
74
- // Returns either 0 or height depending on condition
75
65
  function interstitialYPos(cond, height) {
76
66
  return cond ? 0 : height;
77
67
  }
@@ -1,8 +1,9 @@
1
- import React from 'react';
2
- import { Feature } from '@jbrowse/core/util';
3
- export default function LaunchSyntenyViewDialog({ model, feature, trackId, handleClose, }: {
4
- model: unknown;
1
+ import type { AbstractSessionModel, Feature } from '@jbrowse/core/util';
2
+ import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view';
3
+ export default function LaunchSyntenyViewDialog({ session, view, feature, trackId, handleClose, }: {
4
+ session: AbstractSessionModel;
5
+ view?: LinearGenomeViewModel;
5
6
  feature: Feature;
6
7
  trackId: string;
7
8
  handleClose: () => void;
8
- }): React.JSX.Element;
9
+ }): import("react/jsx-runtime").JSX.Element;