// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: 2026 FernTech
//! Drag-to-reorder for `GridView`.
//!
//! Each tile starts a shared [`RowDragData`](crate::data_views::RowDragData)
//! drag (the same payload `ListView` / `TreeView` / `TableView` emit, so a
//! grid tile can be dropped on any of them and vice-versa); the container is
//! a drop target
//! that computes a 2D insertion index from the pointer position and routes the
//! drop through the **source's** `can_accept` / `accept_drop` (intra-grid
//! reorder) or forwards a foreign drop to the app (`on_item_drop`). A vertical
//! insertion bar (painted by `GridOverlay`) shows where the item will land.
use Point;
use GridLayoutStrategy;
/// The flat index a drop at `local` (widget-local point) would insert
/// *before*. Delegates to [`GridLayoutStrategy::insertion_index_at`], which
/// (unlike `index_at_point`) always resolves to a real insertion point — a
/// point in an inter-tile gap (row-gap, column-gap) lands on the nearest
/// tile rather than falling through to "append at the end".
pub