@genome-spy/app 0.84.0 → 0.85.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 (42) hide show
  1. package/dist/{agentApi-DHXYZVvQ.js → agentApi-Cz0hCnVp.js} +5790 -5190
  2. package/dist/agentApi.es.js +3117 -2793
  3. package/dist/agentShared.es.js +8 -8
  4. package/dist/arrayUtils-LJpQOu-U.js +2175 -0
  5. package/dist/canvas2d-DoAXEiF9.js +309 -0
  6. package/dist/canvas2d-f5jl4A5D.js +310 -0
  7. package/dist/canvasSizeHelper-7h_8rOcx.js +56 -0
  8. package/dist/clipOptions-gqdb3fvW.js +43 -0
  9. package/dist/{clipOptions-Dqco1p8b.js → color-W5zffv-z.js} +1 -43
  10. package/dist/{debug-aHQsa6hU.js → debug-BvCZWumf.js} +2 -2
  11. package/dist/{debug-D6FqxKEj.js → debug-CgDtmspT.js} +2 -2
  12. package/dist/{esm-CGLz7idZ.js → esm-BA6yMcc-.js} +438 -434
  13. package/dist/{esm-D8vvQAP3.js → esm-CcDLRSvC.js} +33 -33
  14. package/dist/{esm-BeV56E_5.js → esm-CfYZhLHN.js} +33 -33
  15. package/dist/{esm-DQ3lJSQN.js → esm-JAiZmFIS.js} +1 -1
  16. package/dist/{framebufferReadback-CC0D6Haw.js → framebufferReadback-CCLOjStu.js} +26 -25
  17. package/dist/{framebufferReadback-Bje9lHb7.js → framebufferReadback-THWwFqs8.js} +14 -13
  18. package/dist/index.es.js +541 -538
  19. package/dist/index.js +560 -554
  20. package/dist/nativeText-DMO8gLt7.js +806 -0
  21. package/dist/nativeText-m5AUINMq.js +806 -0
  22. package/dist/paramUtils-BYI4rwyL.js +2195 -0
  23. package/dist/schema.json +1488 -88
  24. package/dist/style.css +1 -1
  25. package/dist/svg-CCu8kYy2.js +1158 -0
  26. package/dist/svg-yFj875aX.js +1158 -0
  27. package/dist/{svgNumber-C6aRPc8Z.js → svgNumber-DNxESJQB.js} +1 -1
  28. package/dist/{twgl-full.module-BNEMlXRV.js → twgl-full.module-DB2UdP1k.js} +1 -1
  29. package/dist/{viewIdentityRegistry-AEQpJTDm.js → viewIdentityRegistry-BUdkK9zT.js} +1 -1
  30. package/dist/{viewIdentityRegistry-Dl7rR4Ay.js → viewIdentityRegistry-D3oPbN4O.js} +1 -1
  31. package/dist/viewSelectors-DGCspRN3.js +4198 -0
  32. package/dist/viewSelectors-U5oLCLHV.js +4195 -0
  33. package/dist/{viewUtils-DMNiWslc.js → viewUtils-Dg4RA40Q.js} +2384 -2109
  34. package/dist/warning-CpIIpk8e.js +7 -0
  35. package/dist/warning-DRGdb6BF.js +59 -0
  36. package/dist/{raster-BofBWXbe.js → webgl-Ci6ZhCCf.js} +4 -4
  37. package/dist/{raster-9uKYMjHZ.js → webgl-Dpz8a3TI.js} +3 -3
  38. package/package.json +5 -5
  39. package/dist/svg-CvsT1Y2V.js +0 -1793
  40. package/dist/svg-DRgWfcsL.js +0 -1793
  41. package/dist/viewSelectors-BhW4mTR1.js +0 -6386
  42. package/dist/viewSelectors-Bwzj10Qz.js +0 -6363
@@ -0,0 +1,7 @@
1
+ //#region ../core/src/utils/warning.js
2
+ var e = /* @__PURE__ */ new Set();
3
+ function t(t) {
4
+ e.has(t) || (e.add(t), console.warn(t));
5
+ }
6
+ //#endregion
7
+ export { t };
@@ -0,0 +1,59 @@
1
+ //#region ../core/src/rendering/canvasSizeHelper.js
2
+ var e = class {
3
+ constructor(e, t, n, r) {
4
+ this._container = e, this._canvas = t, this._sizeSource = n, this._onPhysicalSizeChange = r ?? (() => {}), this._logicalCanvasSize = void 0, this._devicePixelContentBoxSize = void 0, this._devicePixelContentBoxObserver = void 0, this._observeDevicePixelContentBox();
5
+ }
6
+ invalidate() {
7
+ this._logicalCanvasSize = void 0, this._devicePixelContentBoxSize = void 0;
8
+ }
9
+ finalize() {
10
+ this._devicePixelContentBoxObserver && this._devicePixelContentBoxObserver.disconnect();
11
+ }
12
+ getPhysicalCanvasSize(e) {
13
+ if (this._devicePixelContentBoxSize) return this._devicePixelContentBoxSize;
14
+ let t = window.devicePixelRatio ?? 1;
15
+ return e ||= this.getLogicalCanvasSize(), {
16
+ width: Math.round(e.width * t),
17
+ height: Math.round(e.height * t)
18
+ };
19
+ }
20
+ getDevicePixelRatio(e) {
21
+ e ||= this.getLogicalCanvasSize();
22
+ let t = this.getPhysicalCanvasSize(e), n = e.width > 0 ? t.width / e.width : void 0, r = e.height > 0 ? t.height / e.height : void 0;
23
+ return n !== void 0 && r !== void 0 ? (n + r) / 2 : n === void 0 ? r === void 0 ? window.devicePixelRatio ?? 1 : r : n;
24
+ }
25
+ getLogicalCanvasSize() {
26
+ if (this._logicalCanvasSize) return this._logicalCanvasSize;
27
+ let e = this._sizeSource(), t = window.getComputedStyle(this._container, null), n = this._container.getBoundingClientRect(), r = parseFloat(t.paddingLeft), i = parseFloat(t.paddingRight), a = parseFloat(t.paddingTop), o = parseFloat(t.paddingBottom), s = parseFloat(t.borderLeftWidth), c = parseFloat(t.borderRightWidth), l = parseFloat(t.borderTopWidth), u = parseFloat(t.borderBottomWidth), d = e.width ?? n.width - r - i - s - c, f = e.height ?? n.height - a - o - l - u;
28
+ return this._logicalCanvasSize = {
29
+ width: d,
30
+ height: f
31
+ }, this._logicalCanvasSize;
32
+ }
33
+ _observeDevicePixelContentBox() {
34
+ if (typeof ResizeObserver != "function") return;
35
+ let e = new ResizeObserver((e) => {
36
+ let t = e.find((e) => e.target == this._canvas);
37
+ if (!t) return;
38
+ let n = t.devicePixelContentBoxSize;
39
+ if (!n) return;
40
+ let r = Array.isArray(n) ? n[0] : n;
41
+ if (!r) return;
42
+ let i = {
43
+ width: r.inlineSize,
44
+ height: r.blockSize
45
+ };
46
+ this._devicePixelContentBoxSize && this._devicePixelContentBoxSize.width == i.width && this._devicePixelContentBoxSize.height == i.height || (this._devicePixelContentBoxSize = i, this._onPhysicalSizeChange());
47
+ });
48
+ try {
49
+ e.observe(this._canvas, { box: "device-pixel-content-box" }), this._devicePixelContentBoxObserver = e;
50
+ } catch {
51
+ e.disconnect();
52
+ }
53
+ }
54
+ }, t = /* @__PURE__ */ new Set();
55
+ function n(e) {
56
+ t.has(e) || (t.add(e), console.warn(e));
57
+ }
58
+ //#endregion
59
+ export { e as n, n as t };
@@ -1,8 +1,8 @@
1
- import { i as e } from "./twgl-full.module-BNEMlXRV.js";
1
+ import { i as e } from "./twgl-full.module-DB2UdP1k.js";
2
2
  import { n as t } from "./viewRenderingContext-HtpqwS_x.js";
3
- import { n, r } from "./framebufferReadback-CC0D6Haw.js";
4
- import { t as i } from "./svgNumber-C6aRPc8Z.js";
5
- //#region ../core/src/svg/raster/index.js
3
+ import { n, r } from "./framebufferReadback-CCLOjStu.js";
4
+ import { t as i } from "./svgNumber-DNxESJQB.js";
5
+ //#region ../core/src/rendering/svg/raster/webgl.js
6
6
  function a({ runs: a, viewRoot: c, webGLHelper: l, logicalWidth: u, logicalHeight: d, pixelRatio: f }) {
7
7
  let p = l.gl, m = Math.ceil(u * f), h = Math.ceil(d * f);
8
8
  o(p, m, h);
@@ -1,7 +1,7 @@
1
- import { n as e, r as t, s as n } from "./framebufferReadback-Bje9lHb7.js";
1
+ import { n as e, r as t, s as n } from "./framebufferReadback-THWwFqs8.js";
2
2
  import { n as r } from "./viewRenderingContext-HtpqwS_x.js";
3
- import { t as i } from "./svgNumber-C6aRPc8Z.js";
4
- //#region ../core/src/svg/raster/index.js
3
+ import { t as i } from "./svgNumber-DNxESJQB.js";
4
+ //#region ../core/src/rendering/svg/raster/webgl.js
5
5
  function a({ runs: a, viewRoot: c, webGLHelper: l, logicalWidth: u, logicalHeight: d, pixelRatio: f }) {
6
6
  let p = l.gl, m = Math.ceil(u * f), h = Math.ceil(d * f);
7
7
  o(p, m, h);
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "contributors": [],
9
9
  "license": "MIT",
10
10
  "homepage": "https://genomespy.app/",
11
- "version": "0.84.0",
11
+ "version": "0.85.0",
12
12
  "main": "dist/index.js",
13
13
  "module": "dist/index.es.js",
14
14
  "type": "module",
@@ -70,7 +70,7 @@
70
70
  "@fortawesome/fontawesome-free": "^6.4.2",
71
71
  "@fortawesome/fontawesome-svg-core": "^6.4.2",
72
72
  "@fortawesome/free-solid-svg-icons": "^6.4.2",
73
- "@genome-spy/core": "^0.84.0",
73
+ "@genome-spy/core": "^0.85.0",
74
74
  "@reduxjs/toolkit": "^2.11.0",
75
75
  "d3-color": "^3.1.0",
76
76
  "idb": "^7.1.1",
@@ -83,8 +83,8 @@
83
83
  "zarrita": "^0.6.1"
84
84
  },
85
85
  "devDependencies": {
86
- "@genome-spy/app-agent": "^0.84.0",
87
- "@genome-spy/inspector": "^0.84.0"
86
+ "@genome-spy/app-agent": "^0.85.0",
87
+ "@genome-spy/inspector": "^0.85.0"
88
88
  },
89
- "gitHead": "0a14b9e0af9c907b3253cab4414726ded5c24ab7"
89
+ "gitHead": "9d32a48e4ee76086a65ee66231f871c0f57071d7"
90
90
  }