@vitessce/schemas 3.9.5 → 4.0.0-test.0
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.
- package/dist/index.js +56 -28
- package/dist-tsc/file-def-options.d.ts +11 -22
- package/dist-tsc/file-def-options.d.ts.map +1 -1
- package/dist-tsc/file-def-options.js +24 -11
- package/dist-tsc/index.d.ts +1 -1
- package/dist-tsc/index.d.ts.map +1 -1
- package/dist-tsc/index.js +1 -1
- package/package.json +6 -6
- package/src/file-def-options.ts +22 -8
- package/src/index.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -5417,13 +5417,12 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
|
|
|
5417
5417
|
};
|
|
5418
5418
|
const layout = [];
|
|
5419
5419
|
config.staticLayout.forEach((componentDef) => {
|
|
5420
|
-
var _a, _b, _c;
|
|
5421
5420
|
let newComponentDef = {
|
|
5422
5421
|
...componentDef,
|
|
5423
5422
|
coordinationScopes: {}
|
|
5424
5423
|
};
|
|
5425
5424
|
if (componentDef.component === "scatterplot") {
|
|
5426
|
-
if (
|
|
5425
|
+
if (componentDef.props?.mapping && typeof componentDef.props.mapping === "string") {
|
|
5427
5426
|
coordinationSpace.embeddingType[componentDef.props.mapping] = componentDef.props.mapping;
|
|
5428
5427
|
newComponentDef = {
|
|
5429
5428
|
...newComponentDef,
|
|
@@ -5433,7 +5432,7 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
|
|
|
5433
5432
|
}
|
|
5434
5433
|
};
|
|
5435
5434
|
}
|
|
5436
|
-
if (
|
|
5435
|
+
if (componentDef.props?.view) {
|
|
5437
5436
|
const newScopeValues = upgradeReplaceViewProp(
|
|
5438
5437
|
"embedding",
|
|
5439
5438
|
componentDef.props.view,
|
|
@@ -5449,7 +5448,7 @@ function upgradeFrom0_1_0(config, datasetUid = null) {
|
|
|
5449
5448
|
}
|
|
5450
5449
|
}
|
|
5451
5450
|
if (componentDef.component === "spatial") {
|
|
5452
|
-
if (
|
|
5451
|
+
if (componentDef?.props?.view) {
|
|
5453
5452
|
const newScopeValues = upgradeReplaceViewProp(
|
|
5454
5453
|
"spatial",
|
|
5455
5454
|
componentDef.props.view,
|
|
@@ -5543,7 +5542,6 @@ function upgradeFrom1_0_0(config) {
|
|
|
5543
5542
|
};
|
|
5544
5543
|
}
|
|
5545
5544
|
function upgradeFrom1_0_1(config) {
|
|
5546
|
-
var _a;
|
|
5547
5545
|
const layout = config.layout.map((component) => {
|
|
5548
5546
|
const newComponent = { ...component };
|
|
5549
5547
|
if (newComponent.component === "layerController") {
|
|
@@ -5555,9 +5553,8 @@ function upgradeFrom1_0_1(config) {
|
|
|
5555
5553
|
return newComponent;
|
|
5556
5554
|
});
|
|
5557
5555
|
const newConfig = cloneDeep(config);
|
|
5558
|
-
Object.keys(
|
|
5559
|
-
|
|
5560
|
-
if ((_b = (_a2 = newConfig.coordinationSpace) == null ? void 0 : _a2.spatialRasterLayers) == null ? void 0 : _b[key]) {
|
|
5556
|
+
Object.keys(newConfig?.coordinationSpace?.spatialRasterLayers || {}).forEach((key) => {
|
|
5557
|
+
if (newConfig.coordinationSpace?.spatialRasterLayers?.[key]) {
|
|
5561
5558
|
newConfig.coordinationSpace.spatialRasterLayers[key].forEach((layer, index) => {
|
|
5562
5559
|
if (newConfig.coordinationSpace) {
|
|
5563
5560
|
newConfig.coordinationSpace.spatialRasterLayers[key][index].type = ["bitmask", "raster"].includes(layer.type) ? layer.type : "raster";
|
|
@@ -5701,7 +5698,7 @@ function upgradeFrom1_0_11(config) {
|
|
|
5701
5698
|
datasets,
|
|
5702
5699
|
coordinationSpace
|
|
5703
5700
|
} = newConfig;
|
|
5704
|
-
if (coordinationSpace
|
|
5701
|
+
if (coordinationSpace?.embeddingType) {
|
|
5705
5702
|
const embeddingTypes = Object.values(coordinationSpace.embeddingType);
|
|
5706
5703
|
datasets.forEach((dataset, i) => {
|
|
5707
5704
|
const { files } = dataset;
|
|
@@ -5734,7 +5731,7 @@ function upgradeFrom1_0_12(config) {
|
|
|
5734
5731
|
if (options && "factors" in options && Array.isArray(options.factors)) {
|
|
5735
5732
|
const obsLabelsTypeScopes = [];
|
|
5736
5733
|
options.factors.forEach((olt) => {
|
|
5737
|
-
const nextScope = getNextScope(Object.keys(
|
|
5734
|
+
const nextScope = getNextScope(Object.keys(coordinationSpace?.obsLabelsType || {}));
|
|
5738
5735
|
newCoordinationSpace.obsLabelsType = {
|
|
5739
5736
|
...newCoordinationSpace.obsLabelsType,
|
|
5740
5737
|
// Need to remove the obs/ prefix.
|
|
@@ -5748,8 +5745,7 @@ function upgradeFrom1_0_12(config) {
|
|
|
5748
5745
|
});
|
|
5749
5746
|
});
|
|
5750
5747
|
function getDatasetUidForView(viewDef) {
|
|
5751
|
-
|
|
5752
|
-
if (((_a = viewDef.coordinationScopes) == null ? void 0 : _a.dataset) && typeof ((_b = viewDef.coordinationScopes) == null ? void 0 : _b.dataset) === "string") {
|
|
5748
|
+
if (viewDef.coordinationScopes?.dataset && typeof viewDef.coordinationScopes?.dataset === "string") {
|
|
5753
5749
|
return newCoordinationSpace.dataset[viewDef.coordinationScopes.dataset];
|
|
5754
5750
|
}
|
|
5755
5751
|
if (datasets.length > 0) {
|
|
@@ -5812,8 +5808,7 @@ function upgradeFrom1_0_14(config) {
|
|
|
5812
5808
|
};
|
|
5813
5809
|
newLayout.forEach((viewDef) => {
|
|
5814
5810
|
Object.entries(propAnalogies).forEach(([oldProp, newType]) => {
|
|
5815
|
-
|
|
5816
|
-
if ((_a = viewDef.props) == null ? void 0 : _a[oldProp]) {
|
|
5811
|
+
if (viewDef.props?.[oldProp]) {
|
|
5817
5812
|
log.warn(`Warning: the '${oldProp}' prop on the ${viewDef.component} view is deprecated. Please use the '${newType}' coordination type instead.`);
|
|
5818
5813
|
}
|
|
5819
5814
|
});
|
|
@@ -5830,7 +5825,7 @@ function upgradeFrom1_0_15(config) {
|
|
|
5830
5825
|
const newLayout = layout.map((view) => {
|
|
5831
5826
|
const { coordinationScopes } = view;
|
|
5832
5827
|
const newCoordinationScopes = {};
|
|
5833
|
-
if (
|
|
5828
|
+
if (coordinationScopes?.dataset && Array.isArray(coordinationScopes.dataset)) {
|
|
5834
5829
|
const coordinationScopesBy = {
|
|
5835
5830
|
dataset: {}
|
|
5836
5831
|
};
|
|
@@ -8037,6 +8032,7 @@ const FileType$1 = {
|
|
|
8037
8032
|
// Neuroglancer
|
|
8038
8033
|
// Precomputed (mesh) format
|
|
8039
8034
|
OBS_SEGMENTATIONS_NG_PRECOMPUTED: "obsSegmentations.ng-precomputed",
|
|
8035
|
+
OBS_POINTS_NG_ANNOTATIONS: "obsPoints.ng-annotations",
|
|
8040
8036
|
// New file types to support old file types:
|
|
8041
8037
|
// - cells.json
|
|
8042
8038
|
OBS_EMBEDDING_CELLS_JSON: "obsEmbedding.cells.json",
|
|
@@ -8265,6 +8261,7 @@ const CoordinationType$1 = {
|
|
|
8265
8261
|
[FileType$1.FEATURE_LABELS_MUDATA_ZARR]: DataType$1.FEATURE_LABELS,
|
|
8266
8262
|
[FileType$1.OBS_SEGMENTATIONS_GLB]: DataType$1.OBS_SEGMENTATIONS,
|
|
8267
8263
|
[FileType$1.OBS_SEGMENTATIONS_NG_PRECOMPUTED]: DataType$1.OBS_SEGMENTATIONS,
|
|
8264
|
+
[FileType$1.OBS_POINTS_NG_ANNOTATIONS]: DataType$1.OBS_POINTS,
|
|
8268
8265
|
[FileType$1.IMAGE_SPATIALDATA_ZARR]: DataType$1.IMAGE,
|
|
8269
8266
|
[FileType$1.LABELS_SPATIALDATA_ZARR]: DataType$1.OBS_SEGMENTATIONS,
|
|
8270
8267
|
[FileType$1.SHAPES_SPATIALDATA_ZARR]: DataType$1.OBS_SEGMENTATIONS,
|
|
@@ -8484,6 +8481,8 @@ const CoordinationType$1 = {
|
|
|
8484
8481
|
];
|
|
8485
8482
|
({
|
|
8486
8483
|
[ViewType$1.NEUROGLANCER]: [
|
|
8484
|
+
CoordinationType$1.META_COORDINATION_SCOPES,
|
|
8485
|
+
CoordinationType$1.META_COORDINATION_SCOPES_BY,
|
|
8487
8486
|
CoordinationType$1.DATASET,
|
|
8488
8487
|
CoordinationType$1.SPATIAL_TARGET_X,
|
|
8489
8488
|
CoordinationType$1.SPATIAL_TARGET_Y,
|
|
@@ -8505,7 +8504,26 @@ const CoordinationType$1 = {
|
|
|
8505
8504
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
8506
8505
|
CoordinationType$1.EMBEDDING_TYPE,
|
|
8507
8506
|
CoordinationType$1.ADDITIONAL_OBS_SETS,
|
|
8508
|
-
CoordinationType$1.TOOLTIPS_VISIBLE
|
|
8507
|
+
CoordinationType$1.TOOLTIPS_VISIBLE,
|
|
8508
|
+
CoordinationType$1.FILE_UID,
|
|
8509
|
+
CoordinationType$1.IMAGE_LAYER,
|
|
8510
|
+
CoordinationType$1.SEGMENTATION_LAYER,
|
|
8511
|
+
CoordinationType$1.IMAGE_CHANNEL,
|
|
8512
|
+
CoordinationType$1.SEGMENTATION_CHANNEL,
|
|
8513
|
+
CoordinationType$1.POINT_LAYER,
|
|
8514
|
+
CoordinationType$1.FEATURE_COLOR,
|
|
8515
|
+
CoordinationType$1.FEATURE_FILTER_MODE,
|
|
8516
|
+
CoordinationType$1.FEATURE_HIGHLIGHT,
|
|
8517
|
+
CoordinationType$1.FEATURE_SELECTION,
|
|
8518
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
|
8519
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
|
8520
|
+
CoordinationType$1.SPATIAL_LAYER_COLOR,
|
|
8521
|
+
CoordinationType$1.SPATIAL_LAYER_OPACITY,
|
|
8522
|
+
CoordinationType$1.SPATIAL_LAYER_VISIBLE,
|
|
8523
|
+
CoordinationType$1.SPATIAL_CHANNEL_COLOR,
|
|
8524
|
+
CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
|
|
8525
|
+
CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
|
|
8526
|
+
CoordinationType$1.LEGEND_VISIBLE
|
|
8509
8527
|
],
|
|
8510
8528
|
[ViewType$1.SCATTERPLOT]: [
|
|
8511
8529
|
CoordinationType$1.DATASET,
|
|
@@ -9336,7 +9354,7 @@ const VERSIONED_CONFIG_SCHEMAS = {
|
|
|
9336
9354
|
};
|
|
9337
9355
|
function refineCoordinationTypes(config, ctx) {
|
|
9338
9356
|
if ("version" in config) {
|
|
9339
|
-
const version = config
|
|
9357
|
+
const version = config?.version;
|
|
9340
9358
|
const deprecatedCoordinationTypes = Object.entries(CoordinationType).filter(([prevConstant, v]) => semverExports.gte(version, v[2])).map(([prevConstant]) => prevConstant);
|
|
9341
9359
|
deprecatedCoordinationTypes.forEach((prevConstant) => {
|
|
9342
9360
|
const newTypeName = CoordinationType[prevConstant][3];
|
|
@@ -9352,11 +9370,11 @@ function refineCoordinationTypes(config, ctx) {
|
|
|
9352
9370
|
}
|
|
9353
9371
|
}
|
|
9354
9372
|
function upgradeAndParse(config, onConfigUpgrade = null) {
|
|
9355
|
-
if (
|
|
9373
|
+
if (config?.version === latestConfigSchema.shape.version.value) {
|
|
9356
9374
|
return latestConfigSchema.parse(config);
|
|
9357
9375
|
}
|
|
9358
9376
|
const versions = SCHEMA_HANDLERS.map(([zodSchema]) => configSchemaToVersion(zodSchema));
|
|
9359
|
-
if (versions.includes(config
|
|
9377
|
+
if (versions.includes(config?.version)) {
|
|
9360
9378
|
const versionIndex = versions.indexOf(config.version);
|
|
9361
9379
|
let upgradable = SCHEMA_HANDLERS[versionIndex][0];
|
|
9362
9380
|
SCHEMA_HANDLERS.slice(versionIndex, SCHEMA_HANDLERS.length).forEach((versionInfo) => {
|
|
@@ -9683,17 +9701,26 @@ const meshGlbSchema = z.object({
|
|
|
9683
9701
|
sceneScaleZ: z.number(),
|
|
9684
9702
|
materialSide: z.enum(["front", "back"])
|
|
9685
9703
|
}).partial().nullable();
|
|
9686
|
-
const
|
|
9704
|
+
const ngPrecomputedMeshSchema = z.object({
|
|
9687
9705
|
// TODO: Should this explicitly specify sharded vs. unsharded?
|
|
9688
9706
|
// Or can/should that be inferred from the data?
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9707
|
+
// Note: None of these make sense to specify at the file level, since they
|
|
9708
|
+
// are global camera settings that would apply to all layers.
|
|
9709
|
+
// Intead, initial values should be set via the usual coordination space mechanism,
|
|
9710
|
+
// and the NeuroglancerSubscriber should handle conversion into values to pass to Neuroglancer.
|
|
9711
|
+
// dimensionX: z.number(),
|
|
9712
|
+
// dimensionY: z.number(),
|
|
9713
|
+
// dimensionZ: z.number(),
|
|
9714
|
+
// dimensionUnit: z.enum(['nm', 'um', 'µm', 'mm', 'cm', 'm']),
|
|
9693
9715
|
// TODO: should the following be passed via coordination types instead?
|
|
9694
|
-
projectionScale: z.number(),
|
|
9695
|
-
position: z.array(z.number()).length(3),
|
|
9696
|
-
projectionOrientation: z.array(z.number()).length(4)
|
|
9716
|
+
// projectionScale: z.number(),
|
|
9717
|
+
// position: z.array(z.number()).length(3),
|
|
9718
|
+
// projectionOrientation: z.array(z.number()).length(4),
|
|
9719
|
+
}).partial().nullable();
|
|
9720
|
+
const ngPointAnnotationSchema = z.object({
|
|
9721
|
+
projectionAnnotationSpacing: z.number(),
|
|
9722
|
+
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."),
|
|
9723
|
+
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.")
|
|
9697
9724
|
}).partial().nullable();
|
|
9698
9725
|
const obsEmbeddingAnndataSchema = annDataObsEmbedding;
|
|
9699
9726
|
const obsSpotsAnndataSchema = annDataObsLocations;
|
|
@@ -9921,7 +9948,8 @@ export {
|
|
|
9921
9948
|
meshGlbSchema,
|
|
9922
9949
|
moleculesLayerObj,
|
|
9923
9950
|
neighborhoodsLayerObj,
|
|
9924
|
-
|
|
9951
|
+
ngPointAnnotationSchema,
|
|
9952
|
+
ngPrecomputedMeshSchema,
|
|
9925
9953
|
obsEmbeddingAnndataSchema,
|
|
9926
9954
|
obsEmbeddingCsvSchema,
|
|
9927
9955
|
obsEmbeddingSpatialdataSchema,
|
|
@@ -384,30 +384,19 @@ export declare const meshGlbSchema: z.ZodNullable<z.ZodObject<{
|
|
|
384
384
|
sceneScaleZ?: number | undefined;
|
|
385
385
|
materialSide?: "front" | "back" | undefined;
|
|
386
386
|
}>>;
|
|
387
|
-
export declare const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
projectionScale: z.ZodOptional<z.ZodNumber>;
|
|
393
|
-
position: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
394
|
-
projectionOrientation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
387
|
+
export declare const ngPrecomputedMeshSchema: z.ZodNullable<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
388
|
+
export declare const ngPointAnnotationSchema: z.ZodNullable<z.ZodObject<{
|
|
389
|
+
projectionAnnotationSpacing: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
featureIndexProp: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
391
|
+
pointIndexProp: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
395
392
|
}, "strip", z.ZodTypeAny, {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
dimensionUnit?: "nm" | "um" | "µm" | "mm" | "cm" | "m" | undefined;
|
|
400
|
-
projectionScale?: number | undefined;
|
|
401
|
-
position?: number[] | undefined;
|
|
402
|
-
projectionOrientation?: number[] | undefined;
|
|
393
|
+
projectionAnnotationSpacing?: number | undefined;
|
|
394
|
+
featureIndexProp?: string | undefined;
|
|
395
|
+
pointIndexProp?: string | undefined;
|
|
403
396
|
}, {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
dimensionUnit?: "nm" | "um" | "µm" | "mm" | "cm" | "m" | undefined;
|
|
408
|
-
projectionScale?: number | undefined;
|
|
409
|
-
position?: number[] | undefined;
|
|
410
|
-
projectionOrientation?: number[] | undefined;
|
|
397
|
+
projectionAnnotationSpacing?: number | undefined;
|
|
398
|
+
featureIndexProp?: string | undefined;
|
|
399
|
+
pointIndexProp?: string | undefined;
|
|
411
400
|
}>>;
|
|
412
401
|
/**
|
|
413
402
|
* Options schemas for atomic file types.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-def-options.d.ts","sourceRoot":"","sources":["../src/file-def-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuKxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxC,CAAC;AAGH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxC,CAAC;AAIH,eAAO,MAAM,sBAAsB;;;;;;;;;EAKjC,CAAC;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;EAS5C,CAAC;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;EAcrC,CAAC;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;EAKxC,CAAC;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAQpC,CAAC;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;EAO5C,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;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;;;;;;;;;;;;;EA2BtB,CAAC"}
|
|
@@ -263,17 +263,30 @@ export const meshGlbSchema = z.object({
|
|
|
263
263
|
materialSide: z.enum(['front', 'back']),
|
|
264
264
|
}).partial().nullable();
|
|
265
265
|
// NG
|
|
266
|
-
export const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
266
|
+
export const ngPrecomputedMeshSchema = z.object({
|
|
267
|
+
// TODO: Should this explicitly specify sharded vs. unsharded?
|
|
268
|
+
// Or can/should that be inferred from the data?
|
|
269
|
+
// Note: None of these make sense to specify at the file level, since they
|
|
270
|
+
// are global camera settings that would apply to all layers.
|
|
271
|
+
// Intead, initial values should be set via the usual coordination space mechanism,
|
|
272
|
+
// and the NeuroglancerSubscriber should handle conversion into values to pass to Neuroglancer.
|
|
273
|
+
// dimensionX: z.number(),
|
|
274
|
+
// dimensionY: z.number(),
|
|
275
|
+
// dimensionZ: z.number(),
|
|
276
|
+
// dimensionUnit: z.enum(['nm', 'um', 'µm', 'mm', 'cm', 'm']),
|
|
277
|
+
// TODO: should the following be passed via coordination types instead?
|
|
278
|
+
// projectionScale: z.number(),
|
|
279
|
+
// position: z.array(z.number()).length(3),
|
|
280
|
+
// projectionOrientation: z.array(z.number()).length(4),
|
|
281
|
+
}).partial().nullable();
|
|
282
|
+
export const ngPointAnnotationSchema = z.object({
|
|
283
|
+
projectionAnnotationSpacing: z.number(),
|
|
284
|
+
featureIndexProp: z.string()
|
|
285
|
+
.optional()
|
|
286
|
+
.describe('The name of the Neuroglancer AnnotationProperty containing feature IDs. For example, specify \'gene\' to use prop_gene() in the Neuroglancer shader code.'),
|
|
287
|
+
pointIndexProp: z.string()
|
|
288
|
+
.optional()
|
|
289
|
+
.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.'),
|
|
277
290
|
}).partial().nullable();
|
|
278
291
|
/**
|
|
279
292
|
* Options schemas for atomic file types.
|
package/dist-tsc/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { latestConfigSchema } from './previous-config-meta.js';
|
|
|
3
3
|
export { latestFileDefSchema } from './previous-config-schemas.js';
|
|
4
4
|
export { upgradeAndParse, VERSIONED_CONFIG_SCHEMAS } from './view-config-versions.js';
|
|
5
5
|
export { rasterJsonSchema } from './raster-json.js';
|
|
6
|
-
export { obsEmbeddingCsvSchema, obsSetsCsvSchema, obsSpotsCsvSchema, obsPointsCsvSchema, obsLocationsCsvSchema, obsLabelsCsvSchema, featureLabelsCsvSchema, sampleSetsCsvSchema, obsSetsAnndataSchema, sampleSetsAnndataSchema, obsEmbeddingAnndataSchema, obsSpotsAnndataSchema, obsPointsAnndataSchema, obsLocationsAnndataSchema, obsLabelsAnndataSchema, obsFeatureMatrixAnndataSchema, obsFeatureColumnsAnndataSchema, obsSegmentationsAnndataSchema, featureLabelsAnndataSchema, sampleEdgesAnndataSchema, comparisonMetadataAnndataSchema, featureStatsAnndataSchema, featureSetStatsAnndataSchema, obsSetStatsAnndataSchema, anndataZarrSchema, anndataH5adSchema, spatialdataZarrSchema, imageOmeZarrSchema, imageOmeTiffSchema, imageSpatialdataSchema, obsSegmentationsOmeTiffSchema, obsSegmentationsOmeZarrSchema, obsSegmentationsSpatialdataSchema, obsFeatureMatrixSpatialdataSchema, obsSpotsSpatialdataSchema, obsPointsSpatialdataSchema, obsLocationsSpatialdataSchema, obsSetsSpatialdataSchema, obsEmbeddingSpatialdataSchema, meshGlbSchema,
|
|
6
|
+
export { obsEmbeddingCsvSchema, obsSetsCsvSchema, obsSpotsCsvSchema, obsPointsCsvSchema, obsLocationsCsvSchema, obsLabelsCsvSchema, featureLabelsCsvSchema, sampleSetsCsvSchema, obsSetsAnndataSchema, sampleSetsAnndataSchema, obsEmbeddingAnndataSchema, obsSpotsAnndataSchema, obsPointsAnndataSchema, obsLocationsAnndataSchema, obsLabelsAnndataSchema, obsFeatureMatrixAnndataSchema, obsFeatureColumnsAnndataSchema, obsSegmentationsAnndataSchema, featureLabelsAnndataSchema, sampleEdgesAnndataSchema, comparisonMetadataAnndataSchema, featureStatsAnndataSchema, featureSetStatsAnndataSchema, obsSetStatsAnndataSchema, anndataZarrSchema, anndataH5adSchema, spatialdataZarrSchema, imageOmeZarrSchema, imageOmeTiffSchema, imageSpatialdataSchema, obsSegmentationsOmeTiffSchema, obsSegmentationsOmeZarrSchema, obsSegmentationsSpatialdataSchema, obsFeatureMatrixSpatialdataSchema, obsSpotsSpatialdataSchema, obsPointsSpatialdataSchema, obsLocationsSpatialdataSchema, obsSetsSpatialdataSchema, obsEmbeddingSpatialdataSchema, meshGlbSchema, ngPrecomputedMeshSchema, ngPointAnnotationSchema, } from './file-def-options.js';
|
|
7
7
|
export { anndataCellsZarrSchema, anndataCellSetsZarrSchema, anndataExpressionMatrixZarrSchema, cellsJsonSchema, } from './file-def-options-legacy.js';
|
|
8
8
|
export { obsSetPath, rgbArray, obsSetsSchema, obsSetsTabularSchema, } from './shared.js';
|
|
9
9
|
export { imageLayerObj, cellsLayerObj, neighborhoodsLayerObj, moleculesLayerObj, } from './spatial-layers.js';
|
package/dist-tsc/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EA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,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,iCAAiC,EACjC,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,aAAa,EACb,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,iCAAiC,EACjC,eAAe,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"}
|
package/dist-tsc/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { latestConfigSchema } from './previous-config-meta.js';
|
|
|
3
3
|
export { latestFileDefSchema } from './previous-config-schemas.js';
|
|
4
4
|
export { upgradeAndParse, VERSIONED_CONFIG_SCHEMAS } from './view-config-versions.js';
|
|
5
5
|
export { rasterJsonSchema } from './raster-json.js';
|
|
6
|
-
export { obsEmbeddingCsvSchema, obsSetsCsvSchema, obsSpotsCsvSchema, obsPointsCsvSchema, obsLocationsCsvSchema, obsLabelsCsvSchema, featureLabelsCsvSchema, sampleSetsCsvSchema, obsSetsAnndataSchema, sampleSetsAnndataSchema, obsEmbeddingAnndataSchema, obsSpotsAnndataSchema, obsPointsAnndataSchema, obsLocationsAnndataSchema, obsLabelsAnndataSchema, obsFeatureMatrixAnndataSchema, obsFeatureColumnsAnndataSchema, obsSegmentationsAnndataSchema, featureLabelsAnndataSchema, sampleEdgesAnndataSchema, comparisonMetadataAnndataSchema, featureStatsAnndataSchema, featureSetStatsAnndataSchema, obsSetStatsAnndataSchema, anndataZarrSchema, anndataH5adSchema, spatialdataZarrSchema, imageOmeZarrSchema, imageOmeTiffSchema, imageSpatialdataSchema, obsSegmentationsOmeTiffSchema, obsSegmentationsOmeZarrSchema, obsSegmentationsSpatialdataSchema, obsFeatureMatrixSpatialdataSchema, obsSpotsSpatialdataSchema, obsPointsSpatialdataSchema, obsLocationsSpatialdataSchema, obsSetsSpatialdataSchema, obsEmbeddingSpatialdataSchema, meshGlbSchema,
|
|
6
|
+
export { obsEmbeddingCsvSchema, obsSetsCsvSchema, obsSpotsCsvSchema, obsPointsCsvSchema, obsLocationsCsvSchema, obsLabelsCsvSchema, featureLabelsCsvSchema, sampleSetsCsvSchema, obsSetsAnndataSchema, sampleSetsAnndataSchema, obsEmbeddingAnndataSchema, obsSpotsAnndataSchema, obsPointsAnndataSchema, obsLocationsAnndataSchema, obsLabelsAnndataSchema, obsFeatureMatrixAnndataSchema, obsFeatureColumnsAnndataSchema, obsSegmentationsAnndataSchema, featureLabelsAnndataSchema, sampleEdgesAnndataSchema, comparisonMetadataAnndataSchema, featureStatsAnndataSchema, featureSetStatsAnndataSchema, obsSetStatsAnndataSchema, anndataZarrSchema, anndataH5adSchema, spatialdataZarrSchema, imageOmeZarrSchema, imageOmeTiffSchema, imageSpatialdataSchema, obsSegmentationsOmeTiffSchema, obsSegmentationsOmeZarrSchema, obsSegmentationsSpatialdataSchema, obsFeatureMatrixSpatialdataSchema, obsSpotsSpatialdataSchema, obsPointsSpatialdataSchema, obsLocationsSpatialdataSchema, obsSetsSpatialdataSchema, obsEmbeddingSpatialdataSchema, meshGlbSchema, ngPrecomputedMeshSchema, ngPointAnnotationSchema, } from './file-def-options.js';
|
|
7
7
|
export { anndataCellsZarrSchema, anndataCellSetsZarrSchema, anndataExpressionMatrixZarrSchema, cellsJsonSchema, } from './file-def-options-legacy.js';
|
|
8
8
|
export { obsSetPath, rgbArray, obsSetsSchema, obsSetsTabularSchema, } from './shared.js';
|
|
9
9
|
export { imageLayerObj, cellsLayerObj, neighborhoodsLayerObj, moleculesLayerObj, } from './spatial-layers.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/schemas",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-test.0",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"semver": "^7.3.8",
|
|
24
24
|
"uuid": "^9.0.0",
|
|
25
25
|
"zod": "^3.21.4",
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
28
|
-
"@vitessce/constants-internal": "
|
|
29
|
-
"@vitessce/
|
|
30
|
-
"@vitessce/
|
|
26
|
+
"@vitessce/utils": "4.0.0-test.0",
|
|
27
|
+
"@vitessce/globals": "4.0.0-test.0",
|
|
28
|
+
"@vitessce/constants-internal": "4.0.0-test.0",
|
|
29
|
+
"@vitessce/constants": "4.0.0-test.0",
|
|
30
|
+
"@vitessce/plugins": "4.0.0-test.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"json-schema-to-zod": "^0.6.3",
|
package/src/file-def-options.ts
CHANGED
|
@@ -291,17 +291,31 @@ export const meshGlbSchema = z.object({
|
|
|
291
291
|
}).partial().nullable();
|
|
292
292
|
|
|
293
293
|
// NG
|
|
294
|
-
export const
|
|
294
|
+
export const ngPrecomputedMeshSchema = z.object({
|
|
295
295
|
// TODO: Should this explicitly specify sharded vs. unsharded?
|
|
296
296
|
// Or can/should that be inferred from the data?
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
|
|
298
|
+
// Note: None of these make sense to specify at the file level, since they
|
|
299
|
+
// are global camera settings that would apply to all layers.
|
|
300
|
+
// Intead, initial values should be set via the usual coordination space mechanism,
|
|
301
|
+
// and the NeuroglancerSubscriber should handle conversion into values to pass to Neuroglancer.
|
|
302
|
+
// dimensionX: z.number(),
|
|
303
|
+
// dimensionY: z.number(),
|
|
304
|
+
// dimensionZ: z.number(),
|
|
305
|
+
// dimensionUnit: z.enum(['nm', 'um', 'µm', 'mm', 'cm', 'm']),
|
|
301
306
|
// TODO: should the following be passed via coordination types instead?
|
|
302
|
-
projectionScale: z.number(),
|
|
303
|
-
position: z.array(z.number()).length(3),
|
|
304
|
-
projectionOrientation: z.array(z.number()).length(4),
|
|
307
|
+
// projectionScale: z.number(),
|
|
308
|
+
// position: z.array(z.number()).length(3),
|
|
309
|
+
// projectionOrientation: z.array(z.number()).length(4),
|
|
310
|
+
}).partial().nullable();
|
|
311
|
+
export const ngPointAnnotationSchema = z.object({
|
|
312
|
+
projectionAnnotationSpacing: z.number(),
|
|
313
|
+
featureIndexProp: z.string()
|
|
314
|
+
.optional()
|
|
315
|
+
.describe('The name of the Neuroglancer AnnotationProperty containing feature IDs. For example, specify \'gene\' to use prop_gene() in the Neuroglancer shader code.'),
|
|
316
|
+
pointIndexProp: z.string()
|
|
317
|
+
.optional()
|
|
318
|
+
.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.'),
|
|
305
319
|
}).partial().nullable();
|
|
306
320
|
|
|
307
321
|
/**
|
package/src/index.ts
CHANGED