Primitives / foldkit-primitives/events

Visibility

const · packages/primitives/src/events/visibility.ts:33

Argsnone
Model{ visible: boolean }
MessagesChanged { visible: boolean }
Its full type
const Visibility: Bundle.Bundle<
  'Visibility',
  void,
  { readonly visible: boolean },
  { readonly _tag: 'Changed'; readonly visible: boolean },
  never,
  never,
  never,
  void,
  {},
  {}
>

Page visibility as a bundle: visible in the Model, read from the document at startup and kept current by visibilitychange. A hidden page is the application's cue to pause polling, animations, and realtime streams; the decision stays in application update, not here.

In the guides