screenshot-beautify 1.2.0 → 1.2.1

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/README.md CHANGED
@@ -64,18 +64,30 @@ screenshot-beautify presets
64
64
 
65
65
  | Category | Presets |
66
66
  |----------|---------|
67
+ | **Smart** | `auto` - analyzes your screenshot and creates a matching gradient |
67
68
  | Warm | `sunset`, `sunrise`, `peach` |
68
69
  | Cool | `ocean`, `sky`, `northern` |
69
70
  | Dark | `charcoal`, `midnight`, `space` |
70
71
  | Vibrant | `neon`, `fire`, `aurora` |
71
72
  | Soft | `lavender`, `mint`, `rose` |
72
73
 
74
+ ### Auto Preset
75
+
76
+ The `auto` preset extracts the dominant colors from your screenshot and generates a complementary gradient background. This ensures your beautified screenshot always looks cohesive without manual color selection.
77
+
78
+ ```bash
79
+ screenshot-beautify screenshot.png --preset auto
80
+ ```
81
+
73
82
  ## Examples
74
83
 
75
84
  ```bash
76
85
  # Basic usage
77
86
  screenshot-beautify screenshot.png
78
87
 
88
+ # Auto-match background to screenshot colors
89
+ screenshot-beautify screenshot.png --preset auto
90
+
79
91
  # With sunset gradient
80
92
  screenshot-beautify screenshot.png --preset sunset
81
93
 
package/dist/index.js CHANGED
@@ -754,7 +754,7 @@ program.command("tray <source> <output>").description("Run as a system tray app
754
754
  deleteOriginal: opts.deleteOriginal
755
755
  });
756
756
  });
757
- program.command("file <input>", { isDefault: true }).description("Beautify a single screenshot").option("-o, --output <path>", "Output file path").option("--padding <number>", "Padding around the screenshot", "80").option("--background <path>", "Background image path").option("--preset <name>", "Background preset (run 'presets' to see options)").action(async (input, opts) => {
757
+ program.command("file <input>", { isDefault: true }).description("Beautify a single screenshot").option("-o, --output <path>", "Output file path").option("--padding <number>", "Padding around the screenshot", "80").option("--background <path>", "Background image path").option("--preset <name>", "Background preset (run 'presets' to see options)").option("--delete-original", "Delete original file after beautifying", false).action(async (input, opts) => {
758
758
  try {
759
759
  const inputPath = resolve2(input);
760
760
  const padding = parseInt(opts.padding || "80", 10);
@@ -767,6 +767,11 @@ program.command("file <input>", { isDefault: true }).description("Beautify a sin
767
767
  console.log(`Beautifying: ${inputPath}`);
768
768
  await beautify(inputPath, outputPath, { padding, backgroundImage, backgroundPreset });
769
769
  console.log(`Saved to: ${outputPath}`);
770
+ if (opts.deleteOriginal) {
771
+ const { unlink } = await import("fs/promises");
772
+ await unlink(inputPath);
773
+ console.log(`\u{1F5D1}\uFE0F Deleted original: ${basename2(inputPath)}`);
774
+ }
770
775
  } catch (error) {
771
776
  console.error("Error:", error instanceof Error ? error.message : error);
772
777
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screenshot-beautify",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "CLI tool to beautify screenshots with macOS-style window frames and gradient backgrounds",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",