/** * Aureon admin panel entry. * * One bundle, two hosts (see settings-transport.ts for which is which): * * - `page` — the standalone theme options screen. `Admin_Panel::render_root()` * has already printed `#aureon-admin-root` by the time this deferred script * runs, so the single-page app mounts straight into it. * - `customizer` — there is no single-page app here. Every surface is its own * native `WP_Customize_Section`, each mounting that section's React component * into its own control; see `customizer/sections.tsx`. */ import { createRoot } from '@wordpress/element'; import App from './app'; import { isCustomizer } from './settings-transport'; import mountCustomizerSections from './customizer/sections'; import mountStaticFrontPage from './customizer/static-front-page'; import mountSiteIdentity from './customizer/site-identity'; import mountHeaderImage from './customizer/header-image'; import mountBackgroundImage from './customizer/background-image'; import './style.scss'; if ( ! isCustomizer ) { const node = document.getElementById( 'aureon-admin-root' ); if ( node ) { createRoot( node ).render( ); } } else { mountCustomizerSections(); // Core's own "Homepage Settings" and "Site Identity" sections, redesigned // — not one of Aureon's own (see Customizer::SECTIONS), so each mounts // separately. mountStaticFrontPage(); mountSiteIdentity(); mountHeaderImage(); mountBackgroundImage(); }