@jbrowse/bandage-core 11.4.0 → 11.5.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.
Files changed (64) hide show
  1. package/dist/bubbles/superbubbles.js +3 -3
  2. package/dist/chunks/{chunk-JQ52XYD2.js → chunk-3BCVMZUT.js} +8 -8
  3. package/dist/chunks/{chunk-3HGYGISG.js → chunk-3U3C4PRK.js} +1 -1
  4. package/dist/chunks/{chunk-TEXAKEJX.js → chunk-5F4D35U5.js} +2 -2
  5. package/dist/chunks/{chunk-M75QPZNJ.js → chunk-64FCX424.js} +29 -18
  6. package/dist/chunks/{chunk-G3I4TCEZ.js → chunk-7EDGWT67.js} +1 -1
  7. package/dist/chunks/{chunk-I4BYUNJN.js → chunk-A32ZKSHN.js} +2 -2
  8. package/dist/chunks/{chunk-BXLLMWC3.js → chunk-AKLSY4GD.js} +1 -1
  9. package/dist/chunks/{chunk-6VVGFQ7S.js → chunk-EGBBIXTG.js} +1 -1
  10. package/dist/chunks/{chunk-TZLEHZVC.js → chunk-FWSERUJV.js} +1 -1
  11. package/dist/chunks/{chunk-GM7M25NW.js → chunk-HN3WHMPJ.js} +1 -1
  12. package/dist/chunks/{chunk-JDZ5GTZT.js → chunk-IOWLTUEB.js} +1 -1
  13. package/dist/chunks/{chunk-TUQKGAK3.js → chunk-J3JODFDF.js} +1 -1
  14. package/dist/chunks/chunk-JOLLU34X.js +21 -0
  15. package/dist/chunks/{chunk-XSF4RQRP.js → chunk-JOWKKQAL.js} +8 -6
  16. package/dist/chunks/{chunk-EFD753MS.js → chunk-K5LDBMLX.js} +1 -1
  17. package/dist/chunks/{chunk-N7G5ROIV.js → chunk-KOJKFNCW.js} +8 -8
  18. package/dist/chunks/{chunk-B5ARSBOH.js → chunk-NJGYLYU7.js} +7 -6
  19. package/dist/chunks/{chunk-6YJESZND.js → chunk-PQBALYSO.js} +13 -13
  20. package/dist/chunks/{chunk-3LZ334X4.js → chunk-RK3HRRCW.js} +1 -1
  21. package/dist/chunks/{chunk-VIQL7GZ4.js → chunk-TRGKMLXT.js} +1 -1
  22. package/dist/chunks/{chunk-TJOOHTJ6.js → chunk-VD4MLYEK.js} +1 -1
  23. package/dist/chunks/{chunk-FRTYQQDI.js → chunk-VQ7474EH.js} +5 -6
  24. package/dist/chunks/{chunk-7O7EGTYG.js → chunk-WC6HX6GJ.js} +1 -1
  25. package/dist/chunks/{chunk-REOWLPH4.js → chunk-WG5D2H7X.js} +4 -4
  26. package/dist/chunks/{chunk-QM7KEWWT.js → chunk-WLR4KJVI.js} +1 -1
  27. package/dist/chunks/{chunk-CE6ZIKJX.js → chunk-XKZ56L5A.js} +1 -1
  28. package/dist/cli/figure.js +21 -21
  29. package/dist/cli/fold.js +3 -3
  30. package/dist/figure.js +17 -17
  31. package/dist/figureData.js +18 -18
  32. package/dist/figureScene.js +12 -12
  33. package/dist/figureSettings.js +4 -4
  34. package/dist/gbzCut.js +1 -1
  35. package/dist/gfa/graphTables.js +1 -1
  36. package/dist/index.js +65 -59
  37. package/dist/layout/forceCache.js +4 -4
  38. package/dist/layout/tubeMapLayout.js +4 -4
  39. package/dist/layout/walkRowDraw.js +2 -2
  40. package/dist/layout/walkRowLayout.js +4 -4
  41. package/dist/layout/walkRowRuns.js +2 -2
  42. package/dist/layout/walkRows.js +3 -3
  43. package/dist/layout/walkStrip.js +7 -7
  44. package/dist/layoutModes.js +6 -6
  45. package/dist/locus.js +8 -0
  46. package/dist/pipeline.js +3 -3
  47. package/dist/referenceStrip.js +2 -2
  48. package/dist/renderer/GeometryBuilder.js +5 -3
  49. package/dist/tubeMap/bundle.js +5 -5
  50. package/dist/tubeMap/coarsen.js +5 -5
  51. package/dist/tubeMap/deviations.js +5 -5
  52. package/dist/tubeMap/draw.js +4 -4
  53. package/dist/tubeMap/nodeColors.js +2 -2
  54. package/dist/types/gfa/graphTables.d.ts +3 -2
  55. package/dist/types/index.d.ts +1 -0
  56. package/dist/types/locus.d.ts +10 -0
  57. package/dist/types/renderer/GeometryBuilder.d.ts +1 -0
  58. package/dist/types/version.d.ts +1 -1
  59. package/dist/version.js +1 -1
  60. package/dist/viewport.js +4 -4
  61. package/dist/walkEncoding.js +2 -2
  62. package/dist/walkHighlight.js +3 -3
  63. package/package.json +1 -1
  64. package/dist/chunks/{chunk-2Q22S52W.js → chunk-2E25TX4G.js} +6 -6
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  graphBubbles,
3
3
  superbubblesFromGraph
4
- } from "../chunks/chunk-2Q22S52W.js";
5
- import "../chunks/chunk-RFG42VIO.js";
6
- import "../chunks/chunk-PNMJFFNB.js";
4
+ } from "../chunks/chunk-2E25TX4G.js";
7
5
  import "../chunks/chunk-E4ZM4OOJ.js";
6
+ import "../chunks/chunk-RFG42VIO.js";
8
7
  import "../chunks/chunk-A4JDEUAI.js";
9
8
  import "../chunks/chunk-FX4RDMDN.js";
9
+ import "../chunks/chunk-PNMJFFNB.js";
10
10
  import "../chunks/chunk-UAFATXYA.js";
11
11
  import "../chunks/chunk-B5X2RLJG.js";
12
12
  import "../chunks/chunk-VX656OAZ.js";
@@ -4,27 +4,27 @@ import {
4
4
  import {
5
5
  facetLifts,
6
6
  walkLift
7
- } from "./chunk-FRTYQQDI.js";
8
- import {
9
- walkKey
10
- } from "./chunk-D4ZFRBB4.js";
7
+ } from "./chunk-VQ7474EH.js";
11
8
  import {
12
9
  buildGeometry,
13
10
  computeReferenceRamp
14
- } from "./chunk-XSF4RQRP.js";
11
+ } from "./chunk-JOWKKQAL.js";
12
+ import {
13
+ walkKey
14
+ } from "./chunk-D4ZFRBB4.js";
15
15
  import {
16
16
  walkRowsExtent
17
- } from "./chunk-TZLEHZVC.js";
17
+ } from "./chunk-FWSERUJV.js";
18
18
  import {
19
19
  pathLegend,
20
20
  walkLabelsOf
21
21
  } from "./chunk-3GP3KT5L.js";
22
22
  import {
23
23
  FIGURE_DEFAULTS
24
- } from "./chunk-EFD753MS.js";
24
+ } from "./chunk-K5LDBMLX.js";
25
25
  import {
26
26
  drawingBounds
27
- } from "./chunk-REOWLPH4.js";
27
+ } from "./chunk-WG5D2H7X.js";
28
28
  import {
29
29
  referenceLabel
30
30
  } from "./chunk-234NFZS4.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-A7H753BA.js";
10
10
  import {
11
11
  referenceWalkName
12
- } from "./chunk-M75QPZNJ.js";
12
+ } from "./chunk-64FCX424.js";
13
13
  import {
14
14
  pathOrigin
15
15
  } from "./chunk-B5X2RLJG.js";
@@ -3,7 +3,7 @@ import {
3
3
  hasTubeMapPaths,
4
4
  tubeMapLayout,
5
5
  tubeMapReferenceLayout
6
- } from "./chunk-3LZ334X4.js";
6
+ } from "./chunk-RK3HRRCW.js";
7
7
  import {
8
8
  sampleRowLayout
9
9
  } from "./chunk-GJU6BJJA.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-UAFATXYA.js";
16
16
  import {
17
17
  walkRowLayout
18
- } from "./chunk-TZLEHZVC.js";
18
+ } from "./chunk-FWSERUJV.js";
19
19
  import {
20
20
  isBackbone,
21
21
  isOffReference
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  tableNodeIds,
3
3
  tablePath
4
- } from "./chunk-B5ARSBOH.js";
4
+ } from "./chunk-NJGYLYU7.js";
5
5
  import {
6
6
  pathOrigin
7
7
  } from "./chunk-B5X2RLJG.js";
@@ -69,8 +69,8 @@ function graphPieces(graph) {
69
69
  heads,
70
70
  from,
71
71
  to,
72
- steps,
73
- lengths,
72
+ steps: Int32Array.from(steps),
73
+ lengths: Int32Array.from(lengths),
74
74
  names,
75
75
  reference: referenceWalkName(graph)
76
76
  };
@@ -92,8 +92,8 @@ function tablePieces(tables, referencePath, visits) {
92
92
  }
93
93
  return {
94
94
  heads,
95
- from: kept.map((p) => w.offsets[p]),
96
- to: kept.map((p) => w.offsets[p + 1]),
95
+ from: Int32Array.from(kept, (p) => w.offsets[p]),
96
+ to: Int32Array.from(kept, (p) => w.offsets[p + 1]),
97
97
  steps: w.steps,
98
98
  lengths: n.lengths,
99
99
  // a visit names its node as the Graph does, which costs a pass over the
@@ -120,24 +120,35 @@ var Columns = class {
120
120
  get length() {
121
121
  return this.values[0].length;
122
122
  }
123
- push(...row) {
124
- row.forEach((v, i) => this.values[i].push(v));
123
+ push(a, b, c, d, e) {
124
+ const v = this.values;
125
+ v[0].push(a);
126
+ v[1].push(b);
127
+ v[2].push(c);
128
+ v[3].push(d);
129
+ if (e !== void 0) {
130
+ v[4].push(e);
131
+ }
125
132
  }
126
133
  endRow() {
127
134
  this.offsets.push(this.length);
128
135
  }
129
136
  // the rows in `order`, column i in the array `make[i]` makes
130
137
  reorder(order, make) {
131
- const columns = make.map((m) => m(this.length));
132
138
  const offsets = new Uint32Array(order.length + 1);
133
- let at = 0;
134
139
  order.forEach((row, i) => {
135
- for (let k = this.offsets[row]; k < this.offsets[row + 1]; k++, at++) {
136
- columns.forEach((column, c) => {
137
- column[at] = this.values[c][k];
138
- });
140
+ offsets[i + 1] = offsets[i] + this.offsets[row + 1] - this.offsets[row];
141
+ });
142
+ const columns = make.map((m, c) => {
143
+ const from = this.values[c];
144
+ const out = m(this.length);
145
+ let at = 0;
146
+ for (const row of order) {
147
+ for (let k = this.offsets[row]; k < this.offsets[row + 1]; k++) {
148
+ out[at++] = from[k];
149
+ }
139
150
  }
140
- offsets[i + 1] = at;
151
+ return out;
141
152
  });
142
153
  return { offsets, columns };
143
154
  }
@@ -173,7 +184,7 @@ function walkRowRuns(source, region, o = {}) {
173
184
  const cut = region && region.end > region.start ? region : void 0;
174
185
  for (const piece of referencePieces) {
175
186
  let pos = startOf(piece) ?? 0;
176
- for (let s = from[piece]; s < to[piece]; s++) {
187
+ for (let s = from[piece], stop = to[piece]; s < stop; s++) {
177
188
  const node = all[s];
178
189
  const len = lengthOf(node);
179
190
  if (Number.isNaN(spanStart[node])) {
@@ -241,7 +252,7 @@ function walkRowRuns(source, region, o = {}) {
241
252
  stepStart[length++] = end;
242
253
  }
243
254
  let pos = start2 ?? 0;
244
- for (let s = from[piece]; s < to[piece]; s++) {
255
+ for (let s = from[piece], stop2 = to[piece]; s < stop2; s++) {
245
256
  const node = all[s];
246
257
  steps[length] = node;
247
258
  stepStart[length++] = pos;
@@ -298,8 +309,8 @@ function walkRowRuns(source, region, o = {}) {
298
309
  let bestEnd = -Infinity;
299
310
  let bestStart = Infinity;
300
311
  for (let i = 0; i < length; i++) {
301
- if (onReference(i)) {
302
- const id = steps[i];
312
+ const id = steps[i];
313
+ if (id >= 0 && !Number.isNaN(spanStart[id])) {
303
314
  if (spanEnd[id] <= cut.start && spanEnd[id] > bestEnd) {
304
315
  bestEnd = spanEnd[id];
305
316
  i0 = i;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computeColorSchemeRange,
3
3
  getNodeColor
4
- } from "./chunk-XSF4RQRP.js";
4
+ } from "./chunk-JOWKKQAL.js";
5
5
  import {
6
6
  abgrToCssRgba
7
7
  } from "./chunk-G2FD7S3C.js";
@@ -3,14 +3,14 @@ import {
3
3
  boxesGenes,
4
4
  rowPitch,
5
5
  rowSpan
6
- } from "./chunk-VIQL7GZ4.js";
6
+ } from "./chunk-TRGKMLXT.js";
7
7
  import {
8
8
  el
9
9
  } from "./chunk-H2H4Y3TV.js";
10
10
  import {
11
11
  READOUT_ROOM,
12
12
  longestBar
13
- } from "./chunk-TZLEHZVC.js";
13
+ } from "./chunk-FWSERUJV.js";
14
14
  import {
15
15
  pathOrigin
16
16
  } from "./chunk-B5X2RLJG.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  engineKey,
3
3
  forceLayout
4
- } from "./chunk-REOWLPH4.js";
4
+ } from "./chunk-WG5D2H7X.js";
5
5
 
6
6
  // src/layout/forceCache.ts
7
7
  var DEFAULT_SIZE = 4;
@@ -2,7 +2,7 @@ import {
2
2
  LIFT_BACKDROP_CSS,
3
3
  computeColorSchemeRange,
4
4
  getNodeColor
5
- } from "./chunk-XSF4RQRP.js";
5
+ } from "./chunk-JOWKKQAL.js";
6
6
  import {
7
7
  abgrToCssRgba
8
8
  } from "./chunk-G2FD7S3C.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  walkRows
3
- } from "./chunk-JDZ5GTZT.js";
3
+ } from "./chunk-IOWLTUEB.js";
4
4
  import {
5
5
  ROW_HEIGHT_PX
6
6
  } from "./chunk-CPMHA4W5.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  REFERENCE_RAMP_ALT_COLOR,
3
3
  hslToRgb
4
- } from "./chunk-XSF4RQRP.js";
4
+ } from "./chunk-JOWKKQAL.js";
5
5
  import {
6
6
  packAbgr
7
7
  } from "./chunk-G2FD7S3C.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  walkRowRuns,
3
3
  walkRowsOf
4
- } from "./chunk-M75QPZNJ.js";
4
+ } from "./chunk-64FCX424.js";
5
5
 
6
6
  // src/layout/walkRows.ts
7
7
  function filterSamples(rows, samples) {
@@ -28,7 +28,7 @@ function parseRegion(text) {
28
28
  const m = /^\s*([^:\s]+):([\d,]+)-([\d,]+)\s*$/.exec(text);
29
29
  if (!m) {
30
30
  throw new Error(
31
- `"${text}" is not a region like chr6:160,614,798-160,647,758`
31
+ `"${text}" is not a 0-based region like chr6:160,614,797-160,647,758`
32
32
  );
33
33
  }
34
34
  const n = (s) => Number(s.replaceAll(",", ""));
@@ -0,0 +1,21 @@
1
+ // src/locus.ts
2
+ var LOCUS = /^\s*([^:\s]+):\s*([\d,]+)(?:\s*(?:-|\.\.)\s*([\d,]+))?\s*$/;
3
+ function parseLocus(text) {
4
+ const m = LOCUS.exec(text);
5
+ if (!m) {
6
+ return void 0;
7
+ }
8
+ const n = (s) => Number(s.replaceAll(",", ""));
9
+ const start = n(m[2]) - 1;
10
+ const end = m[3] ? n(m[3]) : start + 1;
11
+ return start >= 0 && end > start ? { refName: m[1], start, end } : void 0;
12
+ }
13
+ var grouped = (n) => String(n).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
14
+ function formatLocus(r) {
15
+ return `${r.refName}:${grouped(r.start + 1)}-${grouped(r.end)}`;
16
+ }
17
+
18
+ export {
19
+ parseLocus,
20
+ formatLocus
21
+ };
@@ -265,6 +265,10 @@ function hashColor(str, alpha) {
265
265
  var REFERENCE_RAMP_ALT_RGB = [60, 65, 72];
266
266
  var REFERENCE_RAMP_ALT_COLOR = packAbgr(...REFERENCE_RAMP_ALT_RGB, 255);
267
267
  var REFERENCE_RAMP_ALT_CSS = `rgb(${REFERENCE_RAMP_ALT_RGB.join(", ")})`;
268
+ function rampFraction(node, ramp) {
269
+ const mid = ramp.midpoints.get(node.id);
270
+ return isBackbone(node) && mid !== void 0 ? (mid - ramp.start) / ramp.span : void 0;
271
+ }
268
272
  function computeReferenceRamp(graph, domain) {
269
273
  const midpoints = referenceMidpoints(graph);
270
274
  if (domain && domain.end > domain.start) {
@@ -348,12 +352,9 @@ function getNodeColor(node, nodeIndex, colorScheme, range) {
348
352
  if (ramp === void 0) {
349
353
  return packAbgr(160, 160, 160, 255);
350
354
  }
351
- const mid = ramp.midpoints.get(node.id);
352
- if (!isBackbone(node) || mid === void 0) {
353
- return REFERENCE_RAMP_ALT_COLOR;
354
- }
355
- return packHsl(
356
- rampHueAt((mid - ramp.start) / ramp.span),
355
+ const t = rampFraction(node, ramp);
356
+ return t === void 0 ? REFERENCE_RAMP_ALT_COLOR : packHsl(
357
+ rampHueAt(t),
357
358
  REFERENCE_RAMP_SATURATION,
358
359
  REFERENCE_RAMP_LIGHTNESS
359
360
  );
@@ -688,6 +689,7 @@ export {
688
689
  hslToRgb,
689
690
  REFERENCE_RAMP_ALT_COLOR,
690
691
  REFERENCE_RAMP_ALT_CSS,
692
+ rampFraction,
691
693
  computeReferenceRamp,
692
694
  computeColorSchemeRange,
693
695
  getNodeColor,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ENGINE_DEFAULTS
3
- } from "./chunk-REOWLPH4.js";
3
+ } from "./chunk-WG5D2H7X.js";
4
4
 
5
5
  // src/figureSettings.ts
6
6
  var FIGURE_DEFAULTS = {
@@ -3,25 +3,25 @@ import {
3
3
  } from "./chunk-JMABOQWL.js";
4
4
  import {
5
5
  layoutModeByValue
6
- } from "./chunk-TEXAKEJX.js";
6
+ } from "./chunk-5F4D35U5.js";
7
7
  import {
8
8
  parseRegion
9
- } from "./chunk-TUQKGAK3.js";
9
+ } from "./chunk-J3JODFDF.js";
10
10
  import {
11
11
  genePins
12
12
  } from "./chunk-77EGQQJU.js";
13
13
  import {
14
14
  version
15
- } from "./chunk-QM7KEWWT.js";
15
+ } from "./chunk-WLR4KJVI.js";
16
16
  import {
17
17
  axisScaleOf
18
- } from "./chunk-CE6ZIKJX.js";
18
+ } from "./chunk-XKZ56L5A.js";
19
19
  import {
20
20
  figureScene
21
- } from "./chunk-JQ52XYD2.js";
21
+ } from "./chunk-3BCVMZUT.js";
22
22
  import {
23
23
  encodingStops
24
- } from "./chunk-GM7M25NW.js";
24
+ } from "./chunk-HN3WHMPJ.js";
25
25
  import {
26
26
  abgrAlpha,
27
27
  abgrBlue,
@@ -30,13 +30,13 @@ import {
30
30
  } from "./chunk-G2FD7S3C.js";
31
31
  import {
32
32
  FIGURE_DEFAULTS
33
- } from "./chunk-EFD753MS.js";
33
+ } from "./chunk-K5LDBMLX.js";
34
34
  import {
35
35
  engineSettingsOf,
36
36
  fitTransform,
37
37
  forceLayout,
38
38
  loadGraph
39
- } from "./chunk-REOWLPH4.js";
39
+ } from "./chunk-WG5D2H7X.js";
40
40
  import {
41
41
  isBackbone
42
42
  } from "./chunk-RJWPJCIB.js";
@@ -55,7 +55,7 @@ function namesByList(lists, names, listCount, pathNames) {
55
55
  return out;
56
56
  });
57
57
  }
58
- function tableNodeIds({ nodes: n, links: l, walks: w }) {
58
+ function tableNodeIds({ nodes: n, links: l, walks: w }, traversals) {
59
59
  const canonical = new Uint8Array(n.names.length);
60
60
  const claim = (node, reversed) => {
61
61
  if (canonical[node] === 0) {
@@ -68,7 +68,11 @@ function tableNodeIds({ nodes: n, links: l, walks: w }) {
68
68
  }
69
69
  const stepCount = w.offsets[w.names.length] ?? 0;
70
70
  for (let s = 0; s < stepCount; s++) {
71
- claim(w.steps[s], w.reversed[s]);
71
+ const node = w.steps[s];
72
+ claim(node, w.reversed[s]);
73
+ if (traversals) {
74
+ traversals[node]++;
75
+ }
72
76
  }
73
77
  return n.names.map(
74
78
  (segment, i) => `${segment}${canonical[i] === 2 ? "-" : "+"}`
@@ -84,10 +88,7 @@ function graphFromTables({ nodes: n, links: l, walks: w }, name = "Imported GFA"
84
88
  }
85
89
  }
86
90
  const traversals = new Int32Array(count);
87
- for (const node of w.steps.subarray(0, w.offsets[w.names.length])) {
88
- traversals[node]++;
89
- }
90
- const ids = tableNodeIds({ nodes: n, links: l, walks: w });
91
+ const ids = tableNodeIds({ nodes: n, links: l, walks: w }, traversals);
91
92
  const nodes = [];
92
93
  for (let i = 0; i < declared; i++) {
93
94
  const ref = n.refs[i];
@@ -1,19 +1,19 @@
1
+ import {
2
+ stripGeneGaps,
3
+ walkStripFrame,
4
+ walkStripLabelsTree
5
+ } from "./chunk-A32ZKSHN.js";
1
6
  import {
2
7
  Canvas2DRenderer
3
8
  } from "./chunk-EJRJAAN7.js";
4
9
  import {
5
10
  svgCanvas
6
11
  } from "./chunk-V4YML3GR.js";
7
- import {
8
- stripGeneGaps,
9
- walkStripFrame,
10
- walkStripLabelsTree
11
- } from "./chunk-I4BYUNJN.js";
12
12
  import {
13
13
  walkRowsKey,
14
14
  walkRowsKeyTree,
15
15
  walkRowsTree
16
- } from "./chunk-VIQL7GZ4.js";
16
+ } from "./chunk-TRGKMLXT.js";
17
17
  import {
18
18
  EXON_COLOR,
19
19
  exonOutlineTree,
@@ -34,32 +34,32 @@ import {
34
34
  } from "./chunk-77EGQQJU.js";
35
35
  import {
36
36
  version
37
- } from "./chunk-QM7KEWWT.js";
37
+ } from "./chunk-WLR4KJVI.js";
38
38
  import {
39
39
  axisScaleOf
40
- } from "./chunk-CE6ZIKJX.js";
40
+ } from "./chunk-XKZ56L5A.js";
41
41
  import {
42
42
  figureScene
43
- } from "./chunk-JQ52XYD2.js";
43
+ } from "./chunk-3BCVMZUT.js";
44
44
  import {
45
45
  encodingStops
46
- } from "./chunk-GM7M25NW.js";
46
+ } from "./chunk-HN3WHMPJ.js";
47
47
  import {
48
48
  rangeText
49
49
  } from "./chunk-D4ZFRBB4.js";
50
50
  import {
51
51
  walkRowLabels
52
- } from "./chunk-TZLEHZVC.js";
52
+ } from "./chunk-FWSERUJV.js";
53
53
  import {
54
54
  nodeInk
55
55
  } from "./chunk-CRCD3ODN.js";
56
56
  import {
57
57
  FIGURE_DEFAULTS
58
- } from "./chunk-EFD753MS.js";
58
+ } from "./chunk-K5LDBMLX.js";
59
59
  import {
60
60
  FIT_PADDING,
61
61
  fitTransform
62
- } from "./chunk-REOWLPH4.js";
62
+ } from "./chunk-WG5D2H7X.js";
63
63
  import {
64
64
  LABEL_CHAR_PX,
65
65
  LABEL_PAD,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-A7H753BA.js";
6
6
  import {
7
7
  referenceWalkName
8
- } from "./chunk-M75QPZNJ.js";
8
+ } from "./chunk-64FCX424.js";
9
9
  import {
10
10
  pathCssColor,
11
11
  pathGreyCssColor
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-H2H4Y3TV.js";
4
4
  import {
5
5
  REFERENCE_RAMP_ALT_CSS
6
- } from "./chunk-XSF4RQRP.js";
6
+ } from "./chunk-JOWKKQAL.js";
7
7
  import {
8
8
  RAMP_GRADIENT_CSS,
9
9
  RAMP_GRADIENT_STOPS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pathSteps
3
- } from "./chunk-3LZ334X4.js";
3
+ } from "./chunk-RK3HRRCW.js";
4
4
  import {
5
5
  pathOrigin
6
6
  } from "./chunk-B5X2RLJG.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  encodedColor,
3
3
  resolveEncoding
4
- } from "./chunk-GM7M25NW.js";
4
+ } from "./chunk-HN3WHMPJ.js";
5
+ import {
6
+ rampFraction
7
+ } from "./chunk-JOWKKQAL.js";
5
8
  import {
6
9
  pathOrigin
7
10
  } from "./chunk-B5X2RLJG.js";
8
11
  import {
9
12
  gapParts
10
13
  } from "./chunk-EIY2SKD3.js";
11
- import {
12
- isBackbone
13
- } from "./chunk-RJWPJCIB.js";
14
14
  import {
15
15
  panSNContig
16
16
  } from "./chunk-4XWZNPQ2.js";
@@ -117,8 +117,7 @@ function laneColors(byId, walk, encoding, ramp) {
117
117
  const colors = /* @__PURE__ */ new Map();
118
118
  for (const [id, progress] of walk.progress) {
119
119
  const node = byId.get(id);
120
- const mid = ramp?.midpoints.get(id);
121
- const t = encoding.field === "progress" ? progress : ramp && mid !== void 0 && node && isBackbone(node) ? (mid - ramp.start) / ramp.span : void 0;
120
+ const t = encoding.field === "progress" ? progress : ramp && node ? rampFraction(node, ramp) : void 0;
122
121
  colors.set(id, encodedColor(encoding, t));
123
122
  }
124
123
  return colors;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pathSteps
3
- } from "./chunk-3LZ334X4.js";
3
+ } from "./chunk-RK3HRRCW.js";
4
4
  import {
5
5
  pathOrigin
6
6
  } from "./chunk-B5X2RLJG.js";
@@ -1,12 +1,12 @@
1
+ import {
2
+ smoothChain
3
+ } from "./chunk-OPPVSPEF.js";
1
4
  import {
2
5
  orientToReference
3
6
  } from "./chunk-3PZSBNLI.js";
4
7
  import {
5
8
  seededNodes
6
9
  } from "./chunk-CKUVEHSS.js";
7
- import {
8
- smoothChain
9
- } from "./chunk-OPPVSPEF.js";
10
10
  import {
11
11
  routeNodes,
12
12
  takeRoutes,
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-5I3K4R2G.js";
21
21
  import {
22
22
  graphFromTables
23
- } from "./chunk-B5ARSBOH.js";
23
+ } from "./chunk-NJGYLYU7.js";
24
24
  import {
25
25
  anchorGraph
26
26
  } from "./chunk-B5X2RLJG.js";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var version = "11.4.0";
2
+ var version = "11.5.0";
3
3
 
4
4
  export {
5
5
  version
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clampZoom
3
- } from "./chunk-REOWLPH4.js";
3
+ } from "./chunk-WG5D2H7X.js";
4
4
 
5
5
  // src/viewport.ts
6
6
  function axisScaleOf(scale, pixelRows) {