feat(tabletop): add free-interaction layer (layer 3)
Add the interaction half of the sandbox: a held part and dialog stack as UI state outside the game store, with pure helpers (interactionsFor, dropPaths, pickPath, partFacings, nextFacing). PartPlacement is now interactive (pick up, drag to move, click to cycle facing), and a drop on a path with a stack-dialog interaction opens the deck dialog instead of moving directly. DialogLayer renders the stack-inspector dialog whose insert button issues a move. Add the dialog role, Setup.interactions, and Package.dialogs to @tts/bgm, and declare the deck insert dialog in games/poker.
This commit is contained in:
@@ -142,4 +142,21 @@ setup:
|
||||
- path: /community/4
|
||||
parts: poker:card#2h
|
||||
facing: standing
|
||||
interactions:
|
||||
- dialog: prompt#insert
|
||||
on: [/deck]
|
||||
```
|
||||
|
||||
## Dialog
|
||||
|
||||
Inserting a card into the middle of the deck is a compound interaction: the
|
||||
deck is lifted into a stack-inspector dialog with an insertion cursor. The
|
||||
cursor *is* the index — `move(id, /deck, index)` is discovered by scrolling,
|
||||
not typed.
|
||||
|
||||
```yaml role=dialog.prompt
|
||||
id: insert
|
||||
title: Insert into deck
|
||||
body: Scroll to the insertion point, then insert the held card.
|
||||
widget: stack
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user