From b2ea017205931fd28a67ffbc98ef50c1839dd771 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Sun, 26 Mar 2023 15:28:28 -0400 Subject: [PATCH 01/28] Add first pass of loading vignettes yaml from assets --- context/app/api/client.py | 53 +++++++++++++++++++++++++++++++++++- context/app/routes_browse.py | 3 ++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/context/app/api/client.py b/context/app/api/client.py index 0d82edaa0b..c59962c46b 100644 --- a/context/app/api/client.py +++ b/context/app/api/client.py @@ -5,7 +5,7 @@ from flask import abort, current_app import requests - +import frontmatter from hubmap_commons.type_client import TypeClient from .client_utils import files_from_response @@ -208,6 +208,53 @@ def get_assay(name): return VitessceConfLiftedUUID( vitessce_conf=vitessce_conf, vis_lifted_uuid=vis_lifted_uuid) + + def _file_request(self, url, body_json=None): + headers = {'Authorization': 'Bearer ' + self.groups_token} if self.groups_token else {} + + if self.groups_token: + url += f"?token={self.groups_token}" + try: + response = ( + requests.get(url, headers=headers) + ) + except requests.exceptions.ConnectTimeout as error: + current_app.logger.error(error) + abort(504) + try: + response.raise_for_status() + except requests.exceptions.HTTPError as error: + current_app.logger.error(error.response.text) + status = error.response.status_code + if status in [400, 404]: + # The same 404 page will be returned, + # whether it's a missing route in portal-ui, + # or a missing entity in the API. + abort(status) + if status in [401]: + # I believe we have 401 errors when the globus credentials + # have expired, but are still in the flask session. + abort(status) + raise + return response.text + + + def get_publication_vignettes(self, uuid): + vignettes_path = f"{current_app.config['ASSETS_ENDPOINT']}/{uuid}/vignettes/" + vignette_data = {} + + i = 1 + while True: + try: + vignette_dir_name = _get_vignette_dir_name(i) + description_text = self._file_request(f"{vignettes_path}/{vignette_dir_name}/description.md") + metadata_content = frontmatter.loads(description_text) + vignette_data[vignette_dir_name] = metadata_content.metadata + i += 1 + except: + break + + return vignette_data def _make_query(constraints, uuids): @@ -463,3 +510,7 @@ def _get_latest_uuid(revisions): ] return max(clean_revisions, key=lambda revision: revision['revision_number'])['uuid'] + + +def _get_vignette_dir_name(vignette_number): + return f"vignette_{vignette_number:02}" diff --git a/context/app/routes_browse.py b/context/app/routes_browse.py index 318b72398b..079b12d95b 100644 --- a/context/app/routes_browse.py +++ b/context/app/routes_browse.py @@ -63,6 +63,9 @@ def details(type, uuid): 'has_notebook': conf_cells_uuid.vitessce_conf.cells is not None, 'vis_lifted_uuid': conf_cells_uuid.vis_lifted_uuid }) + + if type == 'publication': + flask_data.update({'vignette_data': client.get_publication_vignettes(uuid)}) template = 'base-pages/react-content.html' return render_template( From 2af45591cd1d636d08c96aad33dcb903b955bab1 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Sun, 26 Mar 2023 18:16:16 -0400 Subject: [PATCH 02/28] Add mark's util to fill url and token in vit conf --- .../VisualizationsSection/utils.js | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js new file mode 100644 index 0000000000..37ac5071df --- /dev/null +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js @@ -0,0 +1,48 @@ +/** + * @param {object} config The "template" config containing URLs with "{{ base_url }}". + * @param {function} handleUrl Function that takes in a (potentially template) URL string and returns a filled-in URL string. + * @returns {object} The config with handleUrl having been called to process every URL. + */ +const fillUrls = (config, handleUrl) => { + return { + ...config, + datasets: config.datasets.map((datasetDef) => { + return { + ...datasetDef, + files: datasetDef.files.map((fileDef) => { + return { + ...fileDef, + ...(fileDef.url + ? { + url: handleUrl(fileDef.url), + } + : {}), + ...(fileDef.options?.images + ? { + options: { + ...fileDef.options, + images: fileDef.options.images.map((imageDef) => { + return { + ...imageDef, + url: handleUrl(imageDef.url), + ...(imageDef.metadata?.omeTiffOffsetsUrl + ? { + metadata: { + ...imageDef.metadata, + omeTiffOffsetsUrl: handleUrl(imageDef.metadata.omeTiffOffsetsUrl), + }, + } + : {}), + }; + }), + }, + } + : {}), + }; + }), + }; + }), + }; +}; + +export { fillUrls }; From 6ce4dfeaab02f472a27048da36fa140d6f558b7c Mon Sep 17 00:00:00 2001 From: John Conroy Date: Sun, 26 Mar 2023 18:16:33 -0400 Subject: [PATCH 03/28] Pass vignette data to publication --- context/app/static/js/components/Routes/Routes.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/context/app/static/js/components/Routes/Routes.jsx b/context/app/static/js/components/Routes/Routes.jsx index c87e3dbbb9..8a0de7b20f 100644 --- a/context/app/static/js/components/Routes/Routes.jsx +++ b/context/app/static/js/components/Routes/Routes.jsx @@ -48,6 +48,7 @@ function Routes({ flaskData }) { organs, organs_count, organ, + vignette_data, } = flaskData; const urlPath = window.location.pathname; const url = window.location.href; @@ -100,7 +101,7 @@ function Routes({ flaskData }) { if (urlPath.startsWith('/browse/publication/')) { return ( - + ); } @@ -296,6 +297,7 @@ Routes.propTypes = { organs: PropTypes.object, metadata: PropTypes.object, organs_count: PropTypes.number, + vignette_data: PropTypes.string, }), }; From f4bcc5fe5c2337982e153efebeb3d91dde6bcc4c Mon Sep 17 00:00:00 2001 From: John Conroy Date: Sun, 26 Mar 2023 18:16:45 -0400 Subject: [PATCH 04/28] Add wip visualization to publication --- .../PublicationsVisualizationSection.jsx | 43 +++++++++++++++++++ .../VisualizationsSection/index.js | 3 ++ .../js/pages/Publication/Publication.jsx | 4 +- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx create mode 100644 context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/index.js diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx new file mode 100644 index 0000000000..b73f2b01ff --- /dev/null +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -0,0 +1,43 @@ +import React, { useContext, useEffect, useState } from 'react'; + +import { AppContext } from 'js/components/Providers'; +import VisualizationWrapper from 'js/components/detailPage/visualization/VisualizationWrapper'; +import { fillUrls } from './utils'; + +async function fetchVitessceConf(assetsEndpoint, uuid, p, groupsToken) { + const response = await fetch(`${assetsEndpoint}/${uuid}/vignettes/vignette_01/${p}?token=${groupsToken}`, { + headers: { + 'Content-Type': 'application/json', + }, + }); + + if (!response.ok) { + console.error('Assets API failed', response); + return undefined; + } + const results = await response.json(); + return results; +} + +function PublicationsVisualizationSection({ vignette_data, uuid }) { + const { assetsEndpoint, groupsToken } = useContext(AppContext); + const p = vignette_data.vignette_01.figures[0].file; + + const [v, setV] = useState(undefined); + + useEffect(() => { + async function getAndSetVitessceConf() { + const results = await fetchVitessceConf(assetsEndpoint, uuid, p, groupsToken); + const urlHandler = (url) => { + return `${url.replace('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`)}?token=${groupsToken}`; + }; + setV(fillUrls(results, urlHandler)); + // setV(JSON.parse(JSON.stringify(results).replaceAll('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`))); + } + getAndSetVitessceConf(); + }, [assetsEndpoint, groupsToken, p, uuid]); + + return v ? : null; +} + +export default PublicationsVisualizationSection; diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/index.js b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/index.js new file mode 100644 index 0000000000..7d1b15d3db --- /dev/null +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/index.js @@ -0,0 +1,3 @@ +import PublicationsVisualizationSection from './PublicationsVisualizationSection'; + +export default PublicationsVisualizationSection; diff --git a/context/app/static/js/pages/Publication/Publication.jsx b/context/app/static/js/pages/Publication/Publication.jsx index 5aa043182a..23fd147324 100644 --- a/context/app/static/js/pages/Publication/Publication.jsx +++ b/context/app/static/js/pages/Publication/Publication.jsx @@ -6,13 +6,14 @@ import OutboundIconLink from 'js/shared-styles/Links/iconLinks/OutboundIconLink' import { getCombinedDatasetStatus, getSectionOrder } from 'js/components/detailPage/utils'; import ContributorsTable from 'js/components/detailPage/ContributorsTable/ContributorsTable'; import PublicationsDataSection from 'js/components/publications/PublicationsDataSection'; +import PublicationsVisualizationSection from 'js/components/publications/PublicationVisualizationsSection/VisualizationsSection'; import ProvSection from 'js/components/detailPage/provenance/ProvSection'; import DetailLayout from 'js/components/detailPage/DetailLayout'; import useEntityStore from 'js/stores/useEntityStore'; const entityStoreSelector = (state) => state.setAssayMetadata; -function Publication({ publication }) { +function Publication({ publication, vignette_data }) { const { title, uuid, @@ -60,6 +61,7 @@ function Publication({ publication }) { {hasDOI && {doi_url}} + From bedf2fd28272405fdb04316a36ac92102ccbea51 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 10:16:05 -0400 Subject: [PATCH 05/28] Add request init handler to util for zarr files --- .../PublicationsVisualizationSection.jsx | 17 ++++++++++++++--- .../VisualizationsSection/utils.js | 13 +++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index b73f2b01ff..9d03db3a66 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -28,10 +28,21 @@ function PublicationsVisualizationSection({ vignette_data, uuid }) { useEffect(() => { async function getAndSetVitessceConf() { const results = await fetchVitessceConf(assetsEndpoint, uuid, p, groupsToken); - const urlHandler = (url) => { - return `${url.replace('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`)}?token=${groupsToken}`; + + const urlHandler = (url, isZarr) => { + return `${url.replace('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`)}${ + isZarr ? '' : `?token=${groupsToken}` + }`; + }; + + const requestInitHandler = () => { + return { + headers: { Authorization: `Bearer ${groupsToken}` }, + }; }; - setV(fillUrls(results, urlHandler)); + + const filledConf = fillUrls(results, urlHandler, requestInitHandler); + setV(filledConf); // setV(JSON.parse(JSON.stringify(results).replaceAll('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`))); } getAndSetVitessceConf(); diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js index 37ac5071df..ae32b4b1ae 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js @@ -3,7 +3,7 @@ * @param {function} handleUrl Function that takes in a (potentially template) URL string and returns a filled-in URL string. * @returns {object} The config with handleUrl having been called to process every URL. */ -const fillUrls = (config, handleUrl) => { +const fillUrls = (config, handleUrl, handleRequestInit) => { return { ...config, datasets: config.datasets.map((datasetDef) => { @@ -14,7 +14,12 @@ const fillUrls = (config, handleUrl) => { ...fileDef, ...(fileDef.url ? { - url: handleUrl(fileDef.url), + url: handleUrl(fileDef.url, fileDef.fileType.includes('zarr')), + } + : {}), + ...(fileDef.fileType.includes('zarr') + ? { + requestInit: handleRequestInit(), } : {}), ...(fileDef.options?.images @@ -24,12 +29,12 @@ const fillUrls = (config, handleUrl) => { images: fileDef.options.images.map((imageDef) => { return { ...imageDef, - url: handleUrl(imageDef.url), + url: handleUrl(imageDef.url, false), ...(imageDef.metadata?.omeTiffOffsetsUrl ? { metadata: { ...imageDef.metadata, - omeTiffOffsetsUrl: handleUrl(imageDef.metadata.omeTiffOffsetsUrl), + omeTiffOffsetsUrl: handleUrl(imageDef.metadata.omeTiffOffsetsUrl, false), }, } : {}), From 08cbdda0f60f5522c507f0609755d1d3e6a02a77 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 10:36:39 -0400 Subject: [PATCH 06/28] Rename state variable --- .../PublicationsVisualizationSection.jsx | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index 9d03db3a66..a920713c40 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -4,8 +4,17 @@ import { AppContext } from 'js/components/Providers'; import VisualizationWrapper from 'js/components/detailPage/visualization/VisualizationWrapper'; import { fillUrls } from './utils'; -async function fetchVitessceConf(assetsEndpoint, uuid, p, groupsToken) { - const response = await fetch(`${assetsEndpoint}/${uuid}/vignettes/vignette_01/${p}?token=${groupsToken}`, { +async function fetchVitessceConf(assetsEndpoint, uuid, filePath, groupsToken) { + const urlHandler = (url, isZarr) => { + return `${url.replace('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`)}${isZarr ? '' : `?token=${groupsToken}`}`; + }; + + const requestInitHandler = () => { + return { + headers: { Authorization: `Bearer ${groupsToken}` }, + }; + }; + const response = await fetch(`${assetsEndpoint}/${uuid}/vignettes/vignette_01/${filePath}?token=${groupsToken}`, { headers: { 'Content-Type': 'application/json', }, @@ -15,40 +24,29 @@ async function fetchVitessceConf(assetsEndpoint, uuid, p, groupsToken) { console.error('Assets API failed', response); return undefined; } - const results = await response.json(); - return results; + const conf = await response.json(); + return fillUrls(conf, urlHandler, requestInitHandler); } function PublicationsVisualizationSection({ vignette_data, uuid }) { const { assetsEndpoint, groupsToken } = useContext(AppContext); const p = vignette_data.vignette_01.figures[0].file; - const [v, setV] = useState(undefined); + const [vitessceConfs, setVitessceConfs] = useState(undefined); useEffect(() => { async function getAndSetVitessceConf() { - const results = await fetchVitessceConf(assetsEndpoint, uuid, p, groupsToken); - - const urlHandler = (url, isZarr) => { - return `${url.replace('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`)}${ - isZarr ? '' : `?token=${groupsToken}` - }`; - }; - - const requestInitHandler = () => { - return { - headers: { Authorization: `Bearer ${groupsToken}` }, - }; - }; - - const filledConf = fillUrls(results, urlHandler, requestInitHandler); - setV(filledConf); - // setV(JSON.parse(JSON.stringify(results).replaceAll('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`))); + const figuresConfs = await Promise.all( + vignette_data.vignette_01.figures.map((figure) => { + return fetchVitessceConf(assetsEndpoint, uuid, figure.file, groupsToken); + }), + ); + setVitessceConfs(figuresConfs); } getAndSetVitessceConf(); - }, [assetsEndpoint, groupsToken, p, uuid]); + }, [assetsEndpoint, groupsToken, p, uuid, vignette_data.vignette_01.figures]); - return v ? : null; + return vitessceConfs ? : null; } export default PublicationsVisualizationSection; From 842573cc01e91331122318bf3728ae12bfefec58 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 11:01:29 -0400 Subject: [PATCH 07/28] Move publication vignette to own component --- .../PublicationVignette.jsx | 55 +++++++++++++++++++ .../publications/PublicationVignette/index.js | 3 + .../publications/PublicationVignette/utils.js | 53 ++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx create mode 100644 context/app/static/js/components/publications/PublicationVignette/index.js create mode 100644 context/app/static/js/components/publications/PublicationVignette/utils.js diff --git a/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx new file mode 100644 index 0000000000..ae0c5b1429 --- /dev/null +++ b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx @@ -0,0 +1,55 @@ +import React, { useContext, useEffect, useState } from 'react'; + +import { AppContext } from 'js/components/Providers'; +import VisualizationWrapper from 'js/components/detailPage/visualization/VisualizationWrapper'; + +import { fillUrls } from './utils'; + +async function fetchVitessceConf({ assetsEndpoint, uuid, filePath, groupsToken, vignetteDirName }) { + const urlHandler = (url, isZarr) => { + return `${url.replace('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`)}${isZarr ? '' : `?token=${groupsToken}`}`; + }; + + const requestInitHandler = () => { + return { + headers: { Authorization: `Bearer ${groupsToken}` }, + }; + }; + const response = await fetch( + `${assetsEndpoint}/${uuid}/vignettes/${vignetteDirName}/${filePath}?token=${groupsToken}`, + { + headers: { + 'Content-Type': 'application/json', + }, + }, + ); + + if (!response.ok) { + console.error('Assets API failed', response); + return undefined; + } + const conf = await response.json(); + return fillUrls(conf, urlHandler, requestInitHandler); +} + +function PublicationVignette({ vignette, vignetteDirName, uuid }) { + const { assetsEndpoint, groupsToken } = useContext(AppContext); + + const [vitessceConfs, setVitessceConfs] = useState(undefined); + + useEffect(() => { + async function getAndSetVitessceConf() { + const figuresConfs = await Promise.all( + vignette.figures.map((figure) => { + return fetchVitessceConf({ assetsEndpoint, uuid, filePath: figure.file, groupsToken, vignetteDirName }); + }), + ); + setVitessceConfs(figuresConfs); + } + getAndSetVitessceConf(); + }, [assetsEndpoint, groupsToken, uuid, vignette.figures, vignetteDirName]); + + return vitessceConfs ? : null; +} + +export default PublicationVignette; diff --git a/context/app/static/js/components/publications/PublicationVignette/index.js b/context/app/static/js/components/publications/PublicationVignette/index.js new file mode 100644 index 0000000000..ed320e09fb --- /dev/null +++ b/context/app/static/js/components/publications/PublicationVignette/index.js @@ -0,0 +1,3 @@ +import PublicationVignette from './PublicationVignette'; + +export default PublicationVignette; diff --git a/context/app/static/js/components/publications/PublicationVignette/utils.js b/context/app/static/js/components/publications/PublicationVignette/utils.js new file mode 100644 index 0000000000..ae32b4b1ae --- /dev/null +++ b/context/app/static/js/components/publications/PublicationVignette/utils.js @@ -0,0 +1,53 @@ +/** + * @param {object} config The "template" config containing URLs with "{{ base_url }}". + * @param {function} handleUrl Function that takes in a (potentially template) URL string and returns a filled-in URL string. + * @returns {object} The config with handleUrl having been called to process every URL. + */ +const fillUrls = (config, handleUrl, handleRequestInit) => { + return { + ...config, + datasets: config.datasets.map((datasetDef) => { + return { + ...datasetDef, + files: datasetDef.files.map((fileDef) => { + return { + ...fileDef, + ...(fileDef.url + ? { + url: handleUrl(fileDef.url, fileDef.fileType.includes('zarr')), + } + : {}), + ...(fileDef.fileType.includes('zarr') + ? { + requestInit: handleRequestInit(), + } + : {}), + ...(fileDef.options?.images + ? { + options: { + ...fileDef.options, + images: fileDef.options.images.map((imageDef) => { + return { + ...imageDef, + url: handleUrl(imageDef.url, false), + ...(imageDef.metadata?.omeTiffOffsetsUrl + ? { + metadata: { + ...imageDef.metadata, + omeTiffOffsetsUrl: handleUrl(imageDef.metadata.omeTiffOffsetsUrl, false), + }, + } + : {}), + }; + }), + }, + } + : {}), + }; + }), + }; + }), + }; +}; + +export { fillUrls }; From d661c4b8623b60741d52cea96b6a9397ea9878a0 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 11:01:58 -0400 Subject: [PATCH 08/28] Loop over vignette data --- .../PublicationsVisualizationSection.jsx | 51 ++---------------- .../VisualizationsSection/utils.js | 53 ------------------- 2 files changed, 5 insertions(+), 99 deletions(-) delete mode 100644 context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index a920713c40..2bd4f0f6b7 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -1,52 +1,11 @@ -import React, { useContext, useEffect, useState } from 'react'; +import React from 'react'; -import { AppContext } from 'js/components/Providers'; -import VisualizationWrapper from 'js/components/detailPage/visualization/VisualizationWrapper'; -import { fillUrls } from './utils'; - -async function fetchVitessceConf(assetsEndpoint, uuid, filePath, groupsToken) { - const urlHandler = (url, isZarr) => { - return `${url.replace('{{ base_url }}', `${assetsEndpoint}/${uuid}/data`)}${isZarr ? '' : `?token=${groupsToken}`}`; - }; - - const requestInitHandler = () => { - return { - headers: { Authorization: `Bearer ${groupsToken}` }, - }; - }; - const response = await fetch(`${assetsEndpoint}/${uuid}/vignettes/vignette_01/${filePath}?token=${groupsToken}`, { - headers: { - 'Content-Type': 'application/json', - }, - }); - - if (!response.ok) { - console.error('Assets API failed', response); - return undefined; - } - const conf = await response.json(); - return fillUrls(conf, urlHandler, requestInitHandler); -} +import PublicationVignette from 'js/components/publications/PublicationVignette'; function PublicationsVisualizationSection({ vignette_data, uuid }) { - const { assetsEndpoint, groupsToken } = useContext(AppContext); - const p = vignette_data.vignette_01.figures[0].file; - - const [vitessceConfs, setVitessceConfs] = useState(undefined); - - useEffect(() => { - async function getAndSetVitessceConf() { - const figuresConfs = await Promise.all( - vignette_data.vignette_01.figures.map((figure) => { - return fetchVitessceConf(assetsEndpoint, uuid, figure.file, groupsToken); - }), - ); - setVitessceConfs(figuresConfs); - } - getAndSetVitessceConf(); - }, [assetsEndpoint, groupsToken, p, uuid, vignette_data.vignette_01.figures]); - - return vitessceConfs ? : null; + return Object.entries(vignette_data).map(([k, v]) => { + return ; + }); } export default PublicationsVisualizationSection; diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js deleted file mode 100644 index ae32b4b1ae..0000000000 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/utils.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @param {object} config The "template" config containing URLs with "{{ base_url }}". - * @param {function} handleUrl Function that takes in a (potentially template) URL string and returns a filled-in URL string. - * @returns {object} The config with handleUrl having been called to process every URL. - */ -const fillUrls = (config, handleUrl, handleRequestInit) => { - return { - ...config, - datasets: config.datasets.map((datasetDef) => { - return { - ...datasetDef, - files: datasetDef.files.map((fileDef) => { - return { - ...fileDef, - ...(fileDef.url - ? { - url: handleUrl(fileDef.url, fileDef.fileType.includes('zarr')), - } - : {}), - ...(fileDef.fileType.includes('zarr') - ? { - requestInit: handleRequestInit(), - } - : {}), - ...(fileDef.options?.images - ? { - options: { - ...fileDef.options, - images: fileDef.options.images.map((imageDef) => { - return { - ...imageDef, - url: handleUrl(imageDef.url, false), - ...(imageDef.metadata?.omeTiffOffsetsUrl - ? { - metadata: { - ...imageDef.metadata, - omeTiffOffsetsUrl: handleUrl(imageDef.metadata.omeTiffOffsetsUrl, false), - }, - } - : {}), - }; - }), - }, - } - : {}), - }; - }), - }; - }), - }; -}; - -export { fillUrls }; From 3e94beb580ce3ad15a4cc171022e6df443bc54e3 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 11:12:23 -0400 Subject: [PATCH 09/28] Add vignette accordions --- .../visualization/Visualization/style.js | 3 ++- .../PublicationsVisualizationSection.jsx | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/context/app/static/js/components/detailPage/visualization/Visualization/style.js b/context/app/static/js/components/detailPage/visualization/Visualization/style.js index 6b2e9d21f9..dad7aacde5 100644 --- a/context/app/static/js/components/detailPage/visualization/Visualization/style.js +++ b/context/app/static/js/components/detailPage/visualization/Visualization/style.js @@ -75,12 +75,13 @@ const StyledFooterText = styled(Typography)` `; const StyledDetailPageSection = styled(DetailPageSection)` + width: 100%; ${(props) => props.$vizIsFullscreen && css` z-index: ${props.theme.zIndex.visualization}; position: relative; - `} + `}; `; const bodyExpandedCSS = css` diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index 2bd4f0f6b7..f34c918a98 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -1,10 +1,20 @@ import React from 'react'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; import PublicationVignette from 'js/components/publications/PublicationVignette'; function PublicationsVisualizationSection({ vignette_data, uuid }) { - return Object.entries(vignette_data).map(([k, v]) => { - return ; + return Object.entries(vignette_data).map(([k, v], i) => { + return ( + + {k} + + ; + + + ); }); } From ac8fe19a35889ec7a00e4726dd44483f57fdd6a9 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 11:15:49 -0400 Subject: [PATCH 10/28] Open first vignette by default --- .../VisualizationsSection/PublicationsVisualizationSection.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index f34c918a98..1a1ab3700e 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -8,7 +8,7 @@ import PublicationVignette from 'js/components/publications/PublicationVignette' function PublicationsVisualizationSection({ vignette_data, uuid }) { return Object.entries(vignette_data).map(([k, v], i) => { return ( - + {k} ; From 74fc1057b5216e585f8c11d1edd4ee3d3b0e068b Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 11:21:48 -0400 Subject: [PATCH 11/28] Update vignette accordion title --- .../PublicationsVisualizationSection.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index 1a1ab3700e..16d33b384e 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -2,6 +2,7 @@ import React from 'react'; import Accordion from '@material-ui/core/Accordion'; import AccordionSummary from '@material-ui/core/AccordionSummary'; import AccordionDetails from '@material-ui/core/AccordionDetails'; +import { Typography } from '@material-ui/core'; import PublicationVignette from 'js/components/publications/PublicationVignette'; @@ -9,7 +10,9 @@ function PublicationsVisualizationSection({ vignette_data, uuid }) { return Object.entries(vignette_data).map(([k, v], i) => { return ( - {k} + + {`Vignette ${i + 1}: ${v.name}`} + ; From 833a7228ed3c595be8495bd391e1117b1df1a759 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 11:22:20 -0400 Subject: [PATCH 12/28] Fix vignette transition prop --- .../VisualizationsSection/PublicationsVisualizationSection.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index 16d33b384e..27c7318ee7 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -9,7 +9,7 @@ import PublicationVignette from 'js/components/publications/PublicationVignette' function PublicationsVisualizationSection({ vignette_data, uuid }) { return Object.entries(vignette_data).map(([k, v], i) => { return ( - + {`Vignette ${i + 1}: ${v.name}`} From 5d0a83a19f797a0f775b505b5a5fa656e5af931b Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 12:19:22 -0400 Subject: [PATCH 13/28] Install react-markdown --- context/package-lock.json | 1398 +++++++++++++++++++++++++++++++++++++ context/package.json | 1 + 2 files changed, 1399 insertions(+) diff --git a/context/package-lock.json b/context/package-lock.json index d722bb0eae..0294efda63 100644 --- a/context/package-lock.json +++ b/context/package-lock.json @@ -58,6 +58,7 @@ "react-hook-form": "^7.38.0", "react-intersection-observer": "^8.28.6", "react-joyride": "^2.2.1", + "react-markdown": "^8.0.6", "react-pdf": "^5.3.2", "react-spring": "^8.0.27", "react-vega": "^7.3.0", @@ -19107,6 +19108,14 @@ "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.3.1.tgz", "integrity": "sha512-fck0Z9RGfIQn3GJIEKVrp15h9m6Vlg0d5XXeiE/6+CQiBmMDZxfR21XtjEPuDeg7gC3bBM0SdieA5XF3GW1wKA==" }, + "node_modules/@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/detect-browser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/detect-browser/-/detect-browser-4.0.0.tgz", @@ -19313,6 +19322,11 @@ "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", "dev": true }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "node_modules/@types/node": { "version": "14.18.36", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz", @@ -26446,6 +26460,27 @@ "@deck.gl/react": "8.8.27" } }, + "node_modules/decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/decode-named-character-reference/node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -26807,6 +26842,14 @@ "node": ">=0.4.0" } }, + "node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { "version": "25.2.6", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-25.2.6.tgz", @@ -38368,6 +38411,53 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-from-markdown": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz", + "integrity": "sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "mdast-util-to-string": "^3.1.0", + "micromark": "^3.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-decode-string": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "unist-util-stringify-position": "^3.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.1.tgz", + "integrity": "sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==", + "dependencies": { + "@types/mdast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-to-hast": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", @@ -38530,6 +38620,428 @@ "integrity": "sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==", "dev": true }, + "node_modules/micromark": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", + "integrity": "sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "micromark-core-commonmark": "^1.0.1", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz", + "integrity": "sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-factory-destination": "^1.0.0", + "micromark-factory-label": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-factory-title": "^1.0.0", + "micromark-factory-whitespace": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-html-tag-name": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-destination": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", + "integrity": "sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz", + "integrity": "sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz", + "integrity": "sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz", + "integrity": "sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz", + "integrity": "sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz", + "integrity": "sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz", + "integrity": "sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz", + "integrity": "sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz", + "integrity": "sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", + "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", + "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", + "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-html-tag-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", + "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", + "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", + "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", + "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", + "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", + "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", + "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, "node_modules/micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -38898,6 +39410,14 @@ "run-queue": "^1.0.3" } }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "engines": { + "node": ">=4" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -43086,6 +43606,316 @@ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, + "node_modules/react-markdown": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.6.tgz", + "integrity": "sha512-KgPWsYgHuftdx510wwIzpwf+5js/iHqBR+fzxefv8Khk3mFbnioF1bmL2idHN3ler0LMQmICKeDrWnZrX9mtbQ==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/prop-types": "^15.0.0", + "@types/unist": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^2.0.0", + "prop-types": "^15.0.0", + "property-information": "^6.0.0", + "react-is": "^18.0.0", + "remark-parse": "^10.0.0", + "remark-rehype": "^10.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-object": "^0.4.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=16", + "react": ">=16" + } + }, + "node_modules/react-markdown/node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/react-markdown/node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/react-markdown/node_modules/hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/react-markdown/node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-markdown/node_modules/mdast-util-definitions": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", + "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/mdast-util-to-hast": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", + "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-definitions": "^5.0.0", + "micromark-util-sanitize-uri": "^1.1.0", + "trim-lines": "^3.0.0", + "unist-util-generated": "^2.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/property-information": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz", + "integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/react-markdown/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/react-markdown/node_modules/remark-parse": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.1.tgz", + "integrity": "sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-from-markdown": "^1.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/remark-rehype": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-10.1.0.tgz", + "integrity": "sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-to-hast": "^12.1.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/react-markdown/node_modules/style-to-object": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz", + "integrity": "sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==", + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, + "node_modules/react-markdown/node_modules/trough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", + "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/react-markdown/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/unist-util-generated": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", + "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/unist-util-position": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/react-markdown/node_modules/vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/react-move": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/react-move/-/react-move-6.4.0.tgz", @@ -44916,6 +45746,17 @@ "npm": ">=2.0.0" } }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -47347,6 +48188,15 @@ "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -48272,6 +49122,31 @@ "integrity": "sha1-DwWkCu90+eWVHiDvv0SxGHHlZBA=", "dev": true }, + "node_modules/uvu": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + "dependencies": { + "dequal": "^2.0.0", + "diff": "^5.0.0", + "kleur": "^4.0.3", + "sade": "^1.7.3" + }, + "bin": { + "uvu": "bin.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/uvu/node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/v8-compile-cache": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", @@ -64989,6 +65864,14 @@ "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.3.1.tgz", "integrity": "sha512-fck0Z9RGfIQn3GJIEKVrp15h9m6Vlg0d5XXeiE/6+CQiBmMDZxfR21XtjEPuDeg7gC3bBM0SdieA5XF3GW1wKA==" }, + "@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "requires": { + "@types/ms": "*" + } + }, "@types/detect-browser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/detect-browser/-/detect-browser-4.0.0.tgz", @@ -65194,6 +66077,11 @@ "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", "dev": true }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "@types/node": { "version": "14.18.36", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz", @@ -71088,6 +71976,21 @@ "@deck.gl/react": "8.8.27" } }, + "decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "requires": { + "character-entities": "^2.0.0" + }, + "dependencies": { + "character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==" + } + } + }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -71387,6 +72290,11 @@ } } }, + "diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==" + }, "diff-sequences": { "version": "25.2.6", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-25.2.6.tgz", @@ -80385,6 +81293,43 @@ "unist-util-visit": "^2.0.0" } }, + "mdast-util-from-markdown": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz", + "integrity": "sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==", + "requires": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "mdast-util-to-string": "^3.1.0", + "micromark": "^3.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-decode-string": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "unist-util-stringify-position": "^3.0.0", + "uvu": "^0.5.0" + }, + "dependencies": { + "mdast-util-to-string": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.1.tgz", + "integrity": "sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==", + "requires": { + "@types/mdast": "^3.0.0" + } + }, + "unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "requires": { + "@types/unist": "^2.0.0" + } + } + } + }, "mdast-util-to-hast": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", @@ -80518,6 +81463,218 @@ "integrity": "sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==", "dev": true }, + "micromark": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", + "integrity": "sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==", + "requires": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "micromark-core-commonmark": "^1.0.1", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "micromark-core-commonmark": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz", + "integrity": "sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==", + "requires": { + "decode-named-character-reference": "^1.0.0", + "micromark-factory-destination": "^1.0.0", + "micromark-factory-label": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-factory-title": "^1.0.0", + "micromark-factory-whitespace": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-html-tag-name": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "micromark-factory-destination": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", + "integrity": "sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==", + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-factory-label": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz", + "integrity": "sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==", + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "micromark-factory-space": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz", + "integrity": "sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==", + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-factory-title": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz", + "integrity": "sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==", + "requires": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "micromark-factory-whitespace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz", + "integrity": "sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==", + "requires": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-character": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz", + "integrity": "sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==", + "requires": { + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-chunked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz", + "integrity": "sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==", + "requires": { + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-classify-character": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz", + "integrity": "sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==", + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-combine-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz", + "integrity": "sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==", + "requires": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-decode-numeric-character-reference": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", + "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", + "requires": { + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-decode-string": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", + "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", + "requires": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-encode": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", + "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==" + }, + "micromark-util-html-tag-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", + "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==" + }, + "micromark-util-normalize-identifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", + "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", + "requires": { + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-resolve-all": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", + "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", + "requires": { + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-sanitize-uri": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", + "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-subtokenize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", + "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", + "requires": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "micromark-util-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", + "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==" + }, + "micromark-util-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", + "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==" + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -80811,6 +81968,11 @@ "run-queue": "^1.0.3" } }, + "mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -84057,6 +85219,211 @@ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, + "react-markdown": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.6.tgz", + "integrity": "sha512-KgPWsYgHuftdx510wwIzpwf+5js/iHqBR+fzxefv8Khk3mFbnioF1bmL2idHN3ler0LMQmICKeDrWnZrX9mtbQ==", + "requires": { + "@types/hast": "^2.0.0", + "@types/prop-types": "^15.0.0", + "@types/unist": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^2.0.0", + "prop-types": "^15.0.0", + "property-information": "^6.0.0", + "react-is": "^18.0.0", + "remark-parse": "^10.0.0", + "remark-rehype": "^10.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-object": "^0.4.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0" + }, + "dependencies": { + "bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==" + }, + "comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==" + }, + "hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==" + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" + }, + "is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==" + }, + "mdast-util-definitions": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", + "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", + "requires": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "unist-util-visit": "^4.0.0" + } + }, + "mdast-util-to-hast": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", + "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", + "requires": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-definitions": "^5.0.0", + "micromark-util-sanitize-uri": "^1.1.0", + "trim-lines": "^3.0.0", + "unist-util-generated": "^2.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0" + } + }, + "property-information": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz", + "integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==" + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "remark-parse": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.1.tgz", + "integrity": "sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==", + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-from-markdown": "^1.0.0", + "unified": "^10.0.0" + } + }, + "remark-rehype": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-10.1.0.tgz", + "integrity": "sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==", + "requires": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-to-hast": "^12.1.0", + "unified": "^10.0.0" + } + }, + "space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==" + }, + "style-to-object": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz", + "integrity": "sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==", + "requires": { + "inline-style-parser": "0.1.1" + } + }, + "trough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", + "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==" + }, + "unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "requires": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + } + }, + "unist-util-generated": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", + "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==" + }, + "unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "requires": { + "@types/unist": "^2.0.0" + } + }, + "unist-util-position": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + "requires": { + "@types/unist": "^2.0.0" + } + }, + "unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "requires": { + "@types/unist": "^2.0.0" + } + }, + "unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + } + }, + "unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + } + }, + "vfile": { + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile-message": "^3.0.0" + } + }, + "vfile-message": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^3.0.0" + } + } + } + }, "react-move": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/react-move/-/react-move-6.4.0.tgz", @@ -85483,6 +86850,14 @@ "tslib": "^1.9.0" } }, + "sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "requires": { + "mri": "^1.1.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -87444,6 +88819,11 @@ "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" }, + "trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==" + }, "trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -88115,6 +89495,24 @@ "integrity": "sha1-DwWkCu90+eWVHiDvv0SxGHHlZBA=", "dev": true }, + "uvu": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + "requires": { + "dequal": "^2.0.0", + "diff": "^5.0.0", + "kleur": "^4.0.3", + "sade": "^1.7.3" + }, + "dependencies": { + "kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==" + } + } + }, "v8-compile-cache": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", diff --git a/context/package.json b/context/package.json index a70ff5fb9c..3d0ed34b5f 100644 --- a/context/package.json +++ b/context/package.json @@ -51,6 +51,7 @@ "react-hook-form": "^7.38.0", "react-intersection-observer": "^8.28.6", "react-joyride": "^2.2.1", + "react-markdown": "^8.0.6", "react-pdf": "^5.3.2", "react-spring": "^8.0.27", "react-vega": "^7.3.0", From 9599bfe870cb05645d7756391de0735dd7686dbe Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 12:19:37 -0400 Subject: [PATCH 14/28] Add markdown description to vignette data --- context/app/api/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/api/client.py b/context/app/api/client.py index c59962c46b..b6192c8814 100644 --- a/context/app/api/client.py +++ b/context/app/api/client.py @@ -249,7 +249,7 @@ def get_publication_vignettes(self, uuid): vignette_dir_name = _get_vignette_dir_name(i) description_text = self._file_request(f"{vignettes_path}/{vignette_dir_name}/description.md") metadata_content = frontmatter.loads(description_text) - vignette_data[vignette_dir_name] = metadata_content.metadata + vignette_data[vignette_dir_name] = {**metadata_content.metadata, 'vignette_description_md': metadata_content.content} i += 1 except: break From 1a67d925d277e42e043e9d9b0df0179d14dfba8a Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 12:19:46 -0400 Subject: [PATCH 15/28] Display md description in vignette --- .../PublicationVignette/PublicationVignette.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx index ae0c5b1429..9b374b977b 100644 --- a/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx +++ b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx @@ -1,4 +1,5 @@ import React, { useContext, useEffect, useState } from 'react'; +import ReactMarkdown from 'react-markdown'; import { AppContext } from 'js/components/Providers'; import VisualizationWrapper from 'js/components/detailPage/visualization/VisualizationWrapper'; @@ -49,7 +50,16 @@ function PublicationVignette({ vignette, vignetteDirName, uuid }) { getAndSetVitessceConf(); }, [assetsEndpoint, groupsToken, uuid, vignette.figures, vignetteDirName]); - return vitessceConfs ? : null; + if (vitessceConfs) { + return ( + <> + {vignette.vignette_description_md} + + + ); + } + + return null; } export default PublicationVignette; From 5d54318a9f543cd09f73ba467be1fec5b623fb72 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:03:15 -0400 Subject: [PATCH 16/28] Add primary color accordion summary --- .../PrimaryColorAccordionSummary/index.js | 3 +++ .../PrimaryColorAccordionSummary/style.js | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/index.js create mode 100644 context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/style.js diff --git a/context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/index.js b/context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/index.js new file mode 100644 index 0000000000..0c2b52ad6a --- /dev/null +++ b/context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/index.js @@ -0,0 +1,3 @@ +import { PrimaryColorAccordionSummary } from './style'; + +export default PrimaryColorAccordionSummary; diff --git a/context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/style.js b/context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/style.js new file mode 100644 index 0000000000..5acf726310 --- /dev/null +++ b/context/app/static/js/shared-styles/accordions/PrimaryColorAccordionSummary/style.js @@ -0,0 +1,17 @@ +import styled, { css } from 'styled-components'; + +import AccordionSummary from '@material-ui/core/ExpansionPanelSummary'; + +const PrimaryColorAccordionSummary = styled(AccordionSummary)` + ${(props) => + props.$isExpanded && + css` + background-color: ${props.$isExpanded ? props.theme.palette.primary.main : '#E0E0E0'}; + + div > * { + color: ${props.$isExpanded ? '#fff' : props.theme.palette.text.primary}; + } + `} +`; + +export { PrimaryColorAccordionSummary }; From 307e573972b9d9392b3751bc59f2056f59bf7e17 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:07:33 -0400 Subject: [PATCH 17/28] Control accordions --- .../PublicationsVisualizationSection.jsx | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index 27c7318ee7..abed298f2b 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -1,19 +1,31 @@ -import React from 'react'; -import Accordion from '@material-ui/core/Accordion'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; +import React, { useState } from 'react'; +import Accordion from '@material-ui/core/ExpansionPanel'; import AccordionDetails from '@material-ui/core/AccordionDetails'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import ArrowDropUpRoundedIcon from '@material-ui/icons/ArrowDropUpRounded'; import PublicationVignette from 'js/components/publications/PublicationVignette'; +import PrimaryColorAccordionSummary from 'js/shared-styles/accordions/PrimaryColorAccordionSummary'; function PublicationsVisualizationSection({ vignette_data, uuid }) { + const [expandedIndex, setExpandedIndex] = useState(0); + + const handleChange = (i) => (event, isExpanded) => { + setExpandedIndex(isExpanded ? i : false); + }; + return Object.entries(vignette_data).map(([k, v], i) => { return ( - - + + }> {`Vignette ${i + 1}: ${v.name}`} - - + + ; From e2bd4346876eeca5715c48087fbc6dc0731949c1 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:14:14 -0400 Subject: [PATCH 18/28] Use styled component instead of inline styles --- .../PublicationsVisualizationSection.jsx | 6 +++--- .../VisualizationsSection/style.js | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/style.js diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index abed298f2b..06bdc4f581 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -1,11 +1,11 @@ import React, { useState } from 'react'; import Accordion from '@material-ui/core/ExpansionPanel'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; import Typography from '@material-ui/core/Typography'; import ArrowDropUpRoundedIcon from '@material-ui/icons/ArrowDropUpRounded'; import PublicationVignette from 'js/components/publications/PublicationVignette'; import PrimaryColorAccordionSummary from 'js/shared-styles/accordions/PrimaryColorAccordionSummary'; +import { StyledAccordionDetails } from './style'; function PublicationsVisualizationSection({ vignette_data, uuid }) { const [expandedIndex, setExpandedIndex] = useState(0); @@ -25,9 +25,9 @@ function PublicationsVisualizationSection({ vignette_data, uuid }) { }> {`Vignette ${i + 1}: ${v.name}`} - + ; - + ); }); diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/style.js b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/style.js new file mode 100644 index 0000000000..3d63d34806 --- /dev/null +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/style.js @@ -0,0 +1,9 @@ +import styled from 'styled-components'; + +import AccordionDetails from '@material-ui/core/AccordionDetails'; + +const StyledAccordionDetails = styled(AccordionDetails)` + flex-direction: column; +`; + +export { StyledAccordionDetails }; From 2c88a7b7b211650fa68f76d240836573c4fb55ee Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:27:41 -0400 Subject: [PATCH 19/28] Remove header from each visualization --- .../publications/PublicationVignette/PublicationVignette.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx index 9b374b977b..72799b76c0 100644 --- a/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx +++ b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx @@ -54,7 +54,7 @@ function PublicationVignette({ vignette, vignetteDirName, uuid }) { return ( <> {vignette.vignette_description_md} - + ); } From 60c16f6ba93bf2d462b7b7c663dd452f2b0381df Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:40:52 -0400 Subject: [PATCH 20/28] Add visualizations section to sidebar --- .../PublicationsVisualizationSection.jsx | 41 +++++++++++-------- .../js/pages/Publication/Publication.jsx | 2 +- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx index 06bdc4f581..9ef47a7750 100644 --- a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx +++ b/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx @@ -3,6 +3,8 @@ import Accordion from '@material-ui/core/ExpansionPanel'; import Typography from '@material-ui/core/Typography'; import ArrowDropUpRoundedIcon from '@material-ui/icons/ArrowDropUpRounded'; +import SectionHeader from 'js/shared-styles/sections/SectionHeader'; +import { DetailPageSection } from 'js/components/detailPage/style'; import PublicationVignette from 'js/components/publications/PublicationVignette'; import PrimaryColorAccordionSummary from 'js/shared-styles/accordions/PrimaryColorAccordionSummary'; import { StyledAccordionDetails } from './style'; @@ -14,23 +16,28 @@ function PublicationsVisualizationSection({ vignette_data, uuid }) { setExpandedIndex(isExpanded ? i : false); }; - return Object.entries(vignette_data).map(([k, v], i) => { - return ( - - }> - {`Vignette ${i + 1}: ${v.name}`} - - - ; - - - ); - }); + return ( + + Visualizations + {Object.entries(vignette_data).map(([k, v], i) => { + return ( + + }> + {`Vignette ${i + 1}: ${v.name}`} + + + ; + + + ); + })} + + ); } export default PublicationsVisualizationSection; diff --git a/context/app/static/js/pages/Publication/Publication.jsx b/context/app/static/js/pages/Publication/Publication.jsx index 23fd147324..1838965dda 100644 --- a/context/app/static/js/pages/Publication/Publication.jsx +++ b/context/app/static/js/pages/Publication/Publication.jsx @@ -36,7 +36,7 @@ function Publication({ publication, vignette_data }) { const setAssayMetadata = useEntityStore(entityStoreSelector); setAssayMetadata({ hubmap_id, entity_type, title, publication_venue }); - const sectionOrder = getSectionOrder(['summary', 'data', 'authors', 'provenance'], {}); + const sectionOrder = getSectionOrder(['summary', 'data', 'visualizations', 'authors', 'provenance'], {}); const combinedStatus = getCombinedDatasetStatus({ sub_status, status }); From bf8fe163a0fdb5ead7a3bb9bfea1d7086716945f Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:45:04 -0400 Subject: [PATCH 21/28] Add changelog --- CHANGELOG-publication-vignettes.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGELOG-publication-vignettes.md diff --git a/CHANGELOG-publication-vignettes.md b/CHANGELOG-publication-vignettes.md new file mode 100644 index 0000000000..4fa1c1c6a8 --- /dev/null +++ b/CHANGELOG-publication-vignettes.md @@ -0,0 +1 @@ +- Add visualization vignettes section to publication page. \ No newline at end of file From 6e9f231572b4486b21dda48d6e6712e6dd82802b Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:49:43 -0400 Subject: [PATCH 22/28] Fix some python linting issues --- context/app/api/client.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/context/app/api/client.py b/context/app/api/client.py index b6192c8814..34d77969e6 100644 --- a/context/app/api/client.py +++ b/context/app/api/client.py @@ -208,7 +208,7 @@ def get_assay(name): return VitessceConfLiftedUUID( vitessce_conf=vitessce_conf, vis_lifted_uuid=vis_lifted_uuid) - + def _file_request(self, url, body_json=None): headers = {'Authorization': 'Bearer ' + self.groups_token} if self.groups_token else {} @@ -238,7 +238,6 @@ def _file_request(self, url, body_json=None): raise return response.text - def get_publication_vignettes(self, uuid): vignettes_path = f"{current_app.config['ASSETS_ENDPOINT']}/{uuid}/vignettes/" vignette_data = {} @@ -247,13 +246,15 @@ def get_publication_vignettes(self, uuid): while True: try: vignette_dir_name = _get_vignette_dir_name(i) - description_text = self._file_request(f"{vignettes_path}/{vignette_dir_name}/description.md") + description_text = self._file_request( + f"{vignettes_path}/{vignette_dir_name}/description.md") metadata_content = frontmatter.loads(description_text) - vignette_data[vignette_dir_name] = {**metadata_content.metadata, 'vignette_description_md': metadata_content.content} + vignette_data[vignette_dir_name] = { + **metadata_content.metadata, 'vignette_description_md': metadata_content.content} i += 1 except: - break - + break + return vignette_data From 0047781a9019e9438a41062216de19bcc7b0926f Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:50:36 -0400 Subject: [PATCH 23/28] Dont use bare except --- context/app/api/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/api/client.py b/context/app/api/client.py index 34d77969e6..5bced77170 100644 --- a/context/app/api/client.py +++ b/context/app/api/client.py @@ -252,7 +252,7 @@ def get_publication_vignettes(self, uuid): vignette_data[vignette_dir_name] = { **metadata_content.metadata, 'vignette_description_md': metadata_content.content} i += 1 - except: + except Exception: break return vignette_data From a2b59d89f605613e4cf8d242978a53f9bac695a2 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:53:19 -0400 Subject: [PATCH 24/28] Remove extra dir --- .../PublicationsVisualizationSection.jsx | 0 .../{VisualizationsSection => }/index.js | 0 .../{VisualizationsSection => }/style.js | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename context/app/static/js/components/publications/PublicationVisualizationsSection/{VisualizationsSection => }/PublicationsVisualizationSection.jsx (100%) rename context/app/static/js/components/publications/PublicationVisualizationsSection/{VisualizationsSection => }/index.js (100%) rename context/app/static/js/components/publications/PublicationVisualizationsSection/{VisualizationsSection => }/style.js (100%) diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx b/context/app/static/js/components/publications/PublicationVisualizationsSection/PublicationsVisualizationSection.jsx similarity index 100% rename from context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/PublicationsVisualizationSection.jsx rename to context/app/static/js/components/publications/PublicationVisualizationsSection/PublicationsVisualizationSection.jsx diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/index.js b/context/app/static/js/components/publications/PublicationVisualizationsSection/index.js similarity index 100% rename from context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/index.js rename to context/app/static/js/components/publications/PublicationVisualizationsSection/index.js diff --git a/context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/style.js b/context/app/static/js/components/publications/PublicationVisualizationsSection/style.js similarity index 100% rename from context/app/static/js/components/publications/PublicationVisualizationsSection/VisualizationsSection/style.js rename to context/app/static/js/components/publications/PublicationVisualizationsSection/style.js From b268d266dac02d8a66882359592c2627c9d71bca Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:54:44 -0400 Subject: [PATCH 25/28] More python linting --- context/app/api/client.py | 3 ++- context/app/routes_browse.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/context/app/api/client.py b/context/app/api/client.py index 5bced77170..d2e20f2e54 100644 --- a/context/app/api/client.py +++ b/context/app/api/client.py @@ -250,7 +250,8 @@ def get_publication_vignettes(self, uuid): f"{vignettes_path}/{vignette_dir_name}/description.md") metadata_content = frontmatter.loads(description_text) vignette_data[vignette_dir_name] = { - **metadata_content.metadata, 'vignette_description_md': metadata_content.content} + **metadata_content.metadata, + 'vignette_description_md': metadata_content.content} i += 1 except Exception: break diff --git a/context/app/routes_browse.py b/context/app/routes_browse.py index 079b12d95b..ff26598b19 100644 --- a/context/app/routes_browse.py +++ b/context/app/routes_browse.py @@ -63,7 +63,7 @@ def details(type, uuid): 'has_notebook': conf_cells_uuid.vitessce_conf.cells is not None, 'vis_lifted_uuid': conf_cells_uuid.vis_lifted_uuid }) - + if type == 'publication': flask_data.update({'vignette_data': client.get_publication_vignettes(uuid)}) From 22acb0d29477db52e42631501525a72d15b481d5 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:55:30 -0400 Subject: [PATCH 26/28] Fix file path --- context/app/static/js/pages/Publication/Publication.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/static/js/pages/Publication/Publication.jsx b/context/app/static/js/pages/Publication/Publication.jsx index 1838965dda..4a352d0ed5 100644 --- a/context/app/static/js/pages/Publication/Publication.jsx +++ b/context/app/static/js/pages/Publication/Publication.jsx @@ -6,7 +6,7 @@ import OutboundIconLink from 'js/shared-styles/Links/iconLinks/OutboundIconLink' import { getCombinedDatasetStatus, getSectionOrder } from 'js/components/detailPage/utils'; import ContributorsTable from 'js/components/detailPage/ContributorsTable/ContributorsTable'; import PublicationsDataSection from 'js/components/publications/PublicationsDataSection'; -import PublicationsVisualizationSection from 'js/components/publications/PublicationVisualizationsSection/VisualizationsSection'; +import PublicationsVisualizationSection from 'js/components/publications/PublicationVisualizationsSection/'; import ProvSection from 'js/components/detailPage/provenance/ProvSection'; import DetailLayout from 'js/components/detailPage/DetailLayout'; import useEntityStore from 'js/stores/useEntityStore'; From 6b96c51d0c5f81d06064e6bad129830726867342 Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 13:58:35 -0400 Subject: [PATCH 27/28] Fix prop type --- context/app/static/js/components/Routes/Routes.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/app/static/js/components/Routes/Routes.jsx b/context/app/static/js/components/Routes/Routes.jsx index 8a0de7b20f..ce2f6decdd 100644 --- a/context/app/static/js/components/Routes/Routes.jsx +++ b/context/app/static/js/components/Routes/Routes.jsx @@ -297,7 +297,7 @@ Routes.propTypes = { organs: PropTypes.object, metadata: PropTypes.object, organs_count: PropTypes.number, - vignette_data: PropTypes.string, + vignette_data: PropTypes.object, }), }; From d992440410655fca7be061e4eee9c42ba25aaecf Mon Sep 17 00:00:00 2001 From: John Conroy Date: Mon, 27 Mar 2023 14:03:56 -0400 Subject: [PATCH 28/28] Handle mutliple figures passed to vitessce --- .../PublicationVignette/PublicationVignette.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx index 72799b76c0..757637165b 100644 --- a/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx +++ b/context/app/static/js/components/publications/PublicationVignette/PublicationVignette.jsx @@ -54,7 +54,12 @@ function PublicationVignette({ vignette, vignetteDirName, uuid }) { return ( <> {vignette.vignette_description_md} - + ); }