Skip to content

feat(solid): Solid integration#32

Open
ivanbanov wants to merge 2 commits into
mainfrom
solid
Open

feat(solid): Solid integration#32
ivanbanov wants to merge 2 commits into
mainfrom
solid

Conversation

@ivanbanov

Copy link
Copy Markdown
Contributor

Summary

Adds @dunky.dev/state-machine-solid — a first-class Solid bindings target (not a React re-export), plus a sandbox/solid cmdk demo and a docs page.

The bridge is implemented with Solid's own reactivity:

  • useMachine mirrors the connector snapshot into a createStore via reconcile → fine-grained updates (reading api.isOpen in JSX tracks only that field; no useSyncExternalStore)
  • lifecycle via onMount/onCleanup; props kept fresh with a tracked setProps effect; each ComponentEffect runs as its own dep-tracked createEffect
  • useSelector returns a Solid accessor
  • normalize → Solid DOM props (onInput, onDblClick, tabindex); mergeProps → Solid class concat + single-object style merge

The same connect + machine config run unchanged across React, Solid, React Native, and OpenTUI.

Also in this PR

  • tsconfig refactor into a tsconfig/ folder (base / react / solid / all) so JSX is a per-project concern now that the repo has both React and Solid JSX.
  • sandbox/solid — a Solid renderer for the shared @sandbox/cmdk-core palette, mirroring sandbox/react.
  • Docs page libs/solid + sidebar entry; changeset.

Test plan

  • pnpm typecheck (tsc -b tsconfig/all.json) clean
  • 352 tests pass (45 new Solid tests)
  • all 7 packages build (publint clean)
  • lint + format clean
  • sandbox/solid builds and verified live in-browser: open, type-to-filter, arrow-nav, Enter-to-select (fires onSelect + closes), ⌘K shortcut, Escape-to-close — all working

Note: one bridge-correctness fix — the connector must be seeded with a plain { ...props } snapshot, never the live Solid props proxy, or its value-dedup compares the proxy against itself and never wakes.

🚧 WIP — opening early for review of the bridge approach.

🤖 Generated with Claude Code

ivanbanov and others added 2 commits June 23, 2026 21:58
A first-class Solid bindings target (not a React re-export): useMachine
mirrors the connector snapshot into a createStore via reconcile for
fine-grained updates, runs the lifecycle through onMount/onCleanup, keeps
props fresh with a tracked setProps effect, and runs each ComponentEffect
as its own dep-tracked createEffect. useSelector returns a Solid accessor.
normalize maps the agnostic bindings to Solid DOM props (onInput,
onDblClick, tabindex) and mergeProps applies Solid's class concat +
single-object style merge.

Also split the tsconfig setup into a tsconfig/ folder (base/react/solid/all)
so JSX is a per-project concern, since the repo now has both React and
Solid JSX. Wires Solid into tsdown, the vitest solid project, docs, and a
changeset.

Co-authored-by: Claude <noreply@anthropic.com>
A Solid renderer for the shared ⌘K command-palette machine, mirroring
sandbox/react. Drives the same @sandbox/cmdk-core machine + connect through
the Solid bridge: api is a fine-grained store read directly in JSX, Show/For
for control flow, a createEffect for focus-on-open, and the same cmdkShortcut
ComponentEffect tuple the React sandbox uses. Vite + vite-plugin-solid,
aliasing the workspace TS sources.

Co-authored-by: Claude <noreply@anthropic.com>
@ivanbanov ivanbanov added the 🚧 WIP This will not be worked on label Jun 23, 2026
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
state-machine-website Ready Ready Preview, Comment Jun 23, 2026 8:46pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 WIP This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant