@vitessce/json 3.5.2 → 3.5.3

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.
Files changed (76) hide show
  1. package/dist/{deflate-58b908e0.js → deflate-d33865aa.js} +1 -2
  2. package/dist/{index-d55d3dac.js → index-632fc942.js} +337 -259
  3. package/dist/index.js +1 -2
  4. package/dist/{jpeg-48992c30.js → jpeg-07d1dca7.js} +1 -2
  5. package/dist/{lerc-62158a51.js → lerc-f83bf545.js} +1 -2
  6. package/dist/{lzw-1570af86.js → lzw-456d51f1.js} +1 -2
  7. package/dist/{packbits-773a0731.js → packbits-99411d35.js} +1 -2
  8. package/dist/{raw-eb81714a.js → raw-8ccd763d.js} +1 -2
  9. package/dist/{webimage-f760ad83.js → webimage-e3bf9749.js} +1 -2
  10. package/dist-tsc/JsonSource.js +1 -1
  11. package/dist-tsc/json-loaders/JsonLoader.d.ts +2 -1
  12. package/dist-tsc/json-loaders/JsonLoader.d.ts.map +1 -1
  13. package/dist-tsc/json-loaders/JsonLoader.js +1 -1
  14. package/dist-tsc/json-loaders/ObsSegmentationsJson.d.ts +9 -1
  15. package/dist-tsc/json-loaders/ObsSegmentationsJson.d.ts.map +1 -1
  16. package/dist-tsc/json-loaders/ObsSegmentationsJson.js +1 -1
  17. package/dist-tsc/json-loaders/ObsSetsJson.d.ts +6 -1
  18. package/dist-tsc/json-loaders/ObsSetsJson.d.ts.map +1 -1
  19. package/dist-tsc/json-loaders/ObsSetsJson.js +1 -1
  20. package/dist-tsc/json-loaders/ObsSetsJson.test-old.js +1 -1
  21. package/dist-tsc/legacy-loaders/CellsJsonAsObsEmbedding.d.ts +8 -1
  22. package/dist-tsc/legacy-loaders/CellsJsonAsObsEmbedding.d.ts.map +1 -1
  23. package/dist-tsc/legacy-loaders/CellsJsonAsObsEmbedding.js +1 -1
  24. package/dist-tsc/legacy-loaders/CellsJsonAsObsLabels.d.ts +5 -1
  25. package/dist-tsc/legacy-loaders/CellsJsonAsObsLabels.d.ts.map +1 -1
  26. package/dist-tsc/legacy-loaders/CellsJsonAsObsLabels.js +1 -1
  27. package/dist-tsc/legacy-loaders/CellsJsonAsObsLocations.d.ts +8 -1
  28. package/dist-tsc/legacy-loaders/CellsJsonAsObsLocations.d.ts.map +1 -1
  29. package/dist-tsc/legacy-loaders/CellsJsonAsObsLocations.js +1 -1
  30. package/dist-tsc/legacy-loaders/CellsJsonAsObsSegmentations.d.ts +17 -1
  31. package/dist-tsc/legacy-loaders/CellsJsonAsObsSegmentations.d.ts.map +1 -1
  32. package/dist-tsc/legacy-loaders/CellsJsonAsObsSegmentations.js +12 -2
  33. package/dist-tsc/legacy-loaders/CellsJsonLoaders.test.js +7 -2
  34. package/dist-tsc/legacy-loaders/ClustersJsonAsObsFeatureMatrix.d.ts +8 -1
  35. package/dist-tsc/legacy-loaders/ClustersJsonAsObsFeatureMatrix.d.ts.map +1 -1
  36. package/dist-tsc/legacy-loaders/ClustersJsonAsObsFeatureMatrix.js +1 -1
  37. package/dist-tsc/legacy-loaders/ClustersJsonLoaders.test.js +1 -1
  38. package/dist-tsc/legacy-loaders/GenesJsonAsObsFeatureMatrix.d.ts +8 -1
  39. package/dist-tsc/legacy-loaders/GenesJsonAsObsFeatureMatrix.d.ts.map +1 -1
  40. package/dist-tsc/legacy-loaders/GenesJsonAsObsFeatureMatrix.js +1 -1
  41. package/dist-tsc/legacy-loaders/GenesJsonLoaders.test.js +1 -1
  42. package/dist-tsc/legacy-loaders/MoleculesJsonAsObsLabels.d.ts +5 -1
  43. package/dist-tsc/legacy-loaders/MoleculesJsonAsObsLabels.d.ts.map +1 -1
  44. package/dist-tsc/legacy-loaders/MoleculesJsonAsObsLabels.js +1 -1
  45. package/dist-tsc/legacy-loaders/MoleculesJsonAsObsLocations.d.ts +8 -1
  46. package/dist-tsc/legacy-loaders/MoleculesJsonAsObsLocations.d.ts.map +1 -1
  47. package/dist-tsc/legacy-loaders/MoleculesJsonAsObsLocations.js +1 -1
  48. package/dist-tsc/legacy-loaders/MoleculesJsonLoaders.test.js +1 -1
  49. package/dist-tsc/raster-json-loaders/RasterJsonAsImageLoader.d.ts +7 -0
  50. package/dist-tsc/raster-json-loaders/RasterJsonAsImageLoader.d.ts.map +1 -1
  51. package/dist-tsc/raster-json-loaders/RasterJsonAsImageLoader.js +1 -1
  52. package/dist-tsc/raster-json-loaders/RasterJsonAsObsSegmentationsLoader.d.ts +8 -0
  53. package/dist-tsc/raster-json-loaders/RasterJsonAsObsSegmentationsLoader.d.ts.map +1 -1
  54. package/dist-tsc/raster-json-loaders/RasterJsonAsObsSegmentationsLoader.js +1 -1
  55. package/dist-tsc/raster-json-loaders/RasterJsonLoader.js +1 -1
  56. package/package.json +10 -10
  57. package/src/JsonSource.js +1 -1
  58. package/src/json-loaders/JsonLoader.js +1 -1
  59. package/src/json-loaders/ObsSegmentationsJson.js +1 -1
  60. package/src/json-loaders/ObsSetsJson.js +1 -1
  61. package/src/json-loaders/ObsSetsJson.test-old.js +1 -1
  62. package/src/legacy-loaders/CellsJsonAsObsEmbedding.js +1 -1
  63. package/src/legacy-loaders/CellsJsonAsObsLabels.js +1 -1
  64. package/src/legacy-loaders/CellsJsonAsObsLocations.js +1 -1
  65. package/src/legacy-loaders/CellsJsonAsObsSegmentations.js +13 -2
  66. package/src/legacy-loaders/CellsJsonLoaders.test.js +10 -2
  67. package/src/legacy-loaders/ClustersJsonAsObsFeatureMatrix.js +1 -1
  68. package/src/legacy-loaders/ClustersJsonLoaders.test.js +1 -1
  69. package/src/legacy-loaders/GenesJsonAsObsFeatureMatrix.js +1 -1
  70. package/src/legacy-loaders/GenesJsonLoaders.test.js +1 -1
  71. package/src/legacy-loaders/MoleculesJsonAsObsLabels.js +1 -1
  72. package/src/legacy-loaders/MoleculesJsonAsObsLocations.js +1 -1
  73. package/src/legacy-loaders/MoleculesJsonLoaders.test.js +1 -1
  74. package/src/raster-json-loaders/RasterJsonAsImageLoader.js +1 -1
  75. package/src/raster-json-loaders/RasterJsonAsObsSegmentationsLoader.js +1 -1
  76. package/src/raster-json-loaders/RasterJsonLoader.js +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-d55d3dac.js";
2
- import "@vitessce/vit-s";
1
+ import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-632fc942.js";
3
2
  import "react";
4
3
  export {
5
4
  C as CellsJsonAsObsEmbeddingLoader,
@@ -1,5 +1,4 @@
1
- import { B as BaseDecoder } from "./index-d55d3dac.js";
2
- import "@vitessce/vit-s";
1
+ import { B as BaseDecoder } from "./index-632fc942.js";
3
2
  import "react";
4
3
  const dctZigZag = new Int32Array([
5
4
  0,
@@ -1,6 +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-d55d3dac.js";
3
- import "@vitessce/vit-s";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-632fc942.js";
4
3
  import "react";
5
4
  var LercDecode = { exports: {} };
6
5
  (function(module) {
@@ -1,5 +1,4 @@
1
- import { B as BaseDecoder } from "./index-d55d3dac.js";
2
- import "@vitessce/vit-s";
1
+ import { B as BaseDecoder } from "./index-632fc942.js";
3
2
  import "react";
4
3
  const MIN_BITS = 9;
5
4
  const CLEAR_CODE = 256;
@@ -1,5 +1,4 @@
1
- import { B as BaseDecoder } from "./index-d55d3dac.js";
2
- import "@vitessce/vit-s";
1
+ import { B as BaseDecoder } from "./index-632fc942.js";
3
2
  import "react";
4
3
  class PackbitsDecoder extends BaseDecoder {
5
4
  decodeBlock(buffer) {
@@ -1,5 +1,4 @@
1
- import { B as BaseDecoder } from "./index-d55d3dac.js";
2
- import "@vitessce/vit-s";
1
+ import { B as BaseDecoder } from "./index-632fc942.js";
3
2
  import "react";
4
3
  class RawDecoder extends BaseDecoder {
5
4
  decodeBlock(buffer) {
@@ -1,5 +1,4 @@
1
- import { B as BaseDecoder } from "./index-d55d3dac.js";
2
- import "@vitessce/vit-s";
1
+ import { B as BaseDecoder } from "./index-632fc942.js";
3
2
  import "react";
4
3
  class WebImageDecoder extends BaseDecoder {
5
4
  constructor() {
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-underscore-dangle */
2
- import { DataSourceFetchError } from '@vitessce/vit-s';
2
+ import { DataSourceFetchError } from '@vitessce/abstract';
3
3
  export default class JsonSource {
4
4
  constructor({ url, requestInit }) {
5
5
  this.url = url;
@@ -1,8 +1,9 @@
1
- export default class JsonLoader {
1
+ export default class JsonLoader extends AbstractTwoStepLoader<any> {
2
2
  constructor(dataSource: any, params: any);
3
3
  schema: any;
4
4
  load(): any;
5
5
  data: any;
6
6
  validate(data: any): any[];
7
7
  }
8
+ import { AbstractTwoStepLoader } from '@vitessce/abstract';
8
9
  //# sourceMappingURL=JsonLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"JsonLoader.d.ts","sourceRoot":"","sources":["../../src/json-loaders/JsonLoader.js"],"names":[],"mappings":"AAqBA;IACE,0CAKC;IADC,YAAwC;IAG1C,YAmBC;IAZC,UAUI;IAIN,2BAYC;CACF"}
1
+ {"version":3,"file":"JsonLoader.d.ts","sourceRoot":"","sources":["../../src/json-loaders/JsonLoader.js"],"names":[],"mappings":"AAqBA;IACE,0CAKC;IADC,YAAwC;IAG1C,YAmBC;IAZC,UAUI;IAIN,2BAYC;CACF;sCAzDM,oBAAoB"}
@@ -1,5 +1,5 @@
1
1
  import { FileType } from '@vitessce/constants-internal';
2
- import { AbstractTwoStepLoader, LoaderValidationError, AbstractLoaderError, LoaderResult, } from '@vitessce/vit-s';
2
+ import { AbstractTwoStepLoader, LoaderValidationError, AbstractLoaderError, LoaderResult, } from '@vitessce/abstract';
3
3
  import { obsSetsSchema, rasterJsonSchema as rasterSchema } from '@vitessce/schemas';
4
4
  import { cellsSchema } from '../legacy-loaders/schemas/cells.js';
5
5
  import { moleculesSchema } from '../legacy-loaders/schemas/molecules.js';
@@ -15,7 +15,15 @@ export default class ObsSegmentationsJsonLoader extends JsonLoader {
15
15
  };
16
16
  obsSegmentationsType: string;
17
17
  } | undefined;
18
- load(): Promise<any>;
18
+ load(): Promise<LoaderResult<{
19
+ obsIndex: string[];
20
+ obsSegmentations: {
21
+ data: any[];
22
+ shape: any[];
23
+ };
24
+ obsSegmentationsType: string;
25
+ }>>;
19
26
  }
20
27
  import JsonLoader from './JsonLoader.js';
28
+ import { LoaderResult } from '@vitessce/abstract';
21
29
  //# sourceMappingURL=ObsSegmentationsJson.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ObsSegmentationsJson.d.ts","sourceRoot":"","sources":["../../src/json-loaders/ObsSegmentationsJson.js"],"names":[],"mappings":"AAIA;IACE;;;;;;;MAYC;IAFC;;;;;;;kBAAmF;IAIrF,qBAwCC;CACF;uBA1DsB,iBAAiB"}
1
+ {"version":3,"file":"ObsSegmentationsJson.d.ts","sourceRoot":"","sources":["../../src/json-loaders/ObsSegmentationsJson.js"],"names":[],"mappings":"AAIA;IACE;;;;;;;MAYC;IAFC;;;;;;;kBAAmF;IAIrF;;;;;;;QAwCC;CACF;uBA1DsB,iBAAiB;6BAFU,oBAAoB"}
@@ -1,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import { CoordinationLevel as CL } from '@vitessce/config';
3
3
  import JsonLoader from './JsonLoader.js';
4
4
  export default class ObsSegmentationsJsonLoader extends JsonLoader {
@@ -1,5 +1,10 @@
1
1
  export default class ObsSetsJsonLoader extends JsonLoader {
2
- load(): Promise<any>;
2
+ load(): Promise<LoaderResult<{
3
+ obsIndex: any;
4
+ obsSets: any;
5
+ obsSetsMembership: Map<any, any>;
6
+ }>>;
3
7
  }
4
8
  import JsonLoader from './JsonLoader.js';
9
+ import { LoaderResult } from '@vitessce/abstract';
5
10
  //# sourceMappingURL=ObsSetsJson.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ObsSetsJson.d.ts","sourceRoot":"","sources":["../../src/json-loaders/ObsSetsJson.js"],"names":[],"mappings":"AAUA;IAOE,qBAmCC;CACF;uBA7CsB,iBAAiB"}
1
+ {"version":3,"file":"ObsSetsJson.d.ts","sourceRoot":"","sources":["../../src/json-loaders/ObsSetsJson.js"],"names":[],"mappings":"AAUA;IAOE;;;;QAmCC;CACF;uBA7CsB,iBAAiB;6BAFU,oBAAoB"}
@@ -1,5 +1,5 @@
1
1
  import { tryUpgradeTreeToLatestSchema, initializeCellSetColor, nodeToSet, treeToMembershipMap, } from '@vitessce/sets-utils';
2
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
2
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
3
3
  import { obsSetsSchema } from '@vitessce/schemas';
4
4
  import JsonLoader from './JsonLoader.js';
5
5
  export default class ObsSetsJsonLoader extends JsonLoader {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // TODO(monorepo)
3
3
  /*
4
- import { LoaderResult } from '@vitessce/vit-s';
4
+ import { LoaderResult } from '@vitessce/abstract';
5
5
  import ObsSetsJsonLoader from './ObsSetsJson';
6
6
  import JsonSource from '../JsonSource';
7
7
 
@@ -32,7 +32,14 @@ export default class CellsJsonAsObsEmbeddingLoader extends JsonLoader {
32
32
  shape: number[];
33
33
  };
34
34
  } | null | undefined;
35
- load(): Promise<any>;
35
+ load(): Promise<LoaderResult<{
36
+ obsIndex: string[];
37
+ obsEmbedding: {
38
+ data: Float32Array[];
39
+ shape: number[];
40
+ };
41
+ } | null>>;
36
42
  }
37
43
  import JsonLoader from '../json-loaders/JsonLoader.js';
44
+ import { LoaderResult } from '@vitessce/abstract';
38
45
  //# sourceMappingURL=CellsJsonAsObsEmbedding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CellsJsonAsObsEmbedding.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsEmbedding.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;;;;aA2BC;IAhBG;;;;;;yBAAwB;IAkB5B,qBAWC;CACF;uBAlDsB,+BAA+B"}
1
+ {"version":3,"file":"CellsJsonAsObsEmbedding.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsEmbedding.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;;;;aA2BC;IAhBG;;;;;;yBAAwB;IAkB5B;;;;;;eAWC;CACF;uBAlDsB,+BAA+B;6BAFJ,oBAAoB"}
@@ -1,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import { cellsSchema } from './schemas/cells.js';
3
3
  import JsonLoader from '../json-loaders/JsonLoader.js';
4
4
  export default class CellsJsonAsObsEmbeddingLoader extends JsonLoader {
@@ -26,7 +26,11 @@ export default class CellsJsonAsObsLabelsLoader extends JsonLoader {
26
26
  obsIndex: string[];
27
27
  obsLabels: any[];
28
28
  } | undefined;
29
- load(): Promise<any>;
29
+ load(): Promise<LoaderResult<{
30
+ obsIndex: string[];
31
+ obsLabels: any[];
32
+ }>>;
30
33
  }
31
34
  import JsonLoader from '../json-loaders/JsonLoader.js';
35
+ import { LoaderResult } from '@vitessce/abstract';
32
36
  //# sourceMappingURL=CellsJsonAsObsLabels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CellsJsonAsObsLabels.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsLabels.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;MASC;IAFC;;;kBAA2C;IAI7C,qBAQC;CACF;uBA7BsB,+BAA+B"}
1
+ {"version":3,"file":"CellsJsonAsObsLabels.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsLabels.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;MASC;IAFC;;;kBAA2C;IAI7C;;;QAQC;CACF;uBA7BsB,+BAA+B;6BAFJ,oBAAoB"}
@@ -1,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import { cellsSchema } from './schemas/cells.js';
3
3
  import JsonLoader from '../json-loaders/JsonLoader.js';
4
4
  export default class CellsJsonAsObsLabelsLoader extends JsonLoader {
@@ -32,7 +32,14 @@ export default class CellsJsonAsObsLocationsLoader extends JsonLoader {
32
32
  shape: number[];
33
33
  };
34
34
  } | null | undefined;
35
- load(): Promise<any>;
35
+ load(): Promise<LoaderResult<{
36
+ obsIndex: string[];
37
+ obsLocations: {
38
+ data: Float32Array[];
39
+ shape: number[];
40
+ };
41
+ } | null>>;
36
42
  }
37
43
  import JsonLoader from '../json-loaders/JsonLoader.js';
44
+ import { LoaderResult } from '@vitessce/abstract';
38
45
  //# sourceMappingURL=CellsJsonAsObsLocations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CellsJsonAsObsLocations.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsLocations.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;;;;aAmBC;IAZG;;;;;;yBAAwB;IAc5B,qBAWC;CACF;uBA1CsB,+BAA+B"}
1
+ {"version":3,"file":"CellsJsonAsObsLocations.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsLocations.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;;;;aAmBC;IAZG;;;;;;yBAAwB;IAc5B;;;;;;eAWC;CACF;uBA1CsB,+BAA+B;6BAFJ,oBAAoB"}
@@ -1,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import { cellsSchema } from './schemas/cells.js';
3
3
  import JsonLoader from '../json-loaders/JsonLoader.js';
4
4
  export default class CellsJsonAsObsLocationsLoader extends JsonLoader {
@@ -1,3 +1,11 @@
1
+ /**
2
+ *
3
+ * @param {number} x x
4
+ * @param {number} y y
5
+ * @param {number} r radius
6
+ * @returns
7
+ */
8
+ export function square(x: number, y: number, r: number): number[][];
1
9
  export default class CellsJsonAsObsSegmentationsLoader extends JsonLoader {
2
10
  schema: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
3
11
  xy: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
@@ -32,7 +40,15 @@ export default class CellsJsonAsObsSegmentationsLoader extends JsonLoader {
32
40
  shape: any[];
33
41
  };
34
42
  } | null | undefined;
35
- load(): Promise<any>;
43
+ load(): Promise<LoaderResult<{
44
+ obsSegmentationsType: string;
45
+ obsIndex?: string[] | undefined;
46
+ obsSegmentations?: {
47
+ data: any[];
48
+ shape: any[];
49
+ } | undefined;
50
+ }>>;
36
51
  }
37
52
  import JsonLoader from '../json-loaders/JsonLoader.js';
53
+ import { LoaderResult } from '@vitessce/abstract';
38
54
  //# sourceMappingURL=CellsJsonAsObsSegmentations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CellsJsonAsObsSegmentations.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsSegmentations.js"],"names":[],"mappings":"AAKA;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;;;;aA2BC;IAnBG;;;;;;yBAAwB;IAqB5B,qBAcC;CACF;uBArDsB,+BAA+B"}
1
+ {"version":3,"file":"CellsJsonAsObsSegmentations.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/CellsJsonAsObsSegmentations.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,0BALW,MAAM,KACN,MAAM,KACN,MAAM,cAKhB;AAED;IAII;;;;;;;;;;;;;;;;;;QAAyB;IAG3B;;;;;;aA2BC;IAnBG;;;;;;yBAAwB;IAqB5B;;;;;;;QAcC;CACF;uBAhEsB,+BAA+B;6BAHJ,oBAAoB"}
@@ -1,7 +1,17 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
2
- import { DEFAULT_CELLS_LAYER, square } from '@vitessce/spatial-utils';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
+ import { DEFAULT_CELLS_LAYER } from '@vitessce/constants-internal';
3
3
  import { cellsSchema } from './schemas/cells.js';
4
4
  import JsonLoader from '../json-loaders/JsonLoader.js';
5
+ /**
6
+ *
7
+ * @param {number} x x
8
+ * @param {number} y y
9
+ * @param {number} r radius
10
+ * @returns
11
+ */
12
+ export function square(x, y, r) {
13
+ return [[x, y + r], [x + r, y], [x, y - r], [x - r, y]];
14
+ }
5
15
  export default class CellsJsonAsObsSegmentationsLoader extends JsonLoader {
6
16
  constructor(dataSource, params) {
7
17
  super(dataSource, params);
@@ -1,8 +1,8 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import { LoaderResult } from '@vitessce/vit-s';
2
+ import { LoaderResult } from '@vitessce/abstract';
3
3
  import CellsJsonAsObsEmbeddingLoader from './CellsJsonAsObsEmbedding.js';
4
4
  import CellsJsonAsObsLabelsLoader from './CellsJsonAsObsLabels.js';
5
- import CellsJsonAsObsSegmentationsLoader from './CellsJsonAsObsSegmentations.js';
5
+ import CellsJsonAsObsSegmentationsLoader, { square } from './CellsJsonAsObsSegmentations.js';
6
6
  import JsonSource from '../JsonSource.js';
7
7
  const createLoader = (ClassDef, config, url) => {
8
8
  const configWithUrl = {
@@ -12,6 +12,11 @@ const createLoader = (ClassDef, config, url) => {
12
12
  const source = new JsonSource(configWithUrl);
13
13
  return new ClassDef(source, configWithUrl);
14
14
  };
15
+ describe('square()', () => {
16
+ it('gives the right coordinates', () => {
17
+ expect(square(0, 0, 50)).toEqual([[0, 50], [50, 0], [0, -50], [-50, 0]]);
18
+ });
19
+ });
15
20
  describe('loaders/cells-json-loaders', () => {
16
21
  describe('CellsJsonAsObsEmbeddingLoader', () => {
17
22
  it('can load obsEmbedding', async () => {
@@ -26,7 +26,14 @@ export default class ClustersJsonAsObsFeatureMatrixLoader extends JsonLoader {
26
26
  data: Uint8Array;
27
27
  };
28
28
  } | undefined;
29
- load(): Promise<any>;
29
+ load(): Promise<LoaderResult<{
30
+ obsIndex: any;
31
+ featureIndex: any;
32
+ obsFeatureMatrix: {
33
+ data: Uint8Array;
34
+ };
35
+ }>>;
30
36
  }
31
37
  import JsonLoader from '../json-loaders/JsonLoader.js';
38
+ import { LoaderResult } from '@vitessce/abstract';
32
39
  //# sourceMappingURL=ClustersJsonAsObsFeatureMatrix.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClustersJsonAsObsFeatureMatrix.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/ClustersJsonAsObsFeatureMatrix.js"],"names":[],"mappings":"AAMA;IAII;;;;;;;;;;;;OAA4B;IAG9B;;;;;;MA2BC;IAFC;;;;;;kBAAgE;IAIlE,qBAWC;CACF;uBAlDsB,+BAA+B"}
1
+ {"version":3,"file":"ClustersJsonAsObsFeatureMatrix.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/ClustersJsonAsObsFeatureMatrix.js"],"names":[],"mappings":"AAMA;IAII;;;;;;;;;;;;OAA4B;IAG9B;;;;;;MA2BC;IAFC;;;;;;kBAAgE;IAIlE;;;;;;QAWC;CACF;uBAlDsB,+BAA+B;6BAFJ,oBAAoB"}
@@ -1,6 +1,6 @@
1
1
  import { extent } from 'd3-array';
2
2
  import { range } from 'lodash-es';
3
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
3
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
4
4
  import { clustersSchema } from './schemas/clusters.js';
5
5
  import JsonLoader from '../json-loaders/JsonLoader.js';
6
6
  export default class ClustersJsonAsObsFeatureMatrixLoader extends JsonLoader {
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import { LoaderResult } from '@vitessce/vit-s';
2
+ import { LoaderResult } from '@vitessce/abstract';
3
3
  import ClustersJsonAsObsFeatureMatrixLoader from './ClustersJsonAsObsFeatureMatrix.js';
4
4
  import JsonSource from '../JsonSource.js';
5
5
  const createLoader = (ClassDef, config, url) => {
@@ -23,7 +23,14 @@ export default class GenesJsonAsObsFeatureMatrixLoader extends JsonLoader {
23
23
  data: Uint8Array;
24
24
  };
25
25
  } | undefined;
26
- load(): Promise<any>;
26
+ load(): Promise<LoaderResult<{
27
+ obsIndex: string[];
28
+ featureIndex: string[];
29
+ obsFeatureMatrix: {
30
+ data: Uint8Array;
31
+ };
32
+ }>>;
27
33
  }
28
34
  import JsonLoader from '../json-loaders/JsonLoader.js';
35
+ import { LoaderResult } from '@vitessce/abstract';
29
36
  //# sourceMappingURL=GenesJsonAsObsFeatureMatrix.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenesJsonAsObsFeatureMatrix.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/GenesJsonAsObsFeatureMatrix.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;QAAyB;IAG3B;;;;;;MAkBC;IAFC;;;;;;kBAAgE;IAIlE,qBAWC;CACF;uBAzCsB,+BAA+B"}
1
+ {"version":3,"file":"GenesJsonAsObsFeatureMatrix.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/GenesJsonAsObsFeatureMatrix.js"],"names":[],"mappings":"AAIA;IAII;;;;;;;;;QAAyB;IAG3B;;;;;;MAkBC;IAFC;;;;;;kBAAgE;IAIlE;;;;;;QAWC;CACF;uBAzCsB,+BAA+B;6BAFJ,oBAAoB"}
@@ -1,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import { genesSchema } from './schemas/genes.js';
3
3
  import JsonLoader from '../json-loaders/JsonLoader.js';
4
4
  export default class GenesJsonAsObsFeatureMatrixLoader extends JsonLoader {
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import { LoaderResult } from '@vitessce/vit-s';
2
+ import { LoaderResult } from '@vitessce/abstract';
3
3
  import GenesJsonAsObsFeatureMatrixLoader from './GenesJsonAsObsFeatureMatrix.js';
4
4
  import JsonSource from '../JsonSource.js';
5
5
  const createLoader = (ClassDef, config, url) => {
@@ -8,7 +8,11 @@ export default class MoleculesJsonAsObsLabelsLoader extends JsonLoader {
8
8
  obsIndex: any;
9
9
  obsLabels: any[];
10
10
  } | undefined;
11
- load(): Promise<any>;
11
+ load(): Promise<LoaderResult<{
12
+ obsIndex: any;
13
+ obsLabels: any[];
14
+ }>>;
12
15
  }
13
16
  import JsonLoader from '../json-loaders/JsonLoader.js';
17
+ import { LoaderResult } from '@vitessce/abstract';
14
18
  //# sourceMappingURL=MoleculesJsonAsObsLabels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MoleculesJsonAsObsLabels.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/MoleculesJsonAsObsLabels.js"],"names":[],"mappings":"AAKA;IAII,kJAA6B;IAG/B;;;MAcC;IAFC;;;kBAA2C;IAI7C,qBAQC;CACF;uBAlCsB,+BAA+B"}
1
+ {"version":3,"file":"MoleculesJsonAsObsLabels.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/MoleculesJsonAsObsLabels.js"],"names":[],"mappings":"AAKA;IAII,kJAA6B;IAG/B;;;MAcC;IAFC;;;kBAA2C;IAI7C;;;QAQC;CACF;uBAlCsB,+BAA+B;6BAFJ,oBAAoB"}
@@ -1,5 +1,5 @@
1
1
  import { range, sum } from 'lodash-es';
2
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
2
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
3
3
  import { moleculesSchema } from './schemas/molecules.js';
4
4
  import JsonLoader from '../json-loaders/JsonLoader.js';
5
5
  export default class MoleculesJsonAsObsLabelsLoader extends JsonLoader {
@@ -14,7 +14,14 @@ export default class MoleculesJsonAsObsLocationsLoader extends JsonLoader {
14
14
  shape: number[];
15
15
  };
16
16
  } | undefined;
17
- load(): Promise<any>;
17
+ load(): Promise<LoaderResult<{
18
+ obsIndex: any;
19
+ obsLocations: {
20
+ data: Float32Array[];
21
+ shape: number[];
22
+ };
23
+ }>>;
18
24
  }
19
25
  import JsonLoader from '../json-loaders/JsonLoader.js';
26
+ import { LoaderResult } from '@vitessce/abstract';
20
27
  //# sourceMappingURL=MoleculesJsonAsObsLocations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MoleculesJsonAsObsLocations.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/MoleculesJsonAsObsLocations.js"],"names":[],"mappings":"AAMA;IAII,kJAA6B;IAG/B;;;;;;MAoBC;IAFC;;;;;;kBAA8C;IAIhD,qBAYC;CACF;uBA5CsB,+BAA+B"}
1
+ {"version":3,"file":"MoleculesJsonAsObsLocations.d.ts","sourceRoot":"","sources":["../../src/legacy-loaders/MoleculesJsonAsObsLocations.js"],"names":[],"mappings":"AAMA;IAII,kJAA6B;IAG/B;;;;;;MAoBC;IAFC;;;;;;kBAA8C;IAIhD;;;;;;QAYC;CACF;uBA5CsB,+BAA+B;6BAHJ,oBAAoB"}
@@ -1,5 +1,5 @@
1
1
  import { range, sum } from 'lodash-es';
2
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
2
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
3
3
  import { DEFAULT_MOLECULES_LAYER } from '@vitessce/spatial-utils';
4
4
  import { moleculesSchema } from './schemas/molecules.js';
5
5
  import JsonLoader from '../json-loaders/JsonLoader.js';
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import { LoaderResult } from '@vitessce/vit-s';
2
+ import { LoaderResult } from '@vitessce/abstract';
3
3
  import MoleculesJsonAsObsLocationsLoader from './MoleculesJsonAsObsLocations.js';
4
4
  import MoleculesJsonAsObsLabelsLoader from './MoleculesJsonAsObsLabels.js';
5
5
  import JsonSource from '../JsonSource.js';
@@ -1,4 +1,11 @@
1
1
  export default class RasterJsonAsImageLoader extends RasterLoader {
2
+ load(): Promise<LoaderResult<{
3
+ image: {
4
+ loaders: any[];
5
+ meta: any[];
6
+ } | null;
7
+ }>>;
2
8
  }
3
9
  import RasterLoader from './RasterJsonLoader.js';
10
+ import { LoaderResult } from '@vitessce/abstract';
4
11
  //# sourceMappingURL=RasterJsonAsImageLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RasterJsonAsImageLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonAsImageLoader.js"],"names":[],"mappings":"AAGA;CAyCC;yBA3CwB,uBAAuB"}
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,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import RasterLoader from './RasterJsonLoader.js';
3
3
  export default class RasterJsonAsImageLoader extends RasterLoader {
4
4
  async load() {
@@ -1,4 +1,12 @@
1
1
  export default class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
2
+ load(): Promise<LoaderResult<{
3
+ obsSegmentationsType: string;
4
+ obsSegmentations: {
5
+ loaders: any[];
6
+ meta: any[];
7
+ };
8
+ } | null>>;
2
9
  }
3
10
  import RasterLoader from './RasterJsonLoader.js';
11
+ import { LoaderResult } from '@vitessce/abstract';
4
12
  //# sourceMappingURL=RasterJsonAsObsSegmentationsLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RasterJsonAsObsSegmentationsLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonAsObsSegmentationsLoader.js"],"names":[],"mappings":"AAGA;CA0CC;yBA5CwB,uBAAuB"}
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,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import RasterLoader from './RasterJsonLoader.js';
3
3
  export default class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
4
4
  async load() {
@@ -2,7 +2,7 @@ import { viv } from '@vitessce/gl';
2
2
  import { initializeRasterLayersAndChannels, coordinateTransformationsToMatrix, getNgffAxes, loadOmeZarr, guessTileSize, ZarritaPixelSource, } from '@vitessce/spatial-utils';
3
3
  import { open as zarrOpen } from 'zarrita';
4
4
  import { zarrOpenRoot, createZarrArrayAdapter } from '@vitessce/zarr-utils';
5
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
5
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
6
6
  import { rasterJsonSchema as rasterSchema } from '@vitessce/schemas';
7
7
  import JsonLoader from '../json-loaders/JsonLoader.js';
8
8
  async function initLoader(imageData) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/json",
3
- "version": "3.5.2",
3
+ "version": "3.5.3",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,15 +20,15 @@
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.2",
24
- "@vitessce/gl": "3.5.2",
25
- "@vitessce/schemas": "3.5.2",
26
- "@vitessce/sets-utils": "3.5.2",
27
- "@vitessce/spatial-utils": "3.5.2",
28
- "@vitessce/utils": "3.5.2",
29
- "@vitessce/vit-s": "3.5.2",
30
- "@vitessce/zarr-utils": "3.5.2",
31
- "@vitessce/config": "3.5.2"
23
+ "@vitessce/constants-internal": "3.5.3",
24
+ "@vitessce/gl": "3.5.3",
25
+ "@vitessce/schemas": "3.5.3",
26
+ "@vitessce/sets-utils": "3.5.3",
27
+ "@vitessce/spatial-utils": "3.5.3",
28
+ "@vitessce/utils": "3.5.3",
29
+ "@vitessce/abstract": "3.5.3",
30
+ "@vitessce/zarr-utils": "3.5.3",
31
+ "@vitessce/config": "3.5.3"
32
32
  },
33
33
  "scripts": {
34
34
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
package/src/JsonSource.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-underscore-dangle */
2
- import { DataSourceFetchError } from '@vitessce/vit-s';
2
+ import { DataSourceFetchError } from '@vitessce/abstract';
3
3
 
4
4
  export default class JsonSource {
5
5
  constructor({ url, requestInit }) {
@@ -4,7 +4,7 @@ import {
4
4
  LoaderValidationError,
5
5
  AbstractLoaderError,
6
6
  LoaderResult,
7
- } from '@vitessce/vit-s';
7
+ } from '@vitessce/abstract';
8
8
 
9
9
  import { obsSetsSchema, rasterJsonSchema as rasterSchema } from '@vitessce/schemas';
10
10
  import { cellsSchema } from '../legacy-loaders/schemas/cells.js';
@@ -1,4 +1,4 @@
1
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
1
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
2
2
  import { CoordinationLevel as CL } from '@vitessce/config';
3
3
  import JsonLoader from './JsonLoader.js';
4
4
 
@@ -4,7 +4,7 @@ import {
4
4
  nodeToSet,
5
5
  treeToMembershipMap,
6
6
  } from '@vitessce/sets-utils';
7
- import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
7
+ import { AbstractLoaderError, LoaderResult } from '@vitessce/abstract';
8
8
  import { obsSetsSchema } from '@vitessce/schemas';
9
9
  import JsonLoader from './JsonLoader.js';
10
10
 
@@ -1,6 +1,6 @@
1
1
  // TODO(monorepo)
2
2
  /*
3
- import { LoaderResult } from '@vitessce/vit-s';
3
+ import { LoaderResult } from '@vitessce/abstract';
4
4
  import ObsSetsJsonLoader from './ObsSetsJson';
5
5
  import JsonSource from '../JsonSource';
6
6