@mk-kit/ui 0.54.0 → 0.55.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"mk-kit-ui-dnd.mjs","sources":["../../../projects/mk-kit/dnd/drag-drop-utils.ts","../../../projects/mk-kit/dnd/drag-drop-registry.ts","../../../projects/mk-kit/dnd/drag-handle.ts","../../../projects/mk-kit/dnd/drag.ts","../../../projects/mk-kit/dnd/drag.html","../../../projects/mk-kit/dnd/drop-list.ts","../../../projects/mk-kit/dnd/drop-list.html","../../../projects/mk-kit/dnd/sortable-list.ts","../../../projects/mk-kit/dnd/sortable-list.html","../../../projects/mk-kit/dnd/mk-kit-ui-dnd.ts"],"sourcesContent":["/**\n * Pure array helpers for applying an {@link MkDropEvent}. They mutate the passed\n * array(s) in place and also return the (target) array, mirroring the behaviour\n * of Angular CDK's `moveItemInArray` / `transferArrayItem`.\n */\n\nfunction clampIndex(index: number, max: number): number {\n return Math.max(0, Math.min(index, max));\n}\n\n/**\n * Move an item within a single array from `fromIndex` to `toIndex`.\n * Mutates and returns `array`.\n *\n * ```ts\n * mkMoveItemInArray(rows, e.previousIndex, e.currentIndex);\n * ```\n */\nexport function mkMoveItemInArray<T>(\n array: T[],\n fromIndex: number,\n toIndex: number,\n): T[] {\n if (array.length === 0) return array;\n const from = clampIndex(fromIndex, array.length - 1);\n const to = clampIndex(toIndex, array.length - 1);\n if (from === to) return array;\n const item = array[from];\n const delta = to < from ? -1 : 1;\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = item;\n return array;\n}\n\n/**\n * Move an item from one array (`from`) to another (`to`), removing it from\n * `from[fromIndex]` and inserting it at `to[toIndex]`. Mutates both arrays and\n * returns the target (`to`) array.\n *\n * ```ts\n * mkTransferArrayItem(todo, done, e.previousIndex, e.currentIndex);\n * ```\n */\nexport function mkTransferArrayItem<T>(\n from: T[],\n to: T[],\n fromIndex: number,\n toIndex: number,\n): T[] {\n if (from.length === 0) return to;\n const source = clampIndex(fromIndex, from.length - 1);\n const target = clampIndex(toIndex, to.length);\n const [item] = from.splice(source, 1);\n to.splice(target, 0, item);\n return to;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any -- lists hold heterogeneous\n item types; `any` here avoids generic-variance friction across the registry. */\nimport { Injectable } from '@angular/core';\nimport type { MkDropList } from './drop-list';\n\n/**\n * Central registry of every live `[mkDropList]` on the page, keyed by id.\n *\n * Connected lists (kanban \"buckets\") use it to resolve the sibling lists named\n * in `mkDropListConnectedTo`, and both pointer and keyboard dragging use it to\n * find the group of lists an item may travel between.\n *\n * Registration is automatic — you never call this service directly; it is\n * documented so tooling/tests can inspect the wiring.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkDragDropRegistry {\n private readonly lists = new Map<string, MkDropList<any>>();\n\n /** Register (or replace) the list published under `id`. */\n register(id: string, list: MkDropList<any>): void {\n this.lists.set(id, list);\n }\n\n /** Remove `list` from the registry if it is still the holder of `id`. */\n unregister(id: string, list: MkDropList<any>): void {\n if (this.lists.get(id) === list) this.lists.delete(id);\n }\n\n /** Look up a list by its `mkDropListId`. */\n get(id: string): MkDropList<any> | undefined {\n return this.lists.get(id);\n }\n\n /** All registered lists, in registration order. */\n all(): MkDropList<any>[] {\n return [...this.lists.values()];\n }\n\n /**\n * The ordered travel group for `list`: `list` itself plus every enabled list\n * it is `mkDropListConnectedTo`, in registration (roughly DOM) order. Used to\n * resolve \"adjacent\" lists for keyboard column-to-column movement and to\n * hit-test the pointer against candidate targets.\n */\n connectedGroup(list: MkDropList<any>): MkDropList<any>[] {\n const connected = list.connectedTo();\n return this.all().filter(\n (l) =>\n l === list || (connected.includes(l.id()) && !l.mkDropListDisabled()),\n );\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\n/** Elements that take keyboard focus natively (no `tabindex` needed). */\nconst NATIVELY_FOCUSABLE = /^(BUTTON|INPUT|SELECT|TEXTAREA)$/;\n\n/**\n * Optional grip that restricts where a pointer drag of the enclosing\n * `[mkDrag]` may begin. Place it on the element the user should press to drag;\n * without any handle the whole item is draggable.\n *\n * A directive (not a component), so it composes onto anything — a `<span>`,\n * a `<button>`, or another component's host such as `<mk-icon mkDragHandle />`.\n * Its look (grab cursor, muted colour, `touch-action: none`) ships as the\n * global `.mk-drag-handle` class in the theme stylesheet.\n *\n * **Decorative grip** — a non-focusable element (`<span>`, `<mk-icon>`): the\n * item itself stays the keyboard target (`role=\"button\"`, focusable), so the\n * grip should be `aria-hidden`:\n *\n * ```html\n * <div mkDrag [mkDragData]=\"row\">\n * <span mkDragHandle aria-hidden=\"true\">⠿</span>\n * {{ row.name }}\n * </div>\n * ```\n *\n * **Focusable grip** — a `<button>` (or any element with `tabindex`): the\n * handle becomes the keyboard target instead. The item is then a plain\n * container (no role, not focusable), so rows may hold inputs, links and\n * other buttons without nesting interactive controls, and `<li>` items keep\n * valid list semantics. Give it an accessible name:\n *\n * ```html\n * <li mkDrag [mkDragData]=\"row\">\n * <button type=\"button\" mkDragHandle [attr.aria-label]=\"'Reorder ' + row.name\">⠿</button>\n * <input mkInput [(ngModel)]=\"row.name\" />\n * </li>\n * ```\n */\n@Directive({\n selector: '[mkDragHandle]',\n exportAs: 'mkDragHandle',\n host: {\n class: 'mk-drag-handle',\n },\n})\nexport class MkDragHandle {\n /** The handle's host element. */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /**\n * Whether the handle can take keyboard focus itself — a native control\n * (`<button>`, …), a link with `href`, or any element with a `tabindex`.\n * A focusable handle carries the keyboard drag for its `[mkDrag]`.\n */\n isFocusable(): boolean {\n const el = this.element;\n return (\n NATIVELY_FOCUSABLE.test(el.tagName) ||\n (el.tagName === 'A' && el.hasAttribute('href')) ||\n el.hasAttribute('tabindex')\n );\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any -- cross-list references\n use `any` for the item type to avoid generic-variance friction. */\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport { MK_I18N, MkLiveAnnouncer } from '@mk-kit/ui/core';\nimport { MkDragDropRegistry } from './drag-drop-registry';\nimport { MkDragHandle } from './drag-handle';\nimport { MkDropList } from './drop-list';\nimport type { MkDropEvent } from './drag-drop.types';\n\n/** Pixels the pointer must travel before a press turns into a drag. */\nconst DRAG_THRESHOLD = 5;\n/**\n * Pixels a *touch* pointer may wander during the long-press delay before the\n * press is treated as a scroll and the pending drag is abandoned.\n */\nconst TOUCH_SLOP = 10;\n/** Settle animation duration for the pointer preview (ms). */\nconst SETTLE_MS = 180;\n\n/**\n * Makes an item inside a `[mkDropList]` draggable — by pointer (mouse / touch /\n * pen) **and** by keyboard (WCAG 2.1.1). Every move is announced via\n * {@link MkLiveAnnouncer}. Which element carries the keyboard interaction\n * depends on the handle:\n *\n * - **No handle, or a decorative one** (`<span mkDragHandle aria-hidden>`):\n * the item itself is focusable and exposes `aria-roledescription=\"Draggable\n * item\"` with `role=\"button\"` — or `role=\"option\"` when it is an `<li>` of a\n * `<ul mkDropList>`, which then becomes a labelled `listbox` (an `<li>` may\n * not take the `button` role).\n * - **A focusable handle** (`<button mkDragHandle aria-label=\"…\">`, or any\n * handle with `tabindex`): the handle is the keyboard target and receives\n * the `aria-roledescription` / `aria-pressed` / `aria-grabbed` state; the\n * item stays a plain container with no role and no `tabindex`, so it can hold\n * inputs, links and buttons of its own (no nested interactive controls) and\n * `<li>` items keep their list semantics.\n *\n * Keyboard: focus the item (or its handle) and press **Space/Enter** to pick\n * it up, **Arrow** keys to move it (crossing into connected lists at the ends /\n * across the perpendicular axis), **Space/Enter** to drop, **Escape** to cancel.\n *\n * Touch: a swipe scrolls the page as usual — the drag only arms after a\n * long-press ({@link mkDragTouchDelay}, default 300 ms). While armed the item\n * gets the `mk-drag--armed` class so consumers can style the lift moment.\n * Mouse and pen drags start immediately, as before.\n *\n * Performance: pointer moves are rAF-coalesced (one hit-test + one set of\n * style/DOM writes per frame) against list/item rects snapshotted when the\n * drag lifts, so a move never forces layout. The pending frame is flushed\n * synchronously on release so drops land exactly where the pointer ended.\n *\n * ```html\n * <div mkDrag [mkDragData]=\"row\" [mkDragDisabled]=\"row.locked\">\n * <span mkDragHandle aria-hidden=\"true\">⠿</span> {{ row.title }}\n * </div>\n * ```\n *\n * @typeParam T item data type.\n */\n@Component({\n selector: '[mkDrag]',\n exportAs: 'mkDrag',\n templateUrl: './drag.html',\n styleUrl: './drag.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'mk-drag',\n draggable: 'false',\n // Widget semantics live on the item only while no focusable handle takes\n // them over (see `keyboardHandle`); otherwise the item is a plain container.\n '[attr.role]': 'itemRole()',\n '[attr.aria-roledescription]': \"itemRole() ? 'Draggable item' : null\",\n '[attr.tabindex]': 'itemRole() ? (disabled() ? -1 : 0) : null',\n '[attr.aria-disabled]': 'itemRole() ? disabled() || null : null',\n '[attr.aria-pressed]': \"itemRole() === 'button' ? lifted() || null : null\",\n '[attr.aria-selected]': \"itemRole() === 'option' ? lifted() : null\",\n '[attr.aria-grabbed]': 'itemRole() ? dragging() || lifted() : null',\n '[class.mk-drag--disabled]': 'disabled()',\n '[class.mk-drag--dragging]': 'dragging()',\n '[class.mk-drag--lifted]': 'lifted()',\n '[class.mk-drag--armed]': 'armed()',\n '[class.mk-drag--has-handle]': 'ownHandles().length > 0',\n '[class.mk-drag--horizontal]': 'inHorizontalList()',\n '(pointerdown)': 'onPointerDown($event)',\n '(keydown)': 'onKeyDown($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class MkDrag<T = unknown> {\n private readonly doc = inject(DOCUMENT);\n private readonly registry = inject(MkDragDropRegistry);\n private readonly announcer = inject(MkLiveAnnouncer);\n private readonly i18n = inject(MK_I18N);\n private readonly home = inject(MkDropList, { optional: true }) as\n | MkDropList<any>\n | null;\n\n /** The item's host element. */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** Arbitrary payload associated with this item. */\n readonly mkDragData = input<T>();\n\n /** Disable dragging this specific item. */\n readonly mkDragDisabled = input(false, { transform: booleanAttribute });\n\n /**\n * Long-press delay (ms) before a *touch* pointer arms the drag. Until it\n * elapses a swipe scrolls natively; moving more than {@link TOUCH_SLOP}\n * pixels abandons the pending drag. `0` arms immediately (legacy behavior).\n * Mouse and pen are never delayed.\n */\n readonly mkDragTouchDelay = input(300, { transform: numberAttribute });\n\n /** Every handle in the projected subtree, including those of nested drags. */\n private readonly handles = contentChildren(MkDragHandle, { descendants: true });\n\n /**\n * Handles that belong to *this* drag — i.e. whose nearest `[mkDrag]` ancestor\n * is this item, not a nested one. A nested `[mkDropList]`/`[mkDrag]` (a\n * product list inside a draggable category, say) would otherwise have its\n * handles captured by the outer item via `descendants: true`, so pressing an\n * inner handle would start the outer drag and inner dnd would never work.\n */\n protected readonly ownHandles = computed(() =>\n this.handles().filter((h) => h.element.closest('[mkDrag]') === this.element),\n );\n\n /**\n * The handle that carries the keyboard drag — the first of this item's\n * handles that is focusable on its own (a `<button mkDragHandle>`, say).\n * `null` when the item itself is the keyboard target.\n */\n readonly keyboardHandle = computed<MkDragHandle | null>(\n () => this.ownHandles().find((h) => h.isFocusable()) ?? null,\n );\n\n /**\n * The role the item itself exposes: `null` when a focusable handle carries\n * the interaction; `option` inside a list that resolved to a `listbox`\n * (`<ul mkDropList>` / `<li mkDrag>`); `button` otherwise.\n */\n protected readonly itemRole = computed<'button' | 'option' | null>(() => {\n if (this.keyboardHandle()) return null;\n return this.home?.role() === 'listbox' ? 'option' : 'button';\n });\n\n /** The element keyboard events act on: the focusable handle, else the item. */\n private keyboardTarget(): HTMLElement {\n return this.keyboardHandle()?.element ?? this.element;\n }\n\n /** True while a pointer drag is in progress. */\n protected readonly dragging = signal(false);\n /** True while the item is \"picked up\" for keyboard movement. */\n protected readonly lifted = signal(false);\n /** True from the moment a touch long-press arms the drag until release. */\n protected readonly armed = signal(false);\n\n /** Whether the home list lays items out horizontally (scopes touch-action). */\n protected readonly inHorizontalList = computed(\n () => this.home?.mkDropListOrientation() === 'horizontal',\n );\n\n /** Effective disabled state (item- or list-level). */\n readonly disabled = computed(\n () => this.mkDragDisabled() || (this.home?.mkDropListDisabled() ?? false),\n );\n\n // --- shared drag session state (only one item is ever active at a time) ---\n private targetList: MkDropList<any> | null = null;\n private targetIndex = 0;\n private homeIndex = 0;\n private placeholder: HTMLElement | null = null;\n\n // --- pointer session state ---\n private pointerId: number | null = null;\n private started = false;\n private startX = 0;\n private startY = 0;\n private offsetX = 0;\n private offsetY = 0;\n private originLeft = 0;\n private originTop = 0;\n private preview: HTMLElement | null = null;\n\n constructor() {\n // Mirror the button state onto a focusable handle. Host bindings cannot\n // reach a projected element, so the attributes are written directly; the\n // effect re-runs whenever the handle or the lift/drag state changes.\n effect(() => {\n const handle = this.keyboardHandle();\n if (!handle) return;\n const el = handle.element;\n if (el.tagName !== 'BUTTON') el.setAttribute('role', 'button');\n el.setAttribute('aria-roledescription', 'Draggable item');\n el.setAttribute('aria-grabbed', String(this.dragging() || this.lifted()));\n this.toggleAttr(el, 'aria-pressed', this.lifted() ? 'true' : null);\n this.toggleAttr(el, 'aria-disabled', this.disabled() ? 'true' : null);\n });\n }\n\n private toggleAttr(el: HTMLElement, name: string, value: string | null): void {\n if (value === null) el.removeAttribute(name);\n else el.setAttribute(name, value);\n }\n private readonly moveHandler = (e: PointerEvent) => this.onPointerMove(e);\n private readonly upHandler = (e: PointerEvent) => this.onPointerUp(e);\n private readonly cancelHandler = () => this.finishPointer(true);\n\n // --- touch long-press state ---\n /** Gate for the move handler: mouse/pen arm on pointerdown, touch on timer. */\n private pointerArmed = false;\n private touchTimer: number | null = null;\n /** Inline `touch-action` to restore after a drag locked it (null = not locked). */\n private savedTouchAction: string | null = null;\n /**\n * `touch-action: pan-y` (see drag.scss) keeps native scrolling alive while\n * the long-press is pending, but that also means the browser may still start\n * a scroll once we *are* dragging — so the armed drag must eat `touchmove`.\n * Registered with `passive: false` for `preventDefault` to register.\n */\n private readonly touchMoveHandler = (e: TouchEvent) => {\n if (this.pointerArmed && e.cancelable) e.preventDefault();\n };\n /** Android fires `contextmenu` on long-press — keep it off the gesture. */\n private readonly contextMenuHandler = (e: Event) => e.preventDefault();\n\n // --- frame-coalesced move state (perf) ------------------------------\n //\n // Every `pointermove` used to force layout O(lists + items) times via\n // getBoundingClientRect. Instead, moves now only record the latest\n // coordinates and schedule ONE rAF (same pattern as the table's column\n // resize); the frame resolves list/index from rects snapshotted at lift\n // and does all style/DOM writes in one pass. The pending frame is flushed\n // synchronously on pointerup so drops land exactly where the pointer ended.\n\n /** Pending rAF id for the coalesced move pass, if any. */\n private moveRaf: number | null = null;\n private pendingX = 0;\n private pendingY = 0;\n private hasPendingMove = false;\n /** Connected lists resolved once at lift (stable for the drag's duration). */\n private cachedGroup: MkDropList<any>[] = [];\n /** List bounds snapshotted at lift / after invalidation. */\n private readonly listRects = new Map<MkDropList<any>, DOMRect>();\n /** Item bounds per list, aligned with `itemElementsExcept(this)`. */\n private readonly itemRects = new Map<MkDropList<any>, DOMRect[]>();\n /** Lists whose snapshots a placeholder move invalidated (re-measured next frame). */\n private readonly dirtyLists = new Set<MkDropList<any>>();\n /** Any scroll moves everything — re-snapshot every list on the next frame. */\n private scrollDirty = false;\n private readonly scrollHandler = () => {\n this.scrollDirty = true;\n };\n /** Last placeholder sync target — makes `syncPlaceholder` idempotent. */\n private lastSyncList: MkDropList<any> | null = null;\n private lastSyncIndex = -1;\n\n // ===================================================================\n // Pointer dragging\n // ===================================================================\n\n protected onPointerDown(event: Event): void {\n const e = event as PointerEvent;\n if (this.disabled() || !this.home || this.lifted()) return;\n if (e.button !== undefined && e.button !== 0) return;\n // Nested drags: a press inside a nested `[mkDrag]` belongs to that item.\n // Without this the event bubbles to the outer item, which would start a\n // second drag and steal the pointer capture from the inner one.\n if (!this.isOwnTarget(e.target)) return;\n if (this.ownHandles().length && !this.isHandleTarget(e.target)) return;\n\n this.pointerId = e.pointerId;\n this.started = false;\n this.startX = e.clientX;\n this.startY = e.clientY;\n\n const el = this.element;\n try {\n el.setPointerCapture(e.pointerId);\n } catch {\n // Pointer already lifted (fast tap) — nothing left to capture.\n }\n el.addEventListener('pointermove', this.moveHandler);\n el.addEventListener('pointerup', this.upHandler);\n el.addEventListener('pointercancel', this.cancelHandler);\n\n if (e.pointerType === 'touch') {\n el.addEventListener('touchmove', this.touchMoveHandler, { passive: false });\n el.addEventListener('contextmenu', this.contextMenuHandler);\n const delay = this.mkDragTouchDelay();\n if (delay > 0) {\n // Long-press lift: do NOT preventDefault and do NOT arm yet — until\n // the timer fires this press may just be the start of a scroll.\n this.touchTimer =\n this.doc.defaultView?.setTimeout(() => this.armTouch(), delay) ?? null;\n } else {\n // Legacy immediate mode.\n this.pointerArmed = true;\n this.lockTouchAction();\n }\n } else {\n // Mouse / pen: armed immediately, the 5px threshold does the rest.\n this.pointerArmed = true;\n }\n }\n\n private onPointerMove(e: PointerEvent): void {\n if (this.pointerId === null || e.pointerId !== this.pointerId) return;\n if (!this.pointerArmed) {\n // Long-press still pending: real movement means the user is scrolling —\n // abandon the pending drag and leave the gesture to the browser.\n if (Math.hypot(e.clientX - this.startX, e.clientY - this.startY) > TOUCH_SLOP) {\n this.finishPointer(true);\n }\n return;\n }\n if (!this.started) {\n if (Math.hypot(e.clientX - this.startX, e.clientY - this.startY) < DRAG_THRESHOLD) {\n return;\n }\n this.beginPointer();\n }\n e.preventDefault();\n // Only record the coordinates here — the heavy work (hit-testing,\n // placeholder sync, preview transform) is coalesced to one rAF.\n this.pendingX = e.clientX;\n this.pendingY = e.clientY;\n this.hasPendingMove = true;\n this.scheduleMoveFrame();\n }\n\n /** The long-press delay elapsed with the finger still down — lift. */\n private armTouch(): void {\n this.touchTimer = null;\n this.pointerArmed = true;\n this.armed.set(true);\n // `pan-y` would still let the browser start a vertical scroll mid-drag;\n // lock the element down for the rest of the gesture.\n this.lockTouchAction();\n }\n\n private lockTouchAction(): void {\n this.savedTouchAction = this.element.style.touchAction;\n this.element.style.touchAction = 'none';\n }\n\n private unlockTouchAction(): void {\n if (this.savedTouchAction === null) return;\n this.element.style.touchAction = this.savedTouchAction;\n this.savedTouchAction = null;\n }\n\n /** Undo everything the touch path set up (timer, listeners, lock, class). */\n private clearTouchState(): void {\n const el = this.element;\n el.removeEventListener('touchmove', this.touchMoveHandler);\n el.removeEventListener('contextmenu', this.contextMenuHandler);\n if (this.touchTimer !== null) {\n this.doc.defaultView?.clearTimeout(this.touchTimer);\n this.touchTimer = null;\n }\n this.pointerArmed = false;\n this.armed.set(false);\n this.unlockTouchAction();\n }\n\n private onPointerUp(e: PointerEvent): void {\n if (this.pointerId === null || e.pointerId !== this.pointerId) return;\n this.finishPointer(!this.started);\n }\n\n private beginPointer(): void {\n if (!this.home) return;\n this.started = true;\n this.dragging.set(true);\n this.homeIndex = this.home.indexOf(this);\n this.targetList = this.home;\n this.targetIndex = this.homeIndex;\n\n const rect = this.element.getBoundingClientRect();\n this.originLeft = rect.left;\n this.originTop = rect.top;\n this.offsetX = this.startX - rect.left;\n this.offsetY = this.startY - rect.top;\n\n this.createPlaceholder(rect);\n this.element.parentNode?.insertBefore(this.placeholder as Node, this.element);\n this.element.style.display = 'none';\n this.createPreview(rect);\n this.home.setReceiving(true);\n // The manual insert above already placed the placeholder at homeIndex.\n this.lastSyncList = this.home;\n this.lastSyncIndex = this.homeIndex;\n // One-time layout snapshot at lift; every move hits the cache instead of\n // forcing layout. Scrolling anywhere invalidates the whole snapshot.\n this.snapshotRects();\n this.doc.addEventListener('scroll', this.scrollHandler, {\n capture: true,\n passive: true,\n });\n }\n\n /** Coalesce move handling to at most one layout pass per animation frame. */\n private scheduleMoveFrame(): void {\n if (this.moveRaf !== null) return;\n const raf = this.doc.defaultView?.requestAnimationFrame(() => {\n this.moveRaf = null;\n this.applyPendingMove();\n });\n if (raf === undefined) this.applyPendingMove(); // no window — degrade to sync\n else this.moveRaf = raf;\n }\n\n /**\n * Cancel the scheduled frame; when `apply` is set, process the pending\n * coordinates synchronously (flush-on-end, like the table column resize) so\n * a drop lands exactly where the pointer stopped.\n */\n private flushMoveFrame(apply: boolean): void {\n if (this.moveRaf !== null) {\n this.doc.defaultView?.cancelAnimationFrame(this.moveRaf);\n this.moveRaf = null;\n }\n if (apply) this.applyPendingMove();\n this.hasPendingMove = false;\n }\n\n /**\n * The per-frame move pass. Ordered reads → writes: refresh invalidated\n * snapshots first, resolve the hovered list/index from the cache, then do\n * all style/DOM writes — no read ever follows a write within the frame.\n */\n private applyPendingMove(): void {\n if (!this.started || !this.hasPendingMove) return;\n this.hasPendingMove = false;\n // Reads: re-measure only what was invalidated since the last frame.\n if (this.scrollDirty) {\n this.scrollDirty = false;\n this.dirtyLists.clear();\n this.snapshotRects();\n } else if (this.dirtyLists.size) {\n for (const list of this.dirtyLists) this.measureList(list);\n this.dirtyLists.clear();\n }\n const x = this.pendingX;\n const y = this.pendingY;\n const list = this.listUnderPoint(x, y) ?? this.targetList;\n const index = list ? this.indexInList(list, x, y) : this.targetIndex;\n // Writes: follow the cursor, then settle the placeholder.\n if (this.preview) {\n const dx = x - this.offsetX - this.originLeft;\n const dy = y - this.offsetY - this.originTop;\n this.preview.style.transform = `translate3d(${dx}px, ${dy}px, 0)`;\n }\n if (!list) return;\n if (list !== this.targetList) {\n this.targetList?.setReceiving(false);\n this.targetList = list;\n list.setReceiving(true);\n }\n this.targetIndex = index;\n this.syncPlaceholder();\n }\n\n private finishPointer(cancel: boolean): void {\n if (this.pointerId !== null) {\n try {\n this.element.releasePointerCapture(this.pointerId);\n } catch {\n /* capture may already be gone */\n }\n }\n const el = this.element;\n el.removeEventListener('pointermove', this.moveHandler);\n el.removeEventListener('pointerup', this.upHandler);\n el.removeEventListener('pointercancel', this.cancelHandler);\n this.pointerId = null;\n this.clearTouchState();\n\n if (!this.started) return; // was a click, never a drag\n\n // Flush the last coalesced move (unless cancelling) so the drop target\n // reflects exactly where the pointer ended, not the last painted frame.\n this.flushMoveFrame(!cancel);\n\n const settle = () => this.commitPointer(cancel);\n if (cancel || this.prefersReducedMotion() || !this.preview) {\n settle();\n return;\n }\n // Animate the preview onto the placeholder, then commit.\n const dest = this.placeholder?.getBoundingClientRect();\n const preview = this.preview;\n if (dest) {\n const dx = dest.left - this.originLeft;\n const dy = dest.top - this.originTop;\n preview.style.transition = `transform ${SETTLE_MS}ms var(--mk-ease-emphasized)`;\n preview.style.transform = `translate3d(${dx}px, ${dy}px, 0)`;\n let done = false;\n const end = () => {\n if (done) return;\n done = true;\n settle();\n };\n preview.addEventListener('transitionend', end, { once: true });\n this.doc.defaultView?.setTimeout(end, SETTLE_MS + 40);\n } else {\n settle();\n }\n }\n\n private commitPointer(cancel: boolean): void {\n if (this.destroyed) return;\n const container = this.targetList;\n const previousContainer = this.home;\n const currentIndex = this.targetIndex;\n const previousIndex = this.homeIndex;\n\n this.cleanupDom();\n this.dragging.set(false);\n\n if (cancel || !container || !previousContainer) {\n this.announceCancelled('polite');\n return;\n }\n\n this.emit(previousContainer, container, previousIndex, currentIndex, true);\n this.announceDropped(currentIndex, 'polite');\n }\n\n // ===================================================================\n // Keyboard dragging (WCAG 2.1.1)\n // ===================================================================\n\n protected onKeyDown(event: Event): void {\n const e = event as KeyboardEvent;\n const key = e.key;\n // Keys act on the focused item (or its focusable handle) only — a nested\n // item's keydown bubbles up through outer items, which must not pick\n // themselves up, and keys typed into a row's inputs are not drag keys.\n if (e.target !== this.keyboardTarget()) return;\n\n if (!this.lifted()) {\n if ((key === ' ' || key === 'Enter') && !this.disabled() && this.home && !this.dragging()) {\n e.preventDefault();\n this.pickUp();\n }\n return;\n }\n\n // Picked up: capture the movement / drop / cancel keys.\n const horizontal = this.targetList?.mkDropListOrientation() === 'horizontal';\n switch (key) {\n case ' ':\n case 'Enter':\n e.preventDefault();\n this.dropKeyboard();\n break;\n case 'Escape':\n e.preventDefault();\n this.cancelKeyboard();\n break;\n case 'ArrowUp':\n e.preventDefault();\n horizontal ? this.stepList(-1) : this.stepPrimary(-1);\n break;\n case 'ArrowDown':\n e.preventDefault();\n horizontal ? this.stepList(1) : this.stepPrimary(1);\n break;\n case 'ArrowLeft':\n e.preventDefault();\n horizontal ? this.stepPrimary(-1) : this.stepList(-1);\n break;\n case 'ArrowRight':\n e.preventDefault();\n horizontal ? this.stepPrimary(1) : this.stepList(1);\n break;\n default:\n break;\n }\n }\n\n protected onFocusOut(event: Event): void {\n // Losing focus mid-lift cancels the keyboard drag to avoid a stuck state.\n // `focusout` bubbles, so only the keyboard target's own blur counts — a\n // nested control losing focus must not cancel the outer item's lift.\n if (event.target !== this.keyboardTarget()) return;\n if (this.lifted()) this.cancelKeyboard();\n }\n\n private pickUp(): void {\n if (!this.home) return;\n this.lifted.set(true);\n this.homeIndex = this.home.indexOf(this);\n this.targetList = this.home;\n this.targetIndex = this.homeIndex;\n\n const rect = this.element.getBoundingClientRect();\n this.createPlaceholder(rect);\n this.home.setReceiving(true);\n // Fresh placeholder — force the first sync through the idempotence guard.\n this.lastSyncList = null;\n this.lastSyncIndex = -1;\n this.syncPlaceholder();\n\n this.announcePickedUp(this.homeIndex, this.home.size());\n }\n\n private stepPrimary(step: 1 | -1): void {\n const list = this.targetList;\n if (!list) return;\n const max = this.maxIndex(list);\n let idx = this.targetIndex + step;\n if (idx < 0) {\n const prev = this.adjacentList(list, -1);\n if (prev) return this.moveToList(prev, this.maxIndex(prev), true);\n idx = 0;\n } else if (idx > max) {\n const next = this.adjacentList(list, 1);\n if (next) return this.moveToList(next, 0, true);\n idx = max;\n }\n if (idx === this.targetIndex) return;\n this.targetIndex = idx;\n this.syncPlaceholder();\n this.announceMove(false);\n }\n\n private stepList(step: 1 | -1): void {\n const list = this.targetList;\n if (!list) return;\n const adj = this.adjacentList(list, step);\n if (!adj) return;\n this.moveToList(adj, Math.min(this.targetIndex, this.maxIndex(adj)), true);\n }\n\n private moveToList(list: MkDropList<any>, index: number, crossed: boolean): void {\n this.targetList?.setReceiving(false);\n this.targetList = list;\n this.targetIndex = index;\n list.setReceiving(true);\n this.syncPlaceholder();\n this.announceMove(crossed);\n }\n\n private dropKeyboard(): void {\n const container = this.targetList;\n const previousContainer = this.home;\n const currentIndex = this.targetIndex;\n const previousIndex = this.homeIndex;\n\n this.cleanupDom();\n this.lifted.set(false);\n\n if (!container || !previousContainer) return;\n this.emit(previousContainer, container, previousIndex, currentIndex, false);\n this.announceDropped(currentIndex, 'assertive');\n }\n\n private cancelKeyboard(): void {\n this.cleanupDom();\n this.lifted.set(false);\n this.announceCancelled('assertive');\n }\n\n // ===================================================================\n // Screen-reader announcements\n //\n // All user-facing strings come from MK_I18N so consumers can localize them.\n // ===================================================================\n\n /** \"Picked up…\" instructions when a keyboard drag starts. */\n private announcePickedUp(index: number, total: number): void {\n this.announcer.announce(this.i18n.dndPickedUp(index + 1, total), 'assertive');\n }\n\n /** Position update after each keyboard step (names the list when crossing). */\n private announceMove(crossed: boolean): void {\n const list = this.targetList;\n if (!list) return;\n const total = list === this.home ? list.size() : list.size() + 1;\n this.announcer.announce(\n crossed\n ? this.i18n.dndMovedToList(list.label(), this.targetIndex + 1, total)\n : this.i18n.dndMoved(this.targetIndex + 1, total),\n 'assertive',\n );\n }\n\n /** Confirmation after a successful drop (pointer: polite; keyboard: assertive). */\n private announceDropped(index: number, politeness: 'polite' | 'assertive'): void {\n this.announcer.announce(this.i18n.dndDropped(index + 1), politeness);\n }\n\n /** The drag was cancelled and the item snapped back. */\n private announceCancelled(politeness: 'polite' | 'assertive'): void {\n this.announcer.announce(this.i18n.dndCancelled, politeness);\n }\n\n // ===================================================================\n // Shared helpers\n // ===================================================================\n\n /** Highest valid target index for `list` given the item is being removed. */\n private maxIndex(list: MkDropList<any>): number {\n return list === this.home ? Math.max(0, list.size() - 1) : list.size();\n }\n\n private adjacentList(list: MkDropList<any>, step: 1 | -1): MkDropList<any> | null {\n const group = this.registry.connectedGroup(list);\n const i = group.indexOf(list);\n const target = group[i + step];\n return target ?? null;\n }\n\n /** Snapshot every connected list's bounds + item bounds (at lift / scroll). */\n private snapshotRects(): void {\n this.cachedGroup = this.home ? this.registry.connectedGroup(this.home) : [];\n this.listRects.clear();\n this.itemRects.clear();\n for (const list of this.cachedGroup) this.measureList(list);\n }\n\n /** (Re)measure one list's bounds and item bounds into the cache. */\n private measureList(list: MkDropList<any>): void {\n this.listRects.set(list, list.element.getBoundingClientRect());\n this.itemRects.set(\n list,\n list.itemElementsExcept(this).map((el) => el.getBoundingClientRect()),\n );\n }\n\n /**\n * Which connected list (if any) the pointer is currently over. Pointer path\n * only — reads the rects snapshotted at lift, not live layout.\n */\n private listUnderPoint(x: number, y: number): MkDropList<any> | null {\n // Every candidate whose bounds contain the point. Lists nested inside the\n // dragged item itself are never targets (an item cannot be dropped into\n // its own descendants).\n const hits: MkDropList<any>[] = [];\n for (const list of this.cachedGroup) {\n if (list.element !== this.element && this.element.contains(list.element)) continue;\n const r = this.listRects.get(list) ?? list.element.getBoundingClientRect();\n if (x >= r.left && x <= r.right && y >= r.top && y <= r.bottom) hits.push(list);\n }\n if (hits.length <= 1) return hits[0] ?? null;\n // Nested lists: the innermost hit wins — the one that contains no other hit.\n return (\n hits.find((list) => !hits.some((other) => other !== list && list.element.contains(other.element))) ??\n hits[0]\n );\n }\n\n /**\n * Insertion index for the pointer position within `list`. Pointer path only\n * — reads the cached item rects (live measurement is the fallback for a\n * list that somehow joined the group mid-drag).\n */\n private indexInList(list: MkDropList<any>, x: number, y: number): number {\n const rects =\n this.itemRects.get(list) ??\n list.itemElementsExcept(this).map((el) => el.getBoundingClientRect());\n const horizontal = list.mkDropListOrientation() === 'horizontal';\n const pos = horizontal ? x : y;\n for (let i = 0; i < rects.length; i++) {\n const r = rects[i];\n const mid = horizontal ? r.left + r.width / 2 : r.top + r.height / 2;\n if (pos < mid) return i;\n }\n return rects.length;\n }\n\n private syncPlaceholder(): void {\n const list = this.targetList;\n const ph = this.placeholder;\n if (!list || !ph) return;\n // Idempotent: same list and index → the placeholder is already in place.\n if (list === this.lastSyncList && this.targetIndex === this.lastSyncIndex) {\n return;\n }\n const prevList = this.lastSyncList;\n this.lastSyncList = list;\n this.lastSyncIndex = this.targetIndex;\n const items = list.itemElementsExcept(this);\n ph.remove();\n if (this.targetIndex >= items.length) {\n if (items.length) items[items.length - 1].after(ph);\n else list.element.appendChild(ph);\n } else {\n items[this.targetIndex].before(ph);\n }\n // Moving the placeholder shifted the affected lists' layout — re-measure\n // just those lists on the next frame (no-op for the cache-less keyboard path).\n this.dirtyLists.add(list);\n if (prevList && prevList !== list) this.dirtyLists.add(prevList);\n }\n\n private createPlaceholder(rect: DOMRect): void {\n const ph = this.doc.createElement('div');\n ph.className = 'mk-drop-placeholder';\n ph.setAttribute('aria-hidden', 'true');\n const s = ph.style;\n s.boxSizing = 'border-box';\n s.width = `${rect.width}px`;\n s.height = `${rect.height}px`;\n s.border = 'var(--mk-border-width-strong) dashed var(--mk-primary)';\n s.borderRadius = 'var(--mk-radius-md)';\n s.background = 'color-mix(in srgb, var(--mk-primary) 8%, transparent)';\n this.placeholder = ph;\n }\n\n private createPreview(rect: DOMRect): void {\n const clone = this.element.cloneNode(true) as HTMLElement;\n clone.classList.add('mk-drag-preview');\n clone.removeAttribute('tabindex');\n clone.setAttribute('aria-hidden', 'true');\n const s = clone.style;\n s.display = '';\n s.position = 'fixed';\n s.margin = '0';\n s.left = `${rect.left}px`;\n s.top = `${rect.top}px`;\n s.width = `${rect.width}px`;\n s.height = `${rect.height}px`;\n s.pointerEvents = 'none';\n s.zIndex = 'var(--mk-z-tooltip)';\n s.boxShadow = 'var(--mk-shadow-lg)';\n s.borderRadius = 'var(--mk-radius-md)';\n s.transform = 'translate3d(0, 0, 0)';\n this.doc.body.appendChild(clone);\n this.preview = clone;\n }\n\n /** Remove the body-level preview + placeholder if destroyed mid-drag. */\n ngOnDestroy(): void {\n this.destroyed = true;\n if (this.pointerId !== null) {\n try {\n this.element.releasePointerCapture(this.pointerId);\n } catch {\n /* capture may already be gone */\n }\n this.pointerId = null;\n }\n this.clearTouchState();\n this.cleanupDom();\n }\n\n private destroyed = false;\n\n private cleanupDom(): void {\n this.flushMoveFrame(false); // drop any scheduled frame, never apply it\n this.doc.removeEventListener('scroll', this.scrollHandler, { capture: true });\n this.placeholder?.remove();\n this.placeholder = null;\n this.preview?.remove();\n this.preview = null;\n this.element.style.display = '';\n this.home?.setReceiving(false);\n this.targetList?.setReceiving(false);\n this.cachedGroup = [];\n this.listRects.clear();\n this.itemRects.clear();\n this.dirtyLists.clear();\n this.scrollDirty = false;\n this.lastSyncList = null;\n this.lastSyncIndex = -1;\n }\n\n private emit(\n previousContainer: MkDropList<any>,\n container: MkDropList<any>,\n previousIndex: number,\n currentIndex: number,\n isPointerEvent: boolean,\n ): void {\n const event: MkDropEvent<any> = {\n previousIndex,\n currentIndex,\n item: this as MkDrag<any>,\n previousContainer,\n container,\n isPointerEvent,\n };\n container.emitDrop(event);\n }\n\n private isHandleTarget(target: EventTarget | null): boolean {\n if (!(target instanceof Node)) return false;\n return this.ownHandles().some((h) => h.element.contains(target));\n }\n\n /** Whether `target` belongs to this item rather than to a nested `[mkDrag]`. */\n private isOwnTarget(target: EventTarget | null): boolean {\n if (!(target instanceof Element)) return target === this.element;\n return target.closest('[mkDrag]') === this.element;\n }\n\n private prefersReducedMotion(): boolean {\n return (\n this.doc.defaultView?.matchMedia('(prefers-reduced-motion: reduce)')\n .matches ?? false\n );\n }\n}\n","<ng-content />\n","/* eslint-disable @typescript-eslint/no-explicit-any -- item-type params use\n `any` to accept drags of any data type without generic-variance friction. */\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { mkUniqueId } from '@mk-kit/ui/core';\nimport { MkDragDropRegistry } from './drag-drop-registry';\nimport { MkDrag } from './drag';\nimport type { MkDropEvent, MkDropListOrientation } from './drag-drop.types';\n\n/**\n * Roles on which `aria-orientation` is permitted (WAI-ARIA 1.2). On any other\n * role the attribute is invalid, so the list only exposes it for these.\n */\nconst ORIENTATION_ROLES = new Set([\n 'listbox',\n 'menu',\n 'radiogroup',\n 'scrollbar',\n 'select',\n 'separator',\n 'slider',\n 'tablist',\n 'toolbar',\n 'tree',\n 'treegrid',\n]);\n\n/**\n * A drop container for reorderable `[mkDrag]` items.\n *\n * - **Sort list:** a single `[mkDropList]` over an array — items reorder within it.\n * - **Buckets / kanban:** several `[mkDropList]`s wired together with\n * `mkDropListConnectedTo` so items transfer between them (both by pointer and\n * by keyboard at the ends of a list).\n *\n * The array bound to `mkDropListData` is **not** mutated for you — handle\n * `mkDropListDropped` and call {@link mkMoveItemInArray} / {@link mkTransferArrayItem}.\n *\n * Semantics follow the host element and its items, so the tree is always\n * valid ARIA:\n *\n * - any host other than `<ul>`/`<ol>` is a `role=\"group\"` (named by\n * `mkDropListLabel`) of `role=\"button\"` items;\n * - a `<ul>`/`<ol>` whose `<li mkDrag>` items all carry a *focusable*\n * `[mkDragHandle]` stays a plain list — the handles are the controls;\n * - a `<ul>`/`<ol>` whose items are themselves the keyboard targets becomes a\n * `listbox` of `option`s (an `<li>` may not be a `button`); give it a\n * `mkDropListLabel`, listboxes need a name.\n *\n * A `role` you set in the template is kept, and `aria-orientation` is only\n * exposed on roles that allow it (`listbox`, `toolbar`, `tree`, …) — the\n * keyboard model handles both axes regardless.\n *\n * ```html\n * <div mkDropList [mkDropListData]=\"todo()\" mkDropListLabel=\"To do\"\n * mkDropListId=\"todo\" [mkDropListConnectedTo]=\"['done']\"\n * (mkDropListDropped)=\"drop($event)\">\n * @for (t of todo(); track t.id) {\n * <div mkDrag [mkDragData]=\"t\">{{ t.title }}</div>\n * }\n * </div>\n * ```\n *\n * @typeParam T item data type.\n */\n@Component({\n selector: '[mkDropList]',\n exportAs: 'mkDropList',\n templateUrl: './drop-list.html',\n styleUrl: './drop-list.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'mk-drop-list',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-labelledby]': 'mkDropListLabelledBy() || null',\n '[attr.aria-orientation]': 'orientationAllowed() ? mkDropListOrientation() : null',\n '[attr.aria-disabled]': 'mkDropListDisabled() || null',\n '[class.mk-drop-list--horizontal]': \"mkDropListOrientation() === 'horizontal'\",\n '[class.mk-drop-list--disabled]': 'mkDropListDisabled()',\n '[class.mk-drop-list--receiving]': '_receiving()',\n },\n})\nexport class MkDropList<T = unknown> {\n private readonly registry = inject(MkDragDropRegistry);\n\n /** The list's host element (drop target bounds). */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** The array backing the list. Bound, never mutated by the directive. */\n readonly mkDropListData = input<readonly T[]>([]);\n\n /** Stable id used to connect lists. Auto-generated when omitted. */\n readonly mkDropListId = input<string>();\n\n /** Ids of other lists items may be transferred into. */\n readonly mkDropListConnectedTo = input<readonly string[]>([]);\n\n /**\n * Human-readable name used in screen-reader announcements when an item is\n * moved into this list (e.g. `\"In progress\"`). Falls back to the list `id`\n * — which may be auto-generated gibberish — so set it wherever users can\n * move items across lists by keyboard.\n */\n readonly mkDropListLabel = input<string>('');\n\n /**\n * Id of the element that names the list (`aria-labelledby`), e.g. a\n * visible heading. Takes precedence over `mkDropListLabel` as the\n * accessible name; the label is still used in announcements.\n */\n readonly mkDropListLabelledBy = input<string>('');\n\n /** Layout axis; controls pointer hit-testing and arrow-key direction. */\n readonly mkDropListOrientation = input<MkDropListOrientation>('vertical');\n\n /** Disable dropping into (and dragging out of) this list. */\n readonly mkDropListDisabled = input(false, { transform: booleanAttribute });\n\n /** Fires when an item is dropped into this list (pointer or keyboard). */\n readonly mkDropListDropped = output<MkDropEvent<T>>();\n\n /** Resolved id (input or generated). */\n readonly id = computed(() => this.mkDropListId() ?? this.autoId);\n private readonly autoId = mkUniqueId('mk-drop-list');\n\n /** Announceable name: the label when set, otherwise the resolved id. */\n readonly label = computed(() => this.mkDropListLabel() || this.id());\n\n /** A `role` written in the template — always kept. */\n private readonly explicitRole = this.element.getAttribute('role');\n private readonly isNativeList = /^(UL|OL)$/.test(this.element.tagName);\n\n /**\n * The role the host exposes. One set in the template wins. A `<ul>`/`<ol>`\n * keeps its implicit `list` role (`null` — nothing is written) while every\n * item hands the keyboard drag to a focusable handle, and becomes a\n * `listbox` (its items `option`s) otherwise. Any other element is a `group`.\n */\n readonly role = computed<string | null>(() => {\n if (this.explicitRole) return this.explicitRole;\n if (!this.isNativeList) return 'group';\n return this.drags().every((d) => d.keyboardHandle()) ? null : 'listbox';\n });\n\n /** Whether `aria-orientation` is valid on the effective role. */\n protected readonly orientationAllowed = computed(() =>\n ORIENTATION_ROLES.has(this.role() ?? ''),\n );\n\n /** A static `aria-label` written in the template, kept when no label input is set. */\n private readonly staticAriaLabel = this.element.getAttribute('aria-label');\n\n /**\n * Accessible name of the list: `mkDropListLabel`, else the template's own.\n * Omitted while `mkDropListLabelledBy` names the list, so the referenced\n * element is the single source of the name.\n */\n protected readonly ariaLabel = computed(() =>\n this.mkDropListLabelledBy()\n ? null\n : this.mkDropListLabel() || this.staticAriaLabel || null,\n );\n\n /** Connected-list ids, normalised to a plain array. */\n readonly connectedTo = computed<readonly string[]>(\n () => this.mkDropListConnectedTo() ?? [],\n );\n\n /** The `mkDrag` items projected into this list, in DOM order. */\n private readonly drags = contentChildren(MkDrag);\n\n /** Highlight while a drag is hovering this list. */\n protected readonly _receiving = signal(false);\n\n constructor() {\n effect((onCleanup) => {\n const id = this.id();\n this.registry.register(id, this);\n onCleanup(() => this.registry.unregister(id, this));\n });\n }\n\n /** Number of drag items currently in the list. */\n size(): number {\n return this.drags().length;\n }\n\n /** Index of `drag` among this list's items, or -1. */\n indexOf(drag: MkDrag<any>): number {\n return this.drags().indexOf(drag);\n }\n\n /** Host elements of this list's items, excluding `exclude`, in DOM order. */\n itemElementsExcept(exclude: MkDrag<any>): HTMLElement[] {\n return this.drags()\n .filter((d) => d !== exclude)\n .map((d) => d.element);\n }\n\n /** Toggle the \"receiving\" highlight (called by the active drag). */\n setReceiving(value: boolean): void {\n this._receiving.set(value);\n }\n\n /** Emit a drop into this list. Called by the active `MkDrag`. */\n emitDrop(event: MkDropEvent<any>): void {\n this.mkDropListDropped.emit(event as MkDropEvent<T>);\n }\n}\n","<ng-content />\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport { MK_I18N } from '@mk-kit/ui/core';\nimport { MkDrag } from './drag';\nimport { mkMoveItemInArray } from './drag-drop-utils';\nimport { MkDropList } from './drop-list';\nimport type { MkDropEvent, MkDropListOrientation } from './drag-drop.types';\n\n/**\n * Thin convenience wrapper over a single `[mkDropList]` for the common\n * \"reorderable list\" case. Bind `items` two-way and provide an `<ng-template>`\n * to render each row; drops are applied to the model for you (via\n * {@link mkMoveItemInArray}).\n *\n * For connected buckets / kanban, use `[mkDropList]` + `[mkDrag]` directly.\n *\n * The list renders as a named `group` of `button` items: pass `label` (or\n * `labelledBy` pointing at a visible heading) so screen readers say what is\n * being reordered — the i18n `sortableListLabel` (\"Sortable list\") is the\n * fallback.\n *\n * ```html\n * <mk-sortable-list [(items)]=\"rows\" label=\"Steps\">\n * <ng-template let-row let-i=\"index\">\n * <span mkDragHandle aria-hidden=\"true\">⠿</span> {{ i + 1 }}. {{ row.name }}\n * </ng-template>\n * </mk-sortable-list>\n * ```\n *\n * @typeParam T item data type.\n */\n@Component({\n selector: 'mk-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MkDropList, MkDrag, NgTemplateOutlet],\n})\nexport class MkSortableList<T = unknown> {\n private readonly i18n = inject(MK_I18N);\n\n /** The ordered items (two-way). Reordered in place on drop. */\n readonly items = model<T[]>([]);\n\n /**\n * Accessible name of the list (`aria-label`), also used in the\n * \"moved into …\" announcements. Defaults to the i18n `sortableListLabel`.\n */\n readonly label = input<string>();\n\n /**\n * Id of an element that names the list (`aria-labelledby`), e.g. a visible\n * heading. Wins over `label` as the accessible name.\n */\n readonly labelledBy = input<string>();\n\n /** Layout axis of the list. */\n readonly orientation = input<MkDropListOrientation>('vertical');\n\n /** Disable reordering. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** `@for` tracking function. Defaults to identity (track by item). */\n readonly trackBy = input<(index: number, item: T) => unknown>(\n (_, item) => item,\n );\n\n /** Emitted after the model has been reordered. */\n readonly sorted = output<MkDropEvent<T>>();\n\n /** The row template projected as `<ng-template>`. */\n protected readonly itemTemplate = contentChild.required(TemplateRef);\n\n /** `label`, else the i18n default. */\n protected readonly resolvedLabel = computed(\n () => this.label() || this.i18n.sortableListLabel,\n );\n\n protected onDrop(event: MkDropEvent<T>): void {\n const next = [...this.items()];\n mkMoveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.sorted.emit(event);\n }\n}\n","<div\n mkDropList\n class=\"mk-sortable-list__list\"\n [mkDropListData]=\"items()\"\n [mkDropListLabel]=\"resolvedLabel()\"\n [mkDropListLabelledBy]=\"labelledBy() ?? ''\"\n [mkDropListOrientation]=\"orientation()\"\n [mkDropListDisabled]=\"disabled()\"\n (mkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div mkDrag class=\"mk-sortable-list__item\" [mkDragData]=\"item\">\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\"\n />\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;AAIG;AAEH,SAAS,UAAU,CAAC,KAAa,EAAE,GAAW,EAAA;AAC5C,IAAA,OAAO,IAAI,CAAC,GAAG,CAA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,CAAA,mSAAA,CAAA,EAAA;0vBAmCS,WAAW,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElFrE;;AAEG;;;;"}
1
+ {"version":3,"file":"mk-kit-ui-dnd.mjs","sources":["../../../projects/mk-kit/dnd/drag-drop-utils.ts","../../../projects/mk-kit/dnd/drag-drop-registry.ts","../../../projects/mk-kit/dnd/drag-handle.ts","../../../projects/mk-kit/dnd/drag.ts","../../../projects/mk-kit/dnd/drag.html","../../../projects/mk-kit/dnd/drop-list.ts","../../../projects/mk-kit/dnd/drop-list.html","../../../projects/mk-kit/dnd/drop-zone.ts","../../../projects/mk-kit/dnd/sortable-list.ts","../../../projects/mk-kit/dnd/sortable-list.html","../../../projects/mk-kit/dnd/mk-kit-ui-dnd.ts"],"sourcesContent":["/**\n * Pure array helpers for applying an {@link MkDropEvent}. They mutate the passed\n * array(s) in place and also return the (target) array, mirroring the behaviour\n * of Angular CDK's `moveItemInArray` / `transferArrayItem`.\n */\n\nfunction clampIndex(index: number, max: number): number {\n return Math.max(0, Math.min(index, max));\n}\n\n/**\n * Move an item within a single array from `fromIndex` to `toIndex`.\n * Mutates and returns `array`.\n *\n * ```ts\n * mkMoveItemInArray(rows, e.previousIndex, e.currentIndex);\n * ```\n */\nexport function mkMoveItemInArray<T>(\n array: T[],\n fromIndex: number,\n toIndex: number,\n): T[] {\n if (array.length === 0) return array;\n const from = clampIndex(fromIndex, array.length - 1);\n const to = clampIndex(toIndex, array.length - 1);\n if (from === to) return array;\n const item = array[from];\n const delta = to < from ? -1 : 1;\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = item;\n return array;\n}\n\n/**\n * Move an item from one array (`from`) to another (`to`), removing it from\n * `from[fromIndex]` and inserting it at `to[toIndex]`. Mutates both arrays and\n * returns the target (`to`) array.\n *\n * ```ts\n * mkTransferArrayItem(todo, done, e.previousIndex, e.currentIndex);\n * ```\n */\nexport function mkTransferArrayItem<T>(\n from: T[],\n to: T[],\n fromIndex: number,\n toIndex: number,\n): T[] {\n if (from.length === 0) return to;\n const source = clampIndex(fromIndex, from.length - 1);\n const target = clampIndex(toIndex, to.length);\n const [item] = from.splice(source, 1);\n to.splice(target, 0, item);\n return to;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any -- lists hold heterogeneous\n item types; `any` here avoids generic-variance friction across the registry. */\nimport { Injectable } from '@angular/core';\nimport type { MkDropList } from './drop-list';\nimport type { MkDropZone } from './drop-zone';\n\n/** A keyboard-reachable drop target: a connected list or a connected zone. */\nexport type MkDropTarget = MkDropList<any> | MkDropZone<any>;\n\n/**\n * Central registry of every live `[mkDropList]` on the page, keyed by id.\n *\n * Connected lists (kanban \"buckets\") use it to resolve the sibling lists named\n * in `mkDropListConnectedTo`, and both pointer and keyboard dragging use it to\n * find the group of lists an item may travel between.\n *\n * Registration is automatic — you never call this service directly; it is\n * documented so tooling/tests can inspect the wiring.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkDragDropRegistry {\n private readonly lists = new Map<string, MkDropList<any>>();\n private readonly zones = new Map<string, MkDropZone<any>>();\n\n /** Register (or replace) the list published under `id`. */\n register(id: string, list: MkDropList<any>): void {\n this.lists.set(id, list);\n }\n\n /** Remove `list` from the registry if it is still the holder of `id`. */\n unregister(id: string, list: MkDropList<any>): void {\n if (this.lists.get(id) === list) this.lists.delete(id);\n }\n\n /** Look up a list by its `mkDropListId`. */\n get(id: string): MkDropList<any> | undefined {\n return this.lists.get(id);\n }\n\n /** All registered lists, in registration order. */\n all(): MkDropList<any>[] {\n return [...this.lists.values()];\n }\n\n /**\n * The ordered travel group for `list`: `list` itself plus every enabled list\n * it is `mkDropListConnectedTo`, in registration (roughly DOM) order. Used to\n * resolve \"adjacent\" lists for keyboard column-to-column movement and to\n * hit-test the pointer against candidate targets.\n */\n connectedGroup(list: MkDropList<any>): MkDropList<any>[] {\n const connected = list.connectedTo();\n return this.all().filter(\n (l) =>\n l === list || (connected.includes(l.id()) && !l.mkDropListDisabled()),\n );\n }\n\n /** Register (or replace) the zone published under `id`. */\n registerZone(id: string, zone: MkDropZone<any>): void {\n this.zones.set(id, zone);\n }\n\n /** Remove `zone` from the registry if it is still the holder of `id`. */\n unregisterZone(id: string, zone: MkDropZone<any>): void {\n if (this.zones.get(id) === zone) this.zones.delete(id);\n }\n\n /** Look up a zone by its `mkDropZoneId`. */\n getZone(id: string): MkDropZone<any> | undefined {\n return this.zones.get(id);\n }\n\n /** Every enabled zone named in `list`'s `mkDropListConnectedTo`, in registration order. */\n connectedZones(list: MkDropList<any>): MkDropZone<any>[] {\n const connected = list.connectedTo();\n return [...this.zones.values()].filter(\n (z) => connected.includes(z.id()) && !z.mkDropZoneDisabled(),\n );\n }\n\n /**\n * The keyboard travel group for `list`: its connected lists **and** zones,\n * in document order, so arrow keys walk targets the way they appear on\n * screen regardless of when each registered.\n */\n travelGroup(list: MkDropList<any>): MkDropTarget[] {\n const targets: MkDropTarget[] = [...this.connectedGroup(list), ...this.connectedZones(list)];\n return targets.sort((a, b) => {\n if (a.element === b.element) return 0;\n const pos = a.element.compareDocumentPosition(b.element);\n return pos & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n });\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\n/** Elements that take keyboard focus natively (no `tabindex` needed). */\nconst NATIVELY_FOCUSABLE = /^(BUTTON|INPUT|SELECT|TEXTAREA)$/;\n\n/**\n * Optional grip that restricts where a pointer drag of the enclosing\n * `[mkDrag]` may begin. Place it on the element the user should press to drag;\n * without any handle the whole item is draggable.\n *\n * A directive (not a component), so it composes onto anything — a `<span>`,\n * a `<button>`, or another component's host such as `<mk-icon mkDragHandle />`.\n * Its look (grab cursor, muted colour, `touch-action: none`) ships as the\n * global `.mk-drag-handle` class in the theme stylesheet.\n *\n * **Decorative grip** — a non-focusable element (`<span>`, `<mk-icon>`): the\n * item itself stays the keyboard target (`role=\"button\"`, focusable), so the\n * grip should be `aria-hidden`:\n *\n * ```html\n * <div mkDrag [mkDragData]=\"row\">\n * <span mkDragHandle aria-hidden=\"true\">⠿</span>\n * {{ row.name }}\n * </div>\n * ```\n *\n * **Focusable grip** — a `<button>` (or any element with `tabindex`): the\n * handle becomes the keyboard target instead. The item is then a plain\n * container (no role, not focusable), so rows may hold inputs, links and\n * other buttons without nesting interactive controls, and `<li>` items keep\n * valid list semantics. Give it an accessible name:\n *\n * ```html\n * <li mkDrag [mkDragData]=\"row\">\n * <button type=\"button\" mkDragHandle [attr.aria-label]=\"'Reorder ' + row.name\">⠿</button>\n * <input mkInput [(ngModel)]=\"row.name\" />\n * </li>\n * ```\n */\n@Directive({\n selector: '[mkDragHandle]',\n exportAs: 'mkDragHandle',\n host: {\n class: 'mk-drag-handle',\n },\n})\nexport class MkDragHandle {\n /** The handle's host element. */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /**\n * Whether the handle can take keyboard focus itself — a native control\n * (`<button>`, …), a link with `href`, or any element with a `tabindex`.\n * A focusable handle carries the keyboard drag for its `[mkDrag]`.\n */\n isFocusable(): boolean {\n const el = this.element;\n return (\n NATIVELY_FOCUSABLE.test(el.tagName) ||\n (el.tagName === 'A' && el.hasAttribute('href')) ||\n el.hasAttribute('tabindex')\n );\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any -- cross-list references\n use `any` for the item type to avoid generic-variance friction. */\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport { MK_I18N, MkLiveAnnouncer } from '@mk-kit/ui/core';\nimport { MkDragDropRegistry, type MkDropTarget } from './drag-drop-registry';\nimport { MkDragHandle } from './drag-handle';\nimport { MkDropList } from './drop-list';\nimport type { MkDropZone } from './drop-zone';\nimport type { MkDropEvent, MkDropZoneEvent, MkDropZoneHover } from './drag-drop.types';\n\n/** Pixels the pointer must travel before a press turns into a drag. */\nconst DRAG_THRESHOLD = 5;\n/**\n * Pixels a *touch* pointer may wander during the long-press delay before the\n * press is treated as a scroll and the pending drag is abandoned.\n */\nconst TOUCH_SLOP = 10;\n/** Settle animation duration for the pointer preview (ms). */\nconst SETTLE_MS = 180;\n\n/**\n * Makes an item inside a `[mkDropList]` draggable — by pointer (mouse / touch /\n * pen) **and** by keyboard (WCAG 2.1.1). Every move is announced via\n * {@link MkLiveAnnouncer}. Which element carries the keyboard interaction\n * depends on the handle:\n *\n * - **No handle, or a decorative one** (`<span mkDragHandle aria-hidden>`):\n * the item itself is focusable and exposes `aria-roledescription=\"Draggable\n * item\"` with `role=\"button\"` — or `role=\"option\"` when it is an `<li>` of a\n * `<ul mkDropList>`, which then becomes a labelled `listbox` (an `<li>` may\n * not take the `button` role).\n * - **A focusable handle** (`<button mkDragHandle aria-label=\"…\">`, or any\n * handle with `tabindex`): the handle is the keyboard target and receives\n * the `aria-roledescription` / `aria-pressed` / `aria-grabbed` state; the\n * item stays a plain container with no role and no `tabindex`, so it can hold\n * inputs, links and buttons of its own (no nested interactive controls) and\n * `<li>` items keep their list semantics.\n *\n * Keyboard: focus the item (or its handle) and press **Space/Enter** to pick\n * it up, **Arrow** keys to move it (crossing into connected lists at the ends /\n * across the perpendicular axis), **Space/Enter** to drop, **Escape** to cancel.\n *\n * Besides lists, an item can be released on a connected `[mkDropZone]` — a\n * target that reports *where* it was dropped instead of an index (a timeline,\n * a priority band, a \"focus on this\" pane). Zones sit in the same keyboard\n * travel group as lists, in document order; while an item hovers a zone no\n * placeholder is shown and the zone streams `mkDropZoneMoved` events.\n *\n * Touch: a swipe scrolls the page as usual — the drag only arms after a\n * long-press ({@link mkDragTouchDelay}, default 300 ms). While armed the item\n * gets the `mk-drag--armed` class so consumers can style the lift moment.\n * Mouse and pen drags start immediately, as before.\n *\n * Performance: pointer moves are rAF-coalesced (one hit-test + one set of\n * style/DOM writes per frame) against list/item rects snapshotted when the\n * drag lifts, so a move never forces layout. The pending frame is flushed\n * synchronously on release so drops land exactly where the pointer ended.\n *\n * ```html\n * <div mkDrag [mkDragData]=\"row\" [mkDragDisabled]=\"row.locked\">\n * <span mkDragHandle aria-hidden=\"true\">⠿</span> {{ row.title }}\n * </div>\n * ```\n *\n * @typeParam T item data type.\n */\n@Component({\n selector: '[mkDrag]',\n exportAs: 'mkDrag',\n templateUrl: './drag.html',\n styleUrl: './drag.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'mk-drag',\n draggable: 'false',\n // Widget semantics live on the item only while no focusable handle takes\n // them over (see `keyboardHandle`); otherwise the item is a plain container.\n '[attr.role]': 'itemRole()',\n '[attr.aria-roledescription]': \"itemRole() ? 'Draggable item' : null\",\n '[attr.tabindex]': 'itemRole() ? (disabled() ? -1 : 0) : null',\n '[attr.aria-disabled]': 'itemRole() ? disabled() || null : null',\n '[attr.aria-pressed]': \"itemRole() === 'button' ? lifted() || null : null\",\n '[attr.aria-selected]': \"itemRole() === 'option' ? lifted() : null\",\n '[attr.aria-grabbed]': 'itemRole() ? dragging() || lifted() : null',\n '[class.mk-drag--disabled]': 'disabled()',\n '[class.mk-drag--dragging]': 'dragging()',\n '[class.mk-drag--lifted]': 'lifted()',\n '[class.mk-drag--armed]': 'armed()',\n '[class.mk-drag--has-handle]': 'ownHandles().length > 0',\n '[class.mk-drag--horizontal]': 'inHorizontalList()',\n '(pointerdown)': 'onPointerDown($event)',\n '(keydown)': 'onKeyDown($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class MkDrag<T = unknown> {\n private readonly doc = inject(DOCUMENT);\n private readonly registry = inject(MkDragDropRegistry);\n private readonly announcer = inject(MkLiveAnnouncer);\n private readonly i18n = inject(MK_I18N);\n private readonly home = inject(MkDropList, { optional: true }) as\n | MkDropList<any>\n | null;\n\n /** The item's host element. */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** Arbitrary payload associated with this item. */\n readonly mkDragData = input<T>();\n\n /** Disable dragging this specific item. */\n readonly mkDragDisabled = input(false, { transform: booleanAttribute });\n\n /**\n * Long-press delay (ms) before a *touch* pointer arms the drag. Until it\n * elapses a swipe scrolls natively; moving more than {@link TOUCH_SLOP}\n * pixels abandons the pending drag. `0` arms immediately (legacy behavior).\n * Mouse and pen are never delayed.\n */\n readonly mkDragTouchDelay = input(300, { transform: numberAttribute });\n\n /** Every handle in the projected subtree, including those of nested drags. */\n private readonly handles = contentChildren(MkDragHandle, { descendants: true });\n\n /**\n * Handles that belong to *this* drag — i.e. whose nearest `[mkDrag]` ancestor\n * is this item, not a nested one. A nested `[mkDropList]`/`[mkDrag]` (a\n * product list inside a draggable category, say) would otherwise have its\n * handles captured by the outer item via `descendants: true`, so pressing an\n * inner handle would start the outer drag and inner dnd would never work.\n */\n protected readonly ownHandles = computed(() =>\n this.handles().filter((h) => h.element.closest('[mkDrag]') === this.element),\n );\n\n /**\n * The handle that carries the keyboard drag — the first of this item's\n * handles that is focusable on its own (a `<button mkDragHandle>`, say).\n * `null` when the item itself is the keyboard target.\n */\n readonly keyboardHandle = computed<MkDragHandle | null>(\n () => this.ownHandles().find((h) => h.isFocusable()) ?? null,\n );\n\n /**\n * The role the item itself exposes: `null` when a focusable handle carries\n * the interaction; `option` inside a list that resolved to a `listbox`\n * (`<ul mkDropList>` / `<li mkDrag>`); `button` otherwise.\n */\n protected readonly itemRole = computed<'button' | 'option' | null>(() => {\n if (this.keyboardHandle()) return null;\n return this.home?.role() === 'listbox' ? 'option' : 'button';\n });\n\n /** The element keyboard events act on: the focusable handle, else the item. */\n private keyboardTarget(): HTMLElement {\n return this.keyboardHandle()?.element ?? this.element;\n }\n\n /** True while a pointer drag is in progress. */\n protected readonly dragging = signal(false);\n /** True while the item is \"picked up\" for keyboard movement. */\n protected readonly lifted = signal(false);\n /** True from the moment a touch long-press arms the drag until release. */\n protected readonly armed = signal(false);\n\n /** Whether the home list lays items out horizontally (scopes touch-action). */\n protected readonly inHorizontalList = computed(\n () => this.home?.mkDropListOrientation() === 'horizontal',\n );\n\n /** Effective disabled state (item- or list-level). */\n readonly disabled = computed(\n () => this.mkDragDisabled() || (this.home?.mkDropListDisabled() ?? false),\n );\n\n // --- shared drag session state (only one item is ever active at a time) ---\n private targetList: MkDropList<any> | null = null;\n private targetIndex = 0;\n private homeIndex = 0;\n private placeholder: HTMLElement | null = null;\n /** The zone the item hovers (pointer) or sits on (keyboard); `null` while a list is the target. */\n private targetZone: MkDropZone<any> | null = null;\n\n // --- pointer session state ---\n private pointerId: number | null = null;\n private started = false;\n private startX = 0;\n private startY = 0;\n private offsetX = 0;\n private offsetY = 0;\n private originLeft = 0;\n private originTop = 0;\n private preview: HTMLElement | null = null;\n\n constructor() {\n // Mirror the button state onto a focusable handle. Host bindings cannot\n // reach a projected element, so the attributes are written directly; the\n // effect re-runs whenever the handle or the lift/drag state changes.\n effect(() => {\n const handle = this.keyboardHandle();\n if (!handle) return;\n const el = handle.element;\n if (el.tagName !== 'BUTTON') el.setAttribute('role', 'button');\n el.setAttribute('aria-roledescription', 'Draggable item');\n el.setAttribute('aria-grabbed', String(this.dragging() || this.lifted()));\n this.toggleAttr(el, 'aria-pressed', this.lifted() ? 'true' : null);\n this.toggleAttr(el, 'aria-disabled', this.disabled() ? 'true' : null);\n });\n }\n\n private toggleAttr(el: HTMLElement, name: string, value: string | null): void {\n if (value === null) el.removeAttribute(name);\n else el.setAttribute(name, value);\n }\n private readonly moveHandler = (e: PointerEvent) => this.onPointerMove(e);\n private readonly upHandler = (e: PointerEvent) => this.onPointerUp(e);\n private readonly cancelHandler = () => this.finishPointer(true);\n\n // --- touch long-press state ---\n /** Gate for the move handler: mouse/pen arm on pointerdown, touch on timer. */\n private pointerArmed = false;\n private touchTimer: number | null = null;\n /** Inline `touch-action` to restore after a drag locked it (null = not locked). */\n private savedTouchAction: string | null = null;\n /**\n * `touch-action: pan-y` (see drag.scss) keeps native scrolling alive while\n * the long-press is pending, but that also means the browser may still start\n * a scroll once we *are* dragging — so the armed drag must eat `touchmove`.\n * Registered with `passive: false` for `preventDefault` to register.\n */\n private readonly touchMoveHandler = (e: TouchEvent) => {\n if (this.pointerArmed && e.cancelable) e.preventDefault();\n };\n /** Android fires `contextmenu` on long-press — keep it off the gesture. */\n private readonly contextMenuHandler = (e: Event) => e.preventDefault();\n\n // --- frame-coalesced move state (perf) ------------------------------\n //\n // Every `pointermove` used to force layout O(lists + items) times via\n // getBoundingClientRect. Instead, moves now only record the latest\n // coordinates and schedule ONE rAF (same pattern as the table's column\n // resize); the frame resolves list/index from rects snapshotted at lift\n // and does all style/DOM writes in one pass. The pending frame is flushed\n // synchronously on pointerup so drops land exactly where the pointer ended.\n\n /** Pending rAF id for the coalesced move pass, if any. */\n private moveRaf: number | null = null;\n private pendingX = 0;\n private pendingY = 0;\n private hasPendingMove = false;\n /** Connected lists resolved once at lift (stable for the drag's duration). */\n private cachedGroup: MkDropList<any>[] = [];\n /** List bounds snapshotted at lift / after invalidation. */\n private readonly listRects = new Map<MkDropList<any>, DOMRect>();\n /** Connected zones resolved once at lift, and their bounds. */\n private cachedZones: MkDropZone<any>[] = [];\n private readonly zoneRects = new Map<MkDropZone<any>, DOMRect>();\n /** Last pointer position a frame applied — the drop position on a zone. */\n private lastX = 0;\n private lastY = 0;\n /** Item bounds per list, aligned with `itemElementsExcept(this)`. */\n private readonly itemRects = new Map<MkDropList<any>, DOMRect[]>();\n /** Lists whose snapshots a placeholder move invalidated (re-measured next frame). */\n private readonly dirtyLists = new Set<MkDropList<any>>();\n /** Any scroll moves everything — re-snapshot every list on the next frame. */\n private scrollDirty = false;\n private readonly scrollHandler = () => {\n this.scrollDirty = true;\n };\n /** Last placeholder sync target — makes `syncPlaceholder` idempotent. */\n private lastSyncList: MkDropList<any> | null = null;\n private lastSyncIndex = -1;\n\n // ===================================================================\n // Pointer dragging\n // ===================================================================\n\n protected onPointerDown(event: Event): void {\n const e = event as PointerEvent;\n if (this.disabled() || !this.home || this.lifted()) return;\n if (e.button !== undefined && e.button !== 0) return;\n // Nested drags: a press inside a nested `[mkDrag]` belongs to that item.\n // Without this the event bubbles to the outer item, which would start a\n // second drag and steal the pointer capture from the inner one.\n if (!this.isOwnTarget(e.target)) return;\n if (this.ownHandles().length && !this.isHandleTarget(e.target)) return;\n\n this.pointerId = e.pointerId;\n this.started = false;\n this.startX = e.clientX;\n this.startY = e.clientY;\n\n const el = this.element;\n try {\n el.setPointerCapture(e.pointerId);\n } catch {\n // Pointer already lifted (fast tap) — nothing left to capture.\n }\n el.addEventListener('pointermove', this.moveHandler);\n el.addEventListener('pointerup', this.upHandler);\n el.addEventListener('pointercancel', this.cancelHandler);\n\n if (e.pointerType === 'touch') {\n el.addEventListener('touchmove', this.touchMoveHandler, { passive: false });\n el.addEventListener('contextmenu', this.contextMenuHandler);\n const delay = this.mkDragTouchDelay();\n if (delay > 0) {\n // Long-press lift: do NOT preventDefault and do NOT arm yet — until\n // the timer fires this press may just be the start of a scroll.\n this.touchTimer =\n this.doc.defaultView?.setTimeout(() => this.armTouch(), delay) ?? null;\n } else {\n // Legacy immediate mode.\n this.pointerArmed = true;\n this.lockTouchAction();\n }\n } else {\n // Mouse / pen: armed immediately, the 5px threshold does the rest.\n this.pointerArmed = true;\n }\n }\n\n private onPointerMove(e: PointerEvent): void {\n if (this.pointerId === null || e.pointerId !== this.pointerId) return;\n if (!this.pointerArmed) {\n // Long-press still pending: real movement means the user is scrolling —\n // abandon the pending drag and leave the gesture to the browser.\n if (Math.hypot(e.clientX - this.startX, e.clientY - this.startY) > TOUCH_SLOP) {\n this.finishPointer(true);\n }\n return;\n }\n if (!this.started) {\n if (Math.hypot(e.clientX - this.startX, e.clientY - this.startY) < DRAG_THRESHOLD) {\n return;\n }\n this.beginPointer();\n }\n e.preventDefault();\n // Only record the coordinates here — the heavy work (hit-testing,\n // placeholder sync, preview transform) is coalesced to one rAF.\n this.pendingX = e.clientX;\n this.pendingY = e.clientY;\n this.hasPendingMove = true;\n this.scheduleMoveFrame();\n }\n\n /** The long-press delay elapsed with the finger still down — lift. */\n private armTouch(): void {\n this.touchTimer = null;\n this.pointerArmed = true;\n this.armed.set(true);\n // `pan-y` would still let the browser start a vertical scroll mid-drag;\n // lock the element down for the rest of the gesture.\n this.lockTouchAction();\n }\n\n private lockTouchAction(): void {\n this.savedTouchAction = this.element.style.touchAction;\n this.element.style.touchAction = 'none';\n }\n\n private unlockTouchAction(): void {\n if (this.savedTouchAction === null) return;\n this.element.style.touchAction = this.savedTouchAction;\n this.savedTouchAction = null;\n }\n\n /** Undo everything the touch path set up (timer, listeners, lock, class). */\n private clearTouchState(): void {\n const el = this.element;\n el.removeEventListener('touchmove', this.touchMoveHandler);\n el.removeEventListener('contextmenu', this.contextMenuHandler);\n if (this.touchTimer !== null) {\n this.doc.defaultView?.clearTimeout(this.touchTimer);\n this.touchTimer = null;\n }\n this.pointerArmed = false;\n this.armed.set(false);\n this.unlockTouchAction();\n }\n\n private onPointerUp(e: PointerEvent): void {\n if (this.pointerId === null || e.pointerId !== this.pointerId) return;\n this.finishPointer(!this.started);\n }\n\n private beginPointer(): void {\n if (!this.home) return;\n this.started = true;\n this.dragging.set(true);\n this.homeIndex = this.home.indexOf(this);\n this.targetList = this.home;\n this.targetIndex = this.homeIndex;\n\n const rect = this.element.getBoundingClientRect();\n this.originLeft = rect.left;\n this.originTop = rect.top;\n this.offsetX = this.startX - rect.left;\n this.offsetY = this.startY - rect.top;\n\n this.createPlaceholder(rect);\n this.element.parentNode?.insertBefore(this.placeholder as Node, this.element);\n this.element.style.display = 'none';\n this.createPreview(rect);\n this.home.setReceiving(true);\n // The manual insert above already placed the placeholder at homeIndex.\n this.lastSyncList = this.home;\n this.lastSyncIndex = this.homeIndex;\n // One-time layout snapshot at lift; every move hits the cache instead of\n // forcing layout. Scrolling anywhere invalidates the whole snapshot.\n this.snapshotRects();\n this.doc.addEventListener('scroll', this.scrollHandler, {\n capture: true,\n passive: true,\n });\n }\n\n /** Coalesce move handling to at most one layout pass per animation frame. */\n private scheduleMoveFrame(): void {\n if (this.moveRaf !== null) return;\n const raf = this.doc.defaultView?.requestAnimationFrame(() => {\n this.moveRaf = null;\n this.applyPendingMove();\n });\n if (raf === undefined) this.applyPendingMove(); // no window — degrade to sync\n else this.moveRaf = raf;\n }\n\n /**\n * Cancel the scheduled frame; when `apply` is set, process the pending\n * coordinates synchronously (flush-on-end, like the table column resize) so\n * a drop lands exactly where the pointer stopped.\n */\n private flushMoveFrame(apply: boolean): void {\n if (this.moveRaf !== null) {\n this.doc.defaultView?.cancelAnimationFrame(this.moveRaf);\n this.moveRaf = null;\n }\n if (apply) this.applyPendingMove();\n this.hasPendingMove = false;\n }\n\n /**\n * The per-frame move pass. Ordered reads → writes: refresh invalidated\n * snapshots first, resolve the hovered list/index from the cache, then do\n * all style/DOM writes — no read ever follows a write within the frame.\n */\n private applyPendingMove(): void {\n if (!this.started || !this.hasPendingMove) return;\n this.hasPendingMove = false;\n // Reads: re-measure only what was invalidated since the last frame.\n if (this.scrollDirty) {\n this.scrollDirty = false;\n this.dirtyLists.clear();\n this.snapshotRects();\n } else if (this.dirtyLists.size) {\n for (const list of this.dirtyLists) this.measureList(list);\n this.dirtyLists.clear();\n }\n const x = this.pendingX;\n const y = this.pendingY;\n this.lastX = x;\n this.lastY = y;\n const hit = this.targetUnderPoint(x, y);\n // Writes: follow the cursor, then settle the placeholder.\n if (this.preview) {\n const dx = x - this.offsetX - this.originLeft;\n const dy = y - this.offsetY - this.originTop;\n this.preview.style.transform = `translate3d(${dx}px, ${dy}px, 0)`;\n }\n if (hit && !(hit instanceof MkDropList)) {\n this.hoverZone(hit, x, y);\n return;\n }\n // Over nothing: the last target keeps the item (a zone included).\n if (!hit && this.targetZone) return;\n const list = hit ?? this.targetList;\n if (!list) return;\n const index = this.indexInList(list, x, y);\n const wasOnZone = this.targetZone !== null;\n if (wasOnZone) this.leaveZone();\n if (list !== this.targetList || wasOnZone) {\n this.targetList?.setReceiving(false);\n this.targetList = list;\n list.setReceiving(true);\n }\n this.targetIndex = index;\n this.syncPlaceholder();\n }\n\n /** Pointer entered / moved over `zone`: no placeholder, the zone gets the position. */\n private hoverZone(zone: MkDropZone<any>, x: number, y: number): void {\n const hover = this.zoneHover(zone, x, y, true);\n if (zone === this.targetZone) {\n zone.emitMoved(hover);\n return;\n }\n this.leaveZone();\n this.targetList?.setReceiving(false);\n this.detachPlaceholder();\n this.targetZone = zone;\n zone.setReceiving(true);\n zone.emitEntered(hover);\n }\n\n /** Leave the current zone, if any (the zone is told, so it can clear its preview). */\n private leaveZone(): void {\n const zone = this.targetZone;\n if (!zone) return;\n this.targetZone = null;\n zone.setReceiving(false);\n zone.emitLeft(this as MkDrag<any>);\n }\n\n /**\n * Take the placeholder out of the lists while the item is over a zone. The\n * next `syncPlaceholder` re-inserts it (the idempotence guard is reset), and\n * the list it left is re-measured because its layout just changed.\n */\n private detachPlaceholder(): void {\n const ph = this.placeholder;\n if (!ph) return;\n const prev = this.lastSyncList;\n ph.remove();\n this.lastSyncList = null;\n this.lastSyncIndex = -1;\n if (prev) this.dirtyLists.add(prev);\n }\n\n /** Position of the item over `zone` — cached bounds on the pointer path, live otherwise. */\n private zoneHover(\n zone: MkDropZone<any>,\n x: number,\n y: number,\n isPointerEvent: boolean,\n ): MkDropZoneHover<any, any> {\n const r = this.zoneRects.get(zone) ?? zone.element.getBoundingClientRect();\n const clamp = (v: number) => Math.min(1, Math.max(0, v));\n return {\n item: this as MkDrag<any>,\n zone,\n x,\n y,\n offsetX: x - r.left,\n offsetY: y - r.top,\n fractionX: r.width ? clamp((x - r.left) / r.width) : 0,\n fractionY: r.height ? clamp((y - r.top) / r.height) : 0,\n isPointerEvent,\n };\n }\n\n private zoneEvent(\n zone: MkDropZone<any>,\n x: number,\n y: number,\n isPointerEvent: boolean,\n previousContainer: MkDropList<any>,\n previousIndex: number,\n ): MkDropZoneEvent<any, any> {\n return { ...this.zoneHover(zone, x, y, isPointerEvent), previousContainer, previousIndex };\n }\n\n private finishPointer(cancel: boolean): void {\n if (this.pointerId !== null) {\n try {\n this.element.releasePointerCapture(this.pointerId);\n } catch {\n /* capture may already be gone */\n }\n }\n const el = this.element;\n el.removeEventListener('pointermove', this.moveHandler);\n el.removeEventListener('pointerup', this.upHandler);\n el.removeEventListener('pointercancel', this.cancelHandler);\n this.pointerId = null;\n this.clearTouchState();\n\n if (!this.started) return; // was a click, never a drag\n\n // Flush the last coalesced move (unless cancelling) so the drop target\n // reflects exactly where the pointer ended, not the last painted frame.\n this.flushMoveFrame(!cancel);\n\n const settle = () => this.commitPointer(cancel);\n // A zone has no placeholder to settle onto — commit straight away.\n if (cancel || this.targetZone || this.prefersReducedMotion() || !this.preview) {\n settle();\n return;\n }\n // Animate the preview onto the placeholder, then commit.\n const dest = this.placeholder?.getBoundingClientRect();\n const preview = this.preview;\n if (dest) {\n const dx = dest.left - this.originLeft;\n const dy = dest.top - this.originTop;\n preview.style.transition = `transform ${SETTLE_MS}ms var(--mk-ease-emphasized)`;\n preview.style.transform = `translate3d(${dx}px, ${dy}px, 0)`;\n let done = false;\n const end = () => {\n if (done) return;\n done = true;\n settle();\n };\n preview.addEventListener('transitionend', end, { once: true });\n this.doc.defaultView?.setTimeout(end, SETTLE_MS + 40);\n } else {\n settle();\n }\n }\n\n private commitPointer(cancel: boolean): void {\n if (this.destroyed) return;\n const zone = this.targetZone;\n const container = this.targetList;\n const previousContainer = this.home;\n const currentIndex = this.targetIndex;\n const previousIndex = this.homeIndex;\n\n if (!cancel && zone && previousContainer) {\n // Build the event before cleanup clears the cached bounds; detach the\n // zone first so cleanup does not report a \"left\".\n const event = this.zoneEvent(zone, this.lastX, this.lastY, true, previousContainer, previousIndex);\n this.targetZone = null;\n zone.setReceiving(false);\n this.cleanupDom();\n this.dragging.set(false);\n zone.emitDrop(event);\n this.announceDroppedInZone(zone, 'polite');\n return;\n }\n\n this.cleanupDom();\n this.dragging.set(false);\n\n if (cancel || !container || !previousContainer) {\n this.announceCancelled('polite');\n return;\n }\n\n this.emit(previousContainer, container, previousIndex, currentIndex, true);\n this.announceDropped(currentIndex, 'polite');\n }\n\n // ===================================================================\n // Keyboard dragging (WCAG 2.1.1)\n // ===================================================================\n\n protected onKeyDown(event: Event): void {\n const e = event as KeyboardEvent;\n const key = e.key;\n // Keys act on the focused item (or its focusable handle) only — a nested\n // item's keydown bubbles up through outer items, which must not pick\n // themselves up, and keys typed into a row's inputs are not drag keys.\n if (e.target !== this.keyboardTarget()) return;\n\n if (!this.lifted()) {\n if ((key === ' ' || key === 'Enter') && !this.disabled() && this.home && !this.dragging()) {\n e.preventDefault();\n this.pickUp();\n }\n return;\n }\n\n // Picked up: capture the movement / drop / cancel keys.\n // On a zone there is no position to step through — every arrow walks the\n // travel group (previous / next target), Space/Enter drops at the centre.\n const onZone = this.targetZone !== null;\n const horizontal = this.targetList?.mkDropListOrientation() === 'horizontal';\n switch (key) {\n case ' ':\n case 'Enter':\n e.preventDefault();\n this.dropKeyboard();\n break;\n case 'Escape':\n e.preventDefault();\n this.cancelKeyboard();\n break;\n case 'ArrowUp':\n e.preventDefault();\n onZone || horizontal ? this.stepTarget(-1) : this.stepPrimary(-1);\n break;\n case 'ArrowDown':\n e.preventDefault();\n onZone || horizontal ? this.stepTarget(1) : this.stepPrimary(1);\n break;\n case 'ArrowLeft':\n e.preventDefault();\n onZone || !horizontal ? this.stepTarget(-1) : this.stepPrimary(-1);\n break;\n case 'ArrowRight':\n e.preventDefault();\n onZone || !horizontal ? this.stepTarget(1) : this.stepPrimary(1);\n break;\n default:\n break;\n }\n }\n\n protected onFocusOut(event: Event): void {\n // Losing focus mid-lift cancels the keyboard drag to avoid a stuck state.\n // `focusout` bubbles, so only the keyboard target's own blur counts — a\n // nested control losing focus must not cancel the outer item's lift.\n if (event.target !== this.keyboardTarget()) return;\n if (this.lifted()) this.cancelKeyboard();\n }\n\n private pickUp(): void {\n if (!this.home) return;\n this.lifted.set(true);\n this.homeIndex = this.home.indexOf(this);\n this.targetList = this.home;\n this.targetIndex = this.homeIndex;\n\n const rect = this.element.getBoundingClientRect();\n this.createPlaceholder(rect);\n this.home.setReceiving(true);\n // Fresh placeholder — force the first sync through the idempotence guard.\n this.lastSyncList = null;\n this.lastSyncIndex = -1;\n this.syncPlaceholder();\n\n this.announcePickedUp(this.homeIndex, this.home.size());\n }\n\n private stepPrimary(step: 1 | -1): void {\n const list = this.targetList;\n if (!list) return;\n const max = this.maxIndex(list);\n let idx = this.targetIndex + step;\n if (idx < 0) {\n const prev = this.adjacentList(list, -1);\n if (prev) return this.moveToList(prev, this.maxIndex(prev), true);\n idx = 0;\n } else if (idx > max) {\n const next = this.adjacentList(list, 1);\n if (next) return this.moveToList(next, 0, true);\n idx = max;\n }\n if (idx === this.targetIndex) return;\n this.targetIndex = idx;\n this.syncPlaceholder();\n this.announceMove(false);\n }\n\n /**\n * Cross to the previous / next target on the perpendicular axis: connected\n * lists **and** zones, in document order (see `MkDragDropRegistry.travelGroup`).\n */\n private stepTarget(step: 1 | -1): void {\n const current: MkDropTarget | null = this.targetZone ?? this.targetList;\n if (!current || !this.home) return;\n const group = this.registry.travelGroup(this.home);\n const i = group.indexOf(current);\n if (i < 0) return;\n const next = group[i + step];\n if (!next) return;\n if (next instanceof MkDropList) {\n const wasOnZone = this.targetZone !== null;\n this.leaveZone();\n this.moveToList(next, Math.min(this.targetIndex, this.maxIndex(next)), true, wasOnZone);\n } else {\n this.moveToZone(next);\n }\n }\n\n private moveToZone(zone: MkDropZone<any>): void {\n this.leaveZone();\n this.targetList?.setReceiving(false);\n this.detachPlaceholder();\n this.targetZone = zone;\n zone.setReceiving(true);\n const r = zone.element.getBoundingClientRect();\n zone.emitEntered(this.zoneHover(zone, r.left + r.width / 2, r.top + r.height / 2, false));\n this.announcer.announce(this.i18n.dndMovedToZone(zone.label()), 'assertive');\n }\n\n private moveToList(list: MkDropList<any>, index: number, crossed: boolean, fromZone = false): void {\n this.targetList?.setReceiving(false);\n this.targetList = list;\n this.targetIndex = index;\n list.setReceiving(true);\n this.syncPlaceholder();\n // Coming back from a zone into the same list still crossed a target.\n this.announceMove(crossed || fromZone);\n }\n\n private dropKeyboard(): void {\n const zone = this.targetZone;\n const container = this.targetList;\n const previousContainer = this.home;\n const currentIndex = this.targetIndex;\n const previousIndex = this.homeIndex;\n\n if (zone && previousContainer) {\n const r = zone.element.getBoundingClientRect();\n const event = this.zoneEvent(\n zone,\n r.left + r.width / 2,\n r.top + r.height / 2,\n false,\n previousContainer,\n previousIndex,\n );\n this.targetZone = null;\n zone.setReceiving(false);\n this.cleanupDom();\n this.lifted.set(false);\n zone.emitDrop(event);\n this.announceDroppedInZone(zone, 'assertive');\n return;\n }\n\n this.cleanupDom();\n this.lifted.set(false);\n\n if (!container || !previousContainer) return;\n this.emit(previousContainer, container, previousIndex, currentIndex, false);\n this.announceDropped(currentIndex, 'assertive');\n }\n\n private cancelKeyboard(): void {\n this.cleanupDom();\n this.lifted.set(false);\n this.announceCancelled('assertive');\n }\n\n // ===================================================================\n // Screen-reader announcements\n //\n // All user-facing strings come from MK_I18N so consumers can localize them.\n // ===================================================================\n\n /** \"Picked up…\" instructions when a keyboard drag starts. */\n private announcePickedUp(index: number, total: number): void {\n this.announcer.announce(this.i18n.dndPickedUp(index + 1, total), 'assertive');\n }\n\n /** Position update after each keyboard step (names the list when crossing). */\n private announceMove(crossed: boolean): void {\n const list = this.targetList;\n if (!list) return;\n const total = list === this.home ? list.size() : list.size() + 1;\n this.announcer.announce(\n crossed\n ? this.i18n.dndMovedToList(list.label(), this.targetIndex + 1, total)\n : this.i18n.dndMoved(this.targetIndex + 1, total),\n 'assertive',\n );\n }\n\n /** Confirmation after a successful drop (pointer: polite; keyboard: assertive). */\n private announceDropped(index: number, politeness: 'polite' | 'assertive'): void {\n this.announcer.announce(this.i18n.dndDropped(index + 1), politeness);\n }\n\n /** Confirmation after a drop on a zone. */\n private announceDroppedInZone(zone: MkDropZone<any>, politeness: 'polite' | 'assertive'): void {\n this.announcer.announce(this.i18n.dndDroppedInZone(zone.label()), politeness);\n }\n\n /** The drag was cancelled and the item snapped back. */\n private announceCancelled(politeness: 'polite' | 'assertive'): void {\n this.announcer.announce(this.i18n.dndCancelled, politeness);\n }\n\n // ===================================================================\n // Shared helpers\n // ===================================================================\n\n /** Highest valid target index for `list` given the item is being removed. */\n private maxIndex(list: MkDropList<any>): number {\n return list === this.home ? Math.max(0, list.size() - 1) : list.size();\n }\n\n private adjacentList(list: MkDropList<any>, step: 1 | -1): MkDropList<any> | null {\n const group = this.registry.connectedGroup(list);\n const i = group.indexOf(list);\n const target = group[i + step];\n return target ?? null;\n }\n\n /** Snapshot every connected list's bounds + item bounds (at lift / scroll). */\n private snapshotRects(): void {\n this.cachedGroup = this.home ? this.registry.connectedGroup(this.home) : [];\n this.cachedZones = this.home ? this.registry.connectedZones(this.home) : [];\n this.listRects.clear();\n this.itemRects.clear();\n this.zoneRects.clear();\n for (const list of this.cachedGroup) this.measureList(list);\n for (const zone of this.cachedZones) {\n this.zoneRects.set(zone, zone.element.getBoundingClientRect());\n }\n }\n\n /** (Re)measure one list's bounds and item bounds into the cache. */\n private measureList(list: MkDropList<any>): void {\n this.listRects.set(list, list.element.getBoundingClientRect());\n this.itemRects.set(\n list,\n list.itemElementsExcept(this).map((el) => el.getBoundingClientRect()),\n );\n }\n\n /**\n * Which connected list or zone (if any) the pointer is currently over.\n * Pointer path only — reads the rects snapshotted at lift, not live layout.\n */\n private targetUnderPoint(x: number, y: number): MkDropTarget | null {\n // Every candidate whose bounds contain the point. Targets nested inside the\n // dragged item itself are never hit (an item cannot be dropped into its\n // own descendants).\n const hits: MkDropTarget[] = [];\n const inside = (r: DOMRect) => x >= r.left && x <= r.right && y >= r.top && y <= r.bottom;\n for (const list of this.cachedGroup) {\n if (list.element !== this.element && this.element.contains(list.element)) continue;\n if (inside(this.listRects.get(list) ?? list.element.getBoundingClientRect())) hits.push(list);\n }\n for (const zone of this.cachedZones) {\n if (this.element.contains(zone.element)) continue;\n if (inside(this.zoneRects.get(zone) ?? zone.element.getBoundingClientRect())) hits.push(zone);\n }\n if (hits.length <= 1) return hits[0] ?? null;\n // Nested targets: the innermost hit wins — the one that contains no other hit.\n return (\n hits.find((t) => !hits.some((other) => other !== t && t.element.contains(other.element))) ??\n hits[0]\n );\n }\n\n /**\n * Insertion index for the pointer position within `list`. Pointer path only\n * — reads the cached item rects (live measurement is the fallback for a\n * list that somehow joined the group mid-drag).\n */\n private indexInList(list: MkDropList<any>, x: number, y: number): number {\n const rects =\n this.itemRects.get(list) ??\n list.itemElementsExcept(this).map((el) => el.getBoundingClientRect());\n const horizontal = list.mkDropListOrientation() === 'horizontal';\n const pos = horizontal ? x : y;\n for (let i = 0; i < rects.length; i++) {\n const r = rects[i];\n const mid = horizontal ? r.left + r.width / 2 : r.top + r.height / 2;\n if (pos < mid) return i;\n }\n return rects.length;\n }\n\n private syncPlaceholder(): void {\n const list = this.targetList;\n const ph = this.placeholder;\n if (!list || !ph) return;\n // Idempotent: same list and index → the placeholder is already in place.\n if (list === this.lastSyncList && this.targetIndex === this.lastSyncIndex) {\n return;\n }\n const prevList = this.lastSyncList;\n this.lastSyncList = list;\n this.lastSyncIndex = this.targetIndex;\n const items = list.itemElementsExcept(this);\n ph.remove();\n if (this.targetIndex >= items.length) {\n if (items.length) items[items.length - 1].after(ph);\n else list.element.appendChild(ph);\n } else {\n items[this.targetIndex].before(ph);\n }\n // Moving the placeholder shifted the affected lists' layout — re-measure\n // just those lists on the next frame (no-op for the cache-less keyboard path).\n this.dirtyLists.add(list);\n if (prevList && prevList !== list) this.dirtyLists.add(prevList);\n }\n\n private createPlaceholder(rect: DOMRect): void {\n const ph = this.doc.createElement('div');\n ph.className = 'mk-drop-placeholder';\n ph.setAttribute('aria-hidden', 'true');\n const s = ph.style;\n s.boxSizing = 'border-box';\n s.width = `${rect.width}px`;\n s.height = `${rect.height}px`;\n s.border = 'var(--mk-border-width-strong) dashed var(--mk-primary)';\n s.borderRadius = 'var(--mk-radius-md)';\n s.background = 'color-mix(in srgb, var(--mk-primary) 8%, transparent)';\n this.placeholder = ph;\n }\n\n private createPreview(rect: DOMRect): void {\n const clone = this.element.cloneNode(true) as HTMLElement;\n clone.classList.add('mk-drag-preview');\n clone.removeAttribute('tabindex');\n clone.setAttribute('aria-hidden', 'true');\n const s = clone.style;\n s.display = '';\n s.position = 'fixed';\n s.margin = '0';\n s.left = `${rect.left}px`;\n s.top = `${rect.top}px`;\n s.width = `${rect.width}px`;\n s.height = `${rect.height}px`;\n s.pointerEvents = 'none';\n s.zIndex = 'var(--mk-z-tooltip)';\n s.boxShadow = 'var(--mk-shadow-lg)';\n s.borderRadius = 'var(--mk-radius-md)';\n s.transform = 'translate3d(0, 0, 0)';\n this.doc.body.appendChild(clone);\n this.preview = clone;\n }\n\n /** Remove the body-level preview + placeholder if destroyed mid-drag. */\n ngOnDestroy(): void {\n this.destroyed = true;\n if (this.pointerId !== null) {\n try {\n this.element.releasePointerCapture(this.pointerId);\n } catch {\n /* capture may already be gone */\n }\n this.pointerId = null;\n }\n this.clearTouchState();\n this.cleanupDom();\n }\n\n private destroyed = false;\n\n private cleanupDom(): void {\n this.flushMoveFrame(false); // drop any scheduled frame, never apply it\n this.doc.removeEventListener('scroll', this.scrollHandler, { capture: true });\n this.placeholder?.remove();\n this.placeholder = null;\n this.preview?.remove();\n this.preview = null;\n this.element.style.display = '';\n this.home?.setReceiving(false);\n this.targetList?.setReceiving(false);\n this.leaveZone();\n this.cachedGroup = [];\n this.cachedZones = [];\n this.listRects.clear();\n this.itemRects.clear();\n this.zoneRects.clear();\n this.dirtyLists.clear();\n this.scrollDirty = false;\n this.lastSyncList = null;\n this.lastSyncIndex = -1;\n }\n\n private emit(\n previousContainer: MkDropList<any>,\n container: MkDropList<any>,\n previousIndex: number,\n currentIndex: number,\n isPointerEvent: boolean,\n ): void {\n const event: MkDropEvent<any> = {\n previousIndex,\n currentIndex,\n item: this as MkDrag<any>,\n previousContainer,\n container,\n isPointerEvent,\n };\n container.emitDrop(event);\n }\n\n private isHandleTarget(target: EventTarget | null): boolean {\n if (!(target instanceof Node)) return false;\n return this.ownHandles().some((h) => h.element.contains(target));\n }\n\n /** Whether `target` belongs to this item rather than to a nested `[mkDrag]`. */\n private isOwnTarget(target: EventTarget | null): boolean {\n if (!(target instanceof Element)) return target === this.element;\n return target.closest('[mkDrag]') === this.element;\n }\n\n private prefersReducedMotion(): boolean {\n return (\n this.doc.defaultView?.matchMedia('(prefers-reduced-motion: reduce)')\n .matches ?? false\n );\n }\n}\n","<ng-content />\n","/* eslint-disable @typescript-eslint/no-explicit-any -- item-type params use\n `any` to accept drags of any data type without generic-variance friction. */\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { mkUniqueId } from '@mk-kit/ui/core';\nimport { MkDragDropRegistry } from './drag-drop-registry';\nimport { MkDrag } from './drag';\nimport type { MkDropEvent, MkDropListOrientation } from './drag-drop.types';\n\n/**\n * Roles on which `aria-orientation` is permitted (WAI-ARIA 1.2). On any other\n * role the attribute is invalid, so the list only exposes it for these.\n */\nconst ORIENTATION_ROLES = new Set([\n 'listbox',\n 'menu',\n 'radiogroup',\n 'scrollbar',\n 'select',\n 'separator',\n 'slider',\n 'tablist',\n 'toolbar',\n 'tree',\n 'treegrid',\n]);\n\n/**\n * A drop container for reorderable `[mkDrag]` items.\n *\n * - **Sort list:** a single `[mkDropList]` over an array — items reorder within it.\n * - **Buckets / kanban:** several `[mkDropList]`s wired together with\n * `mkDropListConnectedTo` so items transfer between them (both by pointer and\n * by keyboard at the ends of a list).\n *\n * The array bound to `mkDropListData` is **not** mutated for you — handle\n * `mkDropListDropped` and call {@link mkMoveItemInArray} / {@link mkTransferArrayItem}.\n *\n * Semantics follow the host element and its items, so the tree is always\n * valid ARIA:\n *\n * - any host other than `<ul>`/`<ol>` is a `role=\"group\"` (named by\n * `mkDropListLabel`) of `role=\"button\"` items;\n * - a `<ul>`/`<ol>` whose `<li mkDrag>` items all carry a *focusable*\n * `[mkDragHandle]` stays a plain list — the handles are the controls;\n * - a `<ul>`/`<ol>` whose items are themselves the keyboard targets becomes a\n * `listbox` of `option`s (an `<li>` may not be a `button`); give it a\n * `mkDropListLabel`, listboxes need a name.\n *\n * A `role` you set in the template is kept, and `aria-orientation` is only\n * exposed on roles that allow it (`listbox`, `toolbar`, `tree`, …) — the\n * keyboard model handles both axes regardless.\n *\n * ```html\n * <div mkDropList [mkDropListData]=\"todo()\" mkDropListLabel=\"To do\"\n * mkDropListId=\"todo\" [mkDropListConnectedTo]=\"['done']\"\n * (mkDropListDropped)=\"drop($event)\">\n * @for (t of todo(); track t.id) {\n * <div mkDrag [mkDragData]=\"t\">{{ t.title }}</div>\n * }\n * </div>\n * ```\n *\n * @typeParam T item data type.\n */\n@Component({\n selector: '[mkDropList]',\n exportAs: 'mkDropList',\n templateUrl: './drop-list.html',\n styleUrl: './drop-list.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'mk-drop-list',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-labelledby]': 'mkDropListLabelledBy() || null',\n '[attr.aria-orientation]': 'orientationAllowed() ? mkDropListOrientation() : null',\n '[attr.aria-disabled]': 'mkDropListDisabled() || null',\n '[class.mk-drop-list--horizontal]': \"mkDropListOrientation() === 'horizontal'\",\n '[class.mk-drop-list--disabled]': 'mkDropListDisabled()',\n '[class.mk-drop-list--receiving]': '_receiving()',\n },\n})\nexport class MkDropList<T = unknown> {\n private readonly registry = inject(MkDragDropRegistry);\n\n /** The list's host element (drop target bounds). */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** The array backing the list. Bound, never mutated by the directive. */\n readonly mkDropListData = input<readonly T[]>([]);\n\n /** Stable id used to connect lists. Auto-generated when omitted. */\n readonly mkDropListId = input<string>();\n\n /** Ids of other lists items may be transferred into. */\n readonly mkDropListConnectedTo = input<readonly string[]>([]);\n\n /**\n * Human-readable name used in screen-reader announcements when an item is\n * moved into this list (e.g. `\"In progress\"`). Falls back to the list `id`\n * — which may be auto-generated gibberish — so set it wherever users can\n * move items across lists by keyboard.\n */\n readonly mkDropListLabel = input<string>('');\n\n /**\n * Id of the element that names the list (`aria-labelledby`), e.g. a\n * visible heading. Takes precedence over `mkDropListLabel` as the\n * accessible name; the label is still used in announcements.\n */\n readonly mkDropListLabelledBy = input<string>('');\n\n /** Layout axis; controls pointer hit-testing and arrow-key direction. */\n readonly mkDropListOrientation = input<MkDropListOrientation>('vertical');\n\n /** Disable dropping into (and dragging out of) this list. */\n readonly mkDropListDisabled = input(false, { transform: booleanAttribute });\n\n /** Fires when an item is dropped into this list (pointer or keyboard). */\n readonly mkDropListDropped = output<MkDropEvent<T>>();\n\n /** Resolved id (input or generated). */\n readonly id = computed(() => this.mkDropListId() ?? this.autoId);\n private readonly autoId = mkUniqueId('mk-drop-list');\n\n /** Announceable name: the label when set, otherwise the resolved id. */\n readonly label = computed(() => this.mkDropListLabel() || this.id());\n\n /** A `role` written in the template — always kept. */\n private readonly explicitRole = this.element.getAttribute('role');\n private readonly isNativeList = /^(UL|OL)$/.test(this.element.tagName);\n\n /**\n * The role the host exposes. One set in the template wins. A `<ul>`/`<ol>`\n * keeps its implicit `list` role (`null` — nothing is written) while every\n * item hands the keyboard drag to a focusable handle, and becomes a\n * `listbox` (its items `option`s) otherwise. Any other element is a `group`.\n */\n readonly role = computed<string | null>(() => {\n if (this.explicitRole) return this.explicitRole;\n if (!this.isNativeList) return 'group';\n return this.drags().every((d) => d.keyboardHandle()) ? null : 'listbox';\n });\n\n /** Whether `aria-orientation` is valid on the effective role. */\n protected readonly orientationAllowed = computed(() =>\n ORIENTATION_ROLES.has(this.role() ?? ''),\n );\n\n /** A static `aria-label` written in the template, kept when no label input is set. */\n private readonly staticAriaLabel = this.element.getAttribute('aria-label');\n\n /**\n * Accessible name of the list: `mkDropListLabel`, else the template's own.\n * Omitted while `mkDropListLabelledBy` names the list, so the referenced\n * element is the single source of the name.\n */\n protected readonly ariaLabel = computed(() =>\n this.mkDropListLabelledBy()\n ? null\n : this.mkDropListLabel() || this.staticAriaLabel || null,\n );\n\n /** Connected-list ids, normalised to a plain array. */\n readonly connectedTo = computed<readonly string[]>(\n () => this.mkDropListConnectedTo() ?? [],\n );\n\n /** The `mkDrag` items projected into this list, in DOM order. */\n private readonly drags = contentChildren(MkDrag);\n\n /** Highlight while a drag is hovering this list. */\n protected readonly _receiving = signal(false);\n\n constructor() {\n effect((onCleanup) => {\n const id = this.id();\n this.registry.register(id, this);\n onCleanup(() => this.registry.unregister(id, this));\n });\n }\n\n /** Number of drag items currently in the list. */\n size(): number {\n return this.drags().length;\n }\n\n /** Index of `drag` among this list's items, or -1. */\n indexOf(drag: MkDrag<any>): number {\n return this.drags().indexOf(drag);\n }\n\n /** Host elements of this list's items, excluding `exclude`, in DOM order. */\n itemElementsExcept(exclude: MkDrag<any>): HTMLElement[] {\n return this.drags()\n .filter((d) => d !== exclude)\n .map((d) => d.element);\n }\n\n /** Toggle the \"receiving\" highlight (called by the active drag). */\n setReceiving(value: boolean): void {\n this._receiving.set(value);\n }\n\n /** Emit a drop into this list. Called by the active `MkDrag`. */\n emitDrop(event: MkDropEvent<any>): void {\n this.mkDropListDropped.emit(event as MkDropEvent<T>);\n }\n}\n","<ng-content />\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { mkUniqueId } from '@mk-kit/ui/core';\nimport { MkDragDropRegistry } from './drag-drop-registry';\nimport type { MkDrag } from './drag';\nimport type { MkDropZoneEvent, MkDropZoneHover } from './drag-drop.types';\n\n/**\n * A drop **target** that is not a list: an item dragged out of a connected\n * `[mkDropList]` can be released anywhere on it, and the zone reports *where*\n * — client coordinates, the offset inside the zone and the 0–1 fraction along\n * each axis — so the consumer can turn a position into meaning: a time on a\n * timeline, a priority band, a \"focus on this\" pane, a trash can.\n *\n * Nothing reorders and no placeholder is shown while an item hovers a zone;\n * the zone gets the `mk-drop-zone--receiving` class and a stream of\n * {@link mkDropZoneMoved} events instead. Zones and lists can overlap — the\n * innermost target under the pointer wins, so a column can hold three\n * priority bands and still accept plain drops between the bands.\n *\n * Wire a zone exactly like another list: give it an id and name that id in\n * the source list's `mkDropListConnectedTo`.\n *\n * Keyboard: a lifted item reaches zones with the arrow keys that cross lists\n * (Left/Right in a vertical list, Up/Down in a horizontal one) — zones sit in\n * the same DOM-ordered travel group as connected lists; Space/Enter drops at\n * the zone's centre. Every step is announced.\n *\n * ```html\n * <ul mkDropList mkDropListId=\"backlog\" [mkDropListConnectedTo]=\"['now', 'rail']\" …>\n * <section mkDropZone mkDropZoneId=\"now\" mkDropZoneLabel=\"Focus now\"\n * (mkDropZoneDropped)=\"focus($event.item.mkDragData())\">\n * <div mkDropZone mkDropZoneId=\"rail\" mkDropZoneLabel=\"Today\"\n * (mkDropZoneMoved)=\"preview($event.fractionY)\"\n * (mkDropZoneDropped)=\"schedule($event.item.mkDragData(), $event.fractionY)\">\n * ```\n *\n * @typeParam Z the zone's own payload type (`mkDropZoneData`).\n * @typeParam T the dragged item's data type. A zone cannot infer it from a\n * binding the way a list does from `mkDropListData`, so it defaults to\n * `any` — a handler typed `(e: MkDropZoneEvent<Task>) => …` binds directly.\n */\n@Component({\n selector: '[mkDropZone]',\n exportAs: 'mkDropZone',\n template: '<ng-content />',\n styleUrl: './drop-zone.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'mk-drop-zone',\n '[attr.role]': 'role',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-labelledby]': 'mkDropZoneLabelledBy() || null',\n '[attr.aria-disabled]': 'mkDropZoneDisabled() || null',\n '[class.mk-drop-zone--receiving]': '_receiving()',\n '[class.mk-drop-zone--disabled]': 'mkDropZoneDisabled()',\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- see the class doc\nexport class MkDropZone<Z = unknown, T = any> {\n private readonly registry = inject(MkDragDropRegistry);\n\n /** The zone's host element (drop target bounds). */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** Stable id source lists name in `mkDropListConnectedTo`. Auto-generated when omitted. */\n readonly mkDropZoneId = input<string>();\n\n /**\n * Human-readable name, used in screen-reader announcements when a lifted\n * item reaches the zone (\"Moved to Focus now\") and as the zone's accessible\n * name. Set it: the fallback is the id, which may be generated gibberish.\n */\n readonly mkDropZoneLabel = input<string>('');\n\n /** Id of a visible element that names the zone (`aria-labelledby`); wins over the label as the accessible name. */\n readonly mkDropZoneLabelledBy = input<string>('');\n\n /** Arbitrary payload handed back on every hover and drop event. */\n readonly mkDropZoneData = input<Z>();\n\n /** Disable dropping onto this zone (it leaves the travel group too). */\n readonly mkDropZoneDisabled = input(false, { transform: booleanAttribute });\n\n /** An item entered the zone (pointer or keyboard). */\n readonly mkDropZoneEntered = output<MkDropZoneHover<T, Z>>();\n /** The pointer moved while over the zone (one per frame, pointer only). */\n readonly mkDropZoneMoved = output<MkDropZoneHover<T, Z>>();\n /** The item left the zone without dropping (moved on, or the drag was cancelled). */\n readonly mkDropZoneLeft = output<MkDrag<T>>();\n /** The item was released on the zone. */\n readonly mkDropZoneDropped = output<MkDropZoneEvent<T, Z>>();\n\n /** Resolved id (input or generated). */\n readonly id = computed(() => this.mkDropZoneId() ?? this.autoId);\n private readonly autoId = mkUniqueId('mk-drop-zone');\n\n /** Announceable name: the label when set, otherwise the resolved id. */\n readonly label = computed(() => this.mkDropZoneLabel() || this.id());\n\n /** A `role` written in the template is kept; a zone is otherwise a named `group`. */\n protected readonly role = this.element.getAttribute('role') ?? 'group';\n\n private readonly staticAriaLabel = this.element.getAttribute('aria-label');\n\n protected readonly ariaLabel = computed(() =>\n this.mkDropZoneLabelledBy() ? null : this.mkDropZoneLabel() || this.staticAriaLabel || null,\n );\n\n /** Highlight while a drag is hovering (or a keyboard-lifted item sits on) the zone. */\n protected readonly _receiving = signal(false);\n\n constructor() {\n effect((onCleanup) => {\n const id = this.id();\n this.registry.registerZone(id, this);\n onCleanup(() => this.registry.unregisterZone(id, this));\n });\n }\n\n /** Toggle the \"receiving\" highlight (called by the active drag). */\n setReceiving(value: boolean): void {\n this._receiving.set(value);\n }\n\n /** Called by the active `MkDrag` — not part of the consumer API. */\n emitEntered(event: MkDropZoneHover<T, Z>): void {\n this.mkDropZoneEntered.emit(event);\n }\n emitMoved(event: MkDropZoneHover<T, Z>): void {\n this.mkDropZoneMoved.emit(event);\n }\n emitLeft(item: MkDrag<T>): void {\n this.mkDropZoneLeft.emit(item);\n }\n emitDrop(event: MkDropZoneEvent<T, Z>): void {\n this.mkDropZoneDropped.emit(event);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport { MK_I18N } from '@mk-kit/ui/core';\nimport { MkDrag } from './drag';\nimport { mkMoveItemInArray } from './drag-drop-utils';\nimport { MkDropList } from './drop-list';\nimport type { MkDropEvent, MkDropListOrientation } from './drag-drop.types';\n\n/**\n * Thin convenience wrapper over a single `[mkDropList]` for the common\n * \"reorderable list\" case. Bind `items` two-way and provide an `<ng-template>`\n * to render each row; drops are applied to the model for you (via\n * {@link mkMoveItemInArray}).\n *\n * For connected buckets / kanban, use `[mkDropList]` + `[mkDrag]` directly.\n *\n * The list renders as a named `group` of `button` items: pass `label` (or\n * `labelledBy` pointing at a visible heading) so screen readers say what is\n * being reordered — the i18n `sortableListLabel` (\"Sortable list\") is the\n * fallback.\n *\n * ```html\n * <mk-sortable-list [(items)]=\"rows\" label=\"Steps\">\n * <ng-template let-row let-i=\"index\">\n * <span mkDragHandle aria-hidden=\"true\">⠿</span> {{ i + 1 }}. {{ row.name }}\n * </ng-template>\n * </mk-sortable-list>\n * ```\n *\n * @typeParam T item data type.\n */\n@Component({\n selector: 'mk-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MkDropList, MkDrag, NgTemplateOutlet],\n})\nexport class MkSortableList<T = unknown> {\n private readonly i18n = inject(MK_I18N);\n\n /** The ordered items (two-way). Reordered in place on drop. */\n readonly items = model<T[]>([]);\n\n /**\n * Accessible name of the list (`aria-label`), also used in the\n * \"moved into …\" announcements. Defaults to the i18n `sortableListLabel`.\n */\n readonly label = input<string>();\n\n /**\n * Id of an element that names the list (`aria-labelledby`), e.g. a visible\n * heading. Wins over `label` as the accessible name.\n */\n readonly labelledBy = input<string>();\n\n /** Layout axis of the list. */\n readonly orientation = input<MkDropListOrientation>('vertical');\n\n /** Disable reordering. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** `@for` tracking function. Defaults to identity (track by item). */\n readonly trackBy = input<(index: number, item: T) => unknown>(\n (_, item) => item,\n );\n\n /** Emitted after the model has been reordered. */\n readonly sorted = output<MkDropEvent<T>>();\n\n /** The row template projected as `<ng-template>`. */\n protected readonly itemTemplate = contentChild.required(TemplateRef);\n\n /** `label`, else the i18n default. */\n protected readonly resolvedLabel = computed(\n () => this.label() || this.i18n.sortableListLabel,\n );\n\n protected onDrop(event: MkDropEvent<T>): void {\n const next = [...this.items()];\n mkMoveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.sorted.emit(event);\n }\n}\n","<div\n mkDropList\n class=\"mk-sortable-list__list\"\n [mkDropListData]=\"items()\"\n [mkDropListLabel]=\"resolvedLabel()\"\n [mkDropListLabelledBy]=\"labelledBy() ?? ''\"\n [mkDropListOrientation]=\"orientation()\"\n [mkDropListDisabled]=\"disabled()\"\n (mkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div mkDrag class=\"mk-sortable-list__item\" [mkDragData]=\"item\">\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\"\n />\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;AAIG;AAEH,SAAS,UAAU,CAAC,KAAa,EAAE,GAAW,EAAA;AAC5C,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC1C;AAEA;;;;;;;AAOG;SACa,iBAAiB,CAC/B,KAAU,EACV,SAAiB,EACjB,OAAe,EAAA;AAEf,IAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;AACpC,IAAA,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACpD,IAAA,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAChD,IAAI,IAAI,KAAK,EAAE;AAAE,QAAA,OAAO,KAAK;AAC7B,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;AACxB,IAAA,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC;AAChC,IAAA,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE;QACvC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC;IAC7B;AACA,IAAA,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI;AAChB,IAAA,OAAO,KAAK;AACd;AAEA;;;;;;;;AAQG;AACG,SAAU,mBAAmB,CACjC,IAAS,EACT,EAAO,EACP,SAAiB,EACjB,OAAe,EAAA;AAEf,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO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AAA,EAAA,QAAA,EClFrE,0mBAmBA,2VD4BY,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,uBAAA,EAAA,oBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,MAAM,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,gBAAA,EAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEnC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;+BACE,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,0mBAAA,EAAA,MAAA,EAAA,CAAA,mSAAA,CAAA,EAAA;0vBAmCS,WAAW,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElFrE;;AAEG;;;;"}
@@ -440,6 +440,8 @@ const MK_DE_I18N = {
440
440
  dndMoved: (position, total) => `Auf Position ${position} von ${total} verschoben.`,
441
441
  dndMovedToList: (list, position, total) => `Verschoben nach: ${list}, Position ${position} von ${total}.`,
442
442
  dndDropped: (position) => `Auf Position ${position} abgelegt.`,
443
+ dndMovedToZone: (zone) => `Verschoben nach: ${zone}. Leertaste oder Enter legt hier ab.`,
444
+ dndDroppedInZone: (zone) => `Abgelegt in: ${zone}.`,
443
445
  dndCancelled: 'Verschieben abgebrochen. Der Eintrag ist zurück an seinem Platz.',
444
446
  repeaterAddRow: 'Zeile hinzufügen',
445
447
  repeaterRemoveRow: (index) => `Zeile ${index} entfernen`,