@blocklet/discuss-kit 2.4.108 → 2.4.109
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
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),l=require("prop-types"),a=require("@mui/material/Alert"),u=require("@mui/material/AlertTitle"),p=require("@mui/material/Button"),d=require("@mui/material/Collapse"),x=require("@mui/material/Box");function o({error:r}){const[t,n]=i.useState(!1),s=r?.stack||r?.message;return i.useEffect(()=>{console.error(r)},[r]),e.jsxs(a,{severity:"warning",action:s?e.jsx(p,{color:"inherit",size:"small",onClick:()=>n(c=>!c),children:t?"Hide details":"Show details"}):void 0,sx:{".MuiAlert-action":{flex:"0 0 auto"}},children:[e.jsx(u,{children:"Oops!"}),"Discuss Kit is not working properly.",s&&e.jsx(d,{in:t,children:e.jsx(x,{component:"pre",sx:{mt:1,mb:0,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:s})})]})}o.propTypes={error:l.instanceOf(Error).isRequired};module.exports=o;
|
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useEffect as p } from "react";
|
|
3
|
+
import a from "prop-types";
|
|
4
|
+
import m from "@mui/material/Alert";
|
|
5
|
+
import c from "@mui/material/AlertTitle";
|
|
6
|
+
import d from "@mui/material/Button";
|
|
7
|
+
import f from "@mui/material/Collapse";
|
|
8
|
+
import u from "@mui/material/Box";
|
|
9
|
+
function x({ error: r }) {
|
|
10
|
+
const [i, t] = l(!1), o = r?.stack || r?.message;
|
|
11
|
+
return p(() => {
|
|
12
|
+
console.error(r);
|
|
13
|
+
}, [r]), /* @__PURE__ */ n(
|
|
14
|
+
m,
|
|
15
|
+
{
|
|
16
|
+
severity: "warning",
|
|
17
|
+
action: o ? /* @__PURE__ */ e(d, { color: "inherit", size: "small", onClick: () => t((s) => !s), children: i ? "Hide details" : "Show details" }) : void 0,
|
|
18
|
+
sx: { ".MuiAlert-action": { flex: "0 0 auto" } },
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ e(c, { children: "Oops!" }),
|
|
21
|
+
"Discuss Kit is not working properly.",
|
|
22
|
+
o && /* @__PURE__ */ e(f, { in: i, children: /* @__PURE__ */ e(u, { component: "pre", sx: { mt: 1, mb: 0, whiteSpace: "pre-wrap", wordBreak: "break-word" }, children: o }) })
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
);
|
|
12
26
|
}
|
|
13
|
-
|
|
14
|
-
error:
|
|
27
|
+
x.propTypes = {
|
|
28
|
+
error: a.instanceOf(Error).isRequired
|
|
15
29
|
};
|
|
16
30
|
export {
|
|
17
|
-
|
|
31
|
+
x as default
|
|
18
32
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.109",
|
|
4
4
|
"description": "A react component for Discuss Kit blocklet.",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/es/index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"rehype-sanitize": "^5.0.1",
|
|
50
50
|
"timeago.js": "^4.0.2",
|
|
51
51
|
"url-join": "^4.0.1",
|
|
52
|
-
"@blocklet/discuss-kit-ux": "2.4.
|
|
53
|
-
"@blocklet/editor": "2.4.
|
|
52
|
+
"@blocklet/discuss-kit-ux": "2.4.109",
|
|
53
|
+
"@blocklet/editor": "2.4.109"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@arcblock/did-connect-react": "^3.1.5",
|