EffectMeta interface
One effect in `meta.json`: what the definition says plus its `.doc.ts`.
import type { EffectMeta } from '@dioramajs/diorama/effects'interface EffectMetaMembers
| Name | Type | Description |
|---|---|---|
readonly bleed | number | Extra px around the box for visibility. |
readonly builtIn | boolean | start() registers it without options. |
readonly category | EffectCategory | The gallery group, from |
readonly children? | readonly ChildDoc[] | Attributes and child elements the effect reads, from |
readonly cost | { readonly chunk: number; readonly data?: number; readonly gpu: string; readonly memory: string } | chunk: bytes min+gzip of the effect's lazy chunk, three external, data included; data: the bundled data part of it, if any. |
readonly credits? | string | Credits for bundled data, from |
readonly events? | readonly EventDoc[] | DOM events the effect dispatches, from |
readonly examples | readonly DocExample[] | Examples from |
readonly frames | { readonly note: string; readonly policy: 'function' | 'hover' | 'input' | 'update' | 'visible' | 'fps' } | The frame policy and a note for people. 'update': the update's answer decides. |
readonly import | string | '@dioramajs/media/reveal', for |
readonly inputs | readonly string[] | Inputs the effect reads, from the probe: 'progress', 'presence', 'pointer', 'delta'… |
readonly looks | string | What it looks like, two to four sentences. |
readonly media? | boolean | Needs the <img> or <video> as a texture. |
readonly module | 'media' | 'text' | 'audio' | 'data' | 'backgrounds' | 'model' | Module name. |
readonly name | string | The token in |
readonly on? | string | Selector of the elements the effect accepts. |
readonly package | string | npm package, '@dioramajs/media'. |
readonly params | readonly ParamMeta[] | Every param in definition order. |
readonly parts? | readonly PartDoc[] | Shadow parts of the effect's own UI, from |
readonly presence | { readonly mode: 'fade' | 'custom'; readonly note: string } | How the copy enters and leaves pages. |
readonly quality | { readonly min: QualityTier; readonly notes: { high?: string; low?: string; medium?: string } } | The lowest tier and what each tier changes. |
readonly reducedMotion | { readonly mode: 'static' | 'off'; readonly note: string } | Behaviour under reduced motion. |
readonly source | string | Path of the definition in the library repo, for a Source link. |
readonly summary | string | One sentence for the lede and the gallery card. |
readonly tags? | readonly EffectCategory[] | Other groups it also shows in, from |
readonly target | string | What to put it on, for people. |
readonly touch | string | Behaviour on touch devices. |
readonly when? | string | Media query the page must match. |
Also exported from @dioramajs/effects.
Defined in packages/effects/src/doc.ts.