@vitessce/csv 3.6.18 → 3.7.1

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 +19 -21
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -885,6 +885,7 @@ const CoordinationType$1 = {
885
885
  CoordinationType$1.SPATIAL_ROTATION_Y,
886
886
  CoordinationType$1.SPATIAL_ROTATION_Z,
887
887
  CoordinationType$1.SPATIAL_AXIS_FIXED,
888
+ CoordinationType$1.SPATIAL_ROTATION_ORBIT,
888
889
  CoordinationType$1.SPATIAL_ORBIT_AXIS,
889
890
  CoordinationType$1.SPATIAL_ZOOM,
890
891
  CoordinationType$1.OBS_FILTER,
@@ -892,14 +893,11 @@ const CoordinationType$1 = {
892
893
  CoordinationType$1.OBS_SET_SELECTION,
893
894
  CoordinationType$1.OBS_SET_FILTER,
894
895
  CoordinationType$1.OBS_SET_HIGHLIGHT,
895
- CoordinationType$1.OBS_SET_COLOR,
896
896
  CoordinationType$1.OBS_TYPE,
897
- CoordinationType$1.ADDITIONAL_OBS_SETS,
898
897
  CoordinationType$1.OBS_SET_COLOR,
899
898
  CoordinationType$1.OBS_COLOR_ENCODING,
900
- CoordinationType$1.OBS_SET_SELECTION,
901
899
  CoordinationType$1.EMBEDDING_TYPE,
902
- CoordinationType$1.OBS_COLOR_ENCODING,
900
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
903
901
  CoordinationType$1.TOOLTIPS_VISIBLE
904
902
  ],
905
903
  [ViewType$1.SCATTERPLOT]: [
@@ -1529,7 +1527,12 @@ function getAugmentedNamespace(n) {
1529
1527
  var f = n.default;
1530
1528
  if (typeof f == "function") {
1531
1529
  var a = function a2() {
1532
- if (this instanceof a2) {
1530
+ var isInstance = false;
1531
+ try {
1532
+ isInstance = this instanceof a2;
1533
+ } catch {
1534
+ }
1535
+ if (isInstance) {
1533
1536
  return Reflect.construct(f, arguments, this.constructor);
1534
1537
  }
1535
1538
  return f.apply(this, arguments);
@@ -2448,7 +2451,7 @@ function toFinite(value) {
2448
2451
  return value === 0 ? value : 0;
2449
2452
  }
2450
2453
  value = toNumber(value);
2451
- if (value === INFINITY || value === -Infinity) {
2454
+ if (value === INFINITY || value === -INFINITY) {
2452
2455
  var sign = value < 0 ? -1 : 1;
2453
2456
  return sign * MAX_INTEGER;
2454
2457
  }
@@ -8058,13 +8061,12 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
8058
8061
  };
8059
8062
  const layout = [];
8060
8063
  config.staticLayout.forEach((componentDef) => {
8061
- var _a, _b, _c;
8062
8064
  let newComponentDef = {
8063
8065
  ...componentDef,
8064
8066
  coordinationScopes: {}
8065
8067
  };
8066
8068
  if (componentDef.component === "scatterplot") {
8067
- if (((_a = componentDef.props) == null ? void 0 : _a.mapping) && typeof componentDef.props.mapping === "string") {
8069
+ if (componentDef.props?.mapping && typeof componentDef.props.mapping === "string") {
8068
8070
  coordinationSpace.embeddingType[componentDef.props.mapping] = componentDef.props.mapping;
8069
8071
  newComponentDef = {
8070
8072
  ...newComponentDef,
@@ -8074,7 +8076,7 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
8074
8076
  }
8075
8077
  };
8076
8078
  }
8077
- if ((_b = componentDef.props) == null ? void 0 : _b.view) {
8079
+ if (componentDef.props?.view) {
8078
8080
  const newScopeValues = upgradeReplaceViewProp("embedding", componentDef.props.view, coordinationSpace);
8079
8081
  newComponentDef = {
8080
8082
  ...newComponentDef,
@@ -8086,7 +8088,7 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
8086
8088
  }
8087
8089
  }
8088
8090
  if (componentDef.component === "spatial") {
8089
- if ((_c = componentDef == null ? void 0 : componentDef.props) == null ? void 0 : _c.view) {
8091
+ if (componentDef?.props?.view) {
8090
8092
  const newScopeValues = upgradeReplaceViewProp("spatial", componentDef.props.view, coordinationSpace);
8091
8093
  newComponentDef = {
8092
8094
  ...newComponentDef,
@@ -8176,7 +8178,6 @@ function upgradeFrom1_0_0(config) {
8176
8178
  };
8177
8179
  }
8178
8180
  function upgradeFrom1_0_1(config) {
8179
- var _a;
8180
8181
  const layout = config.layout.map((component) => {
8181
8182
  const newComponent = { ...component };
8182
8183
  if (newComponent.component === "layerController") {
@@ -8188,9 +8189,8 @@ function upgradeFrom1_0_1(config) {
8188
8189
  return newComponent;
8189
8190
  });
8190
8191
  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]) {
8192
+ Object.keys(newConfig?.coordinationSpace?.spatialRasterLayers || {}).forEach((key) => {
8193
+ if (newConfig.coordinationSpace?.spatialRasterLayers?.[key]) {
8194
8194
  newConfig.coordinationSpace.spatialRasterLayers[key].forEach((layer, index) => {
8195
8195
  if (newConfig.coordinationSpace) {
8196
8196
  newConfig.coordinationSpace.spatialRasterLayers[key][index].type = ["bitmask", "raster"].includes(layer.type) ? layer.type : "raster";
@@ -8331,7 +8331,7 @@ function upgradeFrom1_0_10(config) {
8331
8331
  function upgradeFrom1_0_11(config) {
8332
8332
  const newConfig = cloneDeep(config);
8333
8333
  const { datasets, coordinationSpace } = newConfig;
8334
- if (coordinationSpace == null ? void 0 : coordinationSpace.embeddingType) {
8334
+ if (coordinationSpace?.embeddingType) {
8335
8335
  const embeddingTypes = Object.values(coordinationSpace.embeddingType);
8336
8336
  datasets.forEach((dataset, i) => {
8337
8337
  const { files } = dataset;
@@ -8364,7 +8364,7 @@ function upgradeFrom1_0_12(config) {
8364
8364
  if (options && "factors" in options && Array.isArray(options.factors)) {
8365
8365
  const obsLabelsTypeScopes = [];
8366
8366
  options.factors.forEach((olt) => {
8367
- const nextScope = getNextScope(Object.keys((coordinationSpace == null ? void 0 : coordinationSpace.obsLabelsType) || {}));
8367
+ const nextScope = getNextScope(Object.keys(coordinationSpace?.obsLabelsType || {}));
8368
8368
  newCoordinationSpace.obsLabelsType = {
8369
8369
  ...newCoordinationSpace.obsLabelsType,
8370
8370
  // Need to remove the obs/ prefix.
@@ -8378,8 +8378,7 @@ function upgradeFrom1_0_12(config) {
8378
8378
  });
8379
8379
  });
8380
8380
  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") {
8381
+ if (viewDef.coordinationScopes?.dataset && typeof viewDef.coordinationScopes?.dataset === "string") {
8383
8382
  return newCoordinationSpace.dataset[viewDef.coordinationScopes.dataset];
8384
8383
  }
8385
8384
  if (datasets.length > 0) {
@@ -8442,8 +8441,7 @@ function upgradeFrom1_0_14(config) {
8442
8441
  };
8443
8442
  newLayout.forEach((viewDef) => {
8444
8443
  Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
8445
- var _a;
8446
- if ((_a = viewDef.props) == null ? void 0 : _a[oldProp]) {
8444
+ if (viewDef.props?.[oldProp]) {
8447
8445
  log.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
8448
8446
  }
8449
8447
  });
@@ -8460,7 +8458,7 @@ function upgradeFrom1_0_15(config) {
8460
8458
  const newLayout = layout.map((view) => {
8461
8459
  const { coordinationScopes } = view;
8462
8460
  const newCoordinationScopes = {};
8463
- if ((coordinationScopes == null ? void 0 : coordinationScopes.dataset) && Array.isArray(coordinationScopes.dataset)) {
8461
+ if (coordinationScopes?.dataset && Array.isArray(coordinationScopes.dataset)) {
8464
8462
  const coordinationScopesBy = {
8465
8463
  dataset: {}
8466
8464
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/csv",
3
- "version": "3.6.18",
3
+ "version": "3.7.1",
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.1",
22
+ "@vitessce/sets-utils": "3.7.1",
23
+ "@vitessce/abstract": "3.7.1",
24
+ "@vitessce/error": "3.7.1",
25
+ "@vitessce/config": "3.7.1"
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",