Releases: omachala/heroshot
[email protected]
Patch Changes
-
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
[email protected]
Minor Changes
-
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
[email protected]
Minor Changes
- 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
[email protected]
Minor Changes
- 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.
[email protected]
Minor Changes
-
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
[email protected]
Patch Changes
- 1e8dfe3: Add
heroshot/virtualTypeScript types for virtual module imports
[email protected]
Minor Changes
- 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
[email protected]
Minor Changes
- 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
[email protected]
Minor Changes
- 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:
[email protected]
Minor Changes
- 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