@blocklet/discuss-kit 1.5.50 → 1.5.52

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.
@@ -328,6 +328,8 @@ function Wrapper({
328
328
  flatView,
329
329
  autoCollapse,
330
330
  order,
331
+ allowCopyLink,
332
+ showProfileCard,
331
333
  ...rest
332
334
  }) {
333
335
  if (!(target == null ? void 0 : target.id)) {
@@ -336,13 +338,6 @@ function Wrapper({
336
338
  const {
337
339
  locale = "en"
338
340
  } = context.useLocaleContext() || {};
339
- const [, setSettings] = discussKitUx.useCommentSettings();
340
- react.useEffect(() => {
341
- setSettings((prev) => ({
342
- ...prev,
343
- autoCollapse
344
- }));
345
- }, [autoCollapse, setSettings]);
346
341
  const object = react.useMemo(
347
342
  () => ({
348
343
  ...target,
@@ -378,6 +373,9 @@ function Wrapper({
378
373
  api: commentAPI,
379
374
  flatView,
380
375
  order,
376
+ autoCollapse,
377
+ allowCopyLink,
378
+ showProfileCard,
381
379
  children: /* @__PURE__ */ jsxRuntime.jsx(DiscussKitComments, {
382
380
  ...rest,
383
381
  object
@@ -401,6 +399,8 @@ Wrapper.propTypes = {
401
399
  prefix: PropTypes__default.default.string,
402
400
  flatView: PropTypes__default.default.bool,
403
401
  autoCollapse: PropTypes__default.default.bool,
402
+ allowCopyLink: PropTypes__default.default.bool,
403
+ showProfileCard: PropTypes__default.default.bool,
404
404
  order: PropTypes__default.default.oneOf(["asc", "desc"])
405
405
  };
406
406
  Wrapper.defaultProps = {
@@ -411,6 +411,8 @@ Wrapper.defaultProps = {
411
411
  prefix: "",
412
412
  flatView: false,
413
413
  autoCollapse: false,
414
+ allowCopyLink: false,
415
+ showProfileCard: false,
414
416
  order: void 0
415
417
  };
416
418
  const Container = Theme.styled("div")`
@@ -1,4 +1,4 @@
1
- import { useEffect, useMemo, useContext } from "react";
1
+ import { useMemo, useEffect, useContext } from "react";
2
2
  import { styled } from "@arcblock/ux/lib/Theme";
3
3
  import joinUrl from "url-join";
4
4
  import PropTypes from "prop-types";
@@ -11,7 +11,7 @@ import CircularProgress from "@mui/material/CircularProgress";
11
11
  import ButtonGroup from "@mui/material/ButtonGroup";
12
12
  import { useLocaleContext, LocaleProvider } from "@arcblock/ux/lib/Locale/context";
13
13
  import { ErrorBoundary } from "react-error-boundary";
14
- import { useCommentSettings, InternalThemeProvider, DefaultEditorConfigProvider, CommentsProvider, useCommentsContext, BinaryThumb, CommentInput, CommentList } from "@blocklet/discuss-kit-ux";
14
+ import { InternalThemeProvider, DefaultEditorConfigProvider, CommentsProvider, useCommentsContext, BinaryThumb, CommentInput, CommentList } from "@blocklet/discuss-kit-ux";
15
15
  import ErrorFallback from "./components/error-fallback";
16
16
  import { translations } from "./locales";
17
17
  import getWsClient, { useSubscription } from "./ws";
@@ -315,6 +315,8 @@ function Wrapper({
315
315
  flatView,
316
316
  autoCollapse,
317
317
  order,
318
+ allowCopyLink,
319
+ showProfileCard,
318
320
  ...rest
319
321
  }) {
320
322
  if (!(target == null ? void 0 : target.id)) {
@@ -323,13 +325,6 @@ function Wrapper({
323
325
  const {
324
326
  locale = "en"
325
327
  } = useLocaleContext() || {};
326
- const [, setSettings] = useCommentSettings();
327
- useEffect(() => {
328
- setSettings((prev) => ({
329
- ...prev,
330
- autoCollapse
331
- }));
332
- }, [autoCollapse, setSettings]);
333
328
  const object = useMemo(
334
329
  () => ({
335
330
  ...target,
@@ -365,6 +360,9 @@ function Wrapper({
365
360
  api: commentAPI,
366
361
  flatView,
367
362
  order,
363
+ autoCollapse,
364
+ allowCopyLink,
365
+ showProfileCard,
368
366
  children: /* @__PURE__ */ jsx(DiscussKitComments, {
369
367
  ...rest,
370
368
  object
@@ -388,6 +386,8 @@ Wrapper.propTypes = {
388
386
  prefix: PropTypes.string,
389
387
  flatView: PropTypes.bool,
390
388
  autoCollapse: PropTypes.bool,
389
+ allowCopyLink: PropTypes.bool,
390
+ showProfileCard: PropTypes.bool,
391
391
  order: PropTypes.oneOf(["asc", "desc"])
392
392
  };
393
393
  Wrapper.defaultProps = {
@@ -398,6 +398,8 @@ Wrapper.defaultProps = {
398
398
  prefix: "",
399
399
  flatView: false,
400
400
  autoCollapse: false,
401
+ allowCopyLink: false,
402
+ showProfileCard: false,
401
403
  order: void 0
402
404
  };
403
405
  const Container = styled("div")`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit",
3
- "version": "1.5.50",
3
+ "version": "1.5.52",
4
4
  "description": "A react component for Discuss Kit blocklet.",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/es/index.js",
@@ -34,11 +34,11 @@
34
34
  "author": "Nate <nate@arcblock.io> (http://github.com/NateRobinson)",
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "@arcblock/did-connect": "^2.7.7",
38
- "@arcblock/ux": "^2.7.7",
37
+ "@arcblock/did-connect": "^2.7.8",
38
+ "@arcblock/ux": "^2.7.8",
39
39
  "@arcblock/ws": "^1.18.89",
40
- "@blocklet/discuss-kit-ux": "1.5.50",
41
- "@blocklet/editor": "1.5.50",
40
+ "@blocklet/discuss-kit-ux": "1.5.52",
41
+ "@blocklet/editor": "1.5.52",
42
42
  "@emotion/react": "^11.10.5",
43
43
  "@emotion/styled": "^11.10.5",
44
44
  "@mui/icons-material": "^5.14.3",
@@ -77,5 +77,5 @@
77
77
  "vite-plugin-build": "^0.7.1",
78
78
  "vite-plugin-svgr": "^2.2.2"
79
79
  },
80
- "gitHead": "37cfcf0b0d80ae2f535ae818bd9e6a06162a5453"
80
+ "gitHead": "1cbeec970db185524575203c94a225315ba531a3"
81
81
  }