import { DeepMaybeObservable, ReadonlyObservable } from '@usels/core'; import { MaybeEventTarget } from '../../types.mjs'; type UseParallaxSource = "deviceOrientation" | "mouse"; interface UseParallaxOptions { /** Adjust device orientation tilt value */ deviceOrientationTiltAdjust?: (value: number) => number; /** Adjust device orientation roll value */ deviceOrientationRollAdjust?: (value: number) => number; /** Adjust mouse tilt value */ mouseTiltAdjust?: (value: number) => number; /** Adjust mouse roll value */ mouseRollAdjust?: (value: number) => number; } interface UseParallaxReturn { /** Roll value. Scaled to -0.5 ~ 0.5 */ roll$: ReadonlyObservable; /** Tilt value. Scaled to -0.5 ~ 0.5 */ tilt$: ReadonlyObservable; /** Sensor source: 'deviceOrientation' or 'mouse' */ source$: ReadonlyObservable; } /** * Framework-agnostic parallax tracker. Picks the best available sensor source * (`deviceOrientation` when the device reports live data, otherwise `mouse`) * and exposes reactive `roll$` / `tilt$` observables scaled to -0.5 ~ 0.5. * * Must be called inside a `useScope` factory — it composes * `createDeviceOrientation`, `createScreenOrientation`, and * `createMouseInElement`, all of which register scope-managed listeners. */ declare function createParallax(target: MaybeEventTarget, options?: DeepMaybeObservable): UseParallaxReturn; export { type UseParallaxOptions, type UseParallaxReturn, type UseParallaxSource, createParallax };