@dioramajs/effects/effect
effect() and defineEffect() without the rest of the effects package.
import { CSS_COLOR, defineEffect, effect } from '@dioramajs/effects/effect'Functions
defineEffect | Checks a definition and returns it as a frozen callable. Registers and loads nothing. Throws `EFFECT_DEFINITION` on a bad definition. |
effect | Short form of `defineEffect`: defaults, optional options, setup. An unnamed effect takes its registry key (the file name when a build plugin finds it). |
isParamDefault | Whether `defineEffect` accepts this as a param default. |
oneOf | String param limited to these values, the first one the default. The same as `oneOf` of the light entry, for effect modules, which must not import it. |
problems | What is wrong with a definition, empty when nothing is. |
Constants
Types
ColorsIn | The spec as setup sees it, with colour strings turned into colour params. |
IsCssColor | True for '#rgb', '#rgba', '#rrggbb', '#rrggbbaa' and rgb()/hsl() strings. |