feat: Alpine adapter at full matrix parity#9
Conversation
Ship @stainless-code/alpine-layers — plugin magics, x-layer-outlet, Rank-2 layerStack, Svelte-shaped hooks, CDN bootstrap, and docs/site parity.
Add both packages to typedoc entryPoints, map Lit external symbols so treatWarningsAsErrors stays green, and point the API index at the new modules.
Also note React Native portal targets in the React adapter skill.
Warn on non-string x-layer-outlet ids and pre-plugin hooks; drop peer-adapter name-drops from per-adapter surfaces; sync Hero adapter count.
🦋 Changeset detectedLatest commit: 7b4d2b0 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 |
📝 WalkthroughWalkthroughAdds the ChangesAlpine adapter package
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/docs/pages/_home/FrameworkTabs.astro`:
- Around line 43-45: Update the StackOutlet (built-in host) capability row so
Alpine’s value at index 6 is false, matching the documented x-layer-outlet
directive behavior and the Angular/Svelte entries; leave all other framework
capability values unchanged.
In `@packages/alpine/src/index.ts`:
- Around line 337-366: Expose cleanup for both subscriptions created in the
createLayer flow by connecting stateObs.destroy() and queuedObs.destroy() to the
returned handle’s disposal lifecycle. Update createLayerHandle or the handle
wiring around stateObs and queuedObs so disposing the handle destroys each
observer exactly once.
- Around line 423-444: Update useMutationFlow’s orEnd implementation to prevent
overlapping mutation runs: reject or otherwise skip a new invocation while one
is already active, ensuring pending and call.setRunning(true) remain accurate
until the accepted run finishes. Preserve the existing fn, call.end, and finally
cleanup behavior for the active mutation.
- Around line 522-550: Update createStackHook to retain config.client locally
instead of calling setLayerClient during hook creation. Pass that client through
useStack alongside stackId, while preserving getLayerClient as the fallback for
hooks without an explicitly provided client and leaving setLayerClient available
only for explicit default-singleton configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c6b84fc2-430b-4c56-a919-ddc9a545277b
⛔ Files ignored due to path filters (2)
apps/docs/public/icons/alpine.svgis excluded by!**/*.svgbun.lockis excluded by!**/*.lock
📒 Files selected for processing (61)
.agents/skills/docs-voice/SKILL.md.agents/skills/harden-pr/LEDGER.md.changeset/alpine-adapter.md.size-limit.jsonREADME.mdapps/docs/blume.config.tsapps/docs/content/adapters/alpine.mdxapps/docs/content/adapters/angular.mdxapps/docs/content/adapters/index.mdxapps/docs/content/adapters/meta.tsapps/docs/content/adapters/svelte/runes.mdxapps/docs/content/adapters/svelte/store.mdxapps/docs/content/concepts/comparison.mdxapps/docs/content/concepts/glossary.mdxapps/docs/content/concepts/index.mdxapps/docs/content/concepts/overview.mdxapps/docs/content/concepts/stability.mdxapps/docs/content/concepts/when-to-use.mdxapps/docs/content/examples/confirm-dialog.mdxapps/docs/content/guides/headless-rendering.mdxapps/docs/content/guides/install.mdxapps/docs/content/guides/nested-overlays.mdxapps/docs/content/integrations/base-ui/meta.tsapps/docs/content/integrations/react-aria/meta.tsapps/docs/content/reference/adapter-hooks.mdxapps/docs/content/reference/api/index.mdxapps/docs/content/reference/core-api.mdxapps/docs/content/reference/index.mdxapps/docs/content/reference/migration.mdxapps/docs/content/reference/roadmap.mdxapps/docs/package.jsonapps/docs/pages/_home/FrameworkTabs.astroapps/docs/pages/_home/Hero.astroapps/docs/pages/_home/UseCases.astroapps/docs/pages/_home/adapter-snippets.tsapps/docs/recipes/confirm-dialog/alpine.htmldocs/architecture.mddocs/glossary.mddocs/roadmap.mdknip.jsonpackages/alpine/README.mdpackages/alpine/package.jsonpackages/alpine/skills/alpine-layers/SKILL.mdpackages/alpine/src/alpine-types.tspackages/alpine/src/cdn.tspackages/alpine/src/index.test.tspackages/alpine/src/index.tspackages/alpine/src/layer-client.tspackages/alpine/tests-dom/alpinejs.d.tspackages/alpine/tests-dom/cdn.test.tspackages/alpine/tests-dom/headless.test.tspackages/alpine/tests-dom/inference.test-d.tspackages/alpine/tests-dom/outlet.test.tspackages/alpine/tsconfig.jsonpackages/alpine/tsdown.config.tspackages/alpine/vitest.config.tspackages/angular/skills/angular-layers/SKILL.mdpackages/lit/src/index.tspackages/react/skills/react-layers/SKILL.mdpackages/svelte/skills/svelte-layers/SKILL.mdtypedoc.json
* docs: add Alpine to footer adapter links Footer Adapters column lagged the Alpine adapter page from #9. * docs: document `docs` label for site-deploying PRs SSOT in docs-governance; wire update-docs + CONTRIBUTING so merges deploy /layers.
Summary
@stainless-code/alpine-layers— plugin magics ($layers/$layer),x-layer-outlet, Rank-2layerStack+callFor, wired JS hooks, CDN entryTest plan
bun run --filter @stainless-code/alpine-layers testbun run --filter @stainless-code/alpine-layers test:dombun run --filter @stainless-code/alpine-layers typecheck/adapters/alpine+ home Alpine tab afterbun run docs:buildSummary by CodeRabbit