@blocklet/discuss-kit 2.1.241 → 2.1.243

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.
@@ -124,7 +124,9 @@ const DiscussKitComments = react.forwardRef(
124
124
  skeleton,
125
125
  placeholder,
126
126
  onInput,
127
- draftKey
127
+ draftKey,
128
+ inputSx,
129
+ editorRef
128
130
  }, ref) => {
129
131
  discussKitUx.useDefaultApiErrorHandler({
130
132
  request: api
@@ -201,6 +203,7 @@ const DiscussKitComments = react.forwardRef(
201
203
  return /* @__PURE__ */ jsxRuntime.jsx(
202
204
  discussKitUx.CommentInput,
203
205
  {
206
+ editorRef,
204
207
  placeholder,
205
208
  send: handleSendComment,
206
209
  draftKey: draftKey || `object-${object.id}`,
@@ -254,7 +257,7 @@ const DiscussKitComments = react.forwardRef(
254
257
  )
255
258
  ] }),
256
259
  /* @__PURE__ */ jsxRuntime.jsx(discussKitUx.CommentList, { className: "comment-list" }),
257
- session.user && interactive && commentInputPosition === "bottom" && /* @__PURE__ */ jsxRuntime.jsx(material.Box, { mt: 6, children: renderCommentInput() })
260
+ session.user && interactive && commentInputPosition === "bottom" && /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { mt: 6, ...inputSx }, children: renderCommentInput() })
258
261
  ] });
259
262
  }
260
263
  );
@@ -276,7 +279,9 @@ DiscussKitComments.propTypes = {
276
279
  skeleton: PropTypes.node,
277
280
  placeholder: PropTypes.string,
278
281
  onInput: PropTypes.func,
279
- draftKey: PropTypes.string
282
+ draftKey: PropTypes.string,
283
+ editorRef: PropTypes.object,
284
+ inputSx: PropTypes.object
280
285
  };
281
286
  DiscussKitComments.defaultProps = {
282
287
  displayConnectButton: false,
@@ -298,7 +303,9 @@ DiscussKitComments.defaultProps = {
298
303
  placeholder: "",
299
304
  onInput: () => {
300
305
  },
301
- draftKey: ""
306
+ draftKey: "",
307
+ editorRef: null,
308
+ inputSx: {}
302
309
  };
303
310
  function Wrapper({
304
311
  target,
@@ -123,7 +123,9 @@ const DiscussKitComments = forwardRef(
123
123
  skeleton,
124
124
  placeholder,
125
125
  onInput,
126
- draftKey
126
+ draftKey,
127
+ inputSx,
128
+ editorRef
127
129
  }, ref) => {
128
130
  useDefaultApiErrorHandler({
129
131
  request: api
@@ -200,6 +202,7 @@ const DiscussKitComments = forwardRef(
200
202
  return /* @__PURE__ */ jsx(
201
203
  CommentInput,
202
204
  {
205
+ editorRef,
203
206
  placeholder,
204
207
  send: handleSendComment,
205
208
  draftKey: draftKey || `object-${object.id}`,
@@ -253,7 +256,7 @@ const DiscussKitComments = forwardRef(
253
256
  )
254
257
  ] }),
255
258
  /* @__PURE__ */ jsx(CommentList, { className: "comment-list" }),
256
- session.user && interactive && commentInputPosition === "bottom" && /* @__PURE__ */ jsx(Box, { mt: 6, children: renderCommentInput() })
259
+ session.user && interactive && commentInputPosition === "bottom" && /* @__PURE__ */ jsx(Box, { sx: { mt: 6, ...inputSx }, children: renderCommentInput() })
257
260
  ] });
258
261
  }
259
262
  );
@@ -275,7 +278,9 @@ DiscussKitComments.propTypes = {
275
278
  skeleton: PropTypes.node,
276
279
  placeholder: PropTypes.string,
277
280
  onInput: PropTypes.func,
278
- draftKey: PropTypes.string
281
+ draftKey: PropTypes.string,
282
+ editorRef: PropTypes.object,
283
+ inputSx: PropTypes.object
279
284
  };
280
285
  DiscussKitComments.defaultProps = {
281
286
  displayConnectButton: false,
@@ -297,7 +302,9 @@ DiscussKitComments.defaultProps = {
297
302
  placeholder: "",
298
303
  onInput: () => {
299
304
  },
300
- draftKey: ""
305
+ draftKey: "",
306
+ editorRef: null,
307
+ inputSx: {}
301
308
  };
302
309
  function Wrapper({
303
310
  target,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit",
3
- "version": "2.1.241",
3
+ "version": "2.1.243",
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.1.241",
53
- "@blocklet/editor": "^2.1.241"
52
+ "@blocklet/discuss-kit-ux": "^2.1.243",
53
+ "@blocklet/editor": "^2.1.243"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@arcblock/did-connect": "^2.10.36",