@vitessce/layer-controller 3.5.6 → 3.5.7

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-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-2323f9be.js";
2
+ import { B as BaseDecoder } from "./index-47073962.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -16713,7 +16713,8 @@ const ViewType = {
16713
16713
  FEATURE_BAR_PLOT: "featureBarPlot",
16714
16714
  BIOMARKER_SELECT: "biomarkerSelect",
16715
16715
  LINK_CONTROLLER: "linkController",
16716
- DUAL_SCATTERPLOT: "dualScatterplot"
16716
+ DUAL_SCATTERPLOT: "dualScatterplot",
16717
+ TREEMAP: "treemap"
16717
16718
  };
16718
16719
  const CoordinationType = {
16719
16720
  META_COORDINATION_SCOPES: "metaCoordinationScopes",
@@ -16845,12 +16846,15 @@ const CoordinationType = {
16845
16846
  SAMPLE_SET_FILTER: "sampleSetFilter",
16846
16847
  SAMPLE_FILTER_MODE: "sampleFilterMode",
16847
16848
  SAMPLE_SET_COLOR: "sampleSetColor",
16849
+ SAMPLE_HIGHLIGHT: "sampleHighlight",
16848
16850
  EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
16849
16851
  EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
16850
16852
  EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
16851
16853
  EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
16852
16854
  CONTOUR_COLOR_ENCODING: "contourColorEncoding",
16853
- CONTOUR_COLOR: "contourColor"
16855
+ CONTOUR_COLOR: "contourColor",
16856
+ // Treemap
16857
+ HIERARCHY_LEVELS: "hierarchyLevels"
16854
16858
  };
16855
16859
  const ViewHelpMapping = {
16856
16860
  SCATTERPLOT: "The scatterplot displays two-dimensional (pre-computed) dimensionality reduction results (such as from t-SNE or UMAP). Each point on the scatterplot represents an observation (e.g., cell).",
@@ -16867,7 +16871,8 @@ const ViewHelpMapping = {
16867
16871
  OBS_SET_FEATURE_VALUE_DISTRIBUTION: "The observation set feature value distribution view displays a violin plot with values (e.g., expression values) per set (e.g., cell type) for the selected feature (e.g., gene).",
16868
16872
  FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
16869
16873
  DOT_PLOT: "The dot plot displays summary information about expression of the selected features (e.g., genes) for each selected observation set (e.g., cell type).",
16870
- FEATURE_BAR_PLOT: "The feature bar plot displays one bar per observation (e.g., cell) along the x-axis, where the value of a selected feature (e.g., gene) is encoded along the y-axis."
16874
+ FEATURE_BAR_PLOT: "The feature bar plot displays one bar per observation (e.g., cell) along the x-axis, where the value of a selected feature (e.g., gene) is encoded along the y-axis.",
16875
+ TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering."
16871
16876
  };
16872
16877
  const COMPONENT_COORDINATION_TYPES = {
16873
16878
  [ViewType.SCATTERPLOT]: [
@@ -17347,6 +17352,32 @@ const COMPONENT_COORDINATION_TYPES = {
17347
17352
  CoordinationType.OBS_SET_SELECTION,
17348
17353
  CoordinationType.OBS_SET_FILTER
17349
17354
  // TODO: create coordination types for internal state of the biomarker selection view?
17355
+ ],
17356
+ [ViewType.TREEMAP]: [
17357
+ CoordinationType.DATASET,
17358
+ CoordinationType.OBS_TYPE,
17359
+ CoordinationType.FEATURE_TYPE,
17360
+ CoordinationType.FEATURE_VALUE_TYPE,
17361
+ CoordinationType.OBS_FILTER,
17362
+ CoordinationType.OBS_HIGHLIGHT,
17363
+ CoordinationType.OBS_SET_SELECTION,
17364
+ CoordinationType.OBS_SET_FILTER,
17365
+ CoordinationType.OBS_SELECTION,
17366
+ CoordinationType.OBS_SELECTION_MODE,
17367
+ CoordinationType.OBS_SET_HIGHLIGHT,
17368
+ CoordinationType.OBS_SET_COLOR,
17369
+ CoordinationType.OBS_COLOR_ENCODING,
17370
+ CoordinationType.ADDITIONAL_OBS_SETS,
17371
+ CoordinationType.SAMPLE_TYPE,
17372
+ CoordinationType.SAMPLE_SET_SELECTION,
17373
+ CoordinationType.SAMPLE_SET_FILTER,
17374
+ CoordinationType.SAMPLE_SET_COLOR,
17375
+ CoordinationType.SAMPLE_SELECTION,
17376
+ CoordinationType.SAMPLE_SELECTION_MODE,
17377
+ CoordinationType.SAMPLE_FILTER,
17378
+ CoordinationType.SAMPLE_FILTER_MODE,
17379
+ CoordinationType.SAMPLE_HIGHLIGHT,
17380
+ CoordinationType.HIERARCHY_LEVELS
17350
17381
  ]
17351
17382
  };
17352
17383
  const GLOBAL_LABELS = ["z", "t"];
@@ -17722,6 +17753,258 @@ plur.addPluralRule("interstitium", "interstitia");
17722
17753
  function capitalize(word) {
17723
17754
  return word ? word.charAt(0).toUpperCase() + word.slice(1) : "";
17724
17755
  }
17756
+ var loglevel = { exports: {} };
17757
+ (function(module2) {
17758
+ (function(root2, definition) {
17759
+ if (module2.exports) {
17760
+ module2.exports = definition();
17761
+ } else {
17762
+ root2.log = definition();
17763
+ }
17764
+ })(commonjsGlobal, function() {
17765
+ var noop2 = function() {
17766
+ };
17767
+ var undefinedType = "undefined";
17768
+ var isIE = typeof window !== undefinedType && typeof window.navigator !== undefinedType && /Trident\/|MSIE /.test(window.navigator.userAgent);
17769
+ var logMethods = [
17770
+ "trace",
17771
+ "debug",
17772
+ "info",
17773
+ "warn",
17774
+ "error"
17775
+ ];
17776
+ var _loggersByName = {};
17777
+ var defaultLogger = null;
17778
+ function bindMethod(obj, methodName) {
17779
+ var method = obj[methodName];
17780
+ if (typeof method.bind === "function") {
17781
+ return method.bind(obj);
17782
+ } else {
17783
+ try {
17784
+ return Function.prototype.bind.call(method, obj);
17785
+ } catch (e2) {
17786
+ return function() {
17787
+ return Function.prototype.apply.apply(method, [obj, arguments]);
17788
+ };
17789
+ }
17790
+ }
17791
+ }
17792
+ function traceForIE() {
17793
+ if (console.log) {
17794
+ if (console.log.apply) {
17795
+ console.log.apply(console, arguments);
17796
+ } else {
17797
+ Function.prototype.apply.apply(console.log, [console, arguments]);
17798
+ }
17799
+ }
17800
+ if (console.trace)
17801
+ console.trace();
17802
+ }
17803
+ function realMethod(methodName) {
17804
+ if (methodName === "debug") {
17805
+ methodName = "log";
17806
+ }
17807
+ if (typeof console === undefinedType) {
17808
+ return false;
17809
+ } else if (methodName === "trace" && isIE) {
17810
+ return traceForIE;
17811
+ } else if (console[methodName] !== void 0) {
17812
+ return bindMethod(console, methodName);
17813
+ } else if (console.log !== void 0) {
17814
+ return bindMethod(console, "log");
17815
+ } else {
17816
+ return noop2;
17817
+ }
17818
+ }
17819
+ function replaceLoggingMethods() {
17820
+ var level = this.getLevel();
17821
+ for (var i2 = 0; i2 < logMethods.length; i2++) {
17822
+ var methodName = logMethods[i2];
17823
+ this[methodName] = i2 < level ? noop2 : this.methodFactory(methodName, level, this.name);
17824
+ }
17825
+ this.log = this.debug;
17826
+ if (typeof console === undefinedType && level < this.levels.SILENT) {
17827
+ return "No console available for logging";
17828
+ }
17829
+ }
17830
+ function enableLoggingWhenConsoleArrives(methodName) {
17831
+ return function() {
17832
+ if (typeof console !== undefinedType) {
17833
+ replaceLoggingMethods.call(this);
17834
+ this[methodName].apply(this, arguments);
17835
+ }
17836
+ };
17837
+ }
17838
+ function defaultMethodFactory(methodName, _level, _loggerName) {
17839
+ return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
17840
+ }
17841
+ function Logger(name2, factory) {
17842
+ var self2 = this;
17843
+ var inheritedLevel;
17844
+ var defaultLevel;
17845
+ var userLevel;
17846
+ var storageKey = "loglevel";
17847
+ if (typeof name2 === "string") {
17848
+ storageKey += ":" + name2;
17849
+ } else if (typeof name2 === "symbol") {
17850
+ storageKey = void 0;
17851
+ }
17852
+ function persistLevelIfPossible(levelNum) {
17853
+ var levelName = (logMethods[levelNum] || "silent").toUpperCase();
17854
+ if (typeof window === undefinedType || !storageKey)
17855
+ return;
17856
+ try {
17857
+ window.localStorage[storageKey] = levelName;
17858
+ return;
17859
+ } catch (ignore) {
17860
+ }
17861
+ try {
17862
+ window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
17863
+ } catch (ignore) {
17864
+ }
17865
+ }
17866
+ function getPersistedLevel() {
17867
+ var storedLevel;
17868
+ if (typeof window === undefinedType || !storageKey)
17869
+ return;
17870
+ try {
17871
+ storedLevel = window.localStorage[storageKey];
17872
+ } catch (ignore) {
17873
+ }
17874
+ if (typeof storedLevel === undefinedType) {
17875
+ try {
17876
+ var cookie = window.document.cookie;
17877
+ var cookieName = encodeURIComponent(storageKey);
17878
+ var location = cookie.indexOf(cookieName + "=");
17879
+ if (location !== -1) {
17880
+ storedLevel = /^([^;]+)/.exec(
17881
+ cookie.slice(location + cookieName.length + 1)
17882
+ )[1];
17883
+ }
17884
+ } catch (ignore) {
17885
+ }
17886
+ }
17887
+ if (self2.levels[storedLevel] === void 0) {
17888
+ storedLevel = void 0;
17889
+ }
17890
+ return storedLevel;
17891
+ }
17892
+ function clearPersistedLevel() {
17893
+ if (typeof window === undefinedType || !storageKey)
17894
+ return;
17895
+ try {
17896
+ window.localStorage.removeItem(storageKey);
17897
+ } catch (ignore) {
17898
+ }
17899
+ try {
17900
+ window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
17901
+ } catch (ignore) {
17902
+ }
17903
+ }
17904
+ function normalizeLevel(input) {
17905
+ var level = input;
17906
+ if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
17907
+ level = self2.levels[level.toUpperCase()];
17908
+ }
17909
+ if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
17910
+ return level;
17911
+ } else {
17912
+ throw new TypeError("log.setLevel() called with invalid level: " + input);
17913
+ }
17914
+ }
17915
+ self2.name = name2;
17916
+ self2.levels = {
17917
+ "TRACE": 0,
17918
+ "DEBUG": 1,
17919
+ "INFO": 2,
17920
+ "WARN": 3,
17921
+ "ERROR": 4,
17922
+ "SILENT": 5
17923
+ };
17924
+ self2.methodFactory = factory || defaultMethodFactory;
17925
+ self2.getLevel = function() {
17926
+ if (userLevel != null) {
17927
+ return userLevel;
17928
+ } else if (defaultLevel != null) {
17929
+ return defaultLevel;
17930
+ } else {
17931
+ return inheritedLevel;
17932
+ }
17933
+ };
17934
+ self2.setLevel = function(level, persist) {
17935
+ userLevel = normalizeLevel(level);
17936
+ if (persist !== false) {
17937
+ persistLevelIfPossible(userLevel);
17938
+ }
17939
+ return replaceLoggingMethods.call(self2);
17940
+ };
17941
+ self2.setDefaultLevel = function(level) {
17942
+ defaultLevel = normalizeLevel(level);
17943
+ if (!getPersistedLevel()) {
17944
+ self2.setLevel(level, false);
17945
+ }
17946
+ };
17947
+ self2.resetLevel = function() {
17948
+ userLevel = null;
17949
+ clearPersistedLevel();
17950
+ replaceLoggingMethods.call(self2);
17951
+ };
17952
+ self2.enableAll = function(persist) {
17953
+ self2.setLevel(self2.levels.TRACE, persist);
17954
+ };
17955
+ self2.disableAll = function(persist) {
17956
+ self2.setLevel(self2.levels.SILENT, persist);
17957
+ };
17958
+ self2.rebuild = function() {
17959
+ if (defaultLogger !== self2) {
17960
+ inheritedLevel = normalizeLevel(defaultLogger.getLevel());
17961
+ }
17962
+ replaceLoggingMethods.call(self2);
17963
+ if (defaultLogger === self2) {
17964
+ for (var childName in _loggersByName) {
17965
+ _loggersByName[childName].rebuild();
17966
+ }
17967
+ }
17968
+ };
17969
+ inheritedLevel = normalizeLevel(
17970
+ defaultLogger ? defaultLogger.getLevel() : "WARN"
17971
+ );
17972
+ var initialLevel = getPersistedLevel();
17973
+ if (initialLevel != null) {
17974
+ userLevel = normalizeLevel(initialLevel);
17975
+ }
17976
+ replaceLoggingMethods.call(self2);
17977
+ }
17978
+ defaultLogger = new Logger();
17979
+ defaultLogger.getLogger = function getLogger(name2) {
17980
+ if (typeof name2 !== "symbol" && typeof name2 !== "string" || name2 === "") {
17981
+ throw new TypeError("You must supply a name when creating a logger.");
17982
+ }
17983
+ var logger = _loggersByName[name2];
17984
+ if (!logger) {
17985
+ logger = _loggersByName[name2] = new Logger(
17986
+ name2,
17987
+ defaultLogger.methodFactory
17988
+ );
17989
+ }
17990
+ return logger;
17991
+ };
17992
+ var _log = typeof window !== undefinedType ? window.log : void 0;
17993
+ defaultLogger.noConflict = function() {
17994
+ if (typeof window !== undefinedType && window.log === defaultLogger) {
17995
+ window.log = _log;
17996
+ }
17997
+ return defaultLogger;
17998
+ };
17999
+ defaultLogger.getLoggers = function getLoggers2() {
18000
+ return _loggersByName;
18001
+ };
18002
+ defaultLogger["default"] = defaultLogger;
18003
+ return defaultLogger;
18004
+ });
18005
+ })(loglevel);
18006
+ var loglevelExports = loglevel.exports;
18007
+ const log$5 = /* @__PURE__ */ getDefaultExportFromCjs(loglevelExports);
17725
18008
  const VIEWER_PALETTE = [
17726
18009
  [0, 0, 255],
17727
18010
  [0, 255, 0],
@@ -121550,16 +121833,16 @@ function addDecoder(cases, importFn) {
121550
121833
  }
121551
121834
  cases.forEach((c) => registry$1.set(c, importFn));
121552
121835
  }
121553
- addDecoder([void 0, 1], () => import("./raw-2af7db47.js").then((m) => m.default));
121554
- addDecoder(5, () => import("./lzw-42db9931.js").then((m) => m.default));
121836
+ addDecoder([void 0, 1], () => import("./raw-782360b8.js").then((m) => m.default));
121837
+ addDecoder(5, () => import("./lzw-0ce97204.js").then((m) => m.default));
121555
121838
  addDecoder(6, () => {
121556
121839
  throw new Error("old style JPEG compression is not supported.");
121557
121840
  });
121558
- addDecoder(7, () => import("./jpeg-04438802.js").then((m) => m.default));
121559
- addDecoder([8, 32946], () => import("./deflate-fe4d93d9.js").then((m) => m.default));
121560
- addDecoder(32773, () => import("./packbits-8247f54b.js").then((m) => m.default));
121561
- addDecoder(34887, () => import("./lerc-75c58a66.js").then((m) => m.default));
121562
- addDecoder(50001, () => import("./webimage-dfdc750b.js").then((m) => m.default));
121841
+ addDecoder(7, () => import("./jpeg-f152b137.js").then((m) => m.default));
121842
+ addDecoder([8, 32946], () => import("./deflate-adf928b0.js").then((m) => m.default));
121843
+ addDecoder(32773, () => import("./packbits-bdf660ad.js").then((m) => m.default));
121844
+ addDecoder(34887, () => import("./lerc-f3213e01.js").then((m) => m.default));
121845
+ addDecoder(50001, () => import("./webimage-5c05a3b3.js").then((m) => m.default));
121563
121846
  function decodeRowAcc(row, stride) {
121564
121847
  let length2 = row.length - stride;
121565
121848
  let offset4 = 0;
@@ -135389,10 +135672,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
135389
135672
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
135390
135673
  const colorTexHeight = Math.max(2, Math.ceil(totalColorsLength / texSize));
135391
135674
  if (valueTexHeight > texSize) {
135392
- console.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
135675
+ log$5.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
135393
135676
  }
135394
135677
  if (colorTexHeight > texSize) {
135395
- console.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
135678
+ log$5.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
135396
135679
  }
135397
135680
  const totalData = new Uint8Array(texSize * valueTexHeight);
135398
135681
  const totalColors = new Uint8Array(texSize * colorTexHeight);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, L, V, d, c, e, f, b, h, u } from "./index-2323f9be.js";
1
+ import { a, L, V, d, c, e, f, b, h, u } from "./index-47073962.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-2323f9be.js";
1
+ import { B as BaseDecoder } from "./index-47073962.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -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-2323f9be.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-47073962.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-2323f9be.js";
1
+ import { B as BaseDecoder } from "./index-47073962.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-2323f9be.js";
1
+ import { B as BaseDecoder } from "./index-47073962.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-2323f9be.js";
1
+ import { B as BaseDecoder } from "./index-47073962.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-2323f9be.js";
1
+ import { B as BaseDecoder } from "./index-47073962.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/layer-controller",
3
- "version": "3.5.6",
3
+ "version": "3.5.7",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -21,11 +21,11 @@
21
21
  "lodash-es": "^4.17.21",
22
22
  "math.gl": "^3.5.6",
23
23
  "react-aria": "^3.28.0",
24
- "@vitessce/constants-internal": "3.5.6",
25
- "@vitessce/gl": "3.5.6",
26
- "@vitessce/spatial-utils": "3.5.6",
27
- "@vitessce/utils": "3.5.6",
28
- "@vitessce/vit-s": "3.5.6"
24
+ "@vitessce/constants-internal": "3.5.7",
25
+ "@vitessce/gl": "3.5.7",
26
+ "@vitessce/spatial-utils": "3.5.7",
27
+ "@vitessce/utils": "3.5.7",
28
+ "@vitessce/vit-s": "3.5.7"
29
29
  },
30
30
  "devDependencies": {
31
31
  "react": "^18.0.0",