@chtc/web-components 2.0.6 → 2.0.8
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/Article/components/Article.d.ts +9 -2
- package/Article/components/Article.d.ts.map +1 -1
- package/Article/components/Article.js +4 -2
- package/Article/components/Article.js.map +1 -1
- package/Article/components/ArticleCard.d.ts +1 -1
- package/Article/components/ArticleCard.d.ts.map +1 -1
- package/Article/components/ArticleCard.js +13 -2
- package/Article/components/ArticleCard.js.map +1 -1
- package/Article/components/HorizontalArticleCard.d.ts +1 -1
- package/Article/components/HorizontalArticleCard.d.ts.map +1 -1
- package/Article/components/HorizontalArticleCard.js +7 -2
- package/Article/components/HorizontalArticleCard.js.map +1 -1
- package/Article/types.d.ts +6 -0
- package/Article/types.d.ts.map +1 -1
- package/content/index.d.ts +2 -1
- package/content/index.d.ts.map +1 -1
- package/content/index.js +2 -1
- package/content/index.js.map +1 -1
- package/images/DefaultImageComponent.d.ts +8 -0
- package/images/DefaultImageComponent.d.ts.map +1 -0
- package/images/DefaultImageComponent.js +12 -0
- package/images/DefaultImageComponent.js.map +1 -0
- package/images/index.d.ts +3 -0
- package/images/index.d.ts.map +1 -0
- package/images/index.js +2 -0
- package/images/index.js.map +1 -0
- package/images/types.d.ts +28 -0
- package/images/types.d.ts.map +1 -0
- package/images/types.js +2 -0
- package/images/types.js.map +1 -0
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/markdownComponents/MarkdownContent.d.ts +9 -1
- package/markdownComponents/MarkdownContent.d.ts.map +1 -1
- package/markdownComponents/MarkdownContent.js +7 -2
- package/markdownComponents/MarkdownContent.js.map +1 -1
- package/markdownComponents/index.d.ts +2 -1
- package/markdownComponents/index.d.ts.map +1 -1
- package/markdownComponents/index.js +1 -1
- package/markdownComponents/index.js.map +1 -1
- package/markdownComponents/markdownComponents.d.ts +18 -1
- package/markdownComponents/markdownComponents.d.ts.map +1 -1
- package/markdownComponents/markdownComponents.js +41 -4
- package/markdownComponents/markdownComponents.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { BackendArticle } from '../types';
|
|
2
|
-
|
|
2
|
+
import type { SiteImageComponent } from "../../images/types";
|
|
3
|
+
interface ArticleProps {
|
|
3
4
|
article: BackendArticle;
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Component rendered for images in the article body. Defaults to a plain
|
|
7
|
+
* `<img>`; pass `next/image` or `ExportedImage` to have them optimized.
|
|
8
|
+
*/
|
|
9
|
+
imageComponent?: SiteImageComponent;
|
|
10
|
+
}
|
|
11
|
+
declare const Article: ({ article, imageComponent }: ArticleProps) => import("react").JSX.Element;
|
|
5
12
|
export default Article;
|
|
6
13
|
//# sourceMappingURL=Article.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Article.d.ts","sourceRoot":"","sources":["../../../src/Article/components/Article.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"Article.d.ts","sourceRoot":"","sources":["../../../src/Article/components/Article.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;AAGvC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,UAAU,YAAY;IACrB,OAAO,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAKD,QAAA,MAAM,OAAO,GAAI,6BAA2B,YAAY,gCAoBvD,CAAA;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -3,8 +3,10 @@ import { Typography, Box, Container } from '@mui/material';
|
|
|
3
3
|
import Balancer from "react-wrap-balancer";
|
|
4
4
|
import MarkdownContent from "../../markdownComponents/MarkdownContent";
|
|
5
5
|
import { formatLongDate } from "../../utils/formatLongDate";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/* The body sits in a `maxWidth="md"` container, so 900px is its widest. */
|
|
7
|
+
const BODY_IMAGE_SIZES = "(max-width: 900px) 100vw, 900px";
|
|
8
|
+
const Article = ({ article, imageComponent }) => {
|
|
9
|
+
return (_jsx(Container, { maxWidth: "md", children: _jsxs(Box, { pt: 6, children: [_jsxs(Box, { textAlign: "center", pb: 2, children: [_jsx(Box, { pb: 6, children: _jsx(Typography, { variant: "h3", children: _jsx(Balancer, { children: article.title }) }) }), _jsx(Box, { height: "1rem", borderRadius: "10px", bgcolor: "primary.main" }), _jsxs(Box, { pt: 1, display: "flex", justifyContent: "space-between", children: [_jsx(Typography, { variant: "h5", children: article.author }), _jsx(Typography, { variant: "h5", children: formatLongDate(article.date) })] })] }), _jsx(MarkdownContent, { imageComponent: imageComponent, imageSizes: BODY_IMAGE_SIZES, children: article.content })] }) }));
|
|
8
10
|
};
|
|
9
11
|
export default Article;
|
|
10
12
|
//# sourceMappingURL=Article.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Article.js","sourceRoot":"","sources":["../../../src/Article/components/Article.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACzD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAG3C,OAAO,eAAe,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Article.js","sourceRoot":"","sources":["../../../src/Article/components/Article.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACzD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAG3C,OAAO,eAAe,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAY1D,2EAA2E;AAC3E,MAAM,gBAAgB,GAAG,iCAAiC,CAAC;AAE3D,MAAM,OAAO,GAAG,CAAC,EAAC,OAAO,EAAE,cAAc,EAAe,EAAE,EAAE;IAC3D,OAAO,CACL,KAAC,SAAS,IAAC,QAAQ,EAAE,IAAI,YACxB,MAAC,GAAG,IAAC,EAAE,EAAE,CAAC,aACT,MAAC,GAAG,IAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,aAC9B,KAAC,GAAG,IAAC,EAAE,EAAE,CAAC,YACT,KAAC,UAAU,IAAC,OAAO,EAAE,IAAI,YAAG,KAAC,QAAQ,cAAE,OAAO,CAAC,KAAK,GAAY,GAAa,GACxE,EACN,KAAC,GAAG,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAQ,EAC1E,MAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,aAC3D,KAAC,UAAU,IAAC,OAAO,EAAE,IAAI,YAAG,OAAO,CAAC,MAAM,GAAc,EACxD,KAAC,UAAU,IAAC,OAAO,EAAE,IAAI,YAAG,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,GAAc,IACjE,IACD,EACN,KAAC,eAAe,IAAC,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,gBAAgB,YAC3E,OAAO,CAAC,OAAO,GACC,IACb,GACK,CACb,CAAA;AACF,CAAC,CAAA;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ArticleCardProps } from "../types";
|
|
2
|
-
declare const ArticleCard: ({ href, article }: ArticleCardProps) => import("react").JSX.Element;
|
|
2
|
+
declare const ArticleCard: ({ href, article, imageComponent: ImageComponent }: ArticleCardProps) => import("react").JSX.Element;
|
|
3
3
|
export default ArticleCard;
|
|
4
4
|
//# sourceMappingURL=ArticleCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleCard.d.ts","sourceRoot":"","sources":["../../../src/Article/components/ArticleCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ArticleCard.d.ts","sourceRoot":"","sources":["../../../src/Article/components/ArticleCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAkB1C,QAAA,MAAM,WAAW,GAAI,mDAA0E,gBAAgB,gCAuC9G,CAAA;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -5,13 +5,24 @@ import Link from "next/link";
|
|
|
5
5
|
import TopStyledBlock from "../../TopStyledBlock";
|
|
6
6
|
import MarkdownContent from "../../markdownComponents/MarkdownContent";
|
|
7
7
|
import { linkedCardExcerptComponents } from "../../markdownComponents/excerptComponents";
|
|
8
|
-
|
|
8
|
+
import DefaultImageComponent from "../../images/DefaultImageComponent";
|
|
9
|
+
/*
|
|
10
|
+
* The card art is a 2:1 crop. The numbers below are the intrinsic size an
|
|
11
|
+
* optimizing image component needs to build a srcset — the rendered size comes
|
|
12
|
+
* from the CSS width below, and `sizes` tells the browser what that width will
|
|
13
|
+
* be before any layout has happened.
|
|
14
|
+
*/
|
|
15
|
+
const CARD_IMAGE_WIDTH = 1200;
|
|
16
|
+
const CARD_IMAGE_HEIGHT = 600;
|
|
17
|
+
/** One per row below `md`, two up to `lg`, then three in an `xl` container. */
|
|
18
|
+
const CARD_IMAGE_SIZES = "(max-width: 900px) 100vw, (max-width: 1200px) 50vw, 500px";
|
|
19
|
+
const ArticleCard = ({ href, article, imageComponent: ImageComponent = DefaultImageComponent }) => {
|
|
9
20
|
const style = {
|
|
10
21
|
transition: "box-shadow .2s",
|
|
11
22
|
boxShadow: "grey 1px 1px 3px",
|
|
12
23
|
"&:hover": { boxShadow: "grey 1px 1px 5px" },
|
|
13
24
|
};
|
|
14
|
-
return (_jsx(Box, { borderRadius: 2, overflow: "hidden", sx: style, children: _jsxs(
|
|
25
|
+
return (_jsx(Box, { borderRadius: 2, overflow: "hidden", sx: style, children: _jsxs(Link, { href: href, style: { color: "inherit", textDecoration: "none" }, children: [_jsx(Box, { children: _jsx(ImageComponent, { src: article.image.path, alt: article.image.alt, width: CARD_IMAGE_WIDTH, height: CARD_IMAGE_HEIGHT, sizes: CARD_IMAGE_SIZES, style: { objectFit: "cover", width: "100%", height: "auto", aspectRatio: 2 } }) }), _jsx(Box, { children: _jsxs(Box, { pl: 2, p: 2, children: [_jsx(Box, { py: 1, pt: 1, children: _jsx(TopStyledBlock, { height: ".25rem", width: "5rem", offset: "-.75rem", children: _jsx(Typography, { variant: "h6", sx: { fontWeight: "bold" }, children: _jsx(Balancer, { children: article.title }) }) }) }), _jsx(MarkdownContent, { components: linkedCardExcerptComponents, children: article.excerpt })] }) })] }) }));
|
|
15
26
|
};
|
|
16
27
|
export default ArticleCard;
|
|
17
28
|
//# sourceMappingURL=ArticleCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleCard.js","sourceRoot":"","sources":["../../../src/Article/components/ArticleCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,GAAG,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,eAAe,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAC,2BAA2B,EAAC,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"ArticleCard.js","sourceRoot":"","sources":["../../../src/Article/components/ArticleCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,GAAG,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,OAAO,IAAI,MAAM,W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f,KAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YAChB,KAAC,cAAc,IAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,YACjE,KAAC,UAAU,IAAC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,EAAC,UAAU,EAAE,MAAM,EAAC,YAAE,KAAC,QAAQ,cAAE,OAAO,CAAC,KAAK,GAAY,GAAa,GACtF,GACZ,EACN,KAAC,eAAe,IAAC,UAAU,EAAE,2BAA2B,YACtD,OAAO,CAAC,OAAO,GACC,IACb,GACD,IACA,GACF,CACP,CAAA;AACF,CAAC,CAAA;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ArticleCardProps } from "../types";
|
|
2
|
-
declare const HorizontalArticleCard: ({ href, article }: ArticleCardProps) => import("react").JSX.Element;
|
|
2
|
+
declare const HorizontalArticleCard: ({ href, article, imageComponent: ImageComponent }: ArticleCardProps) => import("react").JSX.Element;
|
|
3
3
|
export default HorizontalArticleCard;
|
|
4
4
|
//# sourceMappingURL=HorizontalArticleCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalArticleCard.d.ts","sourceRoot":"","sources":["../../../src/Article/components/HorizontalArticleCard.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"HorizontalArticleCard.d.ts","sourceRoot":"","sources":["../../../src/Article/components/HorizontalArticleCard.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAQ1C,QAAA,MAAM,qBAAqB,GAAI,mDAA0E,gBAAgB,gCAyCxH,CAAA;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -6,8 +6,13 @@ import MarkdownContent from "../../markdownComponents/MarkdownContent";
|
|
|
6
6
|
import excerptComponents from "../../markdownComponents/excerptComponents";
|
|
7
7
|
import Link from "next/link";
|
|
8
8
|
import { ArrowRight } from "@mui/icons-material";
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import DefaultImageComponent from "../../images/DefaultImageComponent";
|
|
10
|
+
/* Half the viewport, and only ever rendered at `md` and up. */
|
|
11
|
+
const BANNER_IMAGE_WIDTH = 1600;
|
|
12
|
+
const BANNER_IMAGE_HEIGHT = 800;
|
|
13
|
+
const BANNER_IMAGE_SIZES = "50vw";
|
|
14
|
+
const HorizontalArticleCard = ({ href, article, imageComponent: ImageComponent = DefaultImageComponent }) => {
|
|
15
|
+
return (_jsx(Box, { sx: { display: { xs: 'none', md: 'block' } }, children: _jsxs(Grid, { container: true, children: [_jsx(Grid, { size: 6, children: _jsx(ImageComponent, { src: article.image.path, alt: article.image.alt, width: BANNER_IMAGE_WIDTH, height: BANNER_IMAGE_HEIGHT, sizes: BANNER_IMAGE_SIZES, style: { objectFit: "cover", width: "100%", height: "100%", aspectRatio: 2 } }) }), _jsx(Grid, { size: 6, display: "flex", children: _jsxs(Box, { width: "100%", pl: 2, p: 3, display: "flex", flexDirection: "column", bgcolor: "#cfe4ff52", children: [_jsx(Box, { py: 1, children: _jsx(TopStyledBlock, { height: ".25rem", width: "5rem", offset: "-.75rem", children: _jsx(Typography, { variant: "h5", children: _jsx(Balancer, { children: article.title }) }) }) }), _jsx(MarkdownContent, { components: excerptComponents, children: article.excerpt }), _jsx(Box, { sx: { marginTop: "auto", paddingTop: "2rem", fontWeight: "300" }, children: _jsx(Box, { sx: { color: "#0885ff" }, children: _jsxs(Link, { href: href, style: { color: "inherit", textDecoration: "none" }, children: [_jsx(Typography, { variant: "body1", sx: { display: "inline", paddingRight: ".2rem" }, children: "Read More" }), _jsx(ArrowRight, { height: 18, width: 24, fill: "currentColor" })] }) }) })] }) })] }) }));
|
|
11
16
|
};
|
|
12
17
|
export default HorizontalArticleCard;
|
|
13
18
|
//# sourceMappingURL=HorizontalArticleCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalArticleCard.js","sourceRoot":"","sources":["../../../src/Article/components/HorizontalArticleCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,eAAe,MAAM,0CAA0C,CAAC;AACvE,OAAO,iBAAiB,MAAM,4CAA4C,CAAC;AAC3E,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"HorizontalArticleCard.js","sourceRoot":"","sources":["../../../src/Article/components/HorizontalArticleCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,eAAe,MAAM,0CAA0C,CAAC;AACvE,OAAO,iBAAiB,MAAM,4CAA4C,CAAC;AAC3E,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAE/C,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AAEvE,+DAA+D;AAC/D,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,MAAM,qBAAqB,GAAG,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,GAAG,qBAAqB,EAAoB,EAAE,EAAE;IAC5H,OAAO,CACL,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,OAAO,EAAE,E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E,KAAK,EAAE,EAAC,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAC,aAClE,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAC,0BAE/D,EACb,KAAC,UAAU,IAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,GAAG,IACpD,GACF,GACD,IACD,GACA,IACD,GACF,CACP,CAAA;AACF,CAAC,CAAA;AAED,eAAe,qBAAqB,CAAC"}
|
package/Article/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Website } from "../types";
|
|
2
|
+
import type { SiteImageComponent } from "../images/types";
|
|
2
3
|
export type ArticleTag = "chtc_featured_article";
|
|
3
4
|
export type ArticleType = "news" | "user" | "tech-blog";
|
|
4
5
|
export interface ArticleImage {
|
|
@@ -36,5 +37,10 @@ export interface BackendArticle extends ArticleData {
|
|
|
36
37
|
export interface ArticleCardProps {
|
|
37
38
|
href: string;
|
|
38
39
|
article: BackendArticle;
|
|
40
|
+
/**
|
|
41
|
+
* Component rendered for the card's image. Defaults to a plain `<img>`;
|
|
42
|
+
* pass `next/image` or `ExportedImage` to have it optimized.
|
|
43
|
+
*/
|
|
44
|
+
imageComponent?: SiteImageComponent;
|
|
39
45
|
}
|
|
40
46
|
//# sourceMappingURL=types.d.ts.map
|
package/Article/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Article/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Article/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;AAExD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,IAAI,EAAE,IAAI,CAAC;IACX,yGAAyG;IACzG,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,oEAAoE;IACpE,GAAG,CAAC,EAAE,UAAU,EAAE,CAAC;IACnB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,8EAA8E;AAC9E,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACrC"}
|
package/content/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ export * from "../Article";
|
|
|
2
2
|
export * from "../Presentation";
|
|
3
3
|
export * from "../Staff";
|
|
4
4
|
export { default as MarkdownContent } from "../markdownComponents/MarkdownContent";
|
|
5
|
-
export { default as markdownComponents } from "../markdownComponents";
|
|
5
|
+
export { default as markdownComponents, createMarkdownComponents, type MarkdownComponentOptions, } from "../markdownComponents/markdownComponents";
|
|
6
6
|
export { default as excerptComponents, linkedCardExcerptComponents } from "../markdownComponents/excerptComponents";
|
|
7
7
|
export type { Website } from "../types";
|
|
8
|
+
export * from "../images";
|
|
8
9
|
export * from "../utils";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/content/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EACL,OAAO,IAAI,kBAAkB,EAC7B,wBAAwB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEpH,YAAY,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
package/content/index.js
CHANGED
|
@@ -4,7 +4,8 @@ export * from "../Article";
|
|
|
4
4
|
export * from "../Presentation";
|
|
5
5
|
export * from "../Staff";
|
|
6
6
|
export { default as MarkdownContent } from "../markdownComponents/MarkdownContent";
|
|
7
|
-
export { default as markdownComponents } from "../markdownComponents";
|
|
7
|
+
export { default as markdownComponents, createMarkdownComponents, } from "../markdownComponents/markdownComponents";
|
|
8
8
|
export { default as excerptComponents, linkedCardExcerptComponents } from "../markdownComponents/excerptComponents";
|
|
9
|
+
export * from "../images";
|
|
9
10
|
export * from "../utils";
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
package/content/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,mEAAmE;AACnE,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,mEAAmE;AACnE,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EACL,OAAO,IAAI,kBAAkB,EAC7B,wBAAwB,GAEzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAGpH,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SiteImageProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* The plain `<img>` the library falls back to when a site has not supplied an
|
|
4
|
+
* `imageComponent`. Keeps the default behaviour of every consumer unchanged.
|
|
5
|
+
*/
|
|
6
|
+
declare const DefaultImageComponent: ({ sizes, ...props }: SiteImageProps) => import("react").JSX.Element;
|
|
7
|
+
export default DefaultImageComponent;
|
|
8
|
+
//# sourceMappingURL=DefaultImageComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultImageComponent.d.ts","sourceRoot":"","sources":["../../src/images/DefaultImageComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,QAAA,MAAM,qBAAqB,GAAI,qBAAqB,cAAc,gCAKjE,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The plain `<img>` the library falls back to when a site has not supplied an
|
|
4
|
+
* `imageComponent`. Keeps the default behaviour of every consumer unchanged.
|
|
5
|
+
*/
|
|
6
|
+
const DefaultImageComponent = ({ sizes, ...props }) => (
|
|
7
|
+
// `sizes` without a `srcset` means nothing to a plain <img>, so it is
|
|
8
|
+
// dropped rather than emitted as a dead attribute.
|
|
9
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
10
|
+
_jsx("img", { ...props }));
|
|
11
|
+
export default DefaultImageComponent;
|
|
12
|
+
//# sourceMappingURL=DefaultImageComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultImageComponent.js","sourceRoot":"","sources":["../../src/images/DefaultImageComponent.tsx"],"names":[],"mappings":";AAEA;;;GAGG;AACH,MAAM,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAkB,EAAE,EAAE,CAAC;AACrE,sEAAsE;AACtE,mDAAmD;AACnD,qDAAqD;AACrD,iBAAS,KAAK,GAAI,CACnB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/images/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,mBAAmB,SAAS,CAAC"}
|
package/images/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/images/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComponentType, ImgHTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The props the library hands to whatever component renders its images.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately the intersection of a plain `<img>` and `next/image`:
|
|
6
|
+
* `src`/`alt` plus intrinsic `width`/`height` as numbers and a `sizes` hint.
|
|
7
|
+
* A plain `<img>` treats the dimensions as the attributes they already are;
|
|
8
|
+
* `next/image` and `next-image-export-optimizer` use them to build a srcset.
|
|
9
|
+
*/
|
|
10
|
+
export type SiteImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "width" | "height"> & {
|
|
11
|
+
src: string;
|
|
12
|
+
alt: string;
|
|
13
|
+
/** Intrinsic width in pixels. Required by `next/image`-shaped components. */
|
|
14
|
+
width: number;
|
|
15
|
+
/** Intrinsic height in pixels. Required by `next/image`-shaped components. */
|
|
16
|
+
height: number;
|
|
17
|
+
/** Responsive-selection hint, e.g. `(max-width: 900px) 100vw, 400px`. */
|
|
18
|
+
sizes?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A drop-in replacement for the `<img>` tags the library renders.
|
|
22
|
+
*
|
|
23
|
+
* Sites that optimize their images pass one in — `next/image`, or
|
|
24
|
+
* `next-image-export-optimizer`'s `ExportedImage` on a statically exported
|
|
25
|
+
* site. Everything else gets {@link DefaultImageComponent}.
|
|
26
|
+
*/
|
|
27
|
+
export type SiteImageComponent = ComponentType<SiteImageProps>;
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/images/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,iBAAiB,CAAC,gBAAgB,CAAC,EACnC,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CACnC,GAAG;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC"}
|
package/images/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/images/types.ts"],"names":[],"mappings":""}
|
package/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from "./Security";
|
|
|
6
6
|
export * from "./Milestone";
|
|
7
7
|
export { githubFetch, GITHUB_REVALIDATE, getTree, getRepoPaths, getRawFile, getAllPages, type GitHubFetchOptions, type GitTree, type GitTreeItem, } from "./github";
|
|
8
8
|
export { default as MarkdownContent } from "./markdownComponents/MarkdownContent";
|
|
9
|
-
export { default as markdownComponents } from "./markdownComponents";
|
|
9
|
+
export { default as markdownComponents, createMarkdownComponents, type MarkdownComponentOptions, } from "./markdownComponents/markdownComponents";
|
|
10
10
|
export { default as excerptComponents, linkedCardExcerptComponents } from "./markdownComponents/excerptComponents";
|
|
11
11
|
export { default as BigNumber, type BigNumberProps } from "./BigNumber";
|
|
12
12
|
export { default as PieChart, type PieChartData } from "./PieChart";
|
|
@@ -18,6 +18,7 @@ export * from "./TimeBar";
|
|
|
18
18
|
export { default as TopStyledBlock } from "./TopStyledBlock";
|
|
19
19
|
export * from "./UW";
|
|
20
20
|
export type { Website } from "./types";
|
|
21
|
+
export * from "./images";
|
|
21
22
|
export * from "./utils";
|
|
22
23
|
export * from "./themes";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAG5B,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAG5B,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EACL,OAAO,IAAI,kBAAkB,EAC7B,wBAAwB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAGnH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,MAAM,CAAC;AAErB,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export * from "./Milestone";
|
|
|
8
8
|
// Shared GitHub client the getters are built on.
|
|
9
9
|
export { githubFetch, GITHUB_REVALIDATE, getTree, getRepoPaths, getRawFile, getAllPages, } from "./github";
|
|
10
10
|
export { default as MarkdownContent } from "./markdownComponents/MarkdownContent";
|
|
11
|
-
export { default as markdownComponents } from "./markdownComponents";
|
|
11
|
+
export { default as markdownComponents, createMarkdownComponents, } from "./markdownComponents/markdownComponents";
|
|
12
12
|
export { default as excerptComponents, linkedCardExcerptComponents } from "./markdownComponents/excerptComponents";
|
|
13
13
|
// Standalone components.
|
|
14
14
|
export { default as BigNumber } from "./BigNumber";
|
|
@@ -20,6 +20,8 @@ export { default as TimeBar } from "./TimeBar";
|
|
|
20
20
|
export * from "./TimeBar";
|
|
21
21
|
export { default as TopStyledBlock } from "./TopStyledBlock";
|
|
22
22
|
export * from "./UW";
|
|
23
|
+
// Pluggable image rendering.
|
|
24
|
+
export * from "./images";
|
|
23
25
|
export * from "./utils";
|
|
24
26
|
export * from "./themes";
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAE5B,iDAAiD;AACjD,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,GAIZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAE5B,iDAAiD;AACjD,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,GAIZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EACL,OAAO,IAAI,kBAAkB,EAC7B,wBAAwB,GAEzB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAEnH,yBAAyB;AACzB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAuB,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAqB,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAmB,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,MAAM,CAAC;AAIrB,6BAA6B;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { type Components } from "react-markdown";
|
|
2
|
+
import type { SiteImageComponent } from "../images/types";
|
|
2
3
|
interface MarkdownContentProps {
|
|
3
4
|
children?: string | null;
|
|
4
5
|
/** Override the component map; defaults to the shared markdownComponents. */
|
|
5
6
|
components?: Components;
|
|
7
|
+
/**
|
|
8
|
+
* Component rendered for images in the markdown. Ignored when `components`
|
|
9
|
+
* is supplied, since that map already decides how images render.
|
|
10
|
+
*/
|
|
11
|
+
imageComponent?: SiteImageComponent;
|
|
12
|
+
/** `sizes` hint forwarded to `imageComponent`. */
|
|
13
|
+
imageSizes?: string;
|
|
6
14
|
}
|
|
7
15
|
/**
|
|
8
16
|
* Renders markdown with raw-HTML support and the library's component overrides.
|
|
9
17
|
* Centralizes the `rehypeRaw` + components wiring shared across Article,
|
|
10
18
|
* Presentation and PresentationCard.
|
|
11
19
|
*/
|
|
12
|
-
declare const MarkdownContent: ({ children, components, }: MarkdownContentProps) => import("react").JSX.Element;
|
|
20
|
+
declare const MarkdownContent: ({ children, components, imageComponent, imageSizes, }: MarkdownContentProps) => import("react").JSX.Element;
|
|
13
21
|
export default MarkdownContent;
|
|
14
22
|
//# sourceMappingURL=MarkdownContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownContent.d.ts","sourceRoot":"","sources":["../../src/markdownComponents/MarkdownContent.tsx"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownContent.d.ts","sourceRoot":"","sources":["../../src/markdownComponents/MarkdownContent.tsx"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,QAAA,MAAM,eAAe,GAAI,uDAKtB,oBAAoB,gCAYtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Markdown from "react-markdown";
|
|
3
3
|
import rehypeRaw from "rehype-raw";
|
|
4
|
-
import markdownComponents from "./markdownComponents";
|
|
4
|
+
import markdownComponents, { createMarkdownComponents, } from "./markdownComponents";
|
|
5
5
|
/**
|
|
6
6
|
* Renders markdown with raw-HTML support and the library's component overrides.
|
|
7
7
|
* Centralizes the `rehypeRaw` + components wiring shared across Article,
|
|
8
8
|
* Presentation and PresentationCard.
|
|
9
9
|
*/
|
|
10
|
-
const MarkdownContent = ({ children, components
|
|
10
|
+
const MarkdownContent = ({ children, components, imageComponent, imageSizes, }) => {
|
|
11
|
+
const resolved = components !== null && components !== void 0 ? components : (imageComponent
|
|
12
|
+
? createMarkdownComponents({ imageComponent, imageSizes })
|
|
13
|
+
: markdownComponents);
|
|
14
|
+
return (_jsx(Markdown, { rehypePlugins: [rehypeRaw], components: resolved, children: children }));
|
|
15
|
+
};
|
|
11
16
|
export default MarkdownContent;
|
|
12
17
|
//# sourceMappingURL=MarkdownContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownContent.js","sourceRoot":"","sources":["../../src/markdownComponents/MarkdownContent.tsx"],"names":[],"mappings":";AAAA,OAAO,QAA6B,MAAM,gBAAgB,CAAC;AAC3D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownContent.js","sourceRoot":"","sources":["../../src/markdownComponents/MarkdownContent.tsx"],"names":[],"mappings":";AAAA,OAAO,QAA6B,MAAM,gBAAgB,CAAC;AAC3D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,kBAAkB,EAAE,EACzB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAgB9B;;;;GAIG;AACH,MAAM,eAAe,GAAG,CAAC,EACvB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,UAAU,GACW,EAAE,EAAE;IACzB,MAAM,QAAQ,GACZ,UAAU,aAAV,UAAU,cAAV,UAAU,GACV,CAAC,cAAc;QACb,CAAC,CAAC,wBAAwB,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;QAC1D,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAE1B,OAAO,CACL,KAAC,QAAQ,IAAC,aAAa,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,YACvD,QAAQ,GACA,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markdownComponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markdownComponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACzE,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from "./markdownComponents";
|
|
1
|
+
export { default, createMarkdownComponents } from "./markdownComponents";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/markdownComponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/markdownComponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import type { Components } from "react-markdown";
|
|
2
|
-
|
|
2
|
+
import type { SiteImageComponent } from "../images/types";
|
|
3
|
+
export interface MarkdownComponentOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Component rendered for every image in the markdown. Defaults to a plain
|
|
6
|
+
* `<img>`; pass `next/image` or `ExportedImage` to have them optimized.
|
|
7
|
+
*/
|
|
8
|
+
imageComponent?: SiteImageComponent;
|
|
9
|
+
/** `sizes` hint forwarded to {@link MarkdownComponentOptions.imageComponent}. */
|
|
10
|
+
imageSizes?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Build the component map react-markdown renders with.
|
|
14
|
+
*
|
|
15
|
+
* Everything but images is fixed; images are pluggable because optimizing them
|
|
16
|
+
* needs a framework component the library cannot depend on.
|
|
17
|
+
*/
|
|
18
|
+
export declare const createMarkdownComponents: ({ imageComponent: ImageComponent, imageSizes, }?: MarkdownComponentOptions) => Components;
|
|
19
|
+
declare const markdownComponents: import("node_modules/react-markdown/lib").Components;
|
|
3
20
|
export default markdownComponents;
|
|
4
21
|
//# sourceMappingURL=markdownComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdownComponents.d.ts","sourceRoot":"","sources":["../../src/markdownComponents/markdownComponents.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"markdownComponents.d.ts","sourceRoot":"","sources":["../../src/markdownComponents/markdownComponents.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA2I1D,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoBD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,kDAGtC,wBAA6B,KAAG,UAgCjC,CAAC;AAEH,QAAA,MAAM,kBAAkB,sDAA6B,CAAC;AAEtD,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import Box from "@mui/material/Box";
|
|
3
3
|
import MuiLink from "@mui/material/Link";
|
|
4
4
|
import Typography from "@mui/material/Typography";
|
|
5
|
+
import DefaultImageComponent from "../images/DefaultImageComponent";
|
|
5
6
|
/*
|
|
6
7
|
* react-markdown hands every component the mdast `node` it came from. It is
|
|
7
8
|
* useful for inspecting the source tree, but it is not a DOM attribute, and
|
|
@@ -9,7 +10,7 @@ import Typography from "@mui/material/Typography";
|
|
|
9
10
|
* stamps `node="[object Object]"` onto the rendered element. Every component
|
|
10
11
|
* below drops it before spreading the rest.
|
|
11
12
|
*/
|
|
12
|
-
const
|
|
13
|
+
const baseComponents = {
|
|
13
14
|
h1: ({ children, node, ...props }) => {
|
|
14
15
|
return (_jsx(Typography, { component: "h1", variant: "h4", gutterBottom: true, ...props, children: children }));
|
|
15
16
|
},
|
|
@@ -58,14 +59,50 @@ const markdownComponents = {
|
|
|
58
59
|
overflow: "auto",
|
|
59
60
|
mb: 2,
|
|
60
61
|
}, ...props })),
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
};
|
|
63
|
+
/*
|
|
64
|
+
* Markdown bodies come from the content repositories as raw HTML, and most of
|
|
65
|
+
* their `<img>` tags declare no dimensions. `next/image`-shaped components
|
|
66
|
+
* require both, and use them only for the aspect ratio of the placeholder and
|
|
67
|
+
* to cap the srcset — the rendered size comes from the CSS below. So an
|
|
68
|
+
* assumed landscape ratio is safe: a wrong guess costs a little layout shift
|
|
69
|
+
* on load, not a wrongly sized image.
|
|
70
|
+
*/
|
|
71
|
+
const FALLBACK_IMAGE_WIDTH = 1200;
|
|
72
|
+
const FALLBACK_IMAGE_HEIGHT = 800;
|
|
73
|
+
/** Parse an HTML dimension attribute, which arrives as a string. */
|
|
74
|
+
const toPixels = (value) => {
|
|
75
|
+
const parsed = typeof value === "number" ? value : Number.parseInt(String(value !== null && value !== void 0 ? value : ""), 10);
|
|
76
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Build the component map react-markdown renders with.
|
|
80
|
+
*
|
|
81
|
+
* Everything but images is fixed; images are pluggable because optimizing them
|
|
82
|
+
* needs a framework component the library cannot depend on.
|
|
83
|
+
*/
|
|
84
|
+
export const createMarkdownComponents = ({ imageComponent: ImageComponent = DefaultImageComponent, imageSizes, } = {}) => ({
|
|
85
|
+
...baseComponents,
|
|
86
|
+
img: ({ node, src, alt, width, height, style, ...props }) => {
|
|
87
|
+
// A missing or non-string src is not something an image component can be
|
|
88
|
+
// handed; drop the image rather than render a broken one.
|
|
89
|
+
if (typeof src !== "string" || src === "")
|
|
90
|
+
return null;
|
|
91
|
+
const declaredWidth = toPixels(width);
|
|
92
|
+
const declaredHeight = toPixels(height);
|
|
93
|
+
return (_jsx(ImageComponent, { ...props, src: src, alt: alt !== null && alt !== void 0 ? alt : "", width: declaredWidth !== null && declaredWidth !== void 0 ? declaredWidth : FALLBACK_IMAGE_WIDTH, height: declaredHeight !== null && declaredHeight !== void 0 ? declaredHeight : FALLBACK_IMAGE_HEIGHT, sizes: imageSizes, style: {
|
|
63
94
|
maxWidth: "100%",
|
|
95
|
+
// Both dimensions are set, so a component that warns about a
|
|
96
|
+
// half-constrained image stays quiet, and the intrinsic ratio above
|
|
97
|
+
// never overrides the real one.
|
|
98
|
+
width: declaredWidth ? `${declaredWidth}px` : undefined,
|
|
64
99
|
height: "auto",
|
|
65
100
|
marginTop: 2,
|
|
66
101
|
marginBottom: 2,
|
|
102
|
+
...style,
|
|
67
103
|
} }));
|
|
68
104
|
},
|
|
69
|
-
};
|
|
105
|
+
});
|
|
106
|
+
const markdownComponents = createMarkdownComponents();
|
|
70
107
|
export default markdownComponents;
|
|
71
108
|
//# sourceMappingURL=markdownComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdownComponents.js","sourceRoot":"","sources":["../../src/markdownComponents/markdownComponents.tsx"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,UAAU,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"markdownComponents.js","sourceRoot":"","sources":["../../src/markdownComponents/markdownComponents.tsx"],"names":[],"mappings":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