import { ContextTrinity } from "../createTrinity/index.mjs"; import { Plugin } from "../createPlugin/index.mjs"; import { ReducedMotionAdapter, ReducedMotionAdapterSetupContext } from "./adapters/adapter.mjs"; import { V0ReducedMotionAdapter } from "./adapters/v0.mjs"; import "./adapters/index.mjs"; import "../index.mjs"; import { Ref, ShallowRef } from "vue"; //#region src/composables/useReducedMotion/index.d.ts type ReducedMotionMode = 'system' | 'always' | 'never'; interface ReducedMotionContext { /** The active mode. `'system'` defers to the OS media query. Change it with `select`. */ readonly selectedMode: Readonly>; /** `true` when motion should be minimized, considering the active `selectedMode`. */ readonly isReduced: Readonly>; /** * Set the active mode. * * @example * ```ts * motion.select('always') * ``` */ select: (mode: ReducedMotionMode) => void; /** * Stop the OS media-query subscription. Affects every consumer of this context; * `isReduced` keeps honoring explicit `always`/`never` modes but stops tracking * the OS in `system` mode. * * @example * ```ts * motion.dispose() * ``` */ dispose: () => void; /** Active reduced-motion adapter. Defaults to `V0ReducedMotionAdapter`. */ adapter: ReducedMotionAdapter; } interface ReducedMotionOptions { /** * Initial mode. * - `'system'` (default) — follow `prefers-reduced-motion` * - `'always'` — always reduce, overrides OS setting * - `'never'` — never reduce, overrides OS setting */ mode?: ReducedMotionMode; /** Adapter for framework-specific side-effects. Defaults to `V0ReducedMotionAdapter`. */ adapter?: ReducedMotionAdapter; } interface ReducedMotionContextOptions extends ReducedMotionOptions { namespace?: string; } interface ReducedMotionPluginOptions extends ReducedMotionContextOptions { persist?: boolean; } /** * Creates a standalone reduced-motion context. * * @param options Initial options. * @returns A `ReducedMotionContext`. * * @see https://0.vuetifyjs.com/composables/plugins/use-reduced-motion * * @example * ```ts * import { createReducedMotion } from '@vuetify/v0' * * const motion = createReducedMotion({ mode: 'system' }) * * console.log(motion.isReduced.value) // true | false * motion.select('always') * ``` */ declare function createReducedMotion(options?: ReducedMotionOptions): ReducedMotionContext; declare const createReducedMotionContext: <_E extends ReducedMotionContext = ReducedMotionContext>(_options?: ReducedMotionPluginOptions | undefined) => ContextTrinity<_E>, createReducedMotionPlugin: (_options?: (ReducedMotionPluginOptions & Pick<{ namespace?: string; persist?: boolean; devtools?: boolean; }, "devtools">) | undefined) => Plugin, useReducedMotion: <_E extends ReducedMotionContext = ReducedMotionContext>(namespace?: string) => _E; //#endregion export { ReducedMotionAdapter, type ReducedMotionAdapterSetupContext, ReducedMotionContext, ReducedMotionContextOptions, ReducedMotionMode, ReducedMotionOptions, ReducedMotionPluginOptions, V0ReducedMotionAdapter, createReducedMotion, createReducedMotionContext, createReducedMotionPlugin, useReducedMotion };