ngx-kit 9.2.1 → 9.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-kit",
3
- "version": "9.2.1",
3
+ "version": "9.2.2",
4
4
  "description": "Angular input components",
5
5
  "author": "Mohammadreza Samani <mr.samani1368@gmail.com>",
6
6
  "license": "MIT",
@@ -81,6 +81,8 @@ declare class DropListRef<T = any> {
81
81
  parentList: DropListRef<any> | null;
82
82
  readonly childLists: Set<DropListRef<any>>;
83
83
  private session;
84
+ /** Main axis of this list: the measured one while sorting, else a CSS-based guess. */
85
+ getAxis(): 'x' | 'y' | 'grid';
84
86
  private placeholder?;
85
87
  customPlaceholder?: PlaceHolderRef;
86
88
  private activeDrag;
@@ -306,6 +308,15 @@ declare class DragRef<T = unknown> {
306
308
  pointerDown(pointer: IPosition): void;
307
309
  startDrag(pointer: IPosition): void;
308
310
  dragMove(pointer: IPosition): void;
311
+ /**
312
+ * Keyboard sorting for list items: jump by whole SLOTS instead of pixels (an 8px step can
313
+ * never cross the centre of a 190px card), and hop to the neighbouring connected list when the
314
+ * edge of the current one is reached — Left/Right between kanban columns, Up/Down between
315
+ * the sections of a column. Returns `false` for free drags (use `nudge`).
316
+ */
317
+ nudgeToSlot(direction: 'up' | 'down' | 'left' | 'right'): boolean;
318
+ private neighbourSlot;
319
+ private neighbourList;
309
320
  nudge(dx: number, dy: number): void;
310
321
  endDrag(): void;
311
322
  cancelDrag(): void;
@@ -674,7 +685,9 @@ declare function adjustForZoom(value: number, element?: HTMLElement): number;
674
685
  */
675
686
  declare class AutoScroller {
676
687
  private raf;
677
- private container;
688
+ /** Nearest scroller per axis: a kanban column scrolls vertically while its BOARD scrolls horizontally. */
689
+ private containerX;
690
+ private containerY;
678
691
  private win?;
679
692
  /** Document the pointer coordinates (`update(x, y)`) are expressed in. */
680
693
  private pointerDoc?;
@@ -689,10 +702,15 @@ declare class AutoScroller {
689
702
  /** فقط container را عوض می‌کند بدون قطع حلقه‌ی در حال اجرا یا صفر کردن speed. */
690
703
  retarget(fromEl: HTMLElement): void;
691
704
  update(clientX: number, clientY: number): void;
705
+ private axisSpeed;
692
706
  stop(): void;
707
+ /** Scrolls one container by a speed measured in viewport pixels (carrying sub-pixel remainders). */
708
+ private scrollContainer;
693
709
  private tick;
694
710
  }
695
711
  declare function findScrollableAncestor(el: HTMLElement): HTMLElement | Window;
712
+ /** Nearest ancestor that can scroll along ONE axis (`<html>`/`<body>` resolve to the window). */
713
+ declare function findScrollableAncestorForAxis(el: HTMLElement, axis: 'x' | 'y'): HTMLElement | Window;
696
714
  declare function getScrollPosition(container: HTMLElement | Window): {
697
715
  left: number;
698
716
  top: number;
@@ -732,5 +750,5 @@ declare function stripEditorArtifacts(root: Element, options?: StripOptions): vo
732
750
  /** Serialised, editor-free HTML of `el`'s children (the canvas content). */
733
751
  declare function getCleanHtml(el: Element, options?: StripOptions): string;
734
752
 
735
- export { AutoScroller, DragDropService, DragRef, DropListGroupRef, DropListRef, NGX_DRAGGABLE, NGX_DRAG_PREVIEW, NGX_DROPLIST, NGX_DROPLIST_GROUP, NGX_PLACEHOLDER, NgxDragPreview, NgxDraggable, NgxDropList, NgxDropListGroup, NgxPlaceholder, NgxResizable, PlaceHolderRef, adjustForZoom, checkBoundX, checkBoundY, clampResizeWithinBoundary, copyArrayItem, findScrollableAncestor, getCleanHtml, getPageZoom, getScrollPosition, isRtl, moveItemInArray, resolveLogicalDirection, stripEditorArtifacts, transferArrayItem };
753
+ export { AutoScroller, DragDropService, DragRef, DropListGroupRef, DropListRef, NGX_DRAGGABLE, NGX_DRAG_PREVIEW, NGX_DROPLIST, NGX_DROPLIST_GROUP, NGX_PLACEHOLDER, NgxDragPreview, NgxDraggable, NgxDropList, NgxDropListGroup, NgxPlaceholder, NgxResizable, PlaceHolderRef, adjustForZoom, checkBoundX, checkBoundY, clampResizeWithinBoundary, copyArrayItem, findScrollableAncestor, findScrollableAncestorForAxis, getCleanHtml, getPageZoom, getScrollPosition, isRtl, moveItemInArray, resolveLogicalDirection, stripEditorArtifacts, transferArrayItem };
736
754
  export type { DragAxis, IDropEvent, IPosition, IResizableOutput, LogicalResizeDirection, ResizeDirection, StripOptions };