{"version":3,"file":"ApiQueryProvider.cjs","names":["API_QUERY_CONTEXT"],"sources":["../../../src/api/ApiQueryProvider/ApiQueryProvider.tsx"],"sourcesContent":["import { API_QUERY_CONTEXT } from '../constants';\nimport type { ApiQueryProviderProps } from './types';\n\n/**\n * Provides a `QueryCache` instance to React API hooks through React context.\n *\n * Use this when a subtree should receive a cache directly instead of reading it\n * from `GlobalContext` via `installApiCache`.\n *\n * @param props - Provider props.\n * @param props.queryCache - Cache created by `createQueryCache()`.\n * @param props.children - React subtree that can call `useApiQueryCache()`.\n *\n * @example\n * ```tsx\n * const queryCache = createQueryCache();\n *\n * <ApiQueryProvider queryCache={queryCache}>\n *   <App />\n * </ApiQueryProvider>\n * ```\n */\nexport function ApiQueryProvider(props: ApiQueryProviderProps) {\n  const { queryCache, children } = props;\n\n  return (\n    <API_QUERY_CONTEXT.Provider value={queryCache}>\n      {children}\n    </API_QUERY_CONTEXT.Provider>\n  );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,iBAAiB,OAA8B;CAC7D,MAAM,EAAE,YAAY,aAAa;CAEjC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,sBAAAA,kBAAkB,UAAnB;EAA4B,OAAO;EAChC;CACyB,CAAA;AAEhC"}