@vitessce/vit-s 2.0.3 → 3.0.1

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 (215) hide show
  1. package/dist/index.js +44072 -0
  2. package/dist-tsc/CallbackPublisher.d.ts +18 -0
  3. package/dist-tsc/CallbackPublisher.d.ts.map +1 -0
  4. package/dist-tsc/CallbackPublisher.js +62 -0
  5. package/dist-tsc/LoadingIndicator.d.ts +2 -0
  6. package/dist-tsc/LoadingIndicator.d.ts.map +1 -0
  7. package/dist-tsc/LoadingIndicator.js +26 -0
  8. package/dist-tsc/TitleInfo.d.ts +2 -0
  9. package/dist-tsc/TitleInfo.d.ts.map +1 -0
  10. package/dist-tsc/TitleInfo.js +74 -0
  11. package/dist-tsc/VitS.d.ts +50 -0
  12. package/dist-tsc/VitS.d.ts.map +1 -0
  13. package/dist-tsc/VitS.js +139 -0
  14. package/dist-tsc/VitessceGrid.d.ts +23 -0
  15. package/dist-tsc/VitessceGrid.d.ts.map +1 -0
  16. package/dist-tsc/VitessceGrid.js +63 -0
  17. package/dist-tsc/VitessceGrid.test.d.ts +2 -0
  18. package/dist-tsc/VitessceGrid.test.d.ts.map +1 -0
  19. package/dist-tsc/VitessceGrid.test.js +43 -0
  20. package/dist-tsc/Warning.d.ts +2 -0
  21. package/dist-tsc/Warning.d.ts.map +1 -0
  22. package/dist-tsc/Warning.js +45 -0
  23. package/dist-tsc/classNames.d.ts +8 -0
  24. package/dist-tsc/classNames.d.ts.map +1 -0
  25. package/dist-tsc/classNames.js +8 -0
  26. package/dist-tsc/data/AbstractLoader.d.ts +22 -0
  27. package/dist-tsc/data/AbstractLoader.d.ts.map +1 -0
  28. package/dist-tsc/data/AbstractLoader.js +18 -0
  29. package/dist-tsc/data/AbstractTwoStepLoader.d.ts +6 -0
  30. package/dist-tsc/data/AbstractTwoStepLoader.d.ts.map +1 -0
  31. package/dist-tsc/data/AbstractTwoStepLoader.js +7 -0
  32. package/dist-tsc/data/LoaderResult.d.ts +12 -0
  33. package/dist-tsc/data/LoaderResult.d.ts.map +1 -0
  34. package/dist-tsc/data/LoaderResult.js +12 -0
  35. package/dist-tsc/data/index.d.ts +4 -0
  36. package/dist-tsc/data/index.d.ts.map +1 -0
  37. package/dist-tsc/data/index.js +3 -0
  38. package/dist-tsc/data/loader-registry.d.ts +9 -0
  39. package/dist-tsc/data/loader-registry.d.ts.map +1 -0
  40. package/dist-tsc/data/loader-registry.js +27 -0
  41. package/dist-tsc/data-hook-utils.d.ts +65 -0
  42. package/dist-tsc/data-hook-utils.d.ts.map +1 -0
  43. package/dist-tsc/data-hook-utils.js +191 -0
  44. package/dist-tsc/data-hooks.d.ts +73 -0
  45. package/dist-tsc/data-hooks.d.ts.map +1 -0
  46. package/dist-tsc/data-hooks.js +254 -0
  47. package/dist-tsc/errors/AbstractLoaderError.d.ts +10 -0
  48. package/dist-tsc/errors/AbstractLoaderError.d.ts.map +1 -0
  49. package/dist-tsc/errors/AbstractLoaderError.js +13 -0
  50. package/dist-tsc/errors/DataSourceFetchError.d.ts +8 -0
  51. package/dist-tsc/errors/DataSourceFetchError.d.ts.map +1 -0
  52. package/dist-tsc/errors/DataSourceFetchError.js +13 -0
  53. package/dist-tsc/errors/DatasetNotFoundError.d.ts +6 -0
  54. package/dist-tsc/errors/DatasetNotFoundError.d.ts.map +1 -0
  55. package/dist-tsc/errors/DatasetNotFoundError.js +17 -0
  56. package/dist-tsc/errors/LoaderNotFoundError.d.ts +10 -0
  57. package/dist-tsc/errors/LoaderNotFoundError.d.ts.map +1 -0
  58. package/dist-tsc/errors/LoaderNotFoundError.js +17 -0
  59. package/dist-tsc/errors/LoaderValidationError.d.ts +10 -0
  60. package/dist-tsc/errors/LoaderValidationError.d.ts.map +1 -0
  61. package/dist-tsc/errors/LoaderValidationError.js +15 -0
  62. package/dist-tsc/errors/index.d.ts +6 -0
  63. package/dist-tsc/errors/index.d.ts.map +1 -0
  64. package/dist-tsc/errors/index.js +5 -0
  65. package/dist-tsc/hooks.d.ts +76 -0
  66. package/dist-tsc/hooks.d.ts.map +1 -0
  67. package/dist-tsc/hooks.js +262 -0
  68. package/dist-tsc/index.d.ts +12 -0
  69. package/dist-tsc/index.d.ts.map +1 -0
  70. package/dist-tsc/index.js +11 -17
  71. package/dist-tsc/mui-utils.d.ts +2 -0
  72. package/dist-tsc/mui-utils.d.ts.map +1 -0
  73. package/dist-tsc/mui-utils.js +44 -0
  74. package/dist-tsc/plugins.test.fixtures.d.ts +61 -0
  75. package/dist-tsc/plugins.test.fixtures.d.ts.map +1 -0
  76. package/dist-tsc/plugins.test.fixtures.js +76 -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-tsc/shared-mui/components.js +29 -0
  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-tsc/shared-mui/container.js +211 -0
  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-tsc/shared-mui/styles.js +109 -0
  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-tsc/shared-plot-options/CellColorEncodingOption.js +17 -0
  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-tsc/shared-plot-options/OptionSelect.js +12 -0
  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-tsc/shared-plot-options/OptionsContainer.js +9 -0
  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-tsc/shared-plot-options/styles.js +48 -0
  101. package/dist-tsc/state/hooks.d.ts +242 -0
  102. package/dist-tsc/state/hooks.d.ts.map +1 -0
  103. package/dist-tsc/state/hooks.js +615 -0
  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 +31 -0
  108. package/dist-tsc/view-config-utils.d.ts.map +1 -0
  109. package/dist-tsc/view-config-utils.js +240 -0
  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-tsc/view-config-utils.test.fixtures.js +883 -0
  115. package/dist-tsc/view-config-utils.test.js +210 -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-tsc/vitessce-grid-layout/VitessceGridLayout.js +114 -0
  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-tsc/vitessce-grid-layout/VitessceGridLayout.test.js +48 -0
  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-tsc/vitessce-grid-layout/layout-utils.js +61 -0
  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-tsc/vitessce-grid-layout/layout-utils.test.js +149 -0
  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-tsc/vitessce-grid-utils.js +141 -0
  134. package/package.json +25 -11
  135. package/src/CallbackPublisher.js +7 -11
  136. package/src/LoadingIndicator.js +1 -2
  137. package/src/TitleInfo.js +12 -85
  138. package/src/VitS.js +143 -85
  139. package/src/VitessceGrid.js +35 -21
  140. package/src/VitessceGrid.test.jsx +23 -8
  141. package/src/Warning.js +4 -4
  142. package/src/data/AbstractLoader.js +2 -25
  143. package/src/data/AbstractTwoStepLoader.js +1 -1
  144. package/src/data/LoaderResult.js +5 -0
  145. package/src/data/index.js +3 -3
  146. package/src/data/loader-registry.js +22 -13
  147. package/src/data-hook-utils.js +119 -86
  148. package/src/data-hooks.js +150 -131
  149. package/src/errors/DataSourceFetchError.js +2 -2
  150. package/src/errors/DatasetNotFoundError.js +1 -1
  151. package/src/errors/LoaderNotFoundError.js +1 -1
  152. package/src/errors/LoaderValidationError.js +1 -1
  153. package/src/errors/index.js +5 -6
  154. package/src/hooks.js +81 -26
  155. package/src/index.js +23 -46
  156. package/src/mui-utils.js +52 -0
  157. package/src/shared-mui/components.js +10 -8
  158. package/src/shared-mui/container.js +1 -1
  159. package/src/shared-mui/styles.js +5 -2
  160. package/src/shared-plot-options/CellColorEncodingOption.js +3 -4
  161. package/src/shared-plot-options/OptionSelect.js +3 -3
  162. package/src/shared-plot-options/OptionsContainer.js +2 -5
  163. package/src/shared-plot-options/index.js +4 -4
  164. package/src/shared-plot-options/styles.js +2 -2
  165. package/src/state/hooks.js +75 -23
  166. package/src/title-styles.js +73 -0
  167. package/src/view-config-utils.js +54 -98
  168. package/src/view-config-utils.test.jsx +223 -0
  169. package/src/vitessce-grid-layout/VitessceGridLayout.js +51 -30
  170. package/src/vitessce-grid-layout/VitessceGridLayout.test.jsx +17 -9
  171. package/src/vitessce-grid-layout/index.js +1 -1
  172. package/src/vitessce-grid-layout/layout-utils.js +1 -1
  173. package/src/vitessce-grid-layout/layout-utils.test.js +2 -1
  174. package/src/vitessce-grid-utils.js +27 -15
  175. package/dist/index.mjs +0 -84801
  176. package/src/component-registry.js +0 -21
  177. package/src/errors/OptionsValidationError.js +0 -25
  178. package/src/file-options-schemas-legacy.js +0 -139
  179. package/src/file-options-schemas-legacy.test.js +0 -138
  180. package/src/file-options-schemas.js +0 -327
  181. package/src/file-options-schemas.test.js +0 -26
  182. package/src/joint-file-types-legacy.js +0 -298
  183. package/src/joint-file-types-legacy.test.js +0 -412
  184. package/src/joint-file-types.js +0 -171
  185. package/src/joint-file-types.test.js +0 -144
  186. package/src/json-schemas.js +0 -9
  187. package/src/plugins.js +0 -186
  188. package/src/plugins.test.js +0 -42
  189. package/src/schemas/config-0.1.0.schema.json +0 -85
  190. package/src/schemas/config-1.0.0.schema.json +0 -733
  191. package/src/schemas/config-1.0.1.schema.json +0 -909
  192. package/src/schemas/config-1.0.10.schema.json +0 -969
  193. package/src/schemas/config-1.0.11.schema.json +0 -990
  194. package/src/schemas/config-1.0.12.schema.json +0 -997
  195. package/src/schemas/config-1.0.13.schema.json +0 -1013
  196. package/src/schemas/config-1.0.14.schema.json +0 -1048
  197. package/src/schemas/config-1.0.15.schema.json +0 -1048
  198. package/src/schemas/config-1.0.16.schema.json +0 -1069
  199. package/src/schemas/config-1.0.16.schema.test.js +0 -32
  200. package/src/schemas/config-1.0.2.schema.json +0 -911
  201. package/src/schemas/config-1.0.3.schema.json +0 -911
  202. package/src/schemas/config-1.0.4.schema.json +0 -949
  203. package/src/schemas/config-1.0.5.schema.json +0 -949
  204. package/src/schemas/config-1.0.6.schema.json +0 -950
  205. package/src/schemas/config-1.0.7.schema.json +0 -950
  206. package/src/schemas/config-1.0.8.schema.json +0 -966
  207. package/src/schemas/config-1.0.9.schema.json +0 -965
  208. package/src/schemas/obsSets.schema.js +0 -195
  209. package/src/schemas/obsSetsTabular.schema.js +0 -39
  210. package/src/schemas/raster.schema.js +0 -121
  211. package/src/schemas/schema-schema.sh +0 -34
  212. package/src/schemas/schema.test-old.js +0 -49
  213. package/src/view-config-upgraders.js +0 -628
  214. package/src/view-config-utils.test.js +0 -95
  215. package/src/view-config-versions.js +0 -68
@@ -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"}
@@ -0,0 +1,62 @@
1
+ import { useEffect } from 'react';
2
+ import { useViewConfigStoreApi, useLoaders, useWarning } from './state/hooks.js';
3
+ function validateViewConfig(viewConfig, pluginSpecificConfigSchema) {
4
+ // Need the try-catch here since Zustand will actually
5
+ // just catch and ignore errors in its subscription callbacks.
6
+ try {
7
+ pluginSpecificConfigSchema.parse(viewConfig);
8
+ }
9
+ catch (e) {
10
+ console.error(e);
11
+ }
12
+ // Do nothing if successful.
13
+ }
14
+ /**
15
+ * This is a dummy component which handles
16
+ * publishing new view configs and loaders to
17
+ * the provided callbacks on changes.
18
+ * @param {object} props
19
+ * @param {function} props.onConfigChange A callback function
20
+ * to execute on each change of the Vitessce view config.
21
+ * @param {function} props.onLoaderChange A callback function
22
+ * to execute on each change of the loaders object.
23
+ * @param {boolean} props.validateOnConfigChange Whether to validate
24
+ * against the view config schema when publishing changes.
25
+ */
26
+ export default function CallbackPublisher(props) {
27
+ const { onWarn, onConfigChange, onLoaderChange, validateOnConfigChange, pluginSpecificConfigSchema, } = props;
28
+ const warning = useWarning();
29
+ const loaders = useLoaders();
30
+ const viewConfigStoreApi = useViewConfigStoreApi();
31
+ // View config updates are often-occurring, so
32
+ // we want to use the "transient update" approach
33
+ // to subscribe to view config changes.
34
+ // Reference: https://github.com/react-spring/zustand#transient-updates-for-often-occuring-state-changes
35
+ useEffect(() => viewConfigStoreApi.subscribe(
36
+ // The function to run on each publish.
37
+ (viewConfig) => {
38
+ if (validateOnConfigChange && viewConfig) {
39
+ validateViewConfig(viewConfig, pluginSpecificConfigSchema);
40
+ }
41
+ if (onConfigChange && viewConfig) {
42
+ onConfigChange(viewConfig);
43
+ }
44
+ },
45
+ // The function to specify which part of the store
46
+ // we want to subscribe to.
47
+ state => state.viewConfig), [onConfigChange, validateOnConfigChange, viewConfigStoreApi, pluginSpecificConfigSchema]);
48
+ // Emit updates to the warning message.
49
+ useEffect(() => {
50
+ if (onWarn && warning) {
51
+ onWarn(warning);
52
+ }
53
+ }, [warning, onWarn]);
54
+ // Emit updates to the loaders.
55
+ useEffect(() => {
56
+ if (onLoaderChange && loaders) {
57
+ onLoaderChange(loaders);
58
+ }
59
+ }, [loaders, onLoaderChange]);
60
+ // Render nothing.
61
+ return null;
62
+ }
@@ -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"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { makeStyles, CircularProgress } from '@material-ui/core';
4
+ const useStyles = makeStyles(() => ({
5
+ loadingIndicatorBackdrop: {
6
+ position: 'absolute',
7
+ top: '0',
8
+ left: '0',
9
+ zIndex: '1040',
10
+ width: '100%',
11
+ height: '100%',
12
+ borderRadius: '4px',
13
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
14
+ },
15
+ loadingIndicatorContainer: {
16
+ display: 'grid',
17
+ placeItems: 'center',
18
+ position: 'absolute',
19
+ width: '100%',
20
+ height: '100%',
21
+ },
22
+ }));
23
+ export default function LoadingIndicator() {
24
+ const classes = useStyles();
25
+ return (_jsx("div", { className: classes.loadingIndicatorBackdrop, children: _jsx("div", { className: classes.loadingIndicatorContainer, children: _jsx(CircularProgress, {}) }) }));
26
+ }
@@ -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"}
@@ -0,0 +1,74 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useState } from 'react';
3
+ import clsx from 'clsx';
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';
10
+ const useStyles = makeStyles(theme => ({
11
+ iconButton: {
12
+ border: 'none',
13
+ marginLeft: 0,
14
+ background: 'none',
15
+ color: theme.palette.primaryForeground,
16
+ paddingLeft: '0.25em',
17
+ paddingRight: '0.25em',
18
+ borderRadius: '2px',
19
+ '&:hover': {
20
+ backgroundColor: theme.palette.primaryBackgroundLight,
21
+ },
22
+ '&:first-child': {
23
+ marginLeft: '0.25em',
24
+ },
25
+ '&:last-child': {
26
+ marginRight: '0.25em',
27
+ },
28
+ '& svg': {
29
+ width: '0.7em',
30
+ height: '0.7em',
31
+ verticalAlign: 'middle',
32
+ overflow: 'visible',
33
+ },
34
+ },
35
+ downloadLink: {
36
+ color: theme.palette.primaryForeground,
37
+ },
38
+ }));
39
+ function SettingsIconWithArrow({ open }) {
40
+ return (_jsxs(_Fragment, { children: [_jsx(SettingsIcon, {}), open ? _jsx(ArrowDropUpIcon, {}) : _jsx(ArrowDropDownIcon, {})] }));
41
+ }
42
+ function PlotOptions(props) {
43
+ const { options } = props;
44
+ const [open, setOpen] = useState(false);
45
+ const classes = useStyles();
46
+ return (options ? (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: _jsx(SettingsIconWithArrow, { open: open }), buttonClassName: classes.iconButton, placement: "bottom-end", children: options })) : null);
47
+ }
48
+ function CloudDownloadIconWithArrow({ open }) {
49
+ return (_jsxs(_Fragment, { children: [_jsx(CloudDownloadIcon, {}), open ? _jsx(ArrowDropUpIcon, {}) : _jsx(ArrowDropDownIcon, {})] }));
50
+ }
51
+ function DownloadOptions(props) {
52
+ const { urls } = props;
53
+ const [open, setOpen] = useState(false);
54
+ const classes = useStyles();
55
+ return (urls && urls.length ? (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: _jsx(CloudDownloadIconWithArrow, { open: open }), buttonClassName: classes.iconButton, placement: "bottom-end", children: urls.map(({ url, name }) => (_jsx(MenuItem, { dense: true, children: _jsxs(Link, { underline: "none", href: url, target: "_blank", rel: "noopener", className: classes.downloadLink, children: ["Download ", name] }) }, `${url}_${name}`))) })) : null);
56
+ }
57
+ function ClosePaneButton(props) {
58
+ const { removeGridComponent } = props;
59
+ const classes = useStyles();
60
+ return (_jsx(IconButton, { onClick: removeGridComponent, size: "small", className: classes.iconButton, title: "close", children: _jsx(CloseIcon, {}) }));
61
+ }
62
+ export function TitleInfo(props) {
63
+ const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, } = props;
64
+ const classes = useTitleStyles();
65
+ return (
66
+ // d-flex without wrapping div is not always full height; I don't understand the root cause.
67
+ _jsxs(_Fragment, { children: [_jsxs("div", { className: classes.title, children: [_jsx("div", { className: classes.titleLeft, children: title }), _jsx("div", { className: classes.titleInfo, title: info, children: info }), _jsxs("div", { className: classes.titleButtons, children: [_jsx(PlotOptions, { options: options }), _jsx(DownloadOptions, { urls: urls }), _jsx(ClosePaneButton, { removeGridComponent: removeGridComponent })] })] }), _jsxs("div", { className: clsx(TOOLTIP_ANCESTOR, classes.card, {
68
+ [classes.scrollCard]: isScroll,
69
+ [classes.spatialCard]: isSpatial,
70
+ [classes.noScrollCard]: !isScroll && !isSpatial,
71
+ }), children: [!isReady && _jsx(LoadingIndicator, {}), children] })] })
72
+ // "pl-2" only matters when the window is very narrow.
73
+ );
74
+ }
@@ -0,0 +1,50 @@
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.validateConfig Whether to validate or not. Only to be
17
+ * set to false in controlled component situations, where bypassing validation
18
+ * is required for performance, and the parent knows the config
19
+ * is already valid (e.g., it originated from onConfigChange). By default, true.
20
+ * @param {boolean} props.validateOnConfigChange Whether to validate
21
+ * against the view config schema when publishing changes. Use for debugging
22
+ * purposes, as this may have a performance impact. By default, false.
23
+ * @param {null|string} props.uid A unique identifier for this Vitessce instance,
24
+ * for the purpose of avoiding CSS autogenerated class name conflicts. Must be valid as part
25
+ * of a CSS class name string.
26
+ * @param {array} props.viewTypes Plugin view types.
27
+ * @param {array} props.fileTypes Plugin file types.
28
+ * @param {array} props.jointFileTypes Plugin joint file types.
29
+ * @param {array} props.coordinationTypes Plugin coordination types.
30
+ * @param {null|object} props.warning A warning to render within the Vitessce grid,
31
+ * provided by the parent.
32
+ */
33
+ export function VitS(props: {
34
+ config: object;
35
+ rowHeight: undefined | number;
36
+ height: number;
37
+ theme: string;
38
+ onWarn: Function;
39
+ onConfigChange: Function;
40
+ onLoaderChange: Function;
41
+ validateConfig: boolean;
42
+ validateOnConfigChange: boolean;
43
+ uid: null | string;
44
+ viewTypes: array;
45
+ fileTypes: array;
46
+ jointFileTypes: array;
47
+ coordinationTypes: array;
48
+ warning: null | object;
49
+ }): JSX.Element;
50
+ //# sourceMappingURL=VitS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitS.d.ts","sourceRoot":"","sources":["../src/VitS.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IA7ByB,MAAM,EAApB,MAAM;IAGkB,SAAS,EAAjC,SAAS,GAAC,MAAM;IACF,MAAM,EAApB,MAAM;IACQ,KAAK,EAAnB,MAAM;IAEU,MAAM;IACN,cAAc;IAEd,cAAc;IAEf,cAAc,EAA7B,OAAO;IAIQ,sBAAsB,EAArC,OAAO;IAGY,GAAG,EAAtB,IAAI,GAAC,MAAM;IAGE,SAAS;IACT,SAAS;IACT,cAAc;IACd,iBAAiB;IACX,OAAO,EAA1B,IAAI,GAAC,MAAM;gBAkLrB"}
@@ -0,0 +1,139 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useEffect, useMemo, useCallback } from 'react';
3
+ import { ThemeProvider, StylesProvider, } from '@material-ui/core';
4
+ import { QueryClient, QueryClientProvider, } from '@tanstack/react-query';
5
+ import { isEqual } from 'lodash-es';
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, logConfig, } from './view-config-utils.js';
13
+ import { createLoaders } from './vitessce-grid-utils.js';
14
+ import { createGenerateClassName } from './mui-utils.js';
15
+ /**
16
+ * The Vitessce component.
17
+ * @param {object} props
18
+ * @param {object} props.config A Vitessce view config.
19
+ * If the config is valid, the VitessceGrid will be rendered as a child.
20
+ * If the config is invalid, a Warning will be rendered instead.
21
+ * @param {undefined|number} props.rowHeight Row height for grid layout. Optional.
22
+ * @param {number} props.height Total height for grid layout. Optional.
23
+ * @param {string} props.theme The theme, used for styling as
24
+ * light or dark. Optional. By default, "dark"
25
+ * @param {function} props.onWarn A callback for warning messages. Optional.
26
+ * @param {function} props.onConfigChange A callback for view config
27
+ * updates. Optional.
28
+ * @param {function} props.onLoaderChange A callback for loader
29
+ * updates. Optional.
30
+ * @param {boolean} props.validateConfig Whether to validate or not. Only to be
31
+ * set to false in controlled component situations, where bypassing validation
32
+ * is required for performance, and the parent knows the config
33
+ * is already valid (e.g., it originated from onConfigChange). By default, true.
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 {null|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, validateConfig = true, validateOnConfigChange = false, isBounded = false, uid = null, 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(uid), [uid]);
54
+ const configVersion = config?.version;
55
+ // If config.uid exists, then use it for hook dependencies to detect changes
56
+ // (controlled component case). If not, then use the config object itself
57
+ // and assume the un-controlled component case.
58
+ const configKey = config?.uid || config;
59
+ const pluginSpecificConfigSchema = useMemo(() => buildConfigSchema(fileTypes, jointFileTypes, coordinationTypes, viewTypes), [viewTypes, fileTypes, jointFileTypes, coordinationTypes]);
60
+ // Process the view config and memoize the result:
61
+ // - Validate.
62
+ // - Upgrade, if legacy schema.
63
+ // - Validate after upgrade, if legacy schema.
64
+ // - Initialize (based on initStrategy).
65
+ const [configOrWarning, success] = useMemo(() => {
66
+ if (warning) {
67
+ return [warning, false];
68
+ }
69
+ logConfig(config, 'input view config');
70
+ if (!validateConfig) {
71
+ return [config, true];
72
+ }
73
+ const result = latestConfigSchema.safeParse(config);
74
+ if (result.success) {
75
+ const upgradedConfig = result.data;
76
+ logConfig(upgradedConfig, 'parsed view config');
77
+ // Perform second round of parsing against plugin-specific config schema.
78
+ const pluginSpecificResult = pluginSpecificConfigSchema.safeParse(upgradedConfig);
79
+ // Initialize the view config according to the initStrategy.
80
+ if (pluginSpecificResult.success) {
81
+ try {
82
+ const upgradedConfigWithValidPlugins = pluginSpecificResult.data;
83
+ const initializedConfig = initialize(upgradedConfigWithValidPlugins, jointFileTypes, coordinationTypes, viewTypes);
84
+ logConfig(initializedConfig, 'initialized view config');
85
+ return [initializedConfig, true];
86
+ }
87
+ catch (e) {
88
+ return [
89
+ {
90
+ title: 'Config initialization failed.',
91
+ unformatted: e.message,
92
+ },
93
+ false,
94
+ ];
95
+ }
96
+ }
97
+ return [
98
+ {
99
+ title: 'Config validation failed on second pass.',
100
+ unformatted: pluginSpecificResult.error.message,
101
+ },
102
+ false,
103
+ ];
104
+ }
105
+ return [{
106
+ title: 'Config validation failed on first pass.',
107
+ unformatted: result.error.message,
108
+ }, result.success];
109
+ // eslint-disable-next-line react-hooks/exhaustive-deps
110
+ }, [configKey, configVersion, pluginSpecificConfigSchema, warning]);
111
+ const queryClient = useMemo(() => new QueryClient({
112
+ // Reference: https://tanstack.com/query/latest/docs/react/guides/window-focus-refetching
113
+ defaultOptions: {
114
+ queries: {
115
+ refetchOnWindowFocus: false,
116
+ retry: 2,
117
+ },
118
+ },
119
+ }), [configKey]);
120
+ // Emit the upgraded/initialized view config
121
+ // to onConfigChange if necessary.
122
+ useEffect(() => {
123
+ if (success && !isEqual(configOrWarning, config) && onConfigChange) {
124
+ onConfigChange(configOrWarning);
125
+ }
126
+ // eslint-disable-next-line react-hooks/exhaustive-deps
127
+ }, [success, configKey, configOrWarning, onConfigChange]);
128
+ // Initialize the view config and loaders in the global state.
129
+ const createViewConfigStoreClosure = useCallback(() => {
130
+ if (success) {
131
+ const loaders = createLoaders(configOrWarning.datasets, configOrWarning.description, fileTypes, coordinationTypes);
132
+ return createViewConfigStore(loaders, configOrWarning);
133
+ }
134
+ // No config found, so clear the loaders.
135
+ return createViewConfigStore(null, null);
136
+ // eslint-disable-next-line react-hooks/exhaustive-deps
137
+ }, [success, configKey]);
138
+ return success ? (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, children: _jsxs(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: [_jsx(VitessceGrid, { success: success, configKey: configKey, 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 }) }) }));
139
+ }
@@ -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;gBAuFlC"}
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React, { useEffect, useCallback, } from 'react';
3
+ import clsx from 'clsx';
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
+ const padding = 10;
12
+ const margin = 5;
13
+ /**
14
+ * The wrapper for the VitessceGrid and LoadingIndicator components.
15
+ * @param {object} props
16
+ * @param {number} props.rowHeight The height of each grid row. Optional.
17
+ * @param {object} props.config The view config.
18
+ * @param {string} props.theme The theme name.
19
+ * @param {number} props.height Total height for grid. Optional.
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
24
+ */
25
+ export default function VitessceGrid(props) {
26
+ const { success, configKey, rowHeight: initialRowHeight, config, theme, height, isBounded, viewTypes, fileTypes, coordinationTypes, } = props;
27
+ const [rowHeight, containerRef] = useRowHeight(config, initialRowHeight, height, margin, padding);
28
+ const onResize = useEmitGridResize();
29
+ const [componentWidth] = useClosestVitessceContainerSize(containerRef);
30
+ const classes = useVitessceContainerStyles();
31
+ const titleClasses = useTitleStyles();
32
+ // When the row height has changed, publish a GRID_RESIZE event.
33
+ useEffect(() => {
34
+ onResize();
35
+ }, [rowHeight, onResize]);
36
+ const viewConfigStoreApi = useViewConfigStoreApi();
37
+ const setViewConfig = useSetViewConfig(viewConfigStoreApi);
38
+ const setLoaders = useSetLoaders();
39
+ const removeComponent = useRemoveComponent();
40
+ const changeLayout = useChangeLayout();
41
+ const layout = useLayout();
42
+ const changeLayoutPostMount = useCallback((newComponentProps) => {
43
+ if (componentWidth > 0) {
44
+ changeLayout(newComponentProps);
45
+ }
46
+ }, [changeLayout, componentWidth]);
47
+ // Update the view config and loaders in the global state.
48
+ // This effect is needed for the controlled component case in which
49
+ // the store has already been initialized with a view config,
50
+ // and we want to replace it with a new view config.
51
+ useEffect(() => {
52
+ let newLoaders = null;
53
+ let newConfig = null;
54
+ if (success) {
55
+ newLoaders = createLoaders(config.datasets, config.description, fileTypes, coordinationTypes);
56
+ newConfig = config;
57
+ }
58
+ setViewConfig(newConfig);
59
+ setLoaders(newLoaders);
60
+ // eslint-disable-next-line react-hooks/exhaustive-deps
61
+ }, [success, configKey]);
62
+ 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 })) : null }));
63
+ }
@@ -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":""}
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { describe, it, expect, afterEach } from 'vitest';
3
+ import '@testing-library/jest-dom';
4
+ import { cleanup, render, screen } from '@testing-library/react';
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';
9
+ afterEach(() => {
10
+ cleanup();
11
+ });
12
+ describe('VitessceGrid.js', () => {
13
+ describe('<VitessceGrid />', () => {
14
+ it('renders', async () => {
15
+ const config = {
16
+ version: '1.0.0',
17
+ description: 'fake description',
18
+ datasets: [],
19
+ name: 'fake name',
20
+ layout: [
21
+ {
22
+ component: 'FakeComponent',
23
+ props: { description: 'fake prop description' },
24
+ uid: 'A',
25
+ x: 0,
26
+ y: 0,
27
+ },
28
+ ],
29
+ };
30
+ function createViewConfigStoreClosure() {
31
+ return createViewConfigStore(null, config);
32
+ }
33
+ function FakeComponent() {
34
+ return _jsx("p", { children: "FakeComponent!" });
35
+ }
36
+ const viewTypes = [new PluginViewType('FakeComponent', FakeComponent, [])];
37
+ const fileTypes = [];
38
+ const coordinationTypes = [];
39
+ render(_jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, children: _jsx(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: _jsx(VitessceGrid, { success: true, configKey: null, config: config, viewTypes: viewTypes, fileTypes: fileTypes, coordinationTypes: coordinationTypes }) }) }));
40
+ expect(await screen.findByText('FakeComponent!'));
41
+ });
42
+ });
43
+ });
@@ -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"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { makeStyles } from '@material-ui/core';
4
+ import { VITESSCE_CONTAINER } from './classNames.js';
5
+ const useStyles = makeStyles(theme => ({
6
+ warningLayout: {
7
+ backgroundColor: theme.palette.gridLayoutBackground,
8
+ position: 'absolute',
9
+ width: '100%',
10
+ height: '100vh',
11
+ },
12
+ containerFluid: {
13
+ width: '100%',
14
+ padding: '15px',
15
+ marginRight: 'auto',
16
+ marginLeft: 'auto',
17
+ boxSizing: 'border-box',
18
+ display: 'flex',
19
+ },
20
+ row: {
21
+ flexGrow: '1',
22
+ },
23
+ warningCard: {
24
+ border: `1px solid ${theme.palette.cardBorder}`,
25
+ flex: '1 1 auto',
26
+ minHeight: '1px',
27
+ padding: '12px',
28
+ marginTop: '8px',
29
+ marginBottom: '8px',
30
+ position: 'relative',
31
+ display: 'flex',
32
+ flexDirection: 'column',
33
+ minWidth: '0',
34
+ wordWrap: 'break-word',
35
+ backgroundClip: 'border-box',
36
+ borderRadius: '4px',
37
+ backgroundColor: theme.palette.primaryBackground,
38
+ color: theme.palette.primaryForeground,
39
+ },
40
+ }));
41
+ export function Warning(props) {
42
+ const { title, preformatted, unformatted, } = props;
43
+ const classes = useStyles();
44
+ return (_jsx("div", { className: VITESSCE_CONTAINER, children: _jsx("div", { className: clsx(classes.warningLayout, classes.containerFluid), children: _jsx("div", { className: classes.row, children: _jsxs("div", { className: classes.warningCard, children: [_jsx("h1", { children: title }), preformatted ? (_jsx("pre", { children: preformatted })) : null, _jsx("p", { children: unformatted })] }) }) }) }));
45
+ }
@@ -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,8 @@
1
+ export const TOOLTIP_ANCESTOR = 'tooltip-ancestor';
2
+ const CARD = `card card-body my-2 ${TOOLTIP_ANCESTOR}`;
3
+ export const PRIMARY_CARD = `${CARD} bg-primary`;
4
+ export const SECONDARY_CARD = `${CARD} bg-secondary`;
5
+ export const BLACK_CARD = `${CARD} bg-black`;
6
+ export const TITLE_CARD = 'title';
7
+ export const SCROLL_CARD = `${PRIMARY_CARD} scroll`;
8
+ export const VITESSCE_CONTAINER = 'vitessce-container';
@@ -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"}