feat(utils): export composeHandlers — mergeProps' own composition, made public - #67
Merged
Merged
Conversation
…de public Promote the private compose inside mergeProps to a public export in its own file. Same function, same semantics (consumer first, library skipped on the consumer's defaultPrevented): mergeProps now imports it, so nothing changes behaviorally — the composition just becomes reachable for consumers that need to compose a single handler pair outside a prop merge. Unlike the composeHandlers removed in the previous commit (a props-mutating walker with no veto that nothing ever called), this exports the battle-tested implementation the whole stack already runs on. Co-Authored-By: Claude Fable 5 <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.
Stacked on #66 (retargets to
mainautomatically when it merges).Promotes the private
composeinsidemergePropsto a publiccomposeHandlersexport, in its own file. Zero behavior change —mergePropsimports and calls the exact same function; the composition (consumer handler first, library handler skipped when the consumer setdefaultPrevented, per Radix/Ark conventions) just becomes reachable on its own for composing a single handler pair outside a prop merge.Not a resurrection of the export #66 deletes: that one was a different, never-called design (a props-mutating walker with a WeakMap cache and no
defaultPreventedveto). This exports the battle-tested implementation the whole stack already runs on.Includes public-contract tests (order, veto, return value, non-event args), the
ARCHITECTURE.mdmentions restored, and aminorchangeset for@dunky.dev/state-machine-utils.🤖 Generated with Claude Code