@jbrowse/core 2.6.1 → 2.6.2
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/PluginLoader.d.ts +0 -1
- package/PluginLoader.js +26 -14
- package/TextSearch/TextSearchManager.js +3 -2
- package/package.json +4 -4
- package/rpc/WebWorkerRpcDriver.js +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/ColorPicker.js +2 -1
- package/util/index.d.ts +3 -2
- package/util/index.js +7 -4
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:
|
|
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
|
|
669
|
-
?
|
|
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
|