@vitessce/scatterplot-embedding 3.8.0 → 3.8.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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-Bq7XVVZk.js";
2
+ import { B as BaseDecoder } from "./index-BUnpJvPA.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -9558,7 +9558,7 @@ const ViewType$1 = {
9558
9558
  SCATTERPLOT: "scatterplot",
9559
9559
  SPATIAL: "spatial",
9560
9560
  SPATIAL_BETA: "spatialBeta",
9561
- SPATIAL_ACCELERATED: "spatialAccelerated",
9561
+ // SPATIAL_ACCELERATED: 'spatialAccelerated',
9562
9562
  HEATMAP: "heatmap",
9563
9563
  LAYER_CONTROLLER: "layerController",
9564
9564
  LAYER_CONTROLLER_BETA: "layerControllerBeta",
@@ -9716,6 +9716,9 @@ const FileType$1 = {
9716
9716
  OBS_SEGMENTATIONS_OME_TIFF: "obsSegmentations.ome-tiff",
9717
9717
  // GLB
9718
9718
  OBS_SEGMENTATIONS_GLB: "obsSegmentations.glb",
9719
+ // Neuroglancer
9720
+ // Precomputed (mesh) format
9721
+ OBS_SEGMENTATIONS_NG_PRECOMPUTED: "obsSegmentations.ng-precomputed",
9719
9722
  // New file types to support old file types:
9720
9723
  // - cells.json
9721
9724
  OBS_EMBEDDING_CELLS_JSON: "obsEmbedding.cells.json",
@@ -9943,6 +9946,7 @@ const ViewHelpMapping = {
9943
9946
  [FileType$1.OBS_LABELS_MUDATA_ZARR]: DataType$2.OBS_LABELS,
9944
9947
  [FileType$1.FEATURE_LABELS_MUDATA_ZARR]: DataType$2.FEATURE_LABELS,
9945
9948
  [FileType$1.OBS_SEGMENTATIONS_GLB]: DataType$2.OBS_SEGMENTATIONS,
9949
+ [FileType$1.OBS_SEGMENTATIONS_NG_PRECOMPUTED]: DataType$2.OBS_SEGMENTATIONS,
9946
9950
  [FileType$1.IMAGE_SPATIALDATA_ZARR]: DataType$2.IMAGE,
9947
9951
  [FileType$1.LABELS_SPATIALDATA_ZARR]: DataType$2.OBS_SEGMENTATIONS,
9948
9952
  [FileType$1.SHAPES_SPATIALDATA_ZARR]: DataType$2.OBS_SEGMENTATIONS,
@@ -11206,6 +11210,18 @@ z.object({
11206
11210
  sceneScaleZ: z.number(),
11207
11211
  materialSide: z.enum(["front", "back"])
11208
11212
  }).partial().nullable();
11213
+ z.object({
11214
+ // TODO: Should this explicitly specify sharded vs. unsharded?
11215
+ // Or can/should that be inferred from the data?
11216
+ dimensionX: z.number(),
11217
+ dimensionY: z.number(),
11218
+ dimensionZ: z.number(),
11219
+ dimensionUnit: z.enum(["nm", "um", "µm", "mm", "cm", "m"]),
11220
+ // TODO: should the following be passed via coordination types instead?
11221
+ projectionScale: z.number(),
11222
+ position: z.array(z.number()).length(3),
11223
+ projectionOrientation: z.array(z.number()).length(4)
11224
+ }).partial().nullable();
11209
11225
  z.object({
11210
11226
  obsIndex: z.string(),
11211
11227
  obsEmbedding: z.array(z.string()).length(2)
@@ -123328,22 +123344,22 @@ function addDecoder(cases, importFn) {
123328
123344
  }
123329
123345
  cases.forEach((c2) => registry$1.set(c2, importFn));
123330
123346
  }
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));
123347
+ addDecoder([void 0, 1], () => import("./raw-CYgoEHqR.js").then((m2) => m2.default));
123348
+ addDecoder(5, () => import("./lzw-C3MiI_oL.js").then((m2) => m2.default));
123333
123349
  addDecoder(6, () => {
123334
123350
  throw new Error("old style JPEG compression is not supported.");
123335
123351
  });
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));
123352
+ addDecoder(7, () => import("./jpeg-HkMzLFbL.js").then((m2) => m2.default));
123353
+ addDecoder([8, 32946], () => import("./deflate-BPNH0-gs.js").then((m2) => m2.default));
123354
+ addDecoder(32773, () => import("./packbits-CtWmjnkM.js").then((m2) => m2.default));
123339
123355
  addDecoder(
123340
123356
  34887,
123341
- () => import("./lerc-CAFxbgCZ.js").then(async (m2) => {
123357
+ () => import("./lerc-BL5Xy_sd.js").then(async (m2) => {
123342
123358
  await m2.zstd.init();
123343
123359
  return m2;
123344
123360
  }).then((m2) => m2.default)
123345
123361
  );
123346
- addDecoder(50001, () => import("./webimage-DR1LwE21.js").then((m2) => m2.default));
123362
+ addDecoder(50001, () => import("./webimage-yN7Q3b16.js").then((m2) => m2.default));
123347
123363
  function decodeRowAcc(row, stride) {
123348
123364
  let length2 = row.length - stride;
123349
123365
  let offset2 = 0;
@@ -150049,13 +150065,13 @@ function IconButton(props) {
150049
150065
  function ToolMenu(props) {
150050
150066
  const pointerIconAltText = "Pointer tool";
150051
150067
  const lassoIconAltText = "Select lasso";
150052
- const { setActiveTool, activeTool, visibleTools = { pan: true, selectLasso: true }, recenterOnClick = () => {
150068
+ const { setActiveTool, activeTool, visibleTools = { pan: true, selectLasso: true, recenter: true }, recenterOnClick = () => {
150053
150069
  } } = props;
150054
150070
  const { classes } = useStyles$3();
150055
150071
  const onRecenterButtonCLick = () => {
150056
150072
  recenterOnClick();
150057
150073
  };
150058
- return jsxRuntimeExports.jsxs("div", { className: classes.tool, children: [visibleTools.pan && jsxRuntimeExports.jsx(IconTool, { alt: pointerIconAltText, onClick: () => setActiveTool(null), isActive: activeTool === null, children: jsxRuntimeExports.jsx(SvgNearMe, {}) }), visibleTools.selectLasso ? jsxRuntimeExports.jsx(IconTool, { alt: lassoIconAltText, onClick: () => setActiveTool(distEs6Exports$2.SELECTION_TYPE.POLYGON), isActive: activeTool === distEs6Exports$2.SELECTION_TYPE.POLYGON, children: jsxRuntimeExports.jsx(SvgSelectionLasso, {}) }) : null, jsxRuntimeExports.jsx(IconButton, { alt: "click to recenter", onClick: () => onRecenterButtonCLick(), "aria-label": "Recenter scatterplot view", children: jsxRuntimeExports.jsx(CenterFocusStrong, {}) })] });
150074
+ return jsxRuntimeExports.jsxs("div", { className: classes.tool, children: [visibleTools.pan && jsxRuntimeExports.jsx(IconTool, { alt: pointerIconAltText, onClick: () => setActiveTool(null), isActive: activeTool === null, children: jsxRuntimeExports.jsx(SvgNearMe, {}) }), visibleTools.selectLasso ? jsxRuntimeExports.jsx(IconTool, { alt: lassoIconAltText, onClick: () => setActiveTool(distEs6Exports$2.SELECTION_TYPE.POLYGON), isActive: activeTool === distEs6Exports$2.SELECTION_TYPE.POLYGON, children: jsxRuntimeExports.jsx(SvgSelectionLasso, {}) }) : null, visibleTools.recenter ? jsxRuntimeExports.jsx(IconButton, { alt: "click to recenter", onClick: () => onRecenterButtonCLick(), "aria-label": "Recenter scatterplot view", children: jsxRuntimeExports.jsx(CenterFocusStrong, {}) }) : null] });
150059
150075
  }
150060
150076
  const getCursorWithTool = () => "crosshair";
150061
150077
  const getCursor = (interactionState) => interactionState.isDragging ? "grabbing" : "default";
@@ -150290,7 +150306,7 @@ class AbstractSpatialOrScatterplot extends PureComponent {
150290
150306
  */
150291
150307
  render() {
150292
150308
  var _a3, _b2, _c, _d;
150293
- const { deckRef, viewState, uuid, hideTools, orbitAxis } = this.props;
150309
+ const { deckRef, viewState, uuid, hideTools, hideRecenter, orbitAxis } = this.props;
150294
150310
  const { gl, tool } = this.state;
150295
150311
  const layers = this.getLayers();
150296
150312
  const use3d = this.use3d();
@@ -150299,7 +150315,8 @@ class AbstractSpatialOrScatterplot extends PureComponent {
150299
150315
  const useDevicePixels = !use3d && (((_b2 = (_a3 = this.obsSegmentationsData) == null ? void 0 : _a3.shape) == null ? void 0 : _b2[0]) < 1e5 || ((_d = (_c = this.obsLocationsData) == null ? void 0 : _c.shape) == null ? void 0 : _d[1]) < 1e5);
150300
150316
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(ToolMenu, { activeTool: tool, setActiveTool: this.onToolChange, visibleTools: {
150301
150317
  pan: showPanTool && !hideTools,
150302
- selectLasso: showCellSelectionTools && !hideTools
150318
+ selectLasso: showCellSelectionTools && !hideTools,
150319
+ recenter: !hideRecenter
150303
150320
  }, recenterOnClick: this.recenter }), jsxRuntimeExports.jsx(DeckGL, { id: `deckgl-overlay-${uuid}`, ref: deckRef, views: [
150304
150321
  use3d ? new OrbitView({ id: "orbit", controller: true, orbitAxis }) : new OrthographicView({
150305
150322
  id: "ortho"
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, E } from "./index-Bq7XVVZk.js";
1
+ import { D, E } from "./index-BUnpJvPA.js";
2
2
  export {
3
3
  D as DualEmbeddingScatterplotSubscriber,
4
4
  E as EmbeddingScatterplotSubscriber
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Bq7XVVZk.js";
1
+ import { B as BaseDecoder } from "./index-BUnpJvPA.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -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-Bq7XVVZk.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-BUnpJvPA.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Bq7XVVZk.js";
1
+ import { B as BaseDecoder } from "./index-BUnpJvPA.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Bq7XVVZk.js";
1
+ import { B as BaseDecoder } from "./index-BUnpJvPA.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Bq7XVVZk.js";
1
+ import { B as BaseDecoder } from "./index-BUnpJvPA.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Bq7XVVZk.js";
1
+ import { B as BaseDecoder } from "./index-BUnpJvPA.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,13 +20,13 @@
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.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"
23
+ "@vitessce/styles": "3.8.2",
24
+ "@vitessce/constants-internal": "3.8.2",
25
+ "@vitessce/legend": "3.8.2",
26
+ "@vitessce/scatterplot": "3.8.2",
27
+ "@vitessce/sets-utils": "3.8.2",
28
+ "@vitessce/utils": "3.8.2",
29
+ "@vitessce/vit-s": "3.8.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "react": "18.3.1",