Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

kittyhtml

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kittyhtml - npm Package Compare versions

Comparing version
0.3.1
to
0.3.2
+4
-4
package.json
{
"name": "kittyhtml",
"version": "0.3.1",
"version": "0.3.2",
"description": "Render HTML to an image and display it inline in Kitty/iTerm2-capable terminals. No browser — Rust + Blitz layout, headless CPU rasterization.",

@@ -28,5 +28,5 @@ "type": "module",

"optionalDependencies": {
"kittyhtml-darwin-arm64": "0.3.1",
"kittyhtml-darwin-x64": "0.3.1",
"kittyhtml-linux-x64-gnu": "0.3.1"
"kittyhtml-darwin-arm64": "0.3.2",
"kittyhtml-darwin-x64": "0.3.2",
"kittyhtml-linux-x64-gnu": "0.3.2"
},

@@ -33,0 +33,0 @@ "scripts": {

@@ -19,3 +19,4 @@ #!/usr/bin/env node

--height N Fixed canvas height; omit to auto-fit content.
--scale N Pixel ratio for crisper output (default 1; try 2).
--scale N Pixel ratio for crisper output (default: 2 when piping
to a graphics-capable terminal, 1 when writing to file).
--background CSS Fill canvas background before painting (e.g. "#fff").

@@ -50,3 +51,4 @@ --format FMT Output protocol: auto | kitty | iterm2 (default auto).

height: null,
scale: 1,
// null sentinel: filled in after arg parse based on output destination.
scale: null,
background: null,

@@ -91,2 +93,12 @@ format: 'auto',

if (positional[0]) opts.file = positional[0];
if (opts.scale == null) {
// Going to a graphics-capable terminal → assume HiDPI (every modern
// mac and most linux laptops). The terminal will downscale the larger
// PNG to fill the same on-screen area, giving retina-sharp text. File
// output stays at 1:1 since the user knows they want the literal pixel
// count they asked for.
opts.scale = opts.out == null && process.stdout.isTTY ? 2 : 1;
}
return opts;

@@ -93,0 +105,0 @@ }