Sha256: ed913994f83ddd826471ed2f4dedeb94be989d0d7680cba179a06e52cc71a22c
Contents?: true
Size: 916 Bytes
Versions: 2
Compression:
Stored size: 916 Bytes
Contents
export type DraggableRecord = Record<string, unknown>; export interface Draggable<T = DraggableRecord> { record: T; ref: React.MutableRefObject<HTMLDivElement>; rect: DOMRect | null; handle: string; } export type Item<T = DraggableRecord> = Draggable<T> | "Files"; export type CollectionAction<T = DraggableRecord> = | { type: "append" | "prepend" | "insertFiles" | "replace" | "reorder"; payload: Item<T>[]; } | { type: "update"; payload: Item<T> } | { type: "remove"; payload: Draggable<T> } | { type: "updatePositions"; payload?: Draggable<T> }; export interface Collection<T = DraggableRecord> { ref: React.MutableRefObject<HTMLDivElement>; draggables: Item<T>[]; dispatch: (CollectionAction) => void; } export interface Position { x: number | null; y: number | null; } export interface State<T = DraggableRecord> extends Position { dragging: Item<T> | false; }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pages_core-3.15.2 | app/javascript/types/Drag.ts |
pages_core-3.15.1 | app/javascript/types/Drag.ts |