devnonla-ui 0.13.0 → 0.15.0

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.
Files changed (86) hide show
  1. package/package.json +2 -2
  2. package/src/app/App.tsx +2 -2
  3. package/src/app/context.ts +1 -12
  4. package/src/avatar/avatar.css +107 -0
  5. package/src/blob-shape/BlobShape.tsx +337 -0
  6. package/src/button/Button.tsx +4 -4
  7. package/src/button/ButtonCopy.tsx +3 -3
  8. package/src/calendar/Calendar.tsx +1 -1
  9. package/src/card/Card.tsx +1 -1
  10. package/src/chat/AgentChatbox.tsx +1 -1
  11. package/src/chat/AgentPanel.tsx +1 -1
  12. package/src/chat/chatMessageList.tsx +5 -3
  13. package/src/chat/chatRhythm.ts +8 -0
  14. package/src/chat/common/createAgentSseSession.ts +9 -3
  15. package/src/chat/common/sse.ts +290 -122
  16. package/src/chat/common/useAgentStream.ts +1 -1
  17. package/src/chat/index.ts +2 -2
  18. package/src/chat/message-ui/ChatAgentMessage.tsx +4 -3
  19. package/src/chat/message-ui/ChatError.tsx +5 -4
  20. package/src/chat/message-ui/ChatInput.tsx +9 -8
  21. package/src/chat/message-ui/ChatMarkdown.tsx +36 -2
  22. package/src/chat/message-ui/ChatThinking.tsx +8 -7
  23. package/src/chat/message-ui/ChatUserMessage.tsx +5 -5
  24. package/src/chat/tool-ui/BackgroundTaskToolUI.tsx +7 -6
  25. package/src/chat/tool-ui/BackgroundTasksBar.tsx +9 -9
  26. package/src/chat/tool-ui/CallAgentToolUI.tsx +16 -15
  27. package/src/chat/tool-ui/ChatToolCall.tsx +13 -12
  28. package/src/chat/tool-ui/GetCurrentTimeToolUI.tsx +7 -6
  29. package/src/chat/tool-ui/ReadSkillToolUI.tsx +10 -9
  30. package/src/chat/tool-ui/RunJsToolUI.tsx +9 -8
  31. package/src/chat/tool-ui/ToolUiBadge.tsx +1 -1
  32. package/src/chat/tool-ui/ToolUiTrailing.tsx +3 -3
  33. package/src/chat/tool-ui/WebFetchToolUI.tsx +10 -9
  34. package/src/checkbox/Checkbox.tsx +2 -2
  35. package/src/codeblock/CodeBlock.tsx +1 -1
  36. package/src/colorpicker/ColorPicker.tsx +10 -8
  37. package/src/datepicker/DatePicker.tsx +3 -3
  38. package/src/desktop/DesktopHeader.tsx +2 -2
  39. package/src/desktop/DesktopIcon.tsx +3 -4
  40. package/src/desktop/DesktopStage.tsx +1 -1
  41. package/src/desktop/DesktopWindow.tsx +3 -3
  42. package/src/desktop/MeadowDesktop.tsx +2 -2
  43. package/src/drawer/Drawer.tsx +6 -2
  44. package/src/dropdown/menuClasses.ts +1 -1
  45. package/src/empty/Empty.tsx +1 -1
  46. package/src/form/variants/FieldRadio.tsx +1 -1
  47. package/src/form/variants/FieldRepeaterItem.tsx +1 -1
  48. package/src/icon/Icon.tsx +21 -0
  49. package/src/icon/glyphs.ts +35 -0
  50. package/src/index.ts +9 -23
  51. package/src/input/EditableInput.tsx +5 -4
  52. package/src/input/Input.tsx +15 -7
  53. package/src/lib/sizes.ts +6 -6
  54. package/src/lib/surface.ts +14 -4
  55. package/src/markdown-editor/MarkdownDiff.tsx +4 -4
  56. package/src/markdown-editor/MarkdownEditor.tsx +4 -4
  57. package/src/markdown-editor/MarkdownPreview.tsx +6 -6
  58. package/src/markdown-editor/MarkdownSource.tsx +1 -1
  59. package/src/markdown-editor/MarkdownTable.tsx +48 -11
  60. package/src/markdown-editor/MarkdownViewer.tsx +28 -31
  61. package/src/markdown-editor/MermaidBlock.tsx +5 -5
  62. package/src/markdown-editor/ReactCodeFrame.tsx +10 -6
  63. package/src/markdown-editor/ReactCodeSandbox.tsx +2 -2
  64. package/src/markdown-editor/markdownScale.ts +66 -127
  65. package/src/menu/Menu.tsx +3 -3
  66. package/src/message/message.tsx +18 -8
  67. package/src/modal/Modal.tsx +13 -7
  68. package/src/pagination/Pagination.tsx +7 -7
  69. package/src/popover/Popover.tsx +1 -1
  70. package/src/scroll/OverlayScroll.tsx +13 -5
  71. package/src/segmented/Segmented.tsx +1 -1
  72. package/src/select/Select.tsx +4 -4
  73. package/src/sidebar/Sidebar.tsx +39 -36
  74. package/src/skeleton/Skeleton.tsx +4 -4
  75. package/src/spin/Spin.tsx +14 -2
  76. package/src/splitter/Splitter.tsx +1 -1
  77. package/src/styles.css +188 -844
  78. package/src/table/Table.tsx +12 -12
  79. package/src/tabs/Tabs.tsx +76 -14
  80. package/src/tag/Tag.tsx +3 -3
  81. package/src/theme-switcher/ThemeSwitcher.tsx +6 -6
  82. package/src/theme.ts +53 -147
  83. package/src/timepicker/TimePicker.tsx +2 -2
  84. package/src/typography/Typography.tsx +8 -8
  85. package/src/icon/SolarIcon.tsx +0 -39
  86. package/src/icon/solar.ts +0 -172
@@ -1,3 +1,4 @@
1
+ import type { CSSProperties } from "react";
1
2
  import { MarkdownViewer } from "../../markdown-editor/MarkdownViewer";
2
3
 
3
4
  export type ChatMarkdownProps = {
@@ -5,7 +6,40 @@ export type ChatMarkdownProps = {
5
6
  streaming?: boolean;
6
7
  };
7
8
 
8
- /** Agent markdown. `MarkdownViewer` on the `chat` scale. */
9
+ /** Reply headings match the body: `text-md`, weight 400. Strong is 500. Tables stay `text-base`. */
10
+ const chatHeadingScale = {
11
+ "--md-h1-size": "var(--nonla-md-text-size)",
12
+ "--md-h2-size": "var(--nonla-md-text-size)",
13
+ "--md-h3-size": "var(--nonla-md-text-size)",
14
+ "--md-h4-size": "var(--nonla-md-text-size)",
15
+ "--md-h5-size": "var(--nonla-md-text-size)",
16
+ "--md-h6-size": "var(--nonla-md-text-size)",
17
+ "--md-h1-leading": "var(--md-body-leading)",
18
+ "--md-h2-leading": "var(--md-body-leading)",
19
+ "--md-h3-leading": "var(--md-body-leading)",
20
+ "--md-h4-leading": "var(--md-body-leading)",
21
+ "--md-h5-leading": "var(--md-body-leading)",
22
+ "--md-h6-leading": "var(--md-body-leading)",
23
+ "--md-h1-weight": "400",
24
+ "--md-h2-weight": "400",
25
+ "--md-h3-weight": "400",
26
+ "--md-h4-weight": "400",
27
+ "--md-h5-weight": "400",
28
+ "--md-h6-weight": "400",
29
+ "--md-strong-weight": "500",
30
+ } as CSSProperties;
31
+
32
+ /**
33
+ * Headings use the paragraph box, so `#` does not keep the article margin.
34
+ * The first and last line drop that padding so the row padding is the only gap.
35
+ */
36
+ const chatEdgeClass = [
37
+ "[&_:is(h1,h2,h3,h4,h5,h6)]:my-(--md-p-my,1px)! [&_:is(h1,h2,h3,h4,h5,h6)]:py-(--md-p-py,4px)!",
38
+ "[&_[data-md-block]:not(:first-child)_p:first-child]:mt-(--md-p-my,1px)! [&_[data-md-block]:not(:first-child)_p:first-child]:pt-(--md-p-py,4px)!",
39
+ "[&_[data-md-block]:first-child_:is(p,h1,h2,h3,h4,h5,h6,ul,ol)]:mt-0! [&_[data-md-block]:first-child_:is(p,h1,h2,h3,h4,h5,h6)]:pt-0! [&_[data-md-block]:last-child_:is(p,h1,h2,h3,h4,h5,h6,ul,ol)]:mb-0! [&_[data-md-block]:last-child_:is(p,h1,h2,h3,h4,h5,h6)]:pb-0!",
40
+ ].join(" ");
41
+
42
+ /** Agent markdown. Headings use the body size at weight 400. */
9
43
  export function ChatMarkdown({ content, streaming = false }: ChatMarkdownProps) {
10
- return <MarkdownViewer value={content} streaming={streaming} variant="chat" />;
44
+ return <MarkdownViewer value={content} streaming={streaming} className={chatEdgeClass} style={chatHeadingScale} />;
11
45
  }
@@ -1,7 +1,8 @@
1
1
  import { useEffect, useLayoutEffect, useRef, useState } from "react";
2
- import { SolarIcon } from "../../icon/SolarIcon";
2
+ import { Icon } from "../../icon/Icon";
3
3
  import { cn } from "../../lib/cn";
4
4
  import { Shimmer } from "../../shimmer/Shimmer";
5
+ import { chatToolLineClass } from "../chatRhythm";
5
6
 
6
7
  export type ChatThinkingProps = {
7
8
  thinking: string;
@@ -40,7 +41,7 @@ export function ChatThinking({ thinking, duration = 0, streaming = false, classN
40
41
 
41
42
  return (
42
43
  <details
43
- className={cn("nonla-chat-thinking px-4 pb-2 group/thinking", className)}
44
+ className={cn("nonla-chat-thinking px-4 group/thinking", className)}
44
45
  style={{ overflowAnchor: "none" }}
45
46
  onToggle={(e) => {
46
47
  if (!streaming || !e.currentTarget.open) return;
@@ -48,13 +49,13 @@ export function ChatThinking({ thinking, duration = 0, streaming = false, classN
48
49
  if (el) el.scrollTop = el.scrollHeight;
49
50
  }}
50
51
  >
51
- <summary className="cursor-pointer select-none text-base font-normal flex items-center gap-1 py-0.5 list-none [&::-webkit-details-marker]:hidden">
52
- <Shimmer active={streaming} className="text-tertiary-foreground">{label}</Shimmer>
53
- <SolarIcon name="alt-arrow-right-linear" size={12} className="shrink-0 opacity-0 text-tertiary-foreground transition-[opacity,transform] duration-150 group-hover/thinking:opacity-100 group-open/thinking:opacity-100 group-open/thinking:rotate-90" />
52
+ <summary className={cn(chatToolLineClass, "cursor-pointer list-none font-medium select-none [&::-webkit-details-marker]:hidden")}>
53
+ <Shimmer active={streaming} className="text-muted-foreground">{label}</Shimmer>
54
+ <Icon name="arrow-right" size={12} className="shrink-0 opacity-0 text-muted-foreground transition-[opacity,transform] duration-150 group-hover/thinking:opacity-100 group-open/thinking:opacity-100 group-open/thinking:rotate-90" />
54
55
  </summary>
55
56
 
56
- <div ref={bodyRef} className="pt-2 max-h-40 min-w-0 overflow-y-auto overflow-x-hidden mb-2 text-[14px] leading-normal">
57
- <p className="text-[14px] leading-normal text-quaternary-foreground whitespace-pre-wrap wrap-break-word m-0">{thinking}</p>
57
+ <div ref={bodyRef} className="pt-2 max-h-40 min-w-0 overflow-y-auto overflow-x-hidden mb-2 text-sm">
58
+ <p className="m-0 text-sm text-tertiary-foreground whitespace-pre-wrap wrap-break-word">{thinking}</p>
58
59
  </div>
59
60
  </details>
60
61
  );
@@ -1,5 +1,5 @@
1
1
  import { useEffect, useRef, useState } from "react";
2
- import { SolarIcon } from "../../icon/SolarIcon";
2
+ import { Icon } from "../../icon/Icon";
3
3
  import { cn } from "../../lib/cn";
4
4
 
5
5
  const MAX_HEIGHT = 150;
@@ -29,15 +29,15 @@ export function ChatUserMessage({ content, className }: ChatUserMessageProps) {
29
29
  return (
30
30
  <div
31
31
  className={cn(
32
- "nonla-chat-user relative isolate mt-6 mb-3 mx-4 overflow-hidden rounded-xl px-3 py-1.5",
33
- "border border-solid border-(--nonla-input) bg-well-strong",
32
+ "nonla-chat-user relative isolate mx-4 mt-8 mb-3 overflow-hidden rounded-xl border border-solid border-(--nonla-input) bg-muted-strong px-3 py-1.5",
33
+ "[.light:not(.dark)_&]:bg-sidebar [.light_.nonla-ui:not(.dark)_&]:bg-sidebar",
34
34
  className,
35
35
  )}
36
36
  >
37
37
  <div
38
38
  ref={contentRef}
39
39
  className={cn(
40
- "overflow-hidden text-(length:--chat-body-size) leading-(--chat-body-leading) text-(--nonla-ink) whitespace-pre-wrap wrap-break-word",
40
+ "overflow-hidden text-base text-foreground whitespace-pre-wrap wrap-break-word",
41
41
  collapsed && "mask-[linear-gradient(to_bottom,#000_calc(100%-1.75rem),transparent)]",
42
42
  )}
43
43
  style={{ maxHeight: collapsed ? MAX_HEIGHT : undefined }}
@@ -55,7 +55,7 @@ export function ChatUserMessage({ content, className }: ChatUserMessageProps) {
55
55
  }}
56
56
  className="flex w-full cursor-pointer items-center justify-center border-0 bg-transparent pt-1 text-muted-foreground hover:text-foreground"
57
57
  >
58
- <SolarIcon name="alt-arrow-down-linear" size={12} className={cn("transition-transform duration-200", isExpanded && "rotate-180")} />
58
+ <Icon name="arrow-down" size={12} className={cn("transition-transform duration-200", isExpanded && "rotate-180")} />
59
59
  </button>
60
60
  ) : null}
61
61
  </div>
@@ -1,6 +1,7 @@
1
1
  import { useEffect, useState } from "react";
2
2
  import { Shimmer } from "../../shimmer/Shimmer";
3
3
  import { Spin } from "../../spin/Spin";
4
+ import { chatRowClass, chatToolLineClass } from "../chatRhythm";
4
5
  import { formatBgElapsed, parseBgTaskRef } from "../common/bgTasks";
5
6
  import { formatToolName, timestampMs } from "../common/utils";
6
7
  import { ToolUiBadge } from "./ToolUiBadge";
@@ -17,16 +18,16 @@ export function BackgroundTaskToolUI({ msg, assistantLabel = "Assistant", assist
17
18
  }, []);
18
19
 
19
20
  return (
20
- <div className="mt-1 animate-fadeIn">
21
+ <div className={`${chatRowClass} animate-fadeIn`}>
21
22
  <ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
22
- <div className="px-4 pb-1">
23
- <div className="flex items-center gap-2 py-1">
23
+ <div className="px-4">
24
+ <div className={chatToolLineClass}>
24
25
  <Spin variant="agent" size="small" className="shrink-0" />
25
- <Shimmer className="min-w-0 truncate text-[14px] font-medium text-muted-foreground">
26
+ <Shimmer className="min-w-0 truncate font-medium text-muted-foreground">
26
27
  {label}
27
- <span className="font-normal text-tertiary-foreground"> in background</span>
28
+ <span className="text-muted-foreground [-webkit-text-fill-color:currentcolor]"> in background</span>
28
29
  </Shimmer>
29
- <span className="shrink-0 text-[13px] tabular-nums text-tertiary-foreground">{formatBgElapsed(timestampMs(msg.timestamp), now)}</span>
30
+ <span className="shrink-0 tabular-nums text-tertiary-foreground">{formatBgElapsed(timestampMs(msg.timestamp), now)}</span>
30
31
  </div>
31
32
  </div>
32
33
  </div>
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode, useEffect, useLayoutEffect, useRef, useState } from "react";
2
- import { SolarIcon } from "../../icon/SolarIcon";
2
+ import { Icon } from "../../icon/Icon";
3
3
  import { cn } from "../../lib/cn";
4
4
  import { Modal } from "../../modal/Modal";
5
5
  import { Popconfirm } from "../../popconfirm/Popconfirm";
@@ -27,7 +27,7 @@ function TaskLogsModal({
27
27
 
28
28
  return (
29
29
  <Modal open={open} onCancel={onClose} footer={null} title={task ? formatToolName(task.toolName) : "Logs"} width={560}>
30
- <pre ref={preRef} className="m-0 max-h-[50vh] overflow-auto rounded-md border border-border-subtle bg-muted px-3 py-2 font-mono text-[13px] leading-relaxed whitespace-pre-wrap break-all text-foreground">
30
+ <pre ref={preRef} className="m-0 max-h-[50vh] overflow-auto rounded-md border border-border-secondary bg-muted px-3 py-2 font-mono text-sm leading-relaxed whitespace-pre-wrap break-all text-foreground">
31
31
  {logs || "Waiting for output…"}
32
32
  </pre>
33
33
  </Modal>
@@ -49,14 +49,14 @@ function TaskRow({
49
49
  }) {
50
50
  return (
51
51
  <div className="flex items-center gap-1 px-1.5 py-0.5">
52
- <button type="button" onClick={onLogs} title="Logs" aria-label={`Logs ${formatToolName(task.toolName)}`} className="flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-1 py-[3px] text-left transition-colors hover:bg-secondary">
52
+ <button type="button" onClick={onLogs} title="Logs" aria-label={`Logs ${formatToolName(task.toolName)}`} className="flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-1 py-[3px] text-left transition-colors hover:bg-muted">
53
53
  <Spin variant="agent" size="small" className="shrink-0" />
54
- <span className="min-w-0 flex-1 truncate text-[13px] font-medium text-foreground">{formatToolName(task.toolName)}</span>
55
- <span className="shrink-0 text-[12px] tabular-nums text-tertiary-foreground">{formatBgElapsed(task.startedAt, now)}</span>
54
+ <span className="min-w-0 flex-1 truncate text-sm font-medium text-foreground">{formatToolName(task.toolName)}</span>
55
+ <span className="shrink-0 text-sm tabular-nums text-tertiary-foreground">{formatBgElapsed(task.startedAt, now)}</span>
56
56
  </button>
57
57
  <Popconfirm title={`Stop ${formatToolName(task.toolName)}?`} okText="Stop" okType="danger" onConfirm={onCancel} getPopupContainer={() => document.body}>
58
58
  <button type="button" disabled={cancelling} title="Stop" aria-label={`Stop ${formatToolName(task.toolName)}`} className="inline-flex size-5 shrink-0 items-center justify-center rounded cursor-pointer text-destructive transition-colors hover:bg-destructive/10 disabled:opacity-40">
59
- <SolarIcon name="stop-bold" size={10} />
59
+ <Icon name="stop" size={10} />
60
60
  </button>
61
61
  </Popconfirm>
62
62
  </div>
@@ -118,9 +118,9 @@ export function BackgroundTasksBar({ children, tasks = [], cancellingIds, onCanc
118
118
 
119
119
  {tasks.length > 0 ? (
120
120
  <div className="absolute inset-x-6 bottom-[calc(100%)] z-20 overflow-hidden rounded-t-lg border-x border-t border-border">
121
- <div className={cn("flex h-7.5 items-center gap-1 px-1", open && "border-b border-border-subtle")}>
122
- <button type="button" onClick={() => setOpen((v) => !v)} className="flex min-w-0 flex-1 cursor-pointer font-medium items-center gap-1 rounded-md px-1.5 py-1 text-[13px] text-muted-foreground/90 transition-colors hover:text-foreground" aria-expanded={open} aria-label={label}>
123
- <SolarIcon name="alt-arrow-down-linear" size={13} className={cn("shrink-0 transition-transform duration-150", !open && "-rotate-90")} />
121
+ <div className={cn("flex h-7.5 items-center gap-1 px-1", open && "border-b border-border-secondary")}>
122
+ <button type="button" onClick={() => setOpen((v) => !v)} className="flex min-w-0 flex-1 cursor-pointer font-medium items-center gap-1 rounded-md px-1.5 py-1 text-sm text-muted-foreground/90 transition-colors hover:text-foreground" aria-expanded={open} aria-label={label}>
123
+ <Icon name="arrow-down" size={13} className={cn("shrink-0 transition-transform duration-150", !open && "-rotate-90")} />
124
124
  <span className="truncate">{label}</span>
125
125
  </button>
126
126
  </div>
@@ -1,8 +1,9 @@
1
1
  import { type ReactNode, useEffect, useRef, useState } from "react";
2
- import { SolarIcon } from "../../icon/SolarIcon";
2
+ import { Icon } from "../../icon/Icon";
3
3
  import { cn } from "../../lib/cn";
4
4
  import { Shimmer } from "../../shimmer/Shimmer";
5
5
  import { Spin } from "../../spin/Spin";
6
+ import { chatRowBoxClass, chatRowClass } from "../chatRhythm";
6
7
  import { formatBgElapsed, parseBgTaskRef } from "../common/bgTasks";
7
8
  import { parseJsonObject, prettyJson, timestampMs } from "../common/utils";
8
9
  import { ChatMarkdown } from "../message-ui/ChatMarkdown";
@@ -62,7 +63,7 @@ function AgentTurn({
62
63
  <div className={cn("flex items-start gap-2", align === "end" && "flex-row-reverse")}>
63
64
  <AgentAvatar name={name} className="mt-0.5 shrink-0" />
64
65
  <div className={cn("flex min-w-0 flex-1 flex-col gap-0.5", align === "end" ? "items-end" : "items-start")}>
65
- <span className="select-none text-[12px] font-medium text-tertiary-foreground">{name}</span>
66
+ <span className="select-none text-sm font-medium text-tertiary-foreground">{name}</span>
66
67
  <div className="w-fit max-w-[92%]">{children}</div>
67
68
  </div>
68
69
  </div>
@@ -85,7 +86,7 @@ function ExpandableBody({ children, className }: { children: ReactNode; classNam
85
86
  {children}
86
87
  </div>
87
88
  {overflows ? (
88
- <button type="button" onClick={() => setExpanded((v) => !v)} className="mt-1 cursor-pointer border-0 bg-transparent p-0 text-[13px] text-tertiary-foreground hover:text-foreground">
89
+ <button type="button" onClick={() => setExpanded((v) => !v)} className="mt-1 cursor-pointer border-0 bg-transparent p-0 text-sm text-tertiary-foreground hover:text-foreground">
89
90
  {expanded ? "Show less" : "Show more"}
90
91
  </button>
91
92
  ) : null}
@@ -118,19 +119,19 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
118
119
  const statusLabel = failed && !awaitingReply ? (parsed?.error ?? "Call failed") : null;
119
120
 
120
121
  return (
121
- <div className="mt-1 animate-fadeIn">
122
+ <div className={`${chatRowClass} animate-fadeIn`}>
122
123
  <ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
123
- <div className="px-4 py-1">
124
+ <div className={chatRowBoxClass}>
124
125
  <div className={cn("overflow-hidden rounded-xl border bg-card", failed ? "border-destructive/35" : "border-border")}>
125
- <div className="flex items-center gap-2 border-b border-border-subtle px-3 py-2">
126
+ <div className="flex items-center gap-2 border-b border-border-secondary px-3 py-2">
126
127
  {calling ? (
127
128
  <Spin variant="agent" size="small" className="shrink-0" />
128
129
  ) : (
129
- <SolarIcon name="dialog-2-linear" size={13} className="shrink-0 text-muted-foreground" />
130
+ <Icon name="dialog" size={13} className="shrink-0 text-muted-foreground" />
130
131
  )}
131
- <Shimmer active={calling} className="min-w-0 flex-1 truncate text-[14px] font-medium text-foreground">Calling {calleeName}</Shimmer>
132
- {bgRunning ? <span className="text-[14px] tabular-nums text-muted-foreground">{formatBgElapsed(timestampMs(msg.timestamp), now)}</span> : null}
133
- {statusLabel ? <span className="max-w-40 truncate text-[13px] italic text-destructive">{statusLabel}</span> : null}
132
+ <Shimmer active={calling} className="min-w-0 flex-1 truncate text-sm font-medium text-foreground">Calling {calleeName}</Shimmer>
133
+ {bgRunning ? <span className="text-sm tabular-nums text-muted-foreground">{formatBgElapsed(timestampMs(msg.timestamp), now)}</span> : null}
134
+ {statusLabel ? <span className="max-w-40 truncate text-sm italic text-destructive">{statusLabel}</span> : null}
134
135
  <ToolUiTrailing failed={failed && !awaitingReply} />
135
136
  </div>
136
137
 
@@ -138,8 +139,8 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
138
139
  <div className="flex flex-col gap-3 px-3 py-3">
139
140
  {composing || hasRequest ? (
140
141
  <AgentTurn name={assistantLabel} align="end">
141
- <div className="nonla-chat-user rounded-2xl rounded-tr-sm border border-solid border-(--nonla-input) bg-well-strong px-3 py-2 text-left">
142
- {composing ? <TypingDots /> : <p className="m-0 text-[14px] leading-[1.55] whitespace-pre-wrap text-foreground">{requestMessage}</p>}
142
+ <div className="nonla-chat-user rounded-2xl rounded-tr-sm border border-solid border-(--nonla-input) bg-muted-strong px-3 py-2 text-left [.light:not(.dark)_&]:bg-sidebar [.light_.nonla-ui:not(.dark)_&]:bg-sidebar">
143
+ {composing ? <TypingDots /> : <p className="m-0 text-sm leading-[1.55] whitespace-pre-wrap text-foreground">{requestMessage}</p>}
143
144
  </div>
144
145
  </AgentTurn>
145
146
  ) : null}
@@ -150,17 +151,17 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
150
151
  {awaitingReply ? (
151
152
  <div className="flex items-center gap-1.5 py-0.5">
152
153
  <ChatSpinner />
153
- <span className="text-[14px] italic text-muted-foreground">Replying…</span>
154
+ <span className="text-sm italic text-muted-foreground">Replying…</span>
154
155
  </div>
155
156
  ) : failed ? (
156
- <p className="m-0 text-[14px] leading-[1.55] text-destructive">{parsed?.error ?? "Agent call failed"}</p>
157
+ <p className="m-0 text-sm leading-[1.55] text-destructive">{parsed?.error ?? "Agent call failed"}</p>
157
158
  ) : parsed ? (
158
159
  <ExpandableBody>
159
160
  <ChatMarkdown content={parsed.response ?? "(no response)"} />
160
161
  </ExpandableBody>
161
162
  ) : (
162
163
  <ExpandableBody>
163
- <pre className="m-0 font-mono text-[13px] leading-normal break-all whitespace-pre-wrap text-muted-foreground">{prettyJson(msg.toolOutput)}</pre>
164
+ <pre className="m-0 font-mono text-sm leading-normal break-all whitespace-pre-wrap text-muted-foreground">{prettyJson(msg.toolOutput)}</pre>
164
165
  </ExpandableBody>
165
166
  )}
166
167
  </div>
@@ -1,7 +1,8 @@
1
1
  import { type ReactNode, useState } from "react";
2
- import { SolarIcon } from "../../icon/SolarIcon";
2
+ import { Icon } from "../../icon/Icon";
3
3
  import { cn } from "../../lib/cn";
4
4
  import { Shimmer } from "../../shimmer/Shimmer";
5
+ import { chatRowClass, chatToolLineClass } from "../chatRhythm";
5
6
  import { formatToolName, hasMeaningfulInput, prettyJson } from "../common/utils";
6
7
  import { ToolUiTrailing } from "./ToolUiTrailing";
7
8
 
@@ -28,39 +29,39 @@ export function ChatToolCall({ toolName = "Tool", label, toolInput, toolOutput,
28
29
  const [open, setOpen] = useState(defaultOpen);
29
30
  const displayLabel = label ?? formatToolName(toolName);
30
31
 
31
- const identityIcon = icon ?? <SolarIcon name="code-square-linear" size={13} className="shrink-0" />;
32
+ const identityIcon = icon ?? <Icon name="code" size={13} className="shrink-0 text-muted-foreground" />;
32
33
 
33
34
  const header = (
34
35
  <>
35
36
  {identityIcon}
36
37
  <span className="flex min-w-0 items-center gap-1">
37
- <Shimmer active={running} className={cn("min-w-0 truncate text-left text-[14px] font-medium", !running && "text-muted-foreground", expandable && !running && "transition-colors group-hover:text-foreground")}>{displayLabel}</Shimmer>
38
- <ToolUiTrailing failed={hasError} chevron={expandable} chevronClassName={cn("group-hover:opacity-100", open && "opacity-100 rotate-90")} />
38
+ <Shimmer active={running} className={cn("min-w-0 truncate text-left font-medium", !running && "text-muted-foreground")}>{displayLabel}</Shimmer>
39
+ <ToolUiTrailing failed={hasError} chevron={expandable} chevronClassName={cn("text-muted-foreground group-hover:opacity-100", open && "opacity-100 rotate-90")} />
39
40
  </span>
40
41
  </>
41
42
  );
42
43
 
43
44
  return (
44
- <div className={cn("nonla-chat-tool mt-1", className)}>
45
- <div className="px-4 pb-2">
45
+ <div className={cn("nonla-chat-tool", chatRowClass, className)}>
46
+ <div className="px-4">
46
47
  {expandable ? (
47
- <button type="button" onClick={() => setOpen((v) => !v)} className="group flex w-full cursor-pointer items-center gap-2 border-0 bg-transparent py-0.5 text-[14px] leading-5.5 outline-none">
48
+ <button type="button" onClick={() => setOpen((v) => !v)} className={cn(chatToolLineClass, "group w-full cursor-pointer border-0 bg-transparent outline-none")}>
48
49
  {header}
49
50
  </button>
50
51
  ) : (
51
- <div className="flex w-full items-center gap-2 py-0.5 text-[14px] leading-5.5">{header}</div>
52
+ <div className={cn(chatToolLineClass, "w-full")}>{header}</div>
52
53
  )}
53
54
 
54
55
  {open && expandable ? (
55
- <div className="mt-1.5 mb-1 overflow-hidden rounded-lg border border-border bg-card font-mono text-[13px]">
56
- {hasInput ? <pre className="m-0 max-h-27.5 overflow-y-auto bg-well px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65] text-muted-foreground">{prettyJson(toolInput)}</pre> : null}
56
+ <div className={cn("mt-1.5 mb-1 overflow-hidden rounded-lg border font-mono text-sm", hasError ? "border-destructive/35 bg-destructive/6" : "border-border bg-card")}>
57
+ {hasInput ? <pre className="m-0 max-h-27.5 overflow-y-auto px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65] text-muted-foreground">{prettyJson(toolInput)}</pre> : null}
57
58
  {running ? (
58
- <div className="bg-well-strong px-3 py-1.5 text-muted-foreground">
59
+ <div className={cn("px-3 py-1.5 text-muted-foreground", hasInput && "border-t border-border")}>
59
60
  <Shimmer className="italic">Running…</Shimmer>
60
61
  </div>
61
62
  ) : null}
62
63
  {!isPending ? (
63
- <pre className={cn("m-0 max-h-75 overflow-y-auto bg-well-strong px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65] text-muted-foreground", hasError && "bg-destructive/6")}>
64
+ <pre className={cn("m-0 max-h-75 overflow-y-auto px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65]", hasInput && "border-t", hasError ? "border-destructive/35 text-destructive" : "border-border text-muted-foreground")}>
64
65
  {hasOutput ? prettyJson(toolOutput) : typeof toolError === "string" ? toolError : "Tool execution failed"}
65
66
  </pre>
66
67
  ) : null}
@@ -1,5 +1,6 @@
1
- import { SolarIcon } from "../../icon/SolarIcon";
1
+ import { Icon } from "../../icon/Icon";
2
2
  import { Shimmer } from "../../shimmer/Shimmer";
3
+ import { chatRowClass, chatToolLineClass } from "../chatRhythm";
3
4
  import { parseJsonObject } from "../common/utils";
4
5
  import { ToolUiBadge } from "./ToolUiBadge";
5
6
  import { ToolUiTrailing } from "./ToolUiTrailing";
@@ -36,12 +37,12 @@ export function GetCurrentTimeToolUI({ msg, assistantLabel = "Assistant", assist
36
37
  const label = formatLabel(output?.iso, output?.timezone, output?.time);
37
38
 
38
39
  return (
39
- <div className="mt-1 animate-fadeIn">
40
+ <div className={`${chatRowClass} animate-fadeIn`}>
40
41
  <ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
41
- <div className="px-4 pb-1">
42
- <div className="flex items-center gap-2 py-1">
43
- <SolarIcon name="clock-circle-linear" size={13} className="shrink-0 text-muted-foreground" />
44
- <Shimmer active={running} className="truncate text-[14px] font-medium tabular-nums text-muted-foreground">{hasError ? "Failed to get time" : running ? "Getting time…" : label}</Shimmer>
42
+ <div className="px-4">
43
+ <div className={chatToolLineClass}>
44
+ <Icon name="clock" size={13} className="shrink-0 text-muted-foreground" />
45
+ <Shimmer active={running} className="truncate font-medium tabular-nums text-muted-foreground">{hasError ? "Failed to get time" : running ? "Getting time…" : label}</Shimmer>
45
46
  <ToolUiTrailing failed={hasError} />
46
47
  </div>
47
48
  </div>
@@ -1,6 +1,7 @@
1
- import { SolarIcon } from "../../icon/SolarIcon";
1
+ import { Icon } from "../../icon/Icon";
2
2
  import { cn } from "../../lib/cn";
3
3
  import { Shimmer } from "../../shimmer/Shimmer";
4
+ import { chatRowClass, chatToolLineClass } from "../chatRhythm";
4
5
  import { parseJsonObject } from "../common/utils";
5
6
  import { ToolUiBadge } from "./ToolUiBadge";
6
7
  import { ToolUiTrailing } from "./ToolUiTrailing";
@@ -51,25 +52,25 @@ export function ReadSkillToolUI({ msg, assistantLabel = "Assistant", assistantCo
51
52
  })();
52
53
 
53
54
  return (
54
- <div className="mt-1 animate-fadeIn">
55
+ <div className={`${chatRowClass} animate-fadeIn`}>
55
56
  <ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
56
- <details className="group/readskill px-4 pb-2" style={{ overflowAnchor: "none" }}>
57
- <summary className="flex cursor-pointer list-none items-center gap-2 py-0.5 text-[14px] leading-5.5 select-none [&::-webkit-details-marker]:hidden">
58
- <SolarIcon name={reference ? "document-text-linear" : "book-linear"} size={13} className="shrink-0 text-muted-foreground" />
57
+ <details className="group/readskill px-4" style={{ overflowAnchor: "none" }}>
58
+ <summary className={cn(chatToolLineClass, "cursor-pointer list-none select-none [&::-webkit-details-marker]:hidden")}>
59
+ <Icon name={reference ? "document" : "book"} size={13} className="shrink-0 text-muted-foreground" />
59
60
  <Shimmer active={running} className="min-w-0 truncate font-medium text-muted-foreground">
60
61
  {verb}
61
- {targetLabel ? <span className="font-normal text-tertiary-foreground"> {targetLabel}</span> : null}
62
+ {targetLabel ? <span className="text-tertiary-foreground"> {targetLabel}</span> : null}
62
63
  </Shimmer>
63
64
  <ToolUiTrailing failed={failed} chevron chevronClassName="group-hover/readskill:opacity-100 group-open/readskill:opacity-100 group-open/readskill:rotate-90" />
64
65
  </summary>
65
66
  {body ? (
66
- <pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-[13px] font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-(--popper-border) bg-(--nonla-elevated) text-muted-foreground")}>{body}</pre>
67
+ <pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-sm font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-border bg-card text-muted-foreground")}>{body}</pre>
67
68
  ) : null}
68
69
  {!running && !reference && available.length > 0 ? (
69
70
  <div className="mt-0.5 mb-1 flex flex-wrap items-center gap-1">
70
- <span className="text-[10px] font-medium tracking-wide text-quaternary-foreground uppercase">Refs</span>
71
+ <span className="text-sm font-medium tracking-wide text-quaternary-foreground uppercase">Refs</span>
71
72
  {available.map((name) => (
72
- <span key={name} className="inline-flex max-w-full items-center rounded-md border border-border-subtle bg-muted/40 px-1.5 py-0.5 font-mono text-[13px] leading-[1.4] text-tertiary-foreground">
73
+ <span key={name} className="inline-flex max-w-full items-center rounded-md border border-border-secondary bg-muted/40 px-1.5 py-0.5 font-mono text-sm leading-[1.4] text-tertiary-foreground">
73
74
  {skillName ? `${skillName} / ${name}` : name}
74
75
  </span>
75
76
  ))}
@@ -1,7 +1,8 @@
1
1
  import { CodeBlock } from "../../codeblock/CodeBlock";
2
- import { SolarIcon } from "../../icon/SolarIcon";
2
+ import { Icon } from "../../icon/Icon";
3
3
  import { cn } from "../../lib/cn";
4
4
  import { Shimmer } from "../../shimmer/Shimmer";
5
+ import { chatRowClass, chatToolLineClass } from "../chatRhythm";
5
6
  import { parseBgTaskRef } from "../common/bgTasks";
6
7
  import { parseJsonObject, prettyJson } from "../common/utils";
7
8
  import { ChatSpinner } from "../message-ui/ChatSpinner";
@@ -45,7 +46,7 @@ function SandboxOutput({
45
46
  }) {
46
47
  if (running) {
47
48
  return (
48
- <div className="flex items-center gap-2 border-t border-border px-3 py-2 text-[13px] text-muted-foreground">
49
+ <div className="flex items-center gap-2 border-t border-border px-3 py-2 text-sm text-muted-foreground">
49
50
  <ChatSpinner />
50
51
  <Shimmer>Running…</Shimmer>
51
52
  </div>
@@ -53,7 +54,7 @@ function SandboxOutput({
53
54
  }
54
55
 
55
56
  return (
56
- <div className={cn("max-h-40 overflow-y-auto border-t px-3 py-2 font-mono text-[13px] leading-[1.65]", failed ? "border-destructive/35 bg-destructive/6" : "border-border")}>
57
+ <div className={cn("max-h-40 overflow-y-auto border-t px-3 py-2 font-mono text-sm leading-[1.65]", failed ? "border-destructive/35 bg-destructive/6" : "border-border")}>
57
58
  {consoleOut ? <pre className="m-0 whitespace-pre-wrap break-all text-tertiary-foreground">{consoleOut}</pre> : null}
58
59
  {failed ? (
59
60
  <pre className={cn("m-0 whitespace-pre-wrap break-all text-destructive", consoleOut && "mt-1")}>{resultText(result)}</pre>
@@ -83,11 +84,11 @@ export function RunJsToolUI({ msg, assistantLabel = "Assistant", assistantColor,
83
84
  const verb = failed ? "JS failed" : running ? "Running JS" : "Ran JS";
84
85
 
85
86
  return (
86
- <div className="mt-1 animate-fadeIn">
87
+ <div className={`${chatRowClass} animate-fadeIn`}>
87
88
  <ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
88
- <details className="group/runjs px-4 pb-2" style={{ overflowAnchor: "none" }}>
89
- <summary className="flex cursor-pointer list-none items-center gap-2 py-0.5 text-[14px] leading-5.5 select-none [&::-webkit-details-marker]:hidden">
90
- <SolarIcon name="code-square-linear" size={13} className="shrink-0 text-muted-foreground" />
89
+ <details className="group/runjs px-4" style={{ overflowAnchor: "none" }}>
90
+ <summary className={cn(chatToolLineClass, "cursor-pointer list-none select-none [&::-webkit-details-marker]:hidden")}>
91
+ <Icon name="code" size={13} className="shrink-0 text-muted-foreground" />
91
92
  <Shimmer active={running} className="min-w-0 truncate font-medium text-muted-foreground">{verb}</Shimmer>
92
93
  <ToolUiTrailing running={running} failed={failed} chevron chevronClassName="group-hover/runjs:opacity-100 group-open/runjs:opacity-100 group-open/runjs:rotate-90" />
93
94
  </summary>
@@ -97,7 +98,7 @@ export function RunJsToolUI({ msg, assistantLabel = "Assistant", assistantColor,
97
98
  {showOutput ? <SandboxOutput running={running} failed={failed} consoleOut={consoleOut} result={resultBody} /> : null}
98
99
  </CodeBlock>
99
100
  ) : showOutput ? (
100
- <div className={cn("mt-1.5 mb-1 overflow-hidden rounded-lg border", failed ? "border-destructive/35" : "border-(--popper-border)")}>
101
+ <div className={cn("mt-1.5 mb-1 overflow-hidden rounded-lg border", failed ? "border-destructive/35" : "border-border")}>
101
102
  <SandboxOutput running={running} failed={failed} consoleOut={consoleOut} result={resultBody} />
102
103
  </div>
103
104
  ) : null}
@@ -2,7 +2,7 @@ export function ToolUiBadge({ show = false, label, color }: { show?: boolean; la
2
2
  if (!show) return null;
3
3
  return (
4
4
  <div className="flex items-center gap-2.5 px-4 pt-3 pb-1">
5
- <span className="inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-bold tracking-wider uppercase select-none" style={{ background: color ?? "var(--primary)", color: "var(--primary-foreground)", letterSpacing: "0.08em" }}>
5
+ <span className="inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-bold tracking-wider uppercase select-none" style={{ background: color ?? "var(--nonla-text-main)", color: "var(--nonla-bg)", letterSpacing: "0.08em" }}>
6
6
  {label}
7
7
  </span>
8
8
  </div>
@@ -1,4 +1,4 @@
1
- import { SolarIcon } from "../../icon/SolarIcon";
1
+ import { Icon } from "../../icon/Icon";
2
2
  import { cn } from "../../lib/cn";
3
3
  import { ChatSpinner } from "../message-ui/ChatSpinner";
4
4
 
@@ -14,7 +14,7 @@ export function ToolUiTrailing({
14
14
  chevronClassName?: string;
15
15
  }) {
16
16
  if (running) return <ChatSpinner />;
17
- if (failed) return <SolarIcon name="close-circle-linear" size={13} className="text-destructive" />;
17
+ if (failed) return <Icon name="error" size={13} className="shrink-0 text-destructive" />;
18
18
  if (!chevron) return null;
19
- return <SolarIcon name="alt-arrow-right-linear" size={12} className={cn("shrink-0 opacity-0 transition-[opacity,transform] duration-150", chevronClassName)} />;
19
+ return <Icon name="arrow-right" size={12} className={cn("shrink-0 opacity-0 transition-[opacity,transform] duration-150", chevronClassName)} />;
20
20
  }
@@ -1,6 +1,7 @@
1
- import { SolarIcon } from "../../icon/SolarIcon";
1
+ import { Icon } from "../../icon/Icon";
2
2
  import { cn } from "../../lib/cn";
3
3
  import { Shimmer } from "../../shimmer/Shimmer";
4
+ import { chatRowClass, chatToolLineClass } from "../chatRhythm";
4
5
  import { parseJsonObject } from "../common/utils";
5
6
  import { ToolUiBadge } from "./ToolUiBadge";
6
7
  import { ToolUiTrailing } from "./ToolUiTrailing";
@@ -37,25 +38,25 @@ export function WebFetchToolUI({ msg, assistantLabel = "Assistant", assistantCol
37
38
 
38
39
  const header = (
39
40
  <>
40
- <SolarIcon name="globe-linear" size={13} className="shrink-0 text-muted-foreground" />
41
+ <Icon name="globe" size={13} className="shrink-0 text-muted-foreground" />
41
42
  <Shimmer active={running} className="min-w-0 truncate font-medium text-muted-foreground">
42
- {verb} <span className="font-normal text-tertiary-foreground">{url}</span>
43
+ {verb} <span className="text-tertiary-foreground">{url}</span>
43
44
  </Shimmer>
44
45
  <ToolUiTrailing failed={failed} chevron={expandable} chevronClassName="group-hover/webfetch:opacity-100 group-open/webfetch:opacity-100 group-open/webfetch:rotate-90" />
45
46
  </>
46
47
  );
47
48
 
48
49
  return (
49
- <div className="mt-1 animate-fadeIn">
50
+ <div className={`${chatRowClass} animate-fadeIn`}>
50
51
  <ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
51
52
  {expandable ? (
52
- <details className="group/webfetch px-4 pb-2" style={{ overflowAnchor: "none" }}>
53
- <summary className="flex cursor-pointer list-none items-center gap-2 py-0.5 text-[14px] leading-5.5 select-none [&::-webkit-details-marker]:hidden">{header}</summary>
54
- <pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-[13px] font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-(--popper-border) bg-(--nonla-elevated) text-muted-foreground")}>{body}</pre>
53
+ <details className="group/webfetch px-4" style={{ overflowAnchor: "none" }}>
54
+ <summary className={cn(chatToolLineClass, "cursor-pointer list-none select-none [&::-webkit-details-marker]:hidden")}>{header}</summary>
55
+ <pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-sm font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-border bg-card text-muted-foreground")}>{body}</pre>
55
56
  </details>
56
57
  ) : (
57
- <div className="px-4 pb-2">
58
- <div className="flex items-center gap-2 py-0.5 text-[14px] leading-5.5">{header}</div>
58
+ <div className="px-4">
59
+ <div className={chatToolLineClass}>{header}</div>
59
60
  </div>
60
61
  )}
61
62
  </div>
@@ -17,9 +17,9 @@ export type CheckboxProps = Omit<ComponentPropsWithoutRef<typeof CheckboxPrimiti
17
17
 
18
18
  const CHECKED_FILL: Record<CheckboxColor, string> = {
19
19
  brand:
20
- "data-[state=checked]:bg-brand data-[state=checked]:border-brand data-[state=checked]:text-(--nonla-solid-fg) data-[state=indeterminate]:bg-brand data-[state=indeterminate]:border-brand data-[state=indeterminate]:text-(--nonla-solid-fg)",
20
+ "data-[state=checked]:bg-brand data-[state=checked]:border-brand data-[state=checked]:text-(--nonla-text-on-solid) data-[state=indeterminate]:bg-brand data-[state=indeterminate]:border-brand data-[state=indeterminate]:text-(--nonla-text-on-solid)",
21
21
  success:
22
- "data-[state=checked]:bg-success data-[state=checked]:border-success data-[state=checked]:text-(--nonla-solid-fg) data-[state=indeterminate]:bg-success data-[state=indeterminate]:border-success data-[state=indeterminate]:text-(--nonla-solid-fg)",
22
+ "data-[state=checked]:bg-success data-[state=checked]:border-success data-[state=checked]:text-(--nonla-text-on-solid) data-[state=indeterminate]:bg-success data-[state=indeterminate]:border-success data-[state=indeterminate]:text-(--nonla-text-on-solid)",
23
23
  white:
24
24
  "data-[state=checked]:bg-white data-[state=checked]:border-white data-[state=checked]:text-[#141414] data-[state=indeterminate]:bg-white data-[state=indeterminate]:border-white data-[state=indeterminate]:text-[#141414]",
25
25
  };
@@ -54,7 +54,7 @@ export function CodeBlock({ code, language, title, lineNumbers = false, wordWrap
54
54
 
55
55
  <OverlayScroll
56
56
  autoHeight
57
- className="nonla-codeblock-body nonla-codeblock-well min-w-0 bg-card font-mono text-[13px] leading-5 max-h-96"
57
+ className="nonla-codeblock-body nonla-codeblock-well min-w-0 bg-card font-mono text-(length:--md-code-size,var(--nonla-mono-text-size)) leading-(--md-code-leading,calc(var(--nonla-mono-text-size)*1.6)) max-h-96"
58
58
  innerClassName={wordWrap ? undefined : "overflow-x-auto"}
59
59
  >
60
60
  <pre className={cn("nonla-codeblock-pre m-0 whitespace-pre break-normal", lineNumbers && "nonla-codeblock-lines", wordWrap && "whitespace-pre-wrap wrap-break-word")}>