ngx-kit 9.2.1 → 9.2.3

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.3",
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;
@@ -518,7 +529,12 @@ declare class NgxResizable implements OnDestroy {
518
529
  private beforeTransition;
519
530
  private beforeWidth;
520
531
  private beforeHeight;
521
- private beforeTransform;
532
+ private beforeTranslate;
533
+ private baseComputedTranslate;
534
+ private keyboardBaseTranslate;
535
+ private keyboardBaseInlineTranslate;
536
+ private startMatrix;
537
+ private pointerInverse;
522
538
  private pointerId;
523
539
  private startWidth;
524
540
  private startHeight;
@@ -527,23 +543,29 @@ declare class NgxResizable implements OnDestroy {
527
543
  constructor(el: ElementRef<HTMLElement>);
528
544
  ngOnDestroy(): void;
529
545
  onPointerDown(e: PointerEvent): void;
530
- onPointerMove(e: PointerEvent): void;
531
- onPointerUp(e: PointerEvent): void;
532
- onDocumentKeyDown(e: KeyboardEvent): void;
546
+ /** Entry point used by the typed NgxResizeHandle directive. */
547
+ beginResize(e: PointerEvent, direction: LogicalResizeDirection): void;
548
+ private onPointerMove;
549
+ private onPointerUp;
550
+ private onDocumentKeyDown;
533
551
  private onPointerCancel;
534
552
  private restoreBeforeResize;
553
+ /**
554
+ * Keyboard resizing respects the configured directions.
555
+ * The arrow keys move the active physical edge:
556
+ * - if only west is enabled, horizontal keys operate on west;
557
+ * - if only east is enabled, horizontal keys operate on east;
558
+ * - north/south follow the same rule vertically.
559
+ * Disabled axes are never modified.
560
+ */
535
561
  onHandleKeyDown(e: KeyboardEvent): void;
562
+ private chooseAxisEdge;
563
+ private keyboardDirection;
564
+ private isEditableTarget;
536
565
  private calculate;
537
566
  private apply;
538
- /**
539
- * `offsetWidth/Height` (what we measure and report) are BORDER-box sizes. The inline
540
- * `width/height` we write are interpreted according to `box-sizing`: for the CSS default
541
- * (`content-box`) writing the border-box number would make a padded/bordered block jump by
542
- * its padding+border the instant a resize starts. Convert so the box is exactly the size
543
- * reported in `IResizableOutput`.
544
- */
545
567
  private toStyleSize;
546
- private clampGrid;
568
+ private clampSize;
547
569
  private finish;
548
570
  private resolvedDirections;
549
571
  private hitDirection;
@@ -628,6 +650,18 @@ declare class NgxDragPreview {
628
650
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDragPreview, "[ngxDragPreview]", never, {}, {}, never, never, true, never>;
629
651
  }
630
652
 
653
+ /**
654
+ * Typed handle API. Prefer ngxResizeHandle="se" in templates; the legacy
655
+ * data-ngx-resize-handle attribute remains available for backwards compatibility.
656
+ */
657
+ declare class NgxResizeHandle {
658
+ readonly ngxResizeHandle: _angular_core.InputSignal<LogicalResizeDirection>;
659
+ private readonly parent;
660
+ onPointerDown(event: PointerEvent): void;
661
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxResizeHandle, never>;
662
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxResizeHandle, "[ngxResizeHandle]", never, { "ngxResizeHandle": { "alias": "ngxResizeHandle"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
663
+ }
664
+
631
665
  /**
632
666
  * True when `element` sits inside a right-to-left context.
633
667
  *
@@ -674,7 +708,9 @@ declare function adjustForZoom(value: number, element?: HTMLElement): number;
674
708
  */
675
709
  declare class AutoScroller {
676
710
  private raf;
677
- private container;
711
+ /** Nearest scroller per axis: a kanban column scrolls vertically while its BOARD scrolls horizontally. */
712
+ private containerX;
713
+ private containerY;
678
714
  private win?;
679
715
  /** Document the pointer coordinates (`update(x, y)`) are expressed in. */
680
716
  private pointerDoc?;
@@ -689,10 +725,15 @@ declare class AutoScroller {
689
725
  /** فقط container را عوض می‌کند بدون قطع حلقه‌ی در حال اجرا یا صفر کردن speed. */
690
726
  retarget(fromEl: HTMLElement): void;
691
727
  update(clientX: number, clientY: number): void;
728
+ private axisSpeed;
692
729
  stop(): void;
730
+ /** Scrolls one container by a speed measured in viewport pixels (carrying sub-pixel remainders). */
731
+ private scrollContainer;
693
732
  private tick;
694
733
  }
695
734
  declare function findScrollableAncestor(el: HTMLElement): HTMLElement | Window;
735
+ /** Nearest ancestor that can scroll along ONE axis (`<html>`/`<body>` resolve to the window). */
736
+ declare function findScrollableAncestorForAxis(el: HTMLElement, axis: 'x' | 'y'): HTMLElement | Window;
696
737
  declare function getScrollPosition(container: HTMLElement | Window): {
697
738
  left: number;
698
739
  top: number;
@@ -732,5 +773,5 @@ declare function stripEditorArtifacts(root: Element, options?: StripOptions): vo
732
773
  /** Serialised, editor-free HTML of `el`'s children (the canvas content). */
733
774
  declare function getCleanHtml(el: Element, options?: StripOptions): string;
734
775
 
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 };
776
+ export { AutoScroller, DragDropService, DragRef, DropListGroupRef, DropListRef, NGX_DRAGGABLE, NGX_DRAG_PREVIEW, NGX_DROPLIST, NGX_DROPLIST_GROUP, NGX_PLACEHOLDER, NgxDragPreview, NgxDraggable, NgxDropList, NgxDropListGroup, NgxPlaceholder, NgxResizable, NgxResizeHandle, PlaceHolderRef, adjustForZoom, checkBoundX, checkBoundY, clampResizeWithinBoundary, copyArrayItem, findScrollableAncestor, findScrollableAncestorForAxis, getCleanHtml, getPageZoom, getScrollPosition, isRtl, moveItemInArray, resolveLogicalDirection, stripEditorArtifacts, transferArrayItem };
736
777
  export type { DragAxis, IDropEvent, IPosition, IResizableOutput, LogicalResizeDirection, ResizeDirection, StripOptions };