@vitessce/config 3.9.7 → 3.9.8

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.
package/dist/index.js CHANGED
@@ -4206,6 +4206,12 @@ function transformEntriesForZipFileStore(entries) {
4206
4206
  }));
4207
4207
  return newEntries;
4208
4208
  }
4209
+ function flattenOmeAttrs(rootAttrs) {
4210
+ if (rootAttrs && typeof rootAttrs.ome === "object" && rootAttrs.ome !== null) {
4211
+ return { ...rootAttrs.ome, ...rootAttrs };
4212
+ }
4213
+ return rootAttrs;
4214
+ }
4209
4215
  class AbstractAutoConfig2 {
4210
4216
  constructor(parsedStore) {
4211
4217
  const { url, fileType, zmetadata } = parsedStore;
@@ -4298,7 +4304,8 @@ class SpatialDataAutoConfig extends AbstractAutoConfig2 {
4298
4304
  });
4299
4305
  availableElements.forEach(({ path, attrs }) => {
4300
4306
  const relPath = path.substring(1);
4301
- const firstCoordinateSystem = attrs?.multiscales?.[0]?.coordinateTransformations?.[0]?.output?.name;
4307
+ const omeAttrs = flattenOmeAttrs(attrs);
4308
+ const firstCoordinateSystem = omeAttrs?.multiscales?.[0]?.coordinateTransformations?.[0]?.output?.name;
4302
4309
  if (relPath.match(/^(images)\/([^/]*)$/)) {
4303
4310
  options.image = {
4304
4311
  path: relPath,
@@ -1 +1 @@
1
- {"version":3,"file":"generate-config-spatialdata.d.ts","sourceRoot":"","sources":["../src/generate-config-spatialdata.js"],"names":[],"mappings":"AAIA;IACE,iBAiGC;CAqCF;mCAzIkC,8BAA8B"}
1
+ {"version":3,"file":"generate-config-spatialdata.d.ts","sourceRoot":"","sources":["../src/generate-config-spatialdata.js"],"names":[],"mappings":"AAKA;IACE,iBAkGC;CAqCF;mCA1IkC,8BAA8B"}
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable no-unused-vars */
2
+ import { flattenOmeAttrs } from '@vitessce/zarr-utils';
2
3
  import { hconcat, vconcat } from './VitessceConfig.js';
3
4
  import { AbstractAutoConfig } from './generate-config-helpers.js';
4
5
  export class SpatialDataAutoConfig extends AbstractAutoConfig {
@@ -11,7 +12,8 @@ export class SpatialDataAutoConfig extends AbstractAutoConfig {
11
12
  });
12
13
  availableElements.forEach(({ path, attrs }) => {
13
14
  const relPath = path.substring(1);
14
- const firstCoordinateSystem = attrs
15
+ const omeAttrs = flattenOmeAttrs(attrs);
16
+ const firstCoordinateSystem = omeAttrs
15
17
  ?.multiscales?.[0]
16
18
  ?.coordinateTransformations?.[0]
17
19
  ?.output?.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/config",
3
- "version": "3.9.7",
3
+ "version": "3.9.8",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -18,10 +18,10 @@
18
18
  "dependencies": {
19
19
  "zarrita": "0.6.1",
20
20
  "@zarrita/storage": "0.1.4",
21
- "@vitessce/constants-internal": "3.9.7",
22
- "@vitessce/globals": "3.9.7",
23
- "@vitessce/zarr-utils": "3.9.7",
24
- "@vitessce/utils": "3.9.7"
21
+ "@vitessce/constants-internal": "3.9.8",
22
+ "@vitessce/utils": "3.9.8",
23
+ "@vitessce/globals": "3.9.8",
24
+ "@vitessce/zarr-utils": "3.9.8"
25
25
  },
26
26
  "scripts": {
27
27
  "bundle": "pnpm exec vite build -c ../../scripts/vite.config.mjs",
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable no-unused-vars */
2
+ import { flattenOmeAttrs } from '@vitessce/zarr-utils';
2
3
  import { hconcat, vconcat } from './VitessceConfig.js';
3
4
  import { AbstractAutoConfig } from './generate-config-helpers.js';
4
5
 
@@ -15,7 +16,8 @@ export class SpatialDataAutoConfig extends AbstractAutoConfig {
15
16
  availableElements.forEach(({ path, attrs }) => {
16
17
  const relPath = path.substring(1);
17
18
 
18
- const firstCoordinateSystem = attrs
19
+ const omeAttrs = flattenOmeAttrs(attrs);
20
+ const firstCoordinateSystem = omeAttrs
19
21
  ?.multiscales?.[0]
20
22
  ?.coordinateTransformations?.[0]
21
23
  ?.output?.name;