{
  "version": 3,
  "sources": ["../../../src/components/async-mode-provider/context.ts"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nexport const Context = createContext( false );\nContext.displayName = 'AsyncModeContext';\n\nconst { Consumer, Provider } = Context;\n\nexport const AsyncModeConsumer = Consumer;\n\n/**\n * Context Provider Component used to switch the data module component rerendering\n * between Sync and Async modes.\n *\n * @example\n *\n * ```js\n * import { useSelect, AsyncModeProvider } from '@wordpress/data';\n * import { store as blockEditorStore } from '@wordpress/block-editor';\n *\n * function BlockCount() {\n *   const count = useSelect( ( select ) => {\n *     return select( blockEditorStore ).getBlockCount()\n *   }, [] );\n *\n *   return count;\n * }\n *\n * function App() {\n *   return (\n *     <AsyncModeProvider value={ true }>\n *       <BlockCount />\n *     </AsyncModeProvider>\n *   );\n * }\n * ```\n *\n * In this example, the BlockCount component is rerendered asynchronously.\n * It means if a more critical task is being performed (like typing in an input),\n * the rerendering is delayed until the browser becomes IDLE.\n * It is possible to nest multiple levels of AsyncModeProvider to fine-tune the rendering behavior.\n *\n * @param {boolean} props.value Enable Async Mode.\n */\nexport default Provider;\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAEvB,IAAM,cAAU,8BAAe,KAAM;AAC5C,QAAQ,cAAc;AAEtB,IAAM,EAAE,UAAU,SAAS,IAAI;AAExB,IAAM,oBAAoB;AAoCjC,IAAO,kBAAQ;",
  "names": []
}
