UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

14 lines (13 loc) 619 B
import { DEFAULT_ENVIRONMENT, useEnvironmentContext } from "../environment/use-environment-context.js"; import { useSyncExternalStore } from "@zag-js/vue"; import { getInteractionModality, trackInteractionModality } from "@zag-js/focus-visible"; //#region src/providers/interaction/use-interaction-modality.ts function useInteractionModality() { const env = useEnvironmentContext(DEFAULT_ENVIRONMENT); return useSyncExternalStore((listener) => trackInteractionModality({ root: env.value.getRootNode(), onChange: listener }), getInteractionModality, () => null); } //#endregion export { useInteractionModality };