@vitessce/config 3.6.18 → 3.7.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 (2) hide show
  1. package/dist/index.js +7 -10
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -773,12 +773,11 @@ class VitessceConfigDataset {
773
773
  }
774
774
  function useCoordinationByObjectHelper(scopes, coordinationScopes, coordinationScopesBy) {
775
775
  function processLevel(parentType, parentScope, levelType, levelVal) {
776
- var _a, _b;
777
776
  if (Array.isArray(levelVal)) {
778
777
  coordinationScopesBy[parentType] = {
779
778
  ...coordinationScopesBy[parentType] || {},
780
779
  [levelType]: {
781
- ...((_a = coordinationScopesBy[parentType]) == null ? void 0 : _a[levelType]) || {},
780
+ ...coordinationScopesBy[parentType]?.[levelType] || {},
782
781
  [parentScope.cScope]: levelVal.map((childVal) => childVal.scope.cScope)
783
782
  }
784
783
  };
@@ -796,7 +795,7 @@ function useCoordinationByObjectHelper(scopes, coordinationScopes, coordinationS
796
795
  coordinationScopesBy[parentType] = {
797
796
  ...coordinationScopesBy[parentType] || {},
798
797
  [levelType]: {
799
- ...((_b = coordinationScopesBy[parentType]) == null ? void 0 : _b[levelType]) || {},
798
+ ...coordinationScopesBy[parentType]?.[levelType] || {},
800
799
  [parentScope.cScope]: levelVal.scope.cScope
801
800
  }
802
801
  };
@@ -1649,7 +1648,6 @@ class AnndataZarrAutoConfig extends AbstractAutoConfig {
1649
1648
  this.metadataSummary = {};
1650
1649
  }
1651
1650
  async composeFileConfig() {
1652
- var _a;
1653
1651
  this.metadataSummary = await this.setMetadataSummary();
1654
1652
  const options = {
1655
1653
  obsEmbedding: [],
@@ -1704,7 +1702,7 @@ class AnndataZarrAutoConfig extends AbstractAutoConfig {
1704
1702
  }
1705
1703
  });
1706
1704
  });
1707
- options.obsSets = (_a = options.obsSets) == null ? void 0 : _a.map((obsSet) => {
1705
+ options.obsSets = options.obsSets?.map((obsSet) => {
1708
1706
  if (obsSet.path.length === 1) {
1709
1707
  return {
1710
1708
  ...obsSet,
@@ -2046,10 +2044,9 @@ function getHintOptions(fileUrls) {
2046
2044
  }
2047
2045
  });
2048
2046
  const datasetType = Object.keys(fileTypes).sort().join(",");
2049
- return (HINT_TYPE_TO_FILE_TYPE_MAP == null ? void 0 : HINT_TYPE_TO_FILE_TYPE_MAP[datasetType]) || [];
2047
+ return HINT_TYPE_TO_FILE_TYPE_MAP?.[datasetType] || [];
2050
2048
  }
2051
2049
  async function generateConfig(fileUrls, hintTitle = null) {
2052
- var _a;
2053
2050
  const vc = new VitessceConfig({
2054
2051
  schemaVersion: "1.0.15",
2055
2052
  name: "An automatically generated config. Adjust values and add layout components if needed.",
@@ -2057,17 +2054,17 @@ async function generateConfig(fileUrls, hintTitle = null) {
2057
2054
  });
2058
2055
  const allViews = [];
2059
2056
  const dataset = vc.addDataset("An automatically generated view config for dataset. Adjust values and add layout components if needed.");
2060
- const hintsConfig = !hintTitle ? { views: {} } : HINTS_CONFIG == null ? void 0 : HINTS_CONFIG[hintTitle];
2057
+ const hintsConfig = !hintTitle ? { views: {} } : HINTS_CONFIG?.[hintTitle];
2061
2058
  if (!hintsConfig) {
2062
2059
  throw new Error(`Hints config not found for the supplied hint: ${hintTitle}.`);
2063
2060
  }
2064
- const useHints = ((_a = Object.keys(hintsConfig == null ? void 0 : hintsConfig.views)) == null ? void 0 : _a.length) > 0;
2061
+ const useHints = Object.keys(hintsConfig?.views)?.length > 0;
2065
2062
  fileUrls.forEach((url) => {
2066
2063
  allViews.push(generateViewDefinition(url, vc, dataset, hintsConfig));
2067
2064
  });
2068
2065
  return Promise.all(allViews).then((views) => {
2069
2066
  const flattenedViews = views.flat();
2070
- if (hintsConfig == null ? void 0 : hintsConfig.coordinationSpaceRequired) {
2067
+ if (hintsConfig?.coordinationSpaceRequired) {
2071
2068
  insertCoordinationSpaceForSpatial(flattenedViews, vc);
2072
2069
  }
2073
2070
  if (!useHints) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/config",
3
- "version": "3.6.18",
3
+ "version": "3.7.0",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -17,13 +17,13 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "zarrita": "0.5.3",
20
- "@vitessce/constants-internal": "3.6.18",
21
- "@vitessce/utils": "3.6.18",
22
- "@vitessce/globals": "3.6.18",
23
- "@vitessce/zarr-utils": "3.6.18"
20
+ "@vitessce/constants-internal": "3.7.0",
21
+ "@vitessce/utils": "3.7.0",
22
+ "@vitessce/zarr-utils": "3.7.0",
23
+ "@vitessce/globals": "3.7.0"
24
24
  },
25
25
  "scripts": {
26
- "bundle": "pnpm exec vite build -c ../../scripts/vite.config.js",
26
+ "bundle": "pnpm exec vite build -c ../../scripts/vite.config.mjs",
27
27
  "test": "pnpm exec vitest --run"
28
28
  },
29
29
  "module": "dist/index.js",