Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Oct 18, 2024
1 parent 3491890 commit b700350
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 97 deletions.
13 changes: 13 additions & 0 deletions .changeset/sweet-kangaroos-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'myst-to-react': patch
'@myst-theme/frontmatter': patch
'myst-demo': patch
'@myst-theme/providers': patch
'@myst-theme/jupyter': patch
'@myst-theme/common': patch
'@myst-theme/article': patch
'@myst-theme/site': patch
'@myst-theme/book': patch
---

Update to mystmd 1.3.13
106 changes: 49 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"build": "npm-run-all -l clean -p build:esm"
},
"dependencies": {
"myst-common": "^1.7.0",
"myst-config": "^1.7.0",
"myst-spec-ext": "^1.7.0",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-spec-ext": "^1.7.2",
"nbtx": "^0.2.3",
"unist-util-select": "^4.0.3"
}
Expand Down
18 changes: 10 additions & 8 deletions packages/frontmatter/src/FrontmatterBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,18 @@ export function OpenAccessBadge({ open_access }: { open_access?: boolean }) {

export function Journal({
venue,
biblio,
volume,
issue,
className,
}: {
venue?: Required<PageFrontmatter>['venue'];
biblio?: Required<PageFrontmatter>['biblio'];
volume?: Required<PageFrontmatter>['volume'];
issue?: Required<PageFrontmatter>['issue'];
className?: string;
}) {
if (!venue) return null;
const { title, url } = typeof venue === 'string' ? { title: venue, url: null } : venue;
if (!title) return null;
const { volume, issue } = biblio ?? {};
return (
<div className={classNames('flex-none mr-2', className)}>
{url ? (
Expand All @@ -178,8 +179,8 @@ export function Journal({
)}
{volume != null && (
<span className="pl-2 ml-2 border-l">
Volume {volume}
{issue != null && <>, Issue {issue}</>}
Volume {volume.title}
{issue != null && <>, Issue {issue.title}</>}
</span>
)}
</div>
Expand Down Expand Up @@ -211,7 +212,8 @@ export function FrontmatterBlock({
license,
github,
venue,
biblio,
volume,
issue,
exports,
downloads,
date,
Expand All @@ -221,7 +223,7 @@ export function FrontmatterBlock({
const hasExports = downloads ? downloads.length > 0 : exports && exports.length > 0;
const hasAuthors = authors && authors.length > 0;
const hasBadges = !!open_access || !!license || !!hasExports || !!isJupyter || !!github;
const hasHeaders = !!subject || !!venue || !!biblio;
const hasHeaders = !!subject || !!venue || !!volume || !!issue;
const hasDateOrDoi = !!doi || !!date;
const showHeaderBlock = hasHeaders || (hasBadges && !hideBadges) || (hasExports && !hideExports);
if (!title && !subtitle && !showHeaderBlock && !hasAuthors && !hasDateOrDoi) {
Expand All @@ -245,7 +247,7 @@ export function FrontmatterBlock({
{subject}
</div>
)}
<Journal venue={venue} biblio={biblio} />
<Journal venue={venue} volume={volume} issue={issue} />
<div className="flex-grow"></div>
{!hideBadges && (
<>
Expand Down
7 changes: 4 additions & 3 deletions packages/frontmatter/src/licenses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { ScaleIcon } from '@heroicons/react/24/outline';
import classNames from 'classnames';

type License = {
name: string;
url: string;
id: string;
id?: string;
name?: string;
url?: string;
free?: boolean;
CC?: boolean;
osi?: boolean;
Expand All @@ -28,6 +28,7 @@ export function CreativeCommonsBadge({
preamble?: string;
className?: string;
}) {
if (!license.id) return null;
const match = /^([CBYSAND0-]+)(?:(?:-)([0-9].[0-9]))?$/.exec(license.id);
if (!license.CC || !match) return null;
const title = `${preamble}${license.name ?? (license as any).title} (${license.id})`;
Expand Down
4 changes: 2 additions & 2 deletions packages/jupyter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"buffer": "^6.0.3",
"classnames": "^2.5.1",
"jupyterlab-plotly": "^5.24.0",
"myst-common": "^1.7.0",
"myst-common": "^1.7.2",
"myst-config": "^1.6.0",
"myst-frontmatter": "^1.7.0",
"myst-spec": "^0.0.5",
"myst-spec-ext": "^1.7.0",
"myst-spec-ext": "^1.7.2",
"myst-to-react": "^0.13.1",
"nanoid": "^4.0.2",
"nbtx": "^0.2.3",
Expand Down
10 changes: 5 additions & 5 deletions packages/myst-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@
"@heroicons/react": "^2.0.18",
"classnames": "^2.3.2",
"js-yaml": "^4.1.0",
"myst-common": "^1.7.0",
"myst-config": "^1.5.0",
"myst-common": "^1.7.2",
"myst-config": "^1.7.2",
"myst-directives": "^1.5.6",
"myst-ext-card": "^1.0.8",
"myst-ext-exercise": "^1.0.7",
"myst-ext-grid": "^1.0.7",
"myst-ext-proof": "^1.0.10",
"myst-ext-tabs": "^1.0.7",
"myst-frontmatter": "^1.7.0",
"myst-frontmatter": "^1.7.2",
"myst-parser": "^1.5.6",
"myst-spec": "^0.0.5",
"myst-to-docx": "^1.0.11",
"myst-to-html": "^1.5.6",
"myst-to-jats": "^1.0.27",
"myst-to-jats": "^1.0.29",
"myst-to-react": "^0.13.1",
"myst-to-tex": "^1.0.37",
"myst-to-typst": "^0.0.22",
"myst-to-typst": "^0.0.23",
"myst-transforms": "^1.3.25",
"unified": "^10.1.2",
"unist-util-remove": "^4.0.0",
Expand Down
Loading

0 comments on commit b700350

Please sign in to comment.