@vitessce/scatterplot-gating 3.2.0 → 3.2.2
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/{deflate-ee41da61.js → deflate-34407526.js} +1 -1
- package/dist/{index-8e87ac41.js → index-73600fb1.js} +247 -31
- package/dist/index.js +1 -1
- package/dist/{jpeg-a3397dc3.js → jpeg-d36cd1e8.js} +1 -1
- package/dist/{lerc-8b857b48.js → lerc-e5940768.js} +1 -1
- package/dist/{lzw-969b495e.js → lzw-66141aea.js} +1 -1
- package/dist/{packbits-e04429a8.js → packbits-2838880b.js} +1 -1
- package/dist/{raw-602cd908.js → raw-1b8265a8.js} +1 -1
- package/dist/{webimage-9e7f3198.js → webimage-ae3e1d5b.js} +1 -1
- package/dist-tsc/GatingScatterplotOptions.d.ts.map +1 -1
- package/dist-tsc/GatingScatterplotOptions.js +2 -1
- package/package.json +7 -6
- package/src/GatingScatterplotOptions.js +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import React__default, { useLayoutEffect, useEffect, cloneElement, createElement, forwardRef, useState, useRef, useMemo, useImperativeHandle, Children, isValidElement, PureComponent,
|
|
2
|
+
import React__default, { useLayoutEffect, useEffect, cloneElement, createElement, forwardRef, useState, useRef, useMemo, useImperativeHandle, Children, isValidElement, PureComponent, useContext, useCallback } from "react";
|
|
3
3
|
import { usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useVitessceContainer, useComponentHover, useComponentViewInfo, useLoaders, useSetComponentHover, useSetComponentViewInfo, useCoordination, useDeckCanvasSize, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useReady, useUrls, useUint8FeatureSelection, useExpressionValueGetter, TitleInfo } from "@vitessce/vit-s";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
import ReactDOM__default from "react-dom";
|
|
@@ -121094,16 +121094,16 @@ function addDecoder(cases, importFn) {
|
|
|
121094
121094
|
}
|
|
121095
121095
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121096
121096
|
}
|
|
121097
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121098
|
-
addDecoder(5, () => import("./lzw-
|
|
121097
|
+
addDecoder([void 0, 1], () => import("./raw-1b8265a8.js").then((m2) => m2.default));
|
|
121098
|
+
addDecoder(5, () => import("./lzw-66141aea.js").then((m2) => m2.default));
|
|
121099
121099
|
addDecoder(6, () => {
|
|
121100
121100
|
throw new Error("old style JPEG compression is not supported.");
|
|
121101
121101
|
});
|
|
121102
|
-
addDecoder(7, () => import("./jpeg-
|
|
121103
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121104
|
-
addDecoder(32773, () => import("./packbits-
|
|
121105
|
-
addDecoder(34887, () => import("./lerc-
|
|
121106
|
-
addDecoder(50001, () => import("./webimage-
|
|
121102
|
+
addDecoder(7, () => import("./jpeg-d36cd1e8.js").then((m2) => m2.default));
|
|
121103
|
+
addDecoder([8, 32946], () => import("./deflate-34407526.js").then((m2) => m2.default));
|
|
121104
|
+
addDecoder(32773, () => import("./packbits-2838880b.js").then((m2) => m2.default));
|
|
121105
|
+
addDecoder(34887, () => import("./lerc-e5940768.js").then((m2) => m2.default));
|
|
121106
|
+
addDecoder(50001, () => import("./webimage-ae3e1d5b.js").then((m2) => m2.default));
|
|
121107
121107
|
function decodeRowAcc(row, stride) {
|
|
121108
121108
|
let length2 = row.length - stride;
|
|
121109
121109
|
let offset5 = 0;
|
|
@@ -130003,6 +130003,67 @@ function makeBoundingBox(viewState) {
|
|
|
130003
130003
|
viewport.unproject([0, viewport.height])
|
|
130004
130004
|
];
|
|
130005
130005
|
}
|
|
130006
|
+
const TARGETS = [1, 2, 3, 4, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1e3];
|
|
130007
|
+
const MIN_TARGET = TARGETS[0];
|
|
130008
|
+
const MAX_TARGET = TARGETS[TARGETS.length - 1];
|
|
130009
|
+
const SI_PREFIXES = [
|
|
130010
|
+
{ symbol: "Y", exponent: 24 },
|
|
130011
|
+
{ symbol: "Z", exponent: 21 },
|
|
130012
|
+
{ symbol: "E", exponent: 18 },
|
|
130013
|
+
{ symbol: "P", exponent: 15 },
|
|
130014
|
+
{ symbol: "T", exponent: 12 },
|
|
130015
|
+
{ symbol: "G", exponent: 9 },
|
|
130016
|
+
{ symbol: "M", exponent: 6 },
|
|
130017
|
+
{ symbol: "k", exponent: 3 },
|
|
130018
|
+
{ symbol: "h", exponent: 2 },
|
|
130019
|
+
{ symbol: "da", exponent: 1 },
|
|
130020
|
+
{ symbol: "", exponent: 0 },
|
|
130021
|
+
{ symbol: "d", exponent: -1 },
|
|
130022
|
+
{ symbol: "c", exponent: -2 },
|
|
130023
|
+
{ symbol: "m", exponent: -3 },
|
|
130024
|
+
{ symbol: "µ", exponent: -6 },
|
|
130025
|
+
{ symbol: "n", exponent: -9 },
|
|
130026
|
+
{ symbol: "p", exponent: -12 },
|
|
130027
|
+
{ symbol: "f", exponent: -15 },
|
|
130028
|
+
{ symbol: "a", exponent: -18 },
|
|
130029
|
+
{ symbol: "z", exponent: -21 },
|
|
130030
|
+
{ symbol: "y", exponent: -24 }
|
|
130031
|
+
];
|
|
130032
|
+
function sizeToMeters(size, unit) {
|
|
130033
|
+
if (!unit || unit === "m") {
|
|
130034
|
+
return size;
|
|
130035
|
+
}
|
|
130036
|
+
if (unit.length > 1) {
|
|
130037
|
+
let unitPrefix = unit.substring(0, unit.length - 1);
|
|
130038
|
+
if (unitPrefix === "u") {
|
|
130039
|
+
unitPrefix = "µ";
|
|
130040
|
+
}
|
|
130041
|
+
const unitObj = SI_PREFIXES.find((p) => p.symbol === unitPrefix);
|
|
130042
|
+
if (unitObj) {
|
|
130043
|
+
return size * 10 ** unitObj.exponent;
|
|
130044
|
+
}
|
|
130045
|
+
}
|
|
130046
|
+
throw new Error("Received unknown unit");
|
|
130047
|
+
}
|
|
130048
|
+
function snapValue(value) {
|
|
130049
|
+
let magnitude = 0;
|
|
130050
|
+
if (value < MIN_TARGET || value > MAX_TARGET) {
|
|
130051
|
+
magnitude = Math.floor(Math.log10(value));
|
|
130052
|
+
}
|
|
130053
|
+
let snappedUnit = SI_PREFIXES.find(
|
|
130054
|
+
(p) => p.exponent % 3 === 0 && p.exponent <= magnitude
|
|
130055
|
+
);
|
|
130056
|
+
let adjustedValue = value / 10 ** snappedUnit.exponent;
|
|
130057
|
+
if (adjustedValue > 500 && adjustedValue <= 1e3) {
|
|
130058
|
+
snappedUnit = SI_PREFIXES.find(
|
|
130059
|
+
(p) => p.exponent % 3 === 0 && p.exponent <= magnitude + 3
|
|
130060
|
+
);
|
|
130061
|
+
adjustedValue = value / 10 ** snappedUnit.exponent;
|
|
130062
|
+
}
|
|
130063
|
+
const targetNewUnits = TARGETS.find((t2) => t2 > adjustedValue);
|
|
130064
|
+
const targetOrigUnits = targetNewUnits * 10 ** snappedUnit.exponent;
|
|
130065
|
+
return [targetOrigUnits, targetNewUnits, snappedUnit.symbol];
|
|
130066
|
+
}
|
|
130006
130067
|
const fs$1$1 = `#define SHADER_NAME xr-layer-fragment-shader
|
|
130007
130068
|
|
|
130008
130069
|
precision highp float;
|
|
@@ -130770,26 +130831,27 @@ const OverviewLayer = class extends CompositeLayer {
|
|
|
130770
130831
|
OverviewLayer.layerName = "OverviewLayer";
|
|
130771
130832
|
OverviewLayer.defaultProps = defaultProps$3;
|
|
130772
130833
|
function getPosition$1(boundingBox, position, length2) {
|
|
130773
|
-
const
|
|
130834
|
+
const viewWidth = boundingBox[2][0] - boundingBox[0][0];
|
|
130835
|
+
const viewHeight = boundingBox[2][1] - boundingBox[0][1];
|
|
130774
130836
|
switch (position) {
|
|
130775
130837
|
case "bottom-right": {
|
|
130776
|
-
const yCoord = boundingBox[2][1] -
|
|
130777
|
-
const xLeftCoord = boundingBox[2][0] -
|
|
130838
|
+
const yCoord = boundingBox[2][1] - viewHeight * length2;
|
|
130839
|
+
const xLeftCoord = boundingBox[2][0] - viewWidth * length2;
|
|
130778
130840
|
return [yCoord, xLeftCoord];
|
|
130779
130841
|
}
|
|
130780
130842
|
case "top-right": {
|
|
130781
|
-
const yCoord =
|
|
130782
|
-
const xLeftCoord = boundingBox[2][0] -
|
|
130843
|
+
const yCoord = boundingBox[0][1] + viewHeight * length2;
|
|
130844
|
+
const xLeftCoord = boundingBox[2][0] - viewWidth * length2;
|
|
130783
130845
|
return [yCoord, xLeftCoord];
|
|
130784
130846
|
}
|
|
130785
130847
|
case "top-left": {
|
|
130786
|
-
const yCoord =
|
|
130787
|
-
const xLeftCoord =
|
|
130848
|
+
const yCoord = boundingBox[0][1] + viewHeight * length2;
|
|
130849
|
+
const xLeftCoord = boundingBox[0][0] + viewWidth * length2;
|
|
130788
130850
|
return [yCoord, xLeftCoord];
|
|
130789
130851
|
}
|
|
130790
130852
|
case "bottom-left": {
|
|
130791
|
-
const yCoord = boundingBox[2][1] -
|
|
130792
|
-
const xLeftCoord =
|
|
130853
|
+
const yCoord = boundingBox[2][1] - viewHeight * length2;
|
|
130854
|
+
const xLeftCoord = boundingBox[0][0] + viewWidth * length2;
|
|
130793
130855
|
return [yCoord, xLeftCoord];
|
|
130794
130856
|
}
|
|
130795
130857
|
default: {
|
|
@@ -130807,11 +130869,12 @@ const defaultProps$2$1 = {
|
|
|
130807
130869
|
unit: { type: "string", value: "", compare: true },
|
|
130808
130870
|
size: { type: "number", value: 1, compare: true },
|
|
130809
130871
|
position: { type: "string", value: "bottom-right", compare: true },
|
|
130810
|
-
length: { type: "number", value: 0.085, compare: true }
|
|
130872
|
+
length: { type: "number", value: 0.085, compare: true },
|
|
130873
|
+
snap: { type: "boolean", value: false, compare: true }
|
|
130811
130874
|
};
|
|
130812
130875
|
const ScaleBarLayer = class extends CompositeLayer {
|
|
130813
130876
|
renderLayers() {
|
|
130814
|
-
const { id, unit, size, position, viewState, length: length2 } = this.props;
|
|
130877
|
+
const { id, unit, size, position, viewState, length: length2, snap } = this.props;
|
|
130815
130878
|
const boundingBox = makeBoundingBox(viewState);
|
|
130816
130879
|
const { zoom } = viewState;
|
|
130817
130880
|
const viewLength = boundingBox[2][0] - boundingBox[0][0];
|
|
@@ -130820,15 +130883,27 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
130820
130883
|
2 ** (-zoom + 1.5),
|
|
130821
130884
|
(boundingBox[2][1] - boundingBox[0][1]) * 7e-3
|
|
130822
130885
|
);
|
|
130823
|
-
|
|
130886
|
+
let adjustedBarLength = barLength;
|
|
130887
|
+
let displayNumber = (barLength * size).toPrecision(5);
|
|
130888
|
+
let displayUnit = unit;
|
|
130889
|
+
if (snap) {
|
|
130890
|
+
const meterSize = sizeToMeters(size, unit);
|
|
130891
|
+
const numUnits = barLength * meterSize;
|
|
130892
|
+
const [snappedOrigUnits, snappedNewUnits, snappedUnitPrefix] = snapValue(numUnits);
|
|
130893
|
+
adjustedBarLength = snappedOrigUnits / meterSize;
|
|
130894
|
+
displayNumber = snappedNewUnits;
|
|
130895
|
+
displayUnit = `${snappedUnitPrefix}m`;
|
|
130896
|
+
}
|
|
130824
130897
|
const [yCoord, xLeftCoord] = getPosition$1(boundingBox, position, length2);
|
|
130898
|
+
const xRightCoord = xLeftCoord + barLength;
|
|
130899
|
+
const isLeft = position.endsWith("-left");
|
|
130825
130900
|
const lengthBar = new LineLayer({
|
|
130826
130901
|
id: `scale-bar-length-${id}`,
|
|
130827
130902
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
130828
130903
|
data: [
|
|
130829
130904
|
[
|
|
130830
|
-
[xLeftCoord, yCoord],
|
|
130831
|
-
[xLeftCoord +
|
|
130905
|
+
[isLeft ? xLeftCoord : xRightCoord - adjustedBarLength, yCoord],
|
|
130906
|
+
[isLeft ? xLeftCoord + adjustedBarLength : xRightCoord, yCoord]
|
|
130832
130907
|
]
|
|
130833
130908
|
],
|
|
130834
130909
|
getSourcePosition: (d) => d[0],
|
|
@@ -130841,8 +130916,14 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
130841
130916
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
130842
130917
|
data: [
|
|
130843
130918
|
[
|
|
130844
|
-
[
|
|
130845
|
-
|
|
130919
|
+
[
|
|
130920
|
+
isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
|
|
130921
|
+
yCoord - barHeight
|
|
130922
|
+
],
|
|
130923
|
+
[
|
|
130924
|
+
isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
|
|
130925
|
+
yCoord + barHeight
|
|
130926
|
+
]
|
|
130846
130927
|
]
|
|
130847
130928
|
],
|
|
130848
130929
|
getSourcePosition: (d) => d[0],
|
|
@@ -130855,8 +130936,14 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
130855
130936
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
130856
130937
|
data: [
|
|
130857
130938
|
[
|
|
130858
|
-
[
|
|
130859
|
-
|
|
130939
|
+
[
|
|
130940
|
+
isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
|
|
130941
|
+
yCoord - barHeight
|
|
130942
|
+
],
|
|
130943
|
+
[
|
|
130944
|
+
isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
|
|
130945
|
+
yCoord + barHeight
|
|
130946
|
+
]
|
|
130860
130947
|
]
|
|
130861
130948
|
],
|
|
130862
130949
|
getSourcePosition: (d) => d[0],
|
|
@@ -130869,8 +130956,11 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
130869
130956
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
130870
130957
|
data: [
|
|
130871
130958
|
{
|
|
130872
|
-
text:
|
|
130873
|
-
position: [
|
|
130959
|
+
text: `${displayNumber}${displayUnit}`,
|
|
130960
|
+
position: [
|
|
130961
|
+
isLeft ? xLeftCoord + barLength * 0.5 : xRightCoord - barLength * 0.5,
|
|
130962
|
+
yCoord + barHeight * 4
|
|
130963
|
+
]
|
|
130874
130964
|
}
|
|
130875
130965
|
],
|
|
130876
130966
|
getColor: [220, 220, 220, 255],
|
|
@@ -130879,7 +130969,7 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
130879
130969
|
sizeUnits: "meters",
|
|
130880
130970
|
sizeScale: 2 ** -zoom,
|
|
130881
130971
|
characterSet: [
|
|
130882
|
-
...
|
|
130972
|
+
...displayUnit.split(""),
|
|
130883
130973
|
...range(10).map((i2) => String(i2)),
|
|
130884
130974
|
".",
|
|
130885
130975
|
"e",
|
|
@@ -148661,9 +148751,135 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
|
|
|
148661
148751
|
}
|
|
148662
148752
|
const ScatterplotWrapper = forwardRef((props2, deckRef) => jsxRuntimeExports.jsx(Scatterplot, { ...props2, deckRef }));
|
|
148663
148753
|
ScatterplotWrapper.displayName = "ScatterplotWrapper";
|
|
148754
|
+
const $b5e257d569688ac6$var$defaultContext = {
|
|
148755
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
148756
|
+
current: 0
|
|
148757
|
+
};
|
|
148758
|
+
const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
|
|
148759
|
+
const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
|
|
148760
|
+
let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
148761
|
+
let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
|
|
148762
|
+
function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
|
|
148763
|
+
let ctx = useContext($b5e257d569688ac6$var$SSRContext);
|
|
148764
|
+
let ref = useRef(null);
|
|
148765
|
+
if (ref.current === null && !isDisabled) {
|
|
148766
|
+
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
|
|
148767
|
+
let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React__default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
|
|
148768
|
+
if (currentOwner) {
|
|
148769
|
+
let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
|
|
148770
|
+
if (prevComponentValue == null)
|
|
148771
|
+
$b5e257d569688ac6$var$componentIds.set(currentOwner, {
|
|
148772
|
+
id: ctx.current,
|
|
148773
|
+
state: currentOwner.memoizedState
|
|
148774
|
+
});
|
|
148775
|
+
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
148776
|
+
ctx.current = prevComponentValue.id;
|
|
148777
|
+
$b5e257d569688ac6$var$componentIds.delete(currentOwner);
|
|
148778
|
+
}
|
|
148779
|
+
}
|
|
148780
|
+
ref.current = ++ctx.current;
|
|
148781
|
+
}
|
|
148782
|
+
return ref.current;
|
|
148783
|
+
}
|
|
148784
|
+
function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
148785
|
+
let ctx = useContext($b5e257d569688ac6$var$SSRContext);
|
|
148786
|
+
if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
|
|
148787
|
+
console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
148788
|
+
let counter2 = $b5e257d569688ac6$var$useCounter(!!defaultId);
|
|
148789
|
+
let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
148790
|
+
return defaultId || `${prefix2}-${counter2}`;
|
|
148791
|
+
}
|
|
148792
|
+
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
|
|
148793
|
+
let id = React__default.useId();
|
|
148794
|
+
let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
|
|
148795
|
+
let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
|
|
148796
|
+
return defaultId || `${prefix2}-${id}`;
|
|
148797
|
+
}
|
|
148798
|
+
const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
|
|
148799
|
+
function $b5e257d569688ac6$var$getSnapshot() {
|
|
148800
|
+
return false;
|
|
148801
|
+
}
|
|
148802
|
+
function $b5e257d569688ac6$var$getServerSnapshot() {
|
|
148803
|
+
return true;
|
|
148804
|
+
}
|
|
148805
|
+
function $b5e257d569688ac6$var$subscribe(onStoreChange) {
|
|
148806
|
+
return () => {
|
|
148807
|
+
};
|
|
148808
|
+
}
|
|
148809
|
+
function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
148810
|
+
if (typeof React__default["useSyncExternalStore"] === "function")
|
|
148811
|
+
return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
148812
|
+
return useContext($b5e257d569688ac6$var$IsSSRContext);
|
|
148813
|
+
}
|
|
148814
|
+
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
|
|
148815
|
+
};
|
|
148816
|
+
let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
|
|
148817
|
+
function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
148818
|
+
let [value, setValue] = useState(defaultId);
|
|
148819
|
+
let nextId = useRef(null);
|
|
148820
|
+
let res = $b5e257d569688ac6$export$619500959fc48b26(value);
|
|
148821
|
+
let updateValue = useCallback((val) => {
|
|
148822
|
+
nextId.current = val;
|
|
148823
|
+
}, []);
|
|
148824
|
+
$bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
|
|
148825
|
+
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
148826
|
+
let r2 = res;
|
|
148827
|
+
return () => {
|
|
148828
|
+
$bdb11010cef70236$var$idsUpdaterMap.delete(r2);
|
|
148829
|
+
};
|
|
148830
|
+
}, [
|
|
148831
|
+
res
|
|
148832
|
+
]);
|
|
148833
|
+
useEffect(() => {
|
|
148834
|
+
let newId = nextId.current;
|
|
148835
|
+
if (newId) {
|
|
148836
|
+
nextId.current = null;
|
|
148837
|
+
setValue(newId);
|
|
148838
|
+
}
|
|
148839
|
+
});
|
|
148840
|
+
return res;
|
|
148841
|
+
}
|
|
148842
|
+
let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
|
|
148843
|
+
let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
|
|
148844
|
+
function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
148845
|
+
if (typeof window === "undefined")
|
|
148846
|
+
return;
|
|
148847
|
+
let onTransitionStart = (e2) => {
|
|
148848
|
+
let transitions2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e2.target);
|
|
148849
|
+
if (!transitions2) {
|
|
148850
|
+
transitions2 = /* @__PURE__ */ new Set();
|
|
148851
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(e2.target, transitions2);
|
|
148852
|
+
e2.target.addEventListener("transitioncancel", onTransitionEnd);
|
|
148853
|
+
}
|
|
148854
|
+
transitions2.add(e2.propertyName);
|
|
148855
|
+
};
|
|
148856
|
+
let onTransitionEnd = (e2) => {
|
|
148857
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e2.target);
|
|
148858
|
+
if (!properties)
|
|
148859
|
+
return;
|
|
148860
|
+
properties.delete(e2.propertyName);
|
|
148861
|
+
if (properties.size === 0) {
|
|
148862
|
+
e2.target.removeEventListener("transitioncancel", onTransitionEnd);
|
|
148863
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(e2.target);
|
|
148864
|
+
}
|
|
148865
|
+
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
148866
|
+
for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)
|
|
148867
|
+
cb();
|
|
148868
|
+
$bbed8b41f857bcc0$var$transitionCallbacks.clear();
|
|
148869
|
+
}
|
|
148870
|
+
};
|
|
148871
|
+
document.body.addEventListener("transitionrun", onTransitionStart);
|
|
148872
|
+
document.body.addEventListener("transitionend", onTransitionEnd);
|
|
148873
|
+
}
|
|
148874
|
+
if (typeof document !== "undefined") {
|
|
148875
|
+
if (document.readyState !== "loading")
|
|
148876
|
+
$bbed8b41f857bcc0$var$setupGlobalEvents();
|
|
148877
|
+
else
|
|
148878
|
+
document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
|
|
148879
|
+
}
|
|
148664
148880
|
function ScatterplotOptions(props2) {
|
|
148665
148881
|
const { children, observationsLabel, cellRadius, setCellRadius, cellRadiusMode, setCellRadiusMode, cellOpacity, setCellOpacity, cellOpacityMode, setCellOpacityMode, cellSetLabelsVisible, setCellSetLabelsVisible, tooltipsVisible, setTooltipsVisible, cellSetLabelSize, setCellSetLabelSize, cellSetPolygonsVisible, setCellSetPolygonsVisible, cellColorEncoding, setCellColorEncoding, geneExpressionColormap, setGeneExpressionColormap, geneExpressionColormapRange, setGeneExpressionColormapRange } = props2;
|
|
148666
|
-
const scatterplotOptionsId =
|
|
148882
|
+
const scatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
|
|
148667
148883
|
const observationsLabelNice = capitalize$1(observationsLabel);
|
|
148668
148884
|
const classes = usePlotOptionsStyles();
|
|
148669
148885
|
function handleCellRadiusModeChange(event) {
|
|
@@ -148842,7 +149058,7 @@ function GatingScatterplotOptions(props2) {
|
|
|
148842
149058
|
geneSelectOptions,
|
|
148843
149059
|
transformOptions
|
|
148844
149060
|
} = props2;
|
|
148845
|
-
const gatingScatterplotOptionsId =
|
|
149061
|
+
const gatingScatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
|
|
148846
149062
|
const classes = usePlotOptionsStyles();
|
|
148847
149063
|
const handleGeneSelectChange = (event) => {
|
|
148848
149064
|
const { options } = event.target;
|
package/dist/index.js
CHANGED
|
@@ -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-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-73600fb1.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatingScatterplotOptions.d.ts","sourceRoot":"","sources":["../src/GatingScatterplotOptions.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GatingScatterplotOptions.d.ts","sourceRoot":"","sources":["../src/GatingScatterplotOptions.js"],"names":[],"mappings":"AAMA,0EAsIC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useId } from 'react-aria';
|
|
3
4
|
import { TableCell, TableRow, TextField } from '@material-ui/core';
|
|
4
5
|
import { usePlotOptionsStyles, OptionSelect } from '@vitessce/vit-s';
|
|
5
6
|
import { capitalize, pluralize as plur } from '@vitessce/utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-gating",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
"@material-ui/core": "~4.12.3",
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
|
-
"
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/utils": "3.2.
|
|
26
|
-
"@vitessce/
|
|
22
|
+
"react-aria": "^3.28.0",
|
|
23
|
+
"@vitessce/constants-internal": "3.2.2",
|
|
24
|
+
"@vitessce/scatterplot": "3.2.2",
|
|
25
|
+
"@vitessce/sets-utils": "3.2.2",
|
|
26
|
+
"@vitessce/utils": "3.2.2",
|
|
27
|
+
"@vitessce/vit-s": "3.2.2"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"react": "^18.0.0",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useId } from 'react-aria';
|
|
2
3
|
import { TableCell, TableRow, TextField } from '@material-ui/core';
|
|
3
4
|
import { usePlotOptionsStyles, OptionSelect } from '@vitessce/vit-s';
|
|
4
5
|
import { capitalize, pluralize as plur } from '@vitessce/utils';
|