@vitessce/layer-controller 3.7.0 → 3.8.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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-CYIYE8B7.js";
2
+ import { B as BaseDecoder } from "./index-DfKnOMhp.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -21804,6 +21804,8 @@ const CoordinationType = {
21804
21804
  // Could be per-image-layer
21805
21805
  SPATIAL_TARGET_RESOLUTION: "spatialTargetResolution",
21806
21806
  // Per-spatial-layer
21807
+ SPATIAL_MAX_RESOLUTION: "spatialMaxResolution",
21808
+ // Per-image-channel (for spatial-accelerated)
21807
21809
  // For clipping plane sliders
21808
21810
  SPATIAL_SLICE_X: "spatialSliceX",
21809
21811
  SPATIAL_SLICE_Y: "spatialSliceY",
@@ -21860,6 +21862,7 @@ const COMPONENT_COORDINATION_TYPES = {
21860
21862
  CoordinationType.SPATIAL_ROTATION_Y,
21861
21863
  CoordinationType.SPATIAL_ROTATION_Z,
21862
21864
  CoordinationType.SPATIAL_AXIS_FIXED,
21865
+ CoordinationType.SPATIAL_ROTATION_ORBIT,
21863
21866
  CoordinationType.SPATIAL_ORBIT_AXIS,
21864
21867
  CoordinationType.SPATIAL_ZOOM,
21865
21868
  CoordinationType.OBS_FILTER,
@@ -21867,14 +21870,11 @@ const COMPONENT_COORDINATION_TYPES = {
21867
21870
  CoordinationType.OBS_SET_SELECTION,
21868
21871
  CoordinationType.OBS_SET_FILTER,
21869
21872
  CoordinationType.OBS_SET_HIGHLIGHT,
21870
- CoordinationType.OBS_SET_COLOR,
21871
21873
  CoordinationType.OBS_TYPE,
21872
- CoordinationType.ADDITIONAL_OBS_SETS,
21873
21874
  CoordinationType.OBS_SET_COLOR,
21874
21875
  CoordinationType.OBS_COLOR_ENCODING,
21875
- CoordinationType.OBS_SET_SELECTION,
21876
21876
  CoordinationType.EMBEDDING_TYPE,
21877
- CoordinationType.OBS_COLOR_ENCODING,
21877
+ CoordinationType.ADDITIONAL_OBS_SETS,
21878
21878
  CoordinationType.TOOLTIPS_VISIBLE
21879
21879
  ],
21880
21880
  [ViewType.SCATTERPLOT]: [
@@ -22094,6 +22094,7 @@ const COMPONENT_COORDINATION_TYPES = {
22094
22094
  CoordinationType.SPATIAL_RENDERING_MODE,
22095
22095
  CoordinationType.VOLUMETRIC_RENDERING_ALGORITHM,
22096
22096
  CoordinationType.SPATIAL_TARGET_RESOLUTION,
22097
+ CoordinationType.SPATIAL_MAX_RESOLUTION,
22097
22098
  CoordinationType.SPATIAL_SLICE_X,
22098
22099
  CoordinationType.SPATIAL_SLICE_Y,
22099
22100
  CoordinationType.SPATIAL_SLICE_Z,
@@ -22267,6 +22268,7 @@ const COMPONENT_COORDINATION_TYPES = {
22267
22268
  CoordinationType.SPATIAL_RENDERING_MODE,
22268
22269
  CoordinationType.VOLUMETRIC_RENDERING_ALGORITHM,
22269
22270
  CoordinationType.SPATIAL_TARGET_RESOLUTION,
22271
+ CoordinationType.SPATIAL_MAX_RESOLUTION,
22270
22272
  CoordinationType.SPATIAL_SLICE_X,
22271
22273
  CoordinationType.SPATIAL_SLICE_Y,
22272
22274
  CoordinationType.SPATIAL_SLICE_Z,
@@ -128045,22 +128047,22 @@ function addDecoder(cases, importFn) {
128045
128047
  }
128046
128048
  cases.forEach((c) => registry$1.set(c, importFn));
128047
128049
  }
128048
- addDecoder([void 0, 1], () => import("./raw-BfRzHTth.js").then((m) => m.default));
128049
- addDecoder(5, () => import("./lzw-CbTZfKs9.js").then((m) => m.default));
128050
+ addDecoder([void 0, 1], () => import("./raw-e2nkBDtI.js").then((m) => m.default));
128051
+ addDecoder(5, () => import("./lzw-Dc2TJV7E.js").then((m) => m.default));
128050
128052
  addDecoder(6, () => {
128051
128053
  throw new Error("old style JPEG compression is not supported.");
128052
128054
  });
128053
- addDecoder(7, () => import("./jpeg-C-T48Smu.js").then((m) => m.default));
128054
- addDecoder([8, 32946], () => import("./deflate-D3mL8ngO.js").then((m) => m.default));
128055
- addDecoder(32773, () => import("./packbits-D6o4d29o.js").then((m) => m.default));
128055
+ addDecoder(7, () => import("./jpeg-Dq2O8Du8.js").then((m) => m.default));
128056
+ addDecoder([8, 32946], () => import("./deflate-C_zspYTx.js").then((m) => m.default));
128057
+ addDecoder(32773, () => import("./packbits-DsqEZKip.js").then((m) => m.default));
128056
128058
  addDecoder(
128057
128059
  34887,
128058
- () => import("./lerc-BkWxYHtF.js").then(async (m) => {
128060
+ () => import("./lerc-BzW2uzBX.js").then(async (m) => {
128059
128061
  await m.zstd.init();
128060
128062
  return m;
128061
128063
  }).then((m) => m.default)
128062
128064
  );
128063
- addDecoder(50001, () => import("./webimage-DsTVvuUV.js").then((m) => m.default));
128065
+ addDecoder(50001, () => import("./webimage-B1VqMV5x.js").then((m) => m.default));
128064
128066
  function decodeRowAcc(row, stride) {
128065
128067
  let length2 = row.length - stride;
128066
128068
  let offset2 = 0;
@@ -145329,13 +145331,16 @@ const getStatsForResolution = (loader, resolution) => {
145329
145331
  const height2 = shape2[labels.indexOf("y")];
145330
145332
  const width2 = shape2[labels.indexOf("x")];
145331
145333
  const depth = shape2[labels.indexOf("z")];
145334
+ const dims = Object.fromEntries(labels.map((label, i2) => [label, shape2[i2]]));
145332
145335
  const depthDownsampled = Math.max(1, depth >> resolution);
145333
145336
  const totalBytes = 4 * height2 * width2 * depthDownsampled;
145334
145337
  return {
145335
145338
  height: height2,
145336
145339
  width: width2,
145340
+ depth,
145337
145341
  depthDownsampled,
145338
- totalBytes
145342
+ totalBytes,
145343
+ dims
145339
145344
  };
145340
145345
  };
145341
145346
  const canLoadResolution = (loader, resolution) => {
@@ -145343,7 +145348,7 @@ const canLoadResolution = (loader, resolution) => {
145343
145348
  const { totalBytes, height: height2, width: width2, depthDownsampled } = getStatsForResolution(loader, resolution);
145344
145349
  const maxHeapSize = ((_a3 = window.performance) == null ? void 0 : _a3.memory) && ((_c = (_b2 = window.performance) == null ? void 0 : _b2.memory) == null ? void 0 : _c.jsHeapSizeLimit) / 2;
145345
145350
  const maxSize = maxHeapSize || 2 ** 31 - 1;
145346
- return totalBytes < maxSize && height2 <= 2048 && depthDownsampled <= 2048 && width2 <= 2048 && depthDownsampled > 1;
145351
+ return totalBytes < maxSize && height2 <= 2048 && width2 <= 2048 && depthDownsampled <= 2048;
145347
145352
  };
145348
145353
  function isRgb(loader, channels2) {
145349
145354
  const source = getSourceFromLoader(loader);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, L, V, d, c, e, f, b, h, u } from "./index-CYIYE8B7.js";
1
+ import { a, L, V, d, c, e, f, b, h, u } from "./index-DfKnOMhp.js";
2
2
  export {
3
3
  a as LayerController,
4
4
  L as LayerControllerSubscriber,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CYIYE8B7.js";
1
+ import { B as BaseDecoder } from "./index-DfKnOMhp.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-CYIYE8B7.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-DfKnOMhp.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CYIYE8B7.js";
1
+ import { B as BaseDecoder } from "./index-DfKnOMhp.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CYIYE8B7.js";
1
+ import { B as BaseDecoder } from "./index-DfKnOMhp.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CYIYE8B7.js";
1
+ import { B as BaseDecoder } from "./index-DfKnOMhp.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CYIYE8B7.js";
1
+ import { B as BaseDecoder } from "./index-DfKnOMhp.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/layer-controller",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -19,16 +19,16 @@
19
19
  "lodash-es": "^4.17.21",
20
20
  "math.gl": "^3.5.6",
21
21
  "react-aria": "^3.28.0",
22
- "@vitessce/styles": "3.7.0",
23
- "@vitessce/constants-internal": "3.7.0",
24
- "@vitessce/gl": "3.7.0",
25
- "@vitessce/spatial-utils": "3.7.0",
26
- "@vitessce/utils": "3.7.0",
27
- "@vitessce/vit-s": "3.7.0"
22
+ "@vitessce/styles": "3.8.0",
23
+ "@vitessce/constants-internal": "3.8.0",
24
+ "@vitessce/spatial-utils": "3.8.0",
25
+ "@vitessce/utils": "3.8.0",
26
+ "@vitessce/vit-s": "3.8.0",
27
+ "@vitessce/gl": "3.8.0"
28
28
  },
29
29
  "devDependencies": {
30
- "react": "^18.0.0",
31
- "react-dom": "^18.0.0",
30
+ "react": "18.3.1",
31
+ "react-dom": "18.3.1",
32
32
  "vite": "^7.0.0",
33
33
  "vitest": "^3.1.4"
34
34
  },