@vitessce/csv 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 +17 -17
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -1529,7 +1529,12 @@ function getAugmentedNamespace(n) {
1529
1529
  var f = n.default;
1530
1530
  if (typeof f == "function") {
1531
1531
  var a = function a2() {
1532
- if (this instanceof a2) {
1532
+ var isInstance = false;
1533
+ try {
1534
+ isInstance = this instanceof a2;
1535
+ } catch {
1536
+ }
1537
+ if (isInstance) {
1533
1538
  return Reflect.construct(f, arguments, this.constructor);
1534
1539
  }
1535
1540
  return f.apply(this, arguments);
@@ -2448,7 +2453,7 @@ function toFinite(value) {
2448
2453
  return value === 0 ? value : 0;
2449
2454
  }
2450
2455
  value = toNumber(value);
2451
- if (value === INFINITY || value === -Infinity) {
2456
+ if (value === INFINITY || value === -INFINITY) {
2452
2457
  var sign = value < 0 ? -1 : 1;
2453
2458
  return sign * MAX_INTEGER;
2454
2459
  }
@@ -8058,13 +8063,12 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
8058
8063
  };
8059
8064
  const layout = [];
8060
8065
  config.staticLayout.forEach((componentDef) => {
8061
- var _a, _b, _c;
8062
8066
  let newComponentDef = {
8063
8067
  ...componentDef,
8064
8068
  coordinationScopes: {}
8065
8069
  };
8066
8070
  if (componentDef.component === "scatterplot") {
8067
- if (((_a = componentDef.props) == null ? void 0 : _a.mapping) && typeof componentDef.props.mapping === "string") {
8071
+ if (componentDef.props?.mapping && typeof componentDef.props.mapping === "string") {
8068
8072
  coordinationSpace.embeddingType[componentDef.props.mapping] = componentDef.props.mapping;
8069
8073
  newComponentDef = {
8070
8074
  ...newComponentDef,
@@ -8074,7 +8078,7 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
8074
8078
  }
8075
8079
  };
8076
8080
  }
8077
- if ((_b = componentDef.props) == null ? void 0 : _b.view) {
8081
+ if (componentDef.props?.view) {
8078
8082
  const newScopeValues = upgradeReplaceViewProp("embedding", componentDef.props.view, coordinationSpace);
8079
8083
  newComponentDef = {
8080
8084
  ...newComponentDef,
@@ -8086,7 +8090,7 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
8086
8090
  }
8087
8091
  }
8088
8092
  if (componentDef.component === "spatial") {
8089
- if ((_c = componentDef == null ? void 0 : componentDef.props) == null ? void 0 : _c.view) {
8093
+ if (componentDef?.props?.view) {
8090
8094
  const newScopeValues = upgradeReplaceViewProp("spatial", componentDef.props.view, coordinationSpace);
8091
8095
  newComponentDef = {
8092
8096
  ...newComponentDef,
@@ -8176,7 +8180,6 @@ function upgradeFrom1_0_0(config) {
8176
8180
  };
8177
8181
  }
8178
8182
  function upgradeFrom1_0_1(config) {
8179
- var _a;
8180
8183
  const layout = config.layout.map((component) => {
8181
8184
  const newComponent = { ...component };
8182
8185
  if (newComponent.component === "layerController") {
@@ -8188,9 +8191,8 @@ function upgradeFrom1_0_1(config) {
8188
8191
  return newComponent;
8189
8192
  });
8190
8193
  const newConfig = cloneDeep(config);
8191
- Object.keys(((_a = newConfig == null ? void 0 : newConfig.coordinationSpace) == null ? void 0 : _a.spatialRasterLayers) || {}).forEach((key) => {
8192
- var _a2, _b;
8193
- if ((_b = (_a2 = newConfig.coordinationSpace) == null ? void 0 : _a2.spatialRasterLayers) == null ? void 0 : _b[key]) {
8194
+ Object.keys(newConfig?.coordinationSpace?.spatialRasterLayers || {}).forEach((key) => {
8195
+ if (newConfig.coordinationSpace?.spatialRasterLayers?.[key]) {
8194
8196
  newConfig.coordinationSpace.spatialRasterLayers[key].forEach((layer, index) => {
8195
8197
  if (newConfig.coordinationSpace) {
8196
8198
  newConfig.coordinationSpace.spatialRasterLayers[key][index].type = ["bitmask", "raster"].includes(layer.type) ? layer.type : "raster";
@@ -8331,7 +8333,7 @@ function upgradeFrom1_0_10(config) {
8331
8333
  function upgradeFrom1_0_11(config) {
8332
8334
  const newConfig = cloneDeep(config);
8333
8335
  const { datasets, coordinationSpace } = newConfig;
8334
- if (coordinationSpace == null ? void 0 : coordinationSpace.embeddingType) {
8336
+ if (coordinationSpace?.embeddingType) {
8335
8337
  const embeddingTypes = Object.values(coordinationSpace.embeddingType);
8336
8338
  datasets.forEach((dataset, i) => {
8337
8339
  const { files } = dataset;
@@ -8364,7 +8366,7 @@ function upgradeFrom1_0_12(config) {
8364
8366
  if (options && "factors" in options && Array.isArray(options.factors)) {
8365
8367
  const obsLabelsTypeScopes = [];
8366
8368
  options.factors.forEach((olt) => {
8367
- const nextScope = getNextScope(Object.keys((coordinationSpace == null ? void 0 : coordinationSpace.obsLabelsType) || {}));
8369
+ const nextScope = getNextScope(Object.keys(coordinationSpace?.obsLabelsType || {}));
8368
8370
  newCoordinationSpace.obsLabelsType = {
8369
8371
  ...newCoordinationSpace.obsLabelsType,
8370
8372
  // Need to remove the obs/ prefix.
@@ -8378,8 +8380,7 @@ function upgradeFrom1_0_12(config) {
8378
8380
  });
8379
8381
  });
8380
8382
  function getDatasetUidForView(viewDef) {
8381
- var _a, _b;
8382
- if (((_a = viewDef.coordinationScopes) == null ? void 0 : _a.dataset) && typeof ((_b = viewDef.coordinationScopes) == null ? void 0 : _b.dataset) === "string") {
8383
+ if (viewDef.coordinationScopes?.dataset && typeof viewDef.coordinationScopes?.dataset === "string") {
8383
8384
  return newCoordinationSpace.dataset[viewDef.coordinationScopes.dataset];
8384
8385
  }
8385
8386
  if (datasets.length > 0) {
@@ -8442,8 +8443,7 @@ function upgradeFrom1_0_14(config) {
8442
8443
  };
8443
8444
  newLayout.forEach((viewDef) => {
8444
8445
  Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
8445
- var _a;
8446
- if ((_a = viewDef.props) == null ? void 0 : _a[oldProp]) {
8446
+ if (viewDef.props?.[oldProp]) {
8447
8447
  log.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
8448
8448
  }
8449
8449
  });
@@ -8460,7 +8460,7 @@ function upgradeFrom1_0_15(config) {
8460
8460
  const newLayout = layout.map((view) => {
8461
8461
  const { coordinationScopes } = view;
8462
8462
  const newCoordinationScopes = {};
8463
- if ((coordinationScopes == null ? void 0 : coordinationScopes.dataset) && Array.isArray(coordinationScopes.dataset)) {
8463
+ if (coordinationScopes?.dataset && Array.isArray(coordinationScopes.dataset)) {
8464
8464
  const coordinationScopesBy = {
8465
8465
  dataset: {}
8466
8466
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/csv",
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": {
@@ -18,14 +18,14 @@
18
18
  "dependencies": {
19
19
  "d3-array": "^2.4.0",
20
20
  "d3-dsv": "^1.1.1",
21
- "@vitessce/constants-internal": "3.6.18",
22
- "@vitessce/sets-utils": "3.6.18",
23
- "@vitessce/abstract": "3.6.18",
24
- "@vitessce/error": "3.6.18",
25
- "@vitessce/config": "3.6.18"
21
+ "@vitessce/constants-internal": "3.7.0",
22
+ "@vitessce/sets-utils": "3.7.0",
23
+ "@vitessce/abstract": "3.7.0",
24
+ "@vitessce/error": "3.7.0",
25
+ "@vitessce/config": "3.7.0"
26
26
  },
27
27
  "scripts": {
28
- "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
28
+ "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",
29
29
  "test": "pnpm exec vitest --run"
30
30
  },
31
31
  "module": "dist/index.js",