@vitessce/vit-s 2.0.3-beta.0 → 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 (277) hide show
  1. package/dist/index.js +41348 -18
  2. package/dist-tsc/CallbackPublisher.d.ts +18 -0
  3. package/dist-tsc/CallbackPublisher.d.ts.map +1 -0
  4. package/{dist → dist-tsc}/CallbackPublisher.js +6 -12
  5. package/dist-tsc/LoadingIndicator.d.ts +2 -0
  6. package/dist-tsc/LoadingIndicator.d.ts.map +1 -0
  7. package/{dist → dist-tsc}/LoadingIndicator.js +1 -2
  8. package/dist-tsc/TitleInfo.d.ts +2 -0
  9. package/dist-tsc/TitleInfo.d.ts.map +1 -0
  10. package/{dist → dist-tsc}/TitleInfo.js +6 -83
  11. package/dist-tsc/VitS.d.ts +45 -0
  12. package/dist-tsc/VitS.d.ts.map +1 -0
  13. package/dist-tsc/VitS.js +119 -0
  14. package/dist-tsc/VitessceGrid.d.ts +23 -0
  15. package/dist-tsc/VitessceGrid.d.ts.map +1 -0
  16. package/{dist → dist-tsc}/VitessceGrid.js +14 -13
  17. package/dist-tsc/VitessceGrid.test.d.ts +2 -0
  18. package/dist-tsc/VitessceGrid.test.d.ts.map +1 -0
  19. package/{dist → dist-tsc}/VitessceGrid.test.js +8 -4
  20. package/dist-tsc/Warning.d.ts +2 -0
  21. package/dist-tsc/Warning.d.ts.map +1 -0
  22. package/{dist → dist-tsc}/Warning.js +2 -2
  23. package/dist-tsc/classNames.d.ts +8 -0
  24. package/dist-tsc/classNames.d.ts.map +1 -0
  25. package/dist-tsc/data/AbstractLoader.d.ts +22 -0
  26. package/dist-tsc/data/AbstractLoader.d.ts.map +1 -0
  27. package/dist-tsc/data/AbstractLoader.js +18 -0
  28. package/dist-tsc/data/AbstractTwoStepLoader.d.ts +6 -0
  29. package/dist-tsc/data/AbstractTwoStepLoader.d.ts.map +1 -0
  30. package/{dist → dist-tsc}/data/AbstractTwoStepLoader.js +1 -1
  31. package/dist-tsc/data/LoaderResult.d.ts +7 -0
  32. package/dist-tsc/data/LoaderResult.d.ts.map +1 -0
  33. package/dist-tsc/data/index.d.ts +4 -0
  34. package/dist-tsc/data/index.d.ts.map +1 -0
  35. package/dist-tsc/data/index.js +3 -0
  36. package/dist-tsc/data/loader-registry.d.ts +9 -0
  37. package/dist-tsc/data/loader-registry.d.ts.map +1 -0
  38. package/dist-tsc/data/loader-registry.js +27 -0
  39. package/dist-tsc/data-hook-utils.d.ts +69 -0
  40. package/dist-tsc/data-hook-utils.d.ts.map +1 -0
  41. package/{dist → dist-tsc}/data-hook-utils.js +4 -6
  42. package/dist-tsc/data-hooks.d.ts +77 -0
  43. package/dist-tsc/data-hooks.d.ts.map +1 -0
  44. package/{dist → dist-tsc}/data-hooks.js +4 -4
  45. package/dist-tsc/errors/AbstractLoaderError.d.ts +10 -0
  46. package/dist-tsc/errors/AbstractLoaderError.d.ts.map +1 -0
  47. package/dist-tsc/errors/DataSourceFetchError.d.ts +8 -0
  48. package/dist-tsc/errors/DataSourceFetchError.d.ts.map +1 -0
  49. package/{dist → dist-tsc}/errors/DataSourceFetchError.js +1 -1
  50. package/dist-tsc/errors/DatasetNotFoundError.d.ts +6 -0
  51. package/dist-tsc/errors/DatasetNotFoundError.d.ts.map +1 -0
  52. package/{dist → dist-tsc}/errors/DatasetNotFoundError.js +1 -1
  53. package/dist-tsc/errors/LoaderNotFoundError.d.ts +10 -0
  54. package/dist-tsc/errors/LoaderNotFoundError.d.ts.map +1 -0
  55. package/{dist → dist-tsc}/errors/LoaderNotFoundError.js +1 -1
  56. package/dist-tsc/errors/LoaderValidationError.d.ts +10 -0
  57. package/dist-tsc/errors/LoaderValidationError.d.ts.map +1 -0
  58. package/{dist → dist-tsc}/errors/LoaderValidationError.js +1 -1
  59. package/dist-tsc/errors/index.d.ts +6 -0
  60. package/dist-tsc/errors/index.d.ts.map +1 -0
  61. package/{dist → dist-tsc}/errors/index.js +5 -6
  62. package/dist-tsc/hooks.d.ts +80 -0
  63. package/dist-tsc/hooks.d.ts.map +1 -0
  64. package/{dist → dist-tsc}/hooks.js +60 -4
  65. package/dist-tsc/index.d.ts +11 -0
  66. package/dist-tsc/index.d.ts.map +1 -0
  67. package/dist-tsc/index.js +11 -0
  68. package/dist-tsc/plugins.test.fixtures.d.ts +61 -0
  69. package/dist-tsc/plugins.test.fixtures.d.ts.map +1 -0
  70. package/{dist → dist-tsc}/schemas/config-1.0.16.schema.json +21 -41
  71. package/dist-tsc/schemas/obsSets.schema.d.ts +179 -0
  72. package/dist-tsc/schemas/obsSets.schema.d.ts.map +1 -0
  73. package/dist-tsc/schemas/obsSetsTabular.schema.d.ts +57 -0
  74. package/dist-tsc/schemas/obsSetsTabular.schema.d.ts.map +1 -0
  75. package/dist-tsc/schemas/raster.schema.d.ts +239 -0
  76. package/dist-tsc/schemas/raster.schema.d.ts.map +1 -0
  77. package/dist-tsc/shared-mui/components.d.ts +2 -0
  78. package/dist-tsc/shared-mui/components.d.ts.map +1 -0
  79. package/{dist → dist-tsc}/shared-mui/components.js +2 -8
  80. package/dist-tsc/shared-mui/container.d.ts +2 -0
  81. package/dist-tsc/shared-mui/container.d.ts.map +1 -0
  82. package/{dist → dist-tsc}/shared-mui/container.js +1 -1
  83. package/dist-tsc/shared-mui/styles.d.ts +5 -0
  84. package/dist-tsc/shared-mui/styles.d.ts.map +1 -0
  85. package/{dist → dist-tsc}/shared-mui/styles.js +4 -2
  86. package/dist-tsc/shared-plot-options/CellColorEncodingOption.d.ts +2 -0
  87. package/dist-tsc/shared-plot-options/CellColorEncodingOption.d.ts.map +1 -0
  88. package/{dist → dist-tsc}/shared-plot-options/CellColorEncodingOption.js +3 -4
  89. package/dist-tsc/shared-plot-options/OptionSelect.d.ts +2 -0
  90. package/dist-tsc/shared-plot-options/OptionSelect.d.ts.map +1 -0
  91. package/{dist → dist-tsc}/shared-plot-options/OptionSelect.js +2 -2
  92. package/dist-tsc/shared-plot-options/OptionsContainer.d.ts +2 -0
  93. package/dist-tsc/shared-plot-options/OptionsContainer.d.ts.map +1 -0
  94. package/{dist → dist-tsc}/shared-plot-options/OptionsContainer.js +2 -5
  95. package/dist-tsc/shared-plot-options/index.d.ts +5 -0
  96. package/dist-tsc/shared-plot-options/index.d.ts.map +1 -0
  97. package/dist-tsc/shared-plot-options/index.js +4 -0
  98. package/dist-tsc/shared-plot-options/styles.d.ts +2 -0
  99. package/dist-tsc/shared-plot-options/styles.d.ts.map +1 -0
  100. package/{dist → dist-tsc}/shared-plot-options/styles.js +1 -1
  101. package/dist-tsc/state/hooks.d.ts +216 -0
  102. package/dist-tsc/state/hooks.d.ts.map +1 -0
  103. package/{dist → dist-tsc}/state/hooks.js +47 -21
  104. package/dist-tsc/title-styles.d.ts +2 -0
  105. package/dist-tsc/title-styles.d.ts.map +1 -0
  106. package/dist-tsc/title-styles.js +72 -0
  107. package/dist-tsc/view-config-utils.d.ts +30 -0
  108. package/dist-tsc/view-config-utils.d.ts.map +1 -0
  109. package/{dist → dist-tsc}/view-config-utils.js +32 -84
  110. package/dist-tsc/view-config-utils.test.d.ts +2 -0
  111. package/dist-tsc/view-config-utils.test.d.ts.map +1 -0
  112. package/dist-tsc/view-config-utils.test.fixtures.d.ts +1049 -0
  113. package/dist-tsc/view-config-utils.test.fixtures.d.ts.map +1 -0
  114. package/{dist → dist-tsc}/view-config-utils.test.fixtures.js +118 -0
  115. package/dist-tsc/view-config-utils.test.js +209 -0
  116. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.d.ts +8 -0
  117. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.d.ts.map +1 -0
  118. package/{dist → dist-tsc}/vitessce-grid-layout/VitessceGridLayout.js +47 -28
  119. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.d.ts +2 -0
  120. package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.d.ts.map +1 -0
  121. package/{dist → dist-tsc}/vitessce-grid-layout/VitessceGridLayout.test.js +13 -5
  122. package/dist-tsc/vitessce-grid-layout/index.d.ts +2 -0
  123. package/dist-tsc/vitessce-grid-layout/index.d.ts.map +1 -0
  124. package/dist-tsc/vitessce-grid-layout/index.js +1 -0
  125. package/dist-tsc/vitessce-grid-layout/layout-utils.d.ts +15 -0
  126. package/dist-tsc/vitessce-grid-layout/layout-utils.d.ts.map +1 -0
  127. package/{dist → dist-tsc}/vitessce-grid-layout/layout-utils.js +2 -1
  128. package/dist-tsc/vitessce-grid-layout/layout-utils.test.d.ts +2 -0
  129. package/dist-tsc/vitessce-grid-layout/layout-utils.test.d.ts.map +1 -0
  130. package/{dist → dist-tsc}/vitessce-grid-layout/layout-utils.test.js +3 -1
  131. package/dist-tsc/vitessce-grid-utils.d.ts +13 -0
  132. package/dist-tsc/vitessce-grid-utils.d.ts.map +1 -0
  133. package/{dist → dist-tsc}/vitessce-grid-utils.js +15 -14
  134. package/package.json +24 -11
  135. package/src/CallbackPublisher.js +77 -0
  136. package/src/LoadingIndicator.js +33 -0
  137. package/src/TitleInfo.js +167 -0
  138. package/src/VitS.js +202 -0
  139. package/src/VitessceGrid.js +118 -0
  140. package/src/VitessceGrid.test.jsx +57 -0
  141. package/src/Warning.js +62 -0
  142. package/src/classNames.js +8 -0
  143. package/src/data/AbstractLoader.js +23 -0
  144. package/src/data/AbstractTwoStepLoader.js +8 -0
  145. package/src/data/LoaderResult.js +8 -0
  146. package/src/data/index.js +3 -0
  147. package/src/data/loader-registry.js +28 -0
  148. package/src/data-hook-utils.js +195 -0
  149. package/src/data-hooks.js +354 -0
  150. package/src/errors/AbstractLoaderError.js +14 -0
  151. package/src/errors/DataSourceFetchError.js +15 -0
  152. package/src/errors/DatasetNotFoundError.js +23 -0
  153. package/src/errors/LoaderNotFoundError.js +24 -0
  154. package/src/errors/LoaderValidationError.js +23 -0
  155. package/src/errors/index.js +5 -0
  156. package/src/hooks.js +317 -0
  157. package/src/index.js +76 -0
  158. package/src/plugins.test.fixtures.js +78 -0
  159. package/src/schemas/config-0.1.0.schema.json +85 -0
  160. package/src/schemas/config-1.0.0.schema.json +733 -0
  161. package/src/schemas/config-1.0.1.schema.json +909 -0
  162. package/src/schemas/config-1.0.10.schema.json +969 -0
  163. package/src/schemas/config-1.0.11.schema.json +990 -0
  164. package/src/schemas/config-1.0.12.schema.json +997 -0
  165. package/src/schemas/config-1.0.13.schema.json +1013 -0
  166. package/src/schemas/config-1.0.14.schema.json +1048 -0
  167. package/src/schemas/config-1.0.15.schema.json +1048 -0
  168. package/src/schemas/config-1.0.16.schema.json +1089 -0
  169. package/src/schemas/config-1.0.2.schema.json +911 -0
  170. package/src/schemas/config-1.0.3.schema.json +911 -0
  171. package/src/schemas/config-1.0.4.schema.json +949 -0
  172. package/src/schemas/config-1.0.5.schema.json +949 -0
  173. package/src/schemas/config-1.0.6.schema.json +950 -0
  174. package/src/schemas/config-1.0.7.schema.json +950 -0
  175. package/src/schemas/config-1.0.8.schema.json +966 -0
  176. package/src/schemas/config-1.0.9.schema.json +965 -0
  177. package/src/schemas/fixtures/cellSets.good.json +16 -0
  178. package/src/schemas/fixtures/config-1.0.1.bad.json +1 -0
  179. package/src/schemas/fixtures/config-1.0.1.bad.message.json +11 -0
  180. package/src/schemas/fixtures/config-1.0.1.good.json +37 -0
  181. package/src/schemas/fixtures/config-1.0.2.bad.json +1 -0
  182. package/src/schemas/fixtures/config-1.0.2.bad.message.json +11 -0
  183. package/src/schemas/fixtures/config-1.0.2.good.json +38 -0
  184. package/src/schemas/fixtures/config-1.0.3.bad.json +1 -0
  185. package/src/schemas/fixtures/config-1.0.3.bad.message.json +11 -0
  186. package/src/schemas/fixtures/config-1.0.3.good.json +38 -0
  187. package/src/schemas/fixtures/obsSets.bad.json +1 -0
  188. package/src/schemas/fixtures/obsSets.bad.message.json +11 -0
  189. package/src/schemas/fixtures/obsSets.good.json +16 -0
  190. package/src/schemas/fixtures/obsSetsTabular.bad.json +1 -0
  191. package/src/schemas/fixtures/obsSetsTabular.bad.message.json +11 -0
  192. package/src/schemas/fixtures/obsSetsTabular.good.json +26 -0
  193. package/src/schemas/fixtures/raster.bad.json +1 -0
  194. package/src/schemas/fixtures/raster.bad.message.json +11 -0
  195. package/src/schemas/fixtures/raster.good.json +39 -0
  196. package/src/schemas/obsSets.schema.js +195 -0
  197. package/src/schemas/obsSetsTabular.schema.js +39 -0
  198. package/src/schemas/raster.schema.js +121 -0
  199. package/src/schemas/schema-schema.sh +34 -0
  200. package/src/shared-mui/components.js +81 -0
  201. package/src/shared-mui/container.js +212 -0
  202. package/src/shared-mui/styles.js +113 -0
  203. package/src/shared-plot-options/CellColorEncodingOption.js +42 -0
  204. package/src/shared-plot-options/OptionSelect.js +19 -0
  205. package/src/shared-plot-options/OptionsContainer.js +23 -0
  206. package/src/shared-plot-options/index.js +4 -0
  207. package/src/shared-plot-options/styles.js +49 -0
  208. package/src/state/hooks.js +640 -0
  209. package/src/title-styles.js +73 -0
  210. package/src/view-config-utils.js +263 -0
  211. package/src/view-config-utils.test.fixtures.js +893 -0
  212. package/src/view-config-utils.test.jsx +222 -0
  213. package/src/vitessce-grid-layout/VitessceGridLayout.js +179 -0
  214. package/src/vitessce-grid-layout/VitessceGridLayout.test.jsx +64 -0
  215. package/src/vitessce-grid-layout/index.js +1 -0
  216. package/src/vitessce-grid-layout/layout-utils.js +76 -0
  217. package/src/vitessce-grid-layout/layout-utils.test.js +167 -0
  218. package/src/vitessce-grid-utils.js +172 -0
  219. package/dist/VitS.js +0 -117
  220. package/dist/Vitessce.integration.test.js +0 -36
  221. package/dist/Vitessce.js +0 -101
  222. package/dist/component-registry.js +0 -16
  223. package/dist/data/AbstractLoader.js +0 -35
  224. package/dist/data/index.js +0 -3
  225. package/dist/data/loader-registry.js +0 -15
  226. package/dist/errors/OptionsValidationError.js +0 -15
  227. package/dist/export-utils.js +0 -70
  228. package/dist/export-utils.test.js +0 -66
  229. package/dist/file-options-schemas-legacy.js +0 -136
  230. package/dist/file-options-schemas-legacy.test.js +0 -126
  231. package/dist/file-options-schemas.js +0 -322
  232. package/dist/file-options-schemas.test.js +0 -23
  233. package/dist/joint-file-types-legacy.js +0 -278
  234. package/dist/joint-file-types-legacy.test.js +0 -400
  235. package/dist/joint-file-types.js +0 -148
  236. package/dist/joint-file-types.test.js +0 -139
  237. package/dist/loader-registry.js +0 -98
  238. package/dist/plugins.js +0 -154
  239. package/dist/plugins.test.js +0 -30
  240. package/dist/schemas/PrettyJsonSchema.js +0 -34
  241. package/dist/schemas/config-1.0.15.schema.test.js +0 -22
  242. package/dist/schemas/config-1.0.16.schema.test.js +0 -22
  243. package/dist/schemas/obs-sets-tabular.schema.js +0 -37
  244. package/dist/schemas/obs-sets.schema.js +0 -194
  245. package/dist/schemas/schema.test-old.js +0 -50
  246. package/dist/schemas/schema.test.js +0 -46
  247. package/dist/schemas-extra.js +0 -3
  248. package/dist/schemas.js +0 -4
  249. package/dist/shared-plot-options/index.js +0 -4
  250. package/dist/view-config-upgraders.js +0 -525
  251. package/dist/view-config-utils.test.js +0 -66
  252. package/dist/view-config-versions.js +0 -47
  253. package/dist/vitessce-grid-layout/index.js +0 -1
  254. /package/{dist → dist-tsc}/classNames.js +0 -0
  255. /package/{dist → dist-tsc}/data/LoaderResult.js +0 -0
  256. /package/{dist → dist-tsc}/errors/AbstractLoaderError.js +0 -0
  257. /package/{dist → dist-tsc}/plugins.test.fixtures.js +0 -0
  258. /package/{dist → dist-tsc}/schemas/config-0.1.0.schema.json +0 -0
  259. /package/{dist → dist-tsc}/schemas/config-1.0.0.schema.json +0 -0
  260. /package/{dist → dist-tsc}/schemas/config-1.0.1.schema.json +0 -0
  261. /package/{dist → dist-tsc}/schemas/config-1.0.10.schema.json +0 -0
  262. /package/{dist → dist-tsc}/schemas/config-1.0.11.schema.json +0 -0
  263. /package/{dist → dist-tsc}/schemas/config-1.0.12.schema.json +0 -0
  264. /package/{dist → dist-tsc}/schemas/config-1.0.13.schema.json +0 -0
  265. /package/{dist → dist-tsc}/schemas/config-1.0.14.schema.json +0 -0
  266. /package/{dist → dist-tsc}/schemas/config-1.0.15.schema.json +0 -0
  267. /package/{dist → dist-tsc}/schemas/config-1.0.2.schema.json +0 -0
  268. /package/{dist → dist-tsc}/schemas/config-1.0.3.schema.json +0 -0
  269. /package/{dist → dist-tsc}/schemas/config-1.0.4.schema.json +0 -0
  270. /package/{dist → dist-tsc}/schemas/config-1.0.5.schema.json +0 -0
  271. /package/{dist → dist-tsc}/schemas/config-1.0.6.schema.json +0 -0
  272. /package/{dist → dist-tsc}/schemas/config-1.0.7.schema.json +0 -0
  273. /package/{dist → dist-tsc}/schemas/config-1.0.8.schema.json +0 -0
  274. /package/{dist → dist-tsc}/schemas/config-1.0.9.schema.json +0 -0
  275. /package/{dist → dist-tsc}/schemas/obsSets.schema.js +0 -0
  276. /package/{dist → dist-tsc}/schemas/obsSetsTabular.schema.js +0 -0
  277. /package/{dist → dist-tsc}/schemas/raster.schema.js +0 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This is a dummy component which handles
3
+ * publishing new view configs and loaders to
4
+ * the provided callbacks on changes.
5
+ * @param {object} props
6
+ * @param {function} props.onConfigChange A callback function
7
+ * to execute on each change of the Vitessce view config.
8
+ * @param {function} props.onLoaderChange A callback function
9
+ * to execute on each change of the loaders object.
10
+ * @param {boolean} props.validateOnConfigChange Whether to validate
11
+ * against the view config schema when publishing changes.
12
+ */
13
+ export default function CallbackPublisher(props: {
14
+ onConfigChange: Function;
15
+ onLoaderChange: Function;
16
+ validateOnConfigChange: boolean;
17
+ }): null;
18
+ //# sourceMappingURL=CallbackPublisher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallbackPublisher.d.ts","sourceRoot":"","sources":["../src/CallbackPublisher.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;GAWG;AACH;IAP2B,cAAc;IAEd,cAAc;IAEf,sBAAsB,EAArC,OAAO;SAoDjB"}
@@ -1,16 +1,10 @@
1
1
  import { useEffect } from 'react';
2
- import { SCHEMA_HANDLERS, LATEST_VERSION } from './view-config-versions';
3
- import { useViewConfigStoreApi, useLoaders, useWarning } from './state/hooks';
4
- function validateViewConfig(viewConfig) {
2
+ import { useViewConfigStoreApi, useLoaders, useWarning } from './state/hooks.js';
3
+ function validateViewConfig(viewConfig, pluginSpecificConfigSchema) {
5
4
  // Need the try-catch here since Zustand will actually
6
5
  // just catch and ignore errors in its subscription callbacks.
7
6
  try {
8
- const validate = SCHEMA_HANDLERS[LATEST_VERSION][0];
9
- const valid = validate(viewConfig);
10
- if (!valid) {
11
- const failureReason = JSON.stringify(validate.errors, null, 2);
12
- throw new Error(`Config validation failed: ${failureReason}`);
13
- }
7
+ pluginSpecificConfigSchema.parse(viewConfig);
14
8
  }
15
9
  catch (e) {
16
10
  console.error(e);
@@ -30,7 +24,7 @@ function validateViewConfig(viewConfig) {
30
24
  * against the view config schema when publishing changes.
31
25
  */
32
26
  export default function CallbackPublisher(props) {
33
- const { onWarn, onConfigChange, onLoaderChange, validateOnConfigChange, } = props;
27
+ const { onWarn, onConfigChange, onLoaderChange, validateOnConfigChange, pluginSpecificConfigSchema, } = props;
34
28
  const warning = useWarning();
35
29
  const loaders = useLoaders();
36
30
  const viewConfigStoreApi = useViewConfigStoreApi();
@@ -42,7 +36,7 @@ export default function CallbackPublisher(props) {
42
36
  // The function to run on each publish.
43
37
  (viewConfig) => {
44
38
  if (validateOnConfigChange && viewConfig) {
45
- validateViewConfig(viewConfig);
39
+ validateViewConfig(viewConfig, pluginSpecificConfigSchema);
46
40
  }
47
41
  if (onConfigChange && viewConfig) {
48
42
  onConfigChange(viewConfig);
@@ -50,7 +44,7 @@ export default function CallbackPublisher(props) {
50
44
  },
51
45
  // The function to specify which part of the store
52
46
  // we want to subscribe to.
53
- state => state.viewConfig), [onConfigChange, validateOnConfigChange, viewConfigStoreApi]);
47
+ state => state.viewConfig), [onConfigChange, validateOnConfigChange, viewConfigStoreApi, pluginSpecificConfigSchema]);
54
48
  // Emit updates to the warning message.
55
49
  useEffect(() => {
56
50
  if (onWarn && warning) {
@@ -0,0 +1,2 @@
1
+ export default function LoadingIndicator(): JSX.Element;
2
+ //# sourceMappingURL=LoadingIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingIndicator.d.ts","sourceRoot":"","sources":["../src/LoadingIndicator.js"],"names":[],"mappings":"AAuBA,wDASC"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { makeStyles } from '@material-ui/core/styles';
4
- import CircularProgress from '@material-ui/core/CircularProgress';
3
+ import { makeStyles, CircularProgress } from '@material-ui/core';
5
4
  const useStyles = makeStyles(() => ({
6
5
  loadingIndicatorBackdrop: {
7
6
  position: 'absolute',
@@ -0,0 +1,2 @@
1
+ export function TitleInfo(props: any): JSX.Element;
2
+ //# sourceMappingURL=TitleInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleInfo.d.ts","sourceRoot":"","sources":["../src/TitleInfo.js"],"names":[],"mappings":"AAuHA,mDA+CC"}
@@ -1,18 +1,12 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useState } from 'react';
3
3
  import clsx from 'clsx';
4
- import { makeStyles } from '@material-ui/core/styles';
5
- import CloudDownloadIcon from '@material-ui/icons/CloudDownload';
6
- import MenuItem from '@material-ui/core/MenuItem';
7
- import IconButton from '@material-ui/core/IconButton';
8
- import Link from '@material-ui/core/Link';
9
- import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
10
- import ArrowDropUpIcon from '@material-ui/icons/ArrowDropUp';
11
- import SettingsIcon from '@material-ui/icons/Settings';
12
- import CloseIcon from '@material-ui/icons/Close';
13
- import { TOOLTIP_ANCESTOR } from './classNames';
14
- import LoadingIndicator from './LoadingIndicator';
15
- import { PopperMenu } from './shared-mui/components';
4
+ import { makeStyles, MenuItem, IconButton, Link } from '@material-ui/core';
5
+ import { CloudDownload as CloudDownloadIcon, ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon, Settings as SettingsIcon, Close as CloseIcon, } from '@material-ui/icons';
6
+ import { TOOLTIP_ANCESTOR } from './classNames.js';
7
+ import LoadingIndicator from './LoadingIndicator.js';
8
+ import { PopperMenu } from './shared-mui/components.js';
9
+ import { useTitleStyles } from './title-styles.js';
16
10
  const useStyles = makeStyles(theme => ({
17
11
  iconButton: {
18
12
  border: 'none',
@@ -65,77 +59,6 @@ function ClosePaneButton(props) {
65
59
  const classes = useStyles();
66
60
  return (_jsx(IconButton, { onClick: removeGridComponent, size: "small", className: classes.iconButton, title: "close", children: _jsx(CloseIcon, {}) }));
67
61
  }
68
- export const useTitleStyles = makeStyles(theme => ({
69
- title: {
70
- color: theme.palette.primaryForeground,
71
- overflowX: 'hidden',
72
- display: 'flex',
73
- flexDirection: 'row',
74
- flexShrink: '0',
75
- },
76
- titleLeft: {
77
- flexShrink: '1',
78
- textOverflow: 'ellipsis',
79
- whiteSpace: 'nowrap',
80
- },
81
- titleInfo: {
82
- width: '100%',
83
- textOverflow: 'ellipsis',
84
- whiteSpace: 'nowrap',
85
- overflow: 'hidden',
86
- fontSize: '80% !important',
87
- opacity: '.8',
88
- padding: '0 4px',
89
- justifyContent: 'center',
90
- lineHeight: '25px !important',
91
- flexShrink: '1',
92
- textAlign: 'right !important',
93
- },
94
- titleButtons: {
95
- display: 'flex',
96
- flexDirection: 'row',
97
- flexGrow: '1',
98
- flexShrink: '0',
99
- justifyContent: 'right',
100
- '& div': {
101
- display: 'inline-block',
102
- },
103
- },
104
- card: {
105
- border: `1px solid ${theme.palette.cardBorder}`,
106
- flex: '1 1 auto',
107
- minHeight: '1px',
108
- padding: '12px',
109
- marginTop: '8px',
110
- marginBottom: '8px',
111
- position: 'relative',
112
- display: 'flex',
113
- flexDirection: 'column',
114
- minWidth: '0',
115
- wordWrap: 'break-word',
116
- backgroundClip: 'border-box',
117
- borderRadius: '4px',
118
- },
119
- noScrollCard: {
120
- backgroundColor: theme.palette.secondaryBackground,
121
- color: theme.palette.secondaryForeground,
122
- },
123
- scrollCard: {
124
- backgroundColor: theme.palette.primaryBackground,
125
- color: theme.palette.primaryForeground,
126
- '& a': {
127
- color: theme.palette.primaryForegroundActive,
128
- },
129
- overflowY: 'auto',
130
- },
131
- spatialCard: {
132
- backgroundColor: theme.palette.black,
133
- color: theme.palette.white,
134
- '& a': {
135
- color: theme.palette.white,
136
- },
137
- },
138
- }));
139
62
  export function TitleInfo(props) {
140
63
  const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, } = props;
141
64
  const classes = useTitleStyles();
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The Vitessce component.
3
+ * @param {object} props
4
+ * @param {object} props.config A Vitessce view config.
5
+ * If the config is valid, the VitessceGrid will be rendered as a child.
6
+ * If the config is invalid, a Warning will be rendered instead.
7
+ * @param {undefined|number} props.rowHeight Row height for grid layout. Optional.
8
+ * @param {number} props.height Total height for grid layout. Optional.
9
+ * @param {string} props.theme The theme, used for styling as
10
+ * light or dark. Optional. By default, "dark"
11
+ * @param {function} props.onWarn A callback for warning messages. Optional.
12
+ * @param {function} props.onConfigChange A callback for view config
13
+ * updates. Optional.
14
+ * @param {function} props.onLoaderChange A callback for loader
15
+ * updates. Optional.
16
+ * @param {boolean} props.validateOnConfigChange Whether to validate
17
+ * against the view config schema when publishing changes. Use for debugging
18
+ * purposes, as this may have a performance impact. By default, false.
19
+ * @param {undefined|string} props.uid A unique identifier for this Vitessce instance,
20
+ * for the purpose of avoiding CSS autogenerated class name conflicts. Must be valid as part
21
+ * of a CSS class name string.
22
+ * @param {array} props.viewTypes Plugin view types.
23
+ * @param {array} props.fileTypes Plugin file types.
24
+ * @param {array} props.jointFileTypes Plugin joint file types.
25
+ * @param {array} props.coordinationTypes Plugin coordination types.
26
+ * @param {null|object} props.warning A warning to render within the Vitessce grid,
27
+ * provided by the parent.
28
+ */
29
+ export function VitS(props: {
30
+ config: object;
31
+ rowHeight: undefined | number;
32
+ height: number;
33
+ theme: string;
34
+ onWarn: Function;
35
+ onConfigChange: Function;
36
+ onLoaderChange: Function;
37
+ validateOnConfigChange: boolean;
38
+ uid: undefined | string;
39
+ viewTypes: array;
40
+ fileTypes: array;
41
+ jointFileTypes: array;
42
+ coordinationTypes: array;
43
+ warning: null | object;
44
+ }): JSX.Element;
45
+ //# sourceMappingURL=VitS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitS.d.ts","sourceRoot":"","sources":["../src/VitS.js"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IAzByB,MAAM,EAApB,MAAM;IAGkB,SAAS,EAAjC,SAAS,GAAC,MAAM;IACF,MAAM,EAApB,MAAM;IACQ,KAAK,EAAnB,MAAM;IAEU,MAAM;IACN,cAAc;IAEd,cAAc;IAEf,sBAAsB,EAArC,OAAO;IAGiB,GAAG,EAA3B,SAAS,GAAC,MAAM;IAGH,SAAS;IACT,SAAS;IACT,cAAc;IACd,iBAAiB;IACX,OAAO,EAA1B,IAAI,GAAC,MAAM;gBAiJrB"}
@@ -0,0 +1,119 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useEffect, useMemo } from 'react';
3
+ import { ThemeProvider, StylesProvider, createGenerateClassName, } from '@material-ui/core/es/styles/index.js';
4
+ import { isEqual } from 'lodash-es';
5
+ import { META_VERSION } from '@vitessce/constants-internal';
6
+ import { buildConfigSchema, latestConfigSchema } from '@vitessce/schemas';
7
+ import { muiTheme } from './shared-mui/styles.js';
8
+ import { ViewConfigProvider, createViewConfigStore, AuxiliaryProvider, createAuxiliaryStore, } from './state/hooks.js';
9
+ import VitessceGrid from './VitessceGrid.js';
10
+ import { Warning } from './Warning.js';
11
+ import CallbackPublisher from './CallbackPublisher.js';
12
+ import { initialize, } from './view-config-utils.js';
13
+ function logConfig(config, name) {
14
+ console.groupCollapsed(`🚄 Vitessce (${META_VERSION.version}) ${name}`);
15
+ console.info(`data:,${JSON.stringify(config)}`);
16
+ console.info(JSON.stringify(config, null, 2));
17
+ console.groupEnd();
18
+ }
19
+ /**
20
+ * The Vitessce component.
21
+ * @param {object} props
22
+ * @param {object} props.config A Vitessce view config.
23
+ * If the config is valid, the VitessceGrid will be rendered as a child.
24
+ * If the config is invalid, a Warning will be rendered instead.
25
+ * @param {undefined|number} props.rowHeight Row height for grid layout. Optional.
26
+ * @param {number} props.height Total height for grid layout. Optional.
27
+ * @param {string} props.theme The theme, used for styling as
28
+ * light or dark. Optional. By default, "dark"
29
+ * @param {function} props.onWarn A callback for warning messages. Optional.
30
+ * @param {function} props.onConfigChange A callback for view config
31
+ * updates. Optional.
32
+ * @param {function} props.onLoaderChange A callback for loader
33
+ * updates. Optional.
34
+ * @param {boolean} props.validateOnConfigChange Whether to validate
35
+ * against the view config schema when publishing changes. Use for debugging
36
+ * purposes, as this may have a performance impact. By default, false.
37
+ * @param {undefined|string} props.uid A unique identifier for this Vitessce instance,
38
+ * for the purpose of avoiding CSS autogenerated class name conflicts. Must be valid as part
39
+ * of a CSS class name string.
40
+ * @param {array} props.viewTypes Plugin view types.
41
+ * @param {array} props.fileTypes Plugin file types.
42
+ * @param {array} props.jointFileTypes Plugin joint file types.
43
+ * @param {array} props.coordinationTypes Plugin coordination types.
44
+ * @param {null|object} props.warning A warning to render within the Vitessce grid,
45
+ * provided by the parent.
46
+ */
47
+ export function VitS(props) {
48
+ const { config, rowHeight, height, theme, onWarn, onConfigChange, onLoaderChange, validateOnConfigChange = false, isBounded = false, uid, viewTypes: viewTypesProp, fileTypes: fileTypesProp, jointFileTypes: jointFileTypesProp, coordinationTypes: coordinationTypesProp, warning, } = props;
49
+ const viewTypes = useMemo(() => (viewTypesProp || []), [viewTypesProp]);
50
+ const fileTypes = useMemo(() => (fileTypesProp || []), [fileTypesProp]);
51
+ const jointFileTypes = useMemo(() => (jointFileTypesProp || []), [jointFileTypesProp]);
52
+ const coordinationTypes = useMemo(() => (coordinationTypesProp || []), [coordinationTypesProp]);
53
+ const generateClassName = useMemo(() => createGenerateClassName({
54
+ disableGlobal: false,
55
+ // Avoid conflicts with portal-ui MUI class names,
56
+ // and allow setting a UID.
57
+ productionPrefix: (uid ? `vit${uid}` : 'vit'),
58
+ }), [uid]);
59
+ const configUid = config?.uid;
60
+ const configVersion = config?.version;
61
+ const pluginSpecificConfigSchema = useMemo(() => buildConfigSchema(fileTypes, jointFileTypes, coordinationTypes, viewTypes), [viewTypes, fileTypes, jointFileTypes, coordinationTypes]);
62
+ // Process the view config and memoize the result:
63
+ // - Validate.
64
+ // - Upgrade, if legacy schema.
65
+ // - Validate after upgrade, if legacy schema.
66
+ // - Initialize (based on initStrategy).
67
+ const [configOrWarning, success] = useMemo(() => {
68
+ if (warning) {
69
+ return [warning, false];
70
+ }
71
+ logConfig(config, 'input view config');
72
+ const result = latestConfigSchema.safeParse(config);
73
+ if (result.success) {
74
+ const upgradedConfig = result.data;
75
+ logConfig(upgradedConfig, 'upgraded view config');
76
+ // Perform second round of parsing against plugin-specific config schema.
77
+ const pluginSpecificResult = pluginSpecificConfigSchema.safeParse(upgradedConfig);
78
+ // Initialize the view config according to the initStrategy.
79
+ if (pluginSpecificResult.success) {
80
+ try {
81
+ const upgradedConfigWithValidPlugins = pluginSpecificResult.data;
82
+ const initializedConfig = initialize(upgradedConfigWithValidPlugins, jointFileTypes, coordinationTypes, viewTypes);
83
+ logConfig(initializedConfig, 'initialized view config');
84
+ return [initializedConfig, true];
85
+ }
86
+ catch (e) {
87
+ return [
88
+ {
89
+ title: 'Config initialization failed.',
90
+ unformatted: e.message,
91
+ },
92
+ false,
93
+ ];
94
+ }
95
+ }
96
+ return [
97
+ {
98
+ title: 'Config validation failed on second pass.',
99
+ unformatted: pluginSpecificResult.error.message,
100
+ },
101
+ false,
102
+ ];
103
+ }
104
+ return [{
105
+ title: 'Config validation failed on first pass.',
106
+ unformatted: result.error.message,
107
+ }, result.success];
108
+ // eslint-disable-next-line react-hooks/exhaustive-deps
109
+ }, [configUid, configVersion, pluginSpecificConfigSchema, warning]);
110
+ // Emit the upgraded/initialized view config
111
+ // to onConfigChange if necessary.
112
+ useEffect(() => {
113
+ if (success && !isEqual(configOrWarning, config) && onConfigChange) {
114
+ onConfigChange(configOrWarning);
115
+ }
116
+ // eslint-disable-next-line react-hooks/exhaustive-deps
117
+ }, [success, configUid, configOrWarning, onConfigChange]);
118
+ return success ? (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(ViewConfigProvider, { createStore: createViewConfigStore, children: _jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [_jsx(VitessceGrid, { viewTypes: viewTypes, fileTypes: fileTypes, coordinationTypes: coordinationTypes, config: configOrWarning, rowHeight: rowHeight, height: height, theme: theme, isBounded: isBounded }), _jsx(CallbackPublisher, { onWarn: onWarn, onConfigChange: onConfigChange, onLoaderChange: onLoaderChange, validateOnConfigChange: validateOnConfigChange, pluginSpecificConfigSchema: pluginSpecificConfigSchema })] }) }) }) })) : (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(Warning, { ...configOrWarning }) }) }));
119
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The wrapper for the VitessceGrid and LoadingIndicator components.
3
+ * @param {object} props
4
+ * @param {number} props.rowHeight The height of each grid row. Optional.
5
+ * @param {object} props.config The view config.
6
+ * @param {string} props.theme The theme name.
7
+ * @param {number} props.height Total height for grid. Optional.
8
+ * @param {function} props.onWarn A callback for warning messages. Optional.
9
+ * @param {PluginViewType[]} props.viewTypes
10
+ * @param {PluginFileType[]} props.fileTypes
11
+ * @param {PluginCoordinationType[]} props.coordinationTypes
12
+ */
13
+ export default function VitessceGrid(props: {
14
+ rowHeight: number;
15
+ config: object;
16
+ theme: string;
17
+ height: number;
18
+ onWarn: Function;
19
+ viewTypes: PluginViewType[];
20
+ fileTypes: PluginFileType[];
21
+ coordinationTypes: PluginCoordinationType[];
22
+ }): JSX.Element;
23
+ //# sourceMappingURL=VitessceGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitessceGrid.d.ts","sourceRoot":"","sources":["../src/VitessceGrid.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH;IATyB,SAAS,EAAvB,MAAM;IACQ,MAAM,EAApB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,MAAM,EAApB,MAAM;IACU,MAAM;IACE,SAAS,EAAjC,gBAAgB;IACQ,SAAS,EAAjC,gBAAgB;IACgB,iBAAiB,EAAjD,wBAAwB;gBAiFlC"}
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React, { useEffect, useCallback, } from 'react';
3
3
  import clsx from 'clsx';
4
- import { VITESSCE_CONTAINER } from './classNames';
5
- import { VitessceGridLayout } from './vitessce-grid-layout';
6
- import { useRowHeight, createLoaders } from './vitessce-grid-utils';
7
- import { useViewConfigStoreApi, useSetViewConfig, useSetLoaders, useEmitGridResize, useRemoveComponent, useChangeLayout, useLayout, } from './state/hooks';
8
- import { useClosestVitessceContainerSize, } from './hooks';
9
- import { useVitessceContainerStyles } from './shared-mui/container';
10
- import { useTitleStyles } from './TitleInfo';
4
+ import { VITESSCE_CONTAINER } from './classNames.js';
5
+ import { VitessceGridLayout } from './vitessce-grid-layout/index.js';
6
+ import { useRowHeight, createLoaders } from './vitessce-grid-utils.js';
7
+ import { useViewConfigStoreApi, useSetViewConfig, useSetLoaders, useEmitGridResize, useRemoveComponent, useChangeLayout, useLayout, } from './state/hooks.js';
8
+ import { useClosestVitessceContainerSize, } from './hooks.js';
9
+ import { useVitessceContainerStyles } from './shared-mui/container.js';
10
+ import { useTitleStyles } from './title-styles.js';
11
11
  const padding = 10;
12
12
  const margin = 5;
13
13
  /**
@@ -15,14 +15,15 @@ const margin = 5;
15
15
  * @param {object} props
16
16
  * @param {number} props.rowHeight The height of each grid row. Optional.
17
17
  * @param {object} props.config The view config.
18
- * @param {function} props.getComponent A function that maps component names to their
19
- * React counterparts.
20
18
  * @param {string} props.theme The theme name.
21
19
  * @param {number} props.height Total height for grid. Optional.
22
20
  * @param {function} props.onWarn A callback for warning messages. Optional.
21
+ * @param {PluginViewType[]} props.viewTypes
22
+ * @param {PluginFileType[]} props.fileTypes
23
+ * @param {PluginCoordinationType[]} props.coordinationTypes
23
24
  */
24
25
  export default function VitessceGrid(props) {
25
- const { rowHeight: initialRowHeight, config, getComponent, theme, height, isBounded, } = props;
26
+ const { rowHeight: initialRowHeight, config, theme, height, isBounded, viewTypes, fileTypes, coordinationTypes, } = props;
26
27
  const [rowHeight, containerRef] = useRowHeight(config, initialRowHeight, height, margin, padding);
27
28
  const onResize = useEmitGridResize();
28
29
  const [componentWidth] = useClosestVitessceContainerSize(containerRef);
@@ -47,13 +48,13 @@ export default function VitessceGrid(props) {
47
48
  useEffect(() => {
48
49
  if (config) {
49
50
  setViewConfig(config);
50
- const loaders = createLoaders(config.datasets, config.description);
51
+ const loaders = createLoaders(config.datasets, config.description, fileTypes, coordinationTypes);
51
52
  setLoaders(loaders);
52
53
  }
53
54
  else {
54
55
  // No config found, so clear the loaders.
55
56
  setLoaders({});
56
57
  }
57
- }, [config, setViewConfig, setLoaders]);
58
- return (_jsx("div", { ref: containerRef, className: clsx(VITESSCE_CONTAINER, classes.vitessceContainer), children: layout && (_jsx(VitessceGridLayout, { layout: layout, height: height, rowHeight: rowHeight, theme: theme, getComponent: getComponent, draggableHandle: titleClasses.title, margin: margin, padding: padding, onRemoveComponent: removeComponent, onLayoutChange: changeLayoutPostMount, isBounded: isBounded, onResize: onResize, onResizeStop: onResize })) }));
58
+ }, [config, setViewConfig, setLoaders, fileTypes, coordinationTypes]);
59
+ return (_jsx("div", { ref: containerRef, className: clsx(VITESSCE_CONTAINER, classes.vitessceContainer), children: layout && (_jsx(VitessceGridLayout, { layout: layout, height: height, rowHeight: rowHeight, theme: theme, viewTypes: viewTypes, draggableHandle: titleClasses.title, margin: margin, padding: padding, onRemoveComponent: removeComponent, onLayoutChange: changeLayoutPostMount, isBounded: isBounded, onResize: onResize, onResizeStop: onResize })) }));
59
60
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VitessceGrid.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitessceGrid.test.d.ts","sourceRoot":"","sources":["../src/VitessceGrid.test.jsx"],"names":[],"mappings":""}
@@ -2,8 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import '@testing-library/jest-dom';
3
3
  import { cleanup, render, screen } from '@testing-library/react';
4
4
  import { afterEach } from 'vitest';
5
- import VitessceGrid from './VitessceGrid';
6
- import { ViewConfigProvider, createViewConfigStore, AuxiliaryProvider, createAuxiliaryStore, } from './state/hooks';
5
+ import React from 'react';
6
+ import { PluginViewType } from '@vitessce/plugins';
7
+ import VitessceGrid from './VitessceGrid.js';
8
+ import { ViewConfigProvider, createViewConfigStore, AuxiliaryProvider, createAuxiliaryStore, } from './state/hooks.js';
7
9
  afterEach(() => {
8
10
  cleanup();
9
11
  });
@@ -28,8 +30,10 @@ describe('VitessceGrid.js', () => {
28
30
  function FakeComponent() {
29
31
  return _jsx("p", { children: "FakeComponent!" });
30
32
  }
31
- const getComponent = () => FakeComponent;
32
- render(_jsx(ViewConfigProvider, { createStore: createViewConfigStore, children: _jsx(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: _jsx(VitessceGrid, { config: config, getComponent: getComponent }) }) }));
33
+ const viewTypes = [new PluginViewType('FakeComponent', FakeComponent, [])];
34
+ const fileTypes = [];
35
+ const coordinationTypes = [];
36
+ render(_jsx(ViewConfigProvider, { createStore: createViewConfigStore, children: _jsx(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: _jsx(VitessceGrid, { config: config, viewTypes: viewTypes, fileTypes: fileTypes, coordinationTypes: coordinationTypes }) }) }));
33
37
  expect(await screen.findByText('FakeComponent!'));
34
38
  });
35
39
  });
@@ -0,0 +1,2 @@
1
+ export function Warning(props: any): import("../../plugins/node_modules/@types/react/ts5.0/index.js").JSX.Element;
2
+ //# sourceMappingURL=Warning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Warning.d.ts","sourceRoot":"","sources":["../src/Warning.js"],"names":[],"mappings":"AAyCA,kHAoBC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import clsx from 'clsx';
3
- import { makeStyles } from '@material-ui/core/styles';
4
- import { VITESSCE_CONTAINER } from './classNames';
3
+ import { makeStyles } from '@material-ui/core';
4
+ import { VITESSCE_CONTAINER } from './classNames.js';
5
5
  const useStyles = makeStyles(theme => ({
6
6
  warningLayout: {
7
7
  backgroundColor: theme.palette.gridLayoutBackground,
@@ -0,0 +1,8 @@
1
+ export const TOOLTIP_ANCESTOR: "tooltip-ancestor";
2
+ export const PRIMARY_CARD: string;
3
+ export const SECONDARY_CARD: string;
4
+ export const BLACK_CARD: string;
5
+ export const TITLE_CARD: "title";
6
+ export const SCROLL_CARD: string;
7
+ export const VITESSCE_CONTAINER: "vitessce-container";
8
+ //# sourceMappingURL=classNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../src/classNames.js"],"names":[],"mappings":"AAAA,kDAAmD;AAEnD,kCAAiD;AACjD,oCAAqD;AACrD,gCAA6C;AAC7C,iCAAkC;AAClC,iCAAoD;AACpD,sDAAuD"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A loader ancestor class containing a default constructor
3
+ * and a stub for the required load() method.
4
+ */
5
+ export default class AbstractLoader {
6
+ constructor({ type, fileType, url, requestInit, options, coordinationValues, }: {
7
+ type: any;
8
+ fileType: any;
9
+ url: any;
10
+ requestInit: any;
11
+ options: any;
12
+ coordinationValues: any;
13
+ });
14
+ fileType: any;
15
+ type: any;
16
+ url: any;
17
+ requestInit: any;
18
+ options: any;
19
+ coordinationValues: any;
20
+ load(): Promise<boolean>;
21
+ }
22
+ //# sourceMappingURL=AbstractLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AbstractLoader.d.ts","sourceRoot":"","sources":["../../src/data/AbstractLoader.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH;IACE;;;;;;;OAWC;IANC,cAAwB;IACxB,UAAgB;IAChB,SAAc;IACd,iBAA8B;IAC9B,aAAsB;IACtB,wBAA4C;IAI9C,yBAEC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A loader ancestor class containing a default constructor
3
+ * and a stub for the required load() method.
4
+ */
5
+ export default class AbstractLoader {
6
+ constructor({ type, fileType, url, requestInit, options, coordinationValues, }) {
7
+ this.fileType = fileType;
8
+ this.type = type;
9
+ this.url = url;
10
+ this.requestInit = requestInit;
11
+ this.options = options;
12
+ this.coordinationValues = coordinationValues;
13
+ }
14
+ // eslint-disable-next-line class-methods-use-this
15
+ load() {
16
+ return Promise.resolve(true);
17
+ }
18
+ }
@@ -0,0 +1,6 @@
1
+ export default class AbstractTwoStepLoader extends AbstractLoader {
2
+ constructor(dataSource: any, params: any);
3
+ dataSource: any;
4
+ }
5
+ import AbstractLoader from "./AbstractLoader.js";
6
+ //# sourceMappingURL=AbstractTwoStepLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AbstractTwoStepLoader.d.ts","sourceRoot":"","sources":["../../src/data/AbstractTwoStepLoader.js"],"names":[],"mappings":"AAEA;IACE,0CAGC;IADC,gBAA4B;CAE/B"}
@@ -1,4 +1,4 @@
1
- import AbstractLoader from './AbstractLoader';
1
+ import AbstractLoader from './AbstractLoader.js';
2
2
  export default class AbstractTwoStepLoader extends AbstractLoader {
3
3
  constructor(dataSource, params) {
4
4
  super(params);
@@ -0,0 +1,7 @@
1
+ export default class LoaderResult {
2
+ constructor(data: any, url: any, coordinationValues?: null);
3
+ data: any;
4
+ url: any;
5
+ coordinationValues: any;
6
+ }
7
+ //# sourceMappingURL=LoaderResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoaderResult.d.ts","sourceRoot":"","sources":["../../src/data/LoaderResult.js"],"names":[],"mappings":"AACA;IACE,4DAIC;IAHC,UAAgB;IAChB,SAAc;IACd,wBAA4C;CAE/C"}
@@ -0,0 +1,4 @@
1
+ export { default as AbstractLoader } from "./AbstractLoader.js";
2
+ export { default as AbstractTwoStepLoader } from "./AbstractTwoStepLoader.js";
3
+ export { default as LoaderResult } from "./LoaderResult.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/data/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { default as AbstractLoader } from './AbstractLoader.js';
2
+ export { default as AbstractTwoStepLoader } from './AbstractTwoStepLoader.js';
3
+ export { default as LoaderResult } from './LoaderResult.js';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Get the data source and data loader class.
3
+ * @param {string} type The fileType name.
4
+ * @param {PluginFileType[]} fileTypes The array of file types.
5
+ * @returns {array} [dataSourceClass, dataLoaderClass].
6
+ */
7
+ export function getSourceAndLoaderFromFileType(type: string, fileTypes: PluginFileType[]): array;
8
+ export function getDataTypeFromFileType(type: any, fileTypes: any): any;
9
+ //# sourceMappingURL=loader-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader-registry.d.ts","sourceRoot":"","sources":["../../src/data/loader-registry.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,qDAJW,MAAM,aACN,gBAAgB,SAc1B;AAED,wEAQC"}