From 41cf3a07d570b765798b8efd18bdc0a7bff59c23 Mon Sep 17 00:00:00 2001 From: raqibnur Date: Wed, 30 Sep 2026 01:08:46 +0600 Subject: [PATCH 1/2] Light the gallery tiles with the charge: lit edge, focus marks, bench lattice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tiles were a plain bezel around an empty stage. Each now reads as a channel on the bench, still achromatic at rest: - The bezel paints the charge field's own --px/--py radial on fixed attachment, so the field passes through tiles instead of stopping at their edges, and the hairline nearest the cursor warms to --charge. No new listener. Fine pointers only, since iOS ignores fixed attachment. - Four viewfinder corners close in on the effect on hover/focus-within (220ms out-curve in, 420ms spring out) and take --charge; reduced motion keeps the colour, drops the travel. - A faint dot lattice on the stage, masked out at the centre. - The footer leads with the effect's number in the frozen 12, hidden below sm. Documented in docs/DESIGN.md § Tile metadata. Co-Authored-By: Claude Opus 5.5 --- app/globals.css | 66 +++++++++++++++++++++++++++++++++++++ components/gallery/tile.tsx | 59 +++++++++++++++++++++++++++++---- docs/DESIGN.md | 17 ++++++++++ 3 files changed, 136 insertions(+), 6 deletions(-) diff --git a/app/globals.css b/app/globals.css index b5ddccd..3c40e21 100644 --- a/app/globals.css +++ b/app/globals.css @@ -304,6 +304,72 @@ } } +/* + * Gallery tiles (components/gallery/tile.tsx). The bezel is lit by the same two vars the + * charge field reads, so the page's one pointer listener drives it too — no per-tile work. + * + * Both lit layers use `fixed` attachment: --px/--py are viewport coordinates, and a fixed + * background is positioned against the viewport, so the radial on every tile lines up with + * the field behind the page as if the tiles were not there. Two consequences: + * + * 1. The field passes through the bezel at the same 9%/7% it has on the page, instead of + * stopping dead at each tile's edge. + * 2. The hairline edge nearest the cursor warms to --charge — on neighbouring tiles as + * well as the hovered one, so the grid reads as one surface in one field. + * + * At rest the vars are parked at -1000px and both layers resolve to nothing: the tile is + * --surface inside a --rule hairline. Fine pointers only — iOS ignores `fixed`, which would + * pin the radial to each tile's own box, and touch already gets its charge from the anchor. + */ +.gallery-tile { + border: 1px solid transparent; + background: + linear-gradient(var(--surface) 0 0) padding-box, + linear-gradient(var(--rule) 0 0) border-box; +} +@media (hover: hover) and (pointer: fine) { + .gallery-tile { + background: + radial-gradient( + 560px circle at var(--px) var(--py), + color-mix(in oklch, var(--brand) var(--charge-alpha), transparent), + transparent 62% + ) + fixed padding-box, + linear-gradient(var(--surface) 0 0) padding-box, + radial-gradient( + 320px circle at var(--px) var(--py), + color-mix(in oklch, var(--charge) 80%, var(--rule)), + var(--rule) 100% + ) + fixed border-box; + } +} + +/* + * The recessed stage: a faint dot lattice, strongest at the walls and gone at the centre, + * so the bench has a surface without anything sitting behind the effect itself. Painted on + * a pseudo-element under the preview (z -1 inside the stage's own stacking context) because + * the fade is a mask, and masking the stage would mask the effect with it. + */ +.gallery-stage { + isolation: isolate; +} +.gallery-stage::before { + content: ""; + position: absolute; + inset: 0; + z-index: -1; + border-radius: inherit; + background: radial-gradient( + circle, + color-mix(in oklch, var(--mid) 32%, transparent) 0.75px, + transparent 1.25px + ) + center / 18px 18px; + mask-image: radial-gradient(closest-side, transparent 55%, #000 150%); +} + /* * registry/hover/border-trace-button — the lap. Mirrored here so this repo's own gallery * renders the effect live; ships to consumers via registry.json's "css" field diff --git a/components/gallery/tile.tsx b/components/gallery/tile.tsx index c8759a2..7053e54 100644 --- a/components/gallery/tile.tsx +++ b/components/gallery/tile.tsx @@ -6,6 +6,7 @@ import { type Effect, type GroupDensity, type UpcomingEffect, + effects, installCommand, motionSummary, } from "@/lib/registry"; @@ -21,6 +22,39 @@ const stageHeight: Record = { wide: "min-h-[320px] sm:min-h-[360px]", }; +/** + * Viewfinder marks in the stage's four corners. At rest they sit in quiet --mid; while the + * tile is hovered or holds focus they close in on the effect and take the charge — the + * stage "finds focus" on whatever the visitor is pointing at. They frame the effect and + * never cross it: inset from the walls, pointer-transparent, nothing drawn in the middle. + * + * Asymmetric on purpose (docs/MOTION.md G4): in on the out-curve inside the enter band, + * back out on the spring inside the release band. Scale, not inset, so it stays on the + * compositor (G12); reduced motion keeps the colour and drops the travel (G10). + */ +function FocusMarks() { + const corner = "absolute size-3 border-current"; + return ( + + + + + + + ); +} + +const pad = (n: number) => String(n).padStart(2, "0"); + /** * One gallery cell: a bezel holding a recessed stage, with a footer strip beneath it. * @@ -31,8 +65,9 @@ const stageHeight: Record = { * differentiator), the install command copy (persistent, no hover reveal), and the * arrow that opens the full sheet: preview, source, install, motion. * - * Colour stays off at rest. Under the pointer the bezel's edge and the arrow warm to - * --charge, and nothing else does (docs/DESIGN.md § Thesis). + * Colour stays off at rest. Under the pointer the bezel's nearest edge, the focus marks, + * the readout and the arrow warm to --charge, and nothing else does (docs/DESIGN.md + * § Thesis). The edge lighting is `.gallery-tile` in app/globals.css. */ export async function GalleryTile({ effect, @@ -55,6 +90,8 @@ export async function GalleryTile({ ) : ( preview missing ); + // Position in the frozen 12, not within the group: the numbering runs down the page. + const index = pad(effects.indexOf(effect) + 1); return ( // The id gives each tile a real fragment target, so a preview that needs a focusable @@ -64,17 +101,27 @@ export async function GalleryTile({ // On touch the charge anchors to whichever tile is nearest the viewport centre // (docs/DESIGN.md § Touch); components/gallery/charge-field.tsx queries this attribute. data-charge-anchor="" - className="group/tile flex scroll-mt-28 flex-col rounded-[22px] border border-[var(--rule)] bg-[var(--surface)] p-1.5 [transition:border-color_300ms_cubic-bezier(0.23,1,0.32,1)] hover:border-[color-mix(in_oklch,var(--charge)_45%,var(--rule))] focus-within:border-[color-mix(in_oklch,var(--charge)_45%,var(--rule))]" + className="gallery-tile group/tile flex scroll-mt-28 flex-col rounded-[22px] p-1.5" >
+ {preview}
-
+
+ {/* The channel number: where this effect sits in the set, in the readout's mono. */} + + {index} +
-

{effect.title}

+

+ {effect.title} +

{motionSummary(effect.motion)}

diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 5852d10..3ef00a6 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -215,6 +215,23 @@ footer strip beneath: the name, a persistent one-line readout of the motion valu **effect sheet**. Groups lay out two columns wide — each group is four effects, so it is a clean 2x2 and every stage has room. +The tile carries the page thesis in three places, all achromatic at rest: + +- **The lit edge.** The bezel is painted with the same `--px`/`--py` radial as the charge + field, on `fixed` attachment so it lines up with the field behind the page. The field + passes through the tile at its usual alpha instead of stopping at the edge, and the + hairline nearest the cursor warms to `--charge` — on neighbouring tiles too, so the grid + reads as one surface in one field. No extra listener; `.gallery-tile` in + `app/globals.css`. Fine pointers only (iOS ignores `fixed`). +- **Focus marks.** Four viewfinder corners inside the stage, `--mid` at rest. On hover or + focus-within they close in on the effect (scale, out-curve, 220ms) and take `--charge`; + they release on the spring. Reduced motion keeps the colour and drops the travel. +- **The bench.** A faint dot lattice on the stage, strongest at the walls and masked out + at the centre, so nothing ever sits behind the effect itself. + +The footer leads with the effect's channel number in the frozen 12 (`01`–`12`, mono, hidden +below `sm` so the readout keeps its room). + The effect sheet (`components/gallery/effect-sheet.tsx`) is the page an effect would otherwise get, kept inside the single page as a native modal ``: group badge, title, description and install command, then four tabs — **Preview** (a large stage with a From 110735cc97c732311086535d85dff7063b388674 Mon Sep 17 00:00:00 2001 From: raqibnur Date: Wed, 30 Sep 2026 01:08:46 +0600 Subject: [PATCH 2/2] Give each card preview its own landing-page scene The four card previews were the same template (eyebrow, title, blurb, "Read the spec"). Each is now a scene a visitor would meet on a real landing page, chosen so the surface gives its effect something to act on: - spotlight-card: a pricing tier with a ruled feature list for the light to cross - tilt-card: an admission ticket with a perforation and cut-out notches - reveal-card: a specimen plate under a reticle; the media keeps its 228px height and the caption its 32px, so the measured recession is unchanged - chase-border-card: a release card using the registry's real figures Previews only; no effect file or registry item changes. Tokens throughout, a focusable link in every card for G9, --charge only on focus. Co-Authored-By: Claude Opus 5.5 --- registry/hover/chase-border-card/preview.tsx | 73 +++++++----- registry/hover/reveal-card/preview.tsx | 41 ++++++- registry/hover/spotlight-card/preview.tsx | 69 ++++++++---- registry/hover/tilt-card/preview.tsx | 111 ++++++++++++------- 4 files changed, 199 insertions(+), 95 deletions(-) diff --git a/registry/hover/chase-border-card/preview.tsx b/registry/hover/chase-border-card/preview.tsx index 5a17680..2f40bac 100644 --- a/registry/hover/chase-border-card/preview.tsx +++ b/registry/hover/chase-border-card/preview.tsx @@ -3,46 +3,65 @@ import { ChaseBorderCard } from "./chase-border-card"; /** - * The ring is left on `currentColor` — tonal, not accent. Two reasons. docs/DESIGN.md - * §Thesis keeps the page achromatic at rest, and the ring is visible at rest on any device - * without hover, so a charge-coloured ring would be a resting accent. And the tile this - * renders inside already warms its own border to `--charge` under the pointer - * (components/gallery/tile.tsx), so a second charge-coloured edge 24px away would read as - * one doubled response rather than two effects. Boldness is spent on the motion here, which - * is what DESIGN.md asks for. + * A release card — the one on a landing page that says "this just shipped". A slow turn + * suits it: something is live, and it is expensive enough not to hurry. The figures are the + * product's own (twelve effects, one file each, no dependencies), so the demo makes no + * claim the registry does not. + * + * The ring is left on `currentColor` — tonal, not accent. docs/DESIGN.md § Thesis keeps the + * page achromatic at rest, and the ring is visible at rest on any device without hover, so a + * charge-coloured ring would be a resting accent. The tile around it already lights its + * nearest edge under the pointer, so a second charge-coloured edge would read as one doubled + * response rather than two effects. Boldness is spent on the motion. * * The card carries a real link so the keyboard path (`:focus-visible`) is reachable by * tabbing rather than only existing in the source. */ +const figures: [string, string][] = [ + ["12", "effects"], + ["1", "file each"], + ["0", "dependencies"], +]; + export default function Preview() { return ( -

- Loop 08 -

-

Turning slowly

-

- Seven seconds a revolution. It coasts to a stop rather than cutting. +

+ Release + v1.0 +
+

+ The full set is out.

+ +
+ {figures.map(([figure, label], i) => ( +
0 ? "border-l border-[var(--rule)] pl-4" : ""}`} + > +
+ {label} +
+
+ {figure} +
+
+ ))} +
+ - Watch it stop + Read the release notes
); diff --git a/registry/hover/reveal-card/preview.tsx b/registry/hover/reveal-card/preview.tsx index 58c4721..bce01c9 100644 --- a/registry/hover/reveal-card/preview.tsx +++ b/registry/hover/reveal-card/preview.tsx @@ -21,7 +21,7 @@ import { RevealCard } from "./reveal-card"; export default function Preview() { return ( @@ -44,21 +44,52 @@ export default function Preview() { > Chlorophyll assay + + 2026 +
} > + {/* + * A specimen under a reticle: the kind of plate a portfolio or case-study grid leads + * with. The reticle and its labels are part of the picture, drawn in the plate's own + * light ink, so they recede and desaturate with it — the whole image leaves, not just + * its background. Literal colour is correct here and nowhere else in the gallery; see + * the note at the top of this file. + */}
+ > +
+ + + +
+ + Fig. 07 + + + ×40 + +
); } diff --git a/registry/hover/spotlight-card/preview.tsx b/registry/hover/spotlight-card/preview.tsx index a2ced9c..0da89f3 100644 --- a/registry/hover/spotlight-card/preview.tsx +++ b/registry/hover/spotlight-card/preview.tsx @@ -3,43 +3,63 @@ import { SpotlightCard } from "./spotlight-card"; /** - * The stage this renders on (components/gallery/tile.tsx) is recessed to --paper and the - * tile itself is a --surface card whose border warms to --charge uniformly on hover. Two - * nested cards both lighting their edge would read as one doubled response, so this card - * separates from its container on two axes: material (it sits at --surface on the --paper - * stage, so there is a step between them) and behaviour (its edge lifts locally, under the - * light, while the tile's warms evenly across all four sides). + * A pricing tier, because pricing pages are one of the four surfaces HoverUI is for + * (CLAUDE.md § Audience) and the one where a card most needs to feel like a material rather + * than a box. The ruled feature list gives the light something to cross: it lifts the edge + * and the weave as it passes, and the rules read the change at a glance. + * + * The stage (components/gallery/tile.tsx) is recessed to --paper inside a --surface bezel + * whose nearest edge warms under the pointer. This card separates from that on material (a + * --surface step up from the stage) and behaviour (its edge lifts locally, under the light). */ +const features: [string, string][] = [ + ["Projects", "Unlimited"], + ["Seats", "Up to 12"], + ["Support", "Next day"], +]; + export default function Preview() { return ( -

- Surface -

-

Lit from within

-

- The light trails the cursor and lifts the edge as it passes. +

+ Studio + Billed yearly +
+ +

+ + $24 + + per seat, per month

+ +
+ {features.map(([term, value]) => ( +
+
{term}
+
{value}
+
+ ))} +
+ {/* * G9 — the card is not focusable, and the component's focus()/blur() work by React's - * onFocus bubbling from a child. Without a focusable child the keyboard path existed - * only in the source: nothing in the gallery could ever reach it. The other three - * card previews all carry one. + * onFocus bubbling from a child, so the keyboard path needs a focusable child to exist + * on the gallery page at all. * - * Not pinned to the bottom with mt-auto the way tilt-card's is: SpotlightCard wraps - * its children in its own z-index:1 div, so a flex column on the card root would lay - * out that wrapper rather than this link. + * Not pinned to the bottom with mt-auto: SpotlightCard wraps its children in its own + * z-index:1 div, so a flex column on the card root would lay out that wrapper instead. */} - Read the spec + Choose Studio + →
); diff --git a/registry/hover/tilt-card/preview.tsx b/registry/hover/tilt-card/preview.tsx index ac375ca..ce64c68 100644 --- a/registry/hover/tilt-card/preview.tsx +++ b/registry/hover/tilt-card/preview.tsx @@ -3,49 +3,82 @@ import { TiltCard } from "./tilt-card"; /** + * An admission ticket: the most physical object a landing page routinely draws, which is + * what SCOPE §6 asks the panel to feel like. The perforation and its two notches make it an + * object with edges rather than a rectangle of copy, so eight degrees of turn reads as a + * thing being handled. + * + * The notches are --paper discs centred on the card's side walls. TiltCard pins + * `overflow: hidden` on its root, so each is clipped to a half-circle and reads as cut out + * of the card down to the stage beneath. They use the tokens, not literal hex, so they stay + * cut-outs on the sheet's light and dark stages as well (docs/DESIGN.md § Dark theme). + * * The card carries a real link, so the keyboard path (G9 — lift, no tilt) is reachable by - * tabbing on the gallery page rather than only existing in the source. Everything rests - * achromatic: --charge is forbidden at rest (docs/DESIGN.md § Tokens), so the only accent - * here appears on :focus-visible, which is under the user's own pointer or caret. + * tabbing on the gallery page rather than only existing in the source. */ +const stub: [string, string][] = [ + ["Date", "14.11"], + ["Doors", "19:00"], + ["Gate", "B"], +]; + export default function Preview() { - // Column layout so the link sits on the bottom edge rather than trailing the copy with a - // dead third of the panel beneath it. TiltCard deliberately does not wrap its children for - // exactly this reason — see the note above `children` in tilt-card.tsx. + // TiltCard deliberately does not wrap its children, so the layout classes here apply to + // them directly — see the note above `children` in tilt-card.tsx. return ( - -

- Panel -

-

Behind glass

-

- Eight degrees, no more. The sheen travels against the turn. -

- - Read the spec - + +
+
+ Admit one + No. 0412 +
+

+ Open studio, +
+ after hours +

+

Warehouse 9, Leith

+
+ +
+
+ + +
+ +
+
+ {stub.map(([term, value]) => ( +
+
+ {term} +
+
{value}
+
+ ))} +
+ + Add to wallet + +
); }