@vitessce/scatterplot-embedding 3.7.0 → 3.8.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.
- package/dist/{deflate-D_81Ious.js → deflate-BVs8YiyO.js} +1 -1
- package/dist/{index-C-fHO-yW.js → index-Bq7XVVZk.js} +35 -11
- package/dist/index.js +1 -1
- package/dist/{jpeg-BBthUkDM.js → jpeg-SiblH6Cu.js} +1 -1
- package/dist/{lerc-CFLZifbF.js → lerc-CAFxbgCZ.js} +1 -1
- package/dist/{lzw-DfvLVwpS.js → lzw-UC-SuV7m.js} +1 -1
- package/dist/{packbits-DsAbIEQN.js → packbits-Bpsmxlv2.js} +1 -1
- package/dist/{raw-DPiyC-FS.js → raw-vP3CdH6_.js} +1 -1
- package/dist/{webimage-BvW55TuC.js → webimage-DR1LwE21.js} +1 -1
- package/package.json +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { B as BaseDecoder } from "./index-
|
|
2
|
+
import { B as BaseDecoder } from "./index-Bq7XVVZk.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -9558,6 +9558,7 @@ const ViewType$1 = {
|
|
|
9558
9558
|
SCATTERPLOT: "scatterplot",
|
|
9559
9559
|
SPATIAL: "spatial",
|
|
9560
9560
|
SPATIAL_BETA: "spatialBeta",
|
|
9561
|
+
SPATIAL_ACCELERATED: "spatialAccelerated",
|
|
9561
9562
|
HEATMAP: "heatmap",
|
|
9562
9563
|
LAYER_CONTROLLER: "layerController",
|
|
9563
9564
|
LAYER_CONTROLLER_BETA: "layerControllerBeta",
|
|
@@ -9851,6 +9852,8 @@ const CoordinationType$1 = {
|
|
|
9851
9852
|
// Could be per-image-layer
|
|
9852
9853
|
SPATIAL_TARGET_RESOLUTION: "spatialTargetResolution",
|
|
9853
9854
|
// Per-spatial-layer
|
|
9855
|
+
SPATIAL_MAX_RESOLUTION: "spatialMaxResolution",
|
|
9856
|
+
// Per-image-channel (for spatial-accelerated)
|
|
9854
9857
|
// For clipping plane sliders
|
|
9855
9858
|
SPATIAL_SLICE_X: "spatialSliceX",
|
|
9856
9859
|
SPATIAL_SLICE_Y: "spatialSliceY",
|
|
@@ -10167,6 +10170,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
10167
10170
|
CoordinationType$1.SPATIAL_ROTATION_Y,
|
|
10168
10171
|
CoordinationType$1.SPATIAL_ROTATION_Z,
|
|
10169
10172
|
CoordinationType$1.SPATIAL_AXIS_FIXED,
|
|
10173
|
+
CoordinationType$1.SPATIAL_ROTATION_ORBIT,
|
|
10170
10174
|
CoordinationType$1.SPATIAL_ORBIT_AXIS,
|
|
10171
10175
|
CoordinationType$1.SPATIAL_ZOOM,
|
|
10172
10176
|
CoordinationType$1.OBS_FILTER,
|
|
@@ -10174,14 +10178,11 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
10174
10178
|
CoordinationType$1.OBS_SET_SELECTION,
|
|
10175
10179
|
CoordinationType$1.OBS_SET_FILTER,
|
|
10176
10180
|
CoordinationType$1.OBS_SET_HIGHLIGHT,
|
|
10177
|
-
CoordinationType$1.OBS_SET_COLOR,
|
|
10178
10181
|
CoordinationType$1.OBS_TYPE,
|
|
10179
|
-
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
10180
10182
|
CoordinationType$1.OBS_SET_COLOR,
|
|
10181
10183
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
10182
|
-
CoordinationType$1.OBS_SET_SELECTION,
|
|
10183
10184
|
CoordinationType$1.EMBEDDING_TYPE,
|
|
10184
|
-
CoordinationType$1.
|
|
10185
|
+
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
10185
10186
|
CoordinationType$1.TOOLTIPS_VISIBLE
|
|
10186
10187
|
],
|
|
10187
10188
|
[ViewType$1.SCATTERPLOT]: [
|
|
@@ -10401,6 +10402,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
10401
10402
|
CoordinationType$1.SPATIAL_RENDERING_MODE,
|
|
10402
10403
|
CoordinationType$1.VOLUMETRIC_RENDERING_ALGORITHM,
|
|
10403
10404
|
CoordinationType$1.SPATIAL_TARGET_RESOLUTION,
|
|
10405
|
+
CoordinationType$1.SPATIAL_MAX_RESOLUTION,
|
|
10404
10406
|
CoordinationType$1.SPATIAL_SLICE_X,
|
|
10405
10407
|
CoordinationType$1.SPATIAL_SLICE_Y,
|
|
10406
10408
|
CoordinationType$1.SPATIAL_SLICE_Z,
|
|
@@ -10574,6 +10576,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
10574
10576
|
CoordinationType$1.SPATIAL_RENDERING_MODE,
|
|
10575
10577
|
CoordinationType$1.VOLUMETRIC_RENDERING_ALGORITHM,
|
|
10576
10578
|
CoordinationType$1.SPATIAL_TARGET_RESOLUTION,
|
|
10579
|
+
CoordinationType$1.SPATIAL_MAX_RESOLUTION,
|
|
10577
10580
|
CoordinationType$1.SPATIAL_SLICE_X,
|
|
10578
10581
|
CoordinationType$1.SPATIAL_SLICE_Y,
|
|
10579
10582
|
CoordinationType$1.SPATIAL_SLICE_Z,
|
|
@@ -123325,22 +123328,22 @@ function addDecoder(cases, importFn) {
|
|
|
123325
123328
|
}
|
|
123326
123329
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
123327
123330
|
}
|
|
123328
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
123329
|
-
addDecoder(5, () => import("./lzw-
|
|
123331
|
+
addDecoder([void 0, 1], () => import("./raw-vP3CdH6_.js").then((m2) => m2.default));
|
|
123332
|
+
addDecoder(5, () => import("./lzw-UC-SuV7m.js").then((m2) => m2.default));
|
|
123330
123333
|
addDecoder(6, () => {
|
|
123331
123334
|
throw new Error("old style JPEG compression is not supported.");
|
|
123332
123335
|
});
|
|
123333
|
-
addDecoder(7, () => import("./jpeg-
|
|
123334
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
123335
|
-
addDecoder(32773, () => import("./packbits-
|
|
123336
|
+
addDecoder(7, () => import("./jpeg-SiblH6Cu.js").then((m2) => m2.default));
|
|
123337
|
+
addDecoder([8, 32946], () => import("./deflate-BVs8YiyO.js").then((m2) => m2.default));
|
|
123338
|
+
addDecoder(32773, () => import("./packbits-Bpsmxlv2.js").then((m2) => m2.default));
|
|
123336
123339
|
addDecoder(
|
|
123337
123340
|
34887,
|
|
123338
|
-
() => import("./lerc-
|
|
123341
|
+
() => import("./lerc-CAFxbgCZ.js").then(async (m2) => {
|
|
123339
123342
|
await m2.zstd.init();
|
|
123340
123343
|
return m2;
|
|
123341
123344
|
}).then((m2) => m2.default)
|
|
123342
123345
|
);
|
|
123343
|
-
addDecoder(50001, () => import("./webimage-
|
|
123346
|
+
addDecoder(50001, () => import("./webimage-DR1LwE21.js").then((m2) => m2.default));
|
|
123344
123347
|
function decodeRowAcc(row, stride) {
|
|
123345
123348
|
let length2 = row.length - stride;
|
|
123346
123349
|
let offset2 = 0;
|
|
@@ -150071,6 +150074,9 @@ function getOnHoverCallback(obsIndex, setObsHighlight, setComponentHover) {
|
|
|
150071
150074
|
}
|
|
150072
150075
|
};
|
|
150073
150076
|
}
|
|
150077
|
+
const ROTATION_THRESHOLD = 1;
|
|
150078
|
+
const ZOOM_THRESHOLD = 0.01;
|
|
150079
|
+
const TRANSLATION_THRESHOLD = 2;
|
|
150074
150080
|
class AbstractSpatialOrScatterplot extends PureComponent {
|
|
150075
150081
|
constructor(props) {
|
|
150076
150082
|
super(props);
|
|
@@ -150078,6 +150084,7 @@ class AbstractSpatialOrScatterplot extends PureComponent {
|
|
|
150078
150084
|
gl: null,
|
|
150079
150085
|
tool: null
|
|
150080
150086
|
};
|
|
150087
|
+
this.lastApplied = null;
|
|
150081
150088
|
this.viewport = null;
|
|
150082
150089
|
this.onViewStateChange = this.onViewStateChange.bind(this);
|
|
150083
150090
|
this.onInitializeViewInfo = this.onInitializeViewInfo.bind(this);
|
|
@@ -150097,6 +150104,23 @@ class AbstractSpatialOrScatterplot extends PureComponent {
|
|
|
150097
150104
|
onViewStateChange({ viewState: nextViewState }) {
|
|
150098
150105
|
const { setViewState, viewState, spatialAxisFixed } = this.props;
|
|
150099
150106
|
const use3d = this.use3d();
|
|
150107
|
+
let targetChanged = false;
|
|
150108
|
+
if (nextViewState.target && viewState.target) {
|
|
150109
|
+
const dx = Math.abs((nextViewState.target[0] ?? 0) - (viewState.target[0] ?? 0));
|
|
150110
|
+
const dy = Math.abs((nextViewState.target[1] ?? 0) - (viewState.target[1] ?? 0));
|
|
150111
|
+
const scale2 = 2 ** (nextViewState.zoom ?? 0);
|
|
150112
|
+
const dxPx = Math.abs(dx) * scale2;
|
|
150113
|
+
const dyPx = Math.abs(dy) * scale2;
|
|
150114
|
+
targetChanged = dxPx > TRANSLATION_THRESHOLD || dyPx > TRANSLATION_THRESHOLD;
|
|
150115
|
+
}
|
|
150116
|
+
const prev2 = this.lastApplied || viewState;
|
|
150117
|
+
const zoomChanged = Math.abs((nextViewState.zoom ?? 0) - (prev2.zoom ?? 0)) > ZOOM_THRESHOLD;
|
|
150118
|
+
const orbitChanged = Math.abs((nextViewState.rotationOrbit ?? 0) - (prev2.rotationOrbit ?? 0)) > ROTATION_THRESHOLD;
|
|
150119
|
+
const xChanged = Math.abs((nextViewState.rotationX ?? 0) - (prev2.rotationX ?? 0)) > ROTATION_THRESHOLD;
|
|
150120
|
+
if (!(zoomChanged || orbitChanged || xChanged || targetChanged)) {
|
|
150121
|
+
return;
|
|
150122
|
+
}
|
|
150123
|
+
this.lastApplied = nextViewState;
|
|
150100
150124
|
setViewState({
|
|
150101
150125
|
...nextViewState,
|
|
150102
150126
|
// If the axis is fixed, just use the current target in state i.e don't change target.
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-Bq7XVVZk.js";
|
|
3
3
|
const LercParameters = {
|
|
4
4
|
AddCompression: 1
|
|
5
5
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-embedding",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"react-aria": "^3.28.0",
|
|
22
22
|
"@turf/circle": "^7.2.0",
|
|
23
|
-
"@vitessce/styles": "3.
|
|
24
|
-
"@vitessce/constants-internal": "3.
|
|
25
|
-
"@vitessce/legend": "3.
|
|
26
|
-
"@vitessce/scatterplot": "3.
|
|
27
|
-
"@vitessce/sets-utils": "3.
|
|
28
|
-
"@vitessce/utils": "3.
|
|
29
|
-
"@vitessce/vit-s": "3.
|
|
23
|
+
"@vitessce/styles": "3.8.0",
|
|
24
|
+
"@vitessce/constants-internal": "3.8.0",
|
|
25
|
+
"@vitessce/legend": "3.8.0",
|
|
26
|
+
"@vitessce/scatterplot": "3.8.0",
|
|
27
|
+
"@vitessce/sets-utils": "3.8.0",
|
|
28
|
+
"@vitessce/utils": "3.8.0",
|
|
29
|
+
"@vitessce/vit-s": "3.8.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"react": "
|
|
33
|
-
"react-dom": "
|
|
32
|
+
"react": "18.3.1",
|
|
33
|
+
"react-dom": "18.3.1",
|
|
34
34
|
"vite": "^7.0.0",
|
|
35
35
|
"vitest": "^3.1.4"
|
|
36
36
|
},
|