@vitessce/vit-s 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +204 -183
- package/dist-tsc/VitS.js +1 -1
- package/dist-tsc/hooks.d.ts.map +1 -1
- package/dist-tsc/hooks.js +4 -1
- package/package.json +5 -5
- package/src/VitS.js +1 -1
- package/src/hooks.js +4 -1
package/dist-tsc/VitS.js
CHANGED
|
@@ -135,5 +135,5 @@ export function VitS(props) {
|
|
|
135
135
|
return createViewConfigStore(null, null);
|
|
136
136
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
137
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 }) }) }));
|
|
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 })] }) }, configKey) }) }) })) : (_jsx(StylesProvider, { generateClassName: generateClassName, children: _jsx(ThemeProvider, { theme: muiTheme[theme], children: _jsx(Warning, { ...configOrWarning }) }) }));
|
|
139
139
|
}
|
package/dist-tsc/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.js"],"names":[],"mappings":"AAkBA,oDAOC;AAED;;;;GAIG;AACH,6CAgBC;AAED;;;;GAIG;AACH,yCAiCC;AAED;;;;;GAKG;AACH,2CAiCC;AAED;;;;;;GAMG;AACH,uCAHW,MAAM,EAAE,GACN,OAAO,CAOnB;AAED;;;;GAIG;AACH,8BAHW,CAAC,IAAI,GAAC,MAAM,EAAE,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.js"],"names":[],"mappings":"AAkBA,oDAOC;AAED;;;;GAIG;AACH,6CAgBC;AAED;;;;GAIG;AACH,yCAiCC;AAED;;;;;GAKG;AACH,2CAiCC;AAED;;;;;;GAMG;AACH,uCAHW,MAAM,EAAE,GACN,OAAO,CAOnB;AAED;;;;GAIG;AACH,8BAHW,CAAC,IAAI,GAAC,MAAM,EAAE,CAAC,EAAE,SAa3B;AAED;;;;;;GAMG;AACH,iEAuBC;AAED;;;;;;;;;;GAUG;AACH;IAR0B,gBAAgB,EAA/B,MAAM;UAqBhB;AAED;;;;;;;;;;GAUG;AACH,yDARW,QAAM,IAAI,SAuBpB;AAED;;;;QA2BC;AAED,iEAOC;AAED,kHAuBC"}
|
package/dist-tsc/hooks.js
CHANGED
|
@@ -124,7 +124,10 @@ export function useReady(statusValues) {
|
|
|
124
124
|
* @returns {array} An array of { url, name } objects (flattened from the input).
|
|
125
125
|
*/
|
|
126
126
|
export function useUrls(urls) {
|
|
127
|
-
const mergedUrls = useMemo(() => urls.filter(a => Array.isArray(a)).flat(),
|
|
127
|
+
const mergedUrls = useMemo(() => urls.filter(a => Array.isArray(a)).flat().filter((url, index, array) => {
|
|
128
|
+
const firstIndex = array.findIndex(u => u.name === url.name);
|
|
129
|
+
return index === firstIndex;
|
|
130
|
+
}),
|
|
128
131
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
129
132
|
urls);
|
|
130
133
|
return mergedUrls;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/vit-s",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"react-grid-layout-with-lodash": "^1.3.5",
|
|
29
29
|
"uuid": "^9.0.0",
|
|
30
30
|
"zustand": "^3.5.10",
|
|
31
|
-
"@vitessce/constants-internal": "3.0
|
|
32
|
-
"@vitessce/plugins": "3.0
|
|
33
|
-
"@vitessce/schemas": "3.0
|
|
34
|
-
"@vitessce/utils": "3.0
|
|
31
|
+
"@vitessce/constants-internal": "3.1.0",
|
|
32
|
+
"@vitessce/plugins": "3.1.0",
|
|
33
|
+
"@vitessce/schemas": "3.1.0",
|
|
34
|
+
"@vitessce/utils": "3.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@testing-library/jest-dom": "^5.16.4",
|
package/src/VitS.js
CHANGED
|
@@ -202,7 +202,7 @@ export function VitS(props) {
|
|
|
202
202
|
<StylesProvider generateClassName={generateClassName}>
|
|
203
203
|
<ThemeProvider theme={muiTheme[theme]}>
|
|
204
204
|
<QueryClientProvider client={queryClient}>
|
|
205
|
-
<ViewConfigProvider createStore={createViewConfigStoreClosure}>
|
|
205
|
+
<ViewConfigProvider key={configKey} createStore={createViewConfigStoreClosure}>
|
|
206
206
|
<AuxiliaryProvider createStore={createAuxiliaryStore}>
|
|
207
207
|
<VitessceGrid
|
|
208
208
|
success={success}
|
package/src/hooks.js
CHANGED
|
@@ -150,7 +150,10 @@ export function useReady(statusValues) {
|
|
|
150
150
|
*/
|
|
151
151
|
export function useUrls(urls) {
|
|
152
152
|
const mergedUrls = useMemo(
|
|
153
|
-
() => urls.filter(a => Array.isArray(a)).flat(),
|
|
153
|
+
() => urls.filter(a => Array.isArray(a)).flat().filter((url, index, array) => {
|
|
154
|
+
const firstIndex = array.findIndex(u => u.name === url.name);
|
|
155
|
+
return index === firstIndex;
|
|
156
|
+
}),
|
|
154
157
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
155
158
|
urls,
|
|
156
159
|
);
|