Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
@dunky.dev/state-machine-solid— a first-class Solid bindings target (not a React re-export), plus asandbox/solidcmdk demo and a docs page.The bridge is implemented with Solid's own reactivity:
useMachinemirrors the connector snapshot into acreateStoreviareconcile→ fine-grained updates (readingapi.isOpenin JSX tracks only that field; nouseSyncExternalStore)onMount/onCleanup; props kept fresh with a trackedsetPropseffect; eachComponentEffectruns as its own dep-trackedcreateEffectuseSelectorreturns a Solid accessornormalize→ Solid DOM props (onInput,onDblClick,tabindex);mergeProps→ Solidclassconcat + single-objectstylemergeThe same
connect+ machine config run unchanged across React, Solid, React Native, and OpenTUI.Also in this PR
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-corepalette, mirroringsandbox/react.libs/solid+ sidebar entry; changeset.Test plan
pnpm typecheck(tsc -b tsconfig/all.json) cleanonSelect+ closes), ⌘K shortcut, Escape-to-close — all working🚧 WIP — opening early for review of the bridge approach.
🤖 Generated with Claude Code