@ndla/article-converter 10.0.18-alpha.0 → 10.0.20-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.
@@ -14,6 +14,7 @@ export const brightcoveEmbedPlugin = (element, _, opts) => {
14
14
  const data = JSON.parse(props["data-json"]);
15
15
  return _jsx(BrightcoveEmbed, {
16
16
  embed: data,
17
- renderContext: opts.renderContext
17
+ renderContext: opts.renderContext,
18
+ lang: opts.articleLanguage
18
19
  });
19
20
  };
@@ -15,6 +15,7 @@ export const conceptEmbedPlugin = (element, _, opts) => {
15
15
  return _jsx(ConceptEmbed, {
16
16
  embed: data,
17
17
  lang: opts.articleLanguage,
18
- renderContext: opts.renderContext
18
+ renderContext: opts.renderContext,
19
+ previewAlt: opts.previewAlt
19
20
  });
20
21
  };
@@ -7,11 +7,10 @@
7
7
  */
8
8
 
9
9
  import { attributesToProps, domToReact } from "html-react-parser";
10
- import { ArticleParagraph } from "@ndla/ui";
11
10
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
12
11
  export const paragraphPlugin = (node, converterOpts, opts) => {
13
12
  const props = attributesToProps(node.attribs);
14
- return _jsx(ArticleParagraph, {
13
+ return _jsx("p", {
15
14
  ...props,
16
15
  lang: opts.articleLanguage,
17
16
  children: domToReact(node.children, converterOpts)
@@ -20,7 +20,8 @@ const brightcoveEmbedPlugin = (element, _, opts) => {
20
20
  const data = JSON.parse(props["data-json"]);
21
21
  return (0, _jsxRuntime.jsx)(_ui.BrightcoveEmbed, {
22
22
  embed: data,
23
- renderContext: opts.renderContext
23
+ renderContext: opts.renderContext,
24
+ lang: opts.articleLanguage
24
25
  });
25
26
  };
26
27
  exports.brightcoveEmbedPlugin = brightcoveEmbedPlugin;
@@ -21,7 +21,8 @@ const conceptEmbedPlugin = (element, _, opts) => {
21
21
  return (0, _jsxRuntime.jsx)(_ui.ConceptEmbed, {
22
22
  embed: data,
23
23
  lang: opts.articleLanguage,
24
- renderContext: opts.renderContext
24
+ renderContext: opts.renderContext,
25
+ previewAlt: opts.previewAlt
25
26
  });
26
27
  };
27
28
  exports.conceptEmbedPlugin = conceptEmbedPlugin;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.paragraphPlugin = void 0;
7
7
  var _htmlReactParser = require("html-react-parser");
8
- var _ui = require("@ndla/ui");
9
8
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
9
  /**
11
10
  * Copyright (c) 2023-present, NDLA.
@@ -17,7 +16,7 @@ var _jsxRuntime = require("@emotion/react/jsx-runtime");
17
16
 
18
17
  const paragraphPlugin = (node, converterOpts, opts) => {
19
18
  const props = (0, _htmlReactParser.attributesToProps)(node.attribs);
20
- return (0, _jsxRuntime.jsx)(_ui.ArticleParagraph, {
19
+ return (0, _jsxRuntime.jsx)("p", {
21
20
  ...props,
22
21
  lang: opts.articleLanguage,
23
22
  children: (0, _htmlReactParser.domToReact)(node.children, converterOpts)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/article-converter",
3
- "version": "10.0.18-alpha.0",
3
+ "version": "10.0.20-alpha.0",
4
4
  "description": "Transforms NDLA articles into extended html versions",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,8 +31,8 @@
31
31
  "@ndla/types-embed": "^5.0.1-alpha.0"
32
32
  },
33
33
  "dependencies": {
34
- "@ndla/primitives": "^1.0.16-alpha.0",
35
- "@ndla/ui": "^56.0.18-alpha.0",
34
+ "@ndla/primitives": "^1.0.18-alpha.0",
35
+ "@ndla/ui": "^56.0.20-alpha.0",
36
36
  "html-react-parser": "^5.1.8"
37
37
  },
38
38
  "peerDependencies": {
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "77cd2b0c19a7631796405960ebf799f50e93b44c"
50
+ "gitHead": "66b3b382188ec1730fa409d4adb3672942f00670"
51
51
  }
@@ -14,5 +14,5 @@ import { PluginType } from "../types";
14
14
  export const brightcoveEmbedPlugin: PluginType = (element, _, opts) => {
15
15
  const props = attributesToProps(element.attribs);
16
16
  const data = JSON.parse(props["data-json"] as string) as BrightcoveMetaData;
17
- return <BrightcoveEmbed embed={data} renderContext={opts.renderContext} />;
17
+ return <BrightcoveEmbed embed={data} renderContext={opts.renderContext} lang={opts.articleLanguage} />;
18
18
  };
@@ -14,5 +14,12 @@ import { PluginType } from "../types";
14
14
  export const conceptEmbedPlugin: PluginType = (element, _, opts) => {
15
15
  const props = attributesToProps(element.attribs);
16
16
  const data = JSON.parse(props["data-json"] as string) as ConceptMetaData;
17
- return <ConceptEmbed embed={data} lang={opts.articleLanguage} renderContext={opts.renderContext} />;
17
+ return (
18
+ <ConceptEmbed
19
+ embed={data}
20
+ lang={opts.articleLanguage}
21
+ renderContext={opts.renderContext}
22
+ previewAlt={opts.previewAlt}
23
+ />
24
+ );
18
25
  };
@@ -7,14 +7,13 @@
7
7
  */
8
8
 
9
9
  import { DOMNode, attributesToProps, domToReact } from "html-react-parser";
10
- import { ArticleParagraph } from "@ndla/ui";
11
10
  import { PluginType } from "./types";
12
11
 
13
12
  export const paragraphPlugin: PluginType = (node, converterOpts, opts) => {
14
13
  const props = attributesToProps(node.attribs);
15
14
  return (
16
- <ArticleParagraph {...props} lang={opts.articleLanguage}>
15
+ <p {...props} lang={opts.articleLanguage}>
17
16
  {domToReact(node.children as DOMNode[], converterOpts)}
18
- </ArticleParagraph>
17
+ </p>
19
18
  );
20
19
  };