@vokality/design-system 6.0.1 → 6.0.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to `@vokality/design-system`. The package follows [semantic versioning](https://semver.org); see CONTRIBUTING.md for what counts as breaking.
4
4
 
5
+ ## 6.0.2 — 2026-10-26
6
+
7
+ ### Fixed
8
+ - Chat messages render formatted React content with normal HTML whitespace, preventing Markdown renderer newline nodes from adding empty lines around paragraphs and list items. Plain message strings retain their line breaks, and preformatted code and read-only editors retain their own whitespace.
9
+
5
10
  ## 6.0.1 — 2026-10-26
6
11
 
7
12
  ### Fixed
@@ -19,7 +19,7 @@ function MessageDelivery({ message, onRetry }) {
19
19
  return (_jsxs("div", { className: "vk-chat-delivery vk-chat-delivery-failed", children: [_jsx(Icon, { name: "circle-alert", size: 14 }), _jsx("span", { children: message.delivery.error || messages.chat.failed }), onRetry ? _jsx(Button, { type: "button", size: "sm", variant: "ghost", "aria-label": messages.chat.retryMessage(message.author.name), onClick: () => { onRetry(message.id); }, children: messages.chat.retry }) : null] }));
20
20
  }
21
21
  function MessageItem({ message, onRetry, reducedMotion }) {
22
- return (_jsxs(m.li, { className: cx("vk-chat-message", "vk-chat-message-" + message.direction), initial: { opacity: 0, y: reducedMotion ? 0 : 4 }, animate: { opacity: 1, y: 0 }, transition: { duration: reducedMotion ? 0 : 0.16, ease: "easeOut" }, children: [_jsx("span", { className: "vk-chat-message-avatar", children: message.author.avatar || _jsx(Avatar, { name: message.author.name, size: 28, decorative: true }) }), _jsxs("div", { className: "vk-chat-message-body", children: [_jsxs("div", { className: "vk-chat-message-meta", children: [_jsx("span", { className: "vk-chat-message-author", children: message.author.name }), message.author.source ? _jsxs("span", { className: "vk-chat-message-source", children: [message.author.source.mark, message.author.source.label] }) : null, message.timestamp ? _jsx("span", { className: "vk-chat-message-time", children: message.timestamp }) : null] }), _jsx("div", { className: "vk-prose vk-chat-message-content", children: message.content }), _jsx(MessageDelivery, { message: message, onRetry: onRetry })] }), message.actions?.length ? _jsx("div", { className: "vk-chat-message-actions", children: message.actions.map((action) => _jsx(Button, { type: "button", size: "xs", variant: action.variant || "outline", color: action.color, disabled: action.disabled, onClick: action.onSelect, children: action.label }, action.id)) }) : null] }));
22
+ return (_jsxs(m.li, { className: cx("vk-chat-message", "vk-chat-message-" + message.direction), initial: { opacity: 0, y: reducedMotion ? 0 : 4 }, animate: { opacity: 1, y: 0 }, transition: { duration: reducedMotion ? 0 : 0.16, ease: "easeOut" }, children: [_jsx("span", { className: "vk-chat-message-avatar", children: message.author.avatar || _jsx(Avatar, { name: message.author.name, size: 28, decorative: true }) }), _jsxs("div", { className: "vk-chat-message-body", children: [_jsxs("div", { className: "vk-chat-message-meta", children: [_jsx("span", { className: "vk-chat-message-author", children: message.author.name }), message.author.source ? _jsxs("span", { className: "vk-chat-message-source", children: [message.author.source.mark, message.author.source.label] }) : null, message.timestamp ? _jsx("span", { className: "vk-chat-message-time", children: message.timestamp }) : null] }), _jsx("div", { className: cx("vk-prose vk-chat-message-content", typeof message.content === "string" && "vk-chat-message-text"), children: message.content }), _jsx(MessageDelivery, { message: message, onRetry: onRetry })] }), message.actions?.length ? _jsx("div", { className: "vk-chat-message-actions", children: message.actions.map((action) => _jsx(Button, { type: "button", size: "xs", variant: action.variant || "outline", color: action.color, disabled: action.disabled, onClick: action.onSelect, children: action.label }, action.id)) }) : null] }));
23
23
  }
24
24
  /** A native scrollable log of messages and agent runs. Follow new items only while the reader is near its end. */
25
25
  export function ChatTranscript(props) {
@@ -2079,7 +2079,8 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-bl
2079
2079
  .vk-chat-message-source { display: inline-flex; align-items: center; gap: var(--space-xs); padding-inline: var(--space-xs); border: 1px solid var(--border-subtle); font-size: var(--text-xs); line-height: 1.5; color: var(--muted-foreground); overflow-wrap: anywhere; }
2080
2080
  .vk-chat-message-source > svg, .vk-chat-message-source > img { flex: none; width: 0.75rem; height: 0.75rem; }
2081
2081
  .vk-chat-message-time { font: var(--text-xs)/1.5 var(--font-numeric); font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
2082
- .vk-chat-message-content { min-width: 0; max-width: none; font-size: var(--text-sm); color: var(--foreground); white-space: pre-wrap; overflow-wrap: anywhere; }
2082
+ .vk-chat-message-content { min-width: 0; max-width: none; font-size: var(--text-sm); color: var(--foreground); white-space: normal; overflow-wrap: anywhere; }
2083
+ .vk-chat-message-text { white-space: pre-wrap; }
2083
2084
  .vk-chat-message-content > :last-child { margin-bottom: 0; }
2084
2085
  .vk-chat-message-content pre { max-width: 100%; box-sizing: border-box; white-space: pre; }
2085
2086
  .vk-chat-message-content img { max-width: 100%; height: auto; }
package/dist/vokality.css CHANGED
@@ -2425,7 +2425,8 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-bl
2425
2425
  .vk-chat-message-source { display: inline-flex; align-items: center; gap: var(--space-xs); padding-inline: var(--space-xs); border: 1px solid var(--border-subtle); font-size: var(--text-xs); line-height: 1.5; color: var(--muted-foreground); overflow-wrap: anywhere; }
2426
2426
  .vk-chat-message-source > svg, .vk-chat-message-source > img { flex: none; width: 0.75rem; height: 0.75rem; }
2427
2427
  .vk-chat-message-time { font: var(--text-xs)/1.5 var(--font-numeric); font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
2428
- .vk-chat-message-content { min-width: 0; max-width: none; font-size: var(--text-sm); color: var(--foreground); white-space: pre-wrap; overflow-wrap: anywhere; }
2428
+ .vk-chat-message-content { min-width: 0; max-width: none; font-size: var(--text-sm); color: var(--foreground); white-space: normal; overflow-wrap: anywhere; }
2429
+ .vk-chat-message-text { white-space: pre-wrap; }
2429
2430
  .vk-chat-message-content > :last-child { margin-bottom: 0; }
2430
2431
  .vk-chat-message-content pre { max-width: 100%; box-sizing: border-box; white-space: pre; }
2431
2432
  .vk-chat-message-content img { max-width: 100%; height: auto; }
@@ -45843,7 +45843,7 @@ Defaulting to \`null\`.`;
45843
45843
  ]
45844
45844
  }, undefined, true, undefined, this),
45845
45845
  /* @__PURE__ */ jsx_dev_runtime90.jsxDEV("div", {
45846
- className: "vk-prose vk-chat-message-content",
45846
+ className: cx("vk-prose vk-chat-message-content", typeof message.content === "string" && "vk-chat-message-text"),
45847
45847
  children: message.content
45848
45848
  }, undefined, false, undefined, this),
45849
45849
  /* @__PURE__ */ jsx_dev_runtime90.jsxDEV(MessageDelivery, {
@@ -30,7 +30,7 @@ const items: ChatItem[] = [{
30
30
  - `author.source: { label, mark? }` names the channel the message came through ("Linear", "Pull request") in a small ruled tag beside the author. `mark` is a decorative 12px image; the label carries the meaning.
31
31
  - `actions: ChatAction[]` draws extra-small buttons under the message: `{ id, label, onSelect, disabled?, variant? }`, where `variant` is `outline` (default), `primary`, `ghost` or `danger`. Keep to one primary action per message.
32
32
 
33
- The application owns the transcript items, transport, authentication, async sending, retries and persistence. Content is a React node; strings are displayed as text. The component does not parse incoming Markdown or inject HTML. Render formatted content in your application, including through an existing read-only `RichTextEditor` if useful.
33
+ The application owns the transcript items, transport, authentication, async sending, retries and persistence. Content is a React node; plain strings are displayed as text with their line breaks preserved. Formatted React content uses normal HTML whitespace, so newline text nodes between paragraphs or list items do not add empty lines. Use semantic `<br>` and `<pre>` elements for intentional breaks and preformatted text. The component does not parse incoming Markdown or inject HTML. Render formatted content in your application, including through an existing read-only `RichTextEditor` if useful.
34
34
 
35
35
  ## Agent activity
36
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vokality/design-system",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "Vokality's design system: tokens, themes and React components for every Vokality project.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,