ngx-kit 9.0.1 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # NgxInput
1
+ # NGX-KIT
2
2
 
3
3
  ## Comming Soon...
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Design goals
4
4
 
5
- The package uses Angular 22 signals and Pointer Events. Dragging and resizing remain transform/pointer based. Drop-list sorting is snapshot-based and driven by `translate3d`, like Angular CDK Drag & Drop.
5
+ The package uses Angular 22 signals and Pointer Events. Dragging and resizing remain transform/pointer based. DOM access, event listeners, computed styles and animation frames are resolved from each host element's own `ownerDocument` / `defaultView`, so same-origin iframe documents can host independent builder canvases. Drop-list sorting is snapshot-based and driven by `translate3d`, like Angular CDK Drag & Drop.
6
6
 
7
7
  ### Professional drop-list behavior
8
8
 
@@ -10,8 +10,8 @@ When a drag starts inside a drop list:
10
10
 
11
11
  - the real item remains in its original DOM position as a hidden layout anchor;
12
12
  - exactly one placeholder preserves the item's layout space;
13
- - a fully styled visual clone is moved to `document.body`, so overflow/scroll containers cannot clip the drag;
14
- - the body preview copies computed styles recursively, including CSS custom properties and descendant styles;
13
+ - a lightweight visual clone is moved to the source element's `ownerDocument.body`, so overflow/scroll containers cannot clip the drag;
14
+ - preview styles are not recursively copied; provide a custom `NgxDragPreview` when the preview needs application-specific styling;
15
15
  - entering, leaving and switching lists always disposes the previous placeholder before creating the next one;
16
16
  - sorting is a pure function of the pointer and a geometry snapshot taken when the drag enters a list, so it is fully reversible (see below);
17
17
  - `previousIndex` is captured from the origin list and `currentIndex` is the final placeholder position;
@@ -22,7 +22,7 @@ When a drag starts inside a drop list:
22
22
 
23
23
  ### How sorting works
24
24
 
25
- Per pointer position the engine answers *"if I release here, where is the item inserted?"*:
25
+ Per pointer position the engine answers _"if I release here, where is the item inserted?"_:
26
26
 
27
27
  1. **Snapshot.** When a drag enters a list, the rectangles of its items (with the dragged item's placeholder in its slot) are measured once. They are kept valid across page/parent/nested scrolling by shifting the pointer by the scroll delta, so pointer moves perform no layout reads.
28
28
  2. **Resolve.** `resolveInsertionIndex(pointer, snapshot)` counts how many siblings precede the pointer. Orientation is derived from the rectangles (row clustering and the order DOM siblings actually land on screen), so column, row, `flex` (incl. `wrap`, `*-reverse`), `grid`, inline/inline-block, floats, RTL and LTR all use one algorithm; `flex-direction`/`direction` are only a fallback for lists of fewer than two items. A small proportional hysteresis (10 % of the sibling's size, max 6 px) prevents flicker on a mid-line.
@@ -38,7 +38,8 @@ The list the drag started in keeps its original slot (a hole) while the pointer
38
38
  - Nested lists: the innermost connected list under the pointer wins; lists inside the dragged element are never targets.
39
39
  - Hit testing only counts the visible (clip-aware) part of a list.
40
40
  - Custom placeholder templates (`NgxPlaceholder`) are not rendered by the engine (pre-existing).
41
- - Scaled (`transform: scale`) ancestors are not compensated.
41
+ - Nested 2D transformed ancestors, especially `transform: scale(...)` and CSS `zoom`, are accounted for when converting viewport pointer deltas, scroll deltas, resize deltas and FLIP/sort offsets into local CSS transform values. Drag vector conversion also handles 2D rotation/skew matrices; resize hit zones remain axis-aligned and should not be used on rotated handles. CSS `perspective` / 3D transform chains are not supported.
42
+ - Each iframe is an independent drag/drop document and coordinate space. The library uses the dragged element's `ownerDocument` and `defaultView`; dragging between documents/iframes (especially cross-origin frames) is not supported.
42
43
 
43
44
  ## Basic drop list
44
45