@wordpress/boot 0.15.2-next.v.202606191442.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +78 -0
- package/build-module/components/app/index.mjs +10 -5
- package/build-module/components/app/index.mjs.map +2 -2
- package/build-module/components/root/index.mjs +1 -2
- package/build-module/components/root/index.mjs.map +2 -2
- package/build-module/components/root/single-page.mjs +1 -2
- package/build-module/components/root/single-page.mjs.map +2 -2
- package/build-module/index.mjs +3 -3
- package/build-module/index.mjs.map +2 -2
- package/build-style/style-rtl.css +0 -2
- package/build-style/style.css +0 -2
- package/build-types/components/app/index.d.ts +8 -4
- package/build-types/components/app/index.d.ts.map +1 -1
- package/build-types/components/root/index.d.ts.map +1 -1
- package/build-types/components/root/single-page.d.ts.map +1 -1
- package/package.json +25 -25
- package/src/components/app/index.tsx +37 -16
- package/src/components/root/index.tsx +1 -2
- package/src/components/root/single-page.tsx +1 -2
package/CHANGELOG.md
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Boot
|
|
2
|
+
|
|
3
|
+
Minimal boot package for WordPress admin pages.
|
|
4
|
+
It renders a single-page React application into an admin screen
|
|
5
|
+
and wires up its routes, menu items, and startup modules.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install the module
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @wordpress/boot --save
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
The package exposes two entry points, one per admin page layout.
|
|
18
|
+
A page's generated PHP imports `@wordpress/boot` and calls the matching
|
|
19
|
+
function with the page configuration.
|
|
20
|
+
The pages themselves are declared through the [`@wordpress/build` pages configuration](https://github.com/WordPress/gutenberg/tree/HEAD/packages/wp-build/README.md).
|
|
21
|
+
|
|
22
|
+
### `init`
|
|
23
|
+
|
|
24
|
+
Boots a full-screen application that takes over the admin screen with its own sidebar navigation. Used by pages generated in full-page mode (`page.php`).
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { init } from '@wordpress/boot';
|
|
28
|
+
|
|
29
|
+
init( {
|
|
30
|
+
mountId: 'my-page-app',
|
|
31
|
+
menuItems,
|
|
32
|
+
routes,
|
|
33
|
+
initModules,
|
|
34
|
+
dashboardLink,
|
|
35
|
+
} );
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### `initSinglePage`
|
|
39
|
+
|
|
40
|
+
Boots an application embedded inside the standard wp-admin chrome, without the full-screen sidebar. Used by pages generated in wp-admin mode (`page-wp-admin.php`).
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import { initSinglePage } from '@wordpress/boot';
|
|
44
|
+
|
|
45
|
+
initSinglePage( {
|
|
46
|
+
mountId: 'my-page-app',
|
|
47
|
+
routes,
|
|
48
|
+
initModules,
|
|
49
|
+
} );
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Both functions follow the same startup sequence:
|
|
53
|
+
|
|
54
|
+
1. Register the page's `menuItems` and `routes` in the store.
|
|
55
|
+
2. Run the page's init modules (see below).
|
|
56
|
+
3. Render the application into `mountId`.
|
|
57
|
+
|
|
58
|
+
## Init modules
|
|
59
|
+
|
|
60
|
+
Init modules are script modules that run a one-time setup step at page startup, after menu items and routes are registered and before the app renders. They are useful for tasks that cannot be expressed in the page's static PHP configuration, such as assigning menu-item icons or registering core-data entities.
|
|
61
|
+
|
|
62
|
+
Pass them as the `initModules` array. Each module must export an async `init` function:
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
export async function init() {
|
|
66
|
+
// One-time startup work.
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Init modules are declared per page through the `wpPlugin.pages[].init` build configuration, which loads them as static dependencies and forwards their IDs to `init` and `initSinglePage`. See the [`@wordpress/build` init modules documentation](https://github.com/WordPress/gutenberg/tree/HEAD/packages/wp-build/README.md) for the configuration details.
|
|
71
|
+
|
|
72
|
+
## Contributing to this package
|
|
73
|
+
|
|
74
|
+
This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
|
|
75
|
+
|
|
76
|
+
To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).
|
|
77
|
+
|
|
78
|
+
<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
|
|
@@ -9,6 +9,12 @@ function App({ rootComponent }) {
|
|
|
9
9
|
const routes = useSelect((select) => select(store).getRoutes(), []);
|
|
10
10
|
return /* @__PURE__ */ jsx(Router, { routes, rootComponent });
|
|
11
11
|
}
|
|
12
|
+
async function runInitModules(initModules) {
|
|
13
|
+
for (const moduleId of initModules ?? []) {
|
|
14
|
+
const module = await import(moduleId);
|
|
15
|
+
await module.init();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
12
18
|
async function init({
|
|
13
19
|
mountId,
|
|
14
20
|
menuItems,
|
|
@@ -25,10 +31,7 @@ async function init({
|
|
|
25
31
|
if (dashboardLink) {
|
|
26
32
|
dispatch(store).setDashboardLink(dashboardLink);
|
|
27
33
|
}
|
|
28
|
-
|
|
29
|
-
const module = await import(moduleId);
|
|
30
|
-
await module.init();
|
|
31
|
-
}
|
|
34
|
+
await runInitModules(initModules);
|
|
32
35
|
const rootElement = document.getElementById(mountId);
|
|
33
36
|
if (rootElement) {
|
|
34
37
|
const root = createRoot(rootElement);
|
|
@@ -39,11 +42,13 @@ async function init({
|
|
|
39
42
|
}
|
|
40
43
|
async function initSinglePage({
|
|
41
44
|
mountId,
|
|
42
|
-
routes
|
|
45
|
+
routes,
|
|
46
|
+
initModules
|
|
43
47
|
}) {
|
|
44
48
|
(routes ?? []).forEach((route) => {
|
|
45
49
|
dispatch(store).registerRoute(route);
|
|
46
50
|
});
|
|
51
|
+
await runInitModules(initModules);
|
|
47
52
|
const rootElement = document.getElementById(mountId);
|
|
48
53
|
if (rootElement) {
|
|
49
54
|
const root = createRoot(rootElement);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/app/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createRoot, StrictMode, type ComponentType } from '@wordpress/element';\nimport { dispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Router from './router';\nimport RootSinglePage from '../root/single-page';\nimport { store } from '../../store';\nimport type { MenuItem, Route } from '../../store/types';\n\nfunction App( { rootComponent }:
|
|
5
|
-
"mappings": ";AAGA,SAAS,YAAY,kBAAsC;AAC3D,SAAS,UAAU,iBAAiB;AAKpC,OAAO,YAAY;AACnB,OAAO,oBAAoB;AAC3B,SAAS,aAAa;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createRoot, StrictMode, type ComponentType } from '@wordpress/element';\nimport { dispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Router from './router';\nimport RootSinglePage from '../root/single-page';\nimport { store } from '../../store';\nimport type { MenuItem, Route } from '../../store/types';\n\ninterface AppProps {\n\trootComponent?: ComponentType;\n}\n\nfunction App( { rootComponent }: AppProps ) {\n\tconst routes = useSelect( ( select ) => select( store ).getRoutes(), [] );\n\n\treturn <Router routes={ routes } rootComponent={ rootComponent } />;\n}\n\n/*\n * Import and run page init modules.\n * Each module must export an async `init` function,\n * awaited before the app renders so startup tasks finish first.\n */\nasync function runInitModules( initModules?: string[] ) {\n\tfor ( const moduleId of initModules ?? [] ) {\n\t\tconst module = await import( moduleId );\n\t\tawait module.init();\n\t}\n}\n\ninterface InitProps {\n\tmountId: string;\n\tmenuItems?: MenuItem[];\n\troutes?: Route[];\n\tinitModules?: string[];\n\tdashboardLink?: string;\n}\n\nexport async function init( {\n\tmountId,\n\tmenuItems,\n\troutes,\n\tinitModules,\n\tdashboardLink,\n}: InitProps ) {\n\t( menuItems ?? [] ).forEach( ( menuItem ) => {\n\t\tdispatch( store ).registerMenuItem( menuItem.id, menuItem );\n\t} );\n\n\t( routes ?? [] ).forEach( ( route ) => {\n\t\tdispatch( store ).registerRoute( route );\n\t} );\n\n\tif ( dashboardLink ) {\n\t\tdispatch( store ).setDashboardLink( dashboardLink );\n\t}\n\n\tawait runInitModules( initModules );\n\n\t// Render the app\n\tconst rootElement = document.getElementById( mountId );\n\tif ( rootElement ) {\n\t\tconst root = createRoot( rootElement );\n\t\troot.render(\n\t\t\t<StrictMode>\n\t\t\t\t<App />\n\t\t\t</StrictMode>\n\t\t);\n\t}\n}\n\ninterface InitSinglePageProps {\n\tmountId: string;\n\troutes?: Route[];\n\tinitModules?: string[];\n}\n\nexport async function initSinglePage( {\n\tmountId,\n\troutes,\n\tinitModules,\n}: InitSinglePageProps ) {\n\t( routes ?? [] ).forEach( ( route ) => {\n\t\tdispatch( store ).registerRoute( route );\n\t} );\n\n\tawait runInitModules( initModules );\n\n\t// Render the app without sidebar\n\tconst rootElement = document.getElementById( mountId );\n\tif ( rootElement ) {\n\t\tconst root = createRoot( rootElement );\n\t\troot.render(\n\t\t\t<StrictMode>\n\t\t\t\t<App rootComponent={ RootSinglePage } />\n\t\t\t</StrictMode>\n\t\t);\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,YAAY,kBAAsC;AAC3D,SAAS,UAAU,iBAAiB;AAKpC,OAAO,YAAY;AACnB,OAAO,oBAAoB;AAC3B,SAAS,aAAa;AAUd;AAHR,SAAS,IAAK,EAAE,cAAc,GAAc;AAC3C,QAAM,SAAS,UAAW,CAAE,WAAY,OAAQ,KAAM,EAAE,UAAU,GAAG,CAAC,CAAE;AAExE,SAAO,oBAAC,UAAO,QAAkB,eAAgC;AAClE;AAOA,eAAe,eAAgB,aAAyB;AACvD,aAAY,YAAY,eAAe,CAAC,GAAI;AAC3C,UAAM,SAAS,MAAM,OAAQ;AAC7B,UAAM,OAAO,KAAK;AAAA,EACnB;AACD;AAUA,eAAsB,KAAM;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAe;AACd,GAAE,aAAa,CAAC,GAAI,QAAS,CAAE,aAAc;AAC5C,aAAU,KAAM,EAAE,iBAAkB,SAAS,IAAI,QAAS;AAAA,EAC3D,CAAE;AAEF,GAAE,UAAU,CAAC,GAAI,QAAS,CAAE,UAAW;AACtC,aAAU,KAAM,EAAE,cAAe,KAAM;AAAA,EACxC,CAAE;AAEF,MAAK,eAAgB;AACpB,aAAU,KAAM,EAAE,iBAAkB,aAAc;AAAA,EACnD;AAEA,QAAM,eAAgB,WAAY;AAGlC,QAAM,cAAc,SAAS,eAAgB,OAAQ;AACrD,MAAK,aAAc;AAClB,UAAM,OAAO,WAAY,WAAY;AACrC,SAAK;AAAA,MACJ,oBAAC,cACA,8BAAC,OAAI,GACN;AAAA,IACD;AAAA,EACD;AACD;AAQA,eAAsB,eAAgB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACD,GAAyB;AACxB,GAAE,UAAU,CAAC,GAAI,QAAS,CAAE,UAAW;AACtC,aAAU,KAAM,EAAE,cAAe,KAAM;AAAA,EACxC,CAAE;AAEF,QAAM,eAAgB,WAAY;AAGlC,QAAM,cAAc,SAAS,eAAgB,OAAQ;AACrD,MAAK,aAAc;AAClB,UAAM,OAAO,WAAY,WAAY;AACrC,SAAK;AAAA,MACJ,oBAAC,cACA,8BAAC,OAAI,eAAgB,gBAAiB,GACvC;AAAA,IACD;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,7 +14,7 @@ import { useState, useEffect, useMemo } from "@wordpress/element";
|
|
|
14
14
|
import { __ } from "@wordpress/i18n";
|
|
15
15
|
import { Page, getAdminThemeColors } from "@wordpress/admin-ui";
|
|
16
16
|
import { Tooltip } from "@wordpress/ui";
|
|
17
|
-
import {
|
|
17
|
+
import { ThemeProvider } from "@wordpress/theme";
|
|
18
18
|
import Sidebar from "../sidebar/index.mjs";
|
|
19
19
|
import SavePanel from "../save-panel/index.mjs";
|
|
20
20
|
import CanvasRenderer from "../canvas-renderer/index.mjs";
|
|
@@ -32,7 +32,6 @@ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !docum
|
|
|
32
32
|
// packages/boot/src/components/root/index.tsx
|
|
33
33
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
34
|
var { useLocation, useMatches, Outlet } = unlock(routePrivateApis);
|
|
35
|
-
var { ThemeProvider } = unlock(themePrivateApis);
|
|
36
35
|
function Root() {
|
|
37
36
|
const matches = useMatches();
|
|
38
37
|
const location = useLocation();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/root/index.tsx", "../../../src/components/root/style.scss"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as routePrivateApis } from '@wordpress/route';\nimport { SnackbarNotices } from '@wordpress/notices';\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\tButton,\n\tSlotFillProvider,\n} from '@wordpress/components';\nimport { menu } from '@wordpress/icons';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Page, getAdminThemeColors } from '@wordpress/admin-ui';\nimport { Tooltip } from '@wordpress/ui';\nimport { privateApis as themePrivateApis } from '@wordpress/theme';\n\n/**\n * Internal dependencies\n */\nimport Sidebar from '../sidebar';\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport useRouteTitle from '../app/use-route-title';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport './style.scss';\n\nconst { useLocation, useMatches, Outlet } = unlock( routePrivateApis );\nconst { ThemeProvider } = unlock( themePrivateApis );\n\nexport default function Root() {\n\tconst matches = useMatches();\n\tconst location = useLocation();\n\tconst currentMatch = matches[ matches.length - 1 ];\n\tconst canvas = ( currentMatch?.loaderData as any )?.canvas as\n\t\t| CanvasData\n\t\t| null\n\t\t| undefined;\n\tconst routeContentModule = ( currentMatch?.loaderData as any )\n\t\t?.routeContentModule as string | undefined;\n\tconst isFullScreen = canvas && ! canvas.isPreview;\n\n\tuseRouteTitle();\n\n\t// Mobile sidebar state\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ isMobileSidebarOpen, setIsMobileSidebarOpen ] = useState( false );\n\tconst disableMotion = useReducedMotion();\n\t// Close mobile sidebar on viewport resize and path change\n\tuseEffect( () => {\n\t\tsetIsMobileSidebarOpen( false );\n\t}, [ location.pathname, isMobileViewport ] );\n\n\tconst themeColors = useMemo( getAdminThemeColors, [] );\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<Tooltip.Provider>\n\t\t\t\t<ThemeProvider\n\t\t\t\t\tisRoot\n\t\t\t\t\tcolor={ { ...themeColors, background: '#f8f8f8' } }\n\t\t\t\t>\n\t\t\t\t\t<ThemeProvider color={ themeColors }>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ clsx( 'boot-layout', {\n\t\t\t\t\t\t\t\t'has-canvas': !! canvas || canvas === null,\n\t\t\t\t\t\t\t\t'has-full-canvas': isFullScreen,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t\t<SnackbarNotices className=\"boot-notices__snackbar\" />\n\t\t\t\t\t\t\t{ isMobileViewport && (\n\t\t\t\t\t\t\t\t<Page.SidebarToggleFill>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ticon={ menu }\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen( true )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Open navigation panel' ) }\n\t\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Page.SidebarToggleFill>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ /* Mobile Sidebar Backdrop */ }\n\t\t\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t\t\t{ isMobileViewport &&\n\t\t\t\t\t\t\t\t\tisMobileSidebarOpen &&\n\t\t\t\t\t\t\t\t\t! isFullScreen && (\n\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\tinitial={ { opacity: 0 } }\n\t\t\t\t\t\t\t\t\t\t\tanimate={ { opacity: 1 } }\n\t\t\t\t\t\t\t\t\t\t\texit={ { opacity: 0 } }\n\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 0.2,\n\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"boot-layout__sidebar-backdrop\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen( false )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\t\t\tif ( event.key === 'Escape' ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Close navigation panel'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t\t\t{ /* Mobile Sidebar */ }\n\t\t\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t\t\t{ isMobileViewport &&\n\t\t\t\t\t\t\t\t\tisMobileSidebarOpen &&\n\t\t\t\t\t\t\t\t\t! isFullScreen && (\n\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\tinitial={ { x: '-100%' } }\n\t\t\t\t\t\t\t\t\t\t\tanimate={ { x: 0 } }\n\t\t\t\t\t\t\t\t\t\t\texit={ { x: '-100%' } }\n\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 0.2,\n\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"boot-layout__sidebar is-mobile\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t\t\t{ /* Desktop Sidebar */ }\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! isFullScreen && (\n\t\t\t\t\t\t\t\t<div className=\"boot-layout__sidebar\">\n\t\t\t\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<div className=\"boot-layout__surfaces\">\n\t\t\t\t\t\t\t\t<ThemeProvider\n\t\t\t\t\t\t\t\t\tcolor={ {\n\t\t\t\t\t\t\t\t\t\t...themeColors,\n\t\t\t\t\t\t\t\t\t\tbackground: '#ffffff',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Outlet />\n\t\t\t\t\t\t\t\t\t{ /* Render Canvas in Root to prevent remounting on route changes */ }\n\t\t\t\t\t\t\t\t\t{ ( canvas || canvas === null ) && (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t'boot-layout__canvas',\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t'has-mobile-drawer':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanvas?.isPreview &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisMobileViewport,\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ canvas?.isPreview &&\n\t\t\t\t\t\t\t\t\t\t\t\tisMobileViewport && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"boot-layout__mobile-sidebar-drawer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ menu }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Open navigation panel'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t<CanvasRenderer\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas={ canvas }\n\t\t\t\t\t\t\t\t\t\t\t\trouteContentModule={\n\t\t\t\t\t\t\t\t\t\t\t\t\trouteContentModule\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ThemeProvider>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ThemeProvider>\n\t\t\t\t</ThemeProvider>\n\t\t\t</Tooltip.Provider>\n\t\t</SlotFillProvider>\n\t);\n}\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a66cc68f6f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a66cc68f6f\");\n\tstyle.appendChild(document.createTextNode(\".boot-layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}\"));\n\tdocument.head.appendChild(style);\n}\n"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,eAAe,wBAAwB;AAChD,SAAS,uBAAuB;AAChC,SAAS,kBAAkB,wBAAwB;AACnD;AAAA,EACC,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B;AAAA,EACA;AAAA,OACM;AACP,SAAS,YAAY;AACrB,SAAS,UAAU,WAAW,eAAe;AAC7C,SAAS,UAAU;AACnB,SAAS,MAAM,2BAA2B;AAC1C,SAAS,eAAe;AACxB,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as routePrivateApis } from '@wordpress/route';\nimport { SnackbarNotices } from '@wordpress/notices';\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\tButton,\n\tSlotFillProvider,\n} from '@wordpress/components';\nimport { menu } from '@wordpress/icons';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Page, getAdminThemeColors } from '@wordpress/admin-ui';\nimport { Tooltip } from '@wordpress/ui';\nimport { ThemeProvider } from '@wordpress/theme';\n\n/**\n * Internal dependencies\n */\nimport Sidebar from '../sidebar';\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport useRouteTitle from '../app/use-route-title';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport './style.scss';\n\nconst { useLocation, useMatches, Outlet } = unlock( routePrivateApis );\n\nexport default function Root() {\n\tconst matches = useMatches();\n\tconst location = useLocation();\n\tconst currentMatch = matches[ matches.length - 1 ];\n\tconst canvas = ( currentMatch?.loaderData as any )?.canvas as\n\t\t| CanvasData\n\t\t| null\n\t\t| undefined;\n\tconst routeContentModule = ( currentMatch?.loaderData as any )\n\t\t?.routeContentModule as string | undefined;\n\tconst isFullScreen = canvas && ! canvas.isPreview;\n\n\tuseRouteTitle();\n\n\t// Mobile sidebar state\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ isMobileSidebarOpen, setIsMobileSidebarOpen ] = useState( false );\n\tconst disableMotion = useReducedMotion();\n\t// Close mobile sidebar on viewport resize and path change\n\tuseEffect( () => {\n\t\tsetIsMobileSidebarOpen( false );\n\t}, [ location.pathname, isMobileViewport ] );\n\n\tconst themeColors = useMemo( getAdminThemeColors, [] );\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<Tooltip.Provider>\n\t\t\t\t<ThemeProvider\n\t\t\t\t\tisRoot\n\t\t\t\t\tcolor={ { ...themeColors, background: '#f8f8f8' } }\n\t\t\t\t>\n\t\t\t\t\t<ThemeProvider color={ themeColors }>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ clsx( 'boot-layout', {\n\t\t\t\t\t\t\t\t'has-canvas': !! canvas || canvas === null,\n\t\t\t\t\t\t\t\t'has-full-canvas': isFullScreen,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t\t<SnackbarNotices className=\"boot-notices__snackbar\" />\n\t\t\t\t\t\t\t{ isMobileViewport && (\n\t\t\t\t\t\t\t\t<Page.SidebarToggleFill>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ticon={ menu }\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen( true )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Open navigation panel' ) }\n\t\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Page.SidebarToggleFill>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ /* Mobile Sidebar Backdrop */ }\n\t\t\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t\t\t{ isMobileViewport &&\n\t\t\t\t\t\t\t\t\tisMobileSidebarOpen &&\n\t\t\t\t\t\t\t\t\t! isFullScreen && (\n\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\tinitial={ { opacity: 0 } }\n\t\t\t\t\t\t\t\t\t\t\tanimate={ { opacity: 1 } }\n\t\t\t\t\t\t\t\t\t\t\texit={ { opacity: 0 } }\n\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 0.2,\n\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"boot-layout__sidebar-backdrop\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen( false )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\t\t\tif ( event.key === 'Escape' ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Close navigation panel'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t\t\t{ /* Mobile Sidebar */ }\n\t\t\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t\t\t{ isMobileViewport &&\n\t\t\t\t\t\t\t\t\tisMobileSidebarOpen &&\n\t\t\t\t\t\t\t\t\t! isFullScreen && (\n\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\tinitial={ { x: '-100%' } }\n\t\t\t\t\t\t\t\t\t\t\tanimate={ { x: 0 } }\n\t\t\t\t\t\t\t\t\t\t\texit={ { x: '-100%' } }\n\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 0.2,\n\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"boot-layout__sidebar is-mobile\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t\t\t{ /* Desktop Sidebar */ }\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! isFullScreen && (\n\t\t\t\t\t\t\t\t<div className=\"boot-layout__sidebar\">\n\t\t\t\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<div className=\"boot-layout__surfaces\">\n\t\t\t\t\t\t\t\t<ThemeProvider\n\t\t\t\t\t\t\t\t\tcolor={ {\n\t\t\t\t\t\t\t\t\t\t...themeColors,\n\t\t\t\t\t\t\t\t\t\tbackground: '#ffffff',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Outlet />\n\t\t\t\t\t\t\t\t\t{ /* Render Canvas in Root to prevent remounting on route changes */ }\n\t\t\t\t\t\t\t\t\t{ ( canvas || canvas === null ) && (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t'boot-layout__canvas',\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t'has-mobile-drawer':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcanvas?.isPreview &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisMobileViewport,\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ canvas?.isPreview &&\n\t\t\t\t\t\t\t\t\t\t\t\tisMobileViewport && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"boot-layout__mobile-sidebar-drawer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ menu }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsMobileSidebarOpen(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Open navigation panel'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t<CanvasRenderer\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas={ canvas }\n\t\t\t\t\t\t\t\t\t\t\t\trouteContentModule={\n\t\t\t\t\t\t\t\t\t\t\t\t\trouteContentModule\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ThemeProvider>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ThemeProvider>\n\t\t\t\t</ThemeProvider>\n\t\t\t</Tooltip.Provider>\n\t\t</SlotFillProvider>\n\t);\n}\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a66cc68f6f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a66cc68f6f\");\n\tstyle.appendChild(document.createTextNode(\".boot-layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}\"));\n\tdocument.head.appendChild(style);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,eAAe,wBAAwB;AAChD,SAAS,uBAAuB;AAChC,SAAS,kBAAkB,wBAAwB;AACnD;AAAA,EACC,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B;AAAA,EACA;AAAA,OACM;AACP,SAAS,YAAY;AACrB,SAAS,UAAU,WAAW,eAAe;AAC7C,SAAS,UAAU;AACnB,SAAS,MAAM,2BAA2B;AAC1C,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAK9B,OAAO,aAAa;AACpB,OAAO,eAAe;AACtB,OAAO,oBAAoB;AAC3B,OAAO,mBAAmB;AAC1B,SAAS,cAAc;;;AC/BvB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,6oHAA6oH,CAAC;AACxrH,WAAS,KAAK,YAAY,KAAK;AAChC;;;ADuEO,cAuFG,YAvFH;AAzCP,IAAM,EAAE,aAAa,YAAY,OAAO,IAAI,OAAQ,gBAAiB;AAEtD,SAAR,OAAwB;AAC9B,QAAM,UAAU,WAAW;AAC3B,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,QAAS,QAAQ,SAAS,CAAE;AACjD,QAAM,SAAW,cAAc,YAAqB;AAIpD,QAAM,qBAAuB,cAAc,YACxC;AACH,QAAM,eAAe,UAAU,CAAE,OAAO;AAExC,gBAAc;AAGd,QAAM,mBAAmB,iBAAkB,UAAU,GAAI;AACzD,QAAM,CAAE,qBAAqB,sBAAuB,IAAI,SAAU,KAAM;AACxE,QAAM,gBAAgB,iBAAiB;AAEvC,YAAW,MAAM;AAChB,2BAAwB,KAAM;AAAA,EAC/B,GAAG,CAAE,SAAS,UAAU,gBAAiB,CAAE;AAE3C,QAAM,cAAc,QAAS,qBAAqB,CAAC,CAAE;AAErD,SACC,oBAAC,oBACA,8BAAC,QAAQ,UAAR,EACA;AAAA,IAAC;AAAA;AAAA,MACA,QAAM;AAAA,MACN,OAAQ,EAAE,GAAG,aAAa,YAAY,UAAU;AAAA,MAEhD,8BAAC,iBAAc,OAAQ,aACtB;AAAA,QAAC;AAAA;AAAA,UACA,WAAY,KAAM,eAAe;AAAA,YAChC,cAAc,CAAC,CAAE,UAAU,WAAW;AAAA,YACtC,mBAAmB;AAAA,UACpB,CAAE;AAAA,UAEF;AAAA,gCAAC,aAAU;AAAA,YACX,oBAAC,mBAAgB,WAAU,0BAAyB;AAAA,YAClD,oBACD,oBAAC,KAAK,mBAAL,EACA;AAAA,cAAC;AAAA;AAAA,gBACA,MAAO;AAAA,gBACP,SAAU,MACT,uBAAwB,IAAK;AAAA,gBAE9B,OAAQ,GAAI,uBAAwB;AAAA,gBACpC,MAAK;AAAA;AAAA,YACN,GACD;AAAA,YAGD,oBAAC,mBACE,8BACD,uBACA,CAAE,gBACD;AAAA,cAAC,OAAO;AAAA,cAAP;AAAA,gBACA,SAAU,EAAE,SAAS,EAAE;AAAA,gBACvB,SAAU,EAAE,SAAS,EAAE;AAAA,gBACvB,MAAO,EAAE,SAAS,EAAE;AAAA,gBACpB,YAAa;AAAA,kBACZ,MAAM;AAAA,kBACN,UAAU,gBACP,IACA;AAAA,kBACH,MAAM;AAAA,gBACP;AAAA,gBACA,WAAU;AAAA,gBACV,SAAU,MACT,uBAAwB,KAAM;AAAA,gBAE/B,WAAY,CAAE,UAAW;AACxB,sBAAK,MAAM,QAAQ,UAAW;AAC7B;AAAA,sBACC;AAAA,oBACD;AAAA,kBACD;AAAA,gBACD;AAAA,gBACA,MAAK;AAAA,gBACL,UAAW;AAAA,gBACX,cAAa;AAAA,kBACZ;AAAA,gBACD;AAAA;AAAA,YACD,GAEH;AAAA,YAEA,oBAAC,mBACE,8BACD,uBACA,CAAE,gBACD;AAAA,cAAC,OAAO;AAAA,cAAP;AAAA,gBACA,SAAU,EAAE,GAAG,QAAQ;AAAA,gBACvB,SAAU,EAAE,GAAG,EAAE;AAAA,gBACjB,MAAO,EAAE,GAAG,QAAQ;AAAA,gBACpB,YAAa;AAAA,kBACZ,MAAM;AAAA,kBACN,UAAU,gBACP,IACA;AAAA,kBACH,MAAM;AAAA,gBACP;AAAA,gBACA,WAAU;AAAA,gBAEV,8BAAC,WAAQ;AAAA;AAAA,YACV,GAEH;AAAA,YAEE,CAAE,oBAAoB,CAAE,gBACzB,oBAAC,SAAI,WAAU,wBACd,8BAAC,WAAQ,GACV;AAAA,YAED,oBAAC,SAAI,WAAU,yBACd;AAAA,cAAC;AAAA;AAAA,gBACA,OAAQ;AAAA,kBACP,GAAG;AAAA,kBACH,YAAY;AAAA,gBACb;AAAA,gBAEA;AAAA,sCAAC,UAAO;AAAA,mBAEJ,UAAU,WAAW,SACxB;AAAA,oBAAC;AAAA;AAAA,sBACA,WAAY;AAAA,wBACX;AAAA,wBACA;AAAA,0BACC,qBACC,QAAQ,aACR;AAAA,wBACF;AAAA,sBACD;AAAA,sBAEE;AAAA,gCAAQ,aACT,oBACC,oBAAC,SAAI,WAAU,sCACd;AAAA,0BAAC;AAAA;AAAA,4BACA,MAAO;AAAA,4BACP,SAAU,MACT;AAAA,8BACC;AAAA,4BACD;AAAA,4BAED,OAAQ;AAAA,8BACP;AAAA,4BACD;AAAA,4BACA,MAAK;AAAA;AAAA,wBACN,GACD;AAAA,wBAEF;AAAA,0BAAC;AAAA;AAAA,4BACA;AAAA,4BACA;AAAA;AAAA,wBAGD;AAAA;AAAA;AAAA,kBACD;AAAA;AAAA;AAAA,YAEF,GACD;AAAA;AAAA;AAAA,MACD,GACD;AAAA;AAAA,EACD,GACD,GACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { SnackbarNotices } from "@wordpress/notices";
|
|
|
5
5
|
import { SlotFillProvider } from "@wordpress/components";
|
|
6
6
|
import { useMemo } from "@wordpress/element";
|
|
7
7
|
import { getAdminThemeColors } from "@wordpress/admin-ui";
|
|
8
|
-
import {
|
|
8
|
+
import { ThemeProvider } from "@wordpress/theme";
|
|
9
9
|
import SavePanel from "../save-panel/index.mjs";
|
|
10
10
|
import CanvasRenderer from "../canvas-renderer/index.mjs";
|
|
11
11
|
import { unlock } from "../../lock-unlock.mjs";
|
|
@@ -22,7 +22,6 @@ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !docum
|
|
|
22
22
|
import useRouteTitle from "../app/use-route-title.mjs";
|
|
23
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
24
|
var { useMatches, Outlet } = unlock(routePrivateApis);
|
|
25
|
-
var { ThemeProvider } = unlock(themePrivateApis);
|
|
26
25
|
function RootSinglePage() {
|
|
27
26
|
const matches = useMatches();
|
|
28
27
|
const currentMatch = matches[matches.length - 1];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/root/single-page.tsx", "../../../src/components/root/style.scss"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as routePrivateApis } from '@wordpress/route';\nimport { SnackbarNotices } from '@wordpress/notices';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { getAdminThemeColors } from '@wordpress/admin-ui';\nimport {
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,eAAe,wBAAwB;AAChD,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,eAAe;AACxB,SAAS,2BAA2B;AACpC,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as routePrivateApis } from '@wordpress/route';\nimport { SnackbarNotices } from '@wordpress/notices';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { getAdminThemeColors } from '@wordpress/admin-ui';\nimport { ThemeProvider } from '@wordpress/theme';\n\n/**\n * Internal dependencies\n */\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport './style.scss';\nimport useRouteTitle from '../app/use-route-title';\n\nconst { useMatches, Outlet } = unlock( routePrivateApis );\n\n/**\n * Root component for single page mode (no sidebar).\n * Used when rendering pages within wp-admin without taking over the full page.\n */\nexport default function RootSinglePage() {\n\tconst matches = useMatches();\n\tconst currentMatch = matches[ matches.length - 1 ];\n\tconst canvas = ( currentMatch?.loaderData as any )?.canvas as\n\t\t| CanvasData\n\t\t| null\n\t\t| undefined;\n\tconst routeContentModule = ( currentMatch?.loaderData as any )\n\t\t?.routeContentModule as string | undefined;\n\tconst isFullScreen = canvas && ! canvas.isPreview;\n\n\tuseRouteTitle();\n\n\tconst themeColors = useMemo( getAdminThemeColors, [] );\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ThemeProvider\n\t\t\t\tisRoot\n\t\t\t\tcolor={ { ...themeColors, background: '#f8f8f8' } }\n\t\t\t>\n\t\t\t\t<ThemeProvider color={ themeColors }>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'boot-layout boot-layout--single-page',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-canvas': !! canvas || canvas === null,\n\t\t\t\t\t\t\t\t'has-full-canvas': isFullScreen,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t<SnackbarNotices className=\"boot-notices__snackbar\" />\n\t\t\t\t\t\t<div className=\"boot-layout__surfaces\">\n\t\t\t\t\t\t\t<ThemeProvider\n\t\t\t\t\t\t\t\tcolor={ {\n\t\t\t\t\t\t\t\t\t...themeColors,\n\t\t\t\t\t\t\t\t\tbackground: '#ffffff',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Outlet />\n\t\t\t\t\t\t\t\t{ /* Render Canvas in Root to prevent remounting on route changes */ }\n\t\t\t\t\t\t\t\t{ ( canvas || canvas === null ) && (\n\t\t\t\t\t\t\t\t\t<div className=\"boot-layout__canvas\">\n\t\t\t\t\t\t\t\t\t\t<CanvasRenderer\n\t\t\t\t\t\t\t\t\t\t\tcanvas={ canvas }\n\t\t\t\t\t\t\t\t\t\t\trouteContentModule={\n\t\t\t\t\t\t\t\t\t\t\t\trouteContentModule\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</ThemeProvider>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</ThemeProvider>\n\t\t\t</ThemeProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a66cc68f6f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a66cc68f6f\");\n\tstyle.appendChild(document.createTextNode(\".boot-layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}\"));\n\tdocument.head.appendChild(style);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,eAAe,wBAAwB;AAChD,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,eAAe;AACxB,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAK9B,OAAO,eAAe;AACtB,OAAO,oBAAoB;AAC3B,SAAS,cAAc;;;ACpBvB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,6oHAA6oH,CAAC;AACxrH,WAAS,KAAK,YAAY,KAAK;AAChC;;;ADkBA,OAAO,mBAAmB;AAuCpB,cAGC,YAHD;AArCN,IAAM,EAAE,YAAY,OAAO,IAAI,OAAQ,gBAAiB;AAMzC,SAAR,iBAAkC;AACxC,QAAM,UAAU,WAAW;AAC3B,QAAM,eAAe,QAAS,QAAQ,SAAS,CAAE;AACjD,QAAM,SAAW,cAAc,YAAqB;AAIpD,QAAM,qBAAuB,cAAc,YACxC;AACH,QAAM,eAAe,UAAU,CAAE,OAAO;AAExC,gBAAc;AAEd,QAAM,cAAc,QAAS,qBAAqB,CAAC,CAAE;AAErD,SACC,oBAAC,oBACA;AAAA,IAAC;AAAA;AAAA,MACA,QAAM;AAAA,MACN,OAAQ,EAAE,GAAG,aAAa,YAAY,UAAU;AAAA,MAEhD,8BAAC,iBAAc,OAAQ,aACtB;AAAA,QAAC;AAAA;AAAA,UACA,WAAY;AAAA,YACX;AAAA,YACA;AAAA,cACC,cAAc,CAAC,CAAE,UAAU,WAAW;AAAA,cACtC,mBAAmB;AAAA,YACpB;AAAA,UACD;AAAA,UAEA;AAAA,gCAAC,aAAU;AAAA,YACX,oBAAC,mBAAgB,WAAU,0BAAyB;AAAA,YACpD,oBAAC,SAAI,WAAU,yBACd;AAAA,cAAC;AAAA;AAAA,gBACA,OAAQ;AAAA,kBACP,GAAG;AAAA,kBACH,YAAY;AAAA,gBACb;AAAA,gBAEA;AAAA,sCAAC,UAAO;AAAA,mBAEJ,UAAU,WAAW,SACxB,oBAAC,SAAI,WAAU,uBACd;AAAA,oBAAC;AAAA;AAAA,sBACA;AAAA,sBACA;AAAA;AAAA,kBAGD,GACD;AAAA;AAAA;AAAA,YAEF,GACD;AAAA;AAAA;AAAA,MACD,GACD;AAAA;AAAA,EACD,GACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build-module/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// packages/boot/src/style.scss
|
|
2
|
-
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='
|
|
2
|
+
if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='7b8d694406']")) {
|
|
3
3
|
const style = document.createElement("style");
|
|
4
|
-
style.setAttribute("data-wp-hash", "
|
|
5
|
-
style.appendChild(document.createTextNode(':root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-background-surface-neutral:#fcfcfc;--wpds-color-background-surface-neutral-strong:#fff;--wpds-color-background-surface-neutral-weak:#f4f4f4;--wpds-color-background-surface-brand:#ecf0fa;--wpds-color-background-surface-success:#c6f7cd;--wpds-color-background-surface-success-weak:#ebffed;--wpds-color-background-surface-info:#deebfa;--wpds-color-background-surface-info-weak:#f3f9ff;--wpds-color-background-surface-warning:#fde6be;--wpds-color-background-surface-warning-weak:#fff7e1;--wpds-color-background-surface-caution:#fee995;--wpds-color-background-surface-caution-weak:#fff9ca;--wpds-color-background-surface-error:#f6e6e3;--wpds-color-background-surface-error-weak:#fff6f5;--wpds-color-background-interactive-neutral-strong:#2d2d2d;--wpds-color-background-interactive-neutral-strong-active:#1e1e1e;--wpds-color-background-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-background-interactive-neutral-weak:#0000;--wpds-color-background-interactive-neutral-weak-active:#ededed;--wpds-color-background-interactive-neutral-weak-disabled:#0000;--wpds-color-background-interactive-brand-strong:#3858e9;--wpds-color-background-interactive-brand-strong-active:#2e49d9;--wpds-color-background-interactive-brand-strong-disabled:#e6e6e6;--wpds-color-background-interactive-brand-weak:#0000;--wpds-color-background-interactive-brand-weak-active:#e6eaf4;--wpds-color-background-interactive-brand-weak-disabled:#0000;--wpds-color-background-interactive-error:#0000;--wpds-color-background-interactive-error-active:#fff6f5;--wpds-color-background-interactive-error-disabled:#0000;--wpds-color-background-interactive-error-strong:#cc1818;--wpds-color-background-interactive-error-strong-active:#b90000;--wpds-color-background-interactive-error-strong-disabled:#e6e6e6;--wpds-color-background-interactive-error-weak:#0000;--wpds-color-background-interactive-error-weak-active:#f6e6e3;--wpds-color-background-interactive-error-weak-disabled:#0000;--wpds-color-background-track-neutral-weak:#f0f0f0;--wpds-color-background-track-neutral:#dbdbdb;--wpds-color-background-thumb-neutral-weak:#8d8d8d;--wpds-color-background-thumb-neutral-weak-active:#6e6e6e;--wpds-color-background-thumb-brand:#3858e9;--wpds-color-background-thumb-brand-active:#3858e9;--wpds-color-background-thumb-neutral-disabled:#dbdbdb;--wpds-color-foreground-content-neutral:#1e1e1e;--wpds-color-foreground-content-neutral-weak:#707070;--wpds-color-foreground-content-success:#002900;--wpds-color-foreground-content-success-weak:#008030;--wpds-color-foreground-content-info:#001b4f;--wpds-color-foreground-content-info-weak:#006bd7;--wpds-color-foreground-content-warning:#2e1900;--wpds-color-foreground-content-warning-weak:#926300;--wpds-color-foreground-content-caution:#281d00;--wpds-color-foreground-content-caution-weak:#826a00;--wpds-color-foreground-content-error:#470000;--wpds-color-foreground-content-error-weak:#cc1818;--wpds-color-foreground-interactive-neutral:#1e1e1e;--wpds-color-foreground-interactive-neutral-active:#1e1e1e;--wpds-color-foreground-interactive-neutral-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-strong:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-active:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-weak:#707070;--wpds-color-foreground-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand:#3858e9;--wpds-color-foreground-interactive-brand-active:#0b0070;--wpds-color-foreground-interactive-brand-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand-strong:#eff0f2;--wpds-color-foreground-interactive-brand-strong-active:#eff0f2;--wpds-color-foreground-interactive-brand-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-error:#cc1818;--wpds-color-foreground-interactive-error-active:#470000;--wpds-color-foreground-interactive-error-disabled:#8d8d8d;--wpds-color-foreground-interactive-error-strong:#f2efef;--wpds-color-foreground-interactive-error-strong-active:#f2efef;--wpds-color-foreground-interactive-error-strong-disabled:#8d8d8d;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#f0f0f0;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#b0bbd6;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#94d29e;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#a9c6e7;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#e1bc7c;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-caution:#cfc28d;--wpds-color-stroke-surface-caution-strong:#826a00;--wpds-color-stroke-surface-error:#dab1aa;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-brand-disabled:#dbdbdb;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-disabled:#dbdbdb;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-focus:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-size-5xs:4px;--wpds-dimension-size-4xs:8px;--wpds-dimension-size-3xs:12px;--wpds-dimension-size-2xs:16px;--wpds-dimension-size-xs:20px;--wpds-dimension-size-sm:24px;--wpds-dimension-size-md:32px;--wpds-dimension-size-lg:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-motion-duration-xs:50ms;--wpds-motion-duration-sm:100ms;--wpds-motion-duration-md:200ms;--wpds-motion-duration-lg:300ms;--wpds-motion-duration-xl:400ms;--wpds-motion-easing-subtle:cubic-bezier(0.15,0,0.15,1);--wpds-motion-easing-balanced:cubic-bezier(0.4,0,0.2,1);--wpds-motion-easing-expressive:cubic-bezier(0.25,0,0,1);--wpds-typography-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-typography-font-size-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=none]),[data-wpds-corner-radius=none]{--wpds-border-radius-xs:0;--wpds-border-radius-sm:0;--wpds-border-radius-md:0;--wpds-border-radius-lg:0;--wpds-border-radius-xl:0}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=subtle]),[data-wpds-corner-radius=subtle]{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=moderate]),[data-wpds-corner-radius=moderate]{--wpds-border-radius-xs:6px;--wpds-border-radius-sm:8px;--wpds-border-radius-md:12px;--wpds-border-radius-lg:16px;--wpds-border-radius-xl:20px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=pronounced]),[data-wpds-corner-radius=pronounced]{--wpds-border-radius-xs:18px;--wpds-border-radius-sm:20px;--wpds-border-radius-md:22px;--wpds-border-radius-lg:24px;--wpds-border-radius-xl:26px}body.has-admin-bar-in-editor #wpadminbar{display:block}body.has-admin-bar-in-editor .boot-canvas-back-button__link{background:transparent}body.has-admin-bar-in-editor .boot-canvas-back-button__icon{background-color:transparent}body.has-admin-bar-in-editor #site-editor-v2-app{bottom:0;height:calc(100vh - 32px)!important;left:0;position:fixed;right:0;top:32px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas{height:calc(100vh - 32px);top:32px}@media (max-width:782px){body.has-admin-bar-in-editor #site-editor-v2-app{height:calc(100vh - 46px)!important;top:46px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas,body.has-admin-bar-in-editor .boot-layout__canvas:not(.has-mobile-drawer),body.has-admin-bar-in-editor .boot-layout__inspector,body.has-admin-bar-in-editor .boot-layout__stage{height:calc(100vh - 46px);top:46px}body.has-admin-bar-in-editor .boot-layout__mobile-sidebar-drawer{top:46px}}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}'));
|
|
4
|
+
style.setAttribute("data-wp-hash", "7b8d694406");
|
|
5
|
+
style.appendChild(document.createTextNode(':root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-background-surface-neutral:#fcfcfc;--wpds-color-background-surface-neutral-strong:#fff;--wpds-color-background-surface-neutral-weak:#f4f4f4;--wpds-color-background-surface-brand:#ecf0fa;--wpds-color-background-surface-success:#c6f7cd;--wpds-color-background-surface-success-weak:#ebffed;--wpds-color-background-surface-info:#deebfa;--wpds-color-background-surface-info-weak:#f3f9ff;--wpds-color-background-surface-warning:#fde6be;--wpds-color-background-surface-warning-weak:#fff7e1;--wpds-color-background-surface-caution:#fee995;--wpds-color-background-surface-caution-weak:#fff9ca;--wpds-color-background-surface-error:#f6e6e3;--wpds-color-background-surface-error-weak:#fff6f5;--wpds-color-background-interactive-neutral-strong:#2d2d2d;--wpds-color-background-interactive-neutral-strong-active:#1e1e1e;--wpds-color-background-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-background-interactive-neutral-weak:#0000;--wpds-color-background-interactive-neutral-weak-active:#ededed;--wpds-color-background-interactive-neutral-weak-disabled:#0000;--wpds-color-background-interactive-brand-strong:#3858e9;--wpds-color-background-interactive-brand-strong-active:#2e49d9;--wpds-color-background-interactive-brand-strong-disabled:#e6e6e6;--wpds-color-background-interactive-brand-weak:#0000;--wpds-color-background-interactive-brand-weak-active:#e6eaf4;--wpds-color-background-interactive-brand-weak-disabled:#0000;--wpds-color-background-interactive-error:#0000;--wpds-color-background-interactive-error-active:#fff6f5;--wpds-color-background-interactive-error-disabled:#0000;--wpds-color-background-interactive-error-strong:#cc1818;--wpds-color-background-interactive-error-strong-active:#b90000;--wpds-color-background-interactive-error-strong-disabled:#e6e6e6;--wpds-color-background-interactive-error-weak:#0000;--wpds-color-background-interactive-error-weak-active:#f6e6e3;--wpds-color-background-interactive-error-weak-disabled:#0000;--wpds-color-background-track-neutral-weak:#f0f0f0;--wpds-color-background-track-neutral:#dbdbdb;--wpds-color-background-thumb-neutral-weak:#8d8d8d;--wpds-color-background-thumb-neutral-weak-active:#6e6e6e;--wpds-color-background-thumb-brand:#3858e9;--wpds-color-background-thumb-brand-active:#3858e9;--wpds-color-background-thumb-neutral-disabled:#dbdbdb;--wpds-color-foreground-content-neutral:#1e1e1e;--wpds-color-foreground-content-neutral-weak:#707070;--wpds-color-foreground-content-success:#002900;--wpds-color-foreground-content-success-weak:#008030;--wpds-color-foreground-content-info:#001b4f;--wpds-color-foreground-content-info-weak:#006bd7;--wpds-color-foreground-content-warning:#2e1900;--wpds-color-foreground-content-warning-weak:#926300;--wpds-color-foreground-content-caution:#281d00;--wpds-color-foreground-content-caution-weak:#826a00;--wpds-color-foreground-content-error:#470000;--wpds-color-foreground-content-error-weak:#cc1818;--wpds-color-foreground-interactive-neutral:#1e1e1e;--wpds-color-foreground-interactive-neutral-active:#1e1e1e;--wpds-color-foreground-interactive-neutral-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-strong:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-active:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-weak:#707070;--wpds-color-foreground-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand:#3858e9;--wpds-color-foreground-interactive-brand-active:#0b0070;--wpds-color-foreground-interactive-brand-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand-strong:#eff0f2;--wpds-color-foreground-interactive-brand-strong-active:#eff0f2;--wpds-color-foreground-interactive-brand-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-error:#cc1818;--wpds-color-foreground-interactive-error-active:#470000;--wpds-color-foreground-interactive-error-disabled:#8d8d8d;--wpds-color-foreground-interactive-error-strong:#f2efef;--wpds-color-foreground-interactive-error-strong-active:#f2efef;--wpds-color-foreground-interactive-error-strong-disabled:#8d8d8d;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#f0f0f0;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#b0bbd6;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#94d29e;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#a9c6e7;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#e1bc7c;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-caution:#cfc28d;--wpds-color-stroke-surface-caution-strong:#826a00;--wpds-color-stroke-surface-error:#dab1aa;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-brand-disabled:#dbdbdb;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-disabled:#dbdbdb;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-focus:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-size-5xs:4px;--wpds-dimension-size-4xs:8px;--wpds-dimension-size-3xs:12px;--wpds-dimension-size-2xs:16px;--wpds-dimension-size-xs:20px;--wpds-dimension-size-sm:24px;--wpds-dimension-size-md:32px;--wpds-dimension-size-lg:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-motion-duration-xs:50ms;--wpds-motion-duration-sm:100ms;--wpds-motion-duration-md:200ms;--wpds-motion-duration-lg:300ms;--wpds-motion-duration-xl:400ms;--wpds-motion-easing-subtle:cubic-bezier(0.15,0,0.15,1);--wpds-motion-easing-balanced:cubic-bezier(0.4,0,0.2,1);--wpds-motion-easing-expressive:cubic-bezier(0.25,0,0,1);--wpds-typography-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-typography-font-size-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=none]),[data-wpds-corner-radius=none]{--wpds-border-radius-xs:0;--wpds-border-radius-sm:0;--wpds-border-radius-md:0;--wpds-border-radius-lg:0;--wpds-border-radius-xl:0}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=subtle]),[data-wpds-corner-radius=subtle]{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=moderate]),[data-wpds-corner-radius=moderate]{--wpds-border-radius-xs:6px;--wpds-border-radius-sm:8px;--wpds-border-radius-md:12px;--wpds-border-radius-lg:16px;--wpds-border-radius-xl:20px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=pronounced]),[data-wpds-corner-radius=pronounced]{--wpds-border-radius-xs:18px;--wpds-border-radius-sm:20px;--wpds-border-radius-md:22px;--wpds-border-radius-lg:24px;--wpds-border-radius-xl:26px}body.has-admin-bar-in-editor #wpadminbar{display:block}body.has-admin-bar-in-editor .boot-canvas-back-button__link{background:transparent}body.has-admin-bar-in-editor .boot-canvas-back-button__icon{background-color:transparent}body.has-admin-bar-in-editor #site-editor-v2-app{bottom:0;height:calc(100vh - 32px)!important;left:0;position:fixed;right:0;top:32px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas{height:calc(100vh - 32px);top:32px}@media (max-width:782px){body.has-admin-bar-in-editor #site-editor-v2-app{height:calc(100vh - 46px)!important;top:46px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas,body.has-admin-bar-in-editor .boot-layout__canvas:not(.has-mobile-drawer),body.has-admin-bar-in-editor .boot-layout__inspector,body.has-admin-bar-in-editor .boot-layout__stage{height:calc(100vh - 46px);top:46px}body.has-admin-bar-in-editor .boot-layout__mobile-sidebar-drawer{top:46px}}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}'));
|
|
6
6
|
document.head.appendChild(style);
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/style.scss", "../src/view-transitions.scss", "../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='d303d1a93d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"d303d1a93d\");\n\tstyle.appendChild(document.createTextNode(\":root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-background-surface-neutral:#fcfcfc;--wpds-color-background-surface-neutral-strong:#fff;--wpds-color-background-surface-neutral-weak:#f4f4f4;--wpds-color-background-surface-brand:#ecf0fa;--wpds-color-background-surface-success:#c6f7cd;--wpds-color-background-surface-success-weak:#ebffed;--wpds-color-background-surface-info:#deebfa;--wpds-color-background-surface-info-weak:#f3f9ff;--wpds-color-background-surface-warning:#fde6be;--wpds-color-background-surface-warning-weak:#fff7e1;--wpds-color-background-surface-caution:#fee995;--wpds-color-background-surface-caution-weak:#fff9ca;--wpds-color-background-surface-error:#f6e6e3;--wpds-color-background-surface-error-weak:#fff6f5;--wpds-color-background-interactive-neutral-strong:#2d2d2d;--wpds-color-background-interactive-neutral-strong-active:#1e1e1e;--wpds-color-background-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-background-interactive-neutral-weak:#0000;--wpds-color-background-interactive-neutral-weak-active:#ededed;--wpds-color-background-interactive-neutral-weak-disabled:#0000;--wpds-color-background-interactive-brand-strong:#3858e9;--wpds-color-background-interactive-brand-strong-active:#2e49d9;--wpds-color-background-interactive-brand-strong-disabled:#e6e6e6;--wpds-color-background-interactive-brand-weak:#0000;--wpds-color-background-interactive-brand-weak-active:#e6eaf4;--wpds-color-background-interactive-brand-weak-disabled:#0000;--wpds-color-background-interactive-error:#0000;--wpds-color-background-interactive-error-active:#fff6f5;--wpds-color-background-interactive-error-disabled:#0000;--wpds-color-background-interactive-error-strong:#cc1818;--wpds-color-background-interactive-error-strong-active:#b90000;--wpds-color-background-interactive-error-strong-disabled:#e6e6e6;--wpds-color-background-interactive-error-weak:#0000;--wpds-color-background-interactive-error-weak-active:#f6e6e3;--wpds-color-background-interactive-error-weak-disabled:#0000;--wpds-color-background-track-neutral-weak:#f0f0f0;--wpds-color-background-track-neutral:#dbdbdb;--wpds-color-background-thumb-neutral-weak:#8d8d8d;--wpds-color-background-thumb-neutral-weak-active:#6e6e6e;--wpds-color-background-thumb-brand:#3858e9;--wpds-color-background-thumb-brand-active:#3858e9;--wpds-color-background-thumb-neutral-disabled:#dbdbdb;--wpds-color-foreground-content-neutral:#1e1e1e;--wpds-color-foreground-content-neutral-weak:#707070;--wpds-color-foreground-content-success:#002900;--wpds-color-foreground-content-success-weak:#008030;--wpds-color-foreground-content-info:#001b4f;--wpds-color-foreground-content-info-weak:#006bd7;--wpds-color-foreground-content-warning:#2e1900;--wpds-color-foreground-content-warning-weak:#926300;--wpds-color-foreground-content-caution:#281d00;--wpds-color-foreground-content-caution-weak:#826a00;--wpds-color-foreground-content-error:#470000;--wpds-color-foreground-content-error-weak:#cc1818;--wpds-color-foreground-interactive-neutral:#1e1e1e;--wpds-color-foreground-interactive-neutral-active:#1e1e1e;--wpds-color-foreground-interactive-neutral-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-strong:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-active:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-weak:#707070;--wpds-color-foreground-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand:#3858e9;--wpds-color-foreground-interactive-brand-active:#0b0070;--wpds-color-foreground-interactive-brand-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand-strong:#eff0f2;--wpds-color-foreground-interactive-brand-strong-active:#eff0f2;--wpds-color-foreground-interactive-brand-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-error:#cc1818;--wpds-color-foreground-interactive-error-active:#470000;--wpds-color-foreground-interactive-error-disabled:#8d8d8d;--wpds-color-foreground-interactive-error-strong:#f2efef;--wpds-color-foreground-interactive-error-strong-active:#f2efef;--wpds-color-foreground-interactive-error-strong-disabled:#8d8d8d;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#f0f0f0;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#b0bbd6;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#94d29e;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#a9c6e7;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#e1bc7c;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-caution:#cfc28d;--wpds-color-stroke-surface-caution-strong:#826a00;--wpds-color-stroke-surface-error:#dab1aa;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-brand-disabled:#dbdbdb;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-disabled:#dbdbdb;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-focus:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-size-5xs:4px;--wpds-dimension-size-4xs:8px;--wpds-dimension-size-3xs:12px;--wpds-dimension-size-2xs:16px;--wpds-dimension-size-xs:20px;--wpds-dimension-size-sm:24px;--wpds-dimension-size-md:32px;--wpds-dimension-size-lg:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-motion-duration-xs:50ms;--wpds-motion-duration-sm:100ms;--wpds-motion-duration-md:200ms;--wpds-motion-duration-lg:300ms;--wpds-motion-duration-xl:400ms;--wpds-motion-easing-subtle:cubic-bezier(0.15,0,0.15,1);--wpds-motion-easing-balanced:cubic-bezier(0.4,0,0.2,1);--wpds-motion-easing-expressive:cubic-bezier(0.25,0,0,1);--wpds-typography-font-family-heading:-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif;--wpds-typography-font-family-body:-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif;--wpds-typography-font-family-mono:\\\"Menlo\\\",\\\"Consolas\\\",monaco,monospace;--wpds-typography-font-size-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=none]),[data-wpds-corner-radius=none]{--wpds-border-radius-xs:0;--wpds-border-radius-sm:0;--wpds-border-radius-md:0;--wpds-border-radius-lg:0;--wpds-border-radius-xl:0}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=subtle]),[data-wpds-corner-radius=subtle]{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=moderate]),[data-wpds-corner-radius=moderate]{--wpds-border-radius-xs:6px;--wpds-border-radius-sm:8px;--wpds-border-radius-md:12px;--wpds-border-radius-lg:16px;--wpds-border-radius-xl:20px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=pronounced]),[data-wpds-corner-radius=pronounced]{--wpds-border-radius-xs:18px;--wpds-border-radius-sm:20px;--wpds-border-radius-md:22px;--wpds-border-radius-lg:24px;--wpds-border-radius-xl:26px}body.has-admin-bar-in-editor #wpadminbar{display:block}body.has-admin-bar-in-editor .boot-canvas-back-button__link{background:transparent}body.has-admin-bar-in-editor .boot-canvas-back-button__icon{background-color:transparent}body.has-admin-bar-in-editor #site-editor-v2-app{bottom:0;height:calc(100vh - 32px)!important;left:0;position:fixed;right:0;top:32px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas{height:calc(100vh - 32px);top:32px}@media (max-width:782px){body.has-admin-bar-in-editor #site-editor-v2-app{height:calc(100vh - 46px)!important;top:46px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas,body.has-admin-bar-in-editor .boot-layout__canvas:not(.has-mobile-drawer),body.has-admin-bar-in-editor .boot-layout__inspector,body.has-admin-bar-in-editor .boot-layout__stage{height:calc(100vh - 46px);top:46px}body.has-admin-bar-in-editor .boot-layout__mobile-sidebar-drawer{top:46px}}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}\"));\n\tdocument.head.appendChild(style);\n}\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='e529861242']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"e529861242\");\n\tstyle.appendChild(document.createTextNode(\"@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:var(--wpds-border-radius-xl,12px);height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}\"));\n\tdocument.head.appendChild(style);\n}\n", "/**\n * Internal dependencies\n */\nimport './style.scss';\nimport './view-transitions.scss';\nexport { init, initSinglePage } from './components/app';\nexport { store } from './store';\n"],
|
|
5
|
-
"mappings": ";AAAA,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,
|
|
4
|
+
"sourcesContent": ["if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='7b8d694406']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"7b8d694406\");\n\tstyle.appendChild(document.createTextNode(\":root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-background-surface-neutral:#fcfcfc;--wpds-color-background-surface-neutral-strong:#fff;--wpds-color-background-surface-neutral-weak:#f4f4f4;--wpds-color-background-surface-brand:#ecf0fa;--wpds-color-background-surface-success:#c6f7cd;--wpds-color-background-surface-success-weak:#ebffed;--wpds-color-background-surface-info:#deebfa;--wpds-color-background-surface-info-weak:#f3f9ff;--wpds-color-background-surface-warning:#fde6be;--wpds-color-background-surface-warning-weak:#fff7e1;--wpds-color-background-surface-caution:#fee995;--wpds-color-background-surface-caution-weak:#fff9ca;--wpds-color-background-surface-error:#f6e6e3;--wpds-color-background-surface-error-weak:#fff6f5;--wpds-color-background-interactive-neutral-strong:#2d2d2d;--wpds-color-background-interactive-neutral-strong-active:#1e1e1e;--wpds-color-background-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-background-interactive-neutral-weak:#0000;--wpds-color-background-interactive-neutral-weak-active:#ededed;--wpds-color-background-interactive-neutral-weak-disabled:#0000;--wpds-color-background-interactive-brand-strong:#3858e9;--wpds-color-background-interactive-brand-strong-active:#2e49d9;--wpds-color-background-interactive-brand-strong-disabled:#e6e6e6;--wpds-color-background-interactive-brand-weak:#0000;--wpds-color-background-interactive-brand-weak-active:#e6eaf4;--wpds-color-background-interactive-brand-weak-disabled:#0000;--wpds-color-background-interactive-error:#0000;--wpds-color-background-interactive-error-active:#fff6f5;--wpds-color-background-interactive-error-disabled:#0000;--wpds-color-background-interactive-error-strong:#cc1818;--wpds-color-background-interactive-error-strong-active:#b90000;--wpds-color-background-interactive-error-strong-disabled:#e6e6e6;--wpds-color-background-interactive-error-weak:#0000;--wpds-color-background-interactive-error-weak-active:#f6e6e3;--wpds-color-background-interactive-error-weak-disabled:#0000;--wpds-color-background-track-neutral-weak:#f0f0f0;--wpds-color-background-track-neutral:#dbdbdb;--wpds-color-background-thumb-neutral-weak:#8d8d8d;--wpds-color-background-thumb-neutral-weak-active:#6e6e6e;--wpds-color-background-thumb-brand:#3858e9;--wpds-color-background-thumb-brand-active:#3858e9;--wpds-color-background-thumb-neutral-disabled:#dbdbdb;--wpds-color-foreground-content-neutral:#1e1e1e;--wpds-color-foreground-content-neutral-weak:#707070;--wpds-color-foreground-content-success:#002900;--wpds-color-foreground-content-success-weak:#008030;--wpds-color-foreground-content-info:#001b4f;--wpds-color-foreground-content-info-weak:#006bd7;--wpds-color-foreground-content-warning:#2e1900;--wpds-color-foreground-content-warning-weak:#926300;--wpds-color-foreground-content-caution:#281d00;--wpds-color-foreground-content-caution-weak:#826a00;--wpds-color-foreground-content-error:#470000;--wpds-color-foreground-content-error-weak:#cc1818;--wpds-color-foreground-interactive-neutral:#1e1e1e;--wpds-color-foreground-interactive-neutral-active:#1e1e1e;--wpds-color-foreground-interactive-neutral-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-strong:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-active:#f0f0f0;--wpds-color-foreground-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-neutral-weak:#707070;--wpds-color-foreground-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand:#3858e9;--wpds-color-foreground-interactive-brand-active:#0b0070;--wpds-color-foreground-interactive-brand-disabled:#8d8d8d;--wpds-color-foreground-interactive-brand-strong:#eff0f2;--wpds-color-foreground-interactive-brand-strong-active:#eff0f2;--wpds-color-foreground-interactive-brand-strong-disabled:#8d8d8d;--wpds-color-foreground-interactive-error:#cc1818;--wpds-color-foreground-interactive-error-active:#470000;--wpds-color-foreground-interactive-error-disabled:#8d8d8d;--wpds-color-foreground-interactive-error-strong:#f2efef;--wpds-color-foreground-interactive-error-strong-active:#f2efef;--wpds-color-foreground-interactive-error-strong-disabled:#8d8d8d;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#f0f0f0;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#b0bbd6;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#94d29e;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#a9c6e7;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#e1bc7c;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-caution:#cfc28d;--wpds-color-stroke-surface-caution-strong:#826a00;--wpds-color-stroke-surface-error:#dab1aa;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-brand-disabled:#dbdbdb;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-disabled:#dbdbdb;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-focus:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-size-5xs:4px;--wpds-dimension-size-4xs:8px;--wpds-dimension-size-3xs:12px;--wpds-dimension-size-2xs:16px;--wpds-dimension-size-xs:20px;--wpds-dimension-size-sm:24px;--wpds-dimension-size-md:32px;--wpds-dimension-size-lg:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-motion-duration-xs:50ms;--wpds-motion-duration-sm:100ms;--wpds-motion-duration-md:200ms;--wpds-motion-duration-lg:300ms;--wpds-motion-duration-xl:400ms;--wpds-motion-easing-subtle:cubic-bezier(0.15,0,0.15,1);--wpds-motion-easing-balanced:cubic-bezier(0.4,0,0.2,1);--wpds-motion-easing-expressive:cubic-bezier(0.25,0,0,1);--wpds-typography-font-family-heading:-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif;--wpds-typography-font-family-body:-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif;--wpds-typography-font-family-mono:\\\"Menlo\\\",\\\"Consolas\\\",monaco,monospace;--wpds-typography-font-size-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=none]),[data-wpds-corner-radius=none]{--wpds-border-radius-xs:0;--wpds-border-radius-sm:0;--wpds-border-radius-md:0;--wpds-border-radius-lg:0;--wpds-border-radius-xl:0}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=subtle]),[data-wpds-corner-radius=subtle]{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-radius-xl:12px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=moderate]),[data-wpds-corner-radius=moderate]{--wpds-border-radius-xs:6px;--wpds-border-radius-sm:8px;--wpds-border-radius-md:12px;--wpds-border-radius-lg:16px;--wpds-border-radius-xl:20px}:root:has([data-wpds-root-provider=true][data-wpds-corner-radius=pronounced]),[data-wpds-corner-radius=pronounced]{--wpds-border-radius-xs:18px;--wpds-border-radius-sm:20px;--wpds-border-radius-md:22px;--wpds-border-radius-lg:24px;--wpds-border-radius-xl:26px}body.has-admin-bar-in-editor #wpadminbar{display:block}body.has-admin-bar-in-editor .boot-canvas-back-button__link{background:transparent}body.has-admin-bar-in-editor .boot-canvas-back-button__icon{background-color:transparent}body.has-admin-bar-in-editor #site-editor-v2-app{bottom:0;height:calc(100vh - 32px)!important;left:0;position:fixed;right:0;top:32px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas{height:calc(100vh - 32px);top:32px}@media (max-width:782px){body.has-admin-bar-in-editor #site-editor-v2-app{height:calc(100vh - 46px)!important;top:46px}body.has-admin-bar-in-editor .boot-layout.has-full-canvas .boot-layout__canvas,body.has-admin-bar-in-editor .boot-layout__canvas:not(.has-mobile-drawer),body.has-admin-bar-in-editor .boot-layout__inspector,body.has-admin-bar-in-editor .boot-layout__stage{height:calc(100vh - 46px);top:46px}body.has-admin-bar-in-editor .boot-layout__mobile-sidebar-drawer{top:46px}}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}\"));\n\tdocument.head.appendChild(style);\n}\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='e529861242']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"e529861242\");\n\tstyle.appendChild(document.createTextNode(\"@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:var(--wpds-border-radius-xl,12px);height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}\"));\n\tdocument.head.appendChild(style);\n}\n", "/**\n * Internal dependencies\n */\nimport './style.scss';\nimport './view-transitions.scss';\nexport { init, initSinglePage } from './components/app';\nexport { store } from './store';\n"],
|
|
5
|
+
"mappings": ";AAAA,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,kwVAA8xV,CAAC;AACz0V,WAAS,KAAK,YAAY,KAAK;AAChC;;;ACLA,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,4mIAA4mI,CAAC;AACvpI,WAAS,KAAK,YAAY,KAAK;AAChC;;;ACAA,SAAS,MAAM,sBAAsB;AACrC,SAAS,aAAa;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -227,8 +227,6 @@
|
|
|
227
227
|
--wpds-color-stroke-focus: #3858e9;
|
|
228
228
|
/* Cursor style for interactive controls that are not links (e.g. buttons, checkboxes, and toggles). */
|
|
229
229
|
--wpds-cursor-control: pointer;
|
|
230
|
-
/* Base dimension unit */
|
|
231
|
-
--wpds-dimension-base: 4px;
|
|
232
230
|
/* Extra small padding */
|
|
233
231
|
--wpds-dimension-padding-xs: 4px;
|
|
234
232
|
/* Small padding */
|
package/build-style/style.css
CHANGED
|
@@ -227,8 +227,6 @@
|
|
|
227
227
|
--wpds-color-stroke-focus: #3858e9;
|
|
228
228
|
/* Cursor style for interactive controls that are not links (e.g. buttons, checkboxes, and toggles). */
|
|
229
229
|
--wpds-cursor-control: pointer;
|
|
230
|
-
/* Base dimension unit */
|
|
231
|
-
--wpds-dimension-base: 4px;
|
|
232
230
|
/* Extra small padding */
|
|
233
231
|
--wpds-dimension-padding-xs: 4px;
|
|
234
232
|
/* Small padding */
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { MenuItem, Route } from '../../store/types';
|
|
2
|
-
|
|
2
|
+
interface InitProps {
|
|
3
3
|
mountId: string;
|
|
4
4
|
menuItems?: MenuItem[];
|
|
5
5
|
routes?: Route[];
|
|
6
6
|
initModules?: string[];
|
|
7
7
|
dashboardLink?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function
|
|
8
|
+
}
|
|
9
|
+
export declare function init({ mountId, menuItems, routes, initModules, dashboardLink }: InitProps): Promise<void>;
|
|
10
|
+
interface InitSinglePageProps {
|
|
10
11
|
mountId: string;
|
|
11
12
|
routes?: Route[];
|
|
12
|
-
|
|
13
|
+
initModules?: string[];
|
|
14
|
+
}
|
|
15
|
+
export declare function initSinglePage({ mountId, routes, initModules }: InitSinglePageProps): Promise<void>;
|
|
16
|
+
export {};
|
|
13
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/app/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/app/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAwBzD,UAAU,SAAS;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,IAAI,CAAE,EAC3B,OAAO,EACP,SAAS,EACT,MAAM,EACN,WAAW,EACX,aAAa,EACb,EAAE,SAAS,iBAyBX;AAED,UAAU,mBAAmB;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,wBAAsB,cAAc,CAAE,EACrC,OAAO,EACP,MAAM,EACN,WAAW,EACX,EAAE,mBAAmB,iBAiBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/root/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/root/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,cAAc,CAAC;AAItB,MAAM,CAAC,OAAO,UAAU,IAAI,gCAyK3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-page.d.ts","sourceRoot":"","sources":["../../../src/components/root/single-page.tsx"],"names":[],"mappings":"AAsBA,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"single-page.d.ts","sourceRoot":"","sources":["../../../src/components/root/single-page.tsx"],"names":[],"mappings":"AAsBA,OAAO,cAAc,CAAC;AAKtB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,gCA2DrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/boot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Minimal boot package for WordPress admin pages.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -40,29 +40,29 @@
|
|
|
40
40
|
"wpScriptModuleExports": "./build-module/index.mjs",
|
|
41
41
|
"types": "build-types",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@wordpress/a11y": "^4.
|
|
44
|
-
"@wordpress/admin-ui": "^2.
|
|
45
|
-
"@wordpress/base-styles": "^10.
|
|
46
|
-
"@wordpress/commands": "^1.
|
|
47
|
-
"@wordpress/components": "^
|
|
48
|
-
"@wordpress/compose": "^8.
|
|
49
|
-
"@wordpress/core-data": "^7.
|
|
50
|
-
"@wordpress/data": "^10.
|
|
51
|
-
"@wordpress/editor": "^14.
|
|
52
|
-
"@wordpress/element": "^8.
|
|
53
|
-
"@wordpress/html-entities": "^4.
|
|
54
|
-
"@wordpress/i18n": "^6.
|
|
55
|
-
"@wordpress/icons": "^
|
|
56
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
57
|
-
"@wordpress/keycodes": "^4.
|
|
58
|
-
"@wordpress/lazy-editor": "^1.
|
|
59
|
-
"@wordpress/notices": "^5.
|
|
60
|
-
"@wordpress/primitives": "^4.
|
|
61
|
-
"@wordpress/private-apis": "^1.
|
|
62
|
-
"@wordpress/route": "^0.
|
|
63
|
-
"@wordpress/theme": "^0.
|
|
64
|
-
"@wordpress/ui": "^0.16.1
|
|
65
|
-
"@wordpress/url": "^4.
|
|
43
|
+
"@wordpress/a11y": "^4.49.0",
|
|
44
|
+
"@wordpress/admin-ui": "^2.4.1",
|
|
45
|
+
"@wordpress/base-styles": "^10.1.0",
|
|
46
|
+
"@wordpress/commands": "^1.49.1",
|
|
47
|
+
"@wordpress/components": "^36.0.1",
|
|
48
|
+
"@wordpress/compose": "^8.2.0",
|
|
49
|
+
"@wordpress/core-data": "^7.49.1",
|
|
50
|
+
"@wordpress/data": "^10.49.0",
|
|
51
|
+
"@wordpress/editor": "^14.49.1",
|
|
52
|
+
"@wordpress/element": "^8.1.0",
|
|
53
|
+
"@wordpress/html-entities": "^4.49.0",
|
|
54
|
+
"@wordpress/i18n": "^6.22.0",
|
|
55
|
+
"@wordpress/icons": "^15.0.0",
|
|
56
|
+
"@wordpress/keyboard-shortcuts": "^5.49.0",
|
|
57
|
+
"@wordpress/keycodes": "^4.49.0",
|
|
58
|
+
"@wordpress/lazy-editor": "^1.15.1",
|
|
59
|
+
"@wordpress/notices": "^5.49.1",
|
|
60
|
+
"@wordpress/primitives": "^4.49.0",
|
|
61
|
+
"@wordpress/private-apis": "^1.49.0",
|
|
62
|
+
"@wordpress/route": "^0.15.0",
|
|
63
|
+
"@wordpress/theme": "^0.17.0",
|
|
64
|
+
"@wordpress/ui": "^0.16.1",
|
|
65
|
+
"@wordpress/url": "^4.49.0",
|
|
66
66
|
"clsx": "^2.1.1"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "9a75283890dda96ae1d37197b5070fae8c9cf66f"
|
|
82
82
|
}
|
|
@@ -12,25 +12,43 @@ import RootSinglePage from '../root/single-page';
|
|
|
12
12
|
import { store } from '../../store';
|
|
13
13
|
import type { MenuItem, Route } from '../../store/types';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
interface AppProps {
|
|
16
|
+
rootComponent?: ComponentType;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function App( { rootComponent }: AppProps ) {
|
|
16
20
|
const routes = useSelect( ( select ) => select( store ).getRoutes(), [] );
|
|
17
21
|
|
|
18
22
|
return <Router routes={ routes } rootComponent={ rootComponent } />;
|
|
19
23
|
}
|
|
20
24
|
|
|
25
|
+
/*
|
|
26
|
+
* Import and run page init modules.
|
|
27
|
+
* Each module must export an async `init` function,
|
|
28
|
+
* awaited before the app renders so startup tasks finish first.
|
|
29
|
+
*/
|
|
30
|
+
async function runInitModules( initModules?: string[] ) {
|
|
31
|
+
for ( const moduleId of initModules ?? [] ) {
|
|
32
|
+
const module = await import( moduleId );
|
|
33
|
+
await module.init();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface InitProps {
|
|
38
|
+
mountId: string;
|
|
39
|
+
menuItems?: MenuItem[];
|
|
40
|
+
routes?: Route[];
|
|
41
|
+
initModules?: string[];
|
|
42
|
+
dashboardLink?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
21
45
|
export async function init( {
|
|
22
46
|
mountId,
|
|
23
47
|
menuItems,
|
|
24
48
|
routes,
|
|
25
49
|
initModules,
|
|
26
50
|
dashboardLink,
|
|
27
|
-
}: {
|
|
28
|
-
mountId: string;
|
|
29
|
-
menuItems?: MenuItem[];
|
|
30
|
-
routes?: Route[];
|
|
31
|
-
initModules?: string[];
|
|
32
|
-
dashboardLink?: string;
|
|
33
|
-
} ) {
|
|
51
|
+
}: InitProps ) {
|
|
34
52
|
( menuItems ?? [] ).forEach( ( menuItem ) => {
|
|
35
53
|
dispatch( store ).registerMenuItem( menuItem.id, menuItem );
|
|
36
54
|
} );
|
|
@@ -43,10 +61,7 @@ export async function init( {
|
|
|
43
61
|
dispatch( store ).setDashboardLink( dashboardLink );
|
|
44
62
|
}
|
|
45
63
|
|
|
46
|
-
|
|
47
|
-
const module = await import( moduleId );
|
|
48
|
-
await module.init();
|
|
49
|
-
}
|
|
64
|
+
await runInitModules( initModules );
|
|
50
65
|
|
|
51
66
|
// Render the app
|
|
52
67
|
const rootElement = document.getElementById( mountId );
|
|
@@ -60,17 +75,23 @@ export async function init( {
|
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
77
|
|
|
78
|
+
interface InitSinglePageProps {
|
|
79
|
+
mountId: string;
|
|
80
|
+
routes?: Route[];
|
|
81
|
+
initModules?: string[];
|
|
82
|
+
}
|
|
83
|
+
|
|
63
84
|
export async function initSinglePage( {
|
|
64
85
|
mountId,
|
|
65
86
|
routes,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
routes?: Route[];
|
|
69
|
-
} ) {
|
|
87
|
+
initModules,
|
|
88
|
+
}: InitSinglePageProps ) {
|
|
70
89
|
( routes ?? [] ).forEach( ( route ) => {
|
|
71
90
|
dispatch( store ).registerRoute( route );
|
|
72
91
|
} );
|
|
73
92
|
|
|
93
|
+
await runInitModules( initModules );
|
|
94
|
+
|
|
74
95
|
// Render the app without sidebar
|
|
75
96
|
const rootElement = document.getElementById( mountId );
|
|
76
97
|
if ( rootElement ) {
|
|
@@ -20,7 +20,7 @@ import { useState, useEffect, useMemo } from '@wordpress/element';
|
|
|
20
20
|
import { __ } from '@wordpress/i18n';
|
|
21
21
|
import { Page, getAdminThemeColors } from '@wordpress/admin-ui';
|
|
22
22
|
import { Tooltip } from '@wordpress/ui';
|
|
23
|
-
import {
|
|
23
|
+
import { ThemeProvider } from '@wordpress/theme';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Internal dependencies
|
|
@@ -34,7 +34,6 @@ import type { CanvasData } from '../../store/types';
|
|
|
34
34
|
import './style.scss';
|
|
35
35
|
|
|
36
36
|
const { useLocation, useMatches, Outlet } = unlock( routePrivateApis );
|
|
37
|
-
const { ThemeProvider } = unlock( themePrivateApis );
|
|
38
37
|
|
|
39
38
|
export default function Root() {
|
|
40
39
|
const matches = useMatches();
|
|
@@ -11,7 +11,7 @@ import { SnackbarNotices } from '@wordpress/notices';
|
|
|
11
11
|
import { SlotFillProvider } from '@wordpress/components';
|
|
12
12
|
import { useMemo } from '@wordpress/element';
|
|
13
13
|
import { getAdminThemeColors } from '@wordpress/admin-ui';
|
|
14
|
-
import {
|
|
14
|
+
import { ThemeProvider } from '@wordpress/theme';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Internal dependencies
|
|
@@ -24,7 +24,6 @@ import './style.scss';
|
|
|
24
24
|
import useRouteTitle from '../app/use-route-title';
|
|
25
25
|
|
|
26
26
|
const { useMatches, Outlet } = unlock( routePrivateApis );
|
|
27
|
-
const { ThemeProvider } = unlock( themePrivateApis );
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* Root component for single page mode (no sidebar).
|