turbowrap-issue-widget 1.0.21 → 1.0.25
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/api/types.d.ts +1 -1
- package/dist/capture/rectangle-selector.d.ts +21 -0
- package/dist/capture/screen-capture.d.ts +10 -0
- package/dist/issue-widget.es.js +2151 -1942
- package/dist/issue-widget.es.js.map +1 -1
- package/dist/issue-widget.min.js +156 -33
- package/dist/issue-widget.min.js.map +1 -1
- package/dist/issue-widget.umd.js +156 -33
- package/dist/issue-widget.umd.js.map +1 -1
- package/dist/ui/styles.d.ts +1 -1
- package/package.json +1 -1
package/dist/api/types.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rectangle selection overlay for screenshot cropping.
|
|
3
|
+
* Allows users to draw a rectangle to select a specific area of the screen.
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectionRect {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RectangleSelectorOptions {
|
|
12
|
+
imageBlob: Blob;
|
|
13
|
+
onSelect: (rect: SelectionRect) => void;
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
onFullScreen: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function showRectangleSelector(options: RectangleSelectorOptions): void;
|
|
18
|
+
/**
|
|
19
|
+
* Crops an image blob to the specified rectangle.
|
|
20
|
+
*/
|
|
21
|
+
export declare function cropImage(imageBlob: Blob, rect: SelectionRect): Promise<Blob>;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export type CaptureMethod = 'display-media' | 'html2canvas' | 'auto';
|
|
2
|
+
export interface CaptureWithSelectionResult {
|
|
3
|
+
blob: Blob;
|
|
4
|
+
wasFullScreen: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Captures the screen and allows user to select a rectangular area.
|
|
8
|
+
* Uses html2canvas to avoid the browser's native screen sharing popup.
|
|
9
|
+
* Returns the cropped image based on user selection, or full screen if they choose that option.
|
|
10
|
+
*/
|
|
11
|
+
export declare function captureScreenWithSelection(_method?: CaptureMethod): Promise<CaptureWithSelectionResult>;
|
|
2
12
|
export declare function captureScreen(method?: CaptureMethod): Promise<Blob>;
|
|
3
13
|
export declare function supportsDisplayMedia(): boolean;
|
|
4
14
|
export declare function compressImage(blob: Blob, maxWidth?: number): Promise<Blob>;
|