Skip to content

feat(lynx): add lynx-image headless package#1646

Open
junghyeonsu wants to merge 3 commits into
lynx-headless-hooks-splitfrom
lynx-image-pkg
Open

feat(lynx): add lynx-image headless package#1646
junghyeonsu wants to merge 3 commits into
lynx-headless-hooks-splitfrom
lynx-image-pkg

Conversation

@junghyeonsu

Copy link
Copy Markdown
Contributor

Summary

Adds @seed-design/lynx-image — a headless hook for Lynx <image> load state.

Changes

  • New package @seed-design/lynx-image with useImage (loadingStatus + handleLoad/handleError mapped to bindload/binderror)
  • Web img.complete/naturalWidth and data-loading-state selector are dropped; state is derived from Lynx events, and fallback toggling is done via conditional rendering by the consumer
  • useImage PoC page in examples/lynx-spa (normal + broken image → fallback overlay)

Verification

  • lynx-image: bunchee build green
  • lynx-spa: typecheck green
  • Device PoC confirmed: bindload/binderror fire and fallback toggles

Stack

PR 2/4 — base: lynx-headless-hooks-split (PR #1645). Merge PR #1645 first.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 444ffc9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@seed-design/lynx-image Minor

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

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6a2f9a0b-4ccc-4718-a5cd-92dcaa636e2f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lynx-image-pkg

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

junghyeonsu and others added 2 commits June 8, 2026 19:02
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>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant