@ttoss/components 1.29.20 → 1.29.21

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/esm/index.js CHANGED
@@ -214,6 +214,7 @@ var ToastContainer = props => {
214
214
  // src/components/Markdown.tsx
215
215
  import { BaseStyles } from "@ttoss/ui";
216
216
  import ReactMarkdown from "react-markdown";
217
+ import rehypeRaw from "rehype-raw";
217
218
  import remarkGfm from "remark-gfm";
218
219
  import { jsx as jsx5 } from "react/jsx-runtime";
219
220
  var Markdown = ({
@@ -224,7 +225,8 @@ var Markdown = ({
224
225
  return /* @__PURE__ */jsx5(BaseStyles, {
225
226
  sx,
226
227
  children: /* @__PURE__ */jsx5(ReactMarkdown, {
227
- plugins: [remarkGfm],
228
+ rehypePlugins: [rehypeRaw],
229
+ remarkPlugins: [remarkGfm],
228
230
  ...props,
229
231
  children
230
232
  })
package/dist/index.d.mts CHANGED
@@ -7,7 +7,7 @@ import { BoxProps, FlexProps } from '@ttoss/ui';
7
7
  import ReactModal from 'react-modal';
8
8
  import { ToastContainerProps } from 'react-toastify';
9
9
  export { ToastContainerProps, toast } from 'react-toastify';
10
- import { ReactMarkdownOptions } from 'react-markdown';
10
+ import { Options } from 'react-markdown';
11
11
 
12
12
  type AccordionProps = BoxProps & {
13
13
  allowMultipleExpanded?: boolean;
@@ -313,7 +313,7 @@ declare const Modal: {
313
313
 
314
314
  declare const ToastContainer: (props: ToastContainerProps) => react_jsx_runtime.JSX.Element;
315
315
 
316
- type MarkdownProps = ReactMarkdownOptions & {
316
+ type MarkdownProps = Options & {
317
317
  children: string;
318
318
  sx?: FlexProps['sx'];
319
319
  };
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { BoxProps, FlexProps } from '@ttoss/ui';
7
7
  import ReactModal from 'react-modal';
8
8
  import { ToastContainerProps } from 'react-toastify';
9
9
  export { ToastContainerProps, toast } from 'react-toastify';
10
- import { ReactMarkdownOptions } from 'react-markdown';
10
+ import { Options } from 'react-markdown';
11
11
 
12
12
  type AccordionProps = BoxProps & {
13
13
  allowMultipleExpanded?: boolean;
@@ -313,7 +313,7 @@ declare const Modal: {
313
313
 
314
314
  declare const ToastContainer: (props: ToastContainerProps) => react_jsx_runtime.JSX.Element;
315
315
 
316
- type MarkdownProps = ReactMarkdownOptions & {
316
+ type MarkdownProps = Options & {
317
317
  children: string;
318
318
  sx?: FlexProps['sx'];
319
319
  };
package/dist/index.js CHANGED
@@ -262,6 +262,7 @@ var ToastContainer = props => {
262
262
  // src/components/Markdown.tsx
263
263
  var import_ui5 = require("@ttoss/ui");
264
264
  var import_react_markdown = __toESM(require("react-markdown"));
265
+ var import_rehype_raw = __toESM(require("rehype-raw"));
265
266
  var import_remark_gfm = __toESM(require("remark-gfm"));
266
267
  var import_jsx_runtime5 = require("react/jsx-runtime");
267
268
  var Markdown = ({
@@ -272,7 +273,8 @@ var Markdown = ({
272
273
  return /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_ui5.BaseStyles, {
273
274
  sx,
274
275
  children: /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_react_markdown.default, {
275
- plugins: [import_remark_gfm.default],
276
+ rehypePlugins: [import_rehype_raw.default],
277
+ remarkPlugins: [import_remark_gfm.default],
276
278
  ...props,
277
279
  children
278
280
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "1.29.20",
3
+ "version": "1.29.21",
4
4
  "description": "React components for ttoss ecosystem.",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -24,10 +24,11 @@
24
24
  "@theme-ui/css": "^0.15.7",
25
25
  "@types/react-modal": "^3.16.0",
26
26
  "react-accessible-accordion": "^5.0.0",
27
- "react-markdown": "6.0.0",
27
+ "react-markdown": "^9.0.0",
28
28
  "react-modal": "^3.16.1",
29
29
  "react-toastify": "^9.1.3",
30
- "remark-gfm": "1.0.0"
30
+ "rehype-raw": "^7.0.0",
31
+ "remark-gfm": "^4.0.0"
31
32
  },
32
33
  "peerDependencies": {
33
34
  "react": ">=16.8.0",
@@ -1,8 +1,9 @@
1
1
  import { BaseStyles, FlexProps } from '@ttoss/ui';
2
- import ReactMarkdown, { ReactMarkdownOptions } from 'react-markdown';
2
+ import ReactMarkdown, { Options } from 'react-markdown';
3
+ import rehypeRaw from 'rehype-raw';
3
4
  import remarkGfm from 'remark-gfm';
4
5
 
5
- export type MarkdownProps = ReactMarkdownOptions & {
6
+ export type MarkdownProps = Options & {
6
7
  children: string;
7
8
  sx?: FlexProps['sx'];
8
9
  };
@@ -10,7 +11,11 @@ export type MarkdownProps = ReactMarkdownOptions & {
10
11
  export const Markdown = ({ children, sx, ...props }: MarkdownProps) => {
11
12
  return (
12
13
  <BaseStyles sx={sx}>
13
- <ReactMarkdown plugins={[remarkGfm]} {...props}>
14
+ <ReactMarkdown
15
+ rehypePlugins={[rehypeRaw]}
16
+ remarkPlugins={[remarkGfm]}
17
+ {...props}
18
+ >
14
19
  {children}
15
20
  </ReactMarkdown>
16
21
  </BaseStyles>