API reference
Exports of @sigx/lynx-updates-ui v0.7.0.
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:
- UpdateGate — full-screen blocking gate for mandatory updates.
- UpdatePrompt — modal offering an optional update.
- UpdateProgress — inline download-progress bar.
- UpdateReadyBanner — bottom "restart to update" banner.
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.
export function isDismissed(id: string): Promise<boolean>;
dismiss
Record that the update with this id was dismissed ("Later").
export function dismiss(id: string): Promise<void>;
DISMISSED_KEY_PREFIX
The storage key prefix — the full key is __sigx_updates_dismissed:<update id>.
export const DISMISSED_KEY_PREFIX = '__sigx_updates_dismissed:';
Types
UpdateApplyOn
When a downloaded update takes effect after the user taps "Update" in UpdatePrompt.
export type UpdateApplyOn = 'restart' | 'next-launch';
The prop types — UpdateGateProps, UpdatePromptProps, UpdateProgressProps, UpdateReadyBannerProps — are documented inline on each component's page.
