@bitux/review-layer-react 0.1.5 → 0.1.7

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,5 @@
1
+ /**
2
+ * URL de la página para scope de comentarios.
3
+ * En Storybook el iframe tiene pathname "/iframe.html"; usamos el query "path" (ej. /docs/ui-alert--docs) como ruta lógica.
4
+ */
5
+ export declare function getPageUrl(): string;
@@ -8,6 +8,11 @@ export declare function clampPinToViewport(x: number, y: number, radius?: number
8
8
  x: number;
9
9
  y: number;
10
10
  };
11
+ /**
12
+ * Ancestros del elemento que tienen scroll (overflow auto/scroll y contenido que desborda).
13
+ * Útil en iframes/Storybook donde el scroll es en un div (ej. sbdocs-wrapper), no en window.
14
+ */
15
+ export declare function getScrollableAncestors(el: Element | null): Element[];
11
16
  /**
12
17
  * Get the element's bounding rect if it exists in the DOM.
13
18
  * No devuelve posición si el elemento es parte del UI del review layer (pins, popover, iconos).
@@ -35,9 +40,9 @@ export declare function getFallbackPosition(comment: Comment): {
35
40
  */
36
41
  export declare function getFallbackRect(comment: Comment): DOMRect | null;
37
42
  /**
38
- * Pin position: prioriza coordenadas guardadas (relative_x/y o x/y) para que cada pin
39
- * quede donde se creó. Si no hay coords guardadas, usa el selector.
40
- * Así evitamos que dos comentarios con selector ambiguo compartan la misma posición.
43
+ * Pin position: prioriza el elemento en vivo por selector para que el pin
44
+ * siga al elemento al hacer scroll. Solo usa coordenadas guardadas cuando
45
+ * el selector no encuentra el elemento (p. ej. DOM cambiado, SPA).
41
46
  */
42
47
  export declare function getCommentPinPosition(comment: Comment): {
43
48
  x: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitux/review-layer-react",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "SDK to leave UI comments on staging React applications",
5
5
  "type": "module",
6
6
  "main": "./dist/review-layer-react.umd.cjs",