Space API¶
Space manages named CRDT-backed zones and token placements.
new Space(session, name = "space", options?)
Space.fromDocument(session, name = "space")
Useful reads are zones, zone(name), zoneCount(name), cards(zoneName?),
findCard(idOrPredicate), toJSON(), and snapshot().
Mutating methods include place(zone, token, opts?), move(...), flip(...),
remove(...), clear(), createZone(...), deleteZone(...), clearZone(...),
lockZone(...), transferZone(...), fan(...), spreadZone(...),
stackZone(...), and shuffleZone(...). The facade also contains zone utility
methods for drawing/pushing and spreads.
When an Engine owns the facade, use space:* dispatch actions rather than
calling these writes directly. TODO: maintainer review of the complete utility
method signature table (including spread/deal helpers).