@blocklet/discuss-kit 2.4.83 → 2.4.85

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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=require("@blocklet/discuss-kit-ux"),n=require("../api.js"),r=require("../lib/utils.js"),u=e=>{s.useEffect(()=>{const t=()=>{n.default.put(`/comments/topics/${e.id}`,{title:e.title,link:e.link}).catch(i=>{console.error(i)})};!c.utils.isInDiscussKitApp&&!r.isInIframe()&&t()},[])};exports.useTopicInfoSync=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),n=require("../api.js"),o=require("../lib/utils.js"),r=e=>{i.useEffect(()=>{const t=()=>{n.default.put(`/comments/topics/${e.id}`,{title:e.title,link:e.link}).catch(c=>{console.error(c)})};!window.blocklet.componentId?.endsWith("z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu")&&!o.isInIframe()&&t()},[])};exports.useTopicInfoSync=r;
@@ -1,20 +1,19 @@
1
- import { useEffect as r } from "react";
2
- import { utils as s } from "@blocklet/discuss-kit-ux";
1
+ import { useEffect as i } from "react";
3
2
  import c from "../api.js";
4
- import { isInIframe as e } from "../lib/utils.js";
5
- const l = (t) => {
6
- r(() => {
7
- const i = () => {
8
- c.put(`/comments/topics/${t.id}`, {
9
- title: t.title,
10
- link: t.link
11
- }).catch((o) => {
12
- console.error(o);
3
+ import { isInIframe as n } from "../lib/utils.js";
4
+ const s = (o) => {
5
+ i(() => {
6
+ const t = () => {
7
+ c.put(`/comments/topics/${o.id}`, {
8
+ title: o.title,
9
+ link: o.link
10
+ }).catch((e) => {
11
+ console.error(e);
13
12
  });
14
13
  };
15
- !s.isInDiscussKitApp && !e() && i();
14
+ !window.blocklet.componentId?.endsWith("z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu") && !n() && t();
16
15
  }, []);
17
16
  };
18
17
  export {
19
- l as useTopicInfoSync
18
+ s as useTopicInfoSync
20
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit",
3
- "version": "2.4.83",
3
+ "version": "2.4.85",
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.83",
53
- "@blocklet/editor": "2.4.83"
52
+ "@blocklet/discuss-kit-ux": "2.4.85",
53
+ "@blocklet/editor": "2.4.85"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@arcblock/did-connect-react": "^3.1.5",