Repository navigation
feat: add card dealer block - #234
Merged
Merged
Conversation
A deck, fanned hand and discard pile driven by each card's zone. Zone changes arc cards across the table on motion's arc() path while they flip in 3D, multi-card moves stagger, hand reorders hop, and hovered or focused hand cards lift. Each card stops its previous move before starting a new one so quick successive moves settle on the latest target.
The hand fan now caps its outer tilt and drop, so large hands keep one shallow arc, and a multi-card move spreads its stagger over a fixed window. The demo deals up to 13 cards and adds Deal 3.
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.
What
New Card Dealer block (
@beui/card-dealer): a card table with a face-down deck, a fanned hand and a tilted discard pile.id, azone(deck/hand/pile) and alabel. Moving a card is just changing its zone; array order sets stacking and fan order.renderFace/renderBackfor any card design;cardWidth,cardHeight,spreadandangletune the layout.onCardSelectmakes hand cards buttons, rendered in fan order so Tab follows the hand.Motion
arc()path while it flips face up or down in 3D.Each card runs on
useAnimateand stops its previous move before starting the next: a declarative arc path keeps running when its target changes, so a long flight finishing after a quick hop would otherwise write its stale end point back.Demo
52-card deck that opens with a dealt hand of five. Deal, Deal 3 (up to a 13-card hand), Sort, Shuffle and Collect; clicking a hand card plays it to the pile.
Also
Registry entry, SEO and About copy, component dates, changelog line, AGENTS.md catalog row, and
tests/card-dealer.a11y.test.tsx.Verification
bun run check,bun test