diff --git a/.changeset/tasty-3-5-0.md b/.changeset/tasty-3-5-0.md deleted file mode 100644 index 8226cdea7..000000000 --- a/.changeset/tasty-3-5-0.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@cube-dev/ui-kit': minor ---- - -Update Tasty to 3.5.0 (from 3.3.1). No changes were needed in the kit; two things matter to apps built on it. - -**Injected CSS is garbage-collected again.** Once Tasty's render path became hook-free it stopped disposing the classes it injected, so their reference counts never fell back to zero and `gc()`, `cleanup()` and `tastyDebug.cleanup()` all read a non-zero count as "still in use". Nothing was ever evicted, and **a long-lived page accumulated injected rules for its entire lifetime** — the failure mode is a session that gets slower the longer it stays open, worst in a UI that mounts many short-lived styled subtrees (dialogs, popovers, table cells). What a style is worth keeping is now decided by the DOM: a sweep scans for the classes actually on the page, and only classes that are both absent from it and cold for longer than `gc.grace` (new, default 10s) beyond `gc.capacity` are deleted. Nothing is tracked per class while rendering, so collection costs nothing on the render path. `touch()` and the `StyleUsage` type are deprecated — both still exported, and `touch()`'s class-name argument is now ignored — and `tastyDebug` no longer reports `Unused: 0 classes` for a page holding hundreds of stale rules. - -**Local `@keyframes` are content-addressed and owned by the classes that use them.** A `@keyframes` block written inside a styles object is emitted as `fade-` rather than `fade`, resolved identically by the client, the SSR collector and the RSC pass, and folded into the chunk's cache key. Two components that each author `animation: fade 1s` over _different_ steps therefore get two rules and two classes instead of one definition silently winning — which previously also let the server and the client disagree about which class to use. **If your own CSS or a test refers to a local keyframes name literally, it no longer resolves**; `keyframes()`-registered global animations are unaffected and keep their authored names. `holdKeyframes()` and `ownKeyframes()` come with it, re-exported from `@cube-dev/ui-kit`. - -One 3.5.0 fix lands squarely on the kit as it now ships: since `Root` sets `batchInjection: true` and `Root`, `Portal` and `Overlay` each open a `TastyBatchProvider` window, a `tastyDebug` read taken inside one of those windows used to describe it as empty. Reads that reach into the registry rather than through an injector API now land the pending writes first, so debug output taken mid-commit is no longer blank. - -Also in: styling overhead drops (from 3.4.0) — LRU cache reads are 1.79x faster in their steady-state shape, and a repeat SSR render of one component is 1.8x faster end to end now that `tasty()` factories memoize their chunk cache keys. A custom property declared with a whitespace-only value (`--brand-color: ;`) is skipped rather than read as an empty value, so it no longer auto-registers an `@property` off the strength of its name. Bundle: +1.21 kB on both the full import and a `{ Button }`-only import — matching deltas, which is what a change inside Tasty's always-included core looks like. Both stay inside budget, though `All` is now down to 1.40 kB of headroom, most of which the kit's own recent growth spent rather than this bump. diff --git a/CHANGELOG.md b/CHANGELOG.md index de7b611a4..ac187d0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # @cube-dev/ui-kit +## 0.173.0 + +### Minor Changes + +- [#1374](https://github.com/cube-js/cube-ui-kit/pull/1374) [`9adb076f`](https://github.com/cube-js/cube-ui-kit/commit/9adb076f00a75357b4e25c8e09e122d94eecd621) Thanks [@tenphi](https://github.com/tenphi)! - Update Tasty to 3.5.0 (from 3.3.1). No changes were needed in the kit; two things matter to apps built on it. + + **Injected CSS is garbage-collected again.** Once Tasty's render path became hook-free it stopped disposing the classes it injected, so their reference counts never fell back to zero and `gc()`, `cleanup()` and `tastyDebug.cleanup()` all read a non-zero count as "still in use". Nothing was ever evicted, and **a long-lived page accumulated injected rules for its entire lifetime** — the failure mode is a session that gets slower the longer it stays open, worst in a UI that mounts many short-lived styled subtrees (dialogs, popovers, table cells). What a style is worth keeping is now decided by the DOM: a sweep scans for the classes actually on the page, and only classes that are both absent from it and cold for longer than `gc.grace` (new, default 10s) beyond `gc.capacity` are deleted. Nothing is tracked per class while rendering, so collection costs nothing on the render path. `touch()` and the `StyleUsage` type are deprecated — both still exported, and `touch()`'s class-name argument is now ignored — and `tastyDebug` no longer reports `Unused: 0 classes` for a page holding hundreds of stale rules. + + **Local `@keyframes` are content-addressed and owned by the classes that use them.** A `@keyframes` block written inside a styles object is emitted as `fade-` rather than `fade`, resolved identically by the client, the SSR collector and the RSC pass, and folded into the chunk's cache key. Two components that each author `animation: fade 1s` over _different_ steps therefore get two rules and two classes instead of one definition silently winning — which previously also let the server and the client disagree about which class to use. **If your own CSS or a test refers to a local keyframes name literally, it no longer resolves**; `keyframes()`-registered global animations are unaffected and keep their authored names. `holdKeyframes()` and `ownKeyframes()` come with it, re-exported from `@cube-dev/ui-kit`. + + One 3.5.0 fix lands squarely on the kit as it now ships: since `Root` sets `batchInjection: true` and `Root`, `Portal` and `Overlay` each open a `TastyBatchProvider` window, a `tastyDebug` read taken inside one of those windows used to describe it as empty. Reads that reach into the registry rather than through an injector API now land the pending writes first, so debug output taken mid-commit is no longer blank. + + Also in: styling overhead drops (from 3.4.0) — LRU cache reads are 1.79x faster in their steady-state shape, and a repeat SSR render of one component is 1.8x faster end to end now that `tasty()` factories memoize their chunk cache keys. A custom property declared with a whitespace-only value (`--brand-color: ;`) is skipped rather than read as an empty value, so it no longer auto-registers an `@property` off the strength of its name. Bundle: +1.21 kB on both the full import and a `{ Button }`-only import — matching deltas, which is what a change inside Tasty's always-included core looks like. Both stay inside budget, though `All` is now down to 1.40 kB of headroom, most of which the kit's own recent growth spent rather than this bump. + ## 0.172.0 ### Minor Changes diff --git a/package.json b/package.json index 9a3f20ca6..bcaf0eb93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cube-dev/ui-kit", - "version": "0.172.0", + "version": "0.173.0", "type": "module", "description": "UIKit for Cube Projects", "repository": {