Repository navigation
feat(astro)!: add getReveal and make the host element internal - #332
Conversation
BREAKING CHANGE: @awesome-reveal/astro no longer exports the RevealElement type or adds awesome-reveal to the DOM types, and the host element has no public when property. Use getReveal(element).when on the rendered tag.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Astro users now control a reveal with
when, as React and Vue users do. They do not query the<awesome-reveal>host element. The host is now an internal detail.getReveal(element)is in the root entry, with no new subpath. Astro 6.0 to 7 replace each.astroimport in client code with an empty module, so a client script that imports the root entry bundles no component. I checked this in Astro 6.0.0, 6.4.8 and 7.3.8.whenset before the custom element upgrades still applies.getRevealaccepts only the element that the host animates, and throws for other elements.getReveal, so Astro passes the same checks as React and Vue.dist.test.tschanges from 5150 to 5580 bytes. The host script is smaller (5029 to 4934 bytes). The increase is the newgetRevealscript of the fixture page (525 bytes), which loads only on pages that usegetReveal.getReveal.Follow-up: the website repo uses the host element in its demos and docs. It needs its own PR after a release.
Checklist
nextbranch.!and aBREAKING CHANGE:footer.BREAKING CHANGE: @awesome-reveal/astro no longer exports the RevealElement type or adds awesome-reveal to the DOM types, and the host element has no public when property. Use getReveal(element).when on the rendered tag.