feat(stammbaum): first-load touch affordance hint (#692)

Add StammbaumAffordance: a touch-only "drag to explore · pinch to zoom" hint
that auto-dismisses on the first canvas pointer interaction (wired via the
gesture action's onGestureStart) or the explicit close, and stays dismissed for
30 days via a localStorage timestamp (boolean gate only, never rendered).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-29 17:13:36 +02:00
parent 1dffb430ac
commit 11b70d814f
4 changed files with 133 additions and 1 deletions

View File

@@ -29,6 +29,8 @@ interface Props {
onPanZoom?: (state: PanZoomState) => void;
/** When set to a node id, the canvas recentres on that node (US-PAN-005). */
centreOnId?: string | null;
/** Fired on the first pointer interaction with the canvas (affordance dismiss). */
onActivity?: () => void;
onSelect: (id: string) => void;
/**
* Force-show or force-hide the generation gutter. When undefined, falls
@@ -46,6 +48,7 @@ let {
panZoom,
onPanZoom = () => {},
centreOnId = null,
onActivity,
onSelect,
showGutter
}: Props = $props();
@@ -295,7 +298,8 @@ const parentLinks = $derived.by<ParentLinks>(() => {
baseCentreX: baseCentre.x,
baseCentreY: baseCentre.y,
reducedMotion,
onPanZoom
onPanZoom,
onGestureStart: onActivity
}}
class="block h-full w-full"
>