Skip to content

v0.2.3 · Scoped Styles & New Parser (BREAKING)

Choose a tag to compare

@Austin1serb Austin1serb released this 09 Jul 01:00
· 34 commits to main since this release

v0.2.3 · Scoped Styles & New Parser (BREAKING)

TL;DR
🔒 Element-scoped UI variants · ⚡ 4× faster compile · 🎯 String-only keys · 🛑 Breaking change notice & migration guide below.


✨ Highlights

Feature What it means
Scoped styles Attach ref={setter.ref} and data-ui="key:value" is set only on that element; descendants style with key-value:* Tailwind classes.
String-only UI keys Both stateKey and initial value must be kebab-case strings. Guarantees deterministic CSS.
Tailwind-style variant discovery Parser resolves each stateKey and scans your codebase for key-value:utility classes—auto-registers custom variants, no plugin boilerplate.
New parser stack quick-glob + quick-lru + full Babel traversal → 4× faster on a 10 k-LOC repo.
Zero-runtime CSS Generates static selectors like .profile-card:theme-dark:bg-black via PostCSS 8.
TypeScript migration (phase 1) Core rewritten in .ts (helpers stay .cts).

🧩 Internal

  • Swapped fast-globquick-glob with .gitignore awareness.


📦 Install

# cli auto set up

npx create-zero-ui

npm

npm i @react-zero-ui/core


🗣 Feedback

Scoped styles are still fresh—file issues, tag v0.2 in the title, and include a repro. Let’s break it now, not in prod.