@zohaibarsalan/screenshotter 0.1.6

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/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @zohaibarsalan/screenshotter
2
+
3
+ In-app screenshot capture for React apps with a one-package, download-only workflow.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @zohaibarsalan/screenshotter
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```ts
14
+ import {
15
+ defineScreenshotterConfig,
16
+ mountScreenshotter,
17
+ } from "@zohaibarsalan/screenshotter";
18
+
19
+ mountScreenshotter(
20
+ defineScreenshotterConfig({
21
+ enabled: true,
22
+ project: "my-app",
23
+ }),
24
+ );
25
+ ```
26
+
27
+ Import that file once in your client entrypoint.
28
+
29
+ ## What You Get
30
+
31
+ - floating capture widget
32
+ - element / viewport / fullpage modes
33
+ - `png` and `jpeg` output
34
+ - browser download output (no backend setup)
35
+
36
+ ## Exports
37
+
38
+ - `ScreenshotterWidget`
39
+ - `mountScreenshotter(options)`
40
+ - `defineScreenshotterConfig(config)`
41
+ - `type ScreenshotterWidgetProps`
42
+ - `type MountScreenshotterOptions`
43
+
44
+ ## Notes
45
+
46
+ - Current package behavior is download-only.
47
+ - For dual-theme capture, provide `themeAdapter`.
48
+
49
+ ## Full Documentation
50
+
51
+ - [Repository README](https://github.com/zohaibarsalan/screenshotter#readme)
52
+ - [Issue Tracker](https://github.com/zohaibarsalan/screenshotter/issues)
53
+
54
+ ## License
55
+
56
+ ISC
@@ -0,0 +1,17 @@
1
+ import { type CaptureMode, type SaveResult, type ThemeSelection, type ThemeValue } from "@screenshotter/protocol";
2
+ export interface ScreenshotterWidgetProps {
3
+ enabled?: boolean;
4
+ project?: string;
5
+ elementPaddingPx?: number;
6
+ captureSettleMs?: number;
7
+ defaultMode?: CaptureMode;
8
+ themeSelectionDefault?: ThemeSelection;
9
+ themeAdapter?: {
10
+ getCurrentTheme: () => ThemeValue;
11
+ setTheme: (theme: ThemeValue) => void | Promise<void>;
12
+ };
13
+ onSaved?: (result: SaveResult) => void;
14
+ onError?: (message: string) => void;
15
+ }
16
+ export declare function ScreenshotterWidget({ enabled, project, elementPaddingPx, captureSettleMs, defaultMode, themeSelectionDefault, themeAdapter, onSaved, onError, }: ScreenshotterWidgetProps): import("react/jsx-runtime").JSX.Element | null;
17
+ export default ScreenshotterWidget;