@wordpress/boot 0.24.0 → 0.25.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.
@@ -1,6 +1,6 @@
1
1
  // packages/boot/src/components/canvas/index.tsx
2
2
  import { useState, useEffect, useMemo } from "@wordpress/element";
3
- import { Spinner } from "@wordpress/components";
3
+ import { Spinner as WCSpinner } from "@wordpress/components";
4
4
  import { useNavigate, useSearch } from "@wordpress/route";
5
5
  import { __ } from "@wordpress/i18n";
6
6
  import { inertValue } from "@wordpress/react-inert-value";
@@ -82,7 +82,7 @@ function Canvas({ canvas }) {
82
82
  height: "100%",
83
83
  padding: "2rem"
84
84
  },
85
- children: /* @__PURE__ */ jsx(Spinner, {})
85
+ children: /* @__PURE__ */ jsx(WCSpinner, {})
86
86
  }
87
87
  );
88
88
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/canvas/index.tsx"],
4
- "sourcesContent": ["import { useState, useEffect, useMemo } from '@wordpress/element';\nimport { Spinner } from '@wordpress/components';\nimport { useNavigate, useSearch } from '@wordpress/route';\nimport { __ } from '@wordpress/i18n';\nimport { inertValue } from '@wordpress/react-inert-value';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as bootStore } from '../../store';\nimport type { CanvasData } from '../../store/types';\nimport BootBackButton from './back-button';\nimport SitePreview from './site-preview';\nimport useNavigateToEntityRecord, {\n\tuseActionPerformed,\n} from './use-navigate-to-entity-record';\nimport { getDeviceType } from './viewport';\n\ninterface CanvasProps {\n\tcanvas: CanvasData;\n}\n\n/**\n * Canvas component that dynamically loads and renders the lazy editor.\n *\n * @param {Object} props - Component props\n * @param {Object} props.canvas - Canvas data containing postType and postId\n * @return Canvas surface with editor\n */\nexport default function Canvas( { canvas }: CanvasProps ) {\n\tconst [ Editor, setEditor ] = useState< any >( null );\n\tconst navigate = useNavigate();\n\tconst { onNavigateToEntityRecord, onNavigateToPreviousEntityRecord } =\n\t\tuseNavigateToEntityRecord();\n\tconst onActionPerformed = useActionPerformed( canvas.postType );\n\n\t/*\n\t * An entity can be asked to be edited at a particular width — a navigation\n\t * overlay meant for mobile — and carries the width it was left at when\n\t * returned to. Anything else opens at the default.\n\t */\n\tconst viewport = useSearch( {\n\t\tstrict: false,\n\t\tselect: ( search ) => ( search as { viewport?: string } ).viewport,\n\t} ) as string | undefined;\n\n\t/*\n\t * Where clicking a previewed canvas goes, resolved the same way the editor\n\t * resolves anywhere else it sends you to edit an entity, and whether it\n\t * should go anywhere at all: a trashed entity has to be restored before it\n\t * can be edited.\n\t *\n\t * The record is the one the editor loads for this canvas, so reading it\n\t * here costs no request of its own.\n\t */\n\t/*\n\t * A route that names no entity leaves the editor to resolve one, which it\n\t * does from the block templates only a block theme has. `undefined` while\n\t * the theme is still being read.\n\t */\n\tconst hasEntity = !! ( canvas.postType && canvas.postId );\n\tconst isBlockTheme = useSelect(\n\t\t( select ) =>\n\t\t\t(\n\t\t\t\tselect( coreStore ).getCurrentTheme() as\n\t\t\t\t\t{ is_block_theme?: boolean } | undefined\n\t\t\t )?.is_block_theme,\n\t\t[]\n\t);\n\n\tconst { editLink, isTrashed } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! canvas.postType || ! canvas.postId ) {\n\t\t\t\treturn { editLink: undefined, isTrashed: false };\n\t\t\t}\n\n\t\t\tconst record = select( coreStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tcanvas.postType,\n\t\t\t\tcanvas.postId\n\t\t\t) as { status?: string } | undefined;\n\n\t\t\treturn {\n\t\t\t\teditLink: select( bootStore ).getEntityLink(\n\t\t\t\t\tcanvas.postType,\n\t\t\t\t\tcanvas.postId\n\t\t\t\t),\n\t\t\t\tisTrashed: record?.status === 'trash',\n\t\t\t};\n\t\t},\n\t\t[ canvas.postType, canvas.postId ]\n\t);\n\n\t/*\n\t * Memoized because the editor provider pushes these settings into the store\n\t * whenever their identity changes, and the callbacks have to stay stable for\n\t * the block inspector to keep offering the same affordance.\n\t */\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\tisPreviewMode: canvas.isPreview,\n\t\t\tstyles: canvas.isPreview\n\t\t\t\t? [ { css: 'body{min-height:100vh;}' } ]\n\t\t\t\t: [],\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t} ),\n\t\t[\n\t\t\tcanvas.isPreview,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t]\n\t);\n\n\tuseEffect( () => {\n\t\t// Dynamically import the lazy-editor module\n\t\timport( '@wordpress/lazy-editor' )\n\t\t\t.then( ( module ) => {\n\t\t\t\tsetEditor( () => module.Editor );\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error( 'Failed to load lazy editor:', error );\n\t\t\t} );\n\t}, [] );\n\n\t// Nothing for the editor to open, so show the site the route configures.\n\tif ( ! hasEntity && isBlockTheme === false ) {\n\t\treturn <SitePreview />;\n\t}\n\n\t// Show spinner while loading the editor module, and until it is known which\n\t// of the two this canvas is, so the wrong one is never shown first.\n\tif ( ! Editor || ( ! hasEntity && isBlockTheme === undefined ) ) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tpadding: '2rem',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<Spinner />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Render back button in full-screen mode (when not preview)\n\t// Uses render prop pattern to receive fillProps from Slot\n\tconst backButton = ! canvas.isPreview\n\t\t? ( { length }: { length: number } ) => (\n\t\t\t\t<BootBackButton length={ length } />\n\t\t\t)\n\t\t: undefined;\n\n\t// Render the editor with canvas data\n\treturn (\n\t\t<div style={ { height: '100%', position: 'relative' } }>\n\t\t\t<div\n\t\t\t\tstyle={ { height: '100%' } }\n\t\t\t\tinert={ inertValue( canvas.isPreview ) }\n\t\t\t>\n\t\t\t\t<Editor\n\t\t\t\t\tpostType={ canvas.postType }\n\t\t\t\t\tpostId={ canvas.postId }\n\t\t\t\t\trenderingMode={ canvas.renderingMode }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tbackButton={ backButton }\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\tinitialViewport={ getDeviceType( viewport ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{ canvas.isPreview && editLink && (\n\t\t\t\t<div\n\t\t\t\t\tonClick={\n\t\t\t\t\t\tisTrashed\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: () => navigate( { to: editLink } )\n\t\t\t\t\t}\n\t\t\t\t\tonKeyDown={ ( e ) => {\n\t\t\t\t\t\tif ( isTrashed ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( e.key === 'Enter' || e.key === ' ' ) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tnavigate( { to: editLink } );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\tinset: 0,\n\t\t\t\t\t\tcursor: isTrashed ? 'default' : 'pointer',\n\t\t\t\t\t\tzIndex: 1,\n\t\t\t\t\t} }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\taria-disabled={ isTrashed }\n\t\t\t\t\taria-label={ __( 'Edit' ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],
5
- "mappings": ";AAAA,SAAS,UAAU,WAAW,eAAe;AAC7C,SAAS,eAAe;AACxB,SAAS,aAAa,iBAAiB;AACvC,SAAS,UAAU;AACnB,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AAU,EAAE,IAAI,SAAS,CAAE;AAAA,QAErC,WAAY,CAAE,MAAO;AACpB,cAAK,WAAY;AAChB;AAAA,UACD;AACA,cAAK,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAM;AACzC,cAAE,eAAe;AACjB,qBAAU,EAAE,IAAI,SAAS,CAAE;AAAA,UAC5B;AAAA,QACD;AAAA,QACA,OAAQ;AAAA,UACP,UAAU;AAAA,UACV,OAAO;AAAA,UACP,QAAQ,YAAY,YAAY;AAAA,UAChC,QAAQ;AAAA,QACT;AAAA,QACA,MAAK;AAAA,QACL,UAAW;AAAA,QACX,iBAAgB;AAAA,QAChB,cAAa,GAAI,MAAO;AAAA;AAAA,IACzB;AAAA,KAEF;AAEF;",
4
+ "sourcesContent": ["import { useState, useEffect, useMemo } from '@wordpress/element';\nimport { Spinner as WCSpinner } from '@wordpress/components';\nimport { useNavigate, useSearch } from '@wordpress/route';\nimport { __ } from '@wordpress/i18n';\nimport { inertValue } from '@wordpress/react-inert-value';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as bootStore } from '../../store';\nimport type { CanvasData } from '../../store/types';\nimport BootBackButton from './back-button';\nimport SitePreview from './site-preview';\nimport useNavigateToEntityRecord, {\n\tuseActionPerformed,\n} from './use-navigate-to-entity-record';\nimport { getDeviceType } from './viewport';\n\ninterface CanvasProps {\n\tcanvas: CanvasData;\n}\n\n/**\n * Canvas component that dynamically loads and renders the lazy editor.\n *\n * @param {Object} props - Component props\n * @param {Object} props.canvas - Canvas data containing postType and postId\n * @return Canvas surface with editor\n */\nexport default function Canvas( { canvas }: CanvasProps ) {\n\tconst [ Editor, setEditor ] = useState< any >( null );\n\tconst navigate = useNavigate();\n\tconst { onNavigateToEntityRecord, onNavigateToPreviousEntityRecord } =\n\t\tuseNavigateToEntityRecord();\n\tconst onActionPerformed = useActionPerformed( canvas.postType );\n\n\t/*\n\t * An entity can be asked to be edited at a particular width — a navigation\n\t * overlay meant for mobile — and carries the width it was left at when\n\t * returned to. Anything else opens at the default.\n\t */\n\tconst viewport = useSearch( {\n\t\tstrict: false,\n\t\tselect: ( search ) => ( search as { viewport?: string } ).viewport,\n\t} ) as string | undefined;\n\n\t/*\n\t * Where clicking a previewed canvas goes, resolved the same way the editor\n\t * resolves anywhere else it sends you to edit an entity, and whether it\n\t * should go anywhere at all: a trashed entity has to be restored before it\n\t * can be edited.\n\t *\n\t * The record is the one the editor loads for this canvas, so reading it\n\t * here costs no request of its own.\n\t */\n\t/*\n\t * A route that names no entity leaves the editor to resolve one, which it\n\t * does from the block templates only a block theme has. `undefined` while\n\t * the theme is still being read.\n\t */\n\tconst hasEntity = !! ( canvas.postType && canvas.postId );\n\tconst isBlockTheme = useSelect(\n\t\t( select ) =>\n\t\t\t(\n\t\t\t\tselect( coreStore ).getCurrentTheme() as\n\t\t\t\t\t{ is_block_theme?: boolean } | undefined\n\t\t\t )?.is_block_theme,\n\t\t[]\n\t);\n\n\tconst { editLink, isTrashed } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! canvas.postType || ! canvas.postId ) {\n\t\t\t\treturn { editLink: undefined, isTrashed: false };\n\t\t\t}\n\n\t\t\tconst record = select( coreStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tcanvas.postType,\n\t\t\t\tcanvas.postId\n\t\t\t) as { status?: string } | undefined;\n\n\t\t\treturn {\n\t\t\t\teditLink: select( bootStore ).getEntityLink(\n\t\t\t\t\tcanvas.postType,\n\t\t\t\t\tcanvas.postId\n\t\t\t\t),\n\t\t\t\tisTrashed: record?.status === 'trash',\n\t\t\t};\n\t\t},\n\t\t[ canvas.postType, canvas.postId ]\n\t);\n\n\t/*\n\t * Memoized because the editor provider pushes these settings into the store\n\t * whenever their identity changes, and the callbacks have to stay stable for\n\t * the block inspector to keep offering the same affordance.\n\t */\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\tisPreviewMode: canvas.isPreview,\n\t\t\tstyles: canvas.isPreview\n\t\t\t\t? [ { css: 'body{min-height:100vh;}' } ]\n\t\t\t\t: [],\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t} ),\n\t\t[\n\t\t\tcanvas.isPreview,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t]\n\t);\n\n\tuseEffect( () => {\n\t\t// Dynamically import the lazy-editor module\n\t\timport( '@wordpress/lazy-editor' )\n\t\t\t.then( ( module ) => {\n\t\t\t\tsetEditor( () => module.Editor );\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error( 'Failed to load lazy editor:', error );\n\t\t\t} );\n\t}, [] );\n\n\t// Nothing for the editor to open, so show the site the route configures.\n\tif ( ! hasEntity && isBlockTheme === false ) {\n\t\treturn <SitePreview />;\n\t}\n\n\t// Show spinner while loading the editor module, and until it is known which\n\t// of the two this canvas is, so the wrong one is never shown first.\n\tif ( ! Editor || ( ! hasEntity && isBlockTheme === undefined ) ) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tpadding: '2rem',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<WCSpinner />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Render back button in full-screen mode (when not preview)\n\t// Uses render prop pattern to receive fillProps from Slot\n\tconst backButton = ! canvas.isPreview\n\t\t? ( { length }: { length: number } ) => (\n\t\t\t\t<BootBackButton length={ length } />\n\t\t\t)\n\t\t: undefined;\n\n\t// Render the editor with canvas data\n\treturn (\n\t\t<div style={ { height: '100%', position: 'relative' } }>\n\t\t\t<div\n\t\t\t\tstyle={ { height: '100%' } }\n\t\t\t\tinert={ inertValue( canvas.isPreview ) }\n\t\t\t>\n\t\t\t\t<Editor\n\t\t\t\t\tpostType={ canvas.postType }\n\t\t\t\t\tpostId={ canvas.postId }\n\t\t\t\t\trenderingMode={ canvas.renderingMode }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tbackButton={ backButton }\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\tinitialViewport={ getDeviceType( viewport ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{ canvas.isPreview && editLink && (\n\t\t\t\t<div\n\t\t\t\t\tonClick={\n\t\t\t\t\t\tisTrashed\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: () => navigate( { to: editLink } )\n\t\t\t\t\t}\n\t\t\t\t\tonKeyDown={ ( e ) => {\n\t\t\t\t\t\tif ( isTrashed ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( e.key === 'Enter' || e.key === ' ' ) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tnavigate( { to: editLink } );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\tinset: 0,\n\t\t\t\t\t\tcursor: isTrashed ? 'default' : 'pointer',\n\t\t\t\t\t\tzIndex: 1,\n\t\t\t\t\t} }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\taria-disabled={ isTrashed }\n\t\t\t\t\taria-label={ __( 'Edit' ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],
5
+ "mappings": ";AAAA,SAAS,UAAU,WAAW,eAAe;AAC7C,SAAS,WAAW,iBAAiB;AACrC,SAAS,aAAa,iBAAiB;AACvC,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,iBAAiB;AAEnC,OAAO,oBAAoB;AAC3B,OAAO,iB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E,QAAQ,KAAM;AACzC,cAAE,eAAe;AACjB,qBAAU,EAAE,IAAI,SAAS,CAAE;AAAA,UAC5B;AAAA,QACD;AAAA,QACA,OAAQ;AAAA,UACP,UAAU;AAAA,UACV,OAAO;AAAA,UACP,QAAQ,YAAY,YAAY;AAAA,UAChC,QAAQ;AAAA,QACT;AAAA,QACA,MAAK;AAAA,QACL,UAAW;AAAA,QACX,iBAAgB;AAAA,QAChB,cAAa,GAAI,MAAO;AAAA;AAAA,IACzB;AAAA,KAEF;AAEF;",
6
6
  "names": []
7
7
  }
@@ -3,7 +3,7 @@ import type { ReactNode, ComponentType } from 'react';
3
3
  * Icon type supporting multiple formats:
4
4
  * - Dashicon strings (e.g., "dashicons-admin-generic")
5
5
  * - JSX elements
6
- * - SVG icons from @wordpress/icons
6
+ * - SVG icons from `@wordpress/icons`
7
7
  * - Data URLs for images
8
8
  */
9
9
  export type IconType = string | React.JSX.Element | ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/boot",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Minimal boot package for WordPress admin pages.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -19,14 +19,13 @@
19
19
  "url": "https://github.com/WordPress/gutenberg/issues"
20
20
  },
21
21
  "engines": {
22
- "node": ">=18.12.0"
22
+ "node": ">=22.13.0"
23
23
  },
24
24
  "files": [
25
25
  "src",
26
26
  "build-module",
27
27
  "build-style",
28
- "build-types",
29
- "*.md"
28
+ "build-types"
30
29
  ],
31
30
  "module": "build-module/index.mjs",
32
31
  "exports": {
@@ -39,32 +38,32 @@
39
38
  "wpScriptModuleExports": "./build-module/index.mjs",
40
39
  "types": "build-types",
41
40
  "dependencies": {
42
- "@wordpress/a11y": "^4.57.0",
43
- "@wordpress/admin-ui": "^2.12.0",
44
- "@wordpress/base-styles": "^13.3.0",
45
- "@wordpress/components": "^42.0.0",
46
- "@wordpress/compose": "^8.10.0",
47
- "@wordpress/core-data": "^8.2.0",
48
- "@wordpress/data": "^10.57.0",
49
- "@wordpress/dom": "^4.57.0",
50
- "@wordpress/editor": "^15.2.0",
51
- "@wordpress/element": "^9.0.0",
52
- "@wordpress/html-entities": "^4.57.0",
53
- "@wordpress/i18n": "^6.30.0",
54
- "@wordpress/icons": "^18.0.0",
55
- "@wordpress/keyboard-shortcuts": "^5.57.0",
56
- "@wordpress/keycodes": "^4.57.0",
57
- "@wordpress/lazy-editor": "^1.23.0",
58
- "@wordpress/notices": "^5.57.0",
59
- "@wordpress/plugins": "^7.57.0",
60
- "@wordpress/primitives": "^4.57.0",
61
- "@wordpress/private-apis": "^2.0.0",
62
- "@wordpress/react-inert-value": "^1.0.0",
63
- "@wordpress/route": "^0.23.0",
64
- "@wordpress/style-runtime": "^0.13.0",
65
- "@wordpress/theme": "^2.3.0",
66
- "@wordpress/ui": "^0.24.0",
67
- "@wordpress/url": "^4.57.0",
41
+ "@wordpress/a11y": "^5.0.0",
42
+ "@wordpress/admin-ui": "^3.0.0",
43
+ "@wordpress/base-styles": "^14.0.0",
44
+ "@wordpress/components": "^43.0.0",
45
+ "@wordpress/compose": "^9.0.0",
46
+ "@wordpress/core-data": "^9.0.0",
47
+ "@wordpress/data": "^11.0.0",
48
+ "@wordpress/dom": "^5.0.0",
49
+ "@wordpress/editor": "^16.0.0",
50
+ "@wordpress/element": "^10.0.0",
51
+ "@wordpress/html-entities": "^5.0.0",
52
+ "@wordpress/i18n": "^7.0.0",
53
+ "@wordpress/icons": "^19.0.0",
54
+ "@wordpress/keyboard-shortcuts": "^6.0.0",
55
+ "@wordpress/keycodes": "^5.0.0",
56
+ "@wordpress/lazy-editor": "^2.0.0",
57
+ "@wordpress/notices": "^6.0.0",
58
+ "@wordpress/plugins": "^8.0.0",
59
+ "@wordpress/primitives": "^5.0.0",
60
+ "@wordpress/private-apis": "^3.0.0",
61
+ "@wordpress/react-inert-value": "^2.0.0",
62
+ "@wordpress/route": "^0.24.0",
63
+ "@wordpress/style-runtime": "^0.14.0",
64
+ "@wordpress/theme": "^3.0.0",
65
+ "@wordpress/ui": "^0.25.0",
66
+ "@wordpress/url": "^5.0.0",
68
67
  "clsx": "^2.1.1"
69
68
  },
70
69
  "peerDependencies": {
@@ -80,5 +79,5 @@
80
79
  "publishConfig": {
81
80
  "access": "public"
82
81
  },
83
- "gitHead": "12441e2520c78b2254a792a8cba40c34110be060"
82
+ "gitHead": "8d30f92cbbde3ddf781c8799443c649befbbcb88"
84
83
  }
@@ -1,5 +1,5 @@
1
1
  import { useState, useEffect, useMemo } from '@wordpress/element';
2
- import { Spinner } from '@wordpress/components';
2
+ import { Spinner as WCSpinner } from '@wordpress/components';
3
3
  import { useNavigate, useSearch } from '@wordpress/route';
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import { inertValue } from '@wordpress/react-inert-value';
@@ -140,7 +140,7 @@ export default function Canvas( { canvas }: CanvasProps ) {
140
140
  padding: '2rem',
141
141
  } }
142
142
  >
143
- <Spinner />
143
+ <WCSpinner />
144
144
  </div>
145
145
  );
146
146
  }
@@ -4,7 +4,7 @@ import type { ReactNode, ComponentType } from 'react';
4
4
  * Icon type supporting multiple formats:
5
5
  * - Dashicon strings (e.g., "dashicons-admin-generic")
6
6
  * - JSX elements
7
- * - SVG icons from @wordpress/icons
7
+ * - SVG icons from `@wordpress/icons`
8
8
  * - Data URLs for images
9
9
  */
10
10
  export type IconType = string | React.JSX.Element | ReactNode;
package/CHANGELOG.md DELETED
@@ -1,81 +0,0 @@
1
- <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->
2
-
3
- ## Unreleased
4
-
5
- ## 0.24.0 (2026-10-07)
6
-
7
- ### Enhancements
8
-
9
- - Use the `inertValue` helper to set `inert` attributes, for better React 18/19 compatibility ([#83871](https://github.com/WordPress/gutenberg/pull/83871)).
10
-
11
- ## 0.23.0 (2026-09-23)
12
-
13
- ## 0.22.0 (2026-09-10)
14
-
15
- ### Internal
16
-
17
- - Remove unused dependency `@wordpress/commands` ([#82103](https://github.com/WordPress/gutenberg/pull/82103)).
18
-
19
- ## 0.21.0 (2026-08-26)
20
-
21
- ### Bug Fixes
22
-
23
- - Seed content-surface `ThemeProvider` backgrounds with `#fcfcfc` instead of `#ffffff`, matching the design system default and preserving room for stronger and weaker neutral surface tokens ([#81646](https://github.com/WordPress/gutenberg/pull/81646)).
24
- - Restore bottom-centered snackbar notices after the CSS Modules migration ([#81995](https://github.com/WordPress/gutenberg/pull/81995)).
25
- - Mount the plugins registered with `registerPlugin`, so the sidebars, panels and menu items they fill render ([#81754](https://github.com/WordPress/gutenberg/pull/81754)).
26
- - Canvas: Show the site's front end where a route names no entity and the theme has no block templates to resolve one from, instead of an editor with nothing open. Was previously handled by the home route alone, leaving `/identity` broken on a classic theme ([#81749](https://github.com/WordPress/gutenberg/pull/81749)).
27
- - Canvas: Open an entity at the width its `viewport` param asks for through the editor provider, so the width comes from the theme's breakpoints rather than the defaults ([#81750](https://github.com/WordPress/gutenberg/pull/81750)).
28
- - Canvas: Stop writing the current width into the `viewport` search param when leaving an entity. The param says where an entity opens; a width set from the device preview is view state and no longer follows the user between entities ([#81750](https://github.com/WordPress/gutenberg/pull/81750)).
29
- - Canvas: Do not offer to edit a trashed entity from its preview ([#81632](https://github.com/WordPress/gutenberg/pull/81632)).
30
- - Translate the click-to-edit label on a previewed canvas, and name the action rather than the gesture ([#81620](https://github.com/WordPress/gutenberg/pull/81620)).
31
-
32
- ### Enhancements
33
-
34
- - Save button: Use the shared UI keyboard shortcut utilities for its tooltip and accessibility metadata. ([#81826](https://github.com/WordPress/gutenberg/pull/81826))
35
- - Contain a failure to the surface it happened in, so a stage, inspector or canvas that throws leaves the rest of the screen working ([#81622](https://github.com/WordPress/gutenberg/pull/81622)).
36
- - Warn before leaving the page with unsaved changes ([#81625](https://github.com/WordPress/gutenberg/pull/81625)).
37
- - Open an entity at the width its `viewport` search param asks for, so a navigation overlay meant for mobile is edited at mobile width ([#81617](https://github.com/WordPress/gutenberg/pull/81617)).
38
- - Add a `stage` visibility function to a route's config, mirroring `inspector`, so a route can hide its stage and leave the canvas to fill the surfaces area.
39
- - Pass the editor's entity navigation callbacks from the canvas, so a template part or synced pattern can be opened from the block inspector and navigated back out of, restoring the block that was selected ([#81590](https://github.com/WordPress/gutenberg/pull/81590)).
40
- - Add `registerEntityLinks` and `getEntityLink`, so an application declares where each post type is listed and edited and the canvas resolves every link through them ([#81590](https://github.com/WordPress/gutenberg/pull/81590)).
41
- - Run the editor's post actions from the canvas, returning to the list when an entity is trashed or deleted and offering a way to reach a duplicate ([#81590](https://github.com/WordPress/gutenberg/pull/81590)).
42
-
43
- ### Breaking Changes
44
-
45
- - Remove `editLink` from a route's canvas data. Register the post type's `edit` path with `registerEntityLinks` instead ([#81590](https://github.com/WordPress/gutenberg/pull/81590)).
46
-
47
- ### Internal
48
-
49
- - Migrate Boot styles to CSS Modules and encapsulate its internal DOM classes ([#81756](https://github.com/WordPress/gutenberg/pull/81756)).
50
-
51
- ## 0.20.0 (2026-08-12)
52
-
53
- ### Bug Fixes
54
-
55
- - Adjust the specificity of the responsive image default in the layout container so components can size their own images ([#80845](https://github.com/WordPress/gutenberg/pull/80845)).
56
- - Ignore `updateMenuItem` for menu items that were never registered, instead of adding a partial entry that renders as an empty navigation row ([#81581](https://github.com/WordPress/gutenberg/pull/81581)).
57
-
58
- ## 0.19.0 (2026-07-29)
59
-
60
- ## 0.18.0 (2026-07-14)
61
-
62
- ### Enhancements
63
-
64
- - Use the emphasis font-weight token for UI emphasis ([#80093](https://github.com/WordPress/gutenberg/pull/80093)).
65
- - Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)).
66
-
67
- ## 0.17.0 (2026-07-01)
68
-
69
- ## 0.16.0 (2026-06-24)
70
-
71
- ### Enhancements
72
-
73
- - `initSinglePage` now accepts an `initModules` option and runs page init modules before rendering, matching `init`.
74
-
75
- ## 0.15.1 (2026-06-16)
76
-
77
- ## 0.15.0 (2026-06-10)
78
-
79
- ### Code Quality
80
-
81
- - Add missing `@types/react` dependency. [#78882](https://github.com/WordPress/gutenberg/pull/78882).