@jbrowse/core 2.6.1 → 2.6.3

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.
package/ui/ColorPicker.js CHANGED
@@ -75,6 +75,7 @@ function ColorPicker({ onChange, color, }) {
75
75
  const palettes = Object.keys(paletteColors);
76
76
  const [text, setText] = (0, react_1.useState)(color);
77
77
  const rgb = (0, color_1.default)(color).rgb().toString();
78
+ const rgbDebounced = (0, util_1.useDebounce)(rgb, 1000);
78
79
  const handleChange = (val) => {
79
80
  setText(val);
80
81
  try {
@@ -84,7 +85,7 @@ function ColorPicker({ onChange, color, }) {
84
85
  };
85
86
  return (react_1.default.createElement("div", { style: { display: 'flex', padding: 10 } },
86
87
  react_1.default.createElement("div", { style: { width: 200, margin: 5 } },
87
- react_1.default.createElement(react_colorful_1.RgbaStringColorPicker, { color: rgb, onChange: handleChange })),
88
+ react_1.default.createElement(react_colorful_1.RgbaStringColorPicker, { color: rgbDebounced, onChange: handleChange })),
88
89
  react_1.default.createElement("div", { style: { width: 200, margin: 5 } },
89
90
  react_1.default.createElement(material_1.Select, { value: val, onChange: event => {
90
91
  const pal = event.target.value;
package/util/index.d.ts CHANGED
@@ -202,11 +202,12 @@ export declare function renameRegionsIfNeeded<ARGTYPE extends {
202
202
  }>;
203
203
  export declare function minmax(a: number, b: number): number[];
204
204
  export declare function shorten(name: string, max?: number, short?: number): string;
205
- export declare function stringify({ refName, coord, oob, }: {
205
+ export declare function stringify({ refName, coord, assemblyName, oob, }: {
206
+ assemblyName?: string;
206
207
  coord: number;
207
208
  refName?: string;
208
209
  oob?: boolean;
209
- }): string;
210
+ }, useAssemblyName?: boolean): string;
210
211
  export declare const isElectron: boolean;
211
212
  export declare function revcom(seqString: string): string;
212
213
  export declare function reverse(seqString: string): string;
package/util/index.js CHANGED
@@ -664,10 +664,13 @@ function shorten(name, max = 70, short = 30) {
664
664
  : name;
665
665
  }
666
666
  exports.shorten = shorten;
667
- function stringify({ refName, coord, oob, }) {
668
- return refName
669
- ? `${shorten(refName)}:${toLocale(coord)}${oob ? ' (out of bounds)' : ''}`
670
- : '';
667
+ function stringify({ refName, coord, assemblyName, oob, }, useAssemblyName) {
668
+ return [
669
+ assemblyName && useAssemblyName ? `{${assemblyName}}` : '',
670
+ refName
671
+ ? `${shorten(refName)}:${toLocale(coord)}${oob ? ' (out of bounds)' : ''}`
672
+ : '',
673
+ ].join('');
671
674
  }
672
675
  exports.stringify = stringify;
673
676
  // this is recommended in a later comment in
@@ -15,7 +15,7 @@ function binaryRangeFetch(url, start, end, options = {}) {
15
15
  const globalRangeCache = new http_range_fetcher_1.HttpRangeFetcher({
16
16
  fetch: binaryRangeFetch,
17
17
  size: 500 * 1024 ** 2,
18
- chunkSize: 128 * 124,
18
+ chunkSize: 128 * 1024,
19
19
  maxFetchSize: 100 * 1024 ** 2,
20
20
  minimumTTL: 24 * 60 * 60 * 1000, // 1 day
21
21
  });
@@ -211,6 +211,8 @@ export interface LocalPathLocation extends SnapshotIn<typeof MULocalPathLocation
211
211
  export interface UriLocation extends SnapshotIn<typeof MUUriLocation> {
212
212
  }
213
213
  export declare function isUriLocation(location: unknown): location is UriLocation;
214
+ export declare function isLocalPathLocation(location: unknown): location is LocalPathLocation;
215
+ export declare function isBlobLocation(location: unknown): location is BlobLocation;
214
216
  export declare class AuthNeededError extends Error {
215
217
  message: string;
216
218
  url: string;
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.isRetryException = exports.isAuthNeededException = exports.RetryError = exports.AuthNeededError = exports.isUriLocation = exports.isAbstractMenuManager = exports.isRootModelWithInternetAccounts = exports.isAppRootModel = exports.isTrackViewModel = exports.isDisplayModel = exports.isTrackModel = exports.isViewModel = exports.isSelectionContainer = exports.isSessionWithSessionPlugins = exports.isSessionModelWithConnectionEditing = exports.isSessionModelWithConnections = exports.isSessionModelWithWidgets = exports.isSessionWithAddTracks = exports.isSessionModelWithConfigEditing = exports.isSessionModel = exports.isViewContainer = void 0;
17
+ exports.isRetryException = exports.isAuthNeededException = exports.RetryError = exports.AuthNeededError = exports.isBlobLocation = exports.isLocalPathLocation = exports.isUriLocation = exports.isAbstractMenuManager = exports.isRootModelWithInternetAccounts = exports.isAppRootModel = exports.isTrackViewModel = exports.isDisplayModel = exports.isTrackModel = exports.isViewModel = exports.isSelectionContainer = exports.isSessionWithSessionPlugins = exports.isSessionModelWithConnectionEditing = exports.isSessionModelWithConnections = exports.isSessionModelWithWidgets = exports.isSessionWithAddTracks = exports.isSessionModelWithConfigEditing = exports.isSessionModel = exports.isViewContainer = void 0;
18
18
  const mobx_state_tree_1 = require("mobx-state-tree");
19
19
  __exportStar(require("./util"), exports);
20
20
  function isViewContainer(thing) {
@@ -122,6 +122,20 @@ function isUriLocation(location) {
122
122
  !!location.uri);
123
123
  }
124
124
  exports.isUriLocation = isUriLocation;
125
+ function isLocalPathLocation(location) {
126
+ return (typeof location === 'object' &&
127
+ location !== null &&
128
+ 'localPath' in location &&
129
+ !!location.localPath);
130
+ }
131
+ exports.isLocalPathLocation = isLocalPathLocation;
132
+ function isBlobLocation(location) {
133
+ return (typeof location === 'object' &&
134
+ location !== null &&
135
+ 'blobId' in location &&
136
+ !!location.blobId);
137
+ }
138
+ exports.isBlobLocation = isBlobLocation;
125
139
  class AuthNeededError extends Error {
126
140
  constructor(message, url) {
127
141
  super(message);