@myst-theme/frontmatter 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,10 +12,10 @@ const solid_1 = require("@scienceicons/react/24/solid");
12
12
  const licenses_1 = require("./licenses");
13
13
  const downloads_1 = require("./downloads");
14
14
  function ExternalOrInternalLink({ to, className, title, children, }) {
15
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: to, className: className, title: title }, { children: children })));
15
+ return ((0, jsx_runtime_1.jsx)("a", { href: to, className: className, title: title, children: children }));
16
16
  }
17
17
  function Author({ author, className, }) {
18
- return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: (0, classnames_1.default)('font-semibold text-sm', className) }, { children: [author.name, author.email && author.corresponding && ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: "ml-1", href: `mailto:${author.email}`, title: `${author.name} <${author.email}>`, target: "_blank", rel: "noopener noreferrer" }, { children: (0, jsx_runtime_1.jsx)(solid_1.EmailIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-blue-400 -translate-y-[0.1em]" }) }))), author.orcid && ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: "ml-1", href: `https://orcid.org/${author.orcid}`, target: "_blank", rel: "noopener noreferrer", title: "ORCID (Open Researcher and Contributor ID)" }, { children: (0, jsx_runtime_1.jsx)(solid_1.OrcidIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-[#A9C751] -translate-y-[0.1em]" }) })))] })));
18
+ return ((0, jsx_runtime_1.jsxs)("span", { className: (0, classnames_1.default)('font-semibold text-sm', className), children: [author.name, author.email && author.corresponding && ((0, jsx_runtime_1.jsx)("a", { className: "ml-1", href: `mailto:${author.email}`, title: `${author.name} <${author.email}>`, target: "_blank", rel: "noopener noreferrer", children: (0, jsx_runtime_1.jsx)(solid_1.EmailIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-blue-400 -translate-y-[0.1em]" }) })), author.orcid && ((0, jsx_runtime_1.jsx)("a", { className: "ml-1", href: `https://orcid.org/${author.orcid}`, target: "_blank", rel: "noopener noreferrer", title: "ORCID (Open Researcher and Contributor ID)", children: (0, jsx_runtime_1.jsx)(solid_1.OrcidIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-[#A9C751] -translate-y-[0.1em]" }) }))] }));
19
19
  }
20
20
  exports.Author = Author;
21
21
  function AuthorsList({ authors }) {
@@ -31,21 +31,21 @@ function AuthorAndAffiliations({ authors }) {
31
31
  return null;
32
32
  const hasAffliations = authors.reduce((r, { affiliations: a }) => r || (!!a && (a === null || a === void 0 ? void 0 : a.length) > 0), false);
33
33
  if (!hasAffliations) {
34
- return ((0, jsx_runtime_1.jsx)("header", Object.assign({ className: "not-prose mt-4" }, { children: (0, jsx_runtime_1.jsx)(AuthorsList, { authors: authors }) })));
34
+ return ((0, jsx_runtime_1.jsx)("header", { className: "not-prose mt-4", children: (0, jsx_runtime_1.jsx)(AuthorsList, { authors: authors }) }));
35
35
  }
36
- return ((0, jsx_runtime_1.jsx)("header", Object.assign({ className: "not-prose mt-4" }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "grid grid-cols-1 sm:grid-cols-2 gap-y-1" }, { children: [authors.length > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "font-thin text-xs uppercase pb-2" }, { children: "Authors" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "font-thin text-xs uppercase pb-2" }, { children: "Affiliations" }))] })), authors.map((author) => {
36
+ return ((0, jsx_runtime_1.jsx)("header", { className: "not-prose mt-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-y-1", children: [authors.length > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "font-thin text-xs uppercase pb-2", children: "Authors" }), (0, jsx_runtime_1.jsx)("div", { className: "font-thin text-xs uppercase pb-2", children: "Affiliations" })] })), authors.map((author) => {
37
37
  var _a;
38
- return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Author, { author: author }) }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-sm" }, { children: (_a = author.affiliations) === null || _a === void 0 ? void 0 : _a.map((affil, i) => {
38
+ return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Author, { author: author }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm", children: (_a = author.affiliations) === null || _a === void 0 ? void 0 : _a.map((affil, i) => {
39
39
  if (typeof affil === 'string') {
40
40
  return (0, jsx_runtime_1.jsx)("div", { children: affil }, i);
41
41
  }
42
42
  const { name, ror } = affil;
43
43
  if (ror) {
44
- return ((0, jsx_runtime_1.jsxs)("div", { children: [name, (0, jsx_runtime_1.jsx)("a", Object.assign({ href: `https://ror.org/${ror}`, target: "_blank", rel: "noopener noreferrer", title: "ROR (Research Organization Registry)", className: "text-inherit hover:text-inherit" }, { children: (0, jsx_runtime_1.jsx)(solid_1.RorIcon, { className: "ml-2 inline-block h-[2em] w-[2em] grayscale hover:grayscale-0 -translate-y-[1px]" }) }))] }, i));
44
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [name, (0, jsx_runtime_1.jsx)("a", { href: `https://ror.org/${ror}`, target: "_blank", rel: "noopener noreferrer", title: "ROR (Research Organization Registry)", className: "text-inherit hover:text-inherit", children: (0, jsx_runtime_1.jsx)(solid_1.RorIcon, { className: "ml-2 inline-block h-[2em] w-[2em] grayscale hover:grayscale-0 -translate-y-[1px]" }) })] }, i));
45
45
  }
46
46
  return (0, jsx_runtime_1.jsx)("div", { children: name }, i);
47
- }) }))] }, author.name));
48
- })] })) })));
47
+ }) })] }, author.name));
48
+ })] }) }));
49
49
  }
50
50
  exports.AuthorAndAffiliations = AuthorAndAffiliations;
51
51
  function DoiText({ doi: possibleLink, className }) {
@@ -53,7 +53,7 @@ function DoiText({ doi: possibleLink, className }) {
53
53
  return null;
54
54
  const doi = possibleLink.replace(/^(https?:\/\/)?(dx\.)?doi\.org\//, '');
55
55
  const url = `https://doi.org/${doi}`;
56
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ className: (0, classnames_1.default)('no-underline text-inherit hover:text-inherit', className), target: "_blank", rel: "noopener noreferrer", href: url, title: "DOI (Digital Object Identifier)" }, { children: url })));
56
+ return ((0, jsx_runtime_1.jsx)("a", { className: (0, classnames_1.default)('no-underline text-inherit hover:text-inherit', className), target: "_blank", rel: "noopener noreferrer", href: url, title: "DOI (Digital Object Identifier)", children: url }));
57
57
  }
58
58
  exports.DoiText = DoiText;
59
59
  function DoiBadge({ doi: possibleLink, className }) {
@@ -61,7 +61,7 @@ function DoiBadge({ doi: possibleLink, className }) {
61
61
  return null;
62
62
  const doi = possibleLink.replace(/^(https?:\/\/)?(dx\.)?doi\.org\//, '');
63
63
  const url = `https://doi.org/${doi}`;
64
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)('flex-none', className), title: "DOI (Digital Object Identifier)" }, { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ className: "font-light hover:font-light no-underline hover:underline text-inherit hover:text-inherit", target: "_blank", rel: "noopener noreferrer", href: url }, { children: url })) })));
64
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)('flex-none', className), title: "DOI (Digital Object Identifier)", children: (0, jsx_runtime_1.jsx)("a", { className: "font-light hover:font-light no-underline hover:underline text-inherit hover:text-inherit", target: "_blank", rel: "noopener noreferrer", href: url, children: url }) }));
65
65
  }
66
66
  exports.DoiBadge = DoiBadge;
67
67
  function DateString({ date, format = {
@@ -72,20 +72,20 @@ function DateString({ date, format = {
72
72
  if (!date)
73
73
  return null;
74
74
  const dateString = new Date(date).toLocaleDateString('en-US', format);
75
- return ((0, jsx_runtime_1.jsx)("time", Object.assign({ dateTime: date, className: (0, classnames_1.default)({ 'text-spacer': spacer }) }, { children: dateString })));
75
+ return ((0, jsx_runtime_1.jsx)("time", { dateTime: date, className: (0, classnames_1.default)({ 'text-spacer': spacer }), children: dateString }));
76
76
  }
77
77
  exports.DateString = DateString;
78
78
  function GitHubLink({ github: possibleLink }) {
79
79
  if (!possibleLink)
80
80
  return null;
81
81
  const github = possibleLink.replace(/^(https?:\/\/)?github\.com\//, '');
82
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: `https://github.com/${github}`, title: `GitHub Repository: ${github}`, target: "_blank", rel: "noopener noreferrer", className: "text-inherit hover:text-inherit" }, { children: (0, jsx_runtime_1.jsx)(solid_1.GithubIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100" }) })));
82
+ return ((0, jsx_runtime_1.jsx)("a", { href: `https://github.com/${github}`, title: `GitHub Repository: ${github}`, target: "_blank", rel: "noopener noreferrer", className: "text-inherit hover:text-inherit", children: (0, jsx_runtime_1.jsx)(solid_1.GithubIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100" }) }));
83
83
  }
84
84
  exports.GitHubLink = GitHubLink;
85
85
  function OpenAccessBadge({ open_access }) {
86
86
  if (!open_access)
87
87
  return null;
88
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: "https://en.wikipedia.org/wiki/Open_access", target: "_blank", rel: "noopener noreferrer", title: "Open Access", className: "text-inherit hover:text-inherit" }, { children: (0, jsx_runtime_1.jsx)(solid_1.OpenAccessIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100 hover:text-[#E18435]" }) })));
88
+ return ((0, jsx_runtime_1.jsx)("a", { href: "https://en.wikipedia.org/wiki/Open_access", target: "_blank", rel: "noopener noreferrer", title: "Open Access", className: "text-inherit hover:text-inherit", children: (0, jsx_runtime_1.jsx)(solid_1.OpenAccessIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100 hover:text-[#E18435]" }) }));
89
89
  }
90
90
  exports.OpenAccessBadge = OpenAccessBadge;
91
91
  function Journal({ venue, biblio, }) {
@@ -95,7 +95,7 @@ function Journal({ venue, biblio, }) {
95
95
  if (!title)
96
96
  return null;
97
97
  const { volume, issue } = biblio !== null && biblio !== void 0 ? biblio : {};
98
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex-none mr-2" }, { children: [url ? ((0, jsx_runtime_1.jsx)(ExternalOrInternalLink, Object.assign({ className: "smallcaps font-semibold no-underline", to: url, title: title }, { children: title }))) : ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "smallcaps font-semibold" }, { children: title }))), volume != null && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "ml-2 pl-2 border-l" }, { children: ["Volume ", volume, issue != null && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [", Issue ", issue] })] })))] })));
98
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex-none mr-2", children: [url ? ((0, jsx_runtime_1.jsx)(ExternalOrInternalLink, { className: "smallcaps font-semibold no-underline", to: url, title: title, children: title })) : ((0, jsx_runtime_1.jsx)("span", { className: "smallcaps font-semibold", children: title })), volume != null && ((0, jsx_runtime_1.jsxs)("span", { className: "ml-2 pl-2 border-l", children: ["Volume ", volume, issue != null && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [", Issue ", issue] })] }))] }));
99
99
  }
100
100
  exports.Journal = Journal;
101
101
  function FrontmatterBlock({ frontmatter, kind = myst_common_1.SourceFileKind.Article, authorStyle = 'block', className, }) {
@@ -111,8 +111,8 @@ function FrontmatterBlock({ frontmatter, kind = myst_common_1.SourceFileKind.Art
111
111
  // Nothing to show!
112
112
  return null;
113
113
  }
114
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)('mb-8', className) }, { children: [hasHeaders && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex mt-3 mb-5 text-sm font-light items-center h-6" }, { children: [subject && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)('flex-none pr-2 smallcaps', {
114
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('mb-8', className), children: [hasHeaders && ((0, jsx_runtime_1.jsxs)("div", { className: "flex mt-3 mb-5 text-sm font-light items-center h-6", children: [subject && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)('flex-none pr-2 smallcaps', {
115
115
  'border-r mr-2': venue,
116
- }) }, { children: subject }))), (0, jsx_runtime_1.jsx)(Journal, { venue: venue, biblio: biblio }), (0, jsx_runtime_1.jsx)("div", { className: "flex-grow" }), (0, jsx_runtime_1.jsx)(licenses_1.LicenseBadges, { license: license }), (0, jsx_runtime_1.jsx)(OpenAccessBadge, { open_access: open_access }), (0, jsx_runtime_1.jsx)(GitHubLink, { github: github }), isJupyter && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "inline-block mr-1" }, { children: (0, jsx_runtime_1.jsx)(solid_1.JupyterIcon, { className: "h-5 w-5 inline-block" }) }))), (0, jsx_runtime_1.jsx)(downloads_1.DownloadsDropdown, { exports: exports })] }))), title && (0, jsx_runtime_1.jsx)("h1", Object.assign({ className: "mb-0" }, { children: title })), subtitle && (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "lead mt-2 mb-0 text-zinc-600 dark:text-zinc-400" }, { children: subtitle })), hasAuthors && authorStyle === 'list' && (0, jsx_runtime_1.jsx)(AuthorsList, { authors: frontmatter.authors }), hasAuthors && authorStyle === 'block' && ((0, jsx_runtime_1.jsx)(AuthorAndAffiliations, { authors: frontmatter.authors })), hasDateOrDoi && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex mt-2 text-sm font-light" }, { children: [(0, jsx_runtime_1.jsx)(DateString, { date: date, spacer: !!doi }), (0, jsx_runtime_1.jsx)(DoiBadge, { doi: doi })] })))] })));
116
+ }), children: subject })), (0, jsx_runtime_1.jsx)(Journal, { venue: venue, biblio: biblio }), (0, jsx_runtime_1.jsx)("div", { className: "flex-grow" }), (0, jsx_runtime_1.jsx)(licenses_1.LicenseBadges, { license: license }), (0, jsx_runtime_1.jsx)(OpenAccessBadge, { open_access: open_access }), (0, jsx_runtime_1.jsx)(GitHubLink, { github: github }), isJupyter && ((0, jsx_runtime_1.jsx)("div", { className: "inline-block mr-1", children: (0, jsx_runtime_1.jsx)(solid_1.JupyterIcon, { className: "h-5 w-5 inline-block" }) })), (0, jsx_runtime_1.jsx)(downloads_1.DownloadsDropdown, { exports: exports })] })), title && (0, jsx_runtime_1.jsx)("h1", { className: "mb-0", children: title }), subtitle && (0, jsx_runtime_1.jsx)("p", { className: "lead mt-2 mb-0 text-zinc-600 dark:text-zinc-400", children: subtitle }), hasAuthors && authorStyle === 'list' && (0, jsx_runtime_1.jsx)(AuthorsList, { authors: frontmatter.authors }), hasAuthors && authorStyle === 'block' && ((0, jsx_runtime_1.jsx)(AuthorAndAffiliations, { authors: frontmatter.authors })), hasDateOrDoi && ((0, jsx_runtime_1.jsxs)("div", { className: "flex mt-2 text-sm font-light", children: [(0, jsx_runtime_1.jsx)(DateString, { date: date, spacer: !!doi }), (0, jsx_runtime_1.jsx)(DoiBadge, { doi: doi })] }))] }));
117
117
  }
118
118
  exports.FrontmatterBlock = FrontmatterBlock;
@@ -69,12 +69,12 @@ function Download({ url, filename, format, className, }) {
69
69
  e.preventDefault();
70
70
  triggerDirectDownload(url, filename);
71
71
  }, [url, filename]);
72
- return ((0, jsx_runtime_1.jsxs)("a", Object.assign({ className: (0, classnames_1.default)(className, 'flex'), href: url, onClick: clickDownload }, { children: [(0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "sr-only" }, { children: ["Download as ", format] })), (0, jsx_runtime_1.jsx)(DocumentIcon_1.default, { className: "w-5 h-5 inline-block items-center mr-2", "aria-hidden": "true" }), filename] })));
72
+ return ((0, jsx_runtime_1.jsxs)("a", { className: (0, classnames_1.default)(className, 'flex'), href: url, onClick: clickDownload, children: [(0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: ["Download as ", format] }), (0, jsx_runtime_1.jsx)(DocumentIcon_1.default, { className: "w-5 h-5 inline-block items-center mr-2", "aria-hidden": "true" }), filename] }));
73
73
  }
74
74
  exports.Download = Download;
75
75
  function DownloadsDropdown({ exports }) {
76
76
  if (!exports || exports.length === 0)
77
77
  return null;
78
- return ((0, jsx_runtime_1.jsxs)(react_1.Menu, Object.assign({ as: "div", className: "flex relative grow-0 inline-block mx-1" }, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Button, Object.assign({ className: "relative" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "sr-only" }, { children: "Downloads" })), (0, jsx_runtime_1.jsx)(ArrowDownTrayIcon_1.default, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] })), (0, jsx_runtime_1.jsx)(react_1.Menu.Items, Object.assign({ className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { children: exports.map(({ format, filename, url }, index) => ((0, jsx_runtime_1.jsx)(react_1.Menu.Item, { children: (0, jsx_runtime_1.jsx)(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, index))) }))] })));
78
+ return ((0, jsx_runtime_1.jsxs)(react_1.Menu, { as: "div", className: "flex relative grow-0 inline-block mx-1", children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Button, { className: "relative", children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Downloads" }), (0, jsx_runtime_1.jsx)(ArrowDownTrayIcon_1.default, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Items, { className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none", children: exports.map(({ format, filename, url }, index) => ((0, jsx_runtime_1.jsx)(react_1.Menu.Item, { children: (0, jsx_runtime_1.jsx)(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, index))) })] }));
79
79
  }
80
80
  exports.DownloadsDropdown = DownloadsDropdown;
@@ -15,7 +15,7 @@ function CreativeCommonsBadge({ license, preamble = '', className, }) {
15
15
  return null;
16
16
  const title = `${preamble}${(_a = license.name) !== null && _a !== void 0 ? _a : license.title} (${license.id})`;
17
17
  const kind = match[1].toUpperCase();
18
- return ((0, jsx_runtime_1.jsxs)("a", Object.assign({ href: license.url, target: "_blank", rel: "noopener noreferrer", className: (0, classnames_1.default)('opacity-50 hover:opacity-100 text-inherit hover:text-inherit', className), "aria-label": title }, { children: [(0, jsx_runtime_1.jsx)(solid_1.CcIcon, { className: "h-5 w-5 mx-1 inline-block", title: title }), (kind.startsWith('CC0') || kind.startsWith('CC-0') || kind.includes('ZERO')) && ((0, jsx_runtime_1.jsx)(solid_1.CcZeroIcon, { className: "h-5 w-5 mr-1 inline-block", title: "CC0: Work is in the worldwide public domain" })), kind.includes('BY') && ((0, jsx_runtime_1.jsx)(solid_1.CcByIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Credit must be given to the creator" })), kind.includes('NC') && ((0, jsx_runtime_1.jsx)(solid_1.CcNcIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Only noncommercial uses of the work are permitted" })), kind.includes('SA') && ((0, jsx_runtime_1.jsx)(solid_1.CcSaIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Adaptations must be shared under the same terms" })), kind.includes('ND') && ((0, jsx_runtime_1.jsx)(solid_1.CcNdIcon, { className: "h-5 w-5 mr-1 inline-block", title: "No derivatives or adaptations of the work are permitted" }))] })));
18
+ return ((0, jsx_runtime_1.jsxs)("a", { href: license.url, target: "_blank", rel: "noopener noreferrer", className: (0, classnames_1.default)('opacity-50 hover:opacity-100 text-inherit hover:text-inherit', className), "aria-label": title, children: [(0, jsx_runtime_1.jsx)(solid_1.CcIcon, { className: "h-5 w-5 mx-1 inline-block", title: title }), (kind.startsWith('CC0') || kind.startsWith('CC-0') || kind.includes('ZERO')) && ((0, jsx_runtime_1.jsx)(solid_1.CcZeroIcon, { className: "h-5 w-5 mr-1 inline-block", title: "CC0: Work is in the worldwide public domain" })), kind.includes('BY') && ((0, jsx_runtime_1.jsx)(solid_1.CcByIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Credit must be given to the creator" })), kind.includes('NC') && ((0, jsx_runtime_1.jsx)(solid_1.CcNcIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Only noncommercial uses of the work are permitted" })), kind.includes('SA') && ((0, jsx_runtime_1.jsx)(solid_1.CcSaIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Adaptations must be shared under the same terms" })), kind.includes('ND') && ((0, jsx_runtime_1.jsx)(solid_1.CcNdIcon, { className: "h-5 w-5 mr-1 inline-block", title: "No derivatives or adaptations of the work are permitted" }))] }));
19
19
  }
20
20
  exports.CreativeCommonsBadge = CreativeCommonsBadge;
21
21
  function SingleLicenseBadge({ license: possibleLicense, preamble = '', className, }) {
@@ -30,7 +30,7 @@ function SingleLicenseBadge({ license: possibleLicense, preamble = '', className
30
30
  if (license.CC) {
31
31
  return (0, jsx_runtime_1.jsx)(CreativeCommonsBadge, { license: license, preamble: preamble, className: className });
32
32
  }
33
- return ((0, jsx_runtime_1.jsxs)("a", Object.assign({ href: license.url || undefined, target: "_blank", rel: "noopener noreferrer", title: `${preamble}${(_a = license.name) !== null && _a !== void 0 ? _a : license.title} (${license.id})`, className: "text-inherit hover:text-inherit" }, { children: [!license.osi && ((0, jsx_runtime_1.jsx)(ScaleIcon_1.default, { className: (0, classnames_1.default)('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100', className) })), license.osi && ((0, jsx_runtime_1.jsx)(solid_1.OsiIcon, { className: (0, classnames_1.default)('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100 hover:text-[#599F46]', className) }))] })));
33
+ return ((0, jsx_runtime_1.jsxs)("a", { href: license.url || undefined, target: "_blank", rel: "noopener noreferrer", title: `${preamble}${(_a = license.name) !== null && _a !== void 0 ? _a : license.title} (${license.id})`, className: "text-inherit hover:text-inherit", children: [!license.osi && ((0, jsx_runtime_1.jsx)(ScaleIcon_1.default, { className: (0, classnames_1.default)('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100', className) })), license.osi && ((0, jsx_runtime_1.jsx)(solid_1.OsiIcon, { className: (0, classnames_1.default)('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100 hover:text-[#599F46]', className) }))] }));
34
34
  }
35
35
  function LicenseBadges({ license, className, }) {
36
36
  if (!license)
@@ -6,10 +6,10 @@ import { JupyterIcon, OrcidIcon, OpenAccessIcon, GithubIcon, EmailIcon, RorIcon,
6
6
  import { LicenseBadges } from './licenses';
7
7
  import { DownloadsDropdown } from './downloads';
8
8
  function ExternalOrInternalLink({ to, className, title, children, }) {
9
- return (_jsx("a", Object.assign({ href: to, className: className, title: title }, { children: children })));
9
+ return (_jsx("a", { href: to, className: className, title: title, children: children }));
10
10
  }
11
11
  export function Author({ author, className, }) {
12
- return (_jsxs("span", Object.assign({ className: classNames('font-semibold text-sm', className) }, { children: [author.name, author.email && author.corresponding && (_jsx("a", Object.assign({ className: "ml-1", href: `mailto:${author.email}`, title: `${author.name} <${author.email}>`, target: "_blank", rel: "noopener noreferrer" }, { children: _jsx(EmailIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-blue-400 -translate-y-[0.1em]" }) }))), author.orcid && (_jsx("a", Object.assign({ className: "ml-1", href: `https://orcid.org/${author.orcid}`, target: "_blank", rel: "noopener noreferrer", title: "ORCID (Open Researcher and Contributor ID)" }, { children: _jsx(OrcidIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-[#A9C751] -translate-y-[0.1em]" }) })))] })));
12
+ return (_jsxs("span", { className: classNames('font-semibold text-sm', className), children: [author.name, author.email && author.corresponding && (_jsx("a", { className: "ml-1", href: `mailto:${author.email}`, title: `${author.name} <${author.email}>`, target: "_blank", rel: "noopener noreferrer", children: _jsx(EmailIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-blue-400 -translate-y-[0.1em]" }) })), author.orcid && (_jsx("a", { className: "ml-1", href: `https://orcid.org/${author.orcid}`, target: "_blank", rel: "noopener noreferrer", title: "ORCID (Open Researcher and Contributor ID)", children: _jsx(OrcidIcon, { className: "w-4 h-4 inline-block text-gray-400 hover:text-[#A9C751] -translate-y-[0.1em]" }) }))] }));
13
13
  }
14
14
  export function AuthorsList({ authors }) {
15
15
  if (!authors || authors.length === 0)
@@ -23,35 +23,35 @@ export function AuthorAndAffiliations({ authors }) {
23
23
  return null;
24
24
  const hasAffliations = authors.reduce((r, { affiliations: a }) => r || (!!a && (a === null || a === void 0 ? void 0 : a.length) > 0), false);
25
25
  if (!hasAffliations) {
26
- return (_jsx("header", Object.assign({ className: "not-prose mt-4" }, { children: _jsx(AuthorsList, { authors: authors }) })));
26
+ return (_jsx("header", { className: "not-prose mt-4", children: _jsx(AuthorsList, { authors: authors }) }));
27
27
  }
28
- return (_jsx("header", Object.assign({ className: "not-prose mt-4" }, { children: _jsxs("div", Object.assign({ className: "grid grid-cols-1 sm:grid-cols-2 gap-y-1" }, { children: [authors.length > 1 && (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: "font-thin text-xs uppercase pb-2" }, { children: "Authors" })), _jsx("div", Object.assign({ className: "font-thin text-xs uppercase pb-2" }, { children: "Affiliations" }))] })), authors.map((author) => {
28
+ return (_jsx("header", { className: "not-prose mt-4", children: _jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-y-1", children: [authors.length > 1 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "font-thin text-xs uppercase pb-2", children: "Authors" }), _jsx("div", { className: "font-thin text-xs uppercase pb-2", children: "Affiliations" })] })), authors.map((author) => {
29
29
  var _a;
30
- return (_jsxs(React.Fragment, { children: [_jsx("div", { children: _jsx(Author, { author: author }) }), _jsx("div", Object.assign({ className: "text-sm" }, { children: (_a = author.affiliations) === null || _a === void 0 ? void 0 : _a.map((affil, i) => {
30
+ return (_jsxs(React.Fragment, { children: [_jsx("div", { children: _jsx(Author, { author: author }) }), _jsx("div", { className: "text-sm", children: (_a = author.affiliations) === null || _a === void 0 ? void 0 : _a.map((affil, i) => {
31
31
  if (typeof affil === 'string') {
32
32
  return _jsx("div", { children: affil }, i);
33
33
  }
34
34
  const { name, ror } = affil;
35
35
  if (ror) {
36
- return (_jsxs("div", { children: [name, _jsx("a", Object.assign({ href: `https://ror.org/${ror}`, target: "_blank", rel: "noopener noreferrer", title: "ROR (Research Organization Registry)", className: "text-inherit hover:text-inherit" }, { children: _jsx(RorIcon, { className: "ml-2 inline-block h-[2em] w-[2em] grayscale hover:grayscale-0 -translate-y-[1px]" }) }))] }, i));
36
+ return (_jsxs("div", { children: [name, _jsx("a", { href: `https://ror.org/${ror}`, target: "_blank", rel: "noopener noreferrer", title: "ROR (Research Organization Registry)", className: "text-inherit hover:text-inherit", children: _jsx(RorIcon, { className: "ml-2 inline-block h-[2em] w-[2em] grayscale hover:grayscale-0 -translate-y-[1px]" }) })] }, i));
37
37
  }
38
38
  return _jsx("div", { children: name }, i);
39
- }) }))] }, author.name));
40
- })] })) })));
39
+ }) })] }, author.name));
40
+ })] }) }));
41
41
  }
42
42
  export function DoiText({ doi: possibleLink, className }) {
43
43
  if (!possibleLink)
44
44
  return null;
45
45
  const doi = possibleLink.replace(/^(https?:\/\/)?(dx\.)?doi\.org\//, '');
46
46
  const url = `https://doi.org/${doi}`;
47
- return (_jsx("a", Object.assign({ className: classNames('no-underline text-inherit hover:text-inherit', className), target: "_blank", rel: "noopener noreferrer", href: url, title: "DOI (Digital Object Identifier)" }, { children: url })));
47
+ return (_jsx("a", { className: classNames('no-underline text-inherit hover:text-inherit', className), target: "_blank", rel: "noopener noreferrer", href: url, title: "DOI (Digital Object Identifier)", children: url }));
48
48
  }
49
49
  export function DoiBadge({ doi: possibleLink, className }) {
50
50
  if (!possibleLink)
51
51
  return null;
52
52
  const doi = possibleLink.replace(/^(https?:\/\/)?(dx\.)?doi\.org\//, '');
53
53
  const url = `https://doi.org/${doi}`;
54
- return (_jsx("div", Object.assign({ className: classNames('flex-none', className), title: "DOI (Digital Object Identifier)" }, { children: _jsx("a", Object.assign({ className: "font-light hover:font-light no-underline hover:underline text-inherit hover:text-inherit", target: "_blank", rel: "noopener noreferrer", href: url }, { children: url })) })));
54
+ return (_jsx("div", { className: classNames('flex-none', className), title: "DOI (Digital Object Identifier)", children: _jsx("a", { className: "font-light hover:font-light no-underline hover:underline text-inherit hover:text-inherit", target: "_blank", rel: "noopener noreferrer", href: url, children: url }) }));
55
55
  }
56
56
  export function DateString({ date, format = {
57
57
  year: 'numeric',
@@ -61,18 +61,18 @@ export function DateString({ date, format = {
61
61
  if (!date)
62
62
  return null;
63
63
  const dateString = new Date(date).toLocaleDateString('en-US', format);
64
- return (_jsx("time", Object.assign({ dateTime: date, className: classNames({ 'text-spacer': spacer }) }, { children: dateString })));
64
+ return (_jsx("time", { dateTime: date, className: classNames({ 'text-spacer': spacer }), children: dateString }));
65
65
  }
66
66
  export function GitHubLink({ github: possibleLink }) {
67
67
  if (!possibleLink)
68
68
  return null;
69
69
  const github = possibleLink.replace(/^(https?:\/\/)?github\.com\//, '');
70
- return (_jsx("a", Object.assign({ href: `https://github.com/${github}`, title: `GitHub Repository: ${github}`, target: "_blank", rel: "noopener noreferrer", className: "text-inherit hover:text-inherit" }, { children: _jsx(GithubIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100" }) })));
70
+ return (_jsx("a", { href: `https://github.com/${github}`, title: `GitHub Repository: ${github}`, target: "_blank", rel: "noopener noreferrer", className: "text-inherit hover:text-inherit", children: _jsx(GithubIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100" }) }));
71
71
  }
72
72
  export function OpenAccessBadge({ open_access }) {
73
73
  if (!open_access)
74
74
  return null;
75
- return (_jsx("a", Object.assign({ href: "https://en.wikipedia.org/wiki/Open_access", target: "_blank", rel: "noopener noreferrer", title: "Open Access", className: "text-inherit hover:text-inherit" }, { children: _jsx(OpenAccessIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100 hover:text-[#E18435]" }) })));
75
+ return (_jsx("a", { href: "https://en.wikipedia.org/wiki/Open_access", target: "_blank", rel: "noopener noreferrer", title: "Open Access", className: "text-inherit hover:text-inherit", children: _jsx(OpenAccessIcon, { className: "w-5 h-5 mr-1 inline-block opacity-60 hover:opacity-100 hover:text-[#E18435]" }) }));
76
76
  }
77
77
  export function Journal({ venue, biblio, }) {
78
78
  if (!venue)
@@ -81,7 +81,7 @@ export function Journal({ venue, biblio, }) {
81
81
  if (!title)
82
82
  return null;
83
83
  const { volume, issue } = biblio !== null && biblio !== void 0 ? biblio : {};
84
- return (_jsxs("div", Object.assign({ className: "flex-none mr-2" }, { children: [url ? (_jsx(ExternalOrInternalLink, Object.assign({ className: "smallcaps font-semibold no-underline", to: url, title: title }, { children: title }))) : (_jsx("span", Object.assign({ className: "smallcaps font-semibold" }, { children: title }))), volume != null && (_jsxs("span", Object.assign({ className: "ml-2 pl-2 border-l" }, { children: ["Volume ", volume, issue != null && _jsxs(_Fragment, { children: [", Issue ", issue] })] })))] })));
84
+ return (_jsxs("div", { className: "flex-none mr-2", children: [url ? (_jsx(ExternalOrInternalLink, { className: "smallcaps font-semibold no-underline", to: url, title: title, children: title })) : (_jsx("span", { className: "smallcaps font-semibold", children: title })), volume != null && (_jsxs("span", { className: "ml-2 pl-2 border-l", children: ["Volume ", volume, issue != null && _jsxs(_Fragment, { children: [", Issue ", issue] })] }))] }));
85
85
  }
86
86
  export function FrontmatterBlock({ frontmatter, kind = SourceFileKind.Article, authorStyle = 'block', className, }) {
87
87
  if (!frontmatter)
@@ -96,7 +96,7 @@ export function FrontmatterBlock({ frontmatter, kind = SourceFileKind.Article, a
96
96
  // Nothing to show!
97
97
  return null;
98
98
  }
99
- return (_jsxs("div", Object.assign({ className: classNames('mb-8', className) }, { children: [hasHeaders && (_jsxs("div", Object.assign({ className: "flex mt-3 mb-5 text-sm font-light items-center h-6" }, { children: [subject && (_jsx("div", Object.assign({ className: classNames('flex-none pr-2 smallcaps', {
99
+ return (_jsxs("div", { className: classNames('mb-8', className), children: [hasHeaders && (_jsxs("div", { className: "flex mt-3 mb-5 text-sm font-light items-center h-6", children: [subject && (_jsx("div", { className: classNames('flex-none pr-2 smallcaps', {
100
100
  'border-r mr-2': venue,
101
- }) }, { children: subject }))), _jsx(Journal, { venue: venue, biblio: biblio }), _jsx("div", { className: "flex-grow" }), _jsx(LicenseBadges, { license: license }), _jsx(OpenAccessBadge, { open_access: open_access }), _jsx(GitHubLink, { github: github }), isJupyter && (_jsx("div", Object.assign({ className: "inline-block mr-1" }, { children: _jsx(JupyterIcon, { className: "h-5 w-5 inline-block" }) }))), _jsx(DownloadsDropdown, { exports: exports })] }))), title && _jsx("h1", Object.assign({ className: "mb-0" }, { children: title })), subtitle && _jsx("p", Object.assign({ className: "lead mt-2 mb-0 text-zinc-600 dark:text-zinc-400" }, { children: subtitle })), hasAuthors && authorStyle === 'list' && _jsx(AuthorsList, { authors: frontmatter.authors }), hasAuthors && authorStyle === 'block' && (_jsx(AuthorAndAffiliations, { authors: frontmatter.authors })), hasDateOrDoi && (_jsxs("div", Object.assign({ className: "flex mt-2 text-sm font-light" }, { children: [_jsx(DateString, { date: date, spacer: !!doi }), _jsx(DoiBadge, { doi: doi })] })))] })));
101
+ }), children: subject })), _jsx(Journal, { venue: venue, biblio: biblio }), _jsx("div", { className: "flex-grow" }), _jsx(LicenseBadges, { license: license }), _jsx(OpenAccessBadge, { open_access: open_access }), _jsx(GitHubLink, { github: github }), isJupyter && (_jsx("div", { className: "inline-block mr-1", children: _jsx(JupyterIcon, { className: "h-5 w-5 inline-block" }) })), _jsx(DownloadsDropdown, { exports: exports })] })), title && _jsx("h1", { className: "mb-0", children: title }), subtitle && _jsx("p", { className: "lead mt-2 mb-0 text-zinc-600 dark:text-zinc-400", children: subtitle }), hasAuthors && authorStyle === 'list' && _jsx(AuthorsList, { authors: frontmatter.authors }), hasAuthors && authorStyle === 'block' && (_jsx(AuthorAndAffiliations, { authors: frontmatter.authors })), hasDateOrDoi && (_jsxs("div", { className: "flex mt-2 text-sm font-light", children: [_jsx(DateString, { date: date, spacer: !!doi }), _jsx(DoiBadge, { doi: doi })] }))] }));
102
102
  }
@@ -61,10 +61,10 @@ export function Download({ url, filename, format, className, }) {
61
61
  e.preventDefault();
62
62
  triggerDirectDownload(url, filename);
63
63
  }, [url, filename]);
64
- return (_jsxs("a", Object.assign({ className: classNames(className, 'flex'), href: url, onClick: clickDownload }, { children: [_jsxs("span", Object.assign({ className: "sr-only" }, { children: ["Download as ", format] })), _jsx(DocumentIcon, { className: "w-5 h-5 inline-block items-center mr-2", "aria-hidden": "true" }), filename] })));
64
+ return (_jsxs("a", { className: classNames(className, 'flex'), href: url, onClick: clickDownload, children: [_jsxs("span", { className: "sr-only", children: ["Download as ", format] }), _jsx(DocumentIcon, { className: "w-5 h-5 inline-block items-center mr-2", "aria-hidden": "true" }), filename] }));
65
65
  }
66
66
  export function DownloadsDropdown({ exports }) {
67
67
  if (!exports || exports.length === 0)
68
68
  return null;
69
- return (_jsxs(Menu, Object.assign({ as: "div", className: "flex relative grow-0 inline-block mx-1" }, { children: [_jsxs(Menu.Button, Object.assign({ className: "relative" }, { children: [_jsx("span", Object.assign({ className: "sr-only" }, { children: "Downloads" })), _jsx(ArrowDownTrayIcon, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] })), _jsx(Menu.Items, Object.assign({ className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { children: exports.map(({ format, filename, url }, index) => (_jsx(Menu.Item, { children: _jsx(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, index))) }))] })));
69
+ return (_jsxs(Menu, { as: "div", className: "flex relative grow-0 inline-block mx-1", children: [_jsxs(Menu.Button, { className: "relative", children: [_jsx("span", { className: "sr-only", children: "Downloads" }), _jsx(ArrowDownTrayIcon, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] }), _jsx(Menu.Items, { className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none", children: exports.map(({ format, filename, url }, index) => (_jsx(Menu.Item, { children: _jsx(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, index))) })] }));
70
70
  }
@@ -9,7 +9,7 @@ export function CreativeCommonsBadge({ license, preamble = '', className, }) {
9
9
  return null;
10
10
  const title = `${preamble}${(_a = license.name) !== null && _a !== void 0 ? _a : license.title} (${license.id})`;
11
11
  const kind = match[1].toUpperCase();
12
- return (_jsxs("a", Object.assign({ href: license.url, target: "_blank", rel: "noopener noreferrer", className: classNames('opacity-50 hover:opacity-100 text-inherit hover:text-inherit', className), "aria-label": title }, { children: [_jsx(CcIcon, { className: "h-5 w-5 mx-1 inline-block", title: title }), (kind.startsWith('CC0') || kind.startsWith('CC-0') || kind.includes('ZERO')) && (_jsx(CcZeroIcon, { className: "h-5 w-5 mr-1 inline-block", title: "CC0: Work is in the worldwide public domain" })), kind.includes('BY') && (_jsx(CcByIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Credit must be given to the creator" })), kind.includes('NC') && (_jsx(CcNcIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Only noncommercial uses of the work are permitted" })), kind.includes('SA') && (_jsx(CcSaIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Adaptations must be shared under the same terms" })), kind.includes('ND') && (_jsx(CcNdIcon, { className: "h-5 w-5 mr-1 inline-block", title: "No derivatives or adaptations of the work are permitted" }))] })));
12
+ return (_jsxs("a", { href: license.url, target: "_blank", rel: "noopener noreferrer", className: classNames('opacity-50 hover:opacity-100 text-inherit hover:text-inherit', className), "aria-label": title, children: [_jsx(CcIcon, { className: "h-5 w-5 mx-1 inline-block", title: title }), (kind.startsWith('CC0') || kind.startsWith('CC-0') || kind.includes('ZERO')) && (_jsx(CcZeroIcon, { className: "h-5 w-5 mr-1 inline-block", title: "CC0: Work is in the worldwide public domain" })), kind.includes('BY') && (_jsx(CcByIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Credit must be given to the creator" })), kind.includes('NC') && (_jsx(CcNcIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Only noncommercial uses of the work are permitted" })), kind.includes('SA') && (_jsx(CcSaIcon, { className: "h-5 w-5 mr-1 inline-block", title: "Adaptations must be shared under the same terms" })), kind.includes('ND') && (_jsx(CcNdIcon, { className: "h-5 w-5 mr-1 inline-block", title: "No derivatives or adaptations of the work are permitted" }))] }));
13
13
  }
14
14
  function SingleLicenseBadge({ license: possibleLicense, preamble = '', className, }) {
15
15
  var _a;
@@ -23,7 +23,7 @@ function SingleLicenseBadge({ license: possibleLicense, preamble = '', className
23
23
  if (license.CC) {
24
24
  return _jsx(CreativeCommonsBadge, { license: license, preamble: preamble, className: className });
25
25
  }
26
- return (_jsxs("a", Object.assign({ href: license.url || undefined, target: "_blank", rel: "noopener noreferrer", title: `${preamble}${(_a = license.name) !== null && _a !== void 0 ? _a : license.title} (${license.id})`, className: "text-inherit hover:text-inherit" }, { children: [!license.osi && (_jsx(ScaleIcon, { className: classNames('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100', className) })), license.osi && (_jsx(OsiIcon, { className: classNames('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100 hover:text-[#599F46]', className) }))] })));
26
+ return (_jsxs("a", { href: license.url || undefined, target: "_blank", rel: "noopener noreferrer", title: `${preamble}${(_a = license.name) !== null && _a !== void 0 ? _a : license.title} (${license.id})`, className: "text-inherit hover:text-inherit", children: [!license.osi && (_jsx(ScaleIcon, { className: classNames('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100', className) })), license.osi && (_jsx(OsiIcon, { className: classNames('h-5 w-5 mx-1 inline-block opacity-60 hover:opacity-100 hover:text-[#599F46]', className) }))] }));
27
27
  }
28
28
  export function LicenseBadges({ license, className, }) {
29
29
  if (!license)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myst-theme/frontmatter",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -33,11 +33,6 @@
33
33
  "react-dom": "^16.8 || ^17.0 || ^18.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/js-yaml": "^4.0.5",
37
- "eslint": "^8.21.0",
38
- "eslint-config-curvenote": "latest",
39
- "npm-run-all": "^4.1.5",
40
- "tsconfig": "latest",
41
- "typescript": "latest"
36
+ "@types/js-yaml": "^4.0.5"
42
37
  }
43
38
  }