@myst-theme/frontmatter 0.3.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/FrontmatterBlock.d.ts +4 -2
- package/dist/cjs/FrontmatterBlock.d.ts.map +1 -1
- package/dist/cjs/FrontmatterBlock.js +5 -5
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/esm/FrontmatterBlock.d.ts +4 -2
- package/dist/esm/FrontmatterBlock.d.ts.map +1 -1
- package/dist/esm/FrontmatterBlock.js +4 -4
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/types/FrontmatterBlock.d.ts +4 -2
- package/dist/types/FrontmatterBlock.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PageFrontmatter } from 'myst-frontmatter';
|
|
2
|
-
import { SourceFileKind } from 'myst-
|
|
2
|
+
import { SourceFileKind } from 'myst-spec-ext';
|
|
3
3
|
export declare function Author({ author, className, }: {
|
|
4
4
|
author: Required<PageFrontmatter>['authors'][0];
|
|
5
5
|
className?: string;
|
|
@@ -33,10 +33,12 @@ export declare function Journal({ venue, biblio, }: {
|
|
|
33
33
|
venue?: Required<PageFrontmatter>['venue'];
|
|
34
34
|
biblio?: Required<PageFrontmatter>['biblio'];
|
|
35
35
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
-
export declare function FrontmatterBlock({ frontmatter, kind, authorStyle, className, }: {
|
|
36
|
+
export declare function FrontmatterBlock({ frontmatter, kind, authorStyle, hideBadges, hideExports, className, }: {
|
|
37
37
|
frontmatter: PageFrontmatter;
|
|
38
38
|
kind?: SourceFileKind;
|
|
39
39
|
authorStyle?: 'block' | 'list';
|
|
40
|
+
hideBadges?: boolean;
|
|
41
|
+
hideExports?: boolean;
|
|
40
42
|
className?: string;
|
|
41
43
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
42
44
|
//# sourceMappingURL=FrontmatterBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontmatterBlock.d.ts","sourceRoot":"","sources":["../../src/FrontmatterBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FrontmatterBlock.d.ts","sourceRoot":"","sources":["../../src/FrontmatterBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AA8B/C,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA4BA;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;CAAE,kDAgB/E;AAED,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;CAAE,kDA4DzF;AAED,wBAAgB,OAAO,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,kDAe7F;AAED,wBAAgB,QAAQ,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,kDAgB9F;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,MAIC,EACD,MAAM,GACP,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,kDAQA;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,kDAcvE;AAED,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,kDAazE;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,MAAM,GACP,EAAE;IACD,KAAK,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC9C,kDA0BA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,IAA6B,EAC7B,WAAqB,EACrB,UAAU,EACV,WAAW,EACX,SAAS,GACV,EAAE;IACD,WAAW,EAAE,eAAe,CAAC;IAC7B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,kDAsEA"}
|
|
@@ -7,7 +7,7 @@ exports.FrontmatterBlock = exports.Journal = exports.OpenAccessBadge = exports.G
|
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const classnames_1 = __importDefault(require("classnames"));
|
|
10
|
-
const
|
|
10
|
+
const myst_spec_ext_1 = require("myst-spec-ext");
|
|
11
11
|
const solid_1 = require("@scienceicons/react/24/solid");
|
|
12
12
|
const licenses_1 = require("./licenses");
|
|
13
13
|
const downloads_1 = require("./downloads");
|
|
@@ -98,11 +98,11 @@ function Journal({ venue, biblio, }) {
|
|
|
98
98
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex-none mr-2", children: [url ? ((0, jsx_runtime_1.jsx)(ExternalOrInternalLink, { className: "font-semibold no-underline smallcaps", to: url, title: title, children: title })) : ((0, jsx_runtime_1.jsx)("span", { className: "font-semibold smallcaps", children: title })), volume != null && ((0, jsx_runtime_1.jsxs)("span", { className: "pl-2 ml-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
|
-
function FrontmatterBlock({ frontmatter, kind =
|
|
101
|
+
function FrontmatterBlock({ frontmatter, kind = myst_spec_ext_1.SourceFileKind.Article, authorStyle = 'block', hideBadges, hideExports, className, }) {
|
|
102
102
|
if (!frontmatter)
|
|
103
103
|
return null;
|
|
104
104
|
const { title, subtitle, subject, doi, open_access, license, github, venue, biblio, exports, date, authors, } = frontmatter;
|
|
105
|
-
const isJupyter = kind ===
|
|
105
|
+
const isJupyter = kind === myst_spec_ext_1.SourceFileKind.Notebook;
|
|
106
106
|
const hasExports = exports && exports.length > 0;
|
|
107
107
|
const hasAuthors = authors && authors.length > 0;
|
|
108
108
|
const hasHeaders = subject || github || venue || biblio || open_access || license || hasExports || isJupyter;
|
|
@@ -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", { className: (0, classnames_1.default)(
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(className), children: [hasHeaders && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center h-6 mt-3 mb-5 text-sm font-light", 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", { className: "inline-block mr-1", children: (0, jsx_runtime_1.jsx)(solid_1.JupyterIcon, { className: "inline-block w-5 h-5" }) })), (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: "mt-2 mb-0 lead 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 })] }))] }));
|
|
116
|
+
}), children: subject })), (0, jsx_runtime_1.jsx)(Journal, { venue: venue, biblio: biblio }), (0, jsx_runtime_1.jsx)("div", { className: "flex-grow" }), !hideBadges && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(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: "inline-block w-5 h-5" }) }))] })), !hideExports && (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: "mt-2 mb-0 lead 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;
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./FrontmatterBlock"), exports);
|
|
18
|
+
__exportStar(require("./licenses"), exports);
|
|
18
19
|
__exportStar(require("./downloads"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PageFrontmatter } from 'myst-frontmatter';
|
|
2
|
-
import { SourceFileKind } from 'myst-
|
|
2
|
+
import { SourceFileKind } from 'myst-spec-ext';
|
|
3
3
|
export declare function Author({ author, className, }: {
|
|
4
4
|
author: Required<PageFrontmatter>['authors'][0];
|
|
5
5
|
className?: string;
|
|
@@ -33,10 +33,12 @@ export declare function Journal({ venue, biblio, }: {
|
|
|
33
33
|
venue?: Required<PageFrontmatter>['venue'];
|
|
34
34
|
biblio?: Required<PageFrontmatter>['biblio'];
|
|
35
35
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
-
export declare function FrontmatterBlock({ frontmatter, kind, authorStyle, className, }: {
|
|
36
|
+
export declare function FrontmatterBlock({ frontmatter, kind, authorStyle, hideBadges, hideExports, className, }: {
|
|
37
37
|
frontmatter: PageFrontmatter;
|
|
38
38
|
kind?: SourceFileKind;
|
|
39
39
|
authorStyle?: 'block' | 'list';
|
|
40
|
+
hideBadges?: boolean;
|
|
41
|
+
hideExports?: boolean;
|
|
40
42
|
className?: string;
|
|
41
43
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
42
44
|
//# sourceMappingURL=FrontmatterBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontmatterBlock.d.ts","sourceRoot":"","sources":["../../src/FrontmatterBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FrontmatterBlock.d.ts","sourceRoot":"","sources":["../../src/FrontmatterBlock.tsx"],"names":[],"mappings":"AA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C,EAAE,OAAO,CAAA;CAAE,kDAazE;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,MAAM,GACP,EAAE;IACD,KAAK,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC9C,kDA0BA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,IAA6B,EAC7B,WAAqB,EACrB,UAAU,EACV,WAAW,EACX,SAAS,GACV,EAAE;IACD,WAAW,EAAE,eAAe,CAAC;IAC7B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,kDAsEA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { SourceFileKind } from 'myst-
|
|
4
|
+
import { SourceFileKind } from 'myst-spec-ext';
|
|
5
5
|
import { JupyterIcon, OrcidIcon, OpenAccessIcon, GithubIcon, EmailIcon, RorIcon, } from '@scienceicons/react/24/solid';
|
|
6
6
|
import { LicenseBadges } from './licenses';
|
|
7
7
|
import { DownloadsDropdown } from './downloads';
|
|
@@ -83,7 +83,7 @@ export function Journal({ venue, biblio, }) {
|
|
|
83
83
|
const { volume, issue } = biblio !== null && biblio !== void 0 ? biblio : {};
|
|
84
84
|
return (_jsxs("div", { className: "flex-none mr-2", children: [url ? (_jsx(ExternalOrInternalLink, { className: "font-semibold no-underline smallcaps", to: url, title: title, children: title })) : (_jsx("span", { className: "font-semibold smallcaps", children: title })), volume != null && (_jsxs("span", { className: "pl-2 ml-2 border-l", children: ["Volume ", volume, issue != null && _jsxs(_Fragment, { children: [", Issue ", issue] })] }))] }));
|
|
85
85
|
}
|
|
86
|
-
export function FrontmatterBlock({ frontmatter, kind = SourceFileKind.Article, authorStyle = 'block', className, }) {
|
|
86
|
+
export function FrontmatterBlock({ frontmatter, kind = SourceFileKind.Article, authorStyle = 'block', hideBadges, hideExports, className, }) {
|
|
87
87
|
if (!frontmatter)
|
|
88
88
|
return null;
|
|
89
89
|
const { title, subtitle, subject, doi, open_access, license, github, venue, biblio, exports, date, authors, } = 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", { className: classNames(
|
|
99
|
+
return (_jsxs("div", { className: classNames(className), children: [hasHeaders && (_jsxs("div", { className: "flex items-center h-6 mt-3 mb-5 text-sm font-light", 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", { className: "inline-block mr-1", children: _jsx(JupyterIcon, { className: "inline-block w-5 h-5" }) })), _jsx(DownloadsDropdown, { exports: exports })] })), title && _jsx("h1", { className: "mb-0", children: title }), subtitle && _jsx("p", { className: "mt-2 mb-0 lead 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 })] }))] }));
|
|
101
|
+
}), children: subject })), _jsx(Journal, { venue: venue, biblio: biblio }), _jsx("div", { className: "flex-grow" }), !hideBadges && (_jsxs(_Fragment, { children: [_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: "inline-block w-5 h-5" }) }))] })), !hideExports && _jsx(DownloadsDropdown, { exports: exports })] })), title && _jsx("h1", { className: "mb-0", children: title }), subtitle && _jsx("p", { className: "mt-2 mb-0 lead 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
|
}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PageFrontmatter } from 'myst-frontmatter';
|
|
2
|
-
import { SourceFileKind } from 'myst-
|
|
2
|
+
import { SourceFileKind } from 'myst-spec-ext';
|
|
3
3
|
export declare function Author({ author, className, }: {
|
|
4
4
|
author: Required<PageFrontmatter>['authors'][0];
|
|
5
5
|
className?: string;
|
|
@@ -33,10 +33,12 @@ export declare function Journal({ venue, biblio, }: {
|
|
|
33
33
|
venue?: Required<PageFrontmatter>['venue'];
|
|
34
34
|
biblio?: Required<PageFrontmatter>['biblio'];
|
|
35
35
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
-
export declare function FrontmatterBlock({ frontmatter, kind, authorStyle, className, }: {
|
|
36
|
+
export declare function FrontmatterBlock({ frontmatter, kind, authorStyle, hideBadges, hideExports, className, }: {
|
|
37
37
|
frontmatter: PageFrontmatter;
|
|
38
38
|
kind?: SourceFileKind;
|
|
39
39
|
authorStyle?: 'block' | 'list';
|
|
40
|
+
hideBadges?: boolean;
|
|
41
|
+
hideExports?: boolean;
|
|
40
42
|
className?: string;
|
|
41
43
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
42
44
|
//# sourceMappingURL=FrontmatterBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontmatterBlock.d.ts","sourceRoot":"","sources":["../../src/FrontmatterBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FrontmatterBlock.d.ts","sourceRoot":"","sources":["../../src/FrontmatterBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AA8B/C,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA4BA;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE;I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,SAAS,GACV,EAAE;IACD,WAAW,EAAE,eAAe,CAAC;IAC7B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,kDAsEA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/frontmatter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"build": "npm-run-all -l clean -p build:cjs build:esm build:types"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@headlessui/react": "^1.7.
|
|
23
|
-
"@heroicons/react": "^2.0.
|
|
24
|
-
"@scienceicons/react": "^0.0.
|
|
22
|
+
"@headlessui/react": "^1.7.15",
|
|
23
|
+
"@heroicons/react": "^2.0.18",
|
|
24
|
+
"@scienceicons/react": "^0.0.3",
|
|
25
25
|
"classnames": "^2.3.2",
|
|
26
26
|
"myst-common": "*",
|
|
27
27
|
"myst-frontmatter": "*"
|