/** * Global drag and drop state management using Svelte 5 runes. * * We use a global $state object rather than a store because: * 1. Only one drag operation happens at a time in the browser * 2. Droppables need to read the current drag state without prop drilling * 3. $state provides fine-grained reactivity with less boilerplate than stores * * This state is reactive - components accessing these properties will * re-render when they change during the drag lifecycle. */ import type { DragDropState } from '../types/index.js'; /** * Global reactive state for the current drag operation. * * @example * ```svelte * * * {#if dndState.isDragging} *