@vitessce/scatterplot-gating 3.2.0 → 3.2.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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-8e87ac41.js";
2
+ import { B as BaseDecoder } from "./index-743f7ba3.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -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, useId, useCallback } from "react";
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-602cd908.js").then((m2) => m2.default));
121098
- addDecoder(5, () => import("./lzw-969b495e.js").then((m2) => m2.default));
121097
+ addDecoder([void 0, 1], () => import("./raw-4828923d.js").then((m2) => m2.default));
121098
+ addDecoder(5, () => import("./lzw-8a95c676.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-a3397dc3.js").then((m2) => m2.default));
121103
- addDecoder([8, 32946], () => import("./deflate-ee41da61.js").then((m2) => m2.default));
121104
- addDecoder(32773, () => import("./packbits-e04429a8.js").then((m2) => m2.default));
121105
- addDecoder(34887, () => import("./lerc-8b857b48.js").then((m2) => m2.default));
121106
- addDecoder(50001, () => import("./webimage-9e7f3198.js").then((m2) => m2.default));
121102
+ addDecoder(7, () => import("./jpeg-da2166c3.js").then((m2) => m2.default));
121103
+ addDecoder([8, 32946], () => import("./deflate-10f9d67d.js").then((m2) => m2.default));
121104
+ addDecoder(32773, () => import("./packbits-3b55e8df.js").then((m2) => m2.default));
121105
+ addDecoder(34887, () => import("./lerc-ea6f16cd.js").then((m2) => m2.default));
121106
+ addDecoder(50001, () => import("./webimage-f3457c94.js").then((m2) => m2.default));
121107
121107
  function decodeRowAcc(row, stride) {
121108
121108
  let length2 = row.length - stride;
121109
121109
  let offset5 = 0;
@@ -148661,9 +148661,135 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
148661
148661
  }
148662
148662
  const ScatterplotWrapper = forwardRef((props2, deckRef) => jsxRuntimeExports.jsx(Scatterplot, { ...props2, deckRef }));
148663
148663
  ScatterplotWrapper.displayName = "ScatterplotWrapper";
148664
+ const $b5e257d569688ac6$var$defaultContext = {
148665
+ prefix: String(Math.round(Math.random() * 1e10)),
148666
+ current: 0
148667
+ };
148668
+ const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
148669
+ const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
148670
+ let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
148671
+ let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
148672
+ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
148673
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
148674
+ let ref = useRef(null);
148675
+ if (ref.current === null && !isDisabled) {
148676
+ var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
148677
+ 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;
148678
+ if (currentOwner) {
148679
+ let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
148680
+ if (prevComponentValue == null)
148681
+ $b5e257d569688ac6$var$componentIds.set(currentOwner, {
148682
+ id: ctx.current,
148683
+ state: currentOwner.memoizedState
148684
+ });
148685
+ else if (currentOwner.memoizedState !== prevComponentValue.state) {
148686
+ ctx.current = prevComponentValue.id;
148687
+ $b5e257d569688ac6$var$componentIds.delete(currentOwner);
148688
+ }
148689
+ }
148690
+ ref.current = ++ctx.current;
148691
+ }
148692
+ return ref.current;
148693
+ }
148694
+ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
148695
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
148696
+ if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
148697
+ console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
148698
+ let counter2 = $b5e257d569688ac6$var$useCounter(!!defaultId);
148699
+ let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
148700
+ return defaultId || `${prefix2}-${counter2}`;
148701
+ }
148702
+ function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
148703
+ let id = React__default.useId();
148704
+ let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
148705
+ let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
148706
+ return defaultId || `${prefix2}-${id}`;
148707
+ }
148708
+ const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
148709
+ function $b5e257d569688ac6$var$getSnapshot() {
148710
+ return false;
148711
+ }
148712
+ function $b5e257d569688ac6$var$getServerSnapshot() {
148713
+ return true;
148714
+ }
148715
+ function $b5e257d569688ac6$var$subscribe(onStoreChange) {
148716
+ return () => {
148717
+ };
148718
+ }
148719
+ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
148720
+ if (typeof React__default["useSyncExternalStore"] === "function")
148721
+ return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
148722
+ return useContext($b5e257d569688ac6$var$IsSSRContext);
148723
+ }
148724
+ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
148725
+ };
148726
+ let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
148727
+ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
148728
+ let [value, setValue] = useState(defaultId);
148729
+ let nextId = useRef(null);
148730
+ let res = $b5e257d569688ac6$export$619500959fc48b26(value);
148731
+ let updateValue = useCallback((val) => {
148732
+ nextId.current = val;
148733
+ }, []);
148734
+ $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
148735
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
148736
+ let r2 = res;
148737
+ return () => {
148738
+ $bdb11010cef70236$var$idsUpdaterMap.delete(r2);
148739
+ };
148740
+ }, [
148741
+ res
148742
+ ]);
148743
+ useEffect(() => {
148744
+ let newId = nextId.current;
148745
+ if (newId) {
148746
+ nextId.current = null;
148747
+ setValue(newId);
148748
+ }
148749
+ });
148750
+ return res;
148751
+ }
148752
+ let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
148753
+ let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
148754
+ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
148755
+ if (typeof window === "undefined")
148756
+ return;
148757
+ let onTransitionStart = (e2) => {
148758
+ let transitions2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e2.target);
148759
+ if (!transitions2) {
148760
+ transitions2 = /* @__PURE__ */ new Set();
148761
+ $bbed8b41f857bcc0$var$transitionsByElement.set(e2.target, transitions2);
148762
+ e2.target.addEventListener("transitioncancel", onTransitionEnd);
148763
+ }
148764
+ transitions2.add(e2.propertyName);
148765
+ };
148766
+ let onTransitionEnd = (e2) => {
148767
+ let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e2.target);
148768
+ if (!properties)
148769
+ return;
148770
+ properties.delete(e2.propertyName);
148771
+ if (properties.size === 0) {
148772
+ e2.target.removeEventListener("transitioncancel", onTransitionEnd);
148773
+ $bbed8b41f857bcc0$var$transitionsByElement.delete(e2.target);
148774
+ }
148775
+ if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
148776
+ for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)
148777
+ cb();
148778
+ $bbed8b41f857bcc0$var$transitionCallbacks.clear();
148779
+ }
148780
+ };
148781
+ document.body.addEventListener("transitionrun", onTransitionStart);
148782
+ document.body.addEventListener("transitionend", onTransitionEnd);
148783
+ }
148784
+ if (typeof document !== "undefined") {
148785
+ if (document.readyState !== "loading")
148786
+ $bbed8b41f857bcc0$var$setupGlobalEvents();
148787
+ else
148788
+ document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
148789
+ }
148664
148790
  function ScatterplotOptions(props2) {
148665
148791
  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 = useId();
148792
+ const scatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
148667
148793
  const observationsLabelNice = capitalize$1(observationsLabel);
148668
148794
  const classes = usePlotOptionsStyles();
148669
148795
  function handleCellRadiusModeChange(event) {
@@ -148842,7 +148968,7 @@ function GatingScatterplotOptions(props2) {
148842
148968
  geneSelectOptions,
148843
148969
  transformOptions
148844
148970
  } = props2;
148845
- const gatingScatterplotOptionsId = useId();
148971
+ const gatingScatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
148846
148972
  const classes = usePlotOptionsStyles();
148847
148973
  const handleGeneSelectChange = (event) => {
148848
148974
  const { options } = event.target;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G } from "./index-8e87ac41.js";
1
+ import { G } from "./index-743f7ba3.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-8e87ac41.js";
1
+ import { B as BaseDecoder } from "./index-743f7ba3.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-8e87ac41.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-743f7ba3.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-8e87ac41.js";
1
+ import { B as BaseDecoder } from "./index-743f7ba3.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-8e87ac41.js";
1
+ import { B as BaseDecoder } from "./index-743f7ba3.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-8e87ac41.js";
1
+ import { B as BaseDecoder } from "./index-743f7ba3.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-8e87ac41.js";
1
+ import { B as BaseDecoder } from "./index-743f7ba3.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1 +1 @@
1
- {"version":3,"file":"GatingScatterplotOptions.d.ts","sourceRoot":"","sources":["../src/GatingScatterplotOptions.js"],"names":[],"mappings":"AAKA,0EAsIC"}
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, { useId } from '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.0",
3
+ "version": "3.2.1",
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
- "@vitessce/constants-internal": "3.2.0",
23
- "@vitessce/scatterplot": "3.2.0",
24
- "@vitessce/sets-utils": "3.2.0",
25
- "@vitessce/utils": "3.2.0",
26
- "@vitessce/vit-s": "3.2.0"
22
+ "react-aria": "^3.28.0",
23
+ "@vitessce/constants-internal": "3.2.1",
24
+ "@vitessce/scatterplot": "3.2.1",
25
+ "@vitessce/sets-utils": "3.2.1",
26
+ "@vitessce/utils": "3.2.1",
27
+ "@vitessce/vit-s": "3.2.1"
27
28
  },
28
29
  "devDependencies": {
29
30
  "react": "^18.0.0",
@@ -1,4 +1,5 @@
1
- import React, { useId } from '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';