@blocklet/discuss-kit 1.0.12 → 1.0.13

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # DID Comment React Component
1
+ # Discuss Kit React Component
2
2
 
3
- A react component for DID Comments blocklet.
3
+ A react component for Discuss Kit blocklet.
4
4
 
5
5
  ## Install
6
6
 
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  const utils = require("@arcblock/did-connect/lib/utils");
3
- const DIDComment = require("./did-comment");
3
+ const Comments = require("./comments");
4
4
  const session = require("./session");
5
5
  const jsxRuntime = require("react/jsx-runtime");
6
6
  const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
7
- const DIDComment__default = /* @__PURE__ */ _interopDefaultLegacy(DIDComment);
8
- const DIDCommentHOC = (WrappedComponent) => {
7
+ const Comments__default = /* @__PURE__ */ _interopDefaultLegacy(Comments);
8
+ const CommentsHOC = (WrappedComponent) => {
9
9
  const webWalletUrl = utils.getWebWalletUrl();
10
10
  return function(props) {
11
11
  return /* @__PURE__ */ jsxRuntime.jsx(session.SessionProvider, {
@@ -21,5 +21,5 @@ const DIDCommentHOC = (WrappedComponent) => {
21
21
  });
22
22
  };
23
23
  };
24
- const didCommentWithSession = DIDCommentHOC(DIDComment__default.default);
25
- module.exports = didCommentWithSession;
24
+ const commentsWithSession = CommentsHOC(Comments__default.default);
25
+ module.exports = commentsWithSession;
@@ -125,7 +125,7 @@ const commentAPI = {
125
125
  return data;
126
126
  }
127
127
  };
128
- function DIDComment({
128
+ function DiscussKitComments({
129
129
  showConnectBtn,
130
130
  object,
131
131
  onChange
@@ -280,12 +280,12 @@ function DIDComment({
280
280
  }), /* @__PURE__ */ jsxRuntime.jsx(discussKitUx.CommentList, {})]
281
281
  });
282
282
  }
283
- DIDComment.propTypes = {
283
+ DiscussKitComments.propTypes = {
284
284
  showConnectBtn: PropTypes__default.default.bool,
285
285
  object: PropTypes__default.default.object.isRequired,
286
286
  onChange: PropTypes__default.default.func
287
287
  };
288
- DIDComment.defaultProps = {
288
+ DiscussKitComments.defaultProps = {
289
289
  showConnectBtn: false,
290
290
  onChange: () => {
291
291
  }
@@ -342,7 +342,7 @@ function Wrapper({
342
342
  target: object,
343
343
  api: commentAPI,
344
344
  flatView,
345
- children: /* @__PURE__ */ jsxRuntime.jsx(DIDComment, {
345
+ children: /* @__PURE__ */ jsxRuntime.jsx(DiscussKitComments, {
346
346
  ...rest,
347
347
  object
348
348
  })
@@ -17,7 +17,7 @@ function ErrorFallback({
17
17
  severity: "warning",
18
18
  children: [/* @__PURE__ */ jsxRuntime.jsx(AlertTitle__default.default, {
19
19
  children: "Oops!"
20
- }), "DID Comments is not working properly.", errorMessageElement]
20
+ }), "Discuss Kit is not working properly.", errorMessageElement]
21
21
  });
22
22
  }
23
23
  ErrorFallback.propTypes = {
package/lib/cjs/index.js CHANGED
@@ -1,25 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const didComment = require("./did-comment");
4
- const didCommentWithSession = require("./did-comment-with-session");
5
3
  const themeProvider = require("./theme-provider");
4
+ const comments = require("./comments");
5
+ const commentsWithSession = require("./comments-with-session");
6
6
  const uploadProvider = require("./components/upload-provider");
7
7
  const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
8
- const didComment__default = /* @__PURE__ */ _interopDefaultLegacy(didComment);
9
- const didCommentWithSession__default = /* @__PURE__ */ _interopDefaultLegacy(didCommentWithSession);
10
8
  const themeProvider__default = /* @__PURE__ */ _interopDefaultLegacy(themeProvider);
9
+ const comments__default = /* @__PURE__ */ _interopDefaultLegacy(comments);
10
+ const commentsWithSession__default = /* @__PURE__ */ _interopDefaultLegacy(commentsWithSession);
11
11
  const uploadProvider__default = /* @__PURE__ */ _interopDefaultLegacy(uploadProvider);
12
- Object.defineProperty(exports, "DIDComment", {
12
+ Object.defineProperty(exports, "ThemeProvider", {
13
13
  enumerable: true,
14
- get: () => didComment__default.default
14
+ get: () => themeProvider__default.default
15
15
  });
16
- Object.defineProperty(exports, "DIDCommentWithSession", {
16
+ Object.defineProperty(exports, "Comments", {
17
17
  enumerable: true,
18
- get: () => didCommentWithSession__default.default
18
+ get: () => comments__default.default
19
19
  });
20
- Object.defineProperty(exports, "ThemeProvider", {
20
+ Object.defineProperty(exports, "CommentsWithSession", {
21
21
  enumerable: true,
22
- get: () => themeProvider__default.default
22
+ get: () => commentsWithSession__default.default
23
23
  });
24
24
  Object.defineProperty(exports, "UploadProvider", {
25
25
  enumerable: true,
@@ -5,7 +5,7 @@ const flat__default = /* @__PURE__ */ _interopDefaultLegacy(flat);
5
5
  const en = flat__default.default({
6
6
  comments: "Comments",
7
7
  comment: "Comment",
8
- poweredBy: "- powered by DID Comments",
8
+ poweredBy: "- powered by Discuss Kit",
9
9
  connect: "Connect",
10
10
  inputPlaceHolder: "Write a comment",
11
11
  oldest: "Oldest",
@@ -5,7 +5,7 @@ const flat__default = /* @__PURE__ */ _interopDefaultLegacy(flat);
5
5
  const zh = flat__default.default({
6
6
  comments: "\u6761\u8BC4\u8BBA",
7
7
  comment: "\u8BC4\u8BBA",
8
- poweredBy: "- \u7531 DID Comments \u63D0\u4F9B\u652F\u6301",
8
+ poweredBy: "- \u7531 Discuss Kit \u63D0\u4F9B\u652F\u6301",
9
9
  connect: "\u8FDE\u63A5",
10
10
  inputPlaceHolder: "\u5199\u8BC4\u8BBA",
11
11
  oldest: "\u6700\u65E7",
@@ -1,8 +1,8 @@
1
1
  import { getWebWalletUrl } from "@arcblock/did-connect/lib/utils";
2
- import DIDComment from "./did-comment";
2
+ import Comments from "./comments";
3
3
  import { SessionProvider } from "./session";
4
4
  import { jsx } from "react/jsx-runtime";
5
- const DIDCommentHOC = (WrappedComponent) => {
5
+ const CommentsHOC = (WrappedComponent) => {
6
6
  const webWalletUrl = getWebWalletUrl();
7
7
  return function(props) {
8
8
  return /* @__PURE__ */ jsx(SessionProvider, {
@@ -18,7 +18,7 @@ const DIDCommentHOC = (WrappedComponent) => {
18
18
  });
19
19
  };
20
20
  };
21
- const didCommentWithSession = DIDCommentHOC(DIDComment);
21
+ const commentsWithSession = CommentsHOC(Comments);
22
22
  export {
23
- didCommentWithSession as default
23
+ commentsWithSession as default
24
24
  };
@@ -111,7 +111,7 @@ const commentAPI = {
111
111
  return data;
112
112
  }
113
113
  };
114
- function DIDComment({
114
+ function DiscussKitComments({
115
115
  showConnectBtn,
116
116
  object,
117
117
  onChange
@@ -266,12 +266,12 @@ function DIDComment({
266
266
  }), /* @__PURE__ */ jsx(CommentList, {})]
267
267
  });
268
268
  }
269
- DIDComment.propTypes = {
269
+ DiscussKitComments.propTypes = {
270
270
  showConnectBtn: PropTypes.bool,
271
271
  object: PropTypes.object.isRequired,
272
272
  onChange: PropTypes.func
273
273
  };
274
- DIDComment.defaultProps = {
274
+ DiscussKitComments.defaultProps = {
275
275
  showConnectBtn: false,
276
276
  onChange: () => {
277
277
  }
@@ -328,7 +328,7 @@ function Wrapper({
328
328
  target: object,
329
329
  api: commentAPI,
330
330
  flatView,
331
- children: /* @__PURE__ */ jsx(DIDComment, {
331
+ children: /* @__PURE__ */ jsx(DiscussKitComments, {
332
332
  ...rest,
333
333
  object
334
334
  })
@@ -12,7 +12,7 @@ function ErrorFallback({
12
12
  severity: "warning",
13
13
  children: [/* @__PURE__ */ jsx(AlertTitle, {
14
14
  children: "Oops!"
15
- }), "DID Comments is not working properly.", errorMessageElement]
15
+ }), "Discuss Kit is not working properly.", errorMessageElement]
16
16
  });
17
17
  }
18
18
  ErrorFallback.propTypes = {
package/lib/es/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { default as default2 } from "./did-comment";
2
- import { default as default3 } from "./did-comment-with-session";
3
- import { default as default4 } from "./theme-provider";
1
+ import { default as default2 } from "./theme-provider";
2
+ import { default as default3 } from "./comments";
3
+ import { default as default4 } from "./comments-with-session";
4
4
  import { default as default5 } from "./components/upload-provider";
5
5
  export {
6
- default2 as DIDComment,
7
- default3 as DIDCommentWithSession,
8
- default4 as ThemeProvider,
6
+ default3 as Comments,
7
+ default4 as CommentsWithSession,
8
+ default2 as ThemeProvider,
9
9
  default5 as UploadProvider
10
10
  };
@@ -2,7 +2,7 @@ import flat from "flat";
2
2
  const en = flat({
3
3
  comments: "Comments",
4
4
  comment: "Comment",
5
- poweredBy: "- powered by DID Comments",
5
+ poweredBy: "- powered by Discuss Kit",
6
6
  connect: "Connect",
7
7
  inputPlaceHolder: "Write a comment",
8
8
  oldest: "Oldest",
@@ -2,7 +2,7 @@ import flat from "flat";
2
2
  const zh = flat({
3
3
  comments: "\u6761\u8BC4\u8BBA",
4
4
  comment: "\u8BC4\u8BBA",
5
- poweredBy: "- \u7531 DID Comments \u63D0\u4F9B\u652F\u6301",
5
+ poweredBy: "- \u7531 Discuss Kit \u63D0\u4F9B\u652F\u6301",
6
6
  connect: "\u8FDE\u63A5",
7
7
  inputPlaceHolder: "\u5199\u8BC4\u8BBA",
8
8
  oldest: "\u6700\u65E7",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit",
3
- "version": "1.0.12",
4
- "description": "A react component for DID Comments blocklet.",
3
+ "version": "1.0.13",
4
+ "description": "A react component for Discuss Kit blocklet.",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/es/index.js",
7
7
  "typings": "./lib/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "@arcblock/did-connect": "^2.4.57",
38
38
  "@arcblock/ux": "^2.4.57",
39
39
  "@arcblock/ws": "^1.18.30",
40
- "@blocklet/discuss-kit-ux": "1.0.12",
40
+ "@blocklet/discuss-kit-ux": "1.0.13",
41
41
  "@blocklet/editor": "^0.0.10",
42
42
  "@emotion/react": "^11.10.5",
43
43
  "@emotion/styled": "^11.10.5",
@@ -77,5 +77,5 @@
77
77
  "vite-plugin-build": "^0.6.0",
78
78
  "vite-plugin-svgr": "^2.2.2"
79
79
  },
80
- "gitHead": "0ff93c4c300d6ef849bec08ce79def6fd39dc728"
80
+ "gitHead": "c197cdf796a17b66fd6c031ca86d39c6efe7c710"
81
81
  }