react-msaview-cli 8.1.0 → 8.2.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/dist/index.js +204 -57
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -51230,9 +51230,9 @@ function renderFeaturePanel({ ctx, model: model2, theme, panel, x: x2, offsetY,
|
|
|
51230
51230
|
top: (y2, lane, h2) => y2 - rowHeight + lane * (h2 + rowPadding) + rowPadding / 2,
|
|
51231
51231
|
headLength: (h2) => h2
|
|
51232
51232
|
},
|
|
51233
|
-
xOf: (
|
|
51233
|
+
xOf: (span2) => [span2.xStart, span2.xEnd],
|
|
51234
51234
|
colors: panel.colors,
|
|
51235
|
-
labelOf: (
|
|
51235
|
+
labelOf: (span2) => panel.labels?.get(span2.annotation),
|
|
51236
51236
|
contrastText: contrastTextFn(theme),
|
|
51237
51237
|
xMin: 0,
|
|
51238
51238
|
xMax: panel.width
|
|
@@ -67534,6 +67534,113 @@ var init_headlessRenderEnv = __esm({
|
|
|
67534
67534
|
}
|
|
67535
67535
|
});
|
|
67536
67536
|
|
|
67537
|
+
// ../lib/dist/expandSpec.js
|
|
67538
|
+
function parseSpan(text2, what) {
|
|
67539
|
+
const match2 = span.exec(text2.trim());
|
|
67540
|
+
if (!match2) {
|
|
67541
|
+
throw new Error(`${what} "${text2}" is not "start", "start-end" or either followed by a label`);
|
|
67542
|
+
}
|
|
67543
|
+
const start = Number(match2[1]);
|
|
67544
|
+
const end = match2[2] === void 0 ? start : Number(match2[2]);
|
|
67545
|
+
return { start, end, label: match2[3] };
|
|
67546
|
+
}
|
|
67547
|
+
function withRow(entry, query) {
|
|
67548
|
+
const { row, ...rest } = entry;
|
|
67549
|
+
const resolved = row === void 0 ? query : row ?? void 0;
|
|
67550
|
+
return resolved === void 0 ? rest : { ...rest, row: resolved };
|
|
67551
|
+
}
|
|
67552
|
+
function expandHighlight(entry, query) {
|
|
67553
|
+
if (typeof entry === "object") {
|
|
67554
|
+
return entry.rows ? entry : withRow(entry, entry.start === void 0 ? void 0 : query);
|
|
67555
|
+
}
|
|
67556
|
+
const { start, end, label } = parseSpan(String(entry), "highlight");
|
|
67557
|
+
const single = start === end && query !== void 0;
|
|
67558
|
+
return {
|
|
67559
|
+
...query === void 0 ? {} : { row: query },
|
|
67560
|
+
start,
|
|
67561
|
+
end,
|
|
67562
|
+
...label ? { label } : single ? { label: residueLabel } : {}
|
|
67563
|
+
};
|
|
67564
|
+
}
|
|
67565
|
+
function expandRegion(region, query) {
|
|
67566
|
+
if (typeof region === "string") {
|
|
67567
|
+
const { start, end } = parseSpan(region, "region");
|
|
67568
|
+
const parsed = { start, end };
|
|
67569
|
+
return withRow(parsed, query);
|
|
67570
|
+
}
|
|
67571
|
+
return withRow(region, query);
|
|
67572
|
+
}
|
|
67573
|
+
function slug(name) {
|
|
67574
|
+
return name.toLowerCase().replaceAll(/[^a-z0-9]+/g, "-").replaceAll(/^-|-$/g, "");
|
|
67575
|
+
}
|
|
67576
|
+
function kindOf(track) {
|
|
67577
|
+
if (track.kind) {
|
|
67578
|
+
return track.kind;
|
|
67579
|
+
}
|
|
67580
|
+
if (track.values) {
|
|
67581
|
+
return "bar";
|
|
67582
|
+
}
|
|
67583
|
+
if (track.data !== void 0) {
|
|
67584
|
+
return "text";
|
|
67585
|
+
}
|
|
67586
|
+
if (track.arcs) {
|
|
67587
|
+
return "arc";
|
|
67588
|
+
}
|
|
67589
|
+
throw new Error(`column track "${track.name}" has no values, data or arcs to take its kind from`);
|
|
67590
|
+
}
|
|
67591
|
+
function expandTrack(track, query, ids) {
|
|
67592
|
+
const { start, ...rest } = track;
|
|
67593
|
+
const pad2 = start && start > 1 ? start - 1 : 0;
|
|
67594
|
+
let id = track.id ?? (slug(track.name) || "track");
|
|
67595
|
+
for (let n2 = 2; !track.id && ids.has(id); n2++) {
|
|
67596
|
+
id = `${slug(track.name) || "track"}-${n2}`;
|
|
67597
|
+
}
|
|
67598
|
+
ids.add(id);
|
|
67599
|
+
return {
|
|
67600
|
+
...withRow(rest, query),
|
|
67601
|
+
id,
|
|
67602
|
+
kind: kindOf(track),
|
|
67603
|
+
...pad2 && track.values ? { values: [...Array(pad2).fill(0), ...track.values] } : {},
|
|
67604
|
+
...pad2 && track.data !== void 0 ? { data: " ".repeat(pad2) + track.data } : {}
|
|
67605
|
+
};
|
|
67606
|
+
}
|
|
67607
|
+
function isInlineMsa(msa) {
|
|
67608
|
+
return msa.includes("\n");
|
|
67609
|
+
}
|
|
67610
|
+
function isInlineTree(tree) {
|
|
67611
|
+
return tree.trimStart().startsWith("(");
|
|
67612
|
+
}
|
|
67613
|
+
function uri(location2) {
|
|
67614
|
+
return { uri: location2, locationType: "UriLocation" };
|
|
67615
|
+
}
|
|
67616
|
+
function expandSpec(spec) {
|
|
67617
|
+
const { query, msa, tree, highlights, region, columnTracks, ...rest } = spec;
|
|
67618
|
+
const data = {
|
|
67619
|
+
...rest.data,
|
|
67620
|
+
...msa !== void 0 && isInlineMsa(msa) ? { msa } : {},
|
|
67621
|
+
...tree !== void 0 && isInlineTree(tree) ? { tree } : {}
|
|
67622
|
+
};
|
|
67623
|
+
const ids = new Set((columnTracks ?? []).map((t3) => t3.id).filter((id) => id !== void 0));
|
|
67624
|
+
return {
|
|
67625
|
+
...rest,
|
|
67626
|
+
...msa !== void 0 && !isInlineMsa(msa) ? { msaFilehandle: uri(msa) } : {},
|
|
67627
|
+
...tree !== void 0 && !isInlineTree(tree) ? { treeFilehandle: uri(tree) } : {},
|
|
67628
|
+
...Object.keys(data).length > 0 ? { data } : {},
|
|
67629
|
+
...query !== void 0 && rest.relativeTo === void 0 ? { relativeTo: query } : {},
|
|
67630
|
+
...highlights ? { highlights: highlights.map((h2) => expandHighlight(h2, query)) } : {},
|
|
67631
|
+
...region === void 0 ? {} : { region: expandRegion(region, query) },
|
|
67632
|
+
...columnTracks ? { columnTracks: columnTracks.map((t3) => expandTrack(t3, query, ids)) } : {}
|
|
67633
|
+
};
|
|
67634
|
+
}
|
|
67635
|
+
var residueLabel, span;
|
|
67636
|
+
var init_expandSpec = __esm({
|
|
67637
|
+
"../lib/dist/expandSpec.js"() {
|
|
67638
|
+
"use strict";
|
|
67639
|
+
residueLabel = "{residue}{position}";
|
|
67640
|
+
span = /^(\d+)(?:-(\d+))?(?:\s+(.+))?$/;
|
|
67641
|
+
}
|
|
67642
|
+
});
|
|
67643
|
+
|
|
67537
67644
|
// ../../node_modules/.pnpm/@jbrowse+core@file+vendor-jbrowse+jbrowse-core.tgz_@emotion+styled@11.14.1_@emotion+rea_7090bbe2527c98dca0fac05344a682ca/node_modules/@jbrowse/core/esm/util/environment.js
|
|
67538
67645
|
var isElectron, isNode, rIC;
|
|
67539
67646
|
var init_environment = __esm({
|
|
@@ -71865,8 +71972,8 @@ var init_mst = __esm({
|
|
|
71865
71972
|
if (snap.locationType) {
|
|
71866
71973
|
return snap;
|
|
71867
71974
|
} else {
|
|
71868
|
-
const { uri:
|
|
71869
|
-
const inferredLocationType =
|
|
71975
|
+
const { uri: uri3, localPath, blob } = snap;
|
|
71976
|
+
const inferredLocationType = uri3 !== void 0 ? "UriLocation" : localPath !== void 0 ? "LocalPathLocation" : blob !== void 0 ? "BlobLocation" : "FileHandleLocation";
|
|
71870
71977
|
return { ...snap, locationType: inferredLocationType };
|
|
71871
71978
|
}
|
|
71872
71979
|
}
|
|
@@ -75533,12 +75640,12 @@ var init_measureText = __esm({
|
|
|
75533
75640
|
|
|
75534
75641
|
// ../../node_modules/.pnpm/@jbrowse+core@file+vendor-jbrowse+jbrowse-core.tgz_@emotion+styled@11.14.1_@emotion+rea_7090bbe2527c98dca0fac05344a682ca/node_modules/@jbrowse/core/esm/util/getStr.js
|
|
75535
75642
|
function getUriLink(value) {
|
|
75536
|
-
const { uri:
|
|
75643
|
+
const { uri: uri3, baseUri = "" } = value;
|
|
75537
75644
|
let href;
|
|
75538
75645
|
try {
|
|
75539
|
-
href = new URL(
|
|
75646
|
+
href = new URL(uri3, baseUri).href;
|
|
75540
75647
|
} catch {
|
|
75541
|
-
href =
|
|
75648
|
+
href = uri3;
|
|
75542
75649
|
}
|
|
75543
75650
|
return href;
|
|
75544
75651
|
}
|
|
@@ -76061,14 +76168,14 @@ async function copyToClipboard(text2, options2 = {}) {
|
|
|
76061
76168
|
function execCommandCopy(text2, format2) {
|
|
76062
76169
|
const selection = document.getSelection();
|
|
76063
76170
|
const previousRange = selection && selection.rangeCount > 0 ? selection.getRangeAt(0) : void 0;
|
|
76064
|
-
const
|
|
76065
|
-
|
|
76066
|
-
|
|
76067
|
-
|
|
76068
|
-
|
|
76069
|
-
|
|
76070
|
-
|
|
76071
|
-
document.body.append(
|
|
76171
|
+
const span2 = document.createElement("span");
|
|
76172
|
+
span2.textContent = text2;
|
|
76173
|
+
span2.style.whiteSpace = "pre";
|
|
76174
|
+
span2.style.position = "fixed";
|
|
76175
|
+
span2.style.top = "0";
|
|
76176
|
+
span2.style.left = "0";
|
|
76177
|
+
span2.style.opacity = "0";
|
|
76178
|
+
document.body.append(span2);
|
|
76072
76179
|
const listener = (e3) => {
|
|
76073
76180
|
if (e3.clipboardData) {
|
|
76074
76181
|
e3.clipboardData.clearData();
|
|
@@ -76080,7 +76187,7 @@ function execCommandCopy(text2, format2) {
|
|
|
76080
76187
|
let success = false;
|
|
76081
76188
|
try {
|
|
76082
76189
|
const range = document.createRange();
|
|
76083
|
-
range.selectNodeContents(
|
|
76190
|
+
range.selectNodeContents(span2);
|
|
76084
76191
|
selection?.removeAllRanges();
|
|
76085
76192
|
selection?.addRange(range);
|
|
76086
76193
|
success = document.execCommand("copy");
|
|
@@ -76092,7 +76199,7 @@ function execCommandCopy(text2, format2) {
|
|
|
76092
76199
|
if (previousRange) {
|
|
76093
76200
|
selection?.addRange(previousRange);
|
|
76094
76201
|
}
|
|
76095
|
-
|
|
76202
|
+
span2.remove();
|
|
76096
76203
|
}
|
|
76097
76204
|
return success;
|
|
76098
76205
|
}
|
|
@@ -80037,39 +80144,39 @@ var require_source_map = __commonJS({
|
|
|
80037
80144
|
});
|
|
80038
80145
|
|
|
80039
80146
|
// ../../node_modules/.pnpm/@jbrowse+core@file+vendor-jbrowse+jbrowse-core.tgz_@emotion+styled@11.14.1_@emotion+rea_7090bbe2527c98dca0fac05344a682ca/node_modules/@jbrowse/core/esm/ui/mapStackTrace.js
|
|
80040
|
-
async function myfetchtext(
|
|
80041
|
-
const res = await fetch(
|
|
80147
|
+
async function myfetchtext(uri3) {
|
|
80148
|
+
const res = await fetch(uri3);
|
|
80042
80149
|
if (!res.ok) {
|
|
80043
|
-
throw new Error(`HTTP ${res.status} fetching ${
|
|
80150
|
+
throw new Error(`HTTP ${res.status} fetching ${uri3}: ${await res.text()}`);
|
|
80044
80151
|
}
|
|
80045
80152
|
return res.text();
|
|
80046
80153
|
}
|
|
80047
|
-
function sourceMapUrl(script,
|
|
80154
|
+
function sourceMapUrl(script, uri3) {
|
|
80048
80155
|
const mapUri = [...script.matchAll(sourceMappingUrlRe)].at(-1)?.[1]?.trim();
|
|
80049
80156
|
let url;
|
|
80050
80157
|
if (mapUri) {
|
|
80051
|
-
url = new URL(mapUri,
|
|
80158
|
+
url = new URL(mapUri, uri3);
|
|
80052
80159
|
if (!url.search && url.protocol !== "data:") {
|
|
80053
|
-
url.search = new URL(
|
|
80160
|
+
url.search = new URL(uri3).search;
|
|
80054
80161
|
}
|
|
80055
80162
|
}
|
|
80056
80163
|
return url?.href;
|
|
80057
80164
|
}
|
|
80058
|
-
async function loadSourceMap(
|
|
80165
|
+
async function loadSourceMap(uri3) {
|
|
80059
80166
|
try {
|
|
80060
|
-
const mapUrl = sourceMapUrl(await myfetchtext(
|
|
80167
|
+
const mapUrl = sourceMapUrl(await myfetchtext(uri3), uri3);
|
|
80061
80168
|
return mapUrl ? new import_source_map_js.SourceMapConsumer(JSON.parse(await myfetchtext(mapUrl))) : void 0;
|
|
80062
80169
|
} catch {
|
|
80063
80170
|
return void 0;
|
|
80064
80171
|
}
|
|
80065
80172
|
}
|
|
80066
|
-
function getSourceMap(
|
|
80067
|
-
const existing = sourceMaps.get(
|
|
80173
|
+
function getSourceMap(uri3) {
|
|
80174
|
+
const existing = sourceMaps.get(uri3);
|
|
80068
80175
|
if (existing) {
|
|
80069
80176
|
return existing;
|
|
80070
80177
|
} else {
|
|
80071
|
-
const map2 = loadSourceMap(
|
|
80072
|
-
sourceMaps.set(
|
|
80178
|
+
const map2 = loadSourceMap(uri3);
|
|
80179
|
+
sourceMaps.set(uri3, map2);
|
|
80073
80180
|
return map2;
|
|
80074
80181
|
}
|
|
80075
80182
|
}
|
|
@@ -86329,12 +86436,12 @@ var init_SimpleField = __esm({
|
|
|
86329
86436
|
|
|
86330
86437
|
// ../../node_modules/.pnpm/@jbrowse+core@file+vendor-jbrowse+jbrowse-core.tgz_@emotion+styled@11.14.1_@emotion+rea_7090bbe2527c98dca0fac05344a682ca/node_modules/@jbrowse/core/esm/BaseFeatureWidget/BaseFeatureDetail/UriField.js
|
|
86331
86438
|
function UriField({ value, prefix: prefix2, name }) {
|
|
86332
|
-
const { uri:
|
|
86439
|
+
const { uri: uri3, baseUri = "" } = value;
|
|
86333
86440
|
let href;
|
|
86334
86441
|
try {
|
|
86335
|
-
href = new URL(
|
|
86442
|
+
href = new URL(uri3, baseUri).href;
|
|
86336
86443
|
} catch {
|
|
86337
|
-
href =
|
|
86444
|
+
href = uri3;
|
|
86338
86445
|
}
|
|
86339
86446
|
return (0, import_jsx_runtime177.jsx)(SimpleField, { name, prefix: prefix2, value: href });
|
|
86340
86447
|
}
|
|
@@ -111161,21 +111268,21 @@ var init_csvSerializer = __esm({
|
|
|
111161
111268
|
|
|
111162
111269
|
// ../../node_modules/.pnpm/@mui+x-data-grid@9.10.1_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_support_99c4788b624f401637c043973d33a0af/node_modules/@mui/x-data-grid/hooks/features/clipboard/useGridClipboard.mjs
|
|
111163
111270
|
function writeToClipboardPolyfill(data) {
|
|
111164
|
-
const
|
|
111165
|
-
|
|
111166
|
-
|
|
111167
|
-
|
|
111168
|
-
|
|
111169
|
-
document.body.appendChild(
|
|
111271
|
+
const span2 = document.createElement("span");
|
|
111272
|
+
span2.style.whiteSpace = "pre";
|
|
111273
|
+
span2.style.userSelect = "all";
|
|
111274
|
+
span2.style.opacity = "0px";
|
|
111275
|
+
span2.textContent = data;
|
|
111276
|
+
document.body.appendChild(span2);
|
|
111170
111277
|
const range = document.createRange();
|
|
111171
|
-
range.selectNode(
|
|
111278
|
+
range.selectNode(span2);
|
|
111172
111279
|
const selection = window.getSelection();
|
|
111173
111280
|
selection.removeAllRanges();
|
|
111174
111281
|
selection.addRange(range);
|
|
111175
111282
|
try {
|
|
111176
111283
|
document.execCommand("copy");
|
|
111177
111284
|
} finally {
|
|
111178
|
-
document.body.removeChild(
|
|
111285
|
+
document.body.removeChild(span2);
|
|
111179
111286
|
}
|
|
111180
111287
|
}
|
|
111181
111288
|
function copyToClipboard2(data) {
|
|
@@ -121959,7 +122066,7 @@ var version3;
|
|
|
121959
122066
|
var init_version3 = __esm({
|
|
121960
122067
|
"../lib/dist/version.js"() {
|
|
121961
122068
|
"use strict";
|
|
121962
|
-
version3 = "8.
|
|
122069
|
+
version3 = "8.2.0";
|
|
121963
122070
|
}
|
|
121964
122071
|
});
|
|
121965
122072
|
|
|
@@ -122709,11 +122816,11 @@ function hoverLines({ model: model2, panel, name, x: x2 }) {
|
|
|
122709
122816
|
`${panel.header}: ${model2.rowDataOf(name)?.[panel.field] ?? "(none)"}`
|
|
122710
122817
|
];
|
|
122711
122818
|
}
|
|
122712
|
-
const
|
|
122713
|
-
if (!
|
|
122819
|
+
const span2 = panel.spans.get(name)?.findLast((s2) => x2 >= s2.xStart && x2 <= s2.xEnd);
|
|
122820
|
+
if (!span2) {
|
|
122714
122821
|
return [];
|
|
122715
122822
|
}
|
|
122716
|
-
const { annotation } =
|
|
122823
|
+
const { annotation } = span2;
|
|
122717
122824
|
const strand = annotation.strand === void 0 ? "" : annotation.strand < 0 ? " (-)" : " (+)";
|
|
122718
122825
|
const value = panel.field ? featureField(annotation, panel.field) : void 0;
|
|
122719
122826
|
return [
|
|
@@ -124063,7 +124170,7 @@ var init_util10 = __esm({
|
|
|
124063
124170
|
});
|
|
124064
124171
|
|
|
124065
124172
|
// ../lib/dist/components/import/ImportFormExamples.js
|
|
124066
|
-
function
|
|
124173
|
+
function uri2(url) {
|
|
124067
124174
|
return url ? { uri: url, locationType: "UriLocation" } : void 0;
|
|
124068
124175
|
}
|
|
124069
124176
|
var import_react92, import_mobx_react46, BASE, TREES, examples, ImportFormExamples, ImportFormExamples_default;
|
|
@@ -124130,7 +124237,7 @@ var init_ImportFormExamples = __esm({
|
|
|
124130
124237
|
if (inline4) {
|
|
124131
124238
|
model2.setData(inline4);
|
|
124132
124239
|
} else {
|
|
124133
|
-
load(model2,
|
|
124240
|
+
load(model2, uri2(msa), uri2(tree), uri2(gff));
|
|
124134
124241
|
}
|
|
124135
124242
|
} catch (e3) {
|
|
124136
124243
|
console.error(e3);
|
|
@@ -126025,6 +126132,14 @@ function stateModelFactory() {
|
|
|
126025
126132
|
* Persists in the snapshot and the URL.
|
|
126026
126133
|
*/
|
|
126027
126134
|
highlights: stripDefault2(types.array(types.frozen()), []),
|
|
126135
|
+
/**
|
|
126136
|
+
* #property
|
|
126137
|
+
* where the view opens, in `highlights` coordinates: `{row, start,
|
|
126138
|
+
* end}` zooms onto residues of that row, `{start, end}` onto alignment
|
|
126139
|
+
* columns. Applied once the alignment and any tree file have loaded,
|
|
126140
|
+
* then cleared, so a reloaded session keeps the reader's own scroll.
|
|
126141
|
+
*/
|
|
126142
|
+
region: types.frozen(),
|
|
126028
126143
|
/**
|
|
126029
126144
|
* #property
|
|
126030
126145
|
* clades of the tree with a mark drawn over them. `mrca` names tips
|
|
@@ -126276,6 +126391,12 @@ function stateModelFactory() {
|
|
|
126276
126391
|
setHighlightedColumns(columns) {
|
|
126277
126392
|
self.highlightedColumns = columns;
|
|
126278
126393
|
},
|
|
126394
|
+
/**
|
|
126395
|
+
* #action
|
|
126396
|
+
*/
|
|
126397
|
+
setRegion(region) {
|
|
126398
|
+
self.region = region;
|
|
126399
|
+
},
|
|
126279
126400
|
/**
|
|
126280
126401
|
* #action
|
|
126281
126402
|
*/
|
|
@@ -128299,6 +128420,19 @@ function stateModelFactory() {
|
|
|
128299
128420
|
}
|
|
128300
128421
|
return runs;
|
|
128301
128422
|
},
|
|
128423
|
+
/**
|
|
128424
|
+
* #method
|
|
128425
|
+
* a highlight label with `{residue}` and `{position}` filled in from the
|
|
128426
|
+
* row's letter at `start`, which is how the `175` shorthand draws "R175"
|
|
128427
|
+
*/
|
|
128428
|
+
fillHighlightLabel(label, row, start) {
|
|
128429
|
+
if (!label.includes("{")) {
|
|
128430
|
+
return label;
|
|
128431
|
+
}
|
|
128432
|
+
const col = row && start !== void 0 ? self.seqPosIndex(row)?.[start - 1] : void 0;
|
|
128433
|
+
const residue = row && col !== void 0 ? self.MSA?.getRow(row)[col] ?? "" : "";
|
|
128434
|
+
return label.replaceAll("{residue}", residue).replaceAll("{position}", start === void 0 ? "" : String(start));
|
|
128435
|
+
},
|
|
128302
128436
|
/**
|
|
128303
128437
|
* #getter
|
|
128304
128438
|
* `highlights` projected onto what is on screen: residue spans go
|
|
@@ -128313,7 +128447,10 @@ function stateModelFactory() {
|
|
|
128313
128447
|
...Object.values(transientHighlights).flat()
|
|
128314
128448
|
];
|
|
128315
128449
|
return all.flatMap(({ row, rows, start, end, label, color: color2 }) => {
|
|
128316
|
-
const base = {
|
|
128450
|
+
const base = {
|
|
128451
|
+
label: label && this.fillHighlightLabel(label, row, start),
|
|
128452
|
+
color: color2
|
|
128453
|
+
};
|
|
128317
128454
|
if (rows) {
|
|
128318
128455
|
const rowIndices = rows.map((name) => rowNamesSet.get(name)).filter(notEmpty);
|
|
128319
128456
|
return rowIndices.length ? [{ ...base, rowIndices }] : [];
|
|
@@ -128321,8 +128458,8 @@ function stateModelFactory() {
|
|
|
128321
128458
|
if (start === void 0 || end === void 0) {
|
|
128322
128459
|
return [];
|
|
128323
128460
|
}
|
|
128324
|
-
const
|
|
128325
|
-
return
|
|
128461
|
+
const span2 = self.visibleSpan({ row, start, end });
|
|
128462
|
+
return span2 ? [{ ...base, ...span2, rowIndices: [] }] : [];
|
|
128326
128463
|
});
|
|
128327
128464
|
},
|
|
128328
128465
|
/**
|
|
@@ -128617,13 +128754,13 @@ function stateModelFactory() {
|
|
|
128617
128754
|
* its width, or for a span that resolves to no visible column.
|
|
128618
128755
|
*/
|
|
128619
128756
|
zoomToRegion(region) {
|
|
128620
|
-
const
|
|
128621
|
-
if (!
|
|
128757
|
+
const span2 = self.visibleSpan(region);
|
|
128758
|
+
if (!span2 || !self.viewInitialized) {
|
|
128622
128759
|
return;
|
|
128623
128760
|
}
|
|
128624
128761
|
(0, import_mobx5.transaction)(() => {
|
|
128625
|
-
self.colWidth = clamp3(self.msaCanvasWidth / (
|
|
128626
|
-
self.scrollX = clamp3(-
|
|
128762
|
+
self.colWidth = clamp3(self.msaCanvasWidth / (span2.endCol - span2.startCol + 1), minColWidth, maxCellSize);
|
|
128763
|
+
self.scrollX = clamp3(-span2.startCol * self.colWidth, self.maxScrollX, 0);
|
|
128627
128764
|
});
|
|
128628
128765
|
},
|
|
128629
128766
|
/**
|
|
@@ -128656,6 +128793,13 @@ function stateModelFactory() {
|
|
|
128656
128793
|
}
|
|
128657
128794
|
}
|
|
128658
128795
|
}));
|
|
128796
|
+
addDisposer(self, (0, import_mobx5.autorun)(() => {
|
|
128797
|
+
const { region } = self;
|
|
128798
|
+
if (region && self.viewInitialized && self.numColumns > 0 && !(self.treeFilehandle && !self.data.tree)) {
|
|
128799
|
+
this.zoomToRegion(region);
|
|
128800
|
+
self.setRegion(void 0);
|
|
128801
|
+
}
|
|
128802
|
+
}));
|
|
128659
128803
|
if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
|
|
128660
128804
|
const query = () => window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
128661
128805
|
let mql = query();
|
|
@@ -129178,16 +129322,16 @@ var init_mount = __esm({
|
|
|
129178
129322
|
});
|
|
129179
129323
|
|
|
129180
129324
|
// ../lib/dist/element.js
|
|
129181
|
-
function location(
|
|
129182
|
-
return
|
|
129325
|
+
function location(uri3) {
|
|
129326
|
+
return uri3 ? { uri: uri3, locationType: "UriLocation" } : void 0;
|
|
129183
129327
|
}
|
|
129184
129328
|
function numberAttribute(value) {
|
|
129185
129329
|
const n2 = value ? Number(value) : Number.NaN;
|
|
129186
129330
|
return Number.isFinite(n2) ? n2 : void 0;
|
|
129187
129331
|
}
|
|
129188
129332
|
function parseHighlight(value, row) {
|
|
129189
|
-
return (value ?? "").split(",").flatMap((
|
|
129190
|
-
const [start, end] =
|
|
129333
|
+
return (value ?? "").split(",").flatMap((span2) => {
|
|
129334
|
+
const [start, end] = span2.split(":").map(numberAttribute);
|
|
129191
129335
|
return start === void 0 ? [] : [{ row, start, end: end ?? start }];
|
|
129192
129336
|
});
|
|
129193
129337
|
}
|
|
@@ -129470,10 +129614,12 @@ __export(dist_exports, {
|
|
|
129470
129614
|
MSAView: () => Loading_default,
|
|
129471
129615
|
MSAViewer: () => MSAViewer,
|
|
129472
129616
|
defineMsaElement: () => defineMsaElement,
|
|
129617
|
+
expandSpec: () => expandSpec,
|
|
129473
129618
|
installHeadlessRenderEnv: () => installHeadlessRenderEnv,
|
|
129474
129619
|
maxNeighborJoiningRows: () => maxNeighborJoiningRows,
|
|
129475
129620
|
mount: () => mount,
|
|
129476
129621
|
renderToSvg: () => renderToSvg,
|
|
129622
|
+
residueLabel: () => residueLabel,
|
|
129477
129623
|
useMsaSvgFigure: () => useMsaSvgFigure
|
|
129478
129624
|
});
|
|
129479
129625
|
var init_dist = __esm({
|
|
@@ -129482,6 +129628,7 @@ var init_dist = __esm({
|
|
|
129482
129628
|
init_renderToSvg();
|
|
129483
129629
|
init_headlessRenderEnv();
|
|
129484
129630
|
init_constants();
|
|
129631
|
+
init_expandSpec();
|
|
129485
129632
|
init_Loading2();
|
|
129486
129633
|
init_MSAViewer();
|
|
129487
129634
|
init_mount();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-msaview-cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@types/node": "^26.5.1",
|
|
21
21
|
"esbuild": "^0.28.2",
|
|
22
22
|
"mobx-react": "^10.0.2",
|
|
23
|
-
"msa-parsers": "8.
|
|
24
|
-
"react-msaview": "8.
|
|
23
|
+
"msa-parsers": "8.2.0",
|
|
24
|
+
"react-msaview": "8.2.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"jsdom": "^30.0.1"
|