import { DeepMaybeObservable, Supportable, PermissionAware, ReadonlyObservable } from '@usels/core'; import { ConfigurableWindow } from '../../shared/configurable.mjs'; import '@legendapp/state'; type UseDeviceOrientationOptions = ConfigurableWindow; interface UseDeviceOrientationReturn extends Supportable, PermissionAware { /** * Whether the device has real orientation sensor hardware. * `isSupported` only checks API availability — desktop browsers expose the API * but fire events with all-null values when no hardware exists. * `hasRealData$` becomes `true` on the first event where any of alpha/beta/gamma is non-null. */ hasRealData$: ReadonlyObservable; /** Whether the orientation data is absolute (relative to the Earth's coordinate frame) */ isAbsolute$: ReadonlyObservable; /** Rotation around the z-axis in degrees (0–360) */ alpha$: ReadonlyObservable; /** Rotation around the x-axis in degrees (-180–180) */ beta$: ReadonlyObservable; /** Rotation around the y-axis in degrees (-90–90) */ gamma$: ReadonlyObservable; } /** * Framework-agnostic reactive wrapper around the * [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent). * * Resolves the target window via `resolveWindowSource`, exposes orientation * angles as observables, and integrates with the iOS permission flow via * `createPermissionAware`. */ declare function createDeviceOrientation(options?: DeepMaybeObservable): UseDeviceOrientationReturn; export { type UseDeviceOrientationOptions, type UseDeviceOrientationReturn, createDeviceOrientation };