@gisce/react-ooui 2.0.0-alpha.24 → 2.0.0-alpha.25

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Markdown.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,QAAQ,UAAW,WAAW,4CAM1C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,GAAG,4CAYvC,CAAC"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Markdown.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,QAAQ,UAAW,WAAW,4CAM1C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,GAAG,4CAiBvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "2.0.0-alpha.24",
3
+ "version": "2.0.0-alpha.25",
4
4
  "engines": {
5
5
  "node": "20.5.0"
6
6
  },
@@ -48,8 +48,9 @@
48
48
  "react-dom": "18.2.0",
49
49
  "react-grid-layout": "^1.3.4",
50
50
  "react-hotkeys-hook": "^3.4.4",
51
- "react-markdown": "^8.0.7",
51
+ "react-markdown": "^9.0.0",
52
52
  "react-measure": "^2.5.2",
53
+ "remark-gfm": "^4.0.0",
53
54
  "styled-components": "5.3.5",
54
55
  "use-deep-compare-effect": "^1.8.1",
55
56
  "uuid": "^9.0.1",
@@ -2,6 +2,7 @@ import Field from "@/common/Field";
2
2
  import ReactMarkdown from "react-markdown";
3
3
  import React from "react";
4
4
  import { WidgetProps } from "@/types";
5
+ import remarkGfm from "remark-gfm";
5
6
 
6
7
  export const Markdown = (props: WidgetProps) => {
7
8
  return (
@@ -16,11 +17,16 @@ export const MarkdownInput = (props: any) => {
16
17
  return (
17
18
  <div
18
19
  style={{
19
- height: ooui.height ? ooui.height + "px" : "100%",
20
+ height: ooui?.height ? ooui.height + "px" : "100%",
20
21
  overflow: "auto",
21
22
  }}
22
23
  >
23
- <ReactMarkdown children={value} className="ant-typography" />
24
+ <ReactMarkdown
25
+ remarkPlugins={[remarkGfm]}
26
+ className="markdown-typography"
27
+ >
28
+ {value}
29
+ </ReactMarkdown>
24
30
  </div>
25
31
  );
26
32
  };