import { createDynamicContentStore, type DynamicLoaderMap, type DynamicReadContext, type QualifiedDynamicLoaderMap, } from '@intlayer/core/dictionaryManipulator'; import type { Dictionary, DictionarySelector, } from '@intlayer/types/dictionary'; import type { DeclaredLocales, DictionaryKeys, DictionarySelectorForKey, LocalesValues, StrictModeLocaleMap, } from '@intlayer/types/module_augmentation'; import { type MaybeRefOrGetter, shallowRef, toValue, watch } from 'vue'; import { getDictionary } from '../getDictionary'; import type { DeepTransformContent } from '../plugins'; import { createContentProxy, injectIntlayerProvider } from './useDictionary'; /** Content cache shared by every dynamic read of the app. */ const dynamicContentStore = createDynamicContentStore( (dictionary, argument) => getDictionary(dictionary, argument) ); /** * Loads a dynamic read and returns the content proxy over it, reloading on * every change of the call argument, provider locale or provider variant — the * one implementation behind `useDictionaryDynamic` and `useDictionaryAsync`. * * Resolves once the first content is loaded (Vue awaits it in `