import { type Ref, type MaybeRef, type ComputedRef } from 'vue'; import { type Locale, type Messages, type Translator } from '@eternalheart/file-preview-core'; import { type LocaleInjection } from '../i18n/localeKey'; /** * 在主组件中调用,向子树注入 locale context */ export declare function provideLocale(locale: MaybeRef, messages?: MaybeRef>> | undefined>): LocaleInjection; /** * 获取翻译函数。在 provider 外使用时自动 fallback 到 en-US。 */ export declare function useTranslator(): { locale: Ref; t: ComputedRef; };