@wordpress/edit-site 5.27.0 → 5.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/build/components/block-editor/back-button.js +2 -3
  2. package/build/components/block-editor/back-button.js.map +1 -1
  3. package/build/components/block-editor/site-editor-canvas.js +8 -2
  4. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  5. package/build/components/block-editor/use-post-link-props.js +5 -1
  6. package/build/components/block-editor/use-post-link-props.js.map +1 -1
  7. package/build/components/editor/index.js +7 -7
  8. package/build/components/editor/index.js.map +1 -1
  9. package/build/components/global-styles/font-library-modal/context.js +14 -0
  10. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  11. package/build/components/global-styles/font-library-modal/font-collection.js +17 -33
  12. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  13. package/build/components/global-styles/font-library-modal/font-demo.js +1 -1
  14. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  15. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -1
  16. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  17. package/build/components/global-styles/font-library-modal/index.js +10 -3
  18. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  19. package/build/components/global-styles/font-library-modal/installed-fonts.js +8 -21
  20. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  21. package/build/components/global-styles/font-library-modal/library-font-variant.js +2 -2
  22. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  23. package/build/components/global-styles/font-library-modal/resolvers.js +1 -1
  24. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  25. package/build/components/global-styles/font-library-modal/tab-panel-layout.js +14 -2
  26. package/build/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -1
  27. package/build/components/global-styles/font-library-modal/upload-fonts.js +160 -4
  28. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  29. package/build/components/global-styles/font-library-modal/utils/index.js +33 -31
  30. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  31. package/build/components/global-styles/screen-block.js +10 -0
  32. package/build/components/global-styles/screen-block.js.map +1 -1
  33. package/build/components/routes/link.js +1 -1
  34. package/build/components/routes/link.js.map +1 -1
  35. package/build/components/sidebar-edit-mode/index.js +1 -2
  36. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  37. package/build/components/sidebar-edit-mode/settings-header/index.js +7 -36
  38. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  39. package/build/components/welcome-guide/template.js +2 -2
  40. package/build/components/welcome-guide/template.js.map +1 -1
  41. package/build/hooks/commands/use-edit-mode-commands.js +16 -6
  42. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  43. package/build-module/components/block-editor/back-button.js +2 -3
  44. package/build-module/components/block-editor/back-button.js.map +1 -1
  45. package/build-module/components/block-editor/site-editor-canvas.js +8 -2
  46. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  47. package/build-module/components/block-editor/use-post-link-props.js +5 -1
  48. package/build-module/components/block-editor/use-post-link-props.js.map +1 -1
  49. package/build-module/components/editor/index.js +7 -7
  50. package/build-module/components/editor/index.js.map +1 -1
  51. package/build-module/components/global-styles/font-library-modal/context.js +14 -0
  52. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  53. package/build-module/components/global-styles/font-library-modal/font-collection.js +19 -35
  54. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  55. package/build-module/components/global-styles/font-library-modal/font-demo.js +1 -1
  56. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  57. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -1
  58. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  59. package/build-module/components/global-styles/font-library-modal/index.js +10 -3
  60. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  61. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +9 -22
  62. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  63. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +2 -2
  64. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  65. package/build-module/components/global-styles/font-library-modal/resolvers.js +1 -1
  66. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  67. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js +15 -3
  68. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -1
  69. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +162 -6
  70. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  71. package/build-module/components/global-styles/font-library-modal/utils/index.js +32 -30
  72. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  73. package/build-module/components/global-styles/screen-block.js +10 -0
  74. package/build-module/components/global-styles/screen-block.js.map +1 -1
  75. package/build-module/components/routes/link.js +1 -1
  76. package/build-module/components/routes/link.js.map +1 -1
  77. package/build-module/components/sidebar-edit-mode/index.js +1 -2
  78. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  79. package/build-module/components/sidebar-edit-mode/settings-header/index.js +7 -36
  80. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  81. package/build-module/components/welcome-guide/template.js +2 -2
  82. package/build-module/components/welcome-guide/template.js.map +1 -1
  83. package/build-module/hooks/commands/use-edit-mode-commands.js +16 -6
  84. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  85. package/build-style/style-rtl.css +16 -31
  86. package/build-style/style.css +16 -31
  87. package/package.json +13 -13
  88. package/src/components/block-editor/back-button.js +6 -3
  89. package/src/components/block-editor/site-editor-canvas.js +19 -12
  90. package/src/components/block-editor/use-post-link-props.js +5 -1
  91. package/src/components/editor/index.js +4 -9
  92. package/src/components/global-styles/font-library-modal/context.js +14 -0
  93. package/src/components/global-styles/font-library-modal/font-collection.js +16 -40
  94. package/src/components/global-styles/font-library-modal/font-demo.js +1 -1
  95. package/src/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -1
  96. package/src/components/global-styles/font-library-modal/index.js +8 -3
  97. package/src/components/global-styles/font-library-modal/installed-fonts.js +12 -31
  98. package/src/components/global-styles/font-library-modal/library-font-variant.js +2 -2
  99. package/src/components/global-styles/font-library-modal/resolvers.js +1 -1
  100. package/src/components/global-styles/font-library-modal/style.scss +20 -43
  101. package/src/components/global-styles/font-library-modal/tab-panel-layout.js +45 -26
  102. package/src/components/global-styles/font-library-modal/upload-fonts.js +201 -6
  103. package/src/components/global-styles/font-library-modal/utils/index.js +44 -38
  104. package/src/components/global-styles/screen-block.js +10 -0
  105. package/src/components/routes/link.js +1 -1
  106. package/src/components/sidebar-edit-mode/index.js +1 -4
  107. package/src/components/sidebar-edit-mode/settings-header/index.js +12 -34
  108. package/src/components/welcome-guide/template.js +2 -2
  109. package/src/hooks/commands/use-edit-mode-commands.js +26 -14
  110. package/build/components/global-styles/font-library-modal/local-fonts.js +0 -196
  111. package/build/components/global-styles/font-library-modal/local-fonts.js.map +0 -1
  112. package/build-module/components/global-styles/font-library-modal/local-fonts.js +0 -187
  113. package/build-module/components/global-styles/font-library-modal/local-fonts.js.map +0 -1
  114. package/src/components/global-styles/font-library-modal/local-fonts.js +0 -239
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","__","sprintf","isRTL","edit","trash","rotateLeft","rotateRight","layout","page","drawerLeft","drawerRight","blockDefault","code","keyboard","listView","symbol","useCommandLoader","decodeEntities","privateApis","routerPrivateApis","store","preferencesStore","interfaceStore","noticesStore","editorStore","editSiteStore","useEditedEntityRecord","isTemplateRemovable","isTemplateRevertable","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","PREFERENCES_MODAL_NAME","PATTERN_MODALS","unlock","TEMPLATE_POST_TYPE","useHistory","usePageContentFocusCommands","record","template","isPage","canvasMode","renderingMode","select","_isPage","getCanvasMode","getRenderingMode","setRenderingMode","isLoading","commands","push","name","label","title","icon","callback","close","useEditorModeCommands","switchEditorMode","editorMode","getEditorMode","useManipulateDocumentCommands","isLoaded","removeTemplate","revertTemplate","history","isEditingPage","type","path","useEditUICommands","openGeneralSidebar","closeGeneralSidebar","toggleDistractionFree","setIsListViewOpened","activeSidebar","showBlockBreadcrumbs","isListViewOpen","isDistractionFree","isTopToolbar","isFocusMode","get","isListViewOpened","getActiveComplementaryArea","openModal","toggle","createInfoNotice","id","actions","onClick","usePatternCommands","pattern","rename","duplicate","useEditModeCommands","hook","context"],"sources":["@wordpress/edit-site/src/hooks/commands/use-edit-mode-commands.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tedit,\n\ttrash,\n\trotateLeft,\n\trotateRight,\n\tlayout,\n\tpage,\n\tdrawerLeft,\n\tdrawerRight,\n\tblockDefault,\n\tcode,\n\tkeyboard,\n\tlistView,\n\tsymbol,\n} from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport useEditedEntityRecord from '../../components/use-edited-entity-record';\nimport isTemplateRemovable from '../../utils/is-template-removable';\nimport isTemplateRevertable from '../../utils/is-template-revertable';\nimport { KEYBOARD_SHORTCUT_HELP_MODAL_NAME } from '../../components/keyboard-shortcut-help-modal';\nimport { PREFERENCES_MODAL_NAME } from '../../components/preferences-modal';\nimport { PATTERN_MODALS } from '../../components/pattern-modal';\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction usePageContentFocusCommands() {\n\tconst { record: template } = useEditedEntityRecord();\n\tconst { isPage, canvasMode, renderingMode } = useSelect( ( select ) => {\n\t\tconst { isPage: _isPage, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst { getRenderingMode } = select( editorStore );\n\t\treturn {\n\t\t\tisPage: _isPage(),\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\trenderingMode: getRenderingMode(),\n\t\t};\n\t}, [] );\n\tconst { setRenderingMode } = useDispatch( editorStore );\n\n\tif ( ! isPage || canvasMode !== 'edit' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( renderingMode !== 'template-only' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-template-focus',\n\t\t\t/* translators: %1$s: template title */\n\t\t\tlabel: sprintf(\n\t\t\t\t'Edit template: %s',\n\t\t\t\tdecodeEntities( template.title )\n\t\t\t),\n\t\t\ticon: layout,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetRenderingMode( 'template-only' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t} else {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-page-focus',\n\t\t\tlabel: __( 'Back to page' ),\n\t\t\ticon: page,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetRenderingMode( 'template-locked' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nfunction useEditorModeCommands() {\n\tconst { switchEditorMode } = useDispatch( editSiteStore );\n\tconst { canvasMode, editorMode } = useSelect(\n\t\t( select ) => ( {\n\t\t\tcanvasMode: unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t\teditorMode: select( editSiteStore ).getEditorMode(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tif ( canvasMode !== 'edit' || editorMode !== 'text' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( editorMode === 'text' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/exit-code-editor',\n\t\t\tlabel: __( 'Exit code editor' ),\n\t\t\ticon: code,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tswitchEditorMode( 'visual' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nfunction useManipulateDocumentCommands() {\n\tconst { isLoaded, record: template } = useEditedEntityRecord();\n\tconst { removeTemplate, revertTemplate } = useDispatch( editSiteStore );\n\tconst history = useHistory();\n\tconst isEditingPage = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editSiteStore ).isPage() &&\n\t\t\tselect( editorStore ).getRenderingMode() !== 'template-only',\n\t\t[]\n\t);\n\n\tif ( ! isLoaded ) {\n\t\treturn { isLoading: true, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( isTemplateRevertable( template ) && ! isEditingPage ) {\n\t\tconst label =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? /* translators: %1$s: template title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Reset template: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t )\n\t\t\t\t: /* translators: %1$s: template part title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Reset template part: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t );\n\t\tcommands.push( {\n\t\t\tname: 'core/reset-template',\n\t\t\tlabel,\n\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\trevertTemplate( template );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( isTemplateRemovable( template ) && ! isEditingPage ) {\n\t\tconst label =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? /* translators: %1$s: template title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Delete template: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t )\n\t\t\t\t: /* translators: %1$s: template part title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Delete template part: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t );\n\t\tconst path =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? '/wp_template'\n\t\t\t\t: '/wp_template_part/all';\n\t\tcommands.push( {\n\t\t\tname: 'core/remove-template',\n\t\t\tlabel,\n\t\t\ticon: trash,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tremoveTemplate( template );\n\t\t\t\t// Navigate to the template list\n\t\t\t\thistory.push( {\n\t\t\t\t\tpath,\n\t\t\t\t} );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn {\n\t\tisLoading: ! isLoaded,\n\t\tcommands,\n\t};\n}\n\nfunction useEditUICommands() {\n\tconst {\n\t\topenGeneralSidebar,\n\t\tcloseGeneralSidebar,\n\t\ttoggleDistractionFree,\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t} = useDispatch( editSiteStore );\n\tconst {\n\t\tcanvasMode,\n\t\teditorMode,\n\t\tactiveSidebar,\n\t\tshowBlockBreadcrumbs,\n\t\tisListViewOpen,\n\t\tisDistractionFree,\n\t\tisTopToolbar,\n\t\tisFocusMode,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorMode } = select( editSiteStore );\n\t\tconst { isListViewOpened } = select( editorStore );\n\t\treturn {\n\t\t\tcanvasMode: unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t\teditorMode: getEditorMode(),\n\t\t\tactiveSidebar: select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisFocusMode: get( 'core', 'focusMode' ),\n\t\t\tisTopToolbar: get( 'core', 'fixedToolbar' ),\n\t\t};\n\t}, [] );\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\n\tif ( canvasMode !== 'edit' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tcommands.push( {\n\t\tname: 'core/open-settings-sidebar',\n\t\tlabel: __( 'Toggle settings sidebar' ),\n\t\ticon: isRTL() ? drawerLeft : drawerRight,\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\tif ( activeSidebar === 'edit-site/template' ) {\n\t\t\t\tcloseGeneralSidebar();\n\t\t\t} else {\n\t\t\t\topenGeneralSidebar( 'edit-site/template' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/open-block-inspector',\n\t\tlabel: __( 'Toggle block inspector' ),\n\t\ticon: blockDefault,\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\tif ( activeSidebar === 'edit-site/block-inspector' ) {\n\t\t\t\tcloseGeneralSidebar();\n\t\t\t} else {\n\t\t\t\topenGeneralSidebar( 'edit-site/block-inspector' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-spotlight-mode',\n\t\tlabel: __( 'Toggle spotlight' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core', 'focusMode' );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisFocusMode ? __( 'Spotlight off.' ) : __( 'Spotlight on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-spotlight-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\ttoggle( 'core', 'focusMode' );\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}\n\t\t\t);\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-distraction-free',\n\t\tlabel: isDistractionFree\n\t\t\t? __( 'Exit Distraction Free' )\n\t\t\t: __( 'Enter Distraction Free ' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggleDistractionFree();\n\t\t\tclose();\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-top-toolbar',\n\t\tlabel: __( 'Toggle top toolbar' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core', 'fixedToolbar' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\ttoggleDistractionFree();\n\t\t\t}\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar off.' )\n\t\t\t\t\t: __( 'Top toolbar on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-top-toolbar/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\ttoggle( 'core', 'fixedToolbar' );\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}\n\t\t\t);\n\t\t},\n\t} );\n\n\tif ( editorMode === 'visual' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-code-editor',\n\t\t\tlabel: __( 'Open code editor' ),\n\t\t\ticon: code,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tswitchEditorMode( 'text' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\tcommands.push( {\n\t\tname: 'core/open-preferences',\n\t\tlabel: __( 'Editor preferences' ),\n\t\tcallback: () => {\n\t\t\topenModal( PREFERENCES_MODAL_NAME );\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/open-shortcut-help',\n\t\tlabel: __( 'Keyboard shortcuts' ),\n\t\ticon: keyboard,\n\t\tcallback: () => {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-breadcrumbs',\n\t\tlabel: showBlockBreadcrumbs\n\t\t\t? __( 'Hide block breadcrumbs' )\n\t\t\t: __( 'Show block breadcrumbs' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core', 'showBlockBreadcrumbs' );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tshowBlockBreadcrumbs\n\t\t\t\t\t? __( 'Breadcrumbs hidden.' )\n\t\t\t\t\t: __( 'Breadcrumbs visible.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-breadcrumbs/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-list-view',\n\t\tlabel: isListViewOpen\n\t\t\t? __( 'Close List View' )\n\t\t\t: __( 'Open List View' ),\n\t\ticon: listView,\n\t\tcallback: ( { close } ) => {\n\t\t\tsetIsListViewOpened( ! isListViewOpen );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisListViewOpen ? __( 'List View off.' ) : __( 'List View on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-list-view/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t} );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction usePatternCommands() {\n\tconst { isLoaded, record: pattern } = useEditedEntityRecord();\n\tconst { openModal } = useDispatch( interfaceStore );\n\n\tif ( ! isLoaded ) {\n\t\treturn { isLoading: true, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( pattern?.type === 'wp_block' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/rename-pattern',\n\t\t\tlabel: __( 'Rename pattern' ),\n\t\t\ticon: edit,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\topenModal( PATTERN_MODALS.rename );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t\tcommands.push( {\n\t\t\tname: 'core/duplicate-pattern',\n\t\t\tlabel: __( 'Duplicate pattern' ),\n\t\t\ticon: symbol,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\topenModal( PATTERN_MODALS.duplicate );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nexport function useEditModeCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/exit-code-editor',\n\t\thook: useEditorModeCommands,\n\t\tcontext: 'site-editor-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/page-content-focus',\n\t\thook: usePageContentFocusCommands,\n\t\tcontext: 'site-editor-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: useManipulateDocumentCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/patterns',\n\t\thook: usePatternCommands,\n\t\tcontext: 'site-editor-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/edit-ui',\n\t\thook: useEditUICommands,\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,OAAO,EAAEC,KAAK,QAAQ,iBAAiB;AACpD,SACCC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,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AAI,EAAEzB;EACP,CAAE,CAAC;AACJ"}
1
+ {"version":3,"names":["useSelect","useDispatch","__","sprintf","isRTL","edit","trash","rotateLeft","rotateRight","layout","page","drawerLeft","drawerRight","blockDefault","code","keyboard","listView","symbol","useCommandLoader","decodeEntities","privateApis","routerPrivateApis","store","preferencesStore","interfaceStore","noticesStore","editorStore","editSiteStore","useEditedEntityRecord","isTemplateRemovable","isTemplateRevertable","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","PREFERENCES_MODAL_NAME","PATTERN_MODALS","unlock","TEMPLATE_POST_TYPE","useLink","useHistory","usePageContentFocusCommands","record","template","isPage","canvasMode","templateId","currentPostType","select","_isPage","getCanvasMode","getCurrentPostType","getCurrentTemplateId","onClick","editTemplate","postType","postId","setRenderingMode","isLoading","commands","push","name","label","title","icon","callback","close","useEditorModeCommands","switchEditorMode","editorMode","getEditorMode","useManipulateDocumentCommands","isLoaded","removeTemplate","revertTemplate","history","isEditingPage","type","path","useEditUICommands","openGeneralSidebar","closeGeneralSidebar","toggleDistractionFree","setIsListViewOpened","activeSidebar","showBlockBreadcrumbs","isListViewOpen","isDistractionFree","isTopToolbar","isFocusMode","get","isListViewOpened","getActiveComplementaryArea","openModal","toggle","createInfoNotice","id","actions","usePatternCommands","pattern","rename","duplicate","useEditModeCommands","hook","context"],"sources":["@wordpress/edit-site/src/hooks/commands/use-edit-mode-commands.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tedit,\n\ttrash,\n\trotateLeft,\n\trotateRight,\n\tlayout,\n\tpage,\n\tdrawerLeft,\n\tdrawerRight,\n\tblockDefault,\n\tcode,\n\tkeyboard,\n\tlistView,\n\tsymbol,\n} from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport useEditedEntityRecord from '../../components/use-edited-entity-record';\nimport isTemplateRemovable from '../../utils/is-template-removable';\nimport isTemplateRevertable from '../../utils/is-template-revertable';\nimport { KEYBOARD_SHORTCUT_HELP_MODAL_NAME } from '../../components/keyboard-shortcut-help-modal';\nimport { PREFERENCES_MODAL_NAME } from '../../components/preferences-modal';\nimport { PATTERN_MODALS } from '../../components/pattern-modal';\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport { useLink } from '../../components/routes/link';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction usePageContentFocusCommands() {\n\tconst { record: template } = useEditedEntityRecord();\n\tconst { isPage, canvasMode, templateId, currentPostType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isPage: _isPage, getCanvasMode } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getCurrentPostType, getCurrentTemplateId } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tisPage: _isPage(),\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t\t\tcurrentPostType: getCurrentPostType(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { onClick: editTemplate } = useLink( {\n\t\tpostType: 'wp_template',\n\t\tpostId: templateId,\n\t} );\n\n\tconst { setRenderingMode } = useDispatch( editorStore );\n\n\tif ( ! isPage || canvasMode !== 'edit' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( currentPostType !== 'wp_template' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-template-focus',\n\t\t\t/* translators: %1$s: template title */\n\t\t\tlabel: sprintf(\n\t\t\t\t'Edit template: %s',\n\t\t\t\tdecodeEntities( template.title )\n\t\t\t),\n\t\t\ticon: layout,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\teditTemplate();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t} else {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-page-focus',\n\t\t\tlabel: __( 'Back to page' ),\n\t\t\ticon: page,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetRenderingMode( 'template-locked' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nfunction useEditorModeCommands() {\n\tconst { switchEditorMode } = useDispatch( editSiteStore );\n\tconst { canvasMode, editorMode } = useSelect(\n\t\t( select ) => ( {\n\t\t\tcanvasMode: unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t\teditorMode: select( editSiteStore ).getEditorMode(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tif ( canvasMode !== 'edit' || editorMode !== 'text' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( editorMode === 'text' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/exit-code-editor',\n\t\t\tlabel: __( 'Exit code editor' ),\n\t\t\ticon: code,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tswitchEditorMode( 'visual' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nfunction useManipulateDocumentCommands() {\n\tconst { isLoaded, record: template } = useEditedEntityRecord();\n\tconst { removeTemplate, revertTemplate } = useDispatch( editSiteStore );\n\tconst history = useHistory();\n\tconst isEditingPage = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editSiteStore ).isPage() &&\n\t\t\tselect( editorStore ).getCurrentPostType() !== 'wp_template',\n\t\t[]\n\t);\n\n\tif ( ! isLoaded ) {\n\t\treturn { isLoading: true, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( isTemplateRevertable( template ) && ! isEditingPage ) {\n\t\tconst label =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? /* translators: %1$s: template title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Reset template: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t )\n\t\t\t\t: /* translators: %1$s: template part title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Reset template part: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t );\n\t\tcommands.push( {\n\t\t\tname: 'core/reset-template',\n\t\t\tlabel,\n\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\trevertTemplate( template );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( isTemplateRemovable( template ) && ! isEditingPage ) {\n\t\tconst label =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? /* translators: %1$s: template title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Delete template: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t )\n\t\t\t\t: /* translators: %1$s: template part title */\n\t\t\t\t sprintf(\n\t\t\t\t\t\t'Delete template part: %s',\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t );\n\t\tconst path =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? '/wp_template'\n\t\t\t\t: '/wp_template_part/all';\n\t\tcommands.push( {\n\t\t\tname: 'core/remove-template',\n\t\t\tlabel,\n\t\t\ticon: trash,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tremoveTemplate( template );\n\t\t\t\t// Navigate to the template list\n\t\t\t\thistory.push( {\n\t\t\t\t\tpath,\n\t\t\t\t} );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn {\n\t\tisLoading: ! isLoaded,\n\t\tcommands,\n\t};\n}\n\nfunction useEditUICommands() {\n\tconst {\n\t\topenGeneralSidebar,\n\t\tcloseGeneralSidebar,\n\t\ttoggleDistractionFree,\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t} = useDispatch( editSiteStore );\n\tconst {\n\t\tcanvasMode,\n\t\teditorMode,\n\t\tactiveSidebar,\n\t\tshowBlockBreadcrumbs,\n\t\tisListViewOpen,\n\t\tisDistractionFree,\n\t\tisTopToolbar,\n\t\tisFocusMode,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorMode } = select( editSiteStore );\n\t\tconst { isListViewOpened } = select( editorStore );\n\t\treturn {\n\t\t\tcanvasMode: unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t\teditorMode: getEditorMode(),\n\t\t\tactiveSidebar: select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisFocusMode: get( 'core', 'focusMode' ),\n\t\t\tisTopToolbar: get( 'core', 'fixedToolbar' ),\n\t\t};\n\t}, [] );\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\n\tif ( canvasMode !== 'edit' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tcommands.push( {\n\t\tname: 'core/open-settings-sidebar',\n\t\tlabel: __( 'Toggle settings sidebar' ),\n\t\ticon: isRTL() ? drawerLeft : drawerRight,\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\tif ( activeSidebar === 'edit-site/template' ) {\n\t\t\t\tcloseGeneralSidebar();\n\t\t\t} else {\n\t\t\t\topenGeneralSidebar( 'edit-site/template' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/open-block-inspector',\n\t\tlabel: __( 'Toggle block inspector' ),\n\t\ticon: blockDefault,\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\tif ( activeSidebar === 'edit-site/block-inspector' ) {\n\t\t\t\tcloseGeneralSidebar();\n\t\t\t} else {\n\t\t\t\topenGeneralSidebar( 'edit-site/block-inspector' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-spotlight-mode',\n\t\tlabel: __( 'Toggle spotlight' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core', 'focusMode' );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisFocusMode ? __( 'Spotlight off.' ) : __( 'Spotlight on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-spotlight-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\ttoggle( 'core', 'focusMode' );\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}\n\t\t\t);\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-distraction-free',\n\t\tlabel: isDistractionFree\n\t\t\t? __( 'Exit Distraction Free' )\n\t\t\t: __( 'Enter Distraction Free ' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggleDistractionFree();\n\t\t\tclose();\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-top-toolbar',\n\t\tlabel: __( 'Toggle top toolbar' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core', 'fixedToolbar' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\ttoggleDistractionFree();\n\t\t\t}\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar off.' )\n\t\t\t\t\t: __( 'Top toolbar on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-top-toolbar/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\ttoggle( 'core', 'fixedToolbar' );\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}\n\t\t\t);\n\t\t},\n\t} );\n\n\tif ( editorMode === 'visual' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-code-editor',\n\t\t\tlabel: __( 'Open code editor' ),\n\t\t\ticon: code,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tswitchEditorMode( 'text' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\tcommands.push( {\n\t\tname: 'core/open-preferences',\n\t\tlabel: __( 'Editor preferences' ),\n\t\tcallback: () => {\n\t\t\topenModal( PREFERENCES_MODAL_NAME );\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/open-shortcut-help',\n\t\tlabel: __( 'Keyboard shortcuts' ),\n\t\ticon: keyboard,\n\t\tcallback: () => {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-breadcrumbs',\n\t\tlabel: showBlockBreadcrumbs\n\t\t\t? __( 'Hide block breadcrumbs' )\n\t\t\t: __( 'Show block breadcrumbs' ),\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core', 'showBlockBreadcrumbs' );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tshowBlockBreadcrumbs\n\t\t\t\t\t? __( 'Breadcrumbs hidden.' )\n\t\t\t\t\t: __( 'Breadcrumbs visible.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-breadcrumbs/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-list-view',\n\t\tlabel: isListViewOpen\n\t\t\t? __( 'Close List View' )\n\t\t\t: __( 'Open List View' ),\n\t\ticon: listView,\n\t\tcallback: ( { close } ) => {\n\t\t\tsetIsListViewOpened( ! isListViewOpen );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisListViewOpen ? __( 'List View off.' ) : __( 'List View on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-site/toggle-list-view/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t} );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction usePatternCommands() {\n\tconst { isLoaded, record: pattern } = useEditedEntityRecord();\n\tconst { openModal } = useDispatch( interfaceStore );\n\n\tif ( ! isLoaded ) {\n\t\treturn { isLoading: true, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( pattern?.type === 'wp_block' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/rename-pattern',\n\t\t\tlabel: __( 'Rename pattern' ),\n\t\t\ticon: edit,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\topenModal( PATTERN_MODALS.rename );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t\tcommands.push( {\n\t\t\tname: 'core/duplicate-pattern',\n\t\t\tlabel: __( 'Duplicate pattern' ),\n\t\t\ticon: symbol,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\topenModal( PATTERN_MODALS.duplicate );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nexport function useEditModeCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/exit-code-editor',\n\t\thook: useEditorModeCommands,\n\t\tcontext: 'site-editor-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/page-content-focus',\n\t\thook: usePageContentFocusCommands,\n\t\tcontext: 'site-editor-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: useManipulateDocumentCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/patterns',\n\t\thook: usePatternCommands,\n\t\tcontext: 'site-editor-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/edit-ui',\n\t\thook: useEditUICommands,\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,OAAO,EAAEC,KAAK,QAAQ,iBAAiB;AACpD,SACCC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZC,IAAI,EACJC,QAAQ,EACRC,QAAQ,EACRC,MAAM,QACA,kBAAkB;AACzB,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASD,KAAK,IAAIE,cAAc,QAAQ,sBAAsB;AAC9D,SAASF,KAAK,IAAIG,YAAY,QAAQ,oBAAoB;AAC1D,SAASH,KAAK,IAAII,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASJ,KAAK,IAAIK,aAAa,QAAQ,aAAa;AACpD,OAAOC,qBAAqB,MAAM,2CAA2C;AAC7E,OAAOC,mBAAmB,MAAM,mCAAmC;AACnE,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE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Q,CAACC,IAAI,CAAE;MACdC,IAAI,EAAE,wBAAwB;MAC9BC,KAAK,EAAEzD,EAAE,CAAE,mBAAoB,CAAC;MAChC2D,IAAI,EAAE5C,MAAM;MACZ6C,QAAQ,EAAEA,CAAE;QAAEC;MAAM,CAAC,KAAM;QAC1B2B,SAAS,CAAEzD,cAAc,CAACiE,SAAU,CAAC;QACrCnC,KAAK,CAAC,CAAC;MACR;IACD,CAAE,CAAC;EACJ;EAEA,OAAO;IAAER,SAAS,EAAE,KAAK;IAAEC;EAAS,CAAC;AACtC;AAEA,OAAO,SAAS2C,mBAAmBA,CAAA,EAAG;EACrCjF,gBAAgB,CAAE;IACjBwC,IAAI,EAAE,uBAAuB;IAC7B0C,IAAI,EAAEpC,qBAAqB;IAC3BqC,OAAO,EAAE;EACV,CAAE,CAAC;EAEHnF,gBAAgB,CAAE;IACjBwC,IAAI,EAAE,mCAAmC;IACzC0C,IAAI,EAAE9D,2BAA2B;IACjC+D,OAAO,EAAE;EACV,CAAE,CAAC;EAEHnF,gBAAgB,CAAE;IACjBwC,IAAI,EAAE,oCAAoC;IAC1C0C,IAAI,EAAEhC;EACP,CAAE,CAAC;EAEHlD,gBAAgB,CAAE;IACjBwC,IAAI,EAAE,yBAAyB;IAC/B0C,IAAI,EAAEL,kBAAkB;IACxBM,OAAO,EAAE;EACV,CAAE,CAAC;EAEHnF,gBAAgB,CAAE;IACjBwC,IAAI,EAAE,wBAAwB;IAC9B0C,IAAI,EAAExB;EACP,CAAE,CAAC;AACJ"}
@@ -660,6 +660,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
660
660
  display: flex;
661
661
  align-items: center;
662
662
  }
663
+ .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper > * {
664
+ flex-grow: 1;
665
+ }
663
666
  .dataviews-view-table .dataviews-view-table-header-button {
664
667
  padding: 4px 8px;
665
668
  font-size: 11px;
@@ -726,6 +729,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
726
729
  .dataviews-view-grid {
727
730
  margin-bottom: 24px;
728
731
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
732
+ grid-template-rows: max-content;
729
733
  padding: 0 32px;
730
734
  }
731
735
  @media (min-width: 1080px) {
@@ -4106,11 +4110,8 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4106
4110
  font-size: 11px;
4107
4111
  }
4108
4112
 
4109
- .font-library-modal__tabpanel-layout main {
4110
- padding-bottom: 4rem;
4111
- }
4112
- .font-library-modal__tabpanel-layout footer {
4113
- border-top: 1px solid #e5e5e5;
4113
+ .font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer {
4114
+ border-top: 1px solid #ddd;
4114
4115
  margin: 0 -32px -32px;
4115
4116
  padding: 16px 32px;
4116
4117
  position: absolute;
@@ -4125,10 +4126,10 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4125
4126
  }
4126
4127
 
4127
4128
  .font-library-modal__font-card {
4128
- border: 1px solid #e5e5e5;
4129
+ border: 1px solid #e0e0e0;
4129
4130
  width: 100%;
4130
4131
  height: auto;
4131
- padding: 1rem;
4132
+ padding: 16px;
4132
4133
  margin-top: -1px;
4133
4134
  /* To collapse the margin with the previous element */
4134
4135
  }
@@ -4136,26 +4137,25 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4136
4137
  font-weight: bold;
4137
4138
  }
4138
4139
  .font-library-modal__font-card .font-library-modal__font-card__count {
4139
- color: #6e6e6e;
4140
+ color: #757575;
4140
4141
  }
4141
4142
 
4142
4143
  .font-library-modal__library-font-variant {
4143
- border: 1px solid #e5e5e5;
4144
- padding: 1rem;
4144
+ border: 1px solid #e0e0e0;
4145
+ padding: 16px;
4145
4146
  margin-top: -1px;
4146
4147
  /* To collapse the margin with the previous element */
4147
4148
  }
4148
4149
 
4149
4150
  .font-library-modal__font-variant {
4150
- border-bottom: 1px solid #e5e5e5;
4151
- padding-bottom: 1rem;
4151
+ border-bottom: 1px solid #e0e0e0;
4152
+ padding-bottom: 16px;
4152
4153
  }
4153
4154
 
4154
4155
  .font-library-modal__tabs [role=tablist] {
4155
4156
  position: sticky;
4156
4157
  top: 0;
4157
- width: calc(100% + 64px);
4158
- border-bottom: 1px solid #e6e6e6;
4158
+ border-bottom: 1px solid #ddd;
4159
4159
  background: #fff;
4160
4160
  margin: 0 -32px;
4161
4161
  padding: 0 16px;
@@ -4166,7 +4166,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4166
4166
  align-items: center;
4167
4167
  display: flex;
4168
4168
  justify-content: center;
4169
- height: 250px;
4169
+ height: 256px;
4170
4170
  width: 100%;
4171
4171
  }
4172
4172
 
@@ -4179,18 +4179,7 @@ button.font-library-modal__upload-area {
4179
4179
  width: 80%;
4180
4180
  }
4181
4181
  .font-library-modal__local-fonts .font-library-modal__upload-area__text {
4182
- color: #6e6e6e;
4183
- }
4184
- .font-library-modal__local-fonts .font-library-modal__upload-area__notice {
4185
- margin: 0;
4186
- }
4187
-
4188
- .font-library-modal__font-name {
4189
- font-weight: bold;
4190
- }
4191
-
4192
- .font-library-modal__font-filename {
4193
- color: #6e6e6e;
4182
+ color: #757575;
4194
4183
  }
4195
4184
 
4196
4185
  .font-library-modal__font-variant_demo-wrapper {
@@ -4223,10 +4212,6 @@ button.font-library-modal__upload-area {
4223
4212
  max-width: 350px;
4224
4213
  }
4225
4214
 
4226
- .font-library-modal__font-collection__notice {
4227
- margin: 0;
4228
- }
4229
-
4230
4215
  .edit-site-pagination .components-button.is-tertiary {
4231
4216
  width: 32px;
4232
4217
  height: 32px;
@@ -660,6 +660,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
660
660
  display: flex;
661
661
  align-items: center;
662
662
  }
663
+ .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper > * {
664
+ flex-grow: 1;
665
+ }
663
666
  .dataviews-view-table .dataviews-view-table-header-button {
664
667
  padding: 4px 8px;
665
668
  font-size: 11px;
@@ -726,6 +729,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
726
729
  .dataviews-view-grid {
727
730
  margin-bottom: 24px;
728
731
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
732
+ grid-template-rows: max-content;
729
733
  padding: 0 32px;
730
734
  }
731
735
  @media (min-width: 1080px) {
@@ -4107,11 +4111,8 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4107
4111
  font-size: 11px;
4108
4112
  }
4109
4113
 
4110
- .font-library-modal__tabpanel-layout main {
4111
- padding-bottom: 4rem;
4112
- }
4113
- .font-library-modal__tabpanel-layout footer {
4114
- border-top: 1px solid #e5e5e5;
4114
+ .font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer {
4115
+ border-top: 1px solid #ddd;
4115
4116
  margin: 0 -32px -32px;
4116
4117
  padding: 16px 32px;
4117
4118
  position: absolute;
@@ -4126,10 +4127,10 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4126
4127
  }
4127
4128
 
4128
4129
  .font-library-modal__font-card {
4129
- border: 1px solid #e5e5e5;
4130
+ border: 1px solid #e0e0e0;
4130
4131
  width: 100%;
4131
4132
  height: auto;
4132
- padding: 1rem;
4133
+ padding: 16px;
4133
4134
  margin-top: -1px;
4134
4135
  /* To collapse the margin with the previous element */
4135
4136
  }
@@ -4137,26 +4138,25 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4137
4138
  font-weight: bold;
4138
4139
  }
4139
4140
  .font-library-modal__font-card .font-library-modal__font-card__count {
4140
- color: #6e6e6e;
4141
+ color: #757575;
4141
4142
  }
4142
4143
 
4143
4144
  .font-library-modal__library-font-variant {
4144
- border: 1px solid #e5e5e5;
4145
- padding: 1rem;
4145
+ border: 1px solid #e0e0e0;
4146
+ padding: 16px;
4146
4147
  margin-top: -1px;
4147
4148
  /* To collapse the margin with the previous element */
4148
4149
  }
4149
4150
 
4150
4151
  .font-library-modal__font-variant {
4151
- border-bottom: 1px solid #e5e5e5;
4152
- padding-bottom: 1rem;
4152
+ border-bottom: 1px solid #e0e0e0;
4153
+ padding-bottom: 16px;
4153
4154
  }
4154
4155
 
4155
4156
  .font-library-modal__tabs [role=tablist] {
4156
4157
  position: sticky;
4157
4158
  top: 0;
4158
- width: calc(100% + 64px);
4159
- border-bottom: 1px solid #e6e6e6;
4159
+ border-bottom: 1px solid #ddd;
4160
4160
  background: #fff;
4161
4161
  margin: 0 -32px;
4162
4162
  padding: 0 16px;
@@ -4167,7 +4167,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
4167
4167
  align-items: center;
4168
4168
  display: flex;
4169
4169
  justify-content: center;
4170
- height: 250px;
4170
+ height: 256px;
4171
4171
  width: 100%;
4172
4172
  }
4173
4173
 
@@ -4180,18 +4180,7 @@ button.font-library-modal__upload-area {
4180
4180
  width: 80%;
4181
4181
  }
4182
4182
  .font-library-modal__local-fonts .font-library-modal__upload-area__text {
4183
- color: #6e6e6e;
4184
- }
4185
- .font-library-modal__local-fonts .font-library-modal__upload-area__notice {
4186
- margin: 0;
4187
- }
4188
-
4189
- .font-library-modal__font-name {
4190
- font-weight: bold;
4191
- }
4192
-
4193
- .font-library-modal__font-filename {
4194
- color: #6e6e6e;
4183
+ color: #757575;
4195
4184
  }
4196
4185
 
4197
4186
  .font-library-modal__font-variant_demo-wrapper {
@@ -4224,10 +4213,6 @@ button.font-library-modal__upload-area {
4224
4213
  max-width: 350px;
4225
4214
  }
4226
4215
 
4227
- .font-library-modal__font-collection__notice {
4228
- margin: 0;
4229
- }
4230
-
4231
4216
  .edit-site-pagination .components-button.is-tertiary {
4232
4217
  width: 32px;
4233
4218
  height: 32px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.27.0",
3
+ "version": "5.27.2",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,20 +30,20 @@
30
30
  "@wordpress/a11y": "^3.50.0",
31
31
  "@wordpress/api-fetch": "^6.47.0",
32
32
  "@wordpress/blob": "^3.50.0",
33
- "@wordpress/block-editor": "^12.18.0",
34
- "@wordpress/block-library": "^8.27.0",
35
- "@wordpress/blocks": "^12.27.0",
33
+ "@wordpress/block-editor": "^12.18.2",
34
+ "@wordpress/block-library": "^8.27.2",
35
+ "@wordpress/blocks": "^12.27.1",
36
36
  "@wordpress/commands": "^0.21.0",
37
37
  "@wordpress/components": "^25.16.0",
38
38
  "@wordpress/compose": "^6.27.0",
39
- "@wordpress/core-commands": "^0.19.0",
40
- "@wordpress/core-data": "^6.27.0",
39
+ "@wordpress/core-commands": "^0.19.2",
40
+ "@wordpress/core-data": "^6.27.2",
41
41
  "@wordpress/data": "^9.20.0",
42
- "@wordpress/dataviews": "^0.4.0",
42
+ "@wordpress/dataviews": "^0.4.1",
43
43
  "@wordpress/date": "^4.50.0",
44
44
  "@wordpress/deprecated": "^3.50.0",
45
45
  "@wordpress/dom": "^3.50.0",
46
- "@wordpress/editor": "^13.27.0",
46
+ "@wordpress/editor": "^13.27.2",
47
47
  "@wordpress/element": "^5.27.0",
48
48
  "@wordpress/escape-html": "^2.50.0",
49
49
  "@wordpress/hooks": "^3.50.0",
@@ -55,17 +55,17 @@
55
55
  "@wordpress/keycodes": "^3.50.0",
56
56
  "@wordpress/media-utils": "^4.41.0",
57
57
  "@wordpress/notices": "^4.18.0",
58
- "@wordpress/patterns": "^1.11.0",
58
+ "@wordpress/patterns": "^1.11.2",
59
59
  "@wordpress/plugins": "^6.18.0",
60
60
  "@wordpress/preferences": "^3.27.0",
61
61
  "@wordpress/primitives": "^3.48.0",
62
62
  "@wordpress/private-apis": "^0.32.0",
63
- "@wordpress/reusable-blocks": "^4.27.0",
63
+ "@wordpress/reusable-blocks": "^4.27.2",
64
64
  "@wordpress/router": "^0.19.0",
65
- "@wordpress/style-engine": "^1.33.0",
65
+ "@wordpress/style-engine": "^1.33.1",
66
66
  "@wordpress/url": "^3.51.0",
67
67
  "@wordpress/viewport": "^5.27.0",
68
- "@wordpress/widgets": "^3.27.0",
68
+ "@wordpress/widgets": "^3.27.2",
69
69
  "@wordpress/wordcount": "^3.50.0",
70
70
  "change-case": "^4.1.2",
71
71
  "classnames": "^2.3.1",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "45de2cb4212fed7f2763e95f10300d1ff9d0ec08"
88
+ "gitHead": "fefb6f718fbfd5df9390f366d5733369f613084a"
89
89
  }
@@ -24,11 +24,14 @@ function BackButton() {
24
24
  const isTemplatePart = location.params.postType === TEMPLATE_PART_POST_TYPE;
25
25
  const isNavigationMenu = location.params.postType === NAVIGATION_POST_TYPE;
26
26
  const isPattern = location.params.postType === PATTERN_TYPES.user;
27
- const previousTemplateId = location.state?.fromTemplateId;
28
27
 
29
- const isFocusMode = isTemplatePart || isNavigationMenu || isPattern;
28
+ const isFocusMode =
29
+ location.params.focusMode ||
30
+ isTemplatePart ||
31
+ isNavigationMenu ||
32
+ isPattern;
30
33
 
31
- if ( ! isFocusMode || ( ! previousTemplateId && ! isPattern ) ) {
34
+ if ( ! isFocusMode ) {
32
35
  return null;
33
36
  }
34
37
 
@@ -22,22 +22,29 @@ import {
22
22
  NAVIGATION_POST_TYPE,
23
23
  } from '../../utils/constants';
24
24
  import { unlock } from '../../lock-unlock';
25
+ import { privateApis as routerPrivateApis } from '@wordpress/router';
25
26
 
26
- export default function SiteEditorCanvas() {
27
- const { templateType, isFocusMode, isViewMode } = useSelect( ( select ) => {
28
- const { getEditedPostType, getCanvasMode } = unlock(
29
- select( editSiteStore )
30
- );
27
+ const { useLocation } = unlock( routerPrivateApis );
31
28
 
32
- const _templateType = getEditedPostType();
29
+ export default function SiteEditorCanvas() {
30
+ const location = useLocation();
31
+ const { templateType, isFocusableEntity, isViewMode } = useSelect(
32
+ ( select ) => {
33
+ const { getEditedPostType, getCanvasMode } = unlock(
34
+ select( editSiteStore )
35
+ );
33
36
 
34
- return {
35
- templateType: _templateType,
36
- isFocusMode: FOCUSABLE_ENTITIES.includes( _templateType ),
37
- isViewMode: getCanvasMode() === 'view',
38
- };
39
- }, [] );
37
+ const _templateType = getEditedPostType();
40
38
 
39
+ return {
40
+ templateType: _templateType,
41
+ isFocusableEntity: FOCUSABLE_ENTITIES.includes( _templateType ),
42
+ isViewMode: getCanvasMode() === 'view',
43
+ };
44
+ },
45
+ []
46
+ );
47
+ const isFocusMode = location.params.focusMode || isFocusableEntity;
41
48
  const [ resizeObserver, sizes ] = useResizeObserver();
42
49
 
43
50
  const settings = useSiteEditorSettings();
@@ -15,6 +15,10 @@ export function usePostLinkProps() {
15
15
  const history = useHistory();
16
16
 
17
17
  return ( params, state ) => {
18
- return getPostLinkProps( history, params, state );
18
+ return getPostLinkProps(
19
+ history,
20
+ { ...params, focusMode: true, canvas: 'edit' },
21
+ state
22
+ );
19
23
  };
20
24
  }
@@ -102,13 +102,13 @@ export default function Editor( { isLoading } ) {
102
102
  contextPost,
103
103
  editorMode,
104
104
  canvasMode,
105
- renderingMode,
106
105
  blockEditorMode,
107
106
  isRightSidebarOpen,
108
107
  isInserterOpen,
109
108
  isListViewOpen,
110
109
  showIconLabels,
111
110
  showBlockBreadcrumbs,
111
+ postTypeLabel,
112
112
  } = useSelect( ( select ) => {
113
113
  const { get } = select( preferencesStore );
114
114
  const { getEditedPostContext, getEditorMode, getCanvasMode } = unlock(
@@ -117,7 +117,7 @@ export default function Editor( { isLoading } ) {
117
117
  const { __unstableGetEditorMode } = select( blockEditorStore );
118
118
  const { getActiveComplementaryArea } = select( interfaceStore );
119
119
  const { getEntityRecord } = select( coreDataStore );
120
- const { getRenderingMode, isInserterOpened, isListViewOpened } =
120
+ const { isInserterOpened, isListViewOpened, getPostTypeLabel } =
121
121
  select( editorStore );
122
122
  const _context = getEditedPostContext();
123
123
 
@@ -134,7 +134,6 @@ export default function Editor( { isLoading } ) {
134
134
  : undefined,
135
135
  editorMode: getEditorMode(),
136
136
  canvasMode: getCanvasMode(),
137
- renderingMode: getRenderingMode(),
138
137
  blockEditorMode: __unstableGetEditorMode(),
139
138
  isInserterOpen: isInserterOpened(),
140
139
  isListViewOpen: isListViewOpened(),
@@ -143,6 +142,7 @@ export default function Editor( { isLoading } ) {
143
142
  ),
144
143
  showBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),
145
144
  showIconLabels: get( 'core', 'showIconLabels' ),
145
+ postTypeLabel: getPostTypeLabel(),
146
146
  };
147
147
  }, [] );
148
148
 
@@ -267,12 +267,7 @@ export default function Editor( { isLoading } ) {
267
267
  footer={
268
268
  shouldShowBlockBreadcrumbs && (
269
269
  <BlockBreadcrumb
270
- rootLabelText={
271
- postWithTemplate &&
272
- renderingMode !== 'template-only'
273
- ? __( 'Page' )
274
- : __( 'Template' )
275
- }
270
+ rootLabelText={ postTypeLabel }
276
271
  />
277
272
  )
278
273
  }
@@ -55,11 +55,21 @@ function FontLibraryProvider( { children } ) {
55
55
 
56
56
  const [ isInstalling, setIsInstalling ] = useState( false );
57
57
  const [ refreshKey, setRefreshKey ] = useState( 0 );
58
+ const [ notice, setNotice ] = useState( null );
58
59
 
59
60
  const refreshLibrary = () => {
60
61
  setRefreshKey( Date.now() );
61
62
  };
62
63
 
64
+ // Reset notice on dismiss.
65
+ useEffect( () => {
66
+ if ( notice ) {
67
+ notice.onRemove = () => {
68
+ setNotice( null );
69
+ };
70
+ }
71
+ }, [ notice, setNotice ] );
72
+
63
73
  const {
64
74
  records: libraryPosts = [],
65
75
  isResolving: isResolvingLibrary,
@@ -134,6 +144,8 @@ function FontLibraryProvider( { children } ) {
134
144
  }, [ modalTabOpen ] );
135
145
 
136
146
  const handleSetLibraryFontSelected = ( font ) => {
147
+ setNotice( null );
148
+
137
149
  // If font is null, reset the selected font
138
150
  if ( ! font ) {
139
151
  setLibraryFontSelected( null );
@@ -471,6 +483,8 @@ function FontLibraryProvider( { children } ) {
471
483
  modalTabOpen,
472
484
  toggleModal,
473
485
  refreshLibrary,
486
+ notice,
487
+ setNotice,
474
488
  saveFontFamilies,
475
489
  fontFamiliesHasChanges,
476
490
  isResolvingLibrary,