@darajs/components 1.11.4 → 1.11.5

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.
@@ -33240,12 +33240,12 @@
33240
33240
  const { children: children2 } = props, rest = __rest$e(props, ["children"]);
33241
33241
  const match2 = /language-(\w+)/.exec(props.className || "");
33242
33242
  const parsed = React__namespace.useMemo(() => {
33243
- return String(children2).trim().replace(/\n\n/, "\n").replace(/\n$/, "");
33243
+ return String(children2).trim().replace(/\n\n/g, "\n");
33244
33244
  }, [children2]);
33245
33245
  if (!match2) {
33246
33246
  return jsxRuntime.exports.jsx("code", Object.assign({}, rest, { children: parsed }));
33247
33247
  }
33248
- return jsxRuntime.exports.jsx(CodeViewer, { value: parsed, language: match2[1], codeTheme: theme2.themeType === "dark" ? CodeComponentThemes.LIGHT : CodeComponentThemes.DARK });
33248
+ return jsxRuntime.exports.jsx(CodeViewer, { value: parsed, language: match2[1], style: { border: `1px solid ${theme2.colors.grey2}`, borderRadius: "0.25rem" }, codeTheme: theme2.themeType === "dark" ? CodeComponentThemes.DARK : CodeComponentThemes.LIGHT });
33249
33249
  }
33250
33250
  function Markdown$1(props) {
33251
33251
  var _a3;
@@ -37206,6 +37206,8 @@
37206
37206
  const MessageWrapper = styled__default.default.div`
37207
37207
  position: relative;
37208
37208
 
37209
+ display: flex;
37210
+ flex-direction: column;
37209
37211
  gap: 0.5rem;
37210
37212
 
37211
37213
  width: 100%;
@@ -37233,7 +37235,9 @@
37233
37235
  display: flex;
37234
37236
  flex-direction: column;
37235
37237
  gap: 0.5rem;
37238
+
37236
37239
  width: 100%;
37240
+
37237
37241
  color: ${(props) => props.theme.colors.text};
37238
37242
  overflow-wrap: break-word;
37239
37243
  `;
@@ -37243,6 +37247,7 @@
37243
37247
  color: ${(props) => props.theme.colors.grey4};
37244
37248
  `;
37245
37249
  const DeleteIcon = styled__default.default(Trash)`
37250
+ cursor: pointer;
37246
37251
  height: 0.8rem;
37247
37252
  color: ${(props) => props.theme.colors.secondary};
37248
37253
 
@@ -37255,6 +37260,7 @@
37255
37260
  }
37256
37261
  `;
37257
37262
  const EditIcon = styled__default.default(PenToSquare)`
37263
+ cursor: pointer;
37258
37264
  height: 0.8rem;
37259
37265
  color: ${(props) => props.theme.colors.secondary};
37260
37266
 
@@ -37426,9 +37432,13 @@
37426
37432
  const [reply, setReply] = React__namespace.useState("");
37427
37433
  const [localMessages, setLocalMessages] = React__namespace.useState((_a3 = props.value) !== null && _a3 !== void 0 ? _a3 : []);
37428
37434
  const chatBodyRef = React__namespace.useRef(null);
37435
+ const localMessagesRef = React__namespace.useRef(localMessages);
37436
+ React__namespace.useLayoutEffect(() => {
37437
+ localMessagesRef.current = localMessages;
37438
+ }, [localMessages]);
37429
37439
  React__namespace.useEffect(() => {
37430
37440
  var _a4;
37431
- if (!lodash$1.exports.isEqual(props.value, localMessages)) {
37441
+ if (!lodash$1.exports.isEqual(props.value, localMessagesRef.current)) {
37432
37442
  setLocalMessages((_a4 = props.value) !== null && _a4 !== void 0 ? _a4 : []);
37433
37443
  scrollToBottom(chatBodyRef === null || chatBodyRef === void 0 ? void 0 : chatBodyRef.current);
37434
37444
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darajs/components",
3
- "version": "1.11.4",
3
+ "version": "1.11.5",
4
4
  "description": "Components for the Dara framework",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -29,9 +29,9 @@
29
29
  "prettier": "@darajs/prettier-config",
30
30
  "devDependencies": {
31
31
  "@babel/core": "^7.23.5",
32
- "@darajs/eslint-config": "1.11.4",
33
- "@darajs/prettier-config": "1.11.4",
34
- "@darajs/stylelint-config": "1.11.4",
32
+ "@darajs/eslint-config": "1.11.5",
33
+ "@darajs/prettier-config": "1.11.5",
34
+ "@darajs/stylelint-config": "1.11.5",
35
35
  "@testing-library/react-hooks": "^3.4.2",
36
36
  "@types/lodash": "^4.14.155",
37
37
  "@types/react": "18.2.60",
@@ -54,14 +54,14 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@bokeh/bokehjs": "~3.1.1",
57
- "@darajs/core": "1.11.4",
58
- "@darajs/styled-components": "1.11.4",
59
- "@darajs/ui-causal-graph-editor": "1.11.4",
60
- "@darajs/ui-code-editor": "1.11.4",
61
- "@darajs/ui-components": "1.11.4",
62
- "@darajs/ui-hierarchy-viewer": "1.11.4",
63
- "@darajs/ui-icons": "1.11.4",
64
- "@darajs/ui-utils": "1.11.4",
57
+ "@darajs/core": "1.11.5",
58
+ "@darajs/styled-components": "1.11.5",
59
+ "@darajs/ui-causal-graph-editor": "1.11.5",
60
+ "@darajs/ui-code-editor": "1.11.5",
61
+ "@darajs/ui-components": "1.11.5",
62
+ "@darajs/ui-hierarchy-viewer": "1.11.5",
63
+ "@darajs/ui-icons": "1.11.5",
64
+ "@darajs/ui-utils": "1.11.5",
65
65
  "@popperjs/core": "2.4.0",
66
66
  "date-fns": "2.9.0",
67
67
  "immer": "^10.0.0",
@@ -84,5 +84,5 @@
84
84
  "publishConfig": {
85
85
  "access": "public"
86
86
  },
87
- "gitHead": "a9a34682a5d5b752a9b44170deae45718aa7f067"
87
+ "gitHead": "6a82b82da98140155725209010f2ff5a8cfa3fff"
88
88
  }