@jbrowse/plugin-variants 2.9.0 → 2.10.1

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.
@@ -3,7 +3,8 @@ import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
3
3
  import { Feature } from '@jbrowse/core/util';
4
4
  /**
5
5
  * #stateModel ChordVariantDisplay
6
- * extends `BaseChordDisplay`
6
+ * extends
7
+ * - [BaseChordDisplay](../basechorddisplay)
7
8
  */
8
9
  declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => import("mobx-state-tree").IModelType<{
9
10
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
@@ -117,7 +118,7 @@ declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => i
117
118
  } & {
118
119
  afterAttach(): void;
119
120
  } & {
120
- renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/models/CircularView").ExportSvgOptions & {
121
+ renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/models/model").ExportSvgOptions & {
121
122
  theme: import("@mui/material").ThemeOptions;
122
123
  }): Promise<import("react").JSX.Element>;
123
124
  } & {
@@ -7,7 +7,8 @@ const util_1 = require("@jbrowse/core/util");
7
7
  const tracks_1 = require("@jbrowse/core/util/tracks");
8
8
  /**
9
9
  * #stateModel ChordVariantDisplay
10
- * extends `BaseChordDisplay`
10
+ * extends
11
+ * - [BaseChordDisplay](../basechorddisplay)
11
12
  */
12
13
  const stateModelFactory = (configSchema) => {
13
14
  return mobx_state_tree_1.types
@@ -4,8 +4,10 @@ import { Instance } from 'mobx-state-tree';
4
4
  import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
5
5
  /**
6
6
  * #stateModel LinearVariantDisplay
7
- * extends `LinearBasicDisplay`
8
- * very similar to basic display, but provides custom widget on feature click
7
+ * similar to basic display, but provides custom widget on feature click
8
+ * extends
9
+ *
10
+ * - [LinearBasicDisplay](../linearbasicdisplay)
9
11
  */
10
12
  export default function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
11
13
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
@@ -14,9 +16,6 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
14
16
  } & {
15
17
  heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
16
18
  } & {
17
- /**
18
- * #property
19
- */
20
19
  userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
21
20
  userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
22
21
  } & {
@@ -76,12 +75,16 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
76
75
  type: string;
77
76
  defaultValue: number;
78
77
  description: string;
79
- };
78
+ }; /**
79
+ * #property
80
+ */
80
81
  height: {
81
82
  type: string;
82
83
  defaultValue: number;
83
84
  description: string;
84
- };
85
+ }; /**
86
+ * #action
87
+ */
85
88
  mouseover: {
86
89
  type: string;
87
90
  description: string;
@@ -90,7 +93,9 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
90
93
  };
91
94
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
92
95
  } & {
93
- type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">;
96
+ type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">; /**
97
+ * #property
98
+ */
94
99
  trackShowLabels: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
95
100
  trackShowDescriptions: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
96
101
  trackDisplayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
@@ -7,8 +7,10 @@ const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view"
7
7
  const mobx_state_tree_1 = require("mobx-state-tree");
8
8
  /**
9
9
  * #stateModel LinearVariantDisplay
10
- * extends `LinearBasicDisplay`
11
- * very similar to basic display, but provides custom widget on feature click
10
+ * similar to basic display, but provides custom widget on feature click
11
+ * extends
12
+ *
13
+ * - [LinearBasicDisplay](../linearbasicdisplay)
12
14
  */
13
15
  function stateModelFactory(configSchema) {
14
16
  return mobx_state_tree_1.types
@@ -25,6 +25,6 @@ declare const Chord: ({ feature, blocksForRefs, radius, config, bezierRadius, se
25
25
  config: AnyConfigurationModel;
26
26
  bezierRadius: number;
27
27
  selected: boolean;
28
- onClick: (feature: Feature, reg: AnyRegion, endBlock: AnyRegion, evt: unknown) => void;
28
+ onClick: (feat: Feature, reg: AnyRegion, end: AnyRegion, evt: unknown) => void;
29
29
  }) => React.JSX.Element | null;
30
30
  export default Chord;
@@ -87,7 +87,7 @@ const Chord = (0, mobx_react_1.observer)(function Chord({ feature, blocksForRefs
87
87
  const hoverStrokeColor = (0, configuration_1.readConfObject)(config, 'strokeColorHover', {
88
88
  feature,
89
89
  });
90
- return (react_1.default.createElement("path", { "data-testid": `chord-${feature.id()}`, d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
90
+ return (react_1.default.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
91
91
  if (endBlock && startBlock) {
92
92
  onClick(feature, startBlock.region, endBlock.region, evt);
93
93
  }
@@ -44,22 +44,10 @@ const StructuralVariantChordsReactComponent = (0, mobx_react_1.observer)(functio
44
44
  }
45
45
  return blocksForRefs;
46
46
  }, [blockDefinitions]);
47
- const trackStyleId = `chords-${typeof jest !== 'undefined' ? 'test' : displayModel.id}`;
48
- return (react_1.default.createElement("g", { id: trackStyleId, "data-testid": "structuralVariantChordRenderer" },
49
- react_1.default.createElement("style", {
50
- // eslint-disable-next-line react/no-danger
51
- dangerouslySetInnerHTML: {
52
- __html: `
53
- #${trackStyleId} > path {
54
- cursor: crosshair;
55
- fill: none;
56
- }
57
- `,
58
- } }),
59
- [...features.values()].map(feature => {
60
- const id = feature.id();
61
- const selected = String(selectedFeatureId) === String(id);
62
- return (react_1.default.createElement(Chord_1.default, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
63
- })));
47
+ return (react_1.default.createElement("g", { id: `chords-${typeof jest !== 'undefined' ? 'test' : displayModel.id}`, "data-testid": "structuralVariantChordRenderer" }, [...features.values()].map(feature => {
48
+ const id = feature.id();
49
+ const selected = String(selectedFeatureId) === String(id);
50
+ return (react_1.default.createElement(Chord_1.default, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
51
+ })));
64
52
  });
65
53
  exports.default = StructuralVariantChordsReactComponent;
@@ -3,7 +3,8 @@ import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
3
3
  import { Feature } from '@jbrowse/core/util';
4
4
  /**
5
5
  * #stateModel ChordVariantDisplay
6
- * extends `BaseChordDisplay`
6
+ * extends
7
+ * - [BaseChordDisplay](../basechorddisplay)
7
8
  */
8
9
  declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => import("mobx-state-tree").IModelType<{
9
10
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
@@ -117,7 +118,7 @@ declare const stateModelFactory: (configSchema: AnyConfigurationSchemaType) => i
117
118
  } & {
118
119
  afterAttach(): void;
119
120
  } & {
120
- renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/models/CircularView").ExportSvgOptions & {
121
+ renderSvg(opts: import("@jbrowse/plugin-circular-view/src/CircularView/models/model").ExportSvgOptions & {
121
122
  theme: import("@mui/material").ThemeOptions;
122
123
  }): Promise<import("react").JSX.Element>;
123
124
  } & {
@@ -5,7 +5,8 @@ import { getContainingView } from '@jbrowse/core/util';
5
5
  import { getParentRenderProps } from '@jbrowse/core/util/tracks';
6
6
  /**
7
7
  * #stateModel ChordVariantDisplay
8
- * extends `BaseChordDisplay`
8
+ * extends
9
+ * - [BaseChordDisplay](../basechorddisplay)
9
10
  */
10
11
  const stateModelFactory = (configSchema) => {
11
12
  return types
@@ -4,8 +4,10 @@ import { Instance } from 'mobx-state-tree';
4
4
  import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
5
5
  /**
6
6
  * #stateModel LinearVariantDisplay
7
- * extends `LinearBasicDisplay`
8
- * very similar to basic display, but provides custom widget on feature click
7
+ * similar to basic display, but provides custom widget on feature click
8
+ * extends
9
+ *
10
+ * - [LinearBasicDisplay](../linearbasicdisplay)
9
11
  */
10
12
  export default function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
11
13
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
@@ -14,9 +16,6 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
14
16
  } & {
15
17
  heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
16
18
  } & {
17
- /**
18
- * #property
19
- */
20
19
  userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
21
20
  userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
22
21
  } & {
@@ -76,12 +75,16 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
76
75
  type: string;
77
76
  defaultValue: number;
78
77
  description: string;
79
- };
78
+ }; /**
79
+ * #property
80
+ */
80
81
  height: {
81
82
  type: string;
82
83
  defaultValue: number;
83
84
  description: string;
84
- };
85
+ }; /**
86
+ * #action
87
+ */
85
88
  mouseover: {
86
89
  type: string;
87
90
  description: string;
@@ -90,7 +93,9 @@ export default function stateModelFactory(configSchema: AnyConfigurationSchemaTy
90
93
  };
91
94
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
92
95
  } & {
93
- type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">;
96
+ type: import("mobx-state-tree").ISimpleType<"LinearBasicDisplay">; /**
97
+ * #property
98
+ */
94
99
  trackShowLabels: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
95
100
  trackShowDescriptions: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
96
101
  trackDisplayMode: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
@@ -5,8 +5,10 @@ import { linearBasicDisplayModelFactory } from '@jbrowse/plugin-linear-genome-vi
5
5
  import { types } from 'mobx-state-tree';
6
6
  /**
7
7
  * #stateModel LinearVariantDisplay
8
- * extends `LinearBasicDisplay`
9
- * very similar to basic display, but provides custom widget on feature click
8
+ * similar to basic display, but provides custom widget on feature click
9
+ * extends
10
+ *
11
+ * - [LinearBasicDisplay](../linearbasicdisplay)
10
12
  */
11
13
  export default function stateModelFactory(configSchema) {
12
14
  return types
@@ -25,6 +25,6 @@ declare const Chord: ({ feature, blocksForRefs, radius, config, bezierRadius, se
25
25
  config: AnyConfigurationModel;
26
26
  bezierRadius: number;
27
27
  selected: boolean;
28
- onClick: (feature: Feature, reg: AnyRegion, endBlock: AnyRegion, evt: unknown) => void;
28
+ onClick: (feat: Feature, reg: AnyRegion, end: AnyRegion, evt: unknown) => void;
29
29
  }) => React.JSX.Element | null;
30
30
  export default Chord;
@@ -62,7 +62,7 @@ const Chord = observer(function Chord({ feature, blocksForRefs, radius, config,
62
62
  const hoverStrokeColor = readConfObject(config, 'strokeColorHover', {
63
63
  feature,
64
64
  });
65
- return (React.createElement("path", { "data-testid": `chord-${feature.id()}`, d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
65
+ return (React.createElement("path", { "data-testid": `chord-${feature.id()}`, cursor: "crosshair", fill: "none", d: ['M', ...startXY, 'Q', ...controlXY, ...endXY].join(' '), stroke: hovered ? hoverStrokeColor : strokeColor, strokeWidth: hovered ? 3 : 1, onClick: evt => {
66
66
  if (endBlock && startBlock) {
67
67
  onClick(feature, startBlock.region, endBlock.region, evt);
68
68
  }
@@ -16,22 +16,10 @@ const StructuralVariantChordsReactComponent = observer(function ({ features, con
16
16
  }
17
17
  return blocksForRefs;
18
18
  }, [blockDefinitions]);
19
- const trackStyleId = `chords-${typeof jest !== 'undefined' ? 'test' : displayModel.id}`;
20
- return (React.createElement("g", { id: trackStyleId, "data-testid": "structuralVariantChordRenderer" },
21
- React.createElement("style", {
22
- // eslint-disable-next-line react/no-danger
23
- dangerouslySetInnerHTML: {
24
- __html: `
25
- #${trackStyleId} > path {
26
- cursor: crosshair;
27
- fill: none;
28
- }
29
- `,
30
- } }),
31
- [...features.values()].map(feature => {
32
- const id = feature.id();
33
- const selected = String(selectedFeatureId) === String(id);
34
- return (React.createElement(Chord, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
35
- })));
19
+ return (React.createElement("g", { id: `chords-${typeof jest !== 'undefined' ? 'test' : displayModel.id}`, "data-testid": "structuralVariantChordRenderer" }, [...features.values()].map(feature => {
20
+ const id = feature.id();
21
+ const selected = String(selectedFeatureId) === String(id);
22
+ return (React.createElement(Chord, { key: id, feature: feature, config: config, radius: radius, bezierRadius: bezierRadius, blocksForRefs: blocksForRefsMemo, selected: selected, onClick: onChordClick }));
23
+ })));
36
24
  });
37
25
  export default StructuralVariantChordsReactComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-variants",
3
- "version": "2.9.0",
3
+ "version": "2.10.1",
4
4
  "description": "JBrowse 2 variant adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -63,5 +63,5 @@
63
63
  "distModule": "esm/index.js",
64
64
  "srcModule": "src/index.ts",
65
65
  "module": "esm/index.js",
66
- "gitHead": "a50b6f67cf8c8f3c65a7b8cd858de2fcca1f2909"
66
+ "gitHead": "442b5f87efddfdf4ccf520b4d9dd01ddd370cb07"
67
67
  }