@jbrowse/bandage-core 6.0.2 → 6.0.4

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 (73) hide show
  1. package/dist/bubbles/bubbleHalos.js +2 -2
  2. package/dist/chunks/{chunk-3PLYZLYV.js → chunk-2CVHXFK7.js} +18 -1
  3. package/dist/chunks/chunk-4BYTEJGW.js +44 -0
  4. package/dist/chunks/{chunk-X32PABB7.js → chunk-4EMPBO7S.js} +1 -1
  5. package/dist/chunks/{chunk-SV27AJCC.js → chunk-BUBZ32IC.js} +2 -2
  6. package/dist/chunks/{chunk-D3M7SBKL.js → chunk-CH3DLBUT.js} +22 -15
  7. package/dist/chunks/{chunk-Q3KCTA4N.js → chunk-CS3E4ETM.js} +1 -1
  8. package/dist/chunks/{chunk-57ZIXHZA.js → chunk-CTSBC2O6.js} +1 -1
  9. package/dist/chunks/{chunk-HB6PDCOU.js → chunk-DKOB2OPC.js} +2 -2
  10. package/dist/chunks/{chunk-CZ54VG2H.js → chunk-FZCOVJAL.js} +15 -15
  11. package/dist/chunks/{chunk-AE3UQZY3.js → chunk-GOY6REMT.js} +1 -1
  12. package/dist/chunks/{chunk-VKB57ZYE.js → chunk-IO2PCPZI.js} +2 -2
  13. package/dist/chunks/{chunk-3C2LGJKY.js → chunk-ISEI2FH3.js} +1 -1
  14. package/dist/chunks/{chunk-L5RYUPZI.js → chunk-MQJUG2D2.js} +1 -1
  15. package/dist/chunks/{chunk-LVZZH2NI.js → chunk-MREQ7GIA.js} +2 -2
  16. package/dist/chunks/{chunk-HCANBJDD.js → chunk-N62KBLFC.js} +3 -3
  17. package/dist/chunks/{chunk-QCYM44UL.js → chunk-PJESIRDU.js} +2 -2
  18. package/dist/chunks/{chunk-KCW7L3NV.js → chunk-QFBZQJFK.js} +1 -1
  19. package/dist/chunks/{chunk-P7B3GDAY.js → chunk-R6ZUK4Y3.js} +1 -1
  20. package/dist/chunks/{chunk-3WHKR5TY.js → chunk-RX5CSWJW.js} +7 -6
  21. package/dist/chunks/{chunk-HIJVRRYE.js → chunk-SMQ545MU.js} +4 -2
  22. package/dist/chunks/{chunk-527AI7CP.js → chunk-T43W7NKK.js} +1 -1
  23. package/dist/chunks/{chunk-SDGM243E.js → chunk-TAMCZHLW.js} +1 -1
  24. package/dist/chunks/chunk-UMNCCYBN.js +50 -0
  25. package/dist/chunks/{chunk-MHGHYHTL.js → chunk-V5BPIOLS.js} +1 -1
  26. package/dist/chunks/{chunk-IMW3AK27.js → chunk-X4VVPLI5.js} +4 -2
  27. package/dist/chunks/{chunk-7CHJKABZ.js → chunk-X5L37W4J.js} +1 -1
  28. package/dist/chunks/{chunk-6YRRNX2P.js → chunk-Y3IOTZJA.js} +2 -2
  29. package/dist/chunks/{chunk-BJV2W4KZ.js → chunk-YMSSF2RK.js} +2 -2
  30. package/dist/chunks/{chunk-5QT6NPSO.js → chunk-ZHCDYSA5.js} +1 -1
  31. package/dist/chunks/{chunk-6Q6HFBJT.js → chunk-ZKGM7VLA.js} +1 -1
  32. package/dist/chunks/{chunk-YJQ7CT7F.js → chunk-ZZA2AFB4.js} +4 -2
  33. package/dist/cli/figure.js +26 -25
  34. package/dist/deletionEdges.js +2 -2
  35. package/dist/figure.js +24 -23
  36. package/dist/genes/genePins.js +3 -3
  37. package/dist/graphLabels.js +4 -4
  38. package/dist/index.js +38 -38
  39. package/dist/labelLayout.js +8 -8
  40. package/dist/layout/mergeRuns.js +2 -2
  41. package/dist/layout/tubeMapLayout.js +6 -6
  42. package/dist/layout/walkRowDraw.js +10 -10
  43. package/dist/layout/walkStrip.js +11 -11
  44. package/dist/layoutModes.js +7 -7
  45. package/dist/pathColors.js +5 -5
  46. package/dist/pipeline.js +4 -4
  47. package/dist/referenceRampCss.js +9 -9
  48. package/dist/referenceStrip.js +9 -9
  49. package/dist/renderer/Canvas2DRenderer.js +3 -2
  50. package/dist/renderer/GeometryBuilder.js +8 -8
  51. package/dist/renderer/canvas.js +12 -0
  52. package/dist/renderer/colorBits.js +17 -3
  53. package/dist/tubeMap/axis.js +5 -5
  54. package/dist/tubeMap/coarsen.js +6 -6
  55. package/dist/tubeMap/genes.js +6 -6
  56. package/dist/tubeMap/nodeColors.js +9 -9
  57. package/dist/types/index.d.ts +1 -1
  58. package/dist/types/pansn.d.ts +7 -4
  59. package/dist/types/renderer/Canvas2DRenderer.d.ts +6 -2
  60. package/dist/types/renderer/canvas.d.ts +4 -0
  61. package/dist/types/renderer/colorBits.d.ts +7 -0
  62. package/dist/types/version.d.ts +1 -1
  63. package/dist/util/SpatialIndex.js +4 -4
  64. package/dist/util/edgeCurves.js +3 -3
  65. package/dist/util/geometry.js +1 -1
  66. package/dist/util/hitDetection.js +5 -5
  67. package/dist/version.js +1 -1
  68. package/dist/viewport.js +5 -5
  69. package/dist/walkEncoding.js +9 -9
  70. package/dist/walkHighlight.js +10 -10
  71. package/dist/walkKey.js +5 -5
  72. package/package.json +2 -4
  73. package/dist/chunks/chunk-MNUSQCLG.js +0 -29
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  bubbleHalos
3
- } from "../chunks/chunk-3C2LGJKY.js";
3
+ } from "../chunks/chunk-ISEI2FH3.js";
4
4
  import "../chunks/chunk-WOO7QYKB.js";
5
5
  import "../chunks/chunk-MFKORG3F.js";
6
- import "../chunks/chunk-3PLYZLYV.js";
6
+ import "../chunks/chunk-2CVHXFK7.js";
7
7
  import "../chunks/chunk-CPMHA4W5.js";
8
8
  import "../chunks/chunk-FYQWPEEY.js";
9
9
  export {
@@ -159,6 +159,20 @@ function facingSides(fromSegments, toSegments) {
159
159
  to: facingSide(toSegments, spanOf(fromSegments), "start")
160
160
  };
161
161
  }
162
+ var laidSides = /* @__PURE__ */ new WeakMap();
163
+ function heldFacingSides(fromSegments, toSegments) {
164
+ let byTo = laidSides.get(fromSegments);
165
+ if (!byTo) {
166
+ byTo = /* @__PURE__ */ new WeakMap();
167
+ laidSides.set(fromSegments, byTo);
168
+ }
169
+ let sides = byTo.get(toSegments);
170
+ if (!sides) {
171
+ sides = facingSides(fromSegments, toSegments);
172
+ byTo.set(toSegments, sides);
173
+ }
174
+ return sides;
175
+ }
162
176
  var APEX_FRACTION = 0.75;
163
177
  var BOW_CLEARANCE = 1.15;
164
178
  var ALONG_FRACTION = 0.35;
@@ -298,6 +312,9 @@ function computeEdgeCurves(fromSegments, toSegments, join, offsetX, offsetY, axi
298
312
  const scale = axis.scaleX;
299
313
  const yToX = yToXOf(axis);
300
314
  const maxBow = maxBowIn ?? (axis.pixelRows ? MAX_ROW_BOW_PX : void 0);
315
+ if (join === false) {
316
+ join = heldFacingSides(fromSegments, toSegments);
317
+ }
301
318
  if (yToX !== 1) {
302
319
  return unscaleYOf(
303
320
  computeEdgeCurves(
@@ -324,7 +341,7 @@ function computeEdgeCurves(fromSegments, toSegments, join, offsetX, offsetY, axi
324
341
  );
325
342
  }
326
343
  const loop = join === true;
327
- const sides = loop ? { from: "end", to: "start" } : join || facingSides(fromSegments, toSegments);
344
+ const sides = join === true ? { from: "end", to: "start" } : join;
328
345
  const fromAttach = attachment(fromSegments, sides.from);
329
346
  const toAttach = attachment(toSegments, sides.to);
330
347
  const fromEnd = fromAttach.at;
@@ -0,0 +1,44 @@
1
+ // src/renderer/canvas.ts
2
+ var MAX_DPR = 2;
3
+ var MAX_CANVAS_DIM_PX = 8192;
4
+ function getDpr() {
5
+ return typeof devicePixelRatio === "undefined" ? 1 : Math.min(devicePixelRatio, MAX_DPR);
6
+ }
7
+ var warnedCanvasClamp = false;
8
+ function backingPx(cssSize, dpr, axis) {
9
+ const value = Math.round(cssSize * dpr);
10
+ if (value > MAX_CANVAS_DIM_PX) {
11
+ if (!warnedCanvasClamp) {
12
+ warnedCanvasClamp = true;
13
+ console.warn(
14
+ `Canvas ${axis} ${value}px exceeds the safe limit ${MAX_CANVAS_DIM_PX}px and was clamped`
15
+ );
16
+ }
17
+ return MAX_CANVAS_DIM_PX;
18
+ }
19
+ return value;
20
+ }
21
+ function syncCanvasSize(canvas, width, height) {
22
+ const dpr = getDpr();
23
+ const pw = backingPx(width, dpr, "width");
24
+ const ph = backingPx(height, dpr, "height");
25
+ if (canvas.width !== pw || canvas.height !== ph) {
26
+ canvas.width = pw;
27
+ canvas.height = ph;
28
+ }
29
+ const cssWidth = `${width}px`;
30
+ const cssHeight = `${height}px`;
31
+ if (canvas.style.width !== cssWidth) {
32
+ canvas.style.width = cssWidth;
33
+ }
34
+ if (canvas.style.height !== cssHeight) {
35
+ canvas.style.height = cssHeight;
36
+ }
37
+ }
38
+
39
+ export {
40
+ MAX_DPR,
41
+ MAX_CANVAS_DIM_PX,
42
+ getDpr,
43
+ syncCanvasSize
44
+ };
@@ -3,7 +3,7 @@ import {
3
3
  edgeJoinOf,
4
4
  routedEdgeCurves,
5
5
  strandSides
6
- } from "./chunk-3PLYZLYV.js";
6
+ } from "./chunk-2CVHXFK7.js";
7
7
  import {
8
8
  firstNodeAtOrAfter,
9
9
  isBackbone
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  polylineSlice
3
- } from "./chunk-SDGM243E.js";
3
+ } from "./chunk-TAMCZHLW.js";
4
4
  import {
5
5
  svgPath
6
- } from "./chunk-3PLYZLYV.js";
6
+ } from "./chunk-2CVHXFK7.js";
7
7
  import {
8
8
  firstNodeAtOrAfter,
9
9
  isAnchored
@@ -1,29 +1,37 @@
1
1
  import {
2
- brightenAbgr
3
- } from "./chunk-MNUSQCLG.js";
4
-
5
- // src/renderer/Canvas2DRenderer.ts
2
+ syncCanvasSize
3
+ } from "./chunk-4BYTEJGW.js";
6
4
  import {
7
5
  abgrToCssRgba,
6
+ brightenAbgr,
8
7
  normalizedRgbToCssRgba
9
- } from "@jbrowse/core/util/colorBits";
10
- import { syncCanvasSize } from "@jbrowse/render-core/canvas2dUtils";
11
- import { Canvas2DRenderingBackendBase } from "@jbrowse/render-core/renderingBackendBase";
12
- var Canvas2DRenderer = class extends Canvas2DRenderingBackendBase {
13
- constructor() {
14
- super(...arguments);
8
+ } from "./chunk-UMNCCYBN.js";
9
+
10
+ // src/renderer/Canvas2DRenderer.ts
11
+ var Canvas2DRenderer = class {
12
+ constructor(canvas) {
15
13
  this.transform = null;
16
14
  this.batch = null;
17
15
  this.nodeHighlights = /* @__PURE__ */ new Map();
18
16
  this.highlightedEdge = null;
19
17
  this.highlightFactor = 1;
18
+ const ctx = canvas.getContext("2d");
19
+ if (!ctx) {
20
+ throw new Error("Canvas 2D context not available");
21
+ }
22
+ this.canvas = canvas;
23
+ this.ctx = ctx;
24
+ }
25
+ setErrorHandler(_handler) {
26
+ }
27
+ releaseOffscreenTargets() {
20
28
  }
21
- // render-core's, not a local `width * devicePixelRatio`: it clamps the
22
- // backing store at MAX_CANVAS_DIM_PX, reads the ratio through `getDpr()` so
23
- // this agrees with the transform the model builds, and writes the css size
29
+ // Not a local `width * devicePixelRatio`: syncCanvasSize clamps the backing
30
+ // store at MAX_CANVAS_DIM_PX, reads the ratio through `getDpr()` so this
31
+ // agrees with the transform the model builds, and writes the css size
24
32
  // independently of the backing size.
25
33
  resize(width, height) {
26
- syncCanvasSize(this.ctx.canvas, width, height);
34
+ syncCanvasSize(this.canvas, width, height);
27
35
  }
28
36
  uploadGeometry(batch) {
29
37
  this.batch = batch;
@@ -159,7 +167,6 @@ var Canvas2DRenderer = class extends Canvas2DRenderingBackendBase {
159
167
  }
160
168
  }
161
169
  dispose() {
162
- super.dispose();
163
170
  this.batch = null;
164
171
  this.nodeHighlights = /* @__PURE__ */ new Map();
165
172
  this.highlightedEdge = null;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatBp
3
- } from "./chunk-HCANBJDD.js";
3
+ } from "./chunk-N62KBLFC.js";
4
4
  import {
5
5
  isBackbone
6
6
  } from "./chunk-FYQWPEEY.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tubeSpan
3
- } from "./chunk-Q3KCTA4N.js";
3
+ } from "./chunk-CS3E4ETM.js";
4
4
 
5
5
  // src/tubeMap/genes.ts
6
6
  function tubeMapGenes(byRefName, genes) {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  nodesUnderBox
3
- } from "./chunk-BJV2W4KZ.js";
3
+ } from "./chunk-YMSSF2RK.js";
4
4
  import {
5
5
  nodeLabelBudget,
6
6
  placeSizeLabels,
7
7
  rowLabelBox,
8
8
  sizeLabelCandidates
9
- } from "./chunk-HCANBJDD.js";
9
+ } from "./chunk-N62KBLFC.js";
10
10
  import {
11
11
  LABEL_CHAR_PX,
12
12
  LABEL_PAD,
@@ -5,18 +5,18 @@ import {
5
5
  stripGeneGaps,
6
6
  walkStripFrame,
7
7
  walkStripLabelsTree
8
- } from "./chunk-MHGHYHTL.js";
8
+ } from "./chunk-V5BPIOLS.js";
9
9
  import {
10
10
  walkRowsKey,
11
11
  walkRowsKeyTree,
12
12
  walkRowsTree
13
- } from "./chunk-QCYM44UL.js";
13
+ } from "./chunk-PJESIRDU.js";
14
14
  import {
15
15
  Canvas2DRenderer
16
- } from "./chunk-D3M7SBKL.js";
16
+ } from "./chunk-CH3DLBUT.js";
17
17
  import {
18
18
  genePins
19
- } from "./chunk-SV27AJCC.js";
19
+ } from "./chunk-BUBZ32IC.js";
20
20
  import {
21
21
  EXON_COLOR,
22
22
  exonOutlineTree,
@@ -24,42 +24,42 @@ import {
24
24
  } from "./chunk-3S3YVOJ7.js";
25
25
  import {
26
26
  version
27
- } from "./chunk-KCW7L3NV.js";
27
+ } from "./chunk-QFBZQJFK.js";
28
28
  import {
29
29
  axisScaleOf
30
- } from "./chunk-L5RYUPZI.js";
30
+ } from "./chunk-MQJUG2D2.js";
31
31
  import {
32
32
  facetLifts,
33
33
  walkLift
34
- } from "./chunk-6Q6HFBJT.js";
34
+ } from "./chunk-ZKGM7VLA.js";
35
35
  import {
36
36
  encodingStops
37
- } from "./chunk-IMW3AK27.js";
37
+ } from "./chunk-X4VVPLI5.js";
38
38
  import {
39
39
  rangeText,
40
40
  walkKey
41
- } from "./chunk-AE3UQZY3.js";
41
+ } from "./chunk-GOY6REMT.js";
42
42
  import {
43
43
  FIT_PADDING,
44
44
  drawingBounds,
45
45
  fitTransform
46
- } from "./chunk-VKB57ZYE.js";
46
+ } from "./chunk-IO2PCPZI.js";
47
47
  import {
48
48
  buildGeometry,
49
49
  computeReferenceRamp
50
- } from "./chunk-3WHKR5TY.js";
50
+ } from "./chunk-RX5CSWJW.js";
51
51
  import {
52
52
  geneLabelCandidates
53
- } from "./chunk-HB6PDCOU.js";
53
+ } from "./chunk-DKOB2OPC.js";
54
54
  import {
55
55
  nodesUnderBox
56
- } from "./chunk-BJV2W4KZ.js";
56
+ } from "./chunk-YMSSF2RK.js";
57
57
  import {
58
58
  walkRowsExtent
59
59
  } from "./chunk-EZPBJPK6.js";
60
60
  import {
61
61
  pathLegend
62
- } from "./chunk-7CHJKABZ.js";
62
+ } from "./chunk-X5L37W4J.js";
63
63
  import {
64
64
  LABEL_CHAR_PX,
65
65
  LABEL_PAD,
@@ -75,7 +75,7 @@ import {
75
75
  } from "./chunk-JKJWSY4V.js";
76
76
  import {
77
77
  deletionEdges
78
- } from "./chunk-X32PABB7.js";
78
+ } from "./chunk-4EMPBO7S.js";
79
79
  import {
80
80
  ROW_HEIGHT_PX
81
81
  } from "./chunk-CPMHA4W5.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatBp,
3
3
  groupDigits
4
- } from "./chunk-HCANBJDD.js";
4
+ } from "./chunk-N62KBLFC.js";
5
5
 
6
6
  // src/walkKey.ts
7
7
  function rangeText(contig, start, end) {
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  mergeRuns,
23
23
  splitRuns
24
- } from "./chunk-SDGM243E.js";
24
+ } from "./chunk-TAMCZHLW.js";
25
25
  import {
26
26
  spreadFor
27
27
  } from "./chunk-UVBGRJQX.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-6JEWNXCQ.js";
33
33
  import {
34
34
  deletionEdges
35
- } from "./chunk-X32PABB7.js";
35
+ } from "./chunk-4EMPBO7S.js";
36
36
  import {
37
37
  isBackbone
38
38
  } from "./chunk-FYQWPEEY.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-WOO7QYKB.js";
6
6
  import {
7
7
  svgPath
8
- } from "./chunk-3PLYZLYV.js";
8
+ } from "./chunk-2CVHXFK7.js";
9
9
  import {
10
10
  isBackbone
11
11
  } from "./chunk-FYQWPEEY.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clampZoom
3
- } from "./chunk-VKB57ZYE.js";
3
+ } from "./chunk-IO2PCPZI.js";
4
4
 
5
5
  // src/viewport.ts
6
6
  function axisScaleOf(scale, pixelRows) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  baseEdgeCurves
3
- } from "./chunk-6YRRNX2P.js";
3
+ } from "./chunk-Y3IOTZJA.js";
4
4
  import {
5
5
  curveBounds,
6
6
  pathRibbonOffsets
7
- } from "./chunk-3PLYZLYV.js";
7
+ } from "./chunk-2CVHXFK7.js";
8
8
 
9
9
  // src/util/SpatialIndex.ts
10
10
  var FALLBACK_CELL_SIZE = 50;
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-AB35TJST.js";
4
4
  import {
5
5
  polylineMidpoint
6
- } from "./chunk-SDGM243E.js";
6
+ } from "./chunk-TAMCZHLW.js";
7
7
  import {
8
8
  deletionArcCurves
9
- } from "./chunk-X32PABB7.js";
9
+ } from "./chunk-4EMPBO7S.js";
10
10
  import {
11
11
  curveBounds,
12
12
  curveMidpoint
13
- } from "./chunk-3PLYZLYV.js";
13
+ } from "./chunk-2CVHXFK7.js";
14
14
 
15
15
  // src/graphLabels.ts
16
16
  var MIN_DELETION_LABEL_PX = 26;
@@ -3,10 +3,10 @@ import {
3
3
  RAMP_GRADIENT_STOPS,
4
4
  rampHueCss,
5
5
  rampStops
6
- } from "./chunk-5QT6NPSO.js";
6
+ } from "./chunk-ZHCDYSA5.js";
7
7
  import {
8
8
  REFERENCE_RAMP_ALT_CSS
9
- } from "./chunk-3WHKR5TY.js";
9
+ } from "./chunk-RX5CSWJW.js";
10
10
  import {
11
11
  LABEL_CHAR_PX
12
12
  } from "./chunk-AB35TJST.js";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var version = "6.0.2";
2
+ var version = "6.0.4";
3
3
 
4
4
  export {
5
5
  version
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  pathCssColor,
9
9
  pathGreyCssColor
10
- } from "./chunk-7CHJKABZ.js";
10
+ } from "./chunk-X5L37W4J.js";
11
11
  import {
12
12
  pathOrigin
13
13
  } from "./chunk-ST2IBUAN.js";
@@ -1,15 +1,17 @@
1
1
  import {
2
- fadeAbgr
3
- } from "./chunk-MNUSQCLG.js";
2
+ abgrToCssRgba,
3
+ fadeAbgr,
4
+ packAbgr
5
+ } from "./chunk-UMNCCYBN.js";
4
6
  import {
5
7
  baseEdgeCurves
6
- } from "./chunk-6YRRNX2P.js";
8
+ } from "./chunk-Y3IOTZJA.js";
7
9
  import {
8
10
  PATH_LIGHTNESS,
9
11
  PATH_SATURATION,
10
12
  nameHue,
11
13
  pathHueAt
12
- } from "./chunk-7CHJKABZ.js";
14
+ } from "./chunk-X5L37W4J.js";
13
15
  import {
14
16
  referenceMidpoints
15
17
  } from "./chunk-ES2N6V56.js";
@@ -23,10 +25,9 @@ import {
23
25
  strandSides,
24
26
  translateCurves,
25
27
  yToXOf
26
- } from "./chunk-3PLYZLYV.js";
28
+ } from "./chunk-2CVHXFK7.js";
27
29
 
28
30
  // src/renderer/GeometryBuilder.ts
29
- import { abgrToCssRgba, packAbgr } from "@jbrowse/core/util/colorBits";
30
31
  var EDGE_DEFAULT_COLOR = packAbgr(119, 119, 119, 217);
31
32
  var EDGE_PATH_FALLBACK_COLOR = packAbgr(136, 136, 136, 217);
32
33
  var EDGE_DELETION_COLOR = packAbgr(24, 24, 28, 240);
@@ -2,13 +2,15 @@ import {
2
2
  LIFT_BACKDROP_CSS,
3
3
  computeColorSchemeRange,
4
4
  getNodeColor
5
- } from "./chunk-3WHKR5TY.js";
5
+ } from "./chunk-RX5CSWJW.js";
6
+ import {
7
+ abgrToCssRgba
8
+ } from "./chunk-UMNCCYBN.js";
6
9
  import {
7
10
  isBackbone
8
11
  } from "./chunk-FYQWPEEY.js";
9
12
 
10
13
  // src/referenceStrip.ts
11
- import { abgrToCssRgba } from "@jbrowse/core/util/colorBits";
12
14
  var REFERENCE_STRIP_PX = 12;
13
15
  var REFERENCE_STRIP_ZONE_PX = REFERENCE_STRIP_PX + 8;
14
16
  var OVERHANG_PX = 8;
@@ -2,7 +2,7 @@ import {
2
2
  hasTubeMapPaths,
3
3
  tubeMapLayout,
4
4
  tubeMapReferenceLayout
5
- } from "./chunk-P7B3GDAY.js";
5
+ } from "./chunk-R6ZUK4Y3.js";
6
6
  import {
7
7
  sampleRowLayout
8
8
  } from "./chunk-LOEA5IHZ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ownStrand,
3
3
  strandSides
4
- } from "./chunk-3PLYZLYV.js";
4
+ } from "./chunk-2CVHXFK7.js";
5
5
  import {
6
6
  isBackbone
7
7
  } from "./chunk-FYQWPEEY.js";
@@ -0,0 +1,50 @@
1
+ // src/renderer/colorBits.ts
2
+ function packAbgr(r, g, b, a) {
3
+ return (a << 24 | b << 16 | g << 8 | r) >>> 0;
4
+ }
5
+ function abgrRed(c) {
6
+ return c & 255;
7
+ }
8
+ function abgrGreen(c) {
9
+ return c >>> 8 & 255;
10
+ }
11
+ function abgrBlue(c) {
12
+ return c >>> 16 & 255;
13
+ }
14
+ function abgrAlpha(c) {
15
+ return c >>> 24 & 255;
16
+ }
17
+ function abgrToCssRgba(c) {
18
+ return `rgba(${abgrRed(c)},${abgrGreen(c)},${abgrBlue(c)},${abgrAlpha(c) / 255})`;
19
+ }
20
+ function normalizedRgbToCssRgba(c, alpha) {
21
+ return `rgba(${Math.round(c[0] * 255)},${Math.round(c[1] * 255)},${Math.round(c[2] * 255)},${alpha})`;
22
+ }
23
+ function fadeAbgr(c, alpha) {
24
+ return packAbgr(
25
+ abgrRed(c),
26
+ abgrGreen(c),
27
+ abgrBlue(c),
28
+ Math.round(abgrAlpha(c) * alpha)
29
+ );
30
+ }
31
+ function brightenAbgr(c, factor) {
32
+ return packAbgr(
33
+ Math.min(255, Math.round(abgrRed(c) * factor)),
34
+ Math.min(255, Math.round(abgrGreen(c) * factor)),
35
+ Math.min(255, Math.round(abgrBlue(c) * factor)),
36
+ abgrAlpha(c)
37
+ );
38
+ }
39
+
40
+ export {
41
+ packAbgr,
42
+ abgrRed,
43
+ abgrGreen,
44
+ abgrBlue,
45
+ abgrAlpha,
46
+ abgrToCssRgba,
47
+ normalizedRgbToCssRgba,
48
+ fadeAbgr,
49
+ brightenAbgr
50
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  alongRow,
3
3
  boxesGenes
4
- } from "./chunk-QCYM44UL.js";
4
+ } from "./chunk-PJESIRDU.js";
5
5
  import {
6
6
  pathOrigin
7
7
  } from "./chunk-ST2IBUAN.js";
@@ -2,10 +2,12 @@ import {
2
2
  REFERENCE_RAMP_ALT_COLOR,
3
3
  REFERENCE_RAMP_MAX_HUE,
4
4
  hslToRgb
5
- } from "./chunk-3WHKR5TY.js";
5
+ } from "./chunk-RX5CSWJW.js";
6
+ import {
7
+ packAbgr
8
+ } from "./chunk-UMNCCYBN.js";
6
9
 
7
10
  // src/walkEncoding.ts
8
- import { packAbgr } from "@jbrowse/core/util/colorBits";
9
11
  var WALK_FIELDS = [
10
12
  { value: "progress", label: "Progress along the walk" },
11
13
  { value: "walk", label: "One colour for the walk" },
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ST2IBUAN.js";
4
4
  import {
5
5
  groupDigits
6
- } from "./chunk-HCANBJDD.js";
6
+ } from "./chunk-N62KBLFC.js";
7
7
  import {
8
8
  isGenericSample
9
9
  } from "./chunk-BPLIXMH7.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  bypassedPoints
3
- } from "./chunk-X32PABB7.js";
3
+ } from "./chunk-4EMPBO7S.js";
4
4
  import {
5
5
  computeEdgeCurves,
6
6
  edgeJoinOf,
7
7
  routedEdgeCurves,
8
8
  strandSides
9
- } from "./chunk-3PLYZLYV.js";
9
+ } from "./chunk-2CVHXFK7.js";
10
10
 
11
11
  // src/util/edgeCurves.ts
12
12
  var cache = /* @__PURE__ */ new WeakMap();
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  EdgeSpatialIndex,
3
3
  SpatialIndex
4
- } from "./chunk-LVZZH2NI.js";
4
+ } from "./chunk-MREQ7GIA.js";
5
5
  import {
6
6
  pathRibbonOffsets,
7
7
  translateCurves,
8
8
  yToXOf
9
- } from "./chunk-3PLYZLYV.js";
9
+ } from "./chunk-2CVHXFK7.js";
10
10
 
11
11
  // src/util/hitDetection.ts
12
12
  function distanceToSegment(px, py, x1, y1, x2, y2) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  REFERENCE_RAMP_MAX_HUE
3
- } from "./chunk-3WHKR5TY.js";
3
+ } from "./chunk-RX5CSWJW.js";
4
4
 
5
5
  // src/referenceRampCss.ts
6
6
  function rampHueCss(hue) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  encodedColor,
3
3
  resolveEncoding
4
- } from "./chunk-IMW3AK27.js";
4
+ } from "./chunk-X4VVPLI5.js";
5
5
  import {
6
6
  pathOrigin
7
7
  } from "./chunk-ST2IBUAN.js";
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  computeColorSchemeRange,
3
3
  getNodeColor
4
- } from "./chunk-3WHKR5TY.js";
4
+ } from "./chunk-RX5CSWJW.js";
5
+ import {
6
+ abgrToCssRgba
7
+ } from "./chunk-UMNCCYBN.js";
5
8
 
6
9
  // src/tubeMap/nodeColors.ts
7
- import { abgrToCssRgba } from "@jbrowse/core/util/colorBits";
8
10
  function tubeMapNodeColors(graph, colorScheme, referenceRamp) {
9
11
  if (colorScheme === "uniform" || colorScheme === "grey") {
10
12
  return void 0;