@vitessce/json 3.5.5 → 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-632fc942.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 {
@@ -165,7 +452,9 @@ const ViewType$1 = {
165
452
  DOT_PLOT: "dotPlot",
166
453
  FEATURE_BAR_PLOT: "featureBarPlot",
167
454
  BIOMARKER_SELECT: "biomarkerSelect",
168
- LINK_CONTROLLER: "linkController"
455
+ LINK_CONTROLLER: "linkController",
456
+ DUAL_SCATTERPLOT: "dualScatterplot",
457
+ TREEMAP: "treemap"
169
458
  };
170
459
  const DataType$2 = {
171
460
  OBS_LABELS: "obsLabels",
@@ -219,6 +508,7 @@ const FileType$1 = {
219
508
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
220
509
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
221
510
  SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
511
+ SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
222
512
  // AnnData - zipped
223
513
  OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
224
514
  OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
@@ -231,6 +521,7 @@ const FileType$1 = {
231
521
  OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
232
522
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
233
523
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
524
+ SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
234
525
  // AnnData - h5ad via reference spec
235
526
  OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
236
527
  OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
@@ -243,6 +534,7 @@ const FileType$1 = {
243
534
  OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
244
535
  FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
245
536
  SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
537
+ SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
246
538
  // SpatialData
247
539
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
248
540
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -344,15 +636,23 @@ const CoordinationType$1 = {
344
636
  HEATMAP_ZOOM_Y: "heatmapZoomY",
345
637
  HEATMAP_TARGET_X: "heatmapTargetX",
346
638
  HEATMAP_TARGET_Y: "heatmapTargetY",
347
- OBS_FILTER: "obsFilter",
348
639
  OBS_HIGHLIGHT: "obsHighlight",
640
+ OBS_SELECTION: "obsSelection",
349
641
  OBS_SET_SELECTION: "obsSetSelection",
642
+ OBS_SELECTION_MODE: "obsSelectionMode",
643
+ OBS_FILTER: "obsFilter",
644
+ OBS_SET_FILTER: "obsSetFilter",
645
+ OBS_FILTER_MODE: "obsFilterMode",
350
646
  OBS_SET_HIGHLIGHT: "obsSetHighlight",
351
647
  OBS_SET_EXPANSION: "obsSetExpansion",
352
648
  OBS_SET_COLOR: "obsSetColor",
353
- FEATURE_FILTER: "featureFilter",
354
649
  FEATURE_HIGHLIGHT: "featureHighlight",
355
650
  FEATURE_SELECTION: "featureSelection",
651
+ FEATURE_SET_SELECTION: "featureSetSelection",
652
+ FEATURE_SELECTION_MODE: "featureSelectionMode",
653
+ FEATURE_FILTER: "featureFilter",
654
+ FEATURE_SET_FILTER: "featureSetFilter",
655
+ FEATURE_FILTER_MODE: "featureFilterMode",
356
656
  FEATURE_VALUE_COLORMAP: "featureValueColormap",
357
657
  FEATURE_VALUE_TRANSFORM: "featureValueTransform",
358
658
  FEATURE_VALUE_COLORMAP_RANGE: "featureValueColormapRange",
@@ -419,14 +719,22 @@ const CoordinationType$1 = {
419
719
  SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
420
720
  // Multi-sample / comparative
421
721
  SAMPLE_TYPE: "sampleType",
722
+ SAMPLE_SELECTION: "sampleSelection",
422
723
  SAMPLE_SET_SELECTION: "sampleSetSelection",
724
+ SAMPLE_SELECTION_MODE: "sampleSelectionMode",
725
+ SAMPLE_FILTER: "sampleFilter",
726
+ SAMPLE_SET_FILTER: "sampleSetFilter",
727
+ SAMPLE_FILTER_MODE: "sampleFilterMode",
423
728
  SAMPLE_SET_COLOR: "sampleSetColor",
729
+ SAMPLE_HIGHLIGHT: "sampleHighlight",
424
730
  EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
425
731
  EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
426
732
  EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
427
733
  EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
428
734
  CONTOUR_COLOR_ENCODING: "contourColorEncoding",
429
- CONTOUR_COLOR: "contourColor"
735
+ CONTOUR_COLOR: "contourColor",
736
+ // Treemap
737
+ HIERARCHY_LEVELS: "hierarchyLevels"
430
738
  };
431
739
  const GLOBAL_LABELS = ["z", "t"];
432
740
  const DEFAULT_RASTER_DOMAIN_TYPE = "Min/Max";
@@ -5601,39 +5909,6 @@ const range$8 = range$7;
5601
5909
  function sum$3(array) {
5602
5910
  return array && array.length ? baseSum(array, identity$6) : 0;
5603
5911
  }
5604
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
5605
- function getDefaultExportFromCjs(x2) {
5606
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
5607
- }
5608
- function getAugmentedNamespace(n3) {
5609
- if (n3.__esModule)
5610
- return n3;
5611
- var f2 = n3.default;
5612
- if (typeof f2 == "function") {
5613
- var a2 = function a3() {
5614
- if (this instanceof a3) {
5615
- var args = [null];
5616
- args.push.apply(args, arguments);
5617
- var Ctor = Function.bind.apply(f2, args);
5618
- return new Ctor();
5619
- }
5620
- return f2.apply(this, arguments);
5621
- };
5622
- a2.prototype = f2.prototype;
5623
- } else
5624
- a2 = {};
5625
- Object.defineProperty(a2, "__esModule", { value: true });
5626
- Object.keys(n3).forEach(function(k) {
5627
- var d = Object.getOwnPropertyDescriptor(n3, k);
5628
- Object.defineProperty(a2, k, d.get ? d : {
5629
- enumerable: true,
5630
- get: function() {
5631
- return n3[k];
5632
- }
5633
- });
5634
- });
5635
- return a2;
5636
- }
5637
5912
  function commonjsRequire(path) {
5638
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.');
5639
5914
  }
@@ -6461,7 +6736,7 @@ function upgradeFrom1_0_14(config3) {
6461
6736
  Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
6462
6737
  var _a3;
6463
6738
  if ((_a3 = viewDef.props) == null ? void 0 : _a3[oldProp]) {
6464
- 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.`);
6465
6740
  }
6466
6741
  });
6467
6742
  });
@@ -6484,7 +6759,7 @@ function upgradeFrom1_0_15(config3) {
6484
6759
  Object.entries(coordinationScopes).forEach(([coordinationType, coordinationScope]) => {
6485
6760
  if (!Array.isArray(coordinationScope) && typeof coordinationScope === "object") {
6486
6761
  if (coordinationType === "dataset") {
6487
- 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.");
6488
6763
  }
6489
6764
  coordinationScopesBy.dataset[coordinationType] = coordinationScope;
6490
6765
  } else if (Array.isArray(coordinationScope) || typeof coordinationScope === "string") {
@@ -8843,7 +9118,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
8843
9118
  const oldKeys = Object.keys(oldObj);
8844
9119
  const propKey = String(prop);
8845
9120
  if (oldKeys.includes(propKey)) {
8846
- console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
9121
+ log$6.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
8847
9122
  ${oldObj[propKey][1]}`);
8848
9123
  return oldObj[propKey];
8849
9124
  }
@@ -8941,6 +9216,9 @@ const annDataObsSetsArr = z.array(z.object({
8941
9216
  z.object({
8942
9217
  obsSets: annDataObsSetsArr
8943
9218
  });
9219
+ z.object({
9220
+ sampleSets: annDataObsSetsArr
9221
+ });
8944
9222
  const annDataObsFeatureColumnsArr = z.array(z.object({
8945
9223
  path: z.string()
8946
9224
  }));
@@ -135397,16 +135675,16 @@ async function getDecoder(fileDirectory) {
135397
135675
  const Decoder = await importFn();
135398
135676
  return new Decoder(fileDirectory);
135399
135677
  }
135400
- addDecoder([void 0, 1], () => import("./raw-8ccd763d.js").then((m) => m.default));
135401
- addDecoder(5, () => import("./lzw-456d51f1.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));
135402
135680
  addDecoder(6, () => {
135403
135681
  throw new Error("old style JPEG compression is not supported.");
135404
135682
  });
135405
- addDecoder(7, () => import("./jpeg-07d1dca7.js").then((m) => m.default));
135406
- addDecoder([8, 32946], () => import("./deflate-d33865aa.js").then((m) => m.default));
135407
- addDecoder(32773, () => import("./packbits-99411d35.js").then((m) => m.default));
135408
- addDecoder(34887, () => import("./lerc-f83bf545.js").then((m) => m.default));
135409
- addDecoder(50001, () => import("./webimage-e3bf9749.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));
135410
135688
  function copyNewSize(array, width, height, samplesPerPixel = 1) {
135411
135689
  return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
135412
135690
  }
@@ -148752,10 +149030,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
148752
149030
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
148753
149031
  const colorTexHeight = Math.max(2, Math.ceil(totalColorsLength / texSize));
148754
149032
  if (valueTexHeight > texSize) {
148755
- 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");
148756
149034
  }
148757
149035
  if (colorTexHeight > texSize) {
148758
- 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");
148759
149037
  }
148760
149038
  const totalData = new Uint8Array(texSize * valueTexHeight);
148761
149039
  const totalColors = new Uint8Array(texSize * colorTexHeight);
@@ -152284,7 +152562,7 @@ async function initLoader(imageData) {
152284
152562
  const { metadata: loaderMetadata } = loader;
152285
152563
  const { omero, multiscales } = loaderMetadata;
152286
152564
  if (!Array.isArray(multiscales) || multiscales.length === 0) {
152287
- 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");
152288
152566
  }
152289
152567
  const { coordinateTransformations } = multiscales[0];
152290
152568
  const axes = getNgffAxes(multiscales[0].axes);
@@ -152376,7 +152654,7 @@ class RasterJsonAsImageLoader extends RasterLoader {
152376
152654
  }
152377
152655
  });
152378
152656
  if (!(coordinationValues == null ? void 0 : coordinationValues.spatialImageLayer)) {
152379
- 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.");
152380
152658
  }
152381
152659
  return new LoaderResult(
152382
152660
  {
@@ -152412,7 +152690,7 @@ class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
152412
152690
  }
152413
152691
  });
152414
152692
  if (!(coordinationValues == null ? void 0 : coordinationValues.spatialImageLayer)) {
152415
- 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.");
152416
152694
  }
152417
152695
  return new LoaderResult(
152418
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-632fc942.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-632fc942.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-632fc942.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-632fc942.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-632fc942.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-632fc942.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-632fc942.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.5",
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.5",
24
- "@vitessce/gl": "3.5.5",
25
- "@vitessce/schemas": "3.5.5",
26
- "@vitessce/sets-utils": "3.5.5",
27
- "@vitessce/spatial-utils": "3.5.5",
28
- "@vitessce/utils": "3.5.5",
29
- "@vitessce/abstract": "3.5.5",
30
- "@vitessce/zarr-utils": "3.5.5",
31
- "@vitessce/config": "3.5.5"
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