@ndla/ui 55.0.12-alpha.0 → 55.0.13-alpha.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/all-aout.js +0 -0
- package/dist/all.css +1 -0
- package/dist/panda.buildinfo.json +170 -0
- package/dist/styles.css +686 -0
- package/es/Article/Article.js +3 -4
- package/es/Article/ArticleByline.js +9 -9
- package/es/Article/ArticleFootNotes.js +4 -4
- package/es/AudioPlayer/AudioPlayer.js +142 -163
- package/es/AudioPlayer/Controls.js +187 -203
- package/es/AudioPlayer/SpeechControl.js +13 -11
- package/es/BlogPost/BlogPost.js +85 -23
- package/es/CampaignBlock/CampaignBlock.js +3 -4
- package/es/CodeBlock/CodeBlock.js +88 -96
- package/es/ContactBlock/ContactBlock.js +54 -40
- package/es/ContentLoader/index.js +7 -7
- package/es/CopyParagraphButton/CopyParagraphButton.js +4 -4
- package/es/Embed/AudioEmbed.js +5 -9
- package/es/Embed/BrightcoveEmbed.js +12 -15
- package/es/Embed/CodeEmbed.js +58 -10
- package/es/Embed/ConceptEmbed.js +15 -20
- package/es/Embed/ContentLinkEmbed.js +1 -1
- package/es/Embed/EmbedErrorPlaceholder.js +32 -17
- package/es/Embed/ExternalEmbed.js +7 -10
- package/es/Embed/FootnoteEmbed.js +3 -3
- package/es/Embed/H5pEmbed.js +1 -2
- package/es/Embed/IframeEmbed.js +8 -9
- package/es/Embed/ImageEmbed.js +167 -122
- package/es/Embed/RelatedContentEmbed.js +8 -10
- package/es/Embed/UuDisclaimerEmbed.js +2 -2
- package/es/Embed/conceptComponents.js +9 -9
- package/es/ErrorMessage/ErrorMessage.js +1 -1
- package/es/FactBox/FactBox.js +2 -2
- package/es/FileList/File.js +1 -1
- package/es/FileList/Format.js +3 -3
- package/es/FrontpageArticle/FrontpageArticle.js +1 -1
- package/es/Gloss/Gloss.js +9 -11
- package/es/Gloss/GlossExample.js +3 -4
- package/es/Grid/Grid.js +1 -1
- package/es/Image/Image.js +7 -8
- package/es/Image/ImageLink.js +1 -1
- package/es/KeyFigure/KeyFigure.js +2 -2
- package/es/LanguageSelector/LanguageSelector.js +2 -2
- package/es/LetterFilter/LetterFilter.js +1 -1
- package/es/LicenseByline/EmbedByline.js +5 -6
- package/es/LicenseByline/LicenseDescription.js +1 -1
- package/es/LicenseByline/LicenseLink.js +1 -2
- package/es/Messages/MessageBox.js +1 -1
- package/es/Notion/Notion.js +2 -2
- package/es/Notion/NotionImage.js +12 -57
- package/es/RelatedArticleList/RelatedArticleList.js +3 -3
- package/es/ResourceBox/ResourceBox.js +12 -17
- package/es/Search/ActiveFilters.js +1 -1
- package/es/Search/ContentTypeResult.js +9 -6
- package/es/Search/ContentTypeResultStyles.js +1 -1
- package/es/Search/IsPathToHighlight.js +1 -1
- package/es/Search/SearchField.js +6 -8
- package/es/Search/SearchResult.js +14 -19
- package/es/Search/SearchResultSleeve.js +14 -16
- package/es/SnackBar/SnackbarProvider.js +8 -11
- package/es/TagSelector/TagSelector.js +1 -1
- package/es/TagSelector/ariaMessages.js +6 -6
- package/es/TreeStructure/AddFolderButton.js +4 -6
- package/es/TreeStructure/ComboboxButton.js +4 -7
- package/es/TreeStructure/FolderItem.js +12 -15
- package/es/TreeStructure/FolderItems.js +3 -3
- package/es/TreeStructure/TreeStructure.js +9 -12
- package/es/TreeStructure/helperFunctions.js +1 -1
- package/es/ZendeskButton/ZendeskButton.js +55 -0
- package/es/i18n/formatNestedMessages.js +1 -1
- package/es/index.js +2 -1
- package/es/locale/messages-en.js +9 -8
- package/es/locale/messages-nb.js +9 -8
- package/es/locale/messages-nn.js +9 -8
- package/es/locale/messages-se.js +9 -8
- package/es/locale/messages-sma.js +9 -8
- package/es/styles.css +686 -0
- package/es/utils/relativeUrl.js +3 -3
- package/lib/Article/Article.js +3 -4
- package/lib/Article/ArticleByline.js +9 -9
- package/lib/Article/ArticleFootNotes.js +4 -4
- package/lib/AudioPlayer/AudioPlayer.d.ts +1 -2
- package/lib/AudioPlayer/AudioPlayer.js +142 -162
- package/lib/AudioPlayer/Controls.js +190 -205
- package/lib/AudioPlayer/SpeechControl.js +13 -11
- package/lib/BlogPost/BlogPost.d.ts +2 -2
- package/lib/BlogPost/BlogPost.js +85 -24
- package/lib/CampaignBlock/CampaignBlock.js +3 -4
- package/lib/CodeBlock/CodeBlock.d.ts +5 -8
- package/lib/CodeBlock/CodeBlock.js +88 -96
- package/lib/ContactBlock/ContactBlock.js +55 -43
- package/lib/ContentLoader/index.js +7 -7
- package/lib/CopyParagraphButton/CopyParagraphButton.js +4 -4
- package/lib/Embed/AudioEmbed.js +5 -9
- package/lib/Embed/BrightcoveEmbed.js +12 -15
- package/lib/Embed/CodeEmbed.js +56 -8
- package/lib/Embed/ConceptEmbed.js +15 -20
- package/lib/Embed/ContentLinkEmbed.js +1 -1
- package/lib/Embed/EmbedErrorPlaceholder.d.ts +4 -3
- package/lib/Embed/EmbedErrorPlaceholder.js +32 -18
- package/lib/Embed/ExternalEmbed.js +7 -10
- package/lib/Embed/FootnoteEmbed.js +3 -3
- package/lib/Embed/H5pEmbed.js +1 -2
- package/lib/Embed/IframeEmbed.js +8 -9
- package/lib/Embed/ImageEmbed.d.ts +1 -2
- package/lib/Embed/ImageEmbed.js +167 -123
- package/lib/Embed/RelatedContentEmbed.js +8 -10
- package/lib/Embed/UuDisclaimerEmbed.js +2 -2
- package/lib/Embed/conceptComponents.js +9 -9
- package/lib/ErrorMessage/ErrorMessage.js +1 -1
- package/lib/FactBox/FactBox.js +2 -2
- package/lib/FileList/File.js +1 -1
- package/lib/FileList/Format.js +3 -3
- package/lib/FrontpageArticle/FrontpageArticle.js +1 -1
- package/lib/Gloss/Gloss.js +9 -11
- package/lib/Gloss/GlossExample.js +3 -4
- package/lib/Grid/Grid.js +1 -1
- package/lib/Image/Image.js +7 -8
- package/lib/Image/ImageLink.js +1 -1
- package/lib/KeyFigure/KeyFigure.js +2 -2
- package/lib/LanguageSelector/LanguageSelector.js +2 -2
- package/lib/LetterFilter/LetterFilter.js +1 -1
- package/lib/LicenseByline/EmbedByline.js +5 -6
- package/lib/LicenseByline/LicenseDescription.js +1 -1
- package/lib/LicenseByline/LicenseLink.js +1 -2
- package/lib/Messages/MessageBox.js +1 -1
- package/lib/Notion/Notion.js +2 -2
- package/lib/Notion/NotionImage.d.ts +1 -11
- package/lib/Notion/NotionImage.js +12 -59
- package/lib/RelatedArticleList/RelatedArticleList.js +3 -3
- package/lib/ResourceBox/ResourceBox.js +13 -18
- package/lib/Search/ActiveFilters.js +1 -1
- package/lib/Search/ContentTypeResult.js +9 -6
- package/lib/Search/ContentTypeResultStyles.js +1 -1
- package/lib/Search/IsPathToHighlight.js +1 -1
- package/lib/Search/SearchField.js +6 -8
- package/lib/Search/SearchResult.js +14 -19
- package/lib/Search/SearchResultSleeve.js +14 -16
- package/lib/SnackBar/SnackbarProvider.js +8 -11
- package/lib/TagSelector/TagSelector.js +1 -1
- package/lib/TagSelector/ariaMessages.js +6 -6
- package/lib/TreeStructure/AddFolderButton.js +4 -6
- package/lib/TreeStructure/ComboboxButton.js +4 -7
- package/lib/TreeStructure/FolderItem.js +12 -15
- package/lib/TreeStructure/FolderItems.js +3 -3
- package/lib/TreeStructure/TreeStructure.js +9 -12
- package/lib/TreeStructure/helperFunctions.js +1 -1
- package/lib/ZendeskButton/ZendeskButton.d.ts +19 -0
- package/lib/ZendeskButton/ZendeskButton.js +61 -0
- package/lib/i18n/formatNestedMessages.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +7 -0
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +9 -8
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +9 -8
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +9 -8
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +9 -8
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +9 -8
- package/lib/styles.css +686 -0
- package/lib/types.d.ts +1 -0
- package/lib/utils/relativeUrl.js +3 -3
- package/package.json +17 -12
- package/src/AudioPlayer/AudioPlayer.tsx +139 -176
- package/src/AudioPlayer/Controls.tsx +210 -250
- package/src/AudioPlayer/SpeechControl.tsx +9 -7
- package/src/BlogPost/BlogPost.tsx +82 -58
- package/src/CodeBlock/CodeBlock.stories.tsx +0 -43
- package/src/CodeBlock/CodeBlock.tsx +91 -202
- package/src/ContactBlock/ContactBlock.tsx +10 -2
- package/src/Embed/CodeEmbed.stories.tsx +95 -0
- package/src/Embed/CodeEmbed.tsx +62 -7
- package/src/Embed/ConceptEmbed.tsx +1 -9
- package/src/Embed/EmbedErrorPlaceholder.tsx +31 -28
- package/src/Embed/ImageEmbed.stories.tsx +53 -11
- package/src/Embed/ImageEmbed.tsx +162 -166
- package/src/Notion/NotionImage.tsx +4 -54
- package/src/ResourceBox/ResourceBox.tsx +3 -15
- package/src/Search/ContentTypeResult.tsx +9 -3
- package/src/Search/SearchResultSleeve.tsx +5 -2
- package/src/ZendeskButton/ZendeskButton.tsx +58 -0
- package/src/index.ts +4 -0
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
- package/src/types.ts +2 -0
- package/src/Image/__tests__/Image-test.tsx +0 -66
- package/src/Image/__tests__/__snapshots__/Image-test.tsx.snap +0 -194
|
@@ -33,7 +33,7 @@ const ContentLinkEmbed = _ref => {
|
|
|
33
33
|
if (embed.status === "error") {
|
|
34
34
|
return (0, _jsxRuntime.jsxs)(StyledSpan, {
|
|
35
35
|
children: [(0, _jsxRuntime.jsx)("span", {
|
|
36
|
-
children:
|
|
36
|
+
children: `${t("embed.linkError")}: `
|
|
37
37
|
}), children]
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import { ReactNode } from "react";
|
|
9
|
-
import {
|
|
9
|
+
import { type FigureFloat, type FigureSize } from "@ndla/primitives";
|
|
10
10
|
import { EmbedBylineErrorProps } from "../LicenseByline/EmbedByline";
|
|
11
11
|
interface Props {
|
|
12
12
|
type: EmbedBylineErrorProps["type"];
|
|
13
|
-
figureType?:
|
|
13
|
+
figureType?: FigureSize;
|
|
14
|
+
float?: FigureFloat;
|
|
14
15
|
children?: ReactNode;
|
|
15
16
|
}
|
|
16
|
-
declare const EmbedErrorPlaceholder: ({ type, children, figureType }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const EmbedErrorPlaceholder: ({ type, children, figureType, float }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default EmbedErrorPlaceholder;
|
|
@@ -4,13 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
|
-
var _core = require("@ndla/core");
|
|
9
7
|
var _common = require("@ndla/icons/common");
|
|
10
|
-
var
|
|
8
|
+
var _primitives = require("@ndla/primitives");
|
|
9
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
11
10
|
var _LicenseByline = require("../LicenseByline");
|
|
12
11
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
12
|
/**
|
|
15
13
|
* Copyright (c) 2023-present, NDLA.
|
|
16
14
|
*
|
|
@@ -19,30 +17,46 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
19
17
|
*
|
|
20
18
|
*/
|
|
21
19
|
|
|
22
|
-
const ErrorPlaceholder =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
const ErrorPlaceholder = (0, _jsx2.styled)("div", {
|
|
21
|
+
base: {
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
backgroundColor: "surface.disabled",
|
|
26
|
+
height: "surface.xsmall",
|
|
27
|
+
"& svg": {
|
|
28
|
+
fill: "text.subtle",
|
|
29
|
+
height: "90%",
|
|
30
|
+
width: "90%"
|
|
31
|
+
},
|
|
32
|
+
"&[data-embed-type='audio']": {
|
|
33
|
+
height: "surface.3xsmall"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const StyledFigure = (0, _jsx2.styled)(_primitives.Figure, {
|
|
38
|
+
base: {
|
|
39
|
+
"& > *:not(:first-child)": {
|
|
40
|
+
marginBlockStart: "3xsmall"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
30
44
|
const EmbedErrorPlaceholder = _ref => {
|
|
31
45
|
let {
|
|
32
46
|
type,
|
|
33
47
|
children,
|
|
34
|
-
figureType
|
|
48
|
+
figureType,
|
|
49
|
+
float
|
|
35
50
|
} = _ref;
|
|
36
51
|
return (0, _jsxRuntime.jsxs)(StyledFigure, {
|
|
37
|
-
|
|
38
|
-
|
|
52
|
+
size: figureType,
|
|
53
|
+
float: float,
|
|
54
|
+
children: [children ?? (0, _jsxRuntime.jsx)(ErrorPlaceholder, {
|
|
39
55
|
"data-embed-type": type,
|
|
40
56
|
children: (0, _jsxRuntime.jsx)(_common.WarningOutline, {})
|
|
41
57
|
}), (0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
|
|
42
58
|
error: true,
|
|
43
|
-
type: type
|
|
44
|
-
topRounded: true,
|
|
45
|
-
bottomRounded: true
|
|
59
|
+
type: type
|
|
46
60
|
})]
|
|
47
61
|
});
|
|
48
62
|
};
|
|
@@ -32,7 +32,6 @@ const StyledFigure = /*#__PURE__*/(0, _base.default)(_Figure.Figure, {
|
|
|
32
32
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
33
|
});
|
|
34
34
|
const ExternalEmbed = _ref => {
|
|
35
|
-
var _data$oembed$html;
|
|
36
35
|
let {
|
|
37
36
|
embed,
|
|
38
37
|
isConcept
|
|
@@ -42,11 +41,10 @@ const ExternalEmbed = _ref => {
|
|
|
42
41
|
} = (0, _reactI18next.useTranslation)();
|
|
43
42
|
const figRef = (0, _react.useRef)(null);
|
|
44
43
|
(0, _react.useEffect)(() => {
|
|
45
|
-
|
|
46
|
-
const iframe = (_figRef$current = figRef.current) === null || _figRef$current === void 0 ? void 0 : _figRef$current.querySelector("iframe");
|
|
44
|
+
const iframe = figRef.current?.querySelector("iframe");
|
|
47
45
|
if (iframe) {
|
|
48
46
|
const [width, height] = [Number.parseInt(iframe.width), Number.parseInt(iframe.height)];
|
|
49
|
-
iframe.style.aspectRatio =
|
|
47
|
+
iframe.style.aspectRatio = `${width ? width : 16}/${height ? height : 9}`;
|
|
50
48
|
iframe.width = "";
|
|
51
49
|
iframe.height = "";
|
|
52
50
|
}
|
|
@@ -61,18 +59,17 @@ const ExternalEmbed = _ref => {
|
|
|
61
59
|
data
|
|
62
60
|
} = embed;
|
|
63
61
|
if (embedData.type === "fullscreen") {
|
|
64
|
-
var _data$iframeImage$ima, _data$iframeImage, _data$iframeImage$alt, _data$iframeImage2, _embedData$title, _embedData$caption;
|
|
65
62
|
const image = {
|
|
66
|
-
src:
|
|
67
|
-
alt: embedData.alt !== undefined ? embedData.alt :
|
|
63
|
+
src: data.iframeImage?.image.imageUrl ?? "",
|
|
64
|
+
alt: embedData.alt !== undefined ? embedData.alt : data.iframeImage?.alttext?.alttext ?? ""
|
|
68
65
|
};
|
|
69
66
|
return (0, _jsxRuntime.jsx)(_Figure.Figure, {
|
|
70
67
|
type: "full",
|
|
71
68
|
children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
|
|
72
69
|
image: image,
|
|
73
|
-
title:
|
|
70
|
+
title: embedData.title ?? "",
|
|
74
71
|
url: embedData.url,
|
|
75
|
-
caption:
|
|
72
|
+
caption: embedData.caption ?? "",
|
|
76
73
|
buttonText: t("license.other.itemImage.ariaLabel")
|
|
77
74
|
})
|
|
78
75
|
});
|
|
@@ -81,7 +78,7 @@ const ExternalEmbed = _ref => {
|
|
|
81
78
|
ref: figRef,
|
|
82
79
|
type: isConcept ? "full-column" : undefined,
|
|
83
80
|
dangerouslySetInnerHTML: {
|
|
84
|
-
__html:
|
|
81
|
+
__html: data.oembed.html ?? ""
|
|
85
82
|
}
|
|
86
83
|
});
|
|
87
84
|
};
|
|
@@ -34,12 +34,12 @@ const FootnoteEmbed = _ref => {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
return (0, _jsxRuntime.jsx)(FootnoteRef, {
|
|
37
|
-
id:
|
|
37
|
+
id: `ref${embed.data.entryNum}`,
|
|
38
38
|
children: (0, _jsxRuntime.jsx)("sup", {
|
|
39
39
|
children: (0, _jsxRuntime.jsx)("a", {
|
|
40
|
-
href:
|
|
40
|
+
href: `#note${embed.data.entryNum}`,
|
|
41
41
|
target: "_self",
|
|
42
|
-
children:
|
|
42
|
+
children: `[${embed.data.entryNum}]`
|
|
43
43
|
})
|
|
44
44
|
})
|
|
45
45
|
});
|
package/lib/Embed/H5pEmbed.js
CHANGED
|
@@ -39,11 +39,10 @@ const H5pEmbed = _ref => {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
if (embed.data.oembed) {
|
|
42
|
-
var _embed$data$oembed$ht;
|
|
43
42
|
return (0, _jsxRuntime.jsx)(_Figure.Figure, {
|
|
44
43
|
type: isConcept ? "full-column" : undefined,
|
|
45
44
|
dangerouslySetInnerHTML: {
|
|
46
|
-
__html:
|
|
45
|
+
__html: embed.data.oembed.html ?? ""
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
}
|
package/lib/Embed/IframeEmbed.js
CHANGED
|
@@ -32,7 +32,7 @@ const IframeEmbed = _ref => {
|
|
|
32
32
|
const iframe = iframeRef.current;
|
|
33
33
|
if (iframe) {
|
|
34
34
|
const [width, height] = [Number.parseInt(iframe.width), Number.parseInt(iframe.height)];
|
|
35
|
-
iframe.style.aspectRatio =
|
|
35
|
+
iframe.style.aspectRatio = `${width ? width : 16}/${height ? height : 9}`;
|
|
36
36
|
iframe.width = "";
|
|
37
37
|
iframe.height = "";
|
|
38
38
|
}
|
|
@@ -47,20 +47,19 @@ const IframeEmbed = _ref => {
|
|
|
47
47
|
data
|
|
48
48
|
} = embed;
|
|
49
49
|
if (embedData.type === "fullscreen") {
|
|
50
|
-
var _iframeImage$image$im, _embedData$title, _embedData$caption;
|
|
51
50
|
const iframeImage = embed.status === "success" ? data.iframeImage : undefined;
|
|
52
|
-
const alt = embedData.alt !== undefined ? embedData.alt : iframeImage
|
|
51
|
+
const alt = embedData.alt !== undefined ? embedData.alt : iframeImage?.alttext.alttext;
|
|
53
52
|
const image = {
|
|
54
|
-
src:
|
|
55
|
-
alt: alt
|
|
53
|
+
src: iframeImage?.image.imageUrl ?? "",
|
|
54
|
+
alt: alt ?? ""
|
|
56
55
|
};
|
|
57
56
|
return (0, _jsxRuntime.jsx)(_Figure.Figure, {
|
|
58
57
|
type: "full",
|
|
59
58
|
children: (0, _jsxRuntime.jsx)(_ResourceBox.ResourceBox, {
|
|
60
59
|
image: image,
|
|
61
|
-
title:
|
|
60
|
+
title: embedData.title ?? "",
|
|
62
61
|
url: embedData.url,
|
|
63
|
-
caption:
|
|
62
|
+
caption: embedData.caption ?? "",
|
|
64
63
|
buttonText: t("license.other.itemImage.ariaLabel")
|
|
65
64
|
})
|
|
66
65
|
});
|
|
@@ -71,8 +70,8 @@ const IframeEmbed = _ref => {
|
|
|
71
70
|
title,
|
|
72
71
|
url
|
|
73
72
|
} = embedData;
|
|
74
|
-
const strippedWidth = typeof width === "number" ? width : width
|
|
75
|
-
const strippedHeight = typeof height === "number" ? height : height
|
|
73
|
+
const strippedWidth = typeof width === "number" ? width : width?.replace(/\s*px/, "");
|
|
74
|
+
const strippedHeight = typeof height === "number" ? height : height?.replace(/\s*px/, "");
|
|
76
75
|
const urlOrTitle = title || url;
|
|
77
76
|
return (0, _jsxRuntime.jsx)(_Figure.Figure, {
|
|
78
77
|
type: isConcept ? "full-column" : undefined,
|
|
@@ -11,7 +11,6 @@ import { RenderContext } from "./types";
|
|
|
11
11
|
interface Props {
|
|
12
12
|
embed: ImageMetaData;
|
|
13
13
|
previewAlt?: boolean;
|
|
14
|
-
inGrid?: boolean;
|
|
15
14
|
lang?: string;
|
|
16
15
|
renderContext?: RenderContext;
|
|
17
16
|
children?: ReactNode;
|
|
@@ -40,5 +39,5 @@ export declare const getCrop: (data: ImageEmbedData) => {
|
|
|
40
39
|
endX: number;
|
|
41
40
|
endY: number;
|
|
42
41
|
} | undefined;
|
|
43
|
-
declare const ImageEmbed: ({ embed, previewAlt,
|
|
42
|
+
declare const ImageEmbed: ({ embed, previewAlt, lang, renderContext, children }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
44
43
|
export default ImageEmbed;
|