DomInterpolators

The DOM's InterpolatorRegistry: core's value kinds with the DOM's colours and complex values, and the DOM's Key rules. layer is what DomLive provides; all is its kinds, in the order they're tried.

import * as DomInterpolators from "@wardic/dom/DomInterpolators"

const registry = yield* InterpolatorRegistry.make(DomInterpolators.all, DomKeyRules.all)
const blend = yield* registry.resolve("#bf616a", "#a3be8c")
blend(0.5) // the colour halfway

Variables

all

const all: ReadonlyArray<Interpolator.Entry<any, any>>;

The DOM's kinds of value, in the order they're tried: core's number, array and unit, the DOM's colours before the unit, so "#fff" is a colour, and the DOM's complex values last.


layer

const layer: Layer.Layer<InterpolatorRegistry.InterpolatorRegistry>;

The DOM's InterpolatorRegistry: its kinds (interpolators) and its Key rules (keyRules). DomLive provides it.