@jbrowse/core 3.5.0 → 3.6.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.
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +1 -1
- package/PhasedScheduler.d.ts +7 -0
- package/PhasedScheduler.js +28 -0
- package/Plugin.d.ts +2 -0
- package/PluginManager.d.ts +4 -8
- package/PluginManager.js +27 -27
- package/assemblyManager/assembly.d.ts +7 -5
- package/assemblyManager/assembly.js +21 -15
- package/assemblyManager/assemblyManager.d.ts +42 -70
- package/data_adapters/dataAdapterCache.d.ts +1 -1
- package/data_adapters/dataAdapterCache.js +28 -24
- package/package.json +2 -3
- package/rpc/methods/CoreFreeResources.js +1 -1
- package/rpc/methods/CoreGetFeatures.d.ts +1 -0
- package/rpc/methods/CoreGetFeatures.js +7 -11
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/CascadingMenu.d.ts +1 -1
- package/ui/CascadingMenu.js +27 -16
- package/ui/CascadingMenuButton.js +3 -12
- package/ui/DropDownMenu.d.ts +3 -2
- package/ui/DropDownMenu.js +3 -3
- package/ui/HoverMenu.d.ts +4 -0
- package/ui/HoverMenu.js +50 -0
- package/ui/Icons.d.ts +0 -5
- package/ui/Icons.js +0 -20
- package/ui/hooks.d.ts +66 -0
- package/ui/hooks.js +185 -0
- package/ui/react-colorful.js +18 -14
- package/ui/useEvent.d.ts +1 -0
- package/ui/useEvent.js +47 -0
- package/util/index.d.ts +6 -0
- package/util/index.js +20 -10
package/ui/useEvent.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useEvent = useEvent;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
function useEvent(handler) {
|
|
39
|
+
const handlerRef = React.useRef(null);
|
|
40
|
+
React.useLayoutEffect(() => {
|
|
41
|
+
handlerRef.current = handler;
|
|
42
|
+
});
|
|
43
|
+
return React.useCallback((...args) => {
|
|
44
|
+
var _a;
|
|
45
|
+
(_a = handlerRef.current) === null || _a === void 0 ? void 0 : _a.call(handlerRef, ...args);
|
|
46
|
+
}, []);
|
|
47
|
+
}
|
package/util/index.d.ts
CHANGED
|
@@ -247,10 +247,16 @@ export declare function stripAlpha(str: string): string;
|
|
|
247
247
|
export declare function getStrokeProps(str: string): {
|
|
248
248
|
strokeOpacity: number;
|
|
249
249
|
stroke: string;
|
|
250
|
+
} | {
|
|
251
|
+
strokeOpacity?: undefined;
|
|
252
|
+
stroke?: undefined;
|
|
250
253
|
};
|
|
251
254
|
export declare function getFillProps(str: string): {
|
|
252
255
|
fillOpacity: number;
|
|
253
256
|
fill: string;
|
|
257
|
+
} | {
|
|
258
|
+
fillOpacity?: undefined;
|
|
259
|
+
fill?: undefined;
|
|
254
260
|
};
|
|
255
261
|
export declare function renderToStaticMarkup(node: React.ReactElement): string;
|
|
256
262
|
export declare function isGzip(buf: Uint8Array): boolean;
|
package/util/index.js
CHANGED
|
@@ -962,18 +962,28 @@ function stripAlpha(str) {
|
|
|
962
962
|
return (0, colord_1.colord)(str).alpha(1).toHex();
|
|
963
963
|
}
|
|
964
964
|
function getStrokeProps(str) {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
965
|
+
if (str) {
|
|
966
|
+
const c = (0, colord_1.colord)(str);
|
|
967
|
+
return {
|
|
968
|
+
strokeOpacity: c.alpha(),
|
|
969
|
+
stroke: c.alpha(1).toHex(),
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
return {};
|
|
974
|
+
}
|
|
970
975
|
}
|
|
971
976
|
function getFillProps(str) {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
+
if (str) {
|
|
978
|
+
const c = (0, colord_1.colord)(str);
|
|
979
|
+
return {
|
|
980
|
+
fillOpacity: c.alpha(),
|
|
981
|
+
fill: c.alpha(1).toHex(),
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
return {};
|
|
986
|
+
}
|
|
977
987
|
}
|
|
978
988
|
function renderToStaticMarkup(node) {
|
|
979
989
|
const div = document.createElement('div');
|