@vitessce/json 3.9.7 → 3.9.9

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-Byr21O5v.js";
2
+ import { B as BaseDecoder } from "./index-CPJM-bsb.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -357,6 +357,7 @@ const CoordinationType$1 = {
357
357
  SPATIAL_LAYER_MODEL_MATRIX: "spatialLayerModelMatrix",
358
358
  SPATIAL_SEGMENTATION_FILLED: "spatialSegmentationFilled",
359
359
  SPATIAL_SEGMENTATION_STROKE_WIDTH: "spatialSegmentationStrokeWidth",
360
+ SPATIAL_POINT_STROKE_WIDTH: "spatialPointStrokeWidth",
360
361
  SPATIAL_CHANNEL_COLOR: "spatialChannelColor",
361
362
  SPATIAL_CHANNEL_VISIBLE: "spatialChannelVisible",
362
363
  SPATIAL_CHANNEL_OPACITY: "spatialChannelOpacity",
@@ -722,7 +723,8 @@ const CoordinationType$1 = {
722
723
  CoordinationType$1.SPATIAL_CHANNEL_COLOR,
723
724
  CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
724
725
  CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
725
- CoordinationType$1.LEGEND_VISIBLE
726
+ CoordinationType$1.LEGEND_VISIBLE,
727
+ CoordinationType$1.SPATIAL_POINT_STROKE_WIDTH
726
728
  ],
727
729
  [ViewType$1.SCATTERPLOT]: [
728
730
  CoordinationType$1.DATASET,
@@ -1106,6 +1108,7 @@ const CoordinationType$1 = {
1106
1108
  CoordinationType$1.SPATIAL_CHANNEL_COLOR,
1107
1109
  CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
1108
1110
  CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
1111
+ CoordinationType$1.SPATIAL_POINT_STROKE_WIDTH,
1109
1112
  CoordinationType$1.IMAGE_CHANNEL,
1110
1113
  CoordinationType$1.IMAGE_LAYER,
1111
1114
  CoordinationType$1.SEGMENTATION_CHANNEL,
@@ -10073,6 +10076,8 @@ z.object({
10073
10076
  // projectionScale: z.number(),
10074
10077
  // position: z.array(z.number()).length(3),
10075
10078
  // projectionOrientation: z.array(z.number()).length(4),
10079
+ subsources: z.record(z.boolean()).describe("Subsources are the individual data components of a source (e.g. meshes, skeletons, etc.). Each entry explicitly enables or disables a subsource.").optional(),
10080
+ enableDefaultSubsources: z.boolean().describe("When true (default), automatically loads all subsources (defined in mesh metadata), when false loads what is explicitly enabled in `subsources`.").optional()
10076
10081
  }).partial().nullable();
10077
10082
  z.object({
10078
10083
  projectionAnnotationSpacing: z.number(),
@@ -11917,6 +11922,12 @@ function zarrOpenRoot(url, fileType, opts) {
11917
11922
  }
11918
11923
  return root(store);
11919
11924
  }
11925
+ function flattenOmeAttrs(rootAttrs) {
11926
+ if (rootAttrs && typeof rootAttrs.ome === "object" && rootAttrs.ome !== null) {
11927
+ return { ...rootAttrs.ome, ...rootAttrs };
11928
+ }
11929
+ return rootAttrs;
11930
+ }
11920
11931
  class AbstractAutoConfig {
11921
11932
  constructor(parsedStore) {
11922
11933
  const { url, fileType, zmetadata } = parsedStore;
@@ -12009,7 +12020,8 @@ class SpatialDataAutoConfig extends AbstractAutoConfig {
12009
12020
  });
12010
12021
  availableElements.forEach(({ path, attrs }) => {
12011
12022
  const relPath = path.substring(1);
12012
- const firstCoordinateSystem = attrs?.multiscales?.[0]?.coordinateTransformations?.[0]?.output?.name;
12023
+ const omeAttrs = flattenOmeAttrs(attrs);
12024
+ const firstCoordinateSystem = omeAttrs?.multiscales?.[0]?.coordinateTransformations?.[0]?.output?.name;
12013
12025
  if (relPath.match(/^(images)\/([^/]*)$/)) {
12014
12026
  options.image = {
12015
12027
  path: relPath,
@@ -138968,22 +138980,22 @@ async function getDecoder(fileDirectory) {
138968
138980
  const Decoder = await importFn();
138969
138981
  return new Decoder(fileDirectory);
138970
138982
  }
138971
- addDecoder([void 0, 1], () => import("./raw-ckIbnUSG.js").then((m) => m.default));
138972
- addDecoder(5, () => import("./lzw-C_nrzgdz.js").then((m) => m.default));
138983
+ addDecoder([void 0, 1], () => import("./raw-BTphhd3P.js").then((m) => m.default));
138984
+ addDecoder(5, () => import("./lzw-ECKhcRnL.js").then((m) => m.default));
138973
138985
  addDecoder(6, () => {
138974
138986
  throw new Error("old style JPEG compression is not supported.");
138975
138987
  });
138976
- addDecoder(7, () => import("./jpeg-BwCqcpUL.js").then((m) => m.default));
138977
- addDecoder([8, 32946], () => import("./deflate-CWbl0UM4.js").then((m) => m.default));
138978
- addDecoder(32773, () => import("./packbits-CJn7UcMS.js").then((m) => m.default));
138988
+ addDecoder(7, () => import("./jpeg-DlKON62A.js").then((m) => m.default));
138989
+ addDecoder([8, 32946], () => import("./deflate-DDOmrBA0.js").then((m) => m.default));
138990
+ addDecoder(32773, () => import("./packbits-DcVP6svJ.js").then((m) => m.default));
138979
138991
  addDecoder(
138980
138992
  34887,
138981
- () => import("./lerc-DSIL5j0n.js").then(async (m) => {
138993
+ () => import("./lerc-B60n8Lei.js").then(async (m) => {
138982
138994
  await m.zstd.init();
138983
138995
  return m;
138984
138996
  }).then((m) => m.default)
138985
138997
  );
138986
- addDecoder(50001, () => import("./webimage-DMa00n7i.js").then((m) => m.default));
138998
+ addDecoder(50001, () => import("./webimage-CMHAsl3i.js").then((m) => m.default));
138987
138999
  function copyNewSize(array, width, height, samplesPerPixel = 1) {
138988
139000
  return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
138989
139001
  }
@@ -156068,10 +156080,12 @@ async function loadMultiscales(root2) {
156068
156080
  }
156069
156081
  throw e2;
156070
156082
  }
156083
+ rootAttrs = flattenOmeAttrs(rootAttrs);
156071
156084
  let paths = ["0"];
156072
156085
  let labels = ["t", "c", "z", "y", "x"];
156073
156086
  if ("multiscales" in rootAttrs) {
156074
- const { datasets, axes } = rootAttrs.multiscales[0];
156087
+ const { multiscales } = rootAttrs;
156088
+ const { datasets, axes } = multiscales[0];
156075
156089
  paths = datasets.map((d) => d.path);
156076
156090
  if (axes) {
156077
156091
  if (isAxis(axes)) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-Byr21O5v.js";
1
+ import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-CPJM-bsb.js";
2
2
  export {
3
3
  C as CellsJsonAsObsEmbeddingLoader,
4
4
  d as CellsJsonAsObsLabelsLoader,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Byr21O5v.js";
1
+ import { B as BaseDecoder } from "./index-CPJM-bsb.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, L as LercParameters, a as LercAddCompression } from "./index-Byr21O5v.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-CPJM-bsb.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Byr21O5v.js";
1
+ import { B as BaseDecoder } from "./index-CPJM-bsb.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-Byr21O5v.js";
1
+ import { B as BaseDecoder } from "./index-CPJM-bsb.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-Byr21O5v.js";
1
+ import { B as BaseDecoder } from "./index-CPJM-bsb.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-Byr21O5v.js";
1
+ import { B as BaseDecoder } from "./index-CPJM-bsb.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/json",
3
- "version": "3.9.7",
3
+ "version": "3.9.9",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,17 +20,17 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "zarrita": "0.6.1",
22
22
  "zod": "^3.21.4",
23
- "@vitessce/gl": "3.9.7",
24
- "@vitessce/schemas": "3.9.7",
25
- "@vitessce/constants-internal": "3.9.7",
26
- "@vitessce/globals": "3.9.7",
27
- "@vitessce/sets-utils": "3.9.7",
28
- "@vitessce/spatial-utils": "3.9.7",
29
- "@vitessce/utils": "3.9.7",
30
- "@vitessce/abstract": "3.9.7",
31
- "@vitessce/error": "3.9.7",
32
- "@vitessce/zarr-utils": "3.9.7",
33
- "@vitessce/config": "3.9.7"
23
+ "@vitessce/gl": "3.9.9",
24
+ "@vitessce/globals": "3.9.9",
25
+ "@vitessce/schemas": "3.9.9",
26
+ "@vitessce/sets-utils": "3.9.9",
27
+ "@vitessce/utils": "3.9.9",
28
+ "@vitessce/abstract": "3.9.9",
29
+ "@vitessce/spatial-utils": "3.9.9",
30
+ "@vitessce/error": "3.9.9",
31
+ "@vitessce/constants-internal": "3.9.9",
32
+ "@vitessce/config": "3.9.9",
33
+ "@vitessce/zarr-utils": "3.9.9"
34
34
  },
35
35
  "scripts": {
36
36
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",