Skip to content

1.15.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 01:48
· 426 commits to main since this release

Breaking changes

  • A NumberField answers the wheel by default, through a prop now called wheel. allowWheelScrub was off, so the one gesture a spinner exists for did nothing until a caller went looking for the prop — and it was a second spelling of a question ScrollZone and Tabs already ask as wheel. It is wheel, and it is on. Both halves of what it asks still have to be true before anything happens: the field holds the focus and the pointer is over the number, so a reader who has not put the caret in the field scrolls the page over it exactly as before. Rename allowWheelScrub to wheel where it was passed, and pass wheel={false} for a field inside something that has to keep scrolling under a pointer resting on it.

Where the bytes went

What you import 1.14.0 1.15.0
Button 5.2 kB 5.1 kB
Chip 3.5 kB 3.4 kB
LineChart 12.7 kB 12.6 kB
CodeBlock 5.6 kB 5.5 kB
Image 8.9 kB 8.8 kB
Gallery 11.8 kB 11.7 kB
a whole page shell 30.0 kB 30.0 kB
12 components — a typical app 71.6 kB 71.6 kB
12 components, with Korean 75.0 kB 75.6 kB
25 components — a large one 118.5 kB 118.7 kB
all exports 279.8 kB 286.6 kB

Six rows went down, and all six by the same tenth of a kilobyte: three shared class strings in internal/styles.ts were […].join(' '), and a bundler cannot drop a const whose value is a call. Every component carried all three whether it read them or not. Written with + they fold at build time and drop, which is why a single-component bundle is smaller in a release that added nine components.

All exports grew 6.8 kB, and no runtime dependency was added. That is the agent group: PromptInput at 5.2 kB of its own code down to StreamingText at 1.2 kB, plus internal/run.tsx and internal/glow.ts, less the fold above. InlineCitation is the one to know about — its preview is a HoverCard, so a citation in a paragraph costs about 35 kB with Base UI's floating machinery, which is why the number is the same whether a page draws one or forty.

Registering a language costs 3.4 kB still; the extra 0.6 kB on that row is the six new message namespaces the agent components read, in Korean.

neba/styles.css is 24.5 kB gzipped against 24.1 kB. It carries the two keyframes a StreamingText word and its caret arrive on, and the classes the nine components use.

neba/a2ui and neba/a2ui/catalog.json are in none of these rows, and that is the point: neither is re-exported from neba, so a bundler walking the package never reaches them. The catalog is 58 kB of the tarball and 0 kB of any bundle.

Added

  • An A2UI renderer to go with the catalog, as neba/a2ui. createNebaCatalog() returns a Catalog for @a2ui/react's v0.9 surface with the eighteen components implemented against this library and the protocol's own fourteen functions registered, so an agent's JSON comes out as Neba components with nothing in between to write.

    The Zod schemas the renderer binds against are derived from catalog.json at load time, rather than written a second time. A hand-written mirror is a mirror that drifts, and the copy that drifts is the one the agent was never told about: a model writing exactly what the JSON allows and a renderer rejecting it. The converter handles the subset the catalog uses and throws on anything else, rather than quietly returning z.any() for a construct it has not met.

    The functions are @a2ui/web_core's own. required, formatCurrency and the rest are the protocol's semantics rather than this library's, and a second implementation of them would be a second chance to disagree with the agent about the one thing both sides have to read the same way.

    @a2ui/react, @a2ui/web_core and zod are optional peer dependencies, which is safe here because neba/a2ui is not re-exported from neba — a bundler walking the package never reaches it, so a project that imports Button and has never heard of A2UI resolves nothing new. Nothing about any bundle moved.

  • An A2UI catalog, as neba/a2ui/catalog.json. A2UI is the protocol for an agent describing an interface as JSON that the host renders with the host's own design system, and a catalog is how the two sides agree on the vocabulary. This one is written against v1.0 and is also served from the URL it names itself by, https://neba.cdget.com/a2ui/catalog.json.

    Eighteen components and the specification's fourteen functions. Eighteen is the Basic Catalog's count and the number is the decision rather than an accident: a model chooses badly from a list of a hundred and thirty-eight, and what is left out is everything whose useful props are functions, ReactNodes or render props. The names are the library's own, which makes a host's mapping a lookup rather than a translation, and the instructions field carries the four things a screen gets wrong without being told — that nothing has a margin, that colour is semantic, that size is one ladder, and that a field draws its own label and its own error.

    The catalog is JSON, so it never enters a bundle and npm run size does not move; what it costs is about 57 kB of the tarball. Take it alone and the mapping to your components is yours — or take neba/a2ui below and it is already written.

  • ToolCall — one tool invocation in an agent transcript: the name, what it was called with, what came back and how long it took, with everything but the header folded away behind it. status is the new shared NebaRunStatus — pending, running, success, error — and each of the four gets its own shape as well as its own colour, so a reader who cannot tell the two reds apart still has a dashed ring, a turning ring, a tick and a cross. color decides only what a running call looks like: a failed one is danger and a finished one is success on every ToolCall on the page, because a red row that meant the product's accent colour would have spent the one signal it had.

    A string args or result goes into a <pre> with its own line breaks kept, since indented JSON, a stack trace and a diff all mean something by where their lines break; anything else is rendered as the node it is. Leave duration out and a running call counts its own seconds, saying nothing for the first one and stopping the moment a real figure arrives. And a call that fails opens itself, unless open is holding it — a reader should not have to go looking for the reason something did not work.

  • Approval — the agent asking permission, and the record of what was answered. A Confirm and a Popconfirm are opened by the reader, offer two answers, and are gone the moment one is taken; this is opened by the agent, offers as many as the agent has, and stays, because a transcript in which the question disappears once it is answered cannot be read back to find out what was agreed to. risk is low, medium or high, written out as a word on a chip and never as a colour alone, and it takes over the card's family.

    No option is emphasised by default. Every button is outline in the card's family and an option's own variant is how one is singled out — a permission request whose loudest button is "Allow" is a request answered by the shape of the buttons rather than by the reader.

  • Reasoning — a thinking panel that the stream opens and closes. On a Spoiler and a Collapsible the reader owns the open state; here the stream does, which is the whole of what the component is for: the panel fills while the model is working, folds itself away when the working stops, and leaves one line saying that it happened and how long it took. It follows the edges of streaming rather than its value, so a reader who folds it away mid-stream is not overruled on the next token, and one that mounts mid-stream starts open because no edge is coming to open it.

    variant defaults to text here and nowhere else in the library: thinking is an aside, and a bordered box around every aside in a conversation is a conversation made of boxes. The panel is deliberately not a live region — thinking is long and is revised as it arrives, and a screen reader reading every revision aloud would bury the answer it is on the way to.

  • AgentSteps and AgentStep — a chain of steps that grows as it runs. A Timeline and a HowToSteps draw a list that is known in advance; this one does not know how many items it has, so a step's place is not a prop and appending or inserting one renumbers nothing. running draws one more marker under the last step for the case where the next step has no name yet, with no visible label, because the turning ring has already said what it is and the status is read out either way.

    A step takes the same NebaRunStatus a ToolCall does, and the same four marks; success is its default, since a step that is already in the list has usually already run. Its children hold whatever it did — a query, a file, a whole ToolCall.

  • ContextWindow — how much of the context window has gone, and what went into it. A Meter draws the same reading as a bar and would do most of it; what it cannot do is the part that makes this a component: token counts are five and six digits long and have to be written compactly in the reader's own language, the split into input, output, reasoning and cached only means anything with the four next to each other, and the money underneath is a third unit again. used defaults to input plus output plus reasoning; cached is drawn as a row and never added, because every model that reports it means "this much of the input came out of a cache" and counting it twice would report the window as fuller than it is. A part that is 0 is still reported — a cache that returned nothing is a different fact from a model that has no cache.

    The four parts take the first four chart palette slots rather than four colour families, because input and output are entities and nothing about either means success or danger. Base UI's Meter owns the semantics, and aria-valuetext is the same compact sentence the gauge draws rather than a percentage of a range nobody described.

  • Sources and InlineCitation — the list of things an answer was built out of, and the numbered footnote in the body that points into it. A List would draw the rows; what makes this a component is that they are numbered, and numbering a list by hand is numbering it twice — once in the list and once in every sentence that cites it, which is the copy that goes wrong. The two marks are one class in internal/styles.ts for the same reason, so a reader who sees 2 in a paragraph finds 2 underneath.

    A citation's index is the caller's rather than counted, because a citation sits in a paragraph and the list is elsewhere on the page — a component that numbered itself by render order would renumber the whole answer whenever a sentence moved. The preview is a HoverCard, so it opens on keyboard focus and not only under a pointer, and the mark's accessible name is the sentence "Source 2" rather than the digit. Both go through the same safeHref and safeRel every other link in the library does.

  • StreamingText — text arriving from somewhere else, a piece at a time. AnimateTyping types out a string it already has; this is the opposite direction, where nobody knows how long the answer will be and the job is to make it land without the page moving under whoever is reading it. The block holds a floor of lines before the first word arrives and keeps holding it afterwards, because a reservation given up on arrival is the same jump twice; each word fades in on its own, because a transition on the block would replay the entire answer every time a token landed; and a caret sits at the end until the stream stops.

    The fade needs no bookkeeping at all: words are keyed by position, so one already on screen keeps its element and never animates again, and the last word grows a character at a time inside the element it already has. It is deliberately not a live region, and it has no size — what it draws is the caller's own text inside the caller's own block.

  • PromptInput — everything a prompt goes out through: the text, the attach and model controls, and one button that sends and then stops. A multiline TextField plus a Toolbar gets the shell; what it does not get is the three things that were being rewritten at every call site — a field that grows with what is typed and then stops growing, a send button that becomes a stop button without moving, and Enter meaning send while Shift+Enter means a new line.

    It is one button and never two, because what a reader reaches for to stop an answer is exactly where they last pressed to start it. Neither key fires while an input method is composing: a Korean or Japanese reader pressing Enter to accept a candidate is finishing a word, and a field that read that as a send would make the language unusable. onSubmit deliberately does not clear the field — a message that failed to send should still be there.

Changed

  • The pointer light is on every surface it belongs on, rather than on four of them. A Button, a Toggle and a Pill had it; the field shells, the segments, the tabs, the menu rows and the file drop zone did not, so a form and a menu answered the pointer differently from the button beside them. internal/glow.ts is the two lines that tell the layers where the pointer is, and the design language now states where the light goes: on a surface the pointer can act on as a whole — a control, or a field's shell — and never on a row of somebody else's content or on anything an 88px bloom is too big to describe, which is what keeps it off a ListItem, an Accordion header, a tick and a Slider.

    A press takes both layers; something that is merely entered takes the spotlight alone — a field the caret goes into, a menu row that is gone before a nine-hundred-millisecond flash is a third of the way out, a tab whose panel is already being read.

    It costs nothing a page will notice: pointermove is already coalesced to one per frame, the two properties are written straight to the element so React never re-renders, what changes is where a gradient is centred rather than anything that lays out, only the hovered element paints at all, @media (hover: hover) keeps it off a touch screen and prefers-reduced-motion drops both layers.

  • Every shared class string in internal/styles.ts is folded at build time. Three of them were […].join(' '), and a bundler cannot drop a const whose value is a call — so transitionClasses, popupFadeClasses and chipRemoveClasses were in the bundle of every component whether it read them or not. Written with + they fold and drop, which takes about 0.1 kB gzipped off a single-component bundle. Nothing about the classes themselves changed.

  • The last four focus rings in the library fade in with the rest of them. A ColorPicker's hex field, a grouped DataTable's fold button, a Gallery tile and an Image that opens a preview each wrote [outline:none] beside the ring they draw — two outline declarations of equal specificity, decided by the order Tailwind happened to generate them in, which is the mistake the design notes name. They take the house transition instead, which declares the resting ring the colour travels from and is what takes the browser's own outline off.

Fixed

  • A Pill's spotlight follows the pointer. It carried neba-glow and never wrote the two slots the layers read, so the bloom sat in the middle of the lozenge and stayed there.

  • The pointer light is measured from the surface rather than from whatever is under the pointer. offsetX is relative to the event's target, so it was the control's own offset only while every descendant was pointer-events: none — true of a Button's icons, and false the moment a caller wrapped the label in an element of their own, which put the bloom inside the label instead of on the button.

  • A PromptInput's drop target puts its ready state out when a drag is abandoned. Escape cancels a drag, and a drop outside the window ends it somewhere the shell never hears about; neither fires a dragleave on it, so the shell stayed lit until some later drag happened to balance the count. internal/drop.ts is the whole drop zone now — the folder check, the depth count and the document listeners that clear it — and a FilePicker reads the same one. Nothing changes for a FilePicker, which already had all three.

  • An Accordion section respects a reduced-motion preference. Its panel carried the height transition without the motion-reduce line the Collapsible's had, so a reader who asked for less motion watched the section unfold anyway. Both read one string from internal/styles.ts now, along with the three agent components built on the same primitive.

  • A FilePicker's folder check is now internal/drop.ts, which a PromptInput reads too. A folder dragged onto a page arrives in dataTransfer.files as a File with no type and a size of zero, and the only thing that says so is webkitGetAsEntry on the item rather than on the file. Nothing changes for a FilePicker; the second caller is the new one, and a second copy of the check would eventually have disagreed about folders.

  • An Anchor with a container scrolls that container when a row is pressed. The rows are real fragment links, so the browser answered them: it scrolled the box, and then scrolled every ancestor of the box as well so the box would be in view — dragging the whole page under a reader to land a heading they could already see. It also knows nothing about offset, so the heading arrived underneath whatever sticky bar the offset describes. A row now scrolls the container itself, lands the heading below the offset, and moves the focus there, which is what the prevented fragment jump would have done. The URL's fragment is left alone, and an Anchor without a container still leaves the click to the browser.

  • An off Switch shows its thumb on the light theme. The track drew the same --neba-panel every other resting surface does, which is white laid on the page — so it came out lighter than what it sits on, under a thumb that is --neba-surface, which is white. The disc that says where the switch is read at 1.02:1 against the track it runs along, and an off switch looked like an empty pill. The track now reads --neba-groove, a new token that darkens the page rather than brightening it, the way a groove does. Nothing moves on the dark theme, where the panel was already darker than the thumb and the groove is its two steps exactly.

  • A Radio's dot sits on whole pixels inside its ring. The ring is an even box with a 1px border on each side, so what centres the dot is an even content box — and the dot was 5, 7 and 9 pixels across at xs, md and xl. An odd dot in an even box leaves a half-pixel on every side and is drawn half a device pixel out of step with the ring around it, which reads as a dot pushed off centre. The three grow by a pixel, to 6, 8 and 10; sm and lg were already even and do not move.

  • A focus ring fades in rather than stepping through two widths. The ring travelled on outline-width, and a browser rounds an outline to a whole device pixel: from the first frame past zero it was already a full 1px ring, it held there for the whole 160ms, and it snapped to 2px at the end. Two jumps with a dead interval between them, which is what made every field in the library look like it stuttered into focus. The house transition carries outline-color now, and the resting ring is declared transparent — so what moves is a colour, which has 256 steps and rounds to none of them. The resting width stays at zero, so a forced palette still has nothing to paint, and the ring goes at once when the focus leaves. The resize handles on Sidebar and Panes lose the [outline:none] they carried beside their ring, which is the mistake the design notes already described.


Every release is in the changelog on the docs site and in CHANGELOG.md at this tag.