Skip to content

feat(registry): add vignette CSS component#843

Merged
jrusso1020 merged 3 commits into
mainfrom
feat/registry-vignette-takeover
May 14, 2026
Merged

feat(registry): add vignette CSS component#843
jrusso1020 merged 3 commits into
mainfrom
feat/registry-vignette-takeover

Conversation

@jrusso1020
Copy link
Copy Markdown
Collaborator

Summary

Takeover of #825 (community PR can't be merged because catalog additions are restricted to team members) plus the fix that was blocking its CI.

Two commits:

  1. feat(registry): add vignette CSS component — original work by @calcarazgre646. Pure-CSS radial darkening overlay, 4 CSS custom properties (--vignette-color, --vignette-size, --vignette-edge, --vignette-shape), pointer-events: none, z-index: 90 so it sits under grain-overlay.
  2. fix(scripts): pass rational fps … — the CI fix.

CI fix details

scripts/generate-catalog-previews.ts still called createCaptureSession({ fps: 30, … }) and createRenderJob({ fps: 24, … }). Commit 5dcc89c (May 9) made both APIs accept Fps = { num, den } rationals — passing a plain number yields:

beginFrameIntervalMs: (1000 * options.fps.den) / Math.max(1, options.fps.num),
// = (1000 * undefined) / Math.max(1, undefined) = NaN / NaN = NaN

After warmup, session.beginFrameTimeTicks = (baseTickCount + 10) * NaN = NaN. The next HeadlessExperimental.beginFrame CDP call fails with:

Protocol error (HeadlessExperimental.beginFrame): Invalid parameters
Failed to deserialize params.frameTimeTicks - BINDINGS: double value expected at position 23

— exactly what CI was showing on #825.

This is a regression in the script — not the vignette component. It didn't surface earlier because catalog-previews.yml only re-renders changed items (path filter on registry/blocks/** and registry/components/**), so existing components were never exercised against the new fps contract. Vignette is the first new component since the refactor.

Fix is two lines: fps: { num: 30, den: 1 } and fps: { num: 24, den: 1 }.

Test plan

  • Reproduced the BeginFrame error locally on PR feat(registry): add vignette CSS component #825 head: Protocol error … position 23
  • After fix: npx tsx scripts/generate-catalog-previews.ts --only vignette --skip-video✓ vignette.png (246ms)
  • Sanity-check existing item: npx tsx scripts/generate-catalog-previews.ts --only grain-overlay --skip-video✓ grain-overlay.png (8611ms)
  • npx tsx scripts/generate-catalog-pages.ts → produces no diffs vs PR feat(registry): add vignette CSS component #825 (docs were already correct)
  • bunx oxfmt scripts/generate-catalog-previews.ts and bunx oxlint clean

Credit

Vignette component authored by @calcarazgre646 — see commit authorship.

Closes #825.

calcarazgre646 and others added 2 commits May 14, 2026 21:03
Pure-CSS radial darkening overlay that fills its positioned parent and
pulls focus toward the center. Shape, size, and color are exposed as
CSS custom properties (--vignette-shape, --vignette-size,
--vignette-edge, --vignette-color), so a GSAP timeline can animate any
of them — the snippet's header comment shows the pattern for fading
the vignette in.

The Components section currently has four entries; this fills the
cinematic-cinematography gap a video editor expects out of the box
without bundling any asset (the effect is a single radial-gradient).
Default z-index 90 sits below grain-overlay (100) so grain reads on
top of the darkened corners.

Catalog page, registry index, and nav are regenerated via
scripts/generate-catalog-pages.ts.
`scripts/generate-catalog-previews.ts` still called `createCaptureSession`
with `fps: 30` and `createRenderJob` with `fps: 24`. Since commit 5dcc89c
("feat(cli): accept ffmpeg-style rational fps") `CaptureOptions.fps` and
`RenderConfig.fps` are `Fps = { num, den }` rationals — a plain number
yields `options.fps.den === undefined` and:

```ts
beginFrameIntervalMs: (1000 * options.fps.den) / Math.max(1, options.fps.num),
// = (1000 * undefined) / Math.max(1, undefined) = NaN / NaN = NaN
```

After warmup, `session.beginFrameTimeTicks = (baseTickCount + 10) * NaN = NaN`,
and the next `HeadlessExperimental.beginFrame` CDP call fails with:

```
Protocol error (HeadlessExperimental.beginFrame): Invalid parameters
Failed to deserialize params.frameTimeTicks - BINDINGS: double value expected
```

This regression didn't surface earlier because the Catalog Previews workflow
only re-renders items whose files changed in the PR, so existing components
were never exercised against the new fps contract. The vignette addition is
the first new item since the refactor.

Fix: pass `{ num: 30, den: 1 }` and `{ num: 24, den: 1 }`.
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 14, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hyperframes 🟢 Ready View Preview May 14, 2026, 9:17 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

…o legible

Two surgical changes, both isolated to the catalog-previews flow:

1. `packages/studio/src/player/hooks/usePlaybackKeyboard.test.ts`
   PR #842 changed `seek()` to take `(time, { keepPlaying: true })` for the
   A/E shortcuts. The keyboard-layout tests added by #839 still asserted the
   single-arg form. Both landed on main without cross-checking, so `main`
   itself has been failing Test/Windows since. Update the two assertions
   to match the new signature. Same fix Miguel already authored on
   `feat/studio-preview-pasteboard-bg`.

2. `registry/components/vignette/demo.html`
   The original demo captured a frame where the vignette was at its
   weakest point — the effect was nearly invisible in the static preview
   used by docs. Reworked the demo so:
   - The backdrop is a layered "cinematic still" (warm key + teal rim +
     dark falloff) and includes a centered subject ("moon"), so the
     vignette has a focal point to frame.
   - Vignette starts soft (size 70%, alpha 0.35) and ramps to a dramatic
     cinematic vignette (size 26%, alpha 0.92) over 1.6s.
   - Peak intensity holds across t≈3.0s, which is exactly where the
     catalog script samples the thumbnail (`Math.min(3.0, duration*0.6)`
     with duration=5).
   - Breathing motion in t=3.4–5.2s gives the video loop visible life
     without disturbing the still frame.
@calcarazgre646
Copy link
Copy Markdown
Contributor

Sorry about the broken main. The signature change in #842 needed me to update the assertions added in #839, and I didn't cross-check before pushing the second PR. Lesson learned.

The demo rework is great too. Capturing peak intensity at the script's captureTime is the right framing for a static preview, not breathing motion. Thanks for the takeover.

@jrusso1020 jrusso1020 merged commit 5a69650 into main May 14, 2026
31 checks passed
@jrusso1020 jrusso1020 deleted the feat/registry-vignette-takeover branch May 14, 2026 21:56
@jrusso1020
Copy link
Copy Markdown
Collaborator Author

No worries @calcarazgre646 thanks for the contributions!

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.

3 participants