Skip to content

feat: add Solid 2 support - #117

Open
rickyraz wants to merge 6 commits into
0xGF:mainfrom
rickyraz:feat/solid-support
Open

rickyraz wants to merge 6 commits into
0xGF:mainfrom
rickyraz:feat/solid-support

Conversation

@rickyraz

@rickyraz rickyraz commented Sep 7, 2026

Copy link
Copy Markdown

Summary

Adds native Solid 2 support to Boneyard through a new boneyard-js/solid entrypoint and minimal Solid-aware Vite registry generation.

The implementation follows the existing adapter and registry contracts while keeping the current React, Vue, Svelte, Preact, Angular, and CLI behavior unchanged.

Changes

Solid adapter

  • add Skeleton, SkeletonView, and configureBoneyard

  • support SkeletonResult and ResponsiveBones

  • integrate with the existing shared registerBones registry contract

  • support container- and viewport-based responsive breakpoint selection

  • preserve fixture-based build capture behavior

  • preserve existing:

    • aria-busy
    • aria-hidden
    • pointer-event behavior
    • transitions
    • reduced-motion behavior
    • dark mode behavior
  • use Solid 2 reactive primitives and ownership rather than React hooks or Solid 1 APIs

  • reuse the existing AnimationStyle type in the Solid adapter; no core type export changes are introduced

Vite registry integration

  • add solid to BoneyardPluginOptions.framework

  • auto-detect Solid projects using:

    • solid-js
    • @solidjs/web
    • @solidjs/vite-plugin
  • generate a Solid-compatible registry when Solid is selected or detected

  • import registerBones from boneyard-js for Solid because the Solid entrypoint intentionally exposes only the Solid adapter API

  • avoid emitting React-specific "use client" directives for Solid

Solid build pipeline

Adds scripts/build-solid.mjs using:

@solidjs/compiler@2.0.0-rc.6

The build produces separate client and server artifacts:

dist/solid.js
dist/solid-server.js

This is necessary because the repository currently uses React's automatic JSX transform:

{
  "jsx": "react-jsx"
}

Using the normal TypeScript output for the Solid adapter would emit React JSX helpers such as jsxDEV and jsxs, which are not compatible with Solid 2.

The dedicated Solid compiler keeps the existing TypeScript and framework build configuration unchanged.

Separate DOM and SSR artifacts are required because @solidjs/web resolves different implementations depending on the environment. Browser consumers need the DOM runtime, while Node, Worker, Deno, and SSR consumers need the server runtime.

Package exports

Adds:

boneyard-js/solid

with conditional exports for:

  • browser
  • Node
  • Worker
  • Deno
  • SSR

Solid dependencies added:

solid-js@2.0.0-rc.6
@solidjs/web@2.0.0-rc.6
@solidjs/compiler@2.0.0-rc.6

Tests

Adds coverage for:

  • loading overlay rendering
  • registry resolution
  • build-mode fixtures
  • reactive loading transitions
  • responsive breakpoint selection
  • ResizeObserver cleanup
  • standalone SkeletonView
  • reduced-motion behavior
  • accessibility attributes

Existing adapter tests remain green.

Documentation

Adds documentation for:

  • Solid 2 installation
  • boneyard-js/solid
  • Skeleton
  • SkeletonView
  • Solid + Vite setup

Why not use @solidjs/vite-plugin?

@solidjs/vite-plugin is application-level Vite tooling. Boneyard needs to publish framework-compatible library artifacts, so the package build uses Solid's compiler directly.

This keeps the library build independent from Vite while still allowing consumer Solid applications to configure the Solid Vite plugin normally.

Scope

This PR does not add CLI --framework flags or CLI framework auto-detection.

Solid detection and registry generation are limited to the Vite plugin in this PR. The existing CLI behavior remains unchanged.

The PR does not add "use server" or "use client" handling. Boneyard only provides a universal Solid UI adapter and static skeleton artifacts; server functions and SSR application boundaries remain the responsibility of the consuming Solid application.

Testing

pnpm --filter boneyard-js run build

pnpm --filter boneyard-js run test

Verified:

  • Solid adapter tests pass
  • existing adapter tests pass
  • TypeScript compilation passes
  • package build passes
  • 180 tests pass with 0 failures
  • existing CLI and non-Solid adapter behavior remains unchanged

--conditions browser is required for Solid runtime tests because Bun otherwise resolves @solidjs/web to its server export.

The package build runs before tests because Solid tests exercise the compiler-generated dist/solid.js artifact.

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

@rickyraz is attempting to deploy a commit to the goodfuture's projects Team on Vercel.

A member of the Team first needs to authorize it.

@rickyraz rickyraz changed the title Feat/solid support feat: add Solid 2 support Sep 7, 2026
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