UNPKG

@wordpress/element

Version:
8 lines (7 loc) 2.84 kB
{ "version": 3, "sources": ["../src/react-platform.ts"], "sourcesContent": ["/**\n * External dependencies\n */\nimport {\n\tcreatePortal,\n\tflushSync,\n\tpreconnect,\n\tprefetchDNS,\n\tpreinit,\n\tpreinitModule,\n\tpreload,\n\tpreloadModule,\n\tuseFormStatus,\n} from 'react-dom';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\n\n/**\n * Creates a portal into which a component can be rendered.\n *\n * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235\n *\n * @param {React.ReactElement} child Any renderable child, such as an element,\n * string, or fragment.\n * @param {HTMLElement} container DOM node into which element should be rendered.\n */\nexport { createPortal };\n\n/**\n * Forces React to flush any updates inside the provided callback synchronously.\n *\n * @param {Function} callback Callback to run synchronously.\n */\nexport { flushSync };\n\n/**\n * Eagerly connect to a server that you expect to load resources from.\n *\n * @since 7.1.0\n * @see https://react.dev/reference/react-dom/preconnect\n */\nexport { preconnect };\n\n/**\n * Eagerly look up the IP of a server that you expect to load resources from.\n *\n * @since 7.1.0\n * @see https://react.dev/reference/react-dom/prefetchDNS\n */\nexport { prefetchDNS };\n\n/**\n * Eagerly fetch and evaluate a stylesheet or external script.\n *\n * @since 7.1.0\n * @see https://react.dev/reference/react-dom/preinit\n */\nexport { preinit };\n\n/**\n * Eagerly fetch and evaluate an ESM module.\n *\n * @since 7.1.0\n * @see https://react.dev/reference/react-dom/preinitModule\n */\nexport { preinitModule };\n\n/**\n * Eagerly fetch a resource such as a stylesheet, font, or external script.\n *\n * @since 7.1.0\n * @see https://react.dev/reference/react-dom/preload\n */\nexport { preload };\n\n/**\n * Eagerly fetch an ESM module that you expect to use.\n *\n * @since 7.1.0\n * @see https://react.dev/reference/react-dom/preloadModule\n */\nexport { preloadModule };\n\n/**\n * Read the status information of the parent form.\n *\n * @since 7.1.0\n * @see https://react.dev/reference/react-dom/hooks/useFormStatus\n */\nexport { useFormStatus };\n\n/**\n * Creates a new React root for the target DOM node.\n *\n * @since 6.2.0 Introduced in WordPress core.\n * @see https://react.dev/reference/react-dom/client/createRoot\n */\nexport { createRoot };\n\n/**\n * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.\n *\n * @since 6.2.0 Introduced in WordPress core.\n * @see https://react.dev/reference/react-dom/client/hydrateRoot\n */\nexport { hydrateRoot };\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAUO;AACP,oBAAwC;", "names": [] }