@ssgoi/core 6.5.0-beta.0 → 6.5.0-beta.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.
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element rect relative to `root`, measured in VISUAL (rendered) coordinates
|
|
3
|
+
* via `getBoundingClientRect` — the zoom-local counterpart to the shared,
|
|
4
|
+
* offset-based `getRect`.
|
|
5
|
+
*
|
|
6
|
+
* Why zoom needs its own: the offset walk in `getRect` returns LAYOUT position,
|
|
7
|
+
* which is invariant to any scroll container sitting BETWEEN the element and the
|
|
8
|
+
* page — e.g. a horizontally-scrolled carousel holding the zoom-exit tile. That
|
|
9
|
+
* container's `scrollLeft` never shows up, so the tile animates from the wrong
|
|
10
|
+
* on-screen spot. `getBoundingClientRect` folds in every ancestor scroll AND
|
|
11
|
+
* transform, so the scrolled position is captured for free.
|
|
12
|
+
*
|
|
13
|
+
* Kept ROOT-RELATIVE (`el.rect - root.rect`) on purpose so the existing
|
|
14
|
+
* contract is preserved:
|
|
15
|
+
* - the page's OWN scroll/position/transform shifts both `root` and `el`
|
|
16
|
+
* equally and cancels in the subtraction, so page-level scroll stays owned
|
|
17
|
+
* by `scrollOffset` (no double-correction, no regression);
|
|
18
|
+
* - only scroll/transform STRICTLY between `root` and `el` survives — exactly
|
|
19
|
+
* the nested-carousel case the offset walk missed.
|
|
20
|
+
*
|
|
21
|
+
* Measured before any zoom transform lands on the tile, so the tile's own
|
|
22
|
+
* not-yet-applied transform can't pollute the read.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getVisualRect(root: HTMLElement, el: HTMLElement): DOMRect;
|
|
25
|
+
//# sourceMappingURL=get-visual-rect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-visual-rect.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/get-visual-rect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,OAAO,CASzE"}
|