@jbrowse/core 2.11.0 → 2.11.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.
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +10 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +7 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +80 -86
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +8 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +67 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +5 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +7 -7
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +7 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceFeatureSettingsDialog.js → dialogs/SettingsDialog.js} +20 -10
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +2 -8
- package/BaseFeatureWidget/SequenceFeatureDetails/index.d.ts +1 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/index.js +3 -67
- package/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +14 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/model.js +40 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +15 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/{CDNASequence.js → seqtypes/CDNASequence.js} +17 -8
- package/BaseFeatureWidget/SequenceFeatureDetails/{CDSSequence.d.ts → seqtypes/CDSSequence.d.ts} +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/{CDSSequence.js → seqtypes/CDSSequence.js} +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/{GenomicSequence.js → seqtypes/GenomicSequence.js} +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/{ProteinSequence.d.ts → seqtypes/ProteinSequence.d.ts} +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/{ProteinSequence.js → seqtypes/ProteinSequence.js} +2 -2
- package/BaseFeatureWidget/stateModelFactory.d.ts +32 -0
- package/BaseFeatureWidget/stateModelFactory.js +5 -0
- package/BaseFeatureWidget/types.d.ts +2 -7
- package/BaseFeatureWidget/util.d.ts +4 -2
- package/PluginManager.d.ts +1 -1
- package/ReExports/modules.d.ts +1 -1
- package/data_adapters/CytobandAdapter/index.d.ts +1 -2
- package/data_adapters/CytobandAdapter/index.js +3 -2
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/index.d.ts +0 -1
- package/ui/index.js +1 -3
- package/util/index.d.ts +8 -0
- package/util/index.js +12 -2
- package/util/jexl.d.ts +1 -1
- package/util/jexl.js +2 -2
- package/util/simpleFeature.d.ts +4 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.d.ts +0 -13
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureSettingsDialog.d.ts +0 -9
- package/ui/Tooltip.d.ts +0 -11
- package/ui/Tooltip.js +0 -54
- /package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceHelpDialog.d.ts → dialogs/HelpDialog.d.ts} +0 -0
- /package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceHelpDialog.js → dialogs/HelpDialog.js} +0 -0
- /package/BaseFeatureWidget/SequenceFeatureDetails/{GenomicSequence.d.ts → seqtypes/GenomicSequence.d.ts} +0 -0
package/ui/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { default as FileSelector } from './FileSelector';
|
|
|
11
11
|
export { default as LoadingEllipses } from './LoadingEllipses';
|
|
12
12
|
export { default as Menu } from './Menu';
|
|
13
13
|
export { default as PrerenderedCanvas } from './PrerenderedCanvas';
|
|
14
|
-
export { default as Tooltip } from './Tooltip';
|
|
15
14
|
export { default as ReturnToImportFormDialog } from './ReturnToImportFormDialog';
|
|
16
15
|
export { default as ResizeHandle } from './ResizeHandle';
|
|
17
16
|
export { default as SanitizedHTML } from './SanitizedHTML';
|
package/ui/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.SanitizedHTML = exports.ResizeHandle = exports.ReturnToImportFormDialog = exports.
|
|
20
|
+
exports.SanitizedHTML = exports.ResizeHandle = exports.ReturnToImportFormDialog = exports.PrerenderedCanvas = exports.Menu = exports.LoadingEllipses = exports.FileSelector = exports.FatalErrorDialog = exports.FactoryResetDialog = exports.ErrorMessage = exports.EditableTypography = exports.Dialog = exports.CascadingMenu = exports.AssemblySelector = exports.Logomark = exports.LogoFull = void 0;
|
|
21
21
|
__exportStar(require("./theme"), exports);
|
|
22
22
|
var Logo_1 = require("./Logo");
|
|
23
23
|
Object.defineProperty(exports, "LogoFull", { enumerable: true, get: function () { return Logo_1.LogoFull; } });
|
|
@@ -44,8 +44,6 @@ var Menu_1 = require("./Menu");
|
|
|
44
44
|
Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return __importDefault(Menu_1).default; } });
|
|
45
45
|
var PrerenderedCanvas_1 = require("./PrerenderedCanvas");
|
|
46
46
|
Object.defineProperty(exports, "PrerenderedCanvas", { enumerable: true, get: function () { return __importDefault(PrerenderedCanvas_1).default; } });
|
|
47
|
-
var Tooltip_1 = require("./Tooltip");
|
|
48
|
-
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return __importDefault(Tooltip_1).default; } });
|
|
49
47
|
var ReturnToImportFormDialog_1 = require("./ReturnToImportFormDialog");
|
|
50
48
|
Object.defineProperty(exports, "ReturnToImportFormDialog", { enumerable: true, get: function () { return __importDefault(ReturnToImportFormDialog_1).default; } });
|
|
51
49
|
var ResizeHandle_1 = require("./ResizeHandle");
|
package/util/index.d.ts
CHANGED
|
@@ -392,6 +392,14 @@ interface BasicFeature {
|
|
|
392
392
|
}
|
|
393
393
|
export declare function gatherOverlaps(regions: BasicFeature[]): BasicFeature[];
|
|
394
394
|
export declare function stripAlpha(str: string): string;
|
|
395
|
+
export declare function getStrokeProps(str: string): {
|
|
396
|
+
strokeOpacity: number;
|
|
397
|
+
stroke: string;
|
|
398
|
+
};
|
|
399
|
+
export declare function getFillProps(str: string): {
|
|
400
|
+
fillOpacity: number;
|
|
401
|
+
fill: string;
|
|
402
|
+
};
|
|
395
403
|
export declare function renderToStaticMarkup(node: React.ReactElement, createRootFn?: (elt: Element | DocumentFragment) => {
|
|
396
404
|
render: (node: React.ReactElement) => unknown;
|
|
397
405
|
}): string;
|
package/util/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.getBpDisplayStr = exports.isSupportedIndexingAdapter = exports.bytesForRegions = exports.objectHash = exports.hashCode = exports.updateStatus = exports.generateCodonTable = exports.defaultCodonTable = exports.defaultStops = exports.defaultStarts = exports.getFrame = exports.measureText = exports.rIC = exports.complement = exports.reverse = exports.revcom = exports.isElectron = exports.stringify = exports.shorten = exports.minmax = exports.renameRegionsIfNeeded = exports.renameRegionIfNeeded = exports.makeAbortableReaction = exports.findLast = exports.findLastIndex = exports.iterMap = exports.bpSpanPx = exports.featureSpanPx = exports.cartesianToPolar = exports.polarToCartesian = exports.degToRad = exports.radToDeg = exports.bpToPx = exports.clamp = exports.compareLocStrings = exports.compareLocs = exports.parseLocString = exports.parseLocStringOneBased = exports.assembleLocStringFast = exports.assembleLocString = exports.getContainingDisplay = exports.getContainingTrack = exports.getContainingView = exports.getSession = exports.findParentThatIs = exports.springAnimate = exports.findParentThat = exports.useDebouncedCallback = exports.useWidthSetter = exports.useDebounce = void 0;
|
|
21
|
-
exports.blobToDataURL = exports.isFeature = exports.SimpleFeature = exports.renderToStaticMarkup = exports.stripAlpha = exports.gatherOverlaps = exports.mergeIntervals = exports.notEmpty = exports.groupBy = exports.avg = exports.sum = exports.min = exports.max = exports.localStorageSetItem = exports.localStorageGetItem = exports.getEnv = exports.measureGridWidth = exports.linkify = exports.coarseStripHTML = exports.getStr = exports.getUriLink = exports.useLocalStorage = exports.getLayoutId = exports.getViewParams = exports.getTickDisplayStr = exports.toLocale = void 0;
|
|
21
|
+
exports.blobToDataURL = exports.isFeature = exports.SimpleFeature = exports.renderToStaticMarkup = exports.getFillProps = exports.getStrokeProps = exports.stripAlpha = exports.gatherOverlaps = exports.mergeIntervals = exports.notEmpty = exports.groupBy = exports.avg = exports.sum = exports.min = exports.max = exports.localStorageSetItem = exports.localStorageGetItem = exports.getEnv = exports.measureGridWidth = exports.linkify = exports.coarseStripHTML = exports.getStr = exports.getUriLink = exports.useLocalStorage = exports.getLayoutId = exports.getViewParams = exports.getTickDisplayStr = exports.toLocale = void 0;
|
|
22
22
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
23
23
|
const react_1 = require("react");
|
|
24
24
|
const is_object_1 = __importDefault(require("is-object"));
|
|
@@ -1150,6 +1150,16 @@ function stripAlpha(str) {
|
|
|
1150
1150
|
return c.alpha(1).toHex();
|
|
1151
1151
|
}
|
|
1152
1152
|
exports.stripAlpha = stripAlpha;
|
|
1153
|
+
function getStrokeProps(str) {
|
|
1154
|
+
const c = (0, colord_1.colord)(str);
|
|
1155
|
+
return { strokeOpacity: c.alpha(), stroke: c.alpha(1).toHex() };
|
|
1156
|
+
}
|
|
1157
|
+
exports.getStrokeProps = getStrokeProps;
|
|
1158
|
+
function getFillProps(str) {
|
|
1159
|
+
const c = (0, colord_1.colord)(str);
|
|
1160
|
+
return { fillOpacity: c.alpha(), fill: c.alpha(1).toHex() };
|
|
1161
|
+
}
|
|
1162
|
+
exports.getFillProps = getFillProps;
|
|
1153
1163
|
// https://react.dev/reference/react-dom/server/renderToString#removing-rendertostring-from-the-client-code
|
|
1154
1164
|
function renderToStaticMarkup(node, createRootFn) {
|
|
1155
1165
|
const div = document.createElement('div');
|
|
@@ -1161,7 +1171,7 @@ function renderToStaticMarkup(node, createRootFn) {
|
|
|
1161
1171
|
(0, react_dom_1.render)(node, div);
|
|
1162
1172
|
}
|
|
1163
1173
|
});
|
|
1164
|
-
return div.innerHTML;
|
|
1174
|
+
return div.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g, 'rgb($1)');
|
|
1165
1175
|
}
|
|
1166
1176
|
exports.renderToStaticMarkup = renderToStaticMarkup;
|
|
1167
1177
|
var simpleFeature_1 = require("./simpleFeature");
|
package/util/jexl.d.ts
CHANGED
package/util/jexl.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jexl_1 = __importDefault(require("jexl"));
|
|
7
|
-
function
|
|
7
|
+
function JexlF( /* config?: any*/) {
|
|
8
8
|
const j = new jexl_1.default.Jexl();
|
|
9
9
|
// someday will make sure all of configs callbacks are added in, including
|
|
10
10
|
// ones passed in
|
|
@@ -61,4 +61,4 @@ function default_1( /* config?: any*/) {
|
|
|
61
61
|
j.addBinaryOp('&', 15, (a, b) => a & b);
|
|
62
62
|
return j;
|
|
63
63
|
}
|
|
64
|
-
exports.default =
|
|
64
|
+
exports.default = JexlF;
|
package/util/simpleFeature.d.ts
CHANGED
|
@@ -48,6 +48,10 @@ export interface SimpleFeatureArgs {
|
|
|
48
48
|
export interface SimpleFeatureSerializedNoId {
|
|
49
49
|
[key: string]: unknown;
|
|
50
50
|
parentId?: string;
|
|
51
|
+
start: number;
|
|
52
|
+
end: number;
|
|
53
|
+
refName: string;
|
|
54
|
+
type?: string;
|
|
51
55
|
subfeatures?: SimpleFeatureSerializedNoId[];
|
|
52
56
|
}
|
|
53
57
|
export interface SimpleFeatureSerialized extends SimpleFeatureSerializedNoId {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Feat } from '../util';
|
|
3
|
-
export default function CDNASequence({ utr, cds, exons, sequence, upstream, downstream, includeIntrons, collapseIntron, intronBp, }: {
|
|
4
|
-
utr: Feat[];
|
|
5
|
-
cds: Feat[];
|
|
6
|
-
exons: Feat[];
|
|
7
|
-
sequence: string;
|
|
8
|
-
upstream?: string;
|
|
9
|
-
downstream?: string;
|
|
10
|
-
includeIntrons?: boolean;
|
|
11
|
-
collapseIntron?: boolean;
|
|
12
|
-
intronBp: number;
|
|
13
|
-
}): React.JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export default function SequenceFeatureSettingsDialog({ handleClose, intronBp: intronBpArg, upDownBp: upDownBpArg, }: {
|
|
3
|
-
handleClose: (arg?: {
|
|
4
|
-
intronBp: number;
|
|
5
|
-
upDownBp: number;
|
|
6
|
-
}) => void;
|
|
7
|
-
intronBp: number;
|
|
8
|
-
upDownBp: number;
|
|
9
|
-
}): React.JSX.Element;
|
package/ui/Tooltip.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Feature } from '../util';
|
|
3
|
-
import { AnyConfigurationModel } from '../configuration';
|
|
4
|
-
declare const Tooltip: ({ offsetX, offsetY, configuration, feature, timeout, }: {
|
|
5
|
-
offsetX: number;
|
|
6
|
-
offsetY: number;
|
|
7
|
-
configuration: AnyConfigurationModel;
|
|
8
|
-
feature?: Feature;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
}) => React.JSX.Element | null;
|
|
11
|
-
export default Tooltip;
|
package/ui/Tooltip.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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 (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const mui_1 = require("tss-react/mui");
|
|
28
|
-
const mobx_react_1 = require("mobx-react");
|
|
29
|
-
const configuration_1 = require("../configuration");
|
|
30
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
31
|
-
hoverLabel: {
|
|
32
|
-
border: '1px solid black',
|
|
33
|
-
position: 'absolute',
|
|
34
|
-
background: '#fffa',
|
|
35
|
-
pointerEvents: 'none',
|
|
36
|
-
zIndex: 10000,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
const Tooltip = (0, mobx_react_1.observer)(function ({ offsetX, offsetY, configuration, feature, timeout = 300, }) {
|
|
40
|
-
const { classes } = useStyles();
|
|
41
|
-
const [shown, setShown] = (0, react_1.useState)(false);
|
|
42
|
-
(0, react_1.useEffect)(() => {
|
|
43
|
-
// only show the loading message after short timeout to prevent excessive
|
|
44
|
-
// flickering
|
|
45
|
-
const handle = setTimeout(() => setShown(true), timeout);
|
|
46
|
-
return () => clearTimeout(handle);
|
|
47
|
-
});
|
|
48
|
-
if (feature && shown) {
|
|
49
|
-
const text = (0, configuration_1.readConfObject)(configuration, 'mouseover', { feature });
|
|
50
|
-
return (react_1.default.createElement("div", { className: classes.hoverLabel, style: { left: offsetX, top: offsetY } }, text));
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
});
|
|
54
|
-
exports.default = Tooltip;
|
|
File without changes
|
/package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceHelpDialog.js → dialogs/HelpDialog.js}
RENAMED
|
File without changes
|
|
File without changes
|