@jbrowse/plugin-arc 4.1.13 → 4.1.15

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,11 +1,12 @@
1
1
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
2
  import type { Feature, Region } from '@jbrowse/core/util';
3
- declare const ArcRendering: ({ features, config, regions, bpPerPx, height, exportSVG, displayModel, onFeatureClick, }: {
3
+ declare const ArcRendering: ({ features, config, regions, bpPerPx, height, displayMode, exportSVG, displayModel, onFeatureClick, }: {
4
4
  features: Map<string, Feature>;
5
5
  config: AnyConfigurationModel;
6
6
  regions: Region[];
7
7
  bpPerPx: number;
8
8
  height: number;
9
+ displayMode?: string;
9
10
  displayModel?: {
10
11
  selectedFeatureId: string;
11
12
  };
@@ -51,10 +51,10 @@ function ArcFeature({ selectedFeatureId, region, bpPerPx, config, displayHeight,
51
51
  setIsMouseOvered(false);
52
52
  }, pointerEvents: "stroke" }), isMouseOvered ? (_jsx(Suspense, { fallback: null, children: _jsx(ArcTooltip, { contents: caption }) })) : null, _jsx("text", { x: centerX, y: textYCoord + 3, stroke: "white", strokeWidth: "0.6em", children: label }), _jsx("text", { x: centerX, y: textYCoord + 3, stroke: textStroke, children: label })] }));
53
53
  }
54
- const ArcRendering = observer(function ArcRendering({ features, config, regions, bpPerPx, height, exportSVG, displayModel, onFeatureClick, }) {
54
+ const ArcRendering = observer(function ArcRendering({ features, config, regions, bpPerPx, height, displayMode, exportSVG, displayModel, onFeatureClick, }) {
55
55
  const region = regions[0];
56
56
  const width = (region.end - region.start) / bpPerPx;
57
- const semicircle = readConfObject(config, 'displayMode') === 'semicircles';
57
+ const semicircle = (displayMode ?? readConfObject(config, 'displayMode')) === 'semicircles';
58
58
  const { selectedFeatureId } = displayModel || {};
59
59
  const children = [...features.values()].map(f => (_jsx(ArcFeature, { displayHeight: height, config: config, region: region, bpPerPx: bpPerPx, selectedFeatureId: selectedFeatureId, onFeatureClick: onFeatureClick, feature: f, semicircle: semicircle }, f.id())));
60
60
  return exportSVG ? (children) : (_jsx("svg", { width: width, height: height, children: children }));
@@ -32,7 +32,7 @@ declare const ArcRenderer: import("@jbrowse/core/configuration/configurationSche
32
32
  displayMode: {
33
33
  type: string;
34
34
  defaultValue: string;
35
- model: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
35
+ model: import("@jbrowse/mobx-state-tree").ISimpleType<"arcs" | "semicircles">;
36
36
  description: string;
37
37
  };
38
38
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
@@ -1084,6 +1084,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
1084
1084
  onMouseMove(_: unknown, featureId?: string): void;
1085
1085
  onMouseLeave(_: unknown): void;
1086
1086
  onContextMenu(_: unknown): void;
1087
+ onFeatureClick(_: unknown, featureId?: string): void;
1087
1088
  };
1088
1089
  renderProps(): any;
1089
1090
  } & {
@@ -1096,9 +1097,7 @@ export declare function stateModelFactory(configSchema: AnyConfigurationSchemaTy
1096
1097
  } & {
1097
1098
  readonly displayModeSetting: any;
1098
1099
  } & {
1099
- readonly rendererConfig: {
1100
- displayMode: any;
1101
- };
1100
+ readonly rendererConfig: any;
1102
1101
  } & {
1103
1102
  renderProps(): any;
1104
1103
  } & {
@@ -26,12 +26,7 @@ export function stateModelFactory(configSchema) {
26
26
  }))
27
27
  .views(self => ({
28
28
  get rendererConfig() {
29
- const configBlob = getConf(self, ['renderer']) || {};
30
- const config = configBlob;
31
- return {
32
- ...config,
33
- displayMode: self.displayModeSetting,
34
- };
29
+ return self.configuration.renderer;
35
30
  },
36
31
  }))
37
32
  .views(self => {
@@ -41,6 +36,7 @@ export function stateModelFactory(configSchema) {
41
36
  return {
42
37
  ...superRenderProps(),
43
38
  config: self.rendererConfig,
39
+ displayMode: self.displayModeSetting,
44
40
  height: self.height,
45
41
  };
46
42
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-arc",
3
- "version": "4.1.13",
3
+ "version": "4.1.15",
4
4
  "type": "module",
5
5
  "description": "JBrowse 2 arc adapters, tracks, etc.",
6
6
  "keywords": [
@@ -22,14 +22,17 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@gmod/vcf": "^7.0.0",
25
- "@jbrowse/mobx-state-tree": "^5.5.0",
26
- "@mui/icons-material": "^7.3.8",
27
- "@mui/material": "^7.3.8",
25
+ "@jbrowse/mobx-state-tree": "^5.6.0",
26
+ "@mui/icons-material": "^7.3.9",
27
+ "@mui/material": "^7.3.9",
28
28
  "mobx": "^6.15.0",
29
29
  "mobx-react": "^9.2.1",
30
30
  "rxjs": "^7.8.2",
31
- "@jbrowse/plugin-linear-genome-view": "^4.1.13",
32
- "@jbrowse/core": "^4.1.13"
31
+ "@jbrowse/plugin-linear-genome-view": "^4.1.15",
32
+ "@jbrowse/core": "^4.1.15"
33
+ },
34
+ "devDependencies": {
35
+ "@jbrowse/jexl": "^3.0.2"
33
36
  },
34
37
  "peerDependencies": {
35
38
  "react": ">=18.0.0",