/** * Reactive device motion and orientation sensors. * * Provides reactive signals for accelerometer, gyroscope, and * compass data via the DeviceMotion and DeviceOrientation APIs. * * @module bquery/media */ import type { DeviceMotionSignal, DeviceOrientationSignal } from './types'; /** * Returns a reactive signal tracking device motion (accelerometer + gyroscope). * * Uses the `devicemotion` event to provide acceleration, acceleration * including gravity, and rotation rate data. * * @returns A readonly reactive signal with motion sensor data and a `destroy()` * method to remove the underlying event listener * * @example * ```ts * import { useDeviceMotion } from '@bquery/bquery/media'; * import { effect } from '@bquery/bquery/reactive'; * * const motion = useDeviceMotion(); * effect(() => { * const { acceleration } = motion.value; * console.log(`Acceleration: x=${acceleration.x}, y=${acceleration.y}, z=${acceleration.z}`); * }); * ``` */ export declare const useDeviceMotion: () => DeviceMotionSignal; /** * Returns a reactive signal tracking device orientation (compass/gyroscope). * * Uses the `deviceorientation` event to provide alpha (compass heading), * beta (front-to-back tilt), and gamma (left-to-right tilt) data. * * @returns A readonly reactive signal with orientation data and a `destroy()` * method to remove the underlying event listener * * @example * ```ts * import { useDeviceOrientation } from '@bquery/bquery/media'; * import { effect } from '@bquery/bquery/reactive'; * * const orientation = useDeviceOrientation(); * effect(() => { * console.log(`Compass heading: ${orientation.value.alpha}°`); * console.log(`Tilt: ${orientation.value.beta}° / ${orientation.value.gamma}°`); * }); * ``` */ export declare const useDeviceOrientation: () => DeviceOrientationSignal; //# sourceMappingURL=device-sensors.d.ts.map