@vitessce/scatterplot-embedding 4.0.0 → 4.0.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-CJTTUgHC.js";
2
+ import { B as BaseDecoder } from "./index-5HRu2Z3O.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -9933,6 +9933,7 @@ const CoordinationType$1 = {
9933
9933
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
9934
9934
  SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
9935
9935
  SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
9936
+ SPATIAL_CHANNELS_SORT_ORDER: "spatialChannelsSortOrder",
9936
9937
  // Multi-sample / comparative
9937
9938
  SAMPLE_TYPE: "sampleType",
9938
9939
  SAMPLE_SELECTION: "sampleSelection",
@@ -10509,6 +10510,7 @@ const COMPONENT_COORDINATION_TYPES = {
10509
10510
  CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE,
10510
10511
  CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
10511
10512
  CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE,
10513
+ CoordinationType$1.SPATIAL_CHANNELS_SORT_ORDER,
10512
10514
  CoordinationType$1.PHOTOMETRIC_INTERPRETATION
10513
10515
  ],
10514
10516
  [ViewType$1.HEATMAP]: [
@@ -10690,7 +10692,8 @@ const COMPONENT_COORDINATION_TYPES = {
10690
10692
  CoordinationType$1.LEGEND_VISIBLE,
10691
10693
  CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE,
10692
10694
  CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
10693
- CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE
10695
+ CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE,
10696
+ CoordinationType$1.SPATIAL_CHANNELS_SORT_ORDER
10694
10697
  ],
10695
10698
  [ViewType$1.GENOMIC_PROFILES]: [
10696
10699
  CoordinationType$1.DATASET,
@@ -11335,7 +11338,18 @@ z.object({
11335
11338
  z.object({
11336
11339
  projectionAnnotationSpacing: z.number(),
11337
11340
  featureIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing feature IDs. For example, specify 'gene' to use prop_gene() in the Neuroglancer shader code."),
11338
- pointIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing point IDs. For example, specify 'point_id' to use prop_point_id() in the Neuroglancer shader code.")
11341
+ pointIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing point IDs. For example, specify 'point_id' to use prop_point_id() in the Neuroglancer shader code."),
11342
+ transform: z.object({
11343
+ matrix: z.array(z.array(z.number())),
11344
+ outputDimensions: z.record(z.tuple([z.number(), z.string()]))
11345
+ }).optional().describe("A coordinate transformation matrix to apply to the annotation layer source to map annotation coordinates to the global coordinate space."),
11346
+ // Note: See comments in neuroglancer-sorger.js
11347
+ // We may remove these in the future, pending clarification
11348
+ // to questions in the tissue-map-tools repo
11349
+ // - https://github.com/hms-dbmi/tissue-map-tools/issues/20
11350
+ // - https://github.com/hms-dbmi/tissue-map-tools/issues/38
11351
+ quantitativeColorProp: z.string().optional(),
11352
+ quantitativeColorMax: z.number().optional()
11339
11353
  }).partial().nullable();
11340
11354
  z.object({
11341
11355
  obsIndex: z.string(),
@@ -17884,6 +17898,37 @@ function keyof(value) {
17884
17898
  return value !== null && typeof value === "object" ? value.valueOf() : value;
17885
17899
  }
17886
17900
  const schemeRdBu = [[103, 0, 31], [178, 24, 43], [214, 96, 77], [244, 165, 130], [253, 219, 199], [247, 247, 247], [209, 229, 240], [146, 197, 222], [67, 147, 195], [33, 102, 172], [5, 48, 97]];
17901
+ const schemePlasma = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138], [25, 6, 140], [27, 6, 141], [29, 6, 142], [32, 6, 143], [34, 6, 144], [36, 6, 145], [38, 5, 145], [40, 5, 146], [42, 5, 147], [44, 5, 148], [46, 5, 149], [47, 5, 150], [49, 5, 151], [51, 5, 151], [53, 4, 152], [55, 4, 153], [56, 4, 154], [58, 4, 154], [60, 4, 155], [62, 4, 156], [63, 4, 156], [65, 4, 157], [67, 3, 158], [68, 3, 158], [70, 3, 159], [72, 3, 159], [73, 3, 160], [75, 3, 161], [76, 2, 161], [78, 2, 162], [80, 2, 162], [81, 2, 163], [83, 2, 163], [85, 2, 164], [86, 1, 164], [88, 1, 164], [89, 1, 165], [91, 1, 165], [92, 1, 166], [94, 1, 166], [96, 1, 166], [97, 0, 167], [99, 0, 167], [100, 0, 167], [102, 0, 167], [103, 0, 168], [105, 0, 168], [106, 0, 168], [108, 0, 168], [110, 0, 168], [111, 0, 168], [113, 0, 168], [114, 1, 168], [116, 1, 168], [117, 1, 168], [119, 1, 168], [120, 1, 168], [122, 2, 168], [123, 2, 168], [125, 3, 168], [126, 3, 168], [128, 4, 168], [129, 4, 167], [131, 5, 167], [132, 5, 167], [134, 6, 166], [135, 7, 166], [136, 8, 166], [138, 9, 165], [139, 10, 165], [141, 11, 165], [142, 12, 164], [143, 13, 164], [145, 14, 163], [146, 15, 163], [148, 16, 162], [149, 17, 161], [150, 19, 161], [152, 20, 160], [153, 21, 159], [154, 22, 159], [156, 23, 158], [157, 24, 157], [158, 25, 157], [160, 26, 156], [161, 27, 155], [162, 29, 154], [163, 30, 154], [165, 31, 153], [166, 32, 152], [167, 33, 151], [168, 34, 150], [170, 35, 149], [171, 36, 148], [172, 38, 148], [173, 39, 147], [174, 40, 146], [176, 41, 145], [177, 42, 144], [178, 43, 143], [179, 44, 142], [180, 46, 141], [181, 47, 140], [182, 48, 139], [183, 49, 138], [184, 50, 137], [186, 51, 136], [187, 52, 136], [188, 53, 135], [189, 55, 134], [190, 56, 133], [191, 57, 132], [192, 58, 131], [193, 59, 130], [194, 60, 129], [195, 61, 128], [196, 62, 127], [197, 64, 126], [198, 65, 125], [199, 66, 124], [200, 67, 123], [201, 68, 122], [202, 69, 122], [203, 70, 121], [204, 71, 120], [204, 73, 119], [205, 74, 118], [206, 75, 117], [207, 76, 116], [208, 77, 115], [209, 78, 114], [210, 79, 113], [211, 81, 113], [212, 82, 112], [213, 83, 111], [213, 84, 110], [214, 85, 109], [215, 86, 108], [216, 87, 107], [217, 88, 106], [218, 90, 106], [218, 91, 105], [219, 92, 104], [220, 93, 103], [221, 94, 102], [222, 95, 101], [222, 97, 100], [223, 98, 99], [224, 99, 99], [225, 100, 98], [226, 101, 97], [226, 102, 96], [227, 104, 95], [228, 105, 94], [229, 106, 93], [229, 107, 93], [230, 108, 92], [231, 110, 91], [231, 111, 90], [232, 112, 89], [233, 113, 88], [233, 114, 87], [234, 116, 87], [235, 117, 86], [235, 118, 85], [236, 119, 84], [237, 121, 83], [237, 122, 82], [238, 123, 81], [239, 124, 81], [239, 126, 80], [240, 127, 79], [240, 128, 78], [241, 129, 77], [241, 131, 76], [242, 132, 75], [243, 133, 75], [243, 135, 74], [244, 136, 73], [244, 137, 72], [245, 139, 71], [245, 140, 70], [246, 141, 69], [246, 143, 68], [247, 144, 68], [247, 145, 67], [247, 147, 66], [248, 148, 65], [248, 149, 64], [249, 151, 63], [249, 152, 62], [249, 154, 62], [250, 155, 61], [250, 156, 60], [250, 158, 59], [251, 159, 58], [251, 161, 57], [251, 162, 56], [252, 163, 56], [252, 165, 55], [252, 166, 54], [252, 168, 53], [252, 169, 52], [253, 171, 51], [253, 172, 51], [253, 174, 50], [253, 175, 49], [253, 177, 48], [253, 178, 47], [253, 180, 47], [253, 181, 46], [254, 183, 45], [254, 184, 44], [254, 186, 44], [254, 187, 43], [254, 189, 42], [254, 190, 42], [254, 192, 41], [253, 194, 41], [253, 195, 40], [253, 197, 39], [253, 198, 39], [253, 200, 39], [253, 202, 38], [253, 203, 38], [252, 205, 37], [252, 206, 37], [252, 208, 37], [252, 210, 37], [251, 211, 36], [251, 213, 36], [251, 215, 36], [250, 216, 36], [250, 218, 36], [249, 220, 36], [249, 221, 37], [248, 223, 37], [248, 225, 37], [247, 226, 37], [247, 228, 37], [246, 230, 38], [246, 232, 38], [245, 233, 38], [245, 235, 39], [244, 237, 39], [243, 238, 39], [243, 240, 39], [242, 242, 39], [241, 244, 38], [241, 245, 37], [240, 247, 36], [240, 249, 33]];
17902
+ const schemeViridis = [[68, 1, 84], [68, 2, 86], [69, 4, 87], [69, 5, 89], [70, 7, 90], [70, 8, 92], [70, 10, 93], [70, 11, 94], [71, 13, 96], [71, 14, 97], [71, 16, 99], [71, 17, 100], [71, 19, 101], [72, 20, 103], [72, 22, 104], [72, 23, 105], [72, 24, 106], [72, 26, 108], [72, 27, 109], [72, 28, 110], [72, 30, 111], [72, 31, 112], [72, 32, 113], [72, 34, 115], [72, 35, 116], [72, 36, 117], [72, 38, 118], [72, 39, 119], [72, 40, 120], [72, 42, 121], [72, 43, 122], [72, 44, 123], [72, 46, 124], [72, 47, 125], [72, 48, 126], [72, 50, 127], [72, 51, 128], [72, 52, 129], [72, 53, 130], [72, 55, 131], [72, 56, 132], [72, 57, 133], [72, 59, 134], [72, 60, 135], [72, 61, 136], [72, 63, 137], [72, 64, 137], [72, 65, 138], [72, 67, 139], [72, 68, 140], [72, 69, 141], [72, 71, 142], [72, 72, 143], [72, 73, 144], [72, 75, 145], [72, 76, 146], [72, 77, 147], [72, 79, 148], [72, 80, 149], [72, 82, 150], [72, 83, 150], [72, 84, 151], [72, 86, 152], [72, 87, 153], [72, 88, 154], [72, 90, 155], [71, 91, 156], [71, 92, 157], [71, 94, 158], [71, 95, 158], [71, 97, 159], [71, 98, 160], [71, 99, 161], [71, 101, 162], [71, 102, 163], [71, 103, 164], [71, 105, 164], [71, 106, 165], [71, 108, 166], [71, 109, 167], [71, 110, 168], [71, 112, 169], [71, 113, 169], [71, 114, 170], [71, 116, 171], [71, 117, 172], [70, 119, 173], [70, 120, 174], [70, 121, 174], [70, 123, 175], [70, 124, 176], [70, 125, 177], [70, 127, 178], [70, 128, 178], [70, 130, 179], [70, 131, 180], [70, 132, 181], [70, 134, 182], [70, 135, 182], [70, 136, 183], [70, 138, 184], [70, 139, 185], [70, 141, 186], [70, 142, 186], [70, 143, 187], [70, 145, 188], [70, 146, 189], [70, 148, 189], [70, 149, 190], [70, 150, 191], [70, 152, 192], [70, 153, 192], [70, 155, 193], [70, 156, 194], [70, 157, 195], [70, 159, 195], [70, 160, 196], [70, 162, 197], [70, 163, 198], [70, 164, 198], [70, 166, 199], [70, 167, 200], [71, 169, 200], [71, 170, 201], [71, 171, 202], [71, 173, 203], [71, 174, 203], [71, 176, 204], [71, 177, 205], [71, 178, 205], [72, 180, 206], [72, 181, 207], [72, 183, 207], [72, 184, 208], [73, 185, 209], [73, 187, 209], [73, 188, 210], [74, 190, 211], [74, 191, 211], [74, 192, 212], [75, 194, 213], [75, 195, 213], [76, 197, 214], [76, 198, 214], [77, 199, 215], [77, 201, 216], [78, 202, 216], [78, 204, 217], [79, 205, 217], [79, 207, 218], [80, 208, 218], [81, 209, 219], [81, 211, 220], [82, 212, 220], [83, 214, 221], [83, 215, 221], [84, 216, 222], [85, 218, 222], [85, 219, 223], [86, 221, 223], [87, 222, 224], [88, 224, 224], [88, 225, 225], [89, 226, 225], [90, 228, 226], [91, 229, 226], [92, 231, 227], [92, 232, 227], [93, 234, 228], [94, 235, 228], [95, 236, 229], [96, 238, 229], [97, 239, 230], [97, 241, 230], [98, 242, 231], [99, 244, 231], [100, 245, 232], [101, 246, 232], [102, 248, 233], [103, 249, 233], [104, 251, 234], [105, 252, 234]];
17903
+ const schemeJet = Array.from({ length: 256 }, (_, i2) => {
17904
+ const t = i2 / 255;
17905
+ let r2;
17906
+ let g2;
17907
+ let b;
17908
+ if (t < 0.125) {
17909
+ r2 = 0;
17910
+ g2 = 0;
17911
+ b = 0.5 + t * 4;
17912
+ } else if (t < 0.375) {
17913
+ r2 = 0;
17914
+ g2 = (t - 0.125) * 4;
17915
+ b = 1;
17916
+ } else if (t < 0.625) {
17917
+ r2 = (t - 0.375) * 4;
17918
+ g2 = 1;
17919
+ b = 1 - (t - 0.375) * 4;
17920
+ } else if (t < 0.875) {
17921
+ r2 = 1;
17922
+ g2 = 1 - (t - 0.625) * 4;
17923
+ b = 0;
17924
+ } else {
17925
+ r2 = 1 - (t - 0.875) * 4;
17926
+ g2 = 0;
17927
+ b = 0;
17928
+ }
17929
+ return [Math.round(r2 * 255), Math.round(g2 * 255), Math.round(b * 255)];
17930
+ });
17931
+ const schemeGreys = Array.from({ length: 256 }, (_, i2) => [i2, i2, i2]);
17887
17932
  function rgbSpline(spline) {
17888
17933
  return (colors) => {
17889
17934
  const n2 = colors.length;
@@ -17921,7 +17966,15 @@ function basis(values2) {
17921
17966
  };
17922
17967
  }
17923
17968
  const interpolateRgbBasis = rgbSpline(basis);
17969
+ function interpolateSequentialMulti(range2) {
17970
+ const n2 = range2.length;
17971
+ return (t) => range2[Math.max(0, Math.min(n2 - 1, Math.floor(t * n2)))];
17972
+ }
17924
17973
  interpolateRgbBasis(schemeRdBu);
17974
+ interpolateSequentialMulti(schemePlasma);
17975
+ interpolateSequentialMulti(schemeViridis);
17976
+ interpolateSequentialMulti(schemeJet);
17977
+ interpolateSequentialMulti(schemeGreys);
17925
17978
  function getCellColors(params) {
17926
17979
  const { cellSets, cellSetSelection, cellSetColor, obsIndex, theme } = params;
17927
17980
  if (cellSetSelection && cellSets) {
@@ -122552,22 +122605,22 @@ function addDecoder(cases, importFn) {
122552
122605
  }
122553
122606
  cases.forEach((c2) => registry$1.set(c2, importFn));
122554
122607
  }
122555
- addDecoder([void 0, 1], () => import("./raw-CnEsnr_U.js").then((m2) => m2.default));
122556
- addDecoder(5, () => import("./lzw-DzHCzpWW.js").then((m2) => m2.default));
122608
+ addDecoder([void 0, 1], () => import("./raw-Dafa0Swn.js").then((m2) => m2.default));
122609
+ addDecoder(5, () => import("./lzw-D7BZ1wcC.js").then((m2) => m2.default));
122557
122610
  addDecoder(6, () => {
122558
122611
  throw new Error("old style JPEG compression is not supported.");
122559
122612
  });
122560
- addDecoder(7, () => import("./jpeg-D8TMgzJ-.js").then((m2) => m2.default));
122561
- addDecoder([8, 32946], () => import("./deflate-DDd0M1_3.js").then((m2) => m2.default));
122562
- addDecoder(32773, () => import("./packbits-IenIuEyy.js").then((m2) => m2.default));
122613
+ addDecoder(7, () => import("./jpeg-BDB9TI7a.js").then((m2) => m2.default));
122614
+ addDecoder([8, 32946], () => import("./deflate-C2BJz3Np.js").then((m2) => m2.default));
122615
+ addDecoder(32773, () => import("./packbits-CE3TkByu.js").then((m2) => m2.default));
122563
122616
  addDecoder(
122564
122617
  34887,
122565
- () => import("./lerc-DIqN_Nd5.js").then(async (m2) => {
122618
+ () => import("./lerc-CDQiFN0R.js").then(async (m2) => {
122566
122619
  await m2.zstd.init();
122567
122620
  return m2;
122568
122621
  }).then((m2) => m2.default)
122569
122622
  );
122570
- addDecoder(50001, () => import("./webimage-bn5lsJYe.js").then((m2) => m2.default));
122623
+ addDecoder(50001, () => import("./webimage-B4Leod1Q.js").then((m2) => m2.default));
122571
122624
  function decodeRowAcc(row, stride) {
122572
122625
  let length2 = row.length - stride;
122573
122626
  let offset2 = 0;
@@ -150181,7 +150234,7 @@ function ToolMenu(props) {
150181
150234
  return jsxs("div", { className: classes.tool, children: [visibleTools.pan && jsx$1(IconTool, { alt: pointerIconAltText, onClick: () => setActiveTool(null), isActive: activeTool === null, children: jsx$1(SvgNearMe, {}) }), visibleTools.selectLasso ? jsx$1(IconTool, { alt: lassoIconAltText, onClick: () => setActiveTool(distEs6Exports$2.SELECTION_TYPE.POLYGON), isActive: activeTool === distEs6Exports$2.SELECTION_TYPE.POLYGON, children: jsx$1(SvgSelectionLasso, {}) }) : null, visibleTools.recenter ? jsx$1(IconButton, { alt: "click to recenter", onClick: () => onRecenterButtonCLick(), "aria-label": "Recenter scatterplot view", children: jsx$1(CenterFocusStrong, {}) }) : null] });
150182
150235
  }
150183
150236
  const getCursorWithTool = () => "crosshair";
150184
- const getCursor = (interactionState) => interactionState.isDragging ? "grabbing" : "default";
150237
+ const getCursor = (interactionState) => interactionState.isDragging ? "grabbing" : "grab";
150185
150238
  function getOnHoverCallback(obsIndex, setObsHighlight, setComponentHover) {
150186
150239
  return (info) => {
150187
150240
  if (setComponentHover) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, E } from "./index-CJTTUgHC.js";
1
+ import { D, E } from "./index-5HRu2Z3O.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-CJTTUgHC.js";
1
+ import { B as BaseDecoder } from "./index-5HRu2Z3O.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-CJTTUgHC.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-5HRu2Z3O.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CJTTUgHC.js";
1
+ import { B as BaseDecoder } from "./index-5HRu2Z3O.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-CJTTUgHC.js";
1
+ import { B as BaseDecoder } from "./index-5HRu2Z3O.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-CJTTUgHC.js";
1
+ import { B as BaseDecoder } from "./index-5HRu2Z3O.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-CJTTUgHC.js";
1
+ import { B as BaseDecoder } from "./index-5HRu2Z3O.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": "4.0.0",
3
+ "version": "4.0.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.47.0",
22
22
  "@turf/circle": "^7.2.0",
23
- "@vitessce/constants-internal": "4.0.0",
24
- "@vitessce/styles": "4.0.0",
25
- "@vitessce/legend": "4.0.0",
26
- "@vitessce/scatterplot": "4.0.0",
27
- "@vitessce/sets-utils": "4.0.0",
28
- "@vitessce/utils": "4.0.0",
29
- "@vitessce/vit-s": "4.0.0"
23
+ "@vitessce/styles": "4.0.2",
24
+ "@vitessce/legend": "4.0.2",
25
+ "@vitessce/scatterplot": "4.0.2",
26
+ "@vitessce/sets-utils": "4.0.2",
27
+ "@vitessce/utils": "4.0.2",
28
+ "@vitessce/vit-s": "4.0.2",
29
+ "@vitessce/constants-internal": "4.0.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "react": "19.2.6",