@starside-io/verso-core
v0.1.3
Published
Pure resolvers for Verso: path branching, color cascade, content flattening
Readme
@starside-io/verso-core
Pure, side-effect-free helpers for Verso: path branching, color cascade, and content flattening.
What's in here
resolvePath(slides, pathId)— filters a slide list to a single audience pathflattenContent(blocks, pathId)— recursively filters nested blocks bypath_include/path_excluderesolveThemeRef / resolveDeckColors / resolveSlideColors / resolveBlockColors— color cascade from theme → deck → slide → blockcolorsToCssVars(colors)— turns a resolved color set into a CSS custom-property mapresolvePath— safe file-path resolution inside a project root
Install
npm install @starside-io/verso-coreUsage
import { flattenContent, resolveDeckColors } from '@starside-io/verso-core'
const visibleBlocks = flattenContent(slide.content, 'sales')
const colors = resolveDeckColors(theme, manifest.style_overrides)Docs
Part of the Verso monorepo. Apache 2.0.
