@tangle-network/ui 9.1.2 → 10.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @tangle-network/ui
2
2
 
3
+ ## 10.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 68e5053: Transcript spacing, markdown styling, and the remaining WCAG AA fixes.
8
+
9
+ - **Markdown was unstyled**: `@tailwindcss/typography` isn't loaded and `tangle-prose` was undefined, so structured markdown had no styling — table cells collided (no dividers/padding) and text ran flush into code blocks. Defined `tangle-prose` (self-contained, theme-tokened): tables get border-collapse hairline dividers + cell padding, and blocks (headings, paragraphs, lists, `pre`, code) get proper vertical rhythm. Links use `--accent-text` (readable in every theme).
10
+ - **Timeline spacing**: user messages sat flush against the status/tool/agent row below them. They're off-spine, so they now carry their own vertical rhythm (`mt-6 mb-4`).
11
+ - **WCAG AA (measured live across 7 themes)**: `--btn-primary-*` (dark + all named themes were 4.47/2.98 → now ≥5.9 via `#5B4ED4`/`#4F46E5`); `--hsl-destructive` button/badge (3.67 → ≥4.5); named light themes now carry light-tuned `--hsl-destructive`/`--hsl-secondary-foreground`/`--surface-neutral-text` (were inheriting dark values, secondary badge ~1.05); input borders (`--input` → `--hsl-muted-foreground`) now clear 1.4.11 3:1 as visible field boundaries.
12
+
13
+ - Updated dependencies [68e5053]
14
+ - @tangle-network/brand@0.9.0
15
+
16
+ ## 9.1.3
17
+
18
+ ### Patch Changes
19
+
20
+ - 26cc012: Give run/timeline tool rows a proper elevation ladder. Rows read as the same value as the canvas: `InlineToolItem` used `bg-card/40` (near-transparent) and RunGroup's OpenUI/running blocks used `bg-[var(--bg-root)]` (literally the page background). Both now use `--md3-surface-container` — one clear step above the `--bg-root` canvas — with hover/open stepping to `--md3-surface-container-high`. Rows now separate from the background instead of blending into it.
21
+ - 26cc012: One user-message bubble. There were two: the exported `UserMessage` (a loud filled purple bubble with an uppercase "You" label + shadow, used by the run/message list) and a separate cleaner inline bubble inside `AgentTimeline`. Unify on the clean one — `UserMessage` is now a quiet right-aligned bordered bubble on the muted surface (no fill, no uppercase label), and `AgentTimeline` renders through it instead of its own copy. `UserMessage` accepts either session-model `parts` or a direct `content`/`timestamp`, so both call sites share it.
22
+ - 26cc012: WCAG 1.4.3 AA contrast fixes across all 7 themes (measured with a cascade-resolved contrast audit).
23
+
24
+ - **Primary buttons**: `text-primary-foreground` on `bg-primary` was below 4.5:1 in `dark` (4.41) and `arena-light` (4.20). Darkened those two primaries (dark L 67%→62%, arena-light L 30%→27%) — all 7 themes now ≥5.0:1, hue unchanged.
25
+ - **Status colors in the named light themes**: `aubergine-light` / `arena-light` / `tangle-light` inherited the dark `:root` bright status palette (`#f87171`/`#34D399`/…), so danger/success text + glyphs dropped to ~2.5:1 on their light surfaces. Added a shared light-tuned status palette (dark-on-light text, mirroring the base light theme) — status text now passes AA and glyphs pass 1.4.11.
26
+ - **Running tool state**: the "running" label + spinner used `text-primary`, which fell to 2.98:1 on the dark row surface. Switched to `--accent-text` (the readable accent tier) — passes in every theme.
27
+ - **Thinking timer**: the elapsed-seconds counter used the faint `--text-dim` tier (~3:1). Moved it to `--text-muted` (passes AA everywhere).
28
+
29
+ Text now meets AA in all 7 themes; most pairs are AAA.
30
+
31
+ - Updated dependencies [26cc012]
32
+ - @tangle-network/brand@0.8.2
33
+
3
34
  ## 9.1.2
4
35
 
5
36
  ### Patch Changes
package/dist/chat.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  MessageList,
6
6
  ThinkingIndicator,
7
7
  UserMessage
8
- } from "./chunk-BQVQGDDV.js";
8
+ } from "./chunk-KHO7DYXH.js";
9
9
  import "./chunk-AZWDI2JG.js";
10
- import "./chunk-KWRLQ3MR.js";
11
- import "./chunk-WVW4KHEH.js";
10
+ import "./chunk-HHYUPAOJ.js";
11
+ import "./chunk-INMWNFAS.js";
12
12
  import "./chunk-ULDNFLIM.js";
13
13
  import "./chunk-AAUNOHVL.js";
14
14
  import "./chunk-52Y3FMFI.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-OEX7NZE3.js";
12
12
  import {
13
13
  parseToolEvent
14
- } from "./chunk-V6BF4AZ7.js";
14
+ } from "./chunk-KBOD47AW.js";
15
15
 
16
16
  // src/hooks/use-dropdown-menu.ts
17
17
  import { useEffect, useRef, useState } from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  InlineToolItem,
3
3
  LiveDuration
4
- } from "./chunk-WVW4KHEH.js";
4
+ } from "./chunk-INMWNFAS.js";
5
5
  import {
6
6
  formatDuration,
7
7
  truncateText
@@ -236,7 +236,7 @@ var InlineToolItem = memo2(
236
236
  /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2.5 px-3 py-2.5", children: [
237
237
  /* @__PURE__ */ jsx3("div", { className: cn(
238
238
  "shrink-0",
239
- isRunning && "text-primary",
239
+ isRunning && "text-[var(--accent-text)]",
240
240
  isComplete && "text-[var(--surface-success-text)]",
241
241
  isError && "text-[var(--surface-danger-text)]",
242
242
  !isRunning && !isComplete && !isError && "text-muted-foreground"
@@ -247,7 +247,7 @@ var InlineToolItem = memo2(
247
247
  isRunning && startTime ? /* @__PURE__ */ jsx3(LiveDuration, { startTime }) : null,
248
248
  !isRunning && durationMs != null ? /* @__PURE__ */ jsx3("span", { className: "text-[10px] font-mono tabular-nums text-muted-foreground", children: formatDuration(durationMs) }) : null,
249
249
  isError ? /* @__PURE__ */ jsx3("span", { className: "text-[10px] font-medium text-[var(--surface-danger-text)]", children: "failed" }) : null,
250
- isRunning ? /* @__PURE__ */ jsx3("span", { className: "text-[10px] font-medium text-primary", children: "running" }) : null,
250
+ isRunning ? /* @__PURE__ */ jsx3("span", { className: "text-[10px] font-medium text-[var(--accent-text)]", children: "running" }) : null,
251
251
  open ? /* @__PURE__ */ jsx3(ChevronDown, { className: "h-3 w-3 text-muted-foreground" }) : /* @__PURE__ */ jsx3(ChevronRight, { className: "h-3 w-3 text-muted-foreground" })
252
252
  ] })
253
253
  ] }),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ToolCallGroup,
3
3
  ToolCallStep
4
- } from "./chunk-WVW4KHEH.js";
4
+ } from "./chunk-INMWNFAS.js";
5
5
  import {
6
6
  Markdown
7
7
  } from "./chunk-FJBTCTZM.js";
@@ -6,11 +6,11 @@ import {
6
6
  import {
7
7
  InlineThinkingItem,
8
8
  RunGroup
9
- } from "./chunk-KWRLQ3MR.js";
9
+ } from "./chunk-HHYUPAOJ.js";
10
10
  import {
11
11
  ToolCallGroup,
12
12
  ToolCallStep
13
- } from "./chunk-WVW4KHEH.js";
13
+ } from "./chunk-INMWNFAS.js";
14
14
  import {
15
15
  getToolDisplayMetadata
16
16
  } from "./chunk-ULDNFLIM.js";
@@ -126,7 +126,7 @@ function ThinkingIndicator({ className }) {
126
126
  /* @__PURE__ */ jsx3("span", { className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "150ms" } }),
127
127
  /* @__PURE__ */ jsx3("span", { className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]", style: { animationDelay: "300ms" } })
128
128
  ] }),
129
- elapsed > 3 && /* @__PURE__ */ jsxs2("span", { className: "text-[var(--font-size-xs)] tabular-nums text-[var(--text-dim)]", children: [
129
+ elapsed > 3 && /* @__PURE__ */ jsxs2("span", { className: "text-[var(--font-size-xs)] tabular-nums text-muted-foreground", children: [
130
130
  elapsed,
131
131
  "s"
132
132
  ] })
@@ -242,7 +242,7 @@ function AgentTimeline({
242
242
  const timelineItems = renderedItems.filter((item) => !(item.kind === "message" && item.role === "user"));
243
243
  return /* @__PURE__ */ jsx4("div", { className: cn("mx-auto w-full max-w-5xl px-4 py-4", className), children: renderedItems.map((item, index) => {
244
244
  if (item.kind === "message" && item.role === "user") {
245
- return /* @__PURE__ */ jsx4(UserMessage, { content: item.content, timestamp: item.timestamp }, item.id);
245
+ return /* @__PURE__ */ jsx4("div", { className: "mt-6 mb-4 first:mt-0", children: /* @__PURE__ */ jsx4(UserMessage, { content: item.content, timestamp: item.timestamp }) }, item.id);
246
246
  }
247
247
  const timelineIndex = timelineItems.indexOf(item);
248
248
  const isLast = timelineIndex === timelineItems.length - 1;
@@ -610,6 +610,7 @@ function ToastContainer({ toasts, onDismiss }) {
610
610
  return /* @__PURE__ */ jsx8(
611
611
  "div",
612
612
  {
613
+ role: "region",
613
614
  className: "fixed right-4 bottom-4 z-50 flex max-w-md flex-col gap-2",
614
615
  "aria-label": "Notifications",
615
616
  children: toasts.map((toast) => /* @__PURE__ */ jsx8(ToastComponent, { ...toast, onDismiss }, toast.id))
package/dist/hooks.js CHANGED
@@ -11,15 +11,15 @@ import {
11
11
  useSSEStream,
12
12
  useSdkSession,
13
13
  useToolCallStream
14
- } from "./chunk-IVQYFG5D.js";
14
+ } from "./chunk-CCM2KRQH.js";
15
15
  import "./chunk-OEX7NZE3.js";
16
16
  import {
17
17
  useAutoScroll,
18
18
  useRunCollapseState,
19
19
  useRunGroups
20
20
  } from "./chunk-AZWDI2JG.js";
21
- import "./chunk-V6BF4AZ7.js";
22
- import "./chunk-WVW4KHEH.js";
21
+ import "./chunk-KBOD47AW.js";
22
+ import "./chunk-INMWNFAS.js";
23
23
  import "./chunk-ULDNFLIM.js";
24
24
  import "./chunk-AAUNOHVL.js";
25
25
  import "./chunk-ZRVH3WCA.js";
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  useSSEStream,
18
18
  useSdkSession,
19
19
  useToolCallStream
20
- } from "./chunk-IVQYFG5D.js";
20
+ } from "./chunk-CCM2KRQH.js";
21
21
  import {
22
22
  addMessage,
23
23
  addParts,
@@ -109,7 +109,7 @@ import {
109
109
  UploadProgress,
110
110
  useTheme,
111
111
  useToast
112
- } from "./chunk-XY2FP763.js";
112
+ } from "./chunk-XZFJAF6G.js";
113
113
  import {
114
114
  Avatar,
115
115
  AvatarFallback,
@@ -137,7 +137,7 @@ import {
137
137
  MessageList,
138
138
  ThinkingIndicator,
139
139
  UserMessage
140
- } from "./chunk-BQVQGDDV.js";
140
+ } from "./chunk-KHO7DYXH.js";
141
141
  import {
142
142
  useAutoScroll,
143
143
  useRunCollapseState,
@@ -147,16 +147,16 @@ import "./chunk-47XH56SV.js";
147
147
  import {
148
148
  ToolCallFeed,
149
149
  parseToolEvent
150
- } from "./chunk-V6BF4AZ7.js";
150
+ } from "./chunk-KBOD47AW.js";
151
151
  import {
152
152
  InlineThinkingItem,
153
153
  RunGroup
154
- } from "./chunk-KWRLQ3MR.js";
154
+ } from "./chunk-HHYUPAOJ.js";
155
155
  import {
156
156
  ExpandedToolDetail,
157
157
  InlineToolItem,
158
158
  LiveDuration
159
- } from "./chunk-WVW4KHEH.js";
159
+ } from "./chunk-INMWNFAS.js";
160
160
  import {
161
161
  TOOL_CATEGORY_ICONS,
162
162
  formatBytes,
@@ -44,7 +44,7 @@ import {
44
44
  UploadProgress,
45
45
  useTheme,
46
46
  useToast
47
- } from "./chunk-XY2FP763.js";
47
+ } from "./chunk-XZFJAF6G.js";
48
48
  import {
49
49
  Avatar,
50
50
  AvatarFallback,
package/dist/run.js CHANGED
@@ -2,16 +2,16 @@ import "./chunk-47XH56SV.js";
2
2
  import {
3
3
  ToolCallFeed,
4
4
  parseToolEvent
5
- } from "./chunk-V6BF4AZ7.js";
5
+ } from "./chunk-KBOD47AW.js";
6
6
  import {
7
7
  InlineThinkingItem,
8
8
  RunGroup
9
- } from "./chunk-KWRLQ3MR.js";
9
+ } from "./chunk-HHYUPAOJ.js";
10
10
  import {
11
11
  ExpandedToolDetail,
12
12
  InlineToolItem,
13
13
  LiveDuration
14
- } from "./chunk-WVW4KHEH.js";
14
+ } from "./chunk-INMWNFAS.js";
15
15
  import "./chunk-ULDNFLIM.js";
16
16
  import "./chunk-AAUNOHVL.js";
17
17
  import "./chunk-52Y3FMFI.js";
package/dist/sdk-hooks.js CHANGED
@@ -5,15 +5,15 @@ import {
5
5
  useSSEStream,
6
6
  useSdkSession,
7
7
  useToolCallStream
8
- } from "./chunk-IVQYFG5D.js";
8
+ } from "./chunk-CCM2KRQH.js";
9
9
  import "./chunk-OEX7NZE3.js";
10
10
  import {
11
11
  useAutoScroll,
12
12
  useRunCollapseState,
13
13
  useRunGroups
14
14
  } from "./chunk-AZWDI2JG.js";
15
- import "./chunk-V6BF4AZ7.js";
16
- import "./chunk-WVW4KHEH.js";
15
+ import "./chunk-KBOD47AW.js";
16
+ import "./chunk-INMWNFAS.js";
17
17
  import "./chunk-ULDNFLIM.js";
18
18
  import "./chunk-AAUNOHVL.js";
19
19
  import "./chunk-ZRVH3WCA.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/ui",
3
- "version": "9.1.2",
3
+ "version": "10.0.0",
4
4
  "description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -132,7 +132,7 @@
132
132
  "react": "^18 || ^19",
133
133
  "react-dom": "^18 || ^19",
134
134
  "react-router": "^7",
135
- "@tangle-network/brand": "^0.8.1"
135
+ "@tangle-network/brand": "^0.9.0"
136
136
  },
137
137
  "peerDependenciesMeta": {
138
138
  "@nanostores/react": {
@@ -265,9 +265,14 @@ export function AgentTimeline({
265
265
  return (
266
266
  <div className={cn("mx-auto w-full max-w-5xl px-4 py-4", className)}>
267
267
  {renderedItems.map((item, index) => {
268
- // User messages: right-aligned bubble, no connector
268
+ // User messages: right-aligned bubble, off-spine — needs its own vertical
269
+ // rhythm so it doesn't sit flush against the status/tool/agent row below.
269
270
  if (item.kind === "message" && item.role === "user") {
270
- return <UserMessage key={item.id} content={item.content} timestamp={item.timestamp} />;
271
+ return (
272
+ <div key={item.id} className="mt-6 mb-4 first:mt-0">
273
+ <UserMessage content={item.content} timestamp={item.timestamp} />
274
+ </div>
275
+ );
271
276
  }
272
277
 
273
278
  const timelineIndex = timelineItems.indexOf(item);
@@ -21,7 +21,7 @@ export function ThinkingIndicator({ className }: ThinkingIndicatorProps) {
21
21
  <span className="h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]" style={{ animationDelay: "300ms" }} />
22
22
  </div>
23
23
  {elapsed > 3 && (
24
- <span className="text-[var(--font-size-xs)] tabular-nums text-[var(--text-dim)]">
24
+ <span className="text-[var(--font-size-xs)] tabular-nums text-muted-foreground">
25
25
  {elapsed}s
26
26
  </span>
27
27
  )}
@@ -93,6 +93,11 @@ interface ToastContainerProps {
93
93
  export function ToastContainer({ toasts, onDismiss }: ToastContainerProps) {
94
94
  return (
95
95
  <div
96
+ // A generic div can't carry aria-label (WCAG 4.1.2 / axe
97
+ // aria-prohibited-attr); role="region" makes it a valid, navigable
98
+ // landmark. Live announcement stays on each toast (role="alert"
99
+ // aria-live="polite"), so the region itself is not a live region.
100
+ role="region"
96
101
  className="fixed right-4 bottom-4 z-50 flex max-w-md flex-col gap-2"
97
102
  aria-label="Notifications"
98
103
  >
@@ -118,7 +118,7 @@ export const InlineToolItem = memo(
118
118
  <div className="flex items-center gap-2.5 px-3 py-2.5">
119
119
  <div className={cn(
120
120
  "shrink-0",
121
- isRunning && "text-primary",
121
+ isRunning && "text-[var(--accent-text)]",
122
122
  isComplete && "text-[var(--surface-success-text)]",
123
123
  isError && "text-[var(--surface-danger-text)]",
124
124
  !isRunning && !isComplete && !isError && "text-muted-foreground",
@@ -156,7 +156,7 @@ export const InlineToolItem = memo(
156
156
  </span>
157
157
  ) : null}
158
158
  {isRunning ? (
159
- <span className="text-[10px] font-medium text-primary">
159
+ <span className="text-[10px] font-medium text-[var(--accent-text)]">
160
160
  running
161
161
  </span>
162
162
  ) : null}