@vitessce/json 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-37a3910f.js";
2
+ import { B as BaseDecoder } from "./index-efd42ba9.js";
3
3
  import "react";
4
4
  class DeflateDecoder extends BaseDecoder {
5
5
  decodeBlock(buffer) {
@@ -103,6 +103,291 @@ class AbstractLoaderError {
103
103
  throw new Error("The warnInConsole() method has not been implemented.");
104
104
  }
105
105
  }
106
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
107
+ function getDefaultExportFromCjs(x2) {
108
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
109
+ }
110
+ function getAugmentedNamespace(n3) {
111
+ if (n3.__esModule)
112
+ return n3;
113
+ var f2 = n3.default;
114
+ if (typeof f2 == "function") {
115
+ var a2 = function a3() {
116
+ if (this instanceof a3) {
117
+ var args = [null];
118
+ args.push.apply(args, arguments);
119
+ var Ctor = Function.bind.apply(f2, args);
120
+ return new Ctor();
121
+ }
122
+ return f2.apply(this, arguments);
123
+ };
124
+ a2.prototype = f2.prototype;
125
+ } else
126
+ a2 = {};
127
+ Object.defineProperty(a2, "__esModule", { value: true });
128
+ Object.keys(n3).forEach(function(k) {
129
+ var d = Object.getOwnPropertyDescriptor(n3, k);
130
+ Object.defineProperty(a2, k, d.get ? d : {
131
+ enumerable: true,
132
+ get: function() {
133
+ return n3[k];
134
+ }
135
+ });
136
+ });
137
+ return a2;
138
+ }
139
+ var loglevel = { exports: {} };
140
+ (function(module2) {
141
+ (function(root2, definition) {
142
+ if (module2.exports) {
143
+ module2.exports = definition();
144
+ } else {
145
+ root2.log = definition();
146
+ }
147
+ })(commonjsGlobal, function() {
148
+ var noop2 = function() {
149
+ };
150
+ var undefinedType2 = "undefined";
151
+ var isIE = typeof window !== undefinedType2 && typeof window.navigator !== undefinedType2 && /Trident\/|MSIE /.test(window.navigator.userAgent);
152
+ var logMethods = [
153
+ "trace",
154
+ "debug",
155
+ "info",
156
+ "warn",
157
+ "error"
158
+ ];
159
+ var _loggersByName = {};
160
+ var defaultLogger = null;
161
+ function bindMethod(obj, methodName) {
162
+ var method = obj[methodName];
163
+ if (typeof method.bind === "function") {
164
+ return method.bind(obj);
165
+ } else {
166
+ try {
167
+ return Function.prototype.bind.call(method, obj);
168
+ } catch (e2) {
169
+ return function() {
170
+ return Function.prototype.apply.apply(method, [obj, arguments]);
171
+ };
172
+ }
173
+ }
174
+ }
175
+ function traceForIE() {
176
+ if (console.log) {
177
+ if (console.log.apply) {
178
+ console.log.apply(console, arguments);
179
+ } else {
180
+ Function.prototype.apply.apply(console.log, [console, arguments]);
181
+ }
182
+ }
183
+ if (console.trace)
184
+ console.trace();
185
+ }
186
+ function realMethod(methodName) {
187
+ if (methodName === "debug") {
188
+ methodName = "log";
189
+ }
190
+ if (typeof console === undefinedType2) {
191
+ return false;
192
+ } else if (methodName === "trace" && isIE) {
193
+ return traceForIE;
194
+ } else if (console[methodName] !== void 0) {
195
+ return bindMethod(console, methodName);
196
+ } else if (console.log !== void 0) {
197
+ return bindMethod(console, "log");
198
+ } else {
199
+ return noop2;
200
+ }
201
+ }
202
+ function replaceLoggingMethods() {
203
+ var level = this.getLevel();
204
+ for (var i2 = 0; i2 < logMethods.length; i2++) {
205
+ var methodName = logMethods[i2];
206
+ this[methodName] = i2 < level ? noop2 : this.methodFactory(methodName, level, this.name);
207
+ }
208
+ this.log = this.debug;
209
+ if (typeof console === undefinedType2 && level < this.levels.SILENT) {
210
+ return "No console available for logging";
211
+ }
212
+ }
213
+ function enableLoggingWhenConsoleArrives(methodName) {
214
+ return function() {
215
+ if (typeof console !== undefinedType2) {
216
+ replaceLoggingMethods.call(this);
217
+ this[methodName].apply(this, arguments);
218
+ }
219
+ };
220
+ }
221
+ function defaultMethodFactory(methodName, _level, _loggerName) {
222
+ return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
223
+ }
224
+ function Logger(name2, factory2) {
225
+ var self2 = this;
226
+ var inheritedLevel;
227
+ var defaultLevel;
228
+ var userLevel;
229
+ var storageKey = "loglevel";
230
+ if (typeof name2 === "string") {
231
+ storageKey += ":" + name2;
232
+ } else if (typeof name2 === "symbol") {
233
+ storageKey = void 0;
234
+ }
235
+ function persistLevelIfPossible(levelNum) {
236
+ var levelName = (logMethods[levelNum] || "silent").toUpperCase();
237
+ if (typeof window === undefinedType2 || !storageKey)
238
+ return;
239
+ try {
240
+ window.localStorage[storageKey] = levelName;
241
+ return;
242
+ } catch (ignore) {
243
+ }
244
+ try {
245
+ window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
246
+ } catch (ignore) {
247
+ }
248
+ }
249
+ function getPersistedLevel() {
250
+ var storedLevel;
251
+ if (typeof window === undefinedType2 || !storageKey)
252
+ return;
253
+ try {
254
+ storedLevel = window.localStorage[storageKey];
255
+ } catch (ignore) {
256
+ }
257
+ if (typeof storedLevel === undefinedType2) {
258
+ try {
259
+ var cookie = window.document.cookie;
260
+ var cookieName = encodeURIComponent(storageKey);
261
+ var location = cookie.indexOf(cookieName + "=");
262
+ if (location !== -1) {
263
+ storedLevel = /^([^;]+)/.exec(
264
+ cookie.slice(location + cookieName.length + 1)
265
+ )[1];
266
+ }
267
+ } catch (ignore) {
268
+ }
269
+ }
270
+ if (self2.levels[storedLevel] === void 0) {
271
+ storedLevel = void 0;
272
+ }
273
+ return storedLevel;
274
+ }
275
+ function clearPersistedLevel() {
276
+ if (typeof window === undefinedType2 || !storageKey)
277
+ return;
278
+ try {
279
+ window.localStorage.removeItem(storageKey);
280
+ } catch (ignore) {
281
+ }
282
+ try {
283
+ window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
284
+ } catch (ignore) {
285
+ }
286
+ }
287
+ function normalizeLevel(input) {
288
+ var level = input;
289
+ if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
290
+ level = self2.levels[level.toUpperCase()];
291
+ }
292
+ if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
293
+ return level;
294
+ } else {
295
+ throw new TypeError("log.setLevel() called with invalid level: " + input);
296
+ }
297
+ }
298
+ self2.name = name2;
299
+ self2.levels = {
300
+ "TRACE": 0,
301
+ "DEBUG": 1,
302
+ "INFO": 2,
303
+ "WARN": 3,
304
+ "ERROR": 4,
305
+ "SILENT": 5
306
+ };
307
+ self2.methodFactory = factory2 || defaultMethodFactory;
308
+ self2.getLevel = function() {
309
+ if (userLevel != null) {
310
+ return userLevel;
311
+ } else if (defaultLevel != null) {
312
+ return defaultLevel;
313
+ } else {
314
+ return inheritedLevel;
315
+ }
316
+ };
317
+ self2.setLevel = function(level, persist) {
318
+ userLevel = normalizeLevel(level);
319
+ if (persist !== false) {
320
+ persistLevelIfPossible(userLevel);
321
+ }
322
+ return replaceLoggingMethods.call(self2);
323
+ };
324
+ self2.setDefaultLevel = function(level) {
325
+ defaultLevel = normalizeLevel(level);
326
+ if (!getPersistedLevel()) {
327
+ self2.setLevel(level, false);
328
+ }
329
+ };
330
+ self2.resetLevel = function() {
331
+ userLevel = null;
332
+ clearPersistedLevel();
333
+ replaceLoggingMethods.call(self2);
334
+ };
335
+ self2.enableAll = function(persist) {
336
+ self2.setLevel(self2.levels.TRACE, persist);
337
+ };
338
+ self2.disableAll = function(persist) {
339
+ self2.setLevel(self2.levels.SILENT, persist);
340
+ };
341
+ self2.rebuild = function() {
342
+ if (defaultLogger !== self2) {
343
+ inheritedLevel = normalizeLevel(defaultLogger.getLevel());
344
+ }
345
+ replaceLoggingMethods.call(self2);
346
+ if (defaultLogger === self2) {
347
+ for (var childName in _loggersByName) {
348
+ _loggersByName[childName].rebuild();
349
+ }
350
+ }
351
+ };
352
+ inheritedLevel = normalizeLevel(
353
+ defaultLogger ? defaultLogger.getLevel() : "WARN"
354
+ );
355
+ var initialLevel = getPersistedLevel();
356
+ if (initialLevel != null) {
357
+ userLevel = normalizeLevel(initialLevel);
358
+ }
359
+ replaceLoggingMethods.call(self2);
360
+ }
361
+ defaultLogger = new Logger();
362
+ defaultLogger.getLogger = function getLogger(name2) {
363
+ if (typeof name2 !== "symbol" && typeof name2 !== "string" || name2 === "") {
364
+ throw new TypeError("You must supply a name when creating a logger.");
365
+ }
366
+ var logger = _loggersByName[name2];
367
+ if (!logger) {
368
+ logger = _loggersByName[name2] = new Logger(
369
+ name2,
370
+ defaultLogger.methodFactory
371
+ );
372
+ }
373
+ return logger;
374
+ };
375
+ var _log = typeof window !== undefinedType2 ? window.log : void 0;
376
+ defaultLogger.noConflict = function() {
377
+ if (typeof window !== undefinedType2 && window.log === defaultLogger) {
378
+ window.log = _log;
379
+ }
380
+ return defaultLogger;
381
+ };
382
+ defaultLogger.getLoggers = function getLoggers2() {
383
+ return _loggersByName;
384
+ };
385
+ defaultLogger["default"] = defaultLogger;
386
+ return defaultLogger;
387
+ });
388
+ })(loglevel);
389
+ var loglevelExports = loglevel.exports;
390
+ const log$6 = /* @__PURE__ */ getDefaultExportFromCjs(loglevelExports);
106
391
  class LoaderValidationError extends AbstractLoaderError {
107
392
  constructor(datasetType, datasetFileType, datasetUrl, reason) {
108
393
  super(`Error while validating ${datasetType}.`);
@@ -111,10 +396,11 @@ class LoaderValidationError extends AbstractLoaderError {
111
396
  this.datasetFileType = datasetFileType;
112
397
  this.datasetUrl = datasetUrl;
113
398
  this.reason = reason;
399
+ this.message = `${datasetType} from ${datasetUrl}: validation failed`;
114
400
  }
115
401
  warnInConsole() {
116
- const { datasetType, datasetUrl, reason } = this;
117
- console.warn(`${datasetType} from ${datasetUrl}: validation failed`, JSON.stringify(reason, null, 2));
402
+ const { reason, message } = this;
403
+ log$6.warn(message, JSON.stringify(reason, null, 2));
118
404
  }
119
405
  }
120
406
  class DataSourceFetchError extends AbstractLoaderError {
@@ -123,10 +409,11 @@ class DataSourceFetchError extends AbstractLoaderError {
123
409
  this.source = source;
124
410
  this.url = url;
125
411
  this.headers = headers;
412
+ this.message = `${source} failed to fetch from ${url} with headers ${JSON.stringify(headers)}`;
126
413
  }
127
414
  warnInConsole() {
128
- const { source, url, headers } = this;
129
- console.warn(`${source} failed to fetch from ${url} with headers ${JSON.stringify(headers)}`);
415
+ const { message } = this;
416
+ log$6.warn(message);
130
417
  }
131
418
  }
132
419
  class JsonSource {
@@ -166,7 +453,8 @@ const ViewType$1 = {
166
453
  FEATURE_BAR_PLOT: "featureBarPlot",
167
454
  BIOMARKER_SELECT: "biomarkerSelect",
168
455
  LINK_CONTROLLER: "linkController",
169
- DUAL_SCATTERPLOT: "dualScatterplot"
456
+ DUAL_SCATTERPLOT: "dualScatterplot",
457
+ TREEMAP: "treemap"
170
458
  };
171
459
  const DataType$2 = {
172
460
  OBS_LABELS: "obsLabels",
@@ -220,6 +508,7 @@ const FileType$1 = {
220
508
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
221
509
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
222
510
  SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
511
+ SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
223
512
  // AnnData - zipped
224
513
  OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
225
514
  OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
@@ -232,6 +521,7 @@ const FileType$1 = {
232
521
  OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
233
522
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
234
523
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
524
+ SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
235
525
  // AnnData - h5ad via reference spec
236
526
  OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
237
527
  OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
@@ -244,6 +534,7 @@ const FileType$1 = {
244
534
  OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
245
535
  FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
246
536
  SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
537
+ SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
247
538
  // SpatialData
248
539
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
249
540
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -435,12 +726,15 @@ const CoordinationType$1 = {
435
726
  SAMPLE_SET_FILTER: "sampleSetFilter",
436
727
  SAMPLE_FILTER_MODE: "sampleFilterMode",
437
728
  SAMPLE_SET_COLOR: "sampleSetColor",
729
+ SAMPLE_HIGHLIGHT: "sampleHighlight",
438
730
  EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
439
731
  EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
440
732
  EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
441
733
  EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
442
734
  CONTOUR_COLOR_ENCODING: "contourColorEncoding",
443
- CONTOUR_COLOR: "contourColor"
735
+ CONTOUR_COLOR: "contourColor",
736
+ // Treemap
737
+ HIERARCHY_LEVELS: "hierarchyLevels"
444
738
  };
445
739
  const GLOBAL_LABELS = ["z", "t"];
446
740
  const DEFAULT_RASTER_DOMAIN_TYPE = "Min/Max";
@@ -5615,39 +5909,6 @@ const range$8 = range$7;
5615
5909
  function sum$3(array) {
5616
5910
  return array && array.length ? baseSum(array, identity$6) : 0;
5617
5911
  }
5618
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
5619
- function getDefaultExportFromCjs(x2) {
5620
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
5621
- }
5622
- function getAugmentedNamespace(n3) {
5623
- if (n3.__esModule)
5624
- return n3;
5625
- var f2 = n3.default;
5626
- if (typeof f2 == "function") {
5627
- var a2 = function a3() {
5628
- if (this instanceof a3) {
5629
- var args = [null];
5630
- args.push.apply(args, arguments);
5631
- var Ctor = Function.bind.apply(f2, args);
5632
- return new Ctor();
5633
- }
5634
- return f2.apply(this, arguments);
5635
- };
5636
- a2.prototype = f2.prototype;
5637
- } else
5638
- a2 = {};
5639
- Object.defineProperty(a2, "__esModule", { value: true });
5640
- Object.keys(n3).forEach(function(k) {
5641
- var d = Object.getOwnPropertyDescriptor(n3, k);
5642
- Object.defineProperty(a2, k, d.get ? d : {
5643
- enumerable: true,
5644
- get: function() {
5645
- return n3[k];
5646
- }
5647
- });
5648
- });
5649
- return a2;
5650
- }
5651
5912
  function commonjsRequire(path) {
5652
5913
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
5653
5914
  }
@@ -6475,7 +6736,7 @@ function upgradeFrom1_0_14(config3) {
6475
6736
  Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
6476
6737
  var _a3;
6477
6738
  if ((_a3 = viewDef.props) == null ? void 0 : _a3[oldProp]) {
6478
- console.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
6739
+ log$6.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
6479
6740
  }
6480
6741
  });
6481
6742
  });
@@ -6498,7 +6759,7 @@ function upgradeFrom1_0_15(config3) {
6498
6759
  Object.entries(coordinationScopes).forEach(([coordinationType, coordinationScope]) => {
6499
6760
  if (!Array.isArray(coordinationScope) && typeof coordinationScope === "object") {
6500
6761
  if (coordinationType === "dataset") {
6501
- console.error("Expected coordinationScopes.dataset value to be either string or string[], but got object.");
6762
+ log$6.error("Expected coordinationScopes.dataset value to be either string or string[], but got object.");
6502
6763
  }
6503
6764
  coordinationScopesBy.dataset[coordinationType] = coordinationScope;
6504
6765
  } else if (Array.isArray(coordinationScope) || typeof coordinationScope === "string") {
@@ -8857,7 +9118,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
8857
9118
  const oldKeys = Object.keys(oldObj);
8858
9119
  const propKey = String(prop);
8859
9120
  if (oldKeys.includes(propKey)) {
8860
- console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
9121
+ log$6.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
8861
9122
  ${oldObj[propKey][1]}`);
8862
9123
  return oldObj[propKey];
8863
9124
  }
@@ -8955,6 +9216,9 @@ const annDataObsSetsArr = z.array(z.object({
8955
9216
  z.object({
8956
9217
  obsSets: annDataObsSetsArr
8957
9218
  });
9219
+ z.object({
9220
+ sampleSets: annDataObsSetsArr
9221
+ });
8958
9222
  const annDataObsFeatureColumnsArr = z.array(z.object({
8959
9223
  path: z.string()
8960
9224
  }));
@@ -135411,16 +135675,16 @@ async function getDecoder(fileDirectory) {
135411
135675
  const Decoder = await importFn();
135412
135676
  return new Decoder(fileDirectory);
135413
135677
  }
135414
- addDecoder([void 0, 1], () => import("./raw-6f9260ad.js").then((m) => m.default));
135415
- addDecoder(5, () => import("./lzw-8a1c6e8b.js").then((m) => m.default));
135678
+ addDecoder([void 0, 1], () => import("./raw-216dbf06.js").then((m) => m.default));
135679
+ addDecoder(5, () => import("./lzw-df413c46.js").then((m) => m.default));
135416
135680
  addDecoder(6, () => {
135417
135681
  throw new Error("old style JPEG compression is not supported.");
135418
135682
  });
135419
- addDecoder(7, () => import("./jpeg-de6da3bd.js").then((m) => m.default));
135420
- addDecoder([8, 32946], () => import("./deflate-d056929f.js").then((m) => m.default));
135421
- addDecoder(32773, () => import("./packbits-f154ca3a.js").then((m) => m.default));
135422
- addDecoder(34887, () => import("./lerc-1a406d6c.js").then((m) => m.default));
135423
- addDecoder(50001, () => import("./webimage-8a3be067.js").then((m) => m.default));
135683
+ addDecoder(7, () => import("./jpeg-3d7c28a2.js").then((m) => m.default));
135684
+ addDecoder([8, 32946], () => import("./deflate-e49cbccb.js").then((m) => m.default));
135685
+ addDecoder(32773, () => import("./packbits-b9360a21.js").then((m) => m.default));
135686
+ addDecoder(34887, () => import("./lerc-1440114b.js").then((m) => m.default));
135687
+ addDecoder(50001, () => import("./webimage-a9f9d4aa.js").then((m) => m.default));
135424
135688
  function copyNewSize(array, width, height, samplesPerPixel = 1) {
135425
135689
  return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
135426
135690
  }
@@ -148766,10 +149030,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
148766
149030
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
148767
149031
  const colorTexHeight = Math.max(2, Math.ceil(totalColorsLength / texSize));
148768
149032
  if (valueTexHeight > texSize) {
148769
- console.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
149033
+ log$6.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
148770
149034
  }
148771
149035
  if (colorTexHeight > texSize) {
148772
- console.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
149036
+ log$6.error("Error: length of concatenated quantitative feature values larger than maximum texture size");
148773
149037
  }
148774
149038
  const totalData = new Uint8Array(texSize * valueTexHeight);
148775
149039
  const totalColors = new Uint8Array(texSize * colorTexHeight);
@@ -152298,7 +152562,7 @@ async function initLoader(imageData) {
152298
152562
  const { metadata: loaderMetadata } = loader;
152299
152563
  const { omero, multiscales } = loaderMetadata;
152300
152564
  if (!Array.isArray(multiscales) || multiscales.length === 0) {
152301
- console.error("Multiscales array must exist and have at least one element");
152565
+ log$6.error("Multiscales array must exist and have at least one element");
152302
152566
  }
152303
152567
  const { coordinateTransformations } = multiscales[0];
152304
152568
  const axes = getNgffAxes(multiscales[0].axes);
@@ -152390,7 +152654,7 @@ class RasterJsonAsImageLoader extends RasterLoader {
152390
152654
  }
152391
152655
  });
152392
152656
  if (!(coordinationValues == null ? void 0 : coordinationValues.spatialImageLayer)) {
152393
- console.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded.");
152657
+ log$6.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded.");
152394
152658
  }
152395
152659
  return new LoaderResult(
152396
152660
  {
@@ -152426,7 +152690,7 @@ class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
152426
152690
  }
152427
152691
  });
152428
152692
  if (!(coordinationValues == null ? void 0 : coordinationValues.spatialImageLayer)) {
152429
- console.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded.");
152693
+ log$6.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded.");
152430
152694
  }
152431
152695
  return new LoaderResult(
152432
152696
  loaders.length > 0 && meta2.length > 0 ? {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-37a3910f.js";
1
+ import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-efd42ba9.js";
2
2
  import "react";
3
3
  export {
4
4
  C as CellsJsonAsObsEmbeddingLoader,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-37a3910f.js";
1
+ import { B as BaseDecoder } from "./index-efd42ba9.js";
2
2
  import "react";
3
3
  const dctZigZag = new Int32Array([
4
4
  0,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-37a3910f.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-efd42ba9.js";
3
3
  import "react";
4
4
  var LercDecode = { exports: {} };
5
5
  (function(module) {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-37a3910f.js";
1
+ import { B as BaseDecoder } from "./index-efd42ba9.js";
2
2
  import "react";
3
3
  const MIN_BITS = 9;
4
4
  const CLEAR_CODE = 256;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-37a3910f.js";
1
+ import { B as BaseDecoder } from "./index-efd42ba9.js";
2
2
  import "react";
3
3
  class PackbitsDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-37a3910f.js";
1
+ import { B as BaseDecoder } from "./index-efd42ba9.js";
2
2
  import "react";
3
3
  class RawDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-37a3910f.js";
1
+ import { B as BaseDecoder } from "./index-efd42ba9.js";
2
2
  import "react";
3
3
  class WebImageDecoder extends BaseDecoder {
4
4
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"RasterJsonAsImageLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonAsImageLoader.js"],"names":[],"mappings":"AAGA;IACE;;;;;QAuCC;CACF;yBA3CwB,uBAAuB;6BADE,oBAAoB"}
1
+ {"version":3,"file":"RasterJsonAsImageLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonAsImageLoader.js"],"names":[],"mappings":"AAKA;IACE;;;;;QAuCC;CACF;yBA3CwB,uBAAuB;6BAHE,oBAAoB"}
@@ -1,4 +1,5 @@
1
1
  import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
+ import { log } from '@vitessce/globals';
2
3
  import RasterLoader from './RasterJsonLoader.js';
3
4
  export default class RasterJsonAsImageLoader extends RasterLoader {
4
5
  async load() {
@@ -18,7 +19,7 @@ export default class RasterJsonAsImageLoader extends RasterLoader {
18
19
  }
19
20
  });
20
21
  if (!coordinationValues?.spatialImageLayer) {
21
- console.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded.');
22
+ log.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded.');
22
23
  }
23
24
  return new LoaderResult({
24
25
  image: (loaders.length > 0 && meta.length > 0 ? { loaders, meta } : null),
@@ -1 +1 @@
1
- {"version":3,"file":"RasterJsonAsObsSegmentationsLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonAsObsSegmentationsLoader.js"],"names":[],"mappings":"AAGA;IACE;;;;;;eAwCC;CACF;yBA5CwB,uBAAuB;6BADE,oBAAoB"}
1
+ {"version":3,"file":"RasterJsonAsObsSegmentationsLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonAsObsSegmentationsLoader.js"],"names":[],"mappings":"AAIA;IACE;;;;;;eAwCC;CACF;yBA5CwB,uBAAuB;6BAFE,oBAAoB"}
@@ -1,4 +1,5 @@
1
1
  import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
+ import { log } from '@vitessce/globals';
2
3
  import RasterLoader from './RasterJsonLoader.js';
3
4
  export default class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
4
5
  async load() {
@@ -18,7 +19,7 @@ export default class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
18
19
  }
19
20
  });
20
21
  if (!coordinationValues?.spatialImageLayer) {
21
- console.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded.');
22
+ log.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded.');
22
23
  }
23
24
  return new LoaderResult((loaders.length > 0 && meta.length > 0 ? ({
24
25
  obsSegmentationsType: 'bitmask',
@@ -1 +1 @@
1
- {"version":3,"file":"RasterJsonLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonLoader.js"],"names":[],"mappings":"AA8HA;IAWE,qBAyCC;IAnBG,oBAIC;CAgBN;uBAtKsB,+BAA+B"}
1
+ {"version":3,"file":"RasterJsonLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonLoader.js"],"names":[],"mappings":"AA+HA;IAWE,qBAyCC;IAnBG,oBAIC;CAgBN;uBAtKsB,+BAA+B"}
@@ -1,4 +1,5 @@
1
1
  import { viv } from '@vitessce/gl';
2
+ import { log } from '@vitessce/globals';
2
3
  import { initializeRasterLayersAndChannels, coordinateTransformationsToMatrix, getNgffAxes, loadOmeZarr, guessTileSize, ZarritaPixelSource, } from '@vitessce/spatial-utils';
3
4
  import { open as zarrOpen } from 'zarrita';
4
5
  import { zarrOpenRoot, createZarrArrayAdapter } from '@vitessce/zarr-utils';
@@ -68,7 +69,7 @@ async function initLoader(imageData) {
68
69
  const { metadata: loaderMetadata } = loader;
69
70
  const { omero, multiscales } = loaderMetadata;
70
71
  if (!Array.isArray(multiscales) || multiscales.length === 0) {
71
- console.error('Multiscales array must exist and have at least one element');
72
+ log.error('Multiscales array must exist and have at least one element');
72
73
  }
73
74
  const { coordinateTransformations } = multiscales[0];
74
75
  // Axes in v0.4 format.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/json",
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": {
@@ -20,15 +20,16 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "zarrita": "0.4.0-next.16",
22
22
  "zod": "^3.21.4",
23
- "@vitessce/constants-internal": "3.5.6",
24
- "@vitessce/gl": "3.5.6",
25
- "@vitessce/schemas": "3.5.6",
26
- "@vitessce/sets-utils": "3.5.6",
27
- "@vitessce/spatial-utils": "3.5.6",
28
- "@vitessce/utils": "3.5.6",
29
- "@vitessce/abstract": "3.5.6",
30
- "@vitessce/zarr-utils": "3.5.6",
31
- "@vitessce/config": "3.5.6"
23
+ "@vitessce/constants-internal": "3.5.7",
24
+ "@vitessce/gl": "3.5.7",
25
+ "@vitessce/globals": "3.5.7",
26
+ "@vitessce/schemas": "3.5.7",
27
+ "@vitessce/sets-utils": "3.5.7",
28
+ "@vitessce/spatial-utils": "3.5.7",
29
+ "@vitessce/utils": "3.5.7",
30
+ "@vitessce/abstract": "3.5.7",
31
+ "@vitessce/zarr-utils": "3.5.7",
32
+ "@vitessce/config": "3.5.7"
32
33
  },
33
34
  "scripts": {
34
35
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
@@ -1,4 +1,6 @@
1
1
  import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
+ import { log } from '@vitessce/globals';
3
+
2
4
  import RasterLoader from './RasterJsonLoader.js';
3
5
 
4
6
  export default class RasterJsonAsImageLoader extends RasterLoader {
@@ -22,7 +24,7 @@ export default class RasterJsonAsImageLoader extends RasterLoader {
22
24
  });
23
25
 
24
26
  if (!coordinationValues?.spatialImageLayer) {
25
- console.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded.');
27
+ log.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded.');
26
28
  }
27
29
 
28
30
  return new LoaderResult(
@@ -1,4 +1,5 @@
1
1
  import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
+ import { log } from '@vitessce/globals';
2
3
  import RasterLoader from './RasterJsonLoader.js';
3
4
 
4
5
  export default class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
@@ -22,7 +23,7 @@ export default class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
22
23
  });
23
24
 
24
25
  if (!coordinationValues?.spatialImageLayer) {
25
- console.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded.');
26
+ log.warn('Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded.');
26
27
  }
27
28
 
28
29
  return new LoaderResult(
@@ -1,4 +1,5 @@
1
1
  import { viv } from '@vitessce/gl';
2
+ import { log } from '@vitessce/globals';
2
3
  import {
3
4
  initializeRasterLayersAndChannels,
4
5
  coordinateTransformationsToMatrix,
@@ -87,7 +88,7 @@ async function initLoader(imageData) {
87
88
  const { omero, multiscales } = loaderMetadata;
88
89
 
89
90
  if (!Array.isArray(multiscales) || multiscales.length === 0) {
90
- console.error('Multiscales array must exist and have at least one element');
91
+ log.error('Multiscales array must exist and have at least one element');
91
92
  }
92
93
  const { coordinateTransformations } = multiscales[0];
93
94