@wordpress/boot 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-module/components/app/index.mjs +29 -53
- package/build-module/components/app/index.mjs.map +1 -7
- package/build-module/components/app/router.mjs +238 -214
- package/build-module/components/app/router.mjs.map +1 -7
- package/build-module/components/app/use-route-title.mjs +35 -42
- package/build-module/components/app/use-route-title.mjs.map +1 -7
- package/build-module/components/canvas/back-button.mjs +21 -20
- package/build-module/components/canvas/back-button.mjs.map +1 -7
- package/build-module/components/canvas/index.mjs +104 -130
- package/build-module/components/canvas/index.mjs.map +1 -7
- package/build-module/components/canvas/site-preview.mjs +36 -43
- package/build-module/components/canvas/site-preview.mjs.map +1 -7
- package/build-module/components/canvas/use-navigate-to-entity-record.mjs +109 -113
- package/build-module/components/canvas/use-navigate-to-entity-record.mjs.map +1 -7
- package/build-module/components/canvas/viewport.mjs +25 -13
- package/build-module/components/canvas/viewport.mjs.map +1 -7
- package/build-module/components/canvas-renderer/index.mjs +40 -32
- package/build-module/components/canvas-renderer/index.mjs.map +1 -7
- package/build-module/components/error-boundary/index.mjs +160 -108
- package/build-module/components/error-boundary/index.mjs.map +1 -7
- package/build-module/components/navigation/drilldown-item/index.mjs +124 -127
- package/build-module/components/navigation/drilldown-item/index.mjs.map +1 -7
- package/build-module/components/navigation/dropdown-item/index.mjs +156 -173
- package/build-module/components/navigation/dropdown-item/index.mjs.map +1 -7
- package/build-module/components/navigation/index.mjs +55 -90
- package/build-module/components/navigation/index.mjs.map +1 -7
- package/build-module/components/navigation/items.mjs +51 -53
- package/build-module/components/navigation/items.mjs.map +1 -7
- package/build-module/components/navigation/navigation-item/index.mjs +120 -114
- package/build-module/components/navigation/navigation-item/index.mjs.map +1 -7
- package/build-module/components/navigation/navigation-screen/index.mjs +192 -185
- package/build-module/components/navigation/navigation-screen/index.mjs.map +1 -7
- package/build-module/components/navigation/path-matching.mjs +74 -73
- package/build-module/components/navigation/path-matching.mjs.map +1 -7
- package/build-module/components/navigation/router-link-item.mjs +13 -11
- package/build-module/components/navigation/router-link-item.mjs.map +1 -7
- package/build-module/components/navigation/use-sidebar-parent.mjs +37 -48
- package/build-module/components/navigation/use-sidebar-parent.mjs.map +1 -7
- package/build-module/components/plugin-area/index.mjs +20 -24
- package/build-module/components/plugin-area/index.mjs.map +1 -7
- package/build-module/components/root/index.mjs +227 -242
- package/build-module/components/root/index.mjs.map +1 -7
- package/build-module/components/root/single-page.mjs +174 -148
- package/build-module/components/root/single-page.mjs.map +1 -7
- package/build-module/components/root/use-sync-body-background.mjs +28 -22
- package/build-module/components/root/use-sync-body-background.mjs.map +1 -7
- package/build-module/components/save-button/index.mjs +170 -214
- package/build-module/components/save-button/index.mjs.map +1 -7
- package/build-module/components/save-panel/index.mjs +110 -106
- package/build-module/components/save-panel/index.mjs.map +1 -7
- package/build-module/components/save-panel/use-save-shortcut.mjs +42 -51
- package/build-module/components/save-panel/use-save-shortcut.mjs.map +1 -7
- package/build-module/components/sidebar/index.mjs +126 -104
- package/build-module/components/sidebar/index.mjs.map +1 -7
- package/build-module/index.mjs +1 -7
- package/build-module/lock-unlock.mjs +5 -10
- package/build-module/lock-unlock.mjs.map +1 -7
- package/build-module/store/actions.mjs +34 -31
- package/build-module/store/actions.mjs.map +1 -7
- package/build-module/store/index.mjs +9 -11
- package/build-module/store/index.mjs.map +1 -7
- package/build-module/store/reducer.mjs +48 -55
- package/build-module/store/reducer.mjs.map +1 -7
- package/build-module/store/selectors.mjs +21 -16
- package/build-module/store/selectors.mjs.map +1 -7
- package/build-module/store/types.mjs +0 -1
- package/build-types/components/error-boundary/index.d.ts.map +1 -1
- package/package.json +28 -28
- package/src/components/error-boundary/index.tsx +50 -4
- package/build-module/index.mjs.map +0 -7
- package/build-module/store/types.mjs.map +0 -7
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/root/single-page.tsx", "../../../../style-runtime/src/index.ts", "../../../src/components/root/style.module.scss"],
|
|
4
|
-
"sourcesContent": ["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", "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(\"b215aa5eaa\", \".c8317e9ebb034cfa__layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.c8317e9ebb034cfa__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.c8317e9ebb034cfa__layout{min-height:calc(100vh - 32px)}body:has(.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas) .c8317e9ebb034cfa__layout{min-height:100vh}}:where(.c8317e9ebb034cfa__layout) img{height:auto;max-width:100%}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__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}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar ._94ac6b8f274ce2f6__components-snackbar,.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar .components-snackbar{margin-inline:auto}.bfc3fedf39b1cf71__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}.bb4f70cd030be0a3__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.bb4f70cd030be0a3__sidebar._27e6d590dc5963c9__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}._0eb5d3a3e94d6273__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._26789cb167e9f578__layout-single-page ._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:46px}._0eb5d3a3e94d6273__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}.fb03501e629fd04e__canvas.fa94dab2ab1e36f3__has-mobile-drawer{padding-top:65px;position:relative}.a03baddce3ef2026__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.a03baddce3ef2026__surfaces{margin:8px}._26789cb167e9f578__layout-single-page .a03baddce3ef2026__surfaces{margin-top:0;margin-inline-start:0}}._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__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}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:auto}}.d12c9efe707e6cb3__stage{z-index:2}@media (min-width:782px){.d12c9efe707e6cb3__stage{z-index:auto}}._7ffe3a3db6f69647__inspector{z-index:3}@media (min-width:782px){._7ffe3a3db6f69647__inspector{z-index:auto}}.fb03501e629fd04e__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}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.fb03501e629fd04e__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:auto}._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.f7fe42ef8c67e96f__has-canvas .d12c9efe707e6cb3__stage{max-width:400px}}.fb03501e629fd04e__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .a03baddce3ef2026__surfaces{gap:0;margin:0}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas ._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .d12c9efe707e6cb3__stage{display:none}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__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)}._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:46px}@media (min-width:782px){._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:32px}}@media (max-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage,.fb03501e629fd04e__canvas:not(.fa94dab2ab1e36f3__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.fb03501e629fd04e__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.fb03501e629fd04e__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.d12c9efe707e6cb3__stage{view-transition-name:boot--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.d12c9efe707e6cb3__stage{view-transition-name:boot-safari--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot-safari--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.c8317e9ebb034cfa__layout) *{view-transition-name:none!important}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(root),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.c8317e9ebb034cfa__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-header),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector),:root:has(.c8317e9ebb034cfa__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(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ef68027ea03aa34b__zoomOut;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_0752ac81dff4c432__zoomIn;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_3a2e4dc465681136__slideFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_86a367ac26a1b61e__slideToRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_462399c0e9d64199__slideHeaderFromTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8b272f30d43c9f38__slideHeaderToTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_69ed6a71d53a2e0c__slideSidebarFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:bf0697a36b00caad__slideSidebarToRight;will-change:transform}@keyframes ef68027ea03aa34b__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _0752ac81dff4c432__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _3a2e4dc465681136__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _86a367ac26a1b61e__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _462399c0e9d64199__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8b272f30d43c9f38__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _69ed6a71d53a2e0c__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes bf0697a36b00caad__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"c8317e9ebb034cfa__layout\",\"has-full-canvas\":\"e97bb2807a9c4687__has-full-canvas\",\"notices-snackbar\":\"b8f8c6cf9ae266bf__notices-snackbar\",\"components-snackbar\":\"_94ac6b8f274ce2f6__components-snackbar\",\"sidebar-backdrop\":\"bfc3fedf39b1cf71__sidebar-backdrop\",\"sidebar\":\"bb4f70cd030be0a3__sidebar\",\"is-mobile\":\"_27e6d590dc5963c9__is-mobile\",\"mobile-sidebar-drawer\":\"_0eb5d3a3e94d6273__mobile-sidebar-drawer\",\"layout-single-page\":\"_26789cb167e9f578__layout-single-page\",\"canvas\":\"fb03501e629fd04e__canvas\",\"has-mobile-drawer\":\"fa94dab2ab1e36f3__has-mobile-drawer\",\"surfaces\":\"a03baddce3ef2026__surfaces\",\"stage\":\"d12c9efe707e6cb3__stage\",\"inspector\":\"_7ffe3a3db6f69647__inspector\",\"has-canvas\":\"f7fe42ef8c67e96f__has-canvas\",\"zoomOut\":\"ef68027ea03aa34b__zoomOut\",\"zoomIn\":\"_0752ac81dff4c432__zoomIn\",\"slideFromRight\":\"_3a2e4dc465681136__slideFromRight\",\"slideToRight\":\"_86a367ac26a1b61e__slideToRight\",\"slideHeaderFromTop\":\"_462399c0e9d64199__slideHeaderFromTop\",\"slideHeaderToTop\":\"_8b272f30d43c9f38__slideHeaderToTop\",\"slideSidebarFromRight\":\"_69ed6a71d53a2e0c__slideSidebarFromRight\",\"slideSidebarToRight\":\"bf0697a36b00caad__slideSidebarToRight\"};\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"single-page.mjs","names":["routePrivateApis","styles"],"sources":["../../../../style-runtime/src/index.ts","../../../src/components/root/style.module.scss","../../../src/components/root/single-page.tsx"],"sourcesContent":["type GlobalScopeWithStyleRuntime = typeof globalThis & {\n\t// This global is shared by separately bundled copies of this package.\n\t// Keep its shape backward compatible after release.\n\t__wpStyleRuntime?: {\n\t\tdocuments: Map< Document, number >;\n\t\tstyles: Map< string, string >;\n\t\tinjectedStyles: WeakMap< Document, Set< string > >;\n\t};\n};\n\nconst STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n\tconst globalScope = globalThis as GlobalScopeWithStyleRuntime;\n\n\tif ( globalScope.__wpStyleRuntime ) {\n\t\treturn globalScope.__wpStyleRuntime;\n\t}\n\n\tglobalScope.__wpStyleRuntime = {\n\t\tdocuments: new Map(),\n\t\tstyles: new Map(),\n\t\tinjectedStyles: new WeakMap(),\n\t};\n\n\tif ( typeof document !== 'undefined' ) {\n\t\tregisterDocument( document );\n\t}\n\n\treturn globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(\n\ttargetDocument: Document,\n\thash: string\n): boolean {\n\tif ( ! targetDocument.head ) {\n\t\treturn false;\n\t}\n\n\tfor ( const style of targetDocument.head.querySelectorAll(\n\t\t`style[${ STYLE_HASH_ATTRIBUTE }]`\n\t) ) {\n\t\tif ( style.getAttribute( STYLE_HASH_ATTRIBUTE ) === hash ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle( targetDocument: Document, hash: string, css: string ) {\n\tif ( ! targetDocument.head ) {\n\t\treturn;\n\t}\n\n\tconst runtime = getRuntime();\n\tlet injectedStyles = runtime.injectedStyles.get( targetDocument );\n\n\tif ( ! injectedStyles ) {\n\t\tinjectedStyles = new Set();\n\t\truntime.injectedStyles.set( targetDocument, injectedStyles );\n\t}\n\n\tif ( injectedStyles.has( hash ) ) {\n\t\treturn;\n\t}\n\n\t// Older generated CSS module output can still inject matching style tags\n\t// after this document's cache is created, so keep the DOM as the fallback\n\t// source of truth on cache misses.\n\tif ( documentContainsStyleHash( targetDocument, hash ) ) {\n\t\tinjectedStyles.add( hash );\n\t\treturn;\n\t}\n\n\tconst style = targetDocument.createElement( 'style' );\n\tstyle.setAttribute( STYLE_HASH_ATTRIBUTE, hash );\n\tstyle.appendChild( targetDocument.createTextNode( css ) );\n\ttargetDocument.head.appendChild( style );\n\tinjectedStyles.add( hash );\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument( targetDocument: Document ) {\n\tconst runtime = getRuntime();\n\n\truntime.documents.set(\n\t\ttargetDocument,\n\t\t( runtime.documents.get( targetDocument ) ?? 0 ) + 1\n\t);\n\n\tfor ( const [ hash, css ] of runtime.styles ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n\n\treturn () => {\n\t\tconst count = runtime.documents.get( targetDocument );\n\n\t\tif ( count === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count <= 1 ) {\n\t\t\truntime.documents.delete( targetDocument );\n\t\t\treturn;\n\t\t}\n\n\t\truntime.documents.set( targetDocument, count - 1 );\n\t};\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle( hash: string, css: string ) {\n\tconst runtime = getRuntime();\n\n\truntime.styles.set( hash, css );\n\n\tfor ( const targetDocument of runtime.documents.keys() ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n}\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"fed1a7ec24\", \"._5c711a1cecefd5e8__layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){._5c711a1cecefd5e8__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){._5c711a1cecefd5e8__layout{min-height:calc(100vh - 32px)}body:has(._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas) ._5c711a1cecefd5e8__layout{min-height:100vh}}:where(._5c711a1cecefd5e8__layout) img{height:auto;max-width:100%}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .cb865dcda5233b3b__components-snackbar,._5c711a1cecefd5e8__layout .eeebb116829e2f94__notices-snackbar .components-snackbar{margin-inline:auto}._04b3b4e8346a2b7b__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}._615b052cf60fcff2__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}._615b052cf60fcff2__sidebar._6be5d95ddf25e57f__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.fd8d6491146392ce__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}.f37b94fd2c1f6020__layout-single-page .fd8d6491146392ce__mobile-sidebar-drawer{top:46px}.fd8d6491146392ce__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}._6da399dd0a232c1f__canvas._5568e036ddaba310__has-mobile-drawer{padding-top:65px;position:relative}.ff37ba01b23d0bcb__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.ff37ba01b23d0bcb__surfaces{margin:8px}.f37b94fd2c1f6020__layout-single-page .ff37ba01b23d0bcb__surfaces{margin-top:0;margin-inline-start:0}}.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}.f37b94fd2c1f6020__layout-single-page .b37b199f2111c5f8__inspector,.f37b94fd2c1f6020__layout-single-page .e323e272b8b8ed4f__stage{height:auto}}.e323e272b8b8ed4f__stage{z-index:2}@media (min-width:782px){.e323e272b8b8ed4f__stage{z-index:auto}}.b37b199f2111c5f8__inspector{z-index:3}@media (min-width:782px){.b37b199f2111c5f8__inspector{z-index:auto}}._6da399dd0a232c1f__canvas{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._6da399dd0a232c1f__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}.f37b94fd2c1f6020__layout-single-page ._6da399dd0a232c1f__canvas{height:auto}._5c711a1cecefd5e8__layout.bbaf96f69377ab55__has-canvas .e323e272b8b8ed4f__stage,.b37b199f2111c5f8__inspector{max-width:400px}}._6da399dd0a232c1f__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .ff37ba01b23d0bcb__surfaces{gap:0;margin:0}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .b37b199f2111c5f8__inspector,._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas .e323e272b8b8ed4f__stage{display:none}._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:46px}@media (min-width:782px){.f37b94fd2c1f6020__layout-single-page ._5c711a1cecefd5e8__layout._52e00bad88ace7ce__has-full-canvas ._6da399dd0a232c1f__canvas{top:32px}}@media (max-width:782px){._6da399dd0a232c1f__canvas:not(._5568e036ddaba310__has-mobile-drawer),.b37b199f2111c5f8__inspector,.e323e272b8b8ed4f__stage{height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}.fd8d6491146392ce__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){._6da399dd0a232c1f__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}._6da399dd0a232c1f__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.e323e272b8b8ed4f__stage{view-transition-name:boot--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.e323e272b8b8ed4f__stage{view-transition-name:boot-safari--stage}.b37b199f2111c5f8__inspector{view-transition-name:boot-safari--inspector}._6da399dd0a232c1f__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(._5c711a1cecefd5e8__layout) *{view-transition-name:none!important}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(root),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(._5c711a1cecefd5e8__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-header),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot--canvas-sidebar),:root:has(._5c711a1cecefd5e8__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--stage){background:#fff;border-radius:var(--wpds-border-radius-xl,12px);height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas),:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:_2e385023a338e4a9__zoomOut;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--stage):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:e245c2f64b6256de__zoomIn;will-change:transform,opacity}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_9aa5832f67721dd4__slideFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas):only-child,:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_4d20ae2879ce77c4__slideToRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:e56b4b1bb9ff1176__slideHeaderFromTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:e54b49876d2b7dc3__slideHeaderToTop;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:f74156de1cf32837__slideSidebarFromRight;will-change:transform}:root:has(._5c711a1cecefd5e8__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:_157f548b8629f8b5__slideSidebarToRight;will-change:transform}@keyframes _2e385023a338e4a9__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes e245c2f64b6256de__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _9aa5832f67721dd4__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _4d20ae2879ce77c4__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes e56b4b1bb9ff1176__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes e54b49876d2b7dc3__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes f74156de1cf32837__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes _157f548b8629f8b5__slideSidebarToRight{to{transform:translateX(100%)}}\");\n}\nexport default {\"layout\":\"_5c711a1cecefd5e8__layout\",\"has-full-canvas\":\"_52e00bad88ace7ce__has-full-canvas\",\"notices-snackbar\":\"eeebb116829e2f94__notices-snackbar\",\"components-snackbar\":\"cb865dcda5233b3b__components-snackbar\",\"sidebar-backdrop\":\"_04b3b4e8346a2b7b__sidebar-backdrop\",\"sidebar\":\"_615b052cf60fcff2__sidebar\",\"is-mobile\":\"_6be5d95ddf25e57f__is-mobile\",\"mobile-sidebar-drawer\":\"fd8d6491146392ce__mobile-sidebar-drawer\",\"layout-single-page\":\"f37b94fd2c1f6020__layout-single-page\",\"canvas\":\"_6da399dd0a232c1f__canvas\",\"has-mobile-drawer\":\"_5568e036ddaba310__has-mobile-drawer\",\"surfaces\":\"ff37ba01b23d0bcb__surfaces\",\"stage\":\"e323e272b8b8ed4f__stage\",\"inspector\":\"b37b199f2111c5f8__inspector\",\"has-canvas\":\"bbaf96f69377ab55__has-canvas\",\"zoomOut\":\"_2e385023a338e4a9__zoomOut\",\"zoomIn\":\"e245c2f64b6256de__zoomIn\",\"slideFromRight\":\"_9aa5832f67721dd4__slideFromRight\",\"slideToRight\":\"_4d20ae2879ce77c4__slideToRight\",\"slideHeaderFromTop\":\"e56b4b1bb9ff1176__slideHeaderFromTop\",\"slideHeaderToTop\":\"e54b49876d2b7dc3__slideHeaderToTop\",\"slideSidebarFromRight\":\"f74156de1cf32837__slideSidebarFromRight\",\"slideSidebarToRight\":\"_157f548b8629f8b5__slideSidebarToRight\"};\n","import clsx from 'clsx';\nimport { privateApis as routePrivateApis } from '@wordpress/route';\nimport { SnackbarNotices } from '@wordpress/notices';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { getAdminThemeColors } from '@wordpress/admin-ui';\nimport { ThemeProvider } from '@wordpress/theme';\nimport { UnsavedChangesWarning } from '@wordpress/editor';\nimport SavePanel from '../save-panel';\nimport CanvasRenderer from '../canvas-renderer';\nimport PluginArea from '../plugin-area';\nimport { unlock } from '../../lock-unlock';\nimport type { CanvasData } from '../../store/types';\nimport useSyncBodyBackground from './use-sync-body-background';\nimport styles from './style.module.scss';\nimport useRouteTitle from '../app/use-route-title';\n\nconst { useMatches, Outlet } = unlock( routePrivateApis );\n\n/**\n * Root component for single page mode (no sidebar).\n * Used when rendering pages within wp-admin without taking over the full page.\n */\nexport default function RootSinglePage() {\n\tconst matches = useMatches();\n\tconst currentMatch = matches[ matches.length - 1 ];\n\tconst canvas = ( currentMatch?.loaderData as any )?.canvas as\n\t\tCanvasData | null | undefined;\n\tconst routeContentModule = ( currentMatch?.loaderData as any )\n\t\t?.routeContentModule as string | undefined;\n\tconst isFullScreen = canvas && ! canvas.isPreview;\n\n\tuseRouteTitle();\n\n\tconst themeColors = useMemo( getAdminThemeColors, [] );\n\n\tconst layoutRef = useSyncBodyBackground();\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<PluginArea />\n\t\t\t<ThemeProvider\n\t\t\t\tisRoot\n\t\t\t\tcolor={ { ...themeColors, background: '#f8f8f8' } }\n\t\t\t>\n\t\t\t\t<ThemeProvider color={ themeColors }>\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={ layoutRef }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles.layout,\n\t\t\t\t\t\t\tstyles[ 'layout-single-page' ],\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ styles[ 'has-canvas' ] ]:\n\t\t\t\t\t\t\t\t\t!! canvas || canvas === null,\n\t\t\t\t\t\t\t\t[ styles[ 'has-full-canvas' ] ]: isFullScreen,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t<SnackbarNotices\n\t\t\t\t\t\t\tclassName={ styles[ 'notices-snackbar' ] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={ styles.surfaces }>\n\t\t\t\t\t\t\t<ThemeProvider\n\t\t\t\t\t\t\t\tcolor={ {\n\t\t\t\t\t\t\t\t\t...themeColors,\n\t\t\t\t\t\t\t\t\t// Reset to the default background color.\n\t\t\t\t\t\t\t\t\tbackground: '#fcfcfc',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Outlet />\n\t\t\t\t\t\t\t\t{ /* Render Canvas in Root to prevent remounting on route changes */ }\n\t\t\t\t\t\t\t\t{ ( canvas || canvas === null ) && (\n\t\t\t\t\t\t\t\t\t<div className={ styles.canvas }>\n\t\t\t\t\t\t\t\t\t\t<CanvasRenderer\n\t\t\t\t\t\t\t\t\t\t\tcanvas={ canvas }\n\t\t\t\t\t\t\t\t\t\t\trouteContentModule={\n\t\t\t\t\t\t\t\t\t\t\t\trouteContentModule\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</ThemeProvider>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</ThemeProvider>\n\t\t\t</ThemeProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n"],"mappings":"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"}
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
// packages/boot/src/components/root/use-sync-body-background.ts
|
|
2
1
|
import { useRef } from "@wordpress/element";
|
|
3
2
|
import { useIsomorphicLayoutEffect } from "@wordpress/compose";
|
|
3
|
+
// packages/boot/src/components/root/use-sync-body-background.ts
|
|
4
|
+
/**
|
|
5
|
+
* Reads the boot layout's computed background-color and mirrors it onto
|
|
6
|
+
* `document.body` to avoid a jarring flash on macOS elastic-scroll bounce.
|
|
7
|
+
* Snapshots and restores the previous inline value on unmount.
|
|
8
|
+
*
|
|
9
|
+
* TODO: Once the two top-level `ThemeProvider` instances can be merged, this
|
|
10
|
+
* hook can be replaced with a CSS rule on `<body>`.
|
|
11
|
+
* See https://github.com/WordPress/gutenberg/pull/78587#discussion_r3481698286
|
|
12
|
+
*
|
|
13
|
+
* @return Ref to attach to the layout root element.
|
|
14
|
+
*/
|
|
4
15
|
function useSyncBodyBackground() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
body.style.background = previousBackground;
|
|
19
|
-
};
|
|
20
|
-
}, []);
|
|
21
|
-
return layoutRef;
|
|
16
|
+
const layoutRef = useRef(null);
|
|
17
|
+
useIsomorphicLayoutEffect(() => {
|
|
18
|
+
if (!layoutRef.current) return;
|
|
19
|
+
const body = layoutRef.current.ownerDocument.body;
|
|
20
|
+
const bg = getComputedStyle(layoutRef.current).backgroundColor;
|
|
21
|
+
if (!bg) return;
|
|
22
|
+
const previousBackground = body.style.background;
|
|
23
|
+
body.style.background = bg;
|
|
24
|
+
return () => {
|
|
25
|
+
body.style.background = previousBackground;
|
|
26
|
+
};
|
|
27
|
+
}, []);
|
|
28
|
+
return layoutRef;
|
|
22
29
|
}
|
|
23
|
-
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=use-sync-body-background.mjs.map
|
|
30
|
+
export { useSyncBodyBackground as default };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=use-sync-body-background.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/root/use-sync-body-background.ts"],
|
|
4
|
-
"sourcesContent": ["import { useRef } from '@wordpress/element';\nimport { useIsomorphicLayoutEffect } from '@wordpress/compose';\n\n/**\n * Reads the boot layout's computed background-color and mirrors it onto\n * `document.body` to avoid a jarring flash on macOS elastic-scroll bounce.\n * Snapshots and restores the previous inline value on unmount.\n *\n * TODO: Once the two top-level `ThemeProvider` instances can be merged, this\n * hook can be replaced with a CSS rule on `<body>`.\n * See https://github.com/WordPress/gutenberg/pull/78587#discussion_r3481698286\n *\n * @return Ref to attach to the layout root element.\n */\nexport default function useSyncBodyBackground() {\n\tconst layoutRef = useRef< HTMLDivElement | null >( null );\n\n\tuseIsomorphicLayoutEffect( () => {\n\t\tif ( ! layoutRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst body = layoutRef.current.ownerDocument.body;\n\t\tconst bg = getComputedStyle( layoutRef.current ).backgroundColor;\n\t\tif ( ! bg ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst previousBackground = body.style.background;\n\t\tbody.style.background = bg;\n\n\t\treturn () => {\n\t\t\tbody.style.background = previousBackground;\n\t\t};\n\t}, [] );\n\n\treturn layoutRef;\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,cAAc;AACvB,SAAS,iCAAiC;AAa3B,SAAR,wBAAyC;AAC/C,QAAM,YAAY,OAAiC,IAAK;AAExD,4BAA2B,MAAM;AAChC,QAAK,CAAE,UAAU,SAAU;AAC1B;AAAA,IACD;AAEA,UAAM,OAAO,UAAU,QAAQ,cAAc;AAC7C,UAAM,KAAK,iBAAkB,UAAU,OAAQ,EAAE;AACjD,QAAK,CAAE,IAAK;AACX;AAAA,IACD;AAEA,UAAM,qBAAqB,KAAK,MAAM;AACtC,SAAK,MAAM,aAAa;AAExB,WAAO,MAAM;AACZ,WAAK,MAAM,aAAa;AAAA,IACzB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"use-sync-body-background.mjs","names":[],"sources":["../../../src/components/root/use-sync-body-background.ts"],"sourcesContent":["import { useRef } from '@wordpress/element';\nimport { useIsomorphicLayoutEffect } from '@wordpress/compose';\n\n/**\n * Reads the boot layout's computed background-color and mirrors it onto\n * `document.body` to avoid a jarring flash on macOS elastic-scroll bounce.\n * Snapshots and restores the previous inline value on unmount.\n *\n * TODO: Once the two top-level `ThemeProvider` instances can be merged, this\n * hook can be replaced with a CSS rule on `<body>`.\n * See https://github.com/WordPress/gutenberg/pull/78587#discussion_r3481698286\n *\n * @return Ref to attach to the layout root element.\n */\nexport default function useSyncBodyBackground() {\n\tconst layoutRef = useRef< HTMLDivElement | null >( null );\n\n\tuseIsomorphicLayoutEffect( () => {\n\t\tif ( ! layoutRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst body = layoutRef.current.ownerDocument.body;\n\t\tconst bg = getComputedStyle( layoutRef.current ).backgroundColor;\n\t\tif ( ! bg ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst previousBackground = body.style.background;\n\t\tbody.style.background = bg;\n\n\t\treturn () => {\n\t\t\tbody.style.background = previousBackground;\n\t\t};\n\t}, [] );\n\n\treturn layoutRef;\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,SAAwB,wBAAwB;CAC/C,MAAM,YAAY,OAAiC,IAAK;CAExD,gCAAiC;EAChC,IAAK,CAAE,UAAU,SAChB;EAGD,MAAM,OAAO,UAAU,QAAQ,cAAc;EAC7C,MAAM,KAAK,iBAAkB,UAAU,OAAQ,CAAC,CAAC;EACjD,IAAK,CAAE,IACN;EAGD,MAAM,qBAAqB,KAAK,MAAM;EACtC,KAAK,MAAM,aAAa;EAExB,aAAa;GACZ,KAAK,MAAM,aAAa;EACzB;CACD,GAAG,CAAC,CAAE;CAEN,OAAO;AACR"}
|
|
@@ -1,234 +1,190 @@
|
|
|
1
|
-
// packages/boot/src/components/save-button/index.tsx
|
|
2
1
|
import { useEffect, useState } from "@wordpress/element";
|
|
3
2
|
import { useSelect } from "@wordpress/data";
|
|
4
|
-
import {
|
|
5
|
-
import { store
|
|
6
|
-
import {
|
|
7
|
-
ariaKeyShortcut,
|
|
8
|
-
displayShortcut,
|
|
9
|
-
shortcutAriaLabel
|
|
10
|
-
} from "@wordpress/keycodes";
|
|
3
|
+
import { __, _n, sprintf } from "@wordpress/i18n";
|
|
4
|
+
import { store } from "@wordpress/core-data";
|
|
5
|
+
import { ariaKeyShortcut, displayShortcut, shortcutAriaLabel } from "@wordpress/keycodes";
|
|
11
6
|
import { check } from "@wordpress/icons";
|
|
12
7
|
import { EntitiesSavedStates } from "@wordpress/editor";
|
|
13
8
|
import { Button, Modal } from "@wordpress/components";
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Tooltip,
|
|
18
|
-
useKeyboardShortcutProps
|
|
19
|
-
} from "@wordpress/ui";
|
|
20
|
-
|
|
9
|
+
import { KeyboardShortcutDescription, KeyboardShortcutDisplay, Tooltip, useKeyboardShortcutProps } from "@wordpress/ui";
|
|
10
|
+
import useSaveShortcut from "../save-panel/use-save-shortcut.mjs";
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
12
|
// packages/style-runtime/src/index.ts
|
|
22
|
-
|
|
13
|
+
const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
14
|
+
/**
|
|
15
|
+
* Returns the shared style runtime registry.
|
|
16
|
+
*
|
|
17
|
+
* The registry is stored on `globalThis` so separately bundled copies of this
|
|
18
|
+
* package can coordinate through the same document and style maps.
|
|
19
|
+
*
|
|
20
|
+
* @return The shared runtime registry.
|
|
21
|
+
*/
|
|
23
22
|
function getRuntime() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (typeof document !== "undefined") {
|
|
34
|
-
registerDocument(document);
|
|
35
|
-
}
|
|
36
|
-
return globalScope.__wpStyleRuntime;
|
|
23
|
+
const globalScope = globalThis;
|
|
24
|
+
if (globalScope.__wpStyleRuntime) return globalScope.__wpStyleRuntime;
|
|
25
|
+
globalScope.__wpStyleRuntime = {
|
|
26
|
+
documents: /* @__PURE__ */ new Map(),
|
|
27
|
+
styles: /* @__PURE__ */ new Map(),
|
|
28
|
+
injectedStyles: /* @__PURE__ */ new WeakMap()
|
|
29
|
+
};
|
|
30
|
+
if (typeof document !== "undefined") registerDocument(document);
|
|
31
|
+
return globalScope.__wpStyleRuntime;
|
|
37
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Checks whether a document already contains a style tag for a hash.
|
|
35
|
+
*
|
|
36
|
+
* @param targetDocument Document to inspect.
|
|
37
|
+
* @param hash Stable hash for the transformed CSS.
|
|
38
|
+
*
|
|
39
|
+
* @return Whether the style hash already exists in the document.
|
|
40
|
+
*/
|
|
38
41
|
function documentContainsStyleHash(targetDocument, hash) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
for (const style of targetDocument.head.querySelectorAll(
|
|
43
|
-
`style[${STYLE_HASH_ATTRIBUTE}]`
|
|
44
|
-
)) {
|
|
45
|
-
if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return false;
|
|
42
|
+
if (!targetDocument.head) return false;
|
|
43
|
+
for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) return true;
|
|
44
|
+
return false;
|
|
50
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Injects a registered style into a document, unless that document already
|
|
48
|
+
* contains a style tag for the same hash.
|
|
49
|
+
*
|
|
50
|
+
* @param targetDocument Document to inject the style into.
|
|
51
|
+
* @param hash Stable hash for the transformed CSS.
|
|
52
|
+
* @param css CSS text to inject.
|
|
53
|
+
*/
|
|
51
54
|
function injectStyle(targetDocument, hash, css) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
|
|
70
|
-
style.appendChild(targetDocument.createTextNode(css));
|
|
71
|
-
targetDocument.head.appendChild(style);
|
|
72
|
-
injectedStyles.add(hash);
|
|
55
|
+
if (!targetDocument.head) return;
|
|
56
|
+
const runtime = getRuntime();
|
|
57
|
+
let injectedStyles = runtime.injectedStyles.get(targetDocument);
|
|
58
|
+
if (!injectedStyles) {
|
|
59
|
+
injectedStyles = /* @__PURE__ */ new Set();
|
|
60
|
+
runtime.injectedStyles.set(targetDocument, injectedStyles);
|
|
61
|
+
}
|
|
62
|
+
if (injectedStyles.has(hash)) return;
|
|
63
|
+
if (documentContainsStyleHash(targetDocument, hash)) {
|
|
64
|
+
injectedStyles.add(hash);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const style = targetDocument.createElement("style");
|
|
68
|
+
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
|
|
69
|
+
style.appendChild(targetDocument.createTextNode(css));
|
|
70
|
+
targetDocument.head.appendChild(style);
|
|
71
|
+
injectedStyles.add(hash);
|
|
73
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Registers a document as a style injection target.
|
|
75
|
+
*
|
|
76
|
+
* Existing registered styles are replayed into the document immediately.
|
|
77
|
+
* Documents are reference-counted so multiple providers can safely register the
|
|
78
|
+
* same document without one cleanup removing it while another registration is
|
|
79
|
+
* still active.
|
|
80
|
+
*
|
|
81
|
+
* @param targetDocument Document to receive registered styles.
|
|
82
|
+
* @return Cleanup function that unregisters this document registration.
|
|
83
|
+
*/
|
|
74
84
|
function registerDocument(targetDocument) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
if (count <= 1) {
|
|
89
|
-
runtime.documents.delete(targetDocument);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
runtime.documents.set(targetDocument, count - 1);
|
|
93
|
-
};
|
|
85
|
+
const runtime = getRuntime();
|
|
86
|
+
runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
|
|
87
|
+
for (const [hash, css] of runtime.styles) injectStyle(targetDocument, hash, css);
|
|
88
|
+
return () => {
|
|
89
|
+
const count = runtime.documents.get(targetDocument);
|
|
90
|
+
if (count === void 0) return;
|
|
91
|
+
if (count <= 1) {
|
|
92
|
+
runtime.documents.delete(targetDocument);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
runtime.documents.set(targetDocument, count - 1);
|
|
96
|
+
};
|
|
94
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Registers a style and injects it into all registered documents.
|
|
100
|
+
*
|
|
101
|
+
* The hash is used as the deduplication key, so calling this repeatedly with
|
|
102
|
+
* the same hash will not add duplicate style tags to a document.
|
|
103
|
+
* Registered styles are retained for the lifetime of the page so they can be
|
|
104
|
+
* replayed into documents that are registered later.
|
|
105
|
+
*
|
|
106
|
+
* @param hash Stable hash for the transformed CSS.
|
|
107
|
+
* @param css CSS text to inject.
|
|
108
|
+
*/
|
|
95
109
|
function registerStyle(hash, css) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
injectStyle(targetDocument, hash, css);
|
|
100
|
-
}
|
|
110
|
+
const runtime = getRuntime();
|
|
111
|
+
runtime.styles.set(hash, css);
|
|
112
|
+
for (const targetDocument of runtime.documents.keys()) injectStyle(targetDocument, hash, css);
|
|
101
113
|
}
|
|
102
|
-
|
|
103
114
|
// packages/boot/src/components/save-button/style.module.scss
|
|
104
|
-
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("da0f7c3ff6", "._4e8b2ecc322dfc1f__save-button{width:100%}._0e6f3a8336688e3f__shortcut:not(:first-child){margin-inline-start:8px}");
|
|
116
|
+
var style_module_default = {
|
|
117
|
+
"save-button": "_4e8b2ecc322dfc1f__save-button",
|
|
118
|
+
"shortcut": "_0e6f3a8336688e3f__shortcut"
|
|
119
|
+
};
|
|
109
120
|
// packages/boot/src/components/save-button/index.tsx
|
|
110
|
-
import useSaveShortcut from "../save-panel/use-save-shortcut.mjs";
|
|
111
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
112
121
|
function SaveButton() {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
Button,
|
|
179
|
-
{
|
|
180
|
-
variant: "primary",
|
|
181
|
-
size: "compact",
|
|
182
|
-
onClick: () => setIsSaveViewOpened(true),
|
|
183
|
-
onBlur: hideSavedState,
|
|
184
|
-
disabled,
|
|
185
|
-
accessibleWhenDisabled: true,
|
|
186
|
-
isBusy: isSaving,
|
|
187
|
-
className: style_module_default["save-button"],
|
|
188
|
-
icon: isInSavedState ? check : void 0
|
|
189
|
-
}
|
|
190
|
-
),
|
|
191
|
-
children: [
|
|
192
|
-
label,
|
|
193
|
-
descriptionId && /* @__PURE__ */ jsx(
|
|
194
|
-
KeyboardShortcutDescription,
|
|
195
|
-
{
|
|
196
|
-
descriptionId,
|
|
197
|
-
shortcut
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
),
|
|
203
|
-
/* @__PURE__ */ jsxs(Tooltip.Popup, { children: [
|
|
204
|
-
hasChanges && /* @__PURE__ */ jsx("span", { children: label }),
|
|
205
|
-
/* @__PURE__ */ jsx(
|
|
206
|
-
KeyboardShortcutDisplay,
|
|
207
|
-
{
|
|
208
|
-
className: style_module_default.shortcut,
|
|
209
|
-
shortcut
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
] })
|
|
213
|
-
] }),
|
|
214
|
-
isSaveViewOpen && /* @__PURE__ */ jsx(
|
|
215
|
-
Modal,
|
|
216
|
-
{
|
|
217
|
-
title: __("Review changes"),
|
|
218
|
-
onRequestClose: () => setIsSaveViewOpened(false),
|
|
219
|
-
size: "small",
|
|
220
|
-
children: /* @__PURE__ */ jsx(
|
|
221
|
-
EntitiesSavedStates,
|
|
222
|
-
{
|
|
223
|
-
close: () => setIsSaveViewOpened(false),
|
|
224
|
-
variant: "inline"
|
|
225
|
-
}
|
|
226
|
-
)
|
|
227
|
-
}
|
|
228
|
-
)
|
|
229
|
-
] });
|
|
122
|
+
const [isSaveViewOpen, setIsSaveViewOpened] = useState(false);
|
|
123
|
+
const { isSaving, dirtyEntityRecordsCount } = useSelect((select) => {
|
|
124
|
+
const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(store);
|
|
125
|
+
const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
|
|
126
|
+
return {
|
|
127
|
+
isSaving: dirtyEntityRecords.some((record) => isSavingEntityRecord(record.kind, record.name, record.key)),
|
|
128
|
+
dirtyEntityRecordsCount: dirtyEntityRecords.length
|
|
129
|
+
};
|
|
130
|
+
}, []);
|
|
131
|
+
const [showSavedState, setShowSavedState] = useState(false);
|
|
132
|
+
useEffect(() => {
|
|
133
|
+
if (isSaving) setShowSavedState(true);
|
|
134
|
+
}, [isSaving]);
|
|
135
|
+
const hasChanges = dirtyEntityRecordsCount > 0;
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
if (!isSaving && hasChanges) setShowSavedState(false);
|
|
138
|
+
}, [isSaving, hasChanges]);
|
|
139
|
+
function hideSavedState() {
|
|
140
|
+
if (showSavedState) setShowSavedState(false);
|
|
141
|
+
}
|
|
142
|
+
const shouldShowButton = hasChanges || showSavedState;
|
|
143
|
+
useSaveShortcut({ openSavePanel: () => setIsSaveViewOpened(true) });
|
|
144
|
+
const shortcut = {
|
|
145
|
+
displayShortcut: displayShortcut.primary("s"),
|
|
146
|
+
ariaKeyShortcut: ariaKeyShortcut.primary("s"),
|
|
147
|
+
label: shortcutAriaLabel.primary("s")
|
|
148
|
+
};
|
|
149
|
+
const { descriptionId, targetProps } = useKeyboardShortcutProps({ shortcut });
|
|
150
|
+
if (!shouldShowButton) return null;
|
|
151
|
+
const isInSavedState = showSavedState && !hasChanges;
|
|
152
|
+
const disabled = isSaving || isInSavedState;
|
|
153
|
+
const getLabel = () => {
|
|
154
|
+
if (isInSavedState) return __("Saved");
|
|
155
|
+
return sprintf(_n("Review %d change…", "Review %d changes…", dirtyEntityRecordsCount), dirtyEntityRecordsCount);
|
|
156
|
+
};
|
|
157
|
+
const label = getLabel();
|
|
158
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsxs(Tooltip.Trigger, {
|
|
159
|
+
...targetProps,
|
|
160
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
161
|
+
variant: "primary",
|
|
162
|
+
size: "compact",
|
|
163
|
+
onClick: () => setIsSaveViewOpened(true),
|
|
164
|
+
onBlur: hideSavedState,
|
|
165
|
+
disabled,
|
|
166
|
+
accessibleWhenDisabled: true,
|
|
167
|
+
isBusy: isSaving,
|
|
168
|
+
className: style_module_default["save-button"],
|
|
169
|
+
icon: isInSavedState ? check : void 0
|
|
170
|
+
}),
|
|
171
|
+
children: [label, descriptionId && /* @__PURE__ */ jsx(KeyboardShortcutDescription, {
|
|
172
|
+
descriptionId,
|
|
173
|
+
shortcut
|
|
174
|
+
})]
|
|
175
|
+
}), /* @__PURE__ */ jsxs(Tooltip.Popup, { children: [hasChanges && /* @__PURE__ */ jsx("span", { children: label }), /* @__PURE__ */ jsx(KeyboardShortcutDisplay, {
|
|
176
|
+
className: style_module_default.shortcut,
|
|
177
|
+
shortcut
|
|
178
|
+
})] })] }), isSaveViewOpen && /* @__PURE__ */ jsx(Modal, {
|
|
179
|
+
title: __("Review changes"),
|
|
180
|
+
onRequestClose: () => setIsSaveViewOpened(false),
|
|
181
|
+
size: "small",
|
|
182
|
+
children: /* @__PURE__ */ jsx(EntitiesSavedStates, {
|
|
183
|
+
close: () => setIsSaveViewOpened(false),
|
|
184
|
+
variant: "inline"
|
|
185
|
+
})
|
|
186
|
+
})] });
|
|
230
187
|
}
|
|
231
|
-
export {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
//# sourceMappingURL=index.mjs.map
|
|
188
|
+
export { SaveButton as default };
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=index.mjs.map
|