@jbrowse/plugin-dotplot-view 2.13.1 → 2.15.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 (57) hide show
  1. package/dist/ComparativeRenderer/index.d.ts +2 -2
  2. package/dist/DotplotDisplay/index.js +0 -1
  3. package/dist/DotplotDisplay/stateModelFactory.d.ts +3 -5
  4. package/dist/DotplotDisplay/stateModelFactory.js +0 -1
  5. package/dist/DotplotReadVsRef/index.js +3 -1
  6. package/dist/DotplotRenderer/ComparativeRenderRpc.d.ts +2 -2
  7. package/dist/DotplotRenderer/DotplotRenderer.d.ts +1 -0
  8. package/dist/DotplotRenderer/DotplotRenderer.js +4 -3
  9. package/dist/DotplotView/1dview.js +0 -2
  10. package/dist/DotplotView/components/Axes.js +1 -1
  11. package/dist/DotplotView/components/DotplotControls.js +30 -10
  12. package/dist/DotplotView/components/DotplotTooltip.js +2 -2
  13. package/dist/DotplotView/components/DotplotView.js +15 -27
  14. package/dist/DotplotView/components/DotplotWarnings.js +9 -3
  15. package/dist/DotplotView/components/ExportSvgDialog.js +13 -5
  16. package/dist/DotplotView/components/Grid.js +2 -2
  17. package/dist/DotplotView/components/ImportForm/ImportCustomTrack.js +14 -4
  18. package/dist/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +3 -1
  19. package/dist/DotplotView/components/ImportForm/index.js +9 -3
  20. package/dist/DotplotView/components/WarningDialog.js +4 -3
  21. package/dist/DotplotView/components/util.js +4 -2
  22. package/dist/DotplotView/model.d.ts +1 -7
  23. package/dist/DotplotView/model.js +12 -13
  24. package/dist/DotplotView/svgcomponents/SVGDotplotView.js +3 -2
  25. package/dist/LaunchDotplotView.js +4 -2
  26. package/dist/ServerSideRenderedBlockContent.js +7 -3
  27. package/dist/ServerSideSyntenyRendering.d.ts +2 -2
  28. package/dist/ServerSideSyntenyRendering.js +1 -1
  29. package/esm/ComparativeRenderer/index.d.ts +2 -2
  30. package/esm/DotplotDisplay/index.js +0 -1
  31. package/esm/DotplotDisplay/stateModelFactory.d.ts +3 -5
  32. package/esm/DotplotDisplay/stateModelFactory.js +0 -1
  33. package/esm/DotplotReadVsRef/index.js +3 -1
  34. package/esm/DotplotRenderer/ComparativeRenderRpc.d.ts +2 -2
  35. package/esm/DotplotRenderer/DotplotRenderer.d.ts +1 -0
  36. package/esm/DotplotRenderer/DotplotRenderer.js +4 -3
  37. package/esm/DotplotView/1dview.js +0 -2
  38. package/esm/DotplotView/components/Axes.js +1 -1
  39. package/esm/DotplotView/components/DotplotControls.js +30 -10
  40. package/esm/DotplotView/components/DotplotTooltip.js +2 -2
  41. package/esm/DotplotView/components/DotplotView.js +15 -27
  42. package/esm/DotplotView/components/DotplotWarnings.js +9 -3
  43. package/esm/DotplotView/components/ExportSvgDialog.js +13 -5
  44. package/esm/DotplotView/components/Grid.js +2 -2
  45. package/esm/DotplotView/components/ImportForm/ImportCustomTrack.js +14 -4
  46. package/esm/DotplotView/components/ImportForm/ImportSyntenyTrackSelector.js +3 -1
  47. package/esm/DotplotView/components/ImportForm/index.js +9 -3
  48. package/esm/DotplotView/components/WarningDialog.js +4 -3
  49. package/esm/DotplotView/components/util.js +4 -2
  50. package/esm/DotplotView/model.d.ts +1 -7
  51. package/esm/DotplotView/model.js +12 -13
  52. package/esm/DotplotView/svgcomponents/SVGDotplotView.js +3 -2
  53. package/esm/LaunchDotplotView.js +4 -2
  54. package/esm/ServerSideRenderedBlockContent.js +7 -3
  55. package/esm/ServerSideSyntenyRendering.d.ts +2 -2
  56. package/esm/ServerSideSyntenyRendering.js +1 -1
  57. package/package.json +5 -5
@@ -275,15 +275,6 @@ export default function stateModelFactory(pm) {
275
275
  setError(e) {
276
276
  self.volatileError = e;
277
277
  },
278
- /**
279
- * #action
280
- * removes the view itself from the state tree entirely by calling the
281
- * parent removeView
282
- */
283
- closeView() {
284
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
285
- getParent(self, 2).removeView(self);
286
- },
287
278
  /**
288
279
  * #action
289
280
  */
@@ -342,7 +333,9 @@ export default function stateModelFactory(pm) {
342
333
  const schema = pm.pluggableConfigSchemaType('track');
343
334
  const conf = resolveIdentifier(schema, getRoot(self), trackId);
344
335
  const t = self.tracks.filter(t => t.configuration === conf);
345
- transaction(() => t.forEach(t => self.tracks.remove(t)));
336
+ transaction(() => {
337
+ t.forEach(t => self.tracks.remove(t));
338
+ });
346
339
  return t.length;
347
340
  },
348
341
  /**
@@ -589,15 +582,21 @@ export default function stateModelFactory(pm) {
589
582
  },
590
583
  {
591
584
  label: 'Square view - same bp per pixel',
592
- onClick: () => self.squareView(),
585
+ onClick: () => {
586
+ self.squareView();
587
+ },
593
588
  },
594
589
  {
595
590
  label: 'Rectangular view - same total bp',
596
- onClick: () => self.squareView(),
591
+ onClick: () => {
592
+ self.squareView();
593
+ },
597
594
  },
598
595
  {
599
596
  label: 'Show all regions',
600
- onClick: () => self.showAllRegions(),
597
+ onClick: () => {
598
+ self.showAllRegions();
599
+ },
601
600
  },
602
601
  {
603
602
  label: 'Export SVG',
@@ -12,7 +12,6 @@ export async function renderToSvg(model, opts) {
12
12
  var _a;
13
13
  await when(() => model.initialized);
14
14
  const { themeName = 'default', Wrapper = ({ children }) => children } = opts;
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
15
  const { createRootFn } = getRoot(model);
17
16
  const session = getSession(model);
18
17
  const theme = (_a = session.allThemes) === null || _a === void 0 ? void 0 : _a.call(session)[themeName];
@@ -35,7 +34,9 @@ export async function renderToSvg(model, opts) {
35
34
  React.createElement("defs", null,
36
35
  React.createElement("clipPath", { id: "clip-ruler" },
37
36
  React.createElement("rect", { x: 0, y: 0, width: viewWidth, height: viewHeight }))),
38
- React.createElement("g", { clipPath: "url(#clip-ruler)" }, displayResults.map(({ result }, i) => (React.createElement("g", { key: i }, result))))),
37
+ React.createElement("g", { clipPath: "url(#clip-ruler)" }, displayResults.map(({ result }, i) => (
38
+ /* biome-ignore lint/suspicious/noArrayIndexKey: */
39
+ React.createElement("g", { key: i }, result))))),
39
40
  React.createElement("g", { transform: `translate(${borderX} ${viewHeight})` },
40
41
  React.createElement(HorizontalAxisRaw, { model: model }))))), createRootFn);
41
42
  }
@@ -15,7 +15,9 @@ export default function LaunchDotplotView(pluginManager) {
15
15
  });
16
16
  // http://localhost:3000/?config=test_data%2Fvolvox%2Fconfig.json&session=spec-{"views":[{"type":"DotplotView","views":[{"assembly":"volvox"},{"assembly":"volvox"}],"tracks":["volvox_fake_synteny"]}]}
17
17
  const idsNotFound = [];
18
- tracks.forEach(track => tryTrack(model, track, idsNotFound));
18
+ tracks.forEach(track => {
19
+ tryTrack(model, track, idsNotFound);
20
+ });
19
21
  if (idsNotFound.length) {
20
22
  throw new Error(`Could not resolve identifiers: ${idsNotFound.join(',')}`);
21
23
  }
@@ -31,7 +33,7 @@ function tryTrack(model, trackId, idsNotFound) {
31
33
  model.showTrack(trackId);
32
34
  }
33
35
  catch (e) {
34
- if (`${e}`.match('Could not resolve identifier')) {
36
+ if (/Could not resolve identifier/.exec(`${e}`)) {
35
37
  idsNotFound.push(trackId);
36
38
  }
37
39
  else {
@@ -28,8 +28,12 @@ function LoadingMessage() {
28
28
  const [shown, setShown] = useState(false);
29
29
  const { classes } = useStyles();
30
30
  useEffect(() => {
31
- const timeout = setTimeout(() => setShown(true), 300);
32
- return () => clearTimeout(timeout);
31
+ const timeout = setTimeout(() => {
32
+ setShown(true);
33
+ }, 300);
34
+ return () => {
35
+ clearTimeout(timeout);
36
+ };
33
37
  }, []);
34
38
  return shown ? (React.createElement("div", { className: classes.loading },
35
39
  React.createElement(LoadingEllipses, null))) : null;
@@ -37,7 +41,7 @@ function LoadingMessage() {
37
41
  function BlockMessage({ messageText }) {
38
42
  const { classes } = useStyles();
39
43
  return (React.createElement("div", { className: classes.blockMessage },
40
- React.createElement(Typography, null, `${messageText}`)));
44
+ React.createElement(Typography, null, messageText)));
41
45
  }
42
46
  function BlockError({ error }) {
43
47
  const { classes } = useStyles();
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  /**
3
- * A block whose content is rendered outside of the main thread and hydrated by this
4
- * component.
3
+ * A block whose content is rendered outside of the main thread and hydrated by
4
+ * this component.
5
5
  */
6
6
  interface ModelType {
7
7
  imageData: string;
@@ -14,7 +14,7 @@ const ServerSideSyntenyRendering = observer(function ({ model, }) {
14
14
  const context = canvas.getContext('2d');
15
15
  drawImageOntoCanvasContext(imageData, context);
16
16
  setDone(true);
17
- }, [height, imageData, width]);
17
+ }, [imageData]);
18
18
  return (React.createElement("canvas", { "data-testid": `prerendered_canvas${done ? '_done' : ''}`, ref: featureCanvas, width: width * highResolutionScaling, height: height * highResolutionScaling, style: { width, height, ...style } }));
19
19
  });
20
20
  export default ServerSideSyntenyRendering;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-dotplot-view",
3
- "version": "2.13.1",
3
+ "version": "2.15.0",
4
4
  "description": "JBrowse 2 dotplot view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "scripts": {
26
26
  "build": "npm-run-all build:*",
27
- "test": "cd ../..; jest plugins/dotplot-view",
27
+ "test": "cd ../..; jest --passWithNoTests plugins/dotplot-view",
28
28
  "prepublishOnly": "yarn test",
29
29
  "prepack": "yarn build && yarn useDist",
30
30
  "postpack": "yarn useSrc",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@floating-ui/react": "^0.26.3",
40
- "@mui/icons-material": "^5.0.1",
40
+ "@mui/icons-material": "^6.0.0",
41
41
  "@mui/x-data-grid": "^7.0.0",
42
42
  "@types/file-saver": "^2.0.1",
43
43
  "clone": "^2.1.2",
@@ -46,7 +46,7 @@
46
46
  "peerDependencies": {
47
47
  "@jbrowse/core": "^2.0.0",
48
48
  "@jbrowse/plugin-alignments": "^2.0.0",
49
- "@mui/material": "^5.0.0",
49
+ "@mui/material": "^6.0.0",
50
50
  "mobx": "^6.0.0",
51
51
  "mobx-react": "^9.0.0",
52
52
  "mobx-state-tree": "^5.0.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "fcebca71cc1d066654603e1a9accfa6c6d4f764d"
64
+ "gitHead": "87eeb1fbf8311dbf88d5e75b5a265f03beffdda8"
65
65
  }