@vitessce/vit-s 3.4.10 → 3.4.12
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 +48 -7
- package/dist-tsc/TitleInfo.d.ts.map +1 -1
- package/dist-tsc/TitleInfo.js +22 -4
- package/package.json +8 -8
- package/src/TitleInfo.js +40 -1
package/dist/index.js
CHANGED
|
@@ -28066,6 +28066,7 @@ const CoordinationType$1 = {
|
|
|
28066
28066
|
FEATURE_TYPE: "featureType",
|
|
28067
28067
|
FEATURE_VALUE_TYPE: "featureValueType",
|
|
28068
28068
|
OBS_LABELS_TYPE: "obsLabelsType",
|
|
28069
|
+
FEATURE_LABELS_TYPE: "featureLabelsType",
|
|
28069
28070
|
// Other types
|
|
28070
28071
|
EMBEDDING_TYPE: "embeddingType",
|
|
28071
28072
|
EMBEDDING_ZOOM: "embeddingZoom",
|
|
@@ -28247,10 +28248,10 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
|
|
|
28247
28248
|
CoordinationType$1.EMBEDDING_OBS_OPACITY
|
|
28248
28249
|
];
|
|
28249
28250
|
const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
|
|
28250
|
-
const version = "3.4.
|
|
28251
|
-
const date = "2024-
|
|
28251
|
+
const version = "3.4.12";
|
|
28252
|
+
const date = "2024-10-02";
|
|
28252
28253
|
const branch = "changeset-release/main";
|
|
28253
|
-
const hash = "
|
|
28254
|
+
const hash = "ce99ac9e";
|
|
28254
28255
|
const META_VERSION = {
|
|
28255
28256
|
note,
|
|
28256
28257
|
version,
|
|
@@ -28590,7 +28591,7 @@ const annDataObsSetsArr = z.array(z.object({
|
|
|
28590
28591
|
]),
|
|
28591
28592
|
scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
|
|
28592
28593
|
}));
|
|
28593
|
-
|
|
28594
|
+
z.object({
|
|
28594
28595
|
obsSets: annDataObsSetsArr
|
|
28595
28596
|
});
|
|
28596
28597
|
const annDataObsFeatureColumnsArr = z.array(z.object({
|
|
@@ -28652,7 +28653,7 @@ const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
|
|
|
28652
28653
|
const obsSetsSpatialdataSchema = z.object({
|
|
28653
28654
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
28654
28655
|
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
28655
|
-
obsSets:
|
|
28656
|
+
obsSets: annDataObsSetsArr
|
|
28656
28657
|
});
|
|
28657
28658
|
z.object({
|
|
28658
28659
|
targetX: z.number(),
|
|
@@ -38180,6 +38181,9 @@ const CloseIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
|
|
|
38180
38181
|
const CloudDownloadIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
|
|
38181
38182
|
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"
|
|
38182
38183
|
}), "CloudDownload");
|
|
38184
|
+
const HelpIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
|
|
38185
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
|
|
38186
|
+
}), "Help");
|
|
38183
38187
|
const SettingsIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
|
|
38184
38188
|
d: "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"
|
|
38185
38189
|
}), "Settings");
|
|
@@ -38305,6 +38309,18 @@ const useStyles$1 = makeStyles((theme) => ({
|
|
|
38305
38309
|
},
|
|
38306
38310
|
downloadLink: {
|
|
38307
38311
|
color: theme.palette.primaryForeground
|
|
38312
|
+
},
|
|
38313
|
+
helpTextSpan: {
|
|
38314
|
+
maxWidth: "400px",
|
|
38315
|
+
padding: "5px 10px",
|
|
38316
|
+
display: "inline-block",
|
|
38317
|
+
textAlign: "justify",
|
|
38318
|
+
fontSize: "14px",
|
|
38319
|
+
backgroundColor: theme.palette.gridLayoutBackground,
|
|
38320
|
+
color: theme.palette.tooltipText,
|
|
38321
|
+
borderRadius: "8px",
|
|
38322
|
+
boxShadow: "0 0 10px rgba(0, 0, 0, 0.2)",
|
|
38323
|
+
border: "10px solid grey"
|
|
38308
38324
|
}
|
|
38309
38325
|
}));
|
|
38310
38326
|
function SettingsIconWithArrow({ open }) {
|
|
@@ -38358,6 +38374,24 @@ function DownloadOptions(props) {
|
|
|
38358
38374
|
}
|
|
38359
38375
|
) : null;
|
|
38360
38376
|
}
|
|
38377
|
+
function HelpButton(props) {
|
|
38378
|
+
const { helpText } = props;
|
|
38379
|
+
const [open, setOpen] = useState(false);
|
|
38380
|
+
const classes = useStyles$1();
|
|
38381
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38382
|
+
PopperMenu,
|
|
38383
|
+
{
|
|
38384
|
+
open,
|
|
38385
|
+
setOpen,
|
|
38386
|
+
buttonIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(HelpIcon, {}),
|
|
38387
|
+
buttonClassName: classes.iconButton,
|
|
38388
|
+
placement: "bottom-end",
|
|
38389
|
+
"aria-label": "Open help info",
|
|
38390
|
+
withPaper: false,
|
|
38391
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes.helpTextSpan, children: helpText })
|
|
38392
|
+
}
|
|
38393
|
+
);
|
|
38394
|
+
}
|
|
38361
38395
|
function ClosePaneButton(props) {
|
|
38362
38396
|
const { removeGridComponent } = props;
|
|
38363
38397
|
const classes = useStyles$1();
|
|
@@ -38385,7 +38419,8 @@ function TitleInfo(props) {
|
|
|
38385
38419
|
isReady,
|
|
38386
38420
|
options,
|
|
38387
38421
|
closeButtonVisible = true,
|
|
38388
|
-
downloadButtonVisible = true
|
|
38422
|
+
downloadButtonVisible = true,
|
|
38423
|
+
helpText
|
|
38389
38424
|
} = props;
|
|
38390
38425
|
const classes = useTitleStyles();
|
|
38391
38426
|
return (
|
|
@@ -38407,6 +38442,12 @@ function TitleInfo(props) {
|
|
|
38407
38442
|
urls
|
|
38408
38443
|
}
|
|
38409
38444
|
) : null,
|
|
38445
|
+
helpText ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38446
|
+
HelpButton,
|
|
38447
|
+
{
|
|
38448
|
+
helpText
|
|
38449
|
+
}
|
|
38450
|
+
) : null,
|
|
38410
38451
|
closeButtonVisible && removeGridComponent ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38411
38452
|
ClosePaneButton,
|
|
38412
38453
|
{
|
|
@@ -38430,7 +38471,7 @@ function TitleInfo(props) {
|
|
|
38430
38471
|
"aria-busy": !isReady,
|
|
38431
38472
|
role: "main",
|
|
38432
38473
|
children: [
|
|
38433
|
-
!isReady
|
|
38474
|
+
!isReady ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingIndicator, {}) : null,
|
|
38434
38475
|
children2
|
|
38435
38476
|
]
|
|
38436
38477
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleInfo.d.ts","sourceRoot":"","sources":["../src/TitleInfo.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TitleInfo.d.ts","sourceRoot":"","sources":["../src/TitleInfo.js"],"names":[],"mappings":"AA8JA,mDA2DC"}
|
package/dist-tsc/TitleInfo.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import React, { useState, useMemo } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
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';
|
|
5
|
+
import { CloudDownload as CloudDownloadIcon, ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon, Settings as SettingsIcon, Close as CloseIcon, Help as HelpIcon, } from '@material-ui/icons';
|
|
6
6
|
import { TOOLTIP_ANCESTOR } from './classNames.js';
|
|
7
7
|
import LoadingIndicator from './LoadingIndicator.js';
|
|
8
8
|
import { PopperMenu } from './shared-mui/components.js';
|
|
@@ -35,6 +35,18 @@ const useStyles = makeStyles(theme => ({
|
|
|
35
35
|
downloadLink: {
|
|
36
36
|
color: theme.palette.primaryForeground,
|
|
37
37
|
},
|
|
38
|
+
helpTextSpan: {
|
|
39
|
+
maxWidth: '400px',
|
|
40
|
+
padding: '5px 10px',
|
|
41
|
+
display: 'inline-block',
|
|
42
|
+
textAlign: 'justify',
|
|
43
|
+
fontSize: '14px',
|
|
44
|
+
backgroundColor: theme.palette.gridLayoutBackground,
|
|
45
|
+
color: theme.palette.tooltipText,
|
|
46
|
+
borderRadius: '8px',
|
|
47
|
+
boxShadow: '0 0 10px rgba(0, 0, 0, 0.2)',
|
|
48
|
+
border: '10px solid grey',
|
|
49
|
+
},
|
|
38
50
|
}));
|
|
39
51
|
function SettingsIconWithArrow({ open }) {
|
|
40
52
|
return (_jsxs(_Fragment, { children: [_jsx(SettingsIcon, {}), open ? _jsx(ArrowDropUpIcon, {}) : _jsx(ArrowDropDownIcon, {})] }));
|
|
@@ -56,21 +68,27 @@ function DownloadOptions(props) {
|
|
|
56
68
|
const buttonIcon = useMemo(() => (_jsx(CloudDownloadIconWithArrow, { open: open })), [open]);
|
|
57
69
|
return (urls && urls.length ? (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: buttonIcon, buttonClassName: classes.iconButton, placement: "bottom-end", "aria-label": "Open download options menu", children: urls.map(({ url, name }) => (_jsx(MenuItem, { dense: true, "aria-label": `Click to download ${name}`, children: _jsxs(Link, { underline: "always", href: url, target: "_blank", rel: "noopener", className: classes.downloadLink, children: ["Download ", name] }) }, `${url}_${name}`))) })) : null);
|
|
58
70
|
}
|
|
71
|
+
function HelpButton(props) {
|
|
72
|
+
const { helpText } = props;
|
|
73
|
+
const [open, setOpen] = useState(false);
|
|
74
|
+
const classes = useStyles();
|
|
75
|
+
return (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: _jsx(HelpIcon, {}), buttonClassName: classes.iconButton, placement: "bottom-end", "aria-label": "Open help info", withPaper: false, children: _jsx("span", { className: classes.helpTextSpan, children: helpText }) }));
|
|
76
|
+
}
|
|
59
77
|
function ClosePaneButton(props) {
|
|
60
78
|
const { removeGridComponent } = props;
|
|
61
79
|
const classes = useStyles();
|
|
62
80
|
return (_jsx(IconButton, { onClick: removeGridComponent, size: "small", className: classes.iconButton, title: "close", "aria-label": "Close panel button", children: _jsx(CloseIcon, {}) }));
|
|
63
81
|
}
|
|
64
82
|
export function TitleInfo(props) {
|
|
65
|
-
const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, closeButtonVisible = true, downloadButtonVisible = true, } = props;
|
|
83
|
+
const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, closeButtonVisible = true, downloadButtonVisible = true, helpText, } = props;
|
|
66
84
|
const classes = useTitleStyles();
|
|
67
85
|
return (
|
|
68
86
|
// d-flex without wrapping div is not always full height; I don't understand the root cause.
|
|
69
|
-
_jsxs(_Fragment, { children: [_jsxs("div", { className: classes.title, role: "banner", children: [_jsx("div", { className: classes.titleLeft, role: "heading", "aria-level": "1", children: title }), _jsx("div", { className: classes.titleInfo, title: info, role: "note", children: info }), _jsxs("div", { className: classes.titleButtons, role: "toolbar", "aria-label": "Plot options and controls", children: [_jsx(PlotOptions, { options: options }), downloadButtonVisible ? (_jsx(DownloadOptions, { urls: urls })) : null, closeButtonVisible && removeGridComponent ? (_jsx(ClosePaneButton, { removeGridComponent: removeGridComponent })) : null] })] }), _jsxs("div", { className: clsx(TOOLTIP_ANCESTOR, classes.card, {
|
|
87
|
+
_jsxs(_Fragment, { children: [_jsxs("div", { className: classes.title, role: "banner", children: [_jsx("div", { className: classes.titleLeft, role: "heading", "aria-level": "1", children: title }), _jsx("div", { className: classes.titleInfo, title: info, role: "note", children: info }), _jsxs("div", { className: classes.titleButtons, role: "toolbar", "aria-label": "Plot options and controls", children: [_jsx(PlotOptions, { options: options }), downloadButtonVisible ? (_jsx(DownloadOptions, { urls: urls })) : null, helpText ? (_jsx(HelpButton, { helpText: helpText })) : null, closeButtonVisible && removeGridComponent ? (_jsx(ClosePaneButton, { removeGridComponent: removeGridComponent })) : null] })] }), _jsxs("div", { className: clsx(TOOLTIP_ANCESTOR, classes.card, {
|
|
70
88
|
[classes.scrollCard]: isScroll,
|
|
71
89
|
[classes.spatialCard]: isSpatial,
|
|
72
90
|
[classes.noScrollCard]: !isScroll && !isSpatial,
|
|
73
|
-
}), "aria-busy": !isReady, role: "main", children: [!isReady
|
|
91
|
+
}), "aria-busy": !isReady, role: "main", children: [!isReady ? _jsx(LoadingIndicator, {}) : null, children] })] })
|
|
74
92
|
// "pl-2" only matters when the window is very narrow.
|
|
75
93
|
);
|
|
76
94
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/vit-s",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.12",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"uuid": "^9.0.0",
|
|
30
30
|
"zustand": "^3.5.10",
|
|
31
31
|
"react-aria": "^3.28.0",
|
|
32
|
-
"@vitessce/constants-internal": "3.4.
|
|
33
|
-
"@vitessce/plugins": "3.4.
|
|
34
|
-
"@vitessce/schemas": "3.4.
|
|
35
|
-
"@vitessce/utils": "3.4.
|
|
36
|
-
"@vitessce/sets-utils": "3.4.
|
|
37
|
-
"@vitessce/config": "3.4.
|
|
32
|
+
"@vitessce/constants-internal": "3.4.12",
|
|
33
|
+
"@vitessce/plugins": "3.4.12",
|
|
34
|
+
"@vitessce/schemas": "3.4.12",
|
|
35
|
+
"@vitessce/utils": "3.4.12",
|
|
36
|
+
"@vitessce/sets-utils": "3.4.12",
|
|
37
|
+
"@vitessce/config": "3.4.12"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@testing-library/jest-dom": "^5.16.4",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react": "^18.0.0",
|
|
43
43
|
"vite": "^4.3.0",
|
|
44
44
|
"vitest": "^0.32.2",
|
|
45
|
-
"@vitessce/types": "3.4.
|
|
45
|
+
"@vitessce/types": "3.4.12"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
package/src/TitleInfo.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ArrowDropUp as ArrowDropUpIcon,
|
|
8
8
|
Settings as SettingsIcon,
|
|
9
9
|
Close as CloseIcon,
|
|
10
|
+
Help as HelpIcon,
|
|
10
11
|
} from '@material-ui/icons';
|
|
11
12
|
|
|
12
13
|
import { TOOLTIP_ANCESTOR } from './classNames.js';
|
|
@@ -42,6 +43,18 @@ const useStyles = makeStyles(theme => ({
|
|
|
42
43
|
downloadLink: {
|
|
43
44
|
color: theme.palette.primaryForeground,
|
|
44
45
|
},
|
|
46
|
+
helpTextSpan: {
|
|
47
|
+
maxWidth: '400px',
|
|
48
|
+
padding: '5px 10px',
|
|
49
|
+
display: 'inline-block',
|
|
50
|
+
textAlign: 'justify',
|
|
51
|
+
fontSize: '14px',
|
|
52
|
+
backgroundColor: theme.palette.gridLayoutBackground,
|
|
53
|
+
color: theme.palette.tooltipText,
|
|
54
|
+
borderRadius: '8px',
|
|
55
|
+
boxShadow: '0 0 10px rgba(0, 0, 0, 0.2)',
|
|
56
|
+
border: '10px solid grey',
|
|
57
|
+
},
|
|
45
58
|
}));
|
|
46
59
|
|
|
47
60
|
function SettingsIconWithArrow({ open }) {
|
|
@@ -107,6 +120,26 @@ function DownloadOptions(props) {
|
|
|
107
120
|
) : null);
|
|
108
121
|
}
|
|
109
122
|
|
|
123
|
+
function HelpButton(props) {
|
|
124
|
+
const { helpText } = props;
|
|
125
|
+
const [open, setOpen] = useState(false);
|
|
126
|
+
const classes = useStyles();
|
|
127
|
+
return (
|
|
128
|
+
<PopperMenu
|
|
129
|
+
open={open}
|
|
130
|
+
setOpen={setOpen}
|
|
131
|
+
buttonIcon={<HelpIcon />}
|
|
132
|
+
buttonClassName={classes.iconButton}
|
|
133
|
+
placement="bottom-end"
|
|
134
|
+
aria-label="Open help info"
|
|
135
|
+
withPaper={false}
|
|
136
|
+
>
|
|
137
|
+
<span className={classes.helpTextSpan}>{helpText}</span>
|
|
138
|
+
</PopperMenu>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
110
143
|
function ClosePaneButton(props) {
|
|
111
144
|
const { removeGridComponent } = props;
|
|
112
145
|
const classes = useStyles();
|
|
@@ -127,6 +160,7 @@ export function TitleInfo(props) {
|
|
|
127
160
|
const {
|
|
128
161
|
title, info, children, isScroll, isSpatial, removeGridComponent, urls,
|
|
129
162
|
isReady, options, closeButtonVisible = true, downloadButtonVisible = true,
|
|
163
|
+
helpText,
|
|
130
164
|
} = props;
|
|
131
165
|
|
|
132
166
|
const classes = useTitleStyles();
|
|
@@ -150,6 +184,11 @@ export function TitleInfo(props) {
|
|
|
150
184
|
urls={urls}
|
|
151
185
|
/>
|
|
152
186
|
) : null}
|
|
187
|
+
{helpText ? (
|
|
188
|
+
<HelpButton
|
|
189
|
+
helpText={helpText}
|
|
190
|
+
/>
|
|
191
|
+
) : null}
|
|
153
192
|
{closeButtonVisible && removeGridComponent ? (
|
|
154
193
|
<ClosePaneButton
|
|
155
194
|
removeGridComponent={removeGridComponent}
|
|
@@ -170,7 +209,7 @@ export function TitleInfo(props) {
|
|
|
170
209
|
aria-busy={!isReady}
|
|
171
210
|
role="main"
|
|
172
211
|
>
|
|
173
|
-
{ !isReady
|
|
212
|
+
{ !isReady ? <LoadingIndicator /> : null }
|
|
174
213
|
{children}
|
|
175
214
|
</div>
|
|
176
215
|
</>
|