@jbrowse/plugin-linear-comparative-view 4.1.3 → 4.1.4

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.
@@ -1,18 +1,18 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
- declare function configSchemaF(pluginManager: PluginManager): import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
2
+ declare function configSchemaF(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
3
3
  mouseover: {
4
4
  type: string;
5
5
  defaultValue: string;
6
6
  };
7
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
7
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
8
8
  defaultRendering: {
9
9
  type: string;
10
10
  model: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
11
11
  defaultValue: string;
12
12
  };
13
- renderers: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
13
+ renderers: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
14
14
  PileupRenderer: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
15
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
15
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
16
16
  maxFeatureScreenDensity: {
17
17
  type: string;
18
18
  description: string;
@@ -33,9 +33,9 @@ declare function configSchemaF(pluginManager: PluginManager): import("node_modul
33
33
  flagExclude: number;
34
34
  };
35
35
  };
36
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
36
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
37
37
  renderer: import("@jbrowse/mobx-state-tree").IAnyModelType;
38
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
38
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
39
39
  maxFeatureScreenDensity: {
40
40
  type: string;
41
41
  description: string;
@@ -62,5 +62,5 @@ declare function configSchemaF(pluginManager: PluginManager): import("node_modul
62
62
  description: string;
63
63
  defaultValue: never[];
64
64
  };
65
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>, undefined>>;
65
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>, undefined>>, undefined>>;
66
66
  export default configSchemaF;
@@ -34,6 +34,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
34
34
  statusMessage?: string;
35
35
  reactElement?: React.ReactElement;
36
36
  isRenderingPending?: boolean;
37
+ displayHeight?: number;
37
38
  };
38
39
  }) => import("react/jsx-runtime").JSX.Element;
39
40
  renderProps: any;
@@ -52,10 +53,11 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
52
53
  beforeDestroy(): void;
53
54
  } & {
54
55
  readonly statusMessage: any;
56
+ readonly displayHeight: number | undefined;
55
57
  } & {
56
58
  afterAttach(): void;
57
59
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
58
- configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
60
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
59
61
  maxFeatureScreenDensity: {
60
62
  type: string;
61
63
  description: string;
@@ -82,7 +84,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
82
84
  description: string;
83
85
  defaultValue: never[];
84
86
  };
85
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
87
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
86
88
  showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
87
89
  showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
88
90
  } & {
@@ -388,6 +390,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
388
390
  statusMessage?: string;
389
391
  reactElement?: React.ReactElement;
390
392
  isRenderingPending?: boolean;
393
+ displayHeight?: number;
391
394
  };
392
395
  }) => import("react/jsx-runtime").JSX.Element;
393
396
  renderProps: any;
@@ -406,6 +409,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
406
409
  beforeDestroy(): void;
407
410
  } & {
408
411
  readonly statusMessage: any;
412
+ readonly displayHeight: number | undefined;
409
413
  } & {
410
414
  afterAttach(): void;
411
415
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -432,6 +436,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
432
436
  statusMessage?: string;
433
437
  reactElement?: React.ReactElement;
434
438
  isRenderingPending?: boolean;
439
+ displayHeight?: number;
435
440
  };
436
441
  }) => import("react/jsx-runtime").JSX.Element;
437
442
  renderProps: any;
@@ -450,6 +455,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
450
455
  beforeDestroy(): void;
451
456
  } & {
452
457
  readonly statusMessage: any;
458
+ readonly displayHeight: number | undefined;
453
459
  } & {
454
460
  afterAttach(): void;
455
461
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>>;
@@ -463,7 +469,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
463
469
  [x: string]: any;
464
470
  } & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & any & import("@jbrowse/mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
465
471
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
466
- } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
472
+ } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
467
473
  maxFeatureScreenDensity: {
468
474
  type: string;
469
475
  description: string;
@@ -490,7 +496,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
490
496
  description: string;
491
497
  defaultValue: never[];
492
498
  };
493
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>>;
499
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>>;
494
500
  showLegend: boolean | undefined;
495
501
  showTooltips: boolean | undefined;
496
502
  } & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
@@ -780,6 +786,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
780
786
  statusMessage?: string;
781
787
  reactElement?: React.ReactElement;
782
788
  isRenderingPending?: boolean;
789
+ displayHeight?: number;
783
790
  };
784
791
  }) => import("react/jsx-runtime").JSX.Element;
785
792
  renderProps: any;
@@ -798,10 +805,11 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
798
805
  beforeDestroy(): void;
799
806
  } & {
800
807
  readonly statusMessage: any;
808
+ readonly displayHeight: number | undefined;
801
809
  } & {
802
810
  afterAttach(): void;
803
811
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
804
- configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
812
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
805
813
  maxFeatureScreenDensity: {
806
814
  type: string;
807
815
  description: string;
@@ -828,7 +836,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
828
836
  description: string;
829
837
  defaultValue: never[];
830
838
  };
831
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
839
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
832
840
  showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
833
841
  showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
834
842
  }, {
@@ -1389,6 +1397,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
1389
1397
  statusMessage?: string;
1390
1398
  reactElement?: React.ReactElement;
1391
1399
  isRenderingPending?: boolean;
1400
+ displayHeight?: number;
1392
1401
  };
1393
1402
  }) => import("react/jsx-runtime").JSX.Element;
1394
1403
  renderProps: any;
@@ -1407,10 +1416,11 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
1407
1416
  beforeDestroy(): void;
1408
1417
  } & {
1409
1418
  readonly statusMessage: any;
1419
+ readonly displayHeight: number | undefined;
1410
1420
  } & {
1411
1421
  afterAttach(): void;
1412
1422
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
1413
- configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
1423
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
1414
1424
  maxFeatureScreenDensity: {
1415
1425
  type: string;
1416
1426
  description: string;
@@ -1437,7 +1447,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
1437
1447
  description: string;
1438
1448
  defaultValue: never[];
1439
1449
  };
1440
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>;
1450
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
1441
1451
  showLegend: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
1442
1452
  showTooltips: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>;
1443
1453
  } & {
@@ -1,2 +1,2 @@
1
- declare function configSchemaFactory(_pluginManager: any): import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
1
+ declare function configSchemaFactory(_pluginManager: any): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
2
2
  export default configSchemaFactory;
@@ -93,6 +93,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("@jbrow
93
93
  readonly trackHeightsWithResizeHandles: number;
94
94
  readonly height: number;
95
95
  readonly totalBp: number;
96
+ getNonElidedRegionCount(bpPerPx: number): number;
97
+ getInterRegionPaddingPx(bpPerPx: number): number;
96
98
  readonly maxBpPerPx: number;
97
99
  readonly minBpPerPx: number;
98
100
  readonly error: unknown;
@@ -151,7 +153,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("@jbrow
151
153
  end: number;
152
154
  }[];
153
155
  horizontalScroll(distance: number): number;
154
- center(): void;
155
156
  showAllRegions(): void;
156
157
  showAllRegionsInAssembly(assemblyName?: string): void;
157
158
  setDraggingTrackId(idx?: string): void;
@@ -416,6 +417,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("@jbrow
416
417
  readonly trackHeightsWithResizeHandles: number;
417
418
  readonly height: number;
418
419
  readonly totalBp: number;
420
+ getNonElidedRegionCount(bpPerPx: number): number;
421
+ getInterRegionPaddingPx(bpPerPx: number): number;
419
422
  readonly maxBpPerPx: number;
420
423
  readonly minBpPerPx: number;
421
424
  readonly error: unknown;
@@ -474,7 +477,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("@jbrow
474
477
  end: number;
475
478
  }[];
476
479
  horizontalScroll(distance: number): number;
477
- center(): void;
478
480
  showAllRegions(): void;
479
481
  showAllRegionsInAssembly(assemblyName?: string): void;
480
482
  setDraggingTrackId(idx?: string): void;
@@ -696,6 +698,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("@jbrow
696
698
  readonly trackHeightsWithResizeHandles: number;
697
699
  readonly height: number;
698
700
  readonly totalBp: number;
701
+ getNonElidedRegionCount(bpPerPx: number): number;
702
+ getInterRegionPaddingPx(bpPerPx: number): number;
699
703
  readonly maxBpPerPx: number;
700
704
  readonly minBpPerPx: number;
701
705
  readonly error: unknown;
@@ -754,7 +758,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("@jbrow
754
758
  end: number;
755
759
  }[];
756
760
  horizontalScroll(distance: number): number;
757
- center(): void;
758
761
  showAllRegions(): void;
759
762
  showAllRegionsInAssembly(assemblyName?: string): void;
760
763
  setDraggingTrackId(idx?: string): void;
@@ -1,5 +1,5 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
- declare function configSchemaFactory(pluginManager: PluginManager): import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
2
+ declare function configSchemaFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
3
3
  trackIds: {
4
4
  type: string;
5
5
  defaultValue: never[];
@@ -8,5 +8,5 @@ declare function configSchemaFactory(pluginManager: PluginManager): import("node
8
8
  type: string;
9
9
  defaultValue: boolean;
10
10
  };
11
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
11
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>, undefined>>;
12
12
  export default configSchemaFactory;
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
4
4
  import { getSession, useLocalStorage } from '@jbrowse/core/util';
5
- import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, Typography, } from '@mui/material';
5
+ import { Button, Checkbox, CircularProgress, DialogActions, DialogContent, FormControlLabel, MenuItem, TextField, ToggleButton, ToggleButtonGroup, Typography, } from '@mui/material';
6
6
  import TextField2 from "./TextField2.js";
7
- function LoadingMessage() {
8
- return (_jsxs("div", { children: [_jsx(CircularProgress, { size: 20, style: { marginRight: 20 } }), _jsx(Typography, { display: "inline", children: "Creating SVG" })] }));
7
+ function LoadingMessage({ format }) {
8
+ return (_jsxs("div", { children: [_jsx(CircularProgress, { size: 20, style: { marginRight: 20 } }), _jsxs(Typography, { display: "inline", children: ["Creating ", format.toUpperCase()] })] }));
9
9
  }
10
10
  function useSvgLocal(key, val) {
11
11
  return useLocalStorage(`svg-${key}`, val);
@@ -16,13 +16,24 @@ export default function ExportSvgDialog({ model, handleClose, }) {
16
16
  const [rasterizeLayers, setRasterizeLayers] = useState(offscreenCanvas);
17
17
  const [showGridlines, setShowGridlines] = useSvgLocal('gridlines', false);
18
18
  const [loading, setLoading] = useState(false);
19
+ const [format, setFormat] = useSvgLocal('format', 'svg');
19
20
  const [filename, setFilename] = useSvgLocal('file', 'jbrowse.svg');
20
21
  const [trackLabels, setTrackLabels] = useSvgLocal('tracklabels', 'offset');
21
22
  const [themeName, setThemeName] = useSvgLocal('theme', session.themeName || 'default');
22
23
  const [error, setError] = useState();
23
- return (_jsxs(Dialog, { open: true, onClose: handleClose, title: "Export SVG", children: [_jsxs(DialogContent, { children: [error ? (_jsx(ErrorMessage, { error: error })) : loading ? (_jsx(LoadingMessage, {})) : null, _jsx(TextField2, { helperText: "filename", value: filename, onChange: event => {
24
- setFilename(event.target.value);
25
- } }), _jsxs(TextField2, { select: true, label: "Track label positioning", variant: "outlined", value: trackLabels, style: { width: 150 }, onChange: event => {
24
+ return (_jsxs(Dialog, { open: true, onClose: handleClose, title: "Export image", children: [_jsxs(DialogContent, { children: [error ? (_jsx(ErrorMessage, { error: error })) : loading ? (_jsx(LoadingMessage, { format: format })) : null, _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [_jsx(TextField, { helperText: "filename", value: filename, onChange: event => {
25
+ setFilename(event.target.value);
26
+ } }), _jsxs(ToggleButtonGroup, { value: format, exclusive: true, onChange: (_event, value) => {
27
+ if (value) {
28
+ setFormat(value);
29
+ if (filename.endsWith('.svg') && value === 'png') {
30
+ setFilename(filename.replace(/\.svg$/, '.png'));
31
+ }
32
+ else if (filename.endsWith('.png') && value === 'svg') {
33
+ setFilename(filename.replace(/\.png$/, '.svg'));
34
+ }
35
+ }
36
+ }, size: "small", children: [_jsx(ToggleButton, { value: "svg", children: "SVG" }), _jsx(ToggleButton, { value: "png", children: "PNG" })] })] }), _jsxs(TextField2, { select: true, label: "Track label positioning", variant: "outlined", value: trackLabels, style: { width: 150 }, onChange: event => {
26
37
  setTrackLabels(event.target.value);
27
38
  }, children: [_jsx(MenuItem, { value: "offset", children: "Offset" }), _jsx(MenuItem, { value: "overlay", children: "Overlay" }), _jsx(MenuItem, { value: "left", children: "Left" }), _jsx(MenuItem, { value: "none", children: "None" })] }), _jsx("br", {}), session.allThemes ? (_jsx(TextField2, { select: true, label: "Theme", variant: "outlined", value: themeName, onChange: event => {
28
39
  setThemeName(event.target.value);
@@ -38,6 +49,7 @@ export default function ExportSvgDialog({ model, handleClose, }) {
38
49
  try {
39
50
  await model.exportSvg({
40
51
  rasterizeLayers,
52
+ format,
41
53
  filename,
42
54
  themeName,
43
55
  trackLabels,
@@ -93,6 +93,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
93
93
  readonly trackHeightsWithResizeHandles: number;
94
94
  readonly height: number;
95
95
  readonly totalBp: number;
96
+ getNonElidedRegionCount(bpPerPx: number): number;
97
+ getInterRegionPaddingPx(bpPerPx: number): number;
96
98
  readonly maxBpPerPx: number;
97
99
  readonly minBpPerPx: number;
98
100
  readonly error: unknown;
@@ -151,7 +153,6 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
151
153
  end: number;
152
154
  }[];
153
155
  horizontalScroll(distance: number): number;
154
- center(): void;
155
156
  showAllRegions(): void;
156
157
  showAllRegionsInAssembly(assemblyName?: string): void;
157
158
  setDraggingTrackId(idx?: string): void;
@@ -531,6 +532,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
531
532
  readonly trackHeightsWithResizeHandles: number;
532
533
  readonly height: number;
533
534
  readonly totalBp: number;
535
+ getNonElidedRegionCount(bpPerPx: number): number;
536
+ getInterRegionPaddingPx(bpPerPx: number): number;
534
537
  readonly maxBpPerPx: number;
535
538
  readonly minBpPerPx: number;
536
539
  readonly error: unknown;
@@ -589,7 +592,6 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
589
592
  end: number;
590
593
  }[];
591
594
  horizontalScroll(distance: number): number;
592
- center(): void;
593
595
  showAllRegions(): void;
594
596
  showAllRegionsInAssembly(assemblyName?: string): void;
595
597
  setDraggingTrackId(idx?: string): void;
@@ -811,6 +813,8 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
811
813
  readonly trackHeightsWithResizeHandles: number;
812
814
  readonly height: number;
813
815
  readonly totalBp: number;
816
+ getNonElidedRegionCount(bpPerPx: number): number;
817
+ getInterRegionPaddingPx(bpPerPx: number): number;
814
818
  readonly maxBpPerPx: number;
815
819
  readonly minBpPerPx: number;
816
820
  readonly error: unknown;
@@ -869,7 +873,6 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
869
873
  end: number;
870
874
  }[];
871
875
  horizontalScroll(distance: number): number;
872
- center(): void;
873
876
  showAllRegions(): void;
874
877
  showAllRegionsInAssembly(assemblyName?: string): void;
875
878
  setDraggingTrackId(idx?: string): void;
@@ -73,7 +73,38 @@ export default function stateModelFactory(pluginManager) {
73
73
  const { renderToSvg } = await import("./svgcomponents/SVGLinearSyntenyView.js");
74
74
  const html = await renderToSvg(self, opts);
75
75
  const { saveAs } = await import('file-saver-es');
76
- saveAs(new Blob([html], { type: 'image/svg+xml' }), opts.filename || 'image.svg');
76
+ if (opts.format === 'png') {
77
+ const img = new Image();
78
+ const svgBlob = new Blob([html], { type: 'image/svg+xml' });
79
+ const url = URL.createObjectURL(svgBlob);
80
+ await new Promise((resolve, reject) => {
81
+ img.onload = () => {
82
+ const canvas = document.createElement('canvas');
83
+ canvas.width = img.width;
84
+ canvas.height = img.height;
85
+ const ctx = canvas.getContext('2d');
86
+ ctx.drawImage(img, 0, 0);
87
+ URL.revokeObjectURL(url);
88
+ canvas.toBlob(blob => {
89
+ if (blob) {
90
+ saveAs(blob, opts.filename || 'image.png');
91
+ resolve();
92
+ }
93
+ else {
94
+ reject(new Error(`Failed to create PNG. The image may be too large (${img.width}x${img.height}). Try reducing the view size or use SVG format.`));
95
+ }
96
+ }, 'image/png');
97
+ };
98
+ img.onerror = () => {
99
+ URL.revokeObjectURL(url);
100
+ reject(new Error('Failed to load SVG for PNG conversion'));
101
+ };
102
+ img.src = url;
103
+ });
104
+ }
105
+ else {
106
+ saveAs(new Blob([html], { type: 'image/svg+xml' }), opts.filename || 'image.svg');
107
+ }
77
108
  },
78
109
  }))
79
110
  .views(self => {
@@ -21,6 +21,7 @@ export interface LinearSyntenyViewInit {
21
21
  }
22
22
  export interface ExportSvgOptions {
23
23
  rasterizeLayers?: boolean;
24
+ format?: 'svg' | 'png';
24
25
  scale?: number;
25
26
  filename?: string;
26
27
  Wrapper?: React.FC<{
@@ -1,5 +1,5 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
- declare const configSchema: (pluginManager: PluginManager) => import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
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;
5
5
  type: string;
@@ -31,7 +31,7 @@ declare const configSchema: (pluginManager: PluginManager) => import("node_modul
31
31
  defaultValue: string;
32
32
  };
33
33
  adapter: import("@jbrowse/mobx-state-tree").IAnyModelType;
34
- textSearching: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
34
+ textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
35
35
  indexingAttributes: {
36
36
  type: string;
37
37
  description: string;
@@ -43,9 +43,9 @@ declare const configSchema: (pluginManager: PluginManager) => import("node_modul
43
43
  defaultValue: string[];
44
44
  };
45
45
  textSearchAdapter: import("@jbrowse/mobx-state-tree").IAnyModelType;
46
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
46
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
47
47
  displays: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
48
- formatDetails: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
48
+ formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
49
49
  feature: {
50
50
  type: string;
51
51
  description: string;
@@ -68,8 +68,8 @@ declare const configSchema: (pluginManager: PluginManager) => import("node_modul
68
68
  defaultValue: number;
69
69
  description: string;
70
70
  };
71
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
72
- formatAbout: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
71
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
72
+ formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
73
73
  config: {
74
74
  type: string;
75
75
  description: string;
@@ -80,6 +80,6 @@ declare const configSchema: (pluginManager: PluginManager) => import("node_modul
80
80
  type: string;
81
81
  defaultValue: boolean;
82
82
  };
83
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
84
- }, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
83
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
84
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
85
85
  export default configSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-linear-comparative-view",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 linear comparative view",
6
6
  "keywords": [
@@ -22,16 +22,16 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@jbrowse/mobx-state-tree": "^5.5.0",
25
- "@mui/icons-material": "^7.3.7",
26
- "@mui/material": "^7.3.7",
25
+ "@mui/icons-material": "^7.3.8",
26
+ "@mui/material": "^7.3.8",
27
27
  "@types/file-saver-es": "^2.0.3",
28
28
  "copy-to-clipboard": "^3.3.3",
29
29
  "file-saver-es": "^2.0.5",
30
30
  "mobx": "^6.15.0",
31
31
  "mobx-react": "^9.2.1",
32
- "@jbrowse/plugin-linear-genome-view": "^4.1.3",
33
- "@jbrowse/core": "^4.1.3",
34
- "@jbrowse/plugin-alignments": "^4.1.3"
32
+ "@jbrowse/plugin-alignments": "^4.1.4",
33
+ "@jbrowse/core": "^4.1.4",
34
+ "@jbrowse/plugin-linear-genome-view": "^4.1.4"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "react": ">=18.0.0",