@vitessce/json 4.1.0 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-BObeaAM4.js";
2
+ import { B as BaseDecoder } from "./index-CM5yHoIK.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -240,6 +240,7 @@ const FileType$1 = {
240
240
  // Precomputed (mesh) format
241
241
  OBS_SEGMENTATIONS_NG_PRECOMPUTED: "obsSegmentations.ng-precomputed",
242
242
  OBS_POINTS_NG_ANNOTATIONS: "obsPoints.ng-annotations",
243
+ OBS_LOCATIONS_NG_ANNOTATIONS: "obsLocations.ng-annotations",
243
244
  // New file types to support old file types:
244
245
  // - cells.json
245
246
  OBS_EMBEDDING_CELLS_JSON: "obsEmbedding.cells.json",
@@ -400,6 +401,7 @@ const CoordinationType$1 = {
400
401
  PIXEL_HIGHLIGHT: "pixelHighlight",
401
402
  // Per-image-layer
402
403
  TOOLTIP_CROSSHAIRS_VISIBLE: "tooltipCrosshairsVisible",
404
+ TOOLTIP_OBS_SETS_MODE: "tooltipObsSetsMode",
403
405
  LEGEND_VISIBLE: "legendVisible",
404
406
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
405
407
  SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
@@ -484,6 +486,7 @@ const CoordinationType$1 = {
484
486
  [FileType$1.OBS_SEGMENTATIONS_GLB]: DataType$2.OBS_SEGMENTATIONS,
485
487
  [FileType$1.OBS_SEGMENTATIONS_NG_PRECOMPUTED]: DataType$2.OBS_SEGMENTATIONS,
486
488
  [FileType$1.OBS_POINTS_NG_ANNOTATIONS]: DataType$2.OBS_POINTS,
489
+ [FileType$1.OBS_LOCATIONS_NG_ANNOTATIONS]: DataType$2.OBS_LOCATIONS,
487
490
  [FileType$1.IMAGE_SPATIALDATA_ZARR]: DataType$2.IMAGE,
488
491
  [FileType$1.LABELS_SPATIALDATA_ZARR]: DataType$2.OBS_SEGMENTATIONS,
489
492
  [FileType$1.SHAPES_SPATIALDATA_ZARR]: DataType$2.OBS_SEGMENTATIONS,
@@ -728,6 +731,7 @@ const CoordinationType$1 = {
728
731
  CoordinationType$1.SPATIAL_ORBIT_AXIS,
729
732
  CoordinationType$1.SPATIAL_ZOOM,
730
733
  CoordinationType$1.SPATIAL_CAMERA_SNAPSHOT,
734
+ CoordinationType$1.SPATIAL_RENDERING_MODE,
731
735
  CoordinationType$1.OBS_FILTER,
732
736
  CoordinationType$1.OBS_HIGHLIGHT,
733
737
  CoordinationType$1.OBS_SET_SELECTION,
@@ -795,6 +799,7 @@ const CoordinationType$1 = {
795
799
  CoordinationType$1.OBS_COLOR_ENCODING,
796
800
  CoordinationType$1.ADDITIONAL_OBS_SETS,
797
801
  CoordinationType$1.TOOLTIPS_VISIBLE,
802
+ CoordinationType$1.TOOLTIP_OBS_SETS_MODE,
798
803
  CoordinationType$1.SAMPLE_TYPE,
799
804
  CoordinationType$1.SAMPLE_SET_SELECTION,
800
805
  CoordinationType$1.SAMPLE_SET_FILTER,
@@ -846,6 +851,7 @@ const CoordinationType$1 = {
846
851
  CoordinationType$1.OBS_COLOR_ENCODING,
847
852
  CoordinationType$1.ADDITIONAL_OBS_SETS,
848
853
  CoordinationType$1.TOOLTIPS_VISIBLE,
854
+ CoordinationType$1.TOOLTIP_OBS_SETS_MODE,
849
855
  CoordinationType$1.SAMPLE_TYPE,
850
856
  CoordinationType$1.SAMPLE_SET_SELECTION,
851
857
  CoordinationType$1.SAMPLE_SET_FILTER,
@@ -927,6 +933,7 @@ const CoordinationType$1 = {
927
933
  CoordinationType$1.ADDITIONAL_OBS_SETS,
928
934
  CoordinationType$1.MOLECULE_HIGHLIGHT,
929
935
  CoordinationType$1.TOOLTIPS_VISIBLE,
936
+ CoordinationType$1.TOOLTIP_OBS_SETS_MODE,
930
937
  CoordinationType$1.PHOTOMETRIC_INTERPRETATION,
931
938
  CoordinationType$1.ANNOTATION_STORY,
932
939
  CoordinationType$1.ANNOTATION_SHAPES,
@@ -934,7 +941,8 @@ const CoordinationType$1 = {
934
941
  CoordinationType$1.ANNOTATION_OVERLAY_VISIBLE,
935
942
  CoordinationType$1.ANNOTATION_TRANSITION_DURATION,
936
943
  CoordinationType$1.ANNOTATION_EDITABLE,
937
- CoordinationType$1.ANNOTATION_SEMANTIC_ZOOM
944
+ CoordinationType$1.ANNOTATION_SEMANTIC_ZOOM,
945
+ CoordinationType$1.SPATIAL_CHANNELS_SORT_ORDER
938
946
  ],
939
947
  [ViewType$1.SPATIAL_BETA]: [
940
948
  CoordinationType$1.META_COORDINATION_SCOPES,
@@ -976,6 +984,7 @@ const CoordinationType$1 = {
976
984
  CoordinationType$1.ADDITIONAL_OBS_SETS,
977
985
  CoordinationType$1.MOLECULE_HIGHLIGHT,
978
986
  CoordinationType$1.TOOLTIPS_VISIBLE,
987
+ CoordinationType$1.TOOLTIP_OBS_SETS_MODE,
979
988
  CoordinationType$1.FILE_UID,
980
989
  CoordinationType$1.SPATIAL_TARGET_C,
981
990
  CoordinationType$1.SPATIAL_LAYER_VISIBLE,
@@ -1059,7 +1068,8 @@ const CoordinationType$1 = {
1059
1068
  CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
1060
1069
  CoordinationType$1.OBS_COLOR_ENCODING,
1061
1070
  CoordinationType$1.ADDITIONAL_OBS_SETS,
1062
- CoordinationType$1.TOOLTIPS_VISIBLE
1071
+ CoordinationType$1.TOOLTIPS_VISIBLE,
1072
+ CoordinationType$1.TOOLTIP_OBS_SETS_MODE
1063
1073
  ],
1064
1074
  [ViewType$1.OBS_SETS]: [
1065
1075
  CoordinationType$1.DATASET,
@@ -1150,7 +1160,8 @@ const CoordinationType$1 = {
1150
1160
  CoordinationType$1.SPATIAL_ROTATION_Z,
1151
1161
  CoordinationType$1.SPATIAL_ROTATION_ORBIT,
1152
1162
  CoordinationType$1.SPATIAL_ORBIT_AXIS,
1153
- CoordinationType$1.PHOTOMETRIC_INTERPRETATION
1163
+ CoordinationType$1.PHOTOMETRIC_INTERPRETATION,
1164
+ CoordinationType$1.SPATIAL_CHANNELS_SORT_ORDER
1154
1165
  ],
1155
1166
  [ViewType$1.LAYER_CONTROLLER_BETA]: [
1156
1167
  CoordinationType$1.META_COORDINATION_SCOPES,
@@ -10161,14 +10172,15 @@ z.object({
10161
10172
  subsources: z.record(z.boolean()).describe("Subsources are the individual data components of a source (e.g. meshes, skeletons, etc.). Each entry explicitly enables or disables a subsource.").optional(),
10162
10173
  enableDefaultSubsources: z.boolean().describe("When true (default), automatically loads all subsources (defined in mesh metadata), when false loads what is explicitly enabled in `subsources`.").optional()
10163
10174
  }).partial().nullable();
10175
+ const ngAnnotationTransformSchema = z.object({
10176
+ matrix: z.array(z.array(z.number())),
10177
+ outputDimensions: z.record(z.tuple([z.number(), z.string()]))
10178
+ }).optional().describe("A coordinate transformation matrix to apply to the annotation layer source to map annotation coordinates to the global coordinate space.");
10164
10179
  z.object({
10165
10180
  projectionAnnotationSpacing: z.number(),
10166
10181
  featureIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing feature IDs. For example, specify 'gene' to use prop_gene() in the Neuroglancer shader code."),
10167
10182
  pointIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing point IDs. For example, specify 'point_id' to use prop_point_id() in the Neuroglancer shader code."),
10168
- transform: z.object({
10169
- matrix: z.array(z.array(z.number())),
10170
- outputDimensions: z.record(z.tuple([z.number(), z.string()]))
10171
- }).optional().describe("A coordinate transformation matrix to apply to the annotation layer source to map annotation coordinates to the global coordinate space."),
10183
+ transform: ngAnnotationTransformSchema,
10172
10184
  // Note: See comments in neuroglancer-sorger.js
10173
10185
  // We may remove these in the future, pending clarification
10174
10186
  // to questions in the tissue-map-tools repo
@@ -10177,6 +10189,14 @@ z.object({
10177
10189
  quantitativeColorProp: z.string().optional(),
10178
10190
  quantitativeColorMax: z.number().optional()
10179
10191
  }).partial().nullable();
10192
+ z.object({
10193
+ projectionAnnotationSpacing: z.number(),
10194
+ transform: ngAnnotationTransformSchema,
10195
+ segmentIdProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty holding the mesh segment ID (e.g. 'cell_id'). Defaults to 'id' when the annotation info declares it."),
10196
+ // Used when the corresponding segmentation channel uses obsColorEncoding 'geneSelection'.
10197
+ quantitativeColorProp: z.string().optional(),
10198
+ quantitativeColorMax: z.number().optional()
10199
+ }).partial().nullable();
10180
10200
  z.object({
10181
10201
  obsIndex: z.string(),
10182
10202
  obsEmbedding: z.array(z.string()).length(2)
@@ -133588,22 +133608,22 @@ async function getDecoder(fileDirectory) {
133588
133608
  const Decoder = await importFn();
133589
133609
  return new Decoder(fileDirectory);
133590
133610
  }
133591
- addDecoder([void 0, 1], () => import("./raw-C8mBC_hQ.js").then((m) => m.default));
133592
- addDecoder(5, () => import("./lzw-DCsRKzgn.js").then((m) => m.default));
133611
+ addDecoder([void 0, 1], () => import("./raw-BlNN0QGL.js").then((m) => m.default));
133612
+ addDecoder(5, () => import("./lzw-BBMYR2e_.js").then((m) => m.default));
133593
133613
  addDecoder(6, () => {
133594
133614
  throw new Error("old style JPEG compression is not supported.");
133595
133615
  });
133596
- addDecoder(7, () => import("./jpeg-DMmjuxic.js").then((m) => m.default));
133597
- addDecoder([8, 32946], () => import("./deflate-gERuHO_1.js").then((m) => m.default));
133598
- addDecoder(32773, () => import("./packbits-BIDoTj9B.js").then((m) => m.default));
133616
+ addDecoder(7, () => import("./jpeg-Bs2YKyFc.js").then((m) => m.default));
133617
+ addDecoder([8, 32946], () => import("./deflate-D8TRA83z.js").then((m) => m.default));
133618
+ addDecoder(32773, () => import("./packbits-EP82_Hll.js").then((m) => m.default));
133599
133619
  addDecoder(
133600
133620
  34887,
133601
- () => import("./lerc-Ci4fZASZ.js").then(async (m) => {
133621
+ () => import("./lerc-CcQhbLiP.js").then(async (m) => {
133602
133622
  await m.zstd.init();
133603
133623
  return m;
133604
133624
  }).then((m) => m.default)
133605
133625
  );
133606
- addDecoder(50001, () => import("./webimage-9kP0E89I.js").then((m) => m.default));
133626
+ addDecoder(50001, () => import("./webimage-DSecj4MX.js").then((m) => m.default));
133607
133627
  function copyNewSize(array, width, height, samplesPerPixel = 1) {
133608
133628
  return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
133609
133629
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-BObeaAM4.js";
1
+ import { A, C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-CM5yHoIK.js";
2
2
  export {
3
3
  A as AnnotationStoryJsonLoader,
4
4
  C as CellsJsonAsObsEmbeddingLoader,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BObeaAM4.js";
1
+ import { B as BaseDecoder } from "./index-CM5yHoIK.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-BObeaAM4.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-CM5yHoIK.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BObeaAM4.js";
1
+ import { B as BaseDecoder } from "./index-CM5yHoIK.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BObeaAM4.js";
1
+ import { B as BaseDecoder } from "./index-CM5yHoIK.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BObeaAM4.js";
1
+ import { B as BaseDecoder } from "./index-CM5yHoIK.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BObeaAM4.js";
1
+ import { B as BaseDecoder } from "./index-CM5yHoIK.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/json",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,17 +20,17 @@
20
20
  "lodash-es": "^4.17.21",
21
21
  "zarrita": "0.7.5",
22
22
  "zod": "^3.21.4",
23
- "@vitessce/gl": "4.1.0",
24
- "@vitessce/globals": "4.1.0",
25
- "@vitessce/schemas": "4.1.0",
26
- "@vitessce/constants-internal": "4.1.0",
27
- "@vitessce/sets-utils": "4.1.0",
28
- "@vitessce/spatial-utils": "4.1.0",
29
- "@vitessce/abstract": "4.1.0",
30
- "@vitessce/config": "4.1.0",
31
- "@vitessce/error": "4.1.0",
32
- "@vitessce/utils": "4.1.0",
33
- "@vitessce/zarr-utils": "4.1.0"
23
+ "@vitessce/constants-internal": "4.1.2",
24
+ "@vitessce/schemas": "4.1.2",
25
+ "@vitessce/gl": "4.1.2",
26
+ "@vitessce/sets-utils": "4.1.2",
27
+ "@vitessce/globals": "4.1.2",
28
+ "@vitessce/spatial-utils": "4.1.2",
29
+ "@vitessce/utils": "4.1.2",
30
+ "@vitessce/abstract": "4.1.2",
31
+ "@vitessce/error": "4.1.2",
32
+ "@vitessce/config": "4.1.2",
33
+ "@vitessce/zarr-utils": "4.1.2"
34
34
  },
35
35
  "scripts": {
36
36
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",