@wordpress/edit-site 6.12.0 → 6.12.1-next.082ed6819.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/build/components/add-new-template/utils.js +1 -2
  2. package/build/components/add-new-template/utils.js.map +1 -1
  3. package/build/components/app/index.js +0 -3
  4. package/build/components/app/index.js.map +1 -1
  5. package/build/components/block-editor/use-site-editor-settings.js +4 -12
  6. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  7. package/build/components/editor/index.js +18 -27
  8. package/build/components/editor/index.js.map +1 -1
  9. package/build/components/editor/use-editor-title.js +13 -5
  10. package/build/components/editor/use-editor-title.js.map +1 -1
  11. package/build/components/editor/use-resolve-edited-entity.js +133 -0
  12. package/build/components/editor/use-resolve-edited-entity.js.map +1 -0
  13. package/build/components/editor-canvas-container/index.js +1 -1
  14. package/build/components/editor-canvas-container/index.js.map +1 -1
  15. package/build/components/global-styles/block-preview-panel.js +8 -10
  16. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  17. package/build/components/global-styles/screen-block.js +18 -5
  18. package/build/components/global-styles/screen-block.js.map +1 -1
  19. package/build/components/global-styles/screen-style-variations.js +11 -5
  20. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  21. package/build/components/global-styles/ui.js.map +1 -1
  22. package/build/components/global-styles-sidebar/index.js +17 -1
  23. package/build/components/global-styles-sidebar/index.js.map +1 -1
  24. package/build/components/page-patterns/header.js +2 -2
  25. package/build/components/page-patterns/header.js.map +1 -1
  26. package/build/components/page-patterns/use-patterns.js +4 -8
  27. package/build/components/page-patterns/use-patterns.js.map +1 -1
  28. package/build/components/post-edit/index.js +10 -12
  29. package/build/components/post-edit/index.js.map +1 -1
  30. package/build/components/post-list/index.js +3 -3
  31. package/build/components/post-list/index.js.map +1 -1
  32. package/build/components/posts-app/index.js +3 -4
  33. package/build/components/posts-app/index.js.map +1 -1
  34. package/build/components/posts-app-routes/home.js +48 -0
  35. package/build/components/posts-app-routes/home.js.map +1 -0
  36. package/build/components/posts-app-routes/index.js +37 -0
  37. package/build/components/posts-app-routes/index.js.map +1 -0
  38. package/build/components/posts-app-routes/posts-edit.js +44 -0
  39. package/build/components/posts-app-routes/posts-edit.js.map +1 -0
  40. package/build/components/posts-app-routes/posts-list-view-quick-edit.js +63 -0
  41. package/build/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
  42. package/build/components/posts-app-routes/posts-list-view.js +48 -0
  43. package/build/components/posts-app-routes/posts-list-view.js.map +1 -0
  44. package/build/components/posts-app-routes/posts-view-quick-edit.js +60 -0
  45. package/build/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
  46. package/build/components/posts-app-routes/posts-view.js +41 -0
  47. package/build/components/posts-app-routes/posts-view.js.map +1 -0
  48. package/build/components/sidebar-navigation-screen-details-footer/index.js +17 -23
  49. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  50. package/build/components/sidebar-navigation-screen-global-styles/index.js +4 -18
  51. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  52. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
  53. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  54. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +2 -3
  55. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  56. package/build/components/site-editor-routes/index.js +1 -2
  57. package/build/components/site-editor-routes/index.js.map +1 -1
  58. package/build/components/style-book/examples.js +24 -2
  59. package/build/components/style-book/examples.js.map +1 -1
  60. package/build/index.js +0 -9
  61. package/build/index.js.map +1 -1
  62. package/build/store/actions.js +13 -0
  63. package/build/store/actions.js.map +1 -1
  64. package/build/store/selectors.js +21 -1
  65. package/build/store/selectors.js.map +1 -1
  66. package/build-module/components/add-new-template/utils.js +1 -2
  67. package/build-module/components/add-new-template/utils.js.map +1 -1
  68. package/build-module/components/app/index.js +0 -3
  69. package/build-module/components/app/index.js.map +1 -1
  70. package/build-module/components/block-editor/use-site-editor-settings.js +4 -12
  71. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  72. package/build-module/components/editor/index.js +18 -27
  73. package/build-module/components/editor/index.js.map +1 -1
  74. package/build-module/components/editor/use-editor-title.js +13 -5
  75. package/build-module/components/editor/use-editor-title.js.map +1 -1
  76. package/build-module/components/editor/use-resolve-edited-entity.js +125 -0
  77. package/build-module/components/editor/use-resolve-edited-entity.js.map +1 -0
  78. package/build-module/components/editor-canvas-container/index.js +1 -1
  79. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  80. package/build-module/components/global-styles/block-preview-panel.js +8 -10
  81. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  82. package/build-module/components/global-styles/screen-block.js +18 -5
  83. package/build-module/components/global-styles/screen-block.js.map +1 -1
  84. package/build-module/components/global-styles/screen-style-variations.js +11 -5
  85. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  86. package/build-module/components/global-styles/ui.js +1 -1
  87. package/build-module/components/global-styles/ui.js.map +1 -1
  88. package/build-module/components/global-styles-sidebar/index.js +18 -2
  89. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  90. package/build-module/components/page-patterns/header.js +2 -2
  91. package/build-module/components/page-patterns/header.js.map +1 -1
  92. package/build-module/components/page-patterns/use-patterns.js +4 -8
  93. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  94. package/build-module/components/post-edit/index.js +9 -11
  95. package/build-module/components/post-edit/index.js.map +1 -1
  96. package/build-module/components/post-list/index.js +2 -2
  97. package/build-module/components/post-list/index.js.map +1 -1
  98. package/build-module/components/posts-app/index.js +3 -4
  99. package/build-module/components/posts-app/index.js.map +1 -1
  100. package/build-module/components/posts-app-routes/home.js +40 -0
  101. package/build-module/components/posts-app-routes/home.js.map +1 -0
  102. package/build-module/components/posts-app-routes/index.js +30 -0
  103. package/build-module/components/posts-app-routes/index.js.map +1 -0
  104. package/build-module/components/posts-app-routes/posts-edit.js +36 -0
  105. package/build-module/components/posts-app-routes/posts-edit.js.map +1 -0
  106. package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js +55 -0
  107. package/build-module/components/posts-app-routes/posts-list-view-quick-edit.js.map +1 -0
  108. package/build-module/components/posts-app-routes/posts-list-view.js +40 -0
  109. package/build-module/components/posts-app-routes/posts-list-view.js.map +1 -0
  110. package/build-module/components/posts-app-routes/posts-view-quick-edit.js +52 -0
  111. package/build-module/components/posts-app-routes/posts-view-quick-edit.js.map +1 -0
  112. package/build-module/components/posts-app-routes/posts-view.js +33 -0
  113. package/build-module/components/posts-app-routes/posts-view.js.map +1 -0
  114. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +20 -26
  115. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  116. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +4 -18
  117. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  118. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
  119. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  120. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +3 -4
  121. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  122. package/build-module/components/site-editor-routes/index.js +1 -2
  123. package/build-module/components/site-editor-routes/index.js.map +1 -1
  124. package/build-module/components/style-book/examples.js +24 -2
  125. package/build-module/components/style-book/examples.js.map +1 -1
  126. package/build-module/index.js +1 -10
  127. package/build-module/index.js.map +1 -1
  128. package/build-module/store/actions.js +13 -0
  129. package/build-module/store/actions.js.map +1 -1
  130. package/build-module/store/selectors.js +21 -1
  131. package/build-module/store/selectors.js.map +1 -1
  132. package/build-style/posts-rtl.css +59 -18
  133. package/build-style/posts.css +59 -18
  134. package/build-style/style-rtl.css +74 -57
  135. package/build-style/style.css +74 -57
  136. package/package.json +38 -38
  137. package/src/components/add-new-template/utils.js +2 -2
  138. package/src/components/app/index.js +0 -3
  139. package/src/components/block-editor/use-site-editor-settings.js +7 -21
  140. package/src/components/editor/index.js +22 -33
  141. package/src/components/editor/use-editor-title.js +17 -4
  142. package/src/components/editor/use-resolve-edited-entity.js +132 -0
  143. package/src/components/editor-canvas-container/index.js +1 -1
  144. package/src/components/global-styles/block-preview-panel.js +10 -10
  145. package/src/components/global-styles/screen-block.js +26 -8
  146. package/src/components/global-styles/screen-style-variations.js +14 -5
  147. package/src/components/global-styles/ui.js +1 -1
  148. package/src/components/global-styles-sidebar/index.js +16 -2
  149. package/src/components/page-patterns/header.js +3 -2
  150. package/src/components/page-patterns/use-patterns.js +9 -7
  151. package/src/components/page-templates/style.scss +1 -0
  152. package/src/components/post-edit/index.js +10 -13
  153. package/src/components/post-list/index.js +1 -2
  154. package/src/components/posts-app/index.js +3 -4
  155. package/src/components/posts-app-routes/home.js +36 -0
  156. package/src/components/posts-app-routes/index.js +36 -0
  157. package/src/components/posts-app-routes/posts-edit.js +31 -0
  158. package/src/components/posts-app-routes/posts-list-view-quick-edit.js +52 -0
  159. package/src/components/posts-app-routes/posts-list-view.js +40 -0
  160. package/src/components/posts-app-routes/posts-view-quick-edit.js +49 -0
  161. package/src/components/posts-app-routes/posts-view.js +35 -0
  162. package/src/components/sidebar-navigation-screen/style.scss +7 -2
  163. package/src/components/sidebar-navigation-screen-details-footer/index.js +27 -38
  164. package/src/components/sidebar-navigation-screen-details-footer/style.scss +0 -4
  165. package/src/components/sidebar-navigation-screen-global-styles/index.js +8 -17
  166. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +8 -0
  167. package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -1
  168. package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +4 -4
  169. package/src/components/site-editor-routes/README.md +2 -2
  170. package/src/components/site-editor-routes/index.js +0 -2
  171. package/src/components/site-hub/style.scss +1 -1
  172. package/src/components/style-book/examples.tsx +24 -2
  173. package/src/index.js +1 -13
  174. package/src/store/actions.js +15 -0
  175. package/src/store/selectors.js +24 -1
  176. package/src/style.scss +0 -2
  177. package/build/components/post-fields/index.js +0 -96
  178. package/build/components/post-fields/index.js.map +0 -1
  179. package/build/components/posts-app/router.js +0 -85
  180. package/build/components/posts-app/router.js.map +0 -1
  181. package/build/components/sidebar-navigation-screen-details-panel/index.js +0 -54
  182. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
  183. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -21
  184. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
  185. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -33
  186. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
  187. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -21
  188. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
  189. package/build/components/site-editor-routes/styles-edit.js +0 -33
  190. package/build/components/site-editor-routes/styles-edit.js.map +0 -1
  191. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -219
  192. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
  193. package/build-module/components/post-fields/index.js +0 -88
  194. package/build-module/components/post-fields/index.js.map +0 -1
  195. package/build-module/components/posts-app/router.js +0 -77
  196. package/build-module/components/posts-app/router.js.map +0 -1
  197. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +0 -29
  198. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +0 -1
  199. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
  200. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +0 -1
  201. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -25
  202. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +0 -1
  203. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
  204. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +0 -1
  205. package/build-module/components/site-editor-routes/styles-edit.js +0 -25
  206. package/build-module/components/site-editor-routes/styles-edit.js.map +0 -1
  207. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -212
  208. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +0 -1
  209. package/src/components/post-fields/index.js +0 -107
  210. package/src/components/post-fields/style.scss +0 -3
  211. package/src/components/posts-app/router.js +0 -69
  212. package/src/components/sidebar-navigation-screen-details-panel/index.js +0 -40
  213. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -14
  214. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +0 -31
  215. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -14
  216. package/src/components/sidebar-navigation-screen-details-panel/style.scss +0 -26
  217. package/src/components/site-editor-routes/styles-edit.js +0 -26
  218. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -257
  219. package/src/store/test/actions.js +0 -83
  220. package/src/store/test/reducer.js +0 -69
  221. package/src/store/test/selectors.js +0 -41
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","editorStore","privateApis","editorPrivateApis","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","unlock","App","jsx","_jsx","registerCoreBlockBindingsSources","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","window","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","updateSettings","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","addEventListener","e","preventDefault","render","children","reinitializeEditor","since","version","default","PluginTemplateSettingPanel","initializePostsDashboard"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Keep the defaultTemplateTypes in the core/editor settings too,\n\t// so that they can be selected with core/editor selectors in any editor.\n\t// This is needed because edit-site doesn't initialize with EditorProvider,\n\t// which internally uses updateEditorSettings as well.\n\tdispatch( editorStore ).updateEditorSettings( {\n\t\tdefaultTemplateTypes: settings.defaultTemplateTypes,\n\t\tdefaultTemplatePartAreas: settings.defaultTemplatePartAreas,\n\t} );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC,4CAA4C,QACtC,0BAA0B;AACjC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SACCR,KAAK,IAAIS,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASX,KAAK,IAAIY,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAO,SAAS;AAChB,SAASd,KAAK,IAAIe,aAAa,QAAQ,SAAS;AAChD,SAASC,MAAM,QAAQ,eAAe;AACtC,OAAOC,GAAG,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnC,MAAM;EAAEC;AAAiC,CAAC,GAAGJ,MAAM,CAAEL,iBAAkB,CAAC;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,gBAAgBA,CAAEC,EAAE,EAAEC,QAAQ,EAAG;EAChD,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEJ,EAAG,CAAC;EAC5C,MAAMK,IAAI,GAAGpB,UAAU,CAAEiB,MAAO,CAAC;EAEjCn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AEO,gBAAiB,CAAC,CAACyB,WAAW,CAAE,YAAY,EAAE;MACvDmB,eAAe,EAAE,IAAI;MACrBC,gBAAgB,EAAE;IACnB,CAAE,CAAC;EACJ;EAEApD,QAAQ,CAAEU,aAAc,CAAC,CAAC2C,cAAc,CAAEnC,QAAS,CAAC;;EAEpD;EACA;EACA;EACA;EACAlB,QAAQ,CAAEI,WAAY,CAAC,CAACkD,oBAAoB,CAAE;IAC7CC,oBAAoB,EAAErC,QAAQ,CAACqC,oBAAoB;IACnDC,wBAAwB,EAAEtC,QAAQ,CAACsC;EACpC,CAAE,CAAC;;EAEH;EACAP,MAAM,CAACQ,gBAAgB,CAAE,UAAU,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzEV,MAAM,CAACQ,gBAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErErC,IAAI,CAACsC,MAAM,cACV9C,IAAA,CAACX,UAAU;IAAA0D,QAAA,eACV/C,IAAA,CAACF,GAAG,IAAE;EAAC,CACI,CACb,CAAC;EAED,OAAOU,IAAI;AACZ;AAEA,OAAO,SAASwC,kBAAkBA,CAAA,EAAG;EACpC7D,UAAU,CAAE,gCAAgC,EAAE;IAC7C8D,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,0BAA0B,QAAQ,4CAA4C;AAClG,SAASvE,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc;;AAE5B;AACA;AACA,SAASwE,wBAAwB,QAAQ,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","privateApis","editorPrivateApis","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","unlock","App","jsx","_jsx","registerCoreBlockBindingsSources","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","window","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","updateSettings","addEventListener","e","preventDefault","render","children","reinitializeEditor","since","version","default","PluginTemplateSettingPanel","initializePostsDashboard"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC,4CAA4C,QACtC,0BAA0B;AACjC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASV,KAAK,IAAIW,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAO,SAAS;AAChB,SAASb,KAAK,IAAIc,aAAa,QAAQ,SAAS;AAChD,SAASC,MAAM,QAAQ,eAAe;AACtC,OAAOC,GAAG,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnC,MAAM;EAAEC;AAAiC,CAAC,GAAGJ,MAAM,CAAEL,iBAAkB,CAAC;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,gBAAgBA,CAAEC,EAAE,EAAEC,QAAQ,EAAG;EAChD,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEJ,EAAG,CAAC;EAC5C,MAAMK,IAAI,GAAGnB,UAAU,CAAEgB,MAAO,CAAC;EAEjClB,QAAQ,CAAEJ,WAAY,CAAC,CAAC0B,uBAAuB,CAAC,CAAC;EACjD,MAAMC,UAAU,GAAGzB,2BAA2B,CAAC,CAAC,CAAC0B,MAAM,CACtD,CAAE;IAAEC;EAAK,CAAC,KAAMA,IAAI,KAAK,eAC1B,CAAC;EACD5B,kBAAkB,CAAE0B,UAAW,CAAC;EAChC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,CAAE,UAAU,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzEP,MAAM,CAACK,gBAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErElC,IAAI,CAACmC,MAAM,cACV3C,IAAA,CAACV,UAAU;IAAAsD,QAAA,eACV5C,IAAA,CAACF,GAAG,IAAE;EAAC,CACI,CACb,CAAC;EAED,OAAOU,IAAI;AACZ;AAEA,OAAO,SAASqC,kBAAkBA,CAAA,EAAG;EACpCzD,UAAU,CAAE,gCAAgC,EAAE;IAC7C0D,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,0BAA0B,QAAQ,4CAA4C;AAClG,SAASnE,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc;;AAE5B;AACA;AACA,SAASoE,wBAAwB,QAAQ,SAAS","ignoreList":[]}
@@ -117,11 +117,15 @@ export const removeTemplate = template => ({
117
117
  /**
118
118
  * Action that sets a template part.
119
119
  *
120
+ * @deprecated
120
121
  * @param {string} templatePartId The template part ID.
121
122
  *
122
123
  * @return {Object} Action object.
123
124
  */
124
125
  export function setTemplatePart(templatePartId) {
126
+ deprecated("dispatch( 'core/edit-site' ).setTemplatePart", {
127
+ since: '6.8'
128
+ });
125
129
  return {
126
130
  type: 'SET_EDITED_POST',
127
131
  postType: TEMPLATE_PART_POST_TYPE,
@@ -132,11 +136,15 @@ export function setTemplatePart(templatePartId) {
132
136
  /**
133
137
  * Action that sets a navigation menu.
134
138
  *
139
+ * @deprecated
135
140
  * @param {string} navigationMenuId The Navigation Menu Post ID.
136
141
  *
137
142
  * @return {Object} Action object.
138
143
  */
139
144
  export function setNavigationMenu(navigationMenuId) {
145
+ deprecated("dispatch( 'core/edit-site' ).setNavigationMenu", {
146
+ since: '6.8'
147
+ });
140
148
  return {
141
149
  type: 'SET_EDITED_POST',
142
150
  postType: NAVIGATION_POST_TYPE,
@@ -147,6 +155,7 @@ export function setNavigationMenu(navigationMenuId) {
147
155
  /**
148
156
  * Action that sets an edited entity.
149
157
  *
158
+ * @deprecated
150
159
  * @param {string} postType The entity's post type.
151
160
  * @param {string} postId The entity's ID.
152
161
  * @param {Object} context The entity's context.
@@ -178,11 +187,15 @@ export function setHomeTemplateId() {
178
187
  /**
179
188
  * Set's the current block editor context.
180
189
  *
190
+ * @deprecated
181
191
  * @param {Object} context The context object.
182
192
  *
183
193
  * @return {Object} Action object.
184
194
  */
185
195
  export function setEditedPostContext(context) {
196
+ deprecated("dispatch( 'core/edit-site' ).setEditedPostContext", {
197
+ since: '6.8'
198
+ });
186
199
  return {
187
200
  type: 'SET_EDITED_POST_CONTEXT',
188
201
  context
@@ -1 +1 @@
1
- {"version":3,"names":["parse","deprecated","store","coreStore","blockEditorStore","editorStore","privateApis","editorPrivateApis","preferencesStore","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","NAVIGATION_POST_TYPE","unlock","interfaceStore","toggleFeature","featureName","registry","since","alternative","dispatch","toggle","__experimentalSetPreviewDeviceType","deviceType","version","hint","setDeviceType","setTemplate","type","addTemplate","template","newTemplate","saveEntityRecord","content","editEntityRecord","id","blocks","undoIgnore","postType","removeTemplate","removeTemplates","setTemplatePart","templatePartId","setNavigationMenu","navigationMenuId","setEditedEntity","postId","context","setHomeTemplateId","setEditedPostContext","setPage","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","value","setIsListViewOpened","isOpen","updateSettings","settings","setIsSaveViewOpened","revertTemplate","options","openGeneralSidebar","name","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","switchEditorMode","mode","setHasPageContentFocus","hasPageContentFocus","clearSelectedBlock","toggleDistractionFree"],"sources":["@wordpress/edit-site/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../utils/constants';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\n/**\n * Dispatches an action that toggles a feature flag.\n *\n * @param {string} featureName Feature name.\n */\nexport function toggleFeature( featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).toggleFeature( featureName )\",\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative:\n\t\t\t\t\t\"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )\",\n\t\t\t}\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-site', featureName );\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @deprecated\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\n\n/**\n * Action that sets a template, optionally fetching it from REST API.\n *\n * @return {Object} Action object.\n */\nexport function setTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setTemplate\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Action that adds a new template and sets it as the current template.\n *\n * @param {Object} template The template.\n *\n * @deprecated\n *\n * @return {Object} Action object used to set the current template.\n */\nexport const addTemplate =\n\t( template ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).addTemplate\", {\n\t\t\tsince: '6.5',\n\t\t\tversion: '6.8',\n\t\t\thint: 'use saveEntityRecord directly',\n\t\t} );\n\n\t\tconst newTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', TEMPLATE_POST_TYPE, template );\n\n\t\tif ( template.content ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tnewTemplate.id,\n\t\t\t\t\t{ blocks: parse( template.content ) },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: newTemplate.id,\n\t\t} );\n\t};\n\n/**\n * Action that removes a template.\n *\n * @param {Object} template The template object.\n */\nexport const removeTemplate =\n\t( template ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).removeTemplates( [\n\t\t\ttemplate,\n\t\t] );\n\t};\n\n/**\n * Action that sets a template part.\n *\n * @param {string} templatePartId The template part ID.\n *\n * @return {Object} Action object.\n */\nexport function setTemplatePart( templatePartId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tid: templatePartId,\n\t};\n}\n\n/**\n * Action that sets a navigation menu.\n *\n * @param {string} navigationMenuId The Navigation Menu Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setNavigationMenu( navigationMenuId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t\tid: navigationMenuId,\n\t};\n}\n\n/**\n * Action that sets an edited entity.\n *\n * @param {string} postType The entity's post type.\n * @param {string} postId The entity's ID.\n * @param {Object} context The entity's context.\n *\n * @return {Object} Action object.\n */\nexport function setEditedEntity( postType, postId, context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tid: postId,\n\t\tcontext,\n\t};\n}\n\n/**\n * @deprecated\n */\nexport function setHomeTemplateId() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Set's the current block editor context.\n *\n * @param {Object} context The context object.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPostContext( context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST_CONTEXT',\n\t\tcontext,\n\t};\n}\n\n/**\n * Resolves the template for a page and displays both. If no path is given, attempts\n * to use the postId to generate a path like `?p=${ postId }`.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setPage() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setPage\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setPage is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Action that sets the active navigation panel menu.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens the navigation panel and sets its active menu at the same time.\n *\n * @deprecated\n */\nexport function openNavigationPanelToMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).openNavigationPanelToMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Sets whether the navigation panel should be open.\n *\n * @deprecated\n */\nexport function setIsNavigationPanelOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setIsNavigationPanelOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\n\n/**\n * Returns an action object used to update the settings.\n *\n * @param {Object} settings New settings.\n *\n * @return {Object} Action object.\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Sets whether the save view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the save view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport function setIsSaveViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_SAVE_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, options ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).revertTemplate(\n\t\t\ttemplate,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Action that opens an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\n\t};\n\n/**\n * Sets whether or not the editor allows only page content to be edited.\n *\n * @param {boolean} hasPageContentFocus True to allow only page content to be\n * edited, false to allow template to be\n * edited.\n */\nexport const setHasPageContentFocus =\n\t( hasPageContentFocus ) =>\n\t( { dispatch, registry } ) => {\n\t\tdeprecated( `dispatch( 'core/edit-site' ).setHasPageContentFocus`, {\n\t\t\tsince: '6.5',\n\t\t} );\n\n\t\tif ( hasPageContentFocus ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_HAS_PAGE_CONTENT_FOCUS',\n\t\t\thasPageContentFocus,\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,mBAAmB;AACzC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,yBAAyB;AACnE,SACCF,KAAK,IAAIG,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SACCC,kBAAkB,EAClBC,uBAAuB,EACvBC,oBAAoB,QACd,oBAAoB;AAC3B,SAASC,MAAM,QAAQ,gBAAgB;AAEvC,MAAM;EAAEC;AAAe,CAAC,GAAGD,MAAM,CAAEL,iBAAkB,CAAC;;AAEtD;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,aAAaA,CAAEC,WAAW,EAAG;EAC5C,OAAO,UAAW;IAAEC;EAAS,CAAC,EAAG;IAChCf,UAAU,CACT,2DAA2D,EAC3D;MACCgB,KAAK,EAAE,KAAK;MACZC,WAAW,EACV;IACF,CACD,CAAC;IAEDF,QAAQ,CACNG,QAAQ,CAAEX,gBAAiB,CAAC,CAC5BY,MAAM,CAAE,gBAAgB,EAAEL,WAAY,CAAC;EAC1C,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AAC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AACG,QAAQ,CAAEN,cAAe,CAAC,CAACqD,wBAAwB,CAAE,MAAO,CAAC;AACvE,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAC1BC,IAAI,IACN,CAAE;EAAEpD;AAAS,CAAC,KAAM;EACnBf,UAAU,CAAE,+CAA+C,EAAE;IAC5DgB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACHF,QAAQ,CAACG,QAAQ,CAAEd,WAAY,CAAC,CAAC8D,gBAAgB,CAAEC,IAAK,CAAC;AAC1D,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAChCC,mBAAmB,IACrB,CAAE;EAAEnD,QAAQ;EAAEH;AAAS,CAAC,KAAM;EAC7Bf,UAAU,CAAE,qDAAqD,EAAE;IAClEgB,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,IAAKqD,mBAAmB,EAAG;IAC1BtD,QAAQ,CAACG,QAAQ,CAAEf,gBAAiB,CAAC,CAACmE,kBAAkB,CAAC,CAAC;EAC3D;EACApD,QAAQ,CAAE;IACTQ,IAAI,EAAE,4BAA4B;IAClC2C;EACD,CAAE,CAAC;AACJ,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,qBAAqB,GACjCA,CAAA,KACA,CAAE;EAAExD;AAAS,CAAC,KAAM;EACnBf,UAAU,CAAE,oDAAoD,EAAE;IACjEgB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACHF,QAAQ,CAACG,QAAQ,CAAEd,WAAY,CAAC,CAACmE,qBAAqB,CAAC,CAAC;AACzD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["parse","deprecated","store","coreStore","blockEditorStore","editorStore","privateApis","editorPrivateApis","preferencesStore","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","NAVIGATION_POST_TYPE","unlock","interfaceStore","toggleFeature","featureName","registry","since","alternative","dispatch","toggle","__experimentalSetPreviewDeviceType","deviceType","version","hint","setDeviceType","setTemplate","type","addTemplate","template","newTemplate","saveEntityRecord","content","editEntityRecord","id","blocks","undoIgnore","postType","removeTemplate","removeTemplates","setTemplatePart","templatePartId","setNavigationMenu","navigationMenuId","setEditedEntity","postId","context","setHomeTemplateId","setEditedPostContext","setPage","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","value","setIsListViewOpened","isOpen","updateSettings","settings","setIsSaveViewOpened","revertTemplate","options","openGeneralSidebar","name","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","switchEditorMode","mode","setHasPageContentFocus","hasPageContentFocus","clearSelectedBlock","toggleDistractionFree"],"sources":["@wordpress/edit-site/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../utils/constants';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\n/**\n * Dispatches an action that toggles a feature flag.\n *\n * @param {string} featureName Feature name.\n */\nexport function toggleFeature( featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).toggleFeature( featureName )\",\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative:\n\t\t\t\t\t\"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )\",\n\t\t\t}\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-site', featureName );\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @deprecated\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\n\n/**\n * Action that sets a template, optionally fetching it from REST API.\n *\n * @return {Object} Action object.\n */\nexport function setTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setTemplate\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Action that adds a new template and sets it as the current template.\n *\n * @param {Object} template The template.\n *\n * @deprecated\n *\n * @return {Object} Action object used to set the current template.\n */\nexport const addTemplate =\n\t( template ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).addTemplate\", {\n\t\t\tsince: '6.5',\n\t\t\tversion: '6.8',\n\t\t\thint: 'use saveEntityRecord directly',\n\t\t} );\n\n\t\tconst newTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', TEMPLATE_POST_TYPE, template );\n\n\t\tif ( template.content ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tnewTemplate.id,\n\t\t\t\t\t{ blocks: parse( template.content ) },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: newTemplate.id,\n\t\t} );\n\t};\n\n/**\n * Action that removes a template.\n *\n * @param {Object} template The template object.\n */\nexport const removeTemplate =\n\t( template ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).removeTemplates( [\n\t\t\ttemplate,\n\t\t] );\n\t};\n\n/**\n * Action that sets a template part.\n *\n * @deprecated\n * @param {string} templatePartId The template part ID.\n *\n * @return {Object} Action object.\n */\nexport function setTemplatePart( templatePartId ) {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setTemplatePart\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tid: templatePartId,\n\t};\n}\n\n/**\n * Action that sets a navigation menu.\n *\n * @deprecated\n * @param {string} navigationMenuId The Navigation Menu Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setNavigationMenu( navigationMenuId ) {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationMenu\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t\tid: navigationMenuId,\n\t};\n}\n\n/**\n * Action that sets an edited entity.\n *\n * @deprecated\n * @param {string} postType The entity's post type.\n * @param {string} postId The entity's ID.\n * @param {Object} context The entity's context.\n *\n * @return {Object} Action object.\n */\nexport function setEditedEntity( postType, postId, context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tid: postId,\n\t\tcontext,\n\t};\n}\n\n/**\n * @deprecated\n */\nexport function setHomeTemplateId() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Set's the current block editor context.\n *\n * @deprecated\n * @param {Object} context The context object.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPostContext( context ) {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setEditedPostContext\", {\n\t\tsince: '6.8',\n\t} );\n\treturn {\n\t\ttype: 'SET_EDITED_POST_CONTEXT',\n\t\tcontext,\n\t};\n}\n\n/**\n * Resolves the template for a page and displays both. If no path is given, attempts\n * to use the postId to generate a path like `?p=${ postId }`.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setPage() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setPage\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setPage is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Action that sets the active navigation panel menu.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens the navigation panel and sets its active menu at the same time.\n *\n * @deprecated\n */\nexport function openNavigationPanelToMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).openNavigationPanelToMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Sets whether the navigation panel should be open.\n *\n * @deprecated\n */\nexport function setIsNavigationPanelOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setIsNavigationPanelOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\n\n/**\n * Returns an action object used to update the settings.\n *\n * @param {Object} settings New settings.\n *\n * @return {Object} Action object.\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Sets whether the save view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the save view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport function setIsSaveViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_SAVE_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, options ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).revertTemplate(\n\t\t\ttemplate,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Action that opens an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\n\t};\n\n/**\n * Sets whether or not the editor allows only page content to be edited.\n *\n * @param {boolean} hasPageContentFocus True to allow only page content to be\n * edited, false to allow template to be\n * edited.\n */\nexport const setHasPageContentFocus =\n\t( hasPageContentFocus ) =>\n\t( { dispatch, registry } ) => {\n\t\tdeprecated( `dispatch( 'core/edit-site' ).setHasPageContentFocus`, {\n\t\t\tsince: '6.5',\n\t\t} );\n\n\t\tif ( hasPageContentFocus ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_HAS_PAGE_CONTENT_FOCUS',\n\t\t\thasPageContentFocus,\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n"],"mappings":"AAAA;AACA;AACA;A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AAS,CAAC,KAAM;EACnBf,UAAU,CAAE,+CAA+C,EAAE;IAC5DgB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACHF,QAAQ,CAACG,QAAQ,CAAEd,WAAY,CAAC,CAAC8D,gBAAgB,CAAEC,IAAK,CAAC;AAC1D,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAChCC,mBAAmB,IACrB,CAAE;EAAEnD,QAAQ;EAAEH;AAAS,CAAC,KAAM;EAC7Bf,UAAU,CAAE,qDAAqD,EAAE;IAClEgB,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,IAAKqD,mBAAmB,EAAG;IAC1BtD,QAAQ,CAACG,QAAQ,CAAEf,gBAAiB,CAAC,CAACmE,kBAAkB,CAAC,CAAC;EAC3D;EACApD,QAAQ,CAAE;IACTQ,IAAI,EAAE,4BAA4B;IAClC2C;EACD,CAAE,CAAC;AACJ,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,qBAAqB,GACjCA,CAAA,KACA,CAAE;EAAExD;AAAS,CAAC,KAAM;EACnBf,UAAU,CAAE,oDAAoD,EAAE;IACjEgB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACHF,QAAQ,CAACG,QAAQ,CAAEd,WAAY,CAAC,CAACmE,qBAAqB,CAAC,CAAC;AACzD,CAAC","ignoreList":[]}
@@ -116,22 +116,32 @@ export function getHomeTemplateId() {
116
116
  /**
117
117
  * Returns the current edited post type (wp_template or wp_template_part).
118
118
  *
119
+ * @deprecated
119
120
  * @param {Object} state Global application state.
120
121
  *
121
122
  * @return {?TemplateType} Template type.
122
123
  */
123
124
  export function getEditedPostType(state) {
125
+ deprecated("select( 'core/edit-site' ).getEditedPostType", {
126
+ since: '6.8',
127
+ alternative: "select( 'core/editor' ).getCurrentPostType"
128
+ });
124
129
  return state.editedPost.postType;
125
130
  }
126
131
 
127
132
  /**
128
133
  * Returns the ID of the currently edited template or template part.
129
134
  *
135
+ * @deprecated
130
136
  * @param {Object} state Global application state.
131
137
  *
132
138
  * @return {?string} Post ID.
133
139
  */
134
140
  export function getEditedPostId(state) {
141
+ deprecated("select( 'core/edit-site' ).getEditedPostId", {
142
+ since: '6.8',
143
+ alternative: "select( 'core/editor' ).getCurrentPostId"
144
+ });
135
145
  return state.editedPost.id;
136
146
  }
137
147
 
@@ -144,6 +154,9 @@ export function getEditedPostId(state) {
144
154
  * @return {Object} Page.
145
155
  */
146
156
  export function getEditedPostContext(state) {
157
+ deprecated("select( 'core/edit-site' ).getEditedPostContext", {
158
+ since: '6.8'
159
+ });
147
160
  return state.editedPost.context;
148
161
  }
149
162
 
@@ -156,6 +169,9 @@ export function getEditedPostContext(state) {
156
169
  * @return {Object} Page.
157
170
  */
158
171
  export function getPage(state) {
172
+ deprecated("select( 'core/edit-site' ).getPage", {
173
+ since: '6.8'
174
+ });
159
175
  return {
160
176
  context: state.editedPost.context
161
177
  };
@@ -294,12 +310,16 @@ export function isNavigationOpened() {
294
310
  * Whether or not the editor has a page loaded into it.
295
311
  *
296
312
  * @see setPage
297
- *
313
+ * @deprecated
298
314
  * @param {Object} state Global application state.
299
315
  *
300
316
  * @return {boolean} Whether or not the editor has a page loaded into it.
301
317
  */
302
318
  export function isPage(state) {
319
+ deprecated("select( 'core/edit-site' ).isPage", {
320
+ since: '6.8',
321
+ alternative: "select( 'core/editor' ).getCurrentPostType"
322
+ });
303
323
  return !!state.editedPost.context?.postId;
304
324
  }
305
325
 
@@ -1 +1 @@
1
- {"version":3,"names":["store","coreDataStore","createRegistrySelector","createSelector","deprecated","Platform","preferencesStore","editorStore","blockEditorStore","unlock","TEMPLATE_PART_POST_TYPE","getFilteredTemplatePartBlocks","isFeatureActive","select","_","featureName","since","alternative","get","__experimentalGetPreviewDeviceType","version","getDeviceType","getCanUserCreateMedia","canUser","getReusableBlocks","isWeb","OS","getEntityRecords","per_page","getSettings","state","settings","getHomeTemplateId","getEditedPostType","editedPost","postType","getEditedPostId","id","getEditedPostContext","context","getPage","isInserterOpened","__experimentalGetInsertionPoint","getInserter","isListViewOpened","isSaveViewOpened","saveViewPanel","getBlocksAndTemplateParts","templateParts","getBlocksByName","getBlocksByClientId","clientIds","blocks","getCurrentTemplateTemplateParts","getEditorMode","getCurrentTemplateNavigationPanelSubMenu","getNavigationPanelActiveMenu","isNavigationOpened","isPage","postId","hasPageContentFocus"],"sources":["@wordpress/edit-site/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector, createSelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../utils/constants';\nimport getFilteredTemplatePartBlocks from '../utils/get-filtered-template-parts';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( _, featureName ) => {\n\t\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `select( 'core/preferences' ).get`,\n\t\t} );\n\n\t\treturn !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\tfeatureName\n\t\t);\n\t}\n);\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\talternative: `wp.data.select( 'core' ).canUser( 'create', { kind: 'root', type: 'media' } )`,\n\t\t\t}\n\t\t);\n\n\t\treturn select( coreDataStore ).canUser( 'create', 'media' );\n\t}\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).getReusableBlocks()`, {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\talternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`,\n\t} );\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t } )\n\t\t: [];\n} );\n\n/**\n * Returns the site editor settings.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Settings.\n */\nexport function getSettings( state ) {\n\t// It is important that we don't inject anything into these settings locally.\n\t// The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.\n\t// If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.\n\treturn state.settings;\n}\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {?TemplateType} Template type.\n */\nexport function getEditedPostType( state ) {\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Post ID.\n */\nexport function getEditedPostId( state ) {\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\nfunction getBlocksAndTemplateParts( select ) {\n\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\t{ per_page: -1 }\n\t);\n\n\tconst { getBlocksByName, getBlocksByClientId } = select( blockEditorStore );\n\n\tconst clientIds = getBlocksByName( 'core/template-part' );\n\tconst blocks = getBlocksByClientId( clientIds );\n\treturn [ blocks, templateParts ];\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector(\n\t\t\t() => {\n\t\t\t\tdeprecated(\n\t\t\t\t\t`select( 'core/edit-site' ).getCurrentTemplateTemplateParts()`,\n\t\t\t\t\t{\n\t\t\t\t\t\tsince: '6.7',\n\t\t\t\t\t\tversion: '6.9',\n\t\t\t\t\t\talternative: `select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )`,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn getFilteredTemplatePartBlocks(\n\t\t\t\t\t...getBlocksAndTemplateParts( select )\n\t\t\t\t);\n\t\t\t},\n\t\t\t() => getBlocksAndTemplateParts( select )\n\t\t)\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector( ( select ) => () => {\n\treturn select( preferencesStore ).get( 'core', 'editorMode' );\n} );\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @deprecated\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus() {\n\tdeprecated( `select( 'core/edit-site' ).hasPageContentFocus`, {\n\t\tsince: '6.5',\n\t} );\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,aAAa,QAAQ,sBAAsB;AAC7D,SAASC,sBAAsB,EAAEC,cAAc,QAAQ,iBAAiB;AACxE,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;AAClE,SAASN,KAAK,IAAIO,WAAW,QAAQ,mBAAmB;AACxD,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,yBAAyB;;AAEnE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,uBAAuB,QAAQ,oBAAoB;AAC5D,OAA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AAEoB,MAAM;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAA,EAAG;EACrCxD,UAAU,CAAE,gDAAgD,EAAE;IAC7DY,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,OAAO,KAAK;AACb","ignoreList":[]}
1
+ {"version":3,"names":["store","coreDataStore","createRegistrySelector","createSelector","deprecated","Platform","preferencesStore","editorStore","blockEditorStore","unlock","TEMPLATE_PART_POST_TYPE","getFilteredTemplatePartBlocks","isFeatureActive","select","_","featureName","since","alternative","get","__experimentalGetPreviewDeviceType","version","getDeviceType","getCanUserCreateMedia","canUser","getReusableBlocks","isWeb","OS","getEntityRecords","per_page","getSettings","state","settings","getHomeTemplateId","getEditedPostType","editedPost","postType","getEditedPostId","id","getEditedPostContext","context","getPage","isInserterOpened","__experimentalGetInsertionPoint","getInserter","isListViewOpened","isSaveViewOpened","saveViewPanel","getBlocksAndTemplateParts","templateParts","getBlocksByName","getBlocksByClientId","clientIds","blocks","getCurrentTemplateTemplateParts","getEditorMode","getCurrentTemplateNavigationPanelSubMenu","getNavigationPanelActiveMenu","isNavigationOpened","isPage","postId","hasPageContentFocus"],"sources":["@wordpress/edit-site/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector, createSelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../utils/constants';\nimport getFilteredTemplatePartBlocks from '../utils/get-filtered-template-parts';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( _, featureName ) => {\n\t\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `select( 'core/preferences' ).get`,\n\t\t} );\n\n\t\treturn !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\tfeatureName\n\t\t);\n\t}\n);\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\talternative: `wp.data.select( 'core' ).canUser( 'create', { kind: 'root', type: 'media' } )`,\n\t\t\t}\n\t\t);\n\n\t\treturn select( coreDataStore ).canUser( 'create', 'media' );\n\t}\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).getReusableBlocks()`, {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\talternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`,\n\t} );\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t } )\n\t\t: [];\n} );\n\n/**\n * Returns the site editor settings.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Settings.\n */\nexport function getSettings( state ) {\n\t// It is important that we don't inject anything into these settings locally.\n\t// The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.\n\t// If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.\n\treturn state.settings;\n}\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?TemplateType} Template type.\n */\nexport function getEditedPostType( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostType\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?string} Post ID.\n */\nexport function getEditedPostId( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostId\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostId\",\n\t} );\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostContext\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getPage\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\nfunction getBlocksAndTemplateParts( select ) {\n\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\t{ per_page: -1 }\n\t);\n\n\tconst { getBlocksByName, getBlocksByClientId } = select( blockEditorStore );\n\n\tconst clientIds = getBlocksByName( 'core/template-part' );\n\tconst blocks = getBlocksByClientId( clientIds );\n\treturn [ blocks, templateParts ];\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector(\n\t\t\t() => {\n\t\t\t\tdeprecated(\n\t\t\t\t\t`select( 'core/edit-site' ).getCurrentTemplateTemplateParts()`,\n\t\t\t\t\t{\n\t\t\t\t\t\tsince: '6.7',\n\t\t\t\t\t\tversion: '6.9',\n\t\t\t\t\t\talternative: `select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )`,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn getFilteredTemplatePartBlocks(\n\t\t\t\t\t...getBlocksAndTemplateParts( select )\n\t\t\t\t);\n\t\t\t},\n\t\t\t() => getBlocksAndTemplateParts( select )\n\t\t)\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector( ( select ) => () => {\n\treturn select( preferencesStore ).get( 'core', 'editorMode' );\n} );\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).isPage\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @deprecated\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus() {\n\tdeprecated( `select( 'core/edit-site' ).hasPageContentFocus`, {\n\t\tsince: '6.5',\n\t} );\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,aAAa,QAAQ,sBAAsB;AAC7D,SAASC,sBAAsB,EAAEC,cAAc,QAAQ,iBAAiB;AACxE,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;AAClE,SAASN,KAAK,IAAIO,WAAW,QAAQ,mBAAmB;AACxD,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,yBAAyB;;AAEnE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,uBAAuB,QAAQ,oBAAoB;AAC5D,OAAOC,6BAA6B,MAAM,sCAAsC;;AAEhF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGV,sBAAsB,CAClDW,MAAM,IAAM,CAAEC,CAAC,EAAEC,WAAW,KAAM;EACnCX,UAAU,CAAE,4CAA4C,EAAE;IACzDY,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EAEH,OAAO,CAAC,CAAEJ,MAAM,CAAEP,g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EAAE;IAChDY,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EAEH,OAAO,CAAC,CAAEa,KAAK,CAACI,UAAU,CAACK,OAAO,EAAEoB,MAAM;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAA,EAAG;EACrCxD,UAAU,CAAE,gDAAgD,EAAE;IAC7DY,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,OAAO,KAAK;AACb","ignoreList":[]}
@@ -660,18 +660,6 @@
660
660
  top: unset;
661
661
  }
662
662
 
663
- .dataforms-layouts-panel__field-dropdown .dataforms-combined-edit {
664
- border: none;
665
- padding: 0;
666
- }
667
-
668
- .dataforms-combined-edit__field {
669
- flex: 1 1 auto;
670
- }
671
- .dataforms-combined-edit p.components-base-control__help:has(.components-checkbox-control__help) {
672
- margin-top: 4px;
673
- }
674
-
675
663
  .dataviews-view-grid {
676
664
  margin-bottom: auto;
677
665
  grid-template-rows: max-content;
@@ -693,7 +681,9 @@
693
681
  padding: 8px 0 4px;
694
682
  }
695
683
  .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__primary-field {
696
- min-height: 32px;
684
+ min-height: 24px;
685
+ display: flex;
686
+ align-items: center;
697
687
  }
698
688
  .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__primary-field--clickable {
699
689
  width: -moz-fit-content;
@@ -1120,6 +1110,22 @@ ul.dataviews-view-list {
1120
1110
  .dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input {
1121
1111
  opacity: 1;
1122
1112
  }
1113
+ .dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child) {
1114
+ padding-right: 0;
1115
+ }
1116
+ .dataviews-view-table.has-compact-density td,
1117
+ .dataviews-view-table.has-compact-density th {
1118
+ padding: 4px 8px;
1119
+ }
1120
+ .dataviews-view-table.has-comfortable-density td,
1121
+ .dataviews-view-table.has-comfortable-density th {
1122
+ padding: 16px 12px;
1123
+ }
1124
+ .dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,
1125
+ .dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column, .dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,
1126
+ .dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column {
1127
+ padding-left: 0;
1128
+ }
1123
1129
 
1124
1130
  /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
1125
1131
  @container (max-width: 430px) {
@@ -1192,6 +1198,41 @@ ul.dataviews-view-list {
1192
1198
  margin-bottom: 16px;
1193
1199
  }
1194
1200
 
1201
+ .components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown {
1202
+ z-index: 159990;
1203
+ }
1204
+
1205
+ .dataforms-layouts-regular__field {
1206
+ width: 100%;
1207
+ min-height: 32px;
1208
+ justify-content: flex-start !important;
1209
+ align-items: flex-start !important;
1210
+ }
1211
+
1212
+ .dataforms-layouts-regular__field .components-base-control__label {
1213
+ font-size: inherit;
1214
+ font-weight: normal;
1215
+ text-transform: none;
1216
+ }
1217
+
1218
+ .dataforms-layouts-regular__field-label {
1219
+ width: 38%;
1220
+ flex-shrink: 0;
1221
+ min-height: 32px;
1222
+ display: flex;
1223
+ align-items: center;
1224
+ padding: 6px 0;
1225
+ line-height: 20px;
1226
+ hyphens: auto;
1227
+ }
1228
+
1229
+ .dataforms-layouts-regular__field-control {
1230
+ flex-grow: 1;
1231
+ min-height: 32px;
1232
+ display: flex;
1233
+ align-items: center;
1234
+ }
1235
+
1195
1236
  .edit-site-layout {
1196
1237
  height: 100%;
1197
1238
  background: #1e1e1e;
@@ -1537,7 +1578,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1537
1578
  contain: content;
1538
1579
  }
1539
1580
 
1540
- @keyframes _xrshv_slide-from-right {
1581
+ @keyframes _oixbu_slide-from-right {
1541
1582
  from {
1542
1583
  transform: translateX(-50px);
1543
1584
  opacity: 0;
@@ -1547,7 +1588,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1547
1588
  opacity: 1;
1548
1589
  }
1549
1590
  }
1550
- @keyframes _xrshv_slide-from-left {
1591
+ @keyframes _oixbu_slide-from-left {
1551
1592
  from {
1552
1593
  transform: translateX(50px);
1553
1594
  opacity: 0;
@@ -1603,10 +1644,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1603
1644
  }
1604
1645
  }
1605
1646
  .edit-site-sidebar__screen-wrapper.slide-from-left {
1606
- animation-name: _xrshv_slide-from-left;
1647
+ animation-name: _oixbu_slide-from-left;
1607
1648
  }
1608
1649
  .edit-site-sidebar__screen-wrapper.slide-from-right {
1609
- animation-name: _xrshv_slide-from-right;
1650
+ animation-name: _oixbu_slide-from-right;
1610
1651
  }
1611
1652
 
1612
1653
  .edit-site-site-hub {
@@ -1615,7 +1656,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1615
1656
  justify-content: space-between;
1616
1657
  gap: 8px;
1617
1658
  margin-left: 12px;
1618
- height: 56px;
1659
+ height: 60px;
1619
1660
  }
1620
1661
 
1621
1662
  .edit-site-site-hub__actions {
@@ -660,18 +660,6 @@
660
660
  top: unset;
661
661
  }
662
662
 
663
- .dataforms-layouts-panel__field-dropdown .dataforms-combined-edit {
664
- border: none;
665
- padding: 0;
666
- }
667
-
668
- .dataforms-combined-edit__field {
669
- flex: 1 1 auto;
670
- }
671
- .dataforms-combined-edit p.components-base-control__help:has(.components-checkbox-control__help) {
672
- margin-top: 4px;
673
- }
674
-
675
663
  .dataviews-view-grid {
676
664
  margin-bottom: auto;
677
665
  grid-template-rows: max-content;
@@ -693,7 +681,9 @@
693
681
  padding: 8px 0 4px;
694
682
  }
695
683
  .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__primary-field {
696
- min-height: 32px;
684
+ min-height: 24px;
685
+ display: flex;
686
+ align-items: center;
697
687
  }
698
688
  .dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__primary-field--clickable {
699
689
  width: -moz-fit-content;
@@ -1120,6 +1110,22 @@ ul.dataviews-view-list {
1120
1110
  .dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input {
1121
1111
  opacity: 1;
1122
1112
  }
1113
+ .dataviews-view-table.has-compact-density thead th:has(.dataviews-view-table-header-button):not(:first-child) {
1114
+ padding-left: 0;
1115
+ }
1116
+ .dataviews-view-table.has-compact-density td,
1117
+ .dataviews-view-table.has-compact-density th {
1118
+ padding: 4px 8px;
1119
+ }
1120
+ .dataviews-view-table.has-comfortable-density td,
1121
+ .dataviews-view-table.has-comfortable-density th {
1122
+ padding: 16px 12px;
1123
+ }
1124
+ .dataviews-view-table.has-compact-density td.dataviews-view-table__checkbox-column,
1125
+ .dataviews-view-table.has-compact-density th.dataviews-view-table__checkbox-column, .dataviews-view-table.has-comfortable-density td.dataviews-view-table__checkbox-column,
1126
+ .dataviews-view-table.has-comfortable-density th.dataviews-view-table__checkbox-column {
1127
+ padding-right: 0;
1128
+ }
1123
1129
 
1124
1130
  /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
1125
1131
  @container (max-width: 430px) {
@@ -1192,6 +1198,41 @@ ul.dataviews-view-list {
1192
1198
  margin-bottom: 16px;
1193
1199
  }
1194
1200
 
1201
+ .components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown {
1202
+ z-index: 159990;
1203
+ }
1204
+
1205
+ .dataforms-layouts-regular__field {
1206
+ width: 100%;
1207
+ min-height: 32px;
1208
+ justify-content: flex-start !important;
1209
+ align-items: flex-start !important;
1210
+ }
1211
+
1212
+ .dataforms-layouts-regular__field .components-base-control__label {
1213
+ font-size: inherit;
1214
+ font-weight: normal;
1215
+ text-transform: none;
1216
+ }
1217
+
1218
+ .dataforms-layouts-regular__field-label {
1219
+ width: 38%;
1220
+ flex-shrink: 0;
1221
+ min-height: 32px;
1222
+ display: flex;
1223
+ align-items: center;
1224
+ padding: 6px 0;
1225
+ line-height: 20px;
1226
+ hyphens: auto;
1227
+ }
1228
+
1229
+ .dataforms-layouts-regular__field-control {
1230
+ flex-grow: 1;
1231
+ min-height: 32px;
1232
+ display: flex;
1233
+ align-items: center;
1234
+ }
1235
+
1195
1236
  .edit-site-layout {
1196
1237
  height: 100%;
1197
1238
  background: #1e1e1e;
@@ -1537,7 +1578,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1537
1578
  contain: content;
1538
1579
  }
1539
1580
 
1540
- @keyframes _xrshv_slide-from-right {
1581
+ @keyframes _oixbu_slide-from-right {
1541
1582
  from {
1542
1583
  transform: translateX(50px);
1543
1584
  opacity: 0;
@@ -1547,7 +1588,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1547
1588
  opacity: 1;
1548
1589
  }
1549
1590
  }
1550
- @keyframes _xrshv_slide-from-left {
1591
+ @keyframes _oixbu_slide-from-left {
1551
1592
  from {
1552
1593
  transform: translateX(-50px);
1553
1594
  opacity: 0;
@@ -1603,10 +1644,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1603
1644
  }
1604
1645
  }
1605
1646
  .edit-site-sidebar__screen-wrapper.slide-from-left {
1606
- animation-name: _xrshv_slide-from-left;
1647
+ animation-name: _oixbu_slide-from-left;
1607
1648
  }
1608
1649
  .edit-site-sidebar__screen-wrapper.slide-from-right {
1609
- animation-name: _xrshv_slide-from-right;
1650
+ animation-name: _oixbu_slide-from-right;
1610
1651
  }
1611
1652
 
1612
1653
  .edit-site-site-hub {
@@ -1615,7 +1656,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
1615
1656
  justify-content: space-between;
1616
1657
  gap: 8px;
1617
1658
  margin-right: 12px;
1618
- height: 56px;
1659
+ height: 60px;
1619
1660
  }
1620
1661
 
1621
1662
  .edit-site-site-hub__actions {