@ndla/article-converter 10.0.81-alpha.0 → 10.0.83-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.
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { Element, type HTMLReactParserOptions } from "html-react-parser";
9
9
  import type { RenderContext, CanonicalUrlFuncs, ContentType } from "@ndla/ui";
10
+ import type { ReactElement } from "react";
10
11
  export interface TransformOptions {
11
12
  isOembed?: boolean;
12
13
  subject?: string;
@@ -18,4 +19,4 @@ export interface TransformOptions {
18
19
  renderContext?: RenderContext;
19
20
  contentType?: ContentType;
20
21
  }
21
- export type PluginType = (element: Element, options: HTMLReactParserOptions, metaData: TransformOptions) => JSX.Element | undefined | null;
22
+ export type PluginType = (element: Element, options: HTMLReactParserOptions, metaData: TransformOptions) => ReactElement | undefined | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/article-converter",
3
- "version": "10.0.81-alpha.0",
3
+ "version": "10.0.83-alpha.0",
4
4
  "description": "Transforms NDLA articles into extended html versions",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -27,12 +27,12 @@
27
27
  "src"
28
28
  ],
29
29
  "devDependencies": {
30
- "@ndla/types-backend": "^0.2.86",
31
- "@ndla/types-embed": "^5.0.5-alpha.0"
30
+ "@ndla/types-backend": "^1.0.1",
31
+ "@ndla/types-embed": "^5.0.6-alpha.0"
32
32
  },
33
33
  "dependencies": {
34
- "@ndla/primitives": "^1.0.62-alpha.0",
35
- "@ndla/ui": "^56.0.78-alpha.0",
34
+ "@ndla/primitives": "^1.0.64-alpha.0",
35
+ "@ndla/ui": "^56.0.80-alpha.0",
36
36
  "html-react-parser": "^5.1.19"
37
37
  },
38
38
  "peerDependencies": {
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "fae121b0e1c9b7e12e46b4e9a90e2334389f30fa"
48
+ "gitHead": "a00bd799b55932a421bed0cf2ce8f364fbc7aefa"
49
49
  }
@@ -25,7 +25,7 @@ export const pitchEmbedPlugin: PluginType = (element, _, opts) => {
25
25
  path={opts.path}
26
26
  metaImage={{
27
27
  alt: alt ? alt : "",
28
- url: data.status === "success" ? data.data.metaImage?.image.imageUrl ?? errorSvgSrc : errorSvgSrc,
28
+ url: data.status === "success" ? (data.data.metaImage?.image.imageUrl ?? errorSvgSrc) : errorSvgSrc,
29
29
  }}
30
30
  />
31
31
  );
@@ -8,6 +8,7 @@
8
8
 
9
9
  import { Element, type HTMLReactParserOptions } from "html-react-parser";
10
10
  import type { RenderContext, CanonicalUrlFuncs, ContentType } from "@ndla/ui";
11
+ import type { ReactElement } from "react";
11
12
 
12
13
  export interface TransformOptions {
13
14
  isOembed?: boolean;
@@ -25,4 +26,4 @@ export type PluginType = (
25
26
  element: Element,
26
27
  options: HTMLReactParserOptions,
27
28
  metaData: TransformOptions,
28
- ) => JSX.Element | undefined | null;
29
+ ) => ReactElement | undefined | null;