@wordpress/edit-site 5.19.3 → 5.20.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 (739) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js +9 -8
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +7 -6
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +8 -7
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +20 -19
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +2 -2
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/new-template.js +17 -16
  13. package/build/components/add-new-template/new-template.js.map +1 -1
  14. package/build/components/add-new-template/template-actions-loading-screen.js +4 -4
  15. package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  16. package/build/components/app/index.js +2 -2
  17. package/build/components/app/index.js.map +1 -1
  18. package/build/components/block-editor/back-button.js +2 -2
  19. package/build/components/block-editor/back-button.js.map +1 -1
  20. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js +10 -6
  21. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +1 -1
  22. package/build/components/block-editor/block-editor-provider/index.js +3 -3
  23. package/build/components/block-editor/block-editor-provider/index.js.map +1 -1
  24. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +3 -2
  25. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +1 -1
  26. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js +19 -11
  27. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +1 -1
  28. package/build/components/block-editor/block-inspector-button.js +2 -2
  29. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  30. package/build/components/block-editor/editor-canvas.js +4 -3
  31. package/build/components/block-editor/editor-canvas.js.map +1 -1
  32. package/build/components/block-editor/index.js +2 -2
  33. package/build/components/block-editor/index.js.map +1 -1
  34. package/build/components/block-editor/resizable-editor.js +4 -3
  35. package/build/components/block-editor/resizable-editor.js.map +1 -1
  36. package/build/components/block-editor/resize-handle.js +3 -3
  37. package/build/components/block-editor/resize-handle.js.map +1 -1
  38. package/build/components/block-editor/site-editor-canvas.js +8 -7
  39. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  40. package/build/components/canvas-loader/index.js +4 -4
  41. package/build/components/canvas-loader/index.js.map +1 -1
  42. package/build/components/code-editor/index.js +8 -7
  43. package/build/components/code-editor/index.js.map +1 -1
  44. package/build/components/create-template-part-modal/index.js +17 -16
  45. package/build/components/create-template-part-modal/index.js.map +1 -1
  46. package/build/components/dataviews/dataviews.js +61 -0
  47. package/build/components/dataviews/dataviews.js.map +1 -0
  48. package/build/components/dataviews/index.js +21 -0
  49. package/build/components/dataviews/index.js.map +1 -0
  50. package/build/components/dataviews/list-view.js +89 -0
  51. package/build/components/dataviews/list-view.js.map +1 -0
  52. package/build/components/dataviews/pagination.js +89 -0
  53. package/build/components/dataviews/pagination.js.map +1 -0
  54. package/build/components/dataviews/text-filter.js +44 -0
  55. package/build/components/dataviews/text-filter.js.map +1 -0
  56. package/build/components/dataviews/view-actions.js +189 -0
  57. package/build/components/dataviews/view-actions.js.map +1 -0
  58. package/build/components/editor/index.js +15 -14
  59. package/build/components/editor/index.js.map +1 -1
  60. package/build/components/editor-canvas-container/index.js +4 -3
  61. package/build/components/editor-canvas-container/index.js.map +1 -1
  62. package/build/components/error-boundary/index.js +2 -1
  63. package/build/components/error-boundary/index.js.map +1 -1
  64. package/build/components/error-boundary/warning.js +4 -4
  65. package/build/components/error-boundary/warning.js.map +1 -1
  66. package/build/components/global-styles/block-preview-panel.js +5 -4
  67. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  68. package/build/components/global-styles/color-indicator-wrapper.js +2 -2
  69. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  70. package/build/components/global-styles/color-palette-panel.js +5 -5
  71. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  72. package/build/components/global-styles/dimensions-panel.js +3 -2
  73. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  74. package/build/components/global-styles/font-families.js +14 -14
  75. package/build/components/global-styles/font-families.js.map +1 -1
  76. package/build/components/global-styles/font-family-item.js +6 -5
  77. package/build/components/global-styles/font-family-item.js.map +1 -1
  78. package/build/components/global-styles/font-library-modal/collection-font-details.js +6 -6
  79. package/build/components/global-styles/font-library-modal/collection-font-details.js.map +1 -1
  80. package/build/components/global-styles/font-library-modal/collection-font-variant.js +5 -5
  81. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  82. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js +2 -2
  83. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +1 -1
  84. package/build/components/global-styles/font-library-modal/context.js +2 -1
  85. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  86. package/build/components/global-styles/font-library-modal/font-card.js +7 -7
  87. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  88. package/build/components/global-styles/font-library-modal/font-collection.js +17 -16
  89. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  90. package/build/components/global-styles/font-library-modal/font-demo.js +5 -4
  91. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  92. package/build/components/global-styles/font-library-modal/font-variant.js +7 -7
  93. package/build/components/global-styles/font-library-modal/font-variant.js.map +1 -1
  94. package/build/components/global-styles/font-library-modal/fonts-grid.js +8 -7
  95. package/build/components/global-styles/font-library-modal/fonts-grid.js.map +1 -1
  96. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +9 -9
  97. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  98. package/build/components/global-styles/font-library-modal/index.js +7 -6
  99. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  100. package/build/components/global-styles/font-library-modal/installed-fonts.js +17 -16
  101. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  102. package/build/components/global-styles/font-library-modal/library-font-card.js +3 -2
  103. package/build/components/global-styles/font-library-modal/library-font-card.js.map +1 -1
  104. package/build/components/global-styles/font-library-modal/library-font-details.js +6 -6
  105. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  106. package/build/components/global-styles/font-library-modal/library-font-variant.js +5 -4
  107. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  108. package/build/components/global-styles/font-library-modal/local-fonts.js +12 -11
  109. package/build/components/global-styles/font-library-modal/local-fonts.js.map +1 -1
  110. package/build/components/global-styles/font-library-modal/resolvers.js +1 -1
  111. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  112. package/build/components/global-styles/font-library-modal/tab-layout.js +9 -9
  113. package/build/components/global-styles/font-library-modal/tab-layout.js.map +1 -1
  114. package/build/components/global-styles/font-library-modal/upload-fonts.js +3 -3
  115. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  116. package/build/components/global-styles/font-library-modal/utils/index.js +1 -1
  117. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  118. package/build/components/global-styles/global-styles-provider.js +3 -2
  119. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  120. package/build/components/global-styles/gradients-palette-panel.js +8 -8
  121. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  122. package/build/components/global-styles/header.js +7 -7
  123. package/build/components/global-styles/header.js.map +1 -1
  124. package/build/components/global-styles/icon-with-current-color.js +2 -2
  125. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  126. package/build/components/global-styles/navigation-button.js +7 -7
  127. package/build/components/global-styles/navigation-button.js.map +1 -1
  128. package/build/components/global-styles/palette.js +11 -10
  129. package/build/components/global-styles/palette.js.map +1 -1
  130. package/build/components/global-styles/preview.js +17 -16
  131. package/build/components/global-styles/preview.js.map +1 -1
  132. package/build/components/global-styles/root-menu.js +4 -4
  133. package/build/components/global-styles/root-menu.js.map +1 -1
  134. package/build/components/global-styles/screen-block-list.js +10 -9
  135. package/build/components/global-styles/screen-block-list.js.map +1 -1
  136. package/build/components/global-styles/screen-block.js +17 -16
  137. package/build/components/global-styles/screen-block.js.map +1 -1
  138. package/build/components/global-styles/screen-color-palette.js +5 -5
  139. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  140. package/build/components/global-styles/screen-colors.js +5 -5
  141. package/build/components/global-styles/screen-colors.js.map +1 -1
  142. package/build/components/global-styles/screen-css.js +5 -5
  143. package/build/components/global-styles/screen-css.js.map +1 -1
  144. package/build/components/global-styles/screen-layout.js +3 -3
  145. package/build/components/global-styles/screen-layout.js.map +1 -1
  146. package/build/components/global-styles/screen-revisions/index.js +10 -9
  147. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  148. package/build/components/global-styles/screen-revisions/revisions-buttons.js +10 -10
  149. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  150. package/build/components/global-styles/screen-root.js +14 -14
  151. package/build/components/global-styles/screen-root.js.map +1 -1
  152. package/build/components/global-styles/screen-style-variations.js +5 -4
  153. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  154. package/build/components/global-styles/screen-typography-element.js +15 -14
  155. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  156. package/build/components/global-styles/screen-typography.js +5 -5
  157. package/build/components/global-styles/screen-typography.js.map +1 -1
  158. package/build/components/global-styles/style-variations-container.js +8 -7
  159. package/build/components/global-styles/style-variations-container.js.map +1 -1
  160. package/build/components/global-styles/subtitle.js +2 -2
  161. package/build/components/global-styles/subtitle.js.map +1 -1
  162. package/build/components/global-styles/typography-panel.js +2 -2
  163. package/build/components/global-styles/typography-panel.js.map +1 -1
  164. package/build/components/global-styles/typography-preview.js +2 -2
  165. package/build/components/global-styles/typography-preview.js.map +1 -1
  166. package/build/components/global-styles/typogrphy-elements.js +13 -13
  167. package/build/components/global-styles/typogrphy-elements.js.map +1 -1
  168. package/build/components/global-styles/ui.js +41 -40
  169. package/build/components/global-styles/ui.js.map +1 -1
  170. package/build/components/global-styles/variations-panel.js +3 -3
  171. package/build/components/global-styles/variations-panel.js.map +1 -1
  172. package/build/components/header-edit-mode/document-actions/index.js +16 -15
  173. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  174. package/build/components/header-edit-mode/index.js +20 -19
  175. package/build/components/header-edit-mode/index.js.map +1 -1
  176. package/build/components/header-edit-mode/mode-switcher/index.js +3 -3
  177. package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  178. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +2 -2
  179. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  180. package/build/components/header-edit-mode/more-menu/index.js +14 -14
  181. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  182. package/build/components/header-edit-mode/more-menu/site-export.js +2 -2
  183. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  184. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +2 -2
  185. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  186. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
  187. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  188. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -3
  189. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  190. package/build/components/header-edit-mode/tools-more-menu-group/index.js +2 -2
  191. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  192. package/build/components/header-edit-mode/undo-redo/redo.js +3 -2
  193. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  194. package/build/components/header-edit-mode/undo-redo/undo.js +3 -2
  195. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  196. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  197. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  198. package/build/components/keyboard-shortcut-help-modal/index.js +15 -15
  199. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  200. package/build/components/keyboard-shortcut-help-modal/shortcut.js +8 -7
  201. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  202. package/build/components/layout/index.js +15 -14
  203. package/build/components/layout/index.js.map +1 -1
  204. package/build/components/list/added-by.js +9 -8
  205. package/build/components/list/added-by.js.map +1 -1
  206. package/build/components/list/header.js +5 -5
  207. package/build/components/list/header.js.map +1 -1
  208. package/build/components/list/index.js +5 -5
  209. package/build/components/list/index.js.map +1 -1
  210. package/build/components/list/table.js +15 -15
  211. package/build/components/list/table.js.map +1 -1
  212. package/build/components/page/header.js +6 -6
  213. package/build/components/page/header.js.map +1 -1
  214. package/build/components/page/index.js +5 -5
  215. package/build/components/page/index.js.map +1 -1
  216. package/build/components/page-actions/index.js +3 -3
  217. package/build/components/page-actions/index.js.map +1 -1
  218. package/build/components/page-actions/trash-page-menu-item.js +2 -2
  219. package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
  220. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +3 -2
  221. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  222. package/build/components/page-content-focus-manager/edit-template-notification.js +3 -2
  223. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  224. package/build/components/page-content-focus-manager/index.js +35 -4
  225. package/build/components/page-content-focus-manager/index.js.map +1 -1
  226. package/build/components/page-main/index.js +7 -4
  227. package/build/components/page-main/index.js.map +1 -1
  228. package/build/components/page-pages/index.js +174 -0
  229. package/build/components/page-pages/index.js.map +1 -0
  230. package/build/components/page-patterns/duplicate-menu-item.js +2 -2
  231. package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
  232. package/build/components/page-patterns/grid-item.js +21 -20
  233. package/build/components/page-patterns/grid-item.js.map +1 -1
  234. package/build/components/page-patterns/grid.js +3 -3
  235. package/build/components/page-patterns/grid.js.map +1 -1
  236. package/build/components/page-patterns/header.js +4 -4
  237. package/build/components/page-patterns/header.js.map +1 -1
  238. package/build/components/page-patterns/index.js +4 -4
  239. package/build/components/page-patterns/index.js.map +1 -1
  240. package/build/components/page-patterns/no-patterns.js +2 -2
  241. package/build/components/page-patterns/no-patterns.js.map +1 -1
  242. package/build/components/page-patterns/pagination.js +10 -10
  243. package/build/components/page-patterns/pagination.js.map +1 -1
  244. package/build/components/page-patterns/patterns-list.js +15 -14
  245. package/build/components/page-patterns/patterns-list.js.map +1 -1
  246. package/build/components/page-patterns/rename-menu-item.js +10 -9
  247. package/build/components/page-patterns/rename-menu-item.js.map +1 -1
  248. package/build/components/page-template-parts/add-new-template-part.js +4 -3
  249. package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
  250. package/build/components/page-template-parts/index.js +9 -9
  251. package/build/components/page-template-parts/index.js.map +1 -1
  252. package/build/components/page-templates/index.js +10 -10
  253. package/build/components/page-templates/index.js.map +1 -1
  254. package/build/components/plugin-template-setting-panel/index.js +1 -1
  255. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  256. package/build/components/preferences-modal/enable-feature.js +2 -2
  257. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  258. package/build/components/preferences-modal/index.js +12 -11
  259. package/build/components/preferences-modal/index.js.map +1 -1
  260. package/build/components/resizable-frame/index.js +7 -6
  261. package/build/components/resizable-frame/index.js.map +1 -1
  262. package/build/components/revisions/index.js +9 -8
  263. package/build/components/revisions/index.js.map +1 -1
  264. package/build/components/routes/link.js +2 -2
  265. package/build/components/routes/link.js.map +1 -1
  266. package/build/components/save-button/index.js +2 -2
  267. package/build/components/save-button/index.js.map +1 -1
  268. package/build/components/save-hub/index.js +4 -4
  269. package/build/components/save-hub/index.js.map +1 -1
  270. package/build/components/save-panel/index.js +11 -11
  271. package/build/components/save-panel/index.js.map +1 -1
  272. package/build/components/secondary-sidebar/inserter-sidebar.js +7 -6
  273. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  274. package/build/components/secondary-sidebar/list-view-sidebar.js +7 -6
  275. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  276. package/build/components/sidebar/index.js +23 -14
  277. package/build/components/sidebar/index.js.map +1 -1
  278. package/build/components/sidebar-button/index.js +2 -2
  279. package/build/components/sidebar-button/index.js.map +1 -1
  280. package/build/components/sidebar-edit-mode/default-sidebar.js +3 -3
  281. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  282. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +8 -7
  283. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  284. package/build/components/sidebar-edit-mode/index.js +6 -5
  285. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  286. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +20 -10
  287. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  288. package/build/components/sidebar-edit-mode/page-panels/index.js +7 -7
  289. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  290. package/build/components/sidebar-edit-mode/page-panels/page-content.js +3 -2
  291. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  292. package/build/components/sidebar-edit-mode/page-panels/page-status.js +21 -20
  293. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  294. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
  295. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  296. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +7 -6
  297. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  298. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js +2 -2
  299. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  300. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js +7 -6
  301. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  302. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -2
  303. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  304. package/build/components/sidebar-edit-mode/settings-header/index.js +3 -3
  305. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  306. package/build/components/sidebar-edit-mode/sidebar-card/index.js +7 -7
  307. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  308. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +2 -2
  309. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  310. package/build/components/sidebar-edit-mode/template-panel/hooks.js +71 -0
  311. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -0
  312. package/build/components/sidebar-edit-mode/template-panel/index.js +5 -5
  313. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  314. package/build/components/sidebar-edit-mode/template-panel/last-revision.js +5 -5
  315. package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  316. package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js +4 -3
  317. package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js.map +1 -1
  318. package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js +83 -0
  319. package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +1 -0
  320. package/build/components/sidebar-edit-mode/template-panel/template-actions.js +12 -5
  321. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  322. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +7 -7
  323. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  324. package/build/components/sidebar-navigation-item/index.js +5 -5
  325. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  326. package/build/components/sidebar-navigation-screen/index.js +11 -11
  327. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  328. package/build/components/sidebar-navigation-screen-details-footer/index.js +8 -7
  329. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  330. package/build/components/sidebar-navigation-screen-details-panel/index.js +3 -3
  331. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  332. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +2 -2
  333. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  334. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
  335. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  336. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +2 -2
  337. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  338. package/build/components/sidebar-navigation-screen-global-styles/index.js +12 -11
  339. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  340. package/build/components/sidebar-navigation-screen-main/index.js +9 -8
  341. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  342. package/build/components/sidebar-navigation-screen-main/template-part-hint.js +2 -2
  343. package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  344. package/build/components/sidebar-navigation-screen-navigation-item/index.js +4 -4
  345. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  346. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
  347. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  348. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -2
  349. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  350. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -7
  351. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  352. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +8 -7
  353. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  354. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +4 -3
  355. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  356. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +9 -8
  357. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  358. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +5 -5
  359. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  360. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +8 -8
  361. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  362. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +7 -6
  363. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  364. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +5 -4
  365. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  366. package/build/components/sidebar-navigation-screen-page/index.js +11 -11
  367. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  368. package/build/components/sidebar-navigation-screen-page/page-details.js +6 -6
  369. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  370. package/build/components/sidebar-navigation-screen-page/status-label.js +5 -4
  371. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  372. package/build/components/sidebar-navigation-screen-pages/index.js +26 -17
  373. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  374. package/build/components/sidebar-navigation-screen-pattern/index.js +4 -4
  375. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  376. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +5 -3
  377. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  378. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +3 -3
  379. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  380. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +6 -4
  381. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  382. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -4
  383. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  384. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +10 -3
  385. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  386. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +7 -7
  387. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  388. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -3
  389. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  390. package/build/components/sidebar-navigation-screen-patterns/index.js +14 -14
  391. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  392. package/build/components/sidebar-navigation-screen-template/home-template-details.js +13 -12
  393. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  394. package/build/components/sidebar-navigation-screen-template/index.js +12 -12
  395. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  396. package/build/components/sidebar-navigation-screen-templates/index.js +6 -6
  397. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  398. package/build/components/sidebar-navigation-screen-templates-browse/index.js +2 -2
  399. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  400. package/build/components/site-hub/index.js +12 -11
  401. package/build/components/site-hub/index.js.map +1 -1
  402. package/build/components/site-icon/index.js +5 -5
  403. package/build/components/site-icon/index.js.map +1 -1
  404. package/build/components/start-template-options/index.js +10 -9
  405. package/build/components/start-template-options/index.js.map +1 -1
  406. package/build/components/style-book/index.js +19 -18
  407. package/build/components/style-book/index.js.map +1 -1
  408. package/build/components/table/index.js +6 -6
  409. package/build/components/table/index.js.map +1 -1
  410. package/build/components/template-actions/index.js +8 -7
  411. package/build/components/template-actions/index.js.map +1 -1
  412. package/build/components/template-actions/rename-menu-item.js +10 -9
  413. package/build/components/template-actions/rename-menu-item.js.map +1 -1
  414. package/build/components/template-part-converter/convert-to-regular.js +2 -2
  415. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  416. package/build/components/template-part-converter/convert-to-template-part.js +4 -3
  417. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  418. package/build/components/template-part-converter/index.js +5 -5
  419. package/build/components/template-part-converter/index.js.map +1 -1
  420. package/build/components/welcome-guide/editor.js +8 -7
  421. package/build/components/welcome-guide/editor.js.map +1 -1
  422. package/build/components/welcome-guide/image.js +4 -4
  423. package/build/components/welcome-guide/image.js.map +1 -1
  424. package/build/components/welcome-guide/index.js +2 -2
  425. package/build/components/welcome-guide/index.js.map +1 -1
  426. package/build/components/welcome-guide/page.js +6 -6
  427. package/build/components/welcome-guide/page.js.map +1 -1
  428. package/build/components/welcome-guide/styles.js +15 -15
  429. package/build/components/welcome-guide/styles.js.map +1 -1
  430. package/build/components/welcome-guide/template.js +6 -6
  431. package/build/components/welcome-guide/template.js.map +1 -1
  432. package/build/hooks/commands/use-common-commands.js +2 -2
  433. package/build/hooks/commands/use-common-commands.js.map +1 -1
  434. package/build/hooks/navigation-menu-edit.js +5 -5
  435. package/build/hooks/navigation-menu-edit.js.map +1 -1
  436. package/build/hooks/push-changes-to-global-styles/index.js +6 -5
  437. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  438. package/build/hooks/template-part-edit.js +5 -5
  439. package/build/hooks/template-part-edit.js.map +1 -1
  440. package/build/index.js +3 -2
  441. package/build/index.js.map +1 -1
  442. package/build/utils/constants.js +1 -1
  443. package/build/utils/constants.js.map +1 -1
  444. package/build/utils/get-is-list-page.js +1 -1
  445. package/build/utils/get-is-list-page.js.map +1 -1
  446. package/build-module/components/add-new-page/index.js +1 -1
  447. package/build-module/components/add-new-pattern/index.js +3 -3
  448. package/build-module/components/add-new-pattern/index.js.map +1 -1
  449. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -1
  450. package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -1
  451. package/build-module/components/add-new-template/index.js +1 -1
  452. package/build-module/components/add-new-template/new-template.js +1 -1
  453. package/build-module/components/add-new-template/template-actions-loading-screen.js +1 -1
  454. package/build-module/components/app/index.js +1 -1
  455. package/build-module/components/block-editor/back-button.js +1 -1
  456. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js +9 -5
  457. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +1 -1
  458. package/build-module/components/block-editor/block-editor-provider/index.js +1 -1
  459. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +1 -1
  460. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js +19 -11
  461. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +1 -1
  462. package/build-module/components/block-editor/block-inspector-button.js +1 -1
  463. package/build-module/components/block-editor/editor-canvas.js +1 -1
  464. package/build-module/components/block-editor/index.js +1 -1
  465. package/build-module/components/block-editor/resizable-editor.js +1 -1
  466. package/build-module/components/block-editor/resize-handle.js +1 -1
  467. package/build-module/components/block-editor/site-editor-canvas.js +1 -1
  468. package/build-module/components/canvas-loader/index.js +1 -1
  469. package/build-module/components/code-editor/index.js +1 -1
  470. package/build-module/components/create-template-part-modal/index.js +1 -1
  471. package/build-module/components/dataviews/dataviews.js +53 -0
  472. package/build-module/components/dataviews/dataviews.js.map +1 -0
  473. package/build-module/components/dataviews/index.js +3 -0
  474. package/build-module/components/dataviews/index.js.map +1 -0
  475. package/build-module/components/dataviews/list-view.js +80 -0
  476. package/build-module/components/dataviews/list-view.js.map +1 -0
  477. package/build-module/components/dataviews/pagination.js +83 -0
  478. package/build-module/components/dataviews/pagination.js.map +1 -0
  479. package/build-module/components/dataviews/text-filter.js +36 -0
  480. package/build-module/components/dataviews/text-filter.js.map +1 -0
  481. package/build-module/components/dataviews/view-actions.js +179 -0
  482. package/build-module/components/dataviews/view-actions.js.map +1 -0
  483. package/build-module/components/editor/index.js +1 -1
  484. package/build-module/components/editor-canvas-container/index.js +1 -1
  485. package/build-module/components/error-boundary/index.js +1 -1
  486. package/build-module/components/error-boundary/warning.js +1 -1
  487. package/build-module/components/global-styles/block-preview-panel.js +1 -1
  488. package/build-module/components/global-styles/color-indicator-wrapper.js +1 -1
  489. package/build-module/components/global-styles/color-palette-panel.js +1 -1
  490. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  491. package/build-module/components/global-styles/font-families.js +3 -4
  492. package/build-module/components/global-styles/font-families.js.map +1 -1
  493. package/build-module/components/global-styles/font-family-item.js +1 -1
  494. package/build-module/components/global-styles/font-library-modal/collection-font-details.js +1 -1
  495. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +1 -1
  496. package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js +1 -1
  497. package/build-module/components/global-styles/font-library-modal/context.js +1 -1
  498. package/build-module/components/global-styles/font-library-modal/font-card.js +1 -1
  499. package/build-module/components/global-styles/font-library-modal/font-collection.js +1 -1
  500. package/build-module/components/global-styles/font-library-modal/font-demo.js +1 -1
  501. package/build-module/components/global-styles/font-library-modal/font-variant.js +1 -1
  502. package/build-module/components/global-styles/font-library-modal/fonts-grid.js +1 -1
  503. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -1
  504. package/build-module/components/global-styles/font-library-modal/index.js +1 -1
  505. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  506. package/build-module/components/global-styles/font-library-modal/library-font-card.js +1 -1
  507. package/build-module/components/global-styles/font-library-modal/library-font-details.js +1 -1
  508. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +1 -1
  509. package/build-module/components/global-styles/font-library-modal/local-fonts.js +1 -1
  510. package/build-module/components/global-styles/font-library-modal/resolvers.js +1 -1
  511. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  512. package/build-module/components/global-styles/font-library-modal/tab-layout.js +1 -1
  513. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +1 -1
  514. package/build-module/components/global-styles/font-library-modal/utils/index.js +1 -1
  515. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  516. package/build-module/components/global-styles/global-styles-provider.js +1 -1
  517. package/build-module/components/global-styles/gradients-palette-panel.js +1 -1
  518. package/build-module/components/global-styles/header.js +1 -1
  519. package/build-module/components/global-styles/icon-with-current-color.js +1 -1
  520. package/build-module/components/global-styles/navigation-button.js +1 -1
  521. package/build-module/components/global-styles/palette.js +1 -1
  522. package/build-module/components/global-styles/preview.js +1 -1
  523. package/build-module/components/global-styles/root-menu.js +1 -1
  524. package/build-module/components/global-styles/screen-block-list.js +1 -1
  525. package/build-module/components/global-styles/screen-block.js +1 -1
  526. package/build-module/components/global-styles/screen-color-palette.js +1 -1
  527. package/build-module/components/global-styles/screen-colors.js +1 -1
  528. package/build-module/components/global-styles/screen-css.js +1 -1
  529. package/build-module/components/global-styles/screen-layout.js +1 -1
  530. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  531. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  532. package/build-module/components/global-styles/screen-root.js +1 -1
  533. package/build-module/components/global-styles/screen-style-variations.js +1 -1
  534. package/build-module/components/global-styles/screen-typography-element.js +1 -1
  535. package/build-module/components/global-styles/screen-typography.js +2 -2
  536. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  537. package/build-module/components/global-styles/style-variations-container.js +1 -1
  538. package/build-module/components/global-styles/subtitle.js +1 -1
  539. package/build-module/components/global-styles/typography-panel.js +1 -1
  540. package/build-module/components/global-styles/typography-preview.js +1 -1
  541. package/build-module/components/global-styles/typogrphy-elements.js +1 -1
  542. package/build-module/components/global-styles/ui.js +1 -1
  543. package/build-module/components/global-styles/variations-panel.js +1 -1
  544. package/build-module/components/header-edit-mode/document-actions/index.js +1 -1
  545. package/build-module/components/header-edit-mode/index.js +1 -1
  546. package/build-module/components/header-edit-mode/mode-switcher/index.js +1 -1
  547. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -1
  548. package/build-module/components/header-edit-mode/more-menu/index.js +1 -1
  549. package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -1
  550. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -1
  551. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
  552. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  553. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +2 -2
  554. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  555. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +1 -1
  556. package/build-module/components/header-edit-mode/undo-redo/redo.js +1 -1
  557. package/build-module/components/header-edit-mode/undo-redo/undo.js +1 -1
  558. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  559. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -1
  560. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -1
  561. package/build-module/components/layout/index.js +1 -1
  562. package/build-module/components/list/added-by.js +1 -1
  563. package/build-module/components/list/header.js +1 -1
  564. package/build-module/components/list/index.js +1 -1
  565. package/build-module/components/list/table.js +1 -1
  566. package/build-module/components/page/header.js +1 -1
  567. package/build-module/components/page/index.js +1 -1
  568. package/build-module/components/page-actions/index.js +1 -1
  569. package/build-module/components/page-actions/trash-page-menu-item.js +1 -1
  570. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -1
  571. package/build-module/components/page-content-focus-manager/edit-template-notification.js +1 -1
  572. package/build-module/components/page-content-focus-manager/index.js +34 -4
  573. package/build-module/components/page-content-focus-manager/index.js.map +1 -1
  574. package/build-module/components/page-main/index.js +4 -1
  575. package/build-module/components/page-main/index.js.map +1 -1
  576. package/build-module/components/page-pages/index.js +166 -0
  577. package/build-module/components/page-pages/index.js.map +1 -0
  578. package/build-module/components/page-patterns/duplicate-menu-item.js +1 -1
  579. package/build-module/components/page-patterns/grid-item.js +1 -1
  580. package/build-module/components/page-patterns/grid.js +1 -1
  581. package/build-module/components/page-patterns/header.js +1 -1
  582. package/build-module/components/page-patterns/index.js +1 -1
  583. package/build-module/components/page-patterns/no-patterns.js +1 -1
  584. package/build-module/components/page-patterns/pagination.js +1 -1
  585. package/build-module/components/page-patterns/patterns-list.js +1 -1
  586. package/build-module/components/page-patterns/rename-menu-item.js +1 -1
  587. package/build-module/components/page-template-parts/add-new-template-part.js +1 -1
  588. package/build-module/components/page-template-parts/index.js +1 -1
  589. package/build-module/components/page-templates/index.js +1 -1
  590. package/build-module/components/plugin-template-setting-panel/index.js +1 -1
  591. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  592. package/build-module/components/preferences-modal/enable-feature.js +1 -1
  593. package/build-module/components/preferences-modal/index.js +1 -1
  594. package/build-module/components/resizable-frame/index.js +1 -1
  595. package/build-module/components/revisions/index.js +1 -1
  596. package/build-module/components/routes/link.js +1 -1
  597. package/build-module/components/save-button/index.js +1 -1
  598. package/build-module/components/save-hub/index.js +1 -1
  599. package/build-module/components/save-panel/index.js +1 -1
  600. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -1
  601. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -1
  602. package/build-module/components/sidebar/index.js +10 -2
  603. package/build-module/components/sidebar/index.js.map +1 -1
  604. package/build-module/components/sidebar-button/index.js +1 -1
  605. package/build-module/components/sidebar-edit-mode/default-sidebar.js +1 -1
  606. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -1
  607. package/build-module/components/sidebar-edit-mode/index.js +1 -1
  608. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +15 -5
  609. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  610. package/build-module/components/sidebar-edit-mode/page-panels/index.js +1 -1
  611. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -1
  612. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +1 -1
  613. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +1 -1
  614. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +1 -1
  615. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js +1 -1
  616. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js +1 -1
  617. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +1 -1
  618. package/build-module/components/sidebar-edit-mode/settings-header/index.js +1 -1
  619. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -1
  620. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  621. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +64 -0
  622. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -0
  623. package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -1
  624. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +1 -1
  625. package/build-module/components/sidebar-edit-mode/template-panel/pattern-categories.js +1 -1
  626. package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js +76 -0
  627. package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +1 -0
  628. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +11 -4
  629. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  630. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -1
  631. package/build-module/components/sidebar-navigation-item/index.js +1 -1
  632. package/build-module/components/sidebar-navigation-screen/index.js +1 -1
  633. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +1 -1
  634. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -1
  635. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -1
  636. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -1
  637. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -1
  638. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  639. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -1
  640. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +1 -1
  641. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  642. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +1 -1
  643. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +1 -1
  644. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +1 -1
  645. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +1 -1
  646. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  647. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -1
  648. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  649. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  650. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +1 -1
  651. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -1
  652. package/build-module/components/sidebar-navigation-screen-page/index.js +1 -1
  653. package/build-module/components/sidebar-navigation-screen-page/page-details.js +1 -1
  654. package/build-module/components/sidebar-navigation-screen-page/status-label.js +1 -1
  655. package/build-module/components/sidebar-navigation-screen-pages/index.js +13 -5
  656. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  657. package/build-module/components/sidebar-navigation-screen-pattern/index.js +1 -1
  658. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +4 -2
  659. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  660. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -1
  661. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +4 -2
  662. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  663. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +1 -1
  664. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +8 -2
  665. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  666. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  667. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +1 -1
  668. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -1
  669. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +1 -1
  670. package/build-module/components/sidebar-navigation-screen-template/index.js +1 -1
  671. package/build-module/components/sidebar-navigation-screen-templates/index.js +1 -1
  672. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +1 -1
  673. package/build-module/components/site-hub/index.js +1 -1
  674. package/build-module/components/site-icon/index.js +1 -1
  675. package/build-module/components/start-template-options/index.js +4 -4
  676. package/build-module/components/start-template-options/index.js.map +1 -1
  677. package/build-module/components/style-book/index.js +1 -1
  678. package/build-module/components/table/index.js +1 -1
  679. package/build-module/components/template-actions/index.js +1 -1
  680. package/build-module/components/template-actions/rename-menu-item.js +1 -1
  681. package/build-module/components/template-part-converter/convert-to-regular.js +1 -1
  682. package/build-module/components/template-part-converter/convert-to-template-part.js +1 -1
  683. package/build-module/components/template-part-converter/index.js +1 -1
  684. package/build-module/components/welcome-guide/editor.js +1 -1
  685. package/build-module/components/welcome-guide/image.js +1 -1
  686. package/build-module/components/welcome-guide/index.js +1 -1
  687. package/build-module/components/welcome-guide/page.js +1 -1
  688. package/build-module/components/welcome-guide/styles.js +1 -1
  689. package/build-module/components/welcome-guide/template.js +1 -1
  690. package/build-module/hooks/commands/use-common-commands.js +4 -4
  691. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  692. package/build-module/hooks/navigation-menu-edit.js +1 -1
  693. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -1
  694. package/build-module/hooks/template-part-edit.js +1 -1
  695. package/build-module/index.js +1 -1
  696. package/build-module/utils/constants.js +1 -1
  697. package/build-module/utils/constants.js.map +1 -1
  698. package/build-module/utils/get-is-list-page.js +1 -1
  699. package/build-module/utils/get-is-list-page.js.map +1 -1
  700. package/build-style/style-rtl.css +77 -16
  701. package/build-style/style.css +77 -16
  702. package/package.json +41 -40
  703. package/src/components/add-new-pattern/index.js +2 -2
  704. package/src/components/block-editor/block-editor-provider/default-block-editor-provider.js +10 -5
  705. package/src/components/block-editor/block-editor-provider/test/use-page-content-blocks.js +33 -4
  706. package/src/components/block-editor/block-editor-provider/use-page-content-blocks.js +27 -14
  707. package/src/components/dataviews/dataviews.js +60 -0
  708. package/src/components/dataviews/index.js +2 -0
  709. package/src/components/dataviews/list-view.js +106 -0
  710. package/src/components/dataviews/pagination.js +118 -0
  711. package/src/components/dataviews/style.scss +36 -0
  712. package/src/components/dataviews/text-filter.js +37 -0
  713. package/src/components/dataviews/view-actions.js +246 -0
  714. package/src/components/global-styles/font-families.js +1 -5
  715. package/src/components/global-styles/font-library-modal/resolvers.js +1 -1
  716. package/src/components/global-styles/font-library-modal/utils/index.js +1 -1
  717. package/src/components/global-styles/font-library-modal/utils/test/makeFormDataFromFontFamilies.spec.js +1 -1
  718. package/src/components/global-styles/screen-typography.js +3 -4
  719. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
  720. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +1 -1
  721. package/src/components/page-content-focus-manager/index.js +29 -4
  722. package/src/components/page-main/index.js +3 -0
  723. package/src/components/page-pages/index.js +190 -0
  724. package/src/components/plugin-template-setting-panel/index.js +1 -1
  725. package/src/components/sidebar/index.js +11 -0
  726. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +31 -16
  727. package/src/components/sidebar-edit-mode/template-panel/hooks.js +97 -0
  728. package/src/components/sidebar-edit-mode/template-panel/replace-template-button.js +89 -0
  729. package/src/components/sidebar-edit-mode/template-panel/style.scss +18 -0
  730. package/src/components/sidebar-edit-mode/template-panel/template-actions.js +27 -12
  731. package/src/components/sidebar-navigation-screen-pages/index.js +11 -4
  732. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +3 -1
  733. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +3 -1
  734. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +11 -5
  735. package/src/components/start-template-options/index.js +3 -3
  736. package/src/hooks/commands/use-common-commands.js +12 -4
  737. package/src/style.scss +1 -0
  738. package/src/utils/constants.js +1 -1
  739. package/src/utils/get-is-list-page.js +3 -2
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = SidebarNavigationScreenTemplates;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _components = require("@wordpress/components");
10
10
  var _i18n = require("@wordpress/i18n");
11
11
  var _coreData = require("@wordpress/core-data");
@@ -34,7 +34,7 @@ const TemplateItem = ({
34
34
  postType,
35
35
  postId
36
36
  });
37
- return (0, _element.createElement)(_sidebarNavigationItem.default, {
37
+ return (0, _react.createElement)(_sidebarNavigationItem.default, {
38
38
  ...linkInfo,
39
39
  ...props
40
40
  });
@@ -53,22 +53,22 @@ function SidebarNavigationScreenTemplates() {
53
53
  path: '/wp_template/all'
54
54
  });
55
55
  const canCreate = !isMobileViewport;
56
- return (0, _element.createElement)(_sidebarNavigationScreen.default, {
56
+ return (0, _react.createElement)(_sidebarNavigationScreen.default, {
57
57
  title: (0, _i18n.__)('Templates'),
58
58
  description: (0, _i18n.__)('Express the layout of your site with templates.'),
59
- actions: canCreate && (0, _element.createElement)(_addNewTemplate.default, {
59
+ actions: canCreate && (0, _react.createElement)(_addNewTemplate.default, {
60
60
  templateType: _constants.TEMPLATE_POST_TYPE,
61
61
  toggleProps: {
62
62
  as: _sidebarButton.default
63
63
  }
64
64
  }),
65
- content: (0, _element.createElement)(_element.Fragment, null, isLoading && (0, _i18n.__)('Loading templates…'), !isLoading && (0, _element.createElement)(_components.__experimentalItemGroup, null, !templates?.length && (0, _element.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('No templates found')), sortedTemplates.map(template => (0, _element.createElement)(TemplateItem, {
65
+ content: (0, _react.createElement)(_react.Fragment, null, isLoading && (0, _i18n.__)('Loading templates…'), !isLoading && (0, _react.createElement)(_components.__experimentalItemGroup, null, !templates?.length && (0, _react.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('No templates found')), sortedTemplates.map(template => (0, _react.createElement)(TemplateItem, {
66
66
  postType: _constants.TEMPLATE_POST_TYPE,
67
67
  postId: template.id,
68
68
  key: template.id,
69
69
  withChevron: true
70
70
  }, (0, _htmlEntities.decodeEntities)(template.title?.rendered || template.slug))))),
71
- footer: !isMobileViewport && (0, _element.createElement)(_sidebarNavigationItem.default, {
71
+ footer: !isMobileViewport && (0, _react.createElement)(_sidebarNavigationItem.default, {
72
72
  withChevron: true,
73
73
  ...browseAllLink
74
74
  }, (0, _i18n.__)('Manage all templates'))
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_coreData","_htmlEntities","_compose","_sidebarNavigationScreen","_interopRequireDefault","_link","_sidebarNavigationItem","_addNewTemplate","_sidebarButton","_constants","TemplateItem","postType","postId","props","linkInfo","useLink","_element","createElement","default","SidebarNavigationScreenTemplates","isMobileViewport","useViewportMatch","records","templates","isResolving","isLoading","useEntityRecords","TEMPLATE_POST_TYPE","per_page","sortedTemplates","sort","a","b","title","rendered","localeCompare","browseAllLink","path","canCreate","__","description","actions","templateType","toggleProps","as","SidebarButton","content","Fragment","__experimentalItemGroup","length","__experimentalItem","map","template","id","key","withChevron","decodeEntities","slug","footer"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-templates/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport AddNewTemplate from '../add-new-template';\nimport SidebarButton from '../sidebar-button';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst TemplateItem = ( { postType, postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostType,\n\t\tpostId,\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n\nexport default function SidebarNavigationScreenTemplates() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\n\tconst { records: templates, isResolving: isLoading } = useEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_POST_TYPE,\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst sortedTemplates = templates ? [ ...templates ] : [];\n\tsortedTemplates.sort( ( a, b ) =>\n\t\ta.title.rendered.localeCompare( b.title.rendered )\n\t);\n\n\tconst browseAllLink = useLink( { path: '/wp_template/all' } );\n\tconst canCreate = ! isMobileViewport;\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Express the layout of your site with templates.'\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\tcanCreate && (\n\t\t\t\t\t<AddNewTemplate\n\t\t\t\t\t\ttemplateType={ TEMPLATE_POST_TYPE }\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\tas: SidebarButton,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading templates…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t{ ! templates?.length && (\n\t\t\t\t\t\t\t\t<Item>{ __( 'No templates found' ) }</Item>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ sortedTemplates.map( ( template ) => (\n\t\t\t\t\t\t\t\t<TemplateItem\n\t\t\t\t\t\t\t\t\tpostType={ TEMPLATE_POST_TYPE }\n\t\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\t\tkey={ template.id }\n\t\t\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\ttemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</TemplateItem>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<SidebarNavigationItem withChevron { ...browseAllLink }>\n\t\t\t\t\t\t{ __( 'Manage all templates' ) }\n\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t)\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,wBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,eAAA,GAAAH,sBAAA,CA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;IACHE,OAAO,EACNH,SAAS,IACR,IAAAtB,QAAA,CAAAC,aAAA,EAACV,eAAA,CAAAW,OAAc;MACdwB,YAAY,EAAGf,6BAAoB;MACnCgB,WAAW,EAAG;QACbC,EAAE,EAAEC;MACL;IAAG,CACH,CAEF;IACDC,OAAO,EACN,IAAA9B,QAAA,CAAAC,aAAA,EAAAD,QAAA,CAAA+B,QAAA,QACGtB,SAAS,IAAI,IAAAc,QAAE,EAAE,oBAAqB,CAAC,EACvC,CAAEd,SAAS,IACZ,IAAAT,QAAA,CAAAC,aAAA,EAACpB,WAAA,CAAAmD,uBAAS,QACP,CAAEzB,SAAS,EAAE0B,MAAM,IACpB,IAAAjC,QAAA,CAAAC,aAAA,EAACpB,WAAA,CAAAqD,kBAAI,QAAG,IAAAX,QAAE,EAAE,oBAAqB,CAAS,CAC1C,EACCV,eAAe,CAACsB,GAAG,CAAIC,QAAQ,IAChC,IAAApC,QAAA,CAAAC,aAAA,EAACP,YAAY;MACZC,QAAQ,EAAGgB,6BAAoB;MAC/Bf,MAAM,EAAGwC,QAAQ,CAACC,EAAI;MACtBC,GAAG,EAAGF,QAAQ,CAACC,EAAI;MACnBE,WAAW;IAAA,GAET,IAAAC,4BAAc,EACfJ,QAAQ,CAACnB,KAAK,EAAEC,QAAQ,IACvBkB,QAAQ,CAACK,IACX,CACa,CACb,CACQ,CAEX,CACF;IACDC,MAAM,EACL,CAAEtC,gBAAgB,IACjB,IAAAJ,QAAA,CAAAC,aAAA,EAACX,sBAAA,CAAAY,OAAqB;MAACqC,WAAW;MAAA,GAAMnB;IAAa,GAClD,IAAAG,QAAE,EAAE,sBAAuB,CACP;EAExB,CACD,CAAC;AAEJ"}
1
+ {"version":3,"names":["_components","require","_i18n","_coreData","_htmlEntities","_compose","_sidebarNavigationScreen","_interopRequireDefault","_link","_sidebarNavigationItem","_addNewTemplate","_sidebarButton","_constants","TemplateItem","postType","postId","props","linkInfo","useLink","_react","createElement","default","SidebarNavigationScreenTemplates","isMobileViewport","useViewportMatch","records","templates","isResolving","isLoading","useEntityRecords","TEMPLATE_POST_TYPE","per_page","sortedTemplates","sort","a","b","title","rendered","localeCompare","browseAllLink","path","canCreate","__","description","actions","templateType","toggleProps","as","SidebarButton","content","Fragment","__experimentalItemGroup","length","__experimentalItem","map","template","id","key","withChevron","decodeEntities","slug","footer"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-templates/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport AddNewTemplate from '../add-new-template';\nimport SidebarButton from '../sidebar-button';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst TemplateItem = ( { postType, postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostType,\n\t\tpostId,\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n\nexport default function SidebarNavigationScreenTemplates() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\n\tconst { records: templates, isResolving: isLoading } = useEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_POST_TYPE,\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst sortedTemplates = templates ? [ ...templates ] : [];\n\tsortedTemplates.sort( ( a, b ) =>\n\t\ta.title.rendered.localeCompare( b.title.rendered )\n\t);\n\n\tconst browseAllLink = useLink( { path: '/wp_template/all' } );\n\tconst canCreate = ! isMobileViewport;\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Express the layout of your site with templates.'\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\tcanCreate && (\n\t\t\t\t\t<AddNewTemplate\n\t\t\t\t\t\ttemplateType={ TEMPLATE_POST_TYPE }\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\tas: SidebarButton,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading templates…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t{ ! templates?.length && (\n\t\t\t\t\t\t\t\t<Item>{ __( 'No templates found' ) }</Item>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ sortedTemplates.map( ( template ) => (\n\t\t\t\t\t\t\t\t<TemplateItem\n\t\t\t\t\t\t\t\t\tpostType={ TEMPLATE_POST_TYPE }\n\t\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\t\tkey={ template.id }\n\t\t\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\ttemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</TemplateItem>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<SidebarNavigationItem withChevron { ...browseAllLink }>\n\t\t\t\t\t\t{ __( 'Manage all templates' ) }\n\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t)\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAA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,CAAAY,OAAqB;MAACqC,WAAW;MAAA,GAAMnB;IAAa,GAClD,IAAAG,QAAE,EAAE,sBAAuB,CACP;EAExB,CACD,CAAC;AAEJ"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = SidebarNavigationScreenTemplatesBrowse;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _i18n = require("@wordpress/i18n");
10
10
  var _data = require("@wordpress/data");
11
11
  var _components = require("@wordpress/components");
@@ -50,7 +50,7 @@ function SidebarNavigationScreenTemplatesBrowse() {
50
50
  const isTemplatePartsMode = (0, _data.useSelect)(select => {
51
51
  return !!select(_store.store).getSettings().supportsTemplatePartsMode;
52
52
  }, []);
53
- return (0, _element.createElement)(_sidebarNavigationScreen.default
53
+ return (0, _react.createElement)(_sidebarNavigationScreen.default
54
54
  // If a classic theme that supports template parts has never
55
55
  // accessed the Patterns page, return to the dashboard.
56
56
  , {
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_components","_router","_sidebarNavigationScreen","_interopRequireDefault","_store","_constants","_lockUnlock","config","TEMPLATE_POST_TYPE","title","__","description","TEMPLATE_PART_POST_TYPE","backPath","useLocation","unlock","routerPrivateApis","SidebarNavigationScreenTemplatesBrowse","params","postType","useNavigator","didAccessPatternsPage","isTemplatePartsMode","useSelect","select","editSiteStore","getSettings","supportsTemplatePartsMode","_element","createElement","default","isRoot"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-templates-browse/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst config = {\n\t[ TEMPLATE_POST_TYPE ]: {\n\t\ttitle: __( 'All templates' ),\n\t\tdescription: __(\n\t\t\t'Create new templates, or reset any customizations made to the templates supplied by your theme.'\n\t\t),\n\t},\n\t[ TEMPLATE_PART_POST_TYPE ]: {\n\t\ttitle: __( 'All template parts' ),\n\t\tdescription: __(\n\t\t\t'Create new template parts, or reset any customizations made to the template parts supplied by your theme.'\n\t\t),\n\t\tbackPath: '/patterns',\n\t},\n};\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreenTemplatesBrowse() {\n\tconst {\n\t\tparams: { postType },\n\t} = useNavigator();\n\tconst {\n\t\tparams: { didAccessPatternsPage },\n\t} = useLocation();\n\n\tconst isTemplatePartsMode = useSelect( ( select ) => {\n\t\treturn !! select( editSiteStore ).getSettings()\n\t\t\t.supportsTemplatePartsMode;\n\t}, [] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\t// If a classic theme that supports template parts has never\n\t\t\t// accessed the Patterns page, return to the dashboard.\n\t\t\tisRoot={ isTemplatePartsMode && ! didAccessPatternsPage }\n\t\t\ttitle={ config[ postType ].title }\n\t\t\tdescription={ config[ postType ].description }\n\t\t\tbackPath={ config[ postType ].backPath }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,wBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAIA,IAAAQ,WAAA,GAAAR,OAAA;AAjBA;AACA;AACA;;AAMA;AACA;AACA;;AASA,MAAMS,MAAM,GAAG;EACd,CAAEC,6BAAkB,GAAI;IACvBC,KAAK,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC;IAC5BC,WAAW,EAAE,IAAAD,QAAE,EACd,iGACD;EACD,CAAC;EACD,CAAEE,kCAAuB,GAAI;IAC5BH,KAAK,EAAE,IAAAC,QAAE,EAAE,oBAAqB,CAAC;IACjCC,WAAW,EAAE,IAAAD,QAAE,EACd,2GACD,CAAC;IACDG,QAAQ,EAAE;EACX;AACD,CAAC;AAED,MAAM;EAAEC;AAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEpC,SAASC,sCAAsCA,CAAA,EAAG;EAChE,MAAM;IACLC,MAAM,EAAE;MAAEC;IAAS;EACpB,CAAC,GAAG,IAAAC,sCAAY,EAAC,CAAC;EAClB,MAAM;IACLF,MAAM,EAAE;MAAEG;IAAsB;EACjC,CAAC,GAAGP,WAAW,CAAC,CAAC;EAEjB,MAAMQ,mBAAmB,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACpD,OAAO,CAAC,CAAEA,MAAM,CAAEC,YAAc,CAAC,CAACC,WAAW,CAAC,CAAC,CAC7CC,yBAAyB;EAC5B,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAC,QAAA,CAAAC,aAAA,EAAC3B,wBAAA,CAAA4B;EACA;EACA;EAAA;IACAC,MAAM,EAAGT,mBAAmB,IAAI,CAAED,qBAAuB;IACzDZ,KAAK,EAAGF,MAAM,CAAEY,QAAQ,CAAE,CAACV,KAAO;IAClCE,WAAW,EAAGJ,MAAM,CAAEY,QAAQ,CAAE,CAACR,WAAa;IAC9CE,QAAQ,EAAGN,MAAM,CAAEY,QAAQ,CAAE,CAACN;EAAU,CACxC,CAAC;AAEJ"}
1
+ {"version":3,"names":["_i18n","require","_data","_components","_router","_sidebarNavigationScreen","_interopRequireDefault","_store","_constants","_lockUnlock","config","TEMPLATE_POST_TYPE","title","__","description","TEMPLATE_PART_POST_TYPE","backPath","useLocation","unlock","routerPrivateApis","SidebarNavigationScreenTemplatesBrowse","params","postType","useNavigator","didAccessPatternsPage","isTemplatePartsMode","useSelect","select","editSiteStore","getSettings","supportsTemplatePartsMode","_react","createElement","default","isRoot"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-templates-browse/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst config = {\n\t[ TEMPLATE_POST_TYPE ]: {\n\t\ttitle: __( 'All templates' ),\n\t\tdescription: __(\n\t\t\t'Create new templates, or reset any customizations made to the templates supplied by your theme.'\n\t\t),\n\t},\n\t[ TEMPLATE_PART_POST_TYPE ]: {\n\t\ttitle: __( 'All template parts' ),\n\t\tdescription: __(\n\t\t\t'Create new template parts, or reset any customizations made to the template parts supplied by your theme.'\n\t\t),\n\t\tbackPath: '/patterns',\n\t},\n};\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreenTemplatesBrowse() {\n\tconst {\n\t\tparams: { postType },\n\t} = useNavigator();\n\tconst {\n\t\tparams: { didAccessPatternsPage },\n\t} = useLocation();\n\n\tconst isTemplatePartsMode = useSelect( ( select ) => {\n\t\treturn !! select( editSiteStore ).getSettings()\n\t\t\t.supportsTemplatePartsMode;\n\t}, [] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\t// If a classic theme that supports template parts has never\n\t\t\t// accessed the Patterns page, return to the dashboard.\n\t\t\tisRoot={ isTemplatePartsMode && ! didAccessPatternsPage }\n\t\t\ttitle={ config[ postType ].title }\n\t\t\tdescription={ config[ postType ].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;EAAA;IACAC,MAAM,EAAGT,mBAAmB,IAAI,CAAED,qBAAuB;IACzDZ,KAAK,EAAGF,MAAM,CAAEY,QAAQ,CAAE,CAACV,KAAO;IAClCE,WAAW,EAAGJ,MAAM,CAAEY,QAAQ,CAAE,CAACR,WAAa;IAC9CE,QAAQ,EAAGN,MAAM,CAAEY,QAAQ,CAAE,CAACN;EAAU,CACxC,CAAC;AAEJ"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _data = require("@wordpress/data");
11
11
  var _components = require("@wordpress/components");
@@ -14,6 +14,7 @@ var _i18n = require("@wordpress/i18n");
14
14
  var _blockEditor = require("@wordpress/block-editor");
15
15
  var _coreData = require("@wordpress/core-data");
16
16
  var _htmlEntities = require("@wordpress/html-entities");
17
+ var _element = require("@wordpress/element");
17
18
  var _icons = require("@wordpress/icons");
18
19
  var _commands = require("@wordpress/commands");
19
20
  var _keycodes = require("@wordpress/keycodes");
@@ -87,7 +88,7 @@ const SiteHub = (0, _element.forwardRef)(({
87
88
  }
88
89
  }
89
90
  };
90
- return (0, _element.createElement)(_components.__unstableMotion.div, {
91
+ return (0, _react.createElement)(_components.__unstableMotion.div, {
91
92
  ref: ref,
92
93
  ...restProps,
93
94
  className: (0, _classnames.default)('edit-site-site-hub', restProps.className),
@@ -97,15 +98,15 @@ const SiteHub = (0, _element.forwardRef)(({
97
98
  duration: disableMotion ? 0 : HUB_ANIMATION_DURATION,
98
99
  ease: 'easeOut'
99
100
  }
100
- }, (0, _element.createElement)(_components.__experimentalHStack, {
101
+ }, (0, _react.createElement)(_components.__experimentalHStack, {
101
102
  justify: "space-between",
102
103
  alignment: "center",
103
104
  className: "edit-site-site-hub__container"
104
- }, (0, _element.createElement)(_components.__experimentalHStack, {
105
+ }, (0, _react.createElement)(_components.__experimentalHStack, {
105
106
  justify: "flex-start",
106
107
  className: "edit-site-site-hub__text-content",
107
108
  spacing: "0"
108
- }, (0, _element.createElement)(_components.__unstableMotion.div, {
109
+ }, (0, _react.createElement)(_components.__unstableMotion.div, {
109
110
  className: (0, _classnames.default)('edit-site-site-hub__view-mode-toggle-container', {
110
111
  'has-transparent-background': isTransparent
111
112
  }),
@@ -115,10 +116,10 @@ const SiteHub = (0, _element.forwardRef)(({
115
116
  duration: disableMotion ? 0 : HUB_ANIMATION_DURATION,
116
117
  ease: 'easeOut'
117
118
  }
118
- }, (0, _element.createElement)(_components.Button, {
119
+ }, (0, _react.createElement)(_components.Button, {
119
120
  ...siteIconButtonProps,
120
121
  className: "edit-site-layout__view-mode-toggle"
121
- }, (0, _element.createElement)(_components.__unstableMotion.div, {
122
+ }, (0, _react.createElement)(_components.__unstableMotion.div, {
122
123
  initial: false,
123
124
  animate: {
124
125
  scale: canvasMode === 'view' ? 0.5 : 1
@@ -131,9 +132,9 @@ const SiteHub = (0, _element.forwardRef)(({
131
132
  duration: disableMotion ? 0 : HUB_ANIMATION_DURATION,
132
133
  ease: 'easeOut'
133
134
  }
134
- }, (0, _element.createElement)(_siteIcon.default, {
135
+ }, (0, _react.createElement)(_siteIcon.default, {
135
136
  className: "edit-site-layout__view-mode-toggle-icon"
136
- })))), (0, _element.createElement)(_components.__unstableAnimatePresence, null, (0, _element.createElement)(_components.__unstableMotion.div, {
137
+ })))), (0, _react.createElement)(_components.__unstableAnimatePresence, null, (0, _react.createElement)(_components.__unstableMotion.div, {
137
138
  layout: canvasMode === 'edit',
138
139
  animate: {
139
140
  opacity: canvasMode === 'view' ? 1 : 0
@@ -150,14 +151,14 @@ const SiteHub = (0, _element.forwardRef)(({
150
151
  ease: 'easeOut',
151
152
  delay: canvasMode === 'view' ? 0.1 : 0
152
153
  }
153
- }, (0, _htmlEntities.decodeEntities)(siteTitle))), canvasMode === 'view' && (0, _element.createElement)(_components.Button, {
154
+ }, (0, _htmlEntities.decodeEntities)(siteTitle))), canvasMode === 'view' && (0, _react.createElement)(_components.Button, {
154
155
  href: homeUrl,
155
156
  target: "_blank",
156
157
  label: (0, _i18n.__)('View site (opens in a new tab)'),
157
158
  "aria-label": (0, _i18n.__)('View site (opens in a new tab)'),
158
159
  icon: _icons.external,
159
160
  className: "edit-site-site-hub__site-view-link"
160
- })), canvasMode === 'view' && (0, _element.createElement)(_components.Button, {
161
+ })), canvasMode === 'view' && (0, _react.createElement)(_components.Button, {
161
162
  className: (0, _classnames.default)('edit-site-site-hub_toggle-command-center', {
162
163
  'is-transparent': isTransparent
163
164
  }),
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_data","_components","_compose","_i18n","_blockEditor","_coreData","_htmlEntities","_icons","_commands","_keycodes","_store","_siteIcon","_lockUnlock","HUB_ANIMATION_DURATION","SiteHub","forwardRef","isTransparent","restProps","ref","canvasMode","dashboardLink","homeUrl","siteTitle","useSelect","select","getCanvasMode","getSettings","unlock","editSiteStore","getSite","getUnstableBase","coreStore","__experimentalDashboardLink","home","title","open","openCommandCenter","useDispatch","commandsStore","disableMotion","useReducedMotion","setCanvasMode","__experimentalSetPreviewDeviceType","setPreviewDeviceType","clearSelectedBlock","blockEditorStore","isBackToDashboardButton","siteIconButtonProps","href","label","__","role","onClick","event","preventDefault","createElement","__unstableMotion","div","className","classnames","initial","transition","type","duration","ease","__experimentalHStack","justify","alignment","spacing","layout","Button","animate","scale","whileHover","default","__unstableAnimatePresence","opacity","exit","delay","decodeEntities","target","icon","external","search","shortcut","displayShortcut","primary","_default","exports"],"sources":["@wordpress/edit-site/src/components/site-hub/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { forwardRef } from '@wordpress/element';\nimport { search, external } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\n\nconst HUB_ANIMATION_DURATION = 0.3;\n\nconst SiteHub = forwardRef( ( { isTransparent, ...restProps }, ref ) => {\n\tconst { canvasMode, dashboardLink, homeUrl, siteTitle } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getSettings } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\n\t\t\tconst {\n\t\t\t\tgetSite,\n\t\t\t\tgetUnstableBase, // Site index.\n\t\t\t} = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tdashboardLink:\n\t\t\t\t\tgetSettings().__experimentalDashboardLink || 'index.php',\n\t\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\t\tsiteTitle: getSite()?.title,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\tconst disableMotion = useReducedMotion();\n\tconst {\n\t\tsetCanvasMode,\n\t\t__experimentalSetPreviewDeviceType: setPreviewDeviceType,\n\t} = unlock( useDispatch( editSiteStore ) );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst isBackToDashboardButton = canvasMode === 'view';\n\tconst siteIconButtonProps = isBackToDashboardButton\n\t\t? {\n\t\t\t\thref: dashboardLink,\n\t\t\t\tlabel: __( 'Go to the Dashboard' ),\n\t\t }\n\t\t: {\n\t\t\t\thref: dashboardLink, // We need to keep the `href` here so the component doesn't remount as a `<button>` and break the animation.\n\t\t\t\trole: 'button',\n\t\t\t\tlabel: __( 'Open Navigation' ),\n\t\t\t\tonClick: ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( canvasMode === 'edit' ) {\n\t\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t\t\tsetPreviewDeviceType( 'Desktop' );\n\t\t\t\t\t\tsetCanvasMode( 'view' );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t };\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ ref }\n\t\t\t{ ...restProps }\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-site-hub',\n\t\t\t\trestProps.className\n\t\t\t) }\n\t\t\tinitial={ false }\n\t\t\ttransition={ {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: disableMotion ? 0 : HUB_ANIMATION_DURATION,\n\t\t\t\tease: 'easeOut',\n\t\t\t} }\n\t\t>\n\t\t\t<HStack\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"edit-site-site-hub__container\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-site-hub__text-content\"\n\t\t\t\t\tspacing=\"0\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlayout\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t: HUB_ANIMATION_DURATION,\n\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t{ ...siteIconButtonProps }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\tinitial={ false }\n\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\tscale: canvasMode === 'view' ? 0.5 : 1,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\twhileHover={ {\n\t\t\t\t\t\t\t\t\tscale: canvasMode === 'view' ? 0.5 : 0.96,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t: HUB_ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ canvasMode === 'edit' }\n\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\topacity: canvasMode === 'view' ? 1 : 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-site-hub__site-title',\n\t\t\t\t\t\t\t\t{ 'is-transparent': isTransparent }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tduration: disableMotion ? 0 : 0.2,\n\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\tdelay: canvasMode === 'view' ? 0.1 : 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t{ canvasMode === 'view' && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t'View site (opens in a new tab)'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__site-view-link\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ canvasMode === 'view' && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-site-hub_toggle-command-center',\n\t\t\t\t\t\t\t{ 'is-transparent': isTransparent }\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</motion.div>\n\t);\n} );\n\nexport default SiteHub;\n"],"mappings":";;;;;;;AAoBA,IAAAA,QAAA,GAAAC,OAAA;AAjBA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,QAAA,GAAAL,O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QAAA,GAEWzE,OAAO;AAAA0E,OAAA,CAAAd,OAAA,GAAAa,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_components","_compose","_i18n","_blockEditor","_coreData","_htmlEntities","_element","_icons","_commands","_keycodes","_store","_siteIcon","_lockUnlock","HUB_ANIMATION_DURATION","SiteHub","forwardRef","isTransparent","restProps","ref","canvasMode","dashboardLink","homeUrl","siteTitle","useSelect","select","getCanvasMode","getSettings","unlock","editSiteStore","getSite","getUnstableBase","coreStore","__experimentalDashboardLink","home","title","open","openCommandCenter","useDispatch","commandsStore","disableMotion","useReducedMotion","setCanvasMode","__experimentalSetPreviewDeviceType","setPreviewDeviceType","clearSelectedBlock","blockEditorStore","isBackToDashboardButton","siteIconButtonProps","href","label","__","role","onClick","event","preventDefault","_react","createElement","__unstableMotion","div","className","classnames","initial","transition","type","duration","ease","__experimentalHStack","justify","alignment","spacing","layout","Button","animate","scale","whileHover","default","__unstableAnimatePresence","opacity","exit","delay","decodeEntities","target","icon","external","search","shortcut","displayShortcut","primary","_default","exports"],"sources":["@wordpress/edit-site/src/components/site-hub/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { forwardRef } from '@wordpress/element';\nimport { search, external } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\n\nconst HUB_ANIMATION_DURATION = 0.3;\n\nconst SiteHub = forwardRef( ( { isTransparent, ...restProps }, ref ) => {\n\tconst { canvasMode, dashboardLink, homeUrl, siteTitle } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getSettings } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\n\t\t\tconst {\n\t\t\t\tgetSite,\n\t\t\t\tgetUnstableBase, // Site index.\n\t\t\t} = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tdashboardLink:\n\t\t\t\t\tgetSettings().__experimentalDashboardLink || 'index.php',\n\t\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\t\tsiteTitle: getSite()?.title,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\tconst disableMotion = useReducedMotion();\n\tconst {\n\t\tsetCanvasMode,\n\t\t__experimentalSetPreviewDeviceType: setPreviewDeviceType,\n\t} = unlock( useDispatch( editSiteStore ) );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst isBackToDashboardButton = canvasMode === 'view';\n\tconst siteIconButtonProps = isBackToDashboardButton\n\t\t? {\n\t\t\t\thref: dashboardLink,\n\t\t\t\tlabel: __( 'Go to the Dashboard' ),\n\t\t }\n\t\t: {\n\t\t\t\thref: dashboardLink, // We need to keep the `href` here so the component doesn't remount as a `<button>` and break the animation.\n\t\t\t\trole: 'button',\n\t\t\t\tlabel: __( 'Open Navigation' ),\n\t\t\t\tonClick: ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( canvasMode === 'edit' ) {\n\t\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t\t\tsetPreviewDeviceType( 'Desktop' );\n\t\t\t\t\t\tsetCanvasMode( 'view' );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t };\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ ref }\n\t\t\t{ ...restProps }\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-site-hub',\n\t\t\t\trestProps.className\n\t\t\t) }\n\t\t\tinitial={ false }\n\t\t\ttransition={ {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: disableMotion ? 0 : HUB_ANIMATION_DURATION,\n\t\t\t\tease: 'easeOut',\n\t\t\t} }\n\t\t>\n\t\t\t<HStack\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"edit-site-site-hub__container\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-site-hub__text-content\"\n\t\t\t\t\tspacing=\"0\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlayout\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t: HUB_ANIMATION_DURATION,\n\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t{ ...siteIconButtonProps }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\tinitial={ false }\n\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\tscale: canvasMode === 'view' ? 0.5 : 1,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\twhileHover={ {\n\t\t\t\t\t\t\t\t\tscale: canvasMode === 'view' ? 0.5 : 0.96,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t: HUB_ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ canvasMode === 'edit' }\n\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\topacity: canvasMode === 'view' ? 1 : 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-site-hub__site-title',\n\t\t\t\t\t\t\t\t{ 'is-transparent': isTransparent }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tduration: disableMotion ? 0 : 0.2,\n\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\tdelay: canvasMode === 'view' ? 0.1 : 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t{ canvasMode === 'view' && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t'View site (opens in a new tab)'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__site-view-link\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ canvasMode === 'view' && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-site-hub_toggle-command-center',\n\t\t\t\t\t\t\t{ 'is-transparent': isTransparent }\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</motion.div>\n\t);\n} );\n\nexport default SiteHub;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AAKA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,WAAA,G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AAG;MACjC0B,IAAI,EAAE,SAAS;MACfc,KAAK,EAAE5D,UAAU,KAAK,MAAM,GAAG,GAAG,GAAG;IACtC;EAAG,GAED,IAAA6D,4BAAc,EAAE1D,SAAU,CACjB,CACI,CAAC,EAChBH,UAAU,KAAK,MAAM,IACtB,IAAAoC,MAAA,CAAAC,aAAA,EAACxD,WAAA,CAAAuE,MAAM;IACNvB,IAAI,EAAG3B,OAAS;IAChB4D,MAAM,EAAC,QAAQ;IACfhC,KAAK,EAAG,IAAAC,QAAE,EAAE,gCAAiC,CAAG;IAChD,cAAa,IAAAA,QAAE,EACd,gCACD,CAAG;IACHgC,IAAI,EAAGC,eAAU;IACjBxB,SAAS,EAAC;EAAoC,CAC9C,CAEK,CAAC,EACPxC,UAAU,KAAK,MAAM,IACtB,IAAAoC,MAAA,CAAAC,aAAA,EAACxD,WAAA,CAAAuE,MAAM;IACNZ,SAAS,EAAG,IAAAC,mBAAU,EACrB,0CAA0C,EAC1C;MAAE,gBAAgB,EAAE5C;IAAc,CACnC,CAAG;IACHkE,IAAI,EAAGE,aAAQ;IACfhC,OAAO,EAAGA,CAAA,KAAMhB,iBAAiB,CAAC,CAAG;IACrCa,KAAK,EAAG,IAAAC,QAAE,EAAE,sBAAuB,CAAG;IACtCmC,QAAQ,EAAGC,yBAAe,CAACC,OAAO,CAAE,GAAI;EAAG,CAC3C,CAEK,CACG,CAAC;AAEf,CAAE,CAAC;AAAC,IAAAC,QAAA,GAEW1E,OAAO;AAAA2E,OAAA,CAAAd,OAAA,GAAAa,QAAA"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _data = require("@wordpress/data");
11
11
  var _components = require("@wordpress/components");
@@ -37,20 +37,20 @@ function SiteIcon({
37
37
  };
38
38
  }, []);
39
39
  if (isRequestingSite && !siteIconUrl) {
40
- return (0, _element.createElement)("div", {
40
+ return (0, _react.createElement)("div", {
41
41
  className: "edit-site-site-icon__image"
42
42
  });
43
43
  }
44
- const icon = siteIconUrl ? (0, _element.createElement)("img", {
44
+ const icon = siteIconUrl ? (0, _react.createElement)("img", {
45
45
  className: "edit-site-site-icon__image",
46
46
  alt: (0, _i18n.__)('Site Icon'),
47
47
  src: siteIconUrl
48
- }) : (0, _element.createElement)(_components.Icon, {
48
+ }) : (0, _react.createElement)(_components.Icon, {
49
49
  className: "edit-site-site-icon__icon",
50
50
  size: "48px",
51
51
  icon: _icons.wordpress
52
52
  });
53
- return (0, _element.createElement)("div", {
53
+ return (0, _react.createElement)("div", {
54
54
  className: (0, _classnames.default)(className, 'edit-site-site-icon')
55
55
  }, icon);
56
56
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_components","_i18n","_icons","_coreData","SiteIcon","className","isRequestingSite","siteIconUrl","useSelect","select","getEntityRecord","coreDataStore","siteData","undefined","site_icon_url","_element","createElement","icon","alt","__","src","Icon","size","wordpress","classnames","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/site-icon/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { wordpress } from '@wordpress/icons';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nfunction SiteIcon( { className } ) {\n\tconst { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase', undefined );\n\n\t\treturn {\n\t\t\tisRequestingSite: ! siteData,\n\t\t\tsiteIconUrl: siteData?.site_icon_url,\n\t\t};\n\t}, [] );\n\n\tif ( isRequestingSite && ! siteIconUrl ) {\n\t\treturn <div className=\"edit-site-site-icon__image\" />;\n\t}\n\n\tconst icon = siteIconUrl ? (\n\t\t<img\n\t\t\tclassName=\"edit-site-site-icon__image\"\n\t\t\talt={ __( 'Site Icon' ) }\n\t\t\tsrc={ siteIconUrl }\n\t\t/>\n\t) : (\n\t\t<Icon\n\t\t\tclassName=\"edit-site-site-icon__icon\"\n\t\t\tsize=\"48px\"\n\t\t\ticon={ wordpress }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div className={ classnames( className, 'edit-site-site-icon' ) }>\n\t\t\t{ icon }\n\t\t</div>\n\t);\n}\n\nexport default SiteIcon;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAGA;AACA;AACA;;AAOA,SAASM,QAAQA,CAAE;EAAEC;AAAU,CAAC,EAAG;EAClC,MAAM;IAAEC,gBAAgB;IAAEC;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAClE,MAAM;MAAEC;IAAgB,CAAC,GAAGD,MAAM,CAAEE,eAAc,CAAC;IACnD,MAAMC,QAAQ,GAAGF,eAAe,CAAE,MAAM,EAAE,gBAAgB,EAAEG,SAAU,CAAC;IAEvE,OAAO;MACNP,gBAAgB,EAAE,CAAEM,QAAQ;MAC5BL,WAAW,EAAEK,QAAQ,EAAEE;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAKR,gBAAgB,IAAI,CAAEC,WAAW,EAAG;IACxC,OAAO,IAAAQ,QAAA,CAAAC,aAAA;MAAKX,SAAS,EAAC;IAA4B,CAAE,CAAC;EACtD;EAEA,MAAMY,IAAI,GAAGV,WAAW,GACvB,IAAAQ,QAAA,CAAAC,aAAA;IACCX,SAAS,EAAC,4BAA4B;IACtCa,GAAG,EAAG,IAAAC,QAAE,EAAE,WAAY,CAAG;IACzBC,GAAG,EAAGb;EAAa,CACnB,CAAC,GAEF,IAAAQ,QAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAqB,IAAI;IACJhB,SAAS,EAAC,2BAA2B;IACrCiB,IAAI,EAAC,MAAM;IACXL,IAAI,EAAGM;EAAW,CAClB,CACD;EAED,OACC,IAAAR,QAAA,CAAAC,aAAA;IAAKX,SAAS,EAAG,IAAAmB,mBAAU,EAAEnB,SAAS,EAAE,qBAAsB;EAAG,GAC9DY,IACE,CAAC;AAER;AAAC,IAAAQ,QAAA,GAEcrB,QAAQ;AAAAsB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_components","_i18n","_icons","_coreData","SiteIcon","className","isRequestingSite","siteIconUrl","useSelect","select","getEntityRecord","coreDataStore","siteData","undefined","site_icon_url","_react","createElement","icon","alt","__","src","Icon","size","wordpress","classnames","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/site-icon/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { wordpress } from '@wordpress/icons';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nfunction SiteIcon( { className } ) {\n\tconst { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase', undefined );\n\n\t\treturn {\n\t\t\tisRequestingSite: ! siteData,\n\t\t\tsiteIconUrl: siteData?.site_icon_url,\n\t\t};\n\t}, [] );\n\n\tif ( isRequestingSite && ! siteIconUrl ) {\n\t\treturn <div className=\"edit-site-site-icon__image\" />;\n\t}\n\n\tconst icon = siteIconUrl ? (\n\t\t<img\n\t\t\tclassName=\"edit-site-site-icon__image\"\n\t\t\talt={ __( 'Site Icon' ) }\n\t\t\tsrc={ siteIconUrl }\n\t\t/>\n\t) : (\n\t\t<Icon\n\t\t\tclassName=\"edit-site-site-icon__icon\"\n\t\t\tsize=\"48px\"\n\t\t\ticon={ wordpress }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div className={ classnames( className, 'edit-site-site-icon' ) }>\n\t\t\t{ icon }\n\t\t</div>\n\t);\n}\n\nexport default SiteIcon;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAGA;AACA;AACA;;AAOA,SAASM,QAAQA,CAAE;EAAEC;AAAU,CAAC,EAAG;EAClC,MAAM;IAAEC,gBAAgB;IAAEC;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAClE,MAAM;MAAEC;IAAgB,CAAC,GAAGD,MAAM,CAAEE,eAAc,CAAC;IACnD,MAAMC,QAAQ,GAAGF,eAAe,CAAE,MAAM,EAAE,gBAAgB,EAAEG,SAAU,CAAC;IAEvE,OAAO;MACNP,gBAAgB,EAAE,CAAEM,QAAQ;MAC5BL,WAAW,EAAEK,QAAQ,EAAEE;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAKR,gBAAgB,IAAI,CAAEC,WAAW,EAAG;IACxC,OAAO,IAAAQ,MAAA,CAAAC,aAAA;MAAKX,SAAS,EAAC;IAA4B,CAAE,CAAC;EACtD;EAEA,MAAMY,IAAI,GAAGV,WAAW,GACvB,IAAAQ,MAAA,CAAAC,aAAA;IACCX,SAAS,EAAC,4BAA4B;IACtCa,GAAG,EAAG,IAAAC,QAAE,EAAE,WAAY,CAAG;IACzBC,GAAG,EAAGb;EAAa,CACnB,CAAC,GAEF,IAAAQ,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAqB,IAAI;IACJhB,SAAS,EAAC,2BAA2B;IACrCiB,IAAI,EAAC,MAAM;IACXL,IAAI,EAAGM;EAAW,CAClB,CACD;EAED,OACC,IAAAR,MAAA,CAAAC,aAAA;IAAKX,SAAS,EAAG,IAAAmB,mBAAU,EAAEnB,SAAS,EAAE,qBAAsB;EAAG,GAC9DY,IACE,CAAC;AAER;AAAC,IAAAQ,QAAA,GAEcrB,QAAQ;AAAAsB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -5,18 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = StartTemplateOptions;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _components = require("@wordpress/components");
10
10
  var _i18n = require("@wordpress/i18n");
11
+ var _element = require("@wordpress/element");
11
12
  var _blockEditor = require("@wordpress/block-editor");
12
13
  var _data = require("@wordpress/data");
13
14
  var _compose = require("@wordpress/compose");
14
15
  var _preferences = require("@wordpress/preferences");
15
16
  var _blocks = require("@wordpress/blocks");
16
- var _store = require("../../store");
17
17
  var _coreData = require("@wordpress/core-data");
18
18
  var _apiFetch = _interopRequireDefault(require("@wordpress/api-fetch"));
19
19
  var _url = require("@wordpress/url");
20
+ var _store = require("../../store");
20
21
  var _constants = require("../../utils/constants");
21
22
  /**
22
23
  * WordPress dependencies
@@ -105,7 +106,7 @@ function PatternSelection({
105
106
  const [,, onChange] = (0, _coreData.useEntityBlockEditor)('postType', postType);
106
107
  const blockPatterns = useStartPatterns(fallbackContent);
107
108
  const shownBlockPatterns = (0, _compose.useAsyncList)(blockPatterns);
108
- return (0, _element.createElement)(_blockEditor.__experimentalBlockPatternsList, {
109
+ return (0, _react.createElement)(_blockEditor.__experimentalBlockPatternsList, {
109
110
  blockPatterns: blockPatterns,
110
111
  shownPatterns: shownBlockPatterns,
111
112
  onClickPattern: (pattern, blocks) => {
@@ -126,16 +127,16 @@ function StartModal({
126
127
  if (!fallbackContent) {
127
128
  return null;
128
129
  }
129
- return (0, _element.createElement)(_components.Modal, {
130
+ return (0, _react.createElement)(_components.Modal, {
130
131
  className: "edit-site-start-template-options__modal",
131
132
  title: (0, _i18n.__)('Choose a pattern'),
132
133
  closeLabel: (0, _i18n.__)('Cancel'),
133
134
  focusOnMount: "firstElement",
134
135
  onRequestClose: onClose,
135
136
  isFullScreen: true
136
- }, (0, _element.createElement)("div", {
137
+ }, (0, _react.createElement)("div", {
137
138
  className: "edit-site-start-template-options__modal-content"
138
- }, (0, _element.createElement)(PatternSelection, {
139
+ }, (0, _react.createElement)(PatternSelection, {
139
140
  fallbackContent: fallbackContent,
140
141
  slug: slug,
141
142
  isCustom: isCustom,
@@ -143,11 +144,11 @@ function StartModal({
143
144
  onChoosePattern: () => {
144
145
  onClose();
145
146
  }
146
- })), (0, _element.createElement)(_components.Flex, {
147
+ })), (0, _react.createElement)(_components.Flex, {
147
148
  className: "edit-site-start-template-options__modal__actions",
148
149
  justify: "flex-end",
149
150
  expanded: false
150
- }, (0, _element.createElement)(_components.FlexItem, null, (0, _element.createElement)(_components.Button, {
151
+ }, (0, _react.createElement)(_components.FlexItem, null, (0, _react.createElement)(_components.Button, {
151
152
  variant: "tertiary",
152
153
  onClick: onClose
153
154
  }, (0, _i18n.__)('Skip')))));
@@ -186,7 +187,7 @@ function StartTemplateOptions() {
186
187
  if (modalState === START_TEMPLATE_MODAL_STATES.INITIAL && !shouldOpenModal || modalState === START_TEMPLATE_MODAL_STATES.CLOSED) {
187
188
  return null;
188
189
  }
189
- return (0, _element.createElement)(StartModal, {
190
+ return (0, _react.createElement)(StartModal, {
190
191
  slug: slug,
191
192
  isCustom: isCustom,
192
193
  postType: postType,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_components","_i18n","_blockEditor","_data","_compose","_preferences","_blocks","_store","_coreData","_apiFetch","_interopRequireDefault","_url","_constants","useFallbackTemplateContent","slug","isCustom","templateContent","setTemplateContent","useState","useEffect","apiFetch","path","addQueryArgs","is_custom","ignore_empty","then","content","raw","useStartPatterns","fallbackContent","patterns","useSelect","select","getEditedPostType","getEditedPostId","editSiteStore","getEntityRecord","coreStore","postId","postType","record","getSettings","blockEditorStore","__experimentalBlockPatterns","currentThemeStylesheet","getCurrentTheme","stylesheet","injectThemeAttributeInBlockTemplateContent","block","innerBlocks","find","innerBlock","name","map","attributes","theme","undefined","useMemo","blocks","parse","title","__","filter","pattern","Array","isArray","templateTypes","some","templateType","startsWith","PatternSelection","onChoosePattern","onChange","useEntityBlockEditor","blockPatterns","shownBlockPatterns","useAsyncList","createElement","__experimentalBlockPatternsList","shownPatterns","onClickPattern","selection","StartModal","onClose","Modal","className","closeLabel","focusOnMount","onRequestClose","isFullScreen","Flex","justify","expanded","FlexItem","Button","variant","onClick","START_TEMPLATE_MODAL_STATES","INITIAL","CLOSED","StartTemplateOptions","modalState","setModalState","shouldOpenModal","_postType","getEditedEntityRecord","hasEditsForEntityRecord","templateRecord","hasEdits","TEMPLATE_POST_TYPE","preferencesStore","get"],"sources":["@wordpress/edit-site/src/components/start-template-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal, Flex, FlexItem, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport {\n\t__experimentalBlockPatternsList as BlockPatternsList,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useAsyncList } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { parse } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nfunction useFallbackTemplateContent( slug, isCustom = false ) {\n\tconst [ templateContent, setTemplateContent ] = useState( '' );\n\n\tuseEffect( () => {\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/templates/lookup', {\n\t\t\t\tslug,\n\t\t\t\tis_custom: isCustom,\n\t\t\t\tignore_empty: true,\n\t\t\t} ),\n\t\t} ).then( ( { content } ) => setTemplateContent( content.raw ) );\n\t}, [ isCustom, slug ] );\n\treturn templateContent;\n}\n\nfunction useStartPatterns( fallbackContent ) {\n\tconst { slug, patterns } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postId = getEditedPostId();\n\t\tconst postType = getEditedPostType();\n\t\tconst record = getEntityRecord( 'postType', postType, postId );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tslug: record.slug,\n\t\t\tpatterns: getSettings().__experimentalBlockPatterns,\n\t\t};\n\t}, [] );\n\n\tconst currentThemeStylesheet = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme().stylesheet\n\t);\n\n\t// Duplicated from packages/block-library/src/pattern/edit.js.\n\tfunction injectThemeAttributeInBlockTemplateContent( block ) {\n\t\tif (\n\t\t\tblock.innerBlocks.find(\n\t\t\t\t( innerBlock ) => innerBlock.name === 'core/template-part'\n\t\t\t)\n\t\t) {\n\t\t\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\t\t\tif (\n\t\t\t\t\tinnerBlock.name === 'core/template-part' &&\n\t\t\t\t\tinnerBlock.attributes.theme === undefined\n\t\t\t\t) {\n\t\t\t\t\tinnerBlock.attributes.theme = currentThemeStylesheet;\n\t\t\t\t}\n\t\t\t\treturn innerBlock;\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tblock.name === 'core/template-part' &&\n\t\t\tblock.attributes.theme === undefined\n\t\t) {\n\t\t\tblock.attributes.theme = currentThemeStylesheet;\n\t\t}\n\t\treturn block;\n\t}\n\n\treturn useMemo( () => {\n\t\t// filter patterns that are supposed to be used in the current template being edited.\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'fallback',\n\t\t\t\tblocks: parse( fallbackContent ),\n\t\t\t\ttitle: __( 'Fallback content' ),\n\t\t\t},\n\t\t\t...patterns\n\t\t\t\t.filter( ( pattern ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tArray.isArray( pattern.templateTypes ) &&\n\t\t\t\t\t\tpattern.templateTypes.some( ( templateType ) =>\n\t\t\t\t\t\t\tslug.startsWith( templateType )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t\t.map( ( pattern ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...pattern,\n\t\t\t\t\t\tblocks: parse( pattern.content ).map( ( block ) =>\n\t\t\t\t\t\t\tinjectThemeAttributeInBlockTemplateContent( block )\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t];\n\t}, [ fallbackContent, slug, patterns ] );\n}\n\nfunction PatternSelection( { fallbackContent, onChoosePattern, postType } ) {\n\tconst [ , , onChange ] = useEntityBlockEditor( 'postType', postType );\n\tconst blockPatterns = useStartPatterns( fallbackContent );\n\tconst shownBlockPatterns = useAsyncList( blockPatterns );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tshownPatterns={ shownBlockPatterns }\n\t\t\tonClickPattern={ ( pattern, blocks ) => {\n\t\t\t\tonChange( blocks, { selection: undefined } );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartModal( { slug, isCustom, onClose, postType } ) {\n\tconst fallbackContent = useFallbackTemplateContent( slug, isCustom );\n\tif ( ! fallbackContent ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-site-start-template-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tcloseLabel={ __( 'Cancel' ) }\n\t\t\tfocusOnMount=\"firstElement\"\n\t\t\tonRequestClose={ onClose }\n\t\t\tisFullScreen={ true }\n\t\t>\n\t\t\t<div className=\"edit-site-start-template-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tfallbackContent={ fallbackContent }\n\t\t\t\t\tslug={ slug }\n\t\t\t\t\tisCustom={ isCustom }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tonChoosePattern={ () => {\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Flex\n\t\t\t\tclassName=\"edit-site-start-template-options__modal__actions\"\n\t\t\t\tjustify=\"flex-end\"\n\t\t\t\texpanded={ false }\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button variant=\"tertiary\" onClick={ onClose }>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</Modal>\n\t);\n}\n\nconst START_TEMPLATE_MODAL_STATES = {\n\tINITIAL: 'INITIAL',\n\tCLOSED: 'CLOSED',\n};\n\nexport default function StartTemplateOptions() {\n\tconst [ modalState, setModalState ] = useState(\n\t\tSTART_TEMPLATE_MODAL_STATES.INITIAL\n\t);\n\tconst { shouldOpenModal, slug, isCustom, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostType, getEditedPostId } =\n\t\t\t\tselect( editSiteStore );\n\t\t\tconst _postType = getEditedPostType();\n\t\t\tconst postId = getEditedPostId();\n\t\t\tconst { getEditedEntityRecord, hasEditsForEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tconst hasEdits = hasEditsForEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tpostId\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tshouldOpenModal:\n\t\t\t\t\t! hasEdits &&\n\t\t\t\t\t'' === templateRecord.content &&\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType &&\n\t\t\t\t\t! select( preferencesStore ).get(\n\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t'welcomeGuide'\n\t\t\t\t\t),\n\t\t\t\tslug: templateRecord.slug,\n\t\t\t\tisCustom: templateRecord.is_custom,\n\t\t\t\tpostType: _postType,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t( modalState === START_TEMPLATE_MODAL_STATES.INITIAL &&\n\t\t\t! shouldOpenModal ) ||\n\t\tmodalState === START_TEMPLATE_MODAL_STATES.CLOSED\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StartModal\n\t\t\tslug={ slug }\n\t\t\tisCustom={ isCustom }\n\t\t\tpostType={ postType }\n\t\t\tonClose={ () =>\n\t\t\t\tsetModalState( START_TEMPLATE_MODAL_STATES.CLOSED )\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AAFA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAC,sBAAA,CAAAX,OAAA;AACA,IAAAY,IAAA,GAAAZ,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AAtBA;AACA;AACA;;AAaA;AACA;AACA;;AAOA,SAASc,0BAA0BA,CAAEC,IAA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AAM,GAAGJ,eAAe,CAAC,CAAC;IAChC,MAAM;MAAEuE,qBAAqB;MAAEC;IAAwB,CAAC,GACvD1E,MAAM,CAAEK,eAAU,CAAC;IACpB,MAAMsE,cAAc,GAAGF,qBAAqB,CAC3C,UAAU,EACVD,SAAS,EACTlE,MACD,CAAC;IACD,MAAMsE,QAAQ,GAAGF,uBAAuB,CACvC,UAAU,EACVF,SAAS,EACTlE,MACD,CAAC;IAED,OAAO;MACNiE,eAAe,EACd,CAAEK,QAAQ,IACV,EAAE,KAAKD,cAAc,CAACjF,OAAO,IAC7BmF,6BAAkB,KAAKL,SAAS,IAChC,CAAExE,MAAM,CAAE8E,kBAAiB,CAAC,CAACC,GAAG,CAC/B,gBAAgB,EAChB,cACD,CAAC;MACFjG,IAAI,EAAE6F,cAAc,CAAC7F,IAAI;MACzBC,QAAQ,EAAE4F,cAAc,CAACpF,SAAS;MAClCgB,QAAQ,EAAEiE;IACX,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,IACGH,UAAU,KAAKJ,2BAA2B,CAACC,OAAO,IACnD,CAAEK,eAAe,IAClBF,UAAU,KAAKJ,2BAA2B,CAACE,MAAM,EAChD;IACD,OAAO,IAAI;EACZ;EAEA,OACC,IAAArG,QAAA,CAAA+E,aAAA,EAACK,UAAU;IACVpE,IAAI,EAAGA,IAAM;IACbC,QAAQ,EAAGA,QAAU;IACrBwB,QAAQ,EAAGA,QAAU;IACrB4C,OAAO,EAAGA,CAAA,KACTmB,aAAa,CAAEL,2BAA2B,CAACE,MAAO;EAClD,CACD,CAAC;AAEJ"}
1
+ {"version":3,"names":["_components","require","_i18n","_element","_blockEditor","_data","_compose","_preferences","_blocks","_coreData","_apiFetch","_interopRequireDefault","_url","_store","_constants","useFallbackTemplateContent","slug","isCustom","templateContent","setTemplateContent","useState","useEffect","apiFetch","path","addQueryArgs","is_custom","ignore_empty","then","content","raw","useStartPatterns","fallbackContent","patterns","useSelect","select","getEditedPostType","getEditedPostId","editSiteStore","getEntityRecord","coreStore","postId","postType","record","getSettings","blockEditorStore","__experimentalBlockPatterns","currentThemeStylesheet","getCurrentTheme","stylesheet","injectThemeAttributeInBlockTemplateContent","block","innerBlocks","find","innerBlock","name","map","attributes","theme","undefined","useMemo","blocks","parse","title","__","filter","pattern","Array","isArray","templateTypes","some","templateType","startsWith","PatternSelection","onChoosePattern","onChange","useEntityBlockEditor","blockPatterns","shownBlockPatterns","useAsyncList","_react","createElement","__experimentalBlockPatternsList","shownPatterns","onClickPattern","selection","StartModal","onClose","Modal","className","closeLabel","focusOnMount","onRequestClose","isFullScreen","Flex","justify","expanded","FlexItem","Button","variant","onClick","START_TEMPLATE_MODAL_STATES","INITIAL","CLOSED","StartTemplateOptions","modalState","setModalState","shouldOpenModal","_postType","getEditedEntityRecord","hasEditsForEntityRecord","templateRecord","hasEdits","TEMPLATE_POST_TYPE","preferencesStore","get"],"sources":["@wordpress/edit-site/src/components/start-template-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal, Flex, FlexItem, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport {\n\t__experimentalBlockPatternsList as BlockPatternsList,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useAsyncList } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nfunction useFallbackTemplateContent( slug, isCustom = false ) {\n\tconst [ templateContent, setTemplateContent ] = useState( '' );\n\n\tuseEffect( () => {\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/templates/lookup', {\n\t\t\t\tslug,\n\t\t\t\tis_custom: isCustom,\n\t\t\t\tignore_empty: true,\n\t\t\t} ),\n\t\t} ).then( ( { content } ) => setTemplateContent( content.raw ) );\n\t}, [ isCustom, slug ] );\n\treturn templateContent;\n}\n\nfunction useStartPatterns( fallbackContent ) {\n\tconst { slug, patterns } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postId = getEditedPostId();\n\t\tconst postType = getEditedPostType();\n\t\tconst record = getEntityRecord( 'postType', postType, postId );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tslug: record.slug,\n\t\t\tpatterns: getSettings().__experimentalBlockPatterns,\n\t\t};\n\t}, [] );\n\n\tconst currentThemeStylesheet = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme().stylesheet\n\t);\n\n\t// Duplicated from packages/block-library/src/pattern/edit.js.\n\tfunction injectThemeAttributeInBlockTemplateContent( block ) {\n\t\tif (\n\t\t\tblock.innerBlocks.find(\n\t\t\t\t( innerBlock ) => innerBlock.name === 'core/template-part'\n\t\t\t)\n\t\t) {\n\t\t\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\t\t\tif (\n\t\t\t\t\tinnerBlock.name === 'core/template-part' &&\n\t\t\t\t\tinnerBlock.attributes.theme === undefined\n\t\t\t\t) {\n\t\t\t\t\tinnerBlock.attributes.theme = currentThemeStylesheet;\n\t\t\t\t}\n\t\t\t\treturn innerBlock;\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tblock.name === 'core/template-part' &&\n\t\t\tblock.attributes.theme === undefined\n\t\t) {\n\t\t\tblock.attributes.theme = currentThemeStylesheet;\n\t\t}\n\t\treturn block;\n\t}\n\n\treturn useMemo( () => {\n\t\t// filter patterns that are supposed to be used in the current template being edited.\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'fallback',\n\t\t\t\tblocks: parse( fallbackContent ),\n\t\t\t\ttitle: __( 'Fallback content' ),\n\t\t\t},\n\t\t\t...patterns\n\t\t\t\t.filter( ( pattern ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tArray.isArray( pattern.templateTypes ) &&\n\t\t\t\t\t\tpattern.templateTypes.some( ( templateType ) =>\n\t\t\t\t\t\t\tslug.startsWith( templateType )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t\t.map( ( pattern ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...pattern,\n\t\t\t\t\t\tblocks: parse( pattern.content ).map( ( block ) =>\n\t\t\t\t\t\t\tinjectThemeAttributeInBlockTemplateContent( block )\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t];\n\t}, [ fallbackContent, slug, patterns ] );\n}\n\nfunction PatternSelection( { fallbackContent, onChoosePattern, postType } ) {\n\tconst [ , , onChange ] = useEntityBlockEditor( 'postType', postType );\n\tconst blockPatterns = useStartPatterns( fallbackContent );\n\tconst shownBlockPatterns = useAsyncList( blockPatterns );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tshownPatterns={ shownBlockPatterns }\n\t\t\tonClickPattern={ ( pattern, blocks ) => {\n\t\t\t\tonChange( blocks, { selection: undefined } );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartModal( { slug, isCustom, onClose, postType } ) {\n\tconst fallbackContent = useFallbackTemplateContent( slug, isCustom );\n\tif ( ! fallbackContent ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-site-start-template-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tcloseLabel={ __( 'Cancel' ) }\n\t\t\tfocusOnMount=\"firstElement\"\n\t\t\tonRequestClose={ onClose }\n\t\t\tisFullScreen={ true }\n\t\t>\n\t\t\t<div className=\"edit-site-start-template-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tfallbackContent={ fallbackContent }\n\t\t\t\t\tslug={ slug }\n\t\t\t\t\tisCustom={ isCustom }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tonChoosePattern={ () => {\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Flex\n\t\t\t\tclassName=\"edit-site-start-template-options__modal__actions\"\n\t\t\t\tjustify=\"flex-end\"\n\t\t\t\texpanded={ false }\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button variant=\"tertiary\" onClick={ onClose }>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</Modal>\n\t);\n}\n\nconst START_TEMPLATE_MODAL_STATES = {\n\tINITIAL: 'INITIAL',\n\tCLOSED: 'CLOSED',\n};\n\nexport default function StartTemplateOptions() {\n\tconst [ modalState, setModalState ] = useState(\n\t\tSTART_TEMPLATE_MODAL_STATES.INITIAL\n\t);\n\tconst { shouldOpenModal, slug, isCustom, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostType, getEditedPostId } =\n\t\t\t\tselect( editSiteStore );\n\t\t\tconst _postType = getEditedPostType();\n\t\t\tconst postId = getEditedPostId();\n\t\t\tconst { getEditedEntityRecord, hasEditsForEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tconst hasEdits = hasEditsForEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tpostId\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tshouldOpenModal:\n\t\t\t\t\t! hasEdits &&\n\t\t\t\t\t'' === templateRecord.content &&\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType &&\n\t\t\t\t\t! select( preferencesStore ).get(\n\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t'welcomeGuide'\n\t\t\t\t\t),\n\t\t\t\tslug: templateRecord.slug,\n\t\t\t\tisCustom: templateRecord.is_custom,\n\t\t\t\tpostType: _postType,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t( modalState === START_TEMPLATE_MODAL_STATES.INITIAL &&\n\t\t\t! shouldOpenModal ) ||\n\t\tmodalState === START_TEMPLATE_MODAL_STATES.CLOSED\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StartModal\n\t\t\tslug={ slug }\n\t\t\tisCustom={ isCustom }\n\t\t\tpostType={ postType }\n\t\t\tonClose={ () =>\n\t\t\t\tsetModalState( START_TEMPLATE_MODAL_STATES.CLOSED )\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,IAAA,GAAAX,OAAA;AAKA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AAtBA;AACA;AACA;;AAgBA;AACA;AACA;;AAIA,SAASc,0BAA0BA,CAAEC,IAAI,EAAEC,QAAQ,GAAG,KAAK,EAAG;EAC7D,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,EAAG,CAAC;EAE9D,IAAAC,kBAAS,EAAE,MAAM;IAChB,IAA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CAAC;IACD,MAAMuE,QAAQ,GAAGF,uBAAuB,CACvC,UAAU,EACVF,SAAS,EACTnE,MACD,CAAC;IAED,OAAO;MACNkE,eAAe,EACd,CAAEK,QAAQ,IACV,EAAE,KAAKD,cAAc,CAAClF,OAAO,IAC7BoF,6BAAkB,KAAKL,SAAS,IAChC,CAAEzE,MAAM,CAAE+E,kBAAiB,CAAC,CAACC,GAAG,CAC/B,gBAAgB,EAChB,cACD,CAAC;MACFlG,IAAI,EAAE8F,cAAc,CAAC9F,IAAI;MACzBC,QAAQ,EAAE6F,cAAc,CAACrF,SAAS;MAClCgB,QAAQ,EAAEkE;IACX,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,IACGH,UAAU,KAAKJ,2BAA2B,CAACC,OAAO,IACnD,CAAEK,eAAe,IAClBF,UAAU,KAAKJ,2BAA2B,CAACE,MAAM,EAChD;IACD,OAAO,IAAI;EACZ;EAEA,OACC,IAAAvB,MAAA,CAAAC,aAAA,EAACK,UAAU;IACVrE,IAAI,EAAGA,IAAM;IACbC,QAAQ,EAAGA,QAAU;IACrBwB,QAAQ,EAAGA,QAAU;IACrB6C,OAAO,EAAGA,CAAA,KACTmB,aAAa,CAAEL,2BAA2B,CAACE,MAAO;EAClD,CACD,CAAC;AAEJ"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _components = require("@wordpress/components");
11
11
  var _i18n = require("@wordpress/i18n");
@@ -13,6 +13,7 @@ var _blocks = require("@wordpress/blocks");
13
13
  var _blockEditor = require("@wordpress/block-editor");
14
14
  var _data = require("@wordpress/data");
15
15
  var _compose = require("@wordpress/compose");
16
+ var _element = require("@wordpress/element");
16
17
  var _keycodes = require("@wordpress/keycodes");
17
18
  var _lockUnlock = require("../../lock-unlock");
18
19
  var _editorCanvasContainer = _interopRequireDefault(require("../editor-canvas-container"));
@@ -163,10 +164,10 @@ function StyleBook({
163
164
  ...originalSettings,
164
165
  __unstableIsPreviewMode: true
165
166
  }), [originalSettings]);
166
- return (0, _element.createElement)(_editorCanvasContainer.default, {
167
+ return (0, _react.createElement)(_editorCanvasContainer.default, {
167
168
  enableResizing: enableResizing,
168
169
  closeButtonLabel: showCloseButton ? (0, _i18n.__)('Close Style Book') : null
169
- }, (0, _element.createElement)("div", {
170
+ }, (0, _react.createElement)("div", {
170
171
  className: (0, _classnames.default)('edit-site-style-book', {
171
172
  'is-wide': sizes.width > 600,
172
173
  'is-button': !!onClick
@@ -175,10 +176,10 @@ function StyleBook({
175
176
  color: textColor,
176
177
  background: backgroundColor
177
178
  }
178
- }, resizeObserver, showTabs ? (0, _element.createElement)(_components.TabPanel, {
179
+ }, resizeObserver, showTabs ? (0, _react.createElement)(_components.TabPanel, {
179
180
  className: "edit-site-style-book__tab-panel",
180
181
  tabs: tabs
181
- }, tab => (0, _element.createElement)(StyleBookBody, {
182
+ }, tab => (0, _react.createElement)(StyleBookBody, {
182
183
  category: tab.name,
183
184
  examples: examples,
184
185
  isSelected: isSelected,
@@ -186,7 +187,7 @@ function StyleBook({
186
187
  settings: settings,
187
188
  sizes: sizes,
188
189
  title: tab.title
189
- })) : (0, _element.createElement)(StyleBookBody, {
190
+ })) : (0, _react.createElement)(StyleBookBody, {
190
191
  examples: examples,
191
192
  isSelected: isSelected,
192
193
  onClick: onClick,
@@ -237,7 +238,7 @@ const StyleBookBody = ({
237
238
  readonly: true
238
239
  };
239
240
  const buttonModeStyles = onClick ? 'body { cursor: pointer; } body * { pointer-events: none; }' : '';
240
- return (0, _element.createElement)(_blockEditor.__unstableIframe, {
241
+ return (0, _react.createElement)(_blockEditor.__unstableIframe, {
241
242
  className: (0, _classnames.default)('edit-site-style-book__iframe', {
242
243
  'is-focused': isFocused && !!onClick,
243
244
  'is-button': !!onClick
@@ -245,13 +246,13 @@ const StyleBookBody = ({
245
246
  name: "style-book-canvas",
246
247
  tabIndex: 0,
247
248
  ...(onClick ? buttonModeProps : {})
248
- }, (0, _element.createElement)(_blockEditor.__unstableEditorStyles, {
249
+ }, (0, _react.createElement)(_blockEditor.__unstableEditorStyles, {
249
250
  styles: settings.styles
250
- }), (0, _element.createElement)("style", null,
251
+ }), (0, _react.createElement)("style", null,
251
252
  // Forming a "block formatting context" to prevent margin collapsing.
252
253
  // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
253
254
  `.is-root-container { display: flow-root; }
254
- body { position: relative; padding: 32px !important; }` + STYLE_BOOK_IFRAME_STYLES + buttonModeStyles), (0, _element.createElement)(Examples, {
255
+ body { position: relative; padding: 32px !important; }` + STYLE_BOOK_IFRAME_STYLES + buttonModeStyles), (0, _react.createElement)(Examples, {
255
256
  className: (0, _classnames.default)('edit-site-style-book__examples', {
256
257
  'is-wide': sizes.width > 600
257
258
  }),
@@ -275,11 +276,11 @@ const Examples = (0, _element.memo)(({
275
276
  const composite = (0, _components.__unstableUseCompositeState)({
276
277
  orientation: 'vertical'
277
278
  });
278
- return (0, _element.createElement)(_components.__unstableComposite, {
279
+ return (0, _react.createElement)(_components.__unstableComposite, {
279
280
  ...composite,
280
281
  className: className,
281
282
  "aria-label": label
282
- }, examples.filter(example => category ? example.category === category : true).map(example => (0, _element.createElement)(Example, {
283
+ }, examples.filter(example => category ? example.category === category : true).map(example => (0, _react.createElement)(Example, {
283
284
  key: example.name,
284
285
  id: `example-${example.name}`,
285
286
  composite: composite,
@@ -307,7 +308,7 @@ const Example = ({
307
308
 
308
309
  // Cache the list of blocks to avoid additional processing when the component is re-rendered.
309
310
  const renderedBlocks = (0, _element.useMemo)(() => Array.isArray(blocks) ? blocks : [blocks], [blocks]);
310
- return (0, _element.createElement)(_components.__unstableCompositeItem, {
311
+ return (0, _react.createElement)(_components.__unstableCompositeItem, {
311
312
  ...composite,
312
313
  className: (0, _classnames.default)('edit-site-style-book__example', {
313
314
  'is-selected': isSelected
@@ -319,17 +320,17 @@ const Example = ({
319
320
  onClick: onClick,
320
321
  role: "button",
321
322
  as: "div"
322
- }, (0, _element.createElement)("span", {
323
+ }, (0, _react.createElement)("span", {
323
324
  className: "edit-site-style-book__example-title"
324
- }, title), (0, _element.createElement)("div", {
325
+ }, title), (0, _react.createElement)("div", {
325
326
  className: "edit-site-style-book__example-preview",
326
327
  "aria-hidden": true
327
- }, (0, _element.createElement)(_components.Disabled, {
328
+ }, (0, _react.createElement)(_components.Disabled, {
328
329
  className: "edit-site-style-book__example-preview__content"
329
- }, (0, _element.createElement)(ExperimentalBlockEditorProvider, {
330
+ }, (0, _react.createElement)(ExperimentalBlockEditorProvider, {
330
331
  value: renderedBlocks,
331
332
  settings: settings
332
- }, (0, _element.createElement)(_blockEditor.BlockList, {
333
+ }, (0, _react.createElement)(_blockEditor.BlockList, {
333
334
  renderAppender: false
334
335
  })))));
335
336
  };