@artooi/ag-ui-web-component 0.33.0 → 0.34.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
@@ -7,6 +7,98 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.34.0] — 2026-09-03
11
+
12
+ ### Added
13
+
14
+ - **The open panel moves by its header**, the way a window moves by its title
15
+ bar. The collapsed launcher has been draggable since 0.33.0 and the panel was
16
+ not, so a chat sitting over the thing it was being asked about could only be
17
+ moved by collapsing it first.
18
+
19
+ It is one widget being moved, not two things being placed: **the launcher
20
+ travels the same distance the panel does**, so a panel dragged 100px left
21
+ leaves the bubble it collapses into 100px left of where it was. The distance
22
+ is the panel's own rather than the pointer's -- a panel held against the
23
+ viewport's margin stops, and the bubble stops with it -- and the bubble is
24
+ then held on screen in its own right.
25
+
26
+ A stated position is also kept rather than re-derived, which is the whole
27
+ difference between the two drags. A launcher drag says where the bubble goes
28
+ and leaves the panel to open into whatever room the viewport has, re-decided
29
+ on every expand and every window resize; a header drag states the panel's own
30
+ position, so it survives collapsing, reopening and reloading, and dragging the
31
+ bubble again hands the decision back. Which corner the panel is pinned by is
32
+ re-picked when the drag ends, from where the bubble ended up, so the next
33
+ expand still opens into clear space -- and re-picking it moves nothing, since
34
+ both insets are written from positions that are already decided. Stored per
35
+ tab like the launcher's own position, and off under
36
+ `data-launcher-drag="false"` along with the launcher drag.
37
+
38
+ A press that starts on a control in the header stays that control's, including
39
+ one a host slotted in. There is no keyboard shortcut on the header on purpose:
40
+ a header is not a control, and making it focusable would put a tab stop with
41
+ no role ahead of the controls a keyboard user came for, while arrow keys on
42
+ the collapsed launcher already move the widget, panel included.
43
+
44
+ ### Fixed
45
+
46
+ - **A chart no longer grows with the panel.** Widening the panel used to resize
47
+ what was already in it: the renderer drew into a fixed 480x220 viewBox, the
48
+ block stretched to the transcript's full width, and `width: 100%` scaled the
49
+ drawing to fit it. In a 1100px panel the axis labels came out **3.25x** the
50
+ size they are at the default width and the chart stood **489px** tall, pushing
51
+ the answer it belonged to off the screen.
52
+
53
+ Two separate things were wrong, and both are fixed:
54
+
55
+ - **It was magnified rather than sized.** Geometry is now computed for the
56
+ width the block actually has, one SVG unit per CSS pixel, and recomputed
57
+ when that width changes -- so a 10px axis label is 10px at every size,
58
+ including the narrow end, where the old drawing was shrunk to 7px in the
59
+ default 380px panel. Height follows width inside a 160-320px band, and the
60
+ 480px width draws exactly the frame it always did. Where the labels no
61
+ longer fit, every second or third is drawn rather than a smear of
62
+ overlapping words -- a new answer to a collision that was there at every
63
+ size before. Below 220px the drawing scales down as it used to, since at
64
+ that width nothing fits either way.
65
+ - **It was stretched rather than sized too.** The block now takes the width it
66
+ needs and stops, capping at the new `--ag-ui-chart-max-width` (**480px**),
67
+ the way a message bubble caps rather than filling the panel. Raise the token
68
+ for a bigger chart and the labels stay 10px: the cap decides how much room
69
+ the drawing gets, never how big its type is.
70
+
71
+ ## [0.33.1] — 2026-09-03
72
+
73
+ ### Fixed
74
+
75
+ - **A markdown table in an answer scrolled, at last.** The stylesheet has always
76
+ said a wide table should scroll inside its own box, and it never could:
77
+ `.message` set `word-break: break-word`, which is the legacy spelling of
78
+ "break anywhere", and breaking anywhere drops the **min-content width** of
79
+ every descendant to a single character. A table's column algorithm takes
80
+ min-content as an input, so the table always fitted `max-width: 100%`, the
81
+ `overflow-x: auto` beneath it never had anything to scroll, and the columns
82
+ absorbed the pressure by rendering one letter per line instead. A seven-column
83
+ header row came out **162px tall**.
84
+
85
+ It is now `overflow-wrap: break-word`, which breaks a word only when it would
86
+ otherwise overflow its line and leaves min-content alone. Same protection
87
+ against a long unbroken token blowing out a bubble -- which is all the
88
+ declaration was ever for -- and the table is free to be wider than the panel
89
+ and scroll. Measured at the default 380px panel: the header row drops from
90
+ 162px to 50px, the table from 524px to 189px, the narrowest column from 36px
91
+ to 63px, and `scrollWidth` finally exceeds `clientWidth` (563 against 266).
92
+
93
+ Reported against 0.32.0 and present at least as far back as 0.27.0, so this is
94
+ not a recent regression. Thanks to the TrustPoint team for the measurements
95
+ and the revert control, which is what pinned the cause to one declaration.
96
+
97
+ The three other `word-break: break-word` declarations are untouched: they are
98
+ on `.thoughts-body`, `.tool-call-result` and `.confirm-args`, all of which are
99
+ filled with `textContent` and so cannot contain a table.
100
+
101
+
10
102
  ## [0.33.0] — 2026-09-02
11
103
 
12
104
  ### Added
@@ -2809,7 +2901,9 @@ hosts that both arrange the page the way it expects.
2809
2901
  ### Notes
2810
2902
  - First release — exercising the automated npm OIDC publish pipeline end-to-end.
2811
2903
 
2812
- [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.33.0...HEAD
2904
+ [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.34.0...HEAD
2905
+ [0.34.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.33.1...v0.34.0
2906
+ [0.33.1]: https://github.com/Artui/ag-ui-web-component/compare/v0.33.0...v0.33.1
2813
2907
  [0.33.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.32.0...v0.33.0
2814
2908
  [0.32.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.31.1...v0.32.0
2815
2909
  [0.31.1]: https://github.com/Artui/ag-ui-web-component/compare/v0.31.0...v0.31.1
package/README.md CHANGED
@@ -183,7 +183,7 @@ another origin, add `credentials="include"` too; see
183
183
  | `data-icon-url` | — | Header (and launcher) icon image URL. A slotted `slot="icon"` wins; see [Header & launcher icon](#header-and-launcher-icon). |
184
184
  | `data-launcher-icon-url` | — | Icon image URL for the collapsed launcher only, when it should differ from the header's. Falls back to `data-icon-url`; a slotted `slot="launcher"` wins over both. |
185
185
  | `data-unread-badge` | — | **On by default.** `="false"` hides the launcher's unread badge; the count and the `ag-ui-unread` event keep running. See [Collapsing to the launcher](#collapsing-to-the-launcher). |
186
- | `data-launcher-drag` | — | **On by default.** `="false"` leaves the collapsed launcher wherever your CSS puts it. Otherwise it can be dragged anywhere on screen and the panel opens into the clearest space. See [Moving the launcher](#moving-the-launcher). |
186
+ | `data-launcher-drag` | — | **On by default.** `="false"` leaves the widget wherever your CSS puts it. Otherwise the collapsed launcher can be dragged anywhere on screen (the panel opens into the clearest space) and the open panel can be dragged by its header. See [Moving the launcher](#moving-the-launcher) and [Moving the panel](#moving-the-panel). |
187
187
  | `data-quote-selection` | — | **On by default.** `="false"` stops the transcript offering to quote a selection. `quote()` keeps working either way. See [Quoting a selection](#quoting-a-selection). |
188
188
  | `data-message-actions` | — | **All on by default.** A comma list of the actions a finished answer keeps: `copy` / `retry` / `feedback` (e.g. `"copy,retry"`). `="false"` removes the row entirely. See [Message actions](#message-actions-copy-retry-feedback). |
189
189
  | `data-max-tool-rounds` | — | Upper bound on frontend tool-call → re-run rounds within one send (default 10; a value below 1 is ignored). Raise it for a page-driving agent whose turn takes many small steps. See [The run loop](#the-run-loop-and-the-ag-ui-client). |
@@ -997,6 +997,34 @@ against a placement. Switching to a placement that places itself hands both back
997
997
  > property and your CSS decides, exactly as before. The geometry is built so that feeding it the
998
998
  > resting position reproduces the default `auto 24px 24px auto` unchanged.
999
999
 
1000
+ #### Moving the panel
1001
+
1002
+ An open panel moves by its **header**, the way a window moves by its title bar.
1003
+
1004
+ **The launcher travels the same distance.** Drag the panel 100px left and the bubble it collapses
1005
+ into is 100px left of where it was — it is one widget being moved, not two things being placed.
1006
+ The distance is the panel's own, so a panel held against the viewport's margin stops and the
1007
+ bubble stops with it, and the bubble is then held on screen in its own right.
1008
+
1009
+ **A position you state is kept, not re-derived.** That is the difference between the two drags: a
1010
+ launcher drag says where the bubble goes and lets the panel open into whatever room the viewport
1011
+ has, which is re-decided on every expand and every window resize; a header drag states the
1012
+ panel's own position, so it survives collapsing, reopening and reloading. Dragging the bubble
1013
+ again hands the decision back. Both are stored per tab, and `data-launcher-drag="false"` turns
1014
+ off both.
1015
+
1016
+ Which corner the panel is *pinned* by is re-picked when the drag ends, from where the bubble has
1017
+ ended up, so the next expand still opens into clear space. Re-picking it moves nothing: the
1018
+ corner only says which edges the two insets are written from, and both are written from positions
1019
+ that are already decided.
1020
+
1021
+ The controls in the header keep their own presses — a drag started on a button, a link or a field
1022
+ never begins, including one you slot in.
1023
+
1024
+ There is no keyboard shortcut on the header, deliberately. A header is not a control, and making
1025
+ it focusable would put a tab stop with no role ahead of the controls a keyboard user came for —
1026
+ while arrow keys on the collapsed launcher already move the widget, panel included.
1027
+
1000
1028
  ```js
1001
1029
  chat.unread; // 2
1002
1030
 
@@ -1074,8 +1102,24 @@ label — a shorter one misaligns every value after the gap, and a chart that is
1074
1102
  subtly wrong still reads as authoritative, so the whole spec is dropped instead.
1075
1103
  A pie's slices are its labels, so it draws the first series only.
1076
1104
 
1077
- Theme the series with `--ag-ui-chart-1` … `--ag-ui-chart-6`, and style the block
1078
- through the `chart-block`, `chart-title` and `chart-legend` parts.
1105
+ Theme the series with `--ag-ui-chart-1` … `--ag-ui-chart-6`, size it with
1106
+ `--ag-ui-chart-max-width`, and style the block through the `chart-block`,
1107
+ `chart-title` and `chart-legend` parts.
1108
+
1109
+ **A chart stops at its own width, and is sized in pixels rather than scaled to
1110
+ them.** Two separate things, and a widened panel needs both.
1111
+
1112
+ It is drawn for the width the block actually has -- one SVG unit per CSS pixel
1113
+ -- and redrawn when that width changes, so a 10px axis label is 10px in a 380px
1114
+ panel and in a 1200px one. Where the labels no longer fit, the axis draws every
1115
+ second or third rather than a smear of overlapping words. Below 220px it goes
1116
+ back to scaling, since at that size nothing fits either way.
1117
+
1118
+ And it takes the width it needs rather than the width it is offered, capping at
1119
+ `--ag-ui-chart-max-width` (**480px**): widening the panel should no more resize
1120
+ a chart than it resizes a message. Raise the token for a bigger chart and the
1121
+ labels stay 10px -- the cap is about how much room the drawing gets, never
1122
+ about how big its type is. Height follows width inside a 160-320px band.
1079
1123
 
1080
1124
  ### Drawing something other than a chart
1081
1125