- Name
backstopPending- Kind
- property
- Type
boolean- Requirement
- required
DocsAPI referenceUI machinesreveal
reveal machine
The public state machine contract for @grassroot/ui-machines/reveal. The machine owns behaviour; the matching headless layer owns composition.
@grassroot/ui-machines/reveal
Package
Service example
reveal.tsts
import { createService } from "@grassroot/statechart";import { revealMachine } from "@grassroot/ui-machines/reveal"; const service = createService(revealMachine, { input: {} });service.start();service.send({ type: "…" });service.stop();14 of 14
Exports
REVEAL_BACKSTOP_DELAY_MS
valueREVEAL_BACKSTOP_DELAY_MSts
export declare const REVEAL_BACKSTOP_DELAY_MS: 1200;REVEAL_BACKSTOP_KEY
valueREVEAL_BACKSTOP_KEYts
export declare const REVEAL_BACKSTOP_KEY: "reveal.backstop";RevealCommand
typeRevealCommandts
type RevealCommand = (CommandObject & { readonly type: "OBSERVE_START";}) | (CommandObject & { readonly type: "OBSERVE_STOP";}) | (CommandObject & { readonly type: "REVEALED"; readonly reason: RevealReason;}) | ScheduleCommand<RevealEvent> | CancelCommand;RevealContext
typeRevealContextts
type RevealContext = { readonly observing: boolean; readonly backstopPending: boolean;};Name
Kind
Type
Requirement
backstopPendingproperty
booleanrequired
observingproperty
booleanrequired
- Name
observing- Kind
- property
- Type
boolean- Requirement
- required
RevealDiagnosticCodes
valueRevealDiagnosticCodests
export declare const RevealDiagnosticCodes: readonly DiagnosticCatalogueEntry[];RevealEvent
typeRevealEventts
type RevealEvent = { readonly type: "START";} | { readonly type: "VIEWPORT_INTERSECT";} | { readonly type: "BACKSTOP";} | { readonly type: "REVEAL";} | { readonly type: "STOP";};RevealInput
typeRevealInputts
type RevealInput = { /** Controller-reported reduced-motion preference. Not a MediaQueryList. */ readonly prefersReducedMotion?: boolean; /** Controller-reported IntersectionObserver support. */ readonly hasObserver?: boolean;};Name
Kind
Type
Requirement
Description
hasObserverproperty
booleanoptional
Controller-reported IntersectionObserver support.
prefersReducedMotionproperty
booleanoptional
Controller-reported reduced-motion preference. Not a MediaQueryList.
- Name
hasObserver- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Controller-reported IntersectionObserver support.
- Name
prefersReducedMotion- Kind
- property
- Type
boolean- Requirement
- optional
- Description
- Controller-reported reduced-motion preference. Not a MediaQueryList.
revealMachine
valuerevealMachinets
export declare const revealMachine: RevealMachine;RevealMachine
typeRevealMachinets
type RevealMachine = Machine<RevealInput, RevealStateValue, RevealContext, RevealEvent, RevealCommand>;RevealReason
typeRevealReasonts
type RevealReason = "immediate" | "intersection" | "backstop" | "manual";revealReplaySequence
valuerevealReplaySequencets
export declare const revealReplaySequence: readonly RevealEvent[];revealSelectors
valuerevealSelectorsts
export declare const revealSelectors: { shown: (snapshot: RevealSnapshot) => boolean; observing: (snapshot: RevealSnapshot) => boolean; backstopPending: (snapshot: RevealSnapshot) => boolean;};Name
Kind
Type
Requirement
backstopPendingproperty
(snapshot: RevealSnapshot) => booleanrequired
observingproperty
(snapshot: RevealSnapshot) => booleanrequired
shownproperty
(snapshot: RevealSnapshot) => booleanrequired
- Name
backstopPending- Kind
- property
- Type
(snapshot: RevealSnapshot) => boolean- Requirement
- required
- Name
observing- Kind
- property
- Type
(snapshot: RevealSnapshot) => boolean- Requirement
- required
- Name
shown- Kind
- property
- Type
(snapshot: RevealSnapshot) => boolean- Requirement
- required
RevealSnapshot
typeRevealSnapshotts
type RevealSnapshot = Snapshot<RevealStateValue, RevealContext>;RevealStateValue
typeRevealStateValuets
type RevealStateValue = "hidden" | "shown";