@artooi/ag-ui-web-component 0.49.0 → 0.50.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,126 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.50.0] — 2026-11-08
11
+
12
+ ### Changed
13
+
14
+ - **The themes demo sets `--ag-ui-header-btn-hover`.** A new control on its
15
+ page draws the header buttons' hover square in a colour you pick. The suite
16
+ now tests that square as a browser without relative colour syntax draws it,
17
+ mixed from the header text, which only a string check saw before. Demo and
18
+ tests only, nothing shipped changes. **A host has nothing to do.**
19
+
20
+ ### Fixed
21
+
22
+ - **A corner panel that was moved goes full-bleed on a phone, and stays there.**
23
+ Under `collapse-to="auto"`, a panel moved by its header, its launcher or
24
+ `moveTo` on a wide window kept an inline `--ag-ui-inset` when the window
25
+ narrowed below the small-viewport breakpoint, which held it 8px off two edges
26
+ and past the other two. It now fills the screen, with no inline inset, while
27
+ its launcher stays on the screen for when it is collapsed. A header drag no
28
+ longer moves a panel that is the screen, as `moveTo` already refused to, and its
29
+ cursor stops offering one. The
30
+ place the user put the panel is now kept as they stated it: a window that
31
+ narrows, by any amount, holds the panel inside it without changing the record,
32
+ and widening gives that place back, as a reload already did. A gesture made in
33
+ the narrower window states a new one. **A host has nothing to do.**
34
+ - **A corner panel remembers the corner a resize grip moved.** Under
35
+ `collapse-to="auto"`, growing a moved panel by a grip on its free edges, which
36
+ moves its top-left corner while the layout holds the opposite one, was lost on
37
+ the next reopen or reload: the panel came back at its old top-left, grown away
38
+ from its launcher. It now comes back as it was drawn, a host's maximum included,
39
+ and `resetSize()` keeps the panel where the size came off. The top-left stays as the
40
+ grip left it while the host's own `--ag-ui-width` or `--ag-ui-height` is in force at
41
+ that moment, and the stored spot stays as it was under `data-launcher-drag="false"`.
42
+ **A host has nothing to do.**
43
+ - **`read_chat_surface` reports the page's setting for `draggable`, whatever the
44
+ placement.** A sidebar, embedded, side, page or full panel under `collapse-to="auto"`
45
+ reported `draggable: false` with `movable: false`, so `move_chat` answered that
46
+ the page had turned off moving the panel when the placement owned its position,
47
+ while the same placement under `collapse-to="none"` or `"bar"` reported `true`.
48
+ `draggable` is now `true` for every placement unless the page sets
49
+ `data-launcher-drag="false"`, and whether this panel moves stays in `movable`.
50
+ The refusal names the placement. **A host has nothing to do.**
51
+ - **Every theme's header buttons follow `--ag-ui-header-fg`.** 0.49.0 did this
52
+ for Quiet alone, so the accent recipe still fell short under the others:
53
+ white on a `#3d5afe` header read 1.1 to 1.6:1 at rest under Soft and Ledger,
54
+ and 4.16:1 at rest and 3.75:1 hovered under Classic and code. Once a host sets
55
+ `--ag-ui-header-fg`, the buttons draw in it at full opacity under every theme
56
+ and scheme, and the hover square is the opposite of that text at 18%: that
57
+ pair now reads 5.13:1 at rest and 6.95:1 hovered under all of them. What
58
+ changes for a host that sets it, by theme. Soft: the glyph was the third ink,
59
+ the accent's ink hovered, on a square of `--ag-ui-tint-2`. Ledger: the glyph
60
+ was the third ink, the full ink hovered, on a square of `--ag-ui-hover`.
61
+ Classic and code: the glyph already was the header text, but at 0.85 opacity,
62
+ and the square was 18% white, so under white text it now darkens where it
63
+ lightened. Browsers without relative colour syntax (Firefox 120 to 127,
64
+ Safari 17.5 and 17.6) mix the square from the text itself, as under Quiet, at
65
+ 3.75:1 hovered for that pair.
66
+ **`--ag-ui-header-btn-hover`, inert until now under Soft, Ledger, Classic and
67
+ code, works under them**, as it does under Quiet: drawn exactly as given,
68
+ whether or not the header text is set. A host that set it for Quiet and also
69
+ wears one of these themes will now see it. With neither token set, every
70
+ theme's header buttons are exactly as they were, whatever the header colour
71
+ or `--ag-ui-hover`. **No opt-in is needed.** A page's own
72
+ `::part(header-button)` rules still win: a host that wrote one to get here may
73
+ delete it, and should at least delete a `:hover` background of 18% of the text,
74
+ which keeps the glyph at 3.75:1 on a mid-tone accent. A host that sets neither
75
+ token, the Django admin among them, sees no change.
76
+ - **A corner panel a host's own size makes the window stands at 0,0.** A host that
77
+ fills a wide window with `--ag-ui-width` and `--ag-ui-height` found a panel the
78
+ user had moved standing at 8,8 after a window resize, 8px past the right and
79
+ bottom edges. It now exactly fills the window, from the start of whatever the
80
+ viewport inset tokens reserve, as a
81
+ phone's full-bleed panel does, and comes back to where the user put it when the
82
+ host's size drops. A host's own `--ag-ui-inset` rule that already stands the box
83
+ on the screen is left alone. **A host has nothing to do.**
84
+ - **A panel placed only by a resize grip goes full-bleed on a phone.** A grip on
85
+ an edge the layout holds moves an unmoved corner panel without storing a spot,
86
+ and that inline inset stayed on when the window narrowed, which held the panel
87
+ off two edges and past the other two. It now fills the screen with no inline
88
+ inset, and widening gives the place back. An inset the host wrote inline stays
89
+ where the host wrote it. An unmoved panel a host's own size makes the window
90
+ stands at 0,0 as well. **A host has nothing to do.**
91
+ - **`data-launcher-drag="false"` on a moved panel hands it to the host's CSS.**
92
+ Turned on after the user had moved the panel, the attribute left an inline
93
+ inset behind for good, which put the panel off the screen on a phone. Nothing
94
+ moves when it goes on. The next window resize or reopen rests the panel where
95
+ the host's CSS puts it, as a reload under the attribute always did, and on a
96
+ phone that is full-bleed. The stored spot stays, and comes back at the first
97
+ restore after the attribute comes off. **A host has nothing to do.**
98
+ - **Undoing a move after the surface changed leaves everything in agreement.** A
99
+ move undone once the panel had gone from a corner to a sidebar, a side panel, a
100
+ page or a dock wrote the corner's inset back onto the new surface, which pinned
101
+ a sidebar or a page off the screen and took a docked panel off its dock, and
102
+ left the stored spot on the move the reader had just undone. Going the other way
103
+ left a docked panel's stored spot on the move too. The undo now puts both
104
+ records back, in memory and in storage, and leaves the new surface standing where
105
+ its own layout puts it; the spot comes back with the surface it belongs to.
106
+ **A host has nothing to do.**
107
+ - **A moved panel answers a host's size when the size changes.** A change to
108
+ `--ag-ui-width` or `--ag-ui-height` fires no event, so a panel the user had moved
109
+ stayed as the last restore left it until the next window resize or reopen. Reopened
110
+ under a host's size that then dropped, it stood short of its spot, at 716,232 for a
111
+ spot of 376,96, with the stored spot still right; sized up with no reopen, it could
112
+ grow past the top of the window. It now goes back to its spot as the size drops, and
113
+ under a bigger size it stands where a reopen already put it, held on the screen from
114
+ that spot, rather than growing away from the corner the layout held. A window-filling
115
+ size stands it at 0,0 at once, with no resize needed. **A host has nothing to do.**
116
+ - **A moved panel answers a viewport inset token when the token changes.** A page
117
+ that publishes `--ag-ui-viewport-inset-top` from its own `ResizeObserver`, as the
118
+ README recommends, does so after the window's resize event, so the restore that event
119
+ starts read the bar at its old height. Widening a window past the width where the bar
120
+ shrinks left the panel 35px below its spot on the playground, top 224 for a spot of
121
+ 189, and narrowing left it under a bar that had grown. It now settles from the token
122
+ as it stands, a frame later, on any of the four viewport inset tokens and however
123
+ late the page writes them. **A host has nothing to do.**
124
+ - **The header's cursor no longer offers a drag that cannot happen.** A panel that
125
+ had become the screen on a narrow window with a mouse, or a docked panel under
126
+ `collapse-to="bar"` or `"none"` that a host's own size had made the window, showed
127
+ `cursor: move` although its header could not move it. The cursor is now `auto` there,
128
+ and stays `move` everywhere the drag is allowed. **A host has nothing to do.**
129
+
10
130
  ## [0.49.0] — 2026-11-07
11
131
 
12
132
  ### Added
@@ -5048,7 +5168,8 @@ hosts that both arrange the page the way it expects.
5048
5168
  ### Notes
5049
5169
  - First release — exercising the automated npm OIDC publish pipeline end-to-end.
5050
5170
 
5051
- [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.49.0...HEAD
5171
+ [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.50.0...HEAD
5172
+ [0.50.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.49.0...v0.50.0
5052
5173
  [0.49.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.48.0...v0.49.0
5053
5174
  [0.48.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.47.0...v0.48.0
5054
5175
  [0.47.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.46.0...v0.47.0
package/README.md CHANGED
@@ -3330,7 +3330,8 @@ and set a mid-tone accent, set `--ag-ui-on-accent` yourself. There is no script
3330
3330
 
3331
3331
  Quiet draws the header, the launcher and the tool names in the panel's own colours, so a host that
3332
3332
  sets only `--ag-ui-accent` gets a neutral header. To put the accent back without leaving Quiet, set
3333
- the surfaces to the accent and the text on them to a colour that reads on it:
3333
+ the surfaces to the accent and the text on them to a colour that reads on it. The same recipe holds
3334
+ under every other theme:
3334
3335
 
3335
3336
  ```css
3336
3337
  ag-ui-chat {
@@ -3342,19 +3343,19 @@ ag-ui-chat {
3342
3343
  }
3343
3344
  ```
3344
3345
 
3345
- - **The header buttons follow `--ag-ui-header-fg`.** Unset, Quiet draws them in its third ink at
3346
- 0.85 opacity, on a hover square of the panel's hover shade. Once you set the header text they
3347
- draw in it at full opacity, and the hover square is the opposite of that text at about a fifth
3348
- (a darker square under white text, a lighter one under dark text), so a hovered button reads at
3349
- least what your header pair reads. The same holds under a theme word of your own, which starts
3350
- from Quiet. No `::part(header-button)` rule is needed. The opposite is computed with relative
3346
+ - **The header buttons follow `--ag-ui-header-fg`, under every theme.** Unset, each theme draws
3347
+ them its own way at 0.85 opacity: Quiet, Soft and Ledger in their third ink, Classic and Code in
3348
+ the header text, each on its own hover square. Once you set the header text they draw in it at
3349
+ full opacity, and the hover square is the opposite of that text at about a fifth (a darker square
3350
+ under white text, a lighter one under dark text), so a hovered button reads at least what your
3351
+ header pair reads. A theme word of your own starts from Quiet, so it holds there too. No
3352
+ `::part(header-button)` rule is needed. The opposite is computed with relative
3351
3353
  colour syntax; the browsers without it (see the fallback above) mix the square from the text
3352
3354
  itself, which on a mid-tone header can take the hovered glyph under your pair (white on
3353
3355
  `#3d5afe`: 3.75:1).
3354
- - **`--ag-ui-header-btn-hover` sets the hover square outright** under Quiet and a theme word of your
3355
- own, whether or not the header text is set, and is drawn exactly as given. Classic, Soft and
3356
- Ledger draw their own squares and do not read it. For a square that lightens under white text
3357
- instead, at the cost of contrast on a mid-tone header:
3356
+ - **`--ag-ui-header-btn-hover` sets the hover square outright** under every theme, whether or not
3357
+ the header text is set, and is drawn exactly as given. For a square that lightens under white
3358
+ text instead, at the cost of contrast on a mid-tone header:
3358
3359
 
3359
3360
  ```css
3360
3361
  ag-ui-chat { --ag-ui-header-btn-hover: color-mix(in srgb, #ffffff 18%, transparent); }
@@ -3362,8 +3363,7 @@ ag-ui-chat {
3362
3363
  - **`--ag-ui-tool-fg` colours every tool call**, in a step group as well as in the card displays.
3363
3364
  Unset, a grouped call is drawn in the second ink (`--ag-ui-ink-2`) under every theme.
3364
3365
  - Pick the pair yourself: `--ag-ui-header-fg` is not derived from the header colour the way
3365
- `--ag-ui-on-accent` is from the accent. Under Soft and Ledger the header buttons keep their own
3366
- third ink whatever you set.
3366
+ `--ag-ui-on-accent` is from the accent.
3367
3367
 
3368
3368
  #### Overriding a theme, lightest layer first
3369
3369