@vitessce/schemas 3.0.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.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +19 -0
  3. package/dist/index.js +16360 -0
  4. package/dist-tsc/file-def-options-legacy.d.ts +72 -0
  5. package/dist-tsc/file-def-options-legacy.d.ts.map +1 -0
  6. package/dist-tsc/file-def-options-legacy.js +28 -0
  7. package/dist-tsc/file-def-options.d.ts +417 -0
  8. package/dist-tsc/file-def-options.d.ts.map +1 -0
  9. package/dist-tsc/file-def-options.js +139 -0
  10. package/dist-tsc/index.d.ts +11 -0
  11. package/dist-tsc/index.d.ts.map +1 -0
  12. package/dist-tsc/index.js +10 -0
  13. package/dist-tsc/previous-config-meta.d.ts +251 -0
  14. package/dist-tsc/previous-config-meta.d.ts.map +1 -0
  15. package/dist-tsc/previous-config-meta.js +22 -0
  16. package/dist-tsc/previous-config-schemas.d.ts +4053 -0
  17. package/dist-tsc/previous-config-schemas.d.ts.map +1 -0
  18. package/dist-tsc/previous-config-schemas.js +204 -0
  19. package/dist-tsc/previous-config-upgraders.d.ts +25 -0
  20. package/dist-tsc/previous-config-upgraders.d.ts.map +1 -0
  21. package/dist-tsc/previous-config-upgraders.js +589 -0
  22. package/dist-tsc/raster-json.d.ts +274 -0
  23. package/dist-tsc/raster-json.d.ts.map +1 -0
  24. package/dist-tsc/raster-json.js +36 -0
  25. package/dist-tsc/schema-builders.d.ts +465 -0
  26. package/dist-tsc/schema-builders.d.ts.map +1 -0
  27. package/dist-tsc/schema-builders.js +127 -0
  28. package/dist-tsc/shared.d.ts +145 -0
  29. package/dist-tsc/shared.d.ts.map +1 -0
  30. package/dist-tsc/shared.js +100 -0
  31. package/dist-tsc/spatial-layers.d.ts +112 -0
  32. package/dist-tsc/spatial-layers.d.ts.map +1 -0
  33. package/dist-tsc/spatial-layers.js +81 -0
  34. package/dist-tsc/view-config-utils.test.d.ts +2 -0
  35. package/dist-tsc/view-config-utils.test.d.ts.map +1 -0
  36. package/dist-tsc/view-config-utils.test.fixtures.d.ts +495 -0
  37. package/dist-tsc/view-config-utils.test.fixtures.d.ts.map +1 -0
  38. package/dist-tsc/view-config-utils.test.fixtures.js +881 -0
  39. package/dist-tsc/view-config-utils.test.js +23 -0
  40. package/dist-tsc/view-config-versions.d.ts +6 -0
  41. package/dist-tsc/view-config-versions.d.ts.map +1 -0
  42. package/dist-tsc/view-config-versions.js +78 -0
  43. package/package.json +49 -0
  44. package/src/file-def-options-legacy.js +34 -0
  45. package/src/file-def-options.ts +158 -0
  46. package/src/index.ts +41 -0
  47. package/src/missing-types.d.ts +1 -0
  48. package/src/previous-config-meta.ts +85 -0
  49. package/src/previous-config-schemas.ts +259 -0
  50. package/src/previous-config-upgraders.ts +739 -0
  51. package/src/raster-json.ts +38 -0
  52. package/src/schema-builders.ts +179 -0
  53. package/src/shared.ts +158 -0
  54. package/src/spatial-layers.ts +103 -0
  55. package/src/view-config-utils.test.fixtures.ts +901 -0
  56. package/src/view-config-utils.test.ts +39 -0
  57. package/src/view-config-versions.ts +87 -0
@@ -0,0 +1,251 @@
1
+ import { z } from 'zod';
2
+ import { configSchema0_1_0, configSchema1_0_0, configSchema1_0_1, configSchema1_0_2, configSchema1_0_3, configSchema1_0_4, configSchema1_0_5, configSchema1_0_6, configSchema1_0_7, configSchema1_0_8, configSchema1_0_9, configSchema1_0_10, configSchema1_0_11, configSchema1_0_12, configSchema1_0_13, configSchema1_0_14, configSchema1_0_15, configSchema1_0_16 } from './previous-config-schemas.js';
3
+ export declare const latestConfigSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ public: z.ZodOptional<z.ZodBoolean>;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ datasets: z.ZodArray<z.ZodObject<{
8
+ uid: z.ZodString;
9
+ name: z.ZodOptional<z.ZodString>;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ files: z.ZodArray<z.ZodObject<{
12
+ name: z.ZodOptional<z.ZodString>;
13
+ fileType: z.ZodString;
14
+ url: z.ZodOptional<z.ZodString>;
15
+ options: z.ZodOptional<z.ZodAny>;
16
+ requestInit: z.ZodOptional<z.ZodObject<{
17
+ method: z.ZodOptional<z.ZodString>;
18
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
19
+ body: z.ZodOptional<z.ZodString>;
20
+ mode: z.ZodOptional<z.ZodString>;
21
+ credentials: z.ZodOptional<z.ZodString>;
22
+ cache: z.ZodOptional<z.ZodString>;
23
+ redirect: z.ZodOptional<z.ZodString>;
24
+ referrer: z.ZodOptional<z.ZodString>;
25
+ integrity: z.ZodOptional<z.ZodString>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ method?: string | undefined;
28
+ headers?: Record<string, any> | undefined;
29
+ body?: string | undefined;
30
+ mode?: string | undefined;
31
+ credentials?: string | undefined;
32
+ cache?: string | undefined;
33
+ redirect?: string | undefined;
34
+ referrer?: string | undefined;
35
+ integrity?: string | undefined;
36
+ }, {
37
+ method?: string | undefined;
38
+ headers?: Record<string, any> | undefined;
39
+ body?: string | undefined;
40
+ mode?: string | undefined;
41
+ credentials?: string | undefined;
42
+ cache?: string | undefined;
43
+ redirect?: string | undefined;
44
+ referrer?: string | undefined;
45
+ integrity?: string | undefined;
46
+ }>>;
47
+ coordinationValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ fileType: string;
50
+ name?: string | undefined;
51
+ url?: string | undefined;
52
+ options?: any;
53
+ requestInit?: {
54
+ method?: string | undefined;
55
+ headers?: Record<string, any> | undefined;
56
+ body?: string | undefined;
57
+ mode?: string | undefined;
58
+ credentials?: string | undefined;
59
+ cache?: string | undefined;
60
+ redirect?: string | undefined;
61
+ referrer?: string | undefined;
62
+ integrity?: string | undefined;
63
+ } | undefined;
64
+ coordinationValues?: Record<string, string> | undefined;
65
+ }, {
66
+ fileType: string;
67
+ name?: string | undefined;
68
+ url?: string | undefined;
69
+ options?: any;
70
+ requestInit?: {
71
+ method?: string | undefined;
72
+ headers?: Record<string, any> | undefined;
73
+ body?: string | undefined;
74
+ mode?: string | undefined;
75
+ credentials?: string | undefined;
76
+ cache?: string | undefined;
77
+ redirect?: string | undefined;
78
+ referrer?: string | undefined;
79
+ integrity?: string | undefined;
80
+ } | undefined;
81
+ coordinationValues?: Record<string, string> | undefined;
82
+ }>, "many">;
83
+ }, "strip", z.ZodTypeAny, {
84
+ uid: string;
85
+ files: {
86
+ fileType: string;
87
+ name?: string | undefined;
88
+ url?: string | undefined;
89
+ options?: any;
90
+ requestInit?: {
91
+ method?: string | undefined;
92
+ headers?: Record<string, any> | undefined;
93
+ body?: string | undefined;
94
+ mode?: string | undefined;
95
+ credentials?: string | undefined;
96
+ cache?: string | undefined;
97
+ redirect?: string | undefined;
98
+ referrer?: string | undefined;
99
+ integrity?: string | undefined;
100
+ } | undefined;
101
+ coordinationValues?: Record<string, string> | undefined;
102
+ }[];
103
+ name?: string | undefined;
104
+ description?: string | undefined;
105
+ }, {
106
+ uid: string;
107
+ files: {
108
+ fileType: string;
109
+ name?: string | undefined;
110
+ url?: string | undefined;
111
+ options?: any;
112
+ requestInit?: {
113
+ method?: string | undefined;
114
+ headers?: Record<string, any> | undefined;
115
+ body?: string | undefined;
116
+ mode?: string | undefined;
117
+ credentials?: string | undefined;
118
+ cache?: string | undefined;
119
+ redirect?: string | undefined;
120
+ referrer?: string | undefined;
121
+ integrity?: string | undefined;
122
+ } | undefined;
123
+ coordinationValues?: Record<string, string> | undefined;
124
+ }[];
125
+ name?: string | undefined;
126
+ description?: string | undefined;
127
+ }>, "many">;
128
+ coordinationSpace: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodRecord<z.ZodString, z.ZodAny>, z.objectOutputType<{}, z.ZodRecord<z.ZodString, z.ZodAny>, "strip">, z.objectInputType<{}, z.ZodRecord<z.ZodString, z.ZodAny>, "strip">>>;
129
+ initStrategy: z.ZodEnum<["none", "auto"]>;
130
+ version: z.ZodLiteral<"1.0.16">;
131
+ uid: z.ZodOptional<z.ZodString>;
132
+ layout: z.ZodArray<z.ZodObject<{
133
+ uid: z.ZodOptional<z.ZodString>;
134
+ component: z.ZodString;
135
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
136
+ x: z.ZodNumber;
137
+ y: z.ZodNumber;
138
+ w: z.ZodOptional<z.ZodNumber>;
139
+ h: z.ZodOptional<z.ZodNumber>;
140
+ coordinationScopes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
141
+ coordinationScopesBy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>>>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ component: string;
144
+ x: number;
145
+ y: number;
146
+ uid?: string | undefined;
147
+ props?: Record<string, any> | undefined;
148
+ w?: number | undefined;
149
+ h?: number | undefined;
150
+ coordinationScopes?: Record<string, string | string[]> | undefined;
151
+ coordinationScopesBy?: Record<string, Record<string, Record<string, string | string[]>>> | undefined;
152
+ }, {
153
+ component: string;
154
+ x: number;
155
+ y: number;
156
+ uid?: string | undefined;
157
+ props?: Record<string, any> | undefined;
158
+ w?: number | undefined;
159
+ h?: number | undefined;
160
+ coordinationScopes?: Record<string, string | string[]> | undefined;
161
+ coordinationScopesBy?: Record<string, Record<string, Record<string, string | string[]>>> | undefined;
162
+ }>, "many">;
163
+ }, "strip", z.ZodTypeAny, {
164
+ name: string;
165
+ version: "1.0.16";
166
+ datasets: {
167
+ uid: string;
168
+ files: {
169
+ fileType: string;
170
+ name?: string | undefined;
171
+ url?: string | undefined;
172
+ options?: any;
173
+ requestInit?: {
174
+ method?: string | undefined;
175
+ headers?: Record<string, any> | undefined;
176
+ body?: string | undefined;
177
+ mode?: string | undefined;
178
+ credentials?: string | undefined;
179
+ cache?: string | undefined;
180
+ redirect?: string | undefined;
181
+ referrer?: string | undefined;
182
+ integrity?: string | undefined;
183
+ } | undefined;
184
+ coordinationValues?: Record<string, string> | undefined;
185
+ }[];
186
+ name?: string | undefined;
187
+ description?: string | undefined;
188
+ }[];
189
+ layout: {
190
+ component: string;
191
+ x: number;
192
+ y: number;
193
+ uid?: string | undefined;
194
+ props?: Record<string, any> | undefined;
195
+ w?: number | undefined;
196
+ h?: number | undefined;
197
+ coordinationScopes?: Record<string, string | string[]> | undefined;
198
+ coordinationScopesBy?: Record<string, Record<string, Record<string, string | string[]>>> | undefined;
199
+ }[];
200
+ initStrategy: "none" | "auto";
201
+ public?: boolean | undefined;
202
+ description?: string | undefined;
203
+ coordinationSpace?: z.objectOutputType<{}, z.ZodRecord<z.ZodString, z.ZodAny>, "strip"> | undefined;
204
+ uid?: string | undefined;
205
+ }, {
206
+ name: string;
207
+ version: "1.0.16";
208
+ datasets: {
209
+ uid: string;
210
+ files: {
211
+ fileType: string;
212
+ name?: string | undefined;
213
+ url?: string | undefined;
214
+ options?: any;
215
+ requestInit?: {
216
+ method?: string | undefined;
217
+ headers?: Record<string, any> | undefined;
218
+ body?: string | undefined;
219
+ mode?: string | undefined;
220
+ credentials?: string | undefined;
221
+ cache?: string | undefined;
222
+ redirect?: string | undefined;
223
+ referrer?: string | undefined;
224
+ integrity?: string | undefined;
225
+ } | undefined;
226
+ coordinationValues?: Record<string, string> | undefined;
227
+ }[];
228
+ name?: string | undefined;
229
+ description?: string | undefined;
230
+ }[];
231
+ layout: {
232
+ component: string;
233
+ x: number;
234
+ y: number;
235
+ uid?: string | undefined;
236
+ props?: Record<string, any> | undefined;
237
+ w?: number | undefined;
238
+ h?: number | undefined;
239
+ coordinationScopes?: Record<string, string | string[]> | undefined;
240
+ coordinationScopesBy?: Record<string, Record<string, Record<string, string | string[]>>> | undefined;
241
+ }[];
242
+ initStrategy: "none" | "auto";
243
+ public?: boolean | undefined;
244
+ description?: string | undefined;
245
+ coordinationSpace?: z.objectInputType<{}, z.ZodRecord<z.ZodString, z.ZodAny>, "strip"> | undefined;
246
+ uid?: string | undefined;
247
+ }>;
248
+ export declare type AnyVersionConfig = z.infer<typeof configSchema0_1_0> | z.infer<typeof configSchema1_0_0> | z.infer<typeof configSchema1_0_1> | z.infer<typeof configSchema1_0_2> | z.infer<typeof configSchema1_0_3> | z.infer<typeof configSchema1_0_4> | z.infer<typeof configSchema1_0_5> | z.infer<typeof configSchema1_0_6> | z.infer<typeof configSchema1_0_7> | z.infer<typeof configSchema1_0_8> | z.infer<typeof configSchema1_0_9> | z.infer<typeof configSchema1_0_10> | z.infer<typeof configSchema1_0_11> | z.infer<typeof configSchema1_0_12> | z.infer<typeof configSchema1_0_13> | z.infer<typeof configSchema1_0_14> | z.infer<typeof configSchema1_0_15> | z.infer<typeof configSchema1_0_16>;
249
+ export declare type UpgradeFunction = (config: any) => AnyVersionConfig;
250
+ export declare const SCHEMA_HANDLERS: [z.ZodTypeAny, UpgradeFunction][];
251
+ //# sourceMappingURL=previous-config-meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"previous-config-meta.d.ts","sourceRoot":"","sources":["../src/previous-config-meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAqBtC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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MAAM,eAAe,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,eAAe,CAAC,EAkB5D,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { configSchema0_1_0, configSchema1_0_0, configSchema1_0_1, configSchema1_0_2, configSchema1_0_3, configSchema1_0_4, configSchema1_0_5, configSchema1_0_6, configSchema1_0_7, configSchema1_0_8, configSchema1_0_9, configSchema1_0_10, configSchema1_0_11, configSchema1_0_12, configSchema1_0_13, configSchema1_0_14, configSchema1_0_15, configSchema1_0_16, } from './previous-config-schemas.js';
2
+ import { upgradeFrom0_1_0, upgradeFrom1_0_0, upgradeFrom1_0_1, upgradeFrom1_0_2, upgradeFrom1_0_3, upgradeFrom1_0_4, upgradeFrom1_0_5, upgradeFrom1_0_6, upgradeFrom1_0_7, upgradeFrom1_0_8, upgradeFrom1_0_9, upgradeFrom1_0_10, upgradeFrom1_0_11, upgradeFrom1_0_12, upgradeFrom1_0_13, upgradeFrom1_0_14, upgradeFrom1_0_15, } from './previous-config-upgraders.js';
3
+ export const latestConfigSchema = configSchema1_0_16;
4
+ export const SCHEMA_HANDLERS = [
5
+ [configSchema0_1_0, upgradeFrom0_1_0],
6
+ [configSchema1_0_0, upgradeFrom1_0_0],
7
+ [configSchema1_0_1, upgradeFrom1_0_1],
8
+ [configSchema1_0_2, upgradeFrom1_0_2],
9
+ [configSchema1_0_3, upgradeFrom1_0_3],
10
+ [configSchema1_0_4, upgradeFrom1_0_4],
11
+ [configSchema1_0_5, upgradeFrom1_0_5],
12
+ [configSchema1_0_6, upgradeFrom1_0_6],
13
+ [configSchema1_0_7, upgradeFrom1_0_7],
14
+ [configSchema1_0_8, upgradeFrom1_0_8],
15
+ [configSchema1_0_9, upgradeFrom1_0_9],
16
+ [configSchema1_0_10, upgradeFrom1_0_10],
17
+ [configSchema1_0_11, upgradeFrom1_0_11],
18
+ [configSchema1_0_12, upgradeFrom1_0_12],
19
+ [configSchema1_0_13, upgradeFrom1_0_13],
20
+ [configSchema1_0_14, upgradeFrom1_0_14],
21
+ [configSchema1_0_15, upgradeFrom1_0_15],
22
+ ];