@wordpress/boot 0.26.0 → 0.28.0
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/build-module/components/app/index.mjs.map +1 -1
- package/build-module/components/app/router.mjs +24 -24
- package/build-module/components/app/router.mjs.map +1 -1
- package/build-module/components/app/use-route-focus.mjs +162 -0
- package/build-module/components/app/use-route-focus.mjs.map +1 -0
- package/build-module/components/app/use-route-title.mjs +6 -1
- package/build-module/components/app/use-route-title.mjs.map +1 -1
- package/build-module/components/canvas/index.mjs +1 -1
- package/build-module/components/canvas/index.mjs.map +1 -1
- package/build-module/components/canvas/use-navigate-to-entity-record.mjs +20 -12
- package/build-module/components/canvas/use-navigate-to-entity-record.mjs.map +1 -1
- package/build-module/components/error-boundary/index.mjs +2 -2
- package/build-module/components/error-boundary/index.mjs.map +1 -1
- package/build-module/components/navigation/drilldown-item/index.mjs +3 -3
- package/build-module/components/navigation/drilldown-item/index.mjs.map +1 -1
- package/build-module/components/navigation/dropdown-item/index.mjs +3 -3
- package/build-module/components/navigation/dropdown-item/index.mjs.map +1 -1
- package/build-module/components/navigation/navigation-item/index.mjs +3 -3
- package/build-module/components/navigation/navigation-item/index.mjs.map +1 -1
- package/build-module/components/navigation/navigation-screen/index.mjs +7 -7
- package/build-module/components/navigation/navigation-screen/index.mjs.map +1 -1
- package/build-module/components/navigation/router-link-item.mjs.map +1 -1
- package/build-module/components/plugin-area/index.mjs +5 -1
- package/build-module/components/plugin-area/index.mjs.map +1 -1
- package/build-module/components/root/index.mjs +31 -28
- package/build-module/components/root/index.mjs.map +1 -1
- package/build-module/components/root/single-page.mjs +28 -25
- package/build-module/components/root/single-page.mjs.map +1 -1
- package/build-module/components/save-button/index.mjs +8 -3
- package/build-module/components/save-button/index.mjs.map +1 -1
- package/build-module/components/save-panel/index.mjs +3 -1
- package/build-module/components/save-panel/index.mjs.map +1 -1
- package/build-module/components/sidebar/index.mjs +11 -11
- package/build-module/components/sidebar/index.mjs.map +1 -1
- package/build-types/components/app/use-route-focus.d.ts +14 -0
- package/build-types/components/app/use-route-focus.d.ts.map +1 -0
- package/build-types/components/canvas/use-navigate-to-entity-record.d.ts +3 -1
- package/build-types/components/canvas/use-navigate-to-entity-record.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/build-types/components/save-button/index.d.ts.map +1 -1
- package/build-types/components/save-panel/index.d.ts.map +1 -1
- package/build-types/components/sidebar/index.d.ts.map +1 -1
- package/package.json +35 -28
- package/src/components/app/test/fixtures/own-focus.tsx +22 -0
- package/src/components/app/test/fixtures/settings-general.tsx +21 -0
- package/src/components/app/test/fixtures/settings.tsx +10 -0
- package/src/components/app/test/navigation-focus.browser.test.tsx +108 -0
- package/src/components/app/use-route-focus.ts +53 -0
- package/src/components/canvas/index.tsx +1 -1
- package/src/components/canvas/use-navigate-to-entity-record.ts +33 -16
- package/src/components/error-boundary/index.tsx +2 -2
- package/src/components/navigation/drilldown-item/index.tsx +3 -3
- package/src/components/navigation/dropdown-item/index.tsx +3 -3
- package/src/components/navigation/navigation-item/index.tsx +3 -3
- package/src/components/navigation/navigation-item/style.module.scss +13 -7
- package/src/components/navigation/navigation-screen/index.tsx +2 -2
- package/src/components/navigation/navigation-screen/style.module.scss +1 -1
- package/src/components/navigation/router-link-item.tsx +3 -3
- package/src/components/root/_layout.module.scss +8 -1
- package/src/components/root/index.tsx +11 -4
- package/src/components/root/single-page.tsx +4 -1
- package/src/components/root/test/admin-scheme-sidebar.browser.test.tsx +120 -0
- package/src/components/save-button/index.tsx +7 -2
- package/src/components/save-panel/index.tsx +4 -1
- package/src/components/sidebar/index.tsx +10 -6
- package/src/components/sidebar/style.module.scss +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["noticesStore","WPPluginArea"],"sources":["../../../src/components/plugin-area/index.tsx"],"sourcesContent":["import { useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { PluginArea as WPPluginArea } from '@wordpress/plugins';\n\n/**\n * Mounts every plugin registered with `registerPlugin`, so the fills they\n * render reach their slots.\n *\n * Sits at the root rather than with the editor: a plugin's fills mostly target\n * editor slots, but the component holding them is also where it registers\n * commands and extends a list, which the routes without a canvas need too.\n *\n * @return The mount point. Renders whatever the plugins do, and nothing itself.\n */\nexport default function PluginArea() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\treturn (\n\t\t<WPPluginArea\n\t\t\tonError={ ( name ) => {\n\t\t\t\tcreateErrorNotice(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tname\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAwB,aAAa;CACpC,MAAM,EAAE,sBAAsB,YAAaA,KAAa;CAExD,OACC,oBAACC,cAAD,EACC,UAAY,SAAU;EACrB,kBACC,
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["noticesStore","WPPluginArea"],"sources":["../../../src/components/plugin-area/index.tsx"],"sourcesContent":["import { useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { PluginArea as WPPluginArea } from '@wordpress/plugins';\n\n/**\n * Mounts every plugin registered with `registerPlugin`, so the fills they\n * render reach their slots.\n *\n * Sits at the root rather than with the editor: a plugin's fills mostly target\n * editor slots, but the component holding them is also where it registers\n * commands and extends a list, which the routes without a canvas need too.\n *\n * @return The mount point. Renders whatever the plugins do, and nothing itself.\n */\nexport default function PluginArea() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\treturn (\n\t\t<WPPluginArea\n\t\t\tonError={ ( name ) => {\n\t\t\t\tcreateErrorNotice(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tname\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAwB,aAAa;CACpC,MAAM,EAAE,sBAAsB,YAAaA,KAAa;CAExD,OACC,oBAACC,cAAD,EACC,UAAY,SAAU;EACrB,kBACC;;GAEC,GACC,oEACD;GACA;EACD,CACD;CACD,EACA,CAAA;AAEH"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import { privateApis } from "@wordpress/route";
|
|
3
|
+
import { privateApis as privateApis$1 } from "@wordpress/core-data";
|
|
3
4
|
import { SnackbarNotices } from "@wordpress/notices";
|
|
4
5
|
import { useReducedMotion, useViewportMatch } from "@wordpress/compose";
|
|
5
6
|
import { Button, SlotFillProvider, __unstableAnimatePresence, __unstableMotion } from "@wordpress/components";
|
|
6
7
|
import { menu } from "@wordpress/icons";
|
|
7
8
|
import { useEffect, useMemo, useState } from "@wordpress/element";
|
|
8
|
-
import { __ } from "@wordpress/i18n";
|
|
9
|
-
import { UnsavedChangesWarning } from "@wordpress/editor";
|
|
9
|
+
import { __, isRTL } from "@wordpress/i18n";
|
|
10
10
|
import { Page, getAdminThemeColors } from "@wordpress/admin-ui";
|
|
11
11
|
import { Tooltip } from "@wordpress/ui";
|
|
12
12
|
import { ThemeProvider } from "@wordpress/theme";
|
|
@@ -16,6 +16,7 @@ import CanvasRenderer from "../canvas-renderer/index.mjs";
|
|
|
16
16
|
import ErrorBoundary from "../error-boundary/index.mjs";
|
|
17
17
|
import PluginArea from "../plugin-area/index.mjs";
|
|
18
18
|
import useRouteTitle from "../app/use-route-title.mjs";
|
|
19
|
+
import useRouteFocus from "../app/use-route-focus.mjs";
|
|
19
20
|
import { unlock } from "../../lock-unlock.mjs";
|
|
20
21
|
import useSyncBodyBackground from "./use-sync-body-background.mjs";
|
|
21
22
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -122,34 +123,35 @@ function registerStyle(hash, css) {
|
|
|
122
123
|
for (const targetDocument of runtime.documents.keys()) injectStyle(targetDocument, hash, css);
|
|
123
124
|
}
|
|
124
125
|
// packages/boot/src/components/root/style.module.scss
|
|
125
|
-
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("fed1a7ec24", "._5c711a1cecefd5e8__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%}@media (min-width:600px){._5c711a1cecefd5e8__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._5c711a1cecefd5e8__layout{min-height:calc(100vh - 32px)}body:has(._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas) ._5c711a1cecefd5e8__layout{min-height:100vh}}:where(._5c711a1cecefd5e8__layout) img{height:auto;max-width:100%}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .cb865dcda5233b3b__components-snackbar,._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .components-snackbar{margin-inline:auto}._04b3b4e8346a2b7b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._615b052cf60fcff2__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._615b052cf60fcff2__sidebar._6be5d95ddf25e57f__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}.fd8d6491146392ce__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}.f37b94fd2c1f6020__layout-single-page .fd8d6491146392ce__mobile-sidebar-drawer{top:46px}.fd8d6491146392ce__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}._6da399dd0a232c1f__canvas._5568e036ddaba310__has-mobile-drawer{padding-top:65px;position:relative}.ff37ba01b23d0bcb__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.ff37ba01b23d0bcb__surfaces{margin:8px}.f37b94fd2c1f6020__layout-single-page .ff37ba01b23d0bcb__surfaces{margin-top:0;margin-inline-start:0}}.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:auto}}.e323e272b8b8ed4f__stage{z-index:2}@media (min-width:782px){.e323e272b8b8ed4f__stage{z-index:auto}}.b37b199f2111c5f8__inspector{z-index:3}@media (min-width:782px){.b37b199f2111c5f8__inspector{z-index:auto}}._6da399dd0a232c1f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._6da399dd0a232c1f__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:auto}._5c711a1cecefd5e8__layout.bbaf96f69377ab55__has-canvas .e323e272b8b8ed4f__stage,.b37b199f2111c5f8__inspector{max-width:400px}}._6da399dd0a232c1f__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .ff37ba01b23d0bcb__surfaces{gap:0;margin:0}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .b37b199f2111c5f8__inspector,._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .e323e272b8b8ed4f__stage{display:none}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:46px}@media (min-width:782px){.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:32px}}@media (max-width:782px){._6da399dd0a232c1f__canvas:not(._5568e036ddaba310__has-mobile-drawer),.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.fd8d6491146392ce__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._6da399dd0a232c1f__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._6da399dd0a232c1f__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.e323e272b8b8ed4f__stage{view-transition-name:boot--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.e323e272b8b8ed4f__stage{view-transition-name:boot-safari--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot-safari--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._5c711a1cecefd5e8__layout) *{view-transition-name:none!important}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(root),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._5c711a1cecefd5e8__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-header),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::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%}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_2e385023a338e4a9__zoomOut;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:e245c2f64b6256de__zoomIn;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_9aa5832f67721dd4__slideFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_4d20ae2879ce77c4__slideToRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:e56b4b1bb9ff1176__slideHeaderFromTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:e54b49876d2b7dc3__slideHeaderToTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:f74156de1cf32837__slideSidebarFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_157f548b8629f8b5__slideSidebarToRight;will-change:transform}@keyframes _2e385023a338e4a9__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes e245c2f64b6256de__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _9aa5832f67721dd4__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _4d20ae2879ce77c4__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes e56b4b1bb9ff1176__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes e54b49876d2b7dc3__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes f74156de1cf32837__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _157f548b8629f8b5__slideSidebarToRight{to{transform:translateX(100%)}}");
|
|
126
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("a1e6beedc4", ".ec570fbb2868f496__layout{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.ec570fbb2868f496__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.ec570fbb2868f496__layout{min-height:calc(100vh - 32px)}body:has(.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas) .ec570fbb2868f496__layout{min-height:100vh}}:where(.ec570fbb2868f496__layout) img{height:auto;max-width:100%}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .components-snackbar,.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .d4a42c38e09753ae__components-snackbar{margin-inline:auto}._8e41abc61ab38a0b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._9c70c6016411e369__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._9c70c6016411e369__sidebar.b5ec24928c8da36b__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);bottom:0;box-shadow:0 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.ed28d4367377467b__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._452d7ff5ac74eb84__layout-single-page .ed28d4367377467b__mobile-sidebar-drawer{top:46px}.ed28d4367377467b__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}.e6b2ba021c702ffb__canvas._7cfa87f7a2463610__has-mobile-drawer{padding-top:65px;position:relative}._0ec9efcb29281d50__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._0ec9efcb29281d50__surfaces{margin:8px}._452d7ff5ac74eb84__layout-single-page ._0ec9efcb29281d50__surfaces{height:calc(100vh - 40px);margin-top:0;margin-inline-start:0;position:sticky;top:32px}}.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:auto}}.a7bbf3aae333d0d8__stage{z-index:2}@media (min-width:782px){.a7bbf3aae333d0d8__stage{z-index:auto}}.e674251381793b5f__inspector{z-index:3}@media (min-width:782px){.e674251381793b5f__inspector{z-index:auto}}.e6b2ba021c702ffb__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.e6b2ba021c702ffb__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:auto}.e674251381793b5f__inspector,.ec570fbb2868f496__layout._15176d330d368459__has-canvas .a7bbf3aae333d0d8__stage{max-width:400px}}.e6b2ba021c702ffb__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas ._0ec9efcb29281d50__surfaces{gap:0;margin:0}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .a7bbf3aae333d0d8__stage,.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e674251381793b5f__inspector{display:none}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:46px}@media (min-width:782px){._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:32px}}@media (max-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector,.e6b2ba021c702ffb__canvas:not(._7cfa87f7a2463610__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.ed28d4367377467b__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.e6b2ba021c702ffb__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.e6b2ba021c702ffb__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.a7bbf3aae333d0d8__stage{view-transition-name:boot--stage}.e674251381793b5f__inspector{view-transition-name:boot--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.a7bbf3aae333d0d8__stage{view-transition-name:boot-safari--stage}.e674251381793b5f__inspector{view-transition-name:boot-safari--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.ec570fbb2868f496__layout) *{view-transition-name:none!important}}:root:has(.ec570fbb2868f496__layout)::view-transition-new(root),:root:has(.ec570fbb2868f496__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.ec570fbb2868f496__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-header),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector),:root:has(.ec570fbb2868f496__layout)::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%}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_5a1779b2f2c90caf__zoomOut;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_4e45a7a3e5f56197__zoomIn;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_537b6d2e5041d8b9__slideFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:db499c91f24ad370__slideToRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_6b902826dce37697__slideHeaderFromTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8e9025331ac47b17__slideHeaderToTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_08fb3da5295b47f8__slideSidebarFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:a0bb8b58f3887328__slideSidebarToRight;will-change:transform}@keyframes _5a1779b2f2c90caf__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _4e45a7a3e5f56197__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _537b6d2e5041d8b9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes db499c91f24ad370__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _6b902826dce37697__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8e9025331ac47b17__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _08fb3da5295b47f8__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes a0bb8b58f3887328__slideSidebarToRight{to{transform:translateX(100%)}}");
|
|
126
127
|
var style_module_default = {
|
|
127
|
-
"layout": "
|
|
128
|
-
"has-full-canvas": "
|
|
129
|
-
"notices-snackbar": "
|
|
130
|
-
"components-snackbar": "
|
|
131
|
-
"sidebar-backdrop": "
|
|
132
|
-
"sidebar": "
|
|
133
|
-
"is-mobile": "
|
|
134
|
-
"mobile-sidebar-drawer": "
|
|
135
|
-
"layout-single-page": "
|
|
136
|
-
"canvas": "
|
|
137
|
-
"has-mobile-drawer": "
|
|
138
|
-
"surfaces": "
|
|
139
|
-
"stage": "
|
|
140
|
-
"inspector": "
|
|
141
|
-
"has-canvas": "
|
|
142
|
-
"zoomOut": "
|
|
143
|
-
"zoomIn": "
|
|
144
|
-
"slideFromRight": "
|
|
145
|
-
"slideToRight": "
|
|
146
|
-
"slideHeaderFromTop": "
|
|
147
|
-
"slideHeaderToTop": "
|
|
148
|
-
"slideSidebarFromRight": "
|
|
149
|
-
"slideSidebarToRight": "
|
|
128
|
+
"layout": "ec570fbb2868f496__layout",
|
|
129
|
+
"has-full-canvas": "_412c860698817aa8__has-full-canvas",
|
|
130
|
+
"notices-snackbar": "_1c9a312567e28b20__notices-snackbar",
|
|
131
|
+
"components-snackbar": "d4a42c38e09753ae__components-snackbar",
|
|
132
|
+
"sidebar-backdrop": "_8e41abc61ab38a0b__sidebar-backdrop",
|
|
133
|
+
"sidebar": "_9c70c6016411e369__sidebar",
|
|
134
|
+
"is-mobile": "b5ec24928c8da36b__is-mobile",
|
|
135
|
+
"mobile-sidebar-drawer": "ed28d4367377467b__mobile-sidebar-drawer",
|
|
136
|
+
"layout-single-page": "_452d7ff5ac74eb84__layout-single-page",
|
|
137
|
+
"canvas": "e6b2ba021c702ffb__canvas",
|
|
138
|
+
"has-mobile-drawer": "_7cfa87f7a2463610__has-mobile-drawer",
|
|
139
|
+
"surfaces": "_0ec9efcb29281d50__surfaces",
|
|
140
|
+
"stage": "a7bbf3aae333d0d8__stage",
|
|
141
|
+
"inspector": "e674251381793b5f__inspector",
|
|
142
|
+
"has-canvas": "_15176d330d368459__has-canvas",
|
|
143
|
+
"zoomOut": "_5a1779b2f2c90caf__zoomOut",
|
|
144
|
+
"zoomIn": "_4e45a7a3e5f56197__zoomIn",
|
|
145
|
+
"slideFromRight": "_537b6d2e5041d8b9__slideFromRight",
|
|
146
|
+
"slideToRight": "db499c91f24ad370__slideToRight",
|
|
147
|
+
"slideHeaderFromTop": "_6b902826dce37697__slideHeaderFromTop",
|
|
148
|
+
"slideHeaderToTop": "_8e9025331ac47b17__slideHeaderToTop",
|
|
149
|
+
"slideSidebarFromRight": "_08fb3da5295b47f8__slideSidebarFromRight",
|
|
150
|
+
"slideSidebarToRight": "a0bb8b58f3887328__slideSidebarToRight"
|
|
150
151
|
};
|
|
151
152
|
// packages/boot/src/components/root/index.tsx
|
|
152
153
|
const { useLocation, useMatches, Outlet } = unlock(privateApis);
|
|
154
|
+
const { UnsavedChangesWarning } = unlock(privateApis$1);
|
|
153
155
|
function Root() {
|
|
154
156
|
const matches = useMatches();
|
|
155
157
|
const location = useLocation();
|
|
@@ -166,6 +168,7 @@ function Root() {
|
|
|
166
168
|
}, [location.pathname, isMobileViewport]);
|
|
167
169
|
const themeColors = useMemo(getAdminThemeColors, []);
|
|
168
170
|
const layoutRef = useSyncBodyBackground();
|
|
171
|
+
useRouteFocus(layoutRef);
|
|
169
172
|
return /* @__PURE__ */ jsx(SlotFillProvider, { children: /* @__PURE__ */ jsxs(Tooltip.Provider, { children: [/* @__PURE__ */ jsx(PluginArea, {}), /* @__PURE__ */ jsx(ThemeProvider, {
|
|
170
173
|
isRoot: true,
|
|
171
174
|
color: {
|
|
@@ -209,9 +212,9 @@ function Root() {
|
|
|
209
212
|
"aria-label": __("Close navigation panel")
|
|
210
213
|
}) }),
|
|
211
214
|
/* @__PURE__ */ jsx(__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ jsx(__unstableMotion.div, {
|
|
212
|
-
initial: { x: "-100%" },
|
|
215
|
+
initial: { x: isRTL() ? "100%" : "-100%" },
|
|
213
216
|
animate: { x: 0 },
|
|
214
|
-
exit: { x: "-100%" },
|
|
217
|
+
exit: { x: isRTL() ? "100%" : "-100%" },
|
|
215
218
|
transition: {
|
|
216
219
|
type: "tween",
|
|
217
220
|
duration: disableMotion ? 0 : .2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["routePrivateApis","styles","AnimatePresence","motion"],"sources":["../../../../style-runtime/src/index.ts","../../../src/components/root/style.module.scss","../../../src/components/root/index.tsx"],"sourcesContent":["type GlobalScopeWithStyleRuntime = typeof globalThis & {\n\t// This global is shared by separately bundled copies of this package.\n\t// Keep its shape backward compatible after release.\n\t__wpStyleRuntime?: {\n\t\tdocuments: Map< Document, number >;\n\t\tstyles: Map< string, string >;\n\t\tinjectedStyles: WeakMap< Document, Set< string > >;\n\t};\n};\n\nconst STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n\tconst globalScope = globalThis as GlobalScopeWithStyleRuntime;\n\n\tif ( globalScope.__wpStyleRuntime ) {\n\t\treturn globalScope.__wpStyleRuntime;\n\t}\n\n\tglobalScope.__wpStyleRuntime = {\n\t\tdocuments: new Map(),\n\t\tstyles: new Map(),\n\t\tinjectedStyles: new WeakMap(),\n\t};\n\n\tif ( typeof document !== 'undefined' ) {\n\t\tregisterDocument( document );\n\t}\n\n\treturn globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(\n\ttargetDocument: Document,\n\thash: string\n): boolean {\n\tif ( ! targetDocument.head ) {\n\t\treturn false;\n\t}\n\n\tfor ( const style of targetDocument.head.querySelectorAll(\n\t\t`style[${ STYLE_HASH_ATTRIBUTE }]`\n\t) ) {\n\t\tif ( style.getAttribute( STYLE_HASH_ATTRIBUTE ) === hash ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle( targetDocument: Document, hash: string, css: string ) {\n\tif ( ! targetDocument.head ) {\n\t\treturn;\n\t}\n\n\tconst runtime = getRuntime();\n\tlet injectedStyles = runtime.injectedStyles.get( targetDocument );\n\n\tif ( ! injectedStyles ) {\n\t\tinjectedStyles = new Set();\n\t\truntime.injectedStyles.set( targetDocument, injectedStyles );\n\t}\n\n\tif ( injectedStyles.has( hash ) ) {\n\t\treturn;\n\t}\n\n\t// Older generated CSS module output can still inject matching style tags\n\t// after this document's cache is created, so keep the DOM as the fallback\n\t// source of truth on cache misses.\n\tif ( documentContainsStyleHash( targetDocument, hash ) ) {\n\t\tinjectedStyles.add( hash );\n\t\treturn;\n\t}\n\n\tconst style = targetDocument.createElement( 'style' );\n\tstyle.setAttribute( STYLE_HASH_ATTRIBUTE, hash );\n\tstyle.appendChild( targetDocument.createTextNode( css ) );\n\ttargetDocument.head.appendChild( style );\n\tinjectedStyles.add( hash );\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument( targetDocument: Document ) {\n\tconst runtime = getRuntime();\n\n\truntime.documents.set(\n\t\ttargetDocument,\n\t\t( runtime.documents.get( targetDocument ) ?? 0 ) + 1\n\t);\n\n\tfor ( const [ hash, css ] of runtime.styles ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n\n\treturn () => {\n\t\tconst count = runtime.documents.get( targetDocument );\n\n\t\tif ( count === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count <= 1 ) {\n\t\t\truntime.documents.delete( targetDocument );\n\t\t\treturn;\n\t\t}\n\n\t\truntime.documents.set( targetDocument, count - 1 );\n\t};\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle( hash: string, css: string ) {\n\tconst runtime = getRuntime();\n\n\truntime.styles.set( hash, css );\n\n\tfor ( const targetDocument of runtime.documents.keys() ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n}\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"fed1a7ec24\", \"._5c711a1cecefd5e8__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%}@media (min-width:600px){._5c711a1cecefd5e8__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._5c711a1cecefd5e8__layout{min-height:calc(100vh - 32px)}body:has(._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas) ._5c711a1cecefd5e8__layout{min-height:100vh}}:where(._5c711a1cecefd5e8__layout) img{height:auto;max-width:100%}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .cb865dcda5233b3b__components-snackbar,._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .components-snackbar{margin-inline:auto}._04b3b4e8346a2b7b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._615b052cf60fcff2__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._615b052cf60fcff2__sidebar._6be5d95ddf25e57f__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}.fd8d6491146392ce__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}.f37b94fd2c1f6020__layout-single-page .fd8d6491146392ce__mobile-sidebar-drawer{top:46px}.fd8d6491146392ce__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}._6da399dd0a232c1f__canvas._5568e036ddaba310__has-mobile-drawer{padding-top:65px;position:relative}.ff37ba01b23d0bcb__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.ff37ba01b23d0bcb__surfaces{margin:8px}.f37b94fd2c1f6020__layout-single-page .ff37ba01b23d0bcb__surfaces{margin-top:0;margin-inline-start:0}}.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:auto}}.e323e272b8b8ed4f__stage{z-index:2}@media (min-width:782px){.e323e272b8b8ed4f__stage{z-index:auto}}.b37b199f2111c5f8__inspector{z-index:3}@media (min-width:782px){.b37b199f2111c5f8__inspector{z-index:auto}}._6da399dd0a232c1f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._6da399dd0a232c1f__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:auto}._5c711a1cecefd5e8__layout.bbaf96f69377ab55__has-canvas .e323e272b8b8ed4f__stage,.b37b199f2111c5f8__inspector{max-width:400px}}._6da399dd0a232c1f__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .ff37ba01b23d0bcb__surfaces{gap:0;margin:0}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .b37b199f2111c5f8__inspector,._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .e323e272b8b8ed4f__stage{display:none}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:46px}@media (min-width:782px){.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:32px}}@media (max-width:782px){._6da399dd0a232c1f__canvas:not(._5568e036ddaba310__has-mobile-drawer),.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.fd8d6491146392ce__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._6da399dd0a232c1f__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._6da399dd0a232c1f__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.e323e272b8b8ed4f__stage{view-transition-name:boot--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.e323e272b8b8ed4f__stage{view-transition-name:boot-safari--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot-safari--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._5c711a1cecefd5e8__layout) *{view-transition-name:none!important}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(root),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._5c711a1cecefd5e8__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-header),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::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%}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_2e385023a338e4a9__zoomOut;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:e245c2f64b6256de__zoomIn;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_9aa5832f67721dd4__slideFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_4d20ae2879ce77c4__slideToRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:e56b4b1bb9ff1176__slideHeaderFromTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:e54b49876d2b7dc3__slideHeaderToTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:f74156de1cf32837__slideSidebarFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_157f548b8629f8b5__slideSidebarToRight;will-change:transform}@keyframes _2e385023a338e4a9__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes e245c2f64b6256de__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _9aa5832f67721dd4__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _4d20ae2879ce77c4__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes e56b4b1bb9ff1176__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes e54b49876d2b7dc3__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes f74156de1cf32837__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _157f548b8629f8b5__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"_5c711a1cecefd5e8__layout\",\"has-full-canvas\":\"_52e00bad88ace7ce__has-full-canvas\",\"notices-snackbar\":\"eeebb116829e2f94__notices-snackbar\",\"components-snackbar\":\"cb865dcda5233b3b__components-snackbar\",\"sidebar-backdrop\":\"_04b3b4e8346a2b7b__sidebar-backdrop\",\"sidebar\":\"_615b052cf60fcff2__sidebar\",\"is-mobile\":\"_6be5d95ddf25e57f__is-mobile\",\"mobile-sidebar-drawer\":\"fd8d6491146392ce__mobile-sidebar-drawer\",\"layout-single-page\":\"f37b94fd2c1f6020__layout-single-page\",\"canvas\":\"_6da399dd0a232c1f__canvas\",\"has-mobile-drawer\":\"_5568e036ddaba310__has-mobile-drawer\",\"surfaces\":\"ff37ba01b23d0bcb__surfaces\",\"stage\":\"e323e272b8b8ed4f__stage\",\"inspector\":\"b37b199f2111c5f8__inspector\",\"has-canvas\":\"bbaf96f69377ab55__has-canvas\",\"zoomOut\":\"_2e385023a338e4a9__zoomOut\",\"zoomIn\":\"e245c2f64b6256de__zoomIn\",\"slideFromRight\":\"_9aa5832f67721dd4__slideFromRight\",\"slideToRight\":\"_4d20ae2879ce77c4__slideToRight\",\"slideHeaderFromTop\":\"e56b4b1bb9ff1176__slideHeaderFromTop\",\"slideHeaderToTop\":\"e54b49876d2b7dc3__slideHeaderToTop\",\"slideSidebarFromRight\":\"f74156de1cf32837__slideSidebarFromRight\",\"slideSidebarToRight\":\"_157f548b8629f8b5__slideSidebarToRight\"};\n","import clsx from 'clsx';\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 { UnsavedChangesWarning } from '@wordpress/editor';\nimport { Page, getAdminThemeColors } from '@wordpress/admin-ui';\nimport { Tooltip } from '@wordpress/ui';\nimport { ThemeProvider } from '@wordpress/theme';\nimport Sidebar from '../sidebar';\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport ErrorBoundary from '../error-boundary';\nimport PluginArea from '../plugin-area';\nimport useRouteTitle from '../app/use-route-title';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport useSyncBodyBackground from './use-sync-body-background';\nimport styles from './style.module.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\tCanvasData | null | 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\tconst layoutRef = useSyncBodyBackground();\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<Tooltip.Provider>\n\t\t\t\t<PluginArea />\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\tref={ layoutRef }\n\t\t\t\t\t\t\tclassName={ clsx( styles.layout, {\n\t\t\t\t\t\t\t\t[ styles[ 'has-canvas' ] ]:\n\t\t\t\t\t\t\t\t\t!! canvas || canvas === null,\n\t\t\t\t\t\t\t\t[ styles[ '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<UnsavedChangesWarning />\n\t\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t\t<SnackbarNotices\n\t\t\t\t\t\t\t\tclassName={ styles[ 'notices-snackbar' ] }\n\t\t\t\t\t\t\t/>\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={\n\t\t\t\t\t\t\t\t\t\t\t\tstyles[ 'sidebar-backdrop' ]\n\t\t\t\t\t\t\t\t\t\t\t}\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={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t\tstyles.sidebar,\n\t\t\t\t\t\t\t\t\t\t\t\tstyles[ 'is-mobile' ]\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<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={ styles.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={ styles.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\t// Reset to the default background color.\n\t\t\t\t\t\t\t\t\t\tbackground: '#fcfcfc',\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( styles.canvas, {\n\t\t\t\t\t\t\t\t\t\t\t\t[ styles[\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] ]:\n\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\tisMobileViewport,\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'mobile-sidebar-drawer'\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}\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\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<ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t\t\t<CanvasRenderer\n\t\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\t\trouteContentModule={\n\t\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\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</ErrorBoundary>\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,uBAAuB;;;;;;;;;AAU7B,SAAS,aAAa;CACr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D,uBACA,CAAE,gBACD,oBAACC,iBAAO,KAAR;MACC,SAAU,EAAE,GAAG,QAAQ;MACvB,SAAU,EAAE,GAAG,EAAE;MACjB,MAAO,EAAE,GAAG,QAAQ;MACpB,YAAa;OACZ,MAAM;OACN,UAAU,gBACP,IACA;OACH,MAAM;MACP;MACA,WAAY,KACXF,qBAAO,SACPA,qBAAQ,YACT;MAEA,UAAA,oBAAC,SAAD,CAAU,CAAA;KACC,CAAA,EAEE,CAAA;KAEf,CAAE,oBAAoB,CAAE,gBACzB,oBAAC,OAAD;MAAK,WAAYA,qBAAO;MACvB,UAAA,oBAAC,SAAD,CAAU,CAAA;KACN,CAAA;KAEN,oBAAC,OAAD;MAAK,WAAYA,qBAAO;MACvB,UAAA,qBAAC,eAAD;OACC,OAAQ;QACP,GAAG;QAEH,YAAY;OACb;OALD,UAAA,CAOC,oBAAC,QAAD,CAAS,CAAA,IAEL,UAAU,WAAW,SACxB,qBAAC,OAAD;QACC,WAAY,KAAMA,qBAAO,QAAQ,GAC9BA,qBACD,uBAEA,QAAQ,aACR,iBACF,CAAE;QAPH,UAAA,CASG,QAAQ,aACT,oBACC,oBAAC,OAAD;SACC,WACCA,qBACC;SAIF,UAAA,oBAAC,QAAD;UACC,MAAO;UACP,eACC,uBACC,IACD;UAED,OAAQ,GACP,uBACD;UACA,MAAK;SACL,CAAA;QACG,CAAA,GAEP,oBAAC,eAAD,EAAA,UACC,oBAAC,gBAAD;SACU;SAER;QAED,CAAA,EACa,CAAA,CACX;OAEQ,CAAA,CAAA;;KACX,CAAA;IACD;;EACS,CAAA;CACD,CAAA,CACE,EAAA,CAAA,EACD,CAAA;AAEpB"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["routePrivateApis","coreDataPrivateApis","styles","AnimatePresence","motion"],"sources":["../../../../style-runtime/src/index.ts","../../../src/components/root/style.module.scss","../../../src/components/root/index.tsx"],"sourcesContent":["type GlobalScopeWithStyleRuntime = typeof globalThis & {\n\t// This global is shared by separately bundled copies of this package.\n\t// Keep its shape backward compatible after release.\n\t__wpStyleRuntime?: {\n\t\tdocuments: Map< Document, number >;\n\t\tstyles: Map< string, string >;\n\t\tinjectedStyles: WeakMap< Document, Set< string > >;\n\t};\n};\n\nconst STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n\tconst globalScope = globalThis as GlobalScopeWithStyleRuntime;\n\n\tif ( globalScope.__wpStyleRuntime ) {\n\t\treturn globalScope.__wpStyleRuntime;\n\t}\n\n\tglobalScope.__wpStyleRuntime = {\n\t\tdocuments: new Map(),\n\t\tstyles: new Map(),\n\t\tinjectedStyles: new WeakMap(),\n\t};\n\n\tif ( typeof document !== 'undefined' ) {\n\t\tregisterDocument( document );\n\t}\n\n\treturn globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(\n\ttargetDocument: Document,\n\thash: string\n): boolean {\n\tif ( ! targetDocument.head ) {\n\t\treturn false;\n\t}\n\n\tfor ( const style of targetDocument.head.querySelectorAll(\n\t\t`style[${ STYLE_HASH_ATTRIBUTE }]`\n\t) ) {\n\t\tif ( style.getAttribute( STYLE_HASH_ATTRIBUTE ) === hash ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle( targetDocument: Document, hash: string, css: string ) {\n\tif ( ! targetDocument.head ) {\n\t\treturn;\n\t}\n\n\tconst runtime = getRuntime();\n\tlet injectedStyles = runtime.injectedStyles.get( targetDocument );\n\n\tif ( ! injectedStyles ) {\n\t\tinjectedStyles = new Set();\n\t\truntime.injectedStyles.set( targetDocument, injectedStyles );\n\t}\n\n\tif ( injectedStyles.has( hash ) ) {\n\t\treturn;\n\t}\n\n\t// Older generated CSS module output can still inject matching style tags\n\t// after this document's cache is created, so keep the DOM as the fallback\n\t// source of truth on cache misses.\n\tif ( documentContainsStyleHash( targetDocument, hash ) ) {\n\t\tinjectedStyles.add( hash );\n\t\treturn;\n\t}\n\n\tconst style = targetDocument.createElement( 'style' );\n\tstyle.setAttribute( STYLE_HASH_ATTRIBUTE, hash );\n\tstyle.appendChild( targetDocument.createTextNode( css ) );\n\ttargetDocument.head.appendChild( style );\n\tinjectedStyles.add( hash );\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument( targetDocument: Document ) {\n\tconst runtime = getRuntime();\n\n\truntime.documents.set(\n\t\ttargetDocument,\n\t\t( runtime.documents.get( targetDocument ) ?? 0 ) + 1\n\t);\n\n\tfor ( const [ hash, css ] of runtime.styles ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n\n\treturn () => {\n\t\tconst count = runtime.documents.get( targetDocument );\n\n\t\tif ( count === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count <= 1 ) {\n\t\t\truntime.documents.delete( targetDocument );\n\t\t\treturn;\n\t\t}\n\n\t\truntime.documents.set( targetDocument, count - 1 );\n\t};\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle( hash: string, css: string ) {\n\tconst runtime = getRuntime();\n\n\truntime.styles.set( hash, css );\n\n\tfor ( const targetDocument of runtime.documents.keys() ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n}\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"a1e6beedc4\", \".ec570fbb2868f496__layout{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.ec570fbb2868f496__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.ec570fbb2868f496__layout{min-height:calc(100vh - 32px)}body:has(.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas) .ec570fbb2868f496__layout{min-height:100vh}}:where(.ec570fbb2868f496__layout) img{height:auto;max-width:100%}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .components-snackbar,.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .d4a42c38e09753ae__components-snackbar{margin-inline:auto}._8e41abc61ab38a0b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._9c70c6016411e369__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._9c70c6016411e369__sidebar.b5ec24928c8da36b__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);bottom:0;box-shadow:0 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.ed28d4367377467b__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._452d7ff5ac74eb84__layout-single-page .ed28d4367377467b__mobile-sidebar-drawer{top:46px}.ed28d4367377467b__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}.e6b2ba021c702ffb__canvas._7cfa87f7a2463610__has-mobile-drawer{padding-top:65px;position:relative}._0ec9efcb29281d50__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._0ec9efcb29281d50__surfaces{margin:8px}._452d7ff5ac74eb84__layout-single-page ._0ec9efcb29281d50__surfaces{height:calc(100vh - 40px);margin-top:0;margin-inline-start:0;position:sticky;top:32px}}.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:auto}}.a7bbf3aae333d0d8__stage{z-index:2}@media (min-width:782px){.a7bbf3aae333d0d8__stage{z-index:auto}}.e674251381793b5f__inspector{z-index:3}@media (min-width:782px){.e674251381793b5f__inspector{z-index:auto}}.e6b2ba021c702ffb__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.e6b2ba021c702ffb__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:auto}.e674251381793b5f__inspector,.ec570fbb2868f496__layout._15176d330d368459__has-canvas .a7bbf3aae333d0d8__stage{max-width:400px}}.e6b2ba021c702ffb__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas ._0ec9efcb29281d50__surfaces{gap:0;margin:0}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .a7bbf3aae333d0d8__stage,.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e674251381793b5f__inspector{display:none}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:46px}@media (min-width:782px){._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:32px}}@media (max-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector,.e6b2ba021c702ffb__canvas:not(._7cfa87f7a2463610__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.ed28d4367377467b__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.e6b2ba021c702ffb__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.e6b2ba021c702ffb__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.a7bbf3aae333d0d8__stage{view-transition-name:boot--stage}.e674251381793b5f__inspector{view-transition-name:boot--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.a7bbf3aae333d0d8__stage{view-transition-name:boot-safari--stage}.e674251381793b5f__inspector{view-transition-name:boot-safari--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.ec570fbb2868f496__layout) *{view-transition-name:none!important}}:root:has(.ec570fbb2868f496__layout)::view-transition-new(root),:root:has(.ec570fbb2868f496__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.ec570fbb2868f496__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-header),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector),:root:has(.ec570fbb2868f496__layout)::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%}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_5a1779b2f2c90caf__zoomOut;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_4e45a7a3e5f56197__zoomIn;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_537b6d2e5041d8b9__slideFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:db499c91f24ad370__slideToRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_6b902826dce37697__slideHeaderFromTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8e9025331ac47b17__slideHeaderToTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_08fb3da5295b47f8__slideSidebarFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:a0bb8b58f3887328__slideSidebarToRight;will-change:transform}@keyframes _5a1779b2f2c90caf__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _4e45a7a3e5f56197__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _537b6d2e5041d8b9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes db499c91f24ad370__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _6b902826dce37697__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8e9025331ac47b17__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _08fb3da5295b47f8__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes a0bb8b58f3887328__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"ec570fbb2868f496__layout\",\"has-full-canvas\":\"_412c860698817aa8__has-full-canvas\",\"notices-snackbar\":\"_1c9a312567e28b20__notices-snackbar\",\"components-snackbar\":\"d4a42c38e09753ae__components-snackbar\",\"sidebar-backdrop\":\"_8e41abc61ab38a0b__sidebar-backdrop\",\"sidebar\":\"_9c70c6016411e369__sidebar\",\"is-mobile\":\"b5ec24928c8da36b__is-mobile\",\"mobile-sidebar-drawer\":\"ed28d4367377467b__mobile-sidebar-drawer\",\"layout-single-page\":\"_452d7ff5ac74eb84__layout-single-page\",\"canvas\":\"e6b2ba021c702ffb__canvas\",\"has-mobile-drawer\":\"_7cfa87f7a2463610__has-mobile-drawer\",\"surfaces\":\"_0ec9efcb29281d50__surfaces\",\"stage\":\"a7bbf3aae333d0d8__stage\",\"inspector\":\"e674251381793b5f__inspector\",\"has-canvas\":\"_15176d330d368459__has-canvas\",\"zoomOut\":\"_5a1779b2f2c90caf__zoomOut\",\"zoomIn\":\"_4e45a7a3e5f56197__zoomIn\",\"slideFromRight\":\"_537b6d2e5041d8b9__slideFromRight\",\"slideToRight\":\"db499c91f24ad370__slideToRight\",\"slideHeaderFromTop\":\"_6b902826dce37697__slideHeaderFromTop\",\"slideHeaderToTop\":\"_8e9025331ac47b17__slideHeaderToTop\",\"slideSidebarFromRight\":\"_08fb3da5295b47f8__slideSidebarFromRight\",\"slideSidebarToRight\":\"a0bb8b58f3887328__slideSidebarToRight\"};\n","import clsx from 'clsx';\nimport { privateApis as routePrivateApis } from '@wordpress/route';\nimport { privateApis as coreDataPrivateApis } from '@wordpress/core-data';\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 { __, isRTL } from '@wordpress/i18n';\nimport { Page, getAdminThemeColors } from '@wordpress/admin-ui';\nimport { Tooltip } from '@wordpress/ui';\nimport { ThemeProvider } from '@wordpress/theme';\nimport Sidebar from '../sidebar';\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport ErrorBoundary from '../error-boundary';\nimport PluginArea from '../plugin-area';\nimport useRouteTitle from '../app/use-route-title';\nimport useRouteFocus from '../app/use-route-focus';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport useSyncBodyBackground from './use-sync-body-background';\nimport styles from './style.module.scss';\n\nconst { useLocation, useMatches, Outlet } = unlock( routePrivateApis );\nconst { UnsavedChangesWarning } = unlock( coreDataPrivateApis );\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\tCanvasData | null | 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\tconst layoutRef = useSyncBodyBackground();\n\tuseRouteFocus( layoutRef );\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<Tooltip.Provider>\n\t\t\t\t<PluginArea />\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\tref={ layoutRef }\n\t\t\t\t\t\t\tclassName={ clsx( styles.layout, {\n\t\t\t\t\t\t\t\t[ styles[ 'has-canvas' ] ]:\n\t\t\t\t\t\t\t\t\t!! canvas || canvas === null,\n\t\t\t\t\t\t\t\t[ styles[ '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<UnsavedChangesWarning />\n\t\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t\t<SnackbarNotices\n\t\t\t\t\t\t\t\tclassName={ styles[ 'notices-snackbar' ] }\n\t\t\t\t\t\t\t/>\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={\n\t\t\t\t\t\t\t\t\t\t\t\tstyles[ 'sidebar-backdrop' ]\n\t\t\t\t\t\t\t\t\t\t\t}\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={ {\n\t\t\t\t\t\t\t\t\t\t\t\tx: isRTL() ? '100%' : '-100%',\n\t\t\t\t\t\t\t\t\t\t\t} }\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={ {\n\t\t\t\t\t\t\t\t\t\t\t\tx: isRTL() ? '100%' : '-100%',\n\t\t\t\t\t\t\t\t\t\t\t} }\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={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t\tstyles.sidebar,\n\t\t\t\t\t\t\t\t\t\t\t\tstyles[ 'is-mobile' ]\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<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={ styles.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={ styles.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\t// Reset to the default background color.\n\t\t\t\t\t\t\t\t\t\tbackground: '#fcfcfc',\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( styles.canvas, {\n\t\t\t\t\t\t\t\t\t\t\t\t[ styles[\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] ]:\n\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\tisMobileViewport,\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'mobile-sidebar-drawer'\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}\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\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<ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t\t\t<CanvasRenderer\n\t\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\t\trouteContentModule={\n\t\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\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</ErrorBoundary>\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,uBAAuB;;;;;;;;;AAU7B,SAAS,aAAa;CACrB,MAAM,cAAc;CAEpB,IAAK,YAAY,kBAChB,OAAO,YAAY;CAGpB,YAAY,mBAAmB;EAC9B,2BAAW,IAAI,IAAI;EACnB,wBAAQ,IAAI,IAAI;EAChB,gCAAgB,IAAI,QAAQ;CAC7B;CAEA,IAAK,OAAO,aAAa,aACxB,iBAAkB,QAAS;CAG5B,OAAO,YAAY;AACpB;;;;;;;;;AAUA,SAAS,0BACR,gBACA,MACU;CACV,IAAK,CAAE,eAAe,MACrB,OAAO;CAGR,KAAM,MAAM,SAAS,eAAe,KAAK,iBACxC,SAAU,qBAAsB,EACjC,GACC,IAAK,MAAM,aAAc,oBAAqB,MAAM,MACnD,OAAO;CAIT,OAAO;AACR;;;;;;;;;AAUA,SAAS,YAAa,gBAA0B,MAAc,KAAc;CAC3E,IAAK,CAAE,eAAe,MACrB;CAGD,MAAM,UAAU,WAAW;CAC3B,IAAI,iBAAiB,QAAQ,eAAe,IAAK,cAAe;CAEhE,IAAK,CAAE,gBAAiB;EACvB,iCAAiB,IAAI,IAAI;EACzB,QAAQ,eAAe,IAAK,gBAAgB,cAAe;CAC5D;CAEA,IAAK,eAAe,IAAK,IAAK,GAC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AC9BA,qBACD,uBAEA,QAAQ,aACR,iBACF,CAAE;QAPH,UAAA,CASG,QAAQ,aACT,oBACC,oBAAC,OAAD;SACC,WACCA,qBACC;SAIF,UAAA,oBAAC,QAAD;UACC,MAAO;UACP,eACC,uBACC,IACD;UAED,OAAQ,GACP,uBACD;UACA,MAAK;SACL,CAAA;QACG,CAAA,GAEP,oBAAC,eAAD,EAAA,UACC,oBAAC,gBAAD;SACU;SAER;QAED,CAAA,EACa,CAAA,CACX;OAEQ,CAAA,CAAA;;KACX,CAAA;IACD;;EACS,CAAA;CACD,CAAA,CACE,EAAA,CAAA,EACD,CAAA;AAEpB"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import { privateApis } from "@wordpress/route";
|
|
3
|
+
import { privateApis as privateApis$1 } from "@wordpress/core-data";
|
|
3
4
|
import { SnackbarNotices } from "@wordpress/notices";
|
|
4
5
|
import { SlotFillProvider } from "@wordpress/components";
|
|
5
6
|
import { useMemo } from "@wordpress/element";
|
|
6
7
|
import { getAdminThemeColors } from "@wordpress/admin-ui";
|
|
7
8
|
import { ThemeProvider } from "@wordpress/theme";
|
|
8
|
-
import { UnsavedChangesWarning } from "@wordpress/editor";
|
|
9
9
|
import SavePanel from "../save-panel/index.mjs";
|
|
10
10
|
import CanvasRenderer from "../canvas-renderer/index.mjs";
|
|
11
11
|
import PluginArea from "../plugin-area/index.mjs";
|
|
12
12
|
import { unlock } from "../../lock-unlock.mjs";
|
|
13
13
|
import useSyncBodyBackground from "./use-sync-body-background.mjs";
|
|
14
14
|
import useRouteTitle from "../app/use-route-title.mjs";
|
|
15
|
+
import useRouteFocus from "../app/use-route-focus.mjs";
|
|
15
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
// packages/style-runtime/src/index.ts
|
|
17
18
|
const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
@@ -116,34 +117,35 @@ function registerStyle(hash, css) {
|
|
|
116
117
|
for (const targetDocument of runtime.documents.keys()) injectStyle(targetDocument, hash, css);
|
|
117
118
|
}
|
|
118
119
|
// packages/boot/src/components/root/style.module.scss
|
|
119
|
-
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("fed1a7ec24", "._5c711a1cecefd5e8__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%}@media (min-width:600px){._5c711a1cecefd5e8__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._5c711a1cecefd5e8__layout{min-height:calc(100vh - 32px)}body:has(._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas) ._5c711a1cecefd5e8__layout{min-height:100vh}}:where(._5c711a1cecefd5e8__layout) img{height:auto;max-width:100%}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .cb865dcda5233b3b__components-snackbar,._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .components-snackbar{margin-inline:auto}._04b3b4e8346a2b7b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._615b052cf60fcff2__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._615b052cf60fcff2__sidebar._6be5d95ddf25e57f__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}.fd8d6491146392ce__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}.f37b94fd2c1f6020__layout-single-page .fd8d6491146392ce__mobile-sidebar-drawer{top:46px}.fd8d6491146392ce__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}._6da399dd0a232c1f__canvas._5568e036ddaba310__has-mobile-drawer{padding-top:65px;position:relative}.ff37ba01b23d0bcb__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.ff37ba01b23d0bcb__surfaces{margin:8px}.f37b94fd2c1f6020__layout-single-page .ff37ba01b23d0bcb__surfaces{margin-top:0;margin-inline-start:0}}.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:auto}}.e323e272b8b8ed4f__stage{z-index:2}@media (min-width:782px){.e323e272b8b8ed4f__stage{z-index:auto}}.b37b199f2111c5f8__inspector{z-index:3}@media (min-width:782px){.b37b199f2111c5f8__inspector{z-index:auto}}._6da399dd0a232c1f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._6da399dd0a232c1f__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:auto}._5c711a1cecefd5e8__layout.bbaf96f69377ab55__has-canvas .e323e272b8b8ed4f__stage,.b37b199f2111c5f8__inspector{max-width:400px}}._6da399dd0a232c1f__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .ff37ba01b23d0bcb__surfaces{gap:0;margin:0}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .b37b199f2111c5f8__inspector,._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .e323e272b8b8ed4f__stage{display:none}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:46px}@media (min-width:782px){.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:32px}}@media (max-width:782px){._6da399dd0a232c1f__canvas:not(._5568e036ddaba310__has-mobile-drawer),.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.fd8d6491146392ce__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._6da399dd0a232c1f__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._6da399dd0a232c1f__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.e323e272b8b8ed4f__stage{view-transition-name:boot--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.e323e272b8b8ed4f__stage{view-transition-name:boot-safari--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot-safari--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._5c711a1cecefd5e8__layout) *{view-transition-name:none!important}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(root),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._5c711a1cecefd5e8__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-header),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::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%}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_2e385023a338e4a9__zoomOut;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:e245c2f64b6256de__zoomIn;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_9aa5832f67721dd4__slideFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_4d20ae2879ce77c4__slideToRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:e56b4b1bb9ff1176__slideHeaderFromTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:e54b49876d2b7dc3__slideHeaderToTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:f74156de1cf32837__slideSidebarFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_157f548b8629f8b5__slideSidebarToRight;will-change:transform}@keyframes _2e385023a338e4a9__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes e245c2f64b6256de__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _9aa5832f67721dd4__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _4d20ae2879ce77c4__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes e56b4b1bb9ff1176__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes e54b49876d2b7dc3__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes f74156de1cf32837__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _157f548b8629f8b5__slideSidebarToRight{to{transform:translateX(100%)}}");
|
|
120
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("a1e6beedc4", ".ec570fbb2868f496__layout{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.ec570fbb2868f496__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.ec570fbb2868f496__layout{min-height:calc(100vh - 32px)}body:has(.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas) .ec570fbb2868f496__layout{min-height:100vh}}:where(.ec570fbb2868f496__layout) img{height:auto;max-width:100%}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .components-snackbar,.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .d4a42c38e09753ae__components-snackbar{margin-inline:auto}._8e41abc61ab38a0b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._9c70c6016411e369__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._9c70c6016411e369__sidebar.b5ec24928c8da36b__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);bottom:0;box-shadow:0 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.ed28d4367377467b__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._452d7ff5ac74eb84__layout-single-page .ed28d4367377467b__mobile-sidebar-drawer{top:46px}.ed28d4367377467b__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}.e6b2ba021c702ffb__canvas._7cfa87f7a2463610__has-mobile-drawer{padding-top:65px;position:relative}._0ec9efcb29281d50__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._0ec9efcb29281d50__surfaces{margin:8px}._452d7ff5ac74eb84__layout-single-page ._0ec9efcb29281d50__surfaces{height:calc(100vh - 40px);margin-top:0;margin-inline-start:0;position:sticky;top:32px}}.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:auto}}.a7bbf3aae333d0d8__stage{z-index:2}@media (min-width:782px){.a7bbf3aae333d0d8__stage{z-index:auto}}.e674251381793b5f__inspector{z-index:3}@media (min-width:782px){.e674251381793b5f__inspector{z-index:auto}}.e6b2ba021c702ffb__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.e6b2ba021c702ffb__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:auto}.e674251381793b5f__inspector,.ec570fbb2868f496__layout._15176d330d368459__has-canvas .a7bbf3aae333d0d8__stage{max-width:400px}}.e6b2ba021c702ffb__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas ._0ec9efcb29281d50__surfaces{gap:0;margin:0}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .a7bbf3aae333d0d8__stage,.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e674251381793b5f__inspector{display:none}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:46px}@media (min-width:782px){._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:32px}}@media (max-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector,.e6b2ba021c702ffb__canvas:not(._7cfa87f7a2463610__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.ed28d4367377467b__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.e6b2ba021c702ffb__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.e6b2ba021c702ffb__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.a7bbf3aae333d0d8__stage{view-transition-name:boot--stage}.e674251381793b5f__inspector{view-transition-name:boot--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.a7bbf3aae333d0d8__stage{view-transition-name:boot-safari--stage}.e674251381793b5f__inspector{view-transition-name:boot-safari--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.ec570fbb2868f496__layout) *{view-transition-name:none!important}}:root:has(.ec570fbb2868f496__layout)::view-transition-new(root),:root:has(.ec570fbb2868f496__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.ec570fbb2868f496__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-header),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector),:root:has(.ec570fbb2868f496__layout)::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%}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_5a1779b2f2c90caf__zoomOut;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_4e45a7a3e5f56197__zoomIn;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_537b6d2e5041d8b9__slideFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:db499c91f24ad370__slideToRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_6b902826dce37697__slideHeaderFromTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8e9025331ac47b17__slideHeaderToTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_08fb3da5295b47f8__slideSidebarFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:a0bb8b58f3887328__slideSidebarToRight;will-change:transform}@keyframes _5a1779b2f2c90caf__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _4e45a7a3e5f56197__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _537b6d2e5041d8b9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes db499c91f24ad370__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _6b902826dce37697__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8e9025331ac47b17__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _08fb3da5295b47f8__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes a0bb8b58f3887328__slideSidebarToRight{to{transform:translateX(100%)}}");
|
|
120
121
|
var style_module_default = {
|
|
121
|
-
"layout": "
|
|
122
|
-
"has-full-canvas": "
|
|
123
|
-
"notices-snackbar": "
|
|
124
|
-
"components-snackbar": "
|
|
125
|
-
"sidebar-backdrop": "
|
|
126
|
-
"sidebar": "
|
|
127
|
-
"is-mobile": "
|
|
128
|
-
"mobile-sidebar-drawer": "
|
|
129
|
-
"layout-single-page": "
|
|
130
|
-
"canvas": "
|
|
131
|
-
"has-mobile-drawer": "
|
|
132
|
-
"surfaces": "
|
|
133
|
-
"stage": "
|
|
134
|
-
"inspector": "
|
|
135
|
-
"has-canvas": "
|
|
136
|
-
"zoomOut": "
|
|
137
|
-
"zoomIn": "
|
|
138
|
-
"slideFromRight": "
|
|
139
|
-
"slideToRight": "
|
|
140
|
-
"slideHeaderFromTop": "
|
|
141
|
-
"slideHeaderToTop": "
|
|
142
|
-
"slideSidebarFromRight": "
|
|
143
|
-
"slideSidebarToRight": "
|
|
122
|
+
"layout": "ec570fbb2868f496__layout",
|
|
123
|
+
"has-full-canvas": "_412c860698817aa8__has-full-canvas",
|
|
124
|
+
"notices-snackbar": "_1c9a312567e28b20__notices-snackbar",
|
|
125
|
+
"components-snackbar": "d4a42c38e09753ae__components-snackbar",
|
|
126
|
+
"sidebar-backdrop": "_8e41abc61ab38a0b__sidebar-backdrop",
|
|
127
|
+
"sidebar": "_9c70c6016411e369__sidebar",
|
|
128
|
+
"is-mobile": "b5ec24928c8da36b__is-mobile",
|
|
129
|
+
"mobile-sidebar-drawer": "ed28d4367377467b__mobile-sidebar-drawer",
|
|
130
|
+
"layout-single-page": "_452d7ff5ac74eb84__layout-single-page",
|
|
131
|
+
"canvas": "e6b2ba021c702ffb__canvas",
|
|
132
|
+
"has-mobile-drawer": "_7cfa87f7a2463610__has-mobile-drawer",
|
|
133
|
+
"surfaces": "_0ec9efcb29281d50__surfaces",
|
|
134
|
+
"stage": "a7bbf3aae333d0d8__stage",
|
|
135
|
+
"inspector": "e674251381793b5f__inspector",
|
|
136
|
+
"has-canvas": "_15176d330d368459__has-canvas",
|
|
137
|
+
"zoomOut": "_5a1779b2f2c90caf__zoomOut",
|
|
138
|
+
"zoomIn": "_4e45a7a3e5f56197__zoomIn",
|
|
139
|
+
"slideFromRight": "_537b6d2e5041d8b9__slideFromRight",
|
|
140
|
+
"slideToRight": "db499c91f24ad370__slideToRight",
|
|
141
|
+
"slideHeaderFromTop": "_6b902826dce37697__slideHeaderFromTop",
|
|
142
|
+
"slideHeaderToTop": "_8e9025331ac47b17__slideHeaderToTop",
|
|
143
|
+
"slideSidebarFromRight": "_08fb3da5295b47f8__slideSidebarFromRight",
|
|
144
|
+
"slideSidebarToRight": "a0bb8b58f3887328__slideSidebarToRight"
|
|
144
145
|
};
|
|
145
146
|
// packages/boot/src/components/root/single-page.tsx
|
|
146
147
|
const { useMatches, Outlet } = unlock(privateApis);
|
|
148
|
+
const { UnsavedChangesWarning } = unlock(privateApis$1);
|
|
147
149
|
/**
|
|
148
150
|
* Root component for single page mode (no sidebar).
|
|
149
151
|
* Used when rendering pages within wp-admin without taking over the full page.
|
|
@@ -157,6 +159,7 @@ function RootSinglePage() {
|
|
|
157
159
|
useRouteTitle();
|
|
158
160
|
const themeColors = useMemo(getAdminThemeColors, []);
|
|
159
161
|
const layoutRef = useSyncBodyBackground();
|
|
162
|
+
useRouteFocus(layoutRef);
|
|
160
163
|
return /* @__PURE__ */ jsxs(SlotFillProvider, { children: [/* @__PURE__ */ jsx(PluginArea, {}), /* @__PURE__ */ jsx(ThemeProvider, {
|
|
161
164
|
isRoot: true,
|
|
162
165
|
color: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-page.mjs","names":["routePrivateApis","styles"],"sources":["../../../../style-runtime/src/index.ts","../../../src/components/root/style.module.scss","../../../src/components/root/single-page.tsx"],"sourcesContent":["type GlobalScopeWithStyleRuntime = typeof globalThis & {\n\t// This global is shared by separately bundled copies of this package.\n\t// Keep its shape backward compatible after release.\n\t__wpStyleRuntime?: {\n\t\tdocuments: Map< Document, number >;\n\t\tstyles: Map< string, string >;\n\t\tinjectedStyles: WeakMap< Document, Set< string > >;\n\t};\n};\n\nconst STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n\tconst globalScope = globalThis as GlobalScopeWithStyleRuntime;\n\n\tif ( globalScope.__wpStyleRuntime ) {\n\t\treturn globalScope.__wpStyleRuntime;\n\t}\n\n\tglobalScope.__wpStyleRuntime = {\n\t\tdocuments: new Map(),\n\t\tstyles: new Map(),\n\t\tinjectedStyles: new WeakMap(),\n\t};\n\n\tif ( typeof document !== 'undefined' ) {\n\t\tregisterDocument( document );\n\t}\n\n\treturn globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(\n\ttargetDocument: Document,\n\thash: string\n): boolean {\n\tif ( ! targetDocument.head ) {\n\t\treturn false;\n\t}\n\n\tfor ( const style of targetDocument.head.querySelectorAll(\n\t\t`style[${ STYLE_HASH_ATTRIBUTE }]`\n\t) ) {\n\t\tif ( style.getAttribute( STYLE_HASH_ATTRIBUTE ) === hash ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle( targetDocument: Document, hash: string, css: string ) {\n\tif ( ! targetDocument.head ) {\n\t\treturn;\n\t}\n\n\tconst runtime = getRuntime();\n\tlet injectedStyles = runtime.injectedStyles.get( targetDocument );\n\n\tif ( ! injectedStyles ) {\n\t\tinjectedStyles = new Set();\n\t\truntime.injectedStyles.set( targetDocument, injectedStyles );\n\t}\n\n\tif ( injectedStyles.has( hash ) ) {\n\t\treturn;\n\t}\n\n\t// Older generated CSS module output can still inject matching style tags\n\t// after this document's cache is created, so keep the DOM as the fallback\n\t// source of truth on cache misses.\n\tif ( documentContainsStyleHash( targetDocument, hash ) ) {\n\t\tinjectedStyles.add( hash );\n\t\treturn;\n\t}\n\n\tconst style = targetDocument.createElement( 'style' );\n\tstyle.setAttribute( STYLE_HASH_ATTRIBUTE, hash );\n\tstyle.appendChild( targetDocument.createTextNode( css ) );\n\ttargetDocument.head.appendChild( style );\n\tinjectedStyles.add( hash );\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument( targetDocument: Document ) {\n\tconst runtime = getRuntime();\n\n\truntime.documents.set(\n\t\ttargetDocument,\n\t\t( runtime.documents.get( targetDocument ) ?? 0 ) + 1\n\t);\n\n\tfor ( const [ hash, css ] of runtime.styles ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n\n\treturn () => {\n\t\tconst count = runtime.documents.get( targetDocument );\n\n\t\tif ( count === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count <= 1 ) {\n\t\t\truntime.documents.delete( targetDocument );\n\t\t\treturn;\n\t\t}\n\n\t\truntime.documents.set( targetDocument, count - 1 );\n\t};\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle( hash: string, css: string ) {\n\tconst runtime = getRuntime();\n\n\truntime.styles.set( hash, css );\n\n\tfor ( const targetDocument of runtime.documents.keys() ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n}\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"fed1a7ec24\", \"._5c711a1cecefd5e8__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%}@media (min-width:600px){._5c711a1cecefd5e8__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._5c711a1cecefd5e8__layout{min-height:calc(100vh - 32px)}body:has(._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas) ._5c711a1cecefd5e8__layout{min-height:100vh}}:where(._5c711a1cecefd5e8__layout) img{height:auto;max-width:100%}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .cb865dcda5233b3b__components-snackbar,._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .components-snackbar{margin-inline:auto}._04b3b4e8346a2b7b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._615b052cf60fcff2__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._615b052cf60fcff2__sidebar._6be5d95ddf25e57f__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}.fd8d6491146392ce__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}.f37b94fd2c1f6020__layout-single-page .fd8d6491146392ce__mobile-sidebar-drawer{top:46px}.fd8d6491146392ce__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}._6da399dd0a232c1f__canvas._5568e036ddaba310__has-mobile-drawer{padding-top:65px;position:relative}.ff37ba01b23d0bcb__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.ff37ba01b23d0bcb__surfaces{margin:8px}.f37b94fd2c1f6020__layout-single-page .ff37ba01b23d0bcb__surfaces{margin-top:0;margin-inline-start:0}}.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:auto}}.e323e272b8b8ed4f__stage{z-index:2}@media (min-width:782px){.e323e272b8b8ed4f__stage{z-index:auto}}.b37b199f2111c5f8__inspector{z-index:3}@media (min-width:782px){.b37b199f2111c5f8__inspector{z-index:auto}}._6da399dd0a232c1f__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._6da399dd0a232c1f__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:auto}._5c711a1cecefd5e8__layout.bbaf96f69377ab55__has-canvas .e323e272b8b8ed4f__stage,.b37b199f2111c5f8__inspector{max-width:400px}}._6da399dd0a232c1f__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .ff37ba01b23d0bcb__surfaces{gap:0;margin:0}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .b37b199f2111c5f8__inspector,._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .e323e272b8b8ed4f__stage{display:none}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:46px}@media (min-width:782px){.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:32px}}@media (max-width:782px){._6da399dd0a232c1f__canvas:not(._5568e036ddaba310__has-mobile-drawer),.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.fd8d6491146392ce__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._6da399dd0a232c1f__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._6da399dd0a232c1f__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.e323e272b8b8ed4f__stage{view-transition-name:boot--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.e323e272b8b8ed4f__stage{view-transition-name:boot-safari--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot-safari--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._5c711a1cecefd5e8__layout) *{view-transition-name:none!important}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(root),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._5c711a1cecefd5e8__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-header),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::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%}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_2e385023a338e4a9__zoomOut;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:e245c2f64b6256de__zoomIn;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_9aa5832f67721dd4__slideFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_4d20ae2879ce77c4__slideToRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:e56b4b1bb9ff1176__slideHeaderFromTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:e54b49876d2b7dc3__slideHeaderToTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:f74156de1cf32837__slideSidebarFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_157f548b8629f8b5__slideSidebarToRight;will-change:transform}@keyframes _2e385023a338e4a9__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes e245c2f64b6256de__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _9aa5832f67721dd4__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _4d20ae2879ce77c4__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes e56b4b1bb9ff1176__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes e54b49876d2b7dc3__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes f74156de1cf32837__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _157f548b8629f8b5__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"_5c711a1cecefd5e8__layout\",\"has-full-canvas\":\"_52e00bad88ace7ce__has-full-canvas\",\"notices-snackbar\":\"eeebb116829e2f94__notices-snackbar\",\"components-snackbar\":\"cb865dcda5233b3b__components-snackbar\",\"sidebar-backdrop\":\"_04b3b4e8346a2b7b__sidebar-backdrop\",\"sidebar\":\"_615b052cf60fcff2__sidebar\",\"is-mobile\":\"_6be5d95ddf25e57f__is-mobile\",\"mobile-sidebar-drawer\":\"fd8d6491146392ce__mobile-sidebar-drawer\",\"layout-single-page\":\"f37b94fd2c1f6020__layout-single-page\",\"canvas\":\"_6da399dd0a232c1f__canvas\",\"has-mobile-drawer\":\"_5568e036ddaba310__has-mobile-drawer\",\"surfaces\":\"ff37ba01b23d0bcb__surfaces\",\"stage\":\"e323e272b8b8ed4f__stage\",\"inspector\":\"b37b199f2111c5f8__inspector\",\"has-canvas\":\"bbaf96f69377ab55__has-canvas\",\"zoomOut\":\"_2e385023a338e4a9__zoomOut\",\"zoomIn\":\"e245c2f64b6256de__zoomIn\",\"slideFromRight\":\"_9aa5832f67721dd4__slideFromRight\",\"slideToRight\":\"_4d20ae2879ce77c4__slideToRight\",\"slideHeaderFromTop\":\"e56b4b1bb9ff1176__slideHeaderFromTop\",\"slideHeaderToTop\":\"e54b49876d2b7dc3__slideHeaderToTop\",\"slideSidebarFromRight\":\"f74156de1cf32837__slideSidebarFromRight\",\"slideSidebarToRight\":\"_157f548b8629f8b5__slideSidebarToRight\"};\n","import clsx from 'clsx';\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';\nimport { UnsavedChangesWarning } from '@wordpress/editor';\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport PluginArea from '../plugin-area';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport useSyncBodyBackground from './use-sync-body-background';\nimport styles from './style.module.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\tCanvasData | null | 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\tconst layoutRef = useSyncBodyBackground();\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<PluginArea />\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\tref={ layoutRef }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles.layout,\n\t\t\t\t\t\t\tstyles[ 'layout-single-page' ],\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ styles[ 'has-canvas' ] ]:\n\t\t\t\t\t\t\t\t\t!! canvas || canvas === null,\n\t\t\t\t\t\t\t\t[ styles[ '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<UnsavedChangesWarning />\n\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t<SnackbarNotices\n\t\t\t\t\t\t\tclassName={ styles[ 'notices-snackbar' ] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={ styles.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\t// Reset to the default background color.\n\t\t\t\t\t\t\t\t\tbackground: '#fcfcfc',\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={ styles.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"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAM,uBAAuB;;;;;;;;;AAU7B,SAAS,aAAa;CACrB,MAAM,cAAc;CAEpB,IAAK,YAAY,kBAChB,OAAO,YAAY;CAGpB,YAAY,mBAAmB;EAC9B,2BAAW,IAAI,IAAI;EACnB,wBAAQ,IAAI,IAAI;EAChB,gCAAgB,IAAI,QAAQ;CAC7B;CAEA,IAAK,OAAO,aAAa,aACxB,iBAAkB,QAAS;CAG5B,OAAO,YAAY;AACpB;;;;;;;;;AAUA,SAAS,0BACR,gBACA,MACU;CACV,IAAK,CAAE,eAAe,MACrB,OAAO;CAGR,KAAM,MAAM,SAAS,eAAe,KAAK,iBACxC,SAAU,qBAAsB,EACjC,GACC,IAAK,MAAM,aAAc,oBAAqB,MAAM,MACnD,OAAO;CAIT,OAAO;AACR;;;;;;;;;AAUA,SAAS,YAAa,gBAA0B,MAAc,KAAc;CAC3E,IAAK,CAAE,eAAe,MACrB;CAGD,MAAM,UAAU,WAAW;CAC3B,IAAI,iBAAiB,QAAQ,eAAe,IAAK,cAAe;CAEhE,IAAK,CAAE,gBAAiB;EACvB,iCAAiB,IAAI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CAAA;OACG,CAAA,CAEQ;;KACX,CAAA;IACD;;EACS,CAAA;CACD,CAAA,CACE,EAAA,CAAA;AAEpB"}
|
|
1
|
+
{"version":3,"file":"single-page.mjs","names":["routePrivateApis","coreDataPrivateApis","styles"],"sources":["../../../../style-runtime/src/index.ts","../../../src/components/root/style.module.scss","../../../src/components/root/single-page.tsx"],"sourcesContent":["type GlobalScopeWithStyleRuntime = typeof globalThis & {\n\t// This global is shared by separately bundled copies of this package.\n\t// Keep its shape backward compatible after release.\n\t__wpStyleRuntime?: {\n\t\tdocuments: Map< Document, number >;\n\t\tstyles: Map< string, string >;\n\t\tinjectedStyles: WeakMap< Document, Set< string > >;\n\t};\n};\n\nconst STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n\tconst globalScope = globalThis as GlobalScopeWithStyleRuntime;\n\n\tif ( globalScope.__wpStyleRuntime ) {\n\t\treturn globalScope.__wpStyleRuntime;\n\t}\n\n\tglobalScope.__wpStyleRuntime = {\n\t\tdocuments: new Map(),\n\t\tstyles: new Map(),\n\t\tinjectedStyles: new WeakMap(),\n\t};\n\n\tif ( typeof document !== 'undefined' ) {\n\t\tregisterDocument( document );\n\t}\n\n\treturn globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(\n\ttargetDocument: Document,\n\thash: string\n): boolean {\n\tif ( ! targetDocument.head ) {\n\t\treturn false;\n\t}\n\n\tfor ( const style of targetDocument.head.querySelectorAll(\n\t\t`style[${ STYLE_HASH_ATTRIBUTE }]`\n\t) ) {\n\t\tif ( style.getAttribute( STYLE_HASH_ATTRIBUTE ) === hash ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle( targetDocument: Document, hash: string, css: string ) {\n\tif ( ! targetDocument.head ) {\n\t\treturn;\n\t}\n\n\tconst runtime = getRuntime();\n\tlet injectedStyles = runtime.injectedStyles.get( targetDocument );\n\n\tif ( ! injectedStyles ) {\n\t\tinjectedStyles = new Set();\n\t\truntime.injectedStyles.set( targetDocument, injectedStyles );\n\t}\n\n\tif ( injectedStyles.has( hash ) ) {\n\t\treturn;\n\t}\n\n\t// Older generated CSS module output can still inject matching style tags\n\t// after this document's cache is created, so keep the DOM as the fallback\n\t// source of truth on cache misses.\n\tif ( documentContainsStyleHash( targetDocument, hash ) ) {\n\t\tinjectedStyles.add( hash );\n\t\treturn;\n\t}\n\n\tconst style = targetDocument.createElement( 'style' );\n\tstyle.setAttribute( STYLE_HASH_ATTRIBUTE, hash );\n\tstyle.appendChild( targetDocument.createTextNode( css ) );\n\ttargetDocument.head.appendChild( style );\n\tinjectedStyles.add( hash );\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument( targetDocument: Document ) {\n\tconst runtime = getRuntime();\n\n\truntime.documents.set(\n\t\ttargetDocument,\n\t\t( runtime.documents.get( targetDocument ) ?? 0 ) + 1\n\t);\n\n\tfor ( const [ hash, css ] of runtime.styles ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n\n\treturn () => {\n\t\tconst count = runtime.documents.get( targetDocument );\n\n\t\tif ( count === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count <= 1 ) {\n\t\t\truntime.documents.delete( targetDocument );\n\t\t\treturn;\n\t\t}\n\n\t\truntime.documents.set( targetDocument, count - 1 );\n\t};\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle( hash: string, css: string ) {\n\tconst runtime = getRuntime();\n\n\truntime.styles.set( hash, css );\n\n\tfor ( const targetDocument of runtime.documents.keys() ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n}\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"a1e6beedc4\", \".ec570fbb2868f496__layout{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.ec570fbb2868f496__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.ec570fbb2868f496__layout{min-height:calc(100vh - 32px)}body:has(.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas) .ec570fbb2868f496__layout{min-height:100vh}}:where(.ec570fbb2868f496__layout) img{height:auto;max-width:100%}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .components-snackbar,.ec570fbb2868f496__layout ._1c9a312567e28b20__notices-snackbar .d4a42c38e09753ae__components-snackbar{margin-inline:auto}._8e41abc61ab38a0b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._9c70c6016411e369__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._9c70c6016411e369__sidebar.b5ec24928c8da36b__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f3f3f3);bottom:0;box-shadow:0 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.ed28d4367377467b__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._452d7ff5ac74eb84__layout-single-page .ed28d4367377467b__mobile-sidebar-drawer{top:46px}.ed28d4367377467b__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}.e6b2ba021c702ffb__canvas._7cfa87f7a2463610__has-mobile-drawer{padding-top:65px;position:relative}._0ec9efcb29281d50__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._0ec9efcb29281d50__surfaces{margin:8px}._452d7ff5ac74eb84__layout-single-page ._0ec9efcb29281d50__surfaces{height:calc(100vh - 40px);margin-top:0;margin-inline-start:0;position:sticky;top:32px}}.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._452d7ff5ac74eb84__layout-single-page .a7bbf3aae333d0d8__stage,._452d7ff5ac74eb84__layout-single-page .e674251381793b5f__inspector{height:auto}}.a7bbf3aae333d0d8__stage{z-index:2}@media (min-width:782px){.a7bbf3aae333d0d8__stage{z-index:auto}}.e674251381793b5f__inspector{z-index:3}@media (min-width:782px){.e674251381793b5f__inspector{z-index:auto}}.e6b2ba021c702ffb__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;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.e6b2ba021c702ffb__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._452d7ff5ac74eb84__layout-single-page .e6b2ba021c702ffb__canvas{height:auto}.e674251381793b5f__inspector,.ec570fbb2868f496__layout._15176d330d368459__has-canvas .a7bbf3aae333d0d8__stage{max-width:400px}}.e6b2ba021c702ffb__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas ._0ec9efcb29281d50__surfaces{gap:0;margin:0}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .a7bbf3aae333d0d8__stage,.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e674251381793b5f__inspector{display:none}.ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:46px}@media (min-width:782px){._452d7ff5ac74eb84__layout-single-page .ec570fbb2868f496__layout._412c860698817aa8__has-full-canvas .e6b2ba021c702ffb__canvas{top:32px}}@media (max-width:782px){.a7bbf3aae333d0d8__stage,.e674251381793b5f__inspector,.e6b2ba021c702ffb__canvas:not(._7cfa87f7a2463610__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.ed28d4367377467b__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.e6b2ba021c702ffb__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.e6b2ba021c702ffb__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.a7bbf3aae333d0d8__stage{view-transition-name:boot--stage}.e674251381793b5f__inspector{view-transition-name:boot--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.a7bbf3aae333d0d8__stage{view-transition-name:boot-safari--stage}.e674251381793b5f__inspector{view-transition-name:boot-safari--inspector}.e6b2ba021c702ffb__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.ec570fbb2868f496__layout) *{view-transition-name:none!important}}:root:has(.ec570fbb2868f496__layout)::view-transition-new(root),:root:has(.ec570fbb2868f496__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.ec570fbb2868f496__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-header),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.ec570fbb2868f496__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector),:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector),:root:has(.ec570fbb2868f496__layout)::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%}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas),:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_5a1779b2f2c90caf__zoomOut;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--stage):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_4e45a7a3e5f56197__zoomIn;will-change:transform,opacity}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_537b6d2e5041d8b9__slideFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas):only-child,:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:db499c91f24ad370__slideToRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_6b902826dce37697__slideHeaderFromTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8e9025331ac47b17__slideHeaderToTop;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_08fb3da5295b47f8__slideSidebarFromRight;will-change:transform}:root:has(.ec570fbb2868f496__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:a0bb8b58f3887328__slideSidebarToRight;will-change:transform}@keyframes _5a1779b2f2c90caf__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _4e45a7a3e5f56197__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _537b6d2e5041d8b9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes db499c91f24ad370__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _6b902826dce37697__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8e9025331ac47b17__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _08fb3da5295b47f8__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes a0bb8b58f3887328__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"ec570fbb2868f496__layout\",\"has-full-canvas\":\"_412c860698817aa8__has-full-canvas\",\"notices-snackbar\":\"_1c9a312567e28b20__notices-snackbar\",\"components-snackbar\":\"d4a42c38e09753ae__components-snackbar\",\"sidebar-backdrop\":\"_8e41abc61ab38a0b__sidebar-backdrop\",\"sidebar\":\"_9c70c6016411e369__sidebar\",\"is-mobile\":\"b5ec24928c8da36b__is-mobile\",\"mobile-sidebar-drawer\":\"ed28d4367377467b__mobile-sidebar-drawer\",\"layout-single-page\":\"_452d7ff5ac74eb84__layout-single-page\",\"canvas\":\"e6b2ba021c702ffb__canvas\",\"has-mobile-drawer\":\"_7cfa87f7a2463610__has-mobile-drawer\",\"surfaces\":\"_0ec9efcb29281d50__surfaces\",\"stage\":\"a7bbf3aae333d0d8__stage\",\"inspector\":\"e674251381793b5f__inspector\",\"has-canvas\":\"_15176d330d368459__has-canvas\",\"zoomOut\":\"_5a1779b2f2c90caf__zoomOut\",\"zoomIn\":\"_4e45a7a3e5f56197__zoomIn\",\"slideFromRight\":\"_537b6d2e5041d8b9__slideFromRight\",\"slideToRight\":\"db499c91f24ad370__slideToRight\",\"slideHeaderFromTop\":\"_6b902826dce37697__slideHeaderFromTop\",\"slideHeaderToTop\":\"_8e9025331ac47b17__slideHeaderToTop\",\"slideSidebarFromRight\":\"_08fb3da5295b47f8__slideSidebarFromRight\",\"slideSidebarToRight\":\"a0bb8b58f3887328__slideSidebarToRight\"};\n","import clsx from 'clsx';\nimport { privateApis as routePrivateApis } from '@wordpress/route';\nimport { privateApis as coreDataPrivateApis } from '@wordpress/core-data';\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';\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport PluginArea from '../plugin-area';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport useSyncBodyBackground from './use-sync-body-background';\nimport styles from './style.module.scss';\nimport useRouteTitle from '../app/use-route-title';\nimport useRouteFocus from '../app/use-route-focus';\n\nconst { useMatches, Outlet } = unlock( routePrivateApis );\nconst { UnsavedChangesWarning } = unlock( coreDataPrivateApis );\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\tCanvasData | null | 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\tconst layoutRef = useSyncBodyBackground();\n\tuseRouteFocus( layoutRef );\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<PluginArea />\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\tref={ layoutRef }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles.layout,\n\t\t\t\t\t\t\tstyles[ 'layout-single-page' ],\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ styles[ 'has-canvas' ] ]:\n\t\t\t\t\t\t\t\t\t!! canvas || canvas === null,\n\t\t\t\t\t\t\t\t[ styles[ '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<UnsavedChangesWarning />\n\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t<SnackbarNotices\n\t\t\t\t\t\t\tclassName={ styles[ 'notices-snackbar' ] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={ styles.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\t// Reset to the default background color.\n\t\t\t\t\t\t\t\t\tbackground: '#fcfcfc',\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={ styles.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"],"mappings":";;;;;;;;;;;;;;;;;AAUA,MAAM,uBAAuB;;;;;;;;;AAU7B,SAAS,aAAa;CACrB,MAAM,cAAc;CAEpB,IAAK,YAAY,kBAChB,OAAO,YAAY;CAGpB,YAAY,mBAAmB;EAC9B,2BAAW,IAAI,IAAI;EACnB,wBAAQ,IAAI,IAAI;EAChB,gCAAgB,IAAI,QAAQ;CAC7B;CAEA,IAAK,OAAO,aAAa,aACxB,iBAAkB,QAAS;CAG5B,OAAO,YAAY;AACpB;;;;;;;;;AAUA,SAAS,0BACR,gBACA,MACU;CACV,IAAK,CAAE,eAAe,MACrB,OAAO;CAGR,KAAM,MAAM,SAAS,eAAe,KAAK,iBACxC,SAAU,qBAAsB,EACjC,GACC,IAAK,MAAM,aAAc,oBAAqB,MAAM,MACnD,OAAO;CAIT,OAAO;AACR;;;;;;;;;AAUA,SAAS,YAAa,gBAA0B,MAAc,KAAc;CAC3E,IAAK,CAAE,eAAe,MACrB;CAGD,M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