ngx-virtual-dnd 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +605 -0
- package/fesm2022/ngx-virtual-dnd.mjs +3154 -0
- package/fesm2022/ngx-virtual-dnd.mjs.map +1 -0
- package/package.json +47 -0
- package/types/ngx-virtual-dnd.d.ts +1250 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-virtual-dnd.mjs","sources":["../../../projects/ngx-virtual-dnd/src/lib/models/drag-drop.models.ts","../../../projects/ngx-virtual-dnd/src/lib/tokens/scroll-container.token.ts","../../../projects/ngx-virtual-dnd/src/lib/services/drag-state.service.ts","../../../projects/ngx-virtual-dnd/src/lib/services/position-calculator.service.ts","../../../projects/ngx-virtual-dnd/src/lib/services/auto-scroll.service.ts","../../../projects/ngx-virtual-dnd/src/lib/services/element-clone.service.ts","../../../projects/ngx-virtual-dnd/src/lib/components/virtual-scroll-container.component.ts","../../../projects/ngx-virtual-dnd/src/lib/components/drag-preview.component.ts","../../../projects/ngx-virtual-dnd/src/lib/components/placeholder.component.ts","../../../projects/ngx-virtual-dnd/src/lib/directives/droppable-group.directive.ts","../../../projects/ngx-virtual-dnd/src/lib/directives/droppable.directive.ts","../../../projects/ngx-virtual-dnd/src/lib/components/virtual-sortable-list.component.ts","../../../projects/ngx-virtual-dnd/src/lib/directives/draggable.directive.ts","../../../projects/ngx-virtual-dnd/src/lib/directives/scrollable.directive.ts","../../../projects/ngx-virtual-dnd/src/lib/directives/virtual-for.directive.ts","../../../projects/ngx-virtual-dnd/src/lib/utils/drop-helpers.ts","../../../projects/ngx-virtual-dnd/src/lib/index.ts","../../../projects/ngx-virtual-dnd/src/public-api.ts","../../../projects/ngx-virtual-dnd/src/ngx-virtual-dnd.ts"],"sourcesContent":["/**\n * Represents the item currently being dragged.\n */\nexport interface DraggedItem {\n /** Unique identifier for the draggable item */\n draggableId: string;\n /** ID of the droppable container the item originated from */\n droppableId: string;\n /** Reference to the dragged element */\n element: HTMLElement;\n /** Cloned element for use in drag preview (auto-generated) */\n clonedElement?: HTMLElement;\n /** Height of the dragged element in pixels */\n height: number;\n /** Width of the dragged element in pixels */\n width: number;\n /** Optional user-provided data associated with the item */\n data?: unknown;\n}\n\n/**\n * Current position of the cursor during drag.\n */\nexport interface CursorPosition {\n x: number;\n y: number;\n}\n\n/**\n * Offset from cursor to the top-left corner of the dragged element.\n * Used to maintain grab position during drag.\n */\nexport interface GrabOffset {\n x: number;\n y: number;\n}\n\n/**\n * Complete state of the drag-and-drop system.\n */\nexport interface DragState {\n /** Whether a drag operation is currently in progress */\n isDragging: boolean;\n /** Information about the item being dragged */\n draggedItem: DraggedItem | null;\n /** ID of the droppable where the drag started */\n sourceDroppableId: string | null;\n /** Original index of the dragged item in the source list */\n sourceIndex: number | null;\n /** ID of the droppable currently being hovered over */\n activeDroppableId: string | null;\n /** ID of the item the placeholder should appear before, or 'END_OF_LIST' */\n placeholderId: string | null;\n /** Index where the placeholder should be inserted (more stable than placeholderId) */\n placeholderIndex: number | null;\n /** Current cursor position */\n cursorPosition: CursorPosition | null;\n /** Offset from cursor to element top-left (for maintaining grab position) */\n grabOffset: GrabOffset | null;\n /** Position when drag started (for axis locking) */\n initialPosition: CursorPosition | null;\n /** Axis to lock movement to ('x' = horizontal only, 'y' = vertical only) */\n lockAxis: 'x' | 'y' | null;\n}\n\n/**\n * Event emitted when a drag operation starts.\n */\nexport interface DragStartEvent {\n /** Unique identifier for the draggable item */\n draggableId: string;\n /** ID of the droppable container the item originated from */\n droppableId: string;\n /** Optional user-provided data associated with the item */\n data?: unknown;\n /** Position where the drag started */\n position: CursorPosition;\n}\n\n/**\n * Event emitted during drag movement.\n */\nexport interface DragMoveEvent {\n /** Unique identifier for the draggable item */\n draggableId: string;\n /** ID of the droppable container the item originated from */\n sourceDroppableId: string;\n /** ID of the droppable currently being hovered, or null */\n targetDroppableId: string | null;\n /** ID of the item to insert before, or null */\n placeholderId: string | null;\n /** Current cursor position */\n position: CursorPosition;\n}\n\n/**\n * Event emitted when an item enters a droppable container.\n */\nexport interface DragEnterEvent {\n /** ID of the droppable being entered */\n droppableId: string;\n /** Information about the dragged item */\n draggedItem: DraggedItem;\n}\n\n/**\n * Event emitted when an item leaves a droppable container.\n */\nexport interface DragLeaveEvent {\n /** ID of the droppable being left */\n droppableId: string;\n /** Information about the dragged item */\n draggedItem: DraggedItem;\n}\n\n/**\n * Event emitted while hovering over a droppable container.\n */\nexport interface DragOverEvent {\n /** ID of the droppable being hovered */\n droppableId: string;\n /** Information about the dragged item */\n draggedItem: DraggedItem;\n /** ID of the item the placeholder should appear before */\n placeholderId: string | null;\n /** Current cursor position */\n position: CursorPosition;\n}\n\n/**\n * Source information for a drop event.\n */\nexport interface DropSource {\n /** Unique identifier for the draggable item */\n draggableId: string;\n /** ID of the droppable container the item originated from */\n droppableId: string;\n /** Original index in the source list */\n index: number;\n /** Optional user-provided data associated with the item */\n data?: unknown;\n}\n\n/**\n * Destination information for a drop event.\n */\nexport interface DropDestination {\n /** ID of the droppable container receiving the item */\n droppableId: string;\n /** ID of the item to insert before, or 'END_OF_LIST' */\n placeholderId: string;\n /** Target index in the destination list */\n index: number;\n /** Optional user-provided data associated with the droppable */\n data?: unknown;\n}\n\n/**\n * Event emitted when an item is dropped.\n */\nexport interface DropEvent {\n /** Information about where the item came from */\n source: DropSource;\n /** Information about where the item is going */\n destination: DropDestination;\n}\n\n/**\n * Event emitted when a drag operation ends (including cancel).\n */\nexport interface DragEndEvent {\n /** Unique identifier for the draggable item */\n draggableId: string;\n /** ID of the droppable container the item originated from */\n droppableId: string;\n /** Whether the drag was cancelled (escaped, dropped outside) */\n cancelled: boolean;\n /** Optional user-provided data associated with the item */\n data?: unknown;\n}\n\n/**\n * Initial state for the drag state service.\n */\nexport const INITIAL_DRAG_STATE: DragState = {\n isDragging: false,\n draggedItem: null,\n sourceDroppableId: null,\n sourceIndex: null,\n activeDroppableId: null,\n placeholderId: null,\n placeholderIndex: null,\n cursorPosition: null,\n grabOffset: null,\n initialPosition: null,\n lockAxis: null,\n};\n\n/**\n * Placeholder ID used when dropping at the end of a list.\n */\nexport const END_OF_LIST = 'END_OF_LIST';\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Interface for a scroll container that can be used with VirtualForDirective.\n * Implement this interface to create custom scroll containers.\n *\n * The scrollTop() and containerHeight() methods should return reactive values\n * (internally backed by signals) so that changes trigger re-computation in\n * the virtual scroll directive.\n */\nexport interface VdndScrollContainer {\n /** The native HTML element that handles scrolling */\n readonly nativeElement: HTMLElement;\n\n /** Current scroll position from top in pixels (reactive) */\n scrollTop(): number;\n\n /** Current container height in pixels (reactive) */\n containerHeight(): number;\n\n /** Scroll to a specific position */\n scrollTo(options: ScrollToOptions): void;\n}\n\n/**\n * Injection token for providing a scroll container to VirtualForDirective.\n *\n * Use the `vdndScrollable` directive to provide this token, or implement\n * `VdndScrollContainer` and provide it manually.\n *\n * @example\n * ```html\n * <div vdndScrollable style=\"overflow: auto; height: 400px;\">\n * <ng-container *vdndVirtualFor=\"let item of items(); itemHeight: 50; trackBy: trackById\">\n * <div>{{ item.name }}</div>\n * </ng-container>\n * </div>\n * ```\n */\nexport const VDND_SCROLL_CONTAINER = new InjectionToken<VdndScrollContainer>(\n 'VDND_SCROLL_CONTAINER'\n);\n","import { computed, effect, Injectable, signal } from '@angular/core';\nimport {\n CursorPosition,\n DraggedItem,\n DragState,\n GrabOffset,\n INITIAL_DRAG_STATE,\n} from '../models/drag-drop.models';\n\n/**\n * Central service for managing drag-and-drop state.\n * Uses signals for reactive state management.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DragStateService {\n /** Internal state signal */\n readonly #state = signal<DragState>(INITIAL_DRAG_STATE);\n\n /** Flag indicating if the last drag was cancelled (not dropped) */\n readonly #wasCancelled = signal<boolean>(false);\n\n /** Whether the last drag was cancelled (for droppable to check before emitting drop) */\n readonly wasCancelled = this.#wasCancelled.asReadonly();\n\n /** Read-only access to the full state */\n readonly state = this.#state.asReadonly();\n\n /** Whether a drag operation is in progress */\n readonly isDragging = computed(() => this.#state().isDragging);\n\n /** The currently dragged item, or null */\n readonly draggedItem = computed(() => this.#state().draggedItem);\n\n /** ID of the currently dragged item, or null (convenience signal for filtering) */\n readonly draggedItemId = computed(() => this.#state().draggedItem?.draggableId ?? null);\n\n /** ID of the droppable where the drag started */\n readonly sourceDroppableId = computed(() => this.#state().sourceDroppableId);\n\n /** Original index of the dragged item in the source list */\n readonly sourceIndex = computed(() => this.#state().sourceIndex);\n\n /** ID of the droppable currently being hovered over */\n readonly activeDroppableId = computed(() => this.#state().activeDroppableId);\n\n /** ID of the item the placeholder should appear before */\n readonly placeholderId = computed(() => this.#state().placeholderId);\n\n /** Index where the placeholder should be inserted */\n readonly placeholderIndex = computed(() => this.#state().placeholderIndex);\n\n /** Current cursor position */\n readonly cursorPosition = computed(() => this.#state().cursorPosition);\n\n /** Offset from cursor to element top-left (for maintaining grab position) */\n readonly grabOffset = computed(() => this.#state().grabOffset);\n\n /** Position when drag started (for axis locking) */\n readonly initialPosition = computed(() => this.#state().initialPosition);\n\n /** Axis to lock movement to */\n readonly lockAxis = computed(() => this.#state().lockAxis);\n\n constructor() {\n // Inject cursor styles once (for consistent grabbing cursor during drag)\n if (typeof document !== 'undefined') {\n const styleId = 'vdnd-cursor-styles';\n if (!document.getElementById(styleId)) {\n const style = document.createElement('style');\n style.id = styleId;\n style.textContent = `\n body.vdnd-dragging,\n body.vdnd-dragging * {\n cursor: grabbing !important;\n }\n `;\n document.head.appendChild(style);\n }\n }\n\n // Effect to toggle body class during drag\n effect(() => {\n if (typeof document === 'undefined') return;\n const isDragging = this.isDragging();\n document.body.classList.toggle('vdnd-dragging', isDragging);\n });\n }\n\n /**\n * Start a drag operation.\n */\n startDrag(\n item: DraggedItem,\n initialPosition?: CursorPosition,\n grabOffset?: GrabOffset,\n lockAxis?: 'x' | 'y' | null,\n activeDroppableId?: string | null,\n placeholderId?: string | null,\n placeholderIndex?: number | null,\n sourceIndex?: number | null,\n ): void {\n // Reset cancellation flag at start of new drag\n this.#wasCancelled.set(false);\n this.#state.set({\n isDragging: true,\n draggedItem: item,\n sourceDroppableId: item.droppableId,\n sourceIndex: sourceIndex ?? null,\n activeDroppableId: activeDroppableId ?? null,\n placeholderId: placeholderId ?? null,\n placeholderIndex: placeholderIndex ?? null,\n cursorPosition: initialPosition ?? null,\n grabOffset: grabOffset ?? null,\n initialPosition: initialPosition ?? null,\n lockAxis: lockAxis ?? null,\n });\n }\n\n /**\n * Update the drag position and targets.\n */\n updateDragPosition(update: {\n cursorPosition: CursorPosition;\n activeDroppableId: string | null;\n placeholderId: string | null;\n placeholderIndex: number | null;\n }): void {\n if (!this.#state().isDragging) {\n return;\n }\n\n this.#state.update((state) => ({\n ...state,\n cursorPosition: update.cursorPosition,\n activeDroppableId: update.activeDroppableId,\n placeholderId: update.placeholderId,\n placeholderIndex: update.placeholderIndex,\n }));\n }\n\n /**\n * Update just the active droppable.\n */\n setActiveDroppable(droppableId: string | null): void {\n if (!this.#state().isDragging) {\n return;\n }\n\n this.#state.update((state) => ({\n ...state,\n activeDroppableId: droppableId,\n }));\n }\n\n /**\n * Update just the placeholder position.\n */\n setPlaceholder(placeholderId: string | null): void {\n if (!this.#state().isDragging) {\n return;\n }\n\n this.#state.update((state) => ({\n ...state,\n placeholderId,\n }));\n }\n\n /**\n * End the drag operation and reset state (normal drop).\n */\n endDrag(): void {\n this.#wasCancelled.set(false);\n this.#state.set(INITIAL_DRAG_STATE);\n }\n\n /**\n * Cancel the drag operation (escape key, disabled, etc.).\n */\n cancelDrag(): void {\n this.#wasCancelled.set(true);\n this.#state.set(INITIAL_DRAG_STATE);\n }\n\n /**\n * Check if a specific droppable is currently active.\n */\n isDroppableActive(droppableId: string): boolean {\n return this.#state().activeDroppableId === droppableId;\n }\n\n /**\n * Get the current state snapshot (for event creation).\n */\n getStateSnapshot(): DragState {\n return this.#state();\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service for calculating drop positions and finding elements at cursor positions.\n * This is the core algorithm that makes virtual scroll + drag-and-drop work together.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class PositionCalculatorService {\n /** Data attribute used to identify droppable elements */\n readonly #DROPPABLE_ID_ATTR = 'data-droppable-id';\n\n /** Data attribute used to identify droppable groups */\n readonly #DROPPABLE_GROUP_ATTR = 'data-droppable-group';\n\n /** Data attribute used to identify draggable elements */\n readonly #DRAGGABLE_ID_ATTR = 'data-draggable-id';\n\n /** Maximum DOM levels to traverse when looking for parent elements */\n readonly #MAX_PARENT_TRAVERSAL = 15;\n\n /**\n * Find the droppable element at a given point.\n *\n * This works by temporarily hiding the dragged element, then using\n * document.elementFromPoint to find what's underneath the cursor.\n *\n * @param x - Cursor X coordinate\n * @param y - Cursor Y coordinate\n * @param draggedElement - The element being dragged (will be temporarily hidden)\n * @param groupName - The drag-and-drop group name to filter by\n * @returns The droppable element, or null if none found\n */\n findDroppableAtPoint(\n x: number,\n y: number,\n draggedElement: HTMLElement,\n groupName: string\n ): HTMLElement | null {\n // Temporarily hide the dragged element to \"see through\" it\n const originalPointerEvents = draggedElement.style.pointerEvents;\n draggedElement.style.pointerEvents = 'none';\n\n try {\n const elementAtPoint = document.elementFromPoint(x, y);\n if (!elementAtPoint) {\n return null;\n }\n\n return this.getDroppableParent(elementAtPoint as HTMLElement, groupName);\n } finally {\n // Always restore pointer events\n draggedElement.style.pointerEvents = originalPointerEvents;\n }\n }\n\n /**\n * Find the draggable element at a given point.\n *\n * @param x - Cursor X coordinate\n * @param y - Cursor Y coordinate\n * @param draggedElement - The element being dragged (will be temporarily hidden)\n * @returns The draggable element, or null if none found\n */\n findDraggableAtPoint(x: number, y: number, draggedElement: HTMLElement): HTMLElement | null {\n // Temporarily hide the dragged element\n const originalPointerEvents = draggedElement.style.pointerEvents;\n draggedElement.style.pointerEvents = 'none';\n\n try {\n const elementAtPoint = document.elementFromPoint(x, y);\n if (!elementAtPoint) {\n return null;\n }\n\n return this.getDraggableParent(elementAtPoint as HTMLElement);\n } finally {\n draggedElement.style.pointerEvents = originalPointerEvents;\n }\n }\n\n /**\n * Walk up the DOM tree to find a droppable parent element.\n *\n * @param element - Starting element\n * @param groupName - The drag-and-drop group name to filter by\n * @returns The droppable parent element, or null if none found\n */\n getDroppableParent(element: HTMLElement, groupName: string): HTMLElement | null {\n let current: HTMLElement | null = element;\n let count = 0;\n\n while (current && current.tagName !== 'BODY' && count < this.#MAX_PARENT_TRAVERSAL) {\n const foundGroup = current.getAttribute(this.#DROPPABLE_GROUP_ATTR);\n\n if (foundGroup && foundGroup === groupName) {\n return current;\n }\n\n current = current.parentElement;\n count++;\n }\n\n return null;\n }\n\n /**\n * Walk up the DOM tree to find a draggable parent element.\n *\n * @param element - Starting element\n * @returns The draggable parent element, or null if none found\n */\n getDraggableParent(element: HTMLElement): HTMLElement | null {\n let current: HTMLElement | null = element;\n let count = 0;\n\n while (current && current.tagName !== 'BODY' && count < this.#MAX_PARENT_TRAVERSAL) {\n const draggableId = current.getAttribute(this.#DRAGGABLE_ID_ATTR);\n\n if (draggableId) {\n return current;\n }\n\n current = current.parentElement;\n count++;\n }\n\n return null;\n }\n\n /**\n * Get the draggable ID from an element.\n */\n getDraggableId(element: HTMLElement): string | null {\n return element.getAttribute(this.#DRAGGABLE_ID_ATTR);\n }\n\n /**\n * Get the droppable ID from an element.\n */\n getDroppableId(element: HTMLElement): string | null {\n return element.getAttribute(this.#DROPPABLE_ID_ATTR);\n }\n\n /**\n * Calculate the drop index based on mathematical position.\n *\n * This is an alternative approach that doesn't require the target element\n * to be in the DOM. Useful when the target might be virtualized away.\n *\n * @param scrollTop - Current scroll position of the container\n * @param cursorY - Cursor Y position (viewport-relative)\n * @param containerTop - Top position of the container (viewport-relative)\n * @param itemHeight - Height of each item\n * @param totalItems - Total number of items in the list\n * @returns The calculated drop index\n */\n calculateDropIndex(\n scrollTop: number,\n cursorY: number,\n containerTop: number,\n itemHeight: number,\n totalItems: number\n ): number {\n // Calculate the position relative to the container's content\n const relativeY = cursorY - containerTop + scrollTop;\n\n // Calculate which item index this corresponds to\n const index = Math.floor(relativeY / itemHeight);\n\n // Clamp to valid range\n return Math.max(0, Math.min(index, totalItems));\n }\n\n /**\n * Check if a point is within a specific threshold of a container's edge.\n *\n * @param position - Current cursor position\n * @param containerRect - Container's bounding rect\n * @param threshold - Distance from edge to trigger (in pixels)\n * @returns Object indicating which edges are near\n */\n getNearEdge(\n position: { x: number; y: number },\n containerRect: DOMRect,\n threshold: number\n ): { top: boolean; bottom: boolean; left: boolean; right: boolean } {\n return {\n top: position.y - containerRect.top <= threshold,\n bottom: containerRect.bottom - position.y <= threshold,\n left: position.x - containerRect.left <= threshold,\n right: containerRect.right - position.x <= threshold,\n };\n }\n\n /**\n * Determine if the cursor is inside a container.\n */\n isInsideContainer(position: { x: number; y: number }, containerRect: DOMRect): boolean {\n return (\n position.x >= containerRect.left &&\n position.x <= containerRect.right &&\n position.y >= containerRect.top &&\n position.y <= containerRect.bottom\n );\n }\n}\n","import { inject, Injectable, NgZone } from '@angular/core';\nimport { DragStateService } from './drag-state.service';\nimport { PositionCalculatorService } from './position-calculator.service';\n\n/**\n * Configuration for auto-scroll behavior.\n */\nexport interface AutoScrollConfig {\n /** Distance from edge to start scrolling (in pixels) */\n threshold: number;\n /** Maximum scroll speed (in pixels per frame) */\n maxSpeed: number;\n /** Whether to accelerate scroll based on distance from edge */\n accelerate: boolean;\n}\n\n/**\n * Default auto-scroll configuration.\n */\nconst DEFAULT_CONFIG: AutoScrollConfig = {\n threshold: 50,\n maxSpeed: 15,\n accelerate: true,\n};\n\n/**\n * Service that handles auto-scrolling when dragging near container edges.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AutoScrollService {\n readonly #dragState = inject(DragStateService);\n readonly #positionCalculator = inject(PositionCalculatorService);\n readonly #ngZone = inject(NgZone);\n\n /** Currently registered scrollable containers */\n #scrollableContainers = new Map<\n string,\n {\n element: HTMLElement;\n config: AutoScrollConfig;\n }\n >();\n\n /** Active animation frame ID */\n #animationFrameId: number | null = null;\n\n /** Callback to invoke when scrolling occurs (for placeholder recalculation) */\n #onScrollCallback: (() => void) | null = null;\n\n /** Current scroll state */\n #scrollState: {\n containerId: string | null;\n direction: { x: number; y: number };\n speed: number;\n } = {\n containerId: null,\n direction: { x: 0, y: 0 },\n speed: 0,\n };\n\n /**\n * Register a scrollable container for auto-scrolling.\n */\n registerContainer(\n id: string,\n element: HTMLElement,\n config: Partial<AutoScrollConfig> = {},\n ): void {\n this.#scrollableContainers.set(id, {\n element,\n config: { ...DEFAULT_CONFIG, ...config },\n });\n }\n\n /**\n * Unregister a scrollable container.\n */\n unregisterContainer(id: string): void {\n this.#scrollableContainers.delete(id);\n }\n\n /**\n * Start monitoring for auto-scroll.\n * Call this when a drag starts.\n * @param onScroll Optional callback to invoke when scrolling occurs (for placeholder recalculation)\n */\n startMonitoring(onScroll?: () => void): void {\n if (this.#animationFrameId !== null) {\n return;\n }\n\n this.#onScrollCallback = onScroll ?? null;\n\n this.#ngZone.runOutsideAngular(() => {\n this.#tick();\n });\n }\n\n /**\n * Stop monitoring for auto-scroll.\n * Call this when a drag ends.\n */\n stopMonitoring(): void {\n if (this.#animationFrameId !== null) {\n cancelAnimationFrame(this.#animationFrameId);\n this.#animationFrameId = null;\n }\n\n this.#onScrollCallback = null;\n this.#scrollState = {\n containerId: null,\n direction: { x: 0, y: 0 },\n speed: 0,\n };\n }\n\n /**\n * Animation tick - check cursor position and scroll if needed.\n */\n #tick(): void {\n const cursor = this.#dragState.cursorPosition();\n const isDragging = this.#dragState.isDragging();\n\n // Stop monitoring if drag ended\n if (!isDragging) {\n this.stopMonitoring();\n return;\n }\n\n // Skip this frame if no cursor position yet, but continue monitoring\n if (!cursor) {\n this.#animationFrameId = requestAnimationFrame(() => this.#tick());\n return;\n }\n\n let scrollPerformed = false;\n\n // Check each container\n for (const [id, { element, config }] of this.#scrollableContainers) {\n const rect = element.getBoundingClientRect();\n\n // Check if cursor is inside this container\n const isInside = this.#positionCalculator.isInsideContainer(cursor, rect);\n\n if (!isInside) {\n continue;\n }\n\n // Check edges\n const nearEdge = this.#positionCalculator.getNearEdge(cursor, rect, config.threshold);\n\n // Calculate scroll direction and speed\n const direction = { x: 0, y: 0 };\n let maxDistance = 0;\n\n if (nearEdge.top) {\n direction.y = -1;\n maxDistance = Math.max(maxDistance, config.threshold - (cursor.y - rect.top));\n } else if (nearEdge.bottom) {\n direction.y = 1;\n maxDistance = Math.max(maxDistance, config.threshold - (rect.bottom - cursor.y));\n }\n\n if (nearEdge.left) {\n direction.x = -1;\n maxDistance = Math.max(maxDistance, config.threshold - (cursor.x - rect.left));\n } else if (nearEdge.right) {\n direction.x = 1;\n maxDistance = Math.max(maxDistance, config.threshold - (rect.right - cursor.x));\n }\n\n // If near an edge, start scrolling\n if (direction.x !== 0 || direction.y !== 0) {\n // Calculate speed (accelerate based on distance from edge)\n let speed = config.maxSpeed;\n if (config.accelerate) {\n const distanceRatio = maxDistance / config.threshold;\n speed = Math.min(config.maxSpeed, Math.max(1, config.maxSpeed * distanceRatio));\n }\n\n this.#scrollState = { containerId: id, direction, speed };\n this.#performScroll(element, direction, speed);\n scrollPerformed = true;\n break;\n }\n }\n\n // Reset scroll state if no scrolling was performed\n if (!scrollPerformed) {\n this.#scrollState = {\n containerId: null,\n direction: { x: 0, y: 0 },\n speed: 0,\n };\n }\n\n this.#animationFrameId = requestAnimationFrame(() => this.#tick());\n }\n\n /**\n * Perform the actual scroll operation.\n */\n #performScroll(element: HTMLElement, direction: { x: number; y: number }, speed: number): void {\n const scrollX = direction.x * speed;\n const scrollY = direction.y * speed;\n\n // Check bounds before scrolling\n const maxScrollY = element.scrollHeight - element.clientHeight;\n const maxScrollX = element.scrollWidth - element.clientWidth;\n\n if (direction.y < 0 && element.scrollTop <= 0) {\n return;\n }\n if (direction.y > 0 && element.scrollTop >= maxScrollY) {\n return;\n }\n if (direction.x < 0 && element.scrollLeft <= 0) {\n return;\n }\n if (direction.x > 0 && element.scrollLeft >= maxScrollX) {\n return;\n }\n\n // Use direct property assignment for guaranteed synchronous scroll\n // scrollBy() with 'instant' behavior may have async issues in Safari\n if (scrollY !== 0) {\n element.scrollTop += scrollY;\n }\n if (scrollX !== 0) {\n element.scrollLeft += scrollX;\n }\n\n // Force layout flush immediately to ensure Safari's layout is updated\n // before placeholder calculation. This invalidates any cached values.\n void element.offsetHeight;\n\n // Notify callback IMMEDIATELY in the same frame (no RAF delay)\n // Delaying via RAF causes cumulative drift during continuous autoscroll\n // because multiple scrolls happen before each delayed callback runs.\n // Note: No ngZone.run() needed here - the callback (DraggableDirective.#recalculatePlaceholder)\n // already enters the zone when updating drag state.\n this.#onScrollCallback?.();\n }\n\n /**\n * Check if auto-scrolling is currently active.\n */\n isScrolling(): boolean {\n return (\n this.#scrollState.containerId !== null &&\n (this.#scrollState.direction.x !== 0 || this.#scrollState.direction.y !== 0)\n );\n }\n\n /**\n * Get the current scroll direction.\n */\n getScrollDirection(): { x: number; y: number } {\n return this.#scrollState.direction;\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service for cloning DOM elements with their computed styles.\n * Used to create visual copies of dragged elements for the drag preview.\n */\n@Injectable({ providedIn: 'root' })\nexport class ElementCloneService {\n /**\n * CSS properties to copy from source to clone.\n * These are the visual properties that affect appearance.\n */\n readonly #stylesToCopy = [\n 'background',\n 'backgroundColor',\n 'backgroundImage',\n 'border',\n 'borderRadius',\n 'boxShadow',\n 'color',\n 'font',\n 'fontFamily',\n 'fontSize',\n 'fontWeight',\n 'lineHeight',\n 'padding',\n 'margin',\n 'display',\n 'flexDirection',\n 'alignItems',\n 'justifyContent',\n 'gap',\n 'textAlign',\n 'textDecoration',\n 'width',\n 'height',\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight',\n 'overflow',\n 'opacity',\n 'transform',\n 'boxSizing',\n ];\n\n /**\n * Clone an element with its computed styles.\n * Returns an HTMLElement ready for use as a drag preview.\n */\n cloneElement(source: HTMLElement): HTMLElement {\n const clone = source.cloneNode(true) as HTMLElement;\n\n // Apply computed styles as inline styles\n this.#applyComputedStyles(source, clone);\n\n // Handle special elements (canvas, video, etc.)\n this.#handleSpecialElements(source, clone);\n\n // Sanitize the clone for safe use as preview\n this.#sanitizeClone(clone);\n\n return clone;\n }\n\n /**\n * Apply computed styles from source to target element.\n * Recursively applies to all child elements.\n */\n #applyComputedStyles(source: HTMLElement, target: HTMLElement): void {\n const computed = window.getComputedStyle(source);\n\n // Copy essential visual properties\n for (const prop of this.#stylesToCopy) {\n const value = computed.getPropertyValue(this.#camelToKebab(prop));\n if (value) {\n target.style.setProperty(this.#camelToKebab(prop), value);\n }\n }\n\n // Disable animations and transitions on clone\n target.style.animation = 'none';\n target.style.transition = 'none';\n\n // Recursively apply to children\n const sourceChildren = source.children;\n const targetChildren = target.children;\n\n for (let i = 0; i < sourceChildren.length && i < targetChildren.length; i++) {\n const sourceChild = sourceChildren[i];\n const targetChild = targetChildren[i];\n\n if (sourceChild instanceof HTMLElement && targetChild instanceof HTMLElement) {\n this.#applyComputedStyles(sourceChild, targetChild);\n }\n }\n }\n\n /**\n * Handle special elements that require extra processing.\n */\n #handleSpecialElements(source: HTMLElement, clone: HTMLElement): void {\n // Handle canvas elements - copy current content\n const sourceCanvases = source.querySelectorAll('canvas');\n const cloneCanvases = clone.querySelectorAll('canvas');\n\n sourceCanvases.forEach((srcCanvas, i) => {\n const cloneCanvas = cloneCanvases[i] as HTMLCanvasElement;\n if (cloneCanvas) {\n const ctx = cloneCanvas.getContext('2d');\n if (ctx) {\n cloneCanvas.width = srcCanvas.width;\n cloneCanvas.height = srcCanvas.height;\n ctx.drawImage(srcCanvas, 0, 0);\n }\n }\n });\n\n // Handle video elements - replace with poster or placeholder\n const videos = clone.querySelectorAll('video');\n videos.forEach((video) => {\n const poster = video.poster;\n if (poster) {\n const img = document.createElement('img');\n img.src = poster;\n img.style.width = '100%';\n img.style.height = '100%';\n img.style.objectFit = 'cover';\n video.replaceWith(img);\n } else {\n // Create a placeholder\n const placeholder = document.createElement('div');\n placeholder.style.cssText = `\n width: 100%;\n height: 100%;\n background: #333;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666;\n `;\n placeholder.textContent = 'Video';\n video.replaceWith(placeholder);\n }\n });\n\n // Handle iframes - replace with placeholder\n const iframes = clone.querySelectorAll('iframe');\n iframes.forEach((iframe) => {\n const placeholder = document.createElement('div');\n const iframeStyles = window.getComputedStyle(iframe);\n placeholder.style.width = iframeStyles.width;\n placeholder.style.height = iframeStyles.height;\n placeholder.style.background = '#f0f0f0';\n placeholder.style.border = '1px solid #ddd';\n placeholder.style.display = 'flex';\n placeholder.style.alignItems = 'center';\n placeholder.style.justifyContent = 'center';\n placeholder.style.color = '#999';\n placeholder.textContent = 'Embedded content';\n iframe.replaceWith(placeholder);\n });\n }\n\n /**\n * Sanitize the clone to prevent interaction issues.\n */\n #sanitizeClone(clone: HTMLElement): void {\n // Remove draggable directive attributes\n clone.removeAttribute('vdndDraggable');\n clone.removeAttribute('data-draggable-id');\n clone.removeAttribute('data-droppable-id');\n\n // Remove Angular-specific attributes\n const angularAttrs = Array.from(clone.attributes).filter(\n (attr) => attr.name.startsWith('ng-') || attr.name.startsWith('_ng')\n );\n angularAttrs.forEach((attr) => clone.removeAttribute(attr.name));\n\n // Process all descendant elements\n const allElements = clone.querySelectorAll('*');\n allElements.forEach((el) => {\n if (!(el instanceof HTMLElement)) return;\n\n // Remove event-related attributes\n const attrs = Array.from(el.attributes);\n attrs.forEach((attr) => {\n if (\n attr.name.startsWith('on') ||\n attr.name.startsWith('(') ||\n attr.name.startsWith('ng-') ||\n attr.name.startsWith('_ng')\n ) {\n el.removeAttribute(attr.name);\n }\n });\n\n // Remove draggable attributes from children too\n el.removeAttribute('vdndDraggable');\n el.removeAttribute('data-draggable-id');\n el.removeAttribute('data-droppable-id');\n });\n\n // Disable interactive elements\n const interactiveElements = clone.querySelectorAll(\n 'button, input, textarea, select, a, [contenteditable]'\n );\n interactiveElements.forEach((el) => {\n if (el instanceof HTMLElement) {\n el.style.pointerEvents = 'none';\n el.setAttribute('tabindex', '-1');\n el.setAttribute('aria-hidden', 'true');\n el.setAttribute('disabled', 'true');\n }\n });\n\n // Remove focus styling classes that might interfere\n clone.classList.remove('vdnd-draggable-dragging');\n clone.classList.remove('vdnd-draggable-disabled');\n }\n\n /**\n * Convert camelCase to kebab-case for CSS properties.\n */\n #camelToKebab(str: string): string {\n return str.replace(/([A-Z])/g, '-$1').toLowerCase();\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n NgZone,\n OnDestroy,\n OnInit,\n output,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DragStateService } from '../services/drag-state.service';\nimport { AutoScrollService, AutoScrollConfig } from '../services/auto-scroll.service';\nimport { PlaceholderContext } from './placeholder.component';\n\n/**\n * Context provided to the item template.\n */\nexport interface VirtualScrollItemContext<T> {\n /** The item data */\n $implicit: T;\n /** The item's index in the original array (-1 for placeholders) */\n index: number;\n /** Whether this item is \"sticky\" (always rendered) */\n isSticky: boolean;\n /** Whether this item is an auto-inserted placeholder */\n isPlaceholder?: boolean;\n}\n\n/**\n * Event emitted when the visible range changes.\n */\nexport interface VisibleRangeChange {\n start: number;\n end: number;\n}\n\n/**\n * A virtual scroll container that only renders visible items.\n *\n * Key features:\n * - Only renders items within the visible viewport plus an overscan buffer\n * - Supports \"sticky\" items that are always rendered (used for dragged items)\n * - Uses spacer divs to maintain correct scroll height\n * - Integrates with the drag-and-drop system\n * - Automatic height detection via ResizeObserver when containerHeight is not provided\n *\n * @example\n * ```html\n * <!-- With explicit height -->\n * <vdnd-virtual-scroll\n * [items]=\"items()\"\n * [itemHeight]=\"50\"\n * [containerHeight]=\"400\"\n * [trackByFn]=\"trackById\">\n * <ng-template let-item let-index=\"index\">\n * <div class=\"item\">{{ item.name }}</div>\n * </ng-template>\n * </vdnd-virtual-scroll>\n *\n * <!-- With CSS-based height (auto-detected) -->\n * <vdnd-virtual-scroll\n * style=\"height: 100%\"\n * [items]=\"items()\"\n * [itemHeight]=\"50\"\n * [trackByFn]=\"trackById\">\n * <ng-template let-item let-index=\"index\">\n * <div class=\"item\">{{ item.name }}</div>\n * </ng-template>\n * </vdnd-virtual-scroll>\n * ```\n */\n@Component({\n selector: 'vdnd-virtual-scroll',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet],\n host: {\n class: 'vdnd-virtual-scroll',\n '[style.height.px]': 'containerHeight() ?? null',\n '[style.overflow]': '\"auto\"',\n '[style.position]': '\"relative\"',\n '[attr.data-item-height]': 'itemHeight()',\n '(scroll)': 'onScroll($event)',\n },\n template: `\n <div\n class=\"vdnd-virtual-scroll-content\"\n #contentContainer\n [style.min-height.px]=\"totalHeight()\"\n >\n <!-- Spacer for items above viewport -->\n <div class=\"vdnd-virtual-scroll-spacer-top\" [style.height.px]=\"topSpacerHeight()\"></div>\n\n <!-- Rendered items -->\n @for (\n item of renderedItems();\n track item.isPlaceholder ? 'placeholder' : effectiveTrackByFn()(item.index, item.data)\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n itemTemplate();\n context: {\n $implicit: item.data,\n index: item.index,\n isSticky: item.isSticky,\n isPlaceholder: item.isPlaceholder,\n }\n \"\n >\n </ng-container>\n }\n\n <!-- Spacer for items below viewport -->\n <div class=\"vdnd-virtual-scroll-spacer-bottom\" [style.height.px]=\"bottomSpacerHeight()\"></div>\n </div>\n `,\n styles: `\n :host {\n display: block;\n /* Disable browser scroll anchoring - this prevents scroll position from being\n adjusted when the DOM changes (e.g., when placeholder position updates).\n Without this, autoscroll UP would fight with browser's scroll restoration. */\n overflow-anchor: none;\n }\n\n .vdnd-virtual-scroll-content {\n position: relative;\n width: 100%;\n }\n `,\n})\nexport class VirtualScrollContainerComponent<T> implements OnInit, AfterViewInit, OnDestroy {\n readonly #dragState = inject(DragStateService);\n readonly #elementRef = inject(ElementRef<HTMLElement>);\n readonly #autoScrollService = inject(AutoScrollService);\n readonly #ngZone = inject(NgZone);\n\n /** ResizeObserver for automatic height detection */\n #resizeObserver: ResizeObserver | null = null;\n\n /** Measured height from ResizeObserver (used when containerHeight is not provided) */\n readonly #measuredHeight = signal(0);\n\n /** The scrollable container element */\n protected readonly contentContainer = viewChild<ElementRef<HTMLElement>>('contentContainer');\n\n /** Template for rendering each item - passed as input instead of content child for reliability */\n itemTemplate = input.required<TemplateRef<VirtualScrollItemContext<T>>>();\n\n /** Unique ID for this scroll container (used for auto-scroll registration) */\n scrollContainerId = input<string>();\n\n /** Whether auto-scroll is enabled when dragging near edges */\n autoScrollEnabled = input<boolean>(true);\n\n /** Auto-scroll configuration */\n autoScrollConfig = input<Partial<AutoScrollConfig>>({});\n\n /** Array of items to render */\n items = input.required<T[]>();\n\n /** Height of each item in pixels */\n itemHeight = input.required<number>();\n\n /**\n * Height of the container in pixels.\n * If not provided, the container will automatically measure its height from CSS.\n * This allows you to set the height via CSS (e.g., flex, height: 100%, etc.)\n * and the component will adapt automatically, including on resize.\n */\n containerHeight = input<number>();\n\n /**\n * Effective height used for calculations.\n * Uses explicit containerHeight if provided, otherwise uses measured height.\n */\n readonly effectiveHeight = computed(() => this.containerHeight() ?? this.#measuredHeight());\n\n /** Number of items to render above/below the visible area */\n overscan = input<number>(3);\n\n /** IDs of items that should always be rendered (e.g., dragged items) */\n stickyItemIds = input<string[]>([]);\n\n /** Function to get a unique ID from an item */\n itemIdFn = input.required<(item: T) => string>();\n\n /**\n * Track-by function for the @for loop.\n * Optional - if not provided, will be derived from itemIdFn.\n */\n trackByFn = input<(index: number, item: T) => string | number>();\n\n /**\n * ID of the droppable this virtual scroll belongs to.\n * Required for auto-placeholder insertion.\n */\n droppableId = input<string>();\n\n /**\n * Whether to automatically insert a placeholder at the correct position.\n * Requires droppableId to be set.\n * @default true\n */\n autoPlaceholder = input<boolean>(true);\n\n /**\n * Custom template for the placeholder.\n * Only used when autoPlaceholder is enabled.\n */\n placeholderTemplate = input<TemplateRef<PlaceholderContext>>();\n\n /**\n * Whether to automatically add the dragged item to the sticky list.\n * This ensures the dragged item remains visible during virtual scrolling.\n * @default true\n */\n autoStickyDraggedItem = input<boolean>(true);\n\n /**\n * Effective track-by function - uses provided trackByFn or derives from itemIdFn.\n */\n protected readonly effectiveTrackByFn = computed(() => {\n const userFn = this.trackByFn();\n if (userFn) return userFn;\n\n const idFn = this.itemIdFn();\n return (_index: number, item: T) => idFn(item);\n });\n\n /**\n * Effective sticky item IDs - combines user-provided IDs with auto-sticky dragged item.\n */\n protected readonly effectiveStickyIds = computed(() => {\n const userIds = this.stickyItemIds();\n\n if (!this.autoStickyDraggedItem()) {\n return userIds;\n }\n\n const draggedId = this.draggedItemId();\n if (!draggedId) {\n return userIds;\n }\n\n // Avoid creating new array if dragged ID is already in the list\n if (userIds.includes(draggedId)) {\n return userIds;\n }\n\n return [...userIds, draggedId];\n });\n\n /** Emits when the visible range changes */\n visibleRangeChange = output<VisibleRangeChange>();\n\n /** Emits when scroll position changes */\n scrollPositionChange = output<number>();\n\n /** Current scroll position */\n readonly #scrollTop = signal(0);\n\n /** Total height of all items (for scrollbar) */\n protected readonly totalHeight = computed(() => {\n const count = this.items().length;\n const draggedId = this.draggedItemId();\n // Subtract 1 when dragging - the dragged item is position:absolute (out of flow)\n const effectiveCount = draggedId ? count - 1 : count;\n return effectiveCount * this.itemHeight();\n });\n\n /** First visible item index */\n readonly #firstVisibleIndex = computed(() => {\n return Math.floor(this.#scrollTop() / this.itemHeight());\n });\n\n /** Number of items visible in the viewport */\n readonly #visibleCount = computed(() => {\n const height = this.effectiveHeight();\n if (height <= 0) return 0;\n return Math.ceil(height / this.itemHeight());\n });\n\n /** Range of items to render (with overscan) */\n readonly #renderRange = computed(() => {\n const first = this.#firstVisibleIndex();\n const visible = this.#visibleCount();\n const overscan = this.overscan();\n const total = this.items().length;\n\n const start = Math.max(0, first - overscan);\n const end = Math.min(total - 1, first + visible + overscan);\n\n return { start, end };\n });\n\n /** Height of the top spacer (unrendered items above) */\n protected readonly topSpacerHeight = computed(() => {\n const { start } = this.#renderRange();\n const draggedIndex = this.#draggedItemIndex();\n // If dragged item is in the unrendered top section, subtract 1 (it's position:absolute)\n const adjustment = draggedIndex >= 0 && draggedIndex < start ? 1 : 0;\n return Math.max(0, start - adjustment) * this.itemHeight();\n });\n\n /** Height of the bottom spacer (unrendered items below) */\n protected readonly bottomSpacerHeight = computed(() => {\n const total = this.items().length;\n const { end } = this.#renderRange();\n const draggedIndex = this.#draggedItemIndex();\n const unrenderedBelow = Math.max(0, total - end - 1);\n // If dragged item is in the unrendered bottom section, subtract 1 (it's position:absolute)\n const adjustment = draggedIndex > end ? 1 : 0;\n return Math.max(0, unrenderedBelow - adjustment) * this.itemHeight();\n });\n\n /** The ID of the currently dragged item (if any) */\n protected readonly draggedItemId = computed(() => {\n return this.#dragState.draggedItem()?.draggableId ?? null;\n });\n\n /** The index of the currently dragged item in the items array (-1 if not found or not dragging) */\n readonly #draggedItemIndex = computed(() => {\n const draggedId = this.draggedItemId();\n if (!draggedId) return -1;\n\n const items = this.items();\n const idFn = this.itemIdFn();\n\n for (let i = 0; i < items.length; i++) {\n if (idFn(items[i]) === draggedId) {\n return i;\n }\n }\n return -1;\n });\n\n /** Items to render, including sticky items and auto-placeholder */\n protected readonly renderedItems = computed(() => {\n const items = this.items();\n const { start, end } = this.#renderRange();\n const stickyIds = new Set(this.effectiveStickyIds());\n const idFn = this.itemIdFn();\n const draggedId = this.draggedItemId();\n\n // Check if we should insert a placeholder\n const shouldInsertPlaceholder = this.#shouldInsertPlaceholder();\n const placeholderIndex = shouldInsertPlaceholder ? this.#dragState.placeholderIndex() : null;\n\n const result: {\n data: T;\n index: number;\n isSticky: boolean;\n isDragging: boolean;\n isPlaceholder?: boolean;\n }[] = [];\n const renderedIds = new Set<string>();\n\n // First, add all items in the visible range (with placeholder insertion)\n for (let i = start; i <= end && i < items.length; i++) {\n // Insert placeholder before this item if needed\n if (placeholderIndex !== null && placeholderIndex === i) {\n result.push({\n data: { __vdndPlaceholder: true } as unknown as T,\n index: -1,\n isSticky: false,\n isDragging: false,\n isPlaceholder: true,\n });\n }\n\n const item = items[i];\n const id = idFn(item);\n result.push({\n data: item,\n index: i,\n isSticky: stickyIds.has(id),\n isDragging: id === draggedId,\n });\n renderedIds.add(id);\n }\n\n // Insert placeholder at end if needed\n if (placeholderIndex !== null && placeholderIndex >= items.length) {\n result.push({\n data: { __vdndPlaceholder: true } as unknown as T,\n index: -1,\n isSticky: false,\n isDragging: false,\n isPlaceholder: true,\n });\n }\n\n // Then, add any sticky items that aren't already rendered\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const id = idFn(item);\n\n if (stickyIds.has(id) && !renderedIds.has(id)) {\n result.push({\n data: item,\n index: i,\n isSticky: true,\n isDragging: id === draggedId,\n });\n renderedIds.add(id);\n }\n }\n\n return result;\n });\n\n /**\n * Determines if a placeholder should be automatically inserted.\n */\n readonly #shouldInsertPlaceholder = computed(() => {\n if (!this.autoPlaceholder()) return false;\n if (!this.droppableId()) return false;\n\n const activeDroppable = this.#dragState.activeDroppableId();\n return activeDroppable === this.droppableId();\n });\n\n /** Generated ID for auto-scroll registration */\n #generatedScrollId = `vdnd-scroll-${Math.random().toString(36).slice(2, 9)}`;\n\n /** Track previous dragged ID to detect drag end */\n #previousDraggedId: string | null = null;\n\n constructor() {\n // Emit visible range changes\n effect(() => {\n const range = this.#renderRange();\n this.visibleRangeChange.emit(range);\n });\n\n // Preserve scroll position when drag ends at bottom of list\n // During drag, totalHeight is reduced by 1 item (dragged item is hidden)\n // When drag ends, totalHeight increases - we need to adjust scroll if we were at bottom\n effect(\n () => {\n const currentDraggedId = this.draggedItemId();\n const element = this.#elementRef.nativeElement;\n\n // Detect drag end (was dragging, now not)\n if (this.#previousDraggedId !== null && currentDraggedId === null) {\n const currentScrollTop = element.scrollTop;\n const itemHeight = this.itemHeight();\n const height = this.effectiveHeight();\n const totalItems = this.items().length;\n\n // Calculate if we were at/near bottom (within 10px tolerance)\n // During drag, max scroll was (totalItems - 1) * itemHeight - height\n const dragReducedMaxScroll = (totalItems - 1) * itemHeight - height;\n const wasAtBottom = currentScrollTop >= dragReducedMaxScroll - 10;\n\n if (wasAtBottom && dragReducedMaxScroll > 0) {\n // Adjust scroll to new bottom position after totalHeight increases\n queueMicrotask(() => {\n const newMaxScroll = Math.max(0, totalItems * itemHeight - height);\n element.scrollTop = newMaxScroll;\n this.#scrollTop.set(newMaxScroll);\n });\n }\n }\n\n this.#previousDraggedId = currentDraggedId;\n },\n { allowSignalWrites: true },\n );\n }\n\n ngOnInit(): void {\n // Register with auto-scroll service\n if (this.autoScrollEnabled()) {\n const id = this.scrollContainerId() ?? this.#generatedScrollId;\n this.#autoScrollService.registerContainer(\n id,\n this.#elementRef.nativeElement,\n this.autoScrollConfig(),\n );\n }\n }\n\n ngAfterViewInit(): void {\n // Set up ResizeObserver for automatic height detection when containerHeight is not provided\n this.#ngZone.runOutsideAngular(() => {\n this.#resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const height = entry.contentRect.height;\n // Only update if height changed significantly (> 1px) to avoid loops\n // No ngZone.run() needed - signals work outside zone and effects react automatically\n if (Math.abs(height - this.#measuredHeight()) > 1) {\n this.#measuredHeight.set(height);\n }\n }\n });\n this.#resizeObserver.observe(this.#elementRef.nativeElement);\n });\n }\n\n ngOnDestroy(): void {\n // Clean up ResizeObserver\n this.#resizeObserver?.disconnect();\n\n // Unregister from auto-scroll service\n const id = this.scrollContainerId() ?? this.#generatedScrollId;\n this.#autoScrollService.unregisterContainer(id);\n }\n\n /**\n * Handle scroll events.\n */\n protected onScroll(event: Event): void {\n const target = event.target as HTMLElement;\n const newScrollTop = target.scrollTop;\n\n // Only update if the scroll position has changed significantly\n // (at least 10% of an item height, to reduce updates)\n const threshold = Math.max(5, this.itemHeight() * 0.1);\n if (Math.abs(newScrollTop - this.#scrollTop()) >= threshold) {\n this.#scrollTop.set(newScrollTop);\n this.scrollPositionChange.emit(newScrollTop);\n }\n }\n\n /**\n * Scroll to a specific position.\n */\n scrollTo(position: number): void {\n this.#elementRef.nativeElement.scrollTop = position;\n this.#scrollTop.set(position);\n }\n\n /**\n * Scroll to a specific item index.\n */\n scrollToIndex(index: number): void {\n const position = index * this.itemHeight();\n this.scrollTo(position);\n }\n\n /**\n * Get the current scroll position.\n */\n getScrollTop(): number {\n return this.#scrollTop();\n }\n\n /**\n * Get the total scrollable height.\n */\n getScrollHeight(): number {\n return this.totalHeight();\n }\n\n /**\n * Scroll by a delta amount.\n */\n scrollBy(delta: number): void {\n const newPosition = Math.max(\n 0,\n Math.min(this.getScrollTop() + delta, this.getScrollHeight() - this.effectiveHeight()),\n );\n this.scrollTo(newPosition);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DragStateService } from '../services/drag-state.service';\n\n/**\n * Context provided to the drag preview template.\n */\nexport interface DragPreviewContext<T = unknown> {\n /** The data associated with the dragged item */\n $implicit: T;\n /** The draggable ID */\n draggableId: string;\n /** The source droppable ID */\n droppableId: string;\n}\n\n/**\n * Renders a preview of the dragged item that follows the cursor.\n *\n * This component should be placed at the root of your application (or at least\n * outside of any scrollable containers) to ensure the preview is always visible.\n *\n * @example\n * ```html\n * <vdnd-drag-preview>\n * <ng-template let-data let-id=\"draggableId\">\n * <div class=\"drag-preview\">{{ data.name }}</div>\n * </ng-template>\n * </vdnd-drag-preview>\n * ```\n */\n@Component({\n selector: 'vdnd-drag-preview',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet],\n template: `\n @if (isVisible()) {\n <div\n class=\"vdnd-drag-preview\"\n [style.position]=\"'fixed'\"\n [style.left.px]=\"position().x\"\n [style.top.px]=\"position().y\"\n [style.width.px]=\"dimensions().width\"\n [style.height.px]=\"dimensions().height\"\n [style.pointer-events]=\"'none'\"\n [style.z-index]=\"1000\"\n [style.opacity]=\"0.9\">\n @if (previewTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"previewTemplate()!; context: templateContext()\">\n </ng-container>\n } @else if (clonedElement()) {\n <div class=\"vdnd-drag-preview-clone\" #cloneContainer></div>\n } @else {\n <div class=\"vdnd-drag-preview-default\">\n {{ dragState.draggedItem()?.draggableId }}\n </div>\n }\n </div>\n }\n `,\n styles: `\n .vdnd-drag-preview {\n box-sizing: border-box;\n }\n\n .vdnd-drag-preview-clone {\n width: 100%;\n height: 100%;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n overflow: hidden;\n }\n\n .vdnd-drag-preview-default {\n padding: 8px;\n background: white;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n }\n `,\n})\nexport class DragPreviewComponent<T = unknown> {\n protected readonly dragState = inject(DragStateService);\n\n /** Optional custom template for the preview */\n previewTemplate = input<TemplateRef<DragPreviewContext<T>>>();\n\n /** Offset from cursor to preview (to avoid cursor being on top of preview) */\n cursorOffset = input<{ x: number; y: number }>({ x: 8, y: 8 });\n\n /** Reference to the clone container element (cannot use ES private with viewChild) */\n private readonly cloneContainer = viewChild<ElementRef<HTMLElement>>('cloneContainer');\n\n /** The cloned element from drag state (used when no custom template is provided) */\n protected readonly clonedElement = computed(() => {\n if (this.previewTemplate()) {\n return null; // Custom template takes precedence\n }\n return this.dragState.draggedItem()?.clonedElement ?? null;\n });\n\n constructor() {\n // Effect to insert the cloned element into the container\n effect(() => {\n const container = this.cloneContainer()?.nativeElement;\n const clone = this.clonedElement();\n\n if (container && clone) {\n // Clear previous content and append clone\n container.innerHTML = '';\n container.appendChild(clone.cloneNode(true));\n }\n });\n }\n\n /** Whether the preview is visible */\n protected readonly isVisible = computed(() => {\n return this.dragState.isDragging() && this.dragState.cursorPosition() !== null;\n });\n\n /** Position of the preview */\n protected readonly position = computed(() => {\n const cursor = this.dragState.cursorPosition();\n const grabOffset = this.dragState.grabOffset();\n const fallbackOffset = this.cursorOffset();\n const initialPosition = this.dragState.initialPosition();\n const lockAxis = this.dragState.lockAxis();\n\n if (!cursor) {\n return { x: 0, y: 0 };\n }\n\n // Use grab offset if available (preserves grab position), otherwise fall back to cursorOffset input\n const offset = grabOffset ?? fallbackOffset;\n\n let x = cursor.x - offset.x;\n let y = cursor.y - offset.y;\n\n // Apply axis locking if configured\n if (lockAxis && initialPosition) {\n if (lockAxis === 'x') {\n // Lock X axis: x stays at initial position\n x = initialPosition.x - offset.x;\n } else if (lockAxis === 'y') {\n // Lock Y axis: y stays at initial position\n y = initialPosition.y - offset.y;\n }\n }\n\n return { x, y };\n });\n\n /** Dimensions of the preview */\n protected readonly dimensions = computed(() => {\n const item = this.dragState.draggedItem();\n\n if (!item) {\n return { width: 100, height: 50 };\n }\n\n return {\n width: item.width,\n height: item.height,\n };\n });\n\n /** Template context */\n protected readonly templateContext = computed((): DragPreviewContext<T> => {\n const item = this.dragState.draggedItem();\n\n return {\n $implicit: (item?.data ?? null) as T,\n draggableId: item?.draggableId ?? '',\n droppableId: item?.droppableId ?? '',\n };\n });\n}\n","import { ChangeDetectionStrategy, Component, input, TemplateRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Context provided to the custom placeholder template.\n */\nexport interface PlaceholderContext {\n /** The height of the placeholder in pixels */\n $implicit: number;\n /** The height of the placeholder in pixels (explicit property) */\n height: number;\n}\n\n/**\n * A placeholder component that indicates where a dropped item will be inserted.\n *\n * By default, renders as empty/transparent space. Pass a custom template\n * to customize the placeholder appearance.\n *\n * @example\n * ```html\n * <!-- Default: transparent/empty space -->\n * <vdnd-placeholder [height]=\"50\"></vdnd-placeholder>\n *\n * <!-- Custom template with dashed border -->\n * <vdnd-placeholder [height]=\"50\" [template]=\"customPlaceholder\">\n * <ng-template #customPlaceholder let-height>\n * <div class=\"my-placeholder\" [style.height.px]=\"height\">\n * Drop here\n * </div>\n * </ng-template>\n * </vdnd-placeholder>\n * ```\n */\n@Component({\n selector: 'vdnd-placeholder',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet],\n host: {\n class: 'vdnd-placeholder',\n '[style.height.px]': 'height()',\n '[attr.data-draggable-id]': '\"placeholder\"',\n },\n template: `\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template()!; context: { $implicit: height(), height: height() }\">\n </ng-container>\n }\n `,\n styles: `\n :host {\n display: block;\n box-sizing: border-box;\n }\n `,\n})\nexport class PlaceholderComponent {\n /** Height of the placeholder in pixels */\n height = input<number>(50);\n\n /** Optional custom template for the placeholder content */\n template = input<TemplateRef<PlaceholderContext>>();\n}\n","import { Directive, InjectionToken, input, Signal } from '@angular/core';\n\n/**\n * Token for injecting the group context from a parent directive.\n * Allows child draggables and droppables to inherit the group name automatically.\n */\nexport const VDND_GROUP_TOKEN = new InjectionToken<VdndGroupContext>('VDND_GROUP_TOKEN');\n\n/**\n * Context provided by the group directive to its children.\n */\nexport interface VdndGroupContext {\n /** The group name signal */\n readonly group: Signal<string>;\n}\n\n/**\n * Provides a group context to child draggable and droppable directives.\n * When applied to a parent element, child directives can inherit the group name\n * automatically without needing to specify it on each element.\n *\n * @example\n * ```html\n * <!-- Without group directive (verbose) -->\n * <div vdndDroppable=\"list-1\" vdndDroppableGroup=\"my-group\">\n * <div vdndDraggable=\"item-1\" vdndDraggableGroup=\"my-group\">Item 1</div>\n * <div vdndDraggable=\"item-2\" vdndDraggableGroup=\"my-group\">Item 2</div>\n * </div>\n *\n * <!-- With group directive (concise) -->\n * <div vdndGroup=\"my-group\">\n * <div vdndDroppable=\"list-1\">\n * <div vdndDraggable=\"item-1\">Item 1</div>\n * <div vdndDraggable=\"item-2\">Item 2</div>\n * </div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[vdndGroup]',\n providers: [\n {\n provide: VDND_GROUP_TOKEN,\n useExisting: DroppableGroupDirective,\n },\n ],\n})\nexport class DroppableGroupDirective implements VdndGroupContext {\n /** The group name that will be inherited by child directives */\n readonly group = input.required<string>({ alias: 'vdndGroup' });\n}\n","import { computed, Directive, effect, ElementRef, inject, input, OnDestroy, OnInit, output } from '@angular/core';\nimport { DragStateService } from '../services/drag-state.service';\nimport { AutoScrollConfig, AutoScrollService } from '../services/auto-scroll.service';\nimport {\n DragEnterEvent,\n DragLeaveEvent,\n DragOverEvent,\n DragState,\n DropEvent,\n END_OF_LIST\n} from '../models/drag-drop.models';\nimport { VDND_GROUP_TOKEN } from './droppable-group.directive';\n\n/**\n * Marks an element as a valid drop target within the virtual scroll drag-and-drop system.\n *\n * @example\n * ```html\n * <!-- With explicit group -->\n * <div\n * vdndDroppable=\"list-1\"\n * vdndDroppableGroup=\"my-group\"\n * (drop)=\"onDrop($event)\">\n * <!-- Draggable items here -->\n * </div>\n *\n * <!-- With inherited group from parent vdndGroup directive -->\n * <div vdndGroup=\"my-group\">\n * <div vdndDroppable=\"list-1\" (drop)=\"onDrop($event)\">\n * <!-- Draggable items here -->\n * </div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[vdndDroppable]',\n host: {\n '[attr.data-droppable-id]': 'vdndDroppable()',\n '[attr.data-droppable-group]': 'effectiveGroup()',\n '[class.vdnd-droppable]': 'true',\n '[class.vdnd-droppable-active]': 'isActive()',\n '[class.vdnd-droppable-disabled]': 'disabled()',\n },\n})\nexport class DroppableDirective implements OnInit, OnDestroy {\n readonly #elementRef = inject(ElementRef<HTMLElement>);\n readonly #dragState = inject(DragStateService);\n readonly #autoScroll = inject(AutoScrollService);\n readonly #parentGroup = inject(VDND_GROUP_TOKEN, { optional: true });\n\n /** Unique identifier for this droppable */\n vdndDroppable = input.required<string>();\n\n /**\n * Drag-and-drop group name.\n * Optional when a parent `vdndGroup` directive provides the group context.\n */\n vdndDroppableGroup = input<string>();\n\n /**\n * Resolved group name - uses explicit input or falls back to parent group.\n * Throws error if neither is available.\n */\n readonly effectiveGroup = computed(() => {\n const explicit = this.vdndDroppableGroup();\n if (explicit) return explicit;\n\n const inherited = this.#parentGroup?.group();\n if (inherited) return inherited;\n\n throw new Error(\n `[vdndDroppable=\"${this.vdndDroppable()}\"] requires a group. ` +\n 'Either set vdndDroppableGroup or wrap in a vdndGroup directive.',\n );\n });\n\n /** Optional data associated with this droppable */\n vdndDroppableData = input<unknown>();\n\n /** Whether this droppable is disabled */\n disabled = input<boolean>(false);\n\n /** Enable auto-scroll when dragging near edges */\n autoScrollEnabled = input<boolean>(true);\n\n /** Auto-scroll configuration */\n autoScrollConfig = input<Partial<AutoScrollConfig>>({});\n\n /** Emits when a dragged item enters this droppable */\n dragEnter = output<DragEnterEvent>();\n\n /** Emits when a dragged item leaves this droppable */\n dragLeave = output<DragLeaveEvent>();\n\n /** Emits while a dragged item is over this droppable */\n dragOver = output<DragOverEvent>();\n\n /** Emits when an item is dropped on this droppable */\n // eslint-disable-next-line @angular-eslint/no-output-native\n drop = output<DropEvent>();\n\n /** Whether this droppable is currently being targeted */\n readonly isActive = computed(() => {\n const activeId = this.#dragState.activeDroppableId();\n return activeId === this.vdndDroppable() && !this.disabled();\n });\n\n /** The current placeholder ID when this droppable is active */\n readonly placeholderId = computed(() => {\n if (!this.isActive()) {\n return null;\n }\n return this.#dragState.placeholderId();\n });\n\n /** Track previous active state for enter/leave events */\n #wasActive = false;\n\n /** Track previous placeholder for over events */\n #previousPlaceholder: string | null = null;\n\n /** Cached state for handling drop (since state is cleared before effect fires) */\n #cachedDragState: DragState | null = null;\n\n ngOnInit(): void {\n // Register with auto-scroll service only if this element is actually scrollable\n // (i.e., has overflow: auto/scroll and content taller than container)\n if (this.autoScrollEnabled() && this.#isScrollable()) {\n this.#autoScroll.registerContainer(\n this.vdndDroppable(),\n this.#elementRef.nativeElement,\n this.autoScrollConfig(),\n );\n }\n }\n\n /**\n * Check if this element is actually scrollable.\n */\n #isScrollable(): boolean {\n const el = this.#elementRef.nativeElement;\n const style = window.getComputedStyle(el);\n const overflowY = style.overflowY;\n const overflowX = style.overflowX;\n\n // Check if overflow allows scrolling\n const hasScrollableOverflow =\n overflowY === 'auto' ||\n overflowY === 'scroll' ||\n overflowX === 'auto' ||\n overflowX === 'scroll';\n\n if (!hasScrollableOverflow) {\n return false;\n }\n\n // Check if content is larger than container\n return el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth;\n }\n\n constructor() {\n // React to state changes and emit appropriate events\n effect(() => {\n const active = this.isActive();\n const placeholder = this.placeholderId();\n const draggedItem = this.#dragState.draggedItem();\n const cursorPosition = this.#dragState.cursorPosition();\n const isDragging = this.#dragState.isDragging();\n\n // Cache state while active for use during drop handling\n if (active && isDragging && draggedItem) {\n this.#cachedDragState = this.#dragState.getStateSnapshot();\n }\n\n // Handle drag end (drop)\n if (!isDragging && this.#wasActive && draggedItem === null) {\n // Check if drag was cancelled (e.g., Escape key)\n if (!this.#dragState.wasCancelled()) {\n // Drag ended normally - this is a drop\n this.#handleDrop();\n }\n this.#cachedDragState = null;\n }\n\n // Handle enter/leave\n if (active && !this.#wasActive) {\n // Entered\n if (draggedItem) {\n this.dragEnter.emit({\n droppableId: this.vdndDroppable(),\n draggedItem,\n });\n }\n } else if (!active && this.#wasActive) {\n // Left (but not dropped here)\n if (isDragging && draggedItem) {\n this.dragLeave.emit({\n droppableId: this.vdndDroppable(),\n draggedItem,\n });\n }\n // Clear cached state when leaving without dropping\n if (isDragging) {\n this.#cachedDragState = null;\n }\n }\n\n // Handle over (placeholder changed)\n if (active && placeholder !== this.#previousPlaceholder) {\n if (draggedItem && cursorPosition) {\n this.dragOver.emit({\n droppableId: this.vdndDroppable(),\n draggedItem,\n placeholderId: placeholder,\n position: cursorPosition,\n });\n }\n }\n\n this.#wasActive = active;\n this.#previousPlaceholder = placeholder;\n });\n }\n\n ngOnDestroy(): void {\n // Clean up if this droppable is destroyed while being active\n if (this.isActive()) {\n this.#dragState.setActiveDroppable(null);\n }\n\n // Unregister from auto-scroll\n this.#autoScroll.unregisterContainer(this.vdndDroppable());\n }\n\n /**\n * Handle a drop on this droppable.\n */\n #handleDrop(): void {\n // Use cached state since the actual state is cleared before this effect fires\n const state = this.#cachedDragState;\n\n if (!state?.draggedItem || state.activeDroppableId !== this.vdndDroppable()) {\n return;\n }\n\n const sourceDroppableId = state.sourceDroppableId ?? '';\n const placeholderId = state.placeholderId ?? END_OF_LIST;\n\n // Calculate source index\n const sourceIndex = this.#getItemIndex(state.draggedItem.draggableId, sourceDroppableId);\n\n // Use the pre-calculated placeholderIndex if available (more reliable)\n // Fall back to DOM-based calculation if not\n let destinationIndex =\n state.placeholderIndex !== null && state.placeholderIndex !== undefined\n ? state.placeholderIndex\n : this.#getDestinationIndex(placeholderId);\n\n // Adjust for same-list reordering: if moving within the same list and\n // the destination is after the source, we need to account for the item\n // being removed from its original position\n if (sourceDroppableId === this.vdndDroppable() && sourceIndex < destinationIndex) {\n destinationIndex--;\n }\n\n this.drop.emit({\n source: {\n draggableId: state.draggedItem.draggableId,\n droppableId: sourceDroppableId,\n index: sourceIndex,\n data: state.draggedItem.data,\n },\n destination: {\n droppableId: this.vdndDroppable(),\n placeholderId,\n index: destinationIndex,\n data: this.vdndDroppableData(),\n },\n });\n }\n\n /**\n * Get the index of an item in a droppable.\n * This is a simplified implementation - in practice, the consumer would track this.\n */\n #getItemIndex(draggableId: string, droppableId: string): number {\n // Find all draggables in the source droppable\n const droppable = document.querySelector(`[data-droppable-id=\"${droppableId}\"]`);\n if (!droppable) {\n return 0;\n }\n\n const draggables = droppable.querySelectorAll('[data-draggable-id]');\n for (let i = 0; i < draggables.length; i++) {\n if (draggables[i].getAttribute('data-draggable-id') === draggableId) {\n return i;\n }\n }\n\n return 0;\n }\n\n /**\n * Get the destination index based on the placeholder.\n */\n #getDestinationIndex(placeholderId: string): number {\n // Exclude placeholder elements from the count\n const draggables = this.#elementRef.nativeElement.querySelectorAll(\n '[data-draggable-id]:not([data-draggable-id=\"placeholder\"])',\n );\n\n if (placeholderId === END_OF_LIST) {\n return draggables.length;\n }\n\n // Find the index of the placeholder item\n for (let i = 0; i < draggables.length; i++) {\n if (draggables[i].getAttribute('data-draggable-id') === placeholderId) {\n return i;\n }\n }\n\n return 0;\n }\n\n /**\n * Get the element reference (for external use).\n */\n getElement(): HTMLElement {\n return this.#elementRef.nativeElement;\n }\n\n /**\n * Manually scroll this droppable.\n */\n scrollBy(delta: number): void {\n this.#elementRef.nativeElement.scrollTop += delta;\n }\n\n /**\n * Get the current scroll position.\n */\n getScrollTop(): number {\n return this.#elementRef.nativeElement.scrollTop;\n }\n\n /**\n * Get the scroll height.\n */\n getScrollHeight(): number {\n return this.#elementRef.nativeElement.scrollHeight;\n }\n}\n","import { ChangeDetectionStrategy, Component, input, output, TemplateRef } from '@angular/core';\nimport {\n VirtualScrollContainerComponent,\n VirtualScrollItemContext,\n VisibleRangeChange,\n} from './virtual-scroll-container.component';\nimport { DroppableDirective } from '../directives/droppable.directive';\nimport { PlaceholderContext } from './placeholder.component';\nimport { AutoScrollConfig } from '../services/auto-scroll.service';\nimport {\n DragEnterEvent,\n DragLeaveEvent,\n DragOverEvent,\n DropEvent,\n} from '../models/drag-drop.models';\n\n/**\n * A high-level component that combines droppable, virtual scroll, and placeholder\n * functionality into a single, easy-to-use component.\n *\n * This component significantly reduces boilerplate by automatically handling:\n * - Placeholder insertion at the correct position\n * - Sticky item management for the dragged item\n * - Virtual scrolling with proper drag-and-drop integration\n * - Droppable container setup\n *\n * @example\n * ```html\n * <!-- Before (verbose): ~45 lines of boilerplate -->\n * <div vdndDroppable=\"list-1\" vdndDroppableGroup=\"demo\" (drop)=\"onDrop($event)\">\n * <vdnd-virtual-scroll\n * [items]=\"itemsWithPlaceholder()\"\n * [itemHeight]=\"50\"\n * [stickyItemIds]=\"stickyIds()\"\n * [itemIdFn]=\"getItemId\"\n * [trackByFn]=\"trackById\"\n * [itemTemplate]=\"itemTpl\">\n * </vdnd-virtual-scroll>\n * </div>\n *\n * <!-- After (concise): ~8 lines -->\n * <vdnd-sortable-list\n * droppableId=\"list-1\"\n * group=\"demo\"\n * [items]=\"list()\"\n * [itemHeight]=\"50\"\n * [itemIdFn]=\"getItemId\"\n * [itemTemplate]=\"itemTpl\"\n * (drop)=\"onDrop($event)\">\n * </vdnd-sortable-list>\n * ```\n */\n@Component({\n selector: 'vdnd-sortable-list',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [VirtualScrollContainerComponent, DroppableDirective],\n host: {\n class: 'vdnd-sortable-list',\n '[style.display]': '\"block\"',\n },\n template: `\n <div\n class=\"vdnd-sortable-list-droppable\"\n [vdndDroppable]=\"droppableId()\"\n [vdndDroppableGroup]=\"group()\"\n [vdndDroppableData]=\"droppableData()\"\n [disabled]=\"disabled()\"\n (dragEnter)=\"dragEnter.emit($event)\"\n (dragLeave)=\"dragLeave.emit($event)\"\n (dragOver)=\"dragOver.emit($event)\"\n (drop)=\"drop.emit($event)\"\n >\n <vdnd-virtual-scroll\n [items]=\"items()\"\n [itemHeight]=\"itemHeight()\"\n [itemIdFn]=\"itemIdFn()\"\n [trackByFn]=\"trackByFn()\"\n [itemTemplate]=\"itemTemplate()\"\n [droppableId]=\"droppableId()\"\n [autoPlaceholder]=\"true\"\n [autoStickyDraggedItem]=\"true\"\n [placeholderTemplate]=\"placeholderTemplate()\"\n [containerHeight]=\"containerHeight()\"\n [overscan]=\"overscan()\"\n [autoScrollEnabled]=\"autoScrollEnabled()\"\n [autoScrollConfig]=\"autoScrollConfig()\"\n (visibleRangeChange)=\"visibleRangeChange.emit($event)\"\n (scrollPositionChange)=\"scrollPositionChange.emit($event)\"\n >\n </vdnd-virtual-scroll>\n </div>\n `,\n styles: `\n :host {\n display: block;\n }\n `,\n})\nexport class VirtualSortableListComponent<T> {\n // ========== Required Inputs ==========\n\n /** Unique identifier for this droppable list */\n droppableId = input.required<string>();\n\n /** Drag-and-drop group name */\n group = input.required<string>();\n\n /** Array of items to render */\n items = input.required<T[]>();\n\n /** Height of each item in pixels */\n itemHeight = input.required<number>();\n\n /** Function to get a unique ID from an item */\n itemIdFn = input.required<(item: T) => string>();\n\n /** Template for rendering each item */\n itemTemplate = input.required<TemplateRef<VirtualScrollItemContext<T>>>();\n\n // ========== Optional Inputs ==========\n\n /**\n * Track-by function for the @for loop.\n * Optional - if not provided, will be derived from itemIdFn.\n */\n trackByFn = input<(index: number, item: T) => string | number>();\n\n /** Optional data associated with this droppable */\n droppableData = input<unknown>();\n\n /** Whether this sortable list is disabled */\n disabled = input<boolean>(false);\n\n /** Custom template for the placeholder */\n placeholderTemplate = input<TemplateRef<PlaceholderContext>>();\n\n /**\n * Height of the container in pixels.\n * If not provided, uses CSS-based height detection.\n */\n containerHeight = input<number>();\n\n /** Number of items to render above/below the visible area */\n overscan = input<number>(3);\n\n /** Enable auto-scroll when dragging near edges */\n autoScrollEnabled = input<boolean>(true);\n\n /** Auto-scroll configuration */\n autoScrollConfig = input<Partial<AutoScrollConfig>>({});\n\n // ========== Outputs ==========\n\n /** Emits when an item is dropped on this list */\n // eslint-disable-next-line @angular-eslint/no-output-native\n drop = output<DropEvent>();\n\n /** Emits when a dragged item enters this list */\n dragEnter = output<DragEnterEvent>();\n\n /** Emits when a dragged item leaves this list */\n dragLeave = output<DragLeaveEvent>();\n\n /** Emits while a dragged item is over this list */\n dragOver = output<DragOverEvent>();\n\n /** Emits when the visible range changes */\n visibleRangeChange = output<VisibleRangeChange>();\n\n /** Emits when scroll position changes */\n scrollPositionChange = output<number>();\n}\n","import {\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n NgZone,\n OnDestroy,\n OnInit,\n output,\n signal,\n} from '@angular/core';\nimport { DragStateService } from '../services/drag-state.service';\nimport { PositionCalculatorService } from '../services/position-calculator.service';\nimport { AutoScrollService } from '../services/auto-scroll.service';\nimport { ElementCloneService } from '../services/element-clone.service';\nimport {\n CursorPosition,\n DragEndEvent,\n DragMoveEvent,\n DragStartEvent,\n END_OF_LIST,\n GrabOffset,\n} from '../models/drag-drop.models';\nimport { VDND_GROUP_TOKEN } from './droppable-group.directive';\n\n/**\n * Makes an element draggable within the virtual scroll drag-and-drop system.\n *\n * @example\n * ```html\n * <!-- With explicit group -->\n * <div\n * vdndDraggable=\"item-1\"\n * vdndDraggableGroup=\"my-group\"\n * [vdndDraggableData]=\"item\">\n * Drag me!\n * </div>\n *\n * <!-- With inherited group from parent vdndGroup directive -->\n * <div vdndGroup=\"my-group\">\n * <div vdndDraggable=\"item-1\" [vdndDraggableData]=\"item\">\n * Drag me!\n * </div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[vdndDraggable]',\n host: {\n '[attr.data-draggable-id]': 'vdndDraggable()',\n '[class.vdnd-draggable]': 'true',\n '[class.vdnd-draggable-dragging]': 'isDragging()',\n '[class.vdnd-draggable-disabled]': 'disabled()',\n '[class.vdnd-drag-pending]': 'isPending()',\n '[style.display]': 'isDragging() ? \"none\" : null',\n '[attr.aria-grabbed]': 'isDragging()',\n '[attr.aria-dropeffect]': '\"move\"',\n '[tabindex]': 'disabled() ? -1 : 0',\n '(mousedown)': 'onPointerDown($event, false)',\n '(touchstart)': 'onPointerDown($event, true)',\n '(keydown.space)': 'onKeyboardActivate()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class DraggableDirective implements OnInit, OnDestroy {\n readonly #elementRef = inject(ElementRef<HTMLElement>);\n readonly #dragState = inject(DragStateService);\n readonly #positionCalculator = inject(PositionCalculatorService);\n readonly #autoScroll = inject(AutoScrollService);\n readonly #elementClone = inject(ElementCloneService);\n readonly #ngZone = inject(NgZone);\n readonly #parentGroup = inject(VDND_GROUP_TOKEN, { optional: true });\n\n /** Unique identifier for this draggable */\n vdndDraggable = input.required<string>();\n\n /**\n * Drag-and-drop group name.\n * Optional when a parent `vdndGroup` directive provides the group context.\n */\n vdndDraggableGroup = input<string>();\n\n /**\n * Resolved group name - uses explicit input or falls back to parent group.\n * Throws error if neither is available.\n */\n readonly #effectiveGroup = computed(() => {\n const explicit = this.vdndDraggableGroup();\n if (explicit) return explicit;\n\n const inherited = this.#parentGroup?.group();\n if (inherited) return inherited;\n\n throw new Error(\n `[vdndDraggable=\"${this.vdndDraggable()}\"] requires a group. ` +\n 'Either set vdndDraggableGroup or wrap in a vdndGroup directive.',\n );\n });\n\n /** Optional data associated with this draggable */\n vdndDraggableData = input<unknown>();\n\n /** Whether this draggable is disabled */\n disabled = input<boolean>(false);\n\n /** CSS selector for drag handle (if not provided, entire element is draggable) */\n dragHandle = input<string>();\n\n /** Minimum distance to move before drag starts (prevents accidental drags) */\n dragThreshold = input<number>(5);\n\n /**\n * Delay in milliseconds before drag starts after pointer down.\n * User must hold without moving for this duration.\n * Set to 0 for immediate drag (default behavior).\n */\n dragDelay = input<number>(0);\n\n /** Lock dragging to a single axis ('x' = horizontal only, 'y' = vertical only) */\n lockAxis = input<'x' | 'y' | null>(null);\n\n /** Emits when drag starts */\n dragStart = output<DragStartEvent>();\n\n /** Emits during drag movement */\n dragMove = output<DragMoveEvent>();\n\n /** Emits when drag ends */\n dragEnd = output<DragEndEvent>();\n\n /** Emits when ready-to-drag state changes (after delay passes) */\n dragReadyChange = output<boolean>();\n\n /** Whether this element is in the \"ready to drag\" state (delay has passed) */\n #isPending = signal(false);\n readonly isPending = this.#isPending.asReadonly();\n\n /** Whether this element is currently being dragged (based on global drag state) */\n readonly isDragging = computed(() => {\n const draggedItem = this.#dragState.draggedItem();\n return draggedItem?.draggableId === this.vdndDraggable();\n });\n\n /** Starting position of the drag */\n #startPosition: CursorPosition | null = null;\n\n /** Whether we're currently tracking a potential drag */\n #isTracking = false;\n\n /** Bound event handlers for cleanup */\n #boundPointerMove: ((e: MouseEvent | TouchEvent) => void) | null = null;\n #boundPointerUp: ((e: MouseEvent | TouchEvent) => void) | null = null;\n #boundKeyDown: ((e: KeyboardEvent) => void) | null = null;\n\n /** Request animation frame ID for drag updates */\n #rafId: number | null = null;\n\n /** Timer ID for drag delay */\n #delayTimerId: ReturnType<typeof setTimeout> | null = null;\n\n /** Whether the delay has been satisfied (user held long enough) */\n #delayReady = false;\n\n /**\n * Update the pending state and emit the change event.\n */\n #setPending(pending: boolean): void {\n if (this.#isPending() !== pending) {\n this.#isPending.set(pending);\n this.dragReadyChange.emit(pending);\n }\n }\n\n ngOnInit(): void {\n // Set up event listeners\n this.#boundPointerMove = this.#onPointerMove.bind(this);\n this.#boundPointerUp = this.#onPointerUp.bind(this);\n this.#boundKeyDown = this.#onKeyDown.bind(this);\n }\n\n ngOnDestroy(): void {\n this.#cleanup();\n }\n\n /**\n * Handle pointer down (mouse or touch).\n */\n protected onPointerDown(event: MouseEvent | TouchEvent, isTouch: boolean): void {\n if (this.disabled()) {\n return;\n }\n\n // Check for left mouse button only\n if (!isTouch && (event as MouseEvent).button !== 0) {\n return;\n }\n\n // Check if click is on drag handle (if specified)\n const handle = this.dragHandle();\n if (handle) {\n const target = event.target as HTMLElement;\n if (!target.closest(handle)) {\n return;\n }\n }\n\n // Check for elements that should not trigger drag\n const target = event.target as HTMLElement;\n if (\n target.closest('button, input, textarea, select, [contenteditable]') ||\n target.classList.contains('no-drag')\n ) {\n return;\n }\n\n const delay = this.dragDelay();\n\n // For touch events with a delay configured, DON'T call preventDefault() on touchstart.\n // This allows native scrolling to work if the user swipes before the delay fires.\n // For mouse events or touch without delay, prevent default immediately to avoid\n // text selection and other default behaviors.\n if (!isTouch || delay === 0) {\n event.preventDefault();\n }\n event.stopPropagation();\n\n this.#isTracking = true;\n this.#startPosition = this.#getPosition(event);\n\n // Handle drag delay\n if (delay > 0) {\n this.#delayReady = false;\n this.#delayTimerId = setTimeout(() => {\n this.#delayReady = true;\n this.#setPending(true); // Emit ready state when delay passes\n this.#delayTimerId = null;\n }, delay);\n } else {\n this.#delayReady = true;\n }\n\n // Add document-level event listeners\n this.#ngZone.runOutsideAngular(() => {\n if (isTouch) {\n document.addEventListener('touchmove', this.#boundPointerMove!, { passive: false });\n document.addEventListener('touchend', this.#boundPointerUp!);\n document.addEventListener('touchcancel', this.#boundPointerUp!);\n } else {\n document.addEventListener('mousemove', this.#boundPointerMove!);\n document.addEventListener('mouseup', this.#boundPointerUp!);\n }\n // Listen for Escape key on document to cancel drag\n document.addEventListener('keydown', this.#boundKeyDown!);\n });\n }\n\n /**\n * Handle pointer move (mouse or touch).\n */\n #onPointerMove(event: MouseEvent | TouchEvent): void {\n if (!this.#isTracking) {\n return;\n }\n\n const position = this.#getPosition(event);\n\n // Check if we've moved past the threshold\n if (!this.isDragging() && this.#startPosition) {\n const distance = Math.sqrt(\n Math.pow(position.x - this.#startPosition.x, 2) +\n Math.pow(position.y - this.#startPosition.y, 2),\n );\n\n if (distance < this.dragThreshold()) {\n return;\n }\n\n // If delay is configured and not yet ready, cancel the drag attempt\n // (user moved before the delay was satisfied).\n // DON'T call preventDefault() here - let native scrolling take over.\n if (!this.#delayReady) {\n this.#cancelDelayTimer();\n this.#cleanup();\n return;\n }\n\n // Start the drag - now we can prevent default\n event.preventDefault();\n this.#startDrag(position);\n } else if (this.isDragging()) {\n // Already dragging - prevent default to stop scrolling\n event.preventDefault();\n }\n\n // Only update drag if we're actually dragging\n if (!this.isDragging()) {\n return;\n }\n\n // Throttle drag updates with requestAnimationFrame\n if (this.#rafId !== null) {\n cancelAnimationFrame(this.#rafId);\n }\n\n this.#rafId = requestAnimationFrame(() => {\n this.#updateDrag(position);\n this.#rafId = null;\n });\n }\n\n /**\n * Cancel the delay timer if active.\n */\n #cancelDelayTimer(): void {\n if (this.#delayTimerId !== null) {\n clearTimeout(this.#delayTimerId);\n this.#delayTimerId = null;\n }\n this.#delayReady = false;\n }\n\n /**\n * Handle pointer up (mouse or touch).\n */\n #onPointerUp(event: MouseEvent | TouchEvent): void {\n if (!this.#isTracking) {\n return;\n }\n\n // Only prevent default if we were actually dragging\n // Otherwise, allow native touch behavior (like scroll momentum) to complete\n if (this.isDragging()) {\n event.preventDefault();\n this.#endDrag(false);\n }\n\n this.#cleanup();\n }\n\n /**\n * Handle keyboard activation (space key).\n */\n protected onKeyboardActivate(): boolean {\n if (this.disabled()) {\n return true;\n }\n\n // Keyboard drag is complex to implement properly\n // For now, we'll just prevent default behavior\n // Full implementation would involve arrow keys for movement\n return false; // Prevents default\n }\n\n /**\n * Handle escape key to cancel drag.\n */\n protected onEscape(): boolean {\n if (this.isDragging()) {\n this.#endDrag(true);\n this.#cleanup();\n return false; // Prevents default\n }\n return true;\n }\n\n /**\n * Start the drag operation.\n */\n #startDrag(position: CursorPosition): void {\n // Clear pending state - drag is now active\n this.#setPending(false);\n\n const element = this.#elementRef.nativeElement;\n const rect = element.getBoundingClientRect();\n\n // Calculate grab offset using the START position (where user initially pressed down)\n // NOT the current position (where drag threshold was exceeded)\n // This ensures the preview maintains its position relative to where the user grabbed it\n const startPos = this.#startPosition ?? position;\n const grabOffset: GrabOffset = {\n x: startPos.x - rect.left,\n y: startPos.y - rect.top,\n };\n\n // Clone element BEFORE updating drag state (which triggers display:none via host binding)\n const clonedElement = this.#elementClone.cloneElement(element);\n\n // Find droppable and calculate initial placeholder position\n // This fixes the UI glitch by ensuring placeholder is set before the element is hidden\n const groupName = this.#effectiveGroup();\n const droppableElement = this.#positionCalculator.findDroppableAtPoint(\n position.x,\n position.y,\n element,\n groupName,\n );\n\n const activeDroppableId = droppableElement\n ? this.#positionCalculator.getDroppableId(droppableElement)\n : this.#getParentDroppableId();\n\n // Calculate source index BEFORE the element is hidden (display: none)\n // This is critical because getBoundingClientRect() returns all zeros for hidden elements\n const sourceIndex = this.#calculateSourceIndex(element, droppableElement);\n\n let initialPlaceholderId: string | null = null;\n let initialPlaceholderIndex: number | null = null;\n\n if (droppableElement) {\n const indexResult = this.#calculatePlaceholderIndex(droppableElement, position, sourceIndex);\n initialPlaceholderIndex = indexResult.index;\n initialPlaceholderId = indexResult.placeholderId;\n }\n\n // Register with drag state service - this triggers isDragging computed to become true\n // which will apply display:none via host binding\n // No ngZone.run() needed - signals work outside zone and effects react automatically\n this.#dragState.startDrag(\n {\n draggableId: this.vdndDraggable(),\n droppableId: this.#getParentDroppableId() ?? '',\n element,\n clonedElement,\n height: rect.height,\n width: rect.width,\n data: this.vdndDraggableData(),\n },\n position,\n grabOffset,\n this.lockAxis(),\n activeDroppableId,\n initialPlaceholderId,\n initialPlaceholderIndex,\n sourceIndex,\n );\n\n // Start auto-scroll monitoring with a callback to recalculate placeholder\n this.#autoScroll.startMonitoring(() => this.#recalculatePlaceholder());\n\n // Emit drag start event\n this.dragStart.emit({\n draggableId: this.vdndDraggable(),\n droppableId: this.#getParentDroppableId() ?? '',\n data: this.vdndDraggableData(),\n position,\n });\n }\n\n /**\n * Calculate the source index of the dragged element BEFORE it's hidden.\n * This must be called before startDrag updates the state (which triggers display:none).\n */\n #calculateSourceIndex(element: HTMLElement, droppableElement: HTMLElement | null): number {\n if (!droppableElement) {\n return 0;\n }\n\n const rect = element.getBoundingClientRect();\n const virtualScroll = droppableElement.querySelector('vdnd-virtual-scroll');\n const scrollableElement = virtualScroll ?? droppableElement;\n const containerRect = scrollableElement.getBoundingClientRect();\n const scrollTop = scrollableElement.scrollTop;\n\n // Get item height from the element itself\n const itemHeight = rect.height || 50;\n\n // Calculate the logical index based on the element's position\n const relativeY = rect.top - containerRect.top + scrollTop;\n return Math.round(relativeY / itemHeight);\n }\n\n /**\n * Recalculate placeholder position (called during auto-scroll).\n */\n #recalculatePlaceholder(): void {\n const cursorPosition = this.#dragState.cursorPosition();\n if (!cursorPosition || !this.isDragging()) {\n return;\n }\n\n // Recalculate placeholder based on current scroll position\n this.#updateDrag(cursorPosition);\n }\n\n /**\n * Update the drag position.\n * @param position Current cursor position\n */\n #updateDrag(position: CursorPosition): void {\n const element = this.#elementRef.nativeElement;\n const groupName = this.#effectiveGroup();\n\n // Apply axis locking to effective position for droppable detection\n // When axis is locked, use the start position for the locked axis\n const axisLock = this.lockAxis();\n let effectivePosition = position;\n\n if (axisLock && this.#startPosition) {\n effectivePosition = {\n x: axisLock === 'x' ? this.#startPosition.x : position.x,\n y: axisLock === 'y' ? this.#startPosition.y : position.y,\n };\n }\n\n // Find droppable at effective position (respects axis locking)\n const droppableElement = this.#positionCalculator.findDroppableAtPoint(\n effectivePosition.x,\n effectivePosition.y,\n element,\n groupName,\n );\n\n const activeDroppableId = droppableElement\n ? this.#positionCalculator.getDroppableId(droppableElement)\n : null;\n\n let placeholderId: string | null = null;\n let placeholderIndex: number | null = null;\n\n if (droppableElement) {\n // Calculate placeholder index based on effective position using mathematical approach\n // This is more stable than DOM-based detection because it doesn't get affected\n // by the placeholder insertion shifting elements around\n const indexResult = this.#calculatePlaceholderIndex(droppableElement, effectivePosition);\n placeholderIndex = indexResult.index;\n placeholderId = indexResult.placeholderId;\n }\n\n // Update drag state with actual cursor position (for preview rendering)\n // No ngZone.run() needed - signals work outside zone and effects react automatically\n this.#dragState.updateDragPosition({\n cursorPosition: position,\n activeDroppableId,\n placeholderId,\n placeholderIndex,\n });\n\n // Emit drag move event\n this.dragMove.emit({\n draggableId: this.vdndDraggable(),\n sourceDroppableId: this.#getParentDroppableId() ?? '',\n targetDroppableId: activeDroppableId,\n placeholderId,\n position,\n });\n }\n\n /**\n * Calculate the placeholder index based on cursor position.\n * Uses mathematical calculation instead of DOM-based detection to avoid\n * flickering caused by the placeholder insertion shifting elements.\n *\n * @param droppableElement The droppable container element\n * @param position Current cursor position\n * @param sourceIndexOverride Optional source index (used at drag start before element is hidden)\n */\n #calculatePlaceholderIndex(\n droppableElement: HTMLElement,\n position: CursorPosition,\n sourceIndexOverride?: number,\n ): { index: number; placeholderId: string } {\n // Get container and measurements\n const virtualScroll = droppableElement.querySelector('vdnd-virtual-scroll');\n const container = (virtualScroll ?? droppableElement) as HTMLElement;\n // Force layout flush - critical for Safari after programmatic scroll\n // Safari caches hit-testing results and only invalidates on user-initiated scroll\n void container.offsetHeight;\n const rect = container.getBoundingClientRect();\n const currentScrollTop = container.scrollTop;\n // Prefer configured item height from virtual scroll over actual element height\n // This prevents drift when actual element height differs from grid spacing\n const configuredHeight = virtualScroll?.getAttribute('data-item-height');\n const itemHeight = configuredHeight\n ? parseInt(configuredHeight, 10)\n : (this.#dragState.draggedItem()?.height ?? 50);\n\n // Calculate preview center position mathematically\n // The preview is positioned at: cursorPosition - grabOffset (see drag-preview.component.ts)\n // So preview center = cursorPosition.y - grabOffset.y + itemHeight/2\n // Using math avoids Safari's stale getBoundingClientRect() issue during autoscroll\n const grabOffset = this.#dragState.grabOffset();\n const previewCenterY = position.y - (grabOffset?.y ?? 0) + itemHeight / 2;\n\n // Convert to visual index (which slot the preview center is in)\n const relativeY = previewCenterY - rect.top + currentScrollTop;\n const visualIndex = Math.floor(relativeY / itemHeight);\n\n // Check if same-list drag\n const sourceDroppableId = this.#dragState.sourceDroppableId();\n const currentDroppableId = this.#positionCalculator.getDroppableId(droppableElement);\n const isSameList = sourceDroppableId === currentDroppableId;\n\n // Get source index\n const sourceIndex = isSameList\n ? (sourceIndexOverride ?? this.#dragState.sourceIndex() ?? -1)\n : -1;\n\n // Same-list adjustment: if pointing at or after source position, add 1\n // This accounts for the hidden item shifting everything up visually\n let placeholderIndex = visualIndex;\n if (isSameList && sourceIndex >= 0 && visualIndex >= sourceIndex) {\n placeholderIndex = visualIndex + 1;\n }\n\n // Clamp to valid range\n const totalItems = this.#getTotalItemCount(droppableElement, isSameList);\n placeholderIndex = Math.max(0, Math.min(placeholderIndex, totalItems));\n\n return { index: placeholderIndex, placeholderId: END_OF_LIST };\n }\n\n /**\n * Get the total item count for a droppable.\n * Accounts for hidden item during same-list drag.\n */\n #getTotalItemCount(droppableElement: HTMLElement, isSameList: boolean): number {\n const virtualScroll = droppableElement.querySelector('vdnd-virtual-scroll');\n if (virtualScroll) {\n const scrollHeight = (virtualScroll as HTMLElement).scrollHeight;\n // Prefer configured item height from virtual scroll over actual element height\n const configuredHeight = virtualScroll.getAttribute('data-item-height');\n const itemHeight = configuredHeight\n ? parseInt(configuredHeight, 10)\n : (this.#dragState.draggedItem()?.height ?? 50);\n // When same-list, scrollHeight reflects N-1 items (one is hidden)\n // Add 1 back to get true total\n const count = Math.floor(scrollHeight / itemHeight);\n return isSameList ? count + 1 : count;\n }\n // Fallback for non-virtual scroll\n const items = droppableElement.querySelectorAll('[data-draggable-id]');\n return items.length + (isSameList ? 1 : 0);\n }\n\n /**\n * End the drag operation.\n */\n #endDrag(cancelled: boolean): void {\n // No ngZone.run() needed - signals work outside zone and effects react automatically\n // Stop auto-scroll monitoring\n this.#autoScroll.stopMonitoring();\n\n // Emit drag end event\n this.dragEnd.emit({\n draggableId: this.vdndDraggable(),\n droppableId: this.#getParentDroppableId() ?? '',\n cancelled,\n data: this.vdndDraggableData(),\n });\n\n // Clear drag state - this triggers isDragging computed to become false\n if (cancelled) {\n this.#dragState.cancelDrag();\n } else {\n this.#dragState.endDrag();\n }\n }\n\n /**\n * Get the parent droppable ID.\n */\n #getParentDroppableId(): string | null {\n const droppable = this.#positionCalculator.getDroppableParent(\n this.#elementRef.nativeElement,\n this.#effectiveGroup(),\n );\n\n return droppable ? this.#positionCalculator.getDroppableId(droppable) : null;\n }\n\n /**\n * Get position from mouse or touch event.\n */\n #getPosition(event: MouseEvent | TouchEvent): CursorPosition {\n if ('touches' in event) {\n const touch = event.touches[0] ?? event.changedTouches[0];\n return { x: touch.clientX, y: touch.clientY };\n }\n return { x: event.clientX, y: event.clientY };\n }\n\n /**\n * Clean up event listeners and state.\n */\n #cleanup(): void {\n this.#isTracking = false;\n this.#startPosition = null;\n this.#setPending(false); // Clear pending state on cleanup\n this.#cancelDelayTimer();\n\n if (this.#rafId !== null) {\n cancelAnimationFrame(this.#rafId);\n this.#rafId = null;\n }\n\n // Remove event listeners\n if (this.#boundPointerMove) {\n document.removeEventListener('mousemove', this.#boundPointerMove);\n document.removeEventListener('touchmove', this.#boundPointerMove);\n }\n if (this.#boundPointerUp) {\n document.removeEventListener('mouseup', this.#boundPointerUp);\n document.removeEventListener('touchend', this.#boundPointerUp);\n document.removeEventListener('touchcancel', this.#boundPointerUp);\n }\n if (this.#boundKeyDown) {\n document.removeEventListener('keydown', this.#boundKeyDown);\n }\n }\n\n /**\n * Handle keydown events on document to cancel drag with Escape.\n */\n #onKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.isDragging()) {\n // No ngZone.run() needed - #endDrag uses signals which work outside zone\n this.#endDrag(true);\n this.#cleanup();\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n inject,\n input,\n NgZone,\n OnDestroy,\n OnInit,\n signal,\n} from '@angular/core';\nimport { VDND_SCROLL_CONTAINER, VdndScrollContainer } from '../tokens/scroll-container.token';\nimport { AutoScrollConfig, AutoScrollService } from '../services/auto-scroll.service';\n\n/**\n * Directive that marks an element as a scrollable container for virtual scrolling.\n *\n * Apply this directive to any scrollable element (with `overflow: auto` or `overflow: scroll`)\n * that contains a `*vdndVirtualFor` directive. The virtual scroll will use this element\n * as its scroll container.\n *\n * @example\n * Basic usage with a custom scroll container:\n * ```html\n * <div vdndScrollable style=\"overflow: auto; height: 400px;\">\n * <ng-container *vdndVirtualFor=\"let item of items(); itemHeight: 50; trackBy: trackById\">\n * <div>{{ item.name }}</div>\n * </ng-container>\n * </div>\n * ```\n *\n * @example\n * With Ionic ion-content:\n * ```html\n * <ion-content vdndScrollable class=\"ion-content-scroll-host\">\n * <ng-container *vdndVirtualFor=\"let item of items(); itemHeight: 50; trackBy: trackById\">\n * <div>{{ item.name }}</div>\n * </ng-container>\n * </ion-content>\n * ```\n *\n * @example\n * With auto-scroll configuration:\n * ```html\n * <div vdndScrollable\n * [autoScrollEnabled]=\"true\"\n * [autoScrollConfig]=\"{ threshold: 80, maxSpeed: 20 }\"\n * style=\"overflow: auto; height: 400px;\">\n * ...\n * </div>\n * ```\n */\n@Directive({\n selector: '[vdndScrollable]',\n providers: [{ provide: VDND_SCROLL_CONTAINER, useExisting: ScrollableDirective }],\n host: {\n class: 'vdnd-scrollable',\n },\n})\nexport class ScrollableDirective implements VdndScrollContainer, OnInit, OnDestroy {\n readonly #elementRef = inject(ElementRef<HTMLElement>);\n readonly #ngZone = inject(NgZone);\n readonly #autoScrollService = inject(AutoScrollService);\n\n /** Current scroll position (reactive) */\n readonly #scrollTop = signal(0);\n\n /** Measured container height (reactive) */\n readonly #containerHeight = signal(0);\n\n /** Cleanup function for scroll listener */\n #scrollCleanup: (() => void) | null = null;\n\n /** Pending RAF ID for scroll throttling */\n #pendingScrollRaf: number | null = null;\n\n /** Last scroll position committed to signal (for threshold check) */\n #lastCommittedScrollTop = 0;\n\n /** ResizeObserver for container height detection */\n #resizeObserver: ResizeObserver | null = null;\n\n /** Generated ID for auto-scroll registration */\n #generatedScrollId = `vdnd-scroll-${Math.random().toString(36).slice(2, 9)}`;\n\n // ========== Inputs ==========\n\n /** Unique ID for this scroll container (used for auto-scroll registration) */\n scrollContainerId = input<string>();\n\n /** Whether auto-scroll is enabled when dragging near edges */\n autoScrollEnabled = input<boolean>(true);\n\n /** Auto-scroll configuration */\n autoScrollConfig = input<Partial<AutoScrollConfig>>({});\n\n // ========== VdndScrollContainer Implementation ==========\n\n get nativeElement(): HTMLElement {\n return this.#elementRef.nativeElement;\n }\n\n scrollTop(): number {\n return this.#scrollTop();\n }\n\n scrollTo(options: ScrollToOptions): void {\n this.nativeElement.scrollTo(options);\n }\n\n // ========== Additional API ==========\n\n /** Get the measured container height */\n containerHeight(): number {\n return this.#containerHeight();\n }\n\n /** Scroll by a delta amount */\n scrollBy(delta: number): void {\n const newPosition = Math.max(\n 0,\n Math.min(\n this.scrollTop() + delta,\n this.nativeElement.scrollHeight - this.nativeElement.clientHeight,\n ),\n );\n this.scrollTo({ top: newPosition });\n }\n\n // ========== Lifecycle ==========\n\n ngOnInit(): void {\n this.#setupScrollListener();\n this.#setupResizeObserver();\n this.#registerAutoScroll();\n }\n\n ngOnDestroy(): void {\n this.#scrollCleanup?.();\n this.#resizeObserver?.disconnect();\n this.#unregisterAutoScroll();\n }\n\n // ========== Private Methods ==========\n\n /** Minimum scroll delta (px) to trigger signal update */\n readonly #scrollThreshold = 5;\n\n #setupScrollListener(): void {\n // Throttled scroll handler: combines threshold check + RAF coalescing\n // No ngZone.run() needed - signals work outside zone and effects react automatically\n const onScroll = () => {\n // Skip if already have a pending update\n if (this.#pendingScrollRaf !== null) {\n return;\n }\n\n const currentScrollTop = this.nativeElement.scrollTop;\n\n // Apply threshold check to avoid excessive updates\n if (Math.abs(currentScrollTop - this.#lastCommittedScrollTop) < this.#scrollThreshold) {\n return;\n }\n\n // Schedule update via RAF to coalesce multiple scroll events\n this.#pendingScrollRaf = requestAnimationFrame(() => {\n this.#pendingScrollRaf = null;\n const finalScrollTop = this.nativeElement.scrollTop;\n\n // Double-check threshold in case scroll reversed\n if (Math.abs(finalScrollTop - this.#lastCommittedScrollTop) >= this.#scrollThreshold) {\n this.#lastCommittedScrollTop = finalScrollTop;\n this.#scrollTop.set(finalScrollTop);\n }\n });\n };\n\n this.#ngZone.runOutsideAngular(() => {\n this.nativeElement.addEventListener('scroll', onScroll, { passive: true });\n });\n\n this.#scrollCleanup = () => {\n if (this.#pendingScrollRaf !== null) {\n cancelAnimationFrame(this.#pendingScrollRaf);\n this.#pendingScrollRaf = null;\n }\n this.nativeElement.removeEventListener('scroll', onScroll);\n };\n\n // Set initial scroll position\n this.#lastCommittedScrollTop = this.nativeElement.scrollTop;\n this.#scrollTop.set(this.nativeElement.scrollTop);\n }\n\n #setupResizeObserver(): void {\n // No ngZone.run() needed - signals work outside zone and effects react automatically\n this.#ngZone.runOutsideAngular(() => {\n this.#resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const height = entry.contentRect.height;\n // Only update if height changed significantly (> 1px) to avoid loops\n if (Math.abs(height - this.#containerHeight()) > 1) {\n this.#containerHeight.set(height);\n }\n }\n });\n this.#resizeObserver.observe(this.nativeElement);\n });\n\n // Set initial height\n this.#containerHeight.set(this.nativeElement.clientHeight);\n }\n\n #registerAutoScroll(): void {\n if (this.autoScrollEnabled()) {\n const id = this.scrollContainerId() ?? this.#generatedScrollId;\n this.#autoScrollService.registerContainer(id, this.nativeElement, this.autoScrollConfig());\n }\n }\n\n #unregisterAutoScroll(): void {\n const id = this.scrollContainerId() ?? this.#generatedScrollId;\n this.#autoScrollService.unregisterContainer(id);\n }\n}\n","import {\n computed,\n Directive,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\nimport { DragStateService } from '../services/drag-state.service';\nimport { VDND_SCROLL_CONTAINER } from '../tokens/scroll-container.token';\n\n/**\n * Context provided to the template for each virtual item.\n */\nexport interface VirtualForContext<T> {\n /** The item data (also available as implicit context) */\n $implicit: T;\n /** The item's index in the original array (-1 for placeholders) */\n index: number;\n /** Whether this is the first visible item */\n first: boolean;\n /** Whether this is the last visible item */\n last: boolean;\n /** Count of total items */\n count: number;\n /** Whether this item is an auto-inserted placeholder */\n isPlaceholder?: boolean;\n}\n\n/**\n * A structural directive for virtual scrolling within custom scroll containers.\n * Provides maximum flexibility for advanced use cases where the component wrapper\n * is not suitable.\n *\n * The directive must be placed inside a container marked with the `vdndScrollable`\n * directive, which provides the scroll container context via dependency injection.\n *\n * @example\n * Basic usage:\n * ```html\n * <div vdndScrollable style=\"overflow: auto; height: 400px\">\n * <ng-container *vdndVirtualFor=\"let item of items(); itemHeight: 50; trackBy: trackById\">\n * <div class=\"item\">{{ item.name }}</div>\n * </ng-container>\n * </div>\n * ```\n *\n * @example\n * With Ionic ion-content:\n * ```html\n * <ion-content vdndScrollable class=\"ion-content-scroll-host\">\n * <ng-container *vdndVirtualFor=\"let item of items(); itemHeight: 50; trackBy: trackById\">\n * <div class=\"item\">{{ item.name }}</div>\n * </ng-container>\n * </ion-content>\n * ```\n *\n * @example\n * With placeholder support:\n * ```html\n * <div vdndScrollable style=\"overflow: auto; height: 400px\">\n * <ng-container *vdndVirtualFor=\"\n * let item of items();\n * itemHeight: 50;\n * trackBy: trackById;\n * droppableId: 'list-1';\n * let isPlaceholder = isPlaceholder\n * \">\n * @if (isPlaceholder) {\n * <div class=\"placeholder\"></div>\n * } @else {\n * <div class=\"item\">{{ item.name }}</div>\n * }\n * </ng-container>\n * </div>\n * ```\n */\n@Directive({\n selector: '[vdndVirtualFor][vdndVirtualForOf]',\n})\nexport class VirtualForDirective<T> implements OnInit, OnDestroy {\n readonly #templateRef = inject(TemplateRef<VirtualForContext<T>>);\n readonly #viewContainer = inject(ViewContainerRef);\n readonly #elementRef = inject(ElementRef<Comment>);\n readonly #dragState = inject(DragStateService);\n readonly #scrollContainer = inject(VDND_SCROLL_CONTAINER);\n\n /** Pool of views for reuse */\n readonly #viewPool: EmbeddedViewRef<VirtualForContext<T>>[] = [];\n\n /** Currently active views keyed by their track-by value */\n readonly #activeViews = new Map<unknown, EmbeddedViewRef<VirtualForContext<T>>>();\n\n // ========== Inputs ==========\n\n /** The array of items to iterate over */\n vdndVirtualForOf = input.required<T[]>();\n\n /** Height of each item in pixels */\n vdndVirtualForItemHeight = input.required<number>();\n\n /** Track-by function for efficient updates */\n vdndVirtualForTrackBy = input.required<(index: number, item: T) => unknown>();\n\n /** Number of items to render outside the visible area */\n vdndVirtualForOverscan = input<number>(3);\n\n /** Droppable ID for auto-placeholder support */\n vdndVirtualForDroppableId = input<string>();\n\n /** Whether to auto-insert placeholder */\n vdndVirtualForAutoPlaceholder = input<boolean>(true);\n\n // ========== Computed Values ==========\n\n /** First visible item index */\n readonly #firstVisibleIndex = computed(() => {\n const itemHeight = this.vdndVirtualForItemHeight();\n if (itemHeight <= 0) return 0;\n return Math.floor(this.#scrollContainer.scrollTop() / itemHeight);\n });\n\n /** Number of visible items */\n readonly #visibleCount = computed(() => {\n const height = this.#scrollContainer.containerHeight();\n const itemHeight = this.vdndVirtualForItemHeight();\n if (height <= 0 || itemHeight <= 0) return 0;\n return Math.ceil(height / itemHeight);\n });\n\n /** Range of items to render */\n readonly #renderRange = computed(() => {\n const first = this.#firstVisibleIndex();\n const visible = this.#visibleCount();\n const overscan = this.vdndVirtualForOverscan();\n const total = this.vdndVirtualForOf().length;\n\n const start = Math.max(0, first - overscan);\n const end = Math.min(total - 1, first + visible + overscan);\n\n return { start, end };\n });\n\n /** Whether placeholder should be shown */\n readonly #shouldShowPlaceholder = computed(() => {\n if (!this.vdndVirtualForAutoPlaceholder()) return false;\n const droppableId = this.vdndVirtualForDroppableId();\n if (!droppableId) return false;\n return this.#dragState.activeDroppableId() === droppableId;\n });\n\n /** Placeholder index if applicable */\n readonly #placeholderIndex = computed(() => {\n if (!this.#shouldShowPlaceholder()) return null;\n return this.#dragState.placeholderIndex();\n });\n\n constructor() {\n // React to changes and update views\n effect(() => {\n this.#updateViews();\n });\n }\n\n ngOnInit(): void {\n this.#updateSpacers();\n }\n\n ngOnDestroy(): void {\n this.#viewPool.forEach((view) => view.destroy());\n this.#activeViews.forEach((view) => view.destroy());\n }\n\n /**\n * Update spacer elements.\n */\n #updateSpacers(): void {\n // Create top spacer\n const topSpacer = document.createElement('div');\n topSpacer.className = 'vdnd-virtual-for-spacer-top';\n topSpacer.style.height = '0px';\n\n // Create bottom spacer\n const bottomSpacer = document.createElement('div');\n bottomSpacer.className = 'vdnd-virtual-for-spacer-bottom';\n bottomSpacer.style.height = '0px';\n\n // Insert spacers\n const comment = this.#elementRef.nativeElement;\n comment.parentNode?.insertBefore(topSpacer, comment);\n comment.parentNode?.appendChild(bottomSpacer);\n\n // Update spacer heights reactively\n effect(() => {\n const { start, end } = this.#renderRange();\n const itemHeight = this.vdndVirtualForItemHeight();\n const total = this.vdndVirtualForOf().length;\n\n topSpacer.style.height = `${start * itemHeight}px`;\n bottomSpacer.style.height = `${Math.max(0, total - end - 1) * itemHeight}px`;\n });\n }\n\n /**\n * Update the rendered views.\n */\n #updateViews(): void {\n const items = this.vdndVirtualForOf();\n const { start, end } = this.#renderRange();\n const trackByFn = this.vdndVirtualForTrackBy();\n const placeholderIndex = this.#placeholderIndex();\n\n // Collect keys that should be active\n const activeKeys = new Set<unknown>();\n\n // Clear view container but keep views in pool\n this.#activeViews.forEach((view, key) => {\n this.#viewPool.push(view);\n this.#activeViews.delete(key);\n });\n this.#viewContainer.clear();\n\n let viewIndex = 0;\n\n // Render items in range with placeholder\n for (let i = start; i <= end && i < items.length; i++) {\n // Insert placeholder before this item if needed\n if (placeholderIndex !== null && placeholderIndex === i) {\n const placeholderContext: VirtualForContext<T> = {\n $implicit: { __vdndPlaceholder: true } as unknown as T,\n index: -1,\n first: false,\n last: false,\n count: items.length,\n isPlaceholder: true,\n };\n const placeholderView = this.#getOrCreateView('__placeholder__', placeholderContext);\n this.#viewContainer.insert(placeholderView, viewIndex++);\n activeKeys.add('__placeholder__');\n }\n\n const item = items[i];\n const key = trackByFn(i, item);\n const context: VirtualForContext<T> = {\n $implicit: item,\n index: i,\n first: i === start,\n last: i === end || i === items.length - 1,\n count: items.length,\n isPlaceholder: false,\n };\n\n const view = this.#getOrCreateView(key, context);\n this.#viewContainer.insert(view, viewIndex++);\n activeKeys.add(key);\n }\n\n // Insert placeholder at end if needed\n if (placeholderIndex !== null && placeholderIndex >= items.length) {\n const placeholderContext: VirtualForContext<T> = {\n $implicit: { __vdndPlaceholder: true } as unknown as T,\n index: -1,\n first: false,\n last: true,\n count: items.length,\n isPlaceholder: true,\n };\n const placeholderView = this.#getOrCreateView('__placeholder__', placeholderContext);\n this.#viewContainer.insert(placeholderView, viewIndex++);\n }\n\n // Destroy unused views in pool (keep some for reuse)\n while (this.#viewPool.length > 10) {\n const view = this.#viewPool.pop();\n view?.destroy();\n }\n }\n\n /**\n * Get an existing view from pool or create a new one.\n */\n #getOrCreateView(\n key: unknown,\n context: VirtualForContext<T>,\n ): EmbeddedViewRef<VirtualForContext<T>> {\n // Check if we have this view active already\n let view = this.#activeViews.get(key);\n if (view) {\n // Update context\n Object.assign(view.context, context);\n view.markForCheck();\n return view;\n }\n\n // Try to reuse from pool\n view = this.#viewPool.pop();\n if (view) {\n Object.assign(view.context, context);\n view.markForCheck();\n } else {\n // Create new view\n view = this.#templateRef.createEmbeddedView(context);\n }\n\n this.#activeViews.set(key, view);\n return view;\n }\n\n /**\n * Static method for Angular's structural directive microsyntax.\n */\n static ngTemplateContextGuard<T>(\n _dir: VirtualForDirective<T>,\n _ctx: unknown,\n ): _ctx is VirtualForContext<T> {\n return true;\n }\n}\n","import { WritableSignal } from '@angular/core';\nimport { DropEvent } from '../models/drag-drop.models';\n\n/**\n * Moves an item between signal-based lists based on a drop event.\n * Handles both same-list reordering and cross-list moves.\n *\n * @example\n * ```typescript\n * // In your component:\n * readonly list1 = signal<Item[]>([...]);\n * readonly list2 = signal<Item[]>([...]);\n *\n * onDrop(event: DropEvent): void {\n * moveItem(event, {\n * 'list-1': this.list1,\n * 'list-2': this.list2,\n * });\n * }\n * ```\n *\n * @param event The drop event from the droppable directive\n * @param lists A map of droppable IDs to their corresponding WritableSignal arrays\n */\nexport function moveItem<T>(event: DropEvent, lists: Record<string, WritableSignal<T[]>>): void {\n const sourceList = lists[event.source.droppableId];\n const destList = lists[event.destination.droppableId];\n\n if (!sourceList || !destList) {\n console.warn(\n `[moveItem] Could not find list for droppable \"${event.source.droppableId}\" or \"${event.destination.droppableId}\"`,\n );\n return;\n }\n\n const sourceIndex = event.source.index;\n const destIndex = event.destination.index;\n\n // Same list reorder\n if (event.source.droppableId === event.destination.droppableId) {\n reorderItems(event, sourceList);\n return;\n }\n\n // Cross-list move\n const sourceItems = sourceList();\n const item = sourceItems[sourceIndex];\n\n if (item === undefined) {\n console.warn(`[moveItem] Could not find item at index ${sourceIndex}`);\n return;\n }\n\n // Remove from source\n sourceList.update((items) => {\n const newItems = [...items];\n newItems.splice(sourceIndex, 1);\n return newItems;\n });\n\n // Insert at destination\n destList.update((items) => {\n const newItems = [...items];\n newItems.splice(destIndex, 0, item);\n return newItems;\n });\n}\n\n/**\n * Reorders items within a single signal-based list.\n *\n * @example\n * ```typescript\n * readonly items = signal<Item[]>([...]);\n *\n * onDrop(event: DropEvent): void {\n * reorderItems(event, this.items);\n * }\n * ```\n *\n * @param event The drop event from the droppable directive\n * @param list The WritableSignal array to reorder\n */\nexport function reorderItems<T>(event: DropEvent, list: WritableSignal<T[]>): void {\n const sourceIndex = event.source.index;\n let destIndex = event.destination.index;\n\n // No-op if same position\n if (sourceIndex === destIndex) {\n return;\n }\n\n list.update((items) => {\n const newItems = [...items];\n const [removed] = newItems.splice(sourceIndex, 1);\n\n // Adjust destination index if moving down (since we removed an item before it)\n if (sourceIndex < destIndex) {\n destIndex--;\n }\n\n newItems.splice(destIndex, 0, removed);\n return newItems;\n });\n}\n\n/**\n * Applies a move operation immutably, returning new array objects.\n * Useful for state management patterns that require immutable updates.\n *\n * @example\n * ```typescript\n * onDrop(event: DropEvent): void {\n * const { list1, list2 } = applyMove(event, {\n * 'list-1': this.list1,\n * 'list-2': this.list2,\n * });\n * // Use the returned arrays with your state management\n * }\n * ```\n *\n * @param event The drop event from the droppable directive\n * @param lists A map of droppable IDs to their corresponding arrays\n * @returns A new object with the same keys but updated arrays\n */\nexport function applyMove<T>(event: DropEvent, lists: Record<string, T[]>): Record<string, T[]> {\n const result = { ...lists };\n const sourceKey = event.source.droppableId;\n const destKey = event.destination.droppableId;\n const sourceIndex = event.source.index;\n let destIndex = event.destination.index;\n\n const sourceItems = [...(lists[sourceKey] ?? [])];\n const item = sourceItems[sourceIndex];\n\n if (item === undefined) {\n return result;\n }\n\n // Same list reorder\n if (sourceKey === destKey) {\n const [removed] = sourceItems.splice(sourceIndex, 1);\n if (sourceIndex < destIndex) {\n destIndex--;\n }\n sourceItems.splice(destIndex, 0, removed);\n result[sourceKey] = sourceItems;\n return result;\n }\n\n // Cross-list move\n const destItems = [...(lists[destKey] ?? [])];\n sourceItems.splice(sourceIndex, 1);\n destItems.splice(destIndex, 0, item);\n\n result[sourceKey] = sourceItems;\n result[destKey] = destItems;\n\n return result;\n}\n\n/**\n * Checks if a drop event represents a no-op (item dropped in its original position).\n * Useful for skipping unnecessary state updates.\n *\n * @example\n * ```typescript\n * onDrop(event: DropEvent): void {\n * if (isNoOpDrop(event)) {\n * return; // No action needed\n * }\n * moveItem(event, this.lists);\n * }\n * ```\n *\n * @param event The drop event to check\n * @returns true if the drop would result in no change\n */\nexport function isNoOpDrop(event: DropEvent): boolean {\n return (\n event.source.droppableId === event.destination.droppableId &&\n event.source.index === event.destination.index\n );\n}\n\n/**\n * Creates a new list with the item inserted at the specified index.\n * Low-level utility for custom implementations.\n *\n * @param list The source array\n * @param item The item to insert\n * @param index The index to insert at\n * @returns A new array with the item inserted\n */\nexport function insertAt<T>(list: T[], item: T, index: number): T[] {\n const result = [...list];\n result.splice(index, 0, item);\n return result;\n}\n\n/**\n * Creates a new list with the item at the specified index removed.\n * Low-level utility for custom implementations.\n *\n * @param list The source array\n * @param index The index to remove\n * @returns A new array with the item removed\n */\nexport function removeAt<T>(list: T[], index: number): T[] {\n const result = [...list];\n result.splice(index, 1);\n return result;\n}\n","// Models\nexport * from './models/drag-drop.models';\n\n// Tokens\nexport { VDND_SCROLL_CONTAINER } from './tokens/scroll-container.token';\nexport type { VdndScrollContainer } from './tokens/scroll-container.token';\n\n// Services\nexport { DragStateService } from './services/drag-state.service';\nexport { PositionCalculatorService } from './services/position-calculator.service';\nexport { AutoScrollService } from './services/auto-scroll.service';\nexport type { AutoScrollConfig } from './services/auto-scroll.service';\nexport { ElementCloneService } from './services/element-clone.service';\n\n// Components\nexport { VirtualScrollContainerComponent } from './components/virtual-scroll-container.component';\nexport type {\n VirtualScrollItemContext,\n VisibleRangeChange,\n} from './components/virtual-scroll-container.component';\nexport { DragPreviewComponent } from './components/drag-preview.component';\nexport type { DragPreviewContext } from './components/drag-preview.component';\nexport { PlaceholderComponent } from './components/placeholder.component';\nexport type { PlaceholderContext } from './components/placeholder.component';\nexport { VirtualSortableListComponent } from './components/virtual-sortable-list.component';\n\n// Directives\nexport { DraggableDirective } from './directives/draggable.directive';\nexport { DroppableDirective } from './directives/droppable.directive';\nexport { DroppableGroupDirective, VDND_GROUP_TOKEN } from './directives/droppable-group.directive';\nexport type { VdndGroupContext } from './directives/droppable-group.directive';\nexport { ScrollableDirective } from './directives/scrollable.directive';\nexport { VirtualForDirective } from './directives/virtual-for.directive';\nexport type { VirtualForContext } from './directives/virtual-for.directive';\n\n// Utilities\nexport {\n moveItem,\n reorderItems,\n applyMove,\n isNoOpDrop,\n insertAt,\n removeAt,\n} from './utils/drop-helpers';\n","/*\n * Public API Surface of ngx-virtual-dnd\n */\n\nexport * from './lib/index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAqLA;;AAEG;AACI,MAAM,kBAAkB,GAAc;AAC3C,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,QAAQ,EAAE,IAAI;;AAGhB;;AAEG;AACI,MAAM,WAAW,GAAG;;ACjL3B;;;;;;;;;;;;;;AAcG;MACU,qBAAqB,GAAG,IAAI,cAAc,CACrD,uBAAuB;;AC/BzB;;;AAGG;MAIU,gBAAgB,CAAA;;AAElB,IAAA,MAAM,GAAG,MAAM,CAAY,kBAAkB,kDAAC;;AAG9C,IAAA,aAAa,GAAG,MAAM,CAAU,KAAK,yDAAC;;AAGtC,IAAA,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE;;AAG9C,IAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;;AAGhC,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,sDAAC;;AAGrD,IAAA,WAAW,GAAG,QAA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,EAAA;IACzC,QACE,KAAK,CAAC,MAAM,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW,CAAC,WAAW;QAC1D,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,WAAW,CAAC,KAAK;AAElD;AAEA;;;;;;;;AAQG;SACa,QAAQ,CAAI,IAAS,EAAE,IAAO,EAAE,KAAa,EAAA;AAC3D,IAAA,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC;AAC7B,IAAA,OAAO,MAAM;AACf;AAEA;;;;;;;AAOG;AACG,SAAU,QAAQ,CAAI,IAAS,EAAE,KAAa,EAAA;AAClD,IAAA,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;AACxB,IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AACvB,IAAA,OAAO,MAAM;AACf;;ACpNA;;ACAA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ngx-virtual-dnd",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A performant drag-and-drop library for Angular that works seamlessly with virtual scrolling",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"drag-and-drop",
|
|
8
|
+
"dnd",
|
|
9
|
+
"virtual-scroll",
|
|
10
|
+
"virtual-scrolling",
|
|
11
|
+
"sortable",
|
|
12
|
+
"reorder",
|
|
13
|
+
"signals"
|
|
14
|
+
],
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Sergey Gultyayev",
|
|
17
|
+
"email": "gultyayev.sergey@gmail.com"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/gultyayev/angular-vdnd.git"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/gultyayev/angular-vdnd#readme",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/gultyayev/angular-vdnd/issues"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@angular/common": "^21.0.0",
|
|
30
|
+
"@angular/core": "^21.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"tslib": "^2.3.0"
|
|
34
|
+
},
|
|
35
|
+
"sideEffects": false,
|
|
36
|
+
"module": "fesm2022/ngx-virtual-dnd.mjs",
|
|
37
|
+
"typings": "types/ngx-virtual-dnd.d.ts",
|
|
38
|
+
"exports": {
|
|
39
|
+
"./package.json": {
|
|
40
|
+
"default": "./package.json"
|
|
41
|
+
},
|
|
42
|
+
".": {
|
|
43
|
+
"types": "./types/ngx-virtual-dnd.d.ts",
|
|
44
|
+
"default": "./fesm2022/ngx-virtual-dnd.mjs"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|