# @dioramajs/diorama/transitions

Exports of @dioramajs/diorama/transitions.

## Functions and values

- [cover](/docs/api/diorama-transitions/cover.md): Preset with the `cover` plugin: the old page leaves and the new one arrives through a GL cover. Needs `effects` and works with the `transitions` preset, which tells it when the page changed.
- [covered](/docs/api/diorama-transitions/covered.md): Closes the cover of `app` and resolves true once the page is covered, for routers that change the page from code: `await covered(app, event); router.push(href)`. Resolves false at once without the plugin, before the app runs, or when the cover can't play.
- [coverPlugin](/docs/api/diorama-transitions/cover-plugin.md): Provides `app.cover`, a GL cover over the page while it changes.
- [coverSettings](/docs/api/diorama-transitions/cover-settings.md): Splits flat options into the look's params and the timing.
- [linkOf](/docs/api/diorama-transitions/link-of.md): The link a plain click follows to another page of this site, if it is one.
- [transition](/docs/api/diorama/transition.md): Calls `app.transition` if the plugin is running, otherwise runs `swap` once and returns a settled 'skipped' transition. Safe for routers that navigate before `app.start()` resolves.
- [TransitionError](/docs/api/diorama-transitions/transition-error.md): Reported through `app.report` (the kernel wraps it as `REPORTED`) or logged in dev.
- [transitionPlugin](/docs/api/diorama-transitions/transition-plugin.md): Provides `app.transition`, page transitions that fly the GL copies of keyed elements.
- [transitions](/docs/api/diorama/transitions.md): Preset with the `transition` plugin, e.g. `presets: [effects(), transitions()]`.

## Types

- [CoverApi](/docs/api/diorama-transitions/types/cover-api.md): The `cover` service.
- [CoverName](/docs/api/diorama-transitions/types/cover-name.md): The ready-made covers.
- [CoverOptions](/docs/api/diorama-transitions/types/cover-options.md): A cover and its timing, e.g. `{ name: 'ink', color: '#e4002b', duration: 0.7 }`.
- [CoverOrigin](/docs/api/diorama-transitions/types/cover-origin.md): Where a cover starts: a click, an element (its centre), or a viewport point in CSS px.
- [CoverSettings](/docs/api/diorama-transitions/types/cover-settings.md): Settings of the `cover` plugin; `cover()` makes them from flat options.
- [CoverState](/docs/api/diorama-transitions/types/cover-state.md): Where the cover is: the page shows, it closes, it hides the page, or it opens.
- [CoverTiming](/docs/api/diorama-transitions/types/cover-timing.md): Timing and behaviour shared by every cover.
- [CurtainCover](/docs/api/diorama-transitions/types/curtain-cover.md): `curtain`: a panel sweeps over the old page and on, off the new one.
- [CustomCover](/docs/api/diorama-transitions/types/custom-cover.md): Your own cover: an effect with a `position` param (0 page shown, 1 covered, 2 shown again), and optionally `x` and `y`, the origin in viewport fractions. It runs on `<html>`.
- [Ease](/docs/api/diorama-transitions/types/ease.md): An easing function from 0..1 to 0..1.
- [Flight](/docs/api/diorama-transitions/types/flight.md): Every write requests a frame, so it can be tweened directly.
- [FlightOptions](/docs/api/diorama-transitions/types/flight-options.md): How copies fly between pages.
- [FlightState](/docs/api/diorama-transitions/types/flight-state.md): State of one flight.
- [InkCover](/docs/api/diorama-transitions/types/ink-cover.md): `ink`: a blot spreads from the clicked link over the page, then recedes off the new one.
- [PageScope](/docs/api/diorama-transitions/types/page-scope.md): The current page: a scope closed when the next page replaces it.
- [PixelCover](/docs/api/diorama-transitions/types/pixel-cover.md): `pixel`: the old page breaks into growing blocks and the new one resolves from them.
- [Presence](/docs/api/diorama-transitions/types/presence.md): An unpaired copy that leaves or a new copy that enters.
- [PresenceOptions](/docs/api/diorama-transitions/types/presence-options.md): How unpaired copies leave and new ones enter.
- [Swap](/docs/api/diorama-transitions/types/swap.md): Changes the DOM. May return a thenable that settles once the router is done.
- [Transition](/docs/api/diorama-transitions/types/transition.md): Thenable. Resolves with the result and never rejects.
- [TransitionApi](/docs/api/diorama-transitions/types/transition-api.md): The `transition` service: call it with a swap to fly copies between pages.
- [TransitionErrorCode](/docs/api/diorama-transitions/types/transition-error-code.md): Codes of `TransitionError`.
- [TransitionOptions](/docs/api/diorama-transitions/types/transition-options.md): Options of one `app.transition` call. Unset fields take the plugin options.
- [TransitionPhase](/docs/api/diorama-transitions/types/transition-phase.md): Phase of a transition: the swap runs, copies fly, or it is over.
- [TransitionResult](/docs/api/diorama-transitions/types/transition-result.md): How a transition ended.
- [TransitionsOptions](/docs/api/diorama-transitions/types/transitions-options.md): Options of the `transitions` preset.
