@vitessce/types 3.3.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @vitessce/types
2
+
3
+ A source for types that can be shared across sub-packages.
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,62 @@
1
+ declare type MatrixResult = {
2
+ data: number[] | Float32Array[];
3
+ shape: number[];
4
+ };
5
+ export declare type ObsFeatureMatrixData = {
6
+ obsIndex: string[];
7
+ featureIndex: string[];
8
+ obsFeatureMatrix: MatrixResult;
9
+ };
10
+ export declare type ObsEmbeddingData = {
11
+ obsIndex: string[];
12
+ obsEmbedding: MatrixResult;
13
+ };
14
+ export declare type ObsLocationsData = {
15
+ obsIndex: string[];
16
+ obsLocations: MatrixResult;
17
+ };
18
+ export declare type ObsPointsData = {
19
+ obsIndex: string[];
20
+ obsPoints: MatrixResult;
21
+ };
22
+ export declare type ObsSpotsDatat = {
23
+ obsIndex: string[];
24
+ obsSpots: MatrixResult;
25
+ };
26
+ export declare type ObsSegmentationsPolygons = {
27
+ obsSegmentations: {
28
+ data: number[][][];
29
+ shape: number[];
30
+ };
31
+ obsSegmentationsType: 'polygon';
32
+ };
33
+ export declare type ObsSegmentationsData = ObsSegmentationsPolygons;
34
+ export declare type FeatureLabelsData = {
35
+ featureIndex: string[];
36
+ featureLabels: string[];
37
+ };
38
+ export declare type ObsLabelsData = {
39
+ obsIndex: string[];
40
+ obsLabels: string[];
41
+ };
42
+ export declare type SetsTreeNodeLeaf = {
43
+ name: string;
44
+ color?: number[];
45
+ set: Array<[string, number | null]>;
46
+ };
47
+ export declare type SetsTreeNodeNonLeaf = {
48
+ name: string;
49
+ color?: number[];
50
+ children: Array<SetsTreeNodeNonLeaf | SetsTreeNodeLeaf>;
51
+ };
52
+ export declare type SetsTree = {
53
+ version: '0.1.3';
54
+ tree: SetsTreeNodeNonLeaf[];
55
+ };
56
+ export declare type ObsSetsData = {
57
+ obsIndex: string[];
58
+ obsSets: SetsTree;
59
+ obsSetsMembership: Map<string, string[][]>;
60
+ };
61
+ export {};
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,aAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,YAAY,CAAC;CAChC,CAAC;AAEF,oBAAY,gBAAg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ACzD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,mBAAmB,EAAE,CAAC;CAC7B,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,QAAQ,CAAC;IAClB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;CAC5C,CAAC;AAEF,OAAO,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@vitessce/types",
3
+ "version": "3.3.0",
4
+ "author": "Gehlenborg Lab",
5
+ "homepage": "http://vitessce.io",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/vitessce/vitessce.git"
9
+ },
10
+ "license": "MIT",
11
+ "type": "module",
12
+ "main": "dist/index.js",
13
+ "files": [
14
+ "src",
15
+ "dist",
16
+ "dist-tsc"
17
+ ],
18
+ "dependencies": {},
19
+ "devDependencies": {
20
+ "@types/react": "^18.0.28",
21
+ "vite": "^4.3.0",
22
+ "vitest": "^0.32.2"
23
+ },
24
+ "scripts": {
25
+ "bundle": "pnpm exec vite build -c ../../scripts/vite.config.js",
26
+ "test": "pnpm exec vitest --run"
27
+ },
28
+ "module": "dist/index.js",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist-tsc/index.d.ts",
32
+ "import": "./dist/index.js"
33
+ }
34
+ }
35
+ }
package/src/index.ts ADDED
@@ -0,0 +1,74 @@
1
+ // This is a type-only sub-package.
2
+ type MatrixResult = {
3
+ data: number[] | Float32Array[];
4
+ shape: number[];
5
+ };
6
+
7
+ export type ObsFeatureMatrixData = {
8
+ obsIndex: string[];
9
+ featureIndex: string[];
10
+ obsFeatureMatrix: MatrixResult;
11
+ };
12
+
13
+ export type ObsEmbeddingData = {
14
+ obsIndex: string[];
15
+ obsEmbedding: MatrixResult;
16
+ };
17
+
18
+ export type ObsLocationsData = {
19
+ obsIndex: string[];
20
+ obsLocations: MatrixResult;
21
+ };
22
+
23
+ export type ObsPointsData = {
24
+ obsIndex: string[];
25
+ obsPoints: MatrixResult;
26
+ };
27
+
28
+ export type ObsSpotsDatat = {
29
+ obsIndex: string[];
30
+ obsSpots: MatrixResult;
31
+ };
32
+
33
+ export type ObsSegmentationsPolygons = {
34
+ obsSegmentations: { data: number[][][], shape: number[] };
35
+ obsSegmentationsType: 'polygon';
36
+ };
37
+
38
+ // TODO: bitmask
39
+ export type ObsSegmentationsData = ObsSegmentationsPolygons;
40
+
41
+ export type FeatureLabelsData = {
42
+ featureIndex: string[];
43
+ featureLabels: string[];
44
+ };
45
+
46
+ export type ObsLabelsData = {
47
+ obsIndex: string[];
48
+ obsLabels: string[];
49
+ };
50
+
51
+ export type SetsTreeNodeLeaf = {
52
+ name: string;
53
+ color?: number[];
54
+ set: Array<[string, number | null]>;
55
+ }
56
+
57
+ export type SetsTreeNodeNonLeaf = {
58
+ name: string;
59
+ color?: number[];
60
+ children: Array<SetsTreeNodeNonLeaf | SetsTreeNodeLeaf>;
61
+ };
62
+
63
+ export type SetsTree = {
64
+ version: '0.1.3';
65
+ tree: SetsTreeNodeNonLeaf[];
66
+ };
67
+
68
+ export type ObsSetsData = {
69
+ obsIndex: string[];
70
+ obsSets: SetsTree;
71
+ obsSetsMembership: Map<string, string[][]>;
72
+ };
73
+
74
+ export {};