@wordpress/boot 0.27.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.
Files changed (63) hide show
  1. package/build-module/components/app/index.mjs.map +1 -1
  2. package/build-module/components/app/router.mjs +24 -24
  3. package/build-module/components/app/router.mjs.map +1 -1
  4. package/build-module/components/app/use-route-focus.mjs +162 -0
  5. package/build-module/components/app/use-route-focus.mjs.map +1 -0
  6. package/build-module/components/app/use-route-title.mjs +6 -1
  7. package/build-module/components/app/use-route-title.mjs.map +1 -1
  8. package/build-module/components/canvas/index.mjs +1 -1
  9. package/build-module/components/canvas/index.mjs.map +1 -1
  10. package/build-module/components/canvas/use-navigate-to-entity-record.mjs +20 -12
  11. package/build-module/components/canvas/use-navigate-to-entity-record.mjs.map +1 -1
  12. package/build-module/components/navigation/drilldown-item/index.mjs +3 -3
  13. package/build-module/components/navigation/drilldown-item/index.mjs.map +1 -1
  14. package/build-module/components/navigation/dropdown-item/index.mjs +3 -3
  15. package/build-module/components/navigation/dropdown-item/index.mjs.map +1 -1
  16. package/build-module/components/navigation/navigation-item/index.mjs +3 -3
  17. package/build-module/components/navigation/navigation-item/index.mjs.map +1 -1
  18. package/build-module/components/navigation/navigation-screen/index.mjs +5 -5
  19. package/build-module/components/navigation/navigation-screen/index.mjs.map +1 -1
  20. package/build-module/components/navigation/router-link-item.mjs.map +1 -1
  21. package/build-module/components/plugin-area/index.mjs +5 -1
  22. package/build-module/components/plugin-area/index.mjs.map +1 -1
  23. package/build-module/components/root/index.mjs +28 -25
  24. package/build-module/components/root/index.mjs.map +1 -1
  25. package/build-module/components/root/single-page.mjs +28 -25
  26. package/build-module/components/root/single-page.mjs.map +1 -1
  27. package/build-module/components/save-button/index.mjs +8 -3
  28. package/build-module/components/save-button/index.mjs.map +1 -1
  29. package/build-module/components/save-panel/index.mjs +3 -1
  30. package/build-module/components/save-panel/index.mjs.map +1 -1
  31. package/build-module/components/sidebar/index.mjs +11 -11
  32. package/build-module/components/sidebar/index.mjs.map +1 -1
  33. package/build-types/components/app/use-route-focus.d.ts +14 -0
  34. package/build-types/components/app/use-route-focus.d.ts.map +1 -0
  35. package/build-types/components/canvas/use-navigate-to-entity-record.d.ts +3 -1
  36. package/build-types/components/canvas/use-navigate-to-entity-record.d.ts.map +1 -1
  37. package/build-types/components/root/index.d.ts.map +1 -1
  38. package/build-types/components/root/single-page.d.ts.map +1 -1
  39. package/build-types/components/save-button/index.d.ts.map +1 -1
  40. package/build-types/components/save-panel/index.d.ts.map +1 -1
  41. package/build-types/components/sidebar/index.d.ts.map +1 -1
  42. package/package.json +35 -28
  43. package/src/components/app/test/fixtures/own-focus.tsx +22 -0
  44. package/src/components/app/test/fixtures/settings-general.tsx +21 -0
  45. package/src/components/app/test/fixtures/settings.tsx +10 -0
  46. package/src/components/app/test/navigation-focus.browser.test.tsx +108 -0
  47. package/src/components/app/use-route-focus.ts +53 -0
  48. package/src/components/canvas/index.tsx +1 -1
  49. package/src/components/canvas/use-navigate-to-entity-record.ts +33 -16
  50. package/src/components/navigation/drilldown-item/index.tsx +3 -3
  51. package/src/components/navigation/dropdown-item/index.tsx +3 -3
  52. package/src/components/navigation/navigation-item/index.tsx +3 -3
  53. package/src/components/navigation/navigation-item/style.module.scss +13 -7
  54. package/src/components/navigation/navigation-screen/style.module.scss +1 -1
  55. package/src/components/navigation/router-link-item.tsx +3 -3
  56. package/src/components/root/_layout.module.scss +7 -0
  57. package/src/components/root/index.tsx +4 -1
  58. package/src/components/root/single-page.tsx +4 -1
  59. package/src/components/root/test/admin-scheme-sidebar.browser.test.tsx +120 -0
  60. package/src/components/save-button/index.tsx +7 -2
  61. package/src/components/save-panel/index.tsx +4 -1
  62. package/src/components/sidebar/index.tsx +10 -6
  63. package/src/components/sidebar/style.module.scss +1 -0
@@ -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
9
  import { __, isRTL } from "@wordpress/i18n";
9
- import { UnsavedChangesWarning } from "@wordpress/editor";
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("5af927cba5", "._56935e6282cea626__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){._56935e6282cea626__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._56935e6282cea626__layout{min-height:calc(100vh - 32px)}body:has(._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas) ._56935e6282cea626__layout{min-height:100vh}}:where(._56935e6282cea626__layout) img{height:auto;max-width:100%}._56935e6282cea626__layout ._4b753b79328f00f2__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}._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .components-snackbar,._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .efa1f12116c3fb44__components-snackbar{margin-inline:auto}.a42f10ffa1623b1a__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}._24ece5d7d830027c__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._24ece5d7d830027c__sidebar.ea25e130be9dcc55__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}._46722ab62d8eeeca__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._5021a5c25e2952a7__layout-single-page ._46722ab62d8eeeca__mobile-sidebar-drawer{top:46px}._46722ab62d8eeeca__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}._690b80eca9eb9eb6__canvas._47abeba36a2c03ed__has-mobile-drawer{padding-top:65px;position:relative}._52f74c33fd2757fc__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._52f74c33fd2757fc__surfaces{margin:8px}._5021a5c25e2952a7__layout-single-page ._52f74c33fd2757fc__surfaces{margin-top:0;margin-inline-start:0}}._8510aae3042dca12__inspector,.ed02476df88803b9__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}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._8510aae3042dca12__inspector,.ed02476df88803b9__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:auto}}.ed02476df88803b9__stage{z-index:2}@media (min-width:782px){.ed02476df88803b9__stage{z-index:auto}}._8510aae3042dca12__inspector{z-index:3}@media (min-width:782px){._8510aae3042dca12__inspector{z-index:auto}}._690b80eca9eb9eb6__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}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._690b80eca9eb9eb6__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:auto}._56935e6282cea626__layout.b4c4ba65515802c9__has-canvas .ed02476df88803b9__stage,._8510aae3042dca12__inspector{max-width:400px}}._690b80eca9eb9eb6__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._52f74c33fd2757fc__surfaces{gap:0;margin:0}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._8510aae3042dca12__inspector,._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas .ed02476df88803b9__stage{display:none}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__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)}._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:46px}@media (min-width:782px){._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:32px}}@media (max-width:782px){._690b80eca9eb9eb6__canvas:not(._47abeba36a2c03ed__has-mobile-drawer),._8510aae3042dca12__inspector,.ed02476df88803b9__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._46722ab62d8eeeca__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._690b80eca9eb9eb6__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._690b80eca9eb9eb6__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.ed02476df88803b9__stage{view-transition-name:boot--stage}._8510aae3042dca12__inspector{view-transition-name:boot--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.ed02476df88803b9__stage{view-transition-name:boot-safari--stage}._8510aae3042dca12__inspector{view-transition-name:boot-safari--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._56935e6282cea626__layout) *{view-transition-name:none!important}}:root:has(._56935e6282cea626__layout)::view-transition-new(root),:root:has(._56935e6282cea626__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._56935e6282cea626__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-header),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._56935e6282cea626__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector),:root:has(._56935e6282cea626__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(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ab73776591f19033__zoomOut;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_10c071ed4bf0c4f2__zoomIn;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_30a8540aba2100e9__slideFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:aea85e2dfc564485__slideToRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_8ad9a41739bd9fbe__slideHeaderFromTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:f56b26b5d5c9bc72__slideHeaderToTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:a2ba8d5a4515e038__slideSidebarFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_6ddf6cb6adc49ad6__slideSidebarToRight;will-change:transform}@keyframes ab73776591f19033__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _10c071ed4bf0c4f2__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _30a8540aba2100e9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes aea85e2dfc564485__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _8ad9a41739bd9fbe__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes f56b26b5d5c9bc72__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes a2ba8d5a4515e038__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _6ddf6cb6adc49ad6__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": "_56935e6282cea626__layout",
128
- "has-full-canvas": "_8fc7f864ef1ff9d4__has-full-canvas",
129
- "notices-snackbar": "_4b753b79328f00f2__notices-snackbar",
130
- "components-snackbar": "efa1f12116c3fb44__components-snackbar",
131
- "sidebar-backdrop": "a42f10ffa1623b1a__sidebar-backdrop",
132
- "sidebar": "_24ece5d7d830027c__sidebar",
133
- "is-mobile": "ea25e130be9dcc55__is-mobile",
134
- "mobile-sidebar-drawer": "_46722ab62d8eeeca__mobile-sidebar-drawer",
135
- "layout-single-page": "_5021a5c25e2952a7__layout-single-page",
136
- "canvas": "_690b80eca9eb9eb6__canvas",
137
- "has-mobile-drawer": "_47abeba36a2c03ed__has-mobile-drawer",
138
- "surfaces": "_52f74c33fd2757fc__surfaces",
139
- "stage": "ed02476df88803b9__stage",
140
- "inspector": "_8510aae3042dca12__inspector",
141
- "has-canvas": "b4c4ba65515802c9__has-canvas",
142
- "zoomOut": "ab73776591f19033__zoomOut",
143
- "zoomIn": "_10c071ed4bf0c4f2__zoomIn",
144
- "slideFromRight": "_30a8540aba2100e9__slideFromRight",
145
- "slideToRight": "aea85e2dfc564485__slideToRight",
146
- "slideHeaderFromTop": "_8ad9a41739bd9fbe__slideHeaderFromTop",
147
- "slideHeaderToTop": "f56b26b5d5c9bc72__slideHeaderToTop",
148
- "slideSidebarFromRight": "a2ba8d5a4515e038__slideSidebarFromRight",
149
- "slideSidebarToRight": "_6ddf6cb6adc49ad6__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: {
@@ -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(\"5af927cba5\", \"._56935e6282cea626__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){._56935e6282cea626__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._56935e6282cea626__layout{min-height:calc(100vh - 32px)}body:has(._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas) ._56935e6282cea626__layout{min-height:100vh}}:where(._56935e6282cea626__layout) img{height:auto;max-width:100%}._56935e6282cea626__layout ._4b753b79328f00f2__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}._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .components-snackbar,._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .efa1f12116c3fb44__components-snackbar{margin-inline:auto}.a42f10ffa1623b1a__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}._24ece5d7d830027c__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._24ece5d7d830027c__sidebar.ea25e130be9dcc55__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}._46722ab62d8eeeca__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._5021a5c25e2952a7__layout-single-page ._46722ab62d8eeeca__mobile-sidebar-drawer{top:46px}._46722ab62d8eeeca__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}._690b80eca9eb9eb6__canvas._47abeba36a2c03ed__has-mobile-drawer{padding-top:65px;position:relative}._52f74c33fd2757fc__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._52f74c33fd2757fc__surfaces{margin:8px}._5021a5c25e2952a7__layout-single-page ._52f74c33fd2757fc__surfaces{margin-top:0;margin-inline-start:0}}._8510aae3042dca12__inspector,.ed02476df88803b9__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}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._8510aae3042dca12__inspector,.ed02476df88803b9__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:auto}}.ed02476df88803b9__stage{z-index:2}@media (min-width:782px){.ed02476df88803b9__stage{z-index:auto}}._8510aae3042dca12__inspector{z-index:3}@media (min-width:782px){._8510aae3042dca12__inspector{z-index:auto}}._690b80eca9eb9eb6__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}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._690b80eca9eb9eb6__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:auto}._56935e6282cea626__layout.b4c4ba65515802c9__has-canvas .ed02476df88803b9__stage,._8510aae3042dca12__inspector{max-width:400px}}._690b80eca9eb9eb6__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._52f74c33fd2757fc__surfaces{gap:0;margin:0}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._8510aae3042dca12__inspector,._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas .ed02476df88803b9__stage{display:none}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__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)}._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:46px}@media (min-width:782px){._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:32px}}@media (max-width:782px){._690b80eca9eb9eb6__canvas:not(._47abeba36a2c03ed__has-mobile-drawer),._8510aae3042dca12__inspector,.ed02476df88803b9__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._46722ab62d8eeeca__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._690b80eca9eb9eb6__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._690b80eca9eb9eb6__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.ed02476df88803b9__stage{view-transition-name:boot--stage}._8510aae3042dca12__inspector{view-transition-name:boot--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.ed02476df88803b9__stage{view-transition-name:boot-safari--stage}._8510aae3042dca12__inspector{view-transition-name:boot-safari--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._56935e6282cea626__layout) *{view-transition-name:none!important}}:root:has(._56935e6282cea626__layout)::view-transition-new(root),:root:has(._56935e6282cea626__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._56935e6282cea626__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-header),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._56935e6282cea626__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector),:root:has(._56935e6282cea626__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(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ab73776591f19033__zoomOut;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_10c071ed4bf0c4f2__zoomIn;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_30a8540aba2100e9__slideFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:aea85e2dfc564485__slideToRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_8ad9a41739bd9fbe__slideHeaderFromTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:f56b26b5d5c9bc72__slideHeaderToTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:a2ba8d5a4515e038__slideSidebarFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_6ddf6cb6adc49ad6__slideSidebarToRight;will-change:transform}@keyframes ab73776591f19033__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _10c071ed4bf0c4f2__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _30a8540aba2100e9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes aea85e2dfc564485__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _8ad9a41739bd9fbe__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes f56b26b5d5c9bc72__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes a2ba8d5a4515e038__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _6ddf6cb6adc49ad6__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"_56935e6282cea626__layout\",\"has-full-canvas\":\"_8fc7f864ef1ff9d4__has-full-canvas\",\"notices-snackbar\":\"_4b753b79328f00f2__notices-snackbar\",\"components-snackbar\":\"efa1f12116c3fb44__components-snackbar\",\"sidebar-backdrop\":\"a42f10ffa1623b1a__sidebar-backdrop\",\"sidebar\":\"_24ece5d7d830027c__sidebar\",\"is-mobile\":\"ea25e130be9dcc55__is-mobile\",\"mobile-sidebar-drawer\":\"_46722ab62d8eeeca__mobile-sidebar-drawer\",\"layout-single-page\":\"_5021a5c25e2952a7__layout-single-page\",\"canvas\":\"_690b80eca9eb9eb6__canvas\",\"has-mobile-drawer\":\"_47abeba36a2c03ed__has-mobile-drawer\",\"surfaces\":\"_52f74c33fd2757fc__surfaces\",\"stage\":\"ed02476df88803b9__stage\",\"inspector\":\"_8510aae3042dca12__inspector\",\"has-canvas\":\"b4c4ba65515802c9__has-canvas\",\"zoomOut\":\"ab73776591f19033__zoomOut\",\"zoomIn\":\"_10c071ed4bf0c4f2__zoomIn\",\"slideFromRight\":\"_30a8540aba2100e9__slideFromRight\",\"slideToRight\":\"aea85e2dfc564485__slideToRight\",\"slideHeaderFromTop\":\"_8ad9a41739bd9fbe__slideHeaderFromTop\",\"slideHeaderToTop\":\"f56b26b5d5c9bc72__slideHeaderToTop\",\"slideSidebarFromRight\":\"a2ba8d5a4515e038__slideSidebarFromRight\",\"slideSidebarToRight\":\"_6ddf6cb6adc49ad6__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 { __, isRTL } 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={ {\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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A,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\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,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("5af927cba5", "._56935e6282cea626__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){._56935e6282cea626__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._56935e6282cea626__layout{min-height:calc(100vh - 32px)}body:has(._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas) ._56935e6282cea626__layout{min-height:100vh}}:where(._56935e6282cea626__layout) img{height:auto;max-width:100%}._56935e6282cea626__layout ._4b753b79328f00f2__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}._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .components-snackbar,._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .efa1f12116c3fb44__components-snackbar{margin-inline:auto}.a42f10ffa1623b1a__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}._24ece5d7d830027c__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._24ece5d7d830027c__sidebar.ea25e130be9dcc55__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}._46722ab62d8eeeca__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._5021a5c25e2952a7__layout-single-page ._46722ab62d8eeeca__mobile-sidebar-drawer{top:46px}._46722ab62d8eeeca__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}._690b80eca9eb9eb6__canvas._47abeba36a2c03ed__has-mobile-drawer{padding-top:65px;position:relative}._52f74c33fd2757fc__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._52f74c33fd2757fc__surfaces{margin:8px}._5021a5c25e2952a7__layout-single-page ._52f74c33fd2757fc__surfaces{margin-top:0;margin-inline-start:0}}._8510aae3042dca12__inspector,.ed02476df88803b9__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}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._8510aae3042dca12__inspector,.ed02476df88803b9__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:auto}}.ed02476df88803b9__stage{z-index:2}@media (min-width:782px){.ed02476df88803b9__stage{z-index:auto}}._8510aae3042dca12__inspector{z-index:3}@media (min-width:782px){._8510aae3042dca12__inspector{z-index:auto}}._690b80eca9eb9eb6__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}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._690b80eca9eb9eb6__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:auto}._56935e6282cea626__layout.b4c4ba65515802c9__has-canvas .ed02476df88803b9__stage,._8510aae3042dca12__inspector{max-width:400px}}._690b80eca9eb9eb6__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._52f74c33fd2757fc__surfaces{gap:0;margin:0}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._8510aae3042dca12__inspector,._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas .ed02476df88803b9__stage{display:none}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__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)}._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:46px}@media (min-width:782px){._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:32px}}@media (max-width:782px){._690b80eca9eb9eb6__canvas:not(._47abeba36a2c03ed__has-mobile-drawer),._8510aae3042dca12__inspector,.ed02476df88803b9__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._46722ab62d8eeeca__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._690b80eca9eb9eb6__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._690b80eca9eb9eb6__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.ed02476df88803b9__stage{view-transition-name:boot--stage}._8510aae3042dca12__inspector{view-transition-name:boot--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.ed02476df88803b9__stage{view-transition-name:boot-safari--stage}._8510aae3042dca12__inspector{view-transition-name:boot-safari--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._56935e6282cea626__layout) *{view-transition-name:none!important}}:root:has(._56935e6282cea626__layout)::view-transition-new(root),:root:has(._56935e6282cea626__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._56935e6282cea626__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-header),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._56935e6282cea626__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector),:root:has(._56935e6282cea626__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(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ab73776591f19033__zoomOut;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_10c071ed4bf0c4f2__zoomIn;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_30a8540aba2100e9__slideFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:aea85e2dfc564485__slideToRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_8ad9a41739bd9fbe__slideHeaderFromTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:f56b26b5d5c9bc72__slideHeaderToTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:a2ba8d5a4515e038__slideSidebarFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_6ddf6cb6adc49ad6__slideSidebarToRight;will-change:transform}@keyframes ab73776591f19033__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _10c071ed4bf0c4f2__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _30a8540aba2100e9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes aea85e2dfc564485__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _8ad9a41739bd9fbe__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes f56b26b5d5c9bc72__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes a2ba8d5a4515e038__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _6ddf6cb6adc49ad6__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": "_56935e6282cea626__layout",
122
- "has-full-canvas": "_8fc7f864ef1ff9d4__has-full-canvas",
123
- "notices-snackbar": "_4b753b79328f00f2__notices-snackbar",
124
- "components-snackbar": "efa1f12116c3fb44__components-snackbar",
125
- "sidebar-backdrop": "a42f10ffa1623b1a__sidebar-backdrop",
126
- "sidebar": "_24ece5d7d830027c__sidebar",
127
- "is-mobile": "ea25e130be9dcc55__is-mobile",
128
- "mobile-sidebar-drawer": "_46722ab62d8eeeca__mobile-sidebar-drawer",
129
- "layout-single-page": "_5021a5c25e2952a7__layout-single-page",
130
- "canvas": "_690b80eca9eb9eb6__canvas",
131
- "has-mobile-drawer": "_47abeba36a2c03ed__has-mobile-drawer",
132
- "surfaces": "_52f74c33fd2757fc__surfaces",
133
- "stage": "ed02476df88803b9__stage",
134
- "inspector": "_8510aae3042dca12__inspector",
135
- "has-canvas": "b4c4ba65515802c9__has-canvas",
136
- "zoomOut": "ab73776591f19033__zoomOut",
137
- "zoomIn": "_10c071ed4bf0c4f2__zoomIn",
138
- "slideFromRight": "_30a8540aba2100e9__slideFromRight",
139
- "slideToRight": "aea85e2dfc564485__slideToRight",
140
- "slideHeaderFromTop": "_8ad9a41739bd9fbe__slideHeaderFromTop",
141
- "slideHeaderToTop": "f56b26b5d5c9bc72__slideHeaderToTop",
142
- "slideSidebarFromRight": "a2ba8d5a4515e038__slideSidebarFromRight",
143
- "slideSidebarToRight": "_6ddf6cb6adc49ad6__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(\"5af927cba5\", \"._56935e6282cea626__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){._56935e6282cea626__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._56935e6282cea626__layout{min-height:calc(100vh - 32px)}body:has(._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas) ._56935e6282cea626__layout{min-height:100vh}}:where(._56935e6282cea626__layout) img{height:auto;max-width:100%}._56935e6282cea626__layout ._4b753b79328f00f2__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}._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .components-snackbar,._56935e6282cea626__layout ._4b753b79328f00f2__notices-snackbar .efa1f12116c3fb44__components-snackbar{margin-inline:auto}.a42f10ffa1623b1a__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}._24ece5d7d830027c__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._24ece5d7d830027c__sidebar.ea25e130be9dcc55__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}._46722ab62d8eeeca__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._5021a5c25e2952a7__layout-single-page ._46722ab62d8eeeca__mobile-sidebar-drawer{top:46px}._46722ab62d8eeeca__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}._690b80eca9eb9eb6__canvas._47abeba36a2c03ed__has-mobile-drawer{padding-top:65px;position:relative}._52f74c33fd2757fc__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){._52f74c33fd2757fc__surfaces{margin:8px}._5021a5c25e2952a7__layout-single-page ._52f74c33fd2757fc__surfaces{margin-top:0;margin-inline-start:0}}._8510aae3042dca12__inspector,.ed02476df88803b9__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}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._8510aae3042dca12__inspector,.ed02476df88803b9__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._5021a5c25e2952a7__layout-single-page ._8510aae3042dca12__inspector,._5021a5c25e2952a7__layout-single-page .ed02476df88803b9__stage{height:auto}}.ed02476df88803b9__stage{z-index:2}@media (min-width:782px){.ed02476df88803b9__stage{z-index:auto}}._8510aae3042dca12__inspector{z-index:3}@media (min-width:782px){._8510aae3042dca12__inspector{z-index:auto}}._690b80eca9eb9eb6__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}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._690b80eca9eb9eb6__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._5021a5c25e2952a7__layout-single-page ._690b80eca9eb9eb6__canvas{height:auto}._56935e6282cea626__layout.b4c4ba65515802c9__has-canvas .ed02476df88803b9__stage,._8510aae3042dca12__inspector{max-width:400px}}._690b80eca9eb9eb6__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._52f74c33fd2757fc__surfaces{gap:0;margin:0}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._8510aae3042dca12__inspector,._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas .ed02476df88803b9__stage{display:none}._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__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)}._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:46px}@media (min-width:782px){._5021a5c25e2952a7__layout-single-page ._56935e6282cea626__layout._8fc7f864ef1ff9d4__has-full-canvas ._690b80eca9eb9eb6__canvas{top:32px}}@media (max-width:782px){._690b80eca9eb9eb6__canvas:not(._47abeba36a2c03ed__has-mobile-drawer),._8510aae3042dca12__inspector,.ed02476df88803b9__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._46722ab62d8eeeca__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._690b80eca9eb9eb6__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._690b80eca9eb9eb6__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.ed02476df88803b9__stage{view-transition-name:boot--stage}._8510aae3042dca12__inspector{view-transition-name:boot--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.ed02476df88803b9__stage{view-transition-name:boot-safari--stage}._8510aae3042dca12__inspector{view-transition-name:boot-safari--inspector}._690b80eca9eb9eb6__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._56935e6282cea626__layout) *{view-transition-name:none!important}}:root:has(._56935e6282cea626__layout)::view-transition-new(root),:root:has(._56935e6282cea626__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._56935e6282cea626__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-header),:root:has(._56935e6282cea626__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._56935e6282cea626__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector),:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector),:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector),:root:has(._56935e6282cea626__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(._56935e6282cea626__layout)::view-transition-new(boot--canvas),:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ab73776591f19033__zoomOut;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot--stage):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_10c071ed4bf0c4f2__zoomIn;will-change:transform,opacity}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_30a8540aba2100e9__slideFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas):only-child,:root:has(._56935e6282cea626__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:aea85e2dfc564485__slideToRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_8ad9a41739bd9fbe__slideHeaderFromTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:f56b26b5d5c9bc72__slideHeaderToTop;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:a2ba8d5a4515e038__slideSidebarFromRight;will-change:transform}:root:has(._56935e6282cea626__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_6ddf6cb6adc49ad6__slideSidebarToRight;will-change:transform}@keyframes ab73776591f19033__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _10c071ed4bf0c4f2__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _30a8540aba2100e9__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes aea85e2dfc564485__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _8ad9a41739bd9fbe__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes f56b26b5d5c9bc72__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes a2ba8d5a4515e038__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _6ddf6cb6adc49ad6__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"_56935e6282cea626__layout\",\"has-full-canvas\":\"_8fc7f864ef1ff9d4__has-full-canvas\",\"notices-snackbar\":\"_4b753b79328f00f2__notices-snackbar\",\"components-snackbar\":\"efa1f12116c3fb44__components-snackbar\",\"sidebar-backdrop\":\"a42f10ffa1623b1a__sidebar-backdrop\",\"sidebar\":\"_24ece5d7d830027c__sidebar\",\"is-mobile\":\"ea25e130be9dcc55__is-mobile\",\"mobile-sidebar-drawer\":\"_46722ab62d8eeeca__mobile-sidebar-drawer\",\"layout-single-page\":\"_5021a5c25e2952a7__layout-single-page\",\"canvas\":\"_690b80eca9eb9eb6__canvas\",\"has-mobile-drawer\":\"_47abeba36a2c03ed__has-mobile-drawer\",\"surfaces\":\"_52f74c33fd2757fc__surfaces\",\"stage\":\"ed02476df88803b9__stage\",\"inspector\":\"_8510aae3042dca12__inspector\",\"has-canvas\":\"b4c4ba65515802c9__has-canvas\",\"zoomOut\":\"ab73776591f19033__zoomOut\",\"zoomIn\":\"_10c071ed4bf0c4f2__zoomIn\",\"slideFromRight\":\"_30a8540aba2100e9__slideFromRight\",\"slideToRight\":\"aea85e2dfc564485__slideToRight\",\"slideHeaderFromTop\":\"_8ad9a41739bd9fbe__slideHeaderFromTop\",\"slideHeaderToTop\":\"f56b26b5d5c9bc72__slideHeaderToTop\",\"slideSidebarFromRight\":\"a2ba8d5a4515e038__slideSidebarFromRight\",\"slideSidebarToRight\":\"_6ddf6cb6adc49ad6__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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ACZ,oBAAC,iBAAD,EACC,WAAYA,qBAAQ,oBACpB,CAAA;KACD,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,oBAAC,OAAD;QAAK,WAAYA,qBAAO;QACvB,UAAA,oBAAC,gBAAD;SACU;SAER;QAED,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;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,uBACR;MACGA,qBAAQ,gBACT,CAAC,CAAE,UAAU,WAAW;MACvBA,qBAAQ,qBAAuB;IAClC,CACD;IAVD,UAAA;KAYC,oBAAC,uBAAD,CAAwB,CAAA;KACxB,oBAAC,WAAD,CAAY,CAAA;KACZ,oBAAC,iBAAD,EACC,WAAYA,qBAAQ,oBACpB,CAAA;KACD,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,oBAAC,OAAD;QAAK,WAAYA,qBAAO;QACvB,UAAA,oBAAC,gBAAD;SACU;SAER;QAED,CAAA;OACG,CAAA,CAEQ;;KACX,CAAA;IACD;;EACS,CAAA;CACD,CAAA,CACE,EAAA,CAAA;AAEpB"}
@@ -1,13 +1,13 @@
1
1
  import { useEffect, useState } from "@wordpress/element";
2
2
  import { useSelect } from "@wordpress/data";
3
3
  import { __, _n, sprintf } from "@wordpress/i18n";
4
- import { store } from "@wordpress/core-data";
4
+ import { privateApis, store } from "@wordpress/core-data";
5
5
  import { ariaKeyShortcut, displayShortcut, shortcutAriaLabel } from "@wordpress/keycodes";
6
6
  import { check } from "@wordpress/icons";
7
- import { EntitiesSavedStates } from "@wordpress/editor";
8
7
  import { Button, Modal } from "@wordpress/components";
9
8
  import { KeyboardShortcutDescription, KeyboardShortcutDisplay, Tooltip, useKeyboardShortcutProps } from "@wordpress/ui";
10
9
  import useSaveShortcut from "../save-panel/use-save-shortcut.mjs";
10
+ import { unlock } from "../../lock-unlock.mjs";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  // packages/style-runtime/src/index.ts
13
13
  const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
@@ -118,6 +118,7 @@ var style_module_default = {
118
118
  "shortcut": "_0e6f3a8336688e3f__shortcut"
119
119
  };
120
120
  // packages/boot/src/components/save-button/index.tsx
121
+ const { EntitiesSavedStates } = unlock(privateApis);
121
122
  function SaveButton() {
122
123
  const [isSaveViewOpen, setIsSaveViewOpened] = useState(false);
123
124
  const { isSaving, dirtyEntityRecordsCount } = useSelect((select) => {
@@ -152,7 +153,11 @@ function SaveButton() {
152
153
  const disabled = isSaving || isInSavedState;
153
154
  const getLabel = () => {
154
155
  if (isInSavedState) return __("Saved");
155
- return sprintf(_n("Review %d change…", "Review %d changes…", dirtyEntityRecordsCount), dirtyEntityRecordsCount);
156
+ return sprintf(
157
+ /** translators: %d: number of unsaved changes (number). */
158
+ _n("Review %d change…", "Review %d changes…", dirtyEntityRecordsCount),
159
+ dirtyEntityRecordsCount
160
+ );
156
161
  };
157
162
  const label = getLabel();
158
163
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsxs(Tooltip.Trigger, {