Skip to content

Version Packages - #1349

Merged
tenphi merged 1 commit into
mainfrom
changeset-release/main
Aug 25, 2026
Merged

Version Packages#1349
tenphi merged 1 commit into
mainfrom
changeset-release/main

Conversation

@tenphi

@tenphi tenphi commented Aug 24, 2026

Copy link
Copy Markdown
Member

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@cube-dev/ui-kit@0.167.0

Minor Changes

  • #1350 ee97f365 Thanks @tenphi! - Board: corner-anchored widget chrome, app-defined widget modifiers, a reason on onLayoutChange, and a real dragCancel default.

    • dragCancel now defaults to BOARD_SELECTION_CANCEL instead of no cancel at all. A control inside a widget has to keep its own press whether or not the board happens to support selection — previously that only worked on a selectable board, where selectionCancel incidentally doubled as the drag guard, so every other board had to hand-write a selector or a pointer-down on a child's button would drag the widget instead. Pass your own selector to narrow or widen it, or '' for the old behaviour.
    • cornerChrome (with cornerChromePlacement, default 'ne') puts a control on a widget's corner, centred on it. It renders in the same layer as the corner resize grips, which is the layer that escapes the widget's own overflow: hidden — chrome hung off the corner from inside a widget is cropped in half by that clip, or by an ancestor's scroll container when the widget sits in the first row. Being outside the widget host, it is also outside the drag gesture, so pressing it can never start a drag and it needs no dragCancel entry.
    • mods on Board.Widget (and board-wide via widgetProps) merges app-defined modifiers into the ones the board sets, so a styles map can match on app state (mods={{ editing: true }} with styles={{ shadow: { editing: '…' } }}) instead of the app swapping whole style objects per state. Board's own modifiers are applied last, so a custom one can never shadow selected, drag and the rest, which the board's styling and its accessibility wiring both depend on.
    • onLayoutChange now reports why the layout changed'drag', 'resize', 'transfer', or 'normalize' for the commits no gesture caused (a reflow for a changed column count, an isAutoHeight widget growing). An app that persisted every commit had no way to tell a user's edit from the board fitting itself to a constraint that moved, so it wrote the reflow back as an edit and marked a document dirty nobody touched. The argument is additive: existing one-parameter handlers keep working.

    The docs also now explain that widget style maps are merged: a map with no '' entry extends the defaults, while one that sets '' replaces them and needs '@inherit' to keep any. Reaching for '': false to switch a single state off is the easy mistake — it silently takes selected, pre-selected and the drag lift with it.

  • #1351 2caf1072 Thanks @tenphi! - New: resolveTokenValue(), resolveTokenValues() and resolvePresetValues(), plus the useTokenValue() / useTokenValues() / usePresetValues() hooks — a supported way to ask the kit for a design token's resolved value, for consumers rendering into a surface our stylesheets do not reach: a third-party iframe (Stripe Elements), a CodeMirror or Monaco theme, a chart spec. Those take colors, lengths and font descriptors as values, and var(--purple-color) means nothing to them.

    Reading tokens off getComputedStyle() by hand fails silently. Root declares the token block on <body>, so <html>, a detached node, and a tree that has not mounted Root yet are all outside it — and a token read from outside does not come back empty, it comes back as tasty's registered @property default. Some of those are obvious duds (rgba(0, 0, 0, 0), 0px), but many are ordinary-looking values that are merely wrong: --gap reads 4px rather than the kit's 8px, --transition reads 80ms, --radius reads 6px. So the helpers do not inspect the value. They read $tokens-applied, a new marker the token block declares alongside the tokens, and use it to answer the only question that settles the matter — are the kit's tokens in effect on this element? Off that surface every read returns null (or an explicit fallback) and warns once in development; on it, the computed value is the truth, so a token that genuinely is transparent or 0px#clear, #scrollbar-outline, $h2-letter-spacing — comes through intact. The hooks re-resolve when the palette is re-seeded or the scheme / contrast tier flips, and match the server's markup while hydrating.

    All six take { element, fallback } — pass element to resolve against a local override (a subtree with its own tokens prop, or one under a differing data-schema) instead of the document.

  • #1345 8fdee382 Thanks @tenphi! - Update Tasty to 3.3.1 (from 3.1.0). Three things come with it.

    Color tokens no longer emit companion channel variables, and colorSpace is deprecated. A #name token used to declare --name-color plus a decomposed companion — --name-color-rgb here, since the kit configured colorSpace: 'rgb' — and only the companion is gone: --name-color is emitted exactly as authored. Opacity has used CSS relative color syntax since 3.1.0, so nothing inside Tasty needed the channels any more. If your own CSS reads a companion — rgb(var(--primary-color-rgb) / .2) and the like — it silently stops resolving. Rewrite it against the token itself: oklch(from var(--primary-color) l c h / .2), which works on any color, including the ones no build-time conversion could evaluate. configure({ colorSpace }) now warns in development and does nothing; the kit no longer sets it. One more consequence worth planning for: a token is emitted in the space it was authored in, so getComputedStyle(el).backgroundColor now returns oklch(…) / oklab(…) where it used to return rgb(…). The color is the same, but any test or code that parses those strings by hand has to stop assuming sRGB syntax.

    The inherited color is now readable as a color, through $current-color. #current keeps emitting the currentcolor keyword, so it still resolves against the element that reads it — which is what lets a ramp express its disabled state once, in color, and have everything painted from #current below it fade along. Beside that, every color style now publishes --current-color, registered with initial-value: currentcolor, for the cases the keyword cannot serve: hand-authored CSS, or anywhere the inherited color is needed as a color. Read it as $current-color. A value that already reads the color it inherits — #current, a #current fade — is deliberately not published into it, since resolving it again one level down would fade it twice.

    Opt-in batched style injection (from 3.2.0): configure({ batchInjection: true }) plus a <TastyBatchProvider> queue a commit's stylesheet writes into one FIFO and apply them together, so the document is style-invalidated once per flush instead of once per component — which matters in a tree that measures layout during render (popovers, autosizing inputs, virtualized lists). The provider flushes in useInsertionEffect, before any layout effect, so a queued write can never be observed by a measurement. flushStyles(), hasPendingStyleWrites() and resetStyleBatch() come with it, and all of it is re-exported from @cube-dev/ui-kit. Batching stays off unless an app turns it on.

Patch Changes

  • #1345 8fdee382 Thanks @tenphi! - no-redundant-default-prop now knows three defaults it used to miss: ItemTable's size and summary, and Pagination's summary. The registry it checks against is parsed line by line out of *.docs.mdx, so a documented default whose (default: …) annotation had been hard-wrapped onto the next line was invisible to the parser. Unwrapping the documentation surfaced them, and the generator proved each value against the component it belongs to.

  • #1352 40261f63 Thanks @tenphi! - useContextMenu and useAnchoredMenu now re-read defaultMenuProps on every render instead of snapshotting them when the menu opens. A menu whose content lives in those defaults — the row context menu in Tree and the tab context menu in Tabs both do — stayed frozen while open, so items appearing, disappearing or flipping isDisabled were invisible until it was closed and reopened. Runtime props passed to open()/update() still take precedence and are unaffected.


Note

Low Risk
This PR only updates version, changelog, and changeset metadata; functional risk is whatever was already merged and will be published on merge.

Overview
Automated Changesets release that bumps @cube-dev/ui-kit from 0.166.0 to 0.167.0, folds consumed changeset files into CHANGELOG.md, and removes those .changeset/*.md entries. No library source changes in this diff—merge publishes what’s already on main.

0.167.0 (documented in the changelog) ships Board improvements (dragCancel default, cornerChrome, widget mods, onLayoutChange reason), token resolution APIs/hooks (resolveTokenValue / useTokenValue and related), Tasty 3.3.1 (color token/CSS behavior, $current-color, optional batched style injection), plus patches for eslint default-prop coverage and live defaultMenuProps in context/anchored menus.

Reviewed by Cursor Bugbot for commit 6c83648. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview Aug 25, 2026 9:19am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 497.02 KB (0% 🟰) Yes 🎉
Tree shaking (just a Button) 118.91 KB (0% 🟰) Yes 🎉

Compared against main at 8fdee38run 32753929263, 2026-08-24T16:58:31Z.

To see which modules changed, download the size-limit-statoscope-report artifact from this run and open report.html.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@github-actions
github-actions Bot force-pushed the changeset-release/main branch from da9a4f6 to 6c83648 Compare August 25, 2026 09:18
@tenphi
tenphi merged commit d03d419 into main Aug 25, 2026
4 checks passed
@tenphi
tenphi deleted the changeset-release/main branch August 25, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant