@jbrowse/core 2.12.3 → 2.13.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.
@@ -24,8 +24,8 @@ export default class SceneGraph {
24
24
  addChild(nameOrSceneGraph: string | SceneGraph, left: number, top: number, width: number, height: number, data?: Record<string, any>): SceneGraph;
25
25
  getSubRecord(name: string): SceneGraph | undefined;
26
26
  /**
27
- * if the record does not already cover the given
28
- * absolute extents, extend it to cover them
27
+ * if the record does not already cover the given absolute extents, extend it
28
+ * to cover them
29
29
  *
30
30
  * @param left -
31
31
  * @param right -
@@ -36,7 +36,7 @@ export default class SceneGraph {
36
36
  get bottom(): number;
37
37
  get right(): number;
38
38
  walkParents(callback: Function): void;
39
- walkChildren(callback: Function): void;
39
+ walkChildren(callback: (c: SceneGraph) => void): void;
40
40
  get absolute(): AbsoluteCache;
41
41
  move(x: number, y: number): void;
42
42
  }
@@ -44,8 +44,8 @@ class SceneGraph {
44
44
  return this.children.get(name);
45
45
  }
46
46
  /**
47
- * if the record does not already cover the given
48
- * absolute extents, extend it to cover them
47
+ * if the record does not already cover the given absolute extents, extend it
48
+ * to cover them
49
49
  *
50
50
  * @param left -
51
51
  * @param right -
@@ -117,7 +117,7 @@ class SceneGraph {
117
117
  this.left += x;
118
118
  this.top += y;
119
119
  this.absoluteCache.dirty = true;
120
- this.walkChildren((c) => {
120
+ this.walkChildren(c => {
121
121
  c.absoluteCache.dirty = true;
122
122
  });
123
123
  const { left, right, top, bottom } = this.absolute;
@@ -1,17 +1,4 @@
1
- import propTypes from 'prop-types';
2
1
  export declare const ElementId: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
3
- export declare const PropTypes: {
4
- Region: propTypes.Requireable<propTypes.InferProps<{
5
- refName: propTypes.Validator<string>;
6
- start: propTypes.Validator<number>;
7
- end: propTypes.Validator<number>;
8
- }>>;
9
- ConfigSchema: import("react").Requireable<any>;
10
- Feature: propTypes.Requireable<propTypes.InferProps<{
11
- get: propTypes.Validator<(...args: any[]) => any>;
12
- id: propTypes.Validator<(...args: any[]) => any>;
13
- }>>;
14
- };
15
2
  export declare const NoAssemblyRegion: import("mobx-state-tree").IModelType<{
16
3
  refName: import("mobx-state-tree").ISimpleType<string>;
17
4
  start: import("mobx-state-tree").ISimpleType<number>;
package/util/types/mst.js CHANGED
@@ -1,27 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FileLocation = exports.UriLocation = exports.UriLocationRaw = exports.BlobLocation = exports.LocalPathLocation = exports.Region = exports.NoAssemblyRegion = exports.PropTypes = exports.ElementId = void 0;
3
+ exports.FileLocation = exports.UriLocation = exports.UriLocationRaw = exports.BlobLocation = exports.LocalPathLocation = exports.Region = exports.NoAssemblyRegion = exports.ElementId = void 0;
7
4
  const mobx_state_tree_1 = require("mobx-state-tree");
8
- const prop_types_1 = __importDefault(require("prop-types"));
9
- const mobx_react_1 = require("mobx-react");
10
5
  const nanoid_1 = require("../nanoid");
11
6
  exports.ElementId = mobx_state_tree_1.types.optional(mobx_state_tree_1.types.identifier, () => (0, nanoid_1.nanoid)());
12
- // PropTypes that are useful when working with instances of these in react components
13
- exports.PropTypes = {
14
- Region: prop_types_1.default.shape({
15
- refName: prop_types_1.default.string.isRequired,
16
- start: prop_types_1.default.number.isRequired,
17
- end: prop_types_1.default.number.isRequired,
18
- }),
19
- ConfigSchema: mobx_react_1.PropTypes.objectOrObservableObject,
20
- Feature: prop_types_1.default.shape({
21
- get: prop_types_1.default.func.isRequired,
22
- id: prop_types_1.default.func.isRequired,
23
- }),
24
- };
25
7
  exports.NoAssemblyRegion = mobx_state_tree_1.types
26
8
  .model('NoAssemblyRegion', {
27
9
  refName: mobx_state_tree_1.types.string,