@vitessce/scatterplot-gating 3.4.14 → 3.5.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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-a7052125.js";
2
+ import { B as BaseDecoder } from "./index-c5f7bda6.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -11017,7 +11017,8 @@ const ViewType$1 = {
11017
11017
  OBS_SET_FEATURE_VALUE_DISTRIBUTION: "obsSetFeatureValueDistribution",
11018
11018
  FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
11019
11019
  DOT_PLOT: "dotPlot",
11020
- FEATURE_BAR_PLOT: "featureBarPlot"
11020
+ FEATURE_BAR_PLOT: "featureBarPlot",
11021
+ BIOMARKER_SELECT: "biomarkerSelect"
11021
11022
  };
11022
11023
  const DataType$2 = {
11023
11024
  OBS_LABELS: "obsLabels",
@@ -11712,6 +11713,11 @@ const COMPONENT_COORDINATION_TYPES = {
11712
11713
  CoordinationType$1.OBS_SET_COLOR,
11713
11714
  CoordinationType$1.OBS_COLOR_ENCODING,
11714
11715
  CoordinationType$1.ADDITIONAL_OBS_SETS
11716
+ ],
11717
+ [ViewType$1.BIOMARKER_SELECT]: [
11718
+ CoordinationType$1.FEATURE_SELECTION,
11719
+ CoordinationType$1.SAMPLE_SET_SELECTION
11720
+ // TODO: create coordination types for internal state of the biomarker selection view?
11715
11721
  ]
11716
11722
  };
11717
11723
  const ViewType = {
@@ -89547,7 +89553,7 @@ keysShim.shim = function shimObjectKeys() {
89547
89553
  return Object.keys || keysShim;
89548
89554
  };
89549
89555
  var objectKeys$1 = keysShim;
89550
- var shams$2 = function hasSymbols() {
89556
+ var shams$1 = function hasSymbols() {
89551
89557
  if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
89552
89558
  return false;
89553
89559
  }
@@ -89592,9 +89598,9 @@ var shams$2 = function hasSymbols() {
89592
89598
  }
89593
89599
  return true;
89594
89600
  };
89595
- var hasSymbols$4 = shams$2;
89596
- var shams$1 = function hasToStringTagShams() {
89597
- return hasSymbols$4() && !!Symbol.toStringTag;
89601
+ var hasSymbols$3 = shams$1;
89602
+ var shams = function hasToStringTagShams() {
89603
+ return hasSymbols$3() && !!Symbol.toStringTag;
89598
89604
  };
89599
89605
  var esErrors = Error;
89600
89606
  var _eval = EvalError;
@@ -89604,8 +89610,8 @@ var syntax = SyntaxError;
89604
89610
  var type = TypeError;
89605
89611
  var uri = URIError;
89606
89612
  var origSymbol = typeof Symbol !== "undefined" && Symbol;
89607
- var hasSymbolSham = shams$2;
89608
- var hasSymbols$3 = function hasNativeSymbols() {
89613
+ var hasSymbolSham = shams$1;
89614
+ var hasSymbols$2 = function hasNativeSymbols() {
89609
89615
  if (typeof origSymbol !== "function") {
89610
89616
  return false;
89611
89617
  }
@@ -89621,11 +89627,12 @@ var hasSymbols$3 = function hasNativeSymbols() {
89621
89627
  return hasSymbolSham();
89622
89628
  };
89623
89629
  var test = {
89630
+ __proto__: null,
89624
89631
  foo: {}
89625
89632
  };
89626
89633
  var $Object$1 = Object;
89627
89634
  var hasProto$1 = function hasProto() {
89628
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
89635
+ return { __proto__: test }.foo === test.foo && !(test instanceof $Object$1);
89629
89636
  };
89630
89637
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
89631
89638
  var toStr$2 = Object.prototype.toString;
@@ -89740,7 +89747,7 @@ var ThrowTypeError = $gOPD$2 ? function() {
89740
89747
  }
89741
89748
  }
89742
89749
  }() : throwTypeError;
89743
- var hasSymbols$2 = hasSymbols$3();
89750
+ var hasSymbols$1 = hasSymbols$2();
89744
89751
  var hasProto2 = hasProto$1();
89745
89752
  var getProto$1 = Object.getPrototypeOf || (hasProto2 ? function(x2) {
89746
89753
  return x2.__proto__;
@@ -89752,7 +89759,7 @@ var INTRINSICS = {
89752
89759
  "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
89753
89760
  "%Array%": Array,
89754
89761
  "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
89755
- "%ArrayIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
89762
+ "%ArrayIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
89756
89763
  "%AsyncFromSyncIteratorPrototype%": undefined$1,
89757
89764
  "%AsyncFunction%": needsEval,
89758
89765
  "%AsyncGenerator%": needsEval,
@@ -89783,10 +89790,10 @@ var INTRINSICS = {
89783
89790
  "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
89784
89791
  "%isFinite%": isFinite,
89785
89792
  "%isNaN%": isNaN,
89786
- "%IteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
89793
+ "%IteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
89787
89794
  "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
89788
89795
  "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
89789
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
89796
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
89790
89797
  "%Math%": Math,
89791
89798
  "%Number%": Number,
89792
89799
  "%Object%": Object,
@@ -89799,11 +89806,11 @@ var INTRINSICS = {
89799
89806
  "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
89800
89807
  "%RegExp%": RegExp,
89801
89808
  "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
89802
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
89809
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
89803
89810
  "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
89804
89811
  "%String%": String,
89805
- "%StringIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
89806
- "%Symbol%": hasSymbols$2 ? Symbol : undefined$1,
89812
+ "%StringIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
89813
+ "%Symbol%": hasSymbols$1 ? Symbol : undefined$1,
89807
89814
  "%SyntaxError%": $SyntaxError$1,
89808
89815
  "%ThrowTypeError%": ThrowTypeError,
89809
89816
  "%TypedArray%": TypedArray,
@@ -90172,7 +90179,7 @@ var callBound$2 = function callBoundIntrinsic(name2, allowMissing) {
90172
90179
  }
90173
90180
  return intrinsic;
90174
90181
  };
90175
- var hasToStringTag$2 = shams$1();
90182
+ var hasToStringTag$2 = shams();
90176
90183
  var callBound$1 = callBound$2;
90177
90184
  var $toString$1 = callBound$1("Object.prototype.toString");
90178
90185
  var isStandardArguments = function isArguments2(value) {
@@ -90217,7 +90224,7 @@ hasPropertyDescriptors2.hasArrayLengthDefineBug = function hasArrayLengthDefineB
90217
90224
  };
90218
90225
  var hasPropertyDescriptors_1 = hasPropertyDescriptors2;
90219
90226
  var keys$1 = objectKeys$1;
90220
- var hasSymbols$1 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
90227
+ var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
90221
90228
  var toStr$1 = Object.prototype.toString;
90222
90229
  var concat = Array.prototype.concat;
90223
90230
  var defineDataProperty2 = defineDataProperty$1;
@@ -90244,7 +90251,7 @@ var defineProperty$3 = function(object2, name2, value, predicate) {
90244
90251
  var defineProperties = function(object2, map2) {
90245
90252
  var predicates = arguments.length > 2 ? arguments[2] : {};
90246
90253
  var props = keys$1(map2);
90247
- if (hasSymbols$1) {
90254
+ if (hasSymbols2) {
90248
90255
  props = concat.call(props, Object.getOwnPropertySymbols(map2));
90249
90256
  }
90250
90257
  for (var i2 = 0; i2 < props.length; i2 += 1) {
@@ -90295,10 +90302,6 @@ define$2(polyfill$1, {
90295
90302
  shim: shim$2
90296
90303
  });
90297
90304
  var objectIs = polyfill$1;
90298
- var hasSymbols2 = shams$2;
90299
- var shams = function hasToStringTagShams2() {
90300
- return hasSymbols2() && !!Symbol.toStringTag;
90301
- };
90302
90305
  var callBound = callBound$2;
90303
90306
  var hasToStringTag$1 = shams();
90304
90307
  var has$3;
@@ -90505,7 +90508,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
90505
90508
  };
90506
90509
  var toStr = Object.prototype.toString;
90507
90510
  var dateClass = "[object Date]";
90508
- var hasToStringTag = shams$1();
90511
+ var hasToStringTag = shams();
90509
90512
  var isDateObject = function isDateObject2(value) {
90510
90513
  if (typeof value !== "object" || value === null) {
90511
90514
  return false;
@@ -123825,16 +123828,16 @@ function addDecoder(cases, importFn) {
123825
123828
  }
123826
123829
  cases.forEach((c2) => registry$1.set(c2, importFn));
123827
123830
  }
123828
- addDecoder([void 0, 1], () => import("./raw-a4debd6c.js").then((m2) => m2.default));
123829
- addDecoder(5, () => import("./lzw-9f52473a.js").then((m2) => m2.default));
123831
+ addDecoder([void 0, 1], () => import("./raw-76bd4a80.js").then((m2) => m2.default));
123832
+ addDecoder(5, () => import("./lzw-f1763f1b.js").then((m2) => m2.default));
123830
123833
  addDecoder(6, () => {
123831
123834
  throw new Error("old style JPEG compression is not supported.");
123832
123835
  });
123833
- addDecoder(7, () => import("./jpeg-d0bd0dbe.js").then((m2) => m2.default));
123834
- addDecoder([8, 32946], () => import("./deflate-cf02d134.js").then((m2) => m2.default));
123835
- addDecoder(32773, () => import("./packbits-88231270.js").then((m2) => m2.default));
123836
- addDecoder(34887, () => import("./lerc-776d0184.js").then((m2) => m2.default));
123837
- addDecoder(50001, () => import("./webimage-8270872a.js").then((m2) => m2.default));
123836
+ addDecoder(7, () => import("./jpeg-16205d41.js").then((m2) => m2.default));
123837
+ addDecoder([8, 32946], () => import("./deflate-2f9a6f39.js").then((m2) => m2.default));
123838
+ addDecoder(32773, () => import("./packbits-dba200ba.js").then((m2) => m2.default));
123839
+ addDecoder(34887, () => import("./lerc-88582bf6.js").then((m2) => m2.default));
123840
+ addDecoder(50001, () => import("./webimage-89fabb16.js").then((m2) => m2.default));
123838
123841
  function decodeRowAcc(row, stride) {
123839
123842
  let length2 = row.length - stride;
123840
123843
  let offset5 = 0;
@@ -150271,6 +150274,7 @@ const CELLS_LAYER_ID = "scatterplot";
150271
150274
  const LABEL_FONT_FAMILY = "-apple-system, 'Helvetica Neue', Arial, sans-serif";
150272
150275
  const NUM_FORCE_SIMULATION_TICKS = 100;
150273
150276
  const LABEL_UPDATE_ZOOM_DELTA = 0.25;
150277
+ const POINT_LAYER_Z_INDEX = 0;
150274
150278
  const makeDefaultGetCellColors = (cellColors, obsIndex, theme) => (object2, { index: index2 }) => {
150275
150279
  const [r2, g2, b, a2] = cellColors && obsIndex && cellColors.get(obsIndex[index2]) || getDefaultColor(theme);
150276
150280
  return [r2, g2, b, 255 * (a2 || 1)];
@@ -150288,7 +150292,7 @@ const makeFlippedGetObsCoords = (obsEmbedding) => (i2) => [
150288
150292
  const getPosition = (object2, { index: index2, data, target }) => {
150289
150293
  target[0] = data.src.obsEmbedding.data[0][index2];
150290
150294
  target[1] = -data.src.obsEmbedding.data[1][index2];
150291
- target[2] = 0;
150295
+ target[2] = POINT_LAYER_Z_INDEX;
150292
150296
  return target;
150293
150297
  };
150294
150298
  const contourGetWeight = (object2, { index: index2, data }) => data.src.featureValues[index2];
@@ -150298,7 +150302,6 @@ const contourGetPosition = (object2, { index: index2, data, target }) => {
150298
150302
  target[2] = 0;
150299
150303
  return target;
150300
150304
  };
150301
- const contourGetPolygonOffset = () => [0, 20];
150302
150305
  class Scatterplot extends AbstractSpatialOrScatterplot {
150303
150306
  constructor(props) {
150304
150307
  super(props);
@@ -150338,7 +150341,6 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
150338
150341
  data: deckData,
150339
150342
  getWeight: contourGetWeight,
150340
150343
  getPosition: contourGetPosition,
150341
- getPolygonOffset: contourGetPolygonOffset,
150342
150344
  contours: contourThresholds.map((threshold, i2) => ({
150343
150345
  threshold: contoursFilled ? [threshold, threshold[i2 + 1] || Infinity] : threshold,
150344
150346
  // TODO: should the opacity steps be uniform? Should align with human perception.
@@ -150349,7 +150351,10 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
150349
150351
  // a
150350
150352
  contoursFilled ? (i2 + 0.5) / contourThresholds.length * 255 : (i2 + 1) / contourThresholds.length * 255
150351
150353
  ],
150352
- strokeWidth: 2
150354
+ strokeWidth: 2,
150355
+ // We need to specify a greater z-index so that the contour layers
150356
+ // will render on top of the point layer.
150357
+ zIndex: POINT_LAYER_Z_INDEX + 1 + i2
150353
150358
  })),
150354
150359
  aggregation: "MEAN",
150355
150360
  gpuAggregation: true,
@@ -151370,7 +151375,7 @@ function GatingSubscriber(props) {
151370
151375
  const getCellIsSelected = useCallback((object2, { index: index2 }) => (cellSelectionSet || /* @__PURE__ */ new Set([])).has(obsIndex[index2]) ? 1 : 0, [cellSelectionSet, obsIndex]);
151371
151376
  const cellRadius = cellRadiusMode === "manual" ? cellRadiusFixed : dynamicCellRadius;
151372
151377
  const cellOpacity = cellOpacityMode === "manual" ? cellOpacityFixed : dynamicCellOpacity;
151373
- const [uint8ExpressionData] = useUint8FeatureSelection(expressionDataColor);
151378
+ const { normData: uint8ExpressionData } = useUint8FeatureSelection(expressionDataColor);
151374
151379
  const getExpressionValue = useExpressionValueGetter({
151375
151380
  instanceObsIndex: obsIndex,
151376
151381
  matrixObsIndex: obsIndex,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G } from "./index-a7052125.js";
1
+ import { G } from "./index-c5f7bda6.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7052125.js";
1
+ import { B as BaseDecoder } from "./index-c5f7bda6.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-a7052125.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-c5f7bda6.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7052125.js";
1
+ import { B as BaseDecoder } from "./index-c5f7bda6.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7052125.js";
1
+ import { B as BaseDecoder } from "./index-c5f7bda6.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7052125.js";
1
+ import { B as BaseDecoder } from "./index-c5f7bda6.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-a7052125.js";
1
+ import { B as BaseDecoder } from "./index-c5f7bda6.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -170,7 +170,7 @@ export function GatingSubscriber(props) {
170
170
  const getCellIsSelected = useCallback((object, { index }) => ((cellSelectionSet || new Set([])).has(obsIndex[index]) ? 1.0 : 0.0), [cellSelectionSet, obsIndex]);
171
171
  const cellRadius = (cellRadiusMode === 'manual' ? cellRadiusFixed : dynamicCellRadius);
172
172
  const cellOpacity = (cellOpacityMode === 'manual' ? cellOpacityFixed : dynamicCellOpacity);
173
- const [uint8ExpressionData] = useUint8FeatureSelection(expressionDataColor);
173
+ const { normData: uint8ExpressionData } = useUint8FeatureSelection(expressionDataColor);
174
174
  // Set up a getter function for gene expression values, to be used
175
175
  // by the DeckGL layer to obtain values for instanced attributes.
176
176
  const getExpressionValue = useExpressionValueGetter({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-gating",
3
- "version": "3.4.14",
4
- "author": "Gehlenborg Lab",
3
+ "version": "3.5.0",
4
+ "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
7
7
  "type": "git",
@@ -20,11 +20,11 @@
20
20
  "d3-array": "^2.4.0",
21
21
  "lodash-es": "^4.17.21",
22
22
  "react-aria": "^3.28.0",
23
- "@vitessce/constants-internal": "3.4.14",
24
- "@vitessce/scatterplot": "3.4.14",
25
- "@vitessce/sets-utils": "3.4.14",
26
- "@vitessce/utils": "3.4.14",
27
- "@vitessce/vit-s": "3.4.14"
23
+ "@vitessce/constants-internal": "3.5.0",
24
+ "@vitessce/scatterplot": "3.5.0",
25
+ "@vitessce/sets-utils": "3.5.0",
26
+ "@vitessce/utils": "3.5.0",
27
+ "@vitessce/vit-s": "3.5.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "react": "^18.0.0",
@@ -325,7 +325,7 @@ export function GatingSubscriber(props) {
325
325
  const cellRadius = (cellRadiusMode === 'manual' ? cellRadiusFixed : dynamicCellRadius);
326
326
  const cellOpacity = (cellOpacityMode === 'manual' ? cellOpacityFixed : dynamicCellOpacity);
327
327
 
328
- const [uint8ExpressionData] = useUint8FeatureSelection(expressionDataColor);
328
+ const { normData: uint8ExpressionData } = useUint8FeatureSelection(expressionDataColor);
329
329
 
330
330
  // Set up a getter function for gene expression values, to be used
331
331
  // by the DeckGL layer to obtain values for instanced attributes.