Skip to content

Commit 733afa4

Browse files
feat: Export screenshot utilities and types
Co-authored-by: aiden <aiden@million.dev>
1 parent 1db62da commit 733afa4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/react-grab/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ export {
66
DEFAULT_THEME,
77
} from "./core/index.js";
88
export { generateSnippet } from "./utils/generate-snippet.js";
9+
export {
10+
captureElementScreenshot,
11+
copyImageToClipboard,
12+
combineBounds,
13+
} from "./utils/capture-screenshot.js";
14+
export type { ElementBounds } from "./utils/capture-screenshot.js";
15+
export { isScreenshotSupported } from "./utils/is-screenshot-supported.js";
916
export type {
1017
Options,
1118
ReactGrabAPI,

packages/react-grab/src/utils/capture-screenshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
VIDEO_READY_TIMEOUT_MS,
55
} from "../constants.js";
66

7-
interface ElementBounds {
7+
export interface ElementBounds {
88
x: number;
99
y: number;
1010
width: number;

0 commit comments

Comments
 (0)