@qaiddev/thumbs-embed 1.0.10 → 1.0.12
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/dist/console-capture.d.ts +20 -0
- package/dist/dom-utils.d.ts +37 -0
- package/dist/element-selector.d.ts +33 -0
- package/dist/embed.d.ts +109 -0
- package/dist/icons.d.ts +6 -0
- package/dist/index.d.ts +38 -425
- package/dist/modal-positioning.d.ts +46 -0
- package/dist/network-capture.d.ts +13 -0
- package/dist/qaid.js +145 -122
- package/dist/qaid.js.map +1 -1
- package/dist/qaid.umd.cjs +5 -5
- package/dist/qaid.umd.cjs.map +1 -1
- package/dist/screenshot-dom.d.ts +27 -0
- package/dist/screenshot.d.ts +17 -0
- package/dist/styles.d.ts +44 -0
- package/dist/types.d.ts +237 -0
- package/dist/video-capture.d.ts +34 -0
- package/package.json +2 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal positioning utilities
|
|
3
|
+
*/
|
|
4
|
+
import type { SelectedBounds } from "./types";
|
|
5
|
+
export interface ModalPosition {
|
|
6
|
+
top: number;
|
|
7
|
+
left: number;
|
|
8
|
+
position: "above" | "below";
|
|
9
|
+
}
|
|
10
|
+
export interface ArrowPosition {
|
|
11
|
+
left: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ModalDimensions {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
arrowHeight: number;
|
|
17
|
+
gap: number;
|
|
18
|
+
viewportPadding: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Calculate whether modal should go above or below the target element
|
|
22
|
+
*/
|
|
23
|
+
export declare function calculateVerticalPosition(bounds: SelectedBounds, viewportHeight: number, totalHeight: number, gap: number, viewportPadding: number): {
|
|
24
|
+
top: number;
|
|
25
|
+
position: "above" | "below";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Calculate horizontal position of modal, clamped to viewport
|
|
29
|
+
*/
|
|
30
|
+
export declare function calculateHorizontalPosition(bounds: SelectedBounds, viewportWidth: number, modalWidth: number, viewportPadding: number): number;
|
|
31
|
+
/**
|
|
32
|
+
* Calculate arrow position relative to modal
|
|
33
|
+
* Points at the click position, not the element center
|
|
34
|
+
*/
|
|
35
|
+
export declare function calculateArrowPosition(bounds: SelectedBounds, modalLeft: number, modalWidth: number, minOffset?: number, arrowWidth?: number): number;
|
|
36
|
+
/**
|
|
37
|
+
* Calculate complete modal position based on selected element bounds
|
|
38
|
+
*/
|
|
39
|
+
export declare function calculateModalPosition(bounds: SelectedBounds, viewportWidth: number, viewportHeight: number, dimensions?: ModalDimensions): ModalPosition;
|
|
40
|
+
/**
|
|
41
|
+
* Calculate both modal and arrow positions
|
|
42
|
+
*/
|
|
43
|
+
export declare function calculateModalAndArrowPosition(bounds: SelectedBounds, viewportWidth: number, viewportHeight: number, dimensions?: ModalDimensions): {
|
|
44
|
+
modal: ModalPosition;
|
|
45
|
+
arrow: ArrowPosition;
|
|
46
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Network capture utilities
|
|
3
|
+
* Intercepts fetch() and XMLHttpRequest to capture 4xx/5xx errors
|
|
4
|
+
*/
|
|
5
|
+
import type { NetworkError } from "./types";
|
|
6
|
+
export interface NetworkCapture {
|
|
7
|
+
errors: NetworkError[];
|
|
8
|
+
restore: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Intercept fetch() and XMLHttpRequest to capture network errors (4xx/5xx)
|
|
12
|
+
*/
|
|
13
|
+
export declare function captureNetworkErrors(): NetworkCapture;
|