Skip to content

feat: Alpine adapter at full matrix parity#9

Merged
SutuSebastian merged 5 commits into
mainfrom
feat/alpine-adapter
Jul 17, 2026
Merged

feat: Alpine adapter at full matrix parity#9
SutuSebastian merged 5 commits into
mainfrom
feat/alpine-adapter

Conversation

@SutuSebastian

@SutuSebastian SutuSebastian commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add @stainless-code/alpine-layers — plugin magics ($layers / $layer), x-layer-outlet, Rank-2 layerStack + callFor, wired JS hooks, CDN entry
  • Docs/parity: adapters matrix, home snippets, confirm recipe, hooks/reference, TypeDoc for Lit + Alpine, roadmap/architecture updates
  • Harden pass: outlet stack-id + pre-plugin reactivity warnings; adapter-local docs voice (no peer-adapter name-drops)

Test plan

  • bun run --filter @stainless-code/alpine-layers test
  • bun run --filter @stainless-code/alpine-layers test:dom
  • bun run --filter @stainless-code/alpine-layers typecheck
  • Spot-check /adapters/alpine + home Alpine tab after bun run docs:build
  • Confirm changeset + size-limit entry for the new package

Summary by CodeRabbit

  • New Features
    • Added Alpine.js support, including layer outlets, reactive stack helpers, layer groups, mutation flows, and typed open/close interactions.
    • Added bundled and CDN integration options for Alpine applications.
    • Added an Alpine confirm-dialog example and installation guidance.
  • Documentation
    • Added Alpine adapter, API, migration, glossary, and headless-rendering documentation.
    • Updated comparison tables, framework listings, examples, and homepage content to include Alpine.
  • Tests
    • Added coverage for Alpine rendering, CDN setup, lifecycle behavior, type inference, and nested layers.
  • Release
    • Prepared a minor release announcement for the Alpine adapter.

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-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b4d2b0

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

This PR includes changesets to release 1 package
Name Type
@stainless-code/alpine-layers 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 Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds the @stainless-code/alpine-layers package with Alpine plugin APIs, reactive stack rendering, outlets, hooks, CDN support, tests, release configuration, and comprehensive documentation updates integrating Alpine across adapter references and examples.

Changes

Alpine adapter package

Layer / File(s) Summary
Package contracts and release wiring
packages/alpine/package.json, packages/alpine/src/alpine-types.ts, packages/alpine/src/layer-client.ts, packages/alpine/src/cdn.ts, packages/alpine/*config*
Defines package exports, Alpine runtime types, singleton client lifecycle, CDN bootstrap, build/test configuration, and release/size-limit integration.
Alpine runtime and layer APIs
packages/alpine/src/index.ts
Adds stack observers, wired layer handles, mutation flows, nested layer groups, stack hooks, x-layer-outlet, $layers, $layer, and layerStack.
Runtime behavior and type validation
packages/alpine/src/*.test.ts, packages/alpine/tests-dom/*
Tests client lifecycle, stack completion, mutation flows, nested groups, hooks, CDN registration, headless rendering, outlet behavior, teleporting, cleanup, dynamic rebinding, and type inference.
Adapter documentation and examples
packages/alpine/README.md, apps/docs/content/adapters/alpine.mdx, apps/docs/recipes/confirm-dialog/alpine.html
Documents installation, registration, rendering patterns, APIs, and confirm-dialog usage.
Repository-wide documentation alignment
apps/docs/content/**, apps/docs/pages/_home/*, docs/*, README.md, packages/*/skills/*
Adds Alpine to adapter matrices, examples, navigation, homepage content, glossary entries, and rendering guidance.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: adding the Alpine adapter and bringing it into the adapter matrix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/alpine-adapter

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a886aa9 and 7b4d2b0.

⛔ Files ignored due to path filters (2)
  • apps/docs/public/icons/alpine.svg is excluded by !**/*.svg
  • bun.lock is 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.json
  • README.md
  • apps/docs/blume.config.ts
  • apps/docs/content/adapters/alpine.mdx
  • apps/docs/content/adapters/angular.mdx
  • apps/docs/content/adapters/index.mdx
  • apps/docs/content/adapters/meta.ts
  • apps/docs/content/adapters/svelte/runes.mdx
  • apps/docs/content/adapters/svelte/store.mdx
  • apps/docs/content/concepts/comparison.mdx
  • apps/docs/content/concepts/glossary.mdx
  • apps/docs/content/concepts/index.mdx
  • apps/docs/content/concepts/overview.mdx
  • apps/docs/content/concepts/stability.mdx
  • apps/docs/content/concepts/when-to-use.mdx
  • apps/docs/content/examples/confirm-dialog.mdx
  • apps/docs/content/guides/headless-rendering.mdx
  • apps/docs/content/guides/install.mdx
  • apps/docs/content/guides/nested-overlays.mdx
  • apps/docs/content/integrations/base-ui/meta.ts
  • apps/docs/content/integrations/react-aria/meta.ts
  • apps/docs/content/reference/adapter-hooks.mdx
  • apps/docs/content/reference/api/index.mdx
  • apps/docs/content/reference/core-api.mdx
  • apps/docs/content/reference/index.mdx
  • apps/docs/content/reference/migration.mdx
  • apps/docs/content/reference/roadmap.mdx
  • apps/docs/package.json
  • apps/docs/pages/_home/FrameworkTabs.astro
  • apps/docs/pages/_home/Hero.astro
  • apps/docs/pages/_home/UseCases.astro
  • apps/docs/pages/_home/adapter-snippets.ts
  • apps/docs/recipes/confirm-dialog/alpine.html
  • docs/architecture.md
  • docs/glossary.md
  • docs/roadmap.md
  • knip.json
  • packages/alpine/README.md
  • packages/alpine/package.json
  • packages/alpine/skills/alpine-layers/SKILL.md
  • packages/alpine/src/alpine-types.ts
  • packages/alpine/src/cdn.ts
  • packages/alpine/src/index.test.ts
  • packages/alpine/src/index.ts
  • packages/alpine/src/layer-client.ts
  • packages/alpine/tests-dom/alpinejs.d.ts
  • packages/alpine/tests-dom/cdn.test.ts
  • packages/alpine/tests-dom/headless.test.ts
  • packages/alpine/tests-dom/inference.test-d.ts
  • packages/alpine/tests-dom/outlet.test.ts
  • packages/alpine/tsconfig.json
  • packages/alpine/tsdown.config.ts
  • packages/alpine/vitest.config.ts
  • packages/angular/skills/angular-layers/SKILL.md
  • packages/lit/src/index.ts
  • packages/react/skills/react-layers/SKILL.md
  • packages/svelte/skills/svelte-layers/SKILL.md
  • typedoc.json

Comment thread apps/docs/pages/_home/FrameworkTabs.astro
Comment thread packages/alpine/src/index.ts
Comment thread packages/alpine/src/index.ts
Comment thread packages/alpine/src/index.ts
@SutuSebastian
SutuSebastian merged commit 6c890d5 into main Jul 17, 2026
17 checks passed
@SutuSebastian
SutuSebastian deleted the feat/alpine-adapter branch July 17, 2026 14:26
@github-actions github-actions Bot mentioned this pull request Jul 17, 2026
SutuSebastian added a commit that referenced this pull request Jul 17, 2026
* 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.
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