diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d80511..0611530 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,56 @@ Format: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/). +## [1.1.0] — 2026-07-28 — "Surfaces" + +Twenty new components (31 → **51**) and a second primitive. The theme is surfaces you can +touch: light on a material, the pointer itself, and the page as it scrolls. + +### Added +- **`useShader()` primitive** — a raw **WebGL2** runtime for full-screen fragment shaders in + ~290 lines and **still zero runtime dependencies** (no `ogl`, no `three`). Draws a single + full-screen triangle from `gl_VertexID` (no buffers to allocate or leak) and owns the whole + lifecycle: DPR-clamped sizing via `ResizeObserver`, an `IntersectionObserver` that suspends the + loop off-screen, pause on tab blur, context-loss recovery, eased pointer input, uniform + declarations generated from the values you pass, and a single still frame for reduced-motion + users. Reports `supported: false` when WebGL2 is missing so components fall back to CSS + instead of a blank box. +- **Shaders & Light (6)** — `liquid-metal` (domain-warped FBM height field, normals from finite + differences, swept polish bands), `thin-film` (two-beam interference evaluated at three + wavelengths — real fringe order, not a hue rotation), `caustics` (folded coordinates + accumulating reciprocal distance), `halftone-gradient` (angled per-channel dot screens with + √-corrected dot area, or a computed 4×4 Bayer matrix), `volumetric-rays` (radial scattering + integral with decay normalised by sample count), `curl-flow` (FBM as a stream function; the + velocity is the perpendicular of its gradient, so the field is divergence-free by construction). +- **Cursor & Pointer (5)** — `inertia-cursor`, `elastic-cursor` (stretches along its velocity + vector with conserved area), `image-trail` (distance-thresholded emission, so spacing is even + at any speed), `pixel-trail` (sub-cell path walking, so a fast flick still lights a continuous + line), `crosshair` (point-to-rectangle snapping with a live coordinate readout). +- **Scroll-Driven (4)** — `scroll-stack`, `scroll-velocity`, `parallax-layers`, `scroll-scene` + (pins a section and exposes scrub progress via render prop, a CSS custom property, and a + per-frame callback). +- **Components (5)** — `card-swap`, `gooey-nav`, `bento-grid` (one pointer listener for the whole + grid, published to tiles as inherited custom properties), `elastic-slider` (exponentially damped + overshoot, full `role="slider"` keyboard contract), `circular-gallery` (drag converted through + arc length, so tracking is 1:1 at any radius). + +### Changed +- `BentoGrid` gains a `rowHeight` prop; the row height was previously hardcoded at 140px, which + made the component unusable in any frame shorter than two rows. +- The reduced-motion test is now **transitive**: a component satisfies the contract either + directly or through a primitive that does, so the shaders inherit the guarantee from + `useShader` rather than restating it. +- The playground gives scroll-driven components a full-height section of their own — a 200px + preview tile can't demonstrate something driven by the page scroller. + +### Fixed +- The CLI's `list` command iterated a hardcoded array of four categories, so components in any + newer category were silently omitted from its output. Both the CLI and the MCP server now derive + the category set from the registry. +- The MCP integration test asserted a literal component count, which fails on every addition and + trains you to bump the number instead of reading the failure. Expected counts now come from + `registry/meta.json`. + ## [1.0.0] — 2026-06-18 — "Re-architecture" A ground-up rebuild. ReactOmega is now an **AI-native React component registry** focused on diff --git a/README.md b/README.md index 3a1ff50..c7d67f7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **motion & interaction** components you copy into your project — installable in one line by **humans _and_ AI agents**. - +    @@ -60,7 +60,7 @@ npx -y github:Edwson/ReactOmega list --category text # filter by category ## Run the playground -**Live:** **https://edwson.github.io/ReactOmega/** — every one of the 31 components rendered live, +**Live:** **https://edwson.github.io/ReactOmega/** — every one of the 51 components rendered live, with a copy-paste install command on each card. The playground source lives in [`web/`](web) (Next.js + Tailwind). To run it locally: @@ -70,23 +70,40 @@ npm install npm run dev # → http://localhost:3000 ``` -## Components (v1.0) — 31 +## Components (v1.1) — 51 -**Text Animations** (novel + deeply customizable kinetic typography) +**Text Animations** (10) — novel + deeply customizable kinetic typography `split-text` · `shiny-text` · `gradient-text` · `count-up` · `variable-proximity` (per-letter variable-font axes by pointer distance) · `magnetic-text` (each letter springs to the pointer) · `gravity-text` (letters fall, bounce & reassemble with real gravity) · `elastic-text` (per-letter jelly squash/stretch) · `scramble-text` (configurable decode) · `text-reveal` (scroll-linked word-by-word brightening) -**Interaction & Motion** +**Interaction & Motion** (6) `magnetic` · `spotlight-card` · `tilt-card` · `holographic-card` (iridescent foil + 3D tilt) · `click-spark` · `dot-grid` -**Components** -`star-border` · `dock` · `marquee` - -**Physics & Art** (real physics — tactile, designed, never cosmic) — 12 +**Cursor & Pointer** (5) — *new in 1.1* +`inertia-cursor` (exact dot + spring-lagged ring, difference-blended) · `elastic-cursor` (stretches +along its velocity vector, area conserved) · `image-trail` (distance-thresholded, so spacing is even +at any speed) · `pixel-trail` (sub-cell path walking — a fast flick still lights a continuous line) · +`crosshair` (point-to-rectangle snapping + live coordinate readout) + +**Scroll-Driven** (4) — *new in 1.1* +`scroll-stack` (sticky deck, continuous depth) · `scroll-velocity` (skews with scroll velocity, +frame-rate independent) · `parallax-layers` (progress normalised to the section's own centre) · +`scroll-scene` (pins a section, exposes 0→1 scrub progress via render prop, CSS variable, or callback) + +**Shaders & Light** (6) — *new in 1.1* — **hand-written GLSL on raw WebGL2, still zero deps** +`liquid-metal` (domain-warped FBM, normals from finite differences, swept polish bands) · +`thin-film` (two-beam interference at three wavelengths — real fringe order, not a hue rotation) · +`caustics` (folded coordinates accumulating reciprocal distance) · `halftone-gradient` (angled +per-channel dot screens with √-corrected dot area, or a computed 4×4 Bayer matrix) · +`volumetric-rays` (radial scattering integral, decay normalised by sample count) · `curl-flow` +(FBM as a stream function; velocity is the perpendicular of its gradient, so the field is +divergence-free by construction) + +**Physics & Art** (12) — real physics — tactile, designed, never cosmic `spring-mesh` (press an elastic lattice, waves ripple & settle) · `cloth` (a verlet fabric you grab & wave) · `metaballs` (gooey fluid that merges around the pointer) · `rope` (a verlet rope you grab & swing) · `pendulum-wave` (staggered-length pendulums drift in & out of phase) · `newtons-cradle` @@ -96,6 +113,28 @@ reflects) · `gravity-wells` (particles orbit the pointer with luminous trails) `plucked-string` (pluck it, it vibrates with a decaying wave) · `falling-sand` (pour colored grains that pile into mounds) +**Components** (8) +`star-border` · `dock` · `marquee` · `card-swap` (3D deck, every slot a pure function of depth) · +`gooey-nav` (indicator stretches in flight, fused by an SVG goo filter) · `bento-grid` (one pointer +listener for the whole grid, shared with tiles as inherited custom properties) · `elastic-slider` +(exponentially damped overshoot, full `role="slider"` keyboard contract) · `circular-gallery` +(drag converted through arc length, so tracking is 1:1 at any radius) + +### Shaders without a shader library + +The six shader components share a `useShader()` primitive — a raw WebGL2 runtime in ~290 lines +with **no `ogl`, no `three`, and no new dependencies**. It draws one full-screen triangle from +`gl_VertexID` (nothing to allocate, nothing to leak) and owns DPR-clamped sizing, suspension while +off-screen, pause on tab blur, context-loss recovery, eased pointer input, and the single still +frame reduced-motion users get. When WebGL2 is unavailable it reports `supported: false` so the +component renders a CSS fallback rather than a blank box. + +```tsx +import { LiquidMetal } from "@/components/reactomega/liquid-metal"; + +