@vishot/core
v0.2.0
Published
Shared Vishot capture contracts and artifact helpers.
Readme
@vishot/core
Shared capture contracts and artifact helpers for Vishot.
What it does
This package owns the reusable protocol shared by source adapters, renderers, and mockup packages:
- artifact types and image artifact creation
- artifact file path normalization and uniqueness checks
- capture-root selector generation
- browser ready signals
- capture-name derivation from browser URLs
- artifact transformer sequencing
How to use
import { captureNameFromUrl, captureRootSelector, markScenarioReady } from '@vishot/core'
import { createImageArtifact } from '@vishot/core/artifacts'Use captureRootSelector(name) to mark DOM regions for browser export, and markScenarioReady() when a scene has finished layout, navigation, and data loading.
Use captureNameFromUrl(url) when direct page capture should derive a stable artifact name from a pathname or hash route.
When to use
- You are writing a Vishot source adapter or renderer.
- You need stable artifact metadata or filename behavior.
- You need shared capture-root or ready-signal helpers.
When not to use
- Use
@vishot/clifor command-line capture workflows. - Use a source or renderer package when you need runtime-specific Playwright behavior.
