@vitessce/scatterplot-embedding 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.
- package/dist/{deflate-c642ec70.js → deflate-2d5bfeab.js} +1 -1
- package/dist/{index-b19aa9df.js → index-64ed3bae.js} +135 -9
- package/dist/index.js +1 -1
- package/dist/{jpeg-a05285b9.js → jpeg-26d14b38.js} +1 -1
- package/dist/{lerc-59152b4a.js → lerc-925e402e.js} +1 -1
- package/dist/{lzw-1258bf90.js → lzw-194af29e.js} +1 -1
- package/dist/{packbits-b526be77.js → packbits-40fe7e7e.js} +1 -1
- package/dist/{raw-42eaa5bd.js → raw-4ea71ae5.js} +1 -1
- package/dist/{webimage-49ce920f.js → webimage-cd737900.js} +1 -1
- package/dist-tsc/EmbeddingScatterplotOptions.d.ts.map +1 -1
- package/dist-tsc/EmbeddingScatterplotOptions.js +2 -1
- package/package.json +8 -7
- package/src/EmbeddingScatterplotOptions.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, useInitialCoordination, useDeckCanvasSize, useMultiObsLabels, useObsEmbeddingData, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useReady, useUrls, useGetObsInfo, useUint8FeatureSelection, useExpressionValueGetter, TitleInfo } from "@vitessce/vit-s";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
function _mergeNamespaces(n2, m2) {
|
|
@@ -121180,16 +121180,16 @@ function addDecoder(cases, importFn) {
|
|
|
121180
121180
|
}
|
|
121181
121181
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121182
121182
|
}
|
|
121183
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121184
|
-
addDecoder(5, () => import("./lzw-
|
|
121183
|
+
addDecoder([void 0, 1], () => import("./raw-4ea71ae5.js").then((m2) => m2.default));
|
|
121184
|
+
addDecoder(5, () => import("./lzw-194af29e.js").then((m2) => m2.default));
|
|
121185
121185
|
addDecoder(6, () => {
|
|
121186
121186
|
throw new Error("old style JPEG compression is not supported.");
|
|
121187
121187
|
});
|
|
121188
|
-
addDecoder(7, () => import("./jpeg-
|
|
121189
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121190
|
-
addDecoder(32773, () => import("./packbits-
|
|
121191
|
-
addDecoder(34887, () => import("./lerc-
|
|
121192
|
-
addDecoder(50001, () => import("./webimage-
|
|
121188
|
+
addDecoder(7, () => import("./jpeg-26d14b38.js").then((m2) => m2.default));
|
|
121189
|
+
addDecoder([8, 32946], () => import("./deflate-2d5bfeab.js").then((m2) => m2.default));
|
|
121190
|
+
addDecoder(32773, () => import("./packbits-40fe7e7e.js").then((m2) => m2.default));
|
|
121191
|
+
addDecoder(34887, () => import("./lerc-925e402e.js").then((m2) => m2.default));
|
|
121192
|
+
addDecoder(50001, () => import("./webimage-cd737900.js").then((m2) => m2.default));
|
|
121193
121193
|
function decodeRowAcc(row, stride) {
|
|
121194
121194
|
let length2 = row.length - stride;
|
|
121195
121195
|
let offset5 = 0;
|
|
@@ -143154,9 +143154,135 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
|
|
|
143154
143154
|
}
|
|
143155
143155
|
const ScatterplotWrapper = forwardRef((props2, deckRef) => jsxRuntimeExports.jsx(Scatterplot, { ...props2, deckRef }));
|
|
143156
143156
|
ScatterplotWrapper.displayName = "ScatterplotWrapper";
|
|
143157
|
+
const $b5e257d569688ac6$var$defaultContext = {
|
|
143158
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
143159
|
+
current: 0
|
|
143160
|
+
};
|
|
143161
|
+
const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
|
|
143162
|
+
const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
|
|
143163
|
+
let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
143164
|
+
let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
|
|
143165
|
+
function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
|
|
143166
|
+
let ctx = useContext($b5e257d569688ac6$var$SSRContext);
|
|
143167
|
+
let ref = useRef(null);
|
|
143168
|
+
if (ref.current === null && !isDisabled) {
|
|
143169
|
+
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
|
|
143170
|
+
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;
|
|
143171
|
+
if (currentOwner) {
|
|
143172
|
+
let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
|
|
143173
|
+
if (prevComponentValue == null)
|
|
143174
|
+
$b5e257d569688ac6$var$componentIds.set(currentOwner, {
|
|
143175
|
+
id: ctx.current,
|
|
143176
|
+
state: currentOwner.memoizedState
|
|
143177
|
+
});
|
|
143178
|
+
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
143179
|
+
ctx.current = prevComponentValue.id;
|
|
143180
|
+
$b5e257d569688ac6$var$componentIds.delete(currentOwner);
|
|
143181
|
+
}
|
|
143182
|
+
}
|
|
143183
|
+
ref.current = ++ctx.current;
|
|
143184
|
+
}
|
|
143185
|
+
return ref.current;
|
|
143186
|
+
}
|
|
143187
|
+
function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
143188
|
+
let ctx = useContext($b5e257d569688ac6$var$SSRContext);
|
|
143189
|
+
if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
|
|
143190
|
+
console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
143191
|
+
let counter2 = $b5e257d569688ac6$var$useCounter(!!defaultId);
|
|
143192
|
+
let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
143193
|
+
return defaultId || `${prefix2}-${counter2}`;
|
|
143194
|
+
}
|
|
143195
|
+
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
|
|
143196
|
+
let id = React__default.useId();
|
|
143197
|
+
let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
|
|
143198
|
+
let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
|
|
143199
|
+
return defaultId || `${prefix2}-${id}`;
|
|
143200
|
+
}
|
|
143201
|
+
const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
|
|
143202
|
+
function $b5e257d569688ac6$var$getSnapshot() {
|
|
143203
|
+
return false;
|
|
143204
|
+
}
|
|
143205
|
+
function $b5e257d569688ac6$var$getServerSnapshot() {
|
|
143206
|
+
return true;
|
|
143207
|
+
}
|
|
143208
|
+
function $b5e257d569688ac6$var$subscribe(onStoreChange) {
|
|
143209
|
+
return () => {
|
|
143210
|
+
};
|
|
143211
|
+
}
|
|
143212
|
+
function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
143213
|
+
if (typeof React__default["useSyncExternalStore"] === "function")
|
|
143214
|
+
return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
143215
|
+
return useContext($b5e257d569688ac6$var$IsSSRContext);
|
|
143216
|
+
}
|
|
143217
|
+
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
|
|
143218
|
+
};
|
|
143219
|
+
let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
|
|
143220
|
+
function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
143221
|
+
let [value, setValue] = useState(defaultId);
|
|
143222
|
+
let nextId = useRef(null);
|
|
143223
|
+
let res = $b5e257d569688ac6$export$619500959fc48b26(value);
|
|
143224
|
+
let updateValue = useCallback((val) => {
|
|
143225
|
+
nextId.current = val;
|
|
143226
|
+
}, []);
|
|
143227
|
+
$bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
|
|
143228
|
+
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
143229
|
+
let r2 = res;
|
|
143230
|
+
return () => {
|
|
143231
|
+
$bdb11010cef70236$var$idsUpdaterMap.delete(r2);
|
|
143232
|
+
};
|
|
143233
|
+
}, [
|
|
143234
|
+
res
|
|
143235
|
+
]);
|
|
143236
|
+
useEffect(() => {
|
|
143237
|
+
let newId = nextId.current;
|
|
143238
|
+
if (newId) {
|
|
143239
|
+
nextId.current = null;
|
|
143240
|
+
setValue(newId);
|
|
143241
|
+
}
|
|
143242
|
+
});
|
|
143243
|
+
return res;
|
|
143244
|
+
}
|
|
143245
|
+
let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
|
|
143246
|
+
let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
|
|
143247
|
+
function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
143248
|
+
if (typeof window === "undefined")
|
|
143249
|
+
return;
|
|
143250
|
+
let onTransitionStart = (e3) => {
|
|
143251
|
+
let transitions2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e3.target);
|
|
143252
|
+
if (!transitions2) {
|
|
143253
|
+
transitions2 = /* @__PURE__ */ new Set();
|
|
143254
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(e3.target, transitions2);
|
|
143255
|
+
e3.target.addEventListener("transitioncancel", onTransitionEnd);
|
|
143256
|
+
}
|
|
143257
|
+
transitions2.add(e3.propertyName);
|
|
143258
|
+
};
|
|
143259
|
+
let onTransitionEnd = (e3) => {
|
|
143260
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e3.target);
|
|
143261
|
+
if (!properties)
|
|
143262
|
+
return;
|
|
143263
|
+
properties.delete(e3.propertyName);
|
|
143264
|
+
if (properties.size === 0) {
|
|
143265
|
+
e3.target.removeEventListener("transitioncancel", onTransitionEnd);
|
|
143266
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(e3.target);
|
|
143267
|
+
}
|
|
143268
|
+
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
143269
|
+
for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)
|
|
143270
|
+
cb();
|
|
143271
|
+
$bbed8b41f857bcc0$var$transitionCallbacks.clear();
|
|
143272
|
+
}
|
|
143273
|
+
};
|
|
143274
|
+
document.body.addEventListener("transitionrun", onTransitionStart);
|
|
143275
|
+
document.body.addEventListener("transitionend", onTransitionEnd);
|
|
143276
|
+
}
|
|
143277
|
+
if (typeof document !== "undefined") {
|
|
143278
|
+
if (document.readyState !== "loading")
|
|
143279
|
+
$bbed8b41f857bcc0$var$setupGlobalEvents();
|
|
143280
|
+
else
|
|
143281
|
+
document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
|
|
143282
|
+
}
|
|
143157
143283
|
function ScatterplotOptions(props2) {
|
|
143158
143284
|
const { children: children2, observationsLabel, cellRadius, setCellRadius, cellRadiusMode, setCellRadiusMode, cellOpacity, setCellOpacity, cellOpacityMode, setCellOpacityMode, cellSetLabelsVisible, setCellSetLabelsVisible, tooltipsVisible, setTooltipsVisible, cellSetLabelSize, setCellSetLabelSize, cellSetPolygonsVisible, setCellSetPolygonsVisible, cellColorEncoding, setCellColorEncoding, geneExpressionColormap, setGeneExpressionColormap, geneExpressionColormapRange, setGeneExpressionColormapRange } = props2;
|
|
143159
|
-
const scatterplotOptionsId =
|
|
143285
|
+
const scatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
|
|
143160
143286
|
const observationsLabelNice = capitalize$1(observationsLabel);
|
|
143161
143287
|
const classes = usePlotOptionsStyles();
|
|
143162
143288
|
function handleCellRadiusModeChange(event) {
|
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-64ed3bae.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbeddingScatterplotOptions.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotOptions.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmbeddingScatterplotOptions.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotOptions.js"],"names":[],"mappings":"AAKA,oFA8CC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useId } from 'react-aria';
|
|
3
4
|
import { TableCell, TableRow } from '@material-ui/core';
|
|
4
5
|
import { usePlotOptionsStyles, OptionSelect } from '@vitessce/vit-s';
|
|
5
6
|
export default function EmbeddingScatterplotOptions(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-embedding",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -19,12 +19,13 @@
|
|
|
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/
|
|
26
|
-
"@vitessce/utils": "3.2.
|
|
27
|
-
"@vitessce/
|
|
22
|
+
"react-aria": "^3.28.0",
|
|
23
|
+
"@vitessce/constants-internal": "3.2.1",
|
|
24
|
+
"@vitessce/legend": "3.2.1",
|
|
25
|
+
"@vitessce/scatterplot": "3.2.1",
|
|
26
|
+
"@vitessce/sets-utils": "3.2.1",
|
|
27
|
+
"@vitessce/utils": "3.2.1",
|
|
28
|
+
"@vitessce/vit-s": "3.2.1"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"react": "^18.0.0",
|