@vitessce/scatterplot-embedding 3.6.17 → 3.6.18

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-D8r0IhL2.js";
2
+ import { B as BaseDecoder } from "./index-DiAoKAaO.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  var _a2, _b;
5
5
  import * as React from "react";
6
6
  import React__default, { useLayoutEffect, useEffect, cloneElement, createElement, forwardRef, useState, useRef, useMemo, useImperativeHandle, useContext, createContext, isValidElement, Children, PureComponent, useCallback } from "react";
7
- import { usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useVitessceContainer, useComponentHover, useComponentViewInfo, useLoaders, useSetComponentHover, useSetComponentViewInfo, useCoordination, useInitialCoordination, useDeckCanvasSize, useMultiObsLabels, useObsEmbeddingData, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useExpandedFeatureLabelsMap, useSampleSetsData, useSampleEdgesData, useReady, useUrls, useGetObsInfo, useUint8FeatureSelection, useExpressionValueGetter, TitleInfo } from "@vitessce/vit-s";
7
+ import { usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useVitessceContainer, useComponentHover, useComponentViewInfo, useLoaders, useCoordinationScopes, useSetComponentHover, useSetComponentViewInfo, useCoordination, useInitialCoordination, useDeckCanvasSize, useMultiObsLabels, useObsEmbeddingData, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useExpandedFeatureLabelsMap, useSampleSetsData, useSampleEdgesData, useReady, useUrls, useGetObsInfo, useUint8FeatureSelection, useExpressionValueGetter, TitleInfo } from "@vitessce/vit-s";
8
8
  import * as ReactDOM from "react-dom";
9
9
  function _mergeNamespaces(n2, m2) {
10
10
  for (var i2 = 0; i2 < m2.length; i2++) {
@@ -123323,22 +123323,22 @@ function addDecoder(cases, importFn) {
123323
123323
  }
123324
123324
  cases.forEach((c2) => registry$1.set(c2, importFn));
123325
123325
  }
123326
- addDecoder([void 0, 1], () => import("./raw-Ddzhu2WQ.js").then((m2) => m2.default));
123327
- addDecoder(5, () => import("./lzw-D-BbpGiu.js").then((m2) => m2.default));
123326
+ addDecoder([void 0, 1], () => import("./raw-HSp42GhA.js").then((m2) => m2.default));
123327
+ addDecoder(5, () => import("./lzw-BhXUNPHF.js").then((m2) => m2.default));
123328
123328
  addDecoder(6, () => {
123329
123329
  throw new Error("old style JPEG compression is not supported.");
123330
123330
  });
123331
- addDecoder(7, () => import("./jpeg-CgBOQiTD.js").then((m2) => m2.default));
123332
- addDecoder([8, 32946], () => import("./deflate-k2pYg4c6.js").then((m2) => m2.default));
123333
- addDecoder(32773, () => import("./packbits-Cs8NfpR6.js").then((m2) => m2.default));
123331
+ addDecoder(7, () => import("./jpeg-DUYY678x.js").then((m2) => m2.default));
123332
+ addDecoder([8, 32946], () => import("./deflate-Ccvs6Lib.js").then((m2) => m2.default));
123333
+ addDecoder(32773, () => import("./packbits-D_7psHiO.js").then((m2) => m2.default));
123334
123334
  addDecoder(
123335
123335
  34887,
123336
- () => import("./lerc-ku5SU9l7.js").then(async (m2) => {
123336
+ () => import("./lerc-C2z5Ot31.js").then(async (m2) => {
123337
123337
  await m2.zstd.init();
123338
123338
  return m2;
123339
123339
  }).then((m2) => m2.default)
123340
123340
  );
123341
- addDecoder(50001, () => import("./webimage-CC8JAPvA.js").then((m2) => m2.default));
123341
+ addDecoder(50001, () => import("./webimage-CaeLt8Sq.js").then((m2) => m2.default));
123342
123342
  function decodeRowAcc(row, stride) {
123343
123343
  let length2 = row.length - stride;
123344
123344
  let offset2 = 0;
@@ -153328,7 +153328,7 @@ const DEFAULT_FEATURE_AGGREGATION_STRATEGY = "first";
153328
153328
  function EmbeddingScatterplotSubscriber(props) {
153329
153329
  const {
153330
153330
  uuid,
153331
- coordinationScopes,
153331
+ coordinationScopes: coordinationScopesRaw,
153332
153332
  closeButtonVisible,
153333
153333
  downloadButtonVisible,
153334
153334
  removeGridComponent,
@@ -153342,6 +153342,7 @@ function EmbeddingScatterplotSubscriber(props) {
153342
153342
  sampleSetSelection: sampleSetSelectionFromProps
153343
153343
  } = props;
153344
153344
  const loaders = useLoaders();
153345
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
153345
153346
  const setComponentHover = useSetComponentHover();
153346
153347
  const setComponentViewInfo = useSetComponentViewInfo(uuid);
153347
153348
  const [{
@@ -153955,8 +153956,9 @@ function DualEmbeddingScatterplotSubscriber(props) {
153955
153956
  var _a3, _b2;
153956
153957
  const {
153957
153958
  uuid,
153958
- coordinationScopes
153959
+ coordinationScopes: coordinationScopesRaw
153959
153960
  } = props;
153961
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
153960
153962
  const [{
153961
153963
  embeddingType,
153962
153964
  sampleSetSelection
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, E } from "./index-D8r0IhL2.js";
1
+ import { D, E } from "./index-DiAoKAaO.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-D8r0IhL2.js";
1
+ import { B as BaseDecoder } from "./index-DiAoKAaO.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-D8r0IhL2.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-DiAoKAaO.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-D8r0IhL2.js";
1
+ import { B as BaseDecoder } from "./index-DiAoKAaO.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-D8r0IhL2.js";
1
+ import { B as BaseDecoder } from "./index-DiAoKAaO.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-D8r0IhL2.js";
1
+ import { B as BaseDecoder } from "./index-DiAoKAaO.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-D8r0IhL2.js";
1
+ import { B as BaseDecoder } from "./index-DiAoKAaO.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"DualEmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/DualEmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;GAeG;AACH,0DAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eAmDA"}
1
+ {"version":3,"file":"DualEmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/DualEmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,0DAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eAqDA"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useMemo } from 'react';
3
- import { useCoordination, } from '@vitessce/vit-s';
3
+ import { useCoordination, useCoordinationScopes, } from '@vitessce/vit-s';
4
4
  import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
5
5
  import { EmbeddingScatterplotSubscriber } from './EmbeddingScatterplotSubscriber.js';
6
6
  /**
@@ -20,7 +20,8 @@ import { EmbeddingScatterplotSubscriber } from './EmbeddingScatterplotSubscriber
20
20
  * when using dynamic opacity mode.
21
21
  */
22
22
  export function DualEmbeddingScatterplotSubscriber(props) {
23
- const { uuid, coordinationScopes, } = props;
23
+ const { uuid, coordinationScopes: coordinationScopesRaw, } = props;
24
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
24
25
  // Get "props" from the coordination space.
25
26
  const [{ embeddingType, sampleSetSelection, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.DUAL_SCATTERPLOT], coordinationScopes);
26
27
  const isCaseCtrl = Array.isArray(sampleSetSelection) && sampleSetSelection.length === 2;
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA4CA;;;;;;;;;;;;GAYG;AACH,sDAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eA+lBA"}
1
+ {"version":3,"file":"EmbeddingScatterplotSubscriber.d.ts","sourceRoot":"","sources":["../src/EmbeddingScatterplotSubscriber.js"],"names":[],"mappings":"AA6CA;;;;;;;;;;;;GAYG;AACH,sDAVG;IAAsB,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;CAEhB,eAgmBA"}
@@ -3,7 +3,7 @@ import React, { useState, useEffect, useCallback, useMemo, } from 'react';
3
3
  import { extent, quantileSorted } from 'd3-array';
4
4
  import { isEqual } from 'lodash-es';
5
5
  import { circle } from '@turf/circle';
6
- import { TitleInfo, useReady, useUrls, useDeckCanvasSize, useUint8FeatureSelection, useExpressionValueGetter, useGetObsInfo, useObsEmbeddingData, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useMultiObsLabels, useSampleSetsData, useSampleEdgesData, useCoordination, useLoaders, useSetComponentHover, useSetComponentViewInfo, useInitialCoordination, useExpandedFeatureLabelsMap, } from '@vitessce/vit-s';
6
+ import { TitleInfo, useReady, useUrls, useDeckCanvasSize, useUint8FeatureSelection, useExpressionValueGetter, useGetObsInfo, useObsEmbeddingData, useObsSetsData, useFeatureSelection, useObsFeatureMatrixIndices, useFeatureLabelsData, useMultiObsLabels, useSampleSetsData, useSampleEdgesData, useCoordination, useLoaders, useSetComponentHover, useSetComponentViewInfo, useInitialCoordination, useExpandedFeatureLabelsMap, useCoordinationScopes, } from '@vitessce/vit-s';
7
7
  import { setObsSelection, mergeObsSets, getCellSetPolygons, getCellColors, stratifyArrays, } from '@vitessce/sets-utils';
8
8
  import { pluralize as plur, commaNumber } from '@vitessce/utils';
9
9
  import { Scatterplot, ScatterplotTooltipSubscriber, ScatterplotOptions, getPointSizeDevicePixels, getPointOpacity, } from '@vitessce/scatterplot';
@@ -25,12 +25,13 @@ const DEFAULT_FEATURE_AGGREGATION_STRATEGY = 'first';
25
25
  * when using dynamic opacity mode.
26
26
  */
27
27
  export function EmbeddingScatterplotSubscriber(props) {
28
- const { uuid, coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, observationsLabelOverride, title: titleOverride, helpText = ViewHelpMapping.SCATTERPLOT,
28
+ const { uuid, coordinationScopes: coordinationScopesRaw, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, observationsLabelOverride, title: titleOverride, helpText = ViewHelpMapping.SCATTERPLOT,
29
29
  // Average fill density for dynamic opacity calculation.
30
30
  averageFillDensity,
31
31
  // For the dual scatterplot:
32
32
  sampleSetSelection: sampleSetSelectionFromProps, } = props;
33
33
  const loaders = useLoaders();
34
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
34
35
  const setComponentHover = useSetComponentHover();
35
36
  const setComponentViewInfo = useSetComponentViewInfo(uuid);
36
37
  // Get "props" from the coordination space.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.6.17",
3
+ "version": "3.6.18",
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.6.17",
24
- "@vitessce/constants-internal": "3.6.17",
25
- "@vitessce/legend": "3.6.17",
26
- "@vitessce/scatterplot": "3.6.17",
27
- "@vitessce/sets-utils": "3.6.17",
28
- "@vitessce/utils": "3.6.17",
29
- "@vitessce/vit-s": "3.6.17"
23
+ "@vitessce/styles": "3.6.18",
24
+ "@vitessce/constants-internal": "3.6.18",
25
+ "@vitessce/legend": "3.6.18",
26
+ "@vitessce/scatterplot": "3.6.18",
27
+ "@vitessce/sets-utils": "3.6.18",
28
+ "@vitessce/utils": "3.6.18",
29
+ "@vitessce/vit-s": "3.6.18"
30
30
  },
31
31
  "devDependencies": {
32
32
  "react": "^18.0.0",
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import {
3
3
  useCoordination,
4
+ useCoordinationScopes,
4
5
  } from '@vitessce/vit-s';
5
6
  import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
6
7
  import { EmbeddingScatterplotSubscriber } from './EmbeddingScatterplotSubscriber.js';
@@ -25,9 +26,11 @@ import { EmbeddingScatterplotSubscriber } from './EmbeddingScatterplotSubscriber
25
26
  export function DualEmbeddingScatterplotSubscriber(props) {
26
27
  const {
27
28
  uuid,
28
- coordinationScopes,
29
+ coordinationScopes: coordinationScopesRaw,
29
30
  } = props;
30
31
 
32
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
33
+
31
34
  // Get "props" from the coordination space.
32
35
  const [{
33
36
  embeddingType,
@@ -25,6 +25,7 @@ import {
25
25
  useSetComponentViewInfo,
26
26
  useInitialCoordination,
27
27
  useExpandedFeatureLabelsMap,
28
+ useCoordinationScopes,
28
29
  } from '@vitessce/vit-s';
29
30
  import {
30
31
  setObsSelection, mergeObsSets, getCellSetPolygons, getCellColors,
@@ -58,7 +59,7 @@ const DEFAULT_FEATURE_AGGREGATION_STRATEGY = 'first';
58
59
  export function EmbeddingScatterplotSubscriber(props) {
59
60
  const {
60
61
  uuid,
61
- coordinationScopes,
62
+ coordinationScopes: coordinationScopesRaw,
62
63
  closeButtonVisible,
63
64
  downloadButtonVisible,
64
65
  removeGridComponent,
@@ -74,6 +75,7 @@ export function EmbeddingScatterplotSubscriber(props) {
74
75
  } = props;
75
76
 
76
77
  const loaders = useLoaders();
78
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
77
79
  const setComponentHover = useSetComponentHover();
78
80
  const setComponentViewInfo = useSetComponentViewInfo(uuid);
79
81