@blurwind/runtime
v0.4.0
Published
Zero-dependency browser runtime helpers for resolving blurwind placeholders.
Maintainers
Readme
@blurwind/runtime
Zero-dependency browser helpers for resolving blurwind
placeholders. Used internally by framework adapters like
@blurwind/next; depend on it directly if you're building your own.
This package imports no framework and no Node built-ins — it is safe to ship in any client bundle.
Install
pnpm add @blurwind/runtimeAPI
resolvePlaceholder(manifest, src)
Returns the placeholder data: URI for a source, accepting either manifest
shape (the legacy flat Record<string, string> or the versioned Manifest).
import { resolvePlaceholder } from '@blurwind/runtime'
const dataURI = resolvePlaceholder(manifest, '/hero.webp')resolveAnimation(partial?)
Merges a partial animation config over the defaults
({ type: 'fade', durationMs: 400, easing: 'anticipate' }).
import { resolveAnimation } from '@blurwind/runtime'
const animation = resolveAnimation({ durationMs: 250 })Types
LegacyManifest, ManifestLike, PlaceholderEntryLike, AnyManifest,
AnimationConfig, AnimationType.
License
MIT © Benyamin Khodadadi
