@vitessce/description 3.5.12 → 3.6.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.
- package/dist/index.js +8550 -5938
- package/dist-tsc/Description.js +4 -4
- package/dist-tsc/Description.test.js +2 -6
- package/package.json +10 -9
- package/src/Description.js +4 -4
- package/src/Description.test.jsx +2 -6
package/dist-tsc/Description.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { makeStyles } from '@
|
|
3
|
+
import { makeStyles } from '@vitessce/styles';
|
|
4
4
|
import Markdown from 'react-markdown';
|
|
5
5
|
import { DescriptionType } from '@vitessce/constants-internal';
|
|
6
|
-
const useStyles = makeStyles(theme => ({
|
|
6
|
+
const useStyles = makeStyles()(theme => ({
|
|
7
7
|
description: {
|
|
8
8
|
'& p, details, table': {
|
|
9
9
|
fontSize: '80%',
|
|
@@ -31,7 +31,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
31
31
|
whiteSpace: 'nowrap',
|
|
32
32
|
width: '50%',
|
|
33
33
|
},
|
|
34
|
-
'& tr:nth-
|
|
34
|
+
'& tr:nth-of-type(even)': {
|
|
35
35
|
// TODO(monorepo): lighten color by 5%
|
|
36
36
|
backgroundColor: `1px solid ${theme.palette.primaryBackground}`,
|
|
37
37
|
},
|
|
@@ -40,7 +40,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
40
40
|
}));
|
|
41
41
|
export default function Description(props) {
|
|
42
42
|
const { description, metadata, descriptionType } = props;
|
|
43
|
-
const classes = useStyles();
|
|
43
|
+
const { classes } = useStyles();
|
|
44
44
|
return (_jsxs("div", { className: classes.description, children: [descriptionType && descriptionType === DescriptionType.MARKDOWN
|
|
45
45
|
? _jsx(Markdown, { children: description }) : _jsx("p", { children: description }), metadata && Array.from(metadata.entries())
|
|
46
46
|
.map(([layerIndex, { name: layerName, metadata: metadataRecord }]) => (metadataRecord && Object.entries(metadataRecord).length > 0 ? (_jsxs("details", { children: [_jsx("summary", { children: layerName }), _jsx("div", { className: classes.metadataContainer, children: _jsx("table", { children: _jsx("tbody", { children: Object.entries(metadataRecord)
|
|
@@ -1,12 +1,8 @@
|
|
|
1
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
2
|
import React from 'react';
|
|
3
|
+
import { describe, it, expect } from 'vitest';
|
|
4
|
+
import { render, screen } from '@testing-library/react';
|
|
6
5
|
import Description from './Description.js';
|
|
7
|
-
afterEach(() => {
|
|
8
|
-
cleanup();
|
|
9
|
-
});
|
|
10
6
|
describe('Description.js', () => {
|
|
11
7
|
describe('<Description />', () => {
|
|
12
8
|
it('shows text', async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/description",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -16,20 +16,21 @@
|
|
|
16
16
|
"dist-tsc"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@material-ui/core": "~4.12.3",
|
|
20
19
|
"react-markdown": "^9.0.1",
|
|
21
|
-
"@vitessce/
|
|
22
|
-
"@vitessce/
|
|
20
|
+
"@vitessce/styles": "3.6.1",
|
|
21
|
+
"@vitessce/constants-internal": "3.6.1",
|
|
22
|
+
"@vitessce/vit-s": "3.6.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@testing-library/jest-dom": "^
|
|
26
|
-
"@testing-library/react": "^
|
|
25
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
26
|
+
"@testing-library/react": "^16.3.0",
|
|
27
27
|
"react": "^18.0.0",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"react-dom": "^18.0.0",
|
|
29
|
+
"vite": "^6.3.5",
|
|
30
|
+
"vitest": "^3.1.4"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
33
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
package/src/Description.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { makeStyles } from '@
|
|
2
|
+
import { makeStyles } from '@vitessce/styles';
|
|
3
3
|
import Markdown from 'react-markdown';
|
|
4
4
|
import { DescriptionType } from '@vitessce/constants-internal';
|
|
5
5
|
|
|
6
|
-
const useStyles = makeStyles(theme => ({
|
|
6
|
+
const useStyles = makeStyles()(theme => ({
|
|
7
7
|
description: {
|
|
8
8
|
'& p, details, table': {
|
|
9
9
|
fontSize: '80%',
|
|
@@ -31,7 +31,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
31
31
|
whiteSpace: 'nowrap',
|
|
32
32
|
width: '50%',
|
|
33
33
|
},
|
|
34
|
-
'& tr:nth-
|
|
34
|
+
'& tr:nth-of-type(even)': {
|
|
35
35
|
// TODO(monorepo): lighten color by 5%
|
|
36
36
|
backgroundColor: `1px solid ${theme.palette.primaryBackground}`,
|
|
37
37
|
},
|
|
@@ -41,7 +41,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
41
41
|
|
|
42
42
|
export default function Description(props) {
|
|
43
43
|
const { description, metadata, descriptionType } = props;
|
|
44
|
-
const classes = useStyles();
|
|
44
|
+
const { classes } = useStyles();
|
|
45
45
|
return (
|
|
46
46
|
<div className={classes.description}>
|
|
47
47
|
{descriptionType && descriptionType === DescriptionType.MARKDOWN
|
package/src/Description.test.jsx
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { describe, it, expect, afterEach } from 'vitest';
|
|
2
|
-
import '@testing-library/jest-dom';
|
|
3
|
-
import { cleanup, render, screen } from '@testing-library/react';
|
|
4
1
|
import React from 'react';
|
|
2
|
+
import { describe, it, expect } from 'vitest';
|
|
3
|
+
import { render, screen } from '@testing-library/react';
|
|
5
4
|
|
|
6
5
|
import Description from './Description.js';
|
|
7
6
|
|
|
8
|
-
afterEach(() => {
|
|
9
|
-
cleanup();
|
|
10
|
-
});
|
|
11
7
|
|
|
12
8
|
describe('Description.js', () => {
|
|
13
9
|
describe('<Description />', () => {
|