Lynx/Modules/OTA Update UI/API reference
@sigx/lynx-updates-ui · Beta · Component library

API reference#

Exports of @sigx/lynx-updates-ui v0.7.0.

TypeScript
import {
  UpdateGate,
  UpdatePrompt,
  UpdateProgress,
  UpdateReadyBanner,
  isDismissed,
  dismiss,
  DISMISSED_KEY_PREFIX,
} from '@sigx/lynx-updates-ui';
import type {
  UpdateGateProps,
  UpdatePromptProps,
  UpdateProgressProps,
  UpdateReadyBannerProps,
  UpdateApplyOn,
} from '@sigx/lynx-updates-ui';

Components#

Each component has its own page with import, usage, props, slots, and events — see the Components catalog:

All four read the reactive useUpdates() state from @sigx/lynx-updates, so there is nothing to wire up beyond defineUpdates().

Dismissal helpers#

Storage-backed "don't ask again" suppression for update prompts. Persistence goes through @sigx/lynx-storage; when the native Storage module is unavailable (web preview, tests) it degrades gracefully to an in-process Set.

isDismissed#

True when the user has dismissed the update with this id before.

TypeScript
export function isDismissed(id: string): Promise<boolean>;

dismiss#

Record that the update with this id was dismissed ("Later").

TypeScript
export function dismiss(id: string): Promise<void>;

DISMISSED_KEY_PREFIX#

The storage key prefix — the full key is __sigx_updates_dismissed:<update id>.

TypeScript
export const DISMISSED_KEY_PREFIX = '__sigx_updates_dismissed:';

Types#

UpdateApplyOn#

When a downloaded update takes effect after the user taps "Update" in UpdatePrompt.

TypeScript
export type UpdateApplyOn = 'restart' | 'next-launch';

The prop types — UpdateGateProps, UpdatePromptProps, UpdateProgressProps, UpdateReadyBannerProps — are documented inline on each component's page.