CompactLiveActivityPresentationMetadata

Opaque host-facing metadata for a compact live activity's leading accessory.

struct CompactLiveActivityPresentationMetadata

A droplet keeps ownership of the visual by vending it through makeCompactLeading(). The host only needs this small, product-neutral description to give the mounted accessory a stable interaction identity and accessible text. In particular, id is opaque: it is not a provider, phase, icon, or any other product-specific state.

Initializers

init(id:accessibilityLabel:accessibilityValue:)

init(id: String, accessibilityLabel: String, accessibilityValue: String)

Creates compact presentation metadata.

This exact overload is the 0.6.2 ABI entry point. It keeps the legacy automatic-width behavior for already compiled droplets.

init(id:accessibilityLabel:accessibilityValue:preferredWidth:)

init(id: String, accessibilityLabel: String, accessibilityValue: String, preferredWidth: CGFloat?)

Creates compact presentation metadata with a preferred width.

init(id:accessibilityLabel:accessibilityValue:preferredWidth:expandedShelfAutoCollapseDelay:)

init(id: String, accessibilityLabel: String, accessibilityValue: String, preferredWidth: CGFloat?, expandedShelfAutoCollapseDelay: TimeInterval?)

Creates compact presentation metadata with an explicit shelf auto-collapse delay. The original width-aware overload remains above so already compiled 0.6.2 droplets retain its exact symbol.

Properties

accessibilityLabel

let accessibilityLabel: String

Accessible name for the product-owned leading accessory.

accessibilityValue

let accessibilityValue: String

Accessible state or detail for the product-owned leading accessory.

expandedShelfAutoCollapseDelay

let expandedShelfAutoCollapseDelay: TimeInterval?

Optional fixed delay the host should use before auto-collapsing an expanded shelf while this compact activity is live. This is a presentation policy, not a product state leak: the product may ask for a short reading/typing grace without exposing its editor or manager. nil keeps the host's normal user-configured delay.

id

let id: String

Stable identity for this compact presentation while it is live.

preferredWidth

let preferredWidth: CGFloat?

Optional preferred compact width. The host still owns all clamping, placement, and hit testing. This exists for activity text such as a timer whose width cannot be inferred from accessibility metadata.