feat(lynx): add lynx-image headless package#1646
Conversation
🦋 Changeset detectedLatest commit: 444ffc9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add @seed-design/lynx-image, a headless hook for tracking Lynx <image> load state via bindload/binderror events. Unlike the web react-image, it relies on Lynx events (no img.complete/naturalWidth DOM API) and exposes loadingStatus so the styled layer can toggle a fallback via conditional rendering (Lynx has no attribute-selector styling). Adds a useImage PoC page to examples/lynx-spa. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1575ad7 to
8d2e676
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Adds
@seed-design/lynx-image— a headless hook for Lynx<image>load state.Changes
@seed-design/lynx-imagewithuseImage(loadingStatus + handleLoad/handleError mapped tobindload/binderror)img.complete/naturalWidthanddata-loading-stateselector are dropped; state is derived from Lynx events, and fallback toggling is done via conditional rendering by the consumeruseImagePoC page inexamples/lynx-spa(normal + broken image → fallback overlay)Verification
bindload/binderrorfire and fallback togglesStack
PR 2/4 — base:
lynx-headless-hooks-split(PR #1645). Merge PR #1645 first.🤖 Generated with Claude Code