- Fix critical security vulnerabilities in vitest and update dependencies
- f079600: Add native i18n locale support:
localesconfig option generates screenshots for multiple languages. Use{locale}in screenshot URLs for path-based routing. Sets browser locale and Accept-Language header per locale. Multiple locales output to{locale}/subdirectories; single locale preserves flat structure.
- 4664d80: Dependency updates and internal build improvements
- 9f0d8f5: Add per-domain element hiding for screenshots
- 311f56f: Improved editor code quality and reliability
- 2dd9e04: fix(integrations): ensure generatePath produces absolute paths for framework components
- 4b691f2: Simplify integration setup: auto-inject manifest via Vite plugin, fix Next.js auto-registration
- c9b3283: Add SvelteKit, Next.js, and Nuxt integrations. New Svelte display component, Next.js webpack plugin with
withHeroshot()config wrapper, and'use client'entry point for React Server Components. Vite plugin now supports SvelteKit'sstatic/directory.
- 7ebd099: Support subdirectory paths in screenshot names. Forward slashes in the
namefield (e.g.,"registry/login-01") now create subdirectories in the output, producingregistry/login-01-light.pnginstead ofregistry-login-01-light.png.
- 2563266: Fix Node 18 compatibility by replacing
import.meta.dirnamewithfileURLToPath(import.meta.url)
- b3ac805: Add annotation support and unified floating ConfigBar
- Draw arrows, rectangles, and ellipses over screenshots with customizable styles
- Unified floating ConfigBar for element properties (padding fill, element fill, border, radius) and annotation styles
- Draggable config bar headers with grip handles
- Border radius capture with transparent PNG corners using CSS clip-path masking
- Color pickers for padding fill, element fill, border color, and annotation stroke/fill
- Annotations rendered in actual screenshot output via SVG overlay injection
- Round fractional padding values to prevent config load crashes
-
16d44cd: Add EventInterceptor for toolbar event isolation (fixes #65)
- Toolbar clicks no longer propagate to page (prevents dropdown closing)
- Picker mode blocks page clicks/keyboard while allowing scroll
- Added smart selector generation with ARIA role support
- Added event recorder for action recording
-
123bdf0: Add
--reduced-motionand--user-agentCLI flags--reduced-motionemulatesprefers-reduced-motion: reduceto disable CSS animations--user-agent <string>sets a custom user agent for mobile or bot testing- Both flags work with one-shot mode and are documented in CLI reference
-
fc97c42: Add demo video to landing page
-
769b699: Switch to Playwright locator API for full selector format support
Shadow DOM piercing now uses
>>(Playwright standard). Legacy>>>syntax still works and is auto-converted.New selector formats supported:
- CSS (default):
.button,#header - Shadow DOM:
host >> .child - XPath:
xpath=//button[@id="submit"] - Text:
text=Submit - Role:
role=button[name="OK"] - Chained:
.modal >> role=button[name="Close"]
- CSS (default):
- 0039201: Enable npm provenance attestations for supply chain security
- adc1e79: Update mobile viewport preset from 375x667 to 430x932 to support modern iPhone 15/16 devices
- Export setManifest from heroshot/docusaurus for Docusaurus plugin client code
- 80582ae: Fix npm publish to include integrations (Vue, React, VitePress, Docusaurus)
-
912ed14: Fix dark mode detection in Vue and React components
Dark screenshots were incorrectly showing on mobile devices with dark OS preference, even when the user explicitly toggled the site to light mode.
The components now follow this priority for theme detection:
- Site theme first - Check
.darkclass (VitePress) ordata-themeattribute (Docusaurus) - System preference second - Only used if framework hasn't set explicit theme
- Default to light - Fallback when nothing is detected
This ensures that when a user explicitly toggles the site theme, the correct screenshot variant is displayed regardless of their OS preference.
- Site theme first - Check
- 02e4379: Add
--headedflag to run browser in visible mode for debugging slow captures or timeout issues
-
6588ffe: Fixed toolbar not appearing when running heroshot (#47). Multiple root causes identified and fixed:
- EDITOR_DIR path bug: Path resolved incorrectly when running from bundled
dist/directory, going outside the package and failing to findeditor/dist/editor.js - Missing explicit injection: The
domcontentloadedevent listener could miss the first page load, leaving users with no toolbar on initial navigation - tsx __name serialization issue: Development mode (
pnpm dev) was broken due to esbuild adding__name()wrappers to nested function properties, which don't exist in browser context - Silent error swallowing: Injection errors were caught but not logged, making debugging impossible
Additional fixes: 5. Version flag returning 0.0.0 (#45): Path to package.json was going up 1 level from
dist/cli/but needed 2 levels to reach package root 6. Action timeout option (#48): Added optionaltimeoutparameter toclick,type,hover,select_option,drag, andfill_formactions for complex component librariesAdded comprehensive tests and documentation to prevent regression.
- EDITOR_DIR path bug: Path resolved incorrectly when running from bundled
-
658d09a: Add hide action, list command, and browser options
bypassCSPenabled by default for reliableevaluateactions- New
hideaction to remove elements before capture - New
heroshot listcommand with--jsonflag - New
browser.reducedMotionoption to disable animations - New
browser.userAgentoption for custom user agent
-
3a28540: Add MCP server for AI agent integration
- New
heroshot mcpcommand to start MCP server via stdio transport - Tools:
heroshot_sync,heroshot_add,heroshot_list,heroshot_snippet,heroshot_remove - Schema-driven with Zod for auto JSON Schema conversion
- New
- Add Sphinx extension for theme-aware screenshots in Python documentation
- New
heroshot.sphinxextension with.. heroshot::and.. heroshot-single::directives - CSS-based theme switching supports Furo, PyData, and
prefers-color-schemefallback - Responsive viewport support via
<picture>elements sorted by width
- New
- ccb499d: Add pre-screenshot actions for interacting with pages before capture. Supports click, type, hover, select_option, press_key, drag, wait, navigate, evaluate, fill_form, handle_dialog, file_upload, and resize actions aligned with Playwright API.
- 76ea4ca: Add
heroshot snippet [pattern]command for generating markdown/HTML snippets for GitHub README and Wiki integration. Generates<picture>elements withprefers-color-schememedia queries for automatic light/dark mode support.
-
48be2ba: Add standalone binary distribution via Bun compile
- Build standalone binaries for 5 platforms: linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64
- Auto-detect system browsers (Chrome, Edge, Chromium) with fallback to Playwright's bundled Chromium
- Binaries are built automatically on GitHub releases via the build-binaries workflow
- No Node.js required to run the standalone binary
-
0b6ef74: Add --workers flag for parallel screenshot capture
- Add
--workers <count>CLI flag to run multiple capture workers concurrently - Speed up large screenshot collections at the cost of more system resources
- Default is 1 (sequential capture, same as before)
- Add
-
1426b83: Refactor codebase into modular structure and improve CLI test coverage
- Extract browser.ts into modular
src/browser/folder - Extract CLI into modular
src/cli/folder - Extract sync into modular
src/sync/folder - Replace string-based page.evaluate with typed functions
- Expand CLI test coverage (9 → 24 tests)
- Remove dead CLI flags (
--omit-background,--timeout) that were never wired through
- Extract browser.ts into modular
- 1e8dfe3: Add
heroshot/virtualTypeScript types for virtual module imports
-
b137b14: New editor features and integration improvements
Editor:
- Add paddingFill and elementFill modes (replaces maskPadding)
- Visual picker improvements
Integrations:
- Vite plugin now auto-registers manifest when virtual module is imported
- Docusaurus plugin injects client module that auto-registers manifest
- Fix: integrations/shared now included in npm package build
Docs:
- Add React, Vue, Markdown integration guides
- SEO improvements: canonical URLs, structured data, favicons
- Dynamic page-level meta tags
- 1d14233: Simplify framework integration setup with auto-manifest registration
- Vite plugin now auto-registers manifest when virtual module is imported
- Docusaurus plugin injects client module that auto-registers manifest
- Updated docs and examples with simplified setup patterns
- Examples now use published npm package instead of workspace link
- Added cache clearing to docs:dev script
- 675edeb: Add framework integrations for Vue, React, VitePress, Docusaurus, and MkDocs
- Vue component with dark mode detection and responsive image support
- React component with the same features
- Vite plugin for automatic manifest injection
- Docusaurus plugin with webpack alias support
- Python/MkDocs macro integration for Material theme
- Minimal example projects for each framework
- ff81ace: Add text overrides and rename toolbar to editor
- Add textOverrides support for inline text editing in screenshots
- Rename toolbar/ to editor/ for clarity
- Merge sidebar and toolbar into unified EditorBar component
- Remove sync command, add --clean flag to default command
- Real-time config saving on screenshot changes
- 751339d: Add one-shot CLI mode for direct URL screenshots without config file
- Capture screenshots directly from URL:
npx heroshot <url> -o output.png - Support for element selection with
--selector - Viewport presets:
--mobile,--tablet,--desktop - Color scheme control:
--light,--dark, or both by default - Retina support with
--retinaflag - Padding, dimensions, and quality options
- Capture screenshots directly from URL:
- 51587cb: - Beautiful terminal UI with
@clack/prompts- animated spinners, progress counters, styled messages- Full-page screenshots by omitting selector (uses Playwright
fullPage: true) - "Both" color scheme is now the default - captures light and dark variants automatically
- Viewport variants -
viewports: ["desktop", "tablet", "mobile"]per-screenshot for multi-size capture heroshot sync <pattern>- filter screenshots by id, name, or filename- Retry flaky screenshots with exponential backoff
- Exit CLI gracefully when browser window is closed manually
- Save browser settings from toolbar UI to config
- Dark mode background detection for padding mask
- Full-page screenshots by omitting selector (uses Playwright
- 23e48a0: Add toolbar improvements: cursor tooltip showing selector while hovering, mask padding option to fill padding areas with detected background color, symmetric resize for padding controls, and redesigned welcome page with URL input bar.
- ec788fd: Update branding colors, documentation content, and add CSS palette with light/dark mode support.
- Add encrypted session support for CI environments (
HEROSHOT_SESSION_KEYenv var) - Add
heroshot session-keycommand to print session key for CI setup - Add retina/device scale factor support (
browser.deviceScaleFactorconfig) - Add VitePress documentation site
- Change default output directory to
heroshots/ - Move config from
heroshot.jsonto.heroshot/config.json - Fix CLI --version to read from package.json dynamically
- 3782abf: Add license section to README